@nicia-ai/typegraph 0.40.0 → 0.42.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 (266) hide show
  1. package/dist/backend/drizzle/indexes.cjs +9 -9
  2. package/dist/backend/drizzle/indexes.d.cts +1 -2
  3. package/dist/backend/drizzle/indexes.d.ts +1 -2
  4. package/dist/backend/drizzle/indexes.js +5 -5
  5. package/dist/backend/index.cjs +50 -50
  6. package/dist/backend/index.d.cts +3 -4
  7. package/dist/backend/index.d.ts +3 -4
  8. package/dist/backend/index.js +11 -11
  9. package/dist/backend/postgres/index.cjs +26 -26
  10. package/dist/backend/postgres/index.d.cts +5 -6
  11. package/dist/backend/postgres/index.d.ts +5 -6
  12. package/dist/backend/postgres/index.js +13 -13
  13. package/dist/backend/postgres/pglite-store.cjs +34 -34
  14. package/dist/backend/postgres/pglite-store.d.cts +7 -8
  15. package/dist/backend/postgres/pglite-store.d.ts +7 -8
  16. package/dist/backend/postgres/pglite-store.js +30 -30
  17. package/dist/backend/postgres/pglite.cjs +15 -15
  18. package/dist/backend/postgres/pglite.d.cts +2 -3
  19. package/dist/backend/postgres/pglite.d.ts +2 -3
  20. package/dist/backend/postgres/pglite.js +14 -14
  21. package/dist/backend/sqlite/index.cjs +23 -23
  22. package/dist/backend/sqlite/index.d.cts +5 -6
  23. package/dist/backend/sqlite/index.d.ts +5 -6
  24. package/dist/backend/sqlite/index.js +11 -11
  25. package/dist/backend/sqlite/libsql.cjs +17 -17
  26. package/dist/backend/sqlite/libsql.d.cts +2 -3
  27. package/dist/backend/sqlite/libsql.d.ts +2 -3
  28. package/dist/backend/sqlite/libsql.js +13 -13
  29. package/dist/backend/sqlite/local-store.cjs +35 -35
  30. package/dist/backend/sqlite/local-store.d.cts +7 -8
  31. package/dist/backend/sqlite/local-store.d.ts +7 -8
  32. package/dist/backend/sqlite/local-store.js +31 -31
  33. package/dist/backend/sqlite/local.cjs +16 -16
  34. package/dist/backend/sqlite/local.d.cts +2 -3
  35. package/dist/backend/sqlite/local.d.ts +2 -3
  36. package/dist/backend/sqlite/local.js +14 -14
  37. package/dist/{chunk-H6I36MGT.cjs → chunk-277UZV7X.cjs} +1191 -1090
  38. package/dist/chunk-277UZV7X.cjs.map +1 -0
  39. package/dist/{chunk-2I3DNNBU.js → chunk-2G6ZEGYO.js} +4 -4
  40. package/dist/{chunk-2I3DNNBU.js.map → chunk-2G6ZEGYO.js.map} +1 -1
  41. package/dist/{chunk-76HE7DJP.js → chunk-2HKIID5K.js} +5 -5
  42. package/dist/{chunk-76HE7DJP.js.map → chunk-2HKIID5K.js.map} +1 -1
  43. package/dist/{chunk-QOHTVDHU.js → chunk-2OOY4OYT.js} +4 -4
  44. package/dist/{chunk-QOHTVDHU.js.map → chunk-2OOY4OYT.js.map} +1 -1
  45. package/dist/{chunk-UCHW2MGP.cjs → chunk-2SO5I5AI.cjs} +196 -196
  46. package/dist/{chunk-UCHW2MGP.cjs.map → chunk-2SO5I5AI.cjs.map} +1 -1
  47. package/dist/{chunk-LFFVD5ZR.cjs → chunk-33PAKPED.cjs} +41 -41
  48. package/dist/{chunk-LFFVD5ZR.cjs.map → chunk-33PAKPED.cjs.map} +1 -1
  49. package/dist/chunk-3RPQDGUE.cjs +83 -0
  50. package/dist/chunk-3RPQDGUE.cjs.map +1 -0
  51. package/dist/{chunk-PH4IJ3V5.js → chunk-3V6D5DEC.js} +3 -3
  52. package/dist/{chunk-PH4IJ3V5.js.map → chunk-3V6D5DEC.js.map} +1 -1
  53. package/dist/{chunk-Y5UC3IXF.js → chunk-42XYPKZU.js} +3 -3
  54. package/dist/{chunk-Y5UC3IXF.js.map → chunk-42XYPKZU.js.map} +1 -1
  55. package/dist/{chunk-XZA3Y4YH.js → chunk-4WYFRACU.js} +3 -3
  56. package/dist/{chunk-XZA3Y4YH.js.map → chunk-4WYFRACU.js.map} +1 -1
  57. package/dist/{chunk-AQVDAKXH.js → chunk-4XRP2N6B.js} +3 -3
  58. package/dist/{chunk-AQVDAKXH.js.map → chunk-4XRP2N6B.js.map} +1 -1
  59. package/dist/{chunk-PWXGB77L.cjs → chunk-5AERZSHC.cjs} +4 -4
  60. package/dist/{chunk-PWXGB77L.cjs.map → chunk-5AERZSHC.cjs.map} +1 -1
  61. package/dist/{chunk-K6CD6W5J.js → chunk-5C75HQYQ.js} +5 -5
  62. package/dist/{chunk-K6CD6W5J.js.map → chunk-5C75HQYQ.js.map} +1 -1
  63. package/dist/{chunk-2J5NMMVR.cjs → chunk-5GV4JQNA.cjs} +43 -43
  64. package/dist/{chunk-2J5NMMVR.cjs.map → chunk-5GV4JQNA.cjs.map} +1 -1
  65. package/dist/{chunk-KHNKYSGP.cjs → chunk-5P6IPIT6.cjs} +41 -41
  66. package/dist/{chunk-KHNKYSGP.cjs.map → chunk-5P6IPIT6.cjs.map} +1 -1
  67. package/dist/{chunk-53BSOG3O.js → chunk-6NB73BXV.js} +11 -11
  68. package/dist/{chunk-53BSOG3O.js.map → chunk-6NB73BXV.js.map} +1 -1
  69. package/dist/{chunk-SE422RES.cjs → chunk-6TJ6PKPS.cjs} +27 -27
  70. package/dist/{chunk-SE422RES.cjs.map → chunk-6TJ6PKPS.cjs.map} +1 -1
  71. package/dist/{chunk-QXKVUJLI.cjs → chunk-7TOT7RKY.cjs} +120 -120
  72. package/dist/{chunk-QXKVUJLI.cjs.map → chunk-7TOT7RKY.cjs.map} +1 -1
  73. package/dist/{chunk-7WLEQIHA.cjs → chunk-7Y6BV3TK.cjs} +100 -100
  74. package/dist/{chunk-7WLEQIHA.cjs.map → chunk-7Y6BV3TK.cjs.map} +1 -1
  75. package/dist/{chunk-HP6LWBLB.cjs → chunk-AO2WPYFZ.cjs} +4 -4
  76. package/dist/{chunk-HP6LWBLB.cjs.map → chunk-AO2WPYFZ.cjs.map} +1 -1
  77. package/dist/{chunk-7UTUKH4E.cjs → chunk-AQR6BHB3.cjs} +10 -10
  78. package/dist/{chunk-7UTUKH4E.cjs.map → chunk-AQR6BHB3.cjs.map} +1 -1
  79. package/dist/{chunk-X4PVHAZ6.cjs → chunk-ARN3ZODS.cjs} +6 -6
  80. package/dist/{chunk-X4PVHAZ6.cjs.map → chunk-ARN3ZODS.cjs.map} +1 -1
  81. package/dist/{chunk-EFZ4S22A.js → chunk-BGXKXGDI.js} +12 -12
  82. package/dist/{chunk-EFZ4S22A.js.map → chunk-BGXKXGDI.js.map} +1 -1
  83. package/dist/{chunk-YYLMXERH.js → chunk-CDYRPI5U.js} +4 -4
  84. package/dist/{chunk-YYLMXERH.js.map → chunk-CDYRPI5U.js.map} +1 -1
  85. package/dist/{chunk-3LKL3S6X.js → chunk-CI5NPLXX.js} +3 -3
  86. package/dist/{chunk-3LKL3S6X.js.map → chunk-CI5NPLXX.js.map} +1 -1
  87. package/dist/{chunk-UUIBACKJ.js → chunk-CUPJL6TS.js} +3 -3
  88. package/dist/{chunk-UUIBACKJ.js.map → chunk-CUPJL6TS.js.map} +1 -1
  89. package/dist/{chunk-JZYMOHHM.cjs → chunk-CVK4T34X.cjs} +22 -22
  90. package/dist/{chunk-JZYMOHHM.cjs.map → chunk-CVK4T34X.cjs.map} +1 -1
  91. package/dist/{chunk-L3DDZUZP.js → chunk-CVNGKTHO.js} +4 -4
  92. package/dist/{chunk-L3DDZUZP.js.map → chunk-CVNGKTHO.js.map} +1 -1
  93. package/dist/{chunk-RW24SAHI.cjs → chunk-DMZEVJGL.cjs} +13 -13
  94. package/dist/{chunk-RW24SAHI.cjs.map → chunk-DMZEVJGL.cjs.map} +1 -1
  95. package/dist/{chunk-3BL3JFHL.js → chunk-DP7KC6CL.js} +126 -25
  96. package/dist/{chunk-3BL3JFHL.js.map → chunk-DP7KC6CL.js.map} +1 -1
  97. package/dist/{chunk-QYDUCWD2.cjs → chunk-ECU53PMN.cjs} +4 -4
  98. package/dist/{chunk-QYDUCWD2.cjs.map → chunk-ECU53PMN.cjs.map} +1 -1
  99. package/dist/{chunk-SCTZRFW5.js → chunk-EQOQOT55.js} +5 -5
  100. package/dist/{chunk-SCTZRFW5.js.map → chunk-EQOQOT55.js.map} +1 -1
  101. package/dist/{chunk-JHK6NPFV.js → chunk-EVFL2ZY5.js} +9 -9
  102. package/dist/{chunk-JHK6NPFV.js.map → chunk-EVFL2ZY5.js.map} +1 -1
  103. package/dist/{chunk-SAMJLDGG.cjs → chunk-F2KVJ6FF.cjs} +112 -112
  104. package/dist/{chunk-SAMJLDGG.cjs.map → chunk-F2KVJ6FF.cjs.map} +1 -1
  105. package/dist/{chunk-NMQ6C6TS.cjs → chunk-F7TDKSVB.cjs} +4 -4
  106. package/dist/{chunk-NMQ6C6TS.cjs.map → chunk-F7TDKSVB.cjs.map} +1 -1
  107. package/dist/{chunk-HQRZEYYB.cjs → chunk-FFQGI67R.cjs} +44 -44
  108. package/dist/{chunk-HQRZEYYB.cjs.map → chunk-FFQGI67R.cjs.map} +1 -1
  109. package/dist/{chunk-YIRLBUNN.js → chunk-FMPZPOUD.js} +3 -3
  110. package/dist/{chunk-YIRLBUNN.js.map → chunk-FMPZPOUD.js.map} +1 -1
  111. package/dist/{chunk-LL5D5T5W.cjs → chunk-FSCJOTHF.cjs} +10 -10
  112. package/dist/{chunk-LL5D5T5W.cjs.map → chunk-FSCJOTHF.cjs.map} +1 -1
  113. package/dist/{chunk-2X73QTIC.cjs → chunk-FY4VY5EV.cjs} +20 -20
  114. package/dist/{chunk-2X73QTIC.cjs.map → chunk-FY4VY5EV.cjs.map} +1 -1
  115. package/dist/{chunk-3SHAUJRB.js → chunk-GT7NEXSU.js} +3 -3
  116. package/dist/{chunk-3SHAUJRB.js.map → chunk-GT7NEXSU.js.map} +1 -1
  117. package/dist/{chunk-W66YCXWT.js → chunk-HHBKGPEI.js} +11 -10
  118. package/dist/chunk-HHBKGPEI.js.map +1 -0
  119. package/dist/{chunk-CKFBZ4LV.cjs → chunk-I73ATSAH.cjs} +4 -4
  120. package/dist/{chunk-CKFBZ4LV.cjs.map → chunk-I73ATSAH.cjs.map} +1 -1
  121. package/dist/{chunk-ELA3V6UN.js → chunk-JOYPNY33.js} +9 -9
  122. package/dist/{chunk-ELA3V6UN.js.map → chunk-JOYPNY33.js.map} +1 -1
  123. package/dist/{chunk-YIX3BEBR.cjs → chunk-K2HHCWZO.cjs} +108 -108
  124. package/dist/{chunk-YIX3BEBR.cjs.map → chunk-K2HHCWZO.cjs.map} +1 -1
  125. package/dist/{chunk-SAFZ6JTI.cjs → chunk-KTBTSHU6.cjs} +19 -2
  126. package/dist/chunk-KTBTSHU6.cjs.map +1 -0
  127. package/dist/chunk-LDCWO5B6.js +81 -0
  128. package/dist/chunk-LDCWO5B6.js.map +1 -0
  129. package/dist/{chunk-I5CRUPKO.js → chunk-LQLVJWUH.js} +7 -7
  130. package/dist/{chunk-I5CRUPKO.js.map → chunk-LQLVJWUH.js.map} +1 -1
  131. package/dist/{chunk-ZE7E46IZ.js → chunk-LTVBD56M.js} +6 -6
  132. package/dist/{chunk-ZE7E46IZ.js.map → chunk-LTVBD56M.js.map} +1 -1
  133. package/dist/{chunk-6N7QBIWN.js → chunk-M4GYQF2H.js} +3 -3
  134. package/dist/{chunk-6N7QBIWN.js.map → chunk-M4GYQF2H.js.map} +1 -1
  135. package/dist/{chunk-XRU7V7FF.cjs → chunk-O2GZM7UK.cjs} +7 -7
  136. package/dist/{chunk-XRU7V7FF.cjs.map → chunk-O2GZM7UK.cjs.map} +1 -1
  137. package/dist/{chunk-ZE6NVENI.js → chunk-O3USVVWS.js} +3 -3
  138. package/dist/{chunk-ZE6NVENI.js.map → chunk-O3USVVWS.js.map} +1 -1
  139. package/dist/{chunk-UDS5DZNY.cjs → chunk-O7XVCLXW.cjs} +68 -67
  140. package/dist/chunk-O7XVCLXW.cjs.map +1 -0
  141. package/dist/{chunk-KLR77R5A.cjs → chunk-OM6RIOA5.cjs} +13 -13
  142. package/dist/{chunk-KLR77R5A.cjs.map → chunk-OM6RIOA5.cjs.map} +1 -1
  143. package/dist/{chunk-LLHMAHG4.cjs → chunk-OMQ2NBOR.cjs} +27 -27
  144. package/dist/{chunk-LLHMAHG4.cjs.map → chunk-OMQ2NBOR.cjs.map} +1 -1
  145. package/dist/{chunk-DPNA466P.js → chunk-OYJSYDIH.js} +19 -3
  146. package/dist/chunk-OYJSYDIH.js.map +1 -0
  147. package/dist/{chunk-CU3LPYNB.js → chunk-RAWG2FEU.js} +138 -22
  148. package/dist/chunk-RAWG2FEU.js.map +1 -0
  149. package/dist/{chunk-M2RPZS7J.cjs → chunk-RTUCOEIO.cjs} +12 -12
  150. package/dist/{chunk-M2RPZS7J.cjs.map → chunk-RTUCOEIO.cjs.map} +1 -1
  151. package/dist/{chunk-TAUGGLNQ.js → chunk-RXOAXO3R.js} +3 -3
  152. package/dist/{chunk-TAUGGLNQ.js.map → chunk-RXOAXO3R.js.map} +1 -1
  153. package/dist/{chunk-LLE25NRD.cjs → chunk-TRC646QQ.cjs} +7 -7
  154. package/dist/{chunk-LLE25NRD.cjs.map → chunk-TRC646QQ.cjs.map} +1 -1
  155. package/dist/chunk-U3YRCZ5L.cjs +12 -0
  156. package/dist/{chunk-IMQKXL4E.cjs.map → chunk-U3YRCZ5L.cjs.map} +1 -1
  157. package/dist/{chunk-ZVME6OSV.js → chunk-UJRWOV5B.js} +5 -5
  158. package/dist/{chunk-ZVME6OSV.js.map → chunk-UJRWOV5B.js.map} +1 -1
  159. package/dist/{chunk-HAQVISUF.cjs → chunk-UTTW2Q3M.cjs} +133 -133
  160. package/dist/{chunk-HAQVISUF.cjs.map → chunk-UTTW2Q3M.cjs.map} +1 -1
  161. package/dist/{chunk-L5ET7FYQ.js → chunk-UZLEQFTV.js} +3 -3
  162. package/dist/{chunk-L5ET7FYQ.js.map → chunk-UZLEQFTV.js.map} +1 -1
  163. package/dist/{chunk-K4FB2RMO.cjs → chunk-V2GZBPY2.cjs} +184 -65
  164. package/dist/chunk-V2GZBPY2.cjs.map +1 -0
  165. package/dist/{chunk-BUZWMDNL.js → chunk-VC26BUNP.js} +5 -5
  166. package/dist/{chunk-BUZWMDNL.js.map → chunk-VC26BUNP.js.map} +1 -1
  167. package/dist/chunk-VGMNGWBR.cjs +12 -0
  168. package/dist/{chunk-5YBDB7UG.cjs.map → chunk-VGMNGWBR.cjs.map} +1 -1
  169. package/dist/{chunk-XMEYZYGE.js → chunk-WYQILW5V.js} +8 -8
  170. package/dist/{chunk-XMEYZYGE.js.map → chunk-WYQILW5V.js.map} +1 -1
  171. package/dist/{chunk-YX3H63VV.cjs → chunk-X2XOQZT3.cjs} +9 -9
  172. package/dist/{chunk-YX3H63VV.cjs.map → chunk-X2XOQZT3.cjs.map} +1 -1
  173. package/dist/{chunk-N2V3HJFV.cjs → chunk-XDMPDUKL.cjs} +9 -9
  174. package/dist/{chunk-N2V3HJFV.cjs.map → chunk-XDMPDUKL.cjs.map} +1 -1
  175. package/dist/{chunk-5J4VNCUD.js → chunk-Z3WIL6S3.js} +5 -5
  176. package/dist/{chunk-5J4VNCUD.js.map → chunk-Z3WIL6S3.js.map} +1 -1
  177. package/dist/{chunk-MNURF4RF.cjs → chunk-ZBV4LQD2.cjs} +4 -4
  178. package/dist/{chunk-MNURF4RF.cjs.map → chunk-ZBV4LQD2.cjs.map} +1 -1
  179. package/dist/{chunk-YGX4PMG6.js → chunk-ZGOUVMVS.js} +5 -5
  180. package/dist/{chunk-YGX4PMG6.js.map → chunk-ZGOUVMVS.js.map} +1 -1
  181. package/dist/{chunk-QZYGZVUI.js → chunk-ZIRC2U6G.js} +11 -11
  182. package/dist/{chunk-QZYGZVUI.js.map → chunk-ZIRC2U6G.js.map} +1 -1
  183. package/dist/{chunk-6QP4QXBR.js → chunk-ZOHCFYXE.js} +3 -3
  184. package/dist/{chunk-6QP4QXBR.js.map → chunk-ZOHCFYXE.js.map} +1 -1
  185. package/dist/{chunk-VWEFXG73.js → chunk-ZP2KPDNN.js} +3 -3
  186. package/dist/{chunk-VWEFXG73.js.map → chunk-ZP2KPDNN.js.map} +1 -1
  187. package/dist/{chunk-NT6ILURI.cjs → chunk-ZPCKPLMX.cjs} +8 -8
  188. package/dist/{chunk-NT6ILURI.cjs.map → chunk-ZPCKPLMX.cjs.map} +1 -1
  189. package/dist/core/index.cjs +28 -28
  190. package/dist/core/index.d.cts +5 -6
  191. package/dist/core/index.d.ts +5 -6
  192. package/dist/core/index.js +8 -8
  193. package/dist/{ddl-KnCdF_le.d.cts → ddl-3unqC-kg.d.cts} +3 -3
  194. package/dist/{ddl-BLEzHw6j.d.ts → ddl-Bc4Dl8fu.d.ts} +3 -3
  195. package/dist/{define-graph-DQnj3fNH.d.ts → define-graph-Byslw2OO.d.cts} +1 -2
  196. package/dist/{define-graph-Cv3CFwKm.d.cts → define-graph-DBFnc7u_.d.ts} +1 -2
  197. package/dist/graph-extension/index.cjs +20 -20
  198. package/dist/graph-extension/index.d.cts +4 -4
  199. package/dist/graph-extension/index.d.ts +4 -4
  200. package/dist/graph-extension/index.js +5 -5
  201. package/dist/graph-merge/index.cjs +105 -105
  202. package/dist/graph-merge/index.d.cts +8 -9
  203. package/dist/graph-merge/index.d.ts +8 -9
  204. package/dist/graph-merge/index.js +25 -25
  205. package/dist/{index-BD_3TCgh.d.ts → index-DHXw7QAl.d.cts} +19 -4
  206. package/dist/{index-BihFPsPu.d.cts → index-DQzVJBHa.d.ts} +19 -4
  207. package/dist/index.cjs +209 -200
  208. package/dist/index.cjs.map +1 -1
  209. package/dist/index.d.cts +13 -15
  210. package/dist/index.d.ts +13 -15
  211. package/dist/index.js +35 -34
  212. package/dist/index.js.map +1 -1
  213. package/dist/indexes/index.cjs +13 -13
  214. package/dist/indexes/index.d.cts +4 -5
  215. package/dist/indexes/index.d.ts +4 -5
  216. package/dist/indexes/index.js +6 -6
  217. package/dist/interchange/index.cjs +40 -40
  218. package/dist/interchange/index.d.cts +9 -10
  219. package/dist/interchange/index.d.ts +9 -10
  220. package/dist/interchange/index.js +14 -14
  221. package/dist/{manager-DjE6Mhag.d.ts → manager-Dl0-er1G.d.ts} +45 -156
  222. package/dist/{manager-mqee5MVB.d.cts → manager-U9_zopqr.d.cts} +45 -156
  223. package/dist/materialize-indexes-BM3u0aXE.d.ts +258 -0
  224. package/dist/materialize-indexes-DzMCetZe.d.cts +258 -0
  225. package/dist/{postgres-Bm4DyFQU.d.cts → postgres-C5-WMKFA.d.ts} +1 -1
  226. package/dist/{postgres-DtaVALOZ.d.ts → postgres-DpJqtbSX.d.cts} +1 -1
  227. package/dist/profiler/index.d.cts +9 -10
  228. package/dist/profiler/index.d.ts +9 -10
  229. package/dist/provenance/index.cjs +39 -39
  230. package/dist/provenance/index.d.cts +7 -8
  231. package/dist/provenance/index.d.ts +7 -8
  232. package/dist/provenance/index.js +9 -9
  233. package/dist/schema/index.cjs +55 -112
  234. package/dist/schema/index.cjs.map +1 -1
  235. package/dist/schema/index.d.cts +57 -58
  236. package/dist/schema/index.d.ts +57 -58
  237. package/dist/schema/index.js +15 -92
  238. package/dist/schema/index.js.map +1 -1
  239. package/dist/{searchable-BxlJQVFw.d.cts → searchable-B4mUXZT6.d.cts} +2 -2
  240. package/dist/{searchable-ChJ29MCd.d.ts → searchable-C7jmPNLT.d.ts} +2 -2
  241. package/dist/{sqlite-m9Izphk_.d.ts → sqlite-Ch5tSYQY.d.ts} +1 -1
  242. package/dist/{sqlite-DT6tTHOG.d.cts → sqlite-Da7jiYu9.d.cts} +1 -1
  243. package/dist/{store-view-CagdeyNn.d.ts → store-view-6C2vTWqf.d.ts} +68 -16
  244. package/dist/{store-view-C-buB8Q8.d.cts → store-view-CNcOG8bQ.d.cts} +68 -16
  245. package/dist/{temporal-CyFsSPe8.d.ts → temporal-BtrTYTiB.d.ts} +1 -1
  246. package/dist/{temporal-Dn_JADWY.d.cts → temporal-CMpigMCW.d.cts} +1 -1
  247. package/dist/{types-CYdXzZef.d.ts → types-D2rU5Taq.d.ts} +1 -2
  248. package/dist/{types-D8szWDUo.d.ts → types-Dh-EgT-w.d.cts} +569 -2
  249. package/dist/{types-C5pZeKTl.d.cts → types-Dh-EgT-w.d.ts} +569 -2
  250. package/dist/{types-CqSfMRW3.d.cts → types-G4sVM-76.d.cts} +1 -2
  251. package/dist/{where-sQL4u5h-.d.ts → where-B8Y21kig.d.ts} +1 -2
  252. package/dist/{where-C3-HRgUq.d.cts → where-DbZ9XDOI.d.cts} +1 -2
  253. package/package.json +1 -1
  254. package/dist/chunk-5YBDB7UG.cjs +0 -12
  255. package/dist/chunk-CU3LPYNB.js.map +0 -1
  256. package/dist/chunk-DPNA466P.js.map +0 -1
  257. package/dist/chunk-H6I36MGT.cjs.map +0 -1
  258. package/dist/chunk-IMQKXL4E.cjs +0 -12
  259. package/dist/chunk-K4FB2RMO.cjs.map +0 -1
  260. package/dist/chunk-SAFZ6JTI.cjs.map +0 -1
  261. package/dist/chunk-UDS5DZNY.cjs.map +0 -1
  262. package/dist/chunk-W66YCXWT.js.map +0 -1
  263. package/dist/extension-types-BLEVH4SG.d.cts +0 -571
  264. package/dist/extension-types-BLEVH4SG.d.ts +0 -571
  265. package/dist/materialize-indexes-D4iei4Kp.d.ts +0 -90
  266. package/dist/materialize-indexes-ExQ6OrAh.d.cts +0 -90
@@ -0,0 +1,258 @@
1
+ import { y as SerializedNodeDef, z as SerializedEdgeDef, C as IndexEntity, I as IndexDeclaration, x as SerializedSchema } from './types-Dh-EgT-w.cjs';
2
+
3
+ /**
4
+ * Schema migration utilities.
5
+ *
6
+ * Provides diff detection between schema versions to identify
7
+ * what has changed and what migrations might be needed.
8
+ */
9
+
10
+ /**
11
+ * Types of changes that can occur in a schema.
12
+ */
13
+ type ChangeType = "added" | "removed" | "modified" | "renamed";
14
+ /**
15
+ * Severity of a change for migration purposes.
16
+ */
17
+ type ChangeSeverity = "safe" | "warning" | "breaking";
18
+ /**
19
+ * A change to a node definition.
20
+ */
21
+ type NodeChange = Readonly<{
22
+ type: ChangeType;
23
+ kind: string;
24
+ severity: ChangeSeverity;
25
+ details: string;
26
+ before?: SerializedNodeDef | undefined;
27
+ after?: SerializedNodeDef | undefined;
28
+ }>;
29
+ /**
30
+ * A change to an edge definition.
31
+ */
32
+ type EdgeChange = Readonly<{
33
+ type: ChangeType;
34
+ kind: string;
35
+ severity: ChangeSeverity;
36
+ details: string;
37
+ before?: SerializedEdgeDef | undefined;
38
+ after?: SerializedEdgeDef | undefined;
39
+ }>;
40
+ /**
41
+ * A change to the ontology.
42
+ */
43
+ type OntologyChange = Readonly<{
44
+ type: ChangeType;
45
+ entity: "metaEdge" | "relation";
46
+ name: string;
47
+ severity: ChangeSeverity;
48
+ details: string;
49
+ }>;
50
+ /**
51
+ * A change to an index declaration.
52
+ *
53
+ * Index changes are always `safe`-severity: index DDL is materialized
54
+ * separately and never blocks schema-version commits or migrations.
55
+ * Adding, removing, or modifying an index never invalidates existing
56
+ * data — it only changes which physical indexes the deployment will
57
+ * materialize on its next pass.
58
+ */
59
+ type IndexChange = Readonly<{
60
+ type: ChangeType;
61
+ /** Index name (the diffing identity key). */
62
+ name: string;
63
+ /**
64
+ * Whether this index is on a node, edge, or vector field. Vector
65
+ * index changes flow through the same diff classification as
66
+ * relational ones.
67
+ */
68
+ entity: IndexEntity;
69
+ severity: ChangeSeverity;
70
+ details: string;
71
+ before?: IndexDeclaration | undefined;
72
+ after?: IndexDeclaration | undefined;
73
+ }>;
74
+ /**
75
+ * A change to the persisted graph-extension document.
76
+ *
77
+ * Graph-extension document changes are committed only through the
78
+ * graph-extension lifecycle verbs (`evolve` and `removeKinds`), so the
79
+ * extension-slice change itself is `safe`-severity. The detailed
80
+ * per-kind effect is captured in the corresponding node/edge/ontology
81
+ * changes the merged document produced.
82
+ */
83
+ type ExtensionChange = Readonly<{
84
+ type: ChangeType;
85
+ severity: ChangeSeverity;
86
+ details: string;
87
+ }>;
88
+ /**
89
+ * Change to the soft-deprecated kind set. `safe`-severity by
90
+ * construction — deprecation is a metadata signal that doesn't gate
91
+ * reads, writes, or queries. The `added` and `removed` arrays carry
92
+ * the per-name deltas so consumers can render granular diffs.
93
+ */
94
+ type DeprecatedKindsChange = Readonly<{
95
+ added: readonly string[];
96
+ removed: readonly string[];
97
+ severity: ChangeSeverity;
98
+ details: string;
99
+ }>;
100
+ /**
101
+ * A complete diff between two schema versions.
102
+ */
103
+ type SchemaDiff = Readonly<{
104
+ fromVersion: number;
105
+ toVersion: number;
106
+ /** Changes to node definitions */
107
+ nodes: readonly NodeChange[];
108
+ /** Changes to edge definitions */
109
+ edges: readonly EdgeChange[];
110
+ /** Changes to ontology */
111
+ ontology: readonly OntologyChange[];
112
+ /** Changes to index declarations */
113
+ indexes: readonly IndexChange[];
114
+ /**
115
+ * Change to the graph-extension document, if any. `undefined` when
116
+ * the slice is unchanged on both sides (the common case).
117
+ */
118
+ extension?: ExtensionChange;
119
+ /**
120
+ * Change to the soft-deprecated kind set, if any. `undefined` when
121
+ * the set is unchanged on both sides.
122
+ */
123
+ deprecatedKinds?: DeprecatedKindsChange;
124
+ /** Whether any breaking changes exist */
125
+ hasBreakingChanges: boolean;
126
+ /** Whether the change is backwards compatible (no breaking changes) */
127
+ isBackwardsCompatible: boolean;
128
+ /** Whether any changes exist at all */
129
+ hasChanges: boolean;
130
+ /** Summary of changes */
131
+ summary: string;
132
+ }>;
133
+ /**
134
+ * Computes the diff between two schema versions.
135
+ *
136
+ * @param before - The previous schema version
137
+ * @param after - The new schema version
138
+ * @returns A diff describing all changes
139
+ */
140
+ declare function computeSchemaDiff(before: SerializedSchema, after: SerializedSchema): SchemaDiff;
141
+ /**
142
+ * Checks if a schema change is backwards compatible.
143
+ *
144
+ * A change is backwards compatible if:
145
+ * - No nodes or edges were removed
146
+ * - No required properties were added
147
+ * - No existing properties were removed
148
+ */
149
+ declare function isBackwardsCompatible(diff: SchemaDiff): boolean;
150
+ /**
151
+ * How a proposed graph relates to the committed schema.
152
+ *
153
+ * - `identical` — a semantic no-op; committing it changes nothing.
154
+ * - `additive` — changes exist and are all backwards compatible.
155
+ * - `incompatible` — at least one breaking change; needs a deliberate
156
+ * migration decision.
157
+ */
158
+ type SchemaChangeClassification = "identical" | "additive" | "incompatible";
159
+ /**
160
+ * Classifies a schema diff into the three outcomes a caller actually branches
161
+ * on. Pure — no I/O, no DDL. Pair with `getSchemaChanges(backend, graph)` (or
162
+ * `store.schemaChanges()`) to pre-flight a proposal *before* touching a
163
+ * privileged, migration-gated path.
164
+ */
165
+ declare function classifySchemaChanges(diff: SchemaDiff): SchemaChangeClassification;
166
+ /**
167
+ * Gets a list of actions needed for migration.
168
+ */
169
+ declare function getMigrationActions(diff: SchemaDiff): readonly string[];
170
+
171
+ /**
172
+ * Index materialization — runs declared index DDL against the live
173
+ * database and tracks per-deployment status in
174
+ * `typegraph_index_materializations`.
175
+ *
176
+ * Reads `IndexDeclaration[]` from `GraphDef.indexes`, generates DDL via
177
+ * `generateIndexDDL`, executes via `backend.executeDdl` (Postgres path
178
+ * uses `CREATE INDEX CONCURRENTLY`, which cannot run inside a
179
+ * transaction — `executeDdl` runs at the top-level backend, never inside
180
+ * `transaction(...)`), and upserts a status row per index.
181
+ *
182
+ * Caveats baked in to the algorithm:
183
+ *
184
+ * - SQL index names are physical, database-global identifiers.
185
+ * Cross-graph collisions (two graphs declaring the same name with
186
+ * different shapes) surface as a `failed` result with reason
187
+ * "signature drift", because the existing recorded signature won't
188
+ * match the new one.
189
+ * - On Postgres, `CREATE INDEX CONCURRENTLY IF NOT EXISTS` does NOT
190
+ * prove the existing physical index has the same shape as ours —
191
+ * only that something with that name exists. Drift detection here
192
+ * relies on TypeGraph's recorded signature, not on PG metadata.
193
+ * - Failed `CONCURRENTLY` builds leave invalid indexes behind
194
+ * (`pg_index.indisvalid = false`). Relational rebuilds self-heal: the
195
+ * claim-holding materializer drops an invalid leftover with the
196
+ * declaration's name before rebuilding (see dropInvalidIndexLeftover).
197
+ * Vector per-field index leftovers remain operator-repair.
198
+ * - Two materializers racing the SAME index name serialize through a
199
+ * durable claim in the status table (see materializeWithClaim) —
200
+ * concurrent same-name expression-index CIC builds deadlock on
201
+ * Postgres (no safe-snapshot exemption).
202
+ */
203
+
204
+ type MaterializeIndexesOptions = Readonly<{
205
+ /** Restrict to indexes whose `kind` is in this set. */
206
+ kinds?: readonly string[];
207
+ /** Stop on the first failure. Default: false (best-effort). */
208
+ stopOnError?: boolean;
209
+ /**
210
+ * Refresh planner statistics (ANALYZE) after at least one index was
211
+ * created. A fresh index can be ignored by the planner until statistics
212
+ * exist. Default: true. Applied on non-concurrent builders (SQLite) and
213
+ * on concurrent builders that serialize same-index builds via the
214
+ * cross-caller claim primitive (the bundled Postgres backend); a custom
215
+ * concurrent backend without the primitive skips the refresh — see
216
+ * refreshStatisticsAfterCreation — and should call
217
+ * `store.refreshStatistics()` after materializing.
218
+ */
219
+ refreshStatistics?: boolean;
220
+ }>;
221
+ /**
222
+ * Per-index outcome from `materializeIndexes()`.
223
+ *
224
+ * Status values:
225
+ * - `created`: DDL ran successfully and a new physical index now exists.
226
+ * - `alreadyMaterialized`: status table shows a prior successful
227
+ * materialization with the same signature; no DDL ran.
228
+ * - `failed`: the DDL or status write failed; `error` carries the
229
+ * captured exception. Best-effort mode continues to the next index;
230
+ * `stopOnError: true` halts.
231
+ * - `skipped`: the backend can't materialize this index variant in its
232
+ * current configuration (e.g. vector indexes against SQLite without
233
+ * sqlite-vec, or `indexType: "none"` declared on an embedding). The
234
+ * declaration is recognized but intentionally not acted on. Status
235
+ * table is NOT updated for skipped entries.
236
+ */
237
+ type MaterializeIndexesEntry = Readonly<{
238
+ indexName: string;
239
+ entity: IndexEntity;
240
+ kind: string;
241
+ status: "created" | "alreadyMaterialized" | "failed" | "skipped";
242
+ error?: Error;
243
+ /**
244
+ * Human-readable reason. Required for `skipped`; optional otherwise.
245
+ */
246
+ reason?: string;
247
+ }>;
248
+ type MaterializeIndexesResult = Readonly<{
249
+ results: readonly MaterializeIndexesEntry[];
250
+ }>;
251
+ type MaterializeSystemIndexesOptions = Readonly<{
252
+ /** Stop on the first failure. Default: false (best-effort). */
253
+ stopOnError?: boolean;
254
+ /** Refresh planner statistics after a creation. Default: true. */
255
+ refreshStatistics?: boolean;
256
+ }>;
257
+
258
+ export { type ChangeSeverity as C, type DeprecatedKindsChange as D, type EdgeChange as E, type IndexChange as I, type MaterializeIndexesResult as M, type NodeChange as N, type OntologyChange as O, type SchemaDiff as S, type ChangeType as a, type ExtensionChange as b, type SchemaChangeClassification as c, classifySchemaChanges as d, computeSchemaDiff as e, type MaterializeIndexesEntry as f, getMigrationActions as g, type MaterializeIndexesOptions as h, isBackwardsCompatible as i, type MaterializeSystemIndexesOptions as j };
@@ -1,5 +1,5 @@
1
1
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
2
- import { I as IndexDeclaration } from './types-C5pZeKTl.cjs';
2
+ import { I as IndexDeclaration } from './types-Dh-EgT-w.js';
3
3
 
4
4
  /**
5
5
  * Table name configuration.
@@ -1,5 +1,5 @@
1
1
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
2
- import { I as IndexDeclaration } from './types-D8szWDUo.js';
2
+ import { I as IndexDeclaration } from './types-Dh-EgT-w.cjs';
3
3
 
4
4
  /**
5
5
  * Table name configuration.
@@ -1,14 +1,13 @@
1
- import { G as GraphDef } from '../define-graph-Cv3CFwKm.cjs';
2
- import { Q as QueryAst } from '../types-C5pZeKTl.cjs';
3
- import { a as Store } from '../store-view-C-buB8Q8.cjs';
4
- import { P as ProfilerOptions, a as ProfileReport } from '../types-CqSfMRW3.cjs';
5
- export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-CqSfMRW3.cjs';
6
- import '../extension-types-BLEVH4SG.cjs';
1
+ import { G as GraphDef } from '../define-graph-Byslw2OO.cjs';
2
+ import { Q as QueryAst } from '../types-Dh-EgT-w.cjs';
3
+ import { a as Store } from '../store-view-CNcOG8bQ.cjs';
4
+ import { P as ProfilerOptions, a as ProfileReport } from '../types-G4sVM-76.cjs';
5
+ export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-G4sVM-76.cjs';
7
6
  import 'zod';
8
- import '../temporal-Dn_JADWY.cjs';
9
- import '../manager-mqee5MVB.cjs';
10
- import '../searchable-BxlJQVFw.cjs';
11
- import '../materialize-indexes-ExQ6OrAh.cjs';
7
+ import '../temporal-CMpigMCW.cjs';
8
+ import '../manager-U9_zopqr.cjs';
9
+ import '../materialize-indexes-DzMCetZe.cjs';
10
+ import '../searchable-B4mUXZT6.cjs';
12
11
 
13
12
  /**
14
13
  * A Store with profiling capabilities.
@@ -1,14 +1,13 @@
1
- import { G as GraphDef } from '../define-graph-DQnj3fNH.js';
2
- import { Q as QueryAst } from '../types-D8szWDUo.js';
3
- import { a as Store } from '../store-view-CagdeyNn.js';
4
- import { P as ProfilerOptions, a as ProfileReport } from '../types-CYdXzZef.js';
5
- export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-CYdXzZef.js';
6
- import '../extension-types-BLEVH4SG.js';
1
+ import { G as GraphDef } from '../define-graph-DBFnc7u_.js';
2
+ import { Q as QueryAst } from '../types-Dh-EgT-w.js';
3
+ import { a as Store } from '../store-view-6C2vTWqf.js';
4
+ import { P as ProfilerOptions, a as ProfileReport } from '../types-D2rU5Taq.js';
5
+ export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-D2rU5Taq.js';
7
6
  import 'zod';
8
- import '../temporal-CyFsSPe8.js';
9
- import '../manager-DjE6Mhag.js';
10
- import '../searchable-ChJ29MCd.js';
11
- import '../materialize-indexes-D4iei4Kp.js';
7
+ import '../temporal-BtrTYTiB.js';
8
+ import '../manager-Dl0-er1G.js';
9
+ import '../materialize-indexes-BM3u0aXE.js';
10
+ import '../searchable-C7jmPNLT.js';
12
11
 
13
12
  /**
14
13
  * A Store with profiling capabilities.
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkTRF4EBJT_cjs = require('../chunk-TRF4EBJT.cjs');
4
- var chunkUCHW2MGP_cjs = require('../chunk-UCHW2MGP.cjs');
3
+ var chunk2SO5I5AI_cjs = require('../chunk-2SO5I5AI.cjs');
5
4
  require('../chunk-ZDH3DX3C.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');
5
+ require('../chunk-CVK4T34X.cjs');
6
+ var chunkECU53PMN_cjs = require('../chunk-ECU53PMN.cjs');
7
+ require('../chunk-FSCJOTHF.cjs');
8
+ var chunkTRF4EBJT_cjs = require('../chunk-TRF4EBJT.cjs');
9
+ require('../chunk-AO2WPYFZ.cjs');
10
+ var chunkZBV4LQD2_cjs = require('../chunk-ZBV4LQD2.cjs');
11
11
  require('../chunk-NAUA4PW5.cjs');
12
- require('../chunk-YX3H63VV.cjs');
12
+ require('../chunk-X2XOQZT3.cjs');
13
13
  require('../chunk-SJDMVITW.cjs');
14
14
  require('../chunk-764JHTLT.cjs');
15
15
  require('../chunk-HAHNRASW.cjs');
16
16
  var chunkDI74SMXS_cjs = require('../chunk-DI74SMXS.cjs');
17
- var chunkSAFZ6JTI_cjs = require('../chunk-SAFZ6JTI.cjs');
17
+ var chunkKTBTSHU6_cjs = require('../chunk-KTBTSHU6.cjs');
18
18
  require('../chunk-TDXIBCGY.cjs');
19
19
 
20
20
  // src/provenance/index.ts
@@ -35,7 +35,7 @@ function edgeToKey(edge) {
35
35
  function keyToRef(key) {
36
36
  const separatorIndex = key.indexOf(KEY_SEPARATOR);
37
37
  if (separatorIndex === -1) {
38
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
38
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
39
39
  "Invalid provenance identity key.",
40
40
  { key },
41
41
  {
@@ -51,9 +51,9 @@ 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 = chunkQYDUCWD2_cjs.rowPropsToObject(row.props);
54
+ const parsed = chunkECU53PMN_cjs.rowPropsToObject(row.props);
55
55
  if (!chunkDI74SMXS_cjs.isPlainObject(parsed)) {
56
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
56
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
57
57
  `Node ${row.kind}/${row.id} props are not an object.`,
58
58
  { kind: row.kind, id: row.id }
59
59
  );
@@ -65,7 +65,7 @@ function sourceRetractedState(row, retractedField) {
65
65
  const value = props[retractedField];
66
66
  if (value === void 0) return "available";
67
67
  if (typeof value !== "boolean") {
68
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
68
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
69
69
  `Provenance source field "${retractedField}" must contain a boolean value.`,
70
70
  { kind: row.kind, id: row.id, field: retractedField },
71
71
  {
@@ -83,26 +83,26 @@ function normalizeConfig(graph, config) {
83
83
  const derivesKind = config.derives.kind;
84
84
  const retractedField = config.source.retractedField ?? DEFAULT_RETRACTED_FIELD;
85
85
  if (sourceKinds.length === 0) {
86
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
86
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
87
87
  "Provenance retraction requires at least one source kind.",
88
88
  { role: "source" }
89
89
  );
90
90
  }
91
91
  if (factKinds.length === 0) {
92
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
92
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
93
93
  "Provenance retraction requires at least one fact kind.",
94
94
  { role: "fact" }
95
95
  );
96
96
  }
97
97
  const duplicateSourceKinds = duplicateValues(sourceKinds);
98
98
  if (duplicateSourceKinds.length > 0) {
99
- throw new chunkSAFZ6JTI_cjs.ConfigurationError("Provenance source kinds must be unique.", {
99
+ throw new chunkKTBTSHU6_cjs.ConfigurationError("Provenance source kinds must be unique.", {
100
100
  duplicateSourceKinds
101
101
  });
102
102
  }
103
103
  const duplicateFactKinds = duplicateValues(factKinds);
104
104
  if (duplicateFactKinds.length > 0) {
105
- throw new chunkSAFZ6JTI_cjs.ConfigurationError("Provenance fact kinds must be unique.", {
105
+ throw new chunkKTBTSHU6_cjs.ConfigurationError("Provenance fact kinds must be unique.", {
106
106
  duplicateFactKinds
107
107
  });
108
108
  }
@@ -120,7 +120,7 @@ function normalizeConfig(graph, config) {
120
120
  if (factKinds.some(
121
121
  (kind) => sourceKinds.includes(kind) || kind === justificationKind
122
122
  )) {
123
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
123
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
124
124
  "Provenance fact kinds must be distinct from source and justification kinds.",
125
125
  { sourceKinds, justificationKind, factKinds }
126
126
  );
@@ -162,7 +162,7 @@ function duplicateValues(values) {
162
162
  }
163
163
  function assertKind(records, kind, role, noun, graphId) {
164
164
  if (Object.hasOwn(records, kind)) return;
165
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
165
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
166
166
  `Provenance ${role} kind "${kind}" is not a ${noun} kind in this graph.`,
167
167
  { role, kind, graphId }
168
168
  );
@@ -171,7 +171,7 @@ function assertSourceField(graph, sourceKind, retractedField) {
171
171
  const registration = graph.nodes[sourceKind];
172
172
  if (registration === void 0) return;
173
173
  if (Object.hasOwn(registration.type.schema.shape, retractedField)) return;
174
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
174
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
175
175
  `Provenance source kind "${sourceKind}" must include field "${retractedField}".`,
176
176
  { sourceKind, retractedField },
177
177
  {
@@ -186,14 +186,14 @@ function assertEdgeEndpoints(graph, edgeKind, expected) {
186
186
  const toKinds = new Set(registration.to.map((node) => node.kind));
187
187
  for (const kind of expected.fromKinds) {
188
188
  if (fromKinds.has(kind)) continue;
189
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
189
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
190
190
  `Provenance ${expected.role} edge "${edgeKind}" cannot start at "${kind}".`,
191
191
  { edgeKind, role: expected.role, expectedFrom: kind }
192
192
  );
193
193
  }
194
194
  for (const kind of expected.toKinds) {
195
195
  if (toKinds.has(kind)) continue;
196
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
196
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
197
197
  `Provenance ${expected.role} edge "${edgeKind}" cannot end at "${kind}".`,
198
198
  { edgeKind, role: expected.role, expectedTo: kind }
199
199
  );
@@ -299,7 +299,7 @@ function buildSupportEdges(config, rows) {
299
299
  };
300
300
  }
301
301
  async function loadSupportGraph(backend, graphId, config) {
302
- const asOf = chunkMNURF4RF_cjs.nowIso();
302
+ const asOf = chunkZBV4LQD2_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,21 +430,21 @@ async function synchronizeFactCurrency(backend, store, runHooks, snapshot, affec
430
430
  snapshot,
431
431
  affected,
432
432
  (key) => !snapshot.supportedFactKeys.has(key),
433
- chunkQYDUCWD2_cjs.isLiveNodeRow,
433
+ chunkECU53PMN_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
- chunkQYDUCWD2_cjs.isTombstonedNodeRow,
440
+ chunkECU53PMN_cjs.isTombstonedNodeRow,
441
441
  (row) => reopenFactCurrency(backend, store, runHooks, row, lock)
442
442
  );
443
443
  }
444
444
  function getFactRegistration(store, row) {
445
445
  const registration = store.graph.nodes[row.kind];
446
446
  if (registration !== void 0) return registration;
447
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
447
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
448
448
  `Provenance fact kind "${row.kind}" is not a node kind in this graph.`,
449
449
  { kind: row.kind, graphId: store.graphId }
450
450
  );
@@ -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 chunkUCHW2MGP_cjs.applyNodeSoftDelete(
456
- chunkUCHW2MGP_cjs.createNodeWriteContext(store.graphId, store.registry, lock),
455
+ await chunk2SO5I5AI_cjs.applyNodeSoftDelete(
456
+ chunk2SO5I5AI_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 chunkUCHW2MGP_cjs.applyNodeResurrect(
472
- chunkUCHW2MGP_cjs.createNodeWriteContext(store.graphId, store.registry, lock),
471
+ await chunk2SO5I5AI_cjs.applyNodeResurrect(
472
+ chunk2SO5I5AI_cjs.createNodeWriteContext(store.graphId, store.registry, lock),
473
473
  {
474
474
  existing: row,
475
475
  schema: registration.type.schema,
@@ -482,7 +482,7 @@ async function reopenFactCurrency(backend, store, runHooks, row, lock) {
482
482
  function getTransactionNodeCollection(tx, kind) {
483
483
  const collection = tx.getNodeCollection(kind);
484
484
  if (collection !== void 0) return collection;
485
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
485
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
486
486
  `Provenance source kind "${kind}" is not available on this transaction.`,
487
487
  { kind }
488
488
  );
@@ -495,14 +495,14 @@ async function runTransition(store, config, sources, retracted) {
495
495
  const uniqueSources = uniqueNodeReferences(sources);
496
496
  for (const source of uniqueSources) {
497
497
  if (config.sourceKinds.includes(source.kind)) continue;
498
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
498
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
499
499
  `Provenance retraction source must be one of: ${config.sourceKinds.join(", ")}.`,
500
500
  { expectedKinds: config.sourceKinds, actualKind: source.kind }
501
501
  );
502
502
  }
503
503
  return store.transaction(async (tx) => {
504
- const backend = chunkUCHW2MGP_cjs.transactionBackend(tx);
505
- const lock = await chunkUCHW2MGP_cjs.lockRecordedGraphWrite(backend, store.graphId);
504
+ const backend = chunk2SO5I5AI_cjs.transactionBackend(tx);
505
+ const lock = await chunk2SO5I5AI_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)
@@ -511,7 +511,7 @@ async function runTransition(store, config, sources, retracted) {
511
511
  const sourceRows = uniqueSources.map((source, index) => {
512
512
  const sourceRow = rows[index];
513
513
  if (sourceRow === void 0 || sourceRow.deleted_at !== void 0) {
514
- throw new chunkSAFZ6JTI_cjs.NodeNotFoundError(source.kind, source.id);
514
+ throw new chunkKTBTSHU6_cjs.NodeNotFoundError(source.kind, source.id);
515
515
  }
516
516
  return { source, row: sourceRow };
517
517
  });
@@ -538,7 +538,7 @@ async function runTransition(store, config, sources, retracted) {
538
538
  await synchronizeFactCurrency(
539
539
  backend,
540
540
  store,
541
- chunkUCHW2MGP_cjs.transactionNodeOperationHookRunner(tx),
541
+ chunk2SO5I5AI_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 = chunkUCHW2MGP_cjs.transactionBackend(tx);
568
- await chunkUCHW2MGP_cjs.lockRecordedGraphWrite(backend, store.graphId);
567
+ const backend = chunk2SO5I5AI_cjs.transactionBackend(tx);
568
+ await chunk2SO5I5AI_cjs.lockRecordedGraphWrite(backend, store.graphId);
569
569
  const snapshot = await computeSupport(
570
570
  backend,
571
571
  store.graphId,
@@ -580,7 +580,7 @@ function createRetractionCapability(store, config) {
580
580
  }
581
581
  function assertRetractionHistoryEnabled(store) {
582
582
  if (!store.historyEnabled) {
583
- throw new chunkSAFZ6JTI_cjs.ConfigurationError(
583
+ throw new chunkKTBTSHU6_cjs.ConfigurationError(
584
584
  "createRetractionCapability requires a store created with { history: true }.",
585
585
  { graphId: store.graphId },
586
586
  {
@@ -1,12 +1,11 @@
1
- import { G as GraphDef } from '../define-graph-Cv3CFwKm.cjs';
2
- import { b as HistoryStore } from '../store-view-C-buB8Q8.cjs';
3
- import '../extension-types-BLEVH4SG.cjs';
1
+ import { G as GraphDef } from '../define-graph-Byslw2OO.cjs';
2
+ import { b as HistoryStore } from '../store-view-CNcOG8bQ.cjs';
3
+ import '../types-Dh-EgT-w.cjs';
4
4
  import 'zod';
5
- import '../types-C5pZeKTl.cjs';
6
- import '../temporal-Dn_JADWY.cjs';
7
- import '../manager-mqee5MVB.cjs';
8
- import '../searchable-BxlJQVFw.cjs';
9
- import '../materialize-indexes-ExQ6OrAh.cjs';
5
+ import '../temporal-CMpigMCW.cjs';
6
+ import '../manager-U9_zopqr.cjs';
7
+ import '../materialize-indexes-DzMCetZe.cjs';
8
+ import '../searchable-B4mUXZT6.cjs';
10
9
 
11
10
  type NodeKind<G extends GraphDef> = Extract<keyof G["nodes"], string>;
12
11
  type EdgeKind<G extends GraphDef> = Extract<keyof G["edges"], string>;
@@ -1,12 +1,11 @@
1
- import { G as GraphDef } from '../define-graph-DQnj3fNH.js';
2
- import { b as HistoryStore } from '../store-view-CagdeyNn.js';
3
- import '../extension-types-BLEVH4SG.js';
1
+ import { G as GraphDef } from '../define-graph-DBFnc7u_.js';
2
+ import { b as HistoryStore } from '../store-view-6C2vTWqf.js';
3
+ import '../types-Dh-EgT-w.js';
4
4
  import 'zod';
5
- import '../types-D8szWDUo.js';
6
- import '../temporal-CyFsSPe8.js';
7
- import '../manager-DjE6Mhag.js';
8
- import '../searchable-ChJ29MCd.js';
9
- import '../materialize-indexes-D4iei4Kp.js';
5
+ import '../temporal-BtrTYTiB.js';
6
+ import '../manager-Dl0-er1G.js';
7
+ import '../materialize-indexes-BM3u0aXE.js';
8
+ import '../searchable-C7jmPNLT.js';
10
9
 
11
10
  type NodeKind<G extends GraphDef> = Extract<keyof G["nodes"], string>;
12
11
  type EdgeKind<G extends GraphDef> = Extract<keyof G["edges"], string>;
@@ -1,18 +1,18 @@
1
- import { compareStrings } from '../chunk-DRACN6XG.js';
2
- import { transactionBackend, lockRecordedGraphWrite, transactionNodeOperationHookRunner, applyNodeSoftDelete, createNodeWriteContext, applyNodeResurrect } from '../chunk-JHK6NPFV.js';
1
+ import { transactionBackend, lockRecordedGraphWrite, transactionNodeOperationHookRunner, applyNodeSoftDelete, createNodeWriteContext, applyNodeResurrect } from '../chunk-EVFL2ZY5.js';
3
2
  import '../chunk-35S6P5ZU.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';
3
+ import '../chunk-CDYRPI5U.js';
4
+ import { rowPropsToObject, isLiveNodeRow, isTombstonedNodeRow } from '../chunk-UZLEQFTV.js';
5
+ import '../chunk-2OOY4OYT.js';
6
+ import { compareStrings } from '../chunk-DRACN6XG.js';
7
+ import '../chunk-CUPJL6TS.js';
8
+ import { nowIso } from '../chunk-GT7NEXSU.js';
9
9
  import '../chunk-2EBMPJBO.js';
10
- import '../chunk-6N7QBIWN.js';
10
+ import '../chunk-M4GYQF2H.js';
11
11
  import '../chunk-SNXVDZAJ.js';
12
12
  import '../chunk-QMQLUA66.js';
13
13
  import '../chunk-PC2UBAUB.js';
14
14
  import { isPlainObject } from '../chunk-ITE4IXAK.js';
15
- import { ConfigurationError, NodeNotFoundError } from '../chunk-DPNA466P.js';
15
+ import { ConfigurationError, NodeNotFoundError } from '../chunk-OYJSYDIH.js';
16
16
  import '../chunk-G6Q5UM7U.js';
17
17
 
18
18
  // src/provenance/index.ts