Channel model
- Every message belongs to exactly one channel. Channel
0is the control channel, present in every session and carrying every JSON-RPC message; channels ≥ 1 are the observation and command channels declared in the manifest, assigned theirchannel_idinsession.ready, and carried as frames.[AWP-TRN-005] - Classes.
control: no loss, in order, replayed on resume bystatus_seq, audited in full.reliable: no loss, inseqorder, resumed from a keyframe, audited by hash.latest-wins: droppable, newest wins, audited by hash. A channel’s class is fixed for the life of the manifest.[AWP-TRN-006] - Ordering. Order is guaranteed within a channel and never across channels; the only cross-channel relations are those the specification states explicitly — lockstep advance completion (AWP-TIM-003) and command-channel binding (AWP-CMD-003).
[AWP-TRN-007] - Resumption. On
session.resumethe control channel replays per AWP-CTL-008; the agent re-establishes stream connections from the re-issuedstream_endpoints; on everyreliablechannel the world’s first frame after resumption MUST be a keyframe carrying theresyncflag, and theseqgap it reveals is not a loss (AWP-DAT-009);latest-winschannels continue unchanged.[AWP-TRN-008]
Bindings
- The control channel is carried on one control connection per session (AWP-CTL-007); worlds MUST offer the WebSocket binding for it. Optional control bindings: stdio (local child processes) and gRPC.
[AWP-TRN-001] - Bindings MUST preserve the order of every channel they carry.
[AWP-TRN-002] - Channels ≥ 1 are carried either inline on the control connection or on stream connections negotiated in
session.ready. A stream binding either gives every channel independent flow control or it does not:ws(WebSocket binary messages) no;grpc(HTTP/2 streams) no;webrtc(data channels) yes;webtransport(QUIC streams and datagrams) yes;shm(POSIX shared memory, local) yes.[AWP-TRN-003] - The inline binding — frames as
obs.frameandcmd.framenotifications on the control channel (AWP-DAT-004) — is REQUIRED as the fallback when no other binding is mutually supported and is the default for lockstep sessions.[AWP-TRN-004] - Dependent streams. On a binding without independent flow control, including inline, a
latest-winschannel cannot drop in transit, so the sender MUST hold at most one undelivered frame per such channel and replace it when a newer frame is produced; a channel that stalls MUST NOT delay the control channel or any other channel by more than that one frame.[AWP-TRN-009] - Stream reconnection. If a stream connection is lost while the control connection remains, the agent MAY reconnect to the same endpoint with the session token at any time and the world MUST accept it; grants are unaffected,
reliablechannels restart with a resync keyframe (AWP-DAT-009), and the world reports the outage on affectedreliablechannels throughchannel_degraded(AWP-SAF-009).[AWP-TRN-010] - Frame size. Each stream endpoint MAY declare
max_frame_bytes(default 16 MiB); senders MUST NOT emit a larger frame on it, and a world MUST NOT assign a channel to an endpoint that cannot carry that channel’s largest declared frame. Onwebtransport, frames that exceed the datagram limit travel on a stream.[AWP-TRN-011]
AWP assumes the agent and the world share a network environment — the same machine or a trusted local network (an agent client in a browser tab beside a world simulator, a policy process beside a robot controller). Rendezvous across the public internet is out of scope; deployments that separate the two front the world with their own tunnel or proxy presenting a dialable endpoint.