Skip to main content

Module message

Module message 

Source
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§

ActionLimits
The backend’s hard bounds (AR06 conventions), restated on the wire so the client never has to guess them.
BackendInfo
Who/what the backend is. incarnation is unique per backend process: publications and actions key on it so state from a previous backend can never resolve against a restarted one.
BaseStamp
The state an action claims to be based on: the backend incarnation and the newest view generation the client has applied.
ClientCapabilities
What the client can absorb. Everything defaults to withheld: a client that cannot accept clipboard writes never receives one.
ClientInfo
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).
PaneSnapshot
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).
ServerCapabilities
The currently-implemented TUI families this backend serves (AR09 §8: only real families are advertised).
ViewDelta
A sparse view update valid only against base. panes is aligned with the base snapshot’s pane order; a changed pane set always ships as a full snapshot instead.
ViewSnapshot
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.
AdmittedAction
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.
ClientMessage
Client → backend.
EffectOutcome
The client’s answer to an EffectRequest.
EffectRequest
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.
PaneDelta
One pane slot’s delta.
ProtocolError
A protocol-level failure, independent of any admitted action.
Refusal
A typed refusal (AR09: explicit outcomes, never silent divergence).
ServerMessage
Backend → client.
ShutdownReason
Why the session ended.
ViewBounds
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.