Skip to content

Documentation / @super-line/core / CrdtCollectionClient

Interface: CrdtCollectionClient

Defined in: packages/core/src/crdt-collections.ts:117

The client half of a CRDT collection engine: builds a reactive super-store replica per opened document. Engine-agnostic seam — the client stays free of super-store; the app supplies this (e.g. crdtCollectionsClient() from @super-line/collections-crdt-memory). Universal across durability tiers: the client only merges opaque deltas, so one client engine pairs with every CRDT backend.

Properties

origin

readonly origin: string

Defined in: packages/core/src/crdt-collections.ts:119

This client's per-writer id, stamped as DocChange.origin for echo-break.

Methods

open()

open(n, id, opts, origin?): ResourceReplica

Defined in: packages/core/src/crdt-collections.ts:126

Open a reactive local replica for one document, built with the collection's DocOptions. origin overrides the engine-level writer id FOR THIS REPLICA (per-open attribution — e.g. an agent host tagging one doc's writes agent:planner). Client-claimed and UNTRUSTED: echo-break + inspector/Control Center attribution only, never a policy input.

Parameters

n

string

id

string

opts

DocOptions | undefined

origin?

string

Returns

ResourceReplica

Released under the MIT License.