Are you an LLM? You can read better optimized documentation at /runtime.md for this page in Markdown format
Runtime Behavioral Contracts
Authority: Navigation (non-normative)
Purpose: Index and layer boundary for runtime behavioral contracts.
The runtime/ layer defines externally observable behavioral contracts for @sideband/runtime — the session lifecycle, message routing, and RPC correlation semantics that peer and application layers depend on.
These contracts sit above wire encoding. Wire-level rules remain in docs/protocols/. Runtime docs may reference protocol docs; they MUST NOT restate or redefine wire-level invariants.
Documents
| Document | Scope | Authority |
|---|---|---|
| session.md | Session states, negotiators, retry, termination | Primary |
| router.md | Handler registration, dispatch ordering, error propagation | Primary |
Key Invariants
- A
Peerowns zero or moreSessioninstances; at most one may beActiveper peer in v1. - Session retry is opt-in and per-session; it uses exponential backoff.
Routerdispatch is deterministic: exact match before prefix, registration order within each bucket.cid(correlation ID) is set by the request and echoed unchanged by the response; the runtime matches oncid, never onframeId.