@nicia-ai/typegraph 0.5.0 → 0.7.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 (128) hide show
  1. package/README.md +2 -2
  2. package/dist/{ast-D-3bOanX.d.cts → ast-Bh2NDeaK.d.cts} +2 -2
  3. package/dist/{ast-CXFx6bF6.d.ts → ast-COMyNeMn.d.ts} +2 -2
  4. package/dist/backend/postgres/index.cjs +295 -23
  5. package/dist/backend/postgres/index.cjs.map +1 -1
  6. package/dist/backend/postgres/index.d.cts +33 -10
  7. package/dist/backend/postgres/index.d.ts +33 -10
  8. package/dist/backend/postgres/index.js +285 -5
  9. package/dist/backend/postgres/index.js.map +1 -1
  10. package/dist/backend/sqlite/index.cjs +21 -90
  11. package/dist/backend/sqlite/index.cjs.map +1 -1
  12. package/dist/backend/sqlite/index.d.cts +22 -58
  13. package/dist/backend/sqlite/index.d.ts +22 -58
  14. package/dist/backend/sqlite/index.js +3 -78
  15. package/dist/backend/sqlite/index.js.map +1 -1
  16. package/dist/backend/sqlite/local.cjs +83 -0
  17. package/dist/backend/sqlite/local.cjs.map +1 -0
  18. package/dist/backend/sqlite/local.d.cts +66 -0
  19. package/dist/backend/sqlite/local.d.ts +66 -0
  20. package/dist/backend/sqlite/local.js +77 -0
  21. package/dist/backend/sqlite/local.js.map +1 -0
  22. package/dist/chunk-23NGZHUN.cjs +2132 -0
  23. package/dist/chunk-23NGZHUN.cjs.map +1 -0
  24. package/dist/{chunk-4MTYE6CF.js → chunk-2DKSQNPW.js} +3 -4
  25. package/dist/chunk-2DKSQNPW.js.map +1 -0
  26. package/dist/{chunk-K2ROKOK3.cjs → chunk-BELXZTVK.cjs} +2 -2
  27. package/dist/chunk-BELXZTVK.cjs.map +1 -0
  28. package/dist/chunk-JPO7W262.js +2093 -0
  29. package/dist/chunk-JPO7W262.js.map +1 -0
  30. package/dist/{chunk-TGDFBLGS.js → chunk-JUZWF5NX.js} +2 -2
  31. package/dist/chunk-JUZWF5NX.js.map +1 -0
  32. package/dist/{chunk-KPU6TLUV.cjs → chunk-K5O7TOJO.cjs} +15 -16
  33. package/dist/chunk-K5O7TOJO.cjs.map +1 -0
  34. package/dist/{chunk-LDM2AFKZ.cjs → chunk-PDQBCQ34.cjs} +6 -6
  35. package/dist/{chunk-LDM2AFKZ.cjs.map → chunk-PDQBCQ34.cjs.map} +1 -1
  36. package/dist/{chunk-M5SOQ7UV.js → chunk-SH237DWD.js} +3 -3
  37. package/dist/{chunk-M5SOQ7UV.js.map → chunk-SH237DWD.js.map} +1 -1
  38. package/dist/{backend/drizzle/schema/postgres.d.ts → ddl-BJg93HDN.d.cts} +17 -17
  39. package/dist/{backend/drizzle/schema/postgres.d.cts → ddl-CsfWcl_B.d.ts} +17 -17
  40. package/dist/{index-DyrR_d-H.d.ts → index-QTnQwakS.d.cts} +1 -1
  41. package/dist/{index-DyrR_d-H.d.cts → index-QTnQwakS.d.ts} +1 -1
  42. package/dist/index.cjs +61 -61
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.cts +11 -12
  45. package/dist/index.d.ts +11 -12
  46. package/dist/index.js +4 -4
  47. package/dist/index.js.map +1 -1
  48. package/dist/indexes/index.d.cts +5 -6
  49. package/dist/indexes/index.d.ts +5 -6
  50. package/dist/interchange/index.cjs +6 -6
  51. package/dist/interchange/index.d.cts +5 -6
  52. package/dist/interchange/index.d.ts +5 -6
  53. package/dist/interchange/index.js +1 -1
  54. package/dist/{manager-DXC7CqKG.d.ts → manager-Ba2CXGMG.d.ts} +6 -6
  55. package/dist/{manager-DiPf-0GG.d.cts → manager-Cu3JQN0H.d.cts} +6 -6
  56. package/dist/profiler/index.d.cts +7 -8
  57. package/dist/profiler/index.d.ts +7 -8
  58. package/dist/schema/index.cjs +21 -21
  59. package/dist/schema/index.d.cts +6 -7
  60. package/dist/schema/index.d.ts +6 -7
  61. package/dist/schema/index.js +3 -3
  62. package/dist/{backend/drizzle/schema/sqlite.d.ts → sqlite-DVca_IIy.d.cts} +2 -25
  63. package/dist/{backend/drizzle/schema/sqlite.d.cts → sqlite-H01wIXvB.d.ts} +2 -25
  64. package/dist/{store-nDW3GOFb.d.cts → store-CL-QMus7.d.cts} +62 -62
  65. package/dist/{store-DODIWZxC.d.ts → store-DJpuUOSL.d.ts} +62 -62
  66. package/dist/{types-DpIoePMI.d.ts → types-1YJKodRv.d.ts} +2 -3
  67. package/dist/{types-DHRsi6j9.d.cts → types-C8Ra3ROE.d.cts} +2 -2
  68. package/dist/{types-ZT5mlism.d.ts → types-CC8eB0PB.d.ts} +2 -2
  69. package/dist/{types-DCGa53O2.d.ts → types-COPePE8_.d.ts} +1 -1
  70. package/dist/{types-BL1GyVku.d.cts → types-CVtGFpB9.d.cts} +1 -1
  71. package/dist/{types-DTJEu_-h.d.ts → types-DMzKq0d5.d.cts} +24 -1
  72. package/dist/{types-DTJEu_-h.d.cts → types-DMzKq0d5.d.ts} +24 -1
  73. package/dist/{types-WX8V9dqn.d.cts → types-GLkwvQvS.d.cts} +2 -3
  74. package/package.json +11 -46
  75. package/dist/backend/drizzle/index.cjs +0 -40
  76. package/dist/backend/drizzle/index.cjs.map +0 -1
  77. package/dist/backend/drizzle/index.d.cts +0 -13
  78. package/dist/backend/drizzle/index.d.ts +0 -13
  79. package/dist/backend/drizzle/index.js +0 -11
  80. package/dist/backend/drizzle/index.js.map +0 -1
  81. package/dist/backend/drizzle/postgres.cjs +0 -26
  82. package/dist/backend/drizzle/postgres.cjs.map +0 -1
  83. package/dist/backend/drizzle/postgres.d.cts +0 -35
  84. package/dist/backend/drizzle/postgres.d.ts +0 -35
  85. package/dist/backend/drizzle/postgres.js +0 -9
  86. package/dist/backend/drizzle/postgres.js.map +0 -1
  87. package/dist/backend/drizzle/schema/postgres.cjs +0 -39
  88. package/dist/backend/drizzle/schema/postgres.cjs.map +0 -1
  89. package/dist/backend/drizzle/schema/postgres.js +0 -6
  90. package/dist/backend/drizzle/schema/postgres.js.map +0 -1
  91. package/dist/backend/drizzle/schema/sqlite.cjs +0 -39
  92. package/dist/backend/drizzle/schema/sqlite.cjs.map +0 -1
  93. package/dist/backend/drizzle/schema/sqlite.js +0 -6
  94. package/dist/backend/drizzle/schema/sqlite.js.map +0 -1
  95. package/dist/backend/drizzle/sqlite.cjs +0 -26
  96. package/dist/backend/drizzle/sqlite.cjs.map +0 -1
  97. package/dist/backend/drizzle/sqlite.d.cts +0 -35
  98. package/dist/backend/drizzle/sqlite.d.ts +0 -35
  99. package/dist/backend/drizzle/sqlite.js +0 -9
  100. package/dist/backend/drizzle/sqlite.js.map +0 -1
  101. package/dist/chunk-3PURVEA4.js +0 -193
  102. package/dist/chunk-3PURVEA4.js.map +0 -1
  103. package/dist/chunk-4MTYE6CF.js.map +0 -1
  104. package/dist/chunk-6HFWKZU5.js +0 -1506
  105. package/dist/chunk-6HFWKZU5.js.map +0 -1
  106. package/dist/chunk-ENXM4W4M.cjs +0 -289
  107. package/dist/chunk-ENXM4W4M.cjs.map +0 -1
  108. package/dist/chunk-K2ROKOK3.cjs.map +0 -1
  109. package/dist/chunk-KKFJJYCP.js +0 -287
  110. package/dist/chunk-KKFJJYCP.js.map +0 -1
  111. package/dist/chunk-KPU6TLUV.cjs.map +0 -1
  112. package/dist/chunk-NU2XNMVI.cjs +0 -201
  113. package/dist/chunk-NU2XNMVI.cjs.map +0 -1
  114. package/dist/chunk-OGGLFYFA.js +0 -177
  115. package/dist/chunk-OGGLFYFA.js.map +0 -1
  116. package/dist/chunk-PW5BSBZV.cjs +0 -1527
  117. package/dist/chunk-PW5BSBZV.cjs.map +0 -1
  118. package/dist/chunk-SMLIWLS7.js +0 -236
  119. package/dist/chunk-SMLIWLS7.js.map +0 -1
  120. package/dist/chunk-TGDFBLGS.js.map +0 -1
  121. package/dist/chunk-UYMT4LO2.cjs +0 -241
  122. package/dist/chunk-UYMT4LO2.cjs.map +0 -1
  123. package/dist/chunk-XZL6MCZJ.cjs +0 -185
  124. package/dist/chunk-XZL6MCZJ.cjs.map +0 -1
  125. package/dist/test-helpers-CIq1Hhj1.d.ts +0 -26
  126. package/dist/test-helpers-DPRFVky4.d.cts +0 -26
  127. package/dist/types-BRzHlhKC.d.cts +0 -14
  128. package/dist/types-BRzHlhKC.d.ts +0 -14
@@ -1,13 +1,12 @@
1
- import { S as SqlDialect } from '../types-BRzHlhKC.cjs';
2
- import { E as EdgeIndex, T as TypeGraphIndex, N as NodeIndex, a as EdgeIndexConfig, b as NodeIndexConfig, I as IndexWhereExpression } from '../types-DHRsi6j9.cjs';
3
- export { c as EdgeIndexDirection, d as EdgeIndexWhereBuilder, e as IndexScope, f as IndexWhereFieldBuilder, g as IndexWhereInput, h as NodeIndexWhereBuilder, S as SystemColumnName } from '../types-DHRsi6j9.cjs';
4
- import { A as AnyEdgeType, N as NodeType } from '../types-DTJEu_-h.cjs';
1
+ import { S as SqlDialect, A as AnyEdgeType, N as NodeType } from '../types-DMzKq0d5.cjs';
2
+ import { E as EdgeIndex, T as TypeGraphIndex, N as NodeIndex, a as EdgeIndexConfig, b as NodeIndexConfig, I as IndexWhereExpression } from '../types-C8Ra3ROE.cjs';
3
+ export { c as EdgeIndexDirection, d as EdgeIndexWhereBuilder, e as IndexScope, f as IndexWhereFieldBuilder, g as IndexWhereInput, h as NodeIndexWhereBuilder, S as SystemColumnName } from '../types-C8Ra3ROE.cjs';
5
4
  import { SQLWrapper } from 'drizzle-orm';
6
5
  import { IndexBuilder } from 'drizzle-orm/pg-core';
7
6
  import { IndexBuilder as IndexBuilder$1 } from 'drizzle-orm/sqlite-core';
8
- import { D as DeclaredIndex } from '../types-BL1GyVku.cjs';
7
+ import { D as DeclaredIndex } from '../types-CVtGFpB9.cjs';
9
8
  import 'zod';
10
- import '../ast-D-3bOanX.cjs';
9
+ import '../ast-Bh2NDeaK.cjs';
11
10
 
12
11
  type GenerateIndexDdlOptions = Readonly<{
13
12
  nodesTableName?: string | undefined;
@@ -1,13 +1,12 @@
1
- import { S as SqlDialect } from '../types-BRzHlhKC.js';
2
- import { E as EdgeIndex, T as TypeGraphIndex, N as NodeIndex, a as EdgeIndexConfig, b as NodeIndexConfig, I as IndexWhereExpression } from '../types-ZT5mlism.js';
3
- export { c as EdgeIndexDirection, d as EdgeIndexWhereBuilder, e as IndexScope, f as IndexWhereFieldBuilder, g as IndexWhereInput, h as NodeIndexWhereBuilder, S as SystemColumnName } from '../types-ZT5mlism.js';
4
- import { A as AnyEdgeType, N as NodeType } from '../types-DTJEu_-h.js';
1
+ import { S as SqlDialect, A as AnyEdgeType, N as NodeType } from '../types-DMzKq0d5.js';
2
+ import { E as EdgeIndex, T as TypeGraphIndex, N as NodeIndex, a as EdgeIndexConfig, b as NodeIndexConfig, I as IndexWhereExpression } from '../types-CC8eB0PB.js';
3
+ export { c as EdgeIndexDirection, d as EdgeIndexWhereBuilder, e as IndexScope, f as IndexWhereFieldBuilder, g as IndexWhereInput, h as NodeIndexWhereBuilder, S as SystemColumnName } from '../types-CC8eB0PB.js';
5
4
  import { SQLWrapper } from 'drizzle-orm';
6
5
  import { IndexBuilder } from 'drizzle-orm/pg-core';
7
6
  import { IndexBuilder as IndexBuilder$1 } from 'drizzle-orm/sqlite-core';
8
- import { D as DeclaredIndex } from '../types-DCGa53O2.js';
7
+ import { D as DeclaredIndex } from '../types-COPePE8_.js';
9
8
  import 'zod';
10
- import '../ast-CXFx6bF6.js';
9
+ import '../ast-COMyNeMn.js';
11
10
 
12
11
  type GenerateIndexDdlOptions = Readonly<{
13
12
  nodesTableName?: string | undefined;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkK2ROKOK3_cjs = require('../chunk-K2ROKOK3.cjs');
3
+ var chunkBELXZTVK_cjs = require('../chunk-BELXZTVK.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 ?? chunkK2ROKOK3_cjs.getNodeKinds(graph);
125
- const edgeKindsToExport = options_.edgeKinds ?? chunkK2ROKOK3_cjs.getEdgeKinds(graph);
124
+ const nodeKindsToExport = options_.nodeKinds ?? chunkBELXZTVK_cjs.getNodeKinds(graph);
125
+ const edgeKindsToExport = options_.edgeKinds ?? chunkBELXZTVK_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: chunkK2ROKOK3_cjs.nowIso(),
139
+ exportedAt: chunkBELXZTVK_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 chunkK2ROKOK3_cjs.getNodeKinds(graph)) {
287
+ for (const kindName of chunkBELXZTVK_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 chunkK2ROKOK3_cjs.getEdgeKinds(graph)) {
298
+ for (const kindName of chunkBELXZTVK_cjs.getEdgeKinds(graph)) {
299
299
  const registration = graph.edges[kindName];
300
300
  map.set(kindName, {
301
301
  registration,
@@ -1,11 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { G as GraphDef } from '../manager-DiPf-0GG.cjs';
3
- import { S as Store } from '../store-nDW3GOFb.cjs';
4
- import '../types-DTJEu_-h.cjs';
5
- import '../types-WX8V9dqn.cjs';
2
+ import { G as GraphDef } from '../manager-Cu3JQN0H.cjs';
3
+ import { J as Store } from '../store-CL-QMus7.cjs';
4
+ import '../types-DMzKq0d5.cjs';
5
+ import '../types-GLkwvQvS.cjs';
6
6
  import 'drizzle-orm';
7
- import '../types-BRzHlhKC.cjs';
8
- import '../ast-D-3bOanX.cjs';
7
+ import '../ast-Bh2NDeaK.cjs';
9
8
 
10
9
  /**
11
10
  * Graph interchange format types.
@@ -1,11 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { G as GraphDef } from '../manager-DXC7CqKG.js';
3
- import { S as Store } from '../store-DODIWZxC.js';
4
- import '../types-DTJEu_-h.js';
5
- import '../types-DpIoePMI.js';
2
+ import { G as GraphDef } from '../manager-Ba2CXGMG.js';
3
+ import { J as Store } from '../store-DJpuUOSL.js';
4
+ import '../types-DMzKq0d5.js';
5
+ import '../types-1YJKodRv.js';
6
6
  import 'drizzle-orm';
7
- import '../types-BRzHlhKC.js';
8
- import '../ast-CXFx6bF6.js';
7
+ import '../ast-COMyNeMn.js';
9
8
 
10
9
  /**
11
10
  * Graph interchange format types.
@@ -1,4 +1,4 @@
1
- import { getNodeKinds, getEdgeKinds, nowIso } from '../chunk-TGDFBLGS.js';
1
+ import { getNodeKinds, getEdgeKinds, nowIso } from '../chunk-JUZWF5NX.js';
2
2
  import '../chunk-SJ2QMDXY.js';
3
3
  import { z } from 'zod';
4
4
 
@@ -1,5 +1,5 @@
1
- import { a as NodeRegistration, b as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, N as NodeType, c as EdgeTypeWithEndpoints, G as GraphDefaults, A as AnyEdgeType } from './types-DTJEu_-h.js';
2
- import { O as OntologyRelation, S as SerializedNodeDef, a as SerializedEdgeDef, e as SerializedSchema, G as GraphBackend, i as SchemaVersionRow } from './types-DpIoePMI.js';
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';
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 */
5
5
  declare const GRAPH_DEF_BRAND: "__graphDef";
@@ -109,7 +109,7 @@ type AllEdgeTypes<G extends GraphDef> = {
109
109
  * });
110
110
  * ```
111
111
  */
112
- declare function defineGraph<TNodes extends Record<string, NodeRegistration<NodeType>>, TEdges extends Record<string, EdgeEntry>, TOntology extends readonly OntologyRelation[]>(config: GraphDefConfig<TNodes, TEdges, TOntology>): GraphDef<TNodes, NormalizedEdges<TEdges>, TOntology>;
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>;
113
113
  /**
114
114
  * Checks if a value is a GraphDef.
115
115
  */
@@ -117,11 +117,11 @@ declare function isGraphDef(value: unknown): value is GraphDef;
117
117
  /**
118
118
  * Gets all node kind names from a GraphDef.
119
119
  */
120
- declare function getNodeKinds<G extends GraphDef>(graph: G): readonly string[];
120
+ declare function getNodeKinds<G extends GraphDef>(graph: G): readonly (keyof G["nodes"] & string)[];
121
121
  /**
122
122
  * Gets all edge kind names from a GraphDef.
123
123
  */
124
- declare function getEdgeKinds<G extends GraphDef>(graph: G): readonly string[];
124
+ declare function getEdgeKinds<G extends GraphDef>(graph: G): readonly (keyof G["edges"] & string)[];
125
125
 
126
126
  /**
127
127
  * KindRegistry holds precomputed closures for ontological reasoning.
@@ -490,4 +490,4 @@ declare function isSchemaInitialized(backend: GraphBackend, graphId: string): Pr
490
490
  */
491
491
  declare function getSchemaChanges<G extends GraphDef>(backend: GraphBackend, graph: G): Promise<SchemaDiff | undefined>;
492
492
 
493
- export { type AllEdgeTypes as A, type ChangeSeverity as C, type EdgeChange as E, type GraphDef as G, KindRegistry as K, type MigrationHookContext as M, type NodeChange as N, type OntologyChange as O, type SchemaDiff as S, type ChangeType as a, type SchemaManagerOptions as b, type SchemaValidationResult as c, computeSchemaDiff as d, ensureSchema as e, getMigrationActions as f, getActiveSchema as g, getSchemaChanges as h, initializeSchema as i, isBackwardsCompatible as j, isSchemaInitialized as k, type AllNodeTypes as l, migrateSchema as m, type EdgeKinds as n, type GetEdgeType as o, type GetNodeType as p, type NodeKinds as q, rollbackSchema as r, defineGraph as s, getEdgeKinds as t, getNodeKinds as u, isGraphDef as v };
493
+ export { type AllEdgeTypes as A, type ChangeSeverity as C, type EdgeKinds as E, type GraphDef as G, KindRegistry as K, type MigrationHookContext as M, type NodeKinds as N, type OntologyChange as O, type SchemaManagerOptions as S, type AllNodeTypes as a, type GetEdgeType as b, type GetNodeType as c, defineGraph as d, getNodeKinds as e, type SchemaValidationResult as f, getEdgeKinds as g, type ChangeType as h, isGraphDef as i, type EdgeChange as j, type NodeChange as k, type SchemaDiff as l, computeSchemaDiff as m, ensureSchema as n, getActiveSchema as o, getMigrationActions as p, getSchemaChanges as q, initializeSchema as r, isBackwardsCompatible as s, isSchemaInitialized as t, migrateSchema as u, rollbackSchema as v };
@@ -1,5 +1,5 @@
1
- import { a as NodeRegistration, b as EdgeRegistration, D as DeleteBehavior, T as TemporalMode, N as NodeType, c as EdgeTypeWithEndpoints, G as GraphDefaults, A as AnyEdgeType } from './types-DTJEu_-h.cjs';
2
- import { O as OntologyRelation, S as SerializedNodeDef, a as SerializedEdgeDef, e as SerializedSchema, G as GraphBackend, i as SchemaVersionRow } from './types-WX8V9dqn.cjs';
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';
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 */
5
5
  declare const GRAPH_DEF_BRAND: "__graphDef";
@@ -109,7 +109,7 @@ type AllEdgeTypes<G extends GraphDef> = {
109
109
  * });
110
110
  * ```
111
111
  */
112
- declare function defineGraph<TNodes extends Record<string, NodeRegistration<NodeType>>, TEdges extends Record<string, EdgeEntry>, TOntology extends readonly OntologyRelation[]>(config: GraphDefConfig<TNodes, TEdges, TOntology>): GraphDef<TNodes, NormalizedEdges<TEdges>, TOntology>;
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>;
113
113
  /**
114
114
  * Checks if a value is a GraphDef.
115
115
  */
@@ -117,11 +117,11 @@ declare function isGraphDef(value: unknown): value is GraphDef;
117
117
  /**
118
118
  * Gets all node kind names from a GraphDef.
119
119
  */
120
- declare function getNodeKinds<G extends GraphDef>(graph: G): readonly string[];
120
+ declare function getNodeKinds<G extends GraphDef>(graph: G): readonly (keyof G["nodes"] & string)[];
121
121
  /**
122
122
  * Gets all edge kind names from a GraphDef.
123
123
  */
124
- declare function getEdgeKinds<G extends GraphDef>(graph: G): readonly string[];
124
+ declare function getEdgeKinds<G extends GraphDef>(graph: G): readonly (keyof G["edges"] & string)[];
125
125
 
126
126
  /**
127
127
  * KindRegistry holds precomputed closures for ontological reasoning.
@@ -490,4 +490,4 @@ declare function isSchemaInitialized(backend: GraphBackend, graphId: string): Pr
490
490
  */
491
491
  declare function getSchemaChanges<G extends GraphDef>(backend: GraphBackend, graph: G): Promise<SchemaDiff | undefined>;
492
492
 
493
- export { type AllEdgeTypes as A, type ChangeSeverity as C, type EdgeChange as E, type GraphDef as G, KindRegistry as K, type MigrationHookContext as M, type NodeChange as N, type OntologyChange as O, type SchemaDiff as S, type ChangeType as a, type SchemaManagerOptions as b, type SchemaValidationResult as c, computeSchemaDiff as d, ensureSchema as e, getMigrationActions as f, getActiveSchema as g, getSchemaChanges as h, initializeSchema as i, isBackwardsCompatible as j, isSchemaInitialized as k, type AllNodeTypes as l, migrateSchema as m, type EdgeKinds as n, type GetEdgeType as o, type GetNodeType as p, type NodeKinds as q, rollbackSchema as r, defineGraph as s, getEdgeKinds as t, getNodeKinds as u, isGraphDef as v };
493
+ export { type AllEdgeTypes as A, type ChangeSeverity as C, type EdgeKinds as E, type GraphDef as G, KindRegistry as K, type MigrationHookContext as M, type NodeKinds as N, type OntologyChange as O, type SchemaManagerOptions as S, type AllNodeTypes as a, type GetEdgeType as b, type GetNodeType as c, defineGraph as d, getNodeKinds as e, type SchemaValidationResult as f, getEdgeKinds as g, type ChangeType as h, isGraphDef as i, type EdgeChange as j, type NodeChange as k, type SchemaDiff as l, computeSchemaDiff as m, ensureSchema as n, getActiveSchema as o, getMigrationActions as p, getSchemaChanges as q, initializeSchema as r, isBackwardsCompatible as s, isSchemaInitialized as t, migrateSchema as u, rollbackSchema as v };
@@ -1,13 +1,12 @@
1
- import { G as GraphDef } from '../manager-DiPf-0GG.cjs';
2
- import { Q as QueryAst } from '../ast-D-3bOanX.cjs';
3
- import { S as Store } from '../store-nDW3GOFb.cjs';
4
- import { P as ProfilerOptions, a as ProfileReport } from '../types-BL1GyVku.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-BL1GyVku.cjs';
6
- import '../types-DTJEu_-h.cjs';
1
+ import { G as GraphDef } from '../manager-Cu3JQN0H.cjs';
2
+ import { Q as QueryAst } from '../ast-Bh2NDeaK.cjs';
3
+ import { J as Store } from '../store-CL-QMus7.cjs';
4
+ import { P as ProfilerOptions, a as ProfileReport } from '../types-CVtGFpB9.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-CVtGFpB9.cjs';
6
+ import '../types-DMzKq0d5.cjs';
7
7
  import 'zod';
8
- import '../types-WX8V9dqn.cjs';
8
+ import '../types-GLkwvQvS.cjs';
9
9
  import 'drizzle-orm';
10
- import '../types-BRzHlhKC.cjs';
11
10
 
12
11
  /**
13
12
  * QueryProfiler - Main profiler class.
@@ -1,13 +1,12 @@
1
- import { G as GraphDef } from '../manager-DXC7CqKG.js';
2
- import { Q as QueryAst } from '../ast-CXFx6bF6.js';
3
- import { S as Store } from '../store-DODIWZxC.js';
4
- import { P as ProfilerOptions, a as ProfileReport } from '../types-DCGa53O2.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-DCGa53O2.js';
6
- import '../types-DTJEu_-h.js';
1
+ import { G as GraphDef } from '../manager-Ba2CXGMG.js';
2
+ import { Q as QueryAst } from '../ast-COMyNeMn.js';
3
+ import { J as Store } from '../store-DJpuUOSL.js';
4
+ import { P as ProfilerOptions, a as ProfileReport } from '../types-COPePE8_.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-COPePE8_.js';
6
+ import '../types-DMzKq0d5.js';
7
7
  import 'zod';
8
- import '../types-DpIoePMI.js';
8
+ import '../types-1YJKodRv.js';
9
9
  import 'drizzle-orm';
10
- import '../types-BRzHlhKC.js';
11
10
 
12
11
  /**
13
12
  * QueryProfiler - Main profiler class.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkLDM2AFKZ_cjs = require('../chunk-LDM2AFKZ.cjs');
4
- require('../chunk-K2ROKOK3.cjs');
3
+ var chunkPDQBCQ34_cjs = require('../chunk-PDQBCQ34.cjs');
4
+ require('../chunk-BELXZTVK.cjs');
5
5
  require('../chunk-44SXEVF4.cjs');
6
6
 
7
7
  // src/schema/deserializer.ts
@@ -42,7 +42,7 @@ function buildRegistryFromClosures(schema) {
42
42
  const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
43
43
  const nodeKinds = /* @__PURE__ */ new Map();
44
44
  const edgeKinds = /* @__PURE__ */ new Map();
45
- return new chunkLDM2AFKZ_cjs.KindRegistry(nodeKinds, edgeKinds, {
45
+ return new chunkPDQBCQ34_cjs.KindRegistry(nodeKinds, edgeKinds, {
46
46
  subClassAncestors,
47
47
  subClassDescendants,
48
48
  broaderClosure,
@@ -70,75 +70,75 @@ function simpleRecordToMap(record) {
70
70
 
71
71
  Object.defineProperty(exports, "computeSchemaDiff", {
72
72
  enumerable: true,
73
- get: function () { return chunkLDM2AFKZ_cjs.computeSchemaDiff; }
73
+ get: function () { return chunkPDQBCQ34_cjs.computeSchemaDiff; }
74
74
  });
75
75
  Object.defineProperty(exports, "computeSchemaHash", {
76
76
  enumerable: true,
77
- get: function () { return chunkLDM2AFKZ_cjs.computeSchemaHash; }
77
+ get: function () { return chunkPDQBCQ34_cjs.computeSchemaHash; }
78
78
  });
79
79
  Object.defineProperty(exports, "createValidationError", {
80
80
  enumerable: true,
81
- get: function () { return chunkLDM2AFKZ_cjs.createValidationError; }
81
+ get: function () { return chunkPDQBCQ34_cjs.createValidationError; }
82
82
  });
83
83
  Object.defineProperty(exports, "deserializeWherePredicate", {
84
84
  enumerable: true,
85
- get: function () { return chunkLDM2AFKZ_cjs.deserializeWherePredicate; }
85
+ get: function () { return chunkPDQBCQ34_cjs.deserializeWherePredicate; }
86
86
  });
87
87
  Object.defineProperty(exports, "ensureSchema", {
88
88
  enumerable: true,
89
- get: function () { return chunkLDM2AFKZ_cjs.ensureSchema; }
89
+ get: function () { return chunkPDQBCQ34_cjs.ensureSchema; }
90
90
  });
91
91
  Object.defineProperty(exports, "getActiveSchema", {
92
92
  enumerable: true,
93
- get: function () { return chunkLDM2AFKZ_cjs.getActiveSchema; }
93
+ get: function () { return chunkPDQBCQ34_cjs.getActiveSchema; }
94
94
  });
95
95
  Object.defineProperty(exports, "getMigrationActions", {
96
96
  enumerable: true,
97
- get: function () { return chunkLDM2AFKZ_cjs.getMigrationActions; }
97
+ get: function () { return chunkPDQBCQ34_cjs.getMigrationActions; }
98
98
  });
99
99
  Object.defineProperty(exports, "getSchemaChanges", {
100
100
  enumerable: true,
101
- get: function () { return chunkLDM2AFKZ_cjs.getSchemaChanges; }
101
+ get: function () { return chunkPDQBCQ34_cjs.getSchemaChanges; }
102
102
  });
103
103
  Object.defineProperty(exports, "initializeSchema", {
104
104
  enumerable: true,
105
- get: function () { return chunkLDM2AFKZ_cjs.initializeSchema; }
105
+ get: function () { return chunkPDQBCQ34_cjs.initializeSchema; }
106
106
  });
107
107
  Object.defineProperty(exports, "isBackwardsCompatible", {
108
108
  enumerable: true,
109
- get: function () { return chunkLDM2AFKZ_cjs.isBackwardsCompatible; }
109
+ get: function () { return chunkPDQBCQ34_cjs.isBackwardsCompatible; }
110
110
  });
111
111
  Object.defineProperty(exports, "isSchemaInitialized", {
112
112
  enumerable: true,
113
- get: function () { return chunkLDM2AFKZ_cjs.isSchemaInitialized; }
113
+ get: function () { return chunkPDQBCQ34_cjs.isSchemaInitialized; }
114
114
  });
115
115
  Object.defineProperty(exports, "migrateSchema", {
116
116
  enumerable: true,
117
- get: function () { return chunkLDM2AFKZ_cjs.migrateSchema; }
117
+ get: function () { return chunkPDQBCQ34_cjs.migrateSchema; }
118
118
  });
119
119
  Object.defineProperty(exports, "rollbackSchema", {
120
120
  enumerable: true,
121
- get: function () { return chunkLDM2AFKZ_cjs.rollbackSchema; }
121
+ get: function () { return chunkPDQBCQ34_cjs.rollbackSchema; }
122
122
  });
123
123
  Object.defineProperty(exports, "serializeSchema", {
124
124
  enumerable: true,
125
- get: function () { return chunkLDM2AFKZ_cjs.serializeSchema; }
125
+ get: function () { return chunkPDQBCQ34_cjs.serializeSchema; }
126
126
  });
127
127
  Object.defineProperty(exports, "validateEdgeProps", {
128
128
  enumerable: true,
129
- get: function () { return chunkLDM2AFKZ_cjs.validateEdgeProps; }
129
+ get: function () { return chunkPDQBCQ34_cjs.validateEdgeProps; }
130
130
  });
131
131
  Object.defineProperty(exports, "validateNodeProps", {
132
132
  enumerable: true,
133
- get: function () { return chunkLDM2AFKZ_cjs.validateNodeProps; }
133
+ get: function () { return chunkPDQBCQ34_cjs.validateNodeProps; }
134
134
  });
135
135
  Object.defineProperty(exports, "validateProps", {
136
136
  enumerable: true,
137
- get: function () { return chunkLDM2AFKZ_cjs.validateProps; }
137
+ get: function () { return chunkPDQBCQ34_cjs.validateProps; }
138
138
  });
139
139
  Object.defineProperty(exports, "wrapZodError", {
140
140
  enumerable: true,
141
- get: function () { return chunkLDM2AFKZ_cjs.wrapZodError; }
141
+ get: function () { return chunkPDQBCQ34_cjs.wrapZodError; }
142
142
  });
143
143
  exports.deserializeSchema = deserializeSchema;
144
144
  //# sourceMappingURL=index.cjs.map
@@ -1,12 +1,11 @@
1
- import { K as KindRegistry, G as GraphDef } from '../manager-DiPf-0GG.cjs';
2
- export { C as ChangeSeverity, a as ChangeType, E as EdgeChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, S as SchemaDiff, b as SchemaManagerOptions, c as SchemaValidationResult, d as computeSchemaDiff, e as ensureSchema, g as getActiveSchema, f as getMigrationActions, h as getSchemaChanges, i as initializeSchema, j as isBackwardsCompatible, k as isSchemaInitialized, m as migrateSchema, r as rollbackSchema } from '../manager-DiPf-0GG.cjs';
3
- import { S as SerializedNodeDef, a as SerializedEdgeDef, b as SerializedMetaEdge, c as SerializedOntologyRelation, d as SerializedClosures, e as SerializedSchema, f as SchemaHash } from '../types-WX8V9dqn.cjs';
4
- export { J as JsonSchema, g as SerializedOntology, h as SerializedUniqueConstraint } from '../types-WX8V9dqn.cjs';
1
+ import { K as KindRegistry, G as GraphDef } from '../manager-Cu3JQN0H.cjs';
2
+ export { C as ChangeSeverity, h as ChangeType, j as EdgeChange, M as MigrationHookContext, k as NodeChange, O as OntologyChange, l as SchemaDiff, S as SchemaManagerOptions, f as SchemaValidationResult, m as computeSchemaDiff, n as ensureSchema, o as getActiveSchema, p as getMigrationActions, q as getSchemaChanges, r as initializeSchema, s as isBackwardsCompatible, t as isSchemaInitialized, u as migrateSchema, v as rollbackSchema } from '../manager-Cu3JQN0H.cjs';
3
+ import { d as SerializedNodeDef, e as SerializedEdgeDef, f as SerializedMetaEdge, g as SerializedOntologyRelation, h as SerializedClosures, j as SerializedSchema, k as SchemaHash } from '../types-GLkwvQvS.cjs';
4
+ export { J as JsonSchema, l as SerializedOntology, m as SerializedUniqueConstraint } from '../types-GLkwvQvS.cjs';
5
5
  import { ZodType, ZodError } from 'zod';
6
- import { V as ValidationIssue, a as ValidationError } from '../index-DyrR_d-H.cjs';
7
- import '../types-DTJEu_-h.cjs';
6
+ import { k as ValidationIssue, V as ValidationError } from '../index-QTnQwakS.cjs';
7
+ import '../types-DMzKq0d5.cjs';
8
8
  import 'drizzle-orm';
9
- import '../types-BRzHlhKC.cjs';
10
9
 
11
10
  /**
12
11
  * Schema deserializer for loading stored schemas.
@@ -1,12 +1,11 @@
1
- import { K as KindRegistry, G as GraphDef } from '../manager-DXC7CqKG.js';
2
- export { C as ChangeSeverity, a as ChangeType, E as EdgeChange, M as MigrationHookContext, N as NodeChange, O as OntologyChange, S as SchemaDiff, b as SchemaManagerOptions, c as SchemaValidationResult, d as computeSchemaDiff, e as ensureSchema, g as getActiveSchema, f as getMigrationActions, h as getSchemaChanges, i as initializeSchema, j as isBackwardsCompatible, k as isSchemaInitialized, m as migrateSchema, r as rollbackSchema } from '../manager-DXC7CqKG.js';
3
- import { S as SerializedNodeDef, a as SerializedEdgeDef, b as SerializedMetaEdge, c as SerializedOntologyRelation, d as SerializedClosures, e as SerializedSchema, f as SchemaHash } from '../types-DpIoePMI.js';
4
- export { J as JsonSchema, g as SerializedOntology, h as SerializedUniqueConstraint } from '../types-DpIoePMI.js';
1
+ import { K as KindRegistry, G as GraphDef } from '../manager-Ba2CXGMG.js';
2
+ export { C as ChangeSeverity, h as ChangeType, j as EdgeChange, M as MigrationHookContext, k as NodeChange, O as OntologyChange, l as SchemaDiff, S as SchemaManagerOptions, f as SchemaValidationResult, m as computeSchemaDiff, n as ensureSchema, o as getActiveSchema, p as getMigrationActions, q as getSchemaChanges, r as initializeSchema, s as isBackwardsCompatible, t as isSchemaInitialized, u as migrateSchema, v as rollbackSchema } from '../manager-Ba2CXGMG.js';
3
+ import { d as SerializedNodeDef, e as SerializedEdgeDef, f as SerializedMetaEdge, g as SerializedOntologyRelation, h as SerializedClosures, j as SerializedSchema, k as SchemaHash } from '../types-1YJKodRv.js';
4
+ export { J as JsonSchema, l as SerializedOntology, m as SerializedUniqueConstraint } from '../types-1YJKodRv.js';
5
5
  import { ZodType, ZodError } from 'zod';
6
- import { V as ValidationIssue, a as ValidationError } from '../index-DyrR_d-H.js';
7
- import '../types-DTJEu_-h.js';
6
+ import { k as ValidationIssue, V as ValidationError } from '../index-QTnQwakS.js';
7
+ import '../types-DMzKq0d5.js';
8
8
  import 'drizzle-orm';
9
- import '../types-BRzHlhKC.js';
10
9
 
11
10
  /**
12
11
  * Schema deserializer for loading stored schemas.
@@ -1,6 +1,6 @@
1
- import { KindRegistry } from '../chunk-M5SOQ7UV.js';
2
- export { computeSchemaDiff, computeSchemaHash, createValidationError, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, migrateSchema, rollbackSchema, serializeSchema, validateEdgeProps, validateNodeProps, validateProps, wrapZodError } from '../chunk-M5SOQ7UV.js';
3
- import '../chunk-TGDFBLGS.js';
1
+ import { KindRegistry } from '../chunk-SH237DWD.js';
2
+ export { computeSchemaDiff, computeSchemaHash, createValidationError, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, migrateSchema, rollbackSchema, serializeSchema, validateEdgeProps, validateNodeProps, validateProps, wrapZodError } from '../chunk-SH237DWD.js';
3
+ import '../chunk-JUZWF5NX.js';
4
4
  import '../chunk-SJ2QMDXY.js';
5
5
 
6
6
  // src/schema/deserializer.ts
@@ -1,8 +1,5 @@
1
1
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
2
- import { T as TypeGraphIndex } from '../../../types-ZT5mlism.js';
3
- import 'zod';
4
- import '../../../types-DTJEu_-h.js';
5
- import '../../../ast-CXFx6bF6.js';
2
+ import { T as TypeGraphIndex } from './types-C8Ra3ROE.cjs';
6
3
 
7
4
  /**
8
5
  * Table name configuration.
@@ -2624,25 +2621,5 @@ declare const embeddings: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
2624
2621
  * Type representing the tables object returned by createSqliteTables.
2625
2622
  */
2626
2623
  type SqliteTables = ReturnType<typeof createSqliteTables>;
2627
- /**
2628
- * Type for nodes table.
2629
- */
2630
- type NodesTable = SqliteTables["nodes"];
2631
- /**
2632
- * Type for edges table.
2633
- */
2634
- type EdgesTable = SqliteTables["edges"];
2635
- /**
2636
- * Type for uniques table.
2637
- */
2638
- type UniquesTable = SqliteTables["uniques"];
2639
- /**
2640
- * Type for schema versions table.
2641
- */
2642
- type SchemaVersionsTable = SqliteTables["schemaVersions"];
2643
- /**
2644
- * Type for embeddings table.
2645
- */
2646
- type EmbeddingsTable = SqliteTables["embeddings"];
2647
2624
 
2648
- export { type CreateSqliteTablesOptions, type EdgesTable, type EmbeddingsTable, type NodesTable, type SchemaVersionsTable, type SqliteTableNames, type SqliteTables, type UniquesTable, createSqliteTables, edges, embeddings, nodes, schemaVersions, tables, uniques };
2625
+ export { type CreateSqliteTablesOptions as C, type SqliteTables as S, type SqliteTableNames as a, embeddings as b, createSqliteTables as c, edges as e, nodes as n, schemaVersions as s, tables as t, uniques as u };
@@ -1,8 +1,5 @@
1
1
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
2
- import { T as TypeGraphIndex } from '../../../types-DHRsi6j9.cjs';
3
- import 'zod';
4
- import '../../../types-DTJEu_-h.cjs';
5
- import '../../../ast-D-3bOanX.cjs';
2
+ import { T as TypeGraphIndex } from './types-CC8eB0PB.js';
6
3
 
7
4
  /**
8
5
  * Table name configuration.
@@ -2624,25 +2621,5 @@ declare const embeddings: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
2624
2621
  * Type representing the tables object returned by createSqliteTables.
2625
2622
  */
2626
2623
  type SqliteTables = ReturnType<typeof createSqliteTables>;
2627
- /**
2628
- * Type for nodes table.
2629
- */
2630
- type NodesTable = SqliteTables["nodes"];
2631
- /**
2632
- * Type for edges table.
2633
- */
2634
- type EdgesTable = SqliteTables["edges"];
2635
- /**
2636
- * Type for uniques table.
2637
- */
2638
- type UniquesTable = SqliteTables["uniques"];
2639
- /**
2640
- * Type for schema versions table.
2641
- */
2642
- type SchemaVersionsTable = SqliteTables["schemaVersions"];
2643
- /**
2644
- * Type for embeddings table.
2645
- */
2646
- type EmbeddingsTable = SqliteTables["embeddings"];
2647
2624
 
2648
- export { type CreateSqliteTablesOptions, type EdgesTable, type EmbeddingsTable, type NodesTable, type SchemaVersionsTable, type SqliteTableNames, type SqliteTables, type UniquesTable, createSqliteTables, edges, embeddings, nodes, schemaVersions, tables, uniques };
2625
+ export { type CreateSqliteTablesOptions as C, type SqliteTables as S, type SqliteTableNames as a, embeddings as b, createSqliteTables as c, edges as e, nodes as n, schemaVersions as s, tables as t, uniques as u };