Expand description
The strop UI protocol (0056 AR09/AR10): one bounded, versioned,
non-graphical contract between the strop --ui-stdio backend and any
frontend process (the future Windows GUI, test drivers, automation).
Shape:
- Bytes: bounded Content-Length framing (
frame), the convention strop-lsp already pins at its trace boundary. stdout carries frames only; diagnostics stay on stderr. - Envelopes:
message— handshake, admitted actions, acknowledgements with explicit outcomes, semantic snapshots/deltas keyed by backend incarnation + view generation, host effects, resync and shutdown. - Actions:
message::AdmittedActionmirrors the engine’s admitted input surface one-to-one — there is no parallel command table. - Client:
client::Clientis the pure readonly cache (snapshot/delta application, resync poisoning);driver::Driveris the stdio process transport with deterministic state/revision barriers.
The client is never an editing model: it holds the last published view, refuses to act on stale or poisoned state, and recovers through an explicit resync — never by blindly applying a delta.
Re-exports§
pub use client::Client;pub use client::ClientError;pub use client::ClientEvent;pub use client::ResyncReason;pub use driver::Driver;pub use driver::DriverError;pub use frame::FrameDecoder;pub use frame::FrameError;pub use frame::MAX_BODY_BYTES;pub use frame::MAX_HEADER_BYTES;pub use message::AckOutcome;pub use message::ActionLimits;pub use message::AdmittedAction;pub use message::BackendInfo;pub use message::BaseStamp;pub use message::ClientCapabilities;pub use message::ClientInfo;pub use message::ClientMessage;pub use message::EffectOutcome;pub use message::EffectRequest;pub use message::Geometry;pub use message::PaneDelta;pub use message::PaneSnapshot;pub use message::ProtocolError;pub use message::Rect;pub use message::Refusal;pub use message::ServerCapabilities;pub use message::ServerMessage;pub use message::ShutdownReason;pub use message::ViewBounds;pub use message::ViewDelta;pub use message::ViewSnapshot;pub use message::PROTOCOL_VERSION;
Modules§
- client
- The pure client state machine (0056 AR10): a readonly cache of the
backend’s published view plus the resynchronization rules. No IO, no
process, no clock — the stdio transport lives in
crate::driver. - driver
- The Rust-first stdio driver (0056 AR10): spawns
strop --ui-stdioover pipes and exposes deterministic schedules — every operation is a message barrier (acknowledgement, generation, predicate), never an arbitrary sleep. The driver holds no editing model; all view truth lives incrate::client::Client. - frame
- The byte boundary (0056 AR09): bounded Content-Length framing, the
same convention strop-lsp pins at its trace boundary
(
Content-Length: N\r\n\r\n+ JSON body). Header and body each carry a hard bound — the body bound is AR06’s 32 MiB snapshot ceiling — and every violation is a typedFrameError, never a skipped-garbage resynchronization. - message
- Protocol envelopes (0056 AR09 §8): versioned handshake, admitted actions, acknowledgements with explicit outcomes, semantic snapshots/deltas, host effects, resynchronization and shutdown.
Constants§
- MAX_
PENDING_ REQUESTS - Bound on client requests queued between the transport reader and the server loop (AR06 convention: the LSP queue admits 256 jobs).
- MAX_
VIEWPORT_ CELLS - Geometry cap, the same one the engine’s frame action enforces.