@nicia-ai/typegraph 0.35.0 → 0.36.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 (116) hide show
  1. package/dist/backend/postgres/index.cjs +19 -19
  2. package/dist/backend/postgres/index.js +6 -6
  3. package/dist/backend/postgres/pglite.cjs +11 -11
  4. package/dist/backend/postgres/pglite.js +6 -6
  5. package/dist/backend/sqlite/index.cjs +9 -9
  6. package/dist/backend/sqlite/index.js +6 -6
  7. package/dist/backend/sqlite/libsql.cjs +8 -8
  8. package/dist/backend/sqlite/libsql.js +6 -6
  9. package/dist/backend/sqlite/local.cjs +16 -16
  10. package/dist/backend/sqlite/local.js +6 -6
  11. package/dist/{chunk-VPYHY3LJ.cjs → chunk-2THZ3TQI.cjs} +11 -11
  12. package/dist/{chunk-VPYHY3LJ.cjs.map → chunk-2THZ3TQI.cjs.map} +1 -1
  13. package/dist/{chunk-EM3CWPND.cjs → chunk-456Z2U7Y.cjs} +51 -51
  14. package/dist/{chunk-EM3CWPND.cjs.map → chunk-456Z2U7Y.cjs.map} +1 -1
  15. package/dist/{chunk-GSQ6NPH6.cjs → chunk-4BCU6VFZ.cjs} +7 -7
  16. package/dist/{chunk-GSQ6NPH6.cjs.map → chunk-4BCU6VFZ.cjs.map} +1 -1
  17. package/dist/chunk-4BMPGT35.cjs +12 -0
  18. package/dist/{chunk-GUR2FNB5.cjs.map → chunk-4BMPGT35.cjs.map} +1 -1
  19. package/dist/{chunk-WJT7OU7E.cjs → chunk-4CAXEB2F.cjs} +124 -92
  20. package/dist/chunk-4CAXEB2F.cjs.map +1 -0
  21. package/dist/{chunk-WDBCBWC4.js → chunk-4GX2JJXS.js} +6 -6
  22. package/dist/{chunk-WDBCBWC4.js.map → chunk-4GX2JJXS.js.map} +1 -1
  23. package/dist/{chunk-UES55P7G.js → chunk-5DIPR3L3.js} +284 -154
  24. package/dist/chunk-5DIPR3L3.js.map +1 -0
  25. package/dist/{chunk-CZQ3FO2Q.js → chunk-5VTR2F2K.js} +49 -16
  26. package/dist/chunk-5VTR2F2K.js.map +1 -0
  27. package/dist/{chunk-CTTSDJLY.cjs → chunk-5W4L6DLF.cjs} +11 -11
  28. package/dist/{chunk-CTTSDJLY.cjs.map → chunk-5W4L6DLF.cjs.map} +1 -1
  29. package/dist/{chunk-J7WFGBJR.cjs → chunk-7BQLPXK6.cjs} +865 -735
  30. package/dist/chunk-7BQLPXK6.cjs.map +1 -0
  31. package/dist/{chunk-3TWF3SH4.js → chunk-BJVEU3ZL.js} +7 -7
  32. package/dist/{chunk-3TWF3SH4.js.map → chunk-BJVEU3ZL.js.map} +1 -1
  33. package/dist/{chunk-LGEALRC6.cjs → chunk-DIK74MXX.cjs} +18 -2
  34. package/dist/chunk-DIK74MXX.cjs.map +1 -0
  35. package/dist/{chunk-QNKSQTKQ.js → chunk-DN5VP4JC.js} +48 -17
  36. package/dist/chunk-DN5VP4JC.js.map +1 -0
  37. package/dist/{chunk-4JEZZJ6S.cjs → chunk-HW3LW7DH.cjs} +39 -39
  38. package/dist/{chunk-4JEZZJ6S.cjs.map → chunk-HW3LW7DH.cjs.map} +1 -1
  39. package/dist/{chunk-JBTOYDMN.js → chunk-IU46OHVW.js} +4 -4
  40. package/dist/{chunk-JBTOYDMN.js.map → chunk-IU46OHVW.js.map} +1 -1
  41. package/dist/{chunk-FL472AMI.cjs → chunk-J3LEGNQB.cjs} +8 -8
  42. package/dist/{chunk-FL472AMI.cjs.map → chunk-J3LEGNQB.cjs.map} +1 -1
  43. package/dist/{chunk-O7UN7OXA.cjs → chunk-JFMEONLG.cjs} +80 -80
  44. package/dist/{chunk-O7UN7OXA.cjs.map → chunk-JFMEONLG.cjs.map} +1 -1
  45. package/dist/{chunk-I7ZUZKFD.js → chunk-JFUPDJXD.js} +3 -3
  46. package/dist/{chunk-I7ZUZKFD.js.map → chunk-JFUPDJXD.js.map} +1 -1
  47. package/dist/{chunk-K3PPLHY7.js → chunk-M75SUBFG.js} +7 -7
  48. package/dist/{chunk-K3PPLHY7.js.map → chunk-M75SUBFG.js.map} +1 -1
  49. package/dist/{chunk-CK5BVQOW.cjs → chunk-PWGX5DF5.cjs} +79 -79
  50. package/dist/{chunk-CK5BVQOW.cjs.map → chunk-PWGX5DF5.cjs.map} +1 -1
  51. package/dist/{chunk-KMI7LYAF.js → chunk-PZKNKG5M.js} +8 -8
  52. package/dist/{chunk-KMI7LYAF.js.map → chunk-PZKNKG5M.js.map} +1 -1
  53. package/dist/{chunk-55MZDDZV.js → chunk-RAXU3RMB.js} +4 -4
  54. package/dist/{chunk-55MZDDZV.js.map → chunk-RAXU3RMB.js.map} +1 -1
  55. package/dist/{chunk-BLZDPRXT.cjs → chunk-RSSQKPSZ.cjs} +5 -5
  56. package/dist/{chunk-BLZDPRXT.cjs.map → chunk-RSSQKPSZ.cjs.map} +1 -1
  57. package/dist/{chunk-RGPG7EOJ.js → chunk-S5F7ZLP2.js} +3 -3
  58. package/dist/{chunk-RGPG7EOJ.js.map → chunk-S5F7ZLP2.js.map} +1 -1
  59. package/dist/{chunk-QWEUYILR.js → chunk-SKCOUWAX.js} +3 -3
  60. package/dist/{chunk-QWEUYILR.js.map → chunk-SKCOUWAX.js.map} +1 -1
  61. package/dist/{chunk-QOTI55H7.js → chunk-SXGE7ITL.js} +4 -4
  62. package/dist/{chunk-QOTI55H7.js.map → chunk-SXGE7ITL.js.map} +1 -1
  63. package/dist/{chunk-RGP33ZJ5.js → chunk-VQEXF5D4.js} +7 -7
  64. package/dist/{chunk-RGP33ZJ5.js.map → chunk-VQEXF5D4.js.map} +1 -1
  65. package/dist/{chunk-MP2JQKSG.js → chunk-WI7ISNQF.js} +17 -3
  66. package/dist/chunk-WI7ISNQF.js.map +1 -0
  67. package/dist/{chunk-4TOD4LBZ.cjs → chunk-X4JBT642.cjs} +29 -29
  68. package/dist/{chunk-4TOD4LBZ.cjs.map → chunk-X4JBT642.cjs.map} +1 -1
  69. package/dist/{chunk-EMF62TZG.cjs → chunk-ZAMFOJ5P.cjs} +86 -86
  70. package/dist/{chunk-EMF62TZG.cjs.map → chunk-ZAMFOJ5P.cjs.map} +1 -1
  71. package/dist/{chunk-VSPCZAXF.js → chunk-ZIGXMKQQ.js} +3 -3
  72. package/dist/{chunk-VSPCZAXF.js.map → chunk-ZIGXMKQQ.js.map} +1 -1
  73. package/dist/{chunk-XOX22WHL.cjs → chunk-ZUNQ5BEP.cjs} +104 -71
  74. package/dist/chunk-ZUNQ5BEP.cjs.map +1 -0
  75. package/dist/graph-extension/index.cjs +19 -19
  76. package/dist/graph-extension/index.d.cts +1 -1
  77. package/dist/graph-extension/index.d.ts +1 -1
  78. package/dist/graph-extension/index.js +4 -4
  79. package/dist/graph-merge/index.cjs +82 -82
  80. package/dist/graph-merge/index.cjs.map +1 -1
  81. package/dist/graph-merge/index.d.cts +2 -2
  82. package/dist/graph-merge/index.d.ts +2 -2
  83. package/dist/graph-merge/index.js +13 -13
  84. package/dist/graph-merge/index.js.map +1 -1
  85. package/dist/{index-6CSUAq-x.d.ts → index-BFvdmBPV.d.ts} +68 -1
  86. package/dist/{index-Bks_3HHK.d.cts → index-BLtQWKRj.d.cts} +68 -1
  87. package/dist/index.cjs +144 -136
  88. package/dist/index.d.cts +3 -3
  89. package/dist/index.d.ts +3 -3
  90. package/dist/index.js +14 -14
  91. package/dist/interchange/index.cjs +27 -26
  92. package/dist/interchange/index.d.cts +1 -1
  93. package/dist/interchange/index.d.ts +1 -1
  94. package/dist/interchange/index.js +9 -8
  95. package/dist/profiler/index.d.cts +1 -1
  96. package/dist/profiler/index.d.ts +1 -1
  97. package/dist/provenance/index.cjs +31 -31
  98. package/dist/provenance/index.d.cts +1 -1
  99. package/dist/provenance/index.d.ts +1 -1
  100. package/dist/provenance/index.js +4 -4
  101. package/dist/schema/index.cjs +31 -31
  102. package/dist/schema/index.d.cts +1 -1
  103. package/dist/schema/index.d.ts +1 -1
  104. package/dist/schema/index.js +7 -7
  105. package/dist/{store-view-BSpqvAxK.d.cts → store-view-9KDOpZzF.d.cts} +250 -36
  106. package/dist/{store-view-CKbHFRnn.d.ts → store-view-DplHC3Nt.d.ts} +250 -36
  107. package/package.json +1 -1
  108. package/dist/chunk-CZQ3FO2Q.js.map +0 -1
  109. package/dist/chunk-GUR2FNB5.cjs +0 -12
  110. package/dist/chunk-J7WFGBJR.cjs.map +0 -1
  111. package/dist/chunk-LGEALRC6.cjs.map +0 -1
  112. package/dist/chunk-MP2JQKSG.js.map +0 -1
  113. package/dist/chunk-QNKSQTKQ.js.map +0 -1
  114. package/dist/chunk-UES55P7G.js.map +0 -1
  115. package/dist/chunk-WJT7OU7E.cjs.map +0 -1
  116. package/dist/chunk-XOX22WHL.cjs.map +0 -1
@@ -1,33 +1,33 @@
1
1
  'use strict';
2
2
 
3
+ var chunk2THZ3TQI_cjs = require('./chunk-2THZ3TQI.cjs');
3
4
  var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
4
- var chunkVPYHY3LJ_cjs = require('./chunk-VPYHY3LJ.cjs');
5
5
  var chunkUUT7UN2N_cjs = require('./chunk-UUT7UN2N.cjs');
6
6
  var chunkTEDRJXOG_cjs = require('./chunk-TEDRJXOG.cjs');
7
- var chunkFL472AMI_cjs = require('./chunk-FL472AMI.cjs');
8
- var chunkGSQ6NPH6_cjs = require('./chunk-GSQ6NPH6.cjs');
9
- var chunkBLZDPRXT_cjs = require('./chunk-BLZDPRXT.cjs');
7
+ var chunkJ3LEGNQB_cjs = require('./chunk-J3LEGNQB.cjs');
8
+ var chunk4BCU6VFZ_cjs = require('./chunk-4BCU6VFZ.cjs');
9
+ var chunkRSSQKPSZ_cjs = require('./chunk-RSSQKPSZ.cjs');
10
10
  var chunkH7YNSMA7_cjs = require('./chunk-H7YNSMA7.cjs');
11
11
  var chunkDI74SMXS_cjs = require('./chunk-DI74SMXS.cjs');
12
- var chunkLGEALRC6_cjs = require('./chunk-LGEALRC6.cjs');
12
+ var chunkDIK74MXX_cjs = require('./chunk-DIK74MXX.cjs');
13
13
  var zod = require('zod');
14
14
 
15
15
  // src/core/node.ts
16
16
  function validateSchemaKeys(schema, name) {
17
- chunkGSQ6NPH6_cjs.assertSchemaKeysAreFree(
17
+ chunk4BCU6VFZ_cjs.assertSchemaKeysAreFree(
18
18
  "Node",
19
19
  name,
20
20
  Object.keys(schema.shape),
21
- chunkGSQ6NPH6_cjs.RESERVED_NODE_KEYS
21
+ chunk4BCU6VFZ_cjs.RESERVED_NODE_KEYS
22
22
  );
23
23
  }
24
24
  function defineNode(name, options) {
25
25
  validateSchemaKeys(options.schema, name);
26
26
  if (options.annotations !== void 0) {
27
- chunkFL472AMI_cjs.assertJsonValue(options.annotations, "annotations", `Node "${name}"`);
27
+ chunkJ3LEGNQB_cjs.assertJsonValue(options.annotations, "annotations", `Node "${name}"`);
28
28
  }
29
29
  return Object.freeze({
30
- [chunkVPYHY3LJ_cjs.NODE_TYPE_BRAND]: true,
30
+ [chunk2THZ3TQI_cjs.NODE_TYPE_BRAND]: true,
31
31
  kind: name,
32
32
  schema: options.schema,
33
33
  description: options.description,
@@ -36,21 +36,21 @@ function defineNode(name, options) {
36
36
  }
37
37
  var EMPTY_SCHEMA = zod.z.object({});
38
38
  function validateSchemaKeys2(schema, name) {
39
- chunkGSQ6NPH6_cjs.assertSchemaKeysAreFree(
39
+ chunk4BCU6VFZ_cjs.assertSchemaKeysAreFree(
40
40
  "Edge",
41
41
  name,
42
42
  Object.keys(schema.shape),
43
- chunkGSQ6NPH6_cjs.RESERVED_EDGE_KEYS
43
+ chunk4BCU6VFZ_cjs.RESERVED_EDGE_KEYS
44
44
  );
45
45
  }
46
46
  function defineEdge(name, options) {
47
47
  const schema = options?.schema ?? EMPTY_SCHEMA;
48
48
  validateSchemaKeys2(schema, name);
49
49
  if (options?.annotations !== void 0) {
50
- chunkFL472AMI_cjs.assertJsonValue(options.annotations, "annotations", `Edge "${name}"`);
50
+ chunkJ3LEGNQB_cjs.assertJsonValue(options.annotations, "annotations", `Edge "${name}"`);
51
51
  }
52
52
  return Object.freeze({
53
- [chunkVPYHY3LJ_cjs.EDGE_TYPE_BRAND]: true,
53
+ [chunk2THZ3TQI_cjs.EDGE_TYPE_BRAND]: true,
54
54
  kind: name,
55
55
  schema,
56
56
  description: options?.description,
@@ -87,7 +87,7 @@ function createMetaEdge(name, properties) {
87
87
  }
88
88
  });
89
89
  }
90
- var subClassOfMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_SUB_CLASS_OF, {
90
+ var subClassOfMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_SUB_CLASS_OF, {
91
91
  transitive: true,
92
92
  inference: "subsumption",
93
93
  description: "Type inheritance (Podcast subClassOf Media)"
@@ -99,9 +99,9 @@ function subClassOf(child, parent) {
99
99
  to: parent
100
100
  };
101
101
  }
102
- var broaderMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_BROADER, {
102
+ var broaderMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_BROADER, {
103
103
  transitive: true,
104
- inverse: chunkFL472AMI_cjs.META_EDGE_NARROWER,
104
+ inverse: chunkJ3LEGNQB_cjs.META_EDGE_NARROWER,
105
105
  inference: "hierarchy",
106
106
  description: "Broader concept (ML broader AI)"
107
107
  });
@@ -112,9 +112,9 @@ function broader(narrowerConcept, broaderConcept) {
112
112
  to: broaderConcept
113
113
  };
114
114
  }
115
- var narrowerMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_NARROWER, {
115
+ var narrowerMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_NARROWER, {
116
116
  transitive: true,
117
- inverse: chunkFL472AMI_cjs.META_EDGE_BROADER,
117
+ inverse: chunkJ3LEGNQB_cjs.META_EDGE_BROADER,
118
118
  inference: "hierarchy",
119
119
  description: "Narrower concept (AI narrower ML)"
120
120
  });
@@ -125,7 +125,7 @@ function narrower(broaderConcept, narrowerConcept) {
125
125
  to: narrowerConcept
126
126
  };
127
127
  }
128
- var relatedToMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_RELATED_TO, {
128
+ var relatedToMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_RELATED_TO, {
129
129
  symmetric: true,
130
130
  inference: "association",
131
131
  description: "Non-hierarchical association"
@@ -137,7 +137,7 @@ function relatedTo(conceptA, conceptB) {
137
137
  to: conceptB
138
138
  };
139
139
  }
140
- var equivalentToMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_EQUIVALENT_TO, {
140
+ var equivalentToMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_EQUIVALENT_TO, {
141
141
  symmetric: true,
142
142
  transitive: true,
143
143
  inference: "substitution",
@@ -150,7 +150,7 @@ function equivalentTo(kindA, kindBOrIri) {
150
150
  to: kindBOrIri
151
151
  };
152
152
  }
153
- var sameAsMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_SAME_AS, {
153
+ var sameAsMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_SAME_AS, {
154
154
  symmetric: true,
155
155
  transitive: true,
156
156
  inference: "substitution",
@@ -163,7 +163,7 @@ function sameAs(kindA, kindBOrIri) {
163
163
  to: kindBOrIri
164
164
  };
165
165
  }
166
- var differentFromMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_DIFFERENT_FROM, {
166
+ var differentFromMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_DIFFERENT_FROM, {
167
167
  symmetric: true,
168
168
  inference: "constraint",
169
169
  description: "Explicitly different individuals"
@@ -175,7 +175,7 @@ function differentFrom(kindA, kindB) {
175
175
  to: kindB
176
176
  };
177
177
  }
178
- var disjointWithMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_DISJOINT_WITH, {
178
+ var disjointWithMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_DISJOINT_WITH, {
179
179
  symmetric: true,
180
180
  inference: "constraint",
181
181
  description: "Mutually exclusive types"
@@ -187,9 +187,9 @@ function disjointWith(kindA, kindB) {
187
187
  to: kindB
188
188
  };
189
189
  }
190
- var partOfMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_PART_OF, {
190
+ var partOfMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_PART_OF, {
191
191
  transitive: true,
192
- inverse: chunkFL472AMI_cjs.META_EDGE_HAS_PART,
192
+ inverse: chunkJ3LEGNQB_cjs.META_EDGE_HAS_PART,
193
193
  inference: "composition",
194
194
  description: "X is part of Y"
195
195
  });
@@ -200,9 +200,9 @@ function partOf(part, whole) {
200
200
  to: whole
201
201
  };
202
202
  }
203
- var hasPartMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_HAS_PART, {
203
+ var hasPartMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_HAS_PART, {
204
204
  transitive: true,
205
- inverse: chunkFL472AMI_cjs.META_EDGE_PART_OF,
205
+ inverse: chunkJ3LEGNQB_cjs.META_EDGE_PART_OF,
206
206
  inference: "composition",
207
207
  description: "Y has part X"
208
208
  });
@@ -213,12 +213,12 @@ function hasPart(whole, part) {
213
213
  to: part
214
214
  };
215
215
  }
216
- var inverseOfMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_INVERSE_OF, {
216
+ var inverseOfMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_INVERSE_OF, {
217
217
  symmetric: true,
218
218
  inference: "none",
219
219
  description: "Edge A is inverse of edge B"
220
220
  });
221
- var impliesMetaEdge = createMetaEdge(chunkFL472AMI_cjs.META_EDGE_IMPLIES, {
221
+ var impliesMetaEdge = createMetaEdge(chunkJ3LEGNQB_cjs.META_EDGE_IMPLIES, {
222
222
  transitive: true,
223
223
  inference: "none",
224
224
  description: "Edge A implies edge B exists"
@@ -872,7 +872,7 @@ var KindRegistry = class {
872
872
  * Checks if child is a subclass of parent (directly or transitively).
873
873
  */
874
874
  isSubClassOf(child, parent) {
875
- return chunkFL472AMI_cjs.isReachable(this.subClassAncestors, child, parent);
875
+ return chunkJ3LEGNQB_cjs.isReachable(this.subClassAncestors, child, parent);
876
876
  }
877
877
  /**
878
878
  * Expands a kind to include all its subclasses.
@@ -899,13 +899,13 @@ var KindRegistry = class {
899
899
  * Checks if narrowerConcept is narrower than broaderConcept.
900
900
  */
901
901
  isNarrowerThan(narrowerConcept, broaderConcept) {
902
- return chunkFL472AMI_cjs.isReachable(this.broaderClosure, narrowerConcept, broaderConcept);
902
+ return chunkJ3LEGNQB_cjs.isReachable(this.broaderClosure, narrowerConcept, broaderConcept);
903
903
  }
904
904
  /**
905
905
  * Checks if broaderConcept is broader than narrowerConcept.
906
906
  */
907
907
  isBroaderThan(broaderConcept, narrowerConcept) {
908
- return chunkFL472AMI_cjs.isReachable(this.narrowerClosure, broaderConcept, narrowerConcept);
908
+ return chunkJ3LEGNQB_cjs.isReachable(this.narrowerClosure, broaderConcept, narrowerConcept);
909
909
  }
910
910
  /**
911
911
  * Expands to include all narrower concepts.
@@ -969,7 +969,7 @@ var KindRegistry = class {
969
969
  * Checks if part is part of whole (directly or transitively).
970
970
  */
971
971
  isPartOf(part, whole) {
972
- return chunkFL472AMI_cjs.isReachable(this.partOfClosure, part, whole);
972
+ return chunkJ3LEGNQB_cjs.isReachable(this.partOfClosure, part, whole);
973
973
  }
974
974
  /**
975
975
  * Gets all wholes that contain this part.
@@ -1091,57 +1091,57 @@ function computeClosuresFromOntology(ontology) {
1091
1091
  const fromName = getKindName(relation.from);
1092
1092
  const toName = getKindName(relation.to);
1093
1093
  switch (relation.metaEdge.name) {
1094
- case chunkFL472AMI_cjs.META_EDGE_SUB_CLASS_OF: {
1094
+ case chunkJ3LEGNQB_cjs.META_EDGE_SUB_CLASS_OF: {
1095
1095
  subClassRelations.push([fromName, toName]);
1096
1096
  break;
1097
1097
  }
1098
- case chunkFL472AMI_cjs.META_EDGE_BROADER: {
1098
+ case chunkJ3LEGNQB_cjs.META_EDGE_BROADER: {
1099
1099
  broaderRelations.push([fromName, toName]);
1100
1100
  break;
1101
1101
  }
1102
- case chunkFL472AMI_cjs.META_EDGE_NARROWER: {
1102
+ case chunkJ3LEGNQB_cjs.META_EDGE_NARROWER: {
1103
1103
  broaderRelations.push([toName, fromName]);
1104
1104
  break;
1105
1105
  }
1106
- case chunkFL472AMI_cjs.META_EDGE_EQUIVALENT_TO:
1107
- case chunkFL472AMI_cjs.META_EDGE_SAME_AS: {
1106
+ case chunkJ3LEGNQB_cjs.META_EDGE_EQUIVALENT_TO:
1107
+ case chunkJ3LEGNQB_cjs.META_EDGE_SAME_AS: {
1108
1108
  equivalentRelations.push([fromName, toName]);
1109
1109
  break;
1110
1110
  }
1111
- case chunkFL472AMI_cjs.META_EDGE_DISJOINT_WITH: {
1111
+ case chunkJ3LEGNQB_cjs.META_EDGE_DISJOINT_WITH: {
1112
1112
  disjointRelations.push([fromName, toName]);
1113
1113
  break;
1114
1114
  }
1115
- case chunkFL472AMI_cjs.META_EDGE_PART_OF: {
1115
+ case chunkJ3LEGNQB_cjs.META_EDGE_PART_OF: {
1116
1116
  partOfRelations.push([fromName, toName]);
1117
1117
  break;
1118
1118
  }
1119
- case chunkFL472AMI_cjs.META_EDGE_HAS_PART: {
1119
+ case chunkJ3LEGNQB_cjs.META_EDGE_HAS_PART: {
1120
1120
  partOfRelations.push([toName, fromName]);
1121
1121
  break;
1122
1122
  }
1123
- case chunkFL472AMI_cjs.META_EDGE_INVERSE_OF: {
1123
+ case chunkJ3LEGNQB_cjs.META_EDGE_INVERSE_OF: {
1124
1124
  inverseOfRelations.push([fromName, toName]);
1125
1125
  break;
1126
1126
  }
1127
- case chunkFL472AMI_cjs.META_EDGE_IMPLIES: {
1127
+ case chunkJ3LEGNQB_cjs.META_EDGE_IMPLIES: {
1128
1128
  impliesRelations.push([fromName, toName]);
1129
1129
  break;
1130
1130
  }
1131
1131
  }
1132
1132
  }
1133
- const subClassAncestors = chunkFL472AMI_cjs.computeTransitiveClosure(subClassRelations);
1134
- const subClassDescendants = chunkFL472AMI_cjs.invertClosure(subClassAncestors);
1135
- const broaderClosure = chunkFL472AMI_cjs.computeTransitiveClosure(broaderRelations);
1136
- const narrowerClosure = chunkFL472AMI_cjs.invertClosure(broaderClosure);
1133
+ const subClassAncestors = chunkJ3LEGNQB_cjs.computeTransitiveClosure(subClassRelations);
1134
+ const subClassDescendants = chunkJ3LEGNQB_cjs.invertClosure(subClassAncestors);
1135
+ const broaderClosure = chunkJ3LEGNQB_cjs.computeTransitiveClosure(broaderRelations);
1136
+ const narrowerClosure = chunkJ3LEGNQB_cjs.invertClosure(broaderClosure);
1137
1137
  const equivalenceSets = computeEquivalenceSets(equivalentRelations);
1138
1138
  const iriToKind = computeIriMapping(equivalentRelations);
1139
1139
  const disjointPairs = computeDisjointPairs(disjointRelations);
1140
- const partOfClosure = chunkFL472AMI_cjs.computeTransitiveClosure(partOfRelations);
1141
- const hasPartClosure = chunkFL472AMI_cjs.invertClosure(partOfClosure);
1140
+ const partOfClosure = chunkJ3LEGNQB_cjs.computeTransitiveClosure(partOfRelations);
1141
+ const hasPartClosure = chunkJ3LEGNQB_cjs.invertClosure(partOfClosure);
1142
1142
  const edgeInverses = computeEdgeInverses(inverseOfRelations);
1143
- const edgeImplicationsClosure = chunkFL472AMI_cjs.computeTransitiveClosure(impliesRelations);
1144
- const edgeImplyingClosure = chunkFL472AMI_cjs.invertClosure(edgeImplicationsClosure);
1143
+ const edgeImplicationsClosure = chunkJ3LEGNQB_cjs.computeTransitiveClosure(impliesRelations);
1144
+ const edgeImplyingClosure = chunkJ3LEGNQB_cjs.invertClosure(edgeImplicationsClosure);
1145
1145
  return {
1146
1146
  subClassAncestors,
1147
1147
  subClassDescendants,
@@ -1245,7 +1245,7 @@ function serializeSchema(graph, version) {
1245
1245
  return {
1246
1246
  graphId: graph.id,
1247
1247
  version,
1248
- generatedAt: chunkBLZDPRXT_cjs.nowIso(),
1248
+ generatedAt: chunkRSSQKPSZ_cjs.nowIso(),
1249
1249
  nodes,
1250
1250
  edges,
1251
1251
  ontology,
@@ -1276,7 +1276,7 @@ function serializeDeprecatedKinds(set) {
1276
1276
  function canonicalExtension(document) {
1277
1277
  if (document === void 0) return void 0;
1278
1278
  if (document.version === void 0) return document;
1279
- if (document.version !== chunkFL472AMI_cjs.LEGACY_GRAPH_EXTENSION_VERSION) return document;
1279
+ if (document.version !== chunkJ3LEGNQB_cjs.LEGACY_GRAPH_EXTENSION_VERSION) return document;
1280
1280
  const { version: _omit, ...rest } = document;
1281
1281
  return rest;
1282
1282
  }
@@ -1362,7 +1362,7 @@ function serializeEdgeIndexDeclaration(declaration) {
1362
1362
  }
1363
1363
  function serializeNodes(graph) {
1364
1364
  const result = {};
1365
- for (const kindName of chunkVPYHY3LJ_cjs.getNodeKinds(graph)) {
1365
+ for (const kindName of chunk2THZ3TQI_cjs.getNodeKinds(graph)) {
1366
1366
  const registration = graph.nodes[kindName];
1367
1367
  if (registration === void 0) continue;
1368
1368
  result[kindName] = serializeNodeDef(registration);
@@ -1430,7 +1430,7 @@ function deserializeWherePredicate(serialized) {
1430
1430
  }
1431
1431
  function serializeEdges(graph) {
1432
1432
  const result = {};
1433
- for (const kindName of chunkVPYHY3LJ_cjs.getEdgeKinds(graph)) {
1433
+ for (const kindName of chunk2THZ3TQI_cjs.getEdgeKinds(graph)) {
1434
1434
  const registration = graph.edges[kindName];
1435
1435
  if (registration === void 0) continue;
1436
1436
  result[kindName] = serializeEdgeDef(registration);
@@ -1781,7 +1781,7 @@ function makeWherePredicate(field, op) {
1781
1781
  };
1782
1782
  }
1783
1783
  var META_EDGE_BY_NAME = Object.fromEntries(
1784
- chunkFL472AMI_cjs.ALL_META_EDGE_NAMES.map((name) => [name, core[`${name}MetaEdge`]])
1784
+ chunkJ3LEGNQB_cjs.ALL_META_EDGE_NAMES.map((name) => [name, core[`${name}MetaEdge`]])
1785
1785
  );
1786
1786
  function compileOntologyRelation(relation, nodeTypeByName) {
1787
1787
  const metaEdge = META_EDGE_BY_NAME[relation.metaEdge];
@@ -1820,7 +1820,7 @@ function mergeGraphExtension(graph, document) {
1820
1820
  if (graph.extension !== void 0 && chunkACSVZPK7_cjs.canonicalEqual(unionDocument, existingDocument)) {
1821
1821
  return graph;
1822
1822
  }
1823
- const validatedUnion = chunkFL472AMI_cjs.unwrap(chunkFL472AMI_cjs.validateGraphExtension(unionDocument));
1823
+ const validatedUnion = chunkJ3LEGNQB_cjs.unwrap(chunkJ3LEGNQB_cjs.validateGraphExtension(unionDocument));
1824
1824
  const compiled = compileGraphExtension(validatedUnion);
1825
1825
  const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = extensionKindNames(existingDocument);
1826
1826
  const nodeKinds = /* @__PURE__ */ new Map();
@@ -1922,7 +1922,7 @@ function deriveGraphExtensionVectorIndexes(compiledNodes) {
1922
1922
  ...compiled.unique.length === 0 ? {} : { unique: [...compiled.unique] }
1923
1923
  };
1924
1924
  }
1925
- return chunkVPYHY3LJ_cjs.autoDeriveVectorIndexes(registrations).map(
1925
+ return chunk2THZ3TQI_cjs.autoDeriveVectorIndexes(registrations).map(
1926
1926
  (index) => Object.freeze({ ...index, origin: "runtime" })
1927
1927
  );
1928
1928
  }
@@ -1940,7 +1940,7 @@ function mergeIndexesWithGraphExtension(existing, runtimeIndexes, graphId) {
1940
1940
  const runtimeRelational = runtimeIndexes.filter(
1941
1941
  (index) => index.entity !== "vector"
1942
1942
  );
1943
- const vectorMerged = chunkVPYHY3LJ_cjs.mergeVectorIndexes(compileTimeIndexes, runtimeVectors);
1943
+ const vectorMerged = chunk2THZ3TQI_cjs.mergeVectorIndexes(compileTimeIndexes, runtimeVectors);
1944
1944
  const merged = [...vectorMerged, ...runtimeRelational];
1945
1945
  assertUniqueIndexNames(merged, graphId);
1946
1946
  return merged;
@@ -1952,7 +1952,7 @@ function assertUniqueIndexNames(indexes, graphId) {
1952
1952
  seen.add(index.name);
1953
1953
  continue;
1954
1954
  }
1955
- throw new chunkLGEALRC6_cjs.ConfigurationError(
1955
+ throw new chunkDIK74MXX_cjs.ConfigurationError(
1956
1956
  `Duplicate index name "${index.name}" after merging graph extension into graph "${graphId}". Index names must be unique within a graph.`,
1957
1957
  { graphId, indexName: index.name, code: "DUPLICATE_INDEX_NAME" },
1958
1958
  {
@@ -1968,7 +1968,7 @@ function compileGraphExtensionRelationalIndexes(documents, nodeKinds, mergedEdge
1968
1968
  if (document.entity === "node") {
1969
1969
  const node = nodeKinds.get(document.kind);
1970
1970
  if (node === void 0) {
1971
- throw new chunkLGEALRC6_cjs.KindNotFoundError(document.kind, "node", {
1971
+ throw new chunkDIK74MXX_cjs.KindNotFoundError(document.kind, "node", {
1972
1972
  graphId,
1973
1973
  suggestion: "Declare the kind under `nodes` in this graph extension, or remove the index from `indexes`."
1974
1974
  });
@@ -1982,7 +1982,7 @@ function compileGraphExtensionRelationalIndexes(documents, nodeKinds, mergedEdge
1982
1982
  }
1983
1983
  const edgeRegistration = mergedEdges[document.kind];
1984
1984
  if (edgeRegistration === void 0) {
1985
- throw new chunkLGEALRC6_cjs.KindNotFoundError(document.kind, "edge", {
1985
+ throw new chunkDIK74MXX_cjs.KindNotFoundError(document.kind, "edge", {
1986
1986
  graphId,
1987
1987
  suggestion: "Declare the edge under `edges` in this graph extension, or remove the index from `indexes`."
1988
1988
  });
@@ -1999,7 +1999,7 @@ function buildWhereCallback(where) {
1999
1999
  return (props) => {
2000
2000
  const builder = props[where.field];
2001
2001
  if (builder === void 0) {
2002
- throw new chunkLGEALRC6_cjs.ConfigurationError(
2002
+ throw new chunkDIK74MXX_cjs.ConfigurationError(
2003
2003
  `Graph-extension index \`where\` references unknown field "${where.field}".`,
2004
2004
  { field: where.field, code: "EXTENSION_INDEX_WHERE_UNKNOWN_FIELD" }
2005
2005
  );
@@ -2074,14 +2074,14 @@ function isEmptyExtension(extension) {
2074
2074
  }
2075
2075
  function assertNoCollision(kindName, entity, collides, graphId) {
2076
2076
  if (!collides) return;
2077
- throw new chunkFL472AMI_cjs.KindCollisionError(kindName, entity, graphId);
2077
+ throw new chunkJ3LEGNQB_cjs.KindCollisionError(kindName, entity, graphId);
2078
2078
  }
2079
2079
  function resolveEndpoints(entries, nodeKinds, context) {
2080
2080
  return entries.map((entry) => {
2081
2081
  if (typeof entry !== "string") return entry;
2082
2082
  const resolved = nodeKinds.get(entry);
2083
2083
  if (resolved === void 0) {
2084
- throw new chunkFL472AMI_cjs.GraphExtensionUnresolvedEndpointError(
2084
+ throw new chunkJ3LEGNQB_cjs.GraphExtensionUnresolvedEndpointError(
2085
2085
  context.edgeKind,
2086
2086
  context.side,
2087
2087
  entry,
@@ -2130,10 +2130,10 @@ function assertEndpointCompatible(side, implyingEdgeKind, implyingKinds, implied
2130
2130
  (kind) => !registry.isAssignableToAny(kind, impliedKinds)
2131
2131
  );
2132
2132
  if (incompatibleKinds.length === 0) return;
2133
- throw new chunkLGEALRC6_cjs.ConfigurationError(
2133
+ throw new chunkDIK74MXX_cjs.ConfigurationError(
2134
2134
  `implies("${implyingEdgeKind}", "${impliedEdgeKind}") is endpoint-incompatible: ${side} kind(s) [${incompatibleKinds.join(", ")}] declared on "${implyingEdgeKind}" cannot be assigned to any of "${impliedEdgeKind}"'s ${side} kind(s) [${impliedKinds.join(", ")}].`,
2135
2135
  {
2136
- metaEdge: chunkFL472AMI_cjs.META_EDGE_IMPLIES,
2136
+ metaEdge: chunkJ3LEGNQB_cjs.META_EDGE_IMPLIES,
2137
2137
  implyingEdge: implyingEdgeKind,
2138
2138
  impliedEdge: impliedEdgeKind,
2139
2139
  endpoint: side,
@@ -2170,7 +2170,7 @@ function buildEdgeEndpointKinds(edges) {
2170
2170
  }
2171
2171
  function extractNodeTypes(graph) {
2172
2172
  const result = /* @__PURE__ */ new Map();
2173
- for (const typeName of chunkVPYHY3LJ_cjs.getNodeKinds(graph)) {
2173
+ for (const typeName of chunk2THZ3TQI_cjs.getNodeKinds(graph)) {
2174
2174
  const registration = graph.nodes[typeName];
2175
2175
  result.set(typeName, registration.type);
2176
2176
  }
@@ -2178,7 +2178,7 @@ function extractNodeTypes(graph) {
2178
2178
  }
2179
2179
  function extractEdgeTypes(graph) {
2180
2180
  const result = /* @__PURE__ */ new Map();
2181
- for (const typeName of chunkVPYHY3LJ_cjs.getEdgeKinds(graph)) {
2181
+ for (const typeName of chunk2THZ3TQI_cjs.getEdgeKinds(graph)) {
2182
2182
  const registration = graph.edges[typeName];
2183
2183
  result.set(typeName, registration.type);
2184
2184
  }
@@ -2526,7 +2526,7 @@ function parseSerializedSchema(json) {
2526
2526
  try {
2527
2527
  parsed = JSON.parse(json);
2528
2528
  } catch {
2529
- throw new chunkLGEALRC6_cjs.DatabaseOperationError(
2529
+ throw new chunkDIK74MXX_cjs.DatabaseOperationError(
2530
2530
  "Stored schema document is not valid JSON",
2531
2531
  { operation: "select", entity: "schema" }
2532
2532
  );
@@ -2534,7 +2534,7 @@ function parseSerializedSchema(json) {
2534
2534
  const result = serializedSchemaZod.safeParse(parsed);
2535
2535
  if (!result.success) {
2536
2536
  const issues = result.error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ");
2537
- throw new chunkLGEALRC6_cjs.DatabaseOperationError(
2537
+ throw new chunkDIK74MXX_cjs.DatabaseOperationError(
2538
2538
  `Stored schema document is malformed: ${issues}`,
2539
2539
  { operation: "select", entity: "schema" }
2540
2540
  );
@@ -2551,7 +2551,7 @@ async function loadActiveSchemaWithBootstrap(backend, graphId) {
2551
2551
  try {
2552
2552
  return await backend.getActiveSchema(graphId);
2553
2553
  } catch (error) {
2554
- if (backend.bootstrapTables && chunkBLZDPRXT_cjs.isMissingTableError(error)) {
2554
+ if (backend.bootstrapTables && chunkRSSQKPSZ_cjs.isMissingTableError(error)) {
2555
2555
  await backend.bootstrapTables();
2556
2556
  return await backend.getActiveSchema(graphId);
2557
2557
  }
@@ -2645,7 +2645,7 @@ async function ensureSchema(backend, graph, options) {
2645
2645
  }
2646
2646
  const actions = getMigrationActions(diff);
2647
2647
  if (throwOnBreaking) {
2648
- throw new chunkLGEALRC6_cjs.MigrationError(
2648
+ throw new chunkDIK74MXX_cjs.MigrationError(
2649
2649
  `Schema migration required: ${diff.summary}. ${actions.length} migration action(s) needed. Use getSchemaChanges() to review, then migrateSchema() to apply.`,
2650
2650
  {
2651
2651
  graphId: graph.id,
@@ -2681,7 +2681,7 @@ async function loadAndVerifyGraph(backend, graph) {
2681
2681
  function schemaBehindError(graphId, fromVersion, diff) {
2682
2682
  const actions = getMigrationActions(diff);
2683
2683
  const qualifier = isBackwardsCompatible(diff) ? "safe auto-migration" : "breaking change";
2684
- return new chunkLGEALRC6_cjs.MigrationError(
2684
+ return new chunkDIK74MXX_cjs.MigrationError(
2685
2685
  `Schema verification failed for graph "${graphId}": ${diff.summary} (${qualifier}). ${actions.length} migration action(s) needed. The least-privilege runtime cannot migrate \u2014 run createStoreWithSchema(graph, adminBackend) under a privileged role (after any generated migration SQL, if you manage DDL externally) before attaching with createStore() / createVerifiedStore().`,
2686
2686
  {
2687
2687
  graphId,
@@ -2699,7 +2699,7 @@ async function readActiveSchemaPure(backend, graphId) {
2699
2699
  try {
2700
2700
  activeRow = await backend.getActiveSchema(graphId);
2701
2701
  } catch (error) {
2702
- if (chunkBLZDPRXT_cjs.isMissingTableError(error)) {
2702
+ if (chunkRSSQKPSZ_cjs.isMissingTableError(error)) {
2703
2703
  throw schemaNotInitializedError(graphId, error);
2704
2704
  }
2705
2705
  throw error;
@@ -2710,7 +2710,7 @@ async function readActiveSchemaPure(backend, graphId) {
2710
2710
  return activeRow;
2711
2711
  }
2712
2712
  function schemaNotInitializedError(graphId, cause) {
2713
- return new chunkLGEALRC6_cjs.ConfigurationError(
2713
+ return new chunkDIK74MXX_cjs.ConfigurationError(
2714
2714
  `Cannot verify graph "${graphId}": no schema has been initialized. Run createStoreWithSchema(graph, adminBackend) once under a privileged role (which commits the schema_versions row and materializes contribution markers) before attaching with createStore() / createVerifiedStore(). Generated migration SQL creates the tables but does not initialize the schema row.`,
2715
2715
  { graphId },
2716
2716
  {
@@ -2755,7 +2755,7 @@ async function commitNewSchemaVersion(backend, graph, currentVersion) {
2755
2755
  async function rollbackSchema(backend, graphId, targetVersion) {
2756
2756
  const activeRow = await backend.getActiveSchema(graphId);
2757
2757
  if (activeRow === void 0) {
2758
- throw new chunkLGEALRC6_cjs.MigrationError(
2758
+ throw new chunkDIK74MXX_cjs.MigrationError(
2759
2759
  `Cannot rollback graph "${graphId}": no active schema version exists.`,
2760
2760
  { graphId, fromVersion: 0, toVersion: targetVersion }
2761
2761
  );
@@ -2830,5 +2830,5 @@ exports.serializeSchema = serializeSchema;
2830
2830
  exports.serializeSchemaProperties = serializeSchemaProperties;
2831
2831
  exports.subClassOf = subClassOf;
2832
2832
  exports.validateImpliesEndpointCompatibility = validateImpliesEndpointCompatibility;
2833
- //# sourceMappingURL=chunk-CK5BVQOW.cjs.map
2834
- //# sourceMappingURL=chunk-CK5BVQOW.cjs.map
2833
+ //# sourceMappingURL=chunk-PWGX5DF5.cjs.map
2834
+ //# sourceMappingURL=chunk-PWGX5DF5.cjs.map