Skip to content

Variable: PROTOCOL_VERSION

const PROTOCOL_VERSION: 1 = 1

Defined in: core/src/protocol/sync.ts:22

The wire types every plasma client and server agree on.

Model: server-authoritative, row-version cookie, client-executed mutations that the server re-runs canonically.

  • clientGroupID is a stable per-installation identifier (e.g. per browser profile). All tabs in the same group share the same lastMutationID bookkeeping so a client cannot rewind by clearing a single tab.
  • clientID is per-tab / per-run. Its lifetime is a single JS realm.
  • mutation.id is monotonically increasing within a (clientGroupID, clientID) pair. The server persists the highest id it has processed so a retried push is safely idempotent.
  • cookie is opaque to the client — for the SQLite backend it is the highest row_version the client has already applied.
  • protocolVersion starts at 1 and only bumps on a wire-level break. schemaVersion is the user’s application-level schema hash; a mismatch forces the client to reset its local store.