@dbsp/core 3.3.0 → 4.0.0

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.
@@ -0,0 +1,177 @@
1
+ import { TransitionLessor, ExclusiveTransitionTarget, TransitionSessionClient, TransitionQueryClient, TransitionRunMetadata, AdmittedOutcomeClaim, DestructiveAuthorityPermit, DestructiveDecision, OutcomeClaimAdmissionInput, OutcomeClaimAdmission, OutcomeProtocolRefusal, DestructiveAction, DestructiveAuthorityEvidence, OutcomeRecoveryInput, OutcomeRecoveryClassification, LedgerAddress, ClaimToken, ClaimBundleStatement, ClaimStatementBundle, OutcomeClaimPlan } from '@dbsp/types';
2
+
3
+ declare const TRANSITION_LESSOR_REJECTION = "transition target must be a core-minted lessor";
4
+ /** A core-owned lease: packs receive its session, while core retains release. */
5
+ type TransitionLease = {
6
+ readonly session: TransitionSessionClient;
7
+ readonly release: (failure?: TransitionLeaseFailure) => Promise<void>;
8
+ };
9
+ /**
10
+ * Read the revocation bit carried by a physical lease source.
11
+ *
12
+ * This is deliberately a boolean-only adapter seam: adapters retain the
13
+ * physical lease through its final release, while core retains the token and
14
+ * every logical wrapper that shares it. An unwrapped source has not been
15
+ * leased, so it cannot have been marked compromised.
16
+ */
17
+ declare function transitionPhysicalSessionIsCompromised(physicalSession: object): boolean;
18
+ /**
19
+ * Outcome code may poison the current lease when a transport or protocol fault
20
+ * leaves its backend unsafe for reuse. The release boundary consumes this bit
21
+ * and returns the client with a truthy error so pg destroys it.
22
+ */
23
+ declare function markTransitionClientCompromised(session: TransitionSessionClient): void;
24
+ /**
25
+ * Mint the session passed to an operation's executeOperation() method.
26
+ *
27
+ * The returned client has the same narrow query surface as a normal session,
28
+ * but its provenance is carried by the lease channel selected here, not by
29
+ * recognizing the SQL text. A pack never receives the unwrapped session.
30
+ */
31
+ declare function planOperationSession(session: TransitionSessionClient): TransitionSessionClient;
32
+ /**
33
+ * Mint a durable target from an adapter-held exclusive lease.
34
+ *
35
+ * The adapter owns the liveness closure. Core retains the only lookup table,
36
+ * so a durable caller cannot substitute a generic lessor or retain a target
37
+ * after the adapter callback has finished.
38
+ */
39
+ declare function createExclusiveTransitionTarget(target: TransitionLessor, isLive: () => boolean): ExclusiveTransitionTarget;
40
+ /** Recognize a core-minted exclusive durable target. */
41
+ declare function isExclusiveTransitionTarget(value: unknown): value is ExclusiveTransitionTarget;
42
+ /** Acquire the callback-live lease underlying a durable execution target. */
43
+ declare function acquireExclusiveTransitionLease(target: ExclusiveTransitionTarget): Promise<TransitionLease>;
44
+ /** A non-executing transition read may use either normal or exclusive access. */
45
+ type TransitionReadTarget = TransitionLessor | ExclusiveTransitionTarget;
46
+ declare function acquireTransitionTargetLease(target: TransitionReadTarget): Promise<TransitionLease>;
47
+ /**
48
+ * Cross the engine's acquisition boundary.
49
+ *
50
+ * A lessor brand is a declaration, not a security boundary, so every
51
+ * acquisition is checked here even when a caller forged that declaration.
52
+ */
53
+ declare function acquireTransitionLease(target: TransitionLessor): Promise<TransitionLease>;
54
+ /**
55
+ * Mint a declared source of transition leases.
56
+ *
57
+ * This declares a source of leases; it does not inspect individual
58
+ * acquisitions. Every acquisition crosses `acquireTransitionLease`, the
59
+ * runtime boundary that validates and captures it exactly once.
60
+ *
61
+ * The wrapper is allocated and frozen by core. Its non-writable,
62
+ * non-configurable `Symbol.for('dbsp.transition.lessor')` brand carries this
63
+ * protocol version, so independently installed incompatible core versions do
64
+ * not accept one another's lessors. The global symbol is intentionally not a
65
+ * security boundary: code already running in this realm can forge it. This
66
+ * protects callers from passing the wrong connection object by accident.
67
+ */
68
+ declare function createTransitionLessor(acquire: () => Promise<TransitionQueryClient>): TransitionLessor;
69
+ /**
70
+ * Recognize a core-minted transition lessor. The shape check only rejects a
71
+ * contradictory declaration (a branded object without acquire()); the brand
72
+ * and protocol version are the declaration.
73
+ */
74
+ declare function isTransitionLessor(value: unknown): value is TransitionLessor;
75
+ /**
76
+ * Carries the error that ended a lease's use. Its presence — not the value it
77
+ * holds — is what says the lease is being returned after a failure.
78
+ */
79
+ type TransitionLeaseFailure = {
80
+ readonly error: unknown;
81
+ };
82
+
83
+ declare const durablyLoadedRunBrand: unique symbol;
84
+ /**
85
+ * Core-minted evidence that run metadata passed the execution entry boundary.
86
+ * Its nominal member prevents accidental structural construction; the private
87
+ * record keeps the runtime check meaningful when JavaScript is the caller.
88
+ */
89
+ interface DurablyLoadedRun {
90
+ readonly metadata: Readonly<TransitionRunMetadata>;
91
+ readonly [durablyLoadedRunBrand]: 'dbsp-durably-loaded-run';
92
+ }
93
+ /** Internal mint used only by the two core execution boundaries. */
94
+ declare function mintDurablyLoadedRun(run: TransitionRunMetadata): DurablyLoadedRun;
95
+ /** Runtime authenticity check for trusted internal consumers. */
96
+ declare function isDurablyLoadedRun(value: unknown): value is DurablyLoadedRun;
97
+
98
+ /**
99
+ * The total destructive classifier produces a decision for every evidence
100
+ * tuple; only its permitting cells produce positive destructive authority.
101
+ */
102
+ declare function decideDestructiveDecision(action: DestructiveAction, evidence: DestructiveAuthorityEvidence): DestructiveDecision;
103
+ /** Runtime defense for the erased opaque type at adapter boundaries. */
104
+ declare function isDestructiveAuthorityPermit(permit: DestructiveAuthorityPermit): boolean;
105
+ /**
106
+ * Couples the positive authority result to the existing single token producer.
107
+ * The adapter's destructive emitter accepts this value, never raw evidence.
108
+ */
109
+ type AdmittedDestructiveOutcomeClaim = AdmittedOutcomeClaim & {
110
+ readonly destructivePermit: DestructiveAuthorityPermit;
111
+ };
112
+ declare function admitDestructiveOutcomeClaim(input: {
113
+ readonly decision: Extract<DestructiveDecision, {
114
+ readonly kind: 'destructive-decision-permitted';
115
+ }>;
116
+ readonly admission: OutcomeClaimAdmissionInput;
117
+ }): AdmittedDestructiveOutcomeClaim | Exclude<OutcomeClaimAdmission, AdmittedOutcomeClaim>;
118
+ /** Attach a real interpreter permit to an adapter-opened, already minted claim. */
119
+ declare function attachDestructiveAuthorityPermit(input: {
120
+ readonly decision: Extract<DestructiveDecision, {
121
+ readonly kind: 'destructive-decision-permitted';
122
+ }>;
123
+ readonly claim: AdmittedOutcomeClaim;
124
+ }): AdmittedDestructiveOutcomeClaim | OutcomeProtocolRefusal;
125
+
126
+ /**
127
+ * Return the sole terminal member by predecessor topology, or undefined when
128
+ * the chain has zero or multiple terminals. This remains linear for large
129
+ * durable chains and centralizes the protocol's exactly-one-terminal rule.
130
+ */
131
+ declare function findUniqueLedgerTerminal<T extends {
132
+ readonly eventId: string;
133
+ readonly predecessor?: string;
134
+ }>(events: readonly T[]): T | undefined;
135
+ /**
136
+ * The sole durable identity builder for a managed outcome claim. An address
137
+ * is the stable chain key, while the claim id is execution-scoped:
138
+ * hash(executionId, plannedClaimKey, address[, closureMemberKey]). Hashing the
139
+ * canonical representation keeps the persisted identifier opaque, compact,
140
+ * and free of serializer type tags.
141
+ */
142
+ declare function outcomeClaimId(executionId: string, plannedClaimKey: string, address: LedgerAddress, closureMemberKey?: string): string;
143
+ /** Resolution and progress ids cannot collide across execution attempts either. */
144
+ declare function outcomeClaimEventId(claimId: string, role: string): string;
145
+ /**
146
+ * The sole token producer. The documented package API does not expose managed
147
+ * DDL or ledger-append primitives; capability checks prevent accidental
148
+ * bypass within supported integrations. This is not a security boundary
149
+ * against code already running in this Node process or a database role
150
+ * authorized to issue DDL or write ledger tables.
151
+ */
152
+ declare function mintClaimToken(plan: OutcomeClaimPlan): ClaimToken;
153
+ /**
154
+ * Reads the claim identity of a core-minted capability without exposing its
155
+ * bundle or giving callers a way to mint one.
156
+ */
157
+ declare function claimIdForToken(token: ClaimToken): string | undefined;
158
+ /**
159
+ * Consumes exactly one planned statement. The PostgreSQL execution sink calls
160
+ * this immediately before it sends SQL, after it has verified the claim is
161
+ * still open in the ledger.
162
+ */
163
+ declare function consumeClaimToken(token: ClaimToken, claimId: string, statements: readonly ClaimBundleStatement[]): ClaimStatementBundle | OutcomeProtocolRefusal;
164
+ /**
165
+ * Admits an open claim from the one lifecycle grammar, and mints the execution
166
+ * token only after the chain and plan-time bundle have both passed.
167
+ */
168
+ declare function admitOutcomeClaim(input: OutcomeClaimAdmissionInput): OutcomeClaimAdmission;
169
+ /**
170
+ * Classifies one open outcome-protocol claim from a fresh catalogue read.
171
+ * It never issues DDL; its only mutation instruction is an append for the
172
+ * adapter to perform after the read has completed. Calling this once per
173
+ * address deliberately keeps interrupted closures independently recoverable.
174
+ */
175
+ declare function classifyOutcomeRecovery(input: OutcomeRecoveryInput): Promise<OutcomeRecoveryClassification>;
176
+
177
+ export { type AdmittedDestructiveOutcomeClaim as A, type DurablyLoadedRun as D, type TransitionReadTarget as T, TRANSITION_LESSOR_REJECTION as a, type TransitionLeaseFailure as b, acquireExclusiveTransitionLease as c, acquireTransitionLease as d, acquireTransitionTargetLease as e, classifyOutcomeRecovery as f, createExclusiveTransitionTarget as g, createTransitionLessor as h, findUniqueLedgerTerminal as i, isExclusiveTransitionTarget as j, isTransitionLessor as k, outcomeClaimId as l, admitDestructiveOutcomeClaim as m, admitOutcomeClaim as n, outcomeClaimEventId as o, planOperationSession as p, attachDestructiveAuthorityPermit as q, claimIdForToken as r, consumeClaimToken as s, decideDestructiveDecision as t, isDestructiveAuthorityPermit as u, isDurablyLoadedRun as v, markTransitionClientCompromised as w, mintClaimToken as x, mintDurablyLoadedRun as y, transitionPhysicalSessionIsCompromised as z };
@@ -0,0 +1,2 @@
1
+ export { A as AdmittedDestructiveOutcomeClaim, D as DurablyLoadedRun, m as admitDestructiveOutcomeClaim, n as admitOutcomeClaim, q as attachDestructiveAuthorityPermit, r as claimIdForToken, s as consumeClaimToken, t as decideDestructiveDecision, u as isDestructiveAuthorityPermit, v as isDurablyLoadedRun, w as markTransitionClientCompromised, x as mintClaimToken, y as mintDurablyLoadedRun, z as transitionPhysicalSessionIsCompromised } from './internal-CNjWzMNe.js';
2
+ import '@dbsp/types';
@@ -0,0 +1,99 @@
1
+ import {
2
+ admitOutcomeClaim,
3
+ claimIdForToken,
4
+ consumeClaimToken,
5
+ isDurablyLoadedRun,
6
+ markTransitionClientCompromised,
7
+ mintClaimToken,
8
+ mintDurablyLoadedRun,
9
+ transitionPhysicalSessionIsCompromised
10
+ } from "./chunk-AQN7HBYD.js";
11
+
12
+ // src/transition/destructive-authority.ts
13
+ import { sameLedgerAddress } from "@dbsp/types";
14
+ var permits = /* @__PURE__ */ new WeakMap();
15
+ function declarationPermits(action, evidence) {
16
+ if (action.kind === "removal")
17
+ return evidence.declaration === "requires-removal" || evidence.declaration === "replacement-requested-by-plan" && evidence.replacementAddress !== void 0 && sameLedgerAddress(evidence.replacementAddress, action.address);
18
+ return evidence.declaration === "requires-lossy-change";
19
+ }
20
+ function refusalReasons(action, evidence) {
21
+ const reasons = [];
22
+ if (!declarationPermits(action, evidence))
23
+ reasons.push("declaration does not permit this destructive action");
24
+ if (evidence.ownership !== "managed-by-me")
25
+ reasons.push(`ownership is ${evidence.ownership}`);
26
+ if (evidence.catalogueIdentity !== "matches-recorded")
27
+ reasons.push(`catalogue identity is ${evidence.catalogueIdentity}`);
28
+ if (evidence.operatorAcceptance !== "destructive-plan-accepted")
29
+ reasons.push("operator acceptance is absent");
30
+ if (action.kind === "removal" && evidence.containment !== "all-contained-or-managed")
31
+ reasons.push(
32
+ evidence.containment === "reaches-unmanaged" && evidence.containmentUnmanaged !== void 0 ? `containment closure is reaches-unmanaged: ${evidence.containmentUnmanaged.kind} ${evidence.containmentUnmanaged.schema ?? "<database>"}.${evidence.containmentUnmanaged.name}` : evidence.containment === "undecidable" && evidence.containmentReason !== void 0 ? `containment closure is undecidable: ${evidence.containmentReason}` : `containment closure is ${evidence.containment ?? "undecidable"}`
33
+ );
34
+ if (evidence.ledgerLineage !== "matches-database")
35
+ reasons.push(`ledger lineage is ${evidence.ledgerLineage}`);
36
+ return reasons;
37
+ }
38
+ function decideDestructiveDecision(action, evidence) {
39
+ const reasons = refusalReasons(action, evidence);
40
+ if (reasons.length > 0)
41
+ return { kind: "destructive-decision-refused", action, reasons };
42
+ const permit = Object.freeze({});
43
+ permits.set(
44
+ permit,
45
+ action.kind === "removal" && action.closureDigest !== void 0 ? { closureDigest: action.closureDigest } : {}
46
+ );
47
+ return { kind: "destructive-decision-permitted", action, permit };
48
+ }
49
+ function isDestructiveAuthorityPermit(permit) {
50
+ return permits.has(permit);
51
+ }
52
+ function admitDestructiveOutcomeClaim(input) {
53
+ if (!isDestructiveAuthorityPermit(input.decision.permit)) {
54
+ return {
55
+ kind: "outcome-protocol-refused",
56
+ reason: "destructive authority permit was not minted by the interpreter"
57
+ };
58
+ }
59
+ if (!sameLedgerAddress(
60
+ input.decision.action.address,
61
+ input.admission.plan.address
62
+ )) {
63
+ return {
64
+ kind: "outcome-protocol-refused",
65
+ reason: "destructive authority address does not match the claim address"
66
+ };
67
+ }
68
+ const admitted = admitOutcomeClaim(input.admission);
69
+ if (admitted.kind !== "admitted-outcome-claim") return admitted;
70
+ return { ...admitted, destructivePermit: input.decision.permit };
71
+ }
72
+ function attachDestructiveAuthorityPermit(input) {
73
+ if (!isDestructiveAuthorityPermit(input.decision.permit))
74
+ return {
75
+ kind: "outcome-protocol-refused",
76
+ reason: "destructive authority permit was not minted by the interpreter"
77
+ };
78
+ if (!sameLedgerAddress(input.decision.action.address, input.claim.plan.address))
79
+ return {
80
+ kind: "outcome-protocol-refused",
81
+ reason: "destructive authority address does not match the claim address"
82
+ };
83
+ return { ...input.claim, destructivePermit: input.decision.permit };
84
+ }
85
+ export {
86
+ admitDestructiveOutcomeClaim,
87
+ admitOutcomeClaim,
88
+ attachDestructiveAuthorityPermit,
89
+ claimIdForToken,
90
+ consumeClaimToken,
91
+ decideDestructiveDecision,
92
+ isDestructiveAuthorityPermit,
93
+ isDurablyLoadedRun,
94
+ markTransitionClientCompromised,
95
+ mintClaimToken,
96
+ mintDurablyLoadedRun,
97
+ transitionPhysicalSessionIsCompromised
98
+ };
99
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/transition/destructive-authority.ts"],"sourcesContent":["import type {\n\tAdmittedOutcomeClaim,\n\tDestructiveAction,\n\tDestructiveAuthorityEvidence,\n\tDestructiveAuthorityPermit,\n\tDestructiveDecision,\n\tOutcomeClaimAdmission,\n\tOutcomeClaimAdmissionInput,\n\tOutcomeProtocolRefusal,\n} from '@dbsp/types';\nimport { sameLedgerAddress } from '@dbsp/types';\nimport { admitOutcomeClaim } from './outcome-protocol.js';\n\nconst permits = new WeakMap<object, { readonly closureDigest?: string }>();\n\nfunction declarationPermits(\n\taction: DestructiveAction,\n\tevidence: DestructiveAuthorityEvidence,\n): boolean {\n\tif (action.kind === 'removal')\n\t\treturn (\n\t\t\tevidence.declaration === 'requires-removal' ||\n\t\t\t(evidence.declaration === 'replacement-requested-by-plan' &&\n\t\t\t\tevidence.replacementAddress !== undefined &&\n\t\t\t\tsameLedgerAddress(evidence.replacementAddress, action.address))\n\t\t);\n\treturn evidence.declaration === 'requires-lossy-change';\n}\n\nfunction refusalReasons(\n\taction: DestructiveAction,\n\tevidence: DestructiveAuthorityEvidence,\n): readonly string[] {\n\tconst reasons: string[] = [];\n\tif (!declarationPermits(action, evidence))\n\t\treasons.push('declaration does not permit this destructive action');\n\tif (evidence.ownership !== 'managed-by-me')\n\t\treasons.push(`ownership is ${evidence.ownership}`);\n\tif (evidence.catalogueIdentity !== 'matches-recorded')\n\t\treasons.push(`catalogue identity is ${evidence.catalogueIdentity}`);\n\tif (evidence.operatorAcceptance !== 'destructive-plan-accepted')\n\t\treasons.push('operator acceptance is absent');\n\tif (\n\t\taction.kind === 'removal' &&\n\t\tevidence.containment !== 'all-contained-or-managed'\n\t)\n\t\treasons.push(\n\t\t\tevidence.containment === 'reaches-unmanaged' &&\n\t\t\t\tevidence.containmentUnmanaged !== undefined\n\t\t\t\t? `containment closure is reaches-unmanaged: ${evidence.containmentUnmanaged.kind} ${evidence.containmentUnmanaged.schema ?? '<database>'}.${evidence.containmentUnmanaged.name}`\n\t\t\t\t: evidence.containment === 'undecidable' &&\n\t\t\t\t\t\tevidence.containmentReason !== undefined\n\t\t\t\t\t? `containment closure is undecidable: ${evidence.containmentReason}`\n\t\t\t\t\t: `containment closure is ${evidence.containment ?? 'undecidable'}`,\n\t\t);\n\tif (evidence.ledgerLineage !== 'matches-database')\n\t\treasons.push(`ledger lineage is ${evidence.ledgerLineage}`);\n\treturn reasons;\n}\n\n/**\n * The total destructive classifier produces a decision for every evidence\n * tuple; only its permitting cells produce positive destructive authority.\n */\nexport function decideDestructiveDecision(\n\taction: DestructiveAction,\n\tevidence: DestructiveAuthorityEvidence,\n): DestructiveDecision {\n\tconst reasons = refusalReasons(action, evidence);\n\tif (reasons.length > 0)\n\t\treturn { kind: 'destructive-decision-refused', action, reasons };\n\tconst permit = Object.freeze({}) as DestructiveAuthorityPermit;\n\tpermits.set(\n\t\tpermit,\n\t\taction.kind === 'removal' && action.closureDigest !== undefined\n\t\t\t? { closureDigest: action.closureDigest }\n\t\t\t: {},\n\t);\n\treturn { kind: 'destructive-decision-permitted', action, permit };\n}\n\n/** Runtime defense for the erased opaque type at adapter boundaries. */\nexport function isDestructiveAuthorityPermit(\n\tpermit: DestructiveAuthorityPermit,\n): boolean {\n\treturn permits.has(permit);\n}\n\n/** The adapter compares this immutable admission set after taking its locks. */\nexport function closureDigestForDestructiveAuthorityPermit(\n\tpermit: DestructiveAuthorityPermit,\n): string | undefined {\n\treturn permits.get(permit)?.closureDigest;\n}\n\n/**\n * Couples the positive authority result to the existing single token producer.\n * The adapter's destructive emitter accepts this value, never raw evidence.\n */\nexport type AdmittedDestructiveOutcomeClaim = AdmittedOutcomeClaim & {\n\treadonly destructivePermit: DestructiveAuthorityPermit;\n};\n\nexport function admitDestructiveOutcomeClaim(input: {\n\treadonly decision: Extract<\n\t\tDestructiveDecision,\n\t\t{ readonly kind: 'destructive-decision-permitted' }\n\t>;\n\treadonly admission: OutcomeClaimAdmissionInput;\n}):\n\t| AdmittedDestructiveOutcomeClaim\n\t| Exclude<OutcomeClaimAdmission, AdmittedOutcomeClaim> {\n\tif (!isDestructiveAuthorityPermit(input.decision.permit)) {\n\t\treturn {\n\t\t\tkind: 'outcome-protocol-refused',\n\t\t\treason: 'destructive authority permit was not minted by the interpreter',\n\t\t};\n\t}\n\tif (\n\t\t!sameLedgerAddress(\n\t\t\tinput.decision.action.address,\n\t\t\tinput.admission.plan.address,\n\t\t)\n\t) {\n\t\treturn {\n\t\t\tkind: 'outcome-protocol-refused',\n\t\t\treason: 'destructive authority address does not match the claim address',\n\t\t};\n\t}\n\tconst admitted = admitOutcomeClaim(input.admission);\n\tif (admitted.kind !== 'admitted-outcome-claim') return admitted;\n\treturn { ...admitted, destructivePermit: input.decision.permit };\n}\n\n/** Attach a real interpreter permit to an adapter-opened, already minted claim. */\nexport function attachDestructiveAuthorityPermit(input: {\n\treadonly decision: Extract<\n\t\tDestructiveDecision,\n\t\t{ readonly kind: 'destructive-decision-permitted' }\n\t>;\n\treadonly claim: AdmittedOutcomeClaim;\n}): AdmittedDestructiveOutcomeClaim | OutcomeProtocolRefusal {\n\tif (!isDestructiveAuthorityPermit(input.decision.permit))\n\t\treturn {\n\t\t\tkind: 'outcome-protocol-refused',\n\t\t\treason: 'destructive authority permit was not minted by the interpreter',\n\t\t};\n\tif (\n\t\t!sameLedgerAddress(input.decision.action.address, input.claim.plan.address)\n\t)\n\t\treturn {\n\t\t\tkind: 'outcome-protocol-refused',\n\t\t\treason: 'destructive authority address does not match the claim address',\n\t\t};\n\treturn { ...input.claim, destructivePermit: input.decision.permit };\n}\n"],"mappings":";;;;;;;;;;;;AAUA,SAAS,yBAAyB;AAGlC,IAAM,UAAU,oBAAI,QAAqD;AAEzE,SAAS,mBACR,QACA,UACU;AACV,MAAI,OAAO,SAAS;AACnB,WACC,SAAS,gBAAgB,sBACxB,SAAS,gBAAgB,mCACzB,SAAS,uBAAuB,UAChC,kBAAkB,SAAS,oBAAoB,OAAO,OAAO;AAEhE,SAAO,SAAS,gBAAgB;AACjC;AAEA,SAAS,eACR,QACA,UACoB;AACpB,QAAM,UAAoB,CAAC;AAC3B,MAAI,CAAC,mBAAmB,QAAQ,QAAQ;AACvC,YAAQ,KAAK,qDAAqD;AACnE,MAAI,SAAS,cAAc;AAC1B,YAAQ,KAAK,gBAAgB,SAAS,SAAS,EAAE;AAClD,MAAI,SAAS,sBAAsB;AAClC,YAAQ,KAAK,yBAAyB,SAAS,iBAAiB,EAAE;AACnE,MAAI,SAAS,uBAAuB;AACnC,YAAQ,KAAK,+BAA+B;AAC7C,MACC,OAAO,SAAS,aAChB,SAAS,gBAAgB;AAEzB,YAAQ;AAAA,MACP,SAAS,gBAAgB,uBACxB,SAAS,yBAAyB,SAChC,6CAA6C,SAAS,qBAAqB,IAAI,IAAI,SAAS,qBAAqB,UAAU,YAAY,IAAI,SAAS,qBAAqB,IAAI,KAC7K,SAAS,gBAAgB,iBACzB,SAAS,sBAAsB,SAC9B,uCAAuC,SAAS,iBAAiB,KACjE,0BAA0B,SAAS,eAAe,aAAa;AAAA,IACpE;AACD,MAAI,SAAS,kBAAkB;AAC9B,YAAQ,KAAK,qBAAqB,SAAS,aAAa,EAAE;AAC3D,SAAO;AACR;AAMO,SAAS,0BACf,QACA,UACsB;AACtB,QAAM,UAAU,eAAe,QAAQ,QAAQ;AAC/C,MAAI,QAAQ,SAAS;AACpB,WAAO,EAAE,MAAM,gCAAgC,QAAQ,QAAQ;AAChE,QAAM,SAAS,OAAO,OAAO,CAAC,CAAC;AAC/B,UAAQ;AAAA,IACP;AAAA,IACA,OAAO,SAAS,aAAa,OAAO,kBAAkB,SACnD,EAAE,eAAe,OAAO,cAAc,IACtC,CAAC;AAAA,EACL;AACA,SAAO,EAAE,MAAM,kCAAkC,QAAQ,OAAO;AACjE;AAGO,SAAS,6BACf,QACU;AACV,SAAO,QAAQ,IAAI,MAAM;AAC1B;AAiBO,SAAS,6BAA6B,OAQW;AACvD,MAAI,CAAC,6BAA6B,MAAM,SAAS,MAAM,GAAG;AACzD,WAAO;AAAA,MACN,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AAAA,EACD;AACA,MACC,CAAC;AAAA,IACA,MAAM,SAAS,OAAO;AAAA,IACtB,MAAM,UAAU,KAAK;AAAA,EACtB,GACC;AACD,WAAO;AAAA,MACN,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AAAA,EACD;AACA,QAAM,WAAW,kBAAkB,MAAM,SAAS;AAClD,MAAI,SAAS,SAAS,yBAA0B,QAAO;AACvD,SAAO,EAAE,GAAG,UAAU,mBAAmB,MAAM,SAAS,OAAO;AAChE;AAGO,SAAS,iCAAiC,OAMY;AAC5D,MAAI,CAAC,6BAA6B,MAAM,SAAS,MAAM;AACtD,WAAO;AAAA,MACN,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AACD,MACC,CAAC,kBAAkB,MAAM,SAAS,OAAO,SAAS,MAAM,MAAM,KAAK,OAAO;AAE1E,WAAO;AAAA,MACN,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AACD,SAAO,EAAE,GAAG,MAAM,OAAO,mBAAmB,MAAM,SAAS,OAAO;AACnE;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbsp/core",
3
- "version": "3.3.0",
3
+ "version": "4.0.0",
4
4
  "description": "Intent-first semantic query planner for databases — declare WHAT to fetch, the planner decides HOW",
5
5
  "author": "Olivier Orabona <oorabona@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -35,6 +35,10 @@
35
35
  ".": {
36
36
  "types": "./dist/index.d.ts",
37
37
  "import": "./dist/index.js"
38
+ },
39
+ "./internal": {
40
+ "types": "./dist/internal.d.ts",
41
+ "import": "./dist/internal.js"
38
42
  }
39
43
  },
40
44
  "files": [
@@ -42,8 +46,8 @@
42
46
  ],
43
47
  "dependencies": {
44
48
  "valibot": "^1.4.2",
45
- "@dbsp/nql": "^1.10.2",
46
- "@dbsp/types": "^3.3.0"
49
+ "@dbsp/nql": "^1.10.4",
50
+ "@dbsp/types": "^4.0.0"
47
51
  },
48
52
  "devDependencies": {
49
53
  "@types/node": "^26.1.0",