@nicia-ai/typegraph 0.66.1 → 0.67.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 (65) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +15 -0
  3. package/dist/backend/drizzle/engine/index.cjs +6 -6
  4. package/dist/backend/drizzle/engine/index.js +1 -1
  5. package/dist/backend/postgres/index.cjs +15 -15
  6. package/dist/backend/postgres/index.js +1 -1
  7. package/dist/backend/postgres/pglite-store.cjs +1 -1
  8. package/dist/backend/postgres/pglite-store.js +1 -1
  9. package/dist/backend/postgres/pglite.cjs +3 -3
  10. package/dist/backend/postgres/pglite.js +2 -2
  11. package/dist/backend/sqlite/index.cjs +14 -14
  12. package/dist/backend/sqlite/index.js +1 -1
  13. package/dist/backend/sqlite/libsql.cjs +6 -6
  14. package/dist/backend/sqlite/libsql.js +1 -1
  15. package/dist/backend/sqlite/local-store.cjs +1 -1
  16. package/dist/backend/sqlite/local-store.js +1 -1
  17. package/dist/backend/sqlite/local.cjs +3 -3
  18. package/dist/backend/sqlite/local.js +2 -2
  19. package/dist/{chunk-TR7QTODF.js → chunk-55DGFZYC.js} +3 -3
  20. package/dist/{chunk-TR7QTODF.js.map → chunk-55DGFZYC.js.map} +1 -1
  21. package/dist/{chunk-WB55URNM.js → chunk-6CKSTY2D.js} +7 -3
  22. package/dist/chunk-6CKSTY2D.js.map +1 -0
  23. package/dist/{chunk-ZONDBN6H.js → chunk-6DY26DPE.js} +3 -3
  24. package/dist/{chunk-ZONDBN6H.js.map → chunk-6DY26DPE.js.map} +1 -1
  25. package/dist/{chunk-YHMXF7OZ.js → chunk-6J3VUPI6.js} +3 -3
  26. package/dist/{chunk-YHMXF7OZ.js.map → chunk-6J3VUPI6.js.map} +1 -1
  27. package/dist/{chunk-MN325MG4.cjs → chunk-7MQL7FEN.cjs} +11 -2
  28. package/dist/chunk-7MQL7FEN.cjs.map +1 -0
  29. package/dist/{chunk-WWSYGZED.cjs → chunk-E6XL3KMZ.cjs} +6 -6
  30. package/dist/{chunk-WWSYGZED.cjs.map → chunk-E6XL3KMZ.cjs.map} +1 -1
  31. package/dist/{chunk-SSDHR2C2.js → chunk-EFSXK3DW.js} +3 -3
  32. package/dist/{chunk-SSDHR2C2.js.map → chunk-EFSXK3DW.js.map} +1 -1
  33. package/dist/{chunk-2DJKHZQ4.js → chunk-EORFWD6O.js} +11 -2
  34. package/dist/chunk-EORFWD6O.js.map +1 -0
  35. package/dist/{chunk-Y4X6ODVY.cjs → chunk-FS2GVO2T.cjs} +56 -56
  36. package/dist/{chunk-Y4X6ODVY.cjs.map → chunk-FS2GVO2T.cjs.map} +1 -1
  37. package/dist/{chunk-K7YACILO.cjs → chunk-GXHEGNI6.cjs} +9 -9
  38. package/dist/{chunk-K7YACILO.cjs.map → chunk-GXHEGNI6.cjs.map} +1 -1
  39. package/dist/{chunk-BX42F7IJ.cjs → chunk-SSDLQPMY.cjs} +7 -2
  40. package/dist/chunk-SSDLQPMY.cjs.map +1 -0
  41. package/dist/{chunk-ANMCKLZQ.cjs → chunk-ZRIXU33S.cjs} +12 -12
  42. package/dist/{chunk-ANMCKLZQ.cjs.map → chunk-ZRIXU33S.cjs.map} +1 -1
  43. package/dist/graph-merge/index.cjs +500 -26
  44. package/dist/graph-merge/index.cjs.map +1 -1
  45. package/dist/graph-merge/index.d.cts +384 -2
  46. package/dist/graph-merge/index.d.ts +384 -2
  47. package/dist/graph-merge/index.js +485 -15
  48. package/dist/graph-merge/index.js.map +1 -1
  49. package/dist/index.cjs +63 -63
  50. package/dist/index.js +3 -3
  51. package/dist/{local-store-impl-ERPNYOCL.js → local-store-impl-CCMWTLGY.js} +6 -6
  52. package/dist/{local-store-impl-ERPNYOCL.js.map → local-store-impl-CCMWTLGY.js.map} +1 -1
  53. package/dist/{local-store-impl-OUINMCYI.cjs → local-store-impl-GI6S4J6B.cjs} +9 -9
  54. package/dist/{local-store-impl-OUINMCYI.cjs.map → local-store-impl-GI6S4J6B.cjs.map} +1 -1
  55. package/dist/{pglite-store-impl-Z3SOOP75.cjs → pglite-store-impl-HAPAJUIO.cjs} +9 -9
  56. package/dist/{pglite-store-impl-Z3SOOP75.cjs.map → pglite-store-impl-HAPAJUIO.cjs.map} +1 -1
  57. package/dist/{pglite-store-impl-DUJBQZS5.js → pglite-store-impl-HDLFOZWS.js} +6 -6
  58. package/dist/{pglite-store-impl-DUJBQZS5.js.map → pglite-store-impl-HDLFOZWS.js.map} +1 -1
  59. package/dist/schema/index.cjs +27 -27
  60. package/dist/schema/index.js +2 -2
  61. package/package.json +1 -1
  62. package/dist/chunk-2DJKHZQ4.js.map +0 -1
  63. package/dist/chunk-BX42F7IJ.cjs.map +0 -1
  64. package/dist/chunk-MN325MG4.cjs.map +0 -1
  65. package/dist/chunk-WB55URNM.js.map +0 -1
@@ -8,7 +8,7 @@ var chunkI7SBZJI2_cjs = require('./chunk-I7SBZJI2.cjs');
8
8
  var chunkG7OKJDMG_cjs = require('./chunk-G7OKJDMG.cjs');
9
9
  var chunkR255UE5U_cjs = require('./chunk-R255UE5U.cjs');
10
10
  var chunkMRUOOAIQ_cjs = require('./chunk-MRUOOAIQ.cjs');
11
- var chunkBX42F7IJ_cjs = require('./chunk-BX42F7IJ.cjs');
11
+ var chunkSSDLQPMY_cjs = require('./chunk-SSDLQPMY.cjs');
12
12
  var chunk6YKISECL_cjs = require('./chunk-6YKISECL.cjs');
13
13
  var chunkICOTLZBV_cjs = require('./chunk-ICOTLZBV.cjs');
14
14
  var chunkEBQX7MYL_cjs = require('./chunk-EBQX7MYL.cjs');
@@ -16717,7 +16717,7 @@ function declaredPathsForEntity(graph, entity) {
16717
16717
  );
16718
16718
  for (const schema of schemas) {
16719
16719
  for (const path of declaredPropertyPaths(
16720
- chunkBX42F7IJ_cjs.serializeSchemaProperties(schema)
16720
+ chunkSSDLQPMY_cjs.serializeSchemaProperties(schema)
16721
16721
  )) {
16722
16722
  paths.add(pathToPointer(path));
16723
16723
  }
@@ -16782,7 +16782,7 @@ async function readEntityPopulation(ctx, entity, paths, currentTimestamp) {
16782
16782
  function populationForKind(entity, kind, schema, populations) {
16783
16783
  const population = populations.get(kind);
16784
16784
  const count2 = population?.count ?? 0;
16785
- const declaredPaths = declaredPropertyPaths(chunkBX42F7IJ_cjs.serializeSchemaProperties(schema)).map((path) => pathToPointer(path)).toSorted();
16785
+ const declaredPaths = declaredPropertyPaths(chunkSSDLQPMY_cjs.serializeSchemaProperties(schema)).map((path) => pathToPointer(path)).toSorted();
16786
16786
  return {
16787
16787
  entity,
16788
16788
  kind,
@@ -17368,7 +17368,7 @@ async function prepareEvolutionPlan(params) {
17368
17368
  extension: callerExtension
17369
17369
  } = params;
17370
17370
  const extension = chunkBXHAPCQG_cjs.freezeDeep(structuredClone(callerExtension));
17371
- const mergedGraph = chunkBX42F7IJ_cjs.mergeGraphExtension(baselineGraph, extension);
17371
+ const mergedGraph = chunkSSDLQPMY_cjs.mergeGraphExtension(baselineGraph, extension);
17372
17372
  if (mergedGraph === baselineGraph) {
17373
17373
  const baseline = Object.freeze({
17374
17374
  version: baselineVersion,
@@ -17394,7 +17394,7 @@ async function prepareEvolutionPlan(params) {
17394
17394
  baselineGraph.id
17395
17395
  );
17396
17396
  }
17397
- const prepared = await chunkBX42F7IJ_cjs.prepareNewSchemaVersion(
17397
+ const prepared = await chunkSSDLQPMY_cjs.prepareNewSchemaVersion(
17398
17398
  mergedGraph,
17399
17399
  baselineVersion,
17400
17400
  storedSchema
@@ -22052,7 +22052,7 @@ function createHistoryStoreBackendProjection(backend) {
22052
22052
  // src/store/introspect.ts
22053
22053
  function introspectSchema(graph, context) {
22054
22054
  const extension = graph.extension;
22055
- const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkBX42F7IJ_cjs.extensionKindNames(extension);
22055
+ const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkSSDLQPMY_cjs.extensionKindNames(extension);
22056
22056
  const deprecated = graph.deprecatedKinds;
22057
22057
  const kinds = [];
22058
22058
  for (const [name, registration] of Object.entries(graph.nodes)) {
@@ -22063,7 +22063,7 @@ function introspectSchema(graph, context) {
22063
22063
  description: reg.type.description,
22064
22064
  annotations: reg.type.annotations,
22065
22065
  deprecated: deprecated.has(name),
22066
- properties: chunkBX42F7IJ_cjs.serializeSchemaProperties(reg.type.schema),
22066
+ properties: chunkSSDLQPMY_cjs.serializeSchemaProperties(reg.type.schema),
22067
22067
  unique: (reg.unique ?? []).map((constraint) => ({
22068
22068
  name: constraint.name,
22069
22069
  fields: [...constraint.fields],
@@ -22084,17 +22084,17 @@ function introspectSchema(graph, context) {
22084
22084
  to: chunk5ICDVLI3_cjs.projectTargetKinds(reg.to),
22085
22085
  cardinality: reg.cardinality ?? "many",
22086
22086
  endpointExistence: reg.endpointExistence ?? "notDeleted",
22087
- properties: chunkBX42F7IJ_cjs.serializeSchemaProperties(edgeType.schema),
22087
+ properties: chunkSSDLQPMY_cjs.serializeSchemaProperties(edgeType.schema),
22088
22088
  annotations: edgeType.annotations,
22089
22089
  deprecated: deprecated.has(name)
22090
22090
  });
22091
22091
  }
22092
- const runtimeOntologyKeys = chunkBX42F7IJ_cjs.buildGraphExtensionOntologyKeySet(extension);
22092
+ const runtimeOntologyKeys = chunkSSDLQPMY_cjs.buildGraphExtensionOntologyKeySet(extension);
22093
22093
  const ontology = graph.ontology.map((relation) => ({
22094
22094
  metaEdge: relation.metaEdge.name,
22095
22095
  from: chunkICOTLZBV_cjs.getTypeName(relation.from),
22096
22096
  to: chunkICOTLZBV_cjs.getTypeName(relation.to),
22097
- origin: runtimeOntologyKeys.has(chunkBX42F7IJ_cjs.compileTimeOntologyKey(relation)) ? "runtime" : "compile-time"
22097
+ origin: runtimeOntologyKeys.has(chunkSSDLQPMY_cjs.compileTimeOntologyKey(relation)) ? "runtime" : "compile-time"
22098
22098
  }));
22099
22099
  return {
22100
22100
  graphId: context.graphId,
@@ -22807,7 +22807,7 @@ async function computeIndexSignature(dialect, targetTableName, declaration) {
22807
22807
  const hashable = {
22808
22808
  dialect,
22809
22809
  targetTableName,
22810
- declaration: chunkBX42F7IJ_cjs.serializeIndexDeclaration(declaration)
22810
+ declaration: chunkSSDLQPMY_cjs.serializeIndexDeclaration(declaration)
22811
22811
  };
22812
22812
  const json = JSON.stringify(hashable, chunk5JOCIMQ3_cjs.sortedReplacer);
22813
22813
  return chunkZY4GXIVN_cjs.sha256Hex(json, 16);
@@ -22829,7 +22829,7 @@ async function materializeRemovals(context, options = {}) {
22829
22829
  await ensureFocusedStatusTable(backend, backend.ensureKindRemovalsTable);
22830
22830
  await reconcilePendingRemovals(context);
22831
22831
  const activeRow = await backend.getActiveSchema(graphId);
22832
- const activeSchema = activeRow === void 0 ? void 0 : chunkBX42F7IJ_cjs.parseSerializedSchema(activeRow.schema_doc);
22832
+ const activeSchema = activeRow === void 0 ? void 0 : chunkSSDLQPMY_cjs.parseSerializedSchema(activeRow.schema_doc);
22833
22833
  const reclaimedVectorFields = await reclaimRemovedVectorFieldTables(
22834
22834
  context,
22835
22835
  activeRow
@@ -22898,14 +22898,14 @@ async function reconcilePendingRemovals(context) {
22898
22898
  const reconciliations = [];
22899
22899
  const stopAtVersion = marker ?? 1;
22900
22900
  let currentRow = activeRow;
22901
- let currentSchema = chunkBX42F7IJ_cjs.parseSerializedSchema(activeRow.schema_doc);
22901
+ let currentSchema = chunkSSDLQPMY_cjs.parseSerializedSchema(activeRow.schema_doc);
22902
22902
  while (currentRow.version > stopAtVersion) {
22903
22903
  const priorRow = await backend.getSchemaVersion(
22904
22904
  graphId,
22905
22905
  currentRow.version - 1
22906
22906
  );
22907
22907
  if (priorRow === void 0) break;
22908
- const priorSchema = chunkBX42F7IJ_cjs.parseSerializedSchema(priorRow.schema_doc);
22908
+ const priorSchema = chunkSSDLQPMY_cjs.parseSerializedSchema(priorRow.schema_doc);
22909
22909
  for (const entity of ENTITY_KINDS) {
22910
22910
  const priorEntries = priorSchema[entity === "node" ? "nodes" : "edges"];
22911
22911
  const currentEntries = currentSchema[entity === "node" ? "nodes" : "edges"];
@@ -22970,7 +22970,7 @@ async function materializeOne2(row, ctx) {
22970
22970
  ctx.graphId,
22971
22971
  async (target) => {
22972
22972
  const activeRow = await target.getActiveSchema(ctx.graphId);
22973
- const activeSchema = activeRow === void 0 ? void 0 : chunkBX42F7IJ_cjs.parseSerializedSchema(activeRow.schema_doc);
22973
+ const activeSchema = activeRow === void 0 ? void 0 : chunkSSDLQPMY_cjs.parseSerializedSchema(activeRow.schema_doc);
22974
22974
  if (liveKindNamesFrom(activeSchema)[row.entity].has(row.kindName)) {
22975
22975
  return "skipped";
22976
22976
  }
@@ -23133,7 +23133,7 @@ async function resolveRemovedKindEmbeddingSlots(backend, row) {
23133
23133
  if (priorVersion < 1) return [];
23134
23134
  const priorRow = await backend.getSchemaVersion(row.graphId, priorVersion);
23135
23135
  if (priorRow === void 0) return [];
23136
- const priorSchema = chunkBX42F7IJ_cjs.parseSerializedSchema(priorRow.schema_doc);
23136
+ const priorSchema = chunkSSDLQPMY_cjs.parseSerializedSchema(priorRow.schema_doc);
23137
23137
  const slots = /* @__PURE__ */ new Map();
23138
23138
  for (const declaration of priorSchema.indexes ?? []) {
23139
23139
  if (declaration.entity === "vector" && declaration.kind === row.kindName) {
@@ -23170,14 +23170,14 @@ async function reclaimRemovedVectorFieldTables(context, activeRow) {
23170
23170
  let perBackend = reclaimCache.get(backend);
23171
23171
  const cached = perBackend?.get(cacheKey);
23172
23172
  if (cached !== void 0) return cached;
23173
- const activeSchema = chunkBX42F7IJ_cjs.parseSerializedSchema(activeRow.schema_doc);
23173
+ const activeSchema = chunkSSDLQPMY_cjs.parseSerializedSchema(activeRow.schema_doc);
23174
23174
  const activeVectorFields = vectorFieldKeysFrom(activeSchema);
23175
23175
  const survivingKinds = new Set(Object.keys(activeSchema.nodes));
23176
23176
  const historical = /* @__PURE__ */ new Map();
23177
23177
  for (let version = activeRow.version - 1; version >= 1; version -= 1) {
23178
23178
  const priorRow = await backend.getSchemaVersion(graphId, version);
23179
23179
  if (priorRow === void 0) continue;
23180
- const priorSchema = chunkBX42F7IJ_cjs.parseSerializedSchema(priorRow.schema_doc);
23180
+ const priorSchema = chunkSSDLQPMY_cjs.parseSerializedSchema(priorRow.schema_doc);
23181
23181
  for (const declaration of priorSchema.indexes ?? []) {
23182
23182
  if (declaration.entity !== "vector") continue;
23183
23183
  const key = vectorFieldKey(declaration.kind, declaration.fieldPath);
@@ -23215,7 +23215,7 @@ async function reclaimRemovedVectorFieldTables(context, activeRow) {
23215
23215
  async (target) => {
23216
23216
  const lockedActiveRow = await target.getActiveSchema(graphId);
23217
23217
  if (lockedActiveRow === void 0) return false;
23218
- const lockedActiveSchema = chunkBX42F7IJ_cjs.parseSerializedSchema(
23218
+ const lockedActiveSchema = chunkSSDLQPMY_cjs.parseSerializedSchema(
23219
23219
  lockedActiveRow.schema_doc
23220
23220
  );
23221
23221
  const lockedVectorFields = vectorFieldKeysFrom(lockedActiveSchema);
@@ -26456,7 +26456,7 @@ function syncStoreReplacementRef(ref, replacement) {
26456
26456
  ref.current = replacement;
26457
26457
  }
26458
26458
  async function commitEvolvedSchemaWhenRequiredKindsAreEmpty(backend, graph, currentVersion, classification, storedSchema) {
26459
- const result = await chunkBX42F7IJ_cjs.commitNewSchemaVersionIfKindsEmpty(
26459
+ const result = await chunkSSDLQPMY_cjs.commitNewSchemaVersionIfKindsEmpty(
26460
26460
  backend,
26461
26461
  graph,
26462
26462
  currentVersion,
@@ -26677,7 +26677,7 @@ var StoreImplementation = class _StoreImplementation {
26677
26677
  mapRecordedNodeRow: chunk76OB5RSH_cjs.createNodeRowMapper(rowMapperConfig),
26678
26678
  mapRecordedEdgeRow: chunk76OB5RSH_cjs.createEdgeRowMapper(rowMapperConfig)
26679
26679
  });
26680
- this.#registry = chunkBX42F7IJ_cjs.buildKindRegistry(graph);
26680
+ this.#registry = chunkSSDLQPMY_cjs.buildKindRegistry(graph);
26681
26681
  this.#hooks = options?.hooks ?? {};
26682
26682
  this.#defaultTraversalExpansion = options?.queryDefaults?.traversalExpansion ?? "inverse";
26683
26683
  this.#options = options;
@@ -26898,7 +26898,7 @@ var StoreImplementation = class _StoreImplementation {
26898
26898
  * fails leaves no half-published derived relation behind.
26899
26899
  */
26900
26900
  async identitySchemaPreflight(target, provisionDerivedRelations) {
26901
- await chunkBX42F7IJ_cjs.identitySchemaCommitPreflight(this.#identityContext(this.#backend), {
26901
+ await chunkSSDLQPMY_cjs.identitySchemaCommitPreflight(this.#identityContext(this.#backend), {
26902
26902
  enablement: false,
26903
26903
  provisionDerivedRelations
26904
26904
  })(target);
@@ -27461,7 +27461,7 @@ var StoreImplementation = class _StoreImplementation {
27461
27461
  * between "proceed" and "ask the user" *before* attempting a commit.
27462
27462
  */
27463
27463
  async schemaChanges() {
27464
- return chunkBX42F7IJ_cjs.getSchemaChanges(this.#backend, this.#graph);
27464
+ return chunkSSDLQPMY_cjs.getSchemaChanges(this.#backend, this.#graph);
27465
27465
  }
27466
27466
  /**
27467
27467
  * Whether committing this store's graph would require a schema migration —
@@ -27473,7 +27473,7 @@ var StoreImplementation = class _StoreImplementation {
27473
27473
  * through a user's request.
27474
27474
  */
27475
27475
  async requiresMigration() {
27476
- return chunkBX42F7IJ_cjs.requiresMigration(this.#backend, this.#graph);
27476
+ return chunkSSDLQPMY_cjs.requiresMigration(this.#backend, this.#graph);
27477
27477
  }
27478
27478
  /**
27479
27479
  * Node operations bound to this store instance.
@@ -29324,7 +29324,7 @@ var StoreImplementation = class _StoreImplementation {
29324
29324
  });
29325
29325
  }
29326
29326
  if (requirements.identityAffectedKinds.length > 0) {
29327
- const storage = await chunkBX42F7IJ_cjs.inspectAdoptedIdentityStorage(
29327
+ const storage = await chunkSSDLQPMY_cjs.inspectAdoptedIdentityStorage(
29328
29328
  adopted.backend,
29329
29329
  this.#sqlSchema(),
29330
29330
  {
@@ -29381,7 +29381,7 @@ var StoreImplementation = class _StoreImplementation {
29381
29381
  }
29382
29382
  );
29383
29383
  }
29384
- const storedSchema = chunkBX42F7IJ_cjs.parseSerializedSchema(activeRow.schema_doc);
29384
+ const storedSchema = chunkSSDLQPMY_cjs.parseSerializedSchema(activeRow.schema_doc);
29385
29385
  this.#evolutionPlanningSnapshot = {
29386
29386
  activeRow,
29387
29387
  storedSchema,
@@ -29441,7 +29441,7 @@ var StoreImplementation = class _StoreImplementation {
29441
29441
  return this;
29442
29442
  }
29443
29443
  return this.#cloneWithGraph(
29444
- this.#catchUpToStored(chunkBX42F7IJ_cjs.parseSerializedSchema(active.schema_doc)),
29444
+ this.#catchUpToStored(chunkSSDLQPMY_cjs.parseSerializedSchema(active.schema_doc)),
29445
29445
  options?.ref,
29446
29446
  schemaMetadataFromRow(active)
29447
29447
  );
@@ -29497,7 +29497,7 @@ var StoreImplementation = class _StoreImplementation {
29497
29497
  */
29498
29498
  async evolve(extension, options) {
29499
29499
  const { activeRow, storedSchema, baseline } = await this.#loadCaughtUp("evolve");
29500
- const merged = chunkBX42F7IJ_cjs.mergeGraphExtension(baseline, extension);
29500
+ const merged = chunkSSDLQPMY_cjs.mergeGraphExtension(baseline, extension);
29501
29501
  if (merged === baseline) {
29502
29502
  if (baseline === this.#graph) {
29503
29503
  syncStoreReplacementRef(options?.ref, this);
@@ -29526,7 +29526,7 @@ var StoreImplementation = class _StoreImplementation {
29526
29526
  );
29527
29527
  }
29528
29528
  const identityCandidate = merged.identity === void 0 ? void 0 : this.#cloneWithGraph(merged, void 0);
29529
- const identityProvisioning = identityCandidate === void 0 ? void 0 : await chunkBX42F7IJ_cjs.ensureIdentitySchemaStorage(
29529
+ const identityProvisioning = identityCandidate === void 0 ? void 0 : await chunkSSDLQPMY_cjs.ensureIdentitySchemaStorage(
29530
29530
  this.#baseBackend,
29531
29531
  this.#sqlSchema(),
29532
29532
  {
@@ -29535,7 +29535,7 @@ var StoreImplementation = class _StoreImplementation {
29535
29535
  // The evolved graph's registry — the one the candidate's own
29536
29536
  // preflight rebuilds through, so the predicate and the fill agree
29537
29537
  // on which assertions count.
29538
- registry: chunkBX42F7IJ_cjs.buildKindRegistry(merged)
29538
+ registry: chunkSSDLQPMY_cjs.buildKindRegistry(merged)
29539
29539
  }
29540
29540
  );
29541
29541
  const committed = identityCandidate === void 0 ? classification.requireEmpty.length > 0 ? await commitEvolvedSchemaWhenRequiredKindsAreEmpty(
@@ -29544,12 +29544,12 @@ var StoreImplementation = class _StoreImplementation {
29544
29544
  activeRow.version,
29545
29545
  classification,
29546
29546
  storedSchema
29547
- ) : await chunkBX42F7IJ_cjs.commitNewSchemaVersion(
29547
+ ) : await chunkSSDLQPMY_cjs.commitNewSchemaVersion(
29548
29548
  this.#backend,
29549
29549
  merged,
29550
29550
  activeRow.version,
29551
29551
  storedSchema
29552
- ) : await chunkBX42F7IJ_cjs.commitNewSchemaVersionWithPreflight(
29552
+ ) : await chunkSSDLQPMY_cjs.commitNewSchemaVersionWithPreflight(
29553
29553
  this.#backend,
29554
29554
  merged,
29555
29555
  activeRow.version,
@@ -29935,8 +29935,8 @@ var StoreImplementation = class _StoreImplementation {
29935
29935
  */
29936
29936
  async verifyConstraintFences() {
29937
29937
  const activeRow = await this.#baseBackend.getActiveSchema(this.graphId);
29938
- const graph = activeRow === void 0 ? this.#graph : this.#catchUpToStored(chunkBX42F7IJ_cjs.parseSerializedSchema(activeRow.schema_doc));
29939
- const registry = graph === this.#graph ? this.#registry : chunkBX42F7IJ_cjs.buildKindRegistry(graph);
29938
+ const graph = activeRow === void 0 ? this.#graph : this.#catchUpToStored(chunkSSDLQPMY_cjs.parseSerializedSchema(activeRow.schema_doc));
29939
+ const registry = graph === this.#graph ? this.#registry : chunkSSDLQPMY_cjs.buildKindRegistry(graph);
29940
29940
  return verifyConstraintFences({
29941
29941
  graph,
29942
29942
  registry,
@@ -30195,7 +30195,7 @@ var StoreImplementation = class _StoreImplementation {
30195
30195
  */
30196
30196
  async removeKinds(names, options) {
30197
30197
  const { activeRow, storedSchema, baseline } = await this.#loadCaughtUp("remove");
30198
- const plan = chunkBX42F7IJ_cjs.planRemovals(baseline, names);
30198
+ const plan = chunkSSDLQPMY_cjs.planRemovals(baseline, names);
30199
30199
  if (plan.removedNodeKinds.length === 0 && plan.removedEdgeKinds.length === 0) {
30200
30200
  if (baseline === this.#graph) {
30201
30201
  syncStoreReplacementRef(options?.ref, this);
@@ -30207,19 +30207,19 @@ var StoreImplementation = class _StoreImplementation {
30207
30207
  schemaMetadataFromRow(activeRow)
30208
30208
  );
30209
30209
  }
30210
- const compileTimeGraph = chunkBX42F7IJ_cjs.stripGraphExtension(this.#graph);
30211
- const merged = plan.document === void 0 ? compileTimeGraph : chunkBX42F7IJ_cjs.mergeGraphExtension(compileTimeGraph, plan.document);
30212
- const finalGraph = chunkBX42F7IJ_cjs.applyDeprecatedKinds(merged, baseline.deprecatedKinds);
30210
+ const compileTimeGraph = chunkSSDLQPMY_cjs.stripGraphExtension(this.#graph);
30211
+ const merged = plan.document === void 0 ? compileTimeGraph : chunkSSDLQPMY_cjs.mergeGraphExtension(compileTimeGraph, plan.document);
30212
+ const finalGraph = chunkSSDLQPMY_cjs.applyDeprecatedKinds(merged, baseline.deprecatedKinds);
30213
30213
  const identityCascade = await this.#identityRemovalPreflight(
30214
30214
  finalGraph,
30215
30215
  plan.removedNodeKinds
30216
30216
  );
30217
- const committedRow = identityCascade === void 0 ? await chunkBX42F7IJ_cjs.commitNewSchemaVersion(
30217
+ const committedRow = identityCascade === void 0 ? await chunkSSDLQPMY_cjs.commitNewSchemaVersion(
30218
30218
  this.#backend,
30219
30219
  finalGraph,
30220
30220
  activeRow.version,
30221
30221
  storedSchema
30222
- ) : await chunkBX42F7IJ_cjs.commitNewSchemaVersionWithPreflight(
30222
+ ) : await chunkSSDLQPMY_cjs.commitNewSchemaVersionWithPreflight(
30223
30223
  this.#backend,
30224
30224
  finalGraph,
30225
30225
  activeRow.version,
@@ -30278,7 +30278,7 @@ var StoreImplementation = class _StoreImplementation {
30278
30278
  async #identityRemovalPreflight(finalGraph, removedNodeKinds) {
30279
30279
  if (removedNodeKinds.length === 0) return void 0;
30280
30280
  const repairClosure = finalGraph.identity !== void 0;
30281
- if (!repairClosure && !await chunkBX42F7IJ_cjs.identityKindCascadeNeeded(
30281
+ if (!repairClosure && !await chunkSSDLQPMY_cjs.identityKindCascadeNeeded(
30282
30282
  this.#backend,
30283
30283
  this.#sqlSchema(),
30284
30284
  this.graphId,
@@ -30339,8 +30339,8 @@ var StoreImplementation = class _StoreImplementation {
30339
30339
  schemaMetadataFromRow(activeRow)
30340
30340
  );
30341
30341
  }
30342
- const merged = chunkBX42F7IJ_cjs.applyDeprecatedKinds(baseline, nextSet);
30343
- const result = await chunkBX42F7IJ_cjs.ensureSchema(this.#backend, merged, {
30342
+ const merged = chunkSSDLQPMY_cjs.applyDeprecatedKinds(baseline, nextSet);
30343
+ const result = await chunkSSDLQPMY_cjs.ensureSchema(this.#backend, merged, {
30344
30344
  preloaded: { activeRow, storedSchema },
30345
30345
  autoMigrate: true
30346
30346
  });
@@ -30348,9 +30348,9 @@ var StoreImplementation = class _StoreImplementation {
30348
30348
  return this.#cloneWithGraph(merged, options?.ref, metadata);
30349
30349
  }
30350
30350
  #catchUpToStored(storedSchema) {
30351
- const compileTimeGraph = chunkBX42F7IJ_cjs.stripGraphExtension(this.#graph);
30352
- const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph : chunkBX42F7IJ_cjs.mergeGraphExtension(compileTimeGraph, storedSchema.extension);
30353
- return chunkBX42F7IJ_cjs.applyDeprecatedKinds(
30351
+ const compileTimeGraph = chunkSSDLQPMY_cjs.stripGraphExtension(this.#graph);
30352
+ const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph : chunkSSDLQPMY_cjs.mergeGraphExtension(compileTimeGraph, storedSchema.extension);
30353
+ return chunkSSDLQPMY_cjs.applyDeprecatedKinds(
30354
30354
  withGraphExtension,
30355
30355
  storedSchema.deprecatedKinds
30356
30356
  );
@@ -30368,7 +30368,7 @@ var StoreImplementation = class _StoreImplementation {
30368
30368
  * serializes the actual commit.
30369
30369
  */
30370
30370
  async #loadCaughtUp(verb) {
30371
- const activeRow = await chunkBX42F7IJ_cjs.loadActiveSchemaWithBootstrap(
30371
+ const activeRow = await chunkSSDLQPMY_cjs.loadActiveSchemaWithBootstrap(
30372
30372
  this.#backend,
30373
30373
  this.graphId
30374
30374
  );
@@ -30379,7 +30379,7 @@ var StoreImplementation = class _StoreImplementation {
30379
30379
  { code }
30380
30380
  );
30381
30381
  }
30382
- const storedSchema = chunkBX42F7IJ_cjs.parseSerializedSchema(activeRow.schema_doc);
30382
+ const storedSchema = chunkSSDLQPMY_cjs.parseSerializedSchema(activeRow.schema_doc);
30383
30383
  const baseline = this.#catchUpToStored(storedSchema);
30384
30384
  return { activeRow, storedSchema, baseline };
30385
30385
  }
@@ -30981,7 +30981,7 @@ var IDENTITY_GATE_CODES = {
30981
30981
  };
30982
30982
  async function ensureSchemaWithIdentityPrecedence(backend, graph, options, gate) {
30983
30983
  try {
30984
- return await chunkBX42F7IJ_cjs.ensureSchema(backend, graph, options);
30984
+ return await chunkSSDLQPMY_cjs.ensureSchema(backend, graph, options);
30985
30985
  } catch (error) {
30986
30986
  if (gate === void 0 || !isIdentityOnlyBreakingChange(error)) throw error;
30987
30987
  throw identityMigrationRequiredError(graph.id, gate, {
@@ -31029,20 +31029,20 @@ async function prepareStoreWithSchema(graph, backend, options) {
31029
31029
  graph: merged,
31030
31030
  activeRow,
31031
31031
  storedSchema
31032
- } = await chunkBX42F7IJ_cjs.loadAndMergeGraphExtensionDocument(backend, graph);
31032
+ } = await chunkSSDLQPMY_cjs.loadAndMergeGraphExtensionDocument(backend, graph);
31033
31033
  const identityProfileChanged = activeRow !== void 0 && storedSchema?.identity?.sameIdAcrossKinds !== merged.identity?.sameIdAcrossKinds;
31034
31034
  const identityInitialization = activeRow === void 0 && merged.identity !== void 0;
31035
31035
  const identityEnablement = identityInitialization || identityProfileChanged && storedSchema?.identity === void 0 && merged.identity !== void 0;
31036
31036
  const identitySemanticsChanged = identityProfileChanged || activeRow !== void 0 && storedSchema !== void 0 && merged.identity !== void 0 && identityOntologyChanged(
31037
31037
  storedSchema,
31038
- chunkBX42F7IJ_cjs.serializeSchema(merged, activeRow.version + 1)
31038
+ chunkSSDLQPMY_cjs.serializeSchema(merged, activeRow.version + 1)
31039
31039
  );
31040
31040
  const identityGate = identitySemanticsChanged ? identityEnablement ? "enablement" : identityProfileChanged ? "profile" : "ontology" : void 0;
31041
31041
  const identityProfile = merged.identity;
31042
31042
  if (identityProfile !== void 0) {
31043
31043
  const resolvedIdentitySchema = options?.schema === void 0 ? chunk6JRVV2SS_cjs.createSqlSchema(backend.tableNames) : chunk6JRVV2SS_cjs.requireSqlSchema(options.schema, "store schema");
31044
- const identityRegistry = chunkBX42F7IJ_cjs.buildKindRegistry(merged);
31045
- await chunkBX42F7IJ_cjs.ensureIdentitySchemaStorage(backend, resolvedIdentitySchema, {
31044
+ const identityRegistry = chunkSSDLQPMY_cjs.buildKindRegistry(merged);
31045
+ await chunkSSDLQPMY_cjs.ensureIdentitySchemaStorage(backend, resolvedIdentitySchema, {
31046
31046
  graphId: merged.id,
31047
31047
  enablement: identityEnablement,
31048
31048
  registry: identityRegistry,
@@ -31172,7 +31172,7 @@ async function prepareVerifiedStore(graph, backend, options) {
31172
31172
  graph: merged,
31173
31173
  activeRow,
31174
31174
  result
31175
- } = await chunkBX42F7IJ_cjs.loadAndVerifyGraph(backend, graph);
31175
+ } = await chunkSSDLQPMY_cjs.loadAndVerifyGraph(backend, graph);
31176
31176
  await assertHistorySchemaOnOpen(backend, merged, options);
31177
31177
  return {
31178
31178
  graph: merged,
@@ -31237,5 +31237,5 @@ exports.min = min;
31237
31237
  exports.offsetFragment = offsetFragment;
31238
31238
  exports.orderByFragment = orderByFragment;
31239
31239
  exports.sum = sum;
31240
- //# sourceMappingURL=chunk-Y4X6ODVY.cjs.map
31241
- //# sourceMappingURL=chunk-Y4X6ODVY.cjs.map
31240
+ //# sourceMappingURL=chunk-FS2GVO2T.cjs.map
31241
+ //# sourceMappingURL=chunk-FS2GVO2T.cjs.map