@triargos/live-collection-protocol
v4.1.0
Published
Shared contract kit for the live-collection sync system: wire schemas, sync-group routing keys, the squasher, expected interface types, and the /catchup request/response schemas. Imported by both the frontend library and the backend.
Readme
@triargos/live-collection-protocol
The wire contract shared by the @triargos/live-collection client and its backend.
Pure and I/O-free (depends only on effect v4): the sync event schemas, the sync-group routing keys, the squasher fold, resync targets, branded ids, the model registry and its interface types, and the /catchup request/response schemas.
It defines the shapes that cross the wire, not the transport: the backend owns the HTTP surface (routes, errors, auth) and wires these schemas into it.
npm install @triargos/live-collection-protocol effectWhen you need it
- You are building a backend for a live-collection client — decode/encode the wire payloads with these schemas instead of hand-rolled types. An optional Effect backend kernel that enforces the contract's invariants for you is
@triargos/live-collection-server. - You need the branded
ModelId, the sync-group grammar, or the wire schemas in app code.
Documentation
- Protocol reference — every schema, the sync-group grammar, and the squasher.
- Backend contract — the two endpoints a backend must provide and the invariants the client relies on.
- Repository — full docs and the frontend engine.
License
MIT
