Skip to content

Nerve Protocol

Nerve Protocol v1 connects the Workbench UI to workbench_server over authenticated HTTP and WebSocket. Contracts define transport-neutral operations/events; the protocol package implements sessions and recovery; the server provides authorization, persistence, handlers, and stream composition.

Roles are workbench_server, ui, desktop_shell, and cli. Strict envelopes name source/target. The operation catalog declares method schemas, roles, capabilities, idempotency, and transport exposure. The public event catalog declares payload, source roles, delivery class, and routing.

After hello → welcome → ready, the client sends the complete desired stream/cursor set. Each stream independently becomes live, replays retained events, requests a snapshot, or is unavailable. Replay arrives before buffered live events.

A client advances a cursor only after its reducer successfully processes an event. If bounded buffers cannot preserve sequenced ordering, the session closes with resync_required and reconnect recovery rebuilds state.

HTTP and WebSocket share typed handlers where operations expose both transports. Large files/logs, OAuth callbacks, binary transfer, and selected configuration remain HTTP or out-of-band.

Read the Protocol v1 reference for envelopes, lifecycle, streams, HTTP mapping, errors/security, extension rules, examples, status, and coverage.