@nicia-ai/typegraph 0.2.0 → 0.3.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 (146) hide show
  1. package/README.md +23 -0
  2. package/dist/{ast-BVyihVbP.d.cts → ast-CXFx6bF6.d.ts} +45 -165
  3. package/dist/{ast-BVyihVbP.d.ts → ast-D-3bOanX.d.cts} +45 -165
  4. package/dist/backend/drizzle/index.cjs +20 -20
  5. package/dist/backend/drizzle/index.d.cts +6 -5
  6. package/dist/backend/drizzle/index.d.ts +6 -5
  7. package/dist/backend/drizzle/index.js +8 -8
  8. package/dist/backend/drizzle/postgres.cjs +9 -9
  9. package/dist/backend/drizzle/postgres.d.cts +9 -11
  10. package/dist/backend/drizzle/postgres.d.ts +9 -11
  11. package/dist/backend/drizzle/postgres.js +6 -6
  12. package/dist/backend/drizzle/schema/postgres.cjs +10 -10
  13. package/dist/backend/drizzle/schema/postgres.d.cts +6 -5
  14. package/dist/backend/drizzle/schema/postgres.d.ts +6 -5
  15. package/dist/backend/drizzle/schema/postgres.js +3 -3
  16. package/dist/backend/drizzle/schema/sqlite.cjs +10 -10
  17. package/dist/backend/drizzle/schema/sqlite.d.cts +6 -5
  18. package/dist/backend/drizzle/schema/sqlite.d.ts +6 -5
  19. package/dist/backend/drizzle/schema/sqlite.js +3 -3
  20. package/dist/backend/drizzle/sqlite.cjs +9 -9
  21. package/dist/backend/drizzle/sqlite.d.cts +17 -18
  22. package/dist/backend/drizzle/sqlite.d.ts +17 -18
  23. package/dist/backend/drizzle/sqlite.js +6 -6
  24. package/dist/backend/postgres/index.cjs +21 -17
  25. package/dist/backend/postgres/index.d.cts +8 -7
  26. package/dist/backend/postgres/index.d.ts +8 -7
  27. package/dist/backend/postgres/index.js +8 -8
  28. package/dist/backend/sqlite/index.cjs +27 -21
  29. package/dist/backend/sqlite/index.cjs.map +1 -1
  30. package/dist/backend/sqlite/index.d.cts +7 -6
  31. package/dist/backend/sqlite/index.d.ts +7 -6
  32. package/dist/backend/sqlite/index.js +18 -12
  33. package/dist/backend/sqlite/index.js.map +1 -1
  34. package/dist/{chunk-YM5AL65Y.cjs → chunk-2WVFEIHR.cjs} +29 -3
  35. package/dist/chunk-2WVFEIHR.cjs.map +1 -0
  36. package/dist/{chunk-4PIEL2VO.js → chunk-3PURVEA4.js} +36 -5
  37. package/dist/chunk-3PURVEA4.js.map +1 -0
  38. package/dist/chunk-4HARSV2G.js +1448 -0
  39. package/dist/chunk-4HARSV2G.js.map +1 -0
  40. package/dist/{chunk-IIAT36MI.js → chunk-54WJF3DW.js} +29 -3
  41. package/dist/chunk-54WJF3DW.js.map +1 -0
  42. package/dist/chunk-CMHFS34N.cjs +390 -0
  43. package/dist/chunk-CMHFS34N.cjs.map +1 -0
  44. package/dist/chunk-DD6ONEBN.cjs +1264 -0
  45. package/dist/chunk-DD6ONEBN.cjs.map +1 -0
  46. package/dist/chunk-F2BZSEFE.js +388 -0
  47. package/dist/chunk-F2BZSEFE.js.map +1 -0
  48. package/dist/{chunk-DDM2FZRJ.cjs → chunk-JQDWEX6V.cjs} +24 -24
  49. package/dist/{chunk-DDM2FZRJ.cjs.map → chunk-JQDWEX6V.cjs.map} +1 -1
  50. package/dist/chunk-NP4G4ZKM.js +1228 -0
  51. package/dist/chunk-NP4G4ZKM.js.map +1 -0
  52. package/dist/{chunk-UJAGXJDG.cjs → chunk-NU2XNMVI.cjs} +38 -7
  53. package/dist/chunk-NU2XNMVI.cjs.map +1 -0
  54. package/dist/{chunk-JKTO7TW3.js → chunk-O5XPCJLF.js} +25 -3
  55. package/dist/chunk-O5XPCJLF.js.map +1 -0
  56. package/dist/{chunk-2QHQ2C4P.js → chunk-OGGLFYFA.js} +36 -5
  57. package/dist/chunk-OGGLFYFA.js.map +1 -0
  58. package/dist/{chunk-SV5H3XM5.cjs → chunk-OYL2SGBD.cjs} +26 -2
  59. package/dist/chunk-OYL2SGBD.cjs.map +1 -0
  60. package/dist/chunk-SFY2PPOY.cjs +1469 -0
  61. package/dist/chunk-SFY2PPOY.cjs.map +1 -0
  62. package/dist/{chunk-JDAET5LO.js → chunk-SMLIWLS7.js} +9 -9
  63. package/dist/chunk-SMLIWLS7.js.map +1 -0
  64. package/dist/{chunk-VXRVGFCI.js → chunk-U3452TEU.js} +17 -17
  65. package/dist/{chunk-VXRVGFCI.js.map → chunk-U3452TEU.js.map} +1 -1
  66. package/dist/{chunk-MNO33ASC.cjs → chunk-UYMT4LO2.cjs} +9 -8
  67. package/dist/chunk-UYMT4LO2.cjs.map +1 -0
  68. package/dist/chunk-V7CS2MDB.cjs +289 -0
  69. package/dist/chunk-V7CS2MDB.cjs.map +1 -0
  70. package/dist/chunk-WE5BKYNB.js +287 -0
  71. package/dist/chunk-WE5BKYNB.js.map +1 -0
  72. package/dist/{chunk-L642L24T.js → chunk-XDTYTNYL.js} +14 -21
  73. package/dist/chunk-XDTYTNYL.js.map +1 -0
  74. package/dist/{chunk-N4AOJ3VF.cjs → chunk-XZL6MCZJ.cjs} +38 -7
  75. package/dist/chunk-XZL6MCZJ.cjs.map +1 -0
  76. package/dist/{chunk-DBFCKELK.cjs → chunk-ZJHQZZT2.cjs} +18 -27
  77. package/dist/chunk-ZJHQZZT2.cjs.map +1 -0
  78. package/dist/index-Dkicw49A.d.cts +373 -0
  79. package/dist/index-Dkicw49A.d.ts +373 -0
  80. package/dist/index.cjs +5915 -3377
  81. package/dist/index.cjs.map +1 -1
  82. package/dist/index.d.cts +24 -664
  83. package/dist/index.d.ts +24 -664
  84. package/dist/index.js +5781 -3223
  85. package/dist/index.js.map +1 -1
  86. package/dist/indexes/index.cjs +16 -16
  87. package/dist/indexes/index.d.cts +5 -4
  88. package/dist/indexes/index.d.ts +5 -4
  89. package/dist/indexes/index.js +2 -2
  90. package/dist/interchange/index.cjs +9 -9
  91. package/dist/interchange/index.cjs.map +1 -1
  92. package/dist/interchange/index.d.cts +5 -3
  93. package/dist/interchange/index.d.ts +5 -3
  94. package/dist/interchange/index.js +8 -8
  95. package/dist/interchange/index.js.map +1 -1
  96. package/dist/manager-Jc5Btay9.d.cts +493 -0
  97. package/dist/manager-e9LXthrx.d.ts +493 -0
  98. package/dist/profiler/index.cjs +2 -8
  99. package/dist/profiler/index.cjs.map +1 -1
  100. package/dist/profiler/index.d.cts +9 -161
  101. package/dist/profiler/index.d.ts +9 -161
  102. package/dist/profiler/index.js +4 -4
  103. package/dist/profiler/index.js.map +1 -1
  104. package/dist/schema/index.cjs +145 -0
  105. package/dist/schema/index.cjs.map +1 -0
  106. package/dist/schema/index.d.cts +237 -0
  107. package/dist/schema/index.d.ts +237 -0
  108. package/dist/schema/index.js +72 -0
  109. package/dist/schema/index.js.map +1 -0
  110. package/dist/{store-BPhjw5S8.d.ts → store-DM3Tk3Pw.d.ts} +874 -1283
  111. package/dist/{store-DNOOQEm8.d.cts → store-nbBybLWP.d.cts} +874 -1283
  112. package/dist/{test-helpers-BjyRYJZX.d.ts → test-helpers-CIq1Hhj1.d.ts} +5 -1
  113. package/dist/{test-helpers-NoQXhleQ.d.cts → test-helpers-DPRFVky4.d.cts} +5 -1
  114. package/dist/{types-D_3mEv2y.d.ts → types-BL1GyVku.d.cts} +2 -2
  115. package/dist/{types-DsRfx0yk.d.ts → types-Cdbi4hcx.d.ts} +228 -4
  116. package/dist/{types-BrSfFSpW.d.cts → types-DCGa53O2.d.ts} +2 -2
  117. package/dist/{types-aapj0GLz.d.cts → types-DDP0MGBF.d.cts} +228 -4
  118. package/dist/{types-CX4cLd7M.d.ts → types-DHRsi6j9.d.cts} +4 -3
  119. package/dist/types-DTJEu_-h.d.cts +158 -0
  120. package/dist/types-DTJEu_-h.d.ts +158 -0
  121. package/dist/{types-a5rAxC92.d.cts → types-ZT5mlism.d.ts} +4 -3
  122. package/package.json +17 -2
  123. package/dist/chunk-2FURVVAX.cjs +0 -350
  124. package/dist/chunk-2FURVVAX.cjs.map +0 -1
  125. package/dist/chunk-2QHQ2C4P.js.map +0 -1
  126. package/dist/chunk-4PIEL2VO.js.map +0 -1
  127. package/dist/chunk-DBFCKELK.cjs.map +0 -1
  128. package/dist/chunk-H7THXVH6.cjs +0 -314
  129. package/dist/chunk-H7THXVH6.cjs.map +0 -1
  130. package/dist/chunk-HXAPXPZH.cjs +0 -680
  131. package/dist/chunk-HXAPXPZH.cjs.map +0 -1
  132. package/dist/chunk-IIAT36MI.js.map +0 -1
  133. package/dist/chunk-JDAET5LO.js.map +0 -1
  134. package/dist/chunk-JKTO7TW3.js.map +0 -1
  135. package/dist/chunk-L642L24T.js.map +0 -1
  136. package/dist/chunk-MNO33ASC.cjs.map +0 -1
  137. package/dist/chunk-N4AOJ3VF.cjs.map +0 -1
  138. package/dist/chunk-QB3WBMDT.js +0 -646
  139. package/dist/chunk-QB3WBMDT.js.map +0 -1
  140. package/dist/chunk-SV5H3XM5.cjs.map +0 -1
  141. package/dist/chunk-UJAGXJDG.cjs.map +0 -1
  142. package/dist/chunk-X4EVMBON.js +0 -312
  143. package/dist/chunk-X4EVMBON.js.map +0 -1
  144. package/dist/chunk-XZL4NLV6.js +0 -348
  145. package/dist/chunk-XZL4NLV6.js.map +0 -1
  146. package/dist/chunk-YM5AL65Y.cjs.map +0 -1
@@ -0,0 +1,145 @@
1
+ 'use strict';
2
+
3
+ var chunkDD6ONEBN_cjs = require('../chunk-DD6ONEBN.cjs');
4
+ require('../chunk-ZJHQZZT2.cjs');
5
+ require('../chunk-OYL2SGBD.cjs');
6
+
7
+ // src/schema/deserializer.ts
8
+ function deserializeSchema(schema) {
9
+ const nodeNames = Object.keys(schema.nodes);
10
+ const edgeNames = Object.keys(schema.edges);
11
+ const metaEdgeNames = Object.keys(schema.ontology.metaEdges);
12
+ return {
13
+ graphId: schema.graphId,
14
+ version: schema.version,
15
+ generatedAt: schema.generatedAt,
16
+ getNode: (name) => schema.nodes[name],
17
+ getNodeNames: () => nodeNames,
18
+ getEdge: (name) => schema.edges[name],
19
+ getEdgeNames: () => edgeNames,
20
+ getMetaEdge: (name) => schema.ontology.metaEdges[name],
21
+ getMetaEdgeNames: () => metaEdgeNames,
22
+ getRelations: () => schema.ontology.relations,
23
+ getClosures: () => schema.ontology.closures,
24
+ getDefaults: () => schema.defaults,
25
+ getRaw: () => schema,
26
+ buildRegistry: () => buildRegistryFromClosures(schema)
27
+ };
28
+ }
29
+ function buildRegistryFromClosures(schema) {
30
+ const { closures } = schema.ontology;
31
+ const subClassAncestors = recordToMap(closures.subClassAncestors);
32
+ const subClassDescendants = recordToMap(closures.subClassDescendants);
33
+ const broaderClosure = recordToMap(closures.broaderClosure);
34
+ const narrowerClosure = recordToMap(closures.narrowerClosure);
35
+ const equivalenceSets = recordToMap(closures.equivalenceSets);
36
+ const partOfClosure = recordToMap(closures.partOfClosure);
37
+ const hasPartClosure = recordToMap(closures.hasPartClosure);
38
+ const iriToKind = simpleRecordToMap(closures.iriToKind);
39
+ const disjointPairs = new Set(closures.disjointPairs);
40
+ const edgeInverses = simpleRecordToMap(closures.edgeInverses);
41
+ const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);
42
+ const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
43
+ const nodeKinds = /* @__PURE__ */ new Map();
44
+ const edgeKinds = /* @__PURE__ */ new Map();
45
+ return new chunkDD6ONEBN_cjs.KindRegistry(nodeKinds, edgeKinds, {
46
+ subClassAncestors,
47
+ subClassDescendants,
48
+ broaderClosure,
49
+ narrowerClosure,
50
+ equivalenceSets,
51
+ iriToKind,
52
+ disjointPairs,
53
+ partOfClosure,
54
+ hasPartClosure,
55
+ edgeInverses,
56
+ edgeImplicationsClosure,
57
+ edgeImplyingClosure
58
+ });
59
+ }
60
+ function recordToMap(record) {
61
+ const result = /* @__PURE__ */ new Map();
62
+ for (const [key, values] of Object.entries(record)) {
63
+ result.set(key, new Set(values));
64
+ }
65
+ return result;
66
+ }
67
+ function simpleRecordToMap(record) {
68
+ return new Map(Object.entries(record));
69
+ }
70
+
71
+ Object.defineProperty(exports, "computeSchemaDiff", {
72
+ enumerable: true,
73
+ get: function () { return chunkDD6ONEBN_cjs.computeSchemaDiff; }
74
+ });
75
+ Object.defineProperty(exports, "computeSchemaHash", {
76
+ enumerable: true,
77
+ get: function () { return chunkDD6ONEBN_cjs.computeSchemaHash; }
78
+ });
79
+ Object.defineProperty(exports, "createValidationError", {
80
+ enumerable: true,
81
+ get: function () { return chunkDD6ONEBN_cjs.createValidationError; }
82
+ });
83
+ Object.defineProperty(exports, "deserializeWherePredicate", {
84
+ enumerable: true,
85
+ get: function () { return chunkDD6ONEBN_cjs.deserializeWherePredicate; }
86
+ });
87
+ Object.defineProperty(exports, "ensureSchema", {
88
+ enumerable: true,
89
+ get: function () { return chunkDD6ONEBN_cjs.ensureSchema; }
90
+ });
91
+ Object.defineProperty(exports, "getActiveSchema", {
92
+ enumerable: true,
93
+ get: function () { return chunkDD6ONEBN_cjs.getActiveSchema; }
94
+ });
95
+ Object.defineProperty(exports, "getMigrationActions", {
96
+ enumerable: true,
97
+ get: function () { return chunkDD6ONEBN_cjs.getMigrationActions; }
98
+ });
99
+ Object.defineProperty(exports, "getSchemaChanges", {
100
+ enumerable: true,
101
+ get: function () { return chunkDD6ONEBN_cjs.getSchemaChanges; }
102
+ });
103
+ Object.defineProperty(exports, "initializeSchema", {
104
+ enumerable: true,
105
+ get: function () { return chunkDD6ONEBN_cjs.initializeSchema; }
106
+ });
107
+ Object.defineProperty(exports, "isBackwardsCompatible", {
108
+ enumerable: true,
109
+ get: function () { return chunkDD6ONEBN_cjs.isBackwardsCompatible; }
110
+ });
111
+ Object.defineProperty(exports, "isSchemaInitialized", {
112
+ enumerable: true,
113
+ get: function () { return chunkDD6ONEBN_cjs.isSchemaInitialized; }
114
+ });
115
+ Object.defineProperty(exports, "migrateSchema", {
116
+ enumerable: true,
117
+ get: function () { return chunkDD6ONEBN_cjs.migrateSchema; }
118
+ });
119
+ Object.defineProperty(exports, "rollbackSchema", {
120
+ enumerable: true,
121
+ get: function () { return chunkDD6ONEBN_cjs.rollbackSchema; }
122
+ });
123
+ Object.defineProperty(exports, "serializeSchema", {
124
+ enumerable: true,
125
+ get: function () { return chunkDD6ONEBN_cjs.serializeSchema; }
126
+ });
127
+ Object.defineProperty(exports, "validateEdgeProps", {
128
+ enumerable: true,
129
+ get: function () { return chunkDD6ONEBN_cjs.validateEdgeProps; }
130
+ });
131
+ Object.defineProperty(exports, "validateNodeProps", {
132
+ enumerable: true,
133
+ get: function () { return chunkDD6ONEBN_cjs.validateNodeProps; }
134
+ });
135
+ Object.defineProperty(exports, "validateProps", {
136
+ enumerable: true,
137
+ get: function () { return chunkDD6ONEBN_cjs.validateProps; }
138
+ });
139
+ Object.defineProperty(exports, "wrapZodError", {
140
+ enumerable: true,
141
+ get: function () { return chunkDD6ONEBN_cjs.wrapZodError; }
142
+ });
143
+ exports.deserializeSchema = deserializeSchema;
144
+ //# sourceMappingURL=index.cjs.map
145
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +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"]}
@@ -0,0 +1,237 @@
1
+ import { K as KindRegistry, G as GraphDef } from '../manager-Jc5Btay9.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-Jc5Btay9.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-DDP0MGBF.cjs';
4
+ export { J as JsonSchema, g as SerializedOntology, h as SerializedUniqueConstraint } from '../types-DDP0MGBF.cjs';
5
+ import { ZodType, ZodError } from 'zod';
6
+ import { V as ValidationIssue, a as ValidationError } from '../index-Dkicw49A.cjs';
7
+ import '../types-DTJEu_-h.cjs';
8
+ import 'drizzle-orm';
9
+ import '../types-BRzHlhKC.cjs';
10
+
11
+ /**
12
+ * Schema deserializer for loading stored schemas.
13
+ *
14
+ * Reconstructs runtime objects from SerializedSchema.
15
+ * Note: Zod schemas cannot be fully reconstructed from JSON Schema,
16
+ * so this provides access to the serialized data for introspection.
17
+ */
18
+
19
+ /**
20
+ * A deserialized schema provides read-only access to schema metadata.
21
+ *
22
+ * Note: Unlike the original GraphDef, this does not include Zod schemas
23
+ * since those cannot be reconstructed from JSON Schema. Use this for
24
+ * introspection and metadata access only.
25
+ */
26
+ type DeserializedSchema = Readonly<{
27
+ graphId: string;
28
+ version: number;
29
+ generatedAt: string;
30
+ /** Get node definition by name */
31
+ getNode: (name: string) => SerializedNodeDef | undefined;
32
+ /** Get all node names */
33
+ getNodeNames: () => readonly string[];
34
+ /** Get edge definition by name */
35
+ getEdge: (name: string) => SerializedEdgeDef | undefined;
36
+ /** Get all edge names */
37
+ getEdgeNames: () => readonly string[];
38
+ /** Get meta-edge definition by name */
39
+ getMetaEdge: (name: string) => SerializedMetaEdge | undefined;
40
+ /** Get all meta-edge names */
41
+ getMetaEdgeNames: () => readonly string[];
42
+ /** Get all ontology relations */
43
+ getRelations: () => readonly SerializedOntologyRelation[];
44
+ /** Get precomputed closures */
45
+ getClosures: () => SerializedClosures;
46
+ /** Get graph defaults */
47
+ getDefaults: () => SerializedSchema["defaults"];
48
+ /** Get the raw serialized schema */
49
+ getRaw: () => SerializedSchema;
50
+ /** Build a KindRegistry from the closures */
51
+ buildRegistry: () => KindRegistry;
52
+ }>;
53
+ /**
54
+ * Deserializes a SerializedSchema into a DeserializedSchema.
55
+ *
56
+ * @param schema - The serialized schema to deserialize
57
+ * @returns A deserialized schema with accessor methods
58
+ */
59
+ declare function deserializeSchema(schema: SerializedSchema): DeserializedSchema;
60
+
61
+ /**
62
+ * Serializes a GraphDef to a SerializedSchema.
63
+ *
64
+ * @param graph - The graph definition to serialize
65
+ * @param version - The schema version number
66
+ * @returns The serialized schema
67
+ */
68
+ declare function serializeSchema<G extends GraphDef>(graph: G, version: number): SerializedSchema;
69
+ /**
70
+ * A serialized predicate structure (matches UniqueConstraintPredicate from core/types).
71
+ */
72
+ type SerializedPredicate = Readonly<{
73
+ __type: "unique_predicate";
74
+ field: string;
75
+ op: "isNull" | "isNotNull";
76
+ }>;
77
+ /**
78
+ * Field builder returned by the predicate proxy.
79
+ */
80
+ type FieldPredicateBuilder = Readonly<{
81
+ isNull: () => SerializedPredicate;
82
+ isNotNull: () => SerializedPredicate;
83
+ }>;
84
+ /**
85
+ * Predicate builder type for where clause serialization.
86
+ */
87
+ type PredicateBuilder = Readonly<Record<string, FieldPredicateBuilder>>;
88
+ /**
89
+ * Deserializes a where predicate JSON back to a predicate function.
90
+ *
91
+ * This can be used to reconstruct a UniqueConstraint's where clause
92
+ * from a serialized schema.
93
+ *
94
+ * @param serialized - The JSON string from serialization
95
+ * @returns A where function that returns the predicate structure
96
+ */
97
+ /**
98
+ * Unique predicate result type.
99
+ */
100
+ type UniquePredicate = Readonly<{
101
+ __type: "unique_predicate";
102
+ field: string;
103
+ op: "isNull" | "isNotNull";
104
+ }>;
105
+ declare function deserializeWherePredicate(serialized: string): (builder: PredicateBuilder) => UniquePredicate;
106
+ /**
107
+ * Computes a hash of the schema content for change detection.
108
+ *
109
+ * Excludes version and generatedAt since those change on every save.
110
+ */
111
+ declare function computeSchemaHash(schema: SerializedSchema): Promise<SchemaHash>;
112
+
113
+ /**
114
+ * Contextual Validation Utilities
115
+ *
116
+ * Provides Zod validation wrappers that include full context about
117
+ * which entity (node/edge) and operation (create/update) failed.
118
+ *
119
+ * @example
120
+ * ```typescript
121
+ * const props = validateNodeProps(schema, input, {
122
+ * kind: "Person",
123
+ * operation: "create",
124
+ * });
125
+ * ```
126
+ */
127
+
128
+ /**
129
+ * Context for validation operations.
130
+ */
131
+ type ValidationContext = Readonly<{
132
+ /** Type of entity being validated */
133
+ entityType: "node" | "edge";
134
+ /** Kind/type name of the entity */
135
+ kind: string;
136
+ /** Operation being performed */
137
+ operation: "create" | "update";
138
+ /** Entity ID (for updates) */
139
+ id?: string;
140
+ }>;
141
+ /**
142
+ * Validates props with full context for error messages.
143
+ *
144
+ * @param schema - Zod schema to validate against
145
+ * @param props - Properties to validate
146
+ * @param context - Context about the entity and operation
147
+ * @returns Validated and transformed props
148
+ * @throws ValidationError with full context if validation fails
149
+ *
150
+ * @example
151
+ * ```typescript
152
+ * const validatedProps = validateProps(personSchema, input, {
153
+ * entityType: "node",
154
+ * kind: "Person",
155
+ * operation: "create",
156
+ * });
157
+ * ```
158
+ */
159
+ declare function validateProps<T>(schema: ZodType<T>, props: unknown, context: ValidationContext): T;
160
+ /**
161
+ * Validates node props with full context.
162
+ *
163
+ * Convenience wrapper around validateProps for node operations.
164
+ *
165
+ * @example
166
+ * ```typescript
167
+ * const props = validateNodeProps(schema, input, {
168
+ * kind: "Person",
169
+ * operation: "create",
170
+ * });
171
+ * ```
172
+ */
173
+ declare function validateNodeProps<T>(schema: ZodType<T>, props: unknown, context: Readonly<{
174
+ kind: string;
175
+ operation: "create" | "update";
176
+ id?: string;
177
+ }>): T;
178
+ /**
179
+ * Validates edge props with full context.
180
+ *
181
+ * Convenience wrapper around validateProps for edge operations.
182
+ *
183
+ * @example
184
+ * ```typescript
185
+ * const props = validateEdgeProps(schema, input, {
186
+ * kind: "worksAt",
187
+ * operation: "create",
188
+ * });
189
+ * ```
190
+ */
191
+ declare function validateEdgeProps<T>(schema: ZodType<T>, props: unknown, context: Readonly<{
192
+ kind: string;
193
+ operation: "create" | "update";
194
+ id?: string;
195
+ }>): T;
196
+ /**
197
+ * Wraps a Zod error with TypeGraph context.
198
+ *
199
+ * Use this when you've already caught a ZodError and want to
200
+ * convert it to a ValidationError with context.
201
+ *
202
+ * @example
203
+ * ```typescript
204
+ * try {
205
+ * schema.parse(input);
206
+ * } catch (error) {
207
+ * if (error instanceof ZodError) {
208
+ * throw wrapZodError(error, {
209
+ * entityType: "node",
210
+ * kind: "Person",
211
+ * operation: "create",
212
+ * });
213
+ * }
214
+ * throw error;
215
+ * }
216
+ * ```
217
+ */
218
+ declare function wrapZodError(error: ZodError, context: ValidationContext): ValidationError;
219
+ /**
220
+ * Creates a simple ValidationError without Zod context.
221
+ *
222
+ * Use this for custom validation rules that aren't part of a Zod schema.
223
+ *
224
+ * @example
225
+ * ```typescript
226
+ * if (startDate > endDate) {
227
+ * throw createValidationError(
228
+ * "Start date must be before end date",
229
+ * [{ path: "startDate", message: "Must be before endDate" }],
230
+ * { entityType: "edge", kind: "employment", operation: "create" }
231
+ * );
232
+ * }
233
+ * ```
234
+ */
235
+ declare function createValidationError(message: string, issues: ValidationIssue[], context?: Partial<ValidationContext>): ValidationError;
236
+
237
+ export { type DeserializedSchema, SchemaHash, SerializedClosures, SerializedEdgeDef, SerializedMetaEdge, SerializedNodeDef, SerializedOntologyRelation, SerializedSchema, type ValidationContext, computeSchemaHash, createValidationError, deserializeSchema, deserializeWherePredicate, serializeSchema, validateEdgeProps, validateNodeProps, validateProps, wrapZodError };
@@ -0,0 +1,237 @@
1
+ import { K as KindRegistry, G as GraphDef } from '../manager-e9LXthrx.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-e9LXthrx.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-Cdbi4hcx.js';
4
+ export { J as JsonSchema, g as SerializedOntology, h as SerializedUniqueConstraint } from '../types-Cdbi4hcx.js';
5
+ import { ZodType, ZodError } from 'zod';
6
+ import { V as ValidationIssue, a as ValidationError } from '../index-Dkicw49A.js';
7
+ import '../types-DTJEu_-h.js';
8
+ import 'drizzle-orm';
9
+ import '../types-BRzHlhKC.js';
10
+
11
+ /**
12
+ * Schema deserializer for loading stored schemas.
13
+ *
14
+ * Reconstructs runtime objects from SerializedSchema.
15
+ * Note: Zod schemas cannot be fully reconstructed from JSON Schema,
16
+ * so this provides access to the serialized data for introspection.
17
+ */
18
+
19
+ /**
20
+ * A deserialized schema provides read-only access to schema metadata.
21
+ *
22
+ * Note: Unlike the original GraphDef, this does not include Zod schemas
23
+ * since those cannot be reconstructed from JSON Schema. Use this for
24
+ * introspection and metadata access only.
25
+ */
26
+ type DeserializedSchema = Readonly<{
27
+ graphId: string;
28
+ version: number;
29
+ generatedAt: string;
30
+ /** Get node definition by name */
31
+ getNode: (name: string) => SerializedNodeDef | undefined;
32
+ /** Get all node names */
33
+ getNodeNames: () => readonly string[];
34
+ /** Get edge definition by name */
35
+ getEdge: (name: string) => SerializedEdgeDef | undefined;
36
+ /** Get all edge names */
37
+ getEdgeNames: () => readonly string[];
38
+ /** Get meta-edge definition by name */
39
+ getMetaEdge: (name: string) => SerializedMetaEdge | undefined;
40
+ /** Get all meta-edge names */
41
+ getMetaEdgeNames: () => readonly string[];
42
+ /** Get all ontology relations */
43
+ getRelations: () => readonly SerializedOntologyRelation[];
44
+ /** Get precomputed closures */
45
+ getClosures: () => SerializedClosures;
46
+ /** Get graph defaults */
47
+ getDefaults: () => SerializedSchema["defaults"];
48
+ /** Get the raw serialized schema */
49
+ getRaw: () => SerializedSchema;
50
+ /** Build a KindRegistry from the closures */
51
+ buildRegistry: () => KindRegistry;
52
+ }>;
53
+ /**
54
+ * Deserializes a SerializedSchema into a DeserializedSchema.
55
+ *
56
+ * @param schema - The serialized schema to deserialize
57
+ * @returns A deserialized schema with accessor methods
58
+ */
59
+ declare function deserializeSchema(schema: SerializedSchema): DeserializedSchema;
60
+
61
+ /**
62
+ * Serializes a GraphDef to a SerializedSchema.
63
+ *
64
+ * @param graph - The graph definition to serialize
65
+ * @param version - The schema version number
66
+ * @returns The serialized schema
67
+ */
68
+ declare function serializeSchema<G extends GraphDef>(graph: G, version: number): SerializedSchema;
69
+ /**
70
+ * A serialized predicate structure (matches UniqueConstraintPredicate from core/types).
71
+ */
72
+ type SerializedPredicate = Readonly<{
73
+ __type: "unique_predicate";
74
+ field: string;
75
+ op: "isNull" | "isNotNull";
76
+ }>;
77
+ /**
78
+ * Field builder returned by the predicate proxy.
79
+ */
80
+ type FieldPredicateBuilder = Readonly<{
81
+ isNull: () => SerializedPredicate;
82
+ isNotNull: () => SerializedPredicate;
83
+ }>;
84
+ /**
85
+ * Predicate builder type for where clause serialization.
86
+ */
87
+ type PredicateBuilder = Readonly<Record<string, FieldPredicateBuilder>>;
88
+ /**
89
+ * Deserializes a where predicate JSON back to a predicate function.
90
+ *
91
+ * This can be used to reconstruct a UniqueConstraint's where clause
92
+ * from a serialized schema.
93
+ *
94
+ * @param serialized - The JSON string from serialization
95
+ * @returns A where function that returns the predicate structure
96
+ */
97
+ /**
98
+ * Unique predicate result type.
99
+ */
100
+ type UniquePredicate = Readonly<{
101
+ __type: "unique_predicate";
102
+ field: string;
103
+ op: "isNull" | "isNotNull";
104
+ }>;
105
+ declare function deserializeWherePredicate(serialized: string): (builder: PredicateBuilder) => UniquePredicate;
106
+ /**
107
+ * Computes a hash of the schema content for change detection.
108
+ *
109
+ * Excludes version and generatedAt since those change on every save.
110
+ */
111
+ declare function computeSchemaHash(schema: SerializedSchema): Promise<SchemaHash>;
112
+
113
+ /**
114
+ * Contextual Validation Utilities
115
+ *
116
+ * Provides Zod validation wrappers that include full context about
117
+ * which entity (node/edge) and operation (create/update) failed.
118
+ *
119
+ * @example
120
+ * ```typescript
121
+ * const props = validateNodeProps(schema, input, {
122
+ * kind: "Person",
123
+ * operation: "create",
124
+ * });
125
+ * ```
126
+ */
127
+
128
+ /**
129
+ * Context for validation operations.
130
+ */
131
+ type ValidationContext = Readonly<{
132
+ /** Type of entity being validated */
133
+ entityType: "node" | "edge";
134
+ /** Kind/type name of the entity */
135
+ kind: string;
136
+ /** Operation being performed */
137
+ operation: "create" | "update";
138
+ /** Entity ID (for updates) */
139
+ id?: string;
140
+ }>;
141
+ /**
142
+ * Validates props with full context for error messages.
143
+ *
144
+ * @param schema - Zod schema to validate against
145
+ * @param props - Properties to validate
146
+ * @param context - Context about the entity and operation
147
+ * @returns Validated and transformed props
148
+ * @throws ValidationError with full context if validation fails
149
+ *
150
+ * @example
151
+ * ```typescript
152
+ * const validatedProps = validateProps(personSchema, input, {
153
+ * entityType: "node",
154
+ * kind: "Person",
155
+ * operation: "create",
156
+ * });
157
+ * ```
158
+ */
159
+ declare function validateProps<T>(schema: ZodType<T>, props: unknown, context: ValidationContext): T;
160
+ /**
161
+ * Validates node props with full context.
162
+ *
163
+ * Convenience wrapper around validateProps for node operations.
164
+ *
165
+ * @example
166
+ * ```typescript
167
+ * const props = validateNodeProps(schema, input, {
168
+ * kind: "Person",
169
+ * operation: "create",
170
+ * });
171
+ * ```
172
+ */
173
+ declare function validateNodeProps<T>(schema: ZodType<T>, props: unknown, context: Readonly<{
174
+ kind: string;
175
+ operation: "create" | "update";
176
+ id?: string;
177
+ }>): T;
178
+ /**
179
+ * Validates edge props with full context.
180
+ *
181
+ * Convenience wrapper around validateProps for edge operations.
182
+ *
183
+ * @example
184
+ * ```typescript
185
+ * const props = validateEdgeProps(schema, input, {
186
+ * kind: "worksAt",
187
+ * operation: "create",
188
+ * });
189
+ * ```
190
+ */
191
+ declare function validateEdgeProps<T>(schema: ZodType<T>, props: unknown, context: Readonly<{
192
+ kind: string;
193
+ operation: "create" | "update";
194
+ id?: string;
195
+ }>): T;
196
+ /**
197
+ * Wraps a Zod error with TypeGraph context.
198
+ *
199
+ * Use this when you've already caught a ZodError and want to
200
+ * convert it to a ValidationError with context.
201
+ *
202
+ * @example
203
+ * ```typescript
204
+ * try {
205
+ * schema.parse(input);
206
+ * } catch (error) {
207
+ * if (error instanceof ZodError) {
208
+ * throw wrapZodError(error, {
209
+ * entityType: "node",
210
+ * kind: "Person",
211
+ * operation: "create",
212
+ * });
213
+ * }
214
+ * throw error;
215
+ * }
216
+ * ```
217
+ */
218
+ declare function wrapZodError(error: ZodError, context: ValidationContext): ValidationError;
219
+ /**
220
+ * Creates a simple ValidationError without Zod context.
221
+ *
222
+ * Use this for custom validation rules that aren't part of a Zod schema.
223
+ *
224
+ * @example
225
+ * ```typescript
226
+ * if (startDate > endDate) {
227
+ * throw createValidationError(
228
+ * "Start date must be before end date",
229
+ * [{ path: "startDate", message: "Must be before endDate" }],
230
+ * { entityType: "edge", kind: "employment", operation: "create" }
231
+ * );
232
+ * }
233
+ * ```
234
+ */
235
+ declare function createValidationError(message: string, issues: ValidationIssue[], context?: Partial<ValidationContext>): ValidationError;
236
+
237
+ export { type DeserializedSchema, SchemaHash, SerializedClosures, SerializedEdgeDef, SerializedMetaEdge, SerializedNodeDef, SerializedOntologyRelation, SerializedSchema, type ValidationContext, computeSchemaHash, createValidationError, deserializeSchema, deserializeWherePredicate, serializeSchema, validateEdgeProps, validateNodeProps, validateProps, wrapZodError };