@nicia-ai/typegraph 0.25.0 → 0.26.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 (122) hide show
  1. package/dist/backend/postgres/index.cjs +167 -71
  2. package/dist/backend/postgres/index.cjs.map +1 -1
  3. package/dist/backend/postgres/index.d.cts +6 -8
  4. package/dist/backend/postgres/index.d.ts +6 -8
  5. package/dist/backend/postgres/index.js +119 -27
  6. package/dist/backend/postgres/index.js.map +1 -1
  7. package/dist/backend/sqlite/index.cjs +16 -15
  8. package/dist/backend/sqlite/index.d.cts +11 -26
  9. package/dist/backend/sqlite/index.d.ts +11 -26
  10. package/dist/backend/sqlite/index.js +6 -5
  11. package/dist/backend/sqlite/libsql.cjs +9 -8
  12. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  13. package/dist/backend/sqlite/libsql.d.cts +4 -3
  14. package/dist/backend/sqlite/libsql.d.ts +4 -3
  15. package/dist/backend/sqlite/libsql.js +6 -5
  16. package/dist/backend/sqlite/libsql.js.map +1 -1
  17. package/dist/backend/sqlite/local.cjs +11 -10
  18. package/dist/backend/sqlite/local.cjs.map +1 -1
  19. package/dist/backend/sqlite/local.d.cts +4 -3
  20. package/dist/backend/sqlite/local.d.ts +4 -3
  21. package/dist/backend/sqlite/local.js +6 -5
  22. package/dist/backend/sqlite/local.js.map +1 -1
  23. package/dist/{chunk-LVCSL6A3.js → chunk-3W6AIFT2.js} +11 -34
  24. package/dist/chunk-3W6AIFT2.js.map +1 -0
  25. package/dist/chunk-4FJVSF3K.cjs +12 -0
  26. package/dist/{chunk-D2GO3RBL.cjs.map → chunk-4FJVSF3K.cjs.map} +1 -1
  27. package/dist/{chunk-7W3KAMVQ.cjs → chunk-4TJI44WP.cjs} +94 -119
  28. package/dist/chunk-4TJI44WP.cjs.map +1 -0
  29. package/dist/chunk-5H3BAMTB.js +32 -0
  30. package/dist/chunk-5H3BAMTB.js.map +1 -0
  31. package/dist/{chunk-OJ6IQVZG.js → chunk-DDVA4QBA.js} +177 -37
  32. package/dist/chunk-DDVA4QBA.js.map +1 -0
  33. package/dist/{chunk-7CDXX3QZ.cjs → chunk-DN4RUDF3.cjs} +2 -2
  34. package/dist/chunk-DN4RUDF3.cjs.map +1 -0
  35. package/dist/{chunk-NHQWXSTS.js → chunk-E5ROA3MN.js} +3 -3
  36. package/dist/{chunk-NHQWXSTS.js.map → chunk-E5ROA3MN.js.map} +1 -1
  37. package/dist/{chunk-FPCOUJSL.js → chunk-ENXJLDRK.js} +2 -2
  38. package/dist/chunk-ENXJLDRK.js.map +1 -0
  39. package/dist/chunk-IUIWCFG3.cjs +36 -0
  40. package/dist/chunk-IUIWCFG3.cjs.map +1 -0
  41. package/dist/{chunk-EG6TJ3I5.js → chunk-OYLF3IC7.js} +3 -3
  42. package/dist/{chunk-EG6TJ3I5.js.map → chunk-OYLF3IC7.js.map} +1 -1
  43. package/dist/{chunk-JTI5WT4P.cjs → chunk-PN37HVAV.cjs} +32 -10
  44. package/dist/chunk-PN37HVAV.cjs.map +1 -0
  45. package/dist/{chunk-RCAJZG67.cjs → chunk-PYJOBZR3.cjs} +10 -10
  46. package/dist/{chunk-RCAJZG67.cjs.map → chunk-PYJOBZR3.cjs.map} +1 -1
  47. package/dist/{chunk-WI5VRP3X.js → chunk-RF5EUQWS.js} +371 -47
  48. package/dist/chunk-RF5EUQWS.js.map +1 -0
  49. package/dist/{chunk-ZEMNF3QK.cjs → chunk-RVT2N4RF.cjs} +209 -69
  50. package/dist/chunk-RVT2N4RF.cjs.map +1 -0
  51. package/dist/{chunk-4BOWVUGQ.js → chunk-TSGBRPNE.js} +3 -3
  52. package/dist/{chunk-4BOWVUGQ.js.map → chunk-TSGBRPNE.js.map} +1 -1
  53. package/dist/{chunk-O2P3KAUT.cjs → chunk-TVUARC7S.cjs} +445 -110
  54. package/dist/chunk-TVUARC7S.cjs.map +1 -0
  55. package/dist/{chunk-DOTEN2FG.js → chunk-U5ROKVRF.js} +26 -3
  56. package/dist/chunk-U5ROKVRF.js.map +1 -0
  57. package/dist/{chunk-E5JZSEGJ.cjs → chunk-WFUN6DCM.cjs} +8 -8
  58. package/dist/{chunk-E5JZSEGJ.cjs.map → chunk-WFUN6DCM.cjs.map} +1 -1
  59. package/dist/{chunk-W5MTHMTE.cjs → chunk-YEDQLNVE.cjs} +26 -2
  60. package/dist/chunk-YEDQLNVE.cjs.map +1 -0
  61. package/dist/{chunk-YZZBDCLV.js → chunk-ZTREJOGB.js} +32 -11
  62. package/dist/chunk-ZTREJOGB.js.map +1 -0
  63. package/dist/{ddl-B2jjLjpR.d.cts → ddl-9kw8UADK.d.ts} +697 -29
  64. package/dist/{ddl-DpaeAKPp.d.ts → ddl-Cw82BPM4.d.cts} +697 -29
  65. package/dist/{extension-types-D07e_NTw.d.cts → extension-types-B78CZfA5.d.cts} +1 -1
  66. package/dist/{extension-types-D07e_NTw.d.ts → extension-types-B78CZfA5.d.ts} +1 -1
  67. package/dist/graph-extension/index.cjs +18 -18
  68. package/dist/graph-extension/index.d.cts +4 -4
  69. package/dist/graph-extension/index.d.ts +4 -4
  70. package/dist/graph-extension/index.js +3 -3
  71. package/dist/{index-CT6nvtxL.d.cts → index-Bilw0pYm.d.cts} +34 -3
  72. package/dist/{index-DQheiVQV.d.ts → index-CWdBFWbI.d.ts} +34 -3
  73. package/dist/index.cjs +460 -361
  74. package/dist/index.cjs.map +1 -1
  75. package/dist/index.d.cts +13 -11
  76. package/dist/index.d.ts +13 -11
  77. package/dist/index.js +131 -36
  78. package/dist/index.js.map +1 -1
  79. package/dist/indexes/index.cjs +13 -13
  80. package/dist/indexes/index.d.cts +5 -5
  81. package/dist/indexes/index.d.ts +5 -5
  82. package/dist/indexes/index.js +1 -1
  83. package/dist/interchange/index.cjs +7 -7
  84. package/dist/interchange/index.d.cts +7 -5
  85. package/dist/interchange/index.d.ts +7 -5
  86. package/dist/interchange/index.js +2 -2
  87. package/dist/{manager-BpjBW1JK.d.cts → manager-Aqzmztkb.d.cts} +11 -3
  88. package/dist/{manager-BKaPQbns.d.ts → manager-C3LxzPcX.d.ts} +11 -3
  89. package/dist/{materialize-indexes-BB9N5uQl.d.cts → materialize-indexes-BQfaAZKA.d.cts} +1 -1
  90. package/dist/{materialize-indexes-BYpU2RKh.d.ts → materialize-indexes-DFavFQah.d.ts} +1 -1
  91. package/dist/profiler/index.d.cts +9 -7
  92. package/dist/profiler/index.d.ts +9 -7
  93. package/dist/schema/index.cjs +28 -27
  94. package/dist/schema/index.cjs.map +1 -1
  95. package/dist/schema/index.d.cts +9 -7
  96. package/dist/schema/index.d.ts +9 -7
  97. package/dist/schema/index.js +6 -5
  98. package/dist/schema/index.js.map +1 -1
  99. package/dist/{sqlite-Myo8e3Lr.d.cts → sqlite-BvSEbybu.d.cts} +320 -1
  100. package/dist/{sqlite-CU3j6rc7.d.ts → sqlite-GKvcDPVn.d.ts} +320 -1
  101. package/dist/{store-BAGuOHDh.d.cts → store-CiS_AGNH.d.ts} +112 -4
  102. package/dist/{store-De98Lod4.d.ts → store-DbQLsSor.d.cts} +112 -4
  103. package/dist/{types-CYga3lZp.d.cts → types-CF7nDH3q.d.cts} +2 -2
  104. package/dist/{types-BLmJq4wI.d.ts → types-Cars4JZ1.d.ts} +2 -2
  105. package/dist/{types--0EslBx5.d.cts → types-DZPBXZOK.d.cts} +275 -8
  106. package/dist/{types-BNWYZ-0-.d.ts → types-Dzkr0Eqi.d.ts} +275 -8
  107. package/dist/{where-m1uWsdua.d.cts → where-BmtjfWuS.d.cts} +2 -2
  108. package/dist/{where-CluR73rs.d.ts → where-kk1Zz2En.d.ts} +2 -2
  109. package/package.json +3 -1
  110. package/dist/chunk-7CDXX3QZ.cjs.map +0 -1
  111. package/dist/chunk-7W3KAMVQ.cjs.map +0 -1
  112. package/dist/chunk-D2GO3RBL.cjs +0 -12
  113. package/dist/chunk-DOTEN2FG.js.map +0 -1
  114. package/dist/chunk-FPCOUJSL.js.map +0 -1
  115. package/dist/chunk-JTI5WT4P.cjs.map +0 -1
  116. package/dist/chunk-LVCSL6A3.js.map +0 -1
  117. package/dist/chunk-O2P3KAUT.cjs.map +0 -1
  118. package/dist/chunk-OJ6IQVZG.js.map +0 -1
  119. package/dist/chunk-W5MTHMTE.cjs.map +0 -1
  120. package/dist/chunk-WI5VRP3X.js.map +0 -1
  121. package/dist/chunk-YZZBDCLV.js.map +0 -1
  122. package/dist/chunk-ZEMNF3QK.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkJTI5WT4P_cjs = require('../chunk-JTI5WT4P.cjs');
3
+ var chunkPN37HVAV_cjs = require('../chunk-PN37HVAV.cjs');
4
4
  var chunkCTHNVU6K_cjs = require('../chunk-CTHNVU6K.cjs');
5
5
  require('../chunk-EK6RJ373.cjs');
6
6
  require('../chunk-X3244EKP.cjs');
@@ -10,51 +10,51 @@ require('../chunk-7V335GHG.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "andWhere", {
12
12
  enumerable: true,
13
- get: function () { return chunkJTI5WT4P_cjs.andWhere; }
13
+ get: function () { return chunkPN37HVAV_cjs.andWhere; }
14
14
  });
15
15
  Object.defineProperty(exports, "buildPostgresEdgeIndexBuilders", {
16
16
  enumerable: true,
17
- get: function () { return chunkJTI5WT4P_cjs.buildPostgresEdgeIndexBuilders; }
17
+ get: function () { return chunkPN37HVAV_cjs.buildPostgresEdgeIndexBuilders; }
18
18
  });
19
19
  Object.defineProperty(exports, "buildPostgresNodeIndexBuilders", {
20
20
  enumerable: true,
21
- get: function () { return chunkJTI5WT4P_cjs.buildPostgresNodeIndexBuilders; }
21
+ get: function () { return chunkPN37HVAV_cjs.buildPostgresNodeIndexBuilders; }
22
22
  });
23
23
  Object.defineProperty(exports, "buildSqliteEdgeIndexBuilders", {
24
24
  enumerable: true,
25
- get: function () { return chunkJTI5WT4P_cjs.buildSqliteEdgeIndexBuilders; }
25
+ get: function () { return chunkPN37HVAV_cjs.buildSqliteEdgeIndexBuilders; }
26
26
  });
27
27
  Object.defineProperty(exports, "buildSqliteNodeIndexBuilders", {
28
28
  enumerable: true,
29
- get: function () { return chunkJTI5WT4P_cjs.buildSqliteNodeIndexBuilders; }
29
+ get: function () { return chunkPN37HVAV_cjs.buildSqliteNodeIndexBuilders; }
30
30
  });
31
31
  Object.defineProperty(exports, "generateEdgeIndexDDL", {
32
32
  enumerable: true,
33
- get: function () { return chunkJTI5WT4P_cjs.generateEdgeIndexDDL; }
33
+ get: function () { return chunkPN37HVAV_cjs.generateEdgeIndexDDL; }
34
34
  });
35
35
  Object.defineProperty(exports, "generateIndexDDL", {
36
36
  enumerable: true,
37
- get: function () { return chunkJTI5WT4P_cjs.generateIndexDDL; }
37
+ get: function () { return chunkPN37HVAV_cjs.generateIndexDDL; }
38
38
  });
39
39
  Object.defineProperty(exports, "generateNodeIndexDDL", {
40
40
  enumerable: true,
41
- get: function () { return chunkJTI5WT4P_cjs.generateNodeIndexDDL; }
41
+ get: function () { return chunkPN37HVAV_cjs.generateNodeIndexDDL; }
42
42
  });
43
43
  Object.defineProperty(exports, "notWhere", {
44
44
  enumerable: true,
45
- get: function () { return chunkJTI5WT4P_cjs.notWhere; }
45
+ get: function () { return chunkPN37HVAV_cjs.notWhere; }
46
46
  });
47
47
  Object.defineProperty(exports, "orWhere", {
48
48
  enumerable: true,
49
- get: function () { return chunkJTI5WT4P_cjs.orWhere; }
49
+ get: function () { return chunkPN37HVAV_cjs.orWhere; }
50
50
  });
51
51
  Object.defineProperty(exports, "toDeclaredIndex", {
52
52
  enumerable: true,
53
- get: function () { return chunkJTI5WT4P_cjs.toDeclaredIndex; }
53
+ get: function () { return chunkPN37HVAV_cjs.toDeclaredIndex; }
54
54
  });
55
55
  Object.defineProperty(exports, "toDeclaredIndexes", {
56
56
  enumerable: true,
57
- get: function () { return chunkJTI5WT4P_cjs.toDeclaredIndexes; }
57
+ get: function () { return chunkPN37HVAV_cjs.toDeclaredIndexes; }
58
58
  });
59
59
  Object.defineProperty(exports, "defineEdgeIndex", {
60
60
  enumerable: true,
@@ -1,12 +1,12 @@
1
- import { a as EdgeIndexDeclaration, m as SqlDialect, R as RelationalIndexDeclaration, b as NodeIndexDeclaration, I as IndexDeclaration } from '../types--0EslBx5.cjs';
2
- export { E as EdgeIndexConfig, n as EdgeIndexDirection, o as EdgeIndexWhereBuilder, p as IndexOrigin, q as IndexScope, c as IndexWhereExpression, r as IndexWhereFieldBuilder, s as IndexWhereInput, N as NodeIndexConfig, t as NodeIndexWhereBuilder, u as SystemColumnName, V as VectorIndexDeclaration, v as VectorIndexImplementation, w as VectorIndexMetric, x as VectorIndexParams } from '../types--0EslBx5.cjs';
3
- export { a as andWhere, d as defineEdgeIndex, b as defineNodeIndex, n as notWhere, o as orWhere } from '../where-m1uWsdua.cjs';
1
+ import { c as EdgeIndexDeclaration, p as SqlDialect, R as RelationalIndexDeclaration, d as NodeIndexDeclaration, I as IndexDeclaration } from '../types-DZPBXZOK.cjs';
2
+ export { E as EdgeIndexConfig, q as EdgeIndexDirection, r as EdgeIndexWhereBuilder, s as IndexOrigin, t as IndexScope, e as IndexWhereExpression, u as IndexWhereFieldBuilder, v as IndexWhereInput, N as NodeIndexConfig, w as NodeIndexWhereBuilder, x as SystemColumnName, V as VectorIndexDeclaration, y as VectorIndexImplementation, z as VectorIndexMetric, C as VectorIndexParams } from '../types-DZPBXZOK.cjs';
3
+ export { a as andWhere, d as defineEdgeIndex, b as defineNodeIndex, n as notWhere, o as orWhere } from '../where-BmtjfWuS.cjs';
4
4
  import { SQLWrapper } from 'drizzle-orm';
5
5
  import { IndexBuilder } from 'drizzle-orm/pg-core';
6
6
  import { IndexBuilder as IndexBuilder$1 } from 'drizzle-orm/sqlite-core';
7
- import { D as DeclaredIndex } from '../types-CYga3lZp.cjs';
7
+ import { D as DeclaredIndex } from '../types-CF7nDH3q.cjs';
8
8
  import 'zod';
9
- import '../extension-types-D07e_NTw.cjs';
9
+ import '../extension-types-B78CZfA5.cjs';
10
10
 
11
11
  type GenerateIndexDdlOptions = Readonly<{
12
12
  nodesTableName?: string | undefined;
@@ -1,12 +1,12 @@
1
- import { a as EdgeIndexDeclaration, m as SqlDialect, R as RelationalIndexDeclaration, b as NodeIndexDeclaration, I as IndexDeclaration } from '../types-BNWYZ-0-.js';
2
- export { E as EdgeIndexConfig, n as EdgeIndexDirection, o as EdgeIndexWhereBuilder, p as IndexOrigin, q as IndexScope, c as IndexWhereExpression, r as IndexWhereFieldBuilder, s as IndexWhereInput, N as NodeIndexConfig, t as NodeIndexWhereBuilder, u as SystemColumnName, V as VectorIndexDeclaration, v as VectorIndexImplementation, w as VectorIndexMetric, x as VectorIndexParams } from '../types-BNWYZ-0-.js';
3
- export { a as andWhere, d as defineEdgeIndex, b as defineNodeIndex, n as notWhere, o as orWhere } from '../where-CluR73rs.js';
1
+ import { c as EdgeIndexDeclaration, p as SqlDialect, R as RelationalIndexDeclaration, d as NodeIndexDeclaration, I as IndexDeclaration } from '../types-Dzkr0Eqi.js';
2
+ export { E as EdgeIndexConfig, q as EdgeIndexDirection, r as EdgeIndexWhereBuilder, s as IndexOrigin, t as IndexScope, e as IndexWhereExpression, u as IndexWhereFieldBuilder, v as IndexWhereInput, N as NodeIndexConfig, w as NodeIndexWhereBuilder, x as SystemColumnName, V as VectorIndexDeclaration, y as VectorIndexImplementation, z as VectorIndexMetric, C as VectorIndexParams } from '../types-Dzkr0Eqi.js';
3
+ export { a as andWhere, d as defineEdgeIndex, b as defineNodeIndex, n as notWhere, o as orWhere } from '../where-kk1Zz2En.js';
4
4
  import { SQLWrapper } from 'drizzle-orm';
5
5
  import { IndexBuilder } from 'drizzle-orm/pg-core';
6
6
  import { IndexBuilder as IndexBuilder$1 } from 'drizzle-orm/sqlite-core';
7
- import { D as DeclaredIndex } from '../types-BLmJq4wI.js';
7
+ import { D as DeclaredIndex } from '../types-Cars4JZ1.js';
8
8
  import 'zod';
9
- import '../extension-types-D07e_NTw.js';
9
+ import '../extension-types-B78CZfA5.js';
10
10
 
11
11
  type GenerateIndexDdlOptions = Readonly<{
12
12
  nodesTableName?: string | undefined;
@@ -1,4 +1,4 @@
1
- export { andWhere, buildPostgresEdgeIndexBuilders, buildPostgresNodeIndexBuilders, buildSqliteEdgeIndexBuilders, buildSqliteNodeIndexBuilders, generateEdgeIndexDDL, generateIndexDDL, generateNodeIndexDDL, notWhere, orWhere, toDeclaredIndex, toDeclaredIndexes } from '../chunk-YZZBDCLV.js';
1
+ export { andWhere, buildPostgresEdgeIndexBuilders, buildPostgresNodeIndexBuilders, buildSqliteEdgeIndexBuilders, buildSqliteNodeIndexBuilders, generateEdgeIndexDDL, generateIndexDDL, generateNodeIndexDDL, notWhere, orWhere, toDeclaredIndex, toDeclaredIndexes } from '../chunk-ZTREJOGB.js';
2
2
  export { defineEdgeIndex, defineNodeIndex } from '../chunk-EJCDOA37.js';
3
3
  import '../chunk-OOS2RKRH.js';
4
4
  import '../chunk-WVQXAFP3.js';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkE5JZSEGJ_cjs = require('../chunk-E5JZSEGJ.cjs');
3
+ var chunkWFUN6DCM_cjs = require('../chunk-WFUN6DCM.cjs');
4
4
  require('../chunk-X3244EKP.cjs');
5
- require('../chunk-W5MTHMTE.cjs');
5
+ require('../chunk-YEDQLNVE.cjs');
6
6
  var zod = require('zod');
7
7
 
8
8
  var FORMAT_VERSION = "1.0";
@@ -122,8 +122,8 @@ async function exportGraph(store, options) {
122
122
  const graph = store.graph;
123
123
  const graphId = store.graphId;
124
124
  const backend = store.backend;
125
- const nodeKindsToExport = options_.nodeKinds ?? chunkE5JZSEGJ_cjs.getNodeKinds(graph);
126
- const edgeKindsToExport = options_.edgeKinds ?? chunkE5JZSEGJ_cjs.getEdgeKinds(graph);
125
+ const nodeKindsToExport = options_.nodeKinds ?? chunkWFUN6DCM_cjs.getNodeKinds(graph);
126
+ const edgeKindsToExport = options_.edgeKinds ?? chunkWFUN6DCM_cjs.getEdgeKinds(graph);
127
127
  const nodes = [];
128
128
  for (const kind of nodeKindsToExport) {
129
129
  const kindNodes = await exportNodesOfKind(backend, graphId, kind, options_);
@@ -137,7 +137,7 @@ async function exportGraph(store, options) {
137
137
  const schemaVersion = await backend.getActiveSchema(graphId);
138
138
  return {
139
139
  formatVersion: FORMAT_VERSION,
140
- exportedAt: chunkE5JZSEGJ_cjs.nowIso(),
140
+ exportedAt: chunkWFUN6DCM_cjs.nowIso(),
141
141
  source: {
142
142
  type: "typegraph-export",
143
143
  graphId,
@@ -285,7 +285,7 @@ async function importGraph(store, data, options) {
285
285
  }
286
286
  function buildNodeSchemaMap(graph) {
287
287
  const map = /* @__PURE__ */ new Map();
288
- for (const kindName of chunkE5JZSEGJ_cjs.getNodeKinds(graph)) {
288
+ for (const kindName of chunkWFUN6DCM_cjs.getNodeKinds(graph)) {
289
289
  const registration = graph.nodes[kindName];
290
290
  map.set(kindName, {
291
291
  registration,
@@ -296,7 +296,7 @@ function buildNodeSchemaMap(graph) {
296
296
  }
297
297
  function buildEdgeSchemaMap(graph) {
298
298
  const map = /* @__PURE__ */ new Map();
299
- for (const kindName of chunkE5JZSEGJ_cjs.getEdgeKinds(graph)) {
299
+ for (const kindName of chunkWFUN6DCM_cjs.getEdgeKinds(graph)) {
300
300
  const registration = graph.edges[kindName];
301
301
  map.set(kindName, {
302
302
  registration,
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
- import { G as GraphDef } from '../manager-BpjBW1JK.cjs';
3
- import { S as Store } from '../store-BAGuOHDh.cjs';
4
- import '../extension-types-D07e_NTw.cjs';
5
- import '../types--0EslBx5.cjs';
2
+ import { G as GraphDef } from '../manager-Aqzmztkb.cjs';
3
+ import { S as Store } from '../store-DbQLsSor.cjs';
4
+ import '../extension-types-B78CZfA5.cjs';
5
+ import '../types-DZPBXZOK.cjs';
6
6
  import 'drizzle-orm';
7
- import '../materialize-indexes-BB9N5uQl.cjs';
7
+ import 'drizzle-orm/pg-core';
8
+ import 'drizzle-orm/sqlite-core';
9
+ import '../materialize-indexes-BQfaAZKA.cjs';
8
10
 
9
11
  /**
10
12
  * Graph interchange format types.
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
- import { G as GraphDef } from '../manager-BKaPQbns.js';
3
- import { S as Store } from '../store-De98Lod4.js';
4
- import '../extension-types-D07e_NTw.js';
5
- import '../types-BNWYZ-0-.js';
2
+ import { G as GraphDef } from '../manager-C3LxzPcX.js';
3
+ import { S as Store } from '../store-CiS_AGNH.js';
4
+ import '../extension-types-B78CZfA5.js';
5
+ import '../types-Dzkr0Eqi.js';
6
6
  import 'drizzle-orm';
7
- import '../materialize-indexes-BYpU2RKh.js';
7
+ import 'drizzle-orm/pg-core';
8
+ import 'drizzle-orm/sqlite-core';
9
+ import '../materialize-indexes-DFavFQah.js';
8
10
 
9
11
  /**
10
12
  * Graph interchange format types.
@@ -1,6 +1,6 @@
1
- import { getNodeKinds, getEdgeKinds, nowIso } from '../chunk-EG6TJ3I5.js';
1
+ import { getNodeKinds, getEdgeKinds, nowIso } from '../chunk-OYLF3IC7.js';
2
2
  import '../chunk-WVQXAFP3.js';
3
- import '../chunk-DOTEN2FG.js';
3
+ import '../chunk-U5ROKVRF.js';
4
4
  import { z } from 'zod';
5
5
 
6
6
  var FORMAT_VERSION = "1.0";
@@ -1,5 +1,5 @@
1
- import { b as NodeRegistration, E as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, G as GraphExtension, N as NodeType, A as AnyEdgeType, c as GraphDefaults, I as IndexEntity } from './extension-types-D07e_NTw.cjs';
2
- import { O as OntologyRelation, I as IndexDeclaration, S as SerializedNodeDef, d as SerializedEdgeDef, h as SerializedSchema, y as SchemaVersionRow, G as GraphBackend } from './types--0EslBx5.cjs';
1
+ import { b as NodeRegistration, E as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, G as GraphExtension, N as NodeType, A as AnyEdgeType, c as GraphDefaults, I as IndexEntity } from './extension-types-B78CZfA5.cjs';
2
+ import { O as OntologyRelation, I as IndexDeclaration, f as SerializedNodeDef, g as SerializedEdgeDef, k as SerializedSchema, D as SchemaVersionRow, G as GraphBackend } from './types-DZPBXZOK.cjs';
3
3
 
4
4
  /** Brand key for GraphDef */
5
5
  declare const GRAPH_DEF_BRAND: "__graphDef";
@@ -486,7 +486,15 @@ declare function getMigrationActions(diff: SchemaDiff): readonly string[];
486
486
  declare function parseSerializedSchema(json: string): SerializedSchema;
487
487
  /**
488
488
  * Reads the active schema row, bootstrapping the base tables on the
489
- * first call against an empty database.
489
+ * first call against an empty database. Also runs the focused
490
+ * runtime-contribution ensure on the success path: drizzle-kit-managed
491
+ * setups create every base table EXCEPT strategy-owned runtime tables
492
+ * (fulltext), and the missing-table-error fallback below doesn't
493
+ * trigger once `schema_versions` exists. `ensureRuntimeContributions`
494
+ * closes that gap before any `searchable()` write runs — scoped to
495
+ * `runtimeEnsure` contributions only, so this stays a focused ensure
496
+ * rather than broad startup DDL (#129). Falls back to the deprecated
497
+ * `ensureFulltextTable` for backends predating #129.
490
498
  */
491
499
  declare function loadActiveSchemaWithBootstrap(backend: GraphBackend, graphId: string): Promise<SchemaVersionRow | undefined>;
492
500
  /**
@@ -1,5 +1,5 @@
1
- import { b as NodeRegistration, E as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, G as GraphExtension, N as NodeType, A as AnyEdgeType, c as GraphDefaults, I as IndexEntity } from './extension-types-D07e_NTw.js';
2
- import { O as OntologyRelation, I as IndexDeclaration, S as SerializedNodeDef, d as SerializedEdgeDef, h as SerializedSchema, y as SchemaVersionRow, G as GraphBackend } from './types-BNWYZ-0-.js';
1
+ import { b as NodeRegistration, E as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, G as GraphExtension, N as NodeType, A as AnyEdgeType, c as GraphDefaults, I as IndexEntity } from './extension-types-B78CZfA5.js';
2
+ import { O as OntologyRelation, I as IndexDeclaration, f as SerializedNodeDef, g as SerializedEdgeDef, k as SerializedSchema, D as SchemaVersionRow, G as GraphBackend } from './types-Dzkr0Eqi.js';
3
3
 
4
4
  /** Brand key for GraphDef */
5
5
  declare const GRAPH_DEF_BRAND: "__graphDef";
@@ -486,7 +486,15 @@ declare function getMigrationActions(diff: SchemaDiff): readonly string[];
486
486
  declare function parseSerializedSchema(json: string): SerializedSchema;
487
487
  /**
488
488
  * Reads the active schema row, bootstrapping the base tables on the
489
- * first call against an empty database.
489
+ * first call against an empty database. Also runs the focused
490
+ * runtime-contribution ensure on the success path: drizzle-kit-managed
491
+ * setups create every base table EXCEPT strategy-owned runtime tables
492
+ * (fulltext), and the missing-table-error fallback below doesn't
493
+ * trigger once `schema_versions` exists. `ensureRuntimeContributions`
494
+ * closes that gap before any `searchable()` write runs — scoped to
495
+ * `runtimeEnsure` contributions only, so this stays a focused ensure
496
+ * rather than broad startup DDL (#129). Falls back to the deprecated
497
+ * `ensureFulltextTable` for backends predating #129.
490
498
  */
491
499
  declare function loadActiveSchemaWithBootstrap(backend: GraphBackend, graphId: string): Promise<SchemaVersionRow | undefined>;
492
500
  /**
@@ -1,4 +1,4 @@
1
- import { I as IndexEntity } from './extension-types-D07e_NTw.cjs';
1
+ import { I as IndexEntity } from './extension-types-B78CZfA5.cjs';
2
2
 
3
3
  /**
4
4
  * Index materialization — runs declared index DDL against the live
@@ -1,4 +1,4 @@
1
- import { I as IndexEntity } from './extension-types-D07e_NTw.js';
1
+ import { I as IndexEntity } from './extension-types-B78CZfA5.js';
2
2
 
3
3
  /**
4
4
  * Index materialization — runs declared index DDL against the live
@@ -1,12 +1,14 @@
1
- import { G as GraphDef } from '../manager-BpjBW1JK.cjs';
2
- import { Q as QueryAst } from '../types--0EslBx5.cjs';
3
- import { S as Store } from '../store-BAGuOHDh.cjs';
4
- import { P as ProfilerOptions, a as ProfileReport } from '../types-CYga3lZp.cjs';
5
- export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-CYga3lZp.cjs';
6
- import '../extension-types-D07e_NTw.cjs';
1
+ import { G as GraphDef } from '../manager-Aqzmztkb.cjs';
2
+ import { Q as QueryAst } from '../types-DZPBXZOK.cjs';
3
+ import { S as Store } from '../store-DbQLsSor.cjs';
4
+ import { P as ProfilerOptions, a as ProfileReport } from '../types-CF7nDH3q.cjs';
5
+ export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-CF7nDH3q.cjs';
6
+ import '../extension-types-B78CZfA5.cjs';
7
7
  import 'zod';
8
8
  import 'drizzle-orm';
9
- import '../materialize-indexes-BB9N5uQl.cjs';
9
+ import 'drizzle-orm/pg-core';
10
+ import 'drizzle-orm/sqlite-core';
11
+ import '../materialize-indexes-BQfaAZKA.cjs';
10
12
 
11
13
  /**
12
14
  * QueryProfiler - Main profiler class.
@@ -1,12 +1,14 @@
1
- import { G as GraphDef } from '../manager-BKaPQbns.js';
2
- import { Q as QueryAst } from '../types-BNWYZ-0-.js';
3
- import { S as Store } from '../store-De98Lod4.js';
4
- import { P as ProfilerOptions, a as ProfileReport } from '../types-BLmJq4wI.js';
5
- export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-BLmJq4wI.js';
6
- import '../extension-types-D07e_NTw.js';
1
+ import { G as GraphDef } from '../manager-C3LxzPcX.js';
2
+ import { Q as QueryAst } from '../types-Dzkr0Eqi.js';
3
+ import { S as Store } from '../store-CiS_AGNH.js';
4
+ import { P as ProfilerOptions, a as ProfileReport } from '../types-Cars4JZ1.js';
5
+ export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-Cars4JZ1.js';
6
+ import '../extension-types-B78CZfA5.js';
7
7
  import 'zod';
8
8
  import 'drizzle-orm';
9
- import '../materialize-indexes-BYpU2RKh.js';
9
+ import 'drizzle-orm/pg-core';
10
+ import 'drizzle-orm/sqlite-core';
11
+ import '../materialize-indexes-DFavFQah.js';
10
12
 
11
13
  /**
12
14
  * QueryProfiler - Main profiler class.
@@ -1,12 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunk7W3KAMVQ_cjs = require('../chunk-7W3KAMVQ.cjs');
4
- require('../chunk-E5JZSEGJ.cjs');
5
- require('../chunk-RCAJZG67.cjs');
3
+ var chunk4TJI44WP_cjs = require('../chunk-4TJI44WP.cjs');
4
+ require('../chunk-WFUN6DCM.cjs');
5
+ require('../chunk-PYJOBZR3.cjs');
6
+ require('../chunk-IUIWCFG3.cjs');
6
7
  require('../chunk-CTHNVU6K.cjs');
7
8
  require('../chunk-EK6RJ373.cjs');
8
9
  require('../chunk-X3244EKP.cjs');
9
- require('../chunk-W5MTHMTE.cjs');
10
+ require('../chunk-YEDQLNVE.cjs');
10
11
  require('../chunk-7V335GHG.cjs');
11
12
 
12
13
  // src/schema/deserializer.ts
@@ -47,7 +48,7 @@ function buildRegistryFromClosures(schema) {
47
48
  const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
48
49
  const nodeKinds = /* @__PURE__ */ new Map();
49
50
  const edgeKinds = /* @__PURE__ */ new Map();
50
- return new chunk7W3KAMVQ_cjs.KindRegistry(nodeKinds, edgeKinds, {
51
+ return new chunk4TJI44WP_cjs.KindRegistry(nodeKinds, edgeKinds, {
51
52
  subClassAncestors,
52
53
  subClassDescendants,
53
54
  broaderClosure,
@@ -75,91 +76,91 @@ function simpleRecordToMap(record) {
75
76
 
76
77
  Object.defineProperty(exports, "applyDeprecatedKinds", {
77
78
  enumerable: true,
78
- get: function () { return chunk7W3KAMVQ_cjs.applyDeprecatedKinds; }
79
+ get: function () { return chunk4TJI44WP_cjs.applyDeprecatedKinds; }
79
80
  });
80
81
  Object.defineProperty(exports, "computeSchemaDiff", {
81
82
  enumerable: true,
82
- get: function () { return chunk7W3KAMVQ_cjs.computeSchemaDiff; }
83
+ get: function () { return chunk4TJI44WP_cjs.computeSchemaDiff; }
83
84
  });
84
85
  Object.defineProperty(exports, "computeSchemaHash", {
85
86
  enumerable: true,
86
- get: function () { return chunk7W3KAMVQ_cjs.computeSchemaHash; }
87
+ get: function () { return chunk4TJI44WP_cjs.computeSchemaHash; }
87
88
  });
88
89
  Object.defineProperty(exports, "createValidationError", {
89
90
  enumerable: true,
90
- get: function () { return chunk7W3KAMVQ_cjs.createValidationError; }
91
+ get: function () { return chunk4TJI44WP_cjs.createValidationError; }
91
92
  });
92
93
  Object.defineProperty(exports, "deserializeWherePredicate", {
93
94
  enumerable: true,
94
- get: function () { return chunk7W3KAMVQ_cjs.deserializeWherePredicate; }
95
+ get: function () { return chunk4TJI44WP_cjs.deserializeWherePredicate; }
95
96
  });
96
97
  Object.defineProperty(exports, "ensureSchema", {
97
98
  enumerable: true,
98
- get: function () { return chunk7W3KAMVQ_cjs.ensureSchema; }
99
+ get: function () { return chunk4TJI44WP_cjs.ensureSchema; }
99
100
  });
100
101
  Object.defineProperty(exports, "getActiveSchema", {
101
102
  enumerable: true,
102
- get: function () { return chunk7W3KAMVQ_cjs.getActiveSchema; }
103
+ get: function () { return chunk4TJI44WP_cjs.getActiveSchema; }
103
104
  });
104
105
  Object.defineProperty(exports, "getMigrationActions", {
105
106
  enumerable: true,
106
- get: function () { return chunk7W3KAMVQ_cjs.getMigrationActions; }
107
+ get: function () { return chunk4TJI44WP_cjs.getMigrationActions; }
107
108
  });
108
109
  Object.defineProperty(exports, "getSchemaChanges", {
109
110
  enumerable: true,
110
- get: function () { return chunk7W3KAMVQ_cjs.getSchemaChanges; }
111
+ get: function () { return chunk4TJI44WP_cjs.getSchemaChanges; }
111
112
  });
112
113
  Object.defineProperty(exports, "initializeSchema", {
113
114
  enumerable: true,
114
- get: function () { return chunk7W3KAMVQ_cjs.initializeSchema; }
115
+ get: function () { return chunk4TJI44WP_cjs.initializeSchema; }
115
116
  });
116
117
  Object.defineProperty(exports, "isBackwardsCompatible", {
117
118
  enumerable: true,
118
- get: function () { return chunk7W3KAMVQ_cjs.isBackwardsCompatible; }
119
+ get: function () { return chunk4TJI44WP_cjs.isBackwardsCompatible; }
119
120
  });
120
121
  Object.defineProperty(exports, "isSchemaInitialized", {
121
122
  enumerable: true,
122
- get: function () { return chunk7W3KAMVQ_cjs.isSchemaInitialized; }
123
+ get: function () { return chunk4TJI44WP_cjs.isSchemaInitialized; }
123
124
  });
124
125
  Object.defineProperty(exports, "loadActiveSchemaWithBootstrap", {
125
126
  enumerable: true,
126
- get: function () { return chunk7W3KAMVQ_cjs.loadActiveSchemaWithBootstrap; }
127
+ get: function () { return chunk4TJI44WP_cjs.loadActiveSchemaWithBootstrap; }
127
128
  });
128
129
  Object.defineProperty(exports, "loadAndMergeGraphExtensionDocument", {
129
130
  enumerable: true,
130
- get: function () { return chunk7W3KAMVQ_cjs.loadAndMergeGraphExtensionDocument; }
131
+ get: function () { return chunk4TJI44WP_cjs.loadAndMergeGraphExtensionDocument; }
131
132
  });
132
133
  Object.defineProperty(exports, "migrateSchema", {
133
134
  enumerable: true,
134
- get: function () { return chunk7W3KAMVQ_cjs.migrateSchema; }
135
+ get: function () { return chunk4TJI44WP_cjs.migrateSchema; }
135
136
  });
136
137
  Object.defineProperty(exports, "parseSerializedSchema", {
137
138
  enumerable: true,
138
- get: function () { return chunk7W3KAMVQ_cjs.parseSerializedSchema; }
139
+ get: function () { return chunk4TJI44WP_cjs.parseSerializedSchema; }
139
140
  });
140
141
  Object.defineProperty(exports, "rollbackSchema", {
141
142
  enumerable: true,
142
- get: function () { return chunk7W3KAMVQ_cjs.rollbackSchema; }
143
+ get: function () { return chunk4TJI44WP_cjs.rollbackSchema; }
143
144
  });
144
145
  Object.defineProperty(exports, "serializeSchema", {
145
146
  enumerable: true,
146
- get: function () { return chunk7W3KAMVQ_cjs.serializeSchema; }
147
+ get: function () { return chunk4TJI44WP_cjs.serializeSchema; }
147
148
  });
148
149
  Object.defineProperty(exports, "validateEdgeProps", {
149
150
  enumerable: true,
150
- get: function () { return chunk7W3KAMVQ_cjs.validateEdgeProps; }
151
+ get: function () { return chunk4TJI44WP_cjs.validateEdgeProps; }
151
152
  });
152
153
  Object.defineProperty(exports, "validateNodeProps", {
153
154
  enumerable: true,
154
- get: function () { return chunk7W3KAMVQ_cjs.validateNodeProps; }
155
+ get: function () { return chunk4TJI44WP_cjs.validateNodeProps; }
155
156
  });
156
157
  Object.defineProperty(exports, "validateProps", {
157
158
  enumerable: true,
158
- get: function () { return chunk7W3KAMVQ_cjs.validateProps; }
159
+ get: function () { return chunk4TJI44WP_cjs.validateProps; }
159
160
  });
160
161
  Object.defineProperty(exports, "wrapZodError", {
161
162
  enumerable: true,
162
- get: function () { return chunk7W3KAMVQ_cjs.wrapZodError; }
163
+ get: function () { return chunk4TJI44WP_cjs.wrapZodError; }
163
164
  });
164
165
  exports.deserializeSchema = deserializeSchema;
165
166
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schema/deserializer.ts"],"names":["KindRegistry"],"mappings":"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","file":"index.cjs","sourcesContent":["/**\n * Schema deserializer for loading stored schemas.\n *\n * Reconstructs runtime objects from SerializedSchema.\n * Note: Zod schemas cannot be fully reconstructed from JSON Schema,\n * so this provides access to the serialized data for introspection.\n */\nimport { KindRegistry } from \"../registry/kind-registry\";\nimport {\n type SerializedClosures,\n type SerializedEdgeDef,\n type SerializedMetaEdge,\n type SerializedNodeDef,\n type SerializedOntologyRelation,\n type SerializedSchema,\n} from \"./types\";\n\n// ============================================================\n// Deserialized Schema\n// ============================================================\n\n/**\n * A deserialized schema provides read-only access to schema metadata.\n *\n * Note: Unlike the original GraphDef, this does not include Zod schemas\n * since those cannot be reconstructed from JSON Schema. Use this for\n * introspection and metadata access only.\n */\nexport type DeserializedSchema = Readonly<{\n graphId: string;\n version: number;\n generatedAt: string;\n\n /** Get node definition by name */\n getNode: (name: string) => SerializedNodeDef | undefined;\n\n /** Get all node names */\n getNodeNames: () => readonly string[];\n\n /** Get edge definition by name */\n getEdge: (name: string) => SerializedEdgeDef | undefined;\n\n /** Get all edge names */\n getEdgeNames: () => readonly string[];\n\n /** Get meta-edge definition by name */\n getMetaEdge: (name: string) => SerializedMetaEdge | undefined;\n\n /** Get all meta-edge names */\n getMetaEdgeNames: () => readonly string[];\n\n /** Get all ontology relations */\n getRelations: () => readonly SerializedOntologyRelation[];\n\n /** Get precomputed closures */\n getClosures: () => SerializedClosures;\n\n /** Get graph defaults */\n getDefaults: () => SerializedSchema[\"defaults\"];\n\n /** Get the raw serialized schema */\n getRaw: () => SerializedSchema;\n\n /** Build a KindRegistry from the closures */\n buildRegistry: () => KindRegistry;\n}>;\n\n// ============================================================\n// Deserialization\n// ============================================================\n\n/**\n * Deserializes a SerializedSchema into a DeserializedSchema.\n *\n * @param schema - The serialized schema to deserialize\n * @returns A deserialized schema with accessor methods\n */\nexport function deserializeSchema(\n schema: SerializedSchema,\n): DeserializedSchema {\n const nodeNames = Object.keys(schema.nodes);\n const edgeNames = Object.keys(schema.edges);\n const metaEdgeNames = Object.keys(schema.ontology.metaEdges);\n\n return {\n graphId: schema.graphId,\n version: schema.version,\n generatedAt: schema.generatedAt,\n\n getNode: (name) => schema.nodes[name],\n getNodeNames: () => nodeNames,\n\n getEdge: (name) => schema.edges[name],\n getEdgeNames: () => edgeNames,\n\n getMetaEdge: (name) => schema.ontology.metaEdges[name],\n getMetaEdgeNames: () => metaEdgeNames,\n\n getRelations: () => schema.ontology.relations,\n getClosures: () => schema.ontology.closures,\n\n getDefaults: () => schema.defaults,\n getRaw: () => schema,\n\n buildRegistry: () => buildRegistryFromClosures(schema),\n };\n}\n\n// ============================================================\n// Registry Building\n// ============================================================\n\n/**\n * Builds a KindRegistry from serialized closures.\n *\n * This allows query execution without recomputing closures.\n */\nfunction buildRegistryFromClosures(schema: SerializedSchema): KindRegistry {\n const { closures } = schema.ontology;\n\n // Convert Record<string, string[]> back to Map<string, Set<string>>\n const subClassAncestors = recordToMap(closures.subClassAncestors);\n const subClassDescendants = recordToMap(closures.subClassDescendants);\n const broaderClosure = recordToMap(closures.broaderClosure);\n const narrowerClosure = recordToMap(closures.narrowerClosure);\n const equivalenceSets = recordToMap(closures.equivalenceSets);\n const partOfClosure = recordToMap(closures.partOfClosure);\n const hasPartClosure = recordToMap(closures.hasPartClosure);\n const iriToKind = simpleRecordToMap(closures.iriToKind);\n const disjointPairs = new Set(closures.disjointPairs);\n const edgeInverses = simpleRecordToMap(closures.edgeInverses);\n const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);\n const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);\n\n // Build empty node/edge kind maps (we don't have the actual Zod schemas)\n const nodeKinds = new Map();\n const edgeKinds = new Map();\n\n return new KindRegistry(nodeKinds, edgeKinds, {\n subClassAncestors,\n subClassDescendants,\n broaderClosure,\n narrowerClosure,\n equivalenceSets,\n iriToKind,\n disjointPairs,\n partOfClosure,\n hasPartClosure,\n edgeInverses,\n edgeImplicationsClosure,\n edgeImplyingClosure,\n });\n}\n\n/**\n * Converts Record<string, string[]> to Map<string, Set<string>>.\n */\nfunction recordToMap(\n record: Record<string, readonly string[]>,\n): ReadonlyMap<string, ReadonlySet<string>> {\n const result = new Map<string, Set<string>>();\n for (const [key, values] of Object.entries(record)) {\n result.set(key, new Set(values));\n }\n return result;\n}\n\n/**\n * Converts Record<string, string> to Map<string, string>.\n */\nfunction simpleRecordToMap(\n record: Record<string, string>,\n): ReadonlyMap<string, string> {\n return new Map(Object.entries(record));\n}\n"]}
1
+ {"version":3,"sources":["../../src/schema/deserializer.ts"],"names":["KindRegistry"],"mappings":"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","file":"index.cjs","sourcesContent":["/**\n * Schema deserializer for loading stored schemas.\n *\n * Reconstructs runtime objects from SerializedSchema.\n * Note: Zod schemas cannot be fully reconstructed from JSON Schema,\n * so this provides access to the serialized data for introspection.\n */\nimport { KindRegistry } from \"../registry/kind-registry\";\nimport {\n type SerializedClosures,\n type SerializedEdgeDef,\n type SerializedMetaEdge,\n type SerializedNodeDef,\n type SerializedOntologyRelation,\n type SerializedSchema,\n} from \"./types\";\n\n// ============================================================\n// Deserialized Schema\n// ============================================================\n\n/**\n * A deserialized schema provides read-only access to schema metadata.\n *\n * Note: Unlike the original GraphDef, this does not include Zod schemas\n * since those cannot be reconstructed from JSON Schema. Use this for\n * introspection and metadata access only.\n */\nexport type DeserializedSchema = Readonly<{\n graphId: string;\n version: number;\n generatedAt: string;\n\n /** Get node definition by name */\n getNode: (name: string) => SerializedNodeDef | undefined;\n\n /** Get all node names */\n getNodeNames: () => readonly string[];\n\n /** Get edge definition by name */\n getEdge: (name: string) => SerializedEdgeDef | undefined;\n\n /** Get all edge names */\n getEdgeNames: () => readonly string[];\n\n /** Get meta-edge definition by name */\n getMetaEdge: (name: string) => SerializedMetaEdge | undefined;\n\n /** Get all meta-edge names */\n getMetaEdgeNames: () => readonly string[];\n\n /** Get all ontology relations */\n getRelations: () => readonly SerializedOntologyRelation[];\n\n /** Get precomputed closures */\n getClosures: () => SerializedClosures;\n\n /** Get graph defaults */\n getDefaults: () => SerializedSchema[\"defaults\"];\n\n /** Get the raw serialized schema */\n getRaw: () => SerializedSchema;\n\n /** Build a KindRegistry from the closures */\n buildRegistry: () => KindRegistry;\n}>;\n\n// ============================================================\n// Deserialization\n// ============================================================\n\n/**\n * Deserializes a SerializedSchema into a DeserializedSchema.\n *\n * @param schema - The serialized schema to deserialize\n * @returns A deserialized schema with accessor methods\n */\nexport function deserializeSchema(\n schema: SerializedSchema,\n): DeserializedSchema {\n const nodeNames = Object.keys(schema.nodes);\n const edgeNames = Object.keys(schema.edges);\n const metaEdgeNames = Object.keys(schema.ontology.metaEdges);\n\n return {\n graphId: schema.graphId,\n version: schema.version,\n generatedAt: schema.generatedAt,\n\n getNode: (name) => schema.nodes[name],\n getNodeNames: () => nodeNames,\n\n getEdge: (name) => schema.edges[name],\n getEdgeNames: () => edgeNames,\n\n getMetaEdge: (name) => schema.ontology.metaEdges[name],\n getMetaEdgeNames: () => metaEdgeNames,\n\n getRelations: () => schema.ontology.relations,\n getClosures: () => schema.ontology.closures,\n\n getDefaults: () => schema.defaults,\n getRaw: () => schema,\n\n buildRegistry: () => buildRegistryFromClosures(schema),\n };\n}\n\n// ============================================================\n// Registry Building\n// ============================================================\n\n/**\n * Builds a KindRegistry from serialized closures.\n *\n * This allows query execution without recomputing closures.\n */\nfunction buildRegistryFromClosures(schema: SerializedSchema): KindRegistry {\n const { closures } = schema.ontology;\n\n // Convert Record<string, string[]> back to Map<string, Set<string>>\n const subClassAncestors = recordToMap(closures.subClassAncestors);\n const subClassDescendants = recordToMap(closures.subClassDescendants);\n const broaderClosure = recordToMap(closures.broaderClosure);\n const narrowerClosure = recordToMap(closures.narrowerClosure);\n const equivalenceSets = recordToMap(closures.equivalenceSets);\n const partOfClosure = recordToMap(closures.partOfClosure);\n const hasPartClosure = recordToMap(closures.hasPartClosure);\n const iriToKind = simpleRecordToMap(closures.iriToKind);\n const disjointPairs = new Set(closures.disjointPairs);\n const edgeInverses = simpleRecordToMap(closures.edgeInverses);\n const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);\n const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);\n\n // Build empty node/edge kind maps (we don't have the actual Zod schemas)\n const nodeKinds = new Map();\n const edgeKinds = new Map();\n\n return new KindRegistry(nodeKinds, edgeKinds, {\n subClassAncestors,\n subClassDescendants,\n broaderClosure,\n narrowerClosure,\n equivalenceSets,\n iriToKind,\n disjointPairs,\n partOfClosure,\n hasPartClosure,\n edgeInverses,\n edgeImplicationsClosure,\n edgeImplyingClosure,\n });\n}\n\n/**\n * Converts Record<string, string[]> to Map<string, Set<string>>.\n */\nfunction recordToMap(\n record: Record<string, readonly string[]>,\n): ReadonlyMap<string, ReadonlySet<string>> {\n const result = new Map<string, Set<string>>();\n for (const [key, values] of Object.entries(record)) {\n result.set(key, new Set(values));\n }\n return result;\n}\n\n/**\n * Converts Record<string, string> to Map<string, string>.\n */\nfunction simpleRecordToMap(\n record: Record<string, string>,\n): ReadonlyMap<string, string> {\n return new Map(Object.entries(record));\n}\n"]}
@@ -1,12 +1,14 @@
1
- import { K as KindRegistry, G as GraphDef } from '../manager-BpjBW1JK.cjs';
2
- export { C as ChangeSeverity, a as ChangeType, D as DeprecatedKindsChange, E as EdgeChange, b as ExtensionChange, I as IndexChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, S as SchemaDiff, c as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as computeSchemaDiff, g as ensureSchema, h as getActiveSchema, i as getMigrationActions, j as getSchemaChanges, k as initializeSchema, l as isBackwardsCompatible, m as isSchemaInitialized, n as loadActiveSchemaWithBootstrap, o as loadAndMergeGraphExtensionDocument, p as migrateSchema, q as parseSerializedSchema, r as rollbackSchema } from '../manager-BpjBW1JK.cjs';
3
- import { S as SerializedNodeDef, d as SerializedEdgeDef, e as SerializedMetaEdge, f as SerializedOntologyRelation, g as SerializedClosures, h as SerializedSchema, i as SchemaHash } from '../types--0EslBx5.cjs';
4
- export { j as JsonSchema, k as SerializedOntology, l as SerializedUniqueConstraint } from '../types--0EslBx5.cjs';
5
- import { a as NullCheckOp, K as KindEntity } from '../extension-types-D07e_NTw.cjs';
1
+ import { K as KindRegistry, G as GraphDef } from '../manager-Aqzmztkb.cjs';
2
+ export { C as ChangeSeverity, a as ChangeType, D as DeprecatedKindsChange, E as EdgeChange, b as ExtensionChange, I as IndexChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, S as SchemaDiff, c as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as computeSchemaDiff, g as ensureSchema, h as getActiveSchema, i as getMigrationActions, j as getSchemaChanges, k as initializeSchema, l as isBackwardsCompatible, m as isSchemaInitialized, n as loadActiveSchemaWithBootstrap, o as loadAndMergeGraphExtensionDocument, p as migrateSchema, q as parseSerializedSchema, r as rollbackSchema } from '../manager-Aqzmztkb.cjs';
3
+ import { f as SerializedNodeDef, g as SerializedEdgeDef, h as SerializedMetaEdge, i as SerializedOntologyRelation, j as SerializedClosures, k as SerializedSchema, l as SchemaHash } from '../types-DZPBXZOK.cjs';
4
+ export { m as JsonSchema, n as SerializedOntology, o as SerializedUniqueConstraint } from '../types-DZPBXZOK.cjs';
5
+ import { a as NullCheckOp, K as KindEntity } from '../extension-types-B78CZfA5.cjs';
6
6
  import { ZodType, ZodError } from 'zod';
7
- import { V as ValidationIssue, a as ValidationError } from '../index-CT6nvtxL.cjs';
7
+ import { V as ValidationIssue, a as ValidationError } from '../index-Bilw0pYm.cjs';
8
8
  import 'drizzle-orm';
9
- import '../materialize-indexes-BB9N5uQl.cjs';
9
+ import 'drizzle-orm/pg-core';
10
+ import 'drizzle-orm/sqlite-core';
11
+ import '../materialize-indexes-BQfaAZKA.cjs';
10
12
 
11
13
  /**
12
14
  * Schema deserializer for loading stored schemas.
@@ -1,12 +1,14 @@
1
- import { K as KindRegistry, G as GraphDef } from '../manager-BKaPQbns.js';
2
- export { C as ChangeSeverity, a as ChangeType, D as DeprecatedKindsChange, E as EdgeChange, b as ExtensionChange, I as IndexChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, S as SchemaDiff, c as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as computeSchemaDiff, g as ensureSchema, h as getActiveSchema, i as getMigrationActions, j as getSchemaChanges, k as initializeSchema, l as isBackwardsCompatible, m as isSchemaInitialized, n as loadActiveSchemaWithBootstrap, o as loadAndMergeGraphExtensionDocument, p as migrateSchema, q as parseSerializedSchema, r as rollbackSchema } from '../manager-BKaPQbns.js';
3
- import { S as SerializedNodeDef, d as SerializedEdgeDef, e as SerializedMetaEdge, f as SerializedOntologyRelation, g as SerializedClosures, h as SerializedSchema, i as SchemaHash } from '../types-BNWYZ-0-.js';
4
- export { j as JsonSchema, k as SerializedOntology, l as SerializedUniqueConstraint } from '../types-BNWYZ-0-.js';
5
- import { a as NullCheckOp, K as KindEntity } from '../extension-types-D07e_NTw.js';
1
+ import { K as KindRegistry, G as GraphDef } from '../manager-C3LxzPcX.js';
2
+ export { C as ChangeSeverity, a as ChangeType, D as DeprecatedKindsChange, E as EdgeChange, b as ExtensionChange, I as IndexChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, S as SchemaDiff, c as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as computeSchemaDiff, g as ensureSchema, h as getActiveSchema, i as getMigrationActions, j as getSchemaChanges, k as initializeSchema, l as isBackwardsCompatible, m as isSchemaInitialized, n as loadActiveSchemaWithBootstrap, o as loadAndMergeGraphExtensionDocument, p as migrateSchema, q as parseSerializedSchema, r as rollbackSchema } from '../manager-C3LxzPcX.js';
3
+ import { f as SerializedNodeDef, g as SerializedEdgeDef, h as SerializedMetaEdge, i as SerializedOntologyRelation, j as SerializedClosures, k as SerializedSchema, l as SchemaHash } from '../types-Dzkr0Eqi.js';
4
+ export { m as JsonSchema, n as SerializedOntology, o as SerializedUniqueConstraint } from '../types-Dzkr0Eqi.js';
5
+ import { a as NullCheckOp, K as KindEntity } from '../extension-types-B78CZfA5.js';
6
6
  import { ZodType, ZodError } from 'zod';
7
- import { V as ValidationIssue, a as ValidationError } from '../index-DQheiVQV.js';
7
+ import { V as ValidationIssue, a as ValidationError } from '../index-CWdBFWbI.js';
8
8
  import 'drizzle-orm';
9
- import '../materialize-indexes-BYpU2RKh.js';
9
+ import 'drizzle-orm/pg-core';
10
+ import 'drizzle-orm/sqlite-core';
11
+ import '../materialize-indexes-DFavFQah.js';
10
12
 
11
13
  /**
12
14
  * Schema deserializer for loading stored schemas.
@@ -1,11 +1,12 @@
1
- import { KindRegistry } from '../chunk-LVCSL6A3.js';
2
- export { applyDeprecatedKinds, computeSchemaDiff, computeSchemaHash, createValidationError, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, migrateSchema, parseSerializedSchema, rollbackSchema, serializeSchema, validateEdgeProps, validateNodeProps, validateProps, wrapZodError } from '../chunk-LVCSL6A3.js';
3
- import '../chunk-EG6TJ3I5.js';
4
- import '../chunk-4BOWVUGQ.js';
1
+ import { KindRegistry } from '../chunk-3W6AIFT2.js';
2
+ export { applyDeprecatedKinds, computeSchemaDiff, computeSchemaHash, createValidationError, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, migrateSchema, parseSerializedSchema, rollbackSchema, serializeSchema, validateEdgeProps, validateNodeProps, validateProps, wrapZodError } from '../chunk-3W6AIFT2.js';
3
+ import '../chunk-OYLF3IC7.js';
4
+ import '../chunk-TSGBRPNE.js';
5
+ import '../chunk-5H3BAMTB.js';
5
6
  import '../chunk-EJCDOA37.js';
6
7
  import '../chunk-OOS2RKRH.js';
7
8
  import '../chunk-WVQXAFP3.js';
8
- import '../chunk-DOTEN2FG.js';
9
+ import '../chunk-U5ROKVRF.js';
9
10
  import '../chunk-NZ5PMBTG.js';
10
11
 
11
12
  // src/schema/deserializer.ts