@nicia-ai/typegraph 0.73.0 → 0.73.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.
- package/CHANGELOG.md +15 -0
- package/dist/backend/postgres/pglite-store.cjs +1 -1
- package/dist/backend/postgres/pglite-store.js +1 -1
- package/dist/backend/postgres/working-copy.cjs +85 -85
- package/dist/backend/postgres/working-copy.js +4 -4
- package/dist/backend/sqlite/local-store.cjs +1 -1
- package/dist/backend/sqlite/local-store.js +1 -1
- package/dist/{chunk-7QQ3ICAZ.cjs → chunk-BZ5EXHZX.cjs} +11 -11
- package/dist/{chunk-7QQ3ICAZ.cjs.map → chunk-BZ5EXHZX.cjs.map} +1 -1
- package/dist/{chunk-ZN24TFVZ.cjs → chunk-GLDGT3L3.cjs} +6 -3
- package/dist/chunk-GLDGT3L3.cjs.map +1 -0
- package/dist/{chunk-ORTKLAAU.js → chunk-LJG2TYCN.js} +3 -3
- package/dist/{chunk-ORTKLAAU.js.map → chunk-LJG2TYCN.js.map} +1 -1
- package/dist/{chunk-VKMLQTXP.cjs → chunk-MPCF5XBW.cjs} +159 -159
- package/dist/{chunk-VKMLQTXP.cjs.map → chunk-MPCF5XBW.cjs.map} +1 -1
- package/dist/{chunk-5RTWCMBC.js → chunk-OA4PF2QI.js} +6 -3
- package/dist/chunk-OA4PF2QI.js.map +1 -0
- package/dist/{chunk-XGYVKBI5.cjs → chunk-P52FOZSI.cjs} +8 -8
- package/dist/{chunk-XGYVKBI5.cjs.map → chunk-P52FOZSI.cjs.map} +1 -1
- package/dist/{chunk-KI7VMCOG.cjs → chunk-QJGQ3FN2.cjs} +16 -16
- package/dist/{chunk-KI7VMCOG.cjs.map → chunk-QJGQ3FN2.cjs.map} +1 -1
- package/dist/{chunk-MSUUUG5B.js → chunk-TI2O2U4G.js} +4 -4
- package/dist/{chunk-MSUUUG5B.js.map → chunk-TI2O2U4G.js.map} +1 -1
- package/dist/{chunk-FC7INRDS.js → chunk-WX7BQELV.js} +4 -4
- package/dist/{chunk-FC7INRDS.js.map → chunk-WX7BQELV.js.map} +1 -1
- package/dist/{chunk-NMLLXBGF.js → chunk-XIFBU27X.js} +3 -3
- package/dist/{chunk-NMLLXBGF.js.map → chunk-XIFBU27X.js.map} +1 -1
- package/dist/graph-merge/index.cjs +531 -531
- package/dist/graph-merge/index.js +6 -6
- package/dist/index.cjs +43 -43
- package/dist/index.js +2 -2
- package/dist/interchange/index.cjs +26 -26
- package/dist/interchange/index.js +3 -3
- package/dist/{local-store-impl-ALYCG7CX.js → local-store-impl-HPNBERU4.js} +4 -4
- package/dist/{local-store-impl-ALYCG7CX.js.map → local-store-impl-HPNBERU4.js.map} +1 -1
- package/dist/{local-store-impl-2HTGPM6A.cjs → local-store-impl-WIVQ5HDM.cjs} +5 -5
- package/dist/{local-store-impl-2HTGPM6A.cjs.map → local-store-impl-WIVQ5HDM.cjs.map} +1 -1
- package/dist/{pglite-store-impl-F2WHYIM7.cjs → pglite-store-impl-IXKIXLH6.cjs} +5 -5
- package/dist/{pglite-store-impl-F2WHYIM7.cjs.map → pglite-store-impl-IXKIXLH6.cjs.map} +1 -1
- package/dist/{pglite-store-impl-3UUTJLGP.js → pglite-store-impl-U3TW3Z4C.js} +4 -4
- package/dist/{pglite-store-impl-3UUTJLGP.js.map → pglite-store-impl-U3TW3Z4C.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-5RTWCMBC.js.map +0 -1
- package/dist/chunk-ZN24TFVZ.cjs.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkBZ5EXHZX_cjs = require('../../chunk-BZ5EXHZX.cjs');
|
|
4
4
|
var chunkUFUXXN4U_cjs = require('../../chunk-UFUXXN4U.cjs');
|
|
5
5
|
require('../../chunk-6F3HFVD2.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkMPCF5XBW_cjs = require('../../chunk-MPCF5XBW.cjs');
|
|
7
7
|
var chunkGZBI2EQM_cjs = require('../../chunk-GZBI2EQM.cjs');
|
|
8
8
|
require('../../chunk-B5C2V2LN.cjs');
|
|
9
9
|
require('../../chunk-NTLYNEMV.cjs');
|
|
10
|
-
require('../../chunk-
|
|
11
|
-
require('../../chunk-
|
|
10
|
+
require('../../chunk-QJGQ3FN2.cjs');
|
|
11
|
+
require('../../chunk-GLDGT3L3.cjs');
|
|
12
12
|
require('../../chunk-7USI4E2O.cjs');
|
|
13
13
|
require('../../chunk-BJCI4W4M.cjs');
|
|
14
14
|
require('../../chunk-THCONLOL.cjs');
|
|
@@ -72,31 +72,31 @@ function sameClonePolicy(source, target) {
|
|
|
72
72
|
}
|
|
73
73
|
function resolvePostgresCloneActions(source, target) {
|
|
74
74
|
if (source.length !== target.length) {
|
|
75
|
-
throw new
|
|
75
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("Working-copy contribution inventories differ.");
|
|
76
76
|
}
|
|
77
77
|
const actions = [];
|
|
78
78
|
for (const [index, contribution] of source.entries()) {
|
|
79
79
|
const destination = target[index];
|
|
80
80
|
if (destination === void 0) {
|
|
81
|
-
throw new
|
|
81
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("Working-copy inventory changed during clone.");
|
|
82
82
|
}
|
|
83
83
|
if (contribution.logicalName !== destination.logicalName || contribution.owner !== destination.owner) {
|
|
84
|
-
throw new
|
|
84
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("Working-copy inventory changed during clone.");
|
|
85
85
|
}
|
|
86
86
|
const policy = contribution.workingCopyClonePolicy;
|
|
87
87
|
const destinationPolicy = destination.workingCopyClonePolicy;
|
|
88
88
|
if (policy === void 0 || destinationPolicy === void 0) {
|
|
89
|
-
throw new
|
|
89
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
90
90
|
`Working-copy relation ${contribution.tableName} has no declared clone policy.`
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
if (!sameClonePolicy(policy, destinationPolicy)) {
|
|
94
|
-
throw new
|
|
94
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
95
95
|
`Working-copy relation ${contribution.tableName} changed clone policy during allocation.`
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
98
|
if (policy.kind === "unsupported") {
|
|
99
|
-
throw new
|
|
99
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
100
100
|
`Working-copy relation ${contribution.tableName} cannot be cloned: ${policy.reason}`
|
|
101
101
|
);
|
|
102
102
|
}
|
|
@@ -158,7 +158,7 @@ var UNSUPPORTED_EVIDENCE_STORE = {
|
|
|
158
158
|
dimensions: ["evidenceStore"]
|
|
159
159
|
};
|
|
160
160
|
function allocationRemovedError(cause) {
|
|
161
|
-
return new
|
|
161
|
+
return new chunkBZ5EXHZX_cjs.BranchError(
|
|
162
162
|
"Working-copy allocation changed owner or was destroyed during the operation.",
|
|
163
163
|
cause === void 0 ? void 0 : { cause }
|
|
164
164
|
);
|
|
@@ -215,7 +215,7 @@ function decodeCursor(cursor) {
|
|
|
215
215
|
const match = CURSOR_PATTERN.exec(cursor);
|
|
216
216
|
const sequence = match?.[1];
|
|
217
217
|
if (sequence === void 0 || BigInt(sequence) > MAX_SEQUENCE) {
|
|
218
|
-
throw new
|
|
218
|
+
throw new chunkBZ5EXHZX_cjs.DurableOperationRequestError(
|
|
219
219
|
"Durable operation scan cursor is not a cursor issued by this strategy."
|
|
220
220
|
);
|
|
221
221
|
}
|
|
@@ -227,7 +227,7 @@ function parseStoredJson(text, column) {
|
|
|
227
227
|
chunkOFN5YLUJ_cjs.assertJsonValue(parsed, column, "Durable operation evidence");
|
|
228
228
|
return parsed;
|
|
229
229
|
} catch (error) {
|
|
230
|
-
throw new
|
|
230
|
+
throw new chunkBZ5EXHZX_cjs.DurableOperationEvidenceError(
|
|
231
231
|
`Stored durable operation evidence ${column} is not valid JSON.`,
|
|
232
232
|
{ cause: error }
|
|
233
233
|
);
|
|
@@ -238,7 +238,7 @@ function asEngineRevision(revision) {
|
|
|
238
238
|
}
|
|
239
239
|
function toCoordinates(base, revision) {
|
|
240
240
|
return {
|
|
241
|
-
base:
|
|
241
|
+
base: chunkBZ5EXHZX_cjs.asBaseVersion(base),
|
|
242
242
|
...revision === null ? {} : { revision: asEngineRevision(revision) }
|
|
243
243
|
};
|
|
244
244
|
}
|
|
@@ -254,7 +254,7 @@ function toEvidence(row) {
|
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
256
|
async function coordinatesAt(store, target) {
|
|
257
|
-
const base = await
|
|
257
|
+
const base = await chunkBZ5EXHZX_cjs.computeBaseVersionAtTarget(store, target);
|
|
258
258
|
const lineage = chunkQV6LL3PK_cjs.resolveLineage(store);
|
|
259
259
|
return lineage === void 0 ? { base } : { base, revision: await lineage.revision(target) };
|
|
260
260
|
}
|
|
@@ -272,7 +272,7 @@ async function insertEvidence(session, evidenceRelation, request, before, after)
|
|
|
272
272
|
);
|
|
273
273
|
const row = inserted[0];
|
|
274
274
|
if (row === void 0) {
|
|
275
|
-
throw new
|
|
275
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
276
276
|
"Working-copy operation evidence insert returned no row."
|
|
277
277
|
);
|
|
278
278
|
}
|
|
@@ -280,7 +280,7 @@ async function insertEvidence(session, evidenceRelation, request, before, after)
|
|
|
280
280
|
}
|
|
281
281
|
function replayOrConflict(existing, request) {
|
|
282
282
|
if (existing.operation_digest !== request.operationDigest) {
|
|
283
|
-
throw new
|
|
283
|
+
throw new chunkBZ5EXHZX_cjs.DurableOperationConflictError(
|
|
284
284
|
`Idempotency key "${request.idempotencyKey}" was already committed with a different operation digest.`,
|
|
285
285
|
{ details: { idempotencyKey: request.idempotencyKey } }
|
|
286
286
|
);
|
|
@@ -333,7 +333,7 @@ async function operateInAllocation(allocation, operations, expectedOrigin, reque
|
|
|
333
333
|
);
|
|
334
334
|
const outcome = attempts.at(-1)?.outcome;
|
|
335
335
|
if (outcome === void 0) {
|
|
336
|
-
throw new
|
|
336
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
337
337
|
"Working-copy operation committed without producing an outcome."
|
|
338
338
|
);
|
|
339
339
|
}
|
|
@@ -444,14 +444,14 @@ function relationNamesForTables(tables) {
|
|
|
444
444
|
function ownedVectorTableNames(slot, strategy) {
|
|
445
445
|
const tableNames = strategy.ownedTables(slot).map((item) => item.tableName);
|
|
446
446
|
if (tableNames.length === 0 || new Set(tableNames).size !== tableNames.length) {
|
|
447
|
-
throw new
|
|
447
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
448
448
|
"PostgreSQL working-copy vector strategy returned an empty or duplicate owned-table inventory."
|
|
449
449
|
);
|
|
450
450
|
}
|
|
451
451
|
if (!tableNames.includes(
|
|
452
452
|
strategy.tableName(slot.graphId, slot.nodeKind, slot.fieldPath)
|
|
453
453
|
)) {
|
|
454
|
-
throw new
|
|
454
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
455
455
|
"PostgreSQL working-copy vector strategy omitted its primary slot table from the owned-table inventory."
|
|
456
456
|
);
|
|
457
457
|
}
|
|
@@ -491,31 +491,31 @@ function assertVectorManifestMatches(graph, physicalPrefix, persisted) {
|
|
|
491
491
|
...entry.ownedTableNames
|
|
492
492
|
].join("\0");
|
|
493
493
|
if (expected.map((entry) => toKey(entry)).join("\n") !== persisted.map((entry) => toKey(entry)).join("\n")) {
|
|
494
|
-
throw new
|
|
494
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
495
495
|
"Working-copy vector slots do not match the sealed allocation schema."
|
|
496
496
|
);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
function parseVectorManifest(value) {
|
|
500
500
|
if (!Array.isArray(value)) {
|
|
501
|
-
throw new
|
|
501
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("Working-copy vector slot manifest is invalid.");
|
|
502
502
|
}
|
|
503
503
|
const manifest = value.map((entry) => {
|
|
504
504
|
if (typeof entry !== "object" || entry === null) {
|
|
505
|
-
throw new
|
|
505
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("Working-copy vector slot manifest is invalid.");
|
|
506
506
|
}
|
|
507
507
|
const row = entry;
|
|
508
508
|
const metric = row["metric"];
|
|
509
509
|
const indexType = row["indexType"];
|
|
510
510
|
const indexParams = row["indexParams"];
|
|
511
511
|
if (indexParams !== void 0 && (typeof indexParams !== "object" || indexParams === null || Array.isArray(indexParams))) {
|
|
512
|
-
throw new
|
|
512
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("Working-copy vector slot manifest is invalid.");
|
|
513
513
|
}
|
|
514
514
|
const validIndexParams = indexParams === void 0 ? true : Object.values(indexParams).every(
|
|
515
515
|
(value2) => typeof value2 === "number" && Number.isSafeInteger(value2)
|
|
516
516
|
);
|
|
517
517
|
if (typeof row["graphId"] !== "string" || typeof row["nodeKind"] !== "string" || typeof row["fieldPath"] !== "string" || typeof row["dimensions"] !== "number" || !Number.isSafeInteger(row["dimensions"]) || !(metric === "cosine" || metric === "l2" || metric === "inner_product") || !(indexType === "hnsw" || indexType === "ivfflat" || indexType === "none") || !validIndexParams || typeof row["tableName"] !== "string" || row["ownedTableNames"] !== void 0 && (!Array.isArray(row["ownedTableNames"]) || row["ownedTableNames"].some((name) => typeof name !== "string"))) {
|
|
518
|
-
throw new
|
|
518
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("Working-copy vector slot manifest is invalid.");
|
|
519
519
|
}
|
|
520
520
|
return {
|
|
521
521
|
graphId: row["graphId"],
|
|
@@ -545,7 +545,7 @@ function assertVectorManifestOwned(slots, strategy) {
|
|
|
545
545
|
...slot.indexParams === void 0 ? {} : { indexParams: slot.indexParams }
|
|
546
546
|
};
|
|
547
547
|
if (strategy.tableName(slot.graphId, slot.nodeKind, slot.fieldPath) !== slot.tableName || ownedVectorTableNames(slotDescriptor, strategy).join("\0") !== slot.ownedTableNames.join("\0")) {
|
|
548
|
-
throw new
|
|
548
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
549
549
|
"Working-copy vector slot manifest does not match its allocation."
|
|
550
550
|
);
|
|
551
551
|
}
|
|
@@ -567,7 +567,7 @@ function allocationPhysicalPrefix(names) {
|
|
|
567
567
|
function assertAllocationPrefix(row, names) {
|
|
568
568
|
const expected = allocationPhysicalPrefix(names);
|
|
569
569
|
if (row.physical_prefix !== expected) {
|
|
570
|
-
throw new
|
|
570
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
571
571
|
"Working-copy allocation prefix does not match its ledger owner."
|
|
572
572
|
);
|
|
573
573
|
}
|
|
@@ -578,7 +578,7 @@ async function resolveAllocationIndexNames(declarations, names) {
|
|
|
578
578
|
const reserved = chunkCPKUXFVW_cjs.resolveSystemIndexNames(names);
|
|
579
579
|
const entries = await Promise.all(
|
|
580
580
|
declarations.filter((declaration) => declaration.entity !== "vector").map(async (declaration) => {
|
|
581
|
-
const identity =
|
|
581
|
+
const identity = chunkMPCF5XBW_cjs.relationalIndexIdentity(declaration);
|
|
582
582
|
const digest = await chunkZY4GXIVN_cjs.sha256Hex(identity, 12);
|
|
583
583
|
return [identity, `${prefix}gix_${digest}`];
|
|
584
584
|
})
|
|
@@ -587,7 +587,7 @@ async function resolveAllocationIndexNames(declarations, names) {
|
|
|
587
587
|
const physicalNames = /* @__PURE__ */ new Set();
|
|
588
588
|
for (const [identity, physicalName] of entries) {
|
|
589
589
|
if (result.has(identity) || physicalNames.has(physicalName) || reserved.has(physicalName) || physicalName.length > 63) {
|
|
590
|
-
throw
|
|
590
|
+
throw chunkMPCF5XBW_cjs.indexNameCollisionError(
|
|
591
591
|
"Working-copy graph index names collide in the allocated PostgreSQL namespace."
|
|
592
592
|
);
|
|
593
593
|
}
|
|
@@ -601,14 +601,14 @@ function allocationIndexNames(graph, names) {
|
|
|
601
601
|
}
|
|
602
602
|
function assertPostgresBackend(backend) {
|
|
603
603
|
if (backend.dialect !== "postgres") {
|
|
604
|
-
throw new
|
|
604
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
605
605
|
"PostgreSQL working copies require a PostgreSQL backend."
|
|
606
606
|
);
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
609
|
function assertBundledFulltextStrategy(backend, role) {
|
|
610
610
|
if (backend.fulltextStrategy !== chunkBB4B6AJK_cjs.tsvectorStrategy) {
|
|
611
|
-
throw new
|
|
611
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
612
612
|
`Table-backed PostgreSQL working-copy ${role} requires the bundled tsvector fulltext strategy; custom fulltext storage needs a native database fork.`
|
|
613
613
|
);
|
|
614
614
|
}
|
|
@@ -620,7 +620,7 @@ function assertSourceBindings(source, sourceTables) {
|
|
|
620
620
|
const sourceTable = sourceTables[key];
|
|
621
621
|
if (typeof sourceTable === "string") continue;
|
|
622
622
|
if (drizzleOrm.getTableName(sourceTable) !== expected) {
|
|
623
|
-
throw new
|
|
623
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
624
624
|
`Source table binding ${key} disagrees with sourceTables.`
|
|
625
625
|
);
|
|
626
626
|
}
|
|
@@ -637,15 +637,15 @@ function assertBackendBindings(backend, names, role) {
|
|
|
637
637
|
assertPostgresBackend(backend);
|
|
638
638
|
const bound = backend.tableNames;
|
|
639
639
|
if (bound === void 0)
|
|
640
|
-
throw new
|
|
640
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(`${role} backend has no table bindings.`);
|
|
641
641
|
const actualByKey = new Map(Object.entries(bound));
|
|
642
642
|
for (const [key, expected] of Object.entries(names)) {
|
|
643
643
|
const actual = actualByKey.get(key);
|
|
644
644
|
if (actual === void 0) {
|
|
645
|
-
throw new
|
|
645
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(`${role} backend is missing table binding ${key}.`);
|
|
646
646
|
}
|
|
647
647
|
if (actual !== expected) {
|
|
648
|
-
throw new
|
|
648
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
649
649
|
`${role} backend table binding ${key} is incorrect.`
|
|
650
650
|
);
|
|
651
651
|
}
|
|
@@ -655,7 +655,7 @@ function assertAllocationSchemaBound(backend, schema) {
|
|
|
655
655
|
if (schema === void 0 || chunkUFUXXN4U_cjs.allocationSchemaOfBackend(backend) === schema) {
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
658
|
-
throw new
|
|
658
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
659
659
|
`Working-copy connection is not bound to the allocation schema "${schema}"; build its tables with createPostgresTables from the names object connect receives, not a copy of it.`
|
|
660
660
|
);
|
|
661
661
|
}
|
|
@@ -665,7 +665,7 @@ function assertTargetBindings(backend, names, schema) {
|
|
|
665
665
|
assertAllocationSchemaBound(backend, schema);
|
|
666
666
|
}
|
|
667
667
|
function fixedSchemaError(operation) {
|
|
668
|
-
return new
|
|
668
|
+
return new chunkBZ5EXHZX_cjs.BranchError(
|
|
669
669
|
`Managed PostgreSQL table-backed working copies have a fixed schema; ${operation} is unsupported.`
|
|
670
670
|
);
|
|
671
671
|
}
|
|
@@ -689,8 +689,8 @@ function fixedSchemaBackend(backend, indexNames) {
|
|
|
689
689
|
schemaWriteTransaction: () => Promise.reject(fixedSchemaError("schemaWriteTransaction"))
|
|
690
690
|
}
|
|
691
691
|
});
|
|
692
|
-
|
|
693
|
-
|
|
692
|
+
chunkMPCF5XBW_cjs.markFixedSchemaWorkingCopyBackend(guarded);
|
|
693
|
+
chunkMPCF5XBW_cjs.bindRelationalIndexNames(guarded, indexNames);
|
|
694
694
|
return guarded;
|
|
695
695
|
}
|
|
696
696
|
function withoutBootstrapDdl(backend) {
|
|
@@ -698,7 +698,7 @@ function withoutBootstrapDdl(backend) {
|
|
|
698
698
|
}
|
|
699
699
|
function provisionedBackend(backend, indexNames) {
|
|
700
700
|
const provisioned = withoutBootstrapDdl(backend);
|
|
701
|
-
|
|
701
|
+
chunkMPCF5XBW_cjs.bindRelationalIndexNames(provisioned, indexNames);
|
|
702
702
|
return provisioned;
|
|
703
703
|
}
|
|
704
704
|
function cloneOptions(source) {
|
|
@@ -708,7 +708,7 @@ function cloneOptions(source) {
|
|
|
708
708
|
...options
|
|
709
709
|
} = source.workingCopyOptions;
|
|
710
710
|
if (recordedRead !== void 0) {
|
|
711
|
-
throw new
|
|
711
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
712
712
|
"Table-backed PostgreSQL working copies cannot copy an external recorded-read relation."
|
|
713
713
|
);
|
|
714
714
|
}
|
|
@@ -727,7 +727,7 @@ function reopenedOptions(graph, row, custom) {
|
|
|
727
727
|
"revisionTracking"
|
|
728
728
|
]) {
|
|
729
729
|
if (Object.hasOwn(options, forbidden)) {
|
|
730
|
-
throw new
|
|
730
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
731
731
|
`PostgreSQL working-copy reopenOptions cannot set ${forbidden}.`
|
|
732
732
|
);
|
|
733
733
|
}
|
|
@@ -744,7 +744,7 @@ async function columns(session, table) {
|
|
|
744
744
|
chunkXPSPDFKO_cjs.sql`SELECT attname AS name FROM pg_attribute WHERE attrelid = to_regclass(${chunkUFUXXN4U_cjs.quoteDdlIdentifier(table)}) AND attnum > 0 AND NOT attisdropped AND attgenerated = '' ORDER BY attnum`
|
|
745
745
|
);
|
|
746
746
|
if (result.length === 0)
|
|
747
|
-
throw new
|
|
747
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
748
748
|
`Source relation ${table} is missing or empty of columns.`
|
|
749
749
|
);
|
|
750
750
|
return result.map((column) => column.name);
|
|
@@ -754,7 +754,7 @@ async function applyCloneAction(transaction, action, graphId, targetSchema) {
|
|
|
754
754
|
const names = await columns(transaction, source.tableName);
|
|
755
755
|
const scopeColumn = policy.kind === "graphRows" ? policy.graphIdColumn : policy.documentColumn;
|
|
756
756
|
if (!names.includes(scopeColumn)) {
|
|
757
|
-
throw new
|
|
757
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
758
758
|
`Working-copy relation ${source.tableName} lacks declared clone scope column ${scopeColumn}.`
|
|
759
759
|
);
|
|
760
760
|
}
|
|
@@ -775,7 +775,7 @@ async function cloneRelations(transaction, sourceTables, targetTables, targetSch
|
|
|
775
775
|
const sourceNames = source.map((contribution) => contribution.tableName);
|
|
776
776
|
const sourceVectorNames = vectorSlots.flatMap((slot) => {
|
|
777
777
|
if (sourceVectorStrategy === void 0) {
|
|
778
|
-
throw new
|
|
778
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
779
779
|
"A vector working copy requires the source vector storage strategy."
|
|
780
780
|
);
|
|
781
781
|
}
|
|
@@ -795,14 +795,14 @@ async function cloneRelations(transaction, sourceTables, targetTables, targetSch
|
|
|
795
795
|
chunkXPSPDFKO_cjs.sql`SELECT version FROM ${sqlName(sourceMarker)} WHERE installation = 1`
|
|
796
796
|
);
|
|
797
797
|
if (marker[0]?.version !== chunkUFUXXN4U_cjs.CURRENT_BASE_SCHEMA_VERSION) {
|
|
798
|
-
throw new
|
|
798
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("Source base schema marker is not current.");
|
|
799
799
|
}
|
|
800
800
|
for (const action of actions) {
|
|
801
801
|
await applyCloneAction(transaction, action, graphId, targetSchema);
|
|
802
802
|
}
|
|
803
803
|
for (const slot of vectorSlots) {
|
|
804
804
|
if (sourceVectorStrategy === void 0 || targetVectorStrategy === void 0) {
|
|
805
|
-
throw new
|
|
805
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
806
806
|
"A vector working copy requires source and allocation vector strategies."
|
|
807
807
|
);
|
|
808
808
|
}
|
|
@@ -826,13 +826,13 @@ async function assertAllocationSession(session, allocationId, ownershipToken) {
|
|
|
826
826
|
chunkXPSPDFKO_cjs.sql`SELECT ownership_token FROM ${sqlName(LEDGER)} WHERE allocation_id = ${allocationId}`
|
|
827
827
|
);
|
|
828
828
|
if (observed[0]?.ownership_token !== ownershipToken) {
|
|
829
|
-
throw new
|
|
829
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
830
830
|
"Working-copy connection is not bound to the allocation database."
|
|
831
831
|
);
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
function orphanedEvidenceError(evidenceTable) {
|
|
835
|
-
return new
|
|
835
|
+
return new chunkBZ5EXHZX_cjs.BranchError(
|
|
836
836
|
`Working-copy operation evidence relation "${evidenceTable}" exists without a ledger row for its allocation; a manager from a release before durable operations destroyed the allocation and left it behind.`,
|
|
837
837
|
{
|
|
838
838
|
details: { evidenceTable },
|
|
@@ -841,8 +841,8 @@ function orphanedEvidenceError(evidenceTable) {
|
|
|
841
841
|
);
|
|
842
842
|
}
|
|
843
843
|
function assertSealedOrigin(row, expectedOrigin, refusal) {
|
|
844
|
-
if (row.state !== "sealed" || row.origin === void 0 || !
|
|
845
|
-
throw new
|
|
844
|
+
if (row.state !== "sealed" || row.origin === void 0 || !chunkBZ5EXHZX_cjs.durableOriginsEqual(row.origin, expectedOrigin)) {
|
|
845
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(refusal);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
848
|
async function lockSealedAllocation(session, allocationId, ownershipToken, expectedOrigin) {
|
|
@@ -861,7 +861,7 @@ async function lockSealedAllocation(session, allocationId, ownershipToken, expec
|
|
|
861
861
|
}
|
|
862
862
|
function assertLocatorVersion(descriptorVersion) {
|
|
863
863
|
if (descriptorVersion !== FORMAT_VERSION)
|
|
864
|
-
throw new
|
|
864
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
865
865
|
"Unsupported PostgreSQL working-copy locator version."
|
|
866
866
|
);
|
|
867
867
|
}
|
|
@@ -889,7 +889,7 @@ async function assertConnectionRole(controlRole, connected) {
|
|
|
889
889
|
async function observeAllocationSession(control) {
|
|
890
890
|
const facts = await observeSessionFacts(control);
|
|
891
891
|
if (facts.schema === "") {
|
|
892
|
-
throw new
|
|
892
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
893
893
|
"The control backend has no schema to create a working copy in: its search_path names no existing schema."
|
|
894
894
|
);
|
|
895
895
|
}
|
|
@@ -945,7 +945,7 @@ function bindsAllocationVectorStrategy(backend, allocationStrategy) {
|
|
|
945
945
|
function assertMakeBackendVectorStrategy(backend, allocationStrategy) {
|
|
946
946
|
const vectorSupportDisabled = backend.vectorStrategy === void 0;
|
|
947
947
|
if (!vectorSupportDisabled && !bindsAllocationVectorStrategy(backend, allocationStrategy)) {
|
|
948
|
-
throw new
|
|
948
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
949
949
|
"Working-copy connection must bind its allocation-scoped vector strategy or disable vector support; any other strategy could create tables the allocation does not own."
|
|
950
950
|
);
|
|
951
951
|
}
|
|
@@ -960,13 +960,13 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
960
960
|
const { control, connect, operations } = options;
|
|
961
961
|
assertPostgresBackend(control);
|
|
962
962
|
if (operations !== void 0 && typeof operations.apply !== "function") {
|
|
963
|
-
throw new
|
|
963
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
964
964
|
"PostgreSQL working-copy operations require an apply function."
|
|
965
965
|
);
|
|
966
966
|
}
|
|
967
967
|
const cleanupLockTimeoutMs = options.cleanupLockTimeoutMs ?? DEFAULT_CLEANUP_LOCK_TIMEOUT_MS;
|
|
968
968
|
if (!Number.isSafeInteger(cleanupLockTimeoutMs) || cleanupLockTimeoutMs < 1) {
|
|
969
|
-
throw new
|
|
969
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("cleanupLockTimeoutMs must be a positive integer.");
|
|
970
970
|
}
|
|
971
971
|
async function ensureLedger() {
|
|
972
972
|
await control.transaction(async (transaction) => {
|
|
@@ -1020,11 +1020,11 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1020
1020
|
);
|
|
1021
1021
|
const row = found[0];
|
|
1022
1022
|
if (row === void 0)
|
|
1023
|
-
throw new
|
|
1023
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1024
1024
|
`Working-copy allocation ${allocationId} does not exist.`
|
|
1025
1025
|
);
|
|
1026
1026
|
if (expectedOrigin === void 0 && row.state === "sealed") {
|
|
1027
|
-
throw new
|
|
1027
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1028
1028
|
"A sealed working copy requires its attested origin for destroy."
|
|
1029
1029
|
);
|
|
1030
1030
|
}
|
|
@@ -1043,7 +1043,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1043
1043
|
);
|
|
1044
1044
|
const schema = row.schema_name ?? row.session_schema;
|
|
1045
1045
|
if (schema === null) {
|
|
1046
|
-
throw new
|
|
1046
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1047
1047
|
`Working-copy allocation ${allocationId} records no schema and this session has none to resolve it in.`
|
|
1048
1048
|
);
|
|
1049
1049
|
}
|
|
@@ -1053,7 +1053,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1053
1053
|
await discoverAllocationRelations(transaction, physicalPrefix)
|
|
1054
1054
|
);
|
|
1055
1055
|
if (plan.action === "refuse") {
|
|
1056
|
-
throw new
|
|
1056
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(plan.message, {
|
|
1057
1057
|
details: {
|
|
1058
1058
|
allocationId,
|
|
1059
1059
|
schema,
|
|
@@ -1067,7 +1067,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1067
1067
|
transaction,
|
|
1068
1068
|
operationEvidenceRelation(schema, physicalPrefix)
|
|
1069
1069
|
)) {
|
|
1070
|
-
throw new
|
|
1070
|
+
throw new chunkBZ5EXHZX_cjs.DurableEvidenceUndeliveredError(
|
|
1071
1071
|
"Refusing to destroy the working copy: undelivered operation evidence remains.",
|
|
1072
1072
|
{
|
|
1073
1073
|
suggestion: "Read the evidence with scanDurableOperations and mark it delivered with markDurableOperationDelivered, then destroy the branch. Both require a manager built with `operations`."
|
|
@@ -1107,12 +1107,12 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1107
1107
|
);
|
|
1108
1108
|
const claim = claimed[0];
|
|
1109
1109
|
if (claimed.length !== 1 || claim === void 0) {
|
|
1110
|
-
throw new
|
|
1110
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1111
1111
|
"Working-copy allocation id or physical prefix is already owned."
|
|
1112
1112
|
);
|
|
1113
1113
|
}
|
|
1114
1114
|
if (claim.schema_name !== schema) {
|
|
1115
|
-
throw new
|
|
1115
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1116
1116
|
`Working-copy allocation could not be fixed to schema "${schema}"; the provisioning session resolved "${claim.schema_name ?? ""}".`
|
|
1117
1117
|
);
|
|
1118
1118
|
}
|
|
@@ -1121,7 +1121,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1121
1121
|
chunkXPSPDFKO_cjs.sql`SELECT c.relname::text AS name FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE n.nspname = ${schema} AND c.relname = ANY(${[.../* @__PURE__ */ new Set([...relationNamesForTables(targetTables), evidenceTable, ...indexNames.values(), ...vectorManifest.flatMap((slot) => slot.ownedTableNames)])]}::text[])`
|
|
1122
1122
|
);
|
|
1123
1123
|
if (existing.length > 0) {
|
|
1124
|
-
throw existing.some((relation) => relation.name === evidenceTable) ? orphanedEvidenceError(evidenceTable) : new
|
|
1124
|
+
throw existing.some((relation) => relation.name === evidenceTable) ? orphanedEvidenceError(evidenceTable) : new chunkBZ5EXHZX_cjs.BranchError(
|
|
1125
1125
|
"Working-copy allocation names already exist; recover their owner before retrying."
|
|
1126
1126
|
);
|
|
1127
1127
|
}
|
|
@@ -1164,7 +1164,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1164
1164
|
assertPostgresBackend(sourceBackend);
|
|
1165
1165
|
const inheritedOptions = cloneOptions(source);
|
|
1166
1166
|
if (chunkHAHNRASW_cjs.resolveGraphVectorSlots(source.graph).length > 0 && (sourceBackend.vectorStrategy === void 0 || !chunkGZBI2EQM_cjs.isPgvectorStrategy(sourceBackend.vectorStrategy))) {
|
|
1167
|
-
throw new
|
|
1167
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1168
1168
|
"Table-backed PostgreSQL working copies require the bundled pgvector strategy for graph-scoped vector tables."
|
|
1169
1169
|
);
|
|
1170
1170
|
}
|
|
@@ -1201,7 +1201,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1201
1201
|
assertTargetBindings(backend, names, schema);
|
|
1202
1202
|
await assertConnectionRole(controlRole, backend);
|
|
1203
1203
|
if (targetVectorStrategy !== void 0 && !bindsAllocationVectorStrategy(backend, targetVectorStrategy)) {
|
|
1204
|
-
throw new
|
|
1204
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1205
1205
|
"Working-copy connection does not expose PostgreSQL vector operations."
|
|
1206
1206
|
);
|
|
1207
1207
|
}
|
|
@@ -1222,13 +1222,13 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1222
1222
|
sourceVectorStrategy,
|
|
1223
1223
|
targetVectorStrategy,
|
|
1224
1224
|
async (lockedTransaction) => {
|
|
1225
|
-
const comparison = await
|
|
1225
|
+
const comparison = await chunkBZ5EXHZX_cjs.compareBaseVersionAtTarget(
|
|
1226
1226
|
source,
|
|
1227
1227
|
lockedTransaction,
|
|
1228
1228
|
base
|
|
1229
1229
|
);
|
|
1230
1230
|
if (!comparison.matches) {
|
|
1231
|
-
throw new
|
|
1231
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1232
1232
|
"Source advanced before its working-copy clone snapshot was taken.",
|
|
1233
1233
|
{ details: comparison }
|
|
1234
1234
|
);
|
|
@@ -1236,13 +1236,13 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
);
|
|
1238
1238
|
});
|
|
1239
|
-
const current = await
|
|
1239
|
+
const current = await chunkBZ5EXHZX_cjs.computeBaseVersion(source);
|
|
1240
1240
|
if (current !== base)
|
|
1241
|
-
throw new
|
|
1241
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1242
1242
|
"Source advanced while its working copy was allocated."
|
|
1243
1243
|
);
|
|
1244
1244
|
const ownedBackend = provisionedBackend(backend, indexNames);
|
|
1245
|
-
const [store] = await
|
|
1245
|
+
const [store] = await chunkMPCF5XBW_cjs.createStoreWithSchema(
|
|
1246
1246
|
source.graph,
|
|
1247
1247
|
ownedBackend,
|
|
1248
1248
|
inheritedOptions
|
|
@@ -1258,7 +1258,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1258
1258
|
)
|
|
1259
1259
|
);
|
|
1260
1260
|
if (failed !== void 0) {
|
|
1261
|
-
throw new
|
|
1261
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1262
1262
|
`Working-copy graph index "${failed.indexName}" was ${failed.status}; allocation was aborted.`,
|
|
1263
1263
|
{ cause: failed.error }
|
|
1264
1264
|
);
|
|
@@ -1277,7 +1277,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1277
1277
|
async function readSealedRow(allocationId) {
|
|
1278
1278
|
const row = await readAllocation(control, allocationId);
|
|
1279
1279
|
if (row?.state !== "sealed" || row.origin === void 0) {
|
|
1280
|
-
throw new
|
|
1280
|
+
throw new chunkBZ5EXHZX_cjs.BranchError("PostgreSQL working copy is absent or unsealed.");
|
|
1281
1281
|
}
|
|
1282
1282
|
return { ...row, origin: row.origin };
|
|
1283
1283
|
}
|
|
@@ -1320,12 +1320,12 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1320
1320
|
assertTargetBindings(backend, names, schema);
|
|
1321
1321
|
await assertConnectionRole(row.control_role, backend);
|
|
1322
1322
|
if (vectorStrategy !== void 0 && !bindsAllocationVectorStrategy(backend, vectorStrategy)) {
|
|
1323
|
-
throw new
|
|
1323
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1324
1324
|
"Working-copy connection did not bind its allocation-scoped vector strategy."
|
|
1325
1325
|
);
|
|
1326
1326
|
}
|
|
1327
1327
|
await assertAttachedSession(backend, row);
|
|
1328
|
-
const store =
|
|
1328
|
+
const store = chunkMPCF5XBW_cjs.createStore(
|
|
1329
1329
|
graph,
|
|
1330
1330
|
fixedSchemaBackend(provisionedBackend(backend, indexNames), indexNames),
|
|
1331
1331
|
reopenedOptions(graph, row, options.reopenOptions)
|
|
@@ -1344,11 +1344,11 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1344
1344
|
expectedOrigin,
|
|
1345
1345
|
"Working-copy operation origin does not match the sealed allocation."
|
|
1346
1346
|
);
|
|
1347
|
-
await
|
|
1347
|
+
await chunkBZ5EXHZX_cjs.assertGraphMatchesAttestedOrigin(operations2.graph, row.origin);
|
|
1348
1348
|
if (!row.operation_evidence) return members.withoutEvidence();
|
|
1349
1349
|
const sealed = await resolveSealedAllocation(operations2.graph, row);
|
|
1350
1350
|
if (sealed.schema === void 0) {
|
|
1351
|
-
throw new
|
|
1351
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1352
1352
|
`Working-copy allocation ${row.allocation_id} records operation evidence but no schema to resolve it in.`,
|
|
1353
1353
|
{ details: { allocationId: row.allocation_id } }
|
|
1354
1354
|
);
|
|
@@ -1391,7 +1391,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1391
1391
|
"allocating"
|
|
1392
1392
|
);
|
|
1393
1393
|
try {
|
|
1394
|
-
const [store] = await
|
|
1394
|
+
const [store] = await chunkMPCF5XBW_cjs.createStoreWithSchema(
|
|
1395
1395
|
source.graph,
|
|
1396
1396
|
backend,
|
|
1397
1397
|
cloneOptions(source)
|
|
@@ -1404,7 +1404,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1404
1404
|
},
|
|
1405
1405
|
seal: async (descriptor, origin) => {
|
|
1406
1406
|
if (descriptor.allocationId !== origin.allocationId) {
|
|
1407
|
-
throw new
|
|
1407
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1408
1408
|
"Working-copy seal origin allocation id does not match its locator."
|
|
1409
1409
|
);
|
|
1410
1410
|
}
|
|
@@ -1414,7 +1414,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1414
1414
|
chunkXPSPDFKO_cjs.sql`UPDATE ${sqlName(LEDGER)} SET state = 'sealed', origin = ${JSON.stringify(origin)}::jsonb WHERE allocation_id = ${descriptor.allocationId} AND state = 'allocating' RETURNING allocation_id`
|
|
1415
1415
|
);
|
|
1416
1416
|
if (updated.length !== 1) {
|
|
1417
|
-
throw new
|
|
1417
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1418
1418
|
"Working-copy seal found a missing or mismatched allocation."
|
|
1419
1419
|
);
|
|
1420
1420
|
}
|
|
@@ -1459,15 +1459,15 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1459
1459
|
created.backend,
|
|
1460
1460
|
() => dropAllocation(allocationId)
|
|
1461
1461
|
);
|
|
1462
|
-
|
|
1462
|
+
chunkMPCF5XBW_cjs.bindRelationalIndexNames(
|
|
1463
1463
|
disposableBackend,
|
|
1464
1464
|
await allocationIndexNames(
|
|
1465
1465
|
source.graph,
|
|
1466
1466
|
await allocationNames(allocationId)
|
|
1467
1467
|
)
|
|
1468
1468
|
);
|
|
1469
|
-
|
|
1470
|
-
return
|
|
1469
|
+
chunkMPCF5XBW_cjs.markFixedSchemaWorkingCopyBackend(disposableBackend);
|
|
1470
|
+
return chunkMPCF5XBW_cjs.createStore(source.graph, disposableBackend, cloneOptions(source));
|
|
1471
1471
|
}
|
|
1472
1472
|
};
|
|
1473
1473
|
const makeBackend = async () => {
|
|
@@ -1504,7 +1504,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1504
1504
|
withoutBootstrapDdl(connected),
|
|
1505
1505
|
() => dropAllocation(allocationId)
|
|
1506
1506
|
);
|
|
1507
|
-
|
|
1507
|
+
chunkMPCF5XBW_cjs.bindRelationalIndexNameResolver(
|
|
1508
1508
|
disposableBackend,
|
|
1509
1509
|
(declarations) => resolveAllocationIndexNames(declarations, names)
|
|
1510
1510
|
);
|
|
@@ -1521,7 +1521,7 @@ function createPostgresWorkingCopyManager(options) {
|
|
|
1521
1521
|
durable,
|
|
1522
1522
|
listUnsealedAllocations: async ({ after = "", limit = 100 } = {}) => {
|
|
1523
1523
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3) {
|
|
1524
|
-
throw new
|
|
1524
|
+
throw new chunkBZ5EXHZX_cjs.BranchError(
|
|
1525
1525
|
"Unsealed-allocation inventory limit must be 1 to 1000."
|
|
1526
1526
|
);
|
|
1527
1527
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { BranchError, DurableEvidenceUndeliveredError, compareBaseVersionAtTarget, computeBaseVersion, durableOriginsEqual, DurableOperationRequestError, asBaseVersion, DurableOperationEvidenceError, DurableOperationConflictError, computeBaseVersionAtTarget, assertGraphMatchesAttestedOrigin } from '../../chunk-
|
|
1
|
+
import { BranchError, DurableEvidenceUndeliveredError, compareBaseVersionAtTarget, computeBaseVersion, durableOriginsEqual, DurableOperationRequestError, asBaseVersion, DurableOperationEvidenceError, DurableOperationConflictError, computeBaseVersionAtTarget, assertGraphMatchesAttestedOrigin } from '../../chunk-WX7BQELV.js';
|
|
2
2
|
import { quoteDdlIdentifier, bindNamesToAllocationSchema, createPostgresTables, allocationSchemaPin, postgresContributions, generatePostgresBaseSchemaMarkerSQL, CURRENT_BASE_SCHEMA_VERSION, allocationSchemaOfBackend } from '../../chunk-35UUWWCW.js';
|
|
3
3
|
import '../../chunk-YVF4VVOJ.js';
|
|
4
|
-
import { createStoreWithSchema, bindRelationalIndexNames, markFixedSchemaWorkingCopyBackend, createStore, bindRelationalIndexNameResolver, relationalIndexIdentity, indexNameCollisionError } from '../../chunk-
|
|
4
|
+
import { createStoreWithSchema, bindRelationalIndexNames, markFixedSchemaWorkingCopyBackend, createStore, bindRelationalIndexNameResolver, relationalIndexIdentity, indexNameCollisionError } from '../../chunk-XIFBU27X.js';
|
|
5
5
|
import { createPgvectorStrategyForAllocation, allocationVectorTablePrefix, isPgvectorStrategy } from '../../chunk-VLDTIQW3.js';
|
|
6
6
|
import '../../chunk-TR2KKEE2.js';
|
|
7
7
|
import '../../chunk-WJDEEL36.js';
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-LJG2TYCN.js';
|
|
9
|
+
import '../../chunk-OA4PF2QI.js';
|
|
10
10
|
import '../../chunk-7RGPBLHZ.js';
|
|
11
11
|
import '../../chunk-QNDNUCHU.js';
|
|
12
12
|
import '../../chunk-G7TFDTGI.js';
|