@nicia-ai/typegraph 0.39.0 → 0.41.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 (255) hide show
  1. package/dist/backend/drizzle/indexes.cjs +8 -10
  2. package/dist/backend/drizzle/indexes.d.cts +2 -2
  3. package/dist/backend/drizzle/indexes.d.ts +2 -2
  4. package/dist/backend/drizzle/indexes.js +4 -6
  5. package/dist/backend/index.cjs +60 -39
  6. package/dist/backend/index.d.cts +60 -1
  7. package/dist/backend/index.d.ts +60 -1
  8. package/dist/backend/index.js +12 -3
  9. package/dist/backend/postgres/index.cjs +24 -26
  10. package/dist/backend/postgres/index.d.cts +6 -6
  11. package/dist/backend/postgres/index.d.ts +6 -6
  12. package/dist/backend/postgres/index.js +11 -13
  13. package/dist/backend/postgres/pglite-store.cjs +25 -26
  14. package/dist/backend/postgres/pglite-store.cjs.map +1 -1
  15. package/dist/backend/postgres/pglite-store.d.cts +6 -5
  16. package/dist/backend/postgres/pglite-store.d.ts +6 -5
  17. package/dist/backend/postgres/pglite-store.js +21 -22
  18. package/dist/backend/postgres/pglite-store.js.map +1 -1
  19. package/dist/backend/postgres/pglite.cjs +13 -15
  20. package/dist/backend/postgres/pglite.d.cts +3 -3
  21. package/dist/backend/postgres/pglite.d.ts +3 -3
  22. package/dist/backend/postgres/pglite.js +12 -14
  23. package/dist/backend/sqlite/index.cjs +25 -27
  24. package/dist/backend/sqlite/index.d.cts +6 -6
  25. package/dist/backend/sqlite/index.d.ts +6 -6
  26. package/dist/backend/sqlite/index.js +9 -11
  27. package/dist/backend/sqlite/libsql.cjs +15 -17
  28. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  29. package/dist/backend/sqlite/libsql.d.cts +3 -3
  30. package/dist/backend/sqlite/libsql.d.ts +3 -3
  31. package/dist/backend/sqlite/libsql.js +14 -16
  32. package/dist/backend/sqlite/libsql.js.map +1 -1
  33. package/dist/backend/sqlite/local-store.cjs +26 -27
  34. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  35. package/dist/backend/sqlite/local-store.d.cts +6 -5
  36. package/dist/backend/sqlite/local-store.d.ts +6 -5
  37. package/dist/backend/sqlite/local-store.js +22 -23
  38. package/dist/backend/sqlite/local-store.js.map +1 -1
  39. package/dist/backend/sqlite/local.cjs +14 -16
  40. package/dist/backend/sqlite/local.d.cts +3 -3
  41. package/dist/backend/sqlite/local.d.ts +3 -3
  42. package/dist/backend/sqlite/local.js +12 -14
  43. package/dist/{chunk-U4JDJKPD.js → chunk-2I3DNNBU.js} +4 -4
  44. package/dist/{chunk-U4JDJKPD.js.map → chunk-2I3DNNBU.js.map} +1 -1
  45. package/dist/{chunk-NPWACFQJ.cjs → chunk-2J5NMMVR.cjs} +43 -43
  46. package/dist/{chunk-NPWACFQJ.cjs.map → chunk-2J5NMMVR.cjs.map} +1 -1
  47. package/dist/{chunk-3YFDFOYB.cjs → chunk-2X73QTIC.cjs} +12 -13
  48. package/dist/chunk-2X73QTIC.cjs.map +1 -0
  49. package/dist/chunk-3SHAUJRB.js +79 -0
  50. package/dist/chunk-3SHAUJRB.js.map +1 -0
  51. package/dist/{chunk-3SK4SVTW.js → chunk-53BSOG3O.js} +8 -7
  52. package/dist/chunk-53BSOG3O.js.map +1 -0
  53. package/dist/chunk-5J4VNCUD.js +856 -0
  54. package/dist/chunk-5J4VNCUD.js.map +1 -0
  55. package/dist/chunk-5YBDB7UG.cjs +12 -0
  56. package/dist/{chunk-FMNUSGZ4.cjs.map → chunk-5YBDB7UG.cjs.map} +1 -1
  57. package/dist/{chunk-6XDBRDZE.js → chunk-6N7QBIWN.js} +7 -3
  58. package/dist/chunk-6N7QBIWN.js.map +1 -0
  59. package/dist/{chunk-EZH7FNUS.js → chunk-6QP4QXBR.js} +3 -3
  60. package/dist/{chunk-EZH7FNUS.js.map → chunk-6QP4QXBR.js.map} +1 -1
  61. package/dist/{chunk-E6TXEISH.cjs → chunk-7UTUKH4E.cjs} +4 -4
  62. package/dist/{chunk-E6TXEISH.cjs.map → chunk-7UTUKH4E.cjs.map} +1 -1
  63. package/dist/chunk-7WLEQIHA.cjs +605 -0
  64. package/dist/chunk-7WLEQIHA.cjs.map +1 -0
  65. package/dist/{chunk-BQITNFQJ.js → chunk-AQVDAKXH.js} +3 -3
  66. package/dist/{chunk-BQITNFQJ.js.map → chunk-AQVDAKXH.js.map} +1 -1
  67. package/dist/{chunk-X6CNEA32.js → chunk-BUZWMDNL.js} +5 -5
  68. package/dist/{chunk-X6CNEA32.js.map → chunk-BUZWMDNL.js.map} +1 -1
  69. package/dist/{chunk-7M3NACL3.cjs → chunk-CKFBZ4LV.cjs} +4 -4
  70. package/dist/{chunk-7M3NACL3.cjs.map → chunk-CKFBZ4LV.cjs.map} +1 -1
  71. package/dist/{chunk-IFRPHG7O.js → chunk-EFZ4S22A.js} +10 -9
  72. package/dist/chunk-EFZ4S22A.js.map +1 -0
  73. package/dist/chunk-ELA3V6UN.js +601 -0
  74. package/dist/chunk-ELA3V6UN.js.map +1 -0
  75. package/dist/chunk-HAQVISUF.cjs +1098 -0
  76. package/dist/chunk-HAQVISUF.cjs.map +1 -0
  77. package/dist/{chunk-BKAKAVRW.cjs → chunk-HQRZEYYB.cjs} +44 -44
  78. package/dist/{chunk-BKAKAVRW.cjs.map → chunk-HQRZEYYB.cjs.map} +1 -1
  79. package/dist/{chunk-KAFXPB2L.js → chunk-I5CRUPKO.js} +9 -10
  80. package/dist/{chunk-KAFXPB2L.js.map → chunk-I5CRUPKO.js.map} +1 -1
  81. package/dist/{chunk-IFDXG2YJ.js → chunk-JHK6NPFV.js} +217 -305
  82. package/dist/chunk-JHK6NPFV.js.map +1 -0
  83. package/dist/{chunk-VXAFOF6Z.cjs → chunk-JP5EICR6.cjs} +12 -7
  84. package/dist/chunk-JP5EICR6.cjs.map +1 -0
  85. package/dist/chunk-JZYMOHHM.cjs +226 -0
  86. package/dist/chunk-JZYMOHHM.cjs.map +1 -0
  87. package/dist/{chunk-ERZ4QPQX.js → chunk-K6CD6W5J.js} +5 -5
  88. package/dist/{chunk-ERZ4QPQX.js.map → chunk-K6CD6W5J.js.map} +1 -1
  89. package/dist/{chunk-JD2YC62H.cjs → chunk-KHNKYSGP.cjs} +34 -34
  90. package/dist/{chunk-JD2YC62H.cjs.map → chunk-KHNKYSGP.cjs.map} +1 -1
  91. package/dist/{chunk-CWX77JB4.cjs → chunk-KLR77R5A.cjs} +13 -13
  92. package/dist/{chunk-CWX77JB4.cjs.map → chunk-KLR77R5A.cjs.map} +1 -1
  93. package/dist/chunk-KOI7UEI5.js +81 -0
  94. package/dist/chunk-KOI7UEI5.js.map +1 -0
  95. package/dist/{chunk-AOL64O4Z.js → chunk-L3DDZUZP.js} +3 -3
  96. package/dist/{chunk-AOL64O4Z.js.map → chunk-L3DDZUZP.js.map} +1 -1
  97. package/dist/{chunk-PZHC5GCD.js → chunk-L5ET7FYQ.js} +3 -3
  98. package/dist/{chunk-PZHC5GCD.js.map → chunk-L5ET7FYQ.js.map} +1 -1
  99. package/dist/{chunk-B63IFHXR.cjs → chunk-LFFVD5ZR.cjs} +41 -41
  100. package/dist/{chunk-B63IFHXR.cjs.map → chunk-LFFVD5ZR.cjs.map} +1 -1
  101. package/dist/chunk-LL5D5T5W.cjs +157 -0
  102. package/dist/chunk-LL5D5T5W.cjs.map +1 -0
  103. package/dist/{chunk-GUUWKPTK.cjs → chunk-LLE25NRD.cjs} +7 -7
  104. package/dist/{chunk-GUUWKPTK.cjs.map → chunk-LLE25NRD.cjs.map} +1 -1
  105. package/dist/chunk-LLHMAHG4.cjs +886 -0
  106. package/dist/chunk-LLHMAHG4.cjs.map +1 -0
  107. package/dist/{chunk-6SRLCSAV.cjs → chunk-LOKG3KQV.cjs} +962 -875
  108. package/dist/chunk-LOKG3KQV.cjs.map +1 -0
  109. package/dist/{chunk-KIZSHRUI.cjs → chunk-M2RPZS7J.cjs} +10 -10
  110. package/dist/{chunk-KIZSHRUI.cjs.map → chunk-M2RPZS7J.cjs.map} +1 -1
  111. package/dist/chunk-MNURF4RF.cjs +85 -0
  112. package/dist/chunk-MNURF4RF.cjs.map +1 -0
  113. package/dist/{chunk-CBK2IVI2.js → chunk-MQBF3XGY.js} +119 -32
  114. package/dist/chunk-MQBF3XGY.js.map +1 -0
  115. package/dist/chunk-QCKD3RCI.cjs +83 -0
  116. package/dist/chunk-QCKD3RCI.cjs.map +1 -0
  117. package/dist/chunk-QOHTVDHU.js +144 -0
  118. package/dist/chunk-QOHTVDHU.js.map +1 -0
  119. package/dist/{chunk-HTQOBY75.cjs → chunk-QXKVUJLI.cjs} +110 -109
  120. package/dist/chunk-QXKVUJLI.cjs.map +1 -0
  121. package/dist/{chunk-GNPGGLAE.cjs → chunk-QYDUCWD2.cjs} +4 -4
  122. package/dist/{chunk-GNPGGLAE.cjs.map → chunk-QYDUCWD2.cjs.map} +1 -1
  123. package/dist/{chunk-DOKUXLFH.js → chunk-QZYGZVUI.js} +34 -34
  124. package/dist/chunk-QZYGZVUI.js.map +1 -0
  125. package/dist/{chunk-GKQU44SQ.cjs → chunk-SAMJLDGG.cjs} +103 -103
  126. package/dist/{chunk-GKQU44SQ.cjs.map → chunk-SAMJLDGG.cjs.map} +1 -1
  127. package/dist/{chunk-DOVMTPKE.cjs → chunk-SE422RES.cjs} +27 -27
  128. package/dist/{chunk-DOVMTPKE.cjs.map → chunk-SE422RES.cjs.map} +1 -1
  129. package/dist/{chunk-5ELKD2FQ.cjs → chunk-UCHW2MGP.cjs} +330 -431
  130. package/dist/chunk-UCHW2MGP.cjs.map +1 -0
  131. package/dist/{chunk-Y6UA55YS.cjs → chunk-UDS5DZNY.cjs} +495 -1095
  132. package/dist/chunk-UDS5DZNY.cjs.map +1 -0
  133. package/dist/{chunk-SU7VQOJ3.js → chunk-V3S74J44.js} +9 -5
  134. package/dist/chunk-V3S74J44.js.map +1 -0
  135. package/dist/{chunk-VDYA2HMS.js → chunk-VWEFXG73.js} +3 -3
  136. package/dist/{chunk-VDYA2HMS.js.map → chunk-VWEFXG73.js.map} +1 -1
  137. package/dist/{chunk-KXFUQNF2.js → chunk-W66YCXWT.js} +463 -1047
  138. package/dist/chunk-W66YCXWT.js.map +1 -0
  139. package/dist/{chunk-NQBYTLPW.js → chunk-XMEYZYGE.js} +6 -6
  140. package/dist/{chunk-NQBYTLPW.js.map → chunk-XMEYZYGE.js.map} +1 -1
  141. package/dist/{chunk-G3CSQLLT.js → chunk-Y5UC3IXF.js} +461 -6
  142. package/dist/chunk-Y5UC3IXF.js.map +1 -0
  143. package/dist/{chunk-SDHV2MWU.js → chunk-YGX4PMG6.js} +5 -5
  144. package/dist/{chunk-SDHV2MWU.js.map → chunk-YGX4PMG6.js.map} +1 -1
  145. package/dist/{chunk-E2Q7SP2K.cjs → chunk-YIX3BEBR.cjs} +86 -85
  146. package/dist/chunk-YIX3BEBR.cjs.map +1 -0
  147. package/dist/{chunk-X6RDQ5NB.cjs → chunk-YX3H63VV.cjs} +8 -2
  148. package/dist/chunk-YX3H63VV.cjs.map +1 -0
  149. package/dist/chunk-YYLMXERH.js +211 -0
  150. package/dist/chunk-YYLMXERH.js.map +1 -0
  151. package/dist/{chunk-YPUNPG2T.js → chunk-ZE7E46IZ.js} +5 -5
  152. package/dist/{chunk-YPUNPG2T.js.map → chunk-ZE7E46IZ.js.map} +1 -1
  153. package/dist/{chunk-Z2PPIVOO.js → chunk-ZVME6OSV.js} +5 -5
  154. package/dist/{chunk-Z2PPIVOO.js.map → chunk-ZVME6OSV.js.map} +1 -1
  155. package/dist/core/index.cjs +15 -3
  156. package/dist/core/index.d.cts +4 -3
  157. package/dist/core/index.d.ts +4 -3
  158. package/dist/core/index.js +2 -2
  159. package/dist/{ddl-J6sDyABg.d.cts → ddl-BCXFRLWg.d.cts} +3 -3
  160. package/dist/{ddl-Dx3Z0_WC.d.ts → ddl-ByLmGgn9.d.ts} +3 -3
  161. package/dist/{define-graph-DRo9xpYN.d.ts → define-graph-BSviZubs.d.ts} +1 -1
  162. package/dist/{define-graph-CzEvA_8F.d.cts → define-graph-XyJheaFm.d.cts} +1 -1
  163. package/dist/graph-merge/index.cjs +37 -38
  164. package/dist/graph-merge/index.cjs.map +1 -1
  165. package/dist/graph-merge/index.d.cts +6 -5
  166. package/dist/graph-merge/index.d.ts +6 -5
  167. package/dist/graph-merge/index.js +15 -16
  168. package/dist/graph-merge/index.js.map +1 -1
  169. package/dist/index.cjs +146 -117
  170. package/dist/index.cjs.map +1 -1
  171. package/dist/index.d.cts +12 -10
  172. package/dist/index.d.ts +12 -10
  173. package/dist/index.js +23 -22
  174. package/dist/index.js.map +1 -1
  175. package/dist/indexes/index.cjs +12 -14
  176. package/dist/indexes/index.d.cts +5 -5
  177. package/dist/indexes/index.d.ts +5 -5
  178. package/dist/indexes/index.js +5 -7
  179. package/dist/interchange/index.cjs +28 -29
  180. package/dist/interchange/index.cjs.map +1 -1
  181. package/dist/interchange/index.d.cts +6 -5
  182. package/dist/interchange/index.d.ts +6 -5
  183. package/dist/interchange/index.js +9 -10
  184. package/dist/interchange/index.js.map +1 -1
  185. package/dist/{manager-CASfhmzV.d.ts → manager-C7iC5bk_.d.ts} +27 -3
  186. package/dist/{manager-nCEJiYBb.d.cts → manager-Dm6MCYO7.d.cts} +27 -3
  187. package/dist/{postgres-Cl1ZAN1G.d.ts → postgres-Cb6ceh4-.d.ts} +100 -49
  188. package/dist/{postgres-DMgIKQU-.d.cts → postgres-DZxwzCQ8.d.cts} +100 -49
  189. package/dist/profiler/index.d.cts +8 -7
  190. package/dist/profiler/index.d.ts +8 -7
  191. package/dist/provenance/index.cjs +19 -19
  192. package/dist/provenance/index.d.cts +6 -5
  193. package/dist/provenance/index.d.ts +6 -5
  194. package/dist/provenance/index.js +6 -6
  195. package/dist/schema/index.cjs +33 -101
  196. package/dist/schema/index.cjs.map +1 -1
  197. package/dist/schema/index.d.cts +55 -55
  198. package/dist/schema/index.d.ts +55 -55
  199. package/dist/schema/index.js +6 -86
  200. package/dist/schema/index.js.map +1 -1
  201. package/dist/{temporal-DqtOEo_B.d.ts → searchable-Cet4Oztt.d.ts} +3 -58
  202. package/dist/{temporal-BC_NQV5Y.d.cts → searchable-aUaKh3_r.d.cts} +3 -58
  203. package/dist/{sqlite-BDkW39aa.d.cts → sqlite-Cb3Ilj9_.d.ts} +124 -97
  204. package/dist/{sqlite-CYfhvESj.d.ts → sqlite-Dxklpizv.d.cts} +124 -97
  205. package/dist/{store-view-CLIhwMMX.d.ts → store-view-BDjGFjpN.d.ts} +67 -23
  206. package/dist/{store-view-BJd6Vwpt.d.cts → store-view-PCT7vTKH.d.cts} +67 -23
  207. package/dist/temporal-CyFsSPe8.d.ts +73 -0
  208. package/dist/temporal-Dn_JADWY.d.cts +73 -0
  209. package/dist/{types-CUevi_D1.d.ts → types-CFZiEEPh.d.ts} +1 -1
  210. package/dist/{types-COq3-vMC.d.cts → types-CsaG00wS.d.cts} +1 -1
  211. package/dist/{index-Bq7vSPHy.d.ts → types-D-vOo_pM.d.ts} +2 -2
  212. package/dist/{index-CrFL_ENI.d.cts → types-ho4DJJb_.d.cts} +2 -2
  213. package/dist/{where-BdE_cYtx.d.ts → where-DLYaXa4L.d.ts} +1 -1
  214. package/dist/{where-C92TXCzT.d.cts → where-udes1WRA.d.cts} +1 -1
  215. package/package.json +1 -1
  216. package/dist/chunk-3SK4SVTW.js.map +0 -1
  217. package/dist/chunk-3YFDFOYB.cjs.map +0 -1
  218. package/dist/chunk-5ELKD2FQ.cjs.map +0 -1
  219. package/dist/chunk-6SRLCSAV.cjs.map +0 -1
  220. package/dist/chunk-6XDBRDZE.js.map +0 -1
  221. package/dist/chunk-CBK2IVI2.js.map +0 -1
  222. package/dist/chunk-DDCIXXOO.js +0 -9
  223. package/dist/chunk-DDCIXXOO.js.map +0 -1
  224. package/dist/chunk-DDCYVIVV.cjs +0 -44
  225. package/dist/chunk-DDCYVIVV.cjs.map +0 -1
  226. package/dist/chunk-DOKUXLFH.js.map +0 -1
  227. package/dist/chunk-E2Q7SP2K.cjs.map +0 -1
  228. package/dist/chunk-EOJFGECD.cjs +0 -284
  229. package/dist/chunk-EOJFGECD.cjs.map +0 -1
  230. package/dist/chunk-FMNUSGZ4.cjs +0 -12
  231. package/dist/chunk-G3CSQLLT.js.map +0 -1
  232. package/dist/chunk-HTQOBY75.cjs.map +0 -1
  233. package/dist/chunk-I6FX7AAG.js +0 -39
  234. package/dist/chunk-I6FX7AAG.js.map +0 -1
  235. package/dist/chunk-IFDXG2YJ.js.map +0 -1
  236. package/dist/chunk-IFRPHG7O.js.map +0 -1
  237. package/dist/chunk-J6IJARLG.js +0 -94
  238. package/dist/chunk-J6IJARLG.js.map +0 -1
  239. package/dist/chunk-KXFUQNF2.js.map +0 -1
  240. package/dist/chunk-MTNEGGM2.js +0 -273
  241. package/dist/chunk-MTNEGGM2.js.map +0 -1
  242. package/dist/chunk-SU7VQOJ3.js.map +0 -1
  243. package/dist/chunk-SVUKGWSN.cjs +0 -102
  244. package/dist/chunk-SVUKGWSN.cjs.map +0 -1
  245. package/dist/chunk-UH2USOMG.cjs +0 -627
  246. package/dist/chunk-UH2USOMG.cjs.map +0 -1
  247. package/dist/chunk-VXAFOF6Z.cjs.map +0 -1
  248. package/dist/chunk-X6RDQ5NB.cjs.map +0 -1
  249. package/dist/chunk-Y6UA55YS.cjs.map +0 -1
  250. package/dist/chunk-Y7M44XEK.js +0 -462
  251. package/dist/chunk-Y7M44XEK.js.map +0 -1
  252. package/dist/chunk-Z5QHVL5U.cjs +0 -12
  253. package/dist/chunk-Z5QHVL5U.cjs.map +0 -1
  254. package/dist/chunk-ZKZAIX42.cjs +0 -479
  255. package/dist/chunk-ZKZAIX42.cjs.map +0 -1
@@ -1,10 +1,11 @@
1
- import { G as GraphDef } from '../define-graph-CzEvA_8F.cjs';
2
- import { b as HistoryStore } from '../store-view-BJd6Vwpt.cjs';
1
+ import { G as GraphDef } from '../define-graph-XyJheaFm.cjs';
2
+ import { b as HistoryStore } from '../store-view-PCT7vTKH.cjs';
3
3
  import '../extension-types-BLEVH4SG.cjs';
4
4
  import 'zod';
5
- import '../index-CrFL_ENI.cjs';
6
- import '../temporal-BC_NQV5Y.cjs';
7
- import '../manager-nCEJiYBb.cjs';
5
+ import '../types-ho4DJJb_.cjs';
6
+ import '../temporal-Dn_JADWY.cjs';
7
+ import '../manager-Dm6MCYO7.cjs';
8
+ import '../searchable-aUaKh3_r.cjs';
8
9
  import '../materialize-indexes-ExQ6OrAh.cjs';
9
10
 
10
11
  type NodeKind<G extends GraphDef> = Extract<keyof G["nodes"], string>;
@@ -1,10 +1,11 @@
1
- import { G as GraphDef } from '../define-graph-DRo9xpYN.js';
2
- import { b as HistoryStore } from '../store-view-CLIhwMMX.js';
1
+ import { G as GraphDef } from '../define-graph-BSviZubs.js';
2
+ import { b as HistoryStore } from '../store-view-BDjGFjpN.js';
3
3
  import '../extension-types-BLEVH4SG.js';
4
4
  import 'zod';
5
- import '../index-Bq7vSPHy.js';
6
- import '../temporal-DqtOEo_B.js';
7
- import '../manager-CASfhmzV.js';
5
+ import '../types-D-vOo_pM.js';
6
+ import '../temporal-CyFsSPe8.js';
7
+ import '../manager-C7iC5bk_.js';
8
+ import '../searchable-Cet4Oztt.js';
8
9
  import '../materialize-indexes-D4iei4Kp.js';
9
10
 
10
11
  type NodeKind<G extends GraphDef> = Extract<keyof G["nodes"], string>;
@@ -1,13 +1,13 @@
1
1
  import { compareStrings } from '../chunk-DRACN6XG.js';
2
- import { transactionBackend, lockRecordedGraphWrite, transactionNodeOperationHookRunner, applyNodeSoftDelete, createNodeWriteContext, applyNodeResurrect } from '../chunk-IFDXG2YJ.js';
2
+ import { transactionBackend, lockRecordedGraphWrite, transactionNodeOperationHookRunner, applyNodeSoftDelete, createNodeWriteContext, applyNodeResurrect } from '../chunk-JHK6NPFV.js';
3
3
  import '../chunk-35S6P5ZU.js';
4
- import { rowPropsToObject, isLiveNodeRow, isTombstonedNodeRow } from '../chunk-PZHC5GCD.js';
5
- import '../chunk-J6IJARLG.js';
4
+ import '../chunk-YYLMXERH.js';
5
+ import { rowPropsToObject, isLiveNodeRow, isTombstonedNodeRow } from '../chunk-L5ET7FYQ.js';
6
+ import '../chunk-QOHTVDHU.js';
6
7
  import '../chunk-UUIBACKJ.js';
7
- import { nowIso } from '../chunk-I6FX7AAG.js';
8
+ import { nowIso } from '../chunk-3SHAUJRB.js';
8
9
  import '../chunk-2EBMPJBO.js';
9
- import '../chunk-DDCIXXOO.js';
10
- import '../chunk-6XDBRDZE.js';
10
+ import '../chunk-6N7QBIWN.js';
11
11
  import '../chunk-SNXVDZAJ.js';
12
12
  import '../chunk-QMQLUA66.js';
13
13
  import '../chunk-PC2UBAUB.js';
@@ -1,19 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkVXAFOF6Z_cjs = require('../chunk-VXAFOF6Z.cjs');
3
+ var chunkQCKD3RCI_cjs = require('../chunk-QCKD3RCI.cjs');
4
+ var chunkJP5EICR6_cjs = require('../chunk-JP5EICR6.cjs');
4
5
  require('../chunk-RW24SAHI.cjs');
5
6
  var chunkX4PVHAZ6_cjs = require('../chunk-X4PVHAZ6.cjs');
6
7
  require('../chunk-ACSVZPK7.cjs');
7
8
  require('../chunk-HP6LWBLB.cjs');
8
9
  require('../chunk-NT6ILURI.cjs');
9
- require('../chunk-DDCYVIVV.cjs');
10
- require('../chunk-7M3NACL3.cjs');
10
+ require('../chunk-MNURF4RF.cjs');
11
+ require('../chunk-CKFBZ4LV.cjs');
11
12
  require('../chunk-ZY4GXIVN.cjs');
12
13
  require('../chunk-NAUA4PW5.cjs');
13
- require('../chunk-UH2USOMG.cjs');
14
- require('../chunk-Z5QHVL5U.cjs');
15
- require('../chunk-ZKZAIX42.cjs');
16
- require('../chunk-X6RDQ5NB.cjs');
14
+ require('../chunk-HAQVISUF.cjs');
15
+ require('../chunk-YX3H63VV.cjs');
17
16
  require('../chunk-FJMPR3OH.cjs');
18
17
  require('../chunk-SJDMVITW.cjs');
19
18
  require('../chunk-764JHTLT.cjs');
@@ -26,153 +25,87 @@ require('../chunk-XRU7V7FF.cjs');
26
25
  require('../chunk-SAFZ6JTI.cjs');
27
26
  require('../chunk-TDXIBCGY.cjs');
28
27
 
29
- // src/schema/deserializer.ts
30
- function deserializeSchema(schema) {
31
- const nodeNames = Object.keys(schema.nodes);
32
- const edgeNames = Object.keys(schema.edges);
33
- const metaEdgeNames = Object.keys(schema.ontology.metaEdges);
34
- return {
35
- graphId: schema.graphId,
36
- version: schema.version,
37
- generatedAt: schema.generatedAt,
38
- getNode: (name) => schema.nodes[name],
39
- getNodeNames: () => nodeNames,
40
- getEdge: (name) => schema.edges[name],
41
- getEdgeNames: () => edgeNames,
42
- getMetaEdge: (name) => schema.ontology.metaEdges[name],
43
- getMetaEdgeNames: () => metaEdgeNames,
44
- getRelations: () => schema.ontology.relations,
45
- getClosures: () => schema.ontology.closures,
46
- getDefaults: () => schema.defaults,
47
- getRaw: () => schema,
48
- buildRegistry: () => buildRegistryFromClosures(schema)
49
- };
50
- }
51
- function buildRegistryFromClosures(schema) {
52
- const { closures } = schema.ontology;
53
- const subClassAncestors = recordToMap(closures.subClassAncestors);
54
- const subClassDescendants = recordToMap(closures.subClassDescendants);
55
- const broaderClosure = recordToMap(closures.broaderClosure);
56
- const narrowerClosure = recordToMap(closures.narrowerClosure);
57
- const equivalenceSets = recordToMap(closures.equivalenceSets);
58
- const partOfClosure = recordToMap(closures.partOfClosure);
59
- const hasPartClosure = recordToMap(closures.hasPartClosure);
60
- const iriToKind = simpleRecordToMap(closures.iriToKind);
61
- const disjointPairs = new Set(closures.disjointPairs);
62
- const edgeInverses = simpleRecordToMap(closures.edgeInverses);
63
- const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);
64
- const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
65
- const nodeKinds = /* @__PURE__ */ new Map();
66
- const edgeKinds = /* @__PURE__ */ new Map();
67
- const registry = new chunkVXAFOF6Z_cjs.KindRegistry(nodeKinds, edgeKinds, {
68
- subClassAncestors,
69
- subClassDescendants,
70
- broaderClosure,
71
- narrowerClosure,
72
- equivalenceSets,
73
- iriToKind,
74
- disjointPairs,
75
- partOfClosure,
76
- hasPartClosure,
77
- edgeInverses,
78
- edgeImplicationsClosure,
79
- edgeImplyingClosure
80
- });
81
- chunkVXAFOF6Z_cjs.validateImpliesEndpointCompatibility(
82
- buildEdgeEndpointKinds(schema.edges),
83
- registry
84
- );
85
- return registry;
86
- }
87
- function buildEdgeEndpointKinds(edges) {
88
- const result = /* @__PURE__ */ new Map();
89
- for (const [kind, def] of Object.entries(edges)) {
90
- result.set(kind, { from: def.fromKinds, to: def.toKinds });
91
- }
92
- return result;
93
- }
94
- function recordToMap(record) {
95
- const result = /* @__PURE__ */ new Map();
96
- for (const [key, values] of Object.entries(record)) {
97
- result.set(key, new Set(values));
98
- }
99
- return result;
100
- }
101
- function simpleRecordToMap(record) {
102
- return new Map(Object.entries(record));
103
- }
104
28
 
29
+
30
+ Object.defineProperty(exports, "deserializeSchema", {
31
+ enumerable: true,
32
+ get: function () { return chunkQCKD3RCI_cjs.deserializeSchema; }
33
+ });
105
34
  Object.defineProperty(exports, "applyDeprecatedKinds", {
106
35
  enumerable: true,
107
- get: function () { return chunkVXAFOF6Z_cjs.applyDeprecatedKinds; }
36
+ get: function () { return chunkJP5EICR6_cjs.applyDeprecatedKinds; }
108
37
  });
109
38
  Object.defineProperty(exports, "assertSchemaCurrent", {
110
39
  enumerable: true,
111
- get: function () { return chunkVXAFOF6Z_cjs.assertSchemaCurrent; }
40
+ get: function () { return chunkJP5EICR6_cjs.assertSchemaCurrent; }
112
41
  });
113
42
  Object.defineProperty(exports, "computeSchemaDiff", {
114
43
  enumerable: true,
115
- get: function () { return chunkVXAFOF6Z_cjs.computeSchemaDiff; }
44
+ get: function () { return chunkJP5EICR6_cjs.computeSchemaDiff; }
116
45
  });
117
46
  Object.defineProperty(exports, "computeSchemaHash", {
118
47
  enumerable: true,
119
- get: function () { return chunkVXAFOF6Z_cjs.computeSchemaHash; }
48
+ get: function () { return chunkJP5EICR6_cjs.computeSchemaHash; }
120
49
  });
121
50
  Object.defineProperty(exports, "deserializeWherePredicate", {
122
51
  enumerable: true,
123
- get: function () { return chunkVXAFOF6Z_cjs.deserializeWherePredicate; }
52
+ get: function () { return chunkJP5EICR6_cjs.deserializeWherePredicate; }
124
53
  });
125
54
  Object.defineProperty(exports, "ensureSchema", {
126
55
  enumerable: true,
127
- get: function () { return chunkVXAFOF6Z_cjs.ensureSchema; }
56
+ get: function () { return chunkJP5EICR6_cjs.ensureSchema; }
128
57
  });
129
58
  Object.defineProperty(exports, "getActiveSchema", {
130
59
  enumerable: true,
131
- get: function () { return chunkVXAFOF6Z_cjs.getActiveSchema; }
60
+ get: function () { return chunkJP5EICR6_cjs.getActiveSchema; }
61
+ });
62
+ Object.defineProperty(exports, "getCommittedSchemaVersion", {
63
+ enumerable: true,
64
+ get: function () { return chunkJP5EICR6_cjs.getCommittedSchemaVersion; }
132
65
  });
133
66
  Object.defineProperty(exports, "getMigrationActions", {
134
67
  enumerable: true,
135
- get: function () { return chunkVXAFOF6Z_cjs.getMigrationActions; }
68
+ get: function () { return chunkJP5EICR6_cjs.getMigrationActions; }
136
69
  });
137
70
  Object.defineProperty(exports, "getSchemaChanges", {
138
71
  enumerable: true,
139
- get: function () { return chunkVXAFOF6Z_cjs.getSchemaChanges; }
72
+ get: function () { return chunkJP5EICR6_cjs.getSchemaChanges; }
140
73
  });
141
74
  Object.defineProperty(exports, "initializeSchema", {
142
75
  enumerable: true,
143
- get: function () { return chunkVXAFOF6Z_cjs.initializeSchema; }
76
+ get: function () { return chunkJP5EICR6_cjs.initializeSchema; }
144
77
  });
145
78
  Object.defineProperty(exports, "isBackwardsCompatible", {
146
79
  enumerable: true,
147
- get: function () { return chunkVXAFOF6Z_cjs.isBackwardsCompatible; }
80
+ get: function () { return chunkJP5EICR6_cjs.isBackwardsCompatible; }
148
81
  });
149
82
  Object.defineProperty(exports, "isSchemaInitialized", {
150
83
  enumerable: true,
151
- get: function () { return chunkVXAFOF6Z_cjs.isSchemaInitialized; }
84
+ get: function () { return chunkJP5EICR6_cjs.isSchemaInitialized; }
152
85
  });
153
86
  Object.defineProperty(exports, "loadActiveSchemaWithBootstrap", {
154
87
  enumerable: true,
155
- get: function () { return chunkVXAFOF6Z_cjs.loadActiveSchemaWithBootstrap; }
88
+ get: function () { return chunkJP5EICR6_cjs.loadActiveSchemaWithBootstrap; }
156
89
  });
157
90
  Object.defineProperty(exports, "loadAndMergeGraphExtensionDocument", {
158
91
  enumerable: true,
159
- get: function () { return chunkVXAFOF6Z_cjs.loadAndMergeGraphExtensionDocument; }
92
+ get: function () { return chunkJP5EICR6_cjs.loadAndMergeGraphExtensionDocument; }
160
93
  });
161
94
  Object.defineProperty(exports, "migrateSchema", {
162
95
  enumerable: true,
163
- get: function () { return chunkVXAFOF6Z_cjs.migrateSchema; }
96
+ get: function () { return chunkJP5EICR6_cjs.migrateSchema; }
164
97
  });
165
98
  Object.defineProperty(exports, "parseSerializedSchema", {
166
99
  enumerable: true,
167
- get: function () { return chunkVXAFOF6Z_cjs.parseSerializedSchema; }
100
+ get: function () { return chunkJP5EICR6_cjs.parseSerializedSchema; }
168
101
  });
169
102
  Object.defineProperty(exports, "rollbackSchema", {
170
103
  enumerable: true,
171
- get: function () { return chunkVXAFOF6Z_cjs.rollbackSchema; }
104
+ get: function () { return chunkJP5EICR6_cjs.rollbackSchema; }
172
105
  });
173
106
  Object.defineProperty(exports, "serializeSchema", {
174
107
  enumerable: true,
175
- get: function () { return chunkVXAFOF6Z_cjs.serializeSchema; }
108
+ get: function () { return chunkJP5EICR6_cjs.serializeSchema; }
176
109
  });
177
110
  Object.defineProperty(exports, "createValidationError", {
178
111
  enumerable: true,
@@ -194,6 +127,5 @@ Object.defineProperty(exports, "wrapZodError", {
194
127
  enumerable: true,
195
128
  get: function () { return chunkX4PVHAZ6_cjs.wrapZodError; }
196
129
  });
197
- exports.deserializeSchema = deserializeSchema;
198
130
  //# sourceMappingURL=index.cjs.map
199
131
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schema/deserializer.ts"],"names":["KindRegistry","validateImpliesEndpointCompatibility"],"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 EdgeEndpointKinds,\n validateImpliesEndpointCompatibility,\n} from \"../registry/validate-implies\";\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 const registry = 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 validateImpliesEndpointCompatibility(\n buildEdgeEndpointKinds(schema.edges),\n registry,\n );\n\n return registry;\n}\n\n/**\n * Maps each edge kind's serialized definition to its domain/range kind\n * names, for `validateImpliesEndpointCompatibility`. A `Map` (rather than\n * the plain `schema.edges` object) so a lookup for an edge kind literally\n * named \"toString\" or another `Object.prototype` member can't resolve to\n * an inherited member instead of `undefined`.\n */\nfunction buildEdgeEndpointKinds(\n edges: Record<string, SerializedEdgeDef>,\n): ReadonlyMap<string, EdgeEndpointKinds> {\n const result = new Map<string, EdgeEndpointKinds>();\n for (const [kind, def] of Object.entries(edges)) {\n result.set(kind, { from: def.fromKinds, to: def.toKinds });\n }\n return result;\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":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -1,13 +1,63 @@
1
- import { K as KindRegistry } from '../manager-nCEJiYBb.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, c as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as assertSchemaCurrent, g as computeSchemaDiff, h as ensureSchema, i as getActiveSchema, j as getMigrationActions, k as getSchemaChanges, l as initializeSchema, m as isBackwardsCompatible, n as isSchemaInitialized, o as loadActiveSchemaWithBootstrap, p as loadAndMergeGraphExtensionDocument, q as migrateSchema, r as parseSerializedSchema, s as rollbackSchema } from '../manager-nCEJiYBb.cjs';
3
- import { q as SerializedSchema, r as SchemaHash, s as SerializedNodeDef, t as SerializedEdgeDef, u as SerializedMetaEdge, v as SerializedOntologyRelation, w as SerializedClosures } from '../index-CrFL_ENI.cjs';
4
- export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../index-CrFL_ENI.cjs';
5
- import { G as GraphDef } from '../define-graph-CzEvA_8F.cjs';
1
+ import { K as KindRegistry } from '../manager-Dm6MCYO7.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, c as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as assertSchemaCurrent, g as computeSchemaDiff, h as ensureSchema, i as getActiveSchema, j as getCommittedSchemaVersion, k as getMigrationActions, l as getSchemaChanges, m as initializeSchema, n as isBackwardsCompatible, o as isSchemaInitialized, p as loadActiveSchemaWithBootstrap, q as loadAndMergeGraphExtensionDocument, r as migrateSchema, s as parseSerializedSchema, t as rollbackSchema } from '../manager-Dm6MCYO7.cjs';
3
+ import { q as SerializedNodeDef, r as SerializedEdgeDef, s as SerializedMetaEdge, t as SerializedOntologyRelation, u as SerializedClosures, v as SerializedSchema, w as SchemaHash } from '../types-ho4DJJb_.cjs';
4
+ export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../types-ho4DJJb_.cjs';
5
+ import { G as GraphDef } from '../define-graph-XyJheaFm.cjs';
6
6
  import { c as NullCheckOp, K as KindEntity } from '../extension-types-BLEVH4SG.cjs';
7
7
  import { ZodType, ZodError } from 'zod';
8
8
  import { V as ValidationIssue, a as ValidationError } from '../index-BihFPsPu.cjs';
9
9
  import '../materialize-indexes-ExQ6OrAh.cjs';
10
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
+
11
61
  /**
12
62
  * Schema serializer for homoiconic storage.
13
63
  *
@@ -67,56 +117,6 @@ declare function deserializeWherePredicate(serialized: string): (builder: Predic
67
117
  */
68
118
  declare function computeSchemaHash(schema: SerializedSchema): Promise<SchemaHash>;
69
119
 
70
- /**
71
- * Schema deserializer for loading stored schemas.
72
- *
73
- * Reconstructs runtime objects from SerializedSchema.
74
- * Note: Zod schemas cannot be fully reconstructed from JSON Schema,
75
- * so this provides access to the serialized data for introspection.
76
- */
77
-
78
- /**
79
- * A deserialized schema provides read-only access to schema metadata.
80
- *
81
- * Note: Unlike the original GraphDef, this does not include Zod schemas
82
- * since those cannot be reconstructed from JSON Schema. Use this for
83
- * introspection and metadata access only.
84
- */
85
- type DeserializedSchema = Readonly<{
86
- graphId: string;
87
- version: number;
88
- generatedAt: string;
89
- /** Get node definition by name */
90
- getNode: (name: string) => SerializedNodeDef | undefined;
91
- /** Get all node names */
92
- getNodeNames: () => readonly string[];
93
- /** Get edge definition by name */
94
- getEdge: (name: string) => SerializedEdgeDef | undefined;
95
- /** Get all edge names */
96
- getEdgeNames: () => readonly string[];
97
- /** Get meta-edge definition by name */
98
- getMetaEdge: (name: string) => SerializedMetaEdge | undefined;
99
- /** Get all meta-edge names */
100
- getMetaEdgeNames: () => readonly string[];
101
- /** Get all ontology relations */
102
- getRelations: () => readonly SerializedOntologyRelation[];
103
- /** Get precomputed closures */
104
- getClosures: () => SerializedClosures;
105
- /** Get graph defaults */
106
- getDefaults: () => SerializedSchema["defaults"];
107
- /** Get the raw serialized schema */
108
- getRaw: () => SerializedSchema;
109
- /** Build a KindRegistry from the closures */
110
- buildRegistry: () => KindRegistry;
111
- }>;
112
- /**
113
- * Deserializes a SerializedSchema into a DeserializedSchema.
114
- *
115
- * @param schema - The serialized schema to deserialize
116
- * @returns A deserialized schema with accessor methods
117
- */
118
- declare function deserializeSchema(schema: SerializedSchema): DeserializedSchema;
119
-
120
120
  /**
121
121
  * Contextual Validation Utilities
122
122
  *
@@ -1,13 +1,63 @@
1
- import { K as KindRegistry } from '../manager-CASfhmzV.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, c as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as assertSchemaCurrent, g as computeSchemaDiff, h as ensureSchema, i as getActiveSchema, j as getMigrationActions, k as getSchemaChanges, l as initializeSchema, m as isBackwardsCompatible, n as isSchemaInitialized, o as loadActiveSchemaWithBootstrap, p as loadAndMergeGraphExtensionDocument, q as migrateSchema, r as parseSerializedSchema, s as rollbackSchema } from '../manager-CASfhmzV.js';
3
- import { q as SerializedSchema, r as SchemaHash, s as SerializedNodeDef, t as SerializedEdgeDef, u as SerializedMetaEdge, v as SerializedOntologyRelation, w as SerializedClosures } from '../index-Bq7vSPHy.js';
4
- export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../index-Bq7vSPHy.js';
5
- import { G as GraphDef } from '../define-graph-DRo9xpYN.js';
1
+ import { K as KindRegistry } from '../manager-C7iC5bk_.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, c as SchemaDiff, S as SchemaManagerOptions, d as SchemaValidationResult, e as applyDeprecatedKinds, f as assertSchemaCurrent, g as computeSchemaDiff, h as ensureSchema, i as getActiveSchema, j as getCommittedSchemaVersion, k as getMigrationActions, l as getSchemaChanges, m as initializeSchema, n as isBackwardsCompatible, o as isSchemaInitialized, p as loadActiveSchemaWithBootstrap, q as loadAndMergeGraphExtensionDocument, r as migrateSchema, s as parseSerializedSchema, t as rollbackSchema } from '../manager-C7iC5bk_.js';
3
+ import { q as SerializedNodeDef, r as SerializedEdgeDef, s as SerializedMetaEdge, t as SerializedOntologyRelation, u as SerializedClosures, v as SerializedSchema, w as SchemaHash } from '../types-D-vOo_pM.js';
4
+ export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../types-D-vOo_pM.js';
5
+ import { G as GraphDef } from '../define-graph-BSviZubs.js';
6
6
  import { c as NullCheckOp, K as KindEntity } from '../extension-types-BLEVH4SG.js';
7
7
  import { ZodType, ZodError } from 'zod';
8
8
  import { V as ValidationIssue, a as ValidationError } from '../index-BD_3TCgh.js';
9
9
  import '../materialize-indexes-D4iei4Kp.js';
10
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
+
11
61
  /**
12
62
  * Schema serializer for homoiconic storage.
13
63
  *
@@ -67,56 +117,6 @@ declare function deserializeWherePredicate(serialized: string): (builder: Predic
67
117
  */
68
118
  declare function computeSchemaHash(schema: SerializedSchema): Promise<SchemaHash>;
69
119
 
70
- /**
71
- * Schema deserializer for loading stored schemas.
72
- *
73
- * Reconstructs runtime objects from SerializedSchema.
74
- * Note: Zod schemas cannot be fully reconstructed from JSON Schema,
75
- * so this provides access to the serialized data for introspection.
76
- */
77
-
78
- /**
79
- * A deserialized schema provides read-only access to schema metadata.
80
- *
81
- * Note: Unlike the original GraphDef, this does not include Zod schemas
82
- * since those cannot be reconstructed from JSON Schema. Use this for
83
- * introspection and metadata access only.
84
- */
85
- type DeserializedSchema = Readonly<{
86
- graphId: string;
87
- version: number;
88
- generatedAt: string;
89
- /** Get node definition by name */
90
- getNode: (name: string) => SerializedNodeDef | undefined;
91
- /** Get all node names */
92
- getNodeNames: () => readonly string[];
93
- /** Get edge definition by name */
94
- getEdge: (name: string) => SerializedEdgeDef | undefined;
95
- /** Get all edge names */
96
- getEdgeNames: () => readonly string[];
97
- /** Get meta-edge definition by name */
98
- getMetaEdge: (name: string) => SerializedMetaEdge | undefined;
99
- /** Get all meta-edge names */
100
- getMetaEdgeNames: () => readonly string[];
101
- /** Get all ontology relations */
102
- getRelations: () => readonly SerializedOntologyRelation[];
103
- /** Get precomputed closures */
104
- getClosures: () => SerializedClosures;
105
- /** Get graph defaults */
106
- getDefaults: () => SerializedSchema["defaults"];
107
- /** Get the raw serialized schema */
108
- getRaw: () => SerializedSchema;
109
- /** Build a KindRegistry from the closures */
110
- buildRegistry: () => KindRegistry;
111
- }>;
112
- /**
113
- * Deserializes a SerializedSchema into a DeserializedSchema.
114
- *
115
- * @param schema - The serialized schema to deserialize
116
- * @returns A deserialized schema with accessor methods
117
- */
118
- declare function deserializeSchema(schema: SerializedSchema): DeserializedSchema;
119
-
120
120
  /**
121
121
  * Contextual Validation Utilities
122
122
  *
@@ -1,18 +1,16 @@
1
- import { KindRegistry, validateImpliesEndpointCompatibility } from '../chunk-SU7VQOJ3.js';
2
- export { applyDeprecatedKinds, assertSchemaCurrent, computeSchemaDiff, computeSchemaHash, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, migrateSchema, parseSerializedSchema, rollbackSchema, serializeSchema } from '../chunk-SU7VQOJ3.js';
1
+ export { deserializeSchema } from '../chunk-KOI7UEI5.js';
2
+ export { applyDeprecatedKinds, assertSchemaCurrent, computeSchemaDiff, computeSchemaHash, deserializeWherePredicate, ensureSchema, getActiveSchema, getCommittedSchemaVersion, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, migrateSchema, parseSerializedSchema, rollbackSchema, serializeSchema } from '../chunk-V3S74J44.js';
3
3
  import '../chunk-76HE7DJP.js';
4
4
  export { createValidationError, validateEdgeProps, validateNodeProps, validateProps, wrapZodError } from '../chunk-ZE6NVENI.js';
5
5
  import '../chunk-UR7W5YQK.js';
6
6
  import '../chunk-UUIBACKJ.js';
7
7
  import '../chunk-PH4IJ3V5.js';
8
- import '../chunk-I6FX7AAG.js';
9
- import '../chunk-VDYA2HMS.js';
8
+ import '../chunk-3SHAUJRB.js';
9
+ import '../chunk-VWEFXG73.js';
10
10
  import '../chunk-K34OPSJK.js';
11
11
  import '../chunk-2EBMPJBO.js';
12
- import '../chunk-G3CSQLLT.js';
13
- import '../chunk-DDCIXXOO.js';
14
- import '../chunk-Y7M44XEK.js';
15
- import '../chunk-6XDBRDZE.js';
12
+ import '../chunk-Y5UC3IXF.js';
13
+ import '../chunk-6N7QBIWN.js';
16
14
  import '../chunk-D7PG5D5K.js';
17
15
  import '../chunk-SNXVDZAJ.js';
18
16
  import '../chunk-QMQLUA66.js';
@@ -24,83 +22,5 @@ import '../chunk-ITE4IXAK.js';
24
22
  import '../chunk-XZA3Y4YH.js';
25
23
  import '../chunk-DPNA466P.js';
26
24
  import '../chunk-G6Q5UM7U.js';
27
-
28
- // src/schema/deserializer.ts
29
- function deserializeSchema(schema) {
30
- const nodeNames = Object.keys(schema.nodes);
31
- const edgeNames = Object.keys(schema.edges);
32
- const metaEdgeNames = Object.keys(schema.ontology.metaEdges);
33
- return {
34
- graphId: schema.graphId,
35
- version: schema.version,
36
- generatedAt: schema.generatedAt,
37
- getNode: (name) => schema.nodes[name],
38
- getNodeNames: () => nodeNames,
39
- getEdge: (name) => schema.edges[name],
40
- getEdgeNames: () => edgeNames,
41
- getMetaEdge: (name) => schema.ontology.metaEdges[name],
42
- getMetaEdgeNames: () => metaEdgeNames,
43
- getRelations: () => schema.ontology.relations,
44
- getClosures: () => schema.ontology.closures,
45
- getDefaults: () => schema.defaults,
46
- getRaw: () => schema,
47
- buildRegistry: () => buildRegistryFromClosures(schema)
48
- };
49
- }
50
- function buildRegistryFromClosures(schema) {
51
- const { closures } = schema.ontology;
52
- const subClassAncestors = recordToMap(closures.subClassAncestors);
53
- const subClassDescendants = recordToMap(closures.subClassDescendants);
54
- const broaderClosure = recordToMap(closures.broaderClosure);
55
- const narrowerClosure = recordToMap(closures.narrowerClosure);
56
- const equivalenceSets = recordToMap(closures.equivalenceSets);
57
- const partOfClosure = recordToMap(closures.partOfClosure);
58
- const hasPartClosure = recordToMap(closures.hasPartClosure);
59
- const iriToKind = simpleRecordToMap(closures.iriToKind);
60
- const disjointPairs = new Set(closures.disjointPairs);
61
- const edgeInverses = simpleRecordToMap(closures.edgeInverses);
62
- const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);
63
- const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
64
- const nodeKinds = /* @__PURE__ */ new Map();
65
- const edgeKinds = /* @__PURE__ */ new Map();
66
- const registry = new KindRegistry(nodeKinds, edgeKinds, {
67
- subClassAncestors,
68
- subClassDescendants,
69
- broaderClosure,
70
- narrowerClosure,
71
- equivalenceSets,
72
- iriToKind,
73
- disjointPairs,
74
- partOfClosure,
75
- hasPartClosure,
76
- edgeInverses,
77
- edgeImplicationsClosure,
78
- edgeImplyingClosure
79
- });
80
- validateImpliesEndpointCompatibility(
81
- buildEdgeEndpointKinds(schema.edges),
82
- registry
83
- );
84
- return registry;
85
- }
86
- function buildEdgeEndpointKinds(edges) {
87
- const result = /* @__PURE__ */ new Map();
88
- for (const [kind, def] of Object.entries(edges)) {
89
- result.set(kind, { from: def.fromKinds, to: def.toKinds });
90
- }
91
- return result;
92
- }
93
- function recordToMap(record) {
94
- const result = /* @__PURE__ */ new Map();
95
- for (const [key, values] of Object.entries(record)) {
96
- result.set(key, new Set(values));
97
- }
98
- return result;
99
- }
100
- function simpleRecordToMap(record) {
101
- return new Map(Object.entries(record));
102
- }
103
-
104
- export { deserializeSchema };
105
25
  //# sourceMappingURL=index.js.map
106
26
  //# sourceMappingURL=index.js.map