@nicia-ai/typegraph 0.27.0 → 0.28.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 (77) hide show
  1. package/dist/backend/postgres/index.cjs +100 -58
  2. package/dist/backend/postgres/index.cjs.map +1 -1
  3. package/dist/backend/postgres/index.d.cts +4 -4
  4. package/dist/backend/postgres/index.d.ts +4 -4
  5. package/dist/backend/postgres/index.js +48 -6
  6. package/dist/backend/postgres/index.js.map +1 -1
  7. package/dist/backend/sqlite/index.cjs +14 -14
  8. package/dist/backend/sqlite/index.d.cts +5 -5
  9. package/dist/backend/sqlite/index.d.ts +5 -5
  10. package/dist/backend/sqlite/index.js +4 -4
  11. package/dist/backend/sqlite/libsql.cjs +7 -7
  12. package/dist/backend/sqlite/libsql.d.cts +2 -2
  13. package/dist/backend/sqlite/libsql.d.ts +2 -2
  14. package/dist/backend/sqlite/libsql.js +4 -4
  15. package/dist/backend/sqlite/local.cjs +8 -8
  16. package/dist/backend/sqlite/local.d.cts +2 -2
  17. package/dist/backend/sqlite/local.d.ts +2 -2
  18. package/dist/backend/sqlite/local.js +4 -4
  19. package/dist/{chunk-X53YKGHR.js → chunk-5MTOKWDA.js} +3 -3
  20. package/dist/{chunk-X53YKGHR.js.map → chunk-5MTOKWDA.js.map} +1 -1
  21. package/dist/chunk-FFHW2JEK.cjs +55 -0
  22. package/dist/chunk-FFHW2JEK.cjs.map +1 -0
  23. package/dist/{chunk-DN4RUDF3.cjs → chunk-LYRUNG6E.cjs} +2 -2
  24. package/dist/chunk-LYRUNG6E.cjs.map +1 -0
  25. package/dist/{chunk-RVT2N4RF.cjs → chunk-NMOE2ZEU.cjs} +46 -46
  26. package/dist/{chunk-RVT2N4RF.cjs.map → chunk-NMOE2ZEU.cjs.map} +1 -1
  27. package/dist/{chunk-TVUARC7S.cjs → chunk-NYQFPGYP.cjs} +52 -24
  28. package/dist/chunk-NYQFPGYP.cjs.map +1 -0
  29. package/dist/chunk-O57GYGYK.js +51 -0
  30. package/dist/chunk-O57GYGYK.js.map +1 -0
  31. package/dist/{chunk-ENXJLDRK.js → chunk-PCHTTG42.js} +2 -2
  32. package/dist/chunk-PCHTTG42.js.map +1 -0
  33. package/dist/{chunk-DDVA4QBA.js → chunk-PGU2XKMA.js} +4 -4
  34. package/dist/{chunk-DDVA4QBA.js.map → chunk-PGU2XKMA.js.map} +1 -1
  35. package/dist/{chunk-RF5EUQWS.js → chunk-TKM2WDT4.js} +51 -23
  36. package/dist/chunk-TKM2WDT4.js.map +1 -0
  37. package/dist/{chunk-ZGEMI7MJ.cjs → chunk-WZH2MKHW.cjs} +15 -15
  38. package/dist/{chunk-ZGEMI7MJ.cjs.map → chunk-WZH2MKHW.cjs.map} +1 -1
  39. package/dist/{ddl-9kw8UADK.d.ts → ddl-0Ooc2dpL.d.ts} +2 -2
  40. package/dist/{ddl-Cw82BPM4.d.cts → ddl-Dza3kDrI.d.cts} +2 -2
  41. package/dist/index.cjs +81 -69
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.cts +7 -7
  44. package/dist/index.d.ts +7 -7
  45. package/dist/index.js +18 -6
  46. package/dist/index.js.map +1 -1
  47. package/dist/indexes/index.d.cts +4 -4
  48. package/dist/indexes/index.d.ts +4 -4
  49. package/dist/interchange/index.d.cts +3 -3
  50. package/dist/interchange/index.d.ts +3 -3
  51. package/dist/{manager-CWa9cgwb.d.cts → manager-c1MGaVVR.d.cts} +1 -1
  52. package/dist/{manager-Cfcb2sJL.d.ts → manager-ehLTTNq0.d.ts} +1 -1
  53. package/dist/profiler/index.d.cts +5 -5
  54. package/dist/profiler/index.d.ts +5 -5
  55. package/dist/schema/index.cjs +26 -26
  56. package/dist/schema/index.d.cts +4 -4
  57. package/dist/schema/index.d.ts +4 -4
  58. package/dist/schema/index.js +3 -3
  59. package/dist/{sqlite-GKvcDPVn.d.ts → sqlite-BxZUPbyD.d.ts} +1 -1
  60. package/dist/{sqlite-BvSEbybu.d.cts → sqlite-mvpXjEeB.d.cts} +1 -1
  61. package/dist/{store-Ojf0NOKk.d.cts → store-D7YEMg2v.d.cts} +26 -2
  62. package/dist/{store-C57kdvAa.d.ts → store-Ufc1Eoey.d.ts} +26 -2
  63. package/dist/{types-Cars4JZ1.d.ts → types-B-sJJ4GQ.d.ts} +1 -1
  64. package/dist/{types-DZPBXZOK.d.cts → types-CMQymcwk.d.cts} +11 -0
  65. package/dist/{types-Dzkr0Eqi.d.ts → types-CQ7xXJMP.d.ts} +11 -0
  66. package/dist/{types-CF7nDH3q.d.cts → types-CmUA9sal.d.cts} +1 -1
  67. package/dist/{where-BmtjfWuS.d.cts → where-5zf15aFZ.d.cts} +1 -1
  68. package/dist/{where-kk1Zz2En.d.ts → where-CtrLu1Zf.d.ts} +1 -1
  69. package/package.json +8 -8
  70. package/dist/chunk-5H3BAMTB.js +0 -32
  71. package/dist/chunk-5H3BAMTB.js.map +0 -1
  72. package/dist/chunk-DN4RUDF3.cjs.map +0 -1
  73. package/dist/chunk-ENXJLDRK.js.map +0 -1
  74. package/dist/chunk-IUIWCFG3.cjs +0 -36
  75. package/dist/chunk-IUIWCFG3.cjs.map +0 -1
  76. package/dist/chunk-RF5EUQWS.js.map +0 -1
  77. package/dist/chunk-TVUARC7S.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import { I as IndexDeclaration, F as FulltextStrategy } from './types-Dzkr0Eqi.js';
1
+ import { I as IndexDeclaration, F as FulltextStrategy } from './types-CQ7xXJMP.js';
2
2
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
3
- import { S as SqliteTables } from './sqlite-GKvcDPVn.js';
3
+ import { S as SqliteTables } from './sqlite-BxZUPbyD.js';
4
4
 
5
5
  /**
6
6
  * Table name configuration.
@@ -1,6 +1,6 @@
1
- import { I as IndexDeclaration, F as FulltextStrategy } from './types-DZPBXZOK.cjs';
1
+ import { I as IndexDeclaration, F as FulltextStrategy } from './types-CMQymcwk.cjs';
2
2
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
3
- import { S as SqliteTables } from './sqlite-BvSEbybu.cjs';
3
+ import { S as SqliteTables } from './sqlite-mvpXjEeB.cjs';
4
4
 
5
5
  /**
6
6
  * Table name configuration.
package/dist/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkHTGDWIDE_cjs = require('./chunk-HTGDWIDE.cjs');
4
- var chunkZGEMI7MJ_cjs = require('./chunk-ZGEMI7MJ.cjs');
4
+ var chunkWZH2MKHW_cjs = require('./chunk-WZH2MKHW.cjs');
5
5
  var chunkWFUN6DCM_cjs = require('./chunk-WFUN6DCM.cjs');
6
6
  var chunk4FJVSF3K_cjs = require('./chunk-4FJVSF3K.cjs');
7
7
  var chunkPYJOBZR3_cjs = require('./chunk-PYJOBZR3.cjs');
8
- var chunkDN4RUDF3_cjs = require('./chunk-DN4RUDF3.cjs');
9
- var chunkIUIWCFG3_cjs = require('./chunk-IUIWCFG3.cjs');
8
+ var chunkLYRUNG6E_cjs = require('./chunk-LYRUNG6E.cjs');
9
+ var chunkFFHW2JEK_cjs = require('./chunk-FFHW2JEK.cjs');
10
10
  var chunkPN37HVAV_cjs = require('./chunk-PN37HVAV.cjs');
11
11
  var chunkCTHNVU6K_cjs = require('./chunk-CTHNVU6K.cjs');
12
12
  var chunkEK6RJ373_cjs = require('./chunk-EK6RJ373.cjs');
@@ -28,7 +28,7 @@ function metaEdge(name, options = {}) {
28
28
  description: options.description
29
29
  };
30
30
  return Object.freeze({
31
- [chunkZGEMI7MJ_cjs.META_EDGE_BRAND]: true,
31
+ [chunkWZH2MKHW_cjs.META_EDGE_BRAND]: true,
32
32
  name,
33
33
  properties
34
34
  });
@@ -4281,7 +4281,7 @@ function classifyUnique(kind, existing, next, recorders) {
4281
4281
  if (newOne === void 0) continue;
4282
4282
  const { name: _existingName, ...existingShape } = constraint;
4283
4283
  const { name: _nextName, ...nextShape } = newOne;
4284
- if (!chunkIUIWCFG3_cjs.canonicalEqual(existingShape, nextShape)) {
4284
+ if (!chunkFFHW2JEK_cjs.canonicalEqual(existingShape, nextShape)) {
4285
4285
  recorders.recordRequireEmpty({
4286
4286
  kind,
4287
4287
  type: "ADD_UNIQUE_ON_POPULATED",
@@ -4298,7 +4298,7 @@ function planRemovals(graph, names) {
4298
4298
  if (namesSet.size === 0) {
4299
4299
  return { document, removedNodeKinds: [], removedEdgeKinds: [] };
4300
4300
  }
4301
- const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkZGEMI7MJ_cjs.extensionKindNames(document);
4301
+ const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkWZH2MKHW_cjs.extensionKindNames(document);
4302
4302
  const compileTimeNodeNames = new Set(
4303
4303
  Object.keys(graph.nodes).filter((name) => !runtimeNodeNames.has(name))
4304
4304
  );
@@ -4398,8 +4398,8 @@ function planRemovals(graph, names) {
4398
4398
  function stripGraphExtension(graph) {
4399
4399
  const document = graph.extension;
4400
4400
  if (document === void 0) return graph;
4401
- const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkZGEMI7MJ_cjs.extensionKindNames(document);
4402
- const runtimeOntologyKeys = chunkZGEMI7MJ_cjs.buildGraphExtensionOntologyKeySet(document);
4401
+ const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkWZH2MKHW_cjs.extensionKindNames(document);
4402
+ const runtimeOntologyKeys = chunkWZH2MKHW_cjs.buildGraphExtensionOntologyKeySet(document);
4403
4403
  const compileNodes = {};
4404
4404
  for (const [name, registration] of Object.entries(graph.nodes)) {
4405
4405
  if (runtimeNodeNames.has(name)) continue;
@@ -4411,7 +4411,7 @@ function stripGraphExtension(graph) {
4411
4411
  compileEdges[name] = registration;
4412
4412
  }
4413
4413
  const compileOntology = graph.ontology.filter(
4414
- (relation) => !runtimeOntologyKeys.has(chunkZGEMI7MJ_cjs.compileTimeOntologyKey(relation))
4414
+ (relation) => !runtimeOntologyKeys.has(chunkWZH2MKHW_cjs.compileTimeOntologyKey(relation))
4415
4415
  );
4416
4416
  const compileIndexes = (graph.indexes ?? []).filter(
4417
4417
  (index) => index.origin !== "runtime"
@@ -4451,13 +4451,13 @@ function buildCompileTimeReferentIndex(graph, runtimeEdgeNames) {
4451
4451
  append(endpoint.kind, referent);
4452
4452
  }
4453
4453
  }
4454
- const runtimeOntologyKeys = chunkZGEMI7MJ_cjs.buildGraphExtensionOntologyKeySet(
4454
+ const runtimeOntologyKeys = chunkWZH2MKHW_cjs.buildGraphExtensionOntologyKeySet(
4455
4455
  graph.extension
4456
4456
  );
4457
4457
  for (const relation of graph.ontology) {
4458
- if (runtimeOntologyKeys.has(chunkZGEMI7MJ_cjs.compileTimeOntologyKey(relation))) continue;
4459
- const fromName = chunkZGEMI7MJ_cjs.getTypeName(relation.from);
4460
- const toName = chunkZGEMI7MJ_cjs.getTypeName(relation.to);
4458
+ if (runtimeOntologyKeys.has(chunkWZH2MKHW_cjs.compileTimeOntologyKey(relation))) continue;
4459
+ const fromName = chunkWZH2MKHW_cjs.getTypeName(relation.from);
4460
+ const toName = chunkWZH2MKHW_cjs.getTypeName(relation.to);
4461
4461
  const referent = {
4462
4462
  type: "compile-time-ontology",
4463
4463
  name: `${relation.metaEdge.name}(${fromName}, ${toName})`
@@ -9996,8 +9996,8 @@ function createQueryBuilder(graphId, registry, options) {
9996
9996
  function buildKindRegistry(graph) {
9997
9997
  const nodeTypes = extractNodeTypes(graph);
9998
9998
  const edgeTypes = extractEdgeTypes(graph);
9999
- const closures = graph.ontology.length > 0 ? chunkZGEMI7MJ_cjs.computeClosuresFromOntology(graph.ontology) : chunkZGEMI7MJ_cjs.createEmptyClosures();
10000
- return new chunkZGEMI7MJ_cjs.KindRegistry(nodeTypes, edgeTypes, closures);
9999
+ const closures = graph.ontology.length > 0 ? chunkWZH2MKHW_cjs.computeClosuresFromOntology(graph.ontology) : chunkWZH2MKHW_cjs.createEmptyClosures();
10000
+ return new chunkWZH2MKHW_cjs.KindRegistry(nodeTypes, edgeTypes, closures);
10001
10001
  }
10002
10002
  function extractNodeTypes(graph) {
10003
10003
  const result = /* @__PURE__ */ new Map();
@@ -10992,7 +10992,7 @@ function createEdgeCollectionsProxy(graph, graphId, registry, backend, operation
10992
10992
  // src/store/introspect.ts
10993
10993
  function introspectSchema(graph, context) {
10994
10994
  const extension = graph.extension;
10995
- const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkZGEMI7MJ_cjs.extensionKindNames(extension);
10995
+ const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkWZH2MKHW_cjs.extensionKindNames(extension);
10996
10996
  const deprecated = graph.deprecatedKinds;
10997
10997
  const kinds = [];
10998
10998
  for (const [name, registration] of Object.entries(graph.nodes)) {
@@ -11003,7 +11003,7 @@ function introspectSchema(graph, context) {
11003
11003
  description: reg.type.description,
11004
11004
  annotations: reg.type.annotations,
11005
11005
  deprecated: deprecated.has(name),
11006
- properties: chunkZGEMI7MJ_cjs.serializeSchemaProperties(reg.type.schema),
11006
+ properties: chunkWZH2MKHW_cjs.serializeSchemaProperties(reg.type.schema),
11007
11007
  unique: (reg.unique ?? []).map((constraint) => ({
11008
11008
  name: constraint.name,
11009
11009
  fields: [...constraint.fields],
@@ -11024,17 +11024,17 @@ function introspectSchema(graph, context) {
11024
11024
  to: reg.to.map((entry2) => entry2.kind),
11025
11025
  cardinality: reg.cardinality ?? "many",
11026
11026
  endpointExistence: reg.endpointExistence ?? "notDeleted",
11027
- properties: chunkZGEMI7MJ_cjs.serializeSchemaProperties(edgeType.schema),
11027
+ properties: chunkWZH2MKHW_cjs.serializeSchemaProperties(edgeType.schema),
11028
11028
  annotations: edgeType.annotations,
11029
11029
  deprecated: deprecated.has(name)
11030
11030
  });
11031
11031
  }
11032
- const runtimeOntologyKeys = chunkZGEMI7MJ_cjs.buildGraphExtensionOntologyKeySet(extension);
11032
+ const runtimeOntologyKeys = chunkWZH2MKHW_cjs.buildGraphExtensionOntologyKeySet(extension);
11033
11033
  const ontology = graph.ontology.map((relation) => ({
11034
11034
  metaEdge: relation.metaEdge.name,
11035
- from: chunkZGEMI7MJ_cjs.getTypeName(relation.from),
11036
- to: chunkZGEMI7MJ_cjs.getTypeName(relation.to),
11037
- origin: runtimeOntologyKeys.has(chunkZGEMI7MJ_cjs.compileTimeOntologyKey(relation)) ? "runtime" : "compile-time"
11035
+ from: chunkWZH2MKHW_cjs.getTypeName(relation.from),
11036
+ to: chunkWZH2MKHW_cjs.getTypeName(relation.to),
11037
+ origin: runtimeOntologyKeys.has(chunkWZH2MKHW_cjs.compileTimeOntologyKey(relation)) ? "runtime" : "compile-time"
11038
11038
  }));
11039
11039
  return {
11040
11040
  graphId: context.graphId,
@@ -11361,7 +11361,7 @@ function buildAttempt(args) {
11361
11361
  }
11362
11362
  async function computeIndexSignature(dialect, targetTableName, declaration) {
11363
11363
  const hashable = { dialect, targetTableName, declaration };
11364
- const json = JSON.stringify(hashable, chunkIUIWCFG3_cjs.sortedReplacer);
11364
+ const json = JSON.stringify(hashable, chunkFFHW2JEK_cjs.sortedReplacer);
11365
11365
  return chunkCTHNVU6K_cjs.sha256Hex(json, 16);
11366
11366
  }
11367
11367
 
@@ -11429,14 +11429,14 @@ async function reconcilePendingRemovals(context) {
11429
11429
  const reconciliations = [];
11430
11430
  const stopAtVersion = marker ?? 1;
11431
11431
  let currentRow = activeRow;
11432
- let currentSchema = chunkZGEMI7MJ_cjs.parseSerializedSchema(activeRow.schema_doc);
11432
+ let currentSchema = chunkWZH2MKHW_cjs.parseSerializedSchema(activeRow.schema_doc);
11433
11433
  while (currentRow.version > stopAtVersion) {
11434
11434
  const priorRow = await backend.getSchemaVersion(
11435
11435
  graphId,
11436
11436
  currentRow.version - 1
11437
11437
  );
11438
11438
  if (priorRow === void 0) break;
11439
- const priorSchema = chunkZGEMI7MJ_cjs.parseSerializedSchema(priorRow.schema_doc);
11439
+ const priorSchema = chunkWZH2MKHW_cjs.parseSerializedSchema(priorRow.schema_doc);
11440
11440
  for (const entity of ENTITY_KINDS) {
11441
11441
  const priorEntries = priorSchema[entity === "node" ? "nodes" : "edges"];
11442
11442
  const currentEntries = currentSchema[entity === "node" ? "nodes" : "edges"];
@@ -11952,7 +11952,7 @@ async function validateAndPrepareEdgeCreate(ctx, input, id, backend) {
11952
11952
  nodeId: input.toId
11953
11953
  });
11954
11954
  }
11955
- const validatedProps = chunkZGEMI7MJ_cjs.validateEdgeProps(edgeKind.schema, input.props, {
11955
+ const validatedProps = chunkWZH2MKHW_cjs.validateEdgeProps(edgeKind.schema, input.props, {
11956
11956
  kind,
11957
11957
  operation: "create"
11958
11958
  });
@@ -12102,7 +12102,7 @@ async function executeEdgeUpdate(ctx, input, backend) {
12102
12102
  const edgeKind = registration.type;
12103
12103
  const existingProps = JSON.parse(existing.props);
12104
12104
  const mergedProps = { ...existingProps, ...input.props };
12105
- const validatedProps = chunkZGEMI7MJ_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
12105
+ const validatedProps = chunkWZH2MKHW_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
12106
12106
  kind: existing.kind,
12107
12107
  operation: "update",
12108
12108
  id
@@ -12128,7 +12128,7 @@ async function executeEdgeUpsertUpdate(ctx, input, backend, options) {
12128
12128
  const edgeKind = registration.type;
12129
12129
  const existingProps = JSON.parse(existing.props);
12130
12130
  const mergedProps = { ...existingProps, ...input.props };
12131
- const validatedProps = chunkZGEMI7MJ_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
12131
+ const validatedProps = chunkWZH2MKHW_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
12132
12132
  kind: existing.kind,
12133
12133
  operation: "update",
12134
12134
  id
@@ -12285,7 +12285,7 @@ async function executeEdgeGetOrCreateByEndpoints(ctx, kind, fromKind, fromId, to
12285
12285
  const matchOn = options?.matchOn ?? [];
12286
12286
  const registration = getEdgeRegistration(ctx.graph, kind);
12287
12287
  const edgeKind = registration.type;
12288
- const validatedProps = chunkZGEMI7MJ_cjs.validateEdgeProps(edgeKind.schema, props, {
12288
+ const validatedProps = chunkWZH2MKHW_cjs.validateEdgeProps(edgeKind.schema, props, {
12289
12289
  kind,
12290
12290
  operation: "create"
12291
12291
  });
@@ -12367,7 +12367,7 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
12367
12367
  validateMatchOnFields(edgeKind.schema, matchOn, kind);
12368
12368
  const validated = [];
12369
12369
  for (const item of items) {
12370
- const validatedProps = chunkZGEMI7MJ_cjs.validateEdgeProps(edgeKind.schema, item.props, {
12370
+ const validatedProps = chunkWZH2MKHW_cjs.validateEdgeProps(edgeKind.schema, item.props, {
12371
12371
  kind,
12372
12372
  operation: "create"
12373
12373
  });
@@ -13014,7 +13014,7 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend) {
13014
13014
  const kind = input.kind;
13015
13015
  const registration = getNodeRegistration(ctx.graph, kind);
13016
13016
  const nodeKind = registration.type;
13017
- const validatedProps = chunkZGEMI7MJ_cjs.validateNodeProps(nodeKind.schema, input.props, {
13017
+ const validatedProps = chunkWZH2MKHW_cjs.validateNodeProps(nodeKind.schema, input.props, {
13018
13018
  kind,
13019
13019
  operation: "create"
13020
13020
  });
@@ -13088,7 +13088,7 @@ async function performNodeUpdate(ctx, input, backend, options) {
13088
13088
  const existingProps = JSON.parse(existing.props);
13089
13089
  const mergedProps = { ...existingProps, ...input.props };
13090
13090
  const nodeKind = registration.type;
13091
- const validatedProps = chunkZGEMI7MJ_cjs.validateNodeProps(nodeKind.schema, mergedProps, {
13091
+ const validatedProps = chunkWZH2MKHW_cjs.validateNodeProps(nodeKind.schema, mergedProps, {
13092
13092
  kind,
13093
13093
  operation: "update",
13094
13094
  id
@@ -13361,7 +13361,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
13361
13361
  const ifExists = options?.ifExists ?? "return";
13362
13362
  const registration = getNodeRegistration(ctx.graph, kind);
13363
13363
  const nodeKind = registration.type;
13364
- const validatedProps = chunkZGEMI7MJ_cjs.validateNodeProps(nodeKind.schema, props, {
13364
+ const validatedProps = chunkWZH2MKHW_cjs.validateNodeProps(nodeKind.schema, props, {
13365
13365
  kind,
13366
13366
  operation: "create"
13367
13367
  });
@@ -13433,7 +13433,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
13433
13433
  async function executeNodeFindByConstraint(ctx, kind, constraintName, props, backend) {
13434
13434
  const registration = getNodeRegistration(ctx.graph, kind);
13435
13435
  const nodeKind = registration.type;
13436
- const validatedProps = chunkZGEMI7MJ_cjs.validateNodeProps(nodeKind.schema, props, {
13436
+ const validatedProps = chunkWZH2MKHW_cjs.validateNodeProps(nodeKind.schema, props, {
13437
13437
  kind,
13438
13438
  operation: "create"
13439
13439
  });
@@ -13470,7 +13470,7 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
13470
13470
  function validateAndComputeKeys(nodeKind, kind, constraint, items) {
13471
13471
  const validated = [];
13472
13472
  for (const item of items) {
13473
- const validatedProps = chunkZGEMI7MJ_cjs.validateNodeProps(nodeKind.schema, item.props, {
13473
+ const validatedProps = chunkWZH2MKHW_cjs.validateNodeProps(nodeKind.schema, item.props, {
13474
13474
  kind,
13475
13475
  operation: "create"
13476
13476
  });
@@ -13764,7 +13764,7 @@ async function rebuildFulltextIndex(ctx, nodeKind, options) {
13764
13764
  }
13765
13765
  }
13766
13766
  };
13767
- await chunkDN4RUDF3_cjs.runOptionallyInTransaction(backend, writePage);
13767
+ await chunkLYRUNG6E_cjs.runOptionallyInTransaction(backend, writePage);
13768
13768
  processed += rows.length;
13769
13769
  upserted += pageResult.toUpsert.length;
13770
13770
  cleared += pageResult.toDelete.length;
@@ -13882,6 +13882,7 @@ async function executeVectorSearch(ctx, nodeKind, options) {
13882
13882
  `vectorSearch.limit must be a positive integer, got: ${options.limit}`
13883
13883
  );
13884
13884
  }
13885
+ assertEfSearch(options.efSearch, "vectorSearch.efSearch");
13885
13886
  const rows = await backend.vectorSearch({
13886
13887
  graphId,
13887
13888
  nodeKind,
@@ -13889,7 +13890,8 @@ async function executeVectorSearch(ctx, nodeKind, options) {
13889
13890
  queryEmbedding: options.queryEmbedding,
13890
13891
  metric: options.metric ?? "cosine",
13891
13892
  limit: options.limit,
13892
- ...options.minScore === void 0 ? {} : { minScore: options.minScore }
13893
+ ...options.minScore === void 0 ? {} : { minScore: options.minScore },
13894
+ ...options.efSearch === void 0 ? {} : { efSearch: options.efSearch }
13893
13895
  });
13894
13896
  if (rows.length === 0) return [];
13895
13897
  const ids = rows.map((row) => row.nodeId);
@@ -13926,6 +13928,7 @@ async function executeHybridSearch(ctx, nodeKind, options) {
13926
13928
  if (options.fusion !== void 0) {
13927
13929
  validateHybridFusionOptions(options.fusion);
13928
13930
  }
13931
+ assertEfSearch(options.vector.efSearch, "hybridSearch.vector.efSearch");
13929
13932
  validateFulltextCallOptions(backend, {
13930
13933
  mode: options.fulltext.mode,
13931
13934
  includeSnippets: options.fulltext.includeSnippets,
@@ -13944,7 +13947,8 @@ async function executeHybridSearch(ctx, nodeKind, options) {
13944
13947
  queryEmbedding: options.vector.queryEmbedding,
13945
13948
  metric: options.vector.metric ?? "cosine",
13946
13949
  limit: vectorK,
13947
- ...options.vector.minScore === void 0 ? {} : { minScore: options.vector.minScore }
13950
+ ...options.vector.minScore === void 0 ? {} : { minScore: options.vector.minScore },
13951
+ ...options.vector.efSearch === void 0 ? {} : { efSearch: options.vector.efSearch }
13948
13952
  });
13949
13953
  const fulltextPromise = backend.fulltextSearch({
13950
13954
  graphId,
@@ -14024,6 +14028,14 @@ async function executeHybridSearch(ctx, nodeKind, options) {
14024
14028
  }
14025
14029
  return hits;
14026
14030
  }
14031
+ function assertEfSearch(efSearch, label) {
14032
+ if (efSearch === void 0) return;
14033
+ if (!Number.isInteger(efSearch) || efSearch <= 0) {
14034
+ throw new RangeError(
14035
+ `${label} must be a positive integer, got: ${efSearch}`
14036
+ );
14037
+ }
14038
+ }
14027
14039
  function validateFulltextCallOptions(backend, options) {
14028
14040
  const strategy = backend.fulltextStrategy;
14029
14041
  const capabilities = backend.capabilities.fulltext;
@@ -14676,7 +14688,7 @@ var Store = class _Store {
14676
14688
  * @returns A tuple with per-query typed results, preserving input order
14677
14689
  */
14678
14690
  async batch(...queries) {
14679
- return chunkDN4RUDF3_cjs.runOptionallyInTransaction(this.#backend, async (target) => {
14691
+ return chunkLYRUNG6E_cjs.runOptionallyInTransaction(this.#backend, async (target) => {
14680
14692
  const results = [];
14681
14693
  for (const query of queries) {
14682
14694
  const result = await query.executeOn(target);
@@ -14982,7 +14994,7 @@ var Store = class _Store {
14982
14994
  */
14983
14995
  async evolve(extension, options) {
14984
14996
  const { activeRow, baseline } = await this.#loadCaughtUp("evolve");
14985
- const merged = chunkZGEMI7MJ_cjs.mergeGraphExtension(baseline, extension);
14997
+ const merged = chunkWZH2MKHW_cjs.mergeGraphExtension(baseline, extension);
14986
14998
  if (merged === baseline) {
14987
14999
  if (baseline === this.#graph) {
14988
15000
  if (options?.ref !== void 0) options.ref.current = this;
@@ -15018,7 +15030,7 @@ var Store = class _Store {
15018
15030
  );
15019
15031
  if (error !== void 0) throw error;
15020
15032
  }
15021
- const committed = await chunkZGEMI7MJ_cjs.commitNewSchemaVersion(
15033
+ const committed = await chunkWZH2MKHW_cjs.commitNewSchemaVersion(
15022
15034
  this.#backend,
15023
15035
  merged,
15024
15036
  activeRow.version
@@ -15170,9 +15182,9 @@ var Store = class _Store {
15170
15182
  );
15171
15183
  }
15172
15184
  const compileTimeGraph = stripGraphExtension(this.#graph);
15173
- const merged = plan.document === void 0 ? compileTimeGraph : chunkZGEMI7MJ_cjs.mergeGraphExtension(compileTimeGraph, plan.document);
15174
- const finalGraph = chunkZGEMI7MJ_cjs.applyDeprecatedKinds(merged, baseline.deprecatedKinds);
15175
- const committedRow = await chunkZGEMI7MJ_cjs.commitNewSchemaVersion(
15185
+ const merged = plan.document === void 0 ? compileTimeGraph : chunkWZH2MKHW_cjs.mergeGraphExtension(compileTimeGraph, plan.document);
15186
+ const finalGraph = chunkWZH2MKHW_cjs.applyDeprecatedKinds(merged, baseline.deprecatedKinds);
15187
+ const committedRow = await chunkWZH2MKHW_cjs.commitNewSchemaVersion(
15176
15188
  this.#backend,
15177
15189
  finalGraph,
15178
15190
  activeRow.version
@@ -15255,8 +15267,8 @@ var Store = class _Store {
15255
15267
  schemaMetadataFromRow(activeRow)
15256
15268
  );
15257
15269
  }
15258
- const merged = chunkZGEMI7MJ_cjs.applyDeprecatedKinds(baseline, nextSet);
15259
- const result = await chunkZGEMI7MJ_cjs.ensureSchema(this.#backend, merged, {
15270
+ const merged = chunkWZH2MKHW_cjs.applyDeprecatedKinds(baseline, nextSet);
15271
+ const result = await chunkWZH2MKHW_cjs.ensureSchema(this.#backend, merged, {
15260
15272
  preloaded: { activeRow, storedSchema },
15261
15273
  autoMigrate: true
15262
15274
  });
@@ -15265,8 +15277,8 @@ var Store = class _Store {
15265
15277
  }
15266
15278
  #catchUpToStored(storedSchema) {
15267
15279
  const compileTimeGraph = stripGraphExtension(this.#graph);
15268
- const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph : chunkZGEMI7MJ_cjs.mergeGraphExtension(compileTimeGraph, storedSchema.extension);
15269
- return chunkZGEMI7MJ_cjs.applyDeprecatedKinds(
15280
+ const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph : chunkWZH2MKHW_cjs.mergeGraphExtension(compileTimeGraph, storedSchema.extension);
15281
+ return chunkWZH2MKHW_cjs.applyDeprecatedKinds(
15270
15282
  withGraphExtension,
15271
15283
  storedSchema.deprecatedKinds
15272
15284
  );
@@ -15284,7 +15296,7 @@ var Store = class _Store {
15284
15296
  * serializes the actual commit.
15285
15297
  */
15286
15298
  async #loadCaughtUp(verb) {
15287
- const activeRow = await chunkZGEMI7MJ_cjs.loadActiveSchemaWithBootstrap(
15299
+ const activeRow = await chunkWZH2MKHW_cjs.loadActiveSchemaWithBootstrap(
15288
15300
  this.#backend,
15289
15301
  this.graphId
15290
15302
  );
@@ -15295,7 +15307,7 @@ var Store = class _Store {
15295
15307
  { code }
15296
15308
  );
15297
15309
  }
15298
- const storedSchema = chunkZGEMI7MJ_cjs.parseSerializedSchema(activeRow.schema_doc);
15310
+ const storedSchema = chunkWZH2MKHW_cjs.parseSerializedSchema(activeRow.schema_doc);
15299
15311
  const baseline = this.#catchUpToStored(storedSchema);
15300
15312
  return { activeRow, storedSchema, baseline };
15301
15313
  }
@@ -15473,8 +15485,8 @@ async function createStoreWithSchema(graph, backend, options) {
15473
15485
  graph: merged,
15474
15486
  activeRow,
15475
15487
  storedSchema
15476
- } = await chunkZGEMI7MJ_cjs.loadAndMergeGraphExtensionDocument(backend, graph);
15477
- const result = await chunkZGEMI7MJ_cjs.ensureSchema(backend, merged, {
15488
+ } = await chunkWZH2MKHW_cjs.loadAndMergeGraphExtensionDocument(backend, graph);
15489
+ const result = await chunkWZH2MKHW_cjs.ensureSchema(backend, merged, {
15478
15490
  ...options,
15479
15491
  preloaded: { activeRow, storedSchema }
15480
15492
  });
@@ -15492,7 +15504,7 @@ async function createVerifiedStore(graph, backend, options) {
15492
15504
  graph: merged,
15493
15505
  activeRow,
15494
15506
  result
15495
- } = await chunkZGEMI7MJ_cjs.loadAndVerifyGraph(backend, graph);
15507
+ } = await chunkWZH2MKHW_cjs.loadAndVerifyGraph(backend, graph);
15496
15508
  const store = new Store(
15497
15509
  merged,
15498
15510
  backend,
@@ -15504,67 +15516,67 @@ async function createVerifiedStore(graph, backend, options) {
15504
15516
 
15505
15517
  Object.defineProperty(exports, "broader", {
15506
15518
  enumerable: true,
15507
- get: function () { return chunkZGEMI7MJ_cjs.broader; }
15519
+ get: function () { return chunkWZH2MKHW_cjs.broader; }
15508
15520
  });
15509
15521
  Object.defineProperty(exports, "core", {
15510
15522
  enumerable: true,
15511
- get: function () { return chunkZGEMI7MJ_cjs.core; }
15523
+ get: function () { return chunkWZH2MKHW_cjs.core; }
15512
15524
  });
15513
15525
  Object.defineProperty(exports, "defineEdge", {
15514
15526
  enumerable: true,
15515
- get: function () { return chunkZGEMI7MJ_cjs.defineEdge; }
15527
+ get: function () { return chunkWZH2MKHW_cjs.defineEdge; }
15516
15528
  });
15517
15529
  Object.defineProperty(exports, "defineNode", {
15518
15530
  enumerable: true,
15519
- get: function () { return chunkZGEMI7MJ_cjs.defineNode; }
15531
+ get: function () { return chunkWZH2MKHW_cjs.defineNode; }
15520
15532
  });
15521
15533
  Object.defineProperty(exports, "differentFrom", {
15522
15534
  enumerable: true,
15523
- get: function () { return chunkZGEMI7MJ_cjs.differentFrom; }
15535
+ get: function () { return chunkWZH2MKHW_cjs.differentFrom; }
15524
15536
  });
15525
15537
  Object.defineProperty(exports, "disjointWith", {
15526
15538
  enumerable: true,
15527
- get: function () { return chunkZGEMI7MJ_cjs.disjointWith; }
15539
+ get: function () { return chunkWZH2MKHW_cjs.disjointWith; }
15528
15540
  });
15529
15541
  Object.defineProperty(exports, "equivalentTo", {
15530
15542
  enumerable: true,
15531
- get: function () { return chunkZGEMI7MJ_cjs.equivalentTo; }
15543
+ get: function () { return chunkWZH2MKHW_cjs.equivalentTo; }
15532
15544
  });
15533
15545
  Object.defineProperty(exports, "hasPart", {
15534
15546
  enumerable: true,
15535
- get: function () { return chunkZGEMI7MJ_cjs.hasPart; }
15547
+ get: function () { return chunkWZH2MKHW_cjs.hasPart; }
15536
15548
  });
15537
15549
  Object.defineProperty(exports, "implies", {
15538
15550
  enumerable: true,
15539
- get: function () { return chunkZGEMI7MJ_cjs.implies; }
15551
+ get: function () { return chunkWZH2MKHW_cjs.implies; }
15540
15552
  });
15541
15553
  Object.defineProperty(exports, "inverseOf", {
15542
15554
  enumerable: true,
15543
- get: function () { return chunkZGEMI7MJ_cjs.inverseOf; }
15555
+ get: function () { return chunkWZH2MKHW_cjs.inverseOf; }
15544
15556
  });
15545
15557
  Object.defineProperty(exports, "isMetaEdge", {
15546
15558
  enumerable: true,
15547
- get: function () { return chunkZGEMI7MJ_cjs.isMetaEdge; }
15559
+ get: function () { return chunkWZH2MKHW_cjs.isMetaEdge; }
15548
15560
  });
15549
15561
  Object.defineProperty(exports, "narrower", {
15550
15562
  enumerable: true,
15551
- get: function () { return chunkZGEMI7MJ_cjs.narrower; }
15563
+ get: function () { return chunkWZH2MKHW_cjs.narrower; }
15552
15564
  });
15553
15565
  Object.defineProperty(exports, "partOf", {
15554
15566
  enumerable: true,
15555
- get: function () { return chunkZGEMI7MJ_cjs.partOf; }
15567
+ get: function () { return chunkWZH2MKHW_cjs.partOf; }
15556
15568
  });
15557
15569
  Object.defineProperty(exports, "relatedTo", {
15558
15570
  enumerable: true,
15559
- get: function () { return chunkZGEMI7MJ_cjs.relatedTo; }
15571
+ get: function () { return chunkWZH2MKHW_cjs.relatedTo; }
15560
15572
  });
15561
15573
  Object.defineProperty(exports, "sameAs", {
15562
15574
  enumerable: true,
15563
- get: function () { return chunkZGEMI7MJ_cjs.sameAs; }
15575
+ get: function () { return chunkWZH2MKHW_cjs.sameAs; }
15564
15576
  });
15565
15577
  Object.defineProperty(exports, "subClassOf", {
15566
15578
  enumerable: true,
15567
- get: function () { return chunkZGEMI7MJ_cjs.subClassOf; }
15579
+ get: function () { return chunkWZH2MKHW_cjs.subClassOf; }
15568
15580
  });
15569
15581
  Object.defineProperty(exports, "defineGraph", {
15570
15582
  enumerable: true,