CircuitsShapeSpec
Defined in: packages/client/src/circuits/sync-engine.ts:61
Properties
Section titled “Properties”identity
Section titled “identity”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).
scope?
Section titled “scope?”
optionalscope?: readonlyPredicateValue[]
Shared tier only: the scope values the grant named, in the shape’s declared column order.
shapeKey
Section titled “shapeKey”shapeKey:
string
The registry shape key this stream carries.
initialInsertMethod?
Section titled “initialInsertMethod?”
optionalinitialInsertMethod?:InitialInsertMethod
Defined in: packages/client/src/circuits/sync-engine.ts:90
Per-shape backfill strategy override; otherwise the registry’s classification.
onMustRefetch?
Section titled “onMustRefetch?”
optionalonMustRefetch?: (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.
Parameters
Section titled “Parameters”PgwasmDatabase<never>
Returns
Section titled “Returns”Promise<void>
streamUrl
Section titled “streamUrl”streamUrl:
string
Defined in: packages/client/src/circuits/sync-engine.ts:63
Absolute URL of this shape’s stream through the edge.
tableKey
Section titled “tableKey”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).