feat: rename ALPN prefix from alknet/ to alk/ (v0.1.1)
- CHANNELS_ALPN: b"alknet/channels" → b"alk/channels" - CallAdapter::alpn(): b"alknet/call" → b"alk/call" - derive_alpn_from_op_name: alknet/ prefix → alk/ prefix - All ALPN string literals in src/ and docs/ updated - ADR-004 amended with prefix rename rationale - AGENTS.md, README.md updated - Version bumped to 0.1.1 Review: docs/reviews/003-alpn-prefix-rename.md Verification: - cargo test: 542 passed, 0 failed - cargo clippy --all-targets -- -D warnings: clean - cargo fmt --check: clean - cargo doc --no-deps: clean
This commit is contained in:
1 parent
3cce1410c4
commit
08e7df2aa0
60 files changed
+837
-328
No files matched your search
@@ -80,7 +80,7 @@ on the `BiStream` the channels layer gives them.
|
||||
doesn't carry control. The "control isn't actually bidirectional" flaw
|
||||
is fixed at the TTY layer, not the channels layer.
|
||||
- **Recursive composition is literal.** A channel with ALPN
|
||||
`alknet/channels` runs another channels demux on its `BiStream`. The
|
||||
`alk/channels` runs another channels demux on its `BiStream`. The
|
||||
outer layer strips its 8-byte header; the inner layer parses its own
|
||||
8-byte header from the payload. Each level is the same shape —
|
||||
`BiStream → accept_bi → N BiStreams`.
|
||||
@@ -122,7 +122,7 @@ a `channel_id` was stripped before it saw the bytes.
|
||||
|
||||
The composition is uniform — the same shape at every level. This is SSH's
|
||||
model (layered headers, each layer strips its own at its boundary),
|
||||
applied to channels. A `alknet/channels`-inside-`alknet/channels`
|
||||
applied to channels. A `alk/channels`-inside-`alk/channels`
|
||||
recursive composition is the outer layer stripping its 8-byte header, the
|
||||
inner layer parsing its own 8-byte header from the payload — same code,
|
||||
same shape, each level.
|
||||
@@ -193,7 +193,7 @@ handler's framing, carried transparently.
|
||||
|
||||
| field | offset | width | meaning |
|
||||
|-------|--------|-------|---------|
|
||||
| `channel_id` | 0 | 4 (BE) | The logical channel this chunk belongs to. Channel 0 is pre-negotiated as `alknet/call` (ADR-036). Channels 1..N are opened dynamically via `channel/open` (ADR-037). |
|
||||
| `channel_id` | 0 | 4 (BE) | The logical channel this chunk belongs to. Channel 0 is pre-negotiated as `alk/call` (ADR-036). Channels 1..N are opened dynamically via `channel/open` (ADR-037). |
|
||||
| `length` | 4 | 4 (BE) | The payload length in bytes. 0 = EOF sentinel. Max `MAX_CHUNK_LEN` (16 MiB, matching TTY's cap — ADR-052 §5). |
|
||||
|
||||
The `stream_type` byte is **removed** from the channels header. The
|
||||
@@ -231,8 +231,8 @@ ADR-077's two-mode TTY design (direct vs inside-channels) is reversed.
|
||||
TTY's 5-byte format (`[stream_type:u8][length:u32][payload]`, ADR-052) is
|
||||
TTY's internal format, used in *both* direct mode and inside-channels
|
||||
mode. The two modes differ only in *where the `BiStream` comes from*
|
||||
(a top-level `alknet/tty` connection vs a `channel/open` with ALPN
|
||||
`alknet/tty`), not in *how TTY parses it*. The same `wire.rs` code runs
|
||||
(a top-level `alk/tty` connection vs a `channel/open` with ALPN
|
||||
`alk/tty`), not in *how TTY parses it*. The same `wire.rs` code runs
|
||||
in both modes.
|
||||
|
||||
When TTY is inside channels, the channels layer strips its 8-byte header
|
||||
@@ -272,7 +272,7 @@ TTY inside channels:
|
||||
```
|
||||
|
||||
The composition is uniform — the same shape at every level. A
|
||||
`alknet/channels`-inside-`alknet/channels` recursive composition is the
|
||||
`alk/channels`-inside-`alk/channels` recursive composition is the
|
||||
outer layer stripping its 8-byte header, the inner layer parsing its own
|
||||
8-byte header from the payload — same code, same shape, each level.
|
||||
|
||||
@@ -284,7 +284,7 @@ outer layer stripping its 8-byte header, the inner layer parsing its own
|
||||
transport leaf; this ADR settles the multiplexing layer above it).
|
||||
- **`ProtocolHandler` trait shape** (ADR-002) — unchanged. Handlers
|
||||
receive a `Connection` and call `accept_bi()`.
|
||||
- **Channel 0 pre-negotiated as `alknet/call`** (ADR-036) — unchanged.
|
||||
- **Channel 0 pre-negotiated as `alk/call`** (ADR-036) — unchanged.
|
||||
Channel 0's chunks have `channel_id = 0` in the 8-byte header. The call
|
||||
protocol's `EventEnvelope` framing is the payload; the channels layer
|
||||
carries it transparently.
|
||||
@@ -345,7 +345,7 @@ outer layer stripping its 8-byte header, the inner layer parsing its own
|
||||
byte it doesn't use; no handler needs a second accessor
|
||||
(`into_sub_streams`) to reach its sub-streams. The channels layer's
|
||||
API surface is `accept_bi -> BiStream`, period.
|
||||
- **Recursive composition is literal.** A `alknet/channels` channel runs
|
||||
- **Recursive composition is literal.** A `alk/channels` channel runs
|
||||
another channels demux on its `BiStream`. The outer layer strips its
|
||||
8-byte header; the inner layer parses its own 8-byte header from the
|
||||
payload. Same code, same shape, each level. This is a property, not a
|
||||
@@ -452,7 +452,7 @@ breaking the wire format or the handler contract.
|
||||
public stream constructor)
|
||||
- ADR-008: `BidiStreamSource` trait (the extension point
|
||||
`ChannelBidiStreamSource` implements; `accept_bi` yields `BiStream`)
|
||||
- ADR-036: channel 0 pre-negotiated `alknet/call` (unchanged — channel 0's
|
||||
- ADR-036: channel 0 pre-negotiated `alk/call` (unchanged — channel 0's
|
||||
chunks have `channel_id = 0` in the 8-byte header; the call protocol's
|
||||
framing is the payload)
|
||||
- ADR-037: channel lifecycle operations (amended — `stream_types` field
|
||||
|
||||
Reference in new issue
Block a user