@nicia-ai/typegraph 0.38.0 → 0.40.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 (254) 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 +25 -27
  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 +12 -14
  13. package/dist/backend/postgres/pglite-store.cjs +26 -27
  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 +22 -23
  18. package/dist/backend/postgres/pglite-store.js.map +1 -1
  19. package/dist/backend/postgres/pglite.cjs +14 -16
  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 +13 -15
  23. package/dist/backend/sqlite/index.cjs +26 -28
  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 +10 -12
  27. package/dist/backend/sqlite/libsql.cjs +16 -18
  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 +15 -17
  32. package/dist/backend/sqlite/libsql.js.map +1 -1
  33. package/dist/backend/sqlite/local-store.cjs +27 -28
  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 +23 -24
  38. package/dist/backend/sqlite/local-store.js.map +1 -1
  39. package/dist/backend/sqlite/local.cjs +15 -17
  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 +13 -15
  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-NU23DUSJ.cjs → chunk-2X73QTIC.cjs} +12 -13
  48. package/dist/chunk-2X73QTIC.cjs.map +1 -0
  49. package/dist/{chunk-A2FGSWMQ.js → chunk-3BL3JFHL.js} +202 -52
  50. package/dist/chunk-3BL3JFHL.js.map +1 -0
  51. package/dist/chunk-3SHAUJRB.js +79 -0
  52. package/dist/chunk-3SHAUJRB.js.map +1 -0
  53. package/dist/{chunk-UPXDVI3T.js → chunk-53BSOG3O.js} +8 -7
  54. package/dist/chunk-53BSOG3O.js.map +1 -0
  55. package/dist/chunk-5J4VNCUD.js +856 -0
  56. package/dist/chunk-5J4VNCUD.js.map +1 -0
  57. package/dist/chunk-5YBDB7UG.cjs +12 -0
  58. package/dist/{chunk-FMNUSGZ4.cjs.map → chunk-5YBDB7UG.cjs.map} +1 -1
  59. package/dist/{chunk-6XDBRDZE.js → chunk-6N7QBIWN.js} +7 -3
  60. package/dist/chunk-6N7QBIWN.js.map +1 -0
  61. package/dist/{chunk-EZH7FNUS.js → chunk-6QP4QXBR.js} +3 -3
  62. package/dist/{chunk-EZH7FNUS.js.map → chunk-6QP4QXBR.js.map} +1 -1
  63. package/dist/{chunk-E6TXEISH.cjs → chunk-7UTUKH4E.cjs} +4 -4
  64. package/dist/{chunk-E6TXEISH.cjs.map → chunk-7UTUKH4E.cjs.map} +1 -1
  65. package/dist/chunk-7WLEQIHA.cjs +605 -0
  66. package/dist/chunk-7WLEQIHA.cjs.map +1 -0
  67. package/dist/{chunk-BQITNFQJ.js → chunk-AQVDAKXH.js} +3 -3
  68. package/dist/{chunk-BQITNFQJ.js.map → chunk-AQVDAKXH.js.map} +1 -1
  69. package/dist/{chunk-X6CNEA32.js → chunk-BUZWMDNL.js} +5 -5
  70. package/dist/{chunk-X6CNEA32.js.map → chunk-BUZWMDNL.js.map} +1 -1
  71. package/dist/{chunk-7M3NACL3.cjs → chunk-CKFBZ4LV.cjs} +4 -4
  72. package/dist/{chunk-7M3NACL3.cjs.map → chunk-CKFBZ4LV.cjs.map} +1 -1
  73. package/dist/{chunk-VBH7ZXSZ.js → chunk-CU3LPYNB.js} +5 -5
  74. package/dist/{chunk-VBH7ZXSZ.js.map → chunk-CU3LPYNB.js.map} +1 -1
  75. package/dist/{chunk-YJDSPA5E.js → chunk-EFZ4S22A.js} +11 -10
  76. package/dist/chunk-EFZ4S22A.js.map +1 -0
  77. package/dist/chunk-ELA3V6UN.js +601 -0
  78. package/dist/chunk-ELA3V6UN.js.map +1 -0
  79. package/dist/{chunk-2SL7OGPR.cjs → chunk-H6I36MGT.cjs} +1037 -887
  80. package/dist/chunk-H6I36MGT.cjs.map +1 -0
  81. package/dist/chunk-HAQVISUF.cjs +1098 -0
  82. package/dist/chunk-HAQVISUF.cjs.map +1 -0
  83. package/dist/{chunk-O5H62ZWJ.cjs → chunk-HP6LWBLB.cjs} +14 -2
  84. package/dist/chunk-HP6LWBLB.cjs.map +1 -0
  85. package/dist/{chunk-BKAKAVRW.cjs → chunk-HQRZEYYB.cjs} +44 -44
  86. package/dist/{chunk-BKAKAVRW.cjs.map → chunk-HQRZEYYB.cjs.map} +1 -1
  87. package/dist/{chunk-XD6X7O5R.js → chunk-I5CRUPKO.js} +9 -10
  88. package/dist/{chunk-XD6X7O5R.js.map → chunk-I5CRUPKO.js.map} +1 -1
  89. package/dist/{chunk-RQPRCEIO.js → chunk-JHK6NPFV.js} +218 -306
  90. package/dist/chunk-JHK6NPFV.js.map +1 -0
  91. package/dist/chunk-JZYMOHHM.cjs +226 -0
  92. package/dist/chunk-JZYMOHHM.cjs.map +1 -0
  93. package/dist/{chunk-CQC6VBAF.cjs → chunk-K4FB2RMO.cjs} +10 -10
  94. package/dist/{chunk-CQC6VBAF.cjs.map → chunk-K4FB2RMO.cjs.map} +1 -1
  95. package/dist/{chunk-ERZ4QPQX.js → chunk-K6CD6W5J.js} +5 -5
  96. package/dist/{chunk-ERZ4QPQX.js.map → chunk-K6CD6W5J.js.map} +1 -1
  97. package/dist/{chunk-LZ3TVJY4.cjs → chunk-KHNKYSGP.cjs} +34 -34
  98. package/dist/{chunk-LZ3TVJY4.cjs.map → chunk-KHNKYSGP.cjs.map} +1 -1
  99. package/dist/{chunk-CWX77JB4.cjs → chunk-KLR77R5A.cjs} +13 -13
  100. package/dist/{chunk-CWX77JB4.cjs.map → chunk-KLR77R5A.cjs.map} +1 -1
  101. package/dist/{chunk-AOL64O4Z.js → chunk-L3DDZUZP.js} +3 -3
  102. package/dist/{chunk-AOL64O4Z.js.map → chunk-L3DDZUZP.js.map} +1 -1
  103. package/dist/{chunk-PZHC5GCD.js → chunk-L5ET7FYQ.js} +3 -3
  104. package/dist/{chunk-PZHC5GCD.js.map → chunk-L5ET7FYQ.js.map} +1 -1
  105. package/dist/{chunk-B63IFHXR.cjs → chunk-LFFVD5ZR.cjs} +41 -41
  106. package/dist/{chunk-B63IFHXR.cjs.map → chunk-LFFVD5ZR.cjs.map} +1 -1
  107. package/dist/chunk-LL5D5T5W.cjs +157 -0
  108. package/dist/chunk-LL5D5T5W.cjs.map +1 -0
  109. package/dist/{chunk-GUUWKPTK.cjs → chunk-LLE25NRD.cjs} +7 -7
  110. package/dist/{chunk-GUUWKPTK.cjs.map → chunk-LLE25NRD.cjs.map} +1 -1
  111. package/dist/chunk-LLHMAHG4.cjs +886 -0
  112. package/dist/chunk-LLHMAHG4.cjs.map +1 -0
  113. package/dist/{chunk-ZHX4KEM7.cjs → chunk-M2RPZS7J.cjs} +10 -10
  114. package/dist/{chunk-ZHX4KEM7.cjs.map → chunk-M2RPZS7J.cjs.map} +1 -1
  115. package/dist/chunk-MNURF4RF.cjs +85 -0
  116. package/dist/chunk-MNURF4RF.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-7VLCN3JB.cjs → chunk-QXKVUJLI.cjs} +113 -112
  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-TE5ZA4VX.js → chunk-QZYGZVUI.js} +45 -41
  124. package/dist/chunk-QZYGZVUI.js.map +1 -0
  125. package/dist/{chunk-YLINFV7Z.cjs → chunk-SAMJLDGG.cjs} +114 -110
  126. package/dist/chunk-SAMJLDGG.cjs.map +1 -0
  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-NWYCOFEZ.cjs → chunk-UCHW2MGP.cjs} +332 -433
  130. package/dist/chunk-UCHW2MGP.cjs.map +1 -0
  131. package/dist/{chunk-XFY73JWD.cjs → chunk-UDS5DZNY.cjs} +498 -1098
  132. package/dist/chunk-UDS5DZNY.cjs.map +1 -0
  133. package/dist/{chunk-KFLXWVUJ.js → chunk-UUIBACKJ.js} +14 -3
  134. package/dist/chunk-UUIBACKJ.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-G32AO634.js → chunk-W66YCXWT.js} +464 -1048
  138. package/dist/chunk-W66YCXWT.js.map +1 -0
  139. package/dist/{chunk-E6YZRKMM.js → chunk-XMEYZYGE.js} +6 -6
  140. package/dist/{chunk-E6YZRKMM.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-KCLZHYPU.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-6G5CQ6JX.js → chunk-ZE7E46IZ.js} +5 -5
  152. package/dist/{chunk-6G5CQ6JX.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-Dx3Z0_WC.d.ts → ddl-BLEzHw6j.d.ts} +3 -3
  160. package/dist/{ddl-J6sDyABg.d.cts → ddl-KnCdF_le.d.cts} +3 -3
  161. package/dist/{define-graph-CzEvA_8F.d.cts → define-graph-Cv3CFwKm.d.cts} +1 -1
  162. package/dist/{define-graph-DRo9xpYN.d.ts → define-graph-DQnj3fNH.d.ts} +1 -1
  163. package/dist/graph-merge/index.cjs +40 -43
  164. package/dist/graph-merge/index.cjs.map +1 -1
  165. package/dist/graph-merge/index.d.cts +15 -9
  166. package/dist/graph-merge/index.d.ts +15 -9
  167. package/dist/graph-merge/index.js +19 -22
  168. package/dist/graph-merge/index.js.map +1 -1
  169. package/dist/index.cjs +143 -119
  170. package/dist/index.d.cts +12 -10
  171. package/dist/index.d.ts +12 -10
  172. package/dist/index.js +23 -23
  173. package/dist/indexes/index.cjs +12 -14
  174. package/dist/indexes/index.d.cts +5 -5
  175. package/dist/indexes/index.d.ts +5 -5
  176. package/dist/indexes/index.js +5 -7
  177. package/dist/interchange/index.cjs +29 -30
  178. package/dist/interchange/index.cjs.map +1 -1
  179. package/dist/interchange/index.d.cts +6 -5
  180. package/dist/interchange/index.d.ts +6 -5
  181. package/dist/interchange/index.js +10 -11
  182. package/dist/interchange/index.js.map +1 -1
  183. package/dist/{manager-CASfhmzV.d.ts → manager-DjE6Mhag.d.ts} +2 -2
  184. package/dist/{manager-nCEJiYBb.d.cts → manager-mqee5MVB.d.cts} +2 -2
  185. package/dist/{postgres-DMgIKQU-.d.cts → postgres-Bm4DyFQU.d.cts} +100 -49
  186. package/dist/{postgres-Cl1ZAN1G.d.ts → postgres-DtaVALOZ.d.ts} +100 -49
  187. package/dist/profiler/index.d.cts +8 -7
  188. package/dist/profiler/index.d.ts +8 -7
  189. package/dist/provenance/index.cjs +20 -20
  190. package/dist/provenance/index.d.cts +6 -5
  191. package/dist/provenance/index.d.ts +6 -5
  192. package/dist/provenance/index.js +7 -7
  193. package/dist/schema/index.cjs +26 -28
  194. package/dist/schema/index.cjs.map +1 -1
  195. package/dist/schema/index.d.cts +5 -5
  196. package/dist/schema/index.d.ts +5 -5
  197. package/dist/schema/index.js +7 -9
  198. package/dist/schema/index.js.map +1 -1
  199. package/dist/{temporal-DqtOEo_B.d.ts → searchable-BxlJQVFw.d.cts} +3 -58
  200. package/dist/{temporal-BC_NQV5Y.d.cts → searchable-ChJ29MCd.d.ts} +3 -58
  201. package/dist/{sqlite-BDkW39aa.d.cts → sqlite-DT6tTHOG.d.cts} +124 -97
  202. package/dist/{sqlite-CYfhvESj.d.ts → sqlite-m9Izphk_.d.ts} +124 -97
  203. package/dist/{store-view-BoHqdHjB.d.cts → store-view-C-buB8Q8.d.cts} +46 -31
  204. package/dist/{store-view-Ctq-3OHy.d.ts → store-view-CagdeyNn.d.ts} +46 -31
  205. package/dist/temporal-CyFsSPe8.d.ts +73 -0
  206. package/dist/temporal-Dn_JADWY.d.cts +73 -0
  207. package/dist/{types-CUevi_D1.d.ts → types-CYdXzZef.d.ts} +1 -1
  208. package/dist/{types-COq3-vMC.d.cts → types-CqSfMRW3.d.cts} +1 -1
  209. package/dist/{where-C92TXCzT.d.cts → where-C3-HRgUq.d.cts} +1 -1
  210. package/dist/{where-BdE_cYtx.d.ts → where-sQL4u5h-.d.ts} +1 -1
  211. package/package.json +1 -1
  212. package/dist/chunk-2SL7OGPR.cjs.map +0 -1
  213. package/dist/chunk-6XDBRDZE.js.map +0 -1
  214. package/dist/chunk-7VLCN3JB.cjs.map +0 -1
  215. package/dist/chunk-A2FGSWMQ.js.map +0 -1
  216. package/dist/chunk-DDCIXXOO.js +0 -9
  217. package/dist/chunk-DDCIXXOO.js.map +0 -1
  218. package/dist/chunk-DDCYVIVV.cjs +0 -44
  219. package/dist/chunk-DDCYVIVV.cjs.map +0 -1
  220. package/dist/chunk-EOJFGECD.cjs +0 -284
  221. package/dist/chunk-EOJFGECD.cjs.map +0 -1
  222. package/dist/chunk-FMNUSGZ4.cjs +0 -12
  223. package/dist/chunk-G32AO634.js.map +0 -1
  224. package/dist/chunk-G3CSQLLT.js.map +0 -1
  225. package/dist/chunk-I6FX7AAG.js +0 -39
  226. package/dist/chunk-I6FX7AAG.js.map +0 -1
  227. package/dist/chunk-J6IJARLG.js +0 -94
  228. package/dist/chunk-J6IJARLG.js.map +0 -1
  229. package/dist/chunk-KCLZHYPU.cjs.map +0 -1
  230. package/dist/chunk-KFLXWVUJ.js.map +0 -1
  231. package/dist/chunk-MTNEGGM2.js +0 -273
  232. package/dist/chunk-MTNEGGM2.js.map +0 -1
  233. package/dist/chunk-NU23DUSJ.cjs.map +0 -1
  234. package/dist/chunk-NWYCOFEZ.cjs.map +0 -1
  235. package/dist/chunk-O5H62ZWJ.cjs.map +0 -1
  236. package/dist/chunk-RQPRCEIO.js.map +0 -1
  237. package/dist/chunk-SVUKGWSN.cjs +0 -102
  238. package/dist/chunk-SVUKGWSN.cjs.map +0 -1
  239. package/dist/chunk-TE5ZA4VX.js.map +0 -1
  240. package/dist/chunk-UH2USOMG.cjs +0 -627
  241. package/dist/chunk-UH2USOMG.cjs.map +0 -1
  242. package/dist/chunk-UPXDVI3T.js.map +0 -1
  243. package/dist/chunk-X6RDQ5NB.cjs.map +0 -1
  244. package/dist/chunk-XFY73JWD.cjs.map +0 -1
  245. package/dist/chunk-Y7M44XEK.js +0 -462
  246. package/dist/chunk-Y7M44XEK.js.map +0 -1
  247. package/dist/chunk-YJDSPA5E.js.map +0 -1
  248. package/dist/chunk-YLINFV7Z.cjs.map +0 -1
  249. package/dist/chunk-Z5QHVL5U.cjs +0 -12
  250. package/dist/chunk-Z5QHVL5U.cjs.map +0 -1
  251. package/dist/chunk-ZKZAIX42.cjs +0 -479
  252. package/dist/chunk-ZKZAIX42.cjs.map +0 -1
  253. package/dist/{index-CrFL_ENI.d.cts → types-C5pZeKTl.d.cts} +1 -1
  254. package/dist/{index-Bq7vSPHy.d.ts → types-D8szWDUo.d.ts} +1 -1
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkTRF4EBJT_cjs = require('../chunk-TRF4EBJT.cjs');
4
- var chunkNWYCOFEZ_cjs = require('../chunk-NWYCOFEZ.cjs');
4
+ var chunkUCHW2MGP_cjs = require('../chunk-UCHW2MGP.cjs');
5
5
  require('../chunk-ZDH3DX3C.cjs');
6
- var chunkGNPGGLAE_cjs = require('../chunk-GNPGGLAE.cjs');
7
- require('../chunk-SVUKGWSN.cjs');
8
- require('../chunk-O5H62ZWJ.cjs');
9
- var chunkDDCYVIVV_cjs = require('../chunk-DDCYVIVV.cjs');
6
+ require('../chunk-JZYMOHHM.cjs');
7
+ var chunkQYDUCWD2_cjs = require('../chunk-QYDUCWD2.cjs');
8
+ require('../chunk-LL5D5T5W.cjs');
9
+ require('../chunk-HP6LWBLB.cjs');
10
+ var chunkMNURF4RF_cjs = require('../chunk-MNURF4RF.cjs');
10
11
  require('../chunk-NAUA4PW5.cjs');
11
- require('../chunk-Z5QHVL5U.cjs');
12
- require('../chunk-X6RDQ5NB.cjs');
12
+ require('../chunk-YX3H63VV.cjs');
13
13
  require('../chunk-SJDMVITW.cjs');
14
14
  require('../chunk-764JHTLT.cjs');
15
15
  require('../chunk-HAHNRASW.cjs');
@@ -51,7 +51,7 @@ function sortedReferences(keys) {
51
51
  return [...keys].toSorted((left, right) => chunkTRF4EBJT_cjs.compareStrings(left, right)).map((key) => keyToRef(key));
52
52
  }
53
53
  function parseNodeProps(row) {
54
- const parsed = chunkGNPGGLAE_cjs.rowPropsToObject(row.props);
54
+ const parsed = chunkQYDUCWD2_cjs.rowPropsToObject(row.props);
55
55
  if (!chunkDI74SMXS_cjs.isPlainObject(parsed)) {
56
56
  throw new chunkSAFZ6JTI_cjs.ConfigurationError(
57
57
  `Node ${row.kind}/${row.id} props are not an object.`,
@@ -299,7 +299,7 @@ function buildSupportEdges(config, rows) {
299
299
  };
300
300
  }
301
301
  async function loadSupportGraph(backend, graphId, config) {
302
- const asOf = chunkDDCYVIVV_cjs.nowIso();
302
+ const asOf = chunkMNURF4RF_cjs.nowIso();
303
303
  const roles = await readRoles(backend, graphId, config, asOf);
304
304
  const supportEdges = buildSupportEdges(config, roles);
305
305
  const sourceRowsByKind = await Promise.all(
@@ -430,14 +430,14 @@ async function synchronizeFactCurrency(backend, store, runHooks, snapshot, affec
430
430
  snapshot,
431
431
  affected,
432
432
  (key) => !snapshot.supportedFactKeys.has(key),
433
- chunkGNPGGLAE_cjs.isLiveNodeRow,
433
+ chunkQYDUCWD2_cjs.isLiveNodeRow,
434
434
  (row) => closeFactCurrency(backend, store, runHooks, row, lock)
435
435
  );
436
436
  await forEachAffectedFact(
437
437
  snapshot,
438
438
  affected,
439
439
  (key) => snapshot.supportedFactKeys.has(key),
440
- chunkGNPGGLAE_cjs.isTombstonedNodeRow,
440
+ chunkQYDUCWD2_cjs.isTombstonedNodeRow,
441
441
  (row) => reopenFactCurrency(backend, store, runHooks, row, lock)
442
442
  );
443
443
  }
@@ -452,8 +452,8 @@ function getFactRegistration(store, row) {
452
452
  async function closeFactCurrency(backend, store, runHooks, row, lock) {
453
453
  await runHooks("delete", row.kind, row.id, async () => {
454
454
  const registration = getFactRegistration(store, row);
455
- await chunkNWYCOFEZ_cjs.applyNodeSoftDelete(
456
- chunkNWYCOFEZ_cjs.createNodeWriteContext(store.graphId, store.registry, lock),
455
+ await chunkUCHW2MGP_cjs.applyNodeSoftDelete(
456
+ chunkUCHW2MGP_cjs.createNodeWriteContext(store.graphId, store.registry, lock),
457
457
  {
458
458
  existing: row,
459
459
  schema: registration.type.schema,
@@ -468,8 +468,8 @@ async function closeFactCurrency(backend, store, runHooks, row, lock) {
468
468
  async function reopenFactCurrency(backend, store, runHooks, row, lock) {
469
469
  await runHooks("update", row.kind, row.id, async () => {
470
470
  const registration = getFactRegistration(store, row);
471
- await chunkNWYCOFEZ_cjs.applyNodeResurrect(
472
- chunkNWYCOFEZ_cjs.createNodeWriteContext(store.graphId, store.registry, lock),
471
+ await chunkUCHW2MGP_cjs.applyNodeResurrect(
472
+ chunkUCHW2MGP_cjs.createNodeWriteContext(store.graphId, store.registry, lock),
473
473
  {
474
474
  existing: row,
475
475
  schema: registration.type.schema,
@@ -501,8 +501,8 @@ async function runTransition(store, config, sources, retracted) {
501
501
  );
502
502
  }
503
503
  return store.transaction(async (tx) => {
504
- const backend = chunkNWYCOFEZ_cjs.transactionBackend(tx);
505
- const lock = await chunkNWYCOFEZ_cjs.lockRecordedGraphWrite(backend, store.graphId);
504
+ const backend = chunkUCHW2MGP_cjs.transactionBackend(tx);
505
+ const lock = await chunkUCHW2MGP_cjs.lockRecordedGraphWrite(backend, store.graphId);
506
506
  const rows = await Promise.all(
507
507
  uniqueSources.map(
508
508
  (source) => backend.getNode(store.graphId, source.kind, source.id)
@@ -538,7 +538,7 @@ async function runTransition(store, config, sources, retracted) {
538
538
  await synchronizeFactCurrency(
539
539
  backend,
540
540
  store,
541
- chunkNWYCOFEZ_cjs.transactionNodeOperationHookRunner(tx),
541
+ chunkUCHW2MGP_cjs.transactionNodeOperationHookRunner(tx),
542
542
  after,
543
543
  affected,
544
544
  lock
@@ -564,8 +564,8 @@ function createRetractionCapability(store, config) {
564
564
  unRetractMany: (sources) => transition(sources, false),
565
565
  async holding() {
566
566
  return store.transaction(async (tx) => {
567
- const backend = chunkNWYCOFEZ_cjs.transactionBackend(tx);
568
- await chunkNWYCOFEZ_cjs.lockRecordedGraphWrite(backend, store.graphId);
567
+ const backend = chunkUCHW2MGP_cjs.transactionBackend(tx);
568
+ await chunkUCHW2MGP_cjs.lockRecordedGraphWrite(backend, store.graphId);
569
569
  const snapshot = await computeSupport(
570
570
  backend,
571
571
  store.graphId,
@@ -1,10 +1,11 @@
1
- import { G as GraphDef } from '../define-graph-CzEvA_8F.cjs';
2
- import { b as HistoryStore } from '../store-view-BoHqdHjB.cjs';
1
+ import { G as GraphDef } from '../define-graph-Cv3CFwKm.cjs';
2
+ import { b as HistoryStore } from '../store-view-C-buB8Q8.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-C5pZeKTl.cjs';
6
+ import '../temporal-Dn_JADWY.cjs';
7
+ import '../manager-mqee5MVB.cjs';
8
+ import '../searchable-BxlJQVFw.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-Ctq-3OHy.js';
1
+ import { G as GraphDef } from '../define-graph-DQnj3fNH.js';
2
+ import { b as HistoryStore } from '../store-view-CagdeyNn.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-D8szWDUo.js';
6
+ import '../temporal-CyFsSPe8.js';
7
+ import '../manager-DjE6Mhag.js';
8
+ import '../searchable-ChJ29MCd.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-RQPRCEIO.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';
6
- import '../chunk-KFLXWVUJ.js';
7
- import { nowIso } from '../chunk-I6FX7AAG.js';
4
+ import '../chunk-YYLMXERH.js';
5
+ import { rowPropsToObject, isLiveNodeRow, isTombstonedNodeRow } from '../chunk-L5ET7FYQ.js';
6
+ import '../chunk-QOHTVDHU.js';
7
+ import '../chunk-UUIBACKJ.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,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkCQC6VBAF_cjs = require('../chunk-CQC6VBAF.cjs');
3
+ var chunkK4FB2RMO_cjs = require('../chunk-K4FB2RMO.cjs');
4
4
  require('../chunk-RW24SAHI.cjs');
5
5
  var chunkX4PVHAZ6_cjs = require('../chunk-X4PVHAZ6.cjs');
6
6
  require('../chunk-ACSVZPK7.cjs');
7
- require('../chunk-O5H62ZWJ.cjs');
7
+ require('../chunk-HP6LWBLB.cjs');
8
8
  require('../chunk-NT6ILURI.cjs');
9
- require('../chunk-DDCYVIVV.cjs');
10
- require('../chunk-7M3NACL3.cjs');
9
+ require('../chunk-MNURF4RF.cjs');
10
+ require('../chunk-CKFBZ4LV.cjs');
11
11
  require('../chunk-ZY4GXIVN.cjs');
12
12
  require('../chunk-NAUA4PW5.cjs');
13
- require('../chunk-UH2USOMG.cjs');
14
- require('../chunk-Z5QHVL5U.cjs');
15
- require('../chunk-ZKZAIX42.cjs');
16
- require('../chunk-X6RDQ5NB.cjs');
13
+ require('../chunk-HAQVISUF.cjs');
14
+ require('../chunk-YX3H63VV.cjs');
17
15
  require('../chunk-FJMPR3OH.cjs');
18
16
  require('../chunk-SJDMVITW.cjs');
19
17
  require('../chunk-764JHTLT.cjs');
@@ -64,7 +62,7 @@ function buildRegistryFromClosures(schema) {
64
62
  const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
65
63
  const nodeKinds = /* @__PURE__ */ new Map();
66
64
  const edgeKinds = /* @__PURE__ */ new Map();
67
- const registry = new chunkCQC6VBAF_cjs.KindRegistry(nodeKinds, edgeKinds, {
65
+ const registry = new chunkK4FB2RMO_cjs.KindRegistry(nodeKinds, edgeKinds, {
68
66
  subClassAncestors,
69
67
  subClassDescendants,
70
68
  broaderClosure,
@@ -78,7 +76,7 @@ function buildRegistryFromClosures(schema) {
78
76
  edgeImplicationsClosure,
79
77
  edgeImplyingClosure
80
78
  });
81
- chunkCQC6VBAF_cjs.validateImpliesEndpointCompatibility(
79
+ chunkK4FB2RMO_cjs.validateImpliesEndpointCompatibility(
82
80
  buildEdgeEndpointKinds(schema.edges),
83
81
  registry
84
82
  );
@@ -104,75 +102,75 @@ function simpleRecordToMap(record) {
104
102
 
105
103
  Object.defineProperty(exports, "applyDeprecatedKinds", {
106
104
  enumerable: true,
107
- get: function () { return chunkCQC6VBAF_cjs.applyDeprecatedKinds; }
105
+ get: function () { return chunkK4FB2RMO_cjs.applyDeprecatedKinds; }
108
106
  });
109
107
  Object.defineProperty(exports, "assertSchemaCurrent", {
110
108
  enumerable: true,
111
- get: function () { return chunkCQC6VBAF_cjs.assertSchemaCurrent; }
109
+ get: function () { return chunkK4FB2RMO_cjs.assertSchemaCurrent; }
112
110
  });
113
111
  Object.defineProperty(exports, "computeSchemaDiff", {
114
112
  enumerable: true,
115
- get: function () { return chunkCQC6VBAF_cjs.computeSchemaDiff; }
113
+ get: function () { return chunkK4FB2RMO_cjs.computeSchemaDiff; }
116
114
  });
117
115
  Object.defineProperty(exports, "computeSchemaHash", {
118
116
  enumerable: true,
119
- get: function () { return chunkCQC6VBAF_cjs.computeSchemaHash; }
117
+ get: function () { return chunkK4FB2RMO_cjs.computeSchemaHash; }
120
118
  });
121
119
  Object.defineProperty(exports, "deserializeWherePredicate", {
122
120
  enumerable: true,
123
- get: function () { return chunkCQC6VBAF_cjs.deserializeWherePredicate; }
121
+ get: function () { return chunkK4FB2RMO_cjs.deserializeWherePredicate; }
124
122
  });
125
123
  Object.defineProperty(exports, "ensureSchema", {
126
124
  enumerable: true,
127
- get: function () { return chunkCQC6VBAF_cjs.ensureSchema; }
125
+ get: function () { return chunkK4FB2RMO_cjs.ensureSchema; }
128
126
  });
129
127
  Object.defineProperty(exports, "getActiveSchema", {
130
128
  enumerable: true,
131
- get: function () { return chunkCQC6VBAF_cjs.getActiveSchema; }
129
+ get: function () { return chunkK4FB2RMO_cjs.getActiveSchema; }
132
130
  });
133
131
  Object.defineProperty(exports, "getMigrationActions", {
134
132
  enumerable: true,
135
- get: function () { return chunkCQC6VBAF_cjs.getMigrationActions; }
133
+ get: function () { return chunkK4FB2RMO_cjs.getMigrationActions; }
136
134
  });
137
135
  Object.defineProperty(exports, "getSchemaChanges", {
138
136
  enumerable: true,
139
- get: function () { return chunkCQC6VBAF_cjs.getSchemaChanges; }
137
+ get: function () { return chunkK4FB2RMO_cjs.getSchemaChanges; }
140
138
  });
141
139
  Object.defineProperty(exports, "initializeSchema", {
142
140
  enumerable: true,
143
- get: function () { return chunkCQC6VBAF_cjs.initializeSchema; }
141
+ get: function () { return chunkK4FB2RMO_cjs.initializeSchema; }
144
142
  });
145
143
  Object.defineProperty(exports, "isBackwardsCompatible", {
146
144
  enumerable: true,
147
- get: function () { return chunkCQC6VBAF_cjs.isBackwardsCompatible; }
145
+ get: function () { return chunkK4FB2RMO_cjs.isBackwardsCompatible; }
148
146
  });
149
147
  Object.defineProperty(exports, "isSchemaInitialized", {
150
148
  enumerable: true,
151
- get: function () { return chunkCQC6VBAF_cjs.isSchemaInitialized; }
149
+ get: function () { return chunkK4FB2RMO_cjs.isSchemaInitialized; }
152
150
  });
153
151
  Object.defineProperty(exports, "loadActiveSchemaWithBootstrap", {
154
152
  enumerable: true,
155
- get: function () { return chunkCQC6VBAF_cjs.loadActiveSchemaWithBootstrap; }
153
+ get: function () { return chunkK4FB2RMO_cjs.loadActiveSchemaWithBootstrap; }
156
154
  });
157
155
  Object.defineProperty(exports, "loadAndMergeGraphExtensionDocument", {
158
156
  enumerable: true,
159
- get: function () { return chunkCQC6VBAF_cjs.loadAndMergeGraphExtensionDocument; }
157
+ get: function () { return chunkK4FB2RMO_cjs.loadAndMergeGraphExtensionDocument; }
160
158
  });
161
159
  Object.defineProperty(exports, "migrateSchema", {
162
160
  enumerable: true,
163
- get: function () { return chunkCQC6VBAF_cjs.migrateSchema; }
161
+ get: function () { return chunkK4FB2RMO_cjs.migrateSchema; }
164
162
  });
165
163
  Object.defineProperty(exports, "parseSerializedSchema", {
166
164
  enumerable: true,
167
- get: function () { return chunkCQC6VBAF_cjs.parseSerializedSchema; }
165
+ get: function () { return chunkK4FB2RMO_cjs.parseSerializedSchema; }
168
166
  });
169
167
  Object.defineProperty(exports, "rollbackSchema", {
170
168
  enumerable: true,
171
- get: function () { return chunkCQC6VBAF_cjs.rollbackSchema; }
169
+ get: function () { return chunkK4FB2RMO_cjs.rollbackSchema; }
172
170
  });
173
171
  Object.defineProperty(exports, "serializeSchema", {
174
172
  enumerable: true,
175
- get: function () { return chunkCQC6VBAF_cjs.serializeSchema; }
173
+ get: function () { return chunkK4FB2RMO_cjs.serializeSchema; }
176
174
  });
177
175
  Object.defineProperty(exports, "createValidationError", {
178
176
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schema/deserializer.ts"],"names":["KindRegistry","validateImpliesEndpointCompatibility"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFO,SAAS,kBACd,MAAA,EACoB;AACpB,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,IAAA,CAAK,MAAA,CAAO,KAAK,CAAA;AAC1C,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,IAAA,CAAK,MAAA,CAAO,KAAK,CAAA;AAC1C,EAAA,MAAM,aAAA,GAAgB,MAAA,CAAO,IAAA,CAAK,MAAA,CAAO,SAAS,SAAS,CAAA;AAE3D,EAAA,OAAO;AAAA,IACL,SAAS,MAAA,CAAO,OAAA;AAAA,IAChB,SAAS,MAAA,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,GAAA,EAAyB;AAC5C,EAAA,KAAA,MAAW,CAAC,GAAA,EAAK,MAAM,KAAK,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,EAAG;AAClD,IAAA,MAAA,CAAO,GAAA,CAAI,GAAA,EAAK,IAAI,GAAA,CAAI,MAAM,CAAC,CAAA;AAAA,EACjC;AACA,EAAA,OAAO,MAAA;AACT;AAKA,SAAS,kBACP,MAAA,EAC6B;AAC7B,EAAA,OAAO,IAAI,GAAA,CAAI,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAC,CAAA;AACvC","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":["../../src/schema/deserializer.ts"],"names":["KindRegistry","validateImpliesEndpointCompatibility"],"mappings":";;;;;;;;;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AA,EACwC;AACxC,EAAA,MAAM,MAAA,uBAAa,GAAA,EAA+B;AAClD,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,GAAG,KAAK,MAAA,CAAO,OAAA,CAAQ,KAAK,CAAA,EAAG;AAC/C,IAAA,MAAA,CAAO,GAAA,CAAI,MAAM,EAAE,IAAA,EAAM,IAAI,SAAA,EAAW,EAAA,EAAI,GAAA,CAAI,OAAA,EAAS,CAAA;AAAA,EAC3D;AACA,EAAA,OAAO,MAAA;AACT;AAKA,SAAS,YACP,MAAA,EAC0C;AAC1C,EAAA,MAAM,MAAA,uBAAa,GAAA,EAAyB;AAC5C,EAAA,KAAA,MAAW,CAAC,GAAA,EAAK,MAAM,KAAK,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,EAAG;AAClD,IAAA,MAAA,CAAO,GAAA,CAAI,GAAA,EAAK,IAAI,GAAA,CAAI,MAAM,CAAC,CAAA;AAAA,EACjC;AACA,EAAA,OAAO,MAAA;AACT;AAKA,SAAS,kBACP,MAAA,EAC6B;AAC7B,EAAA,OAAO,IAAI,GAAA,CAAI,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAC,CAAA;AACvC","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,8 +1,8 @@
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-mqee5MVB.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-mqee5MVB.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 '../types-C5pZeKTl.cjs';
4
+ export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../types-C5pZeKTl.cjs';
5
+ import { G as GraphDef } from '../define-graph-Cv3CFwKm.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';
@@ -1,8 +1,8 @@
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-DjE6Mhag.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-DjE6Mhag.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 '../types-D8szWDUo.js';
4
+ export { x as JsonSchema, y as SerializedOntology, z as SerializedUniqueConstraint } from '../types-D8szWDUo.js';
5
+ import { G as GraphDef } from '../define-graph-DQnj3fNH.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';
@@ -1,18 +1,16 @@
1
- import { KindRegistry, validateImpliesEndpointCompatibility } from '../chunk-VBH7ZXSZ.js';
2
- export { applyDeprecatedKinds, assertSchemaCurrent, computeSchemaDiff, computeSchemaHash, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, migrateSchema, parseSerializedSchema, rollbackSchema, serializeSchema } from '../chunk-VBH7ZXSZ.js';
1
+ import { KindRegistry, validateImpliesEndpointCompatibility } from '../chunk-CU3LPYNB.js';
2
+ export { applyDeprecatedKinds, assertSchemaCurrent, computeSchemaDiff, computeSchemaHash, deserializeWherePredicate, ensureSchema, getActiveSchema, getMigrationActions, getSchemaChanges, initializeSchema, isBackwardsCompatible, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, migrateSchema, parseSerializedSchema, rollbackSchema, serializeSchema } from '../chunk-CU3LPYNB.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
- import '../chunk-KFLXWVUJ.js';
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';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schema/deserializer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFO,SAAS,kBACd,MAAA,EACoB;AACpB,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,IAAA,CAAK,MAAA,CAAO,KAAK,CAAA;AAC1C,EAAA,MAAM,SAAA,GAAY,MAAA,CAAO,IAAA,CAAK,MAAA,CAAO,KAAK,CAAA;AAC1C,EAAA,MAAM,aAAA,GAAgB,MAAA,CAAO,IAAA,CAAK,MAAA,CAAO,SAAS,SAAS,CAAA;AAE3D,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;AACT;AAKA,SAAS,YACP,MAAA,EAC0C;AAC1C,EAAA,MAAM,MAAA,uBAAa,GAAA,EAAyB;AAC5C,EAAA,KAAA,MAAW,CAAC,GAAA,EAAK,MAAM,KAAK,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,EAAG;AAClD,IAAA,MAAA,CAAO,GAAA,CAAI,GAAA,EAAK,IAAI,GAAA,CAAI,MAAM,CAAC,CAAA;AAAA,EACjC;AACA,EAAA,OAAO,MAAA;AACT;AAKA,SAAS,kBACP,MAAA,EAC6B;AAC7B,EAAA,OAAO,IAAI,GAAA,CAAI,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAC,CAAA;AACvC","file":"index.js","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":["../../src/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O,QAAA;AACT;AASA,SAAS,uBACP,KAAA,EACwC;AACxC,EAAA,MAAM,MAAA,uBAAa,GAAA,EAA+B;AAClD,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,GAAG,KAAK,MAAA,CAAO,OAAA,CAAQ,KAAK,CAAA,EAAG;AAC/C,IAAA,MAAA,CAAO,GAAA,CAAI,MAAM,EAAE,IAAA,EAAM,IAAI,SAAA,EAAW,EAAA,EAAI,GAAA,CAAI,OAAA,EAAS,CAAA;AAAA,EAC3D;AACA,EAAA,OAAO,MAAA;AACT;AAKA,SAAS,YACP,MAAA,EAC0C;AAC1C,EAAA,MAAM,MAAA,uBAAa,GAAA,EAAyB;AAC5C,EAAA,KAAA,MAAW,CAAC,GAAA,EAAK,MAAM,KAAK,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,EAAG;AAClD,IAAA,MAAA,CAAO,GAAA,CAAI,GAAA,EAAK,IAAI,GAAA,CAAI,MAAM,CAAC,CAAA;AAAA,EACjC;AACA,EAAA,OAAO,MAAA;AACT;AAKA,SAAS,kBACP,MAAA,EAC6B;AAC7B,EAAA,OAAO,IAAI,GAAA,CAAI,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAC,CAAA;AACvC","file":"index.js","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,7 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { p as VectorSlot } from './index-Bq7vSPHy.js';
3
- import { G as GraphDef } from './define-graph-DRo9xpYN.js';
4
- import { T as TemporalMode } from './extension-types-BLEVH4SG.js';
2
+ import { p as VectorSlot } from './types-C5pZeKTl.cjs';
3
+ import { G as GraphDef } from './define-graph-Cv3CFwKm.cjs';
5
4
 
6
5
  /**
7
6
  * Embedding type for vector search.
@@ -224,58 +223,4 @@ declare function searchable(options?: SearchableOptions): SearchableSchema;
224
223
  declare function isSearchableSchema(value: unknown): value is SearchableSchema;
225
224
  declare function getSearchableMetadata(schema: z.ZodType): SearchableMetadata | undefined;
226
225
 
227
- declare const RECORDED_INSTANT_BRAND: unique symbol;
228
- /**
229
- * A canonical UTC ISO-8601 recorded-time instant (`YYYY-MM-DDTHH:mm:ss.sssZ`),
230
- * nominally branded so it can only originate from a recorded-time source —
231
- * {@link Store.recordedNow} or an explicit {@link asRecordedInstant} — never an
232
- * ad-hoc wall-clock string.
233
- *
234
- * The recorded commit clock is a logical, monotonic per-graph instant that can
235
- * run briefly ahead of wall time under bursty same-millisecond writes, so a raw
236
- * `new Date().toISOString()` may sort *before* the most recent commits and
237
- * silently omit them. The brand turns that footgun into a compile error:
238
- * `store.asOfRecorded` accepts only a `RecordedInstant`, so a bare wall-clock
239
- * string no longer type-checks — callers reach for `await store.recordedNow()`
240
- * (the monotonic high-water mark) or {@link asRecordedInstant} instead.
241
- */
242
- type RecordedInstant = string & {
243
- readonly [RECORDED_INSTANT_BRAND]: "RecordedInstant";
244
- };
245
- /**
246
- * Brands a canonical UTC ISO-8601 string as a {@link RecordedInstant}.
247
- *
248
- * The escape hatch for an instant that round-trips through untyped storage:
249
- * captured from {@link Store.recordedNow}, persisted as a plain string, read
250
- * back, and replayed into `asOfRecorded`. Validates the canonical form eagerly —
251
- * the same check `asOfRecorded` applies — so a malformed value fails here, at the
252
- * brand site, rather than deeper in a read. Does *not* assert the instant is a
253
- * real captured commit; it only guarantees the value is well-formed enough to
254
- * compare correctly against the recorded relations.
255
- *
256
- * @throws {ValidationError} when `value` is not a canonical UTC ISO-8601 string.
257
- */
258
- declare function asRecordedInstant(value: string): RecordedInstant;
259
- /**
260
- * The single opaque temporal coordinate every pinned read is resolved
261
- * against. It carries the valid-time axis plus an optional recorded/system-time
262
- * axis, so every surface can inject one coordinate object instead of threading
263
- * each temporal dimension separately.
264
- */
265
- type ReadCoordinate = Readonly<{
266
- /**
267
- * The valid-time axis: a resolved temporal mode and (only for `"asOf"`) the
268
- * instant it is pinned to.
269
- */
270
- valid: Readonly<{
271
- mode: TemporalMode;
272
- /** Defined only when `mode` is `"asOf"`. */
273
- asOf?: string;
274
- }>;
275
- /** The recorded/system-time axis. Defined only for recorded-pinned views. */
276
- recorded?: Readonly<{
277
- asOf: RecordedInstant;
278
- }>;
279
- }>;
280
-
281
- export { DEFAULT_SEARCHABLE_LANGUAGE as D, type EmbeddingMetric as E, type RecordedInstant as R, type SearchableMetadata as S, type EmbeddingIndexType as a, type EmbeddingSchema as b, type EmbeddingValue as c, type SearchableOptions as d, type SearchableSchema as e, asRecordedInstant as f, embedding as g, getEmbeddingDimensions as h, getSearchableMetadata as i, isEmbeddingSchema as j, isSearchableSchema as k, type ReadCoordinate as l, resolveGraphVectorSlots as r, searchable as s };
226
+ export { DEFAULT_SEARCHABLE_LANGUAGE as D, type EmbeddingMetric as E, type SearchableMetadata as S, type EmbeddingIndexType as a, type EmbeddingSchema as b, type EmbeddingValue as c, type SearchableOptions as d, type SearchableSchema as e, embedding as f, getEmbeddingDimensions as g, getSearchableMetadata as h, isEmbeddingSchema as i, isSearchableSchema as j, resolveGraphVectorSlots as r, searchable as s };
@@ -1,7 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { p as VectorSlot } from './index-CrFL_ENI.cjs';
3
- import { G as GraphDef } from './define-graph-CzEvA_8F.cjs';
4
- import { T as TemporalMode } from './extension-types-BLEVH4SG.cjs';
2
+ import { p as VectorSlot } from './types-D8szWDUo.js';
3
+ import { G as GraphDef } from './define-graph-DQnj3fNH.js';
5
4
 
6
5
  /**
7
6
  * Embedding type for vector search.
@@ -224,58 +223,4 @@ declare function searchable(options?: SearchableOptions): SearchableSchema;
224
223
  declare function isSearchableSchema(value: unknown): value is SearchableSchema;
225
224
  declare function getSearchableMetadata(schema: z.ZodType): SearchableMetadata | undefined;
226
225
 
227
- declare const RECORDED_INSTANT_BRAND: unique symbol;
228
- /**
229
- * A canonical UTC ISO-8601 recorded-time instant (`YYYY-MM-DDTHH:mm:ss.sssZ`),
230
- * nominally branded so it can only originate from a recorded-time source —
231
- * {@link Store.recordedNow} or an explicit {@link asRecordedInstant} — never an
232
- * ad-hoc wall-clock string.
233
- *
234
- * The recorded commit clock is a logical, monotonic per-graph instant that can
235
- * run briefly ahead of wall time under bursty same-millisecond writes, so a raw
236
- * `new Date().toISOString()` may sort *before* the most recent commits and
237
- * silently omit them. The brand turns that footgun into a compile error:
238
- * `store.asOfRecorded` accepts only a `RecordedInstant`, so a bare wall-clock
239
- * string no longer type-checks — callers reach for `await store.recordedNow()`
240
- * (the monotonic high-water mark) or {@link asRecordedInstant} instead.
241
- */
242
- type RecordedInstant = string & {
243
- readonly [RECORDED_INSTANT_BRAND]: "RecordedInstant";
244
- };
245
- /**
246
- * Brands a canonical UTC ISO-8601 string as a {@link RecordedInstant}.
247
- *
248
- * The escape hatch for an instant that round-trips through untyped storage:
249
- * captured from {@link Store.recordedNow}, persisted as a plain string, read
250
- * back, and replayed into `asOfRecorded`. Validates the canonical form eagerly —
251
- * the same check `asOfRecorded` applies — so a malformed value fails here, at the
252
- * brand site, rather than deeper in a read. Does *not* assert the instant is a
253
- * real captured commit; it only guarantees the value is well-formed enough to
254
- * compare correctly against the recorded relations.
255
- *
256
- * @throws {ValidationError} when `value` is not a canonical UTC ISO-8601 string.
257
- */
258
- declare function asRecordedInstant(value: string): RecordedInstant;
259
- /**
260
- * The single opaque temporal coordinate every pinned read is resolved
261
- * against. It carries the valid-time axis plus an optional recorded/system-time
262
- * axis, so every surface can inject one coordinate object instead of threading
263
- * each temporal dimension separately.
264
- */
265
- type ReadCoordinate = Readonly<{
266
- /**
267
- * The valid-time axis: a resolved temporal mode and (only for `"asOf"`) the
268
- * instant it is pinned to.
269
- */
270
- valid: Readonly<{
271
- mode: TemporalMode;
272
- /** Defined only when `mode` is `"asOf"`. */
273
- asOf?: string;
274
- }>;
275
- /** The recorded/system-time axis. Defined only for recorded-pinned views. */
276
- recorded?: Readonly<{
277
- asOf: RecordedInstant;
278
- }>;
279
- }>;
280
-
281
- export { DEFAULT_SEARCHABLE_LANGUAGE as D, type EmbeddingMetric as E, type RecordedInstant as R, type SearchableMetadata as S, type EmbeddingIndexType as a, type EmbeddingSchema as b, type EmbeddingValue as c, type SearchableOptions as d, type SearchableSchema as e, asRecordedInstant as f, embedding as g, getEmbeddingDimensions as h, getSearchableMetadata as i, isEmbeddingSchema as j, isSearchableSchema as k, type ReadCoordinate as l, resolveGraphVectorSlots as r, searchable as s };
226
+ export { DEFAULT_SEARCHABLE_LANGUAGE as D, type EmbeddingMetric as E, type SearchableMetadata as S, type EmbeddingIndexType as a, type EmbeddingSchema as b, type EmbeddingValue as c, type SearchableOptions as d, type SearchableSchema as e, embedding as f, getEmbeddingDimensions as g, getSearchableMetadata as h, isEmbeddingSchema as i, isSearchableSchema as j, resolveGraphVectorSlots as r, searchable as s };