Skip to content

CircuitsShapeSpec

Defined in: packages/client/src/circuits/sync-engine.ts:61

identity: object

Defined in: packages/client/src/circuits/sync-engine.ts:75

What this reader IS, as the registry and the control plane name it — persisted alongside the offset so a later subscribe can resolve a stored entry back to its spec.

Required, not derived, and the map key is why it cannot be either. That key is a name the caller mints to keep two readers apart; the engine treats it as opaque and has no way to take it apart again. Without this, a persisted entry the next subscribe does NOT find in its grants is unattributable — which is exactly the entry that has to be cleared (ADR-0055 decision 6).

optional scope?: readonly PredicateValue[]

Shared tier only: the scope values the grant named, in the shape’s declared column order.

shapeKey: string

The registry shape key this stream carries.


optional initialInsertMethod?: InitialInsertMethod

Defined in: packages/client/src/circuits/sync-engine.ts:90

Per-shape backfill strategy override; otherwise the registry’s classification.


optional onMustRefetch?: (db) => Promise<void>

Defined in: packages/client/src/circuits/sync-engine.ts:88

Scoped cache clear for a must-refetch, replacing the default TRUNCATE.

Required when several shapes share a tableKey, and the engine refuses the group otherwise: the default truncate would wipe a co-tenant scope’s rows. A shared-tier shape derives it from its scope key, so supplying one is mechanical rather than a burden.

PgwasmDatabase<never>

Promise<void>


streamUrl: string

Defined in: packages/client/src/circuits/sync-engine.ts:63

Absolute URL of this shape’s stream through the edge.


tableKey: string

Defined in: packages/client/src/circuits/sync-engine.ts:65

The registry table key this shape applies into. Several shapes may share one (ADR-0055 d4).