@pgxsinkit/contracts 0.1.53 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"mutation.d.ts","sourceRoot":"","sources":["../src/mutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;EAAyC,CAAC;AACzE;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;EAQ/B,CAAC;AACH;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;EAAwD,CAAC;AAE7F,eAAO,MAAM,eAAe,uCAA+D,CAAC;AAE5F,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;kBAyBxB,CAAC;AAEZ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;kBAqBnB,CAAC;AAEZ,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;kBAI5B,CAAC;AAEZ;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;kBAKjC,CAAC;AAEZ,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;kBAIxB,CAAC;AAEZ;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;kBASzB,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;iBAGnC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MA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GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;kBASzB,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;iBAGnC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -4,7 +4,7 @@ import type { pgSchema } from "drizzle-orm/pg-core";
4
4
  import type { ExtractTablesWithRelations } from "drizzle-orm/relations";
5
5
  import { getColumns } from "drizzle-orm/utils";
6
6
  import { type ApplyStrategy, type SyncColumnType } from "./apply-strategy";
7
- import { type ClientProjectionSpec, type ConflictPolicy, type DeferrableConstraintSpec, type ManagedFieldApplyOn, type ManagedFieldSpec, type ManagedFieldStrategy, type PrimaryKeySpec, type Retention, type RowFilterSpec, type ServerProjectionSpec, type ShapeSpec, type ShapeSpecInput, type SubscriptionTiming, type TableGovernanceSpec as TableGovernanceSpecBase, type TableMode, type WriteMode } from "./config";
7
+ import { type ClientProjectionSpec, type ConflictPolicy, type DeferrableConstraintSpec, type ManagedFieldApplyOn, type ManagedFieldSpec, type ManagedFieldStrategy, type PrimaryKeySpec, type Retention, type RowFilterSpec, type ServerProjectionSpec, type ShapeSpec, type ShapeSpecInput, type SubscriptionTiming, type SyncStorageDeclaration, type TableGovernanceSpec as TableGovernanceSpecBase, type TableMode, type WriteMode } from "./config";
8
8
  type PgSchemaType = ReturnType<typeof pgSchema>;
9
9
  type AnyPgView = PgView;
10
10
  type TableColumnsShape<TTable extends AnyPgTable> = TTable extends {
@@ -74,8 +74,9 @@ export interface SyncTableEntry<TTable extends AnyPgTable = AnyPgTable, TLocalTa
74
74
  * Consistency group (ADR-0009 decision 2). Tables sharing a `consistencyGroup` are synced on one
75
75
  * `MultiShapeStream` and committed atomically at a shared LSN frontier, so a local reader never
76
76
  * sees one grouped table advanced past another for the same server transaction. Omitted → the
77
- * table is its own singleton group (independent frontier, today's behaviour). The latency cost (a
78
- * group advances only as fast as its slowest shape) is contained to the tables that opt in.
77
+ * table is its own singleton group (independent frontier, no cross-table atomicity — the resolution
78
+ * for a table that declares no group). The latency cost (a group advances only as fast as its
79
+ * slowest shape) is contained to the tables that opt in.
79
80
  */
80
81
  consistencyGroup?: string;
81
82
  /**
@@ -168,14 +169,13 @@ export type SyncTableInputProjection<TColumns extends Record<string, ColumnBuild
168
169
  omitColumns?: TOmittedColumns;
169
170
  };
170
171
  /**
171
- * A row filter for {@link defineSyncTable}'s `shape`: either a static {@link RowFilterSpec}, or a
172
- * function of the table's built (typed) columns. The function form is the all-in-one way to author a
173
- * typed-Drizzle row filter inline — reference columns through `c(columns.x)` exactly as `extras`
174
- * does with its `self` argument, so `customWhere` builds parameterized Electric `where`s from real,
175
- * rename-safe column objects instead of hand-written column-name strings.
172
+ * A row filter for {@link defineSyncTable}'s `shape`, authored from the table's built, typed columns.
173
+ * Reference columns through `c(columns.x)` exactly as `extras` does with its `self` argument, so
174
+ * `customWhere` builds parameterized Electric `where`s from real, rename-safe column objects instead
175
+ * of hand-written column-name strings.
176
176
  */
177
- export type RowFilterInput<TColumns extends Record<string, ColumnBuilderBase>> = RowFilterSpec | ((columns: PgBuildExtraConfigColumns<TColumns>) => RowFilterSpec);
178
- /** {@link ShapeSpecInput} whose `rowFilter` may also be a function of the built columns (typed by `TColumns`). */
177
+ export type RowFilterInput<TColumns extends Record<string, ColumnBuilderBase>> = (columns: PgBuildExtraConfigColumns<TColumns>) => RowFilterSpec;
178
+ /** {@link ShapeSpecInput} whose `rowFilter` is authored from the built columns (typed by `TColumns`). */
179
179
  export type ShapeSpecInputFor<TColumns extends Record<string, ColumnBuilderBase>> = Omit<ShapeSpecInput, "rowFilter"> & {
180
180
  rowFilter?: RowFilterInput<TColumns>;
181
181
  };
@@ -264,8 +264,17 @@ export type SyncTableRegistry = Record<string, SyncTableEntry>;
264
264
  export interface SyncRegistryDefinition<TRegistry extends SyncTableRegistry> {
265
265
  schema?: string;
266
266
  tables: TRegistry;
267
+ /**
268
+ * The storage contract for every store this registry mints (ADR-0049 decision 1, ADR-0047). Part of the
269
+ * DATA contract, not a per-open knob: `durability` binds every toolkit-minted open (relaxed default),
270
+ * and `backend` scopes the BROWSER store only (`opfs` default; Node/`file` and `memory` clones
271
+ * unaffected). Validated at {@link defineSyncRegistry} (fail-closed at module-eval); carried through on
272
+ * the returned registry and read back with {@link getSyncRegistryStorage}. See {@link SyncStorageDeclaration}.
273
+ */
274
+ storage?: SyncStorageDeclaration;
267
275
  }
268
276
  export declare const syncRegistrySchemaSymbol: unique symbol;
277
+ export declare const syncRegistryStorageSymbol: unique symbol;
269
278
  export type RegistryTables<TRegistry extends SyncTableRegistry> = {
270
279
  [TKey in keyof TRegistry]: TRegistry[TKey]["table"];
271
280
  };
@@ -679,7 +688,7 @@ export declare function defineReadProjection<const TOwnerTable extends AnyPgTabl
679
688
  /** Column keys (of the owner) to sync locally + fetch from Electric. The PK is always kept. Omit → all. */
680
689
  columns?: TColumns;
681
690
  /** Row filter for this shape; the callback form receives the owner's full (physical) columns. */
682
- rowFilter?: RowFilterSpec | ((columns: TableColumnsShape<TOwnerTable>) => RowFilterSpec);
691
+ rowFilter?: (columns: TableColumnsShape<TOwnerTable>) => RowFilterSpec;
683
692
  /**
684
693
  * Server-side egress projection (ADR-0004) for THIS shape — typically a `rowTransform` that redacts a
685
694
  * sub-document of a kept column conditionally on row data. A projection does NOT inherit its owner's
@@ -758,5 +767,20 @@ export declare function getLocalSyncedTablePrimaryKeyColumns<TTable extends AnyP
758
767
  export declare function resolveServerVersionColumnName<TTable extends AnyPgTable>(entry: SyncTableEntry<TTable>): string | undefined;
759
768
  export declare function attachSyncRegistrySchema<TRegistry extends SyncTableRegistry>(registry: TRegistry, schema?: string): TRegistry;
760
769
  export declare function getSyncRegistrySchema<TRegistry extends SyncTableRegistry>(registry: TRegistry): string;
770
+ /**
771
+ * Stamp the registry's storage declaration (ADR-0049 decision 1, ADR-0047) onto the registry value as a
772
+ * non-enumerable symbol — the storage twin of {@link attachSyncRegistrySchema}. Carries the data-contract
773
+ * storage through {@link defineSyncRegistry} so client code reads it back via {@link getSyncRegistryStorage}.
774
+ * A `null`/`undefined` declaration attaches nothing (the bare-registry-map overload), leaving the reader to
775
+ * resolve the ADR-0047 defaults at the mint seam.
776
+ */
777
+ export declare function attachSyncRegistryStorage<TRegistry extends SyncTableRegistry>(registry: TRegistry, storage: SyncStorageDeclaration | undefined): TRegistry;
778
+ /**
779
+ * Read the storage declaration (ADR-0049 decision 1, ADR-0047) a registry was built with, or `undefined`
780
+ * when none was declared (a bare registry map, or a definition with no `storage`). The client resolves the
781
+ * effective mint durability as `getSyncRegistryStorage(registry)?.durability ?? "relaxed"` at its single
782
+ * mint seam — the storage twin of {@link getSyncRegistrySchema}.
783
+ */
784
+ export declare function getSyncRegistryStorage<TRegistry extends SyncTableRegistry>(registry: TRegistry): SyncStorageDeclaration | undefined;
761
785
  export {};
762
786
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EAQL,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,KAAK,aAAa,EAAyB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EASL,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,IAAI,uBAAuB,EACnD,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,UAAU,CAAC;AAElB,KAAK,YAAY,GAAG,UAAU,CAAC,O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AiB,EACxE,QAAQ,EAAE,SAAS,GAClB,sBAAsB,GAAG,SAAS,CAGpC"}
package/dist/runtime.d.ts CHANGED
@@ -43,7 +43,7 @@ export interface MutationDiagnostics {
43
43
  lastAckAtUs?: string;
44
44
  }
45
45
  /**
46
- * A registry-wide mutation-journal summary (warm-persisted-store-startup slice 4 / proposal §5): the
46
+ * A registry-wide mutation-journal summary for warm-store observability: the
47
47
  * per-status counts across EVERY writable table's journal, folded from one aggregate query/subscription over
48
48
  * the `pgxsinkit_all_mutations` view — so a consumer renders a global sync indicator with ONE subscription
49
49
  * instead of one live query per writable journal. Cheap enough to mount permanently.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgxsinkit/contracts",
3
- "version": "0.1.53",
3
+ "version": "0.2.1",
4
4
  "keywords": [
5
5
  "tanstack-intent"
6
6
  ],
@@ -15,7 +15,7 @@ description: >-
15
15
  metadata:
16
16
  type: core
17
17
  library: "@pgxsinkit/contracts"
18
- library_version: "0.1.53"
18
+ library_version: "0.2.2"
19
19
  source: https://pgxsinkit.github.io/start/getting-started/
20
20
  ---
21
21
 
@@ -65,16 +65,18 @@ sync's sake.
65
65
  ## The `primaryKey` spec emits the physical PRIMARY KEY — it is the single source of truth
66
66
 
67
67
  `defineSyncTable` **emits** the `primaryKey` spec as the server table's physical `PRIMARY KEY` constraint,
68
- named `` `${tableName}_pkey` `` (Postgres's inline-PK default, so an existing consumer DB sees no rename
69
- churn). The spec was runtime-only metadata until a consumer had drizzle-kit DROP a live composite key —
70
- seeing no PK in the generated DDL — so the spec now drives DDL directly.
68
+ named `` `${tableName}_pkey` `` — Postgres's default inline-PK constraint name (which drizzle's own naming
69
+ does not produce), so DDL declared through pgxsinkit agrees with plain-Postgres inline-PK DDL and
70
+ drizzle-kit sees no rename churn against a real Postgres database. The spec was runtime-only metadata
71
+ until a consumer had drizzle-kit DROP a live composite key — seeing no PK in the generated DDL — so the
72
+ spec now drives DDL directly.
71
73
 
72
74
  - **Composite / non-`id` key:** `primaryKey: ["org_id", "person_id"]` (default `["id"]`). Constraint
73
75
  columns follow spec order.
74
76
  - **Custom constraint name:** the object form `primaryKey: { name: "org_person_pk", columns: [...] }`.
75
77
  - **Single-column key, idiomatic drizzle:** declaring `id: uuid("id").primaryKey()` on the column is
76
78
  allowed and equivalent — it must match the spec, and emission is skipped (the column already carries
77
- the constraint), so existing single-`id` tables keep byte-identical DDL. A custom constraint name
79
+ the constraint), so a single-`id` table's DDL agrees with plain-Postgres inline-PK DDL. A custom constraint name
78
80
  cannot be combined with a column-level `.primaryKey()` (a named constraint needs `defineSyncTable` to
79
81
  emit it).
80
82
  - **Rejected:** a table-level `primaryKey(...)` passed through `extras`/`policies`, and more than one
@@ -181,11 +183,10 @@ defineSyncTable({
181
183
  });
182
184
  ```
183
185
 
184
- A static `RowFilterSpec` (`rowFilter: { customWhere }`) still works unchanged — reach for the function form
185
- only when you need typed, rename-safe column refs inside an all-in-one definition. **Prefer it over the
186
- string escape hatch:** a `customWhere` that returns `null`/`""` means _no filter — all rows visible_, so a
187
- hand-built owner filter that returns `null` for "no claim" silently exposes every row; the typed form makes
188
- `DENY_ALL` the obvious deny.
186
+ The column callback is the only authoring form. **Prefer a typed SQL fragment over the raw string escape
187
+ hatch:** a `customWhere` that returns `null`/`""` means _no filter — all rows visible_, so an owner filter
188
+ that returns `null` for "no claim" silently exposes every row; the typed form makes `DENY_ALL` the obvious
189
+ deny.
189
190
 
190
191
  ## Cross-table filters: compose a self-contained subquery from the typed columns, never a string
191
192
 
@@ -375,6 +376,28 @@ no transform but records the raw-egress decision at the definition site). `"unre
375
376
  transform-less owner is itself rejected — a stale opt-out would silently pre-authorize a leak if the owner
376
377
  later gains a transform.
377
378
 
379
+ ## Storage declaration: `storage.backend` and `storage.durability` (browser stores)
380
+
381
+ The registry carries the browser store's storage contract — `SyncRegistryDefinition.storage`,
382
+ `{ backend?: "opfs" | "idbfs"; durability?: "relaxed" | "strict" }`. It lives on the registry, not on a
383
+ minting surface, worker entry, or attach site, because both properties follow the DATA: one declaration
384
+ binds every open of every store minted from that registry, so no tab can disagree with another.
385
+
386
+ - **`backend`** (default `"opfs"`) — `"opfs"` is the normal boot on every platform: the toolkit probes
387
+ OPFS sync-access at boot and runs the `opfs-repacked` engine wherever handles are granted, falling back
388
+ automatically to in-SharedWorker idbfs (declared durability kept) only where the platform provides no
389
+ OPFS sync access anywhere. `backend: "idbfs"` is the one opt-out — no probe, no election, the engine
390
+ boots in the SharedWorker on idb. Where the engine runs is never a consumer knob; the only decision you
391
+ declare is whether to force idb.
392
+ - **`durability`** (default `"relaxed"`) — relaxed returns the local write before the physical flush and
393
+ schedules it asynchronously; `"strict"` awaits the flush per commit. Relaxed is the right default for a
394
+ sync toolkit (the local write is instant, the server is the source of truth, and the loss window is one
395
+ recent action); declare `"strict"` only for local-only data you cannot re-derive and cannot lose on a
396
+ crash. See ADR-0047.
397
+
398
+ The declaration scopes the **browser** store only; Node mints stay `file://` and throwaway export clones
399
+ stay memory (environment resolution is orthogonal).
400
+
378
401
  ## Consistency groups: scope them to the joined cluster
379
402
 
380
403
  `consistencyGroup` binds tables onto one shape stream committing **atomically** at a shared LSN
package/src/config.ts CHANGED
@@ -12,14 +12,15 @@ export type TableMode = "readonly" | "writeonly" | "readwrite";
12
12
  * interleaved). It is a **required** declaration on every writable table; there is no silent default
13
13
  * (registry validation rejects an undeclared writable table — the third hard-require). v1:
14
14
  *
15
- * - `last-write-wins` — apply the stale write anyway. This is today's implicit behaviour, but now a
16
- * conscious, named choice rather than silent clobbering.
15
+ * - `last-write-wins` — apply the stale write anyway. A required, named declaration: the toolkit never
16
+ * silently clobbers under an unspecified default, so choosing this is an explicit acceptance of the
17
+ * stale-overwrite semantics.
17
18
  * - `reject-if-stale` — do not apply; surface the conflict so the user's edit is kept (the optimistic
18
19
  * Overlay stays, marked conflicted) and resolved as a new write.
19
20
  *
20
21
  * `field-merge` (apply only the changed fields over the current row) and `custom-resolver` (a client
21
- * re-resolution protocol) are reserved; the union is additive so they slot in without a breaking
22
- * change.
22
+ * re-resolution protocol) are reserved values for future policies — declared here so the policy surface
23
+ * names its full intended range.
23
24
  */
24
25
  export type ConflictPolicy = "last-write-wins" | "reject-if-stale";
25
26
 
@@ -99,6 +100,144 @@ export function isWriteMode(value: unknown): value is WriteMode {
99
100
  return typeof value === "string" && (WRITE_MODES as readonly string[]).includes(value);
100
101
  }
101
102
 
103
+ /**
104
+ * The registry-declared BROWSER storage backend (ADR-0049 decision 1). `opfs` (default) is the store's
105
+ * normal boot on every platform — the capability machinery selects the `opfs-repacked` VFS where a home
106
+ * can hold sync-access handles, and falls back to in-SharedWorker `idbfs` when no home can. `idbfs` is the
107
+ * one way to opt out of that machinery entirely: no probe, no election, the engine boots on idb.
108
+ *
109
+ * Scopes the BROWSER store only. Environment resolution is orthogonal and unchanged (ADR-0049 decision 14):
110
+ * a Node mint stays `file://` and the export clone stays memory regardless of this declaration.
111
+ */
112
+ export type StorageBackend = "opfs" | "idbfs";
113
+
114
+ /** The {@link StorageBackend} values. Source of truth for {@link SyncStorageDeclaration} validation. */
115
+ export const STORAGE_BACKENDS = ["opfs", "idbfs"] as const satisfies readonly StorageBackend[];
116
+
117
+ /** Type guard: is `value` a {@link StorageBackend}? */
118
+ export function isStorageBackend(value: unknown): value is StorageBackend {
119
+ return typeof value === "string" && (STORAGE_BACKENDS as readonly string[]).includes(value);
120
+ }
121
+
122
+ /**
123
+ * The registry-declared durability mode (ADR-0047; ADR-0049 decision 9). `relaxed` (default) returns a
124
+ * write before its durable flush and schedules the flush asynchronously — the local-first "instant write"
125
+ * the toolkit exists to deliver. `strict` reinstates the synchronous flush boundary (a ~50ms+ per-statement
126
+ * floor on idb; cheap on `opfs-repacked`). It binds EVERY open of EVERY store minted from the registry, so
127
+ * no minting/open site takes a durability option to contradict it, and an opfs→idbfs capability fallback
128
+ * keeps the declared mode.
129
+ */
130
+ export type StorageDurability = "relaxed" | "strict";
131
+
132
+ /** The {@link StorageDurability} values. Source of truth for {@link SyncStorageDeclaration} validation. */
133
+ export const STORAGE_DURABILITIES = ["relaxed", "strict"] as const satisfies readonly StorageDurability[];
134
+
135
+ /** Type guard: is `value` a {@link StorageDurability}? */
136
+ export function isStorageDurability(value: unknown): value is StorageDurability {
137
+ return typeof value === "string" && (STORAGE_DURABILITIES as readonly string[]).includes(value);
138
+ }
139
+
140
+ /**
141
+ * The registry's storage contract (ADR-0049 decision 1, ADR-0047). Storage is PART OF THE DATA CONTRACT:
142
+ * whether losing the last not-yet-flushed action is acceptable, and whether OPFS may be used at all, is
143
+ * decided by what the data IS — so it is declared once on the registry, not at any minting/open site.
144
+ *
145
+ * - {@link StorageDurability durability} defaults to `"relaxed"` and binds every toolkit-minted open of
146
+ * every store the registry mints (its own boot AND the provision/spare path). No open-site option exists
147
+ * to contradict it; a capability fallback keeps the declared mode. A no-op on `memory` clones.
148
+ * - {@link StorageBackend backend} defaults to `"opfs"` and scopes the BROWSER store only; Node/`file` and
149
+ * `memory` clones are unaffected. `"idbfs"` opts the store out of the capability/election machinery.
150
+ */
151
+ export interface SyncStorageDeclaration {
152
+ backend?: StorageBackend;
153
+ durability?: StorageDurability;
154
+ }
155
+
156
+ /**
157
+ * A {@link SyncStorageDeclaration} with every field resolved (ADR-0050) — the store's BOUND declaration.
158
+ * Produced once per store by {@link resolveStorageDeclaration} and immutable for the store's lifetime: a
159
+ * preference change mints a fresh store under a fresh path, never rebinds an existing one.
160
+ */
161
+ export interface ResolvedStorageDeclaration {
162
+ backend: StorageBackend;
163
+ durability: StorageDurability;
164
+ }
165
+
166
+ /**
167
+ * A storage declaration was refused (ADR-0050): two sources explicitly disagree on a field, or a later
168
+ * declaration explicitly contradicts the store's bound declaration. Never resolved silently — the store's
169
+ * storage contract has exactly one value per field, and a disagreement means one side is wrong. The stable
170
+ * `name` survives bridge serialization (`BridgeErrorWire.name`), so a tab can detect the refusal typed.
171
+ */
172
+ export class StorageDeclarationRefusedError extends Error {
173
+ constructor(message: string) {
174
+ super(message);
175
+ this.name = "StorageDeclarationRefusedError";
176
+ }
177
+ }
178
+
179
+ /** One field's resolution: explicit-vs-explicit disagreement refuses; otherwise the explicit value, else the default. */
180
+ function resolveDeclarationField<TValue>(
181
+ field: keyof SyncStorageDeclaration,
182
+ staticValue: TValue | undefined,
183
+ wireValue: TValue | undefined,
184
+ defaultValue: TValue,
185
+ ): TValue {
186
+ if (staticValue !== undefined && wireValue !== undefined && staticValue !== wireValue) {
187
+ throw new StorageDeclarationRefusedError(
188
+ `storage declaration disagreement on "${field}": the registry-attached declaration says ` +
189
+ `"${String(staticValue)}" but the wire declaration says "${String(wireValue)}" — a store's storage ` +
190
+ `contract has one value per field; fix the declaring side (a preference change mints a fresh store, ` +
191
+ `it never redeclares an existing one)`,
192
+ );
193
+ }
194
+ return staticValue ?? wireValue ?? defaultValue;
195
+ }
196
+
197
+ /**
198
+ * Resolve a store's storage declaration from its two sources (ADR-0050): the registry-attached STATIC
199
+ * declaration (authoritative) and the tab's WIRE declaration (honoured only where the registry is silent).
200
+ * Per field: an unset field is "no opinion" and can never conflict; both explicit and disagreeing is a
201
+ * {@link StorageDeclarationRefusedError}; unresolved fields take the capability defaults
202
+ * (`backend: "opfs"`, `durability: "relaxed"`).
203
+ */
204
+ export function resolveStorageDeclaration(
205
+ staticDeclaration: SyncStorageDeclaration | undefined,
206
+ wireDeclaration: SyncStorageDeclaration | undefined,
207
+ ): ResolvedStorageDeclaration {
208
+ return {
209
+ backend: resolveDeclarationField("backend", staticDeclaration?.backend, wireDeclaration?.backend, "opfs"),
210
+ durability: resolveDeclarationField(
211
+ "durability",
212
+ staticDeclaration?.durability,
213
+ wireDeclaration?.durability,
214
+ "relaxed",
215
+ ),
216
+ };
217
+ }
218
+
219
+ /**
220
+ * Check a LATER declaration against a store's bound resolution (ADR-0050): an unset or equal field is
221
+ * idempotent; an explicit field disagreeing with the bound value is a {@link StorageDeclarationRefusedError}.
222
+ * The bound declaration is immutable — first arrival binds, later arrivals only confirm.
223
+ */
224
+ export function assertStorageDeclarationCompatible(
225
+ bound: ResolvedStorageDeclaration,
226
+ incoming: SyncStorageDeclaration | undefined,
227
+ ): void {
228
+ if (incoming === undefined) return;
229
+ for (const field of ["backend", "durability"] as const) {
230
+ const value = incoming[field];
231
+ if (value !== undefined && value !== bound[field]) {
232
+ throw new StorageDeclarationRefusedError(
233
+ `storage declaration disagreement on "${field}": the store is bound to "${bound[field]}" but a later ` +
234
+ `declaration says "${value}" — a store's declaration is immutable; a preference change mints a ` +
235
+ `fresh store under a fresh path`,
236
+ );
237
+ }
238
+ }
239
+ }
240
+
102
241
  /**
103
242
  * Minimal verified-JWT claim shape the sync layer understands. Providers may
104
243
  * attach arbitrary extra claims; those stay reachable through index access and
@@ -316,21 +455,6 @@ export interface RowFilterSpec {
316
455
  revision?: string | number;
317
456
  }
318
457
 
319
- /**
320
- * The non-parameterized inline `where` for a filter: the string a `customWhere` returns (the raw
321
- * escape hatch), or `null` when there is no filter or `customWhere` returns a Drizzle `SQL` fragment
322
- * (which is parameterized by {@link buildRowFilterShape}, not inlined here). Most callers want
323
- * `buildRowFilterShape` — this is the inline-string view it composes from.
324
- */
325
- export function buildRowFilterWhere(
326
- filter: RowFilterSpec,
327
- claims: JwtClaims | null,
328
- params?: Record<string, unknown>,
329
- ): string | null {
330
- const custom = filter.customWhere?.(claims ?? {}, params);
331
- return typeof custom === "string" && custom ? custom : null;
332
- }
333
-
334
458
  /**
335
459
  * A **bare** (table-unqualified) quoted identifier for a Drizzle column — `"workspace_id"`, never
336
460
  * `"work_items"."workspace_id"`. Electric's shape `where` grammar requires *plain* column references
package/src/mutation.ts CHANGED
@@ -49,8 +49,7 @@ export const mutationEnvelopeSchema = z
49
49
  * at enqueue for a chain head, or its predecessor's resolved version for a chained write. The
50
50
  * applier compares the row's *current* Server version to it — `current > base` ⇒ a stale write
51
51
  * (an external write interleaved). Absent on a `create` (its conflict is a PK collision, a
52
- * separate concern) and on any write whose table predates the policy; absence means no stale
53
- * check runs.
52
+ * separate concern) and on blind authoritative writes; absence means no stale check runs.
54
53
  */
55
54
  baseServerVersion: unixMicrosecondsSchema.optional(),
56
55
  })