@pgxsinkit/contracts 0.2.5 → 0.2.7
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.
- package/dist/event-stream.d.ts +158 -0
- package/dist/event-stream.d.ts.map +1 -0
- package/dist/events.d.ts +158 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +588 -69
- package/dist/index.js.map +11 -7
- package/dist/projection.d.ts +2 -2
- package/dist/projection.d.ts.map +1 -1
- package/dist/registry-diff.d.ts +57 -4
- package/dist/registry-diff.d.ts.map +1 -1
- package/dist/registry-invariant.d.ts +110 -0
- package/dist/registry-invariant.d.ts.map +1 -0
- package/dist/registry.d.ts +144 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/sql-role-guard.d.ts +21 -0
- package/dist/sql-role-guard.d.ts.map +1 -0
- package/dist/supabase-rls.d.ts +113 -8
- package/dist/supabase-rls.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/registry-authoring/SKILL.md +280 -222
- package/src/event-stream.ts +214 -0
- package/src/events.ts +154 -0
- package/src/index.ts +4 -0
- package/src/projection.ts +7 -2
- package/src/registry-diff.ts +235 -7
- package/src/registry-invariant.ts +218 -0
- package/src/registry.ts +413 -3
- package/src/sql-role-guard.ts +33 -0
- package/src/supabase-rls.ts +336 -48
package/dist/projection.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import type { SyncTableEntry, SyncTableRegistry } from "./registry";
|
|
|
5
5
|
* Per-client mode projection (ADR-0025). The authoritative (server) registry defines a table once with
|
|
6
6
|
* its full write contract; a client that must only *read* that table consumes the same entry through
|
|
7
7
|
* `asReadonly`. The read/identity contract — table, columns, primary key, synced-table name, column
|
|
8
|
-
* omission, the shape/row filter,
|
|
9
|
-
* verbatim; the write-capability metadata is dropped:
|
|
8
|
+
* omission, the shape/row filter, the row classification (`rowClass`), AND the column-builder factory
|
|
9
|
+
* (`makeColumns`) — is preserved verbatim; the write-capability metadata is dropped:
|
|
10
10
|
*
|
|
11
11
|
* - `mode` flips to `readonly`;
|
|
12
12
|
* - the overlay-merged read-model `view` and the overlay/journal client projection (the local write
|
package/dist/projection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../src/projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,EAAgC,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,UAAU,CAAC,MAAM,SAAS,UAAU,EAAE,WAAW,SAAS,UAAU,EAClF,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,GACzC,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../src/projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,EAAgC,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,UAAU,CAAC,MAAM,SAAS,UAAU,EAAE,WAAW,SAAS,UAAU,EAClF,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,GACzC,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,CAmCrC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAAC,MAAM,SAAS,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAExG;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,SAAS,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,iBAAiB,EAChC,UAAU,EAAE,iBAAiB,EAC7B,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3B,IAAI,CAsBN"}
|
package/dist/registry-diff.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CanonicalTable } from "./fingerprint";
|
|
2
|
-
import type
|
|
2
|
+
import { type SyncTableRegistry } from "./registry";
|
|
3
3
|
/**
|
|
4
4
|
* The registry-diff gate (ADR-0006): classify a registry change as
|
|
5
5
|
* `compatible | risky | breaking` so loss-detection happens at *authoring* time, not
|
|
@@ -24,11 +24,64 @@ export interface RegistryDiff {
|
|
|
24
24
|
export interface RegistryLock {
|
|
25
25
|
version: string;
|
|
26
26
|
tables: CanonicalTable[];
|
|
27
|
+
/**
|
|
28
|
+
* Each entry's row classification (ADR-0052), keyed by registry key; `null` = unclassified. A SIBLING of
|
|
29
|
+
* `tables`, deliberately not a field of {@link CanonicalTable}: the canonical table shape is what
|
|
30
|
+
* `fingerprintRegistry` hashes, and that hash is PERSISTED as the local store's cache key — so folding
|
|
31
|
+
* classification into it would make merely classifying a table wipe every store's read cache. The lock
|
|
32
|
+
* still records it, so an un-enrolment (a class removed or changed) is a reviewable diff.
|
|
33
|
+
*
|
|
34
|
+
* Optional because a committed lock is JSON on disk: one written before this field existed simply has no
|
|
35
|
+
* `rowClasses`, and the diff then reads the whole baseline as unclassified — so adopting classification
|
|
36
|
+
* against an old lock is a set of `compatible` declarations, never spurious risk. {@link buildRegistryLock}
|
|
37
|
+
* always populates it.
|
|
38
|
+
*/
|
|
39
|
+
rowClasses?: RegistryRowClasses;
|
|
40
|
+
/**
|
|
41
|
+
* Each registered Event stream (ADR-0053 decision 1), keyed by Event-stream name → a canonical hash of its
|
|
42
|
+
* payload schema AND its identity declaration. A SIBLING of `tables` for the same reason `rowClasses` is:
|
|
43
|
+
* the canonical table shape is what `fingerprintRegistry` hashes and that hash is the local store's
|
|
44
|
+
* PERSISTED cache key, so folding an Event stream into it would make registering one wipe every store's read
|
|
45
|
+
* cache — for a lane that touches no synced table, no local schema and no apply function.
|
|
46
|
+
*
|
|
47
|
+
* Optional because a committed lock is JSON on disk: one written before this field existed simply has no
|
|
48
|
+
* `streams`, and the diff then reads the whole baseline as having none — so adopting the Event lane against
|
|
49
|
+
* an old lock is a set of `compatible` additions, never spurious risk. {@link buildRegistryLock} always
|
|
50
|
+
* populates it.
|
|
51
|
+
*/
|
|
52
|
+
streams?: RegistryEventStreams;
|
|
27
53
|
}
|
|
28
|
-
/**
|
|
54
|
+
/** Registry key → row class (`null` = unclassified). See {@link RegistryLock.rowClasses}. */
|
|
55
|
+
export type RegistryRowClasses = Record<string, string | null>;
|
|
56
|
+
/** Event-stream name → canonical contract hash. See {@link RegistryLock.streams}. */
|
|
57
|
+
export type RegistryEventStreams = Record<string, string>;
|
|
58
|
+
/** The row classification of every entry, with sorted keys so a serialized lock is stable. */
|
|
59
|
+
export declare function registryRowClasses(registry: SyncTableRegistry): RegistryRowClasses;
|
|
60
|
+
/** The canonical contract hash of every registered Event stream, with sorted keys so a lock is stable. */
|
|
61
|
+
export declare function registryEventStreams(registry: SyncTableRegistry): RegistryEventStreams;
|
|
62
|
+
/**
|
|
63
|
+
* Build the committed lock (fingerprint + canonical shape + row classification + Event streams) for a
|
|
64
|
+
* registry.
|
|
65
|
+
*/
|
|
29
66
|
export declare function buildRegistryLock(registry: SyncTableRegistry): RegistryLock;
|
|
30
|
-
/**
|
|
31
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Classify the change from one canonical registry shape to another. `rowClasses` carries each side's row
|
|
69
|
+
* classification (ADR-0052) and `streams` each side's Event-stream contract hashes (ADR-0053) — both siblings
|
|
70
|
+
* of the canonical tables, never fields of them (see {@link RegistryLock.rowClasses} /
|
|
71
|
+
* {@link RegistryLock.streams}). An omitted side reads as entirely unclassified / streamless, which is how a
|
|
72
|
+
* lock predating either field diffs as adoption rather than as spurious risk.
|
|
73
|
+
*
|
|
74
|
+
* `RegistryChange.table` names the SUBJECT of the change, which for an Event-stream change is the
|
|
75
|
+
* Event-stream name rather than a registry table key; each such `detail` says "event stream …" so the
|
|
76
|
+
* summary line stays unambiguous.
|
|
77
|
+
*/
|
|
78
|
+
export declare function diffCanonicalRegistries(previous: readonly CanonicalTable[], next: readonly CanonicalTable[], rowClasses?: {
|
|
79
|
+
previous?: RegistryRowClasses | undefined;
|
|
80
|
+
next?: RegistryRowClasses | undefined;
|
|
81
|
+
}, streams?: {
|
|
82
|
+
previous?: RegistryEventStreams | undefined;
|
|
83
|
+
next?: RegistryEventStreams | undefined;
|
|
84
|
+
}): RegistryDiff;
|
|
32
85
|
/** Classify the change between two registries. */
|
|
33
86
|
export declare function compareRegistries(previous: SyncTableRegistry, next: SyncTableRegistry): RegistryDiff;
|
|
34
87
|
/** Classify a registry against a committed lock baseline. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-diff.d.ts","sourceRoot":"","sources":["../src/registry-diff.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry-diff.d.ts","sourceRoot":"","sources":["../src/registry-diff.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyD,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3G,OAAO,EAA+C,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEjG;;;;;;;;;GASG;AAEH,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAIzE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MA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AAClD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,iBAAiB,GAAG,YAAY,CAOpG;AAED,6DAA6D;AAC7D,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,GAAG,YAAY,CAOrG;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,iBAAiB,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAAG;IAC5F,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,YAAY,CAAC;CACpB,CAGA;AAED,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAKhE"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { type JwtClaims, type RowFilterShape } from "./config";
|
|
2
|
+
import { type SyncTableEntry, type SyncTableRegistry } from "./registry";
|
|
3
|
+
/**
|
|
4
|
+
* Registry invariants (ADR-0052): assert a claim about the RENDERED authorization artifacts of every entry
|
|
5
|
+
* a classification binds, evaluated against named claims personas — the whole-registry counterpart to
|
|
6
|
+
* `assertReadContractPreserved`'s per-table read-contract check.
|
|
7
|
+
*
|
|
8
|
+
* It exists because a privacy/visibility invariant spanning many entries drifts in two structural ways that
|
|
9
|
+
* per-entry review cannot catch:
|
|
10
|
+
*
|
|
11
|
+
* 1. **Read/write asymmetry** — the Electric row filter and the Postgres RLS policies are two engines, so one
|
|
12
|
+
* can be tightened (or loosened) without the other. The assertion audits BOTH surfaces of every bound
|
|
13
|
+
* entry in one predicate, so "readable but unwritable" (or the reverse) is a test failure, not a bug report.
|
|
14
|
+
* 2. **Under-enumeration** — an invariant expressed over a hand-maintained list of tables silently stops
|
|
15
|
+
* covering the registry the moment someone adds an entry. Binding by {@link SyncTableEntry.rowClass}
|
|
16
|
+
* inverts that: with a declared `rowClasses` vocabulary, a new entry cannot even be registered without
|
|
17
|
+
* being classified, so it joins its class's invariants by construction.
|
|
18
|
+
*
|
|
19
|
+
* It audits RENDERED output, so it sees things the fingerprint structurally cannot (the `customWhere` BODY
|
|
20
|
+
* is a closure — only its presence and `RowFilterSpec.revision` are hashed). The trade: it sees exactly the
|
|
21
|
+
* claims fixtures you give it, and nothing else.
|
|
22
|
+
*/
|
|
23
|
+
/** One rendered write policy on a bound entry's Postgres table, as the invariant predicate sees it. */
|
|
24
|
+
export interface RenderedPolicy {
|
|
25
|
+
/** The policy name as declared (e.g. `widgets_select_owner_or_admin`). */
|
|
26
|
+
name: string;
|
|
27
|
+
/** The command the policy governs: `select` | `insert` | `update` | `delete`, or `all` when undeclared. */
|
|
28
|
+
command: string;
|
|
29
|
+
/** The `USING` predicate rendered to inline SQL text, or `null` when the policy declares none. */
|
|
30
|
+
using: string | null;
|
|
31
|
+
/** The `WITH CHECK` predicate rendered to inline SQL text, or `null` when the policy declares none. */
|
|
32
|
+
withCheck: string | null;
|
|
33
|
+
}
|
|
34
|
+
/** One (entry × claims fixture) cell handed to a {@link RegistryInvariantSpec.holds} predicate. */
|
|
35
|
+
export interface RegistryInvariantCell {
|
|
36
|
+
/** The entry's key in the registry. */
|
|
37
|
+
key: string;
|
|
38
|
+
entry: SyncTableEntry;
|
|
39
|
+
/** The entry's classification, or `undefined` when it carries none (possible only for a `appliesTo` predicate). */
|
|
40
|
+
rowClass: string | undefined;
|
|
41
|
+
/** The fixture's name, as declared in {@link RegistryInvariantSpec.claimsFixtures}. */
|
|
42
|
+
fixtureName: string;
|
|
43
|
+
claims: JwtClaims;
|
|
44
|
+
/**
|
|
45
|
+
* The read filter this entry sends to Electric FOR THESE CLAIMS — the real read pipeline's output
|
|
46
|
+
* (`buildRowFilterShape`, exactly what the proxy calls per shape request).
|
|
47
|
+
*
|
|
48
|
+
* `null` means **unfiltered**, and covers both ways that arises: the entry declares no shape/`rowFilter`
|
|
49
|
+
* at all, or its `customWhere` returned `null` for these claims (the documented "bypass filtering, every
|
|
50
|
+
* row is visible" answer — e.g. an admin persona). Both are the same statement about what the client
|
|
51
|
+
* receives, which is what an invariant reasons about; distinguish them via `entry.shape?.rowFilter` if a
|
|
52
|
+
* predicate genuinely needs to.
|
|
53
|
+
*/
|
|
54
|
+
renderedWhere: RowFilterShape | null;
|
|
55
|
+
/** Every RLS policy attached to the entry's Postgres table, rendered to inline SQL text. */
|
|
56
|
+
renderedPolicies: RenderedPolicy[];
|
|
57
|
+
}
|
|
58
|
+
export interface RegistryInvariantSpec {
|
|
59
|
+
/** Human name for the invariant, used as the error header (e.g. "private rows never leave their owner"). */
|
|
60
|
+
name: string;
|
|
61
|
+
/**
|
|
62
|
+
* Which entries the invariant binds: a list of {@link SyncTableEntry.rowClass} values (the normal form —
|
|
63
|
+
* coverage then grows with the registry), or a predicate over the entry for the rare case a class cannot
|
|
64
|
+
* express. When the registry declares its `rowClasses`, a class named here that is not in that vocabulary
|
|
65
|
+
* throws immediately — a typo would otherwise bind nothing and pass vacuously.
|
|
66
|
+
*/
|
|
67
|
+
appliesTo: readonly string[] | ((entry: SyncTableEntry, key: string) => boolean);
|
|
68
|
+
/**
|
|
69
|
+
* The claims personas the invariant is evaluated against, by name (`{ anonymous: {}, owner: {...} }`). Every
|
|
70
|
+
* bound entry is checked against every fixture; the names appear in the failure report.
|
|
71
|
+
*/
|
|
72
|
+
claimsFixtures: Record<string, JwtClaims>;
|
|
73
|
+
/**
|
|
74
|
+
* The invariant itself, over ONE (entry × fixture) cell's rendered artifacts. Return `true` when it holds,
|
|
75
|
+
* `false` or a reason string when it does not — a reason string is reproduced verbatim in the error, so
|
|
76
|
+
* prefer it.
|
|
77
|
+
*/
|
|
78
|
+
holds: (cell: RegistryInvariantCell) => boolean | string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Assert a {@link RegistryInvariantSpec} over a registry: for every entry the invariant binds, and every
|
|
82
|
+
* claims fixture, evaluate `holds` against the entry's RENDERED read filter and write policies. Pure audit —
|
|
83
|
+
* it renders through the production code paths but changes no runtime behaviour.
|
|
84
|
+
*
|
|
85
|
+
* Call it at module eval beside the registry (or in a test), the same way {@link assertReadContractPreserved}
|
|
86
|
+
* is called, so a violation fails closed rather than shipping.
|
|
87
|
+
*
|
|
88
|
+
* ```ts
|
|
89
|
+
* assertRegistryInvariant(registry, {
|
|
90
|
+
* name: "private rows are never visible to an anonymous caller",
|
|
91
|
+
* appliesTo: ["private"],
|
|
92
|
+
* claimsFixtures: { anonymous: {}, member: { sub: "u-1" } },
|
|
93
|
+
* holds: ({ fixtureName, renderedWhere }) =>
|
|
94
|
+
* fixtureName !== "anonymous" || renderedWhere?.where === "false" || "anonymous read is not denied",
|
|
95
|
+
* });
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* Two deliberate fail-closed behaviours:
|
|
99
|
+
* - An `appliesTo` class the registry's declared vocabulary does not contain throws immediately (a typo must
|
|
100
|
+
* not pass as "nothing to check").
|
|
101
|
+
* - An invariant that binds ZERO entries throws. A spec that checks nothing is a bug in the spec — nearly
|
|
102
|
+
* always a wrong class name or an invariant left behind after its class was renamed — and silently passing
|
|
103
|
+
* is the exact failure mode this whole mechanism exists to remove.
|
|
104
|
+
*
|
|
105
|
+
* Every failing cell is collected and reported together: the header names the invariant, then one
|
|
106
|
+
* `entry (fixture): reason` line per violation. Never first-failure-only — you fix a classification-wide
|
|
107
|
+
* problem in one pass, not one re-run per entry.
|
|
108
|
+
*/
|
|
109
|
+
export declare function assertRegistryInvariant(registry: SyncTableRegistry, spec: RegistryInvariantSpec): void;
|
|
110
|
+
//# sourceMappingURL=registry-invariant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-invariant.d.ts","sourceRoot":"","sources":["../src/registry-invariant.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AACpF,OAAO,EAA6B,KAAK,cAAc,EAAE,KAAK,iB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
|
@@ -5,6 +5,7 @@ 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
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
|
+
import { type EventStreamRegistry } from "./event-stream";
|
|
8
9
|
type PgSchemaType = ReturnType<typeof pgSchema>;
|
|
9
10
|
type AnyPgView = PgView;
|
|
10
11
|
type TableColumnsShape<TTable extends AnyPgTable> = TTable extends {
|
|
@@ -60,6 +61,25 @@ export interface SyncTableEntry<TTable extends AnyPgTable = AnyPgTable, TLocalTa
|
|
|
60
61
|
* local row instead of failing the commit. Resolved to `"insert"` when omitted.
|
|
61
62
|
*/
|
|
62
63
|
applyMode: "insert" | "upsert";
|
|
64
|
+
/**
|
|
65
|
+
* Consumer-defined ROW CLASSIFICATION (ADR-0052) — documentation-as-code for what KIND of rows this
|
|
66
|
+
* entry carries. The vocabulary is entirely the CONSUMER's: pgxsinkit defines no values and attaches no
|
|
67
|
+
* behaviour to any of them. Its two jobs:
|
|
68
|
+
*
|
|
69
|
+
* - **Fail-closed enumeration.** When the registry declares its vocabulary
|
|
70
|
+
* ({@link SyncRegistryDefinition.rowClasses}), EVERY entry must carry a `rowClass` drawn from that set —
|
|
71
|
+
* validated at `defineSyncRegistry`, i.e. at module eval. A new entry therefore cannot join the registry
|
|
72
|
+
* without its author classifying it, which is what stops a privacy/visibility obligation from being
|
|
73
|
+
* silently inherited by tables nobody remembered to enumerate.
|
|
74
|
+
* - **The binding key for {@link assertRegistryInvariant}.** An invariant binds to `rowClass` values
|
|
75
|
+
* rather than to a hand-maintained table list, so coverage grows with the registry instead of drifting
|
|
76
|
+
* behind it.
|
|
77
|
+
*
|
|
78
|
+
* When the registry declares no `rowClasses`, this field is unconstrained (any string, or none). It is
|
|
79
|
+
* authoring metadata only: it is deliberately absent from the registry fingerprint and the read-contract
|
|
80
|
+
* fingerprint, so classifying a table never shifts a persisted cache key (ADR-0052).
|
|
81
|
+
*/
|
|
82
|
+
rowClass?: string;
|
|
63
83
|
shape?: ShapeSpec;
|
|
64
84
|
clientProjection?: ClientProjectionSpecForTable<TTable>;
|
|
65
85
|
serverProjection?: ServerProjectionSpec;
|
|
@@ -229,6 +249,12 @@ export type SyncTableInput<TName extends string, TColumns extends Record<string,
|
|
|
229
249
|
* local row. Declare the exception here, where it lives — do not weaken the invariant repo-wide.
|
|
230
250
|
*/
|
|
231
251
|
applyMode?: "insert" | "upsert";
|
|
252
|
+
/**
|
|
253
|
+
* Consumer-defined row classification (ADR-0052) — see {@link SyncTableEntry.rowClass}. Required (and
|
|
254
|
+
* checked against the declared set) when the registry declares {@link SyncRegistryDefinition.rowClasses};
|
|
255
|
+
* unconstrained otherwise.
|
|
256
|
+
*/
|
|
257
|
+
rowClass?: string;
|
|
232
258
|
shape?: ShapeSpecInputFor<TColumns>;
|
|
233
259
|
clientProjection?: SyncTableInputProjection<TColumns, TOmittedColumns>;
|
|
234
260
|
/** Server-side response-path projection (e.g. `rowTransform`). Server authority, not client shape. */
|
|
@@ -272,9 +298,41 @@ export interface SyncRegistryDefinition<TRegistry extends SyncTableRegistry> {
|
|
|
272
298
|
* the returned registry and read back with {@link getSyncRegistryStorage}. See {@link SyncStorageDeclaration}.
|
|
273
299
|
*/
|
|
274
300
|
storage?: SyncStorageDeclaration;
|
|
301
|
+
/**
|
|
302
|
+
* The registry's CLOSED row-classification vocabulary (ADR-0052) — the consumer's own set of
|
|
303
|
+
* {@link SyncTableEntry.rowClass} values (pgxsinkit defines none). Declaring it turns classification into
|
|
304
|
+
* a fail-closed obligation: EVERY entry must then carry a `rowClass` drawn from this exact set, validated
|
|
305
|
+
* at {@link defineSyncRegistry} (module eval), so a newly added entry cannot join the registry
|
|
306
|
+
* unclassified and silently escape whatever invariants its class enrols it in. The declared set is carried
|
|
307
|
+
* on the returned registry and read back with {@link getSyncRegistryRowClasses}, which
|
|
308
|
+
* {@link assertRegistryInvariant} uses to reject a misspelled class in an invariant's `appliesTo`.
|
|
309
|
+
*
|
|
310
|
+
* Omit it and `rowClass` is unconstrained (the bare-registry-map overload has nowhere to declare a set, so
|
|
311
|
+
* it is always unconstrained). Purely authoring metadata: it never enters the registry fingerprint.
|
|
312
|
+
*/
|
|
313
|
+
rowClasses?: readonly string[];
|
|
314
|
+
/**
|
|
315
|
+
* The registry's **Event streams** (ADR-0053 decision 1) — the Event lane's registration surface, keyed by
|
|
316
|
+
* Event-stream NAME (the record key IS the name; {@link defineEventStream} declares the entry). Registration
|
|
317
|
+
* lives here rather than in a parallel artifact so there is ONE contract to lock, diff and thread through
|
|
318
|
+
* `createSyncServer` and `defineSyncWorker`.
|
|
319
|
+
*
|
|
320
|
+
* Validated fail-closed at {@link defineSyncRegistry} (module eval, every offender named at once): the name
|
|
321
|
+
* must match `[a-z][a-z0-9_]*` and fit the pgmq queue-name budget, the payload must be a zod schema, and each
|
|
322
|
+
* identity field must name a non-empty claim path. Carried on the returned registry and read back with
|
|
323
|
+
* {@link getSyncRegistryStreams}.
|
|
324
|
+
*
|
|
325
|
+
* Streams follow the `rowClasses` precedent: they ride the registry LOCK as a sibling (added → `compatible`,
|
|
326
|
+
* removed → `breaking`, payload/identity changed → `risky`) and stay OUT of the canonical fingerprint — an
|
|
327
|
+
* Event stream touches no synced table, no local schema and no apply function, so registering one must never
|
|
328
|
+
* wipe a store's read cache. The bare-registry-map overload has nowhere to declare streams.
|
|
329
|
+
*/
|
|
330
|
+
streams?: EventStreamRegistry;
|
|
275
331
|
}
|
|
276
332
|
export declare const syncRegistrySchemaSymbol: unique symbol;
|
|
277
333
|
export declare const syncRegistryStorageSymbol: unique symbol;
|
|
334
|
+
export declare const syncRegistryRowClassesSymbol: unique symbol;
|
|
335
|
+
export declare const syncRegistryStreamsSymbol: unique symbol;
|
|
278
336
|
export type RegistryTables<TRegistry extends SyncTableRegistry> = {
|
|
279
337
|
[TKey in keyof TRegistry]: TRegistry[TKey]["table"];
|
|
280
338
|
};
|
|
@@ -294,8 +352,54 @@ type ManagedFieldColumnKeysForOperation<TEntry, TOperation extends ManagedFieldA
|
|
|
294
352
|
column: infer TColumn extends string;
|
|
295
353
|
applyOn: ReadonlyArray<ManagedFieldApplyOn>;
|
|
296
354
|
} ? TOperation extends TField["applyOn"][number] ? TColumn : never : never : never;
|
|
355
|
+
/**
|
|
356
|
+
* EVERY managed column key, whatever its `applyOn` — the omit set for {@link SyncTableUpdateInput}.
|
|
357
|
+
* `ManagedFieldApplyOn` is a union and the operation parameter is naked, so the conditional distributes
|
|
358
|
+
* and a field managed on either operation contributes its key.
|
|
359
|
+
*
|
|
360
|
+
* The **type-level twin** of {@link isManagedFieldGuarded} at `"update"`: same rule, stated where the
|
|
361
|
+
* compiler can enforce it. Change one only by changing the rule in {@link isManagedFieldGuarded}.
|
|
362
|
+
*/
|
|
363
|
+
type ManagedFieldColumnKeys<TEntry> = ManagedFieldColumnKeysForOperation<TEntry, ManagedFieldApplyOn>;
|
|
364
|
+
/**
|
|
365
|
+
* Whether a managed field is **SERVER-OWNED** for an operation — the ONE definition of the guard rule,
|
|
366
|
+
* so the surfaces that enforce it cannot drift apart:
|
|
367
|
+
*
|
|
368
|
+
* - **create** ⇒ the field is guarded when its `applyOn` includes `"create"`. The server stamps it after
|
|
369
|
+
* validation, so a client value for it is never honoured.
|
|
370
|
+
* - **update** ⇒ **every** managed field is guarded, a **create-only** one included. An update-managed
|
|
371
|
+
* field is stamped by the server on every write; a `applyOn: ["create"]` field is stamped at birth and
|
|
372
|
+
* **inert** on update (the generated apply function offers no UPDATE SET candidate for it). Neither is
|
|
373
|
+
* ever a settable update key, so both are flagged, stripped, and omitted rather than left for consumer
|
|
374
|
+
* RLS to neutralise.
|
|
375
|
+
* - **delete** ⇒ none. A delete carries no payload, so nothing can be owned.
|
|
376
|
+
*
|
|
377
|
+
* "Guarded" is NOT "stamped": stamping is operation-scoped (`applyOn.includes(operation)`) and decides
|
|
378
|
+
* what the applier writes; guarding decides what a client may not send. They coincide on create and
|
|
379
|
+
* deliberately diverge on update.
|
|
380
|
+
*
|
|
381
|
+
* The consuming surfaces, all of which must go through this predicate:
|
|
382
|
+
* - the write route's `getGuardedManagedFields` (`packages/server/src/mutations/route.ts`) — the 400
|
|
383
|
+
* violation check, the sanitizer, and the create/update validation schemas;
|
|
384
|
+
* - the client's `stripManagedFields` (`packages/client/src/mutation.ts`) — the outgoing-payload strip;
|
|
385
|
+
* - the apply-function generator's `buildTableBranch` (`packages/server/src/mutations/plpgsql-apply.ts`) —
|
|
386
|
+
* the INSERT/UPDATE candidate-column exclusions;
|
|
387
|
+
* - {@link ManagedFieldColumnKeys} / `ManagedFieldColumnKeysForOperation` — the type-level twin behind
|
|
388
|
+
* {@link SyncTableCreateInput} / {@link SyncTableUpdateInput}.
|
|
389
|
+
*/
|
|
390
|
+
export declare function isManagedFieldGuarded(field: {
|
|
391
|
+
applyOn: readonly ManagedFieldApplyOn[];
|
|
392
|
+
}, operation: "create" | "update" | "delete"): boolean;
|
|
297
393
|
export type SyncTableCreateInput<TRegistry extends SyncTableRegistry, TKey extends keyof TRegistry> = TRegistry[TKey] extends SyncTableEntry<AnyPgTable, infer TLocalTable extends AnyPgTable> ? Omit<InferInsertModel<TLocalTable>, ManagedFieldColumnKeysForOperation<TRegistry[TKey], "create">> : never;
|
|
298
|
-
|
|
394
|
+
/**
|
|
395
|
+
* The patch type for an update: the insert model made partial, minus **every** managed key — including
|
|
396
|
+
* a **create-only** one. A field declared `applyOn: ["create"]` is stamped at birth and inert on update
|
|
397
|
+
* (the generated apply function offers no UPDATE SET candidate for it), so it is never a settable update
|
|
398
|
+
* key; the write route 400-rejects an update payload that carries one. This omit set is the type-level
|
|
399
|
+
* statement of {@link isManagedFieldGuarded} at `"update"` — that predicate is the single definition of
|
|
400
|
+
* the rule, and every runtime surface derives from it.
|
|
401
|
+
*/
|
|
402
|
+
export type SyncTableUpdateInput<TRegistry extends SyncTableRegistry, TKey extends keyof TRegistry> = TRegistry[TKey] extends SyncTableEntry<AnyPgTable, infer TLocalTable extends AnyPgTable> ? Partial<Omit<InferInsertModel<TLocalTable>, ManagedFieldColumnKeys<TRegistry[TKey]>>> : never;
|
|
299
403
|
export type SyncTableRecord<TRegistry extends SyncTableRegistry, TKey extends keyof TRegistry> = TRegistry[TKey] extends SyncTableEntry<infer TTable extends AnyPgTable, AnyPgTable> ? InferSelectModel<TTable> : never;
|
|
300
404
|
/**
|
|
301
405
|
* Defines a sync table entry. Provide `tableName` and `makeColumns` — the Drizzle
|
|
@@ -308,6 +412,7 @@ export declare function defineSyncTable<const TName extends string, const TColum
|
|
|
308
412
|
/** @default "readonly" */
|
|
309
413
|
mode?: TMode;
|
|
310
414
|
}): {
|
|
415
|
+
rowClass?: string;
|
|
311
416
|
conflictPolicy?: ConflictPolicy;
|
|
312
417
|
consistencyGroup?: string;
|
|
313
418
|
subscription?: SubscriptionTiming;
|
|
@@ -710,6 +815,13 @@ export declare function defineReadProjection<const TOwnerTable extends AnyPgTabl
|
|
|
710
815
|
* `serverProjection.rowTransform` and `columns`; must be disjoint from `columns` and the primary key.
|
|
711
816
|
*/
|
|
712
817
|
serverOnlyColumns?: readonly TableColumnKey<TOwnerTable>[];
|
|
818
|
+
/**
|
|
819
|
+
* Row classification (ADR-0052) for THIS projection. Defaults to the OWNER's `rowClass` — a projection
|
|
820
|
+
* reads the owner's rows, so it carries the owner's classification (and the invariants bound to it)
|
|
821
|
+
* unless you say otherwise. Override when the narrower shape genuinely changes the KIND of row the
|
|
822
|
+
* client receives (e.g. a redacting window over private rows that egresses only public fields).
|
|
823
|
+
*/
|
|
824
|
+
rowClass?: string;
|
|
713
825
|
consistencyGroup?: string;
|
|
714
826
|
subscription?: SubscriptionTiming;
|
|
715
827
|
retention?: Retention;
|
|
@@ -782,5 +894,36 @@ export declare function attachSyncRegistryStorage<TRegistry extends SyncTableReg
|
|
|
782
894
|
* mint seam — the storage twin of {@link getSyncRegistrySchema}.
|
|
783
895
|
*/
|
|
784
896
|
export declare function getSyncRegistryStorage<TRegistry extends SyncTableRegistry>(registry: TRegistry): SyncStorageDeclaration | undefined;
|
|
897
|
+
/**
|
|
898
|
+
* Stamp the registry's declared row-class vocabulary (ADR-0052) onto the registry value as a non-enumerable
|
|
899
|
+
* symbol — the classification twin of {@link attachSyncRegistryStorage}. An absent/empty declaration attaches
|
|
900
|
+
* nothing (the bare-registry-map overload, and any definition that declares no vocabulary), so
|
|
901
|
+
* {@link getSyncRegistryRowClasses} reads back `undefined` and classification stays unconstrained.
|
|
902
|
+
*/
|
|
903
|
+
export declare function attachSyncRegistryRowClasses<TRegistry extends SyncTableRegistry>(registry: TRegistry, rowClasses: readonly string[] | undefined): TRegistry;
|
|
904
|
+
/**
|
|
905
|
+
* Read the row-class vocabulary (ADR-0052) a registry was built with, or `undefined` when none was declared
|
|
906
|
+
* (a bare registry map, or a definition with no `rowClasses`) — the classification twin of
|
|
907
|
+
* {@link getSyncRegistryStorage}. {@link assertRegistryInvariant} consults it to reject an invariant whose
|
|
908
|
+
* `appliesTo` names a class this registry does not define (a typo that would otherwise bind nothing).
|
|
909
|
+
*/
|
|
910
|
+
export declare function getSyncRegistryRowClasses<TRegistry extends SyncTableRegistry>(registry: TRegistry): readonly string[] | undefined;
|
|
911
|
+
/**
|
|
912
|
+
* Stamp the registry's registered Event streams (ADR-0053 decision 1) onto the registry value as a
|
|
913
|
+
* non-enumerable symbol — the Event-lane twin of {@link attachSyncRegistryRowClasses}. An absent declaration
|
|
914
|
+
* attaches nothing (the bare-registry-map overload, and any definition that registers no Event stream), so
|
|
915
|
+
* {@link getSyncRegistryStreams} reads back `undefined` and the registry simply has no Event lane.
|
|
916
|
+
*
|
|
917
|
+
* Non-enumerable is load-bearing beyond tidiness: `canonicalizeRegistry` walks the registry's own enumerable
|
|
918
|
+
* keys, so riding a symbol is what keeps Event streams OUT of the persisted fingerprint.
|
|
919
|
+
*/
|
|
920
|
+
export declare function attachSyncRegistryStreams<TRegistry extends SyncTableRegistry>(registry: TRegistry, streams: EventStreamRegistry | undefined): TRegistry;
|
|
921
|
+
/**
|
|
922
|
+
* Read the Event streams (ADR-0053 decision 1) a registry was built with, or `undefined` when none were
|
|
923
|
+
* registered — the Event-lane twin of {@link getSyncRegistryRowClasses}. The server mounts the ingestion route
|
|
924
|
+
* and provisions one pgmq queue per entry from this; the client resolves an `appendEvent` payload schema
|
|
925
|
+
* through it.
|
|
926
|
+
*/
|
|
927
|
+
export declare function getSyncRegistryStreams<TRegistry extends SyncTableRegistry>(registry: TRegistry): EventStreamRegistry | undefined;
|
|
785
928
|
export {};
|
|
786
929
|
//# sourceMappingURL=registry.d.ts.map
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -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,UA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,wBAAwB,CAAC,SAAS,SAAS,iBAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,aAwCjH;AAED,wBAAgB,qBAAqB,CAAC,SAAS,SAAS,iBAAiB,EAAE,QAAQ,EAAE,SAAS,UAG7F;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,SAAS,iBAAiB,EAC3E,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,sBAAsB,GAAG,SAAS,aA0B5C;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,SAAS,iBAAiB,EACxE,QAAQ,EAAE,SAAS,GAClB,sBAAsB,GAAG,SAAS,CAGpC;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,SAAS,iBAAiB,EAC9E,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,aAyB1C;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,SAAS,iBAAiB,EAC3E,QAAQ,EAAE,SAAS,GAClB,SAAS,MAAM,EAAE,GAAG,SAAS,CAG/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,SAAS,iBAAiB,EAC3E,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,mBAAmB,GAAG,SAAS,aA+BzC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,SAAS,iBAAiB,EACxE,QAAQ,EAAE,SAAS,GAClB,mBAAmB,GAAG,SAAS,CAGjC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single role-existence guard used by every pgxsinkit-emitted GRANT/REVOKE.
|
|
3
|
+
*
|
|
4
|
+
* pgxsinkit artifacts are portable: the same migration runs on a Supabase-shaped cluster (where
|
|
5
|
+
* `anon`/`authenticated`/`service_role` exist), on a plain Postgres, and on a PGlite test lane
|
|
6
|
+
* (where none of them do). A bare `REVOKE … FROM anon` is a hard error where the role is absent, so
|
|
7
|
+
* every role-scoped grant/revoke is wrapped in a `DO $$ … IF EXISTS (SELECT 1 FROM pg_roles …)`
|
|
8
|
+
* block and simply does nothing there.
|
|
9
|
+
*
|
|
10
|
+
* Two callers share this one definition — `buildRegistryGovernanceSql` (@pgxsinkit/schema, table
|
|
11
|
+
* grants) and the apply-function ACL (@pgxsinkit/server, ADR-0054) — so the guard idiom cannot
|
|
12
|
+
* drift between the artifacts that carry a deployment's authorization posture.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Wrap one already-rendered SQL statement (no trailing semicolon) in the role-existence guard.
|
|
16
|
+
*
|
|
17
|
+
* `statementSql` is embedded as a PL/pgSQL string literal, so it is escaped as a whole — callers pass
|
|
18
|
+
* ordinary SQL with real single quotes and real double-quoted identifiers.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildRoleGuardedStatement(roleName: string, statementSql: string): string;
|
|
21
|
+
//# sourceMappingURL=sql-role-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-role-guard.d.ts","sourceRoot":"","sources":["../src/sql-role-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAUxF"}
|