Expand description
Protocol envelopes (0056 AR09 §8): versioned handshake, admitted actions, acknowledgements with explicit outcomes, semantic snapshots/deltas, host effects, resynchronization and shutdown.
Envelopes are distinct from LSP’s — only the Content-Length byte
convention is shared (crate::frame). Every type here is pure
data; the engine mapping lives in the backend, the application
rules in crate::client.
Structs§
- Action
Limits - The backend’s hard bounds (AR06 conventions), restated on the wire so the client never has to guess them.
- Backend
Info - Who/what the backend is.
incarnationis unique per backend process: publications and actions key on it so state from a previous backend can never resolve against a restarted one. - Base
Stamp - The state an action claims to be based on: the backend incarnation and the newest view generation the client has applied.
- Client
Capabilities - What the client can absorb. Everything defaults to withheld: a client that cannot accept clipboard writes never receives one.
- Client
Info - Who the client is, for the handshake record.
- Geometry
- Terminal-cell viewport geometry (wire mirror of the engine’s
ViewGeometry; frontends convert at their edge). - Pane
Snapshot - One pane’s semantic window, keyed by document identity + the revision the window was prepared against.
- Rect
- One rectangle in terminal cells (wire mirror of
CellRect). - Server
Capabilities - The currently-implemented TUI families this backend serves (AR09 §8: only real families are advertised).
- View
Delta - A sparse view update valid only against
base.panesis aligned with the base snapshot’s pane order; a changed pane set always ships as a full snapshot instead. - View
Snapshot - A full semantic view: the prepared panes plus the same logical state
observation the headless driver pins (
state_json).
Enums§
- AckOutcome
- The outcome of one acknowledged request.
- Admitted
Action - One admitted action — a one-to-one mirror of the engine’s admitted
input surface (
AppEvent’s client-initiated subset). The protocol adds no commands of its own. - Client
Message - Client → backend.
- Effect
Outcome - The client’s answer to an
EffectRequest. - Effect
Request - A host effect the backend requests of the client (AR08): the client
answers with
EffectOutcome. The engine stages OSC52 clipboard payloads for its frontend; over the protocol the client is it. - Pane
Delta - One pane slot’s delta.
- Protocol
Error - A protocol-level failure, independent of any admitted action.
- Refusal
- A typed refusal (AR09: explicit outcomes, never silent divergence).
- Server
Message - Backend → client.
- Shutdown
Reason - Why the session ended.
- View
Bounds - Declared bounds of a pane window (wire mirror of the engine’s AR03
WindowBounds): every state is explicit; there is no empty success.
Constants§
- PROTOCOL_
VERSION - The only wire version this build speaks.