Field Notes
    Preparing search index...

    Interface SyncClientOptions

    interface SyncClientOptions {
        capabilityQueueLimit?: number;
        clientId?: string;
        elementRegistry?: ElementRegistry;
        firstSnapshot?: "reconcile" | "merge";
        flushIntervalMs?: number;
        hubKnownIds?: Set<string>;
        layers?: LayerSyncOptions;
        plugins?: readonly ClientSyncPlugin[];
        resolveAudience?: (element: CanvasElement) => string | undefined;
        resolveLocalOnly?: ResolveLocalOnly;
        store: ElementStore;
        tombstoneRetentionMs?: number;
        transport: SyncTransport;
    }
    Index
    capabilityQueueLimit?: number

    Maximum number of durable outbound messages retained during negotiation.

    clientId?: string

    Plugins may impose additional identity constraints (fog requires printable ASCII).

    elementRegistry?: ElementRegistry

    Registry for the store; omit to keep the store's own (the viewport's).

    firstSnapshot?: "reconcile" | "merge"

    How to treat the first authoritative snapshot. merge (default) keeps unknown local elements; reconcile applies destructive resync semantics immediately — for successor clients resuming an already-synced store, with local ops made before the snapshot shielded as touched-during-resync.

    flushIntervalMs?: number

    Minimum gap between outgoing element-op flushes; 0 sends every op synchronously. Default 50.

    hubKnownIds?: Set<string>

    Ids the hub is known to have seen. The client mutates the set as it learns; pass one shared set to successive clients over the same store (e.g. across managed-connection rebuilds) to keep hubKnown classification accurate.

    Enables versioned layer-definition sync for this client.

    plugins?: readonly ClientSyncPlugin[]

    Domain sync plugins.

    resolveAudience?: (element: CanvasElement) => string | undefined
    resolveLocalOnly?: ResolveLocalOnly

    Called synchronously for every authoritative snapshot addressed to this client, before the merge/reconcile mutates the store, so hosts own bootstrap/reconcile semantics without observing raw frames or deferring work to timers. A throwing hook falls back to the phase defaults and never wedges the resync state machine.

    store: ElementStore
    tombstoneRetentionMs?: number

    How long a delete tombstone is kept, pruned when a snapshot is built or received. Default 7 days.

    transport: SyncTransport