Skip to content
Strata is pre-1.0. APIs, protocol, and storage format may change.

strata_protocol

strata_protocol — wire protocol for the Strata typed collaboration stack.

All frames are JSON objects with a version (v) and a discriminator (kind). The protocol is symmetric in shape but split by direction:

  • strata_protocol/client — client → server frames
  • strata_protocol/server — server → client frames
  • strata_protocol/presence — presence payload type used by both

CRDT payloads (snapshots, deltas, dot contexts, presence values) are carried as opaque JSON. Encoders accept pre-built gleam/json.Json values; decoders return gleam/dynamic.Dynamic so callers (typically strata_server and strata_client) can hand them to lattice's from_json decoders without this package needing to know about CRDT internals.

JSON field name carrying the frame kind discriminator.

pub const kind_field: String

The current wire protocol version.

pub const protocol_version: Int

JSON field name carrying the protocol version.

pub const version_field: String