Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion pkgs/fleet/book/reference/id.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ session's public identity on the ID plane — and moves bytes to ID
peers under the design's mode rule. The registry summary's older
wording ("proxy, postcard, stream and serve-ws verbs land as later
slices") is historical: `session-key`, `proxy-mode` and `proxy` have
landed (slices 1–2, #15430/#15434); the initiator verbs served by
landed (slices 1–2, #15430/#15434), and `serve-ws` has landed
(slice 5, #15399); the initiator verbs served by
`fleet id postcard` / `fleet id stream` are the mode-3 surface the
proxy verb names, not this domain's own verbs yet.

Expand Down Expand Up @@ -92,3 +93,37 @@ splices opaque QUIC stream bytes.

Exit codes: 0 ok · 2 usage · 69 mode unavailable · 71 relay
unreachable · 72 identity mismatch · 73 target unreachable.

## fleet id serve-ws

```text
fleet id serve-ws [--bind <addr>] [--token <bearer> | --id-secret <hex>]
```

Slice 5 (#15399, design §4.5): the conversion + WebSocket serving
socket. It serves the `{ v, seq, kind, alpn, payload, digest? }`
envelope over WebSocket in CBOR (`fleet-id-cbor-v1`) or MessagePack
(`fleet-id-msgpack-v1`), negotiated per connection — the client
offers a `Sec-WebSocket-Protocol` and the server answers with the
first offered protocol it speaks, refusing the handshake when
neither is offered. Conversion (§4.4) is threshold-triggered: a
browser or other non-Rust client, a payload over the 1 MiB
conversion threshold, or a streaming exchange converts through
`serde_json::Value` (variants by name, never by position); larger
converted payloads split into 256 KiB chunk envelopes with per-chunk
BLAKE3 digests. The iroh wire itself stays postcard.

- `--bind <addr>` — listen address; default `127.0.0.1:9473`
(localhost only).
- `--token <bearer>` / `--id-secret <hex>` — the session
credential: a non-local bind without one is refused before the
listener is created (exit 3); `--id-secret` derives the
NodeId session token from a slice-1 session key. When a token is
configured it is required as `Authorization: Bearer <token>` on
the handshake, on any bind.

The built-in bridge is the fixture echo bridge; the live iroh dial
plugs into the same bridge seam.

Exit codes: 0 ok · 2 usage · 3 non-local serve without
credentials · 4 bind/serve failure.
6 changes: 3 additions & 3 deletions pkgs/fleet/crates/fleet-registry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub enum Capability {
Kv,
/// `fleet id …` — the iroh-native ID transport surface (design
/// #10391 pass 2): session key lifecycle + stamping first
/// (code#15430, §4.1); proxy, initiator and serve-ws verbs land
/// (code#15430, §4.1); proxy (§4.2) and serve-ws (§4.5) landed
/// as later slices of the same design. Full only.
Id,
}
Expand Down Expand Up @@ -487,11 +487,11 @@ pub const DOMAINS: &[Domain] = &[
},
Domain {
name: "id",
summary: "Iroh-native ID transport (design #10391 pass 2): session-key mints this session's NodeId stamp (FLEET_ID_NODE_ID / FLEET_ID_SECRET, §4.1); proxy-mode reports the §4.2 mode rule and proxy moves bytes to an ID peer (modes 1-2; mode 3 is the initiator surface).",
summary: "Iroh-native ID transport (design #10391 pass 2): session-key mints this session's NodeId stamp (FLEET_ID_NODE_ID / FLEET_ID_SECRET, §4.1); proxy-mode reports the §4.2 mode rule and proxy moves bytes to an ID peer (modes 1-2; mode 3 is the initiator surface); serve-ws serves the §4.5 conversion envelope over WebSocket.",
capabilities: &[Capability::Id],
primary: Capability::Id,
aliases: &[],
subcommands: &["session-key", "proxy-mode", "proxy"],
subcommands: &["session-key", "proxy-mode", "proxy", "serve-ws"],
},
Domain {
name: "agent",
Expand Down
20 changes: 17 additions & 3 deletions pkgs/fleet/docs/verbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,9 @@ rendering is the dot-sourced env: `FLEET_ID_NODE_ID` plus
stamp JSON (`{"fleet_node_id": …}`, public key only — the secret
never enters the stamp, a log, or a trip record); `--node-id`
prints just the NodeId hex. The secret lives in process memory
only and is zeroized at exit. The `postcard`, `stream`
and `serve-ws` verbs land as slices 3–5 of the same design
(#15435, #15436, #15399).
only and is zeroized at exit. The `postcard` and `stream`
verbs land as slices 3–4 of the same design (#15435, #15436);
`serve-ws` (slice 5, #15399) has landed — see below.

`fleet id proxy-mode [--raw] [--raw-endpoint] [--opaque] [--alpn <alpn>] [--mode <1|2|3|name>]`

Expand Down Expand Up @@ -558,6 +558,20 @@ is a usage error (the initiator verbs own it). Exit codes: 0 ok ·
2 usage · 71 relay unreachable · 72 identity mismatch ·
73 target unreachable.

`fleet id serve-ws [--bind <addr>] [--token <bearer> | --id-secret <hex>]`

Slice 5 (#15399, design §4.5): the conversion + WebSocket serving
socket. Serves the `{ v, seq, kind, alpn, payload, digest? }`
envelope over WebSocket in CBOR (`fleet-id-cbor-v1`) or MessagePack
(`fleet-id-msgpack-v1`), negotiated per connection. Binds localhost
by default (127.0.0.1:9473); a non-local bind requires a session
credential (`--token`, or `--id-secret` to derive the NodeId
session token from a slice-1 session key), which clients then
present as `Authorization: Bearer <token>`. The built-in bridge is
the fixture echo bridge; the live iroh dial plugs into the same
bridge seam. Exit codes: 0 ok · 2 usage · 3 non-local serve
without credentials · 4 bind/serve failure.

## `actions` — live exec sessions in Actions runners

`fleet actions exec start --repo OWNER/REPO --timeout S
Expand Down