@nicia-ai/typegraph 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/backend/postgres/index.cjs +26 -26
  2. package/dist/backend/postgres/index.js +2 -2
  3. package/dist/backend/sqlite/index.cjs +12 -12
  4. package/dist/backend/sqlite/index.d.cts +15 -3
  5. package/dist/backend/sqlite/index.d.ts +15 -3
  6. package/dist/backend/sqlite/index.js +2 -2
  7. package/dist/backend/sqlite/local.cjs +5 -6
  8. package/dist/backend/sqlite/local.cjs.map +1 -1
  9. package/dist/backend/sqlite/local.js +2 -3
  10. package/dist/backend/sqlite/local.js.map +1 -1
  11. package/dist/{chunk-PDQBCQ34.cjs → chunk-7VITUTRA.cjs} +6 -6
  12. package/dist/{chunk-PDQBCQ34.cjs.map → chunk-7VITUTRA.cjs.map} +1 -1
  13. package/dist/{chunk-K5O7TOJO.cjs → chunk-FXZOTO6F.cjs} +56 -48
  14. package/dist/chunk-FXZOTO6F.cjs.map +1 -0
  15. package/dist/{chunk-JUZWF5NX.js → chunk-IRFD3MEU.js} +12 -12
  16. package/dist/chunk-IRFD3MEU.js.map +1 -0
  17. package/dist/{chunk-2DKSQNPW.js → chunk-KP2HKVXU.js} +45 -37
  18. package/dist/chunk-KP2HKVXU.js.map +1 -0
  19. package/dist/{chunk-23NGZHUN.cjs → chunk-MGEVSTDX.cjs} +2 -13
  20. package/dist/chunk-MGEVSTDX.cjs.map +1 -0
  21. package/dist/{chunk-BELXZTVK.cjs → chunk-NI2GV74U.cjs} +12 -12
  22. package/dist/chunk-NI2GV74U.cjs.map +1 -0
  23. package/dist/{chunk-SH237DWD.js → chunk-PYV4ADC6.js} +3 -3
  24. package/dist/{chunk-SH237DWD.js.map → chunk-PYV4ADC6.js.map} +1 -1
  25. package/dist/{chunk-JPO7W262.js → chunk-X3OXNIMH.js} +3 -13
  26. package/dist/chunk-X3OXNIMH.js.map +1 -0
  27. package/dist/index.cjs +61 -61
  28. package/dist/index.d.cts +4 -4
  29. package/dist/index.d.ts +4 -4
  30. package/dist/index.js +4 -4
  31. package/dist/interchange/index.cjs +6 -6
  32. package/dist/interchange/index.d.cts +2 -2
  33. package/dist/interchange/index.d.ts +2 -2
  34. package/dist/interchange/index.js +1 -1
  35. package/dist/{manager-Ba2CXGMG.d.ts → manager-BCLhWysp.d.ts} +8 -6
  36. package/dist/{manager-Cu3JQN0H.d.cts → manager-DGSnJa1v.d.cts} +8 -6
  37. package/dist/profiler/index.d.cts +2 -2
  38. package/dist/profiler/index.d.ts +2 -2
  39. package/dist/schema/index.cjs +21 -21
  40. package/dist/schema/index.d.cts +2 -2
  41. package/dist/schema/index.d.ts +2 -2
  42. package/dist/schema/index.js +3 -3
  43. package/dist/{store-CL-QMus7.d.cts → store-DgzIgrmn.d.cts} +1 -1
  44. package/dist/{store-DJpuUOSL.d.ts → store-wqOO3GSy.d.ts} +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunk-23NGZHUN.cjs.map +0 -1
  47. package/dist/chunk-2DKSQNPW.js.map +0 -1
  48. package/dist/chunk-BELXZTVK.cjs.map +0 -1
  49. package/dist/chunk-JPO7W262.js.map +0 -1
  50. package/dist/chunk-JUZWF5NX.js.map +0 -1
  51. package/dist/chunk-K5O7TOJO.cjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkPDQBCQ34_cjs = require('./chunk-PDQBCQ34.cjs');
4
- var chunkBELXZTVK_cjs = require('./chunk-BELXZTVK.cjs');
3
+ var chunk7VITUTRA_cjs = require('./chunk-7VITUTRA.cjs');
4
+ var chunkNI2GV74U_cjs = require('./chunk-NI2GV74U.cjs');
5
5
  var chunk44SXEVF4_cjs = require('./chunk-44SXEVF4.cjs');
6
6
  var chunk2WVFEIHR_cjs = require('./chunk-2WVFEIHR.cjs');
7
7
  var chunkP5CNM325_cjs = require('./chunk-P5CNM325.cjs');
@@ -29,7 +29,7 @@ function validateSchemaKeys(schema, name) {
29
29
  function defineNode(name, options) {
30
30
  validateSchemaKeys(options.schema, name);
31
31
  return Object.freeze({
32
- [chunkBELXZTVK_cjs.NODE_TYPE_BRAND]: true,
32
+ [chunkNI2GV74U_cjs.NODE_TYPE_BRAND]: true,
33
33
  kind: name,
34
34
  schema: options.schema,
35
35
  description: options.description
@@ -64,7 +64,7 @@ function defineEdge(name, options) {
64
64
  const schema = options?.schema ?? EMPTY_SCHEMA;
65
65
  validateSchemaKeys2(schema, name);
66
66
  return Object.freeze({
67
- [chunkBELXZTVK_cjs.EDGE_TYPE_BRAND]: true,
67
+ [chunkNI2GV74U_cjs.EDGE_TYPE_BRAND]: true,
68
68
  kind: name,
69
69
  schema,
70
70
  description: options?.description,
@@ -84,7 +84,7 @@ function metaEdge(name, options = {}) {
84
84
  description: options.description
85
85
  };
86
86
  return Object.freeze({
87
- [chunkPDQBCQ34_cjs.META_EDGE_BRAND]: true,
87
+ [chunk7VITUTRA_cjs.META_EDGE_BRAND]: true,
88
88
  name,
89
89
  properties
90
90
  });
@@ -120,7 +120,7 @@ function createExternalRef(table) {
120
120
  // src/ontology/core-meta-edges.ts
121
121
  function createMetaEdge(name, properties) {
122
122
  return Object.freeze({
123
- [chunkPDQBCQ34_cjs.META_EDGE_BRAND]: true,
123
+ [chunk7VITUTRA_cjs.META_EDGE_BRAND]: true,
124
124
  name,
125
125
  properties: {
126
126
  transitive: properties.transitive ?? false,
@@ -132,7 +132,7 @@ function createMetaEdge(name, properties) {
132
132
  }
133
133
  });
134
134
  }
135
- var subClassOfMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_SUB_CLASS_OF, {
135
+ var subClassOfMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_SUB_CLASS_OF, {
136
136
  transitive: true,
137
137
  inference: "subsumption",
138
138
  description: "Type inheritance (Podcast subClassOf Media)"
@@ -144,9 +144,9 @@ function subClassOf(child, parent) {
144
144
  to: parent
145
145
  };
146
146
  }
147
- var broaderMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_BROADER, {
147
+ var broaderMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_BROADER, {
148
148
  transitive: true,
149
- inverse: chunkPDQBCQ34_cjs.META_EDGE_NARROWER,
149
+ inverse: chunk7VITUTRA_cjs.META_EDGE_NARROWER,
150
150
  inference: "hierarchy",
151
151
  description: "Broader concept (ML broader AI)"
152
152
  });
@@ -157,9 +157,9 @@ function broader(narrowerConcept, broaderConcept) {
157
157
  to: broaderConcept
158
158
  };
159
159
  }
160
- var narrowerMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_NARROWER, {
160
+ var narrowerMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_NARROWER, {
161
161
  transitive: true,
162
- inverse: chunkPDQBCQ34_cjs.META_EDGE_BROADER,
162
+ inverse: chunk7VITUTRA_cjs.META_EDGE_BROADER,
163
163
  inference: "hierarchy",
164
164
  description: "Narrower concept (AI narrower ML)"
165
165
  });
@@ -170,7 +170,7 @@ function narrower(broaderConcept, narrowerConcept) {
170
170
  to: narrowerConcept
171
171
  };
172
172
  }
173
- var relatedToMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_RELATED_TO, {
173
+ var relatedToMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_RELATED_TO, {
174
174
  symmetric: true,
175
175
  inference: "association",
176
176
  description: "Non-hierarchical association"
@@ -182,7 +182,7 @@ function relatedTo(conceptA, conceptB) {
182
182
  to: conceptB
183
183
  };
184
184
  }
185
- var equivalentToMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_EQUIVALENT_TO, {
185
+ var equivalentToMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_EQUIVALENT_TO, {
186
186
  symmetric: true,
187
187
  transitive: true,
188
188
  inference: "substitution",
@@ -195,7 +195,7 @@ function equivalentTo(kindA, kindBOrIri) {
195
195
  to: kindBOrIri
196
196
  };
197
197
  }
198
- var sameAsMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_SAME_AS, {
198
+ var sameAsMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_SAME_AS, {
199
199
  symmetric: true,
200
200
  transitive: true,
201
201
  inference: "substitution",
@@ -208,7 +208,7 @@ function sameAs(kindA, kindBOrIri) {
208
208
  to: kindBOrIri
209
209
  };
210
210
  }
211
- var differentFromMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_DIFFERENT_FROM, {
211
+ var differentFromMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_DIFFERENT_FROM, {
212
212
  symmetric: true,
213
213
  inference: "constraint",
214
214
  description: "Explicitly different individuals"
@@ -220,7 +220,7 @@ function differentFrom(kindA, kindB) {
220
220
  to: kindB
221
221
  };
222
222
  }
223
- var disjointWithMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_DISJOINT_WITH, {
223
+ var disjointWithMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_DISJOINT_WITH, {
224
224
  symmetric: true,
225
225
  inference: "constraint",
226
226
  description: "Mutually exclusive types"
@@ -232,9 +232,9 @@ function disjointWith(kindA, kindB) {
232
232
  to: kindB
233
233
  };
234
234
  }
235
- var partOfMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_PART_OF, {
235
+ var partOfMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_PART_OF, {
236
236
  transitive: true,
237
- inverse: chunkPDQBCQ34_cjs.META_EDGE_HAS_PART,
237
+ inverse: chunk7VITUTRA_cjs.META_EDGE_HAS_PART,
238
238
  inference: "composition",
239
239
  description: "X is part of Y"
240
240
  });
@@ -245,9 +245,9 @@ function partOf(part, whole) {
245
245
  to: whole
246
246
  };
247
247
  }
248
- var hasPartMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_HAS_PART, {
248
+ var hasPartMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_HAS_PART, {
249
249
  transitive: true,
250
- inverse: chunkPDQBCQ34_cjs.META_EDGE_PART_OF,
250
+ inverse: chunk7VITUTRA_cjs.META_EDGE_PART_OF,
251
251
  inference: "composition",
252
252
  description: "Y has part X"
253
253
  });
@@ -258,12 +258,12 @@ function hasPart(whole, part) {
258
258
  to: part
259
259
  };
260
260
  }
261
- var inverseOfMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_INVERSE_OF, {
261
+ var inverseOfMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_INVERSE_OF, {
262
262
  symmetric: true,
263
263
  inference: "none",
264
264
  description: "Edge A is inverse of edge B"
265
265
  });
266
- var impliesMetaEdge = createMetaEdge(chunkPDQBCQ34_cjs.META_EDGE_IMPLIES, {
266
+ var impliesMetaEdge = createMetaEdge(chunk7VITUTRA_cjs.META_EDGE_IMPLIES, {
267
267
  transitive: true,
268
268
  inference: "none",
269
269
  description: "Edge A implies edge B exists"
@@ -8247,12 +8247,12 @@ function createQueryBuilder(graphId, registry, options) {
8247
8247
  function buildKindRegistry(graph) {
8248
8248
  const nodeTypes = extractNodeTypes(graph);
8249
8249
  const edgeTypes = extractEdgeTypes(graph);
8250
- const closures = graph.ontology.length > 0 ? chunkPDQBCQ34_cjs.computeClosuresFromOntology(graph.ontology) : chunkPDQBCQ34_cjs.createEmptyClosures();
8251
- return new chunkPDQBCQ34_cjs.KindRegistry(nodeTypes, edgeTypes, closures);
8250
+ const closures = graph.ontology.length > 0 ? chunk7VITUTRA_cjs.computeClosuresFromOntology(graph.ontology) : chunk7VITUTRA_cjs.createEmptyClosures();
8251
+ return new chunk7VITUTRA_cjs.KindRegistry(nodeTypes, edgeTypes, closures);
8252
8252
  }
8253
8253
  function extractNodeTypes(graph) {
8254
8254
  const result = /* @__PURE__ */ new Map();
8255
- for (const typeName of chunkBELXZTVK_cjs.getNodeKinds(graph)) {
8255
+ for (const typeName of chunkNI2GV74U_cjs.getNodeKinds(graph)) {
8256
8256
  const registration = graph.nodes[typeName];
8257
8257
  result.set(typeName, registration.type);
8258
8258
  }
@@ -8260,7 +8260,7 @@ function extractNodeTypes(graph) {
8260
8260
  }
8261
8261
  function extractEdgeTypes(graph) {
8262
8262
  const result = /* @__PURE__ */ new Map();
8263
- for (const typeName of chunkBELXZTVK_cjs.getEdgeKinds(graph)) {
8263
+ for (const typeName of chunkNI2GV74U_cjs.getEdgeKinds(graph)) {
8264
8264
  const registration = graph.edges[typeName];
8265
8265
  result.set(typeName, registration.type);
8266
8266
  }
@@ -8406,7 +8406,7 @@ function createEdgeCollection(config) {
8406
8406
  temporalMode: mode
8407
8407
  };
8408
8408
  if (mode === "current" || mode === "asOf") {
8409
- params.asOf = options?.asOf ?? chunkBELXZTVK_cjs.nowIso();
8409
+ params.asOf = options?.asOf ?? chunkNI2GV74U_cjs.nowIso();
8410
8410
  }
8411
8411
  if (options?.from?.kind !== void 0)
8412
8412
  params.fromKind = options.from.kind;
@@ -8427,7 +8427,7 @@ function createEdgeCollection(config) {
8427
8427
  temporalMode: mode
8428
8428
  };
8429
8429
  if (mode === "current" || mode === "asOf") {
8430
- params.asOf = options?.asOf ?? chunkBELXZTVK_cjs.nowIso();
8430
+ params.asOf = options?.asOf ?? chunkNI2GV74U_cjs.nowIso();
8431
8431
  }
8432
8432
  if (options?.from?.kind !== void 0)
8433
8433
  params.fromKind = options.from.kind;
@@ -8731,7 +8731,7 @@ function createNodeCollection(config) {
8731
8731
  const mode2 = options.temporalMode ?? defaultTemporalMode;
8732
8732
  let query = createQuery().from(kind, "_n").temporal(
8733
8733
  mode2,
8734
- mode2 === "asOf" ? options.asOf ?? chunkBELXZTVK_cjs.nowIso() : void 0
8734
+ mode2 === "asOf" ? options.asOf ?? chunkNI2GV74U_cjs.nowIso() : void 0
8735
8735
  ).whereNode("_n", options.where).select((ctx) => ctx._n);
8736
8736
  if (options.limit !== void 0) query = query.limit(options.limit);
8737
8737
  if (options.offset !== void 0) query = query.offset(options.offset);
@@ -8746,7 +8746,7 @@ function createNodeCollection(config) {
8746
8746
  temporalMode: mode
8747
8747
  };
8748
8748
  if (mode === "current" || mode === "asOf") {
8749
- params.asOf = options?.asOf ?? chunkBELXZTVK_cjs.nowIso();
8749
+ params.asOf = options?.asOf ?? chunkNI2GV74U_cjs.nowIso();
8750
8750
  }
8751
8751
  if (options?.limit !== void 0) params.limit = options.limit;
8752
8752
  if (options?.offset !== void 0) params.offset = options.offset;
@@ -8762,7 +8762,7 @@ function createNodeCollection(config) {
8762
8762
  temporalMode: mode
8763
8763
  };
8764
8764
  if (mode === "current" || mode === "asOf") {
8765
- params.asOf = options?.asOf ?? chunkBELXZTVK_cjs.nowIso();
8765
+ params.asOf = options?.asOf ?? chunkNI2GV74U_cjs.nowIso();
8766
8766
  }
8767
8767
  return backend.countNodesByKind(params);
8768
8768
  },
@@ -9483,12 +9483,12 @@ async function validateAndPrepareEdgeCreate(ctx, input, id, backend) {
9483
9483
  nodeId: input.toId
9484
9484
  });
9485
9485
  }
9486
- const validatedProps = chunkPDQBCQ34_cjs.validateEdgeProps(edgeKind.schema, input.props, {
9486
+ const validatedProps = chunk7VITUTRA_cjs.validateEdgeProps(edgeKind.schema, input.props, {
9487
9487
  kind,
9488
9488
  operation: "create"
9489
9489
  });
9490
- const validFrom = chunkBELXZTVK_cjs.validateOptionalIsoDate(input.validFrom, "validFrom");
9491
- const validTo = chunkBELXZTVK_cjs.validateOptionalIsoDate(input.validTo, "validTo");
9490
+ const validFrom = chunkNI2GV74U_cjs.validateOptionalIsoDate(input.validFrom, "validFrom");
9491
+ const validTo = chunkNI2GV74U_cjs.validateOptionalIsoDate(input.validTo, "validTo");
9492
9492
  const cardinality = registration.cardinality ?? "many";
9493
9493
  const constraintContext = {
9494
9494
  graphId: ctx.graphId,
@@ -9633,12 +9633,12 @@ async function executeEdgeUpdate(ctx, input, backend) {
9633
9633
  const edgeKind = registration.type;
9634
9634
  const existingProps = JSON.parse(existing.props);
9635
9635
  const mergedProps = { ...existingProps, ...input.props };
9636
- const validatedProps = chunkPDQBCQ34_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
9636
+ const validatedProps = chunk7VITUTRA_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
9637
9637
  kind: existing.kind,
9638
9638
  operation: "update",
9639
9639
  id
9640
9640
  });
9641
- const validTo = chunkBELXZTVK_cjs.validateOptionalIsoDate(input.validTo, "validTo");
9641
+ const validTo = chunkNI2GV74U_cjs.validateOptionalIsoDate(input.validTo, "validTo");
9642
9642
  const updateParams = {
9643
9643
  graphId: ctx.graphId,
9644
9644
  id,
@@ -9659,12 +9659,12 @@ async function executeEdgeUpsertUpdate(ctx, input, backend, options) {
9659
9659
  const edgeKind = registration.type;
9660
9660
  const existingProps = JSON.parse(existing.props);
9661
9661
  const mergedProps = { ...existingProps, ...input.props };
9662
- const validatedProps = chunkPDQBCQ34_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
9662
+ const validatedProps = chunk7VITUTRA_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
9663
9663
  kind: existing.kind,
9664
9664
  operation: "update",
9665
9665
  id
9666
9666
  });
9667
- const validTo = chunkBELXZTVK_cjs.validateOptionalIsoDate(input.validTo, "validTo");
9667
+ const validTo = chunkNI2GV74U_cjs.validateOptionalIsoDate(input.validTo, "validTo");
9668
9668
  const updateParams = {
9669
9669
  graphId: ctx.graphId,
9670
9670
  id,
@@ -9816,7 +9816,7 @@ async function executeEdgeGetOrCreateByEndpoints(ctx, kind, fromKind, fromId, to
9816
9816
  const matchOn = options?.matchOn ?? [];
9817
9817
  const registration = getEdgeRegistration(ctx.graph, kind);
9818
9818
  const edgeKind = registration.type;
9819
- const validatedProps = chunkPDQBCQ34_cjs.validateEdgeProps(edgeKind.schema, props, {
9819
+ const validatedProps = chunk7VITUTRA_cjs.validateEdgeProps(edgeKind.schema, props, {
9820
9820
  kind,
9821
9821
  operation: "create"
9822
9822
  });
@@ -9895,7 +9895,7 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
9895
9895
  validateMatchOnFields(edgeKind.schema, matchOn, kind);
9896
9896
  const validated = [];
9897
9897
  for (const item of items) {
9898
- const validatedProps = chunkPDQBCQ34_cjs.validateEdgeProps(edgeKind.schema, item.props, {
9898
+ const validatedProps = chunk7VITUTRA_cjs.validateEdgeProps(edgeKind.schema, item.props, {
9899
9899
  kind,
9900
9900
  operation: "create"
9901
9901
  });
@@ -10428,12 +10428,12 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend) {
10428
10428
  const kind = input.kind;
10429
10429
  const registration = getNodeRegistration(ctx.graph, kind);
10430
10430
  const nodeKind = registration.type;
10431
- const validatedProps = chunkPDQBCQ34_cjs.validateNodeProps(nodeKind.schema, input.props, {
10431
+ const validatedProps = chunk7VITUTRA_cjs.validateNodeProps(nodeKind.schema, input.props, {
10432
10432
  kind,
10433
10433
  operation: "create"
10434
10434
  });
10435
- const validFrom = chunkBELXZTVK_cjs.validateOptionalIsoDate(input.validFrom, "validFrom");
10436
- const validTo = chunkBELXZTVK_cjs.validateOptionalIsoDate(input.validTo, "validTo");
10435
+ const validFrom = chunkNI2GV74U_cjs.validateOptionalIsoDate(input.validFrom, "validFrom");
10436
+ const validTo = chunkNI2GV74U_cjs.validateOptionalIsoDate(input.validTo, "validTo");
10437
10437
  const existingNode = await backend.getNode(ctx.graphId, kind, id);
10438
10438
  if (existingNode && !existingNode.deleted_at) {
10439
10439
  throw createNodeAlreadyExistsError(kind, id);
@@ -10627,12 +10627,12 @@ async function executeNodeUpdate(ctx, input, backend, options) {
10627
10627
  const existingProps = JSON.parse(existing.props);
10628
10628
  const mergedProps = { ...existingProps, ...input.props };
10629
10629
  const nodeKind = registration.type;
10630
- const validatedProps = chunkPDQBCQ34_cjs.validateNodeProps(nodeKind.schema, mergedProps, {
10630
+ const validatedProps = chunk7VITUTRA_cjs.validateNodeProps(nodeKind.schema, mergedProps, {
10631
10631
  kind,
10632
10632
  operation: "update",
10633
10633
  id
10634
10634
  });
10635
- const validTo = chunkBELXZTVK_cjs.validateOptionalIsoDate(input.validTo, "validTo");
10635
+ const validTo = chunkNI2GV74U_cjs.validateOptionalIsoDate(input.validTo, "validTo");
10636
10636
  const uniquenessContext = {
10637
10637
  graphId: ctx.graphId,
10638
10638
  registry: ctx.registry,
@@ -10677,12 +10677,12 @@ async function executeNodeUpsertUpdate(ctx, input, backend, options) {
10677
10677
  const existingProps = JSON.parse(existing.props);
10678
10678
  const mergedProps = { ...existingProps, ...input.props };
10679
10679
  const nodeKind = registration.type;
10680
- const validatedProps = chunkPDQBCQ34_cjs.validateNodeProps(nodeKind.schema, mergedProps, {
10680
+ const validatedProps = chunk7VITUTRA_cjs.validateNodeProps(nodeKind.schema, mergedProps, {
10681
10681
  kind,
10682
10682
  operation: "update",
10683
10683
  id
10684
10684
  });
10685
- const validTo = chunkBELXZTVK_cjs.validateOptionalIsoDate(input.validTo, "validTo");
10685
+ const validTo = chunkNI2GV74U_cjs.validateOptionalIsoDate(input.validTo, "validTo");
10686
10686
  const uniquenessContext = {
10687
10687
  graphId: ctx.graphId,
10688
10688
  registry: ctx.registry,
@@ -10843,7 +10843,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
10843
10843
  const ifExists = options?.ifExists ?? "return";
10844
10844
  const registration = getNodeRegistration(ctx.graph, kind);
10845
10845
  const nodeKind = registration.type;
10846
- const validatedProps = chunkPDQBCQ34_cjs.validateNodeProps(nodeKind.schema, props, {
10846
+ const validatedProps = chunk7VITUTRA_cjs.validateNodeProps(nodeKind.schema, props, {
10847
10847
  kind,
10848
10848
  operation: "create"
10849
10849
  });
@@ -10912,7 +10912,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
10912
10912
  async function executeNodeFindByConstraint(ctx, kind, constraintName, props, backend) {
10913
10913
  const registration = getNodeRegistration(ctx.graph, kind);
10914
10914
  const nodeKind = registration.type;
10915
- const validatedProps = chunkPDQBCQ34_cjs.validateNodeProps(nodeKind.schema, props, {
10915
+ const validatedProps = chunk7VITUTRA_cjs.validateNodeProps(nodeKind.schema, props, {
10916
10916
  kind,
10917
10917
  operation: "create"
10918
10918
  });
@@ -10959,7 +10959,7 @@ async function executeNodeBulkFindByConstraint(ctx, kind, constraintName, items,
10959
10959
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
10960
10960
  const validated = [];
10961
10961
  for (const item of items) {
10962
- const validatedProps = chunkPDQBCQ34_cjs.validateNodeProps(nodeKind.schema, item.props, {
10962
+ const validatedProps = chunk7VITUTRA_cjs.validateNodeProps(nodeKind.schema, item.props, {
10963
10963
  kind,
10964
10964
  operation: "create"
10965
10965
  });
@@ -11053,7 +11053,7 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
11053
11053
  const constraint = resolveConstraint(ctx.graph, kind, constraintName);
11054
11054
  const validated = [];
11055
11055
  for (const item of items) {
11056
- const validatedProps = chunkPDQBCQ34_cjs.validateNodeProps(nodeKind.schema, item.props, {
11056
+ const validatedProps = chunk7VITUTRA_cjs.validateNodeProps(nodeKind.schema, item.props, {
11057
11057
  kind,
11058
11058
  operation: "create"
11059
11059
  });
@@ -11532,7 +11532,7 @@ var Store = class {
11532
11532
  // === Internal: Temporal Filtering ===
11533
11533
  #matchesTemporalMode(row, options) {
11534
11534
  const mode = options?.temporalMode ?? this.#graph.defaults.temporalMode;
11535
- const asOf = options?.asOf ?? chunkBELXZTVK_cjs.nowIso();
11535
+ const asOf = options?.asOf ?? chunkNI2GV74U_cjs.nowIso();
11536
11536
  switch (mode) {
11537
11537
  case "current":
11538
11538
  case "asOf": {
@@ -11565,41 +11565,41 @@ function createStore(graph, backend, options) {
11565
11565
  }
11566
11566
  async function createStoreWithSchema(graph, backend, options) {
11567
11567
  const store = createStore(graph, backend, options);
11568
- const result = await chunkPDQBCQ34_cjs.ensureSchema(backend, graph, options);
11568
+ const result = await chunk7VITUTRA_cjs.ensureSchema(backend, graph, options);
11569
11569
  return [store, result];
11570
11570
  }
11571
11571
 
11572
11572
  Object.defineProperty(exports, "isMetaEdge", {
11573
11573
  enumerable: true,
11574
- get: function () { return chunkPDQBCQ34_cjs.isMetaEdge; }
11574
+ get: function () { return chunk7VITUTRA_cjs.isMetaEdge; }
11575
11575
  });
11576
11576
  Object.defineProperty(exports, "defineGraph", {
11577
11577
  enumerable: true,
11578
- get: function () { return chunkBELXZTVK_cjs.defineGraph; }
11578
+ get: function () { return chunkNI2GV74U_cjs.defineGraph; }
11579
11579
  });
11580
11580
  Object.defineProperty(exports, "getEdgeKinds", {
11581
11581
  enumerable: true,
11582
- get: function () { return chunkBELXZTVK_cjs.getEdgeKinds; }
11582
+ get: function () { return chunkNI2GV74U_cjs.getEdgeKinds; }
11583
11583
  });
11584
11584
  Object.defineProperty(exports, "getNodeKinds", {
11585
11585
  enumerable: true,
11586
- get: function () { return chunkBELXZTVK_cjs.getNodeKinds; }
11586
+ get: function () { return chunkNI2GV74U_cjs.getNodeKinds; }
11587
11587
  });
11588
11588
  Object.defineProperty(exports, "isEdgeType", {
11589
11589
  enumerable: true,
11590
- get: function () { return chunkBELXZTVK_cjs.isEdgeType; }
11590
+ get: function () { return chunkNI2GV74U_cjs.isEdgeType; }
11591
11591
  });
11592
11592
  Object.defineProperty(exports, "isEdgeTypeWithEndpoints", {
11593
11593
  enumerable: true,
11594
- get: function () { return chunkBELXZTVK_cjs.isEdgeTypeWithEndpoints; }
11594
+ get: function () { return chunkNI2GV74U_cjs.isEdgeTypeWithEndpoints; }
11595
11595
  });
11596
11596
  Object.defineProperty(exports, "isGraphDef", {
11597
11597
  enumerable: true,
11598
- get: function () { return chunkBELXZTVK_cjs.isGraphDef; }
11598
+ get: function () { return chunkNI2GV74U_cjs.isGraphDef; }
11599
11599
  });
11600
11600
  Object.defineProperty(exports, "isNodeType", {
11601
11601
  enumerable: true,
11602
- get: function () { return chunkBELXZTVK_cjs.isNodeType; }
11602
+ get: function () { return chunkNI2GV74U_cjs.isNodeType; }
11603
11603
  });
11604
11604
  Object.defineProperty(exports, "CardinalityError", {
11605
11605
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -3,10 +3,10 @@ import { N as NodeType, E as EdgeType } from './types-DMzKq0d5.cjs';
3
3
  export { A as AnyEdgeType, C as Cardinality, a as Collation, D as DeleteBehavior, b as EdgeId, c as EdgeProps, d as EdgeRegistration, e as EdgeTypeWithEndpoints, f as EndpointExistence, G as GraphDefaults, g as NodeId, h as NodeProps, i as NodeRegistration, S as SqlDialect, T as TemporalMode, U as UniqueConstraint, j as UniquenessScope, k as isEdgeType, l as isEdgeTypeWithEndpoints, m as isNodeType } from './types-DMzKq0d5.cjs';
4
4
  import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-GLkwvQvS.cjs';
5
5
  export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-GLkwvQvS.cjs';
6
- import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-CL-QMus7.cjs';
7
- export { a as AggregateResult, b as ConstraintNames, c as CreateEdgeInput, d as CreateNodeInput, e as Edge, f as EdgeAccessor, g as EdgeCollection, h as EdgeFindByEndpointsOptions, i as EdgeGetOrCreateByEndpointsOptions, j as EdgeGetOrCreateByEndpointsResult, k as EmbeddingSchema, l as EmbeddingValue, m as ExecutableAggregateQuery, n as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, H as HookContext, I as IfExistsMode, N as Node, o as NodeAccessor, p as NodeAlias, q as NodeCollection, r as NodeGetOrCreateByConstraintOptions, s as NodeGetOrCreateByConstraintResult, t as NodeRef, O as OperationHookContext, P as PaginateOptions, u as PaginatedResult, v as Predicate, w as PreparedQuery, x as PropsAccessor, y as QueryHookContext, z as QueryOptions, R as RecursiveTraversalOptions, S as SelectContext, B as SelectableEdge, D as SelectableNode, J as Store, K as StoreHooks, L as StoreOptions, M as StreamOptions, U as TransactionContext, V as TypedEdgeCollection, W as UnionableQuery, X as UpdateEdgeInput, Y as UpdateNodeInput, Z as createStore, _ as createStoreWithSchema, $ as embedding, a0 as exists, a1 as fieldRef, a2 as getEmbeddingDimensions, a3 as inSubquery, a4 as isEmbeddingSchema, a5 as isParameterRef, a6 as notExists, a7 as notInSubquery, a8 as param } from './store-CL-QMus7.cjs';
8
- import { G as GraphDef, K as KindRegistry } from './manager-Cu3JQN0H.cjs';
9
- export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, d as defineGraph, g as getEdgeKinds, e as getNodeKinds, i as isGraphDef } from './manager-Cu3JQN0H.cjs';
6
+ import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-DgzIgrmn.cjs';
7
+ export { a as AggregateResult, b as ConstraintNames, c as CreateEdgeInput, d as CreateNodeInput, e as Edge, f as EdgeAccessor, g as EdgeCollection, h as EdgeFindByEndpointsOptions, i as EdgeGetOrCreateByEndpointsOptions, j as EdgeGetOrCreateByEndpointsResult, k as EmbeddingSchema, l as EmbeddingValue, m as ExecutableAggregateQuery, n as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, H as HookContext, I as IfExistsMode, N as Node, o as NodeAccessor, p as NodeAlias, q as NodeCollection, r as NodeGetOrCreateByConstraintOptions, s as NodeGetOrCreateByConstraintResult, t as NodeRef, O as OperationHookContext, P as PaginateOptions, u as PaginatedResult, v as Predicate, w as PreparedQuery, x as PropsAccessor, y as QueryHookContext, z as QueryOptions, R as RecursiveTraversalOptions, S as SelectContext, B as SelectableEdge, D as SelectableNode, J as Store, K as StoreHooks, L as StoreOptions, M as StreamOptions, U as TransactionContext, V as TypedEdgeCollection, W as UnionableQuery, X as UpdateEdgeInput, Y as UpdateNodeInput, Z as createStore, _ as createStoreWithSchema, $ as embedding, a0 as exists, a1 as fieldRef, a2 as getEmbeddingDimensions, a3 as inSubquery, a4 as isEmbeddingSchema, a5 as isParameterRef, a6 as notExists, a7 as notInSubquery, a8 as param } from './store-DgzIgrmn.cjs';
8
+ import { G as GraphDef, K as KindRegistry } from './manager-DGSnJa1v.cjs';
9
+ export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, d as defineGraph, g as getEdgeKinds, e as getNodeKinds, i as isGraphDef } from './manager-DGSnJa1v.cjs';
10
10
  export { C as CardinalityError, a as CompilerInvariantError, b as ConfigurationError, D as DatabaseOperationError, c as DisjointError, E as EdgeNotFoundError, d as EndpointError, e as EndpointNotFoundError, f as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, g as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaMismatchError, T as TypeGraphError, h as TypeGraphErrorOptions, U as UniquenessError, i as UnsupportedPredicateError, V as ValidationError, j as ValidationErrorDetails, k as ValidationIssue, l as VersionConflictError, m as getErrorSuggestion, n as isConstraintError, o as isSystemError, p as isTypeGraphError, q as isUserRecoverable } from './index-QTnQwakS.cjs';
11
11
  import { A as AggregateExpr, F as FieldRef, C as ComparisonOp, a as AggregateComparisonPredicate } from './ast-Bh2NDeaK.cjs';
12
12
  export { J as JsonPointer, b as JsonPointerFor, c as JsonPointerInput, d as JsonPointerSegment, e as JsonPointerSegments, f as JsonPointerSegmentsFor, M as MAX_JSON_POINTER_DEPTH, O as OrderSpec, P as ParameterRef, R as ResolveJsonPointer, g as ResolveJsonPointerSegments, S as SortDirection, T as TraversalExpansion, j as joinJsonPointers, h as jsonPointer, n as normalizeJsonPointer, p as parseJsonPointer } from './ast-Bh2NDeaK.cjs';
package/dist/index.d.ts CHANGED
@@ -3,10 +3,10 @@ import { N as NodeType, E as EdgeType } from './types-DMzKq0d5.js';
3
3
  export { A as AnyEdgeType, C as Cardinality, a as Collation, D as DeleteBehavior, b as EdgeId, c as EdgeProps, d as EdgeRegistration, e as EdgeTypeWithEndpoints, f as EndpointExistence, G as GraphDefaults, g as NodeId, h as NodeProps, i as NodeRegistration, S as SqlDialect, T as TemporalMode, U as UniqueConstraint, j as UniquenessScope, k as isEdgeType, l as isEdgeTypeWithEndpoints, m as isNodeType } from './types-DMzKq0d5.js';
4
4
  import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-1YJKodRv.js';
5
5
  export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-1YJKodRv.js';
6
- import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-DJpuUOSL.js';
7
- export { a as AggregateResult, b as ConstraintNames, c as CreateEdgeInput, d as CreateNodeInput, e as Edge, f as EdgeAccessor, g as EdgeCollection, h as EdgeFindByEndpointsOptions, i as EdgeGetOrCreateByEndpointsOptions, j as EdgeGetOrCreateByEndpointsResult, k as EmbeddingSchema, l as EmbeddingValue, m as ExecutableAggregateQuery, n as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, H as HookContext, I as IfExistsMode, N as Node, o as NodeAccessor, p as NodeAlias, q as NodeCollection, r as NodeGetOrCreateByConstraintOptions, s as NodeGetOrCreateByConstraintResult, t as NodeRef, O as OperationHookContext, P as PaginateOptions, u as PaginatedResult, v as Predicate, w as PreparedQuery, x as PropsAccessor, y as QueryHookContext, z as QueryOptions, R as RecursiveTraversalOptions, S as SelectContext, B as SelectableEdge, D as SelectableNode, J as Store, K as StoreHooks, L as StoreOptions, M as StreamOptions, U as TransactionContext, V as TypedEdgeCollection, W as UnionableQuery, X as UpdateEdgeInput, Y as UpdateNodeInput, Z as createStore, _ as createStoreWithSchema, $ as embedding, a0 as exists, a1 as fieldRef, a2 as getEmbeddingDimensions, a3 as inSubquery, a4 as isEmbeddingSchema, a5 as isParameterRef, a6 as notExists, a7 as notInSubquery, a8 as param } from './store-DJpuUOSL.js';
8
- import { G as GraphDef, K as KindRegistry } from './manager-Ba2CXGMG.js';
9
- export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, d as defineGraph, g as getEdgeKinds, e as getNodeKinds, i as isGraphDef } from './manager-Ba2CXGMG.js';
6
+ import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-wqOO3GSy.js';
7
+ export { a as AggregateResult, b as ConstraintNames, c as CreateEdgeInput, d as CreateNodeInput, e as Edge, f as EdgeAccessor, g as EdgeCollection, h as EdgeFindByEndpointsOptions, i as EdgeGetOrCreateByEndpointsOptions, j as EdgeGetOrCreateByEndpointsResult, k as EmbeddingSchema, l as EmbeddingValue, m as ExecutableAggregateQuery, n as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, H as HookContext, I as IfExistsMode, N as Node, o as NodeAccessor, p as NodeAlias, q as NodeCollection, r as NodeGetOrCreateByConstraintOptions, s as NodeGetOrCreateByConstraintResult, t as NodeRef, O as OperationHookContext, P as PaginateOptions, u as PaginatedResult, v as Predicate, w as PreparedQuery, x as PropsAccessor, y as QueryHookContext, z as QueryOptions, R as RecursiveTraversalOptions, S as SelectContext, B as SelectableEdge, D as SelectableNode, J as Store, K as StoreHooks, L as StoreOptions, M as StreamOptions, U as TransactionContext, V as TypedEdgeCollection, W as UnionableQuery, X as UpdateEdgeInput, Y as UpdateNodeInput, Z as createStore, _ as createStoreWithSchema, $ as embedding, a0 as exists, a1 as fieldRef, a2 as getEmbeddingDimensions, a3 as inSubquery, a4 as isEmbeddingSchema, a5 as isParameterRef, a6 as notExists, a7 as notInSubquery, a8 as param } from './store-wqOO3GSy.js';
8
+ import { G as GraphDef, K as KindRegistry } from './manager-BCLhWysp.js';
9
+ export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, d as defineGraph, g as getEdgeKinds, e as getNodeKinds, i as isGraphDef } from './manager-BCLhWysp.js';
10
10
  export { C as CardinalityError, a as CompilerInvariantError, b as ConfigurationError, D as DatabaseOperationError, c as DisjointError, E as EdgeNotFoundError, d as EndpointError, e as EndpointNotFoundError, f as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, g as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaMismatchError, T as TypeGraphError, h as TypeGraphErrorOptions, U as UniquenessError, i as UnsupportedPredicateError, V as ValidationError, j as ValidationErrorDetails, k as ValidationIssue, l as VersionConflictError, m as getErrorSuggestion, n as isConstraintError, o as isSystemError, p as isTypeGraphError, q as isUserRecoverable } from './index-QTnQwakS.js';
11
11
  import { A as AggregateExpr, F as FieldRef, C as ComparisonOp, a as AggregateComparisonPredicate } from './ast-COMyNeMn.js';
12
12
  export { J as JsonPointer, b as JsonPointerFor, c as JsonPointerInput, d as JsonPointerSegment, e as JsonPointerSegments, f as JsonPointerSegmentsFor, M as MAX_JSON_POINTER_DEPTH, O as OrderSpec, P as ParameterRef, R as ResolveJsonPointer, g as ResolveJsonPointerSegments, S as SortDirection, T as TraversalExpansion, j as joinJsonPointers, h as jsonPointer, n as normalizeJsonPointer, p as parseJsonPointer } from './ast-COMyNeMn.js';
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { META_EDGE_BRAND, META_EDGE_SUB_CLASS_OF, META_EDGE_NARROWER, META_EDGE_BROADER, META_EDGE_RELATED_TO, META_EDGE_EQUIVALENT_TO, META_EDGE_SAME_AS, META_EDGE_DIFFERENT_FROM, META_EDGE_DISJOINT_WITH, META_EDGE_HAS_PART, META_EDGE_PART_OF, META_EDGE_INVERSE_OF, META_EDGE_IMPLIES, ensureSchema, computeClosuresFromOntology, createEmptyClosures, KindRegistry, validateNodeProps, validateEdgeProps } from './chunk-SH237DWD.js';
2
- export { isMetaEdge } from './chunk-SH237DWD.js';
3
- import { NODE_TYPE_BRAND, EDGE_TYPE_BRAND, nowIso, validateOptionalIsoDate, getNodeKinds, getEdgeKinds } from './chunk-JUZWF5NX.js';
4
- export { defineGraph, getEdgeKinds, getNodeKinds, isEdgeType, isEdgeTypeWithEndpoints, isGraphDef, isNodeType } from './chunk-JUZWF5NX.js';
1
+ import { META_EDGE_BRAND, META_EDGE_SUB_CLASS_OF, META_EDGE_NARROWER, META_EDGE_BROADER, META_EDGE_RELATED_TO, META_EDGE_EQUIVALENT_TO, META_EDGE_SAME_AS, META_EDGE_DIFFERENT_FROM, META_EDGE_DISJOINT_WITH, META_EDGE_HAS_PART, META_EDGE_PART_OF, META_EDGE_INVERSE_OF, META_EDGE_IMPLIES, ensureSchema, computeClosuresFromOntology, createEmptyClosures, KindRegistry, validateNodeProps, validateEdgeProps } from './chunk-PYV4ADC6.js';
2
+ export { isMetaEdge } from './chunk-PYV4ADC6.js';
3
+ import { NODE_TYPE_BRAND, EDGE_TYPE_BRAND, nowIso, validateOptionalIsoDate, getNodeKinds, getEdgeKinds } from './chunk-IRFD3MEU.js';
4
+ export { defineGraph, getEdgeKinds, getNodeKinds, isEdgeType, isEdgeTypeWithEndpoints, isGraphDef, isNodeType } from './chunk-IRFD3MEU.js';
5
5
  import { ConfigurationError, UnsupportedPredicateError, ValidationError, CompilerInvariantError, KindNotFoundError, RestrictedDeleteError, NodeNotFoundError, DatabaseOperationError, EdgeNotFoundError, NodeConstraintNotFoundError, UniquenessError, EndpointNotFoundError, CardinalityError, EndpointError, DisjointError } from './chunk-SJ2QMDXY.js';
6
6
  export { CardinalityError, CompilerInvariantError, ConfigurationError, DatabaseOperationError, DisjointError, EdgeNotFoundError, EndpointError, EndpointNotFoundError, KindNotFoundError, MigrationError, NodeConstraintNotFoundError, NodeNotFoundError, RestrictedDeleteError, SchemaMismatchError, TypeGraphError, UniquenessError, UnsupportedPredicateError, ValidationError, VersionConflictError, getErrorSuggestion, isConstraintError, isSystemError, isTypeGraphError, isUserRecoverable } from './chunk-SJ2QMDXY.js';
7
7
  import { getDialect, NODE_META_KEYS, EDGE_META_KEYS } from './chunk-54WJF3DW.js';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkBELXZTVK_cjs = require('../chunk-BELXZTVK.cjs');
3
+ var chunkNI2GV74U_cjs = require('../chunk-NI2GV74U.cjs');
4
4
  require('../chunk-44SXEVF4.cjs');
5
5
  var zod = require('zod');
6
6
 
@@ -121,8 +121,8 @@ async function exportGraph(store, options) {
121
121
  const graph = store.graph;
122
122
  const graphId = store.graphId;
123
123
  const backend = store.backend;
124
- const nodeKindsToExport = options_.nodeKinds ?? chunkBELXZTVK_cjs.getNodeKinds(graph);
125
- const edgeKindsToExport = options_.edgeKinds ?? chunkBELXZTVK_cjs.getEdgeKinds(graph);
124
+ const nodeKindsToExport = options_.nodeKinds ?? chunkNI2GV74U_cjs.getNodeKinds(graph);
125
+ const edgeKindsToExport = options_.edgeKinds ?? chunkNI2GV74U_cjs.getEdgeKinds(graph);
126
126
  const nodes = [];
127
127
  for (const kind of nodeKindsToExport) {
128
128
  const kindNodes = await exportNodesOfKind(backend, graphId, kind, options_);
@@ -136,7 +136,7 @@ async function exportGraph(store, options) {
136
136
  const schemaVersion = await backend.getActiveSchema(graphId);
137
137
  return {
138
138
  formatVersion: FORMAT_VERSION,
139
- exportedAt: chunkBELXZTVK_cjs.nowIso(),
139
+ exportedAt: chunkNI2GV74U_cjs.nowIso(),
140
140
  source: {
141
141
  type: "typegraph-export",
142
142
  graphId,
@@ -284,7 +284,7 @@ async function importGraph(store, data, options) {
284
284
  }
285
285
  function buildNodeSchemaMap(graph) {
286
286
  const map = /* @__PURE__ */ new Map();
287
- for (const kindName of chunkBELXZTVK_cjs.getNodeKinds(graph)) {
287
+ for (const kindName of chunkNI2GV74U_cjs.getNodeKinds(graph)) {
288
288
  const registration = graph.nodes[kindName];
289
289
  map.set(kindName, {
290
290
  registration,
@@ -295,7 +295,7 @@ function buildNodeSchemaMap(graph) {
295
295
  }
296
296
  function buildEdgeSchemaMap(graph) {
297
297
  const map = /* @__PURE__ */ new Map();
298
- for (const kindName of chunkBELXZTVK_cjs.getEdgeKinds(graph)) {
298
+ for (const kindName of chunkNI2GV74U_cjs.getEdgeKinds(graph)) {
299
299
  const registration = graph.edges[kindName];
300
300
  map.set(kindName, {
301
301
  registration,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { G as GraphDef } from '../manager-Cu3JQN0H.cjs';
3
- import { J as Store } from '../store-CL-QMus7.cjs';
2
+ import { G as GraphDef } from '../manager-DGSnJa1v.cjs';
3
+ import { J as Store } from '../store-DgzIgrmn.cjs';
4
4
  import '../types-DMzKq0d5.cjs';
5
5
  import '../types-GLkwvQvS.cjs';
6
6
  import 'drizzle-orm';
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { G as GraphDef } from '../manager-Ba2CXGMG.js';
3
- import { J as Store } from '../store-DJpuUOSL.js';
2
+ import { G as GraphDef } from '../manager-BCLhWysp.js';
3
+ import { J as Store } from '../store-wqOO3GSy.js';
4
4
  import '../types-DMzKq0d5.js';
5
5
  import '../types-1YJKodRv.js';
6
6
  import 'drizzle-orm';
@@ -1,4 +1,4 @@
1
- import { getNodeKinds, getEdgeKinds, nowIso } from '../chunk-JUZWF5NX.js';
1
+ import { getNodeKinds, getEdgeKinds, nowIso } from '../chunk-IRFD3MEU.js';
2
2
  import '../chunk-SJ2QMDXY.js';
3
3
  import { z } from 'zod';
4
4
 
@@ -1,4 +1,4 @@
1
- import { i as NodeRegistration, d as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, N as NodeType, e as EdgeTypeWithEndpoints, G as GraphDefaults, A as AnyEdgeType } from './types-DMzKq0d5.js';
1
+ import { i as NodeRegistration, d as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, N as NodeType, A as AnyEdgeType, G as GraphDefaults } from './types-DMzKq0d5.js';
2
2
  import { O as OntologyRelation, d as SerializedNodeDef, e as SerializedEdgeDef, j as SerializedSchema, G as GraphBackend, n as SchemaVersionRow } from './types-1YJKodRv.js';
3
3
 
4
4
  /** Brand key for GraphDef */
@@ -6,15 +6,17 @@ declare const GRAPH_DEF_BRAND: "__graphDef";
6
6
  /**
7
7
  * An edge entry in the graph definition.
8
8
  * Can be:
9
- * - EdgeType directly (if it has from/to defined)
9
+ * - EdgeType directly (constrained or unconstrained)
10
10
  * - EdgeRegistration object (always works, can override/narrow defaults)
11
11
  */
12
- type EdgeEntry = EdgeRegistration | EdgeTypeWithEndpoints;
12
+ type EdgeEntry = EdgeRegistration | AnyEdgeType;
13
13
  /**
14
14
  * Normalized edge map type - all entries become EdgeRegistration.
15
+ * For bare EdgeTypes, constrained endpoints are extracted from the type;
16
+ * unconstrained edges fall back to all node types in the graph.
15
17
  */
16
- type NormalizedEdges<TEdges extends Record<string, EdgeEntry>> = {
17
- [K in keyof TEdges]: TEdges[K] extends EdgeRegistration ? TEdges[K] : TEdges[K] extends EdgeTypeWithEndpoints ? EdgeRegistration<TEdges[K], TEdges[K]["from"][number], TEdges[K]["to"][number]> : never;
18
+ type NormalizedEdges<TNodes extends Record<string, NodeRegistration>, TEdges extends Record<string, EdgeEntry>> = {
19
+ [K in keyof TEdges]: TEdges[K] extends EdgeRegistration ? TEdges[K] : TEdges[K] extends AnyEdgeType ? EdgeRegistration<TEdges[K], TEdges[K]["from"] extends readonly (infer N extends NodeType)[] ? N : TNodes[keyof TNodes]["type"], TEdges[K]["to"] extends readonly (infer N extends NodeType)[] ? N : TNodes[keyof TNodes]["type"]> : never;
18
20
  };
19
21
  /**
20
22
  * Configuration for defineGraph.
@@ -109,7 +111,7 @@ type AllEdgeTypes<G extends GraphDef> = {
109
111
  * });
110
112
  * ```
111
113
  */
112
- declare function defineGraph<const TNodes extends Record<string, NodeRegistration<NodeType>>, const TEdges extends Record<string, EdgeEntry>, const TOntology extends readonly OntologyRelation[]>(config: GraphDefConfig<TNodes, TEdges, TOntology>): GraphDef<TNodes, NormalizedEdges<TEdges>, TOntology>;
114
+ declare function defineGraph<const TNodes extends Record<string, NodeRegistration<NodeType>>, const TEdges extends Record<string, EdgeEntry>, const TOntology extends readonly OntologyRelation[]>(config: GraphDefConfig<TNodes, TEdges, TOntology>): GraphDef<TNodes, NormalizedEdges<TNodes, TEdges>, TOntology>;
113
115
  /**
114
116
  * Checks if a value is a GraphDef.
115
117
  */
@@ -1,4 +1,4 @@
1
- import { i as NodeRegistration, d as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, N as NodeType, e as EdgeTypeWithEndpoints, G as GraphDefaults, A as AnyEdgeType } from './types-DMzKq0d5.cjs';
1
+ import { i as NodeRegistration, d as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, N as NodeType, A as AnyEdgeType, G as GraphDefaults } from './types-DMzKq0d5.cjs';
2
2
  import { O as OntologyRelation, d as SerializedNodeDef, e as SerializedEdgeDef, j as SerializedSchema, G as GraphBackend, n as SchemaVersionRow } from './types-GLkwvQvS.cjs';
3
3
 
4
4
  /** Brand key for GraphDef */
@@ -6,15 +6,17 @@ declare const GRAPH_DEF_BRAND: "__graphDef";
6
6
  /**
7
7
  * An edge entry in the graph definition.
8
8
  * Can be:
9
- * - EdgeType directly (if it has from/to defined)
9
+ * - EdgeType directly (constrained or unconstrained)
10
10
  * - EdgeRegistration object (always works, can override/narrow defaults)
11
11
  */
12
- type EdgeEntry = EdgeRegistration | EdgeTypeWithEndpoints;
12
+ type EdgeEntry = EdgeRegistration | AnyEdgeType;
13
13
  /**
14
14
  * Normalized edge map type - all entries become EdgeRegistration.
15
+ * For bare EdgeTypes, constrained endpoints are extracted from the type;
16
+ * unconstrained edges fall back to all node types in the graph.
15
17
  */
16
- type NormalizedEdges<TEdges extends Record<string, EdgeEntry>> = {
17
- [K in keyof TEdges]: TEdges[K] extends EdgeRegistration ? TEdges[K] : TEdges[K] extends EdgeTypeWithEndpoints ? EdgeRegistration<TEdges[K], TEdges[K]["from"][number], TEdges[K]["to"][number]> : never;
18
+ type NormalizedEdges<TNodes extends Record<string, NodeRegistration>, TEdges extends Record<string, EdgeEntry>> = {
19
+ [K in keyof TEdges]: TEdges[K] extends EdgeRegistration ? TEdges[K] : TEdges[K] extends AnyEdgeType ? EdgeRegistration<TEdges[K], TEdges[K]["from"] extends readonly (infer N extends NodeType)[] ? N : TNodes[keyof TNodes]["type"], TEdges[K]["to"] extends readonly (infer N extends NodeType)[] ? N : TNodes[keyof TNodes]["type"]> : never;
18
20
  };
19
21
  /**
20
22
  * Configuration for defineGraph.
@@ -109,7 +111,7 @@ type AllEdgeTypes<G extends GraphDef> = {
109
111
  * });
110
112
  * ```
111
113
  */
112
- declare function defineGraph<const TNodes extends Record<string, NodeRegistration<NodeType>>, const TEdges extends Record<string, EdgeEntry>, const TOntology extends readonly OntologyRelation[]>(config: GraphDefConfig<TNodes, TEdges, TOntology>): GraphDef<TNodes, NormalizedEdges<TEdges>, TOntology>;
114
+ declare function defineGraph<const TNodes extends Record<string, NodeRegistration<NodeType>>, const TEdges extends Record<string, EdgeEntry>, const TOntology extends readonly OntologyRelation[]>(config: GraphDefConfig<TNodes, TEdges, TOntology>): GraphDef<TNodes, NormalizedEdges<TNodes, TEdges>, TOntology>;
113
115
  /**
114
116
  * Checks if a value is a GraphDef.
115
117
  */