# liminal-bus-protocol
The wire protocol of the liminal bus: what a client and the server send each
other on one connection.
It holds:
- the frames (`Frame`, `FrameHeader`, `FrameType`) and their codec (`encode`,
`decode`, `encoded_len`);
- the message envelope (`MessageEnvelope`, `SchemaId`) and its causal context
(`CausalContext`, `MessageId`);
- `DeliveredId`, the server's id for a delivered message, which a reply names
as its parent;
- version and schema negotiation, the handshake and the connection lifecycle;
- stream multiplexing and the backpressure payloads;
- the refusal a worker can give a pushed request (`WorkerRefusal`);
- `ProtocolError`, with its stable reason codes.
It does not hold the participant-lifecycle wire. That is `liminal-protocol`'s,
and the two are versioned apart. Nor does it hold anything of the server: no
storage, no runtime, no haematite and no beamr.
It depends on `serde_json` and `thiserror` and nothing else.
## Who uses it
- `liminal-rs` re-exports it as `liminal::protocol`, so `liminal::protocol::X`
and `liminal_bus_protocol::X` are one type.
- `liminal-sdk`'s `std` client depends on it in place of `liminal-rs`.
- The TypeScript SDK's wasm bridge (`sdks/liminal-ts/wasm-src`) depends on it.
Move `liminal-rs` and `liminal-sdk` together. A graph that holds `liminal-rs`
0.16.24 or older beside `liminal-sdk` 0.20.22 or newer holds two `DeliveredId`
types, and they do not mix.
## Licence
AGPL-3.0-only, as `liminal-rs`, from which this code moved (PROTO-011).