@nicia-ai/typegraph 0.46.0 → 0.46.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.
Files changed (83) hide show
  1. package/dist/backend/index.cjs +5 -5
  2. package/dist/backend/index.js +2 -2
  3. package/dist/backend/postgres/pglite-store.cjs +8 -8
  4. package/dist/backend/postgres/pglite-store.d.cts +2 -2
  5. package/dist/backend/postgres/pglite-store.d.ts +2 -2
  6. package/dist/backend/postgres/pglite-store.js +7 -7
  7. package/dist/backend/sqlite/local-store.cjs +8 -8
  8. package/dist/backend/sqlite/local-store.d.cts +2 -2
  9. package/dist/backend/sqlite/local-store.d.ts +2 -2
  10. package/dist/backend/sqlite/local-store.js +7 -7
  11. package/dist/{chunk-CNV4TXJG.js → chunk-2Z2Z3ZD6.js} +3 -3
  12. package/dist/{chunk-CNV4TXJG.js.map → chunk-2Z2Z3ZD6.js.map} +1 -1
  13. package/dist/{chunk-N3257XE6.cjs → chunk-65E3XWGF.cjs} +21 -21
  14. package/dist/{chunk-N3257XE6.cjs.map → chunk-65E3XWGF.cjs.map} +1 -1
  15. package/dist/{chunk-ONU3HIED.cjs → chunk-CMWHLBVN.cjs} +29 -29
  16. package/dist/{chunk-ONU3HIED.cjs.map → chunk-CMWHLBVN.cjs.map} +1 -1
  17. package/dist/{chunk-XNLIZYRZ.cjs → chunk-DTVWX77L.cjs} +56 -56
  18. package/dist/{chunk-XNLIZYRZ.cjs.map → chunk-DTVWX77L.cjs.map} +1 -1
  19. package/dist/{chunk-JIVMTW7W.js → chunk-GF3KXUTW.js} +4 -4
  20. package/dist/{chunk-JIVMTW7W.js.map → chunk-GF3KXUTW.js.map} +1 -1
  21. package/dist/{chunk-QWX5YA3K.js → chunk-L65OU2U3.js} +11 -9
  22. package/dist/chunk-L65OU2U3.js.map +1 -0
  23. package/dist/{chunk-QLRESYPU.js → chunk-LGHCOKTT.js} +5 -5
  24. package/dist/{chunk-QLRESYPU.js.map → chunk-LGHCOKTT.js.map} +1 -1
  25. package/dist/{chunk-WEVQJ5LH.js → chunk-M3WP7RQZ.js} +2 -2
  26. package/dist/chunk-M3WP7RQZ.js.map +1 -0
  27. package/dist/{chunk-Q7Q4WSLJ.cjs → chunk-MCLYU6BN.cjs} +6 -2
  28. package/dist/chunk-MCLYU6BN.cjs.map +1 -0
  29. package/dist/{chunk-RJS7DECT.js → chunk-MZLPX2R7.js} +3 -3
  30. package/dist/{chunk-RJS7DECT.js.map → chunk-MZLPX2R7.js.map} +1 -1
  31. package/dist/{chunk-NQ6BRJBE.js → chunk-NLI2AVEF.js} +3 -3
  32. package/dist/{chunk-NQ6BRJBE.js.map → chunk-NLI2AVEF.js.map} +1 -1
  33. package/dist/{chunk-XMQSEJCF.cjs → chunk-PF6F5NLJ.cjs} +20 -20
  34. package/dist/{chunk-XMQSEJCF.cjs.map → chunk-PF6F5NLJ.cjs.map} +1 -1
  35. package/dist/{chunk-XDF2UPEQ.cjs → chunk-PNTCATDE.cjs} +431 -421
  36. package/dist/chunk-PNTCATDE.cjs.map +1 -0
  37. package/dist/{chunk-7GT72YHH.cjs → chunk-PT7RIRIZ.cjs} +66 -64
  38. package/dist/chunk-PT7RIRIZ.cjs.map +1 -0
  39. package/dist/{chunk-TTAITEPJ.cjs → chunk-Q3G6A4I3.cjs} +2 -2
  40. package/dist/chunk-Q3G6A4I3.cjs.map +1 -0
  41. package/dist/{chunk-7Z5OR7KO.js → chunk-S6PW7VV5.js} +19 -9
  42. package/dist/chunk-S6PW7VV5.js.map +1 -0
  43. package/dist/{chunk-XQSCL77R.cjs → chunk-VLT6PEWR.cjs} +4 -4
  44. package/dist/{chunk-XQSCL77R.cjs.map → chunk-VLT6PEWR.cjs.map} +1 -1
  45. package/dist/{chunk-OH5E5KIO.js → chunk-WQZLUGVR.js} +6 -6
  46. package/dist/{chunk-OH5E5KIO.js.map → chunk-WQZLUGVR.js.map} +1 -1
  47. package/dist/{chunk-DLNROMQ7.js → chunk-XL7SLCXS.js} +6 -3
  48. package/dist/chunk-XL7SLCXS.js.map +1 -0
  49. package/dist/{chunk-XNSI2FJO.cjs → chunk-YBQOHKHN.cjs} +8 -8
  50. package/dist/{chunk-XNSI2FJO.cjs.map → chunk-YBQOHKHN.cjs.map} +1 -1
  51. package/dist/core/index.cjs +5 -5
  52. package/dist/core/index.js +1 -1
  53. package/dist/graph-merge/index.cjs +149 -149
  54. package/dist/graph-merge/index.d.cts +1 -1
  55. package/dist/graph-merge/index.d.ts +1 -1
  56. package/dist/graph-merge/index.js +8 -8
  57. package/dist/index.cjs +79 -79
  58. package/dist/index.d.cts +2 -2
  59. package/dist/index.d.ts +2 -2
  60. package/dist/index.js +9 -9
  61. package/dist/interchange/index.cjs +34 -34
  62. package/dist/interchange/index.d.cts +1 -1
  63. package/dist/interchange/index.d.ts +1 -1
  64. package/dist/interchange/index.js +7 -7
  65. package/dist/profiler/index.d.cts +1 -1
  66. package/dist/profiler/index.d.ts +1 -1
  67. package/dist/provenance/index.cjs +16 -16
  68. package/dist/provenance/index.d.cts +1 -1
  69. package/dist/provenance/index.d.ts +1 -1
  70. package/dist/provenance/index.js +3 -3
  71. package/dist/schema/index.cjs +32 -32
  72. package/dist/schema/index.js +5 -5
  73. package/dist/{store-RwTJx8LX.d.cts → store-B0h6x7wo.d.cts} +12 -3
  74. package/dist/{store-DawaWWjJ.d.ts → store-ClQ-MZQS.d.ts} +12 -3
  75. package/package.json +3 -3
  76. package/dist/chunk-7GT72YHH.cjs.map +0 -1
  77. package/dist/chunk-7Z5OR7KO.js.map +0 -1
  78. package/dist/chunk-DLNROMQ7.js.map +0 -1
  79. package/dist/chunk-Q7Q4WSLJ.cjs.map +0 -1
  80. package/dist/chunk-QWX5YA3K.js.map +0 -1
  81. package/dist/chunk-TTAITEPJ.cjs.map +0 -1
  82. package/dist/chunk-WEVQJ5LH.js.map +0 -1
  83. package/dist/chunk-XDF2UPEQ.cjs.map +0 -1
@@ -3,7 +3,7 @@
3
3
  var chunkBSFJMMV3_cjs = require('./chunk-BSFJMMV3.cjs');
4
4
  var chunkNFCVHQ5P_cjs = require('./chunk-NFCVHQ5P.cjs');
5
5
  var chunkXBYVV3MP_cjs = require('./chunk-XBYVV3MP.cjs');
6
- var chunkQ7Q4WSLJ_cjs = require('./chunk-Q7Q4WSLJ.cjs');
6
+ var chunkMCLYU6BN_cjs = require('./chunk-MCLYU6BN.cjs');
7
7
  var chunkVCRRKBLN_cjs = require('./chunk-VCRRKBLN.cjs');
8
8
  var chunkRT5ZY4XA_cjs = require('./chunk-RT5ZY4XA.cjs');
9
9
  var chunkNI72YOJB_cjs = require('./chunk-NI72YOJB.cjs');
@@ -15,7 +15,7 @@ var nanoid = require('nanoid');
15
15
  var pinnedReadInstant;
16
16
  function withPinnedReadInstant(emit) {
17
17
  if (pinnedReadInstant !== void 0) return emit();
18
- pinnedReadInstant = chunkQ7Q4WSLJ_cjs.nowIso();
18
+ pinnedReadInstant = chunkMCLYU6BN_cjs.nowIso();
19
19
  try {
20
20
  return emit();
21
21
  } finally {
@@ -23,7 +23,7 @@ function withPinnedReadInstant(emit) {
23
23
  }
24
24
  }
25
25
  function currentReadInstant() {
26
- return chunkVCRRKBLN_cjs.sql`${pinnedReadInstant ?? chunkQ7Q4WSLJ_cjs.nowIso()}`;
26
+ return chunkVCRRKBLN_cjs.sql`${pinnedReadInstant ?? chunkMCLYU6BN_cjs.nowIso()}`;
27
27
  }
28
28
  var CURRENT_READ_INSTANT_PLACEHOLDER = "__typegraph_current_read_instant__";
29
29
  function currentReadInstantPlaceholder() {
@@ -34,7 +34,7 @@ function currentReadInstantFor(mode) {
34
34
  }
35
35
  function compileTemporalFilter(options) {
36
36
  const { mode, asOf, tableAlias, currentTimestamp, recordedAsOf } = options;
37
- const recorded = chunkQ7Q4WSLJ_cjs.optionalRecordedInstantParts(recordedAsOf, "recordedAsOf");
37
+ const recorded = chunkMCLYU6BN_cjs.optionalRecordedInstantParts(recordedAsOf, "recordedAsOf");
38
38
  const prefix = tableAlias ? chunkVCRRKBLN_cjs.sql.raw(`${tableAlias}.`) : chunkVCRRKBLN_cjs.sql.raw("");
39
39
  const deletedAt = chunkVCRRKBLN_cjs.sql`${prefix}deleted_at`;
40
40
  const validFrom = chunkVCRRKBLN_cjs.sql`${prefix}valid_from`;
@@ -927,13 +927,13 @@ function failInvalidClock(value, cause) {
927
927
  }
928
928
  function recordedClockRevision(value) {
929
929
  const revision = typeof value === "bigint" ? Number(value) : typeof value === "string" && /^\d+$/.test(value) ? Number(value) : value;
930
- if (typeof revision !== "number" || !Number.isSafeInteger(revision) || revision < RECORDED_MIN_REVISION || revision >= chunkQ7Q4WSLJ_cjs.RECORDED_MAX_REVISION) {
930
+ if (typeof revision !== "number" || !Number.isSafeInteger(revision) || revision < RECORDED_MIN_REVISION || revision >= chunkMCLYU6BN_cjs.RECORDED_MAX_REVISION) {
931
931
  return failInvalidClock(value);
932
932
  }
933
933
  return revision;
934
934
  }
935
935
  function recordedClockWallTime(value) {
936
- return chunkQ7Q4WSLJ_cjs.canonicalizeDatabaseTimestamp(value) ?? failInvalidClock(value);
936
+ return chunkMCLYU6BN_cjs.canonicalizeDatabaseTimestamp(value) ?? failInvalidClock(value);
937
937
  }
938
938
  function recordedClockParts(row) {
939
939
  const revision = recordedClockRevision(row.revision);
@@ -941,7 +941,7 @@ function recordedClockParts(row) {
941
941
  return { revision, recordedAt: recordedClockWallTime(row.recorded_at) };
942
942
  }
943
943
  function nextRecordedCommitParts(previous) {
944
- const wallTime = chunkQ7Q4WSLJ_cjs.nowIso();
944
+ const wallTime = chunkMCLYU6BN_cjs.nowIso();
945
945
  if (previous === void 0) {
946
946
  return { revision: 1, recordedAt: wallTime };
947
947
  }
@@ -959,7 +959,7 @@ function nonDecreasingWallTime(current, previous) {
959
959
  }
960
960
  async function readRecordedClock(target, schema, graphId) {
961
961
  const parts = await readRecordedClockParts(target, schema, graphId);
962
- return parts === void 0 ? void 0 : chunkQ7Q4WSLJ_cjs.createRecordedInstant(parts.revision, parts.recordedAt);
962
+ return parts === void 0 ? void 0 : chunkMCLYU6BN_cjs.createRecordedInstant(parts.revision, parts.recordedAt);
963
963
  }
964
964
  async function readRecordedClockParts(target, schema, graphId) {
965
965
  const rows = await target.execute(
@@ -1069,18 +1069,18 @@ async function lockRecordedClock(target, schema, graphId, ownsWriteLock) {
1069
1069
  }
1070
1070
  async function allocateRecordedCommit(target, schema, graphId, ownsWriteLock, previousRevision) {
1071
1071
  await lockRecordedClock(target, schema, graphId, ownsWriteLock);
1072
- const previous = previousRevision === void 0 ? await readRecordedClockParts(target, schema, graphId) : chunkQ7Q4WSLJ_cjs.parseRecordedInstant(previousRevision, "previous recorded revision");
1072
+ const previous = previousRevision === void 0 ? await readRecordedClockParts(target, schema, graphId) : chunkMCLYU6BN_cjs.parseRecordedInstant(previousRevision, "previous recorded revision");
1073
1073
  const { revision, recordedAt } = nextRecordedCommitParts(previous);
1074
- if (revision >= chunkQ7Q4WSLJ_cjs.RECORDED_MAX_REVISION) {
1074
+ if (revision >= chunkMCLYU6BN_cjs.RECORDED_MAX_REVISION) {
1075
1075
  throw new chunkNI72YOJB_cjs.ConfigurationError(
1076
- `Recorded commit clock reached the open revision sentinel ${chunkQ7Q4WSLJ_cjs.RECORDED_MAX_REVISION}`,
1076
+ `Recorded commit clock reached the open revision sentinel ${chunkMCLYU6BN_cjs.RECORDED_MAX_REVISION}`,
1077
1077
  { graphId, revision },
1078
1078
  {
1079
1079
  suggestion: "Start a new graph before exhausting the per-graph recorded revision space."
1080
1080
  }
1081
1081
  );
1082
1082
  }
1083
- const instant = chunkQ7Q4WSLJ_cjs.createRecordedInstant(revision, recordedAt);
1083
+ const instant = chunkMCLYU6BN_cjs.createRecordedInstant(revision, recordedAt);
1084
1084
  await writeRecordedClock(target, schema, graphId, { revision, recordedAt });
1085
1085
  if (previousRevision !== void 0) {
1086
1086
  await assertRecordedClockAdvanced(target, schema, graphId, revision);
@@ -1288,7 +1288,7 @@ function identitySqlCoordinate(coordinate, currentInstant) {
1288
1288
  return {
1289
1289
  validMode: coordinate?.valid.mode ?? "current",
1290
1290
  validAsOf: coordinate?.valid.asOf,
1291
- recorded: chunkQ7Q4WSLJ_cjs.optionalRecordedInstantParts(
1291
+ recorded: chunkMCLYU6BN_cjs.optionalRecordedInstantParts(
1292
1292
  coordinate?.recorded?.asOf,
1293
1293
  "recorded.asOf"
1294
1294
  ),
@@ -2272,7 +2272,7 @@ function recordedCommonCells() {
2272
2272
  updated_at: (row) => chunkVCRRKBLN_cjs.sql`${row.updated_at}`,
2273
2273
  deleted_at: (row) => chunkVCRRKBLN_cjs.sql`${sqlNull(row.deleted_at)}`,
2274
2274
  recorded_from: (_row, recordedRevision) => chunkVCRRKBLN_cjs.sql`${recordedRevision}`,
2275
- recorded_to: () => chunkVCRRKBLN_cjs.sql`${chunkQ7Q4WSLJ_cjs.RECORDED_MAX_REVISION}`,
2275
+ recorded_to: () => chunkVCRRKBLN_cjs.sql`${chunkMCLYU6BN_cjs.RECORDED_MAX_REVISION}`,
2276
2276
  op: (_row, _recordedCommit, operation) => chunkVCRRKBLN_cjs.sql`${operation}`,
2277
2277
  schema_version: () => chunkVCRRKBLN_cjs.sql`NULL`,
2278
2278
  tx_id: () => chunkVCRRKBLN_cjs.sql`NULL`,
@@ -2307,7 +2307,7 @@ var recordedIdentityAssertionCells = {
2307
2307
  ended_by_kind: (row) => chunkVCRRKBLN_cjs.sql`${row.ended_by_kind ?? chunkVCRRKBLN_cjs.sql.raw("NULL")}`,
2308
2308
  ended_by_id: (row) => chunkVCRRKBLN_cjs.sql`${row.ended_by_id ?? chunkVCRRKBLN_cjs.sql.raw("NULL")}`,
2309
2309
  recorded_from: (_row, recordedRevision) => chunkVCRRKBLN_cjs.sql`${recordedRevision}`,
2310
- recorded_to: () => chunkVCRRKBLN_cjs.sql`${chunkQ7Q4WSLJ_cjs.RECORDED_MAX_REVISION}`,
2310
+ recorded_to: () => chunkVCRRKBLN_cjs.sql`${chunkMCLYU6BN_cjs.RECORDED_MAX_REVISION}`,
2311
2311
  op: (_row, _recordedRevision, operation) => chunkVCRRKBLN_cjs.sql`${operation}`
2312
2312
  };
2313
2313
  function recordedValuesTuple(columns, cells, row, recordedRevision, operation) {
@@ -2400,7 +2400,7 @@ async function closeOpenReturning(target, table, graphId, ids, recordedRevision,
2400
2400
  SET recorded_to = ${recordedRevision}
2401
2401
  WHERE graph_id = ${graphId}
2402
2402
  ${kindFilter}
2403
- AND recorded_to = ${chunkQ7Q4WSLJ_cjs.RECORDED_MAX_REVISION}
2403
+ AND recorded_to = ${chunkMCLYU6BN_cjs.RECORDED_MAX_REVISION}
2404
2404
  AND id IN (${sqlValueList(ids)})
2405
2405
  RETURNING id, deleted_at
2406
2406
  `)
@@ -2535,7 +2535,7 @@ async function closeOpenByKind(target, table, graphId, kind, recordedRevision) {
2535
2535
  SET recorded_to = ${recordedRevision}
2536
2536
  WHERE graph_id = ${graphId}
2537
2537
  AND kind = ${kind}
2538
- AND recorded_to = ${chunkQ7Q4WSLJ_cjs.RECORDED_MAX_REVISION}
2538
+ AND recorded_to = ${chunkMCLYU6BN_cjs.RECORDED_MAX_REVISION}
2539
2539
  `
2540
2540
  );
2541
2541
  }
@@ -2547,7 +2547,7 @@ async function closeOpenEdgesByNodeKind(target, schema, graphId, nodeKind, recor
2547
2547
  SET recorded_to = ${recordedRevision}
2548
2548
  WHERE graph_id = ${graphId}
2549
2549
  AND (from_kind = ${nodeKind} OR to_kind = ${nodeKind})
2550
- AND recorded_to = ${chunkQ7Q4WSLJ_cjs.RECORDED_MAX_REVISION}
2550
+ AND recorded_to = ${chunkMCLYU6BN_cjs.RECORDED_MAX_REVISION}
2551
2551
  `
2552
2552
  );
2553
2553
  }
@@ -3286,5 +3286,5 @@ exports.uncapturedGraphWriteLock = uncapturedGraphWriteLock;
3286
3286
  exports.withPinnedReadInstant = withPinnedReadInstant;
3287
3287
  exports.withRecordedFlushObserver = withRecordedFlushObserver;
3288
3288
  exports.withRecordedIdentityMutationTarget = withRecordedIdentityMutationTarget;
3289
- //# sourceMappingURL=chunk-XMQSEJCF.cjs.map
3290
- //# sourceMappingURL=chunk-XMQSEJCF.cjs.map
3289
+ //# sourceMappingURL=chunk-PF6F5NLJ.cjs.map
3290
+ //# sourceMappingURL=chunk-PF6F5NLJ.cjs.map