Expand description
sqry-daemon-protocol — sqryd daemon wire types + framing codec.
This is a leaf crate with no dependencies on any other sqry-*
crate. Both the sqryd daemon itself (sqry-daemon) and the
client-side crates that need to speak the wire format
(sqry-daemon-client, sqry-lsp, sqry-mcp) depend on this crate
without creating a dependency cycle.
§Module layout
framing— 4-byte little-endian length-prefix codec (framing::read_frame/framing::write_frameplus typed JSON wrappers andframing::FrameError).protocol— wire types:DaemonHello,DaemonHelloResponse,ShimProtocol,ShimRegister,ShimRegisterAck,ResponseEnvelope,ResponseMeta,WorkspaceState,JsonRpcVersion,JsonRpcId,JsonRpcRequest,JsonRpcResponse,JsonRpcPayload,JsonRpcError.
§First-frame discrimination
The router in sqry-daemon shape-discriminates the very first
frame between DaemonHello (CLI / JSON-RPC clients) and
ShimRegister (Phase 8c shim byte-pump clients). All four
first-frame structs — DaemonHello, DaemonHelloResponse,
ShimRegister, ShimRegisterAck — carry
#[serde(deny_unknown_fields)] so that a first frame matching
neither shape is rejected with -32600 Invalid Request rather than
being silently routed to the wrong path.
Re-exports§
pub use protocol::CancelRebuildResult;pub use protocol::DaemonHello;pub use protocol::DaemonHelloResponse;pub use protocol::ENVELOPE_VERSION;pub use protocol::JsonRpcError;pub use protocol::JsonRpcId;pub use protocol::JsonRpcPayload;pub use protocol::JsonRpcRequest;pub use protocol::JsonRpcResponse;pub use protocol::JsonRpcVersion;pub use protocol::LoadResult;pub use protocol::LogicalWorkspaceWire;pub use protocol::RebuildResult;pub use protocol::RebuildStatus;pub use protocol::ResponseEnvelope;pub use protocol::ResponseMeta;pub use protocol::SearchItem;pub use protocol::SearchMode;pub use protocol::SearchRequest;pub use protocol::SearchResult;pub use protocol::ShimProtocol;pub use protocol::ShimRegister;pub use protocol::ShimRegisterAck;pub use protocol::SourceRootBinding;pub use protocol::WorkspaceId;pub use protocol::WorkspaceIndexStatus;pub use protocol::WorkspaceSourceRootStatus;pub use protocol::WorkspaceState;