Messaging contract
Draft; no stable package export yet.
| Operation | Intended semantics |
|---|---|
| start | Create an authorized session/run and return capabilities |
| send | Accept a message with a stable command ID |
| events | Stream typed events with a recovery cursor |
| inspect / search | Return only authorized session state |
| stop | Request cancellation and report its actual outcome |
| kill | Terminate only supported, supervised processes |
The proposed envelope includes version, session ID, run ID, message/command ID, type, payload, correlation and timestamp. Identity is derived from authenticated server context. Errors, tool requests, approval requests and completion are typed events.
Existing core vocabulary includes OPEN, APPEND, BLOCK, CLOSE, atomic POST, SUBSCRIBE, and ephemeral SIGNAL. Mapping lifecycle commands to these primitives is a POC decision, not an implemented guarantee.