Discovery
The world’s endpoint is deployment configuration (transport). Capability discovery isinitialize: the agent states the protocol versions it supports and what it can consume, and the world answers with its manifest — embodiments, channels, action types, capabilities, and safety policy — under the selected version (AWP-VER-002). world.manifest re-fetches the same document at any time.
State machine
Worlds MUST emit a
session.state notification — { state, status_seq, ts_mono_ns, reason? }, schema — on every transition from Ready onward; it shares the status_seq sequence with statuses and events (AWP-CTL-008), so the suspended transition reaches the agent on replay after session.resume. [AWP-SES-007]
Closing
- From
session.closeuntilClosedthe session is closing. The world MUST send thesession.closeresult only after every action has reached a terminal state andsession.state: closedhas been sent, so the result tells the agent its actions are over and the embodiment is at rest; agents SHOULD allow the longest declaredmax_abort_mswhen awaiting it. While closing, the world MUST refuseaction.submit,action.cancel,obs.subscribe,obs.unsubscribe,world.tick,world.reset, andsession.resumeof the session withAWP_SESSION_EXPIRED, and answer a repeatedsession.closetogether with the first;ping,action.status, andworld.manifestare served as usual. In lockstep no advance follows a close, so the safe abort completes without one: the world stops the embodiment where it stands and reports the transitions before the result.[AWP-SES-011]
Connections without a session
- Heartbeat obligations begin at
session.ready(AWP-SAF-001). A world MAY close a connection that has no session after a period of agent silence of its choosing, which SHOULD be at least 15 s. Neither side detects loss by silence beforesession.ready, or on a new connection before thesession.resumeresult (AWP-SAF-002); an agent that holds such a connection open SHOULD sendpingmeanwhile, at least every 5 s; its result is stamped on a world clock that is not a session clock and MUST NOT enter the offset estimate (AWP-CLK-008).[AWP-SES-012]
Session identity
session.ready carries session_id, a world-assigned identifier stable for the life of the session and unique within the world process. It names the session in approval requests, world_resetting events, and audit records, and MAY be shown to other sessions; it is not a credential and grants nothing. The session_token is the credential and is never used as an identifier. [AWP-SES-009]
Recovery scope
Recovery in v0.1 covers loss of the control connection while the world process is alive. If the world has restarted or otherwise no longer holds the session,session.resume MUST fail with AWP_SESSION_UNKNOWN; the agent MUST treat the session as Closed and MUST NOT assume any prior action or grant survives; to continue, it runs initialize and session.open for a new session. Crash-durable sessions are out of scope for v0.1 and MUST NOT be claimed. [AWP-SES-008]