@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
@@ -1,6 +1,6 @@
1
- import { a as NodeType, A as AnyEdgeType, I as IndexEntity } from './extension-types-BLEVH4SG.cjs';
2
- import { s as SerializedNodeDef, t as SerializedEdgeDef, I as IndexDeclaration, q as SerializedSchema, C as SchemaVersionRow, G as GraphBackend } from './types-C5pZeKTl.cjs';
3
- import { G as GraphDef } from './define-graph-Cv3CFwKm.cjs';
1
+ import { a as NodeType, b as AnyEdgeType, v as SchemaVersionRow, w as GraphBackend, x as SerializedSchema } from './types-Dh-EgT-w.cjs';
2
+ import { G as GraphDef } from './define-graph-Byslw2OO.cjs';
3
+ import { S as SchemaDiff } from './materialize-indexes-DzMCetZe.cjs';
4
4
 
5
5
  /**
6
6
  * KindRegistry holds precomputed closures for ontological reasoning.
@@ -152,158 +152,6 @@ declare class KindRegistry {
152
152
  getEdgeType(name: string): AnyEdgeType | undefined;
153
153
  }
154
154
 
155
- /**
156
- * Schema migration utilities.
157
- *
158
- * Provides diff detection between schema versions to identify
159
- * what has changed and what migrations might be needed.
160
- */
161
-
162
- /**
163
- * Types of changes that can occur in a schema.
164
- */
165
- type ChangeType = "added" | "removed" | "modified" | "renamed";
166
- /**
167
- * Severity of a change for migration purposes.
168
- */
169
- type ChangeSeverity = "safe" | "warning" | "breaking";
170
- /**
171
- * A change to a node definition.
172
- */
173
- type NodeChange = Readonly<{
174
- type: ChangeType;
175
- kind: string;
176
- severity: ChangeSeverity;
177
- details: string;
178
- before?: SerializedNodeDef | undefined;
179
- after?: SerializedNodeDef | undefined;
180
- }>;
181
- /**
182
- * A change to an edge definition.
183
- */
184
- type EdgeChange = Readonly<{
185
- type: ChangeType;
186
- kind: string;
187
- severity: ChangeSeverity;
188
- details: string;
189
- before?: SerializedEdgeDef | undefined;
190
- after?: SerializedEdgeDef | undefined;
191
- }>;
192
- /**
193
- * A change to the ontology.
194
- */
195
- type OntologyChange = Readonly<{
196
- type: ChangeType;
197
- entity: "metaEdge" | "relation";
198
- name: string;
199
- severity: ChangeSeverity;
200
- details: string;
201
- }>;
202
- /**
203
- * A change to an index declaration.
204
- *
205
- * Index changes are always `safe`-severity: index DDL is materialized
206
- * separately and never blocks schema-version commits or migrations.
207
- * Adding, removing, or modifying an index never invalidates existing
208
- * data — it only changes which physical indexes the deployment will
209
- * materialize on its next pass.
210
- */
211
- type IndexChange = Readonly<{
212
- type: ChangeType;
213
- /** Index name (the diffing identity key). */
214
- name: string;
215
- /**
216
- * Whether this index is on a node, edge, or vector field. Vector
217
- * index changes flow through the same diff classification as
218
- * relational ones.
219
- */
220
- entity: IndexEntity;
221
- severity: ChangeSeverity;
222
- details: string;
223
- before?: IndexDeclaration | undefined;
224
- after?: IndexDeclaration | undefined;
225
- }>;
226
- /**
227
- * A change to the persisted graph-extension document.
228
- *
229
- * Graph-extension document changes are committed only through the
230
- * graph-extension lifecycle verbs (`evolve` and `removeKinds`), so the
231
- * extension-slice change itself is `safe`-severity. The detailed
232
- * per-kind effect is captured in the corresponding node/edge/ontology
233
- * changes the merged document produced.
234
- */
235
- type ExtensionChange = Readonly<{
236
- type: ChangeType;
237
- severity: ChangeSeverity;
238
- details: string;
239
- }>;
240
- /**
241
- * Change to the soft-deprecated kind set. `safe`-severity by
242
- * construction — deprecation is a metadata signal that doesn't gate
243
- * reads, writes, or queries. The `added` and `removed` arrays carry
244
- * the per-name deltas so consumers can render granular diffs.
245
- */
246
- type DeprecatedKindsChange = Readonly<{
247
- added: readonly string[];
248
- removed: readonly string[];
249
- severity: ChangeSeverity;
250
- details: string;
251
- }>;
252
- /**
253
- * A complete diff between two schema versions.
254
- */
255
- type SchemaDiff = Readonly<{
256
- fromVersion: number;
257
- toVersion: number;
258
- /** Changes to node definitions */
259
- nodes: readonly NodeChange[];
260
- /** Changes to edge definitions */
261
- edges: readonly EdgeChange[];
262
- /** Changes to ontology */
263
- ontology: readonly OntologyChange[];
264
- /** Changes to index declarations */
265
- indexes: readonly IndexChange[];
266
- /**
267
- * Change to the graph-extension document, if any. `undefined` when
268
- * the slice is unchanged on both sides (the common case).
269
- */
270
- extension?: ExtensionChange;
271
- /**
272
- * Change to the soft-deprecated kind set, if any. `undefined` when
273
- * the set is unchanged on both sides.
274
- */
275
- deprecatedKinds?: DeprecatedKindsChange;
276
- /** Whether any breaking changes exist */
277
- hasBreakingChanges: boolean;
278
- /** Whether the change is backwards compatible (no breaking changes) */
279
- isBackwardsCompatible: boolean;
280
- /** Whether any changes exist at all */
281
- hasChanges: boolean;
282
- /** Summary of changes */
283
- summary: string;
284
- }>;
285
- /**
286
- * Computes the diff between two schema versions.
287
- *
288
- * @param before - The previous schema version
289
- * @param after - The new schema version
290
- * @returns A diff describing all changes
291
- */
292
- declare function computeSchemaDiff(before: SerializedSchema, after: SerializedSchema): SchemaDiff;
293
- /**
294
- * Checks if a schema change is backwards compatible.
295
- *
296
- * A change is backwards compatible if:
297
- * - No nodes or edges were removed
298
- * - No required properties were added
299
- * - No existing properties were removed
300
- */
301
- declare function isBackwardsCompatible(diff: SchemaDiff): boolean;
302
- /**
303
- * Gets a list of actions needed for migration.
304
- */
305
- declare function getMigrationActions(diff: SchemaDiff): readonly string[];
306
-
307
155
  /**
308
156
  * Schema manager for TypeGraph.
309
157
  *
@@ -552,5 +400,46 @@ declare function isSchemaInitialized(backend: GraphBackend, graphId: string): Pr
552
400
  * @returns The diff, or undefined if schema not initialized
553
401
  */
554
402
  declare function getSchemaChanges<G extends GraphDef>(backend: GraphBackend, graph: G): Promise<SchemaDiff | undefined>;
403
+ /**
404
+ * Whether committing `graph` would require a schema migration — a SELECT-only
405
+ * pre-flight with no DDL and no writes.
406
+ *
407
+ * Returns `true` when the schema has not been initialized yet (the privileged
408
+ * bootstrap is required) and when the committed schema is behind `graph`.
409
+ * This is the predicate a least-privilege runtime checks to route to the
410
+ * privileged path *before* a write discovers the migration wall mid-request.
411
+ *
412
+ * For the additive-vs-incompatible distinction, use `getSchemaChanges` and
413
+ * {@link classifySchemaChanges} instead — this collapses both to `true`.
414
+ *
415
+ * @param backend - The database backend
416
+ * @param graph - The current graph definition
417
+ * @returns Whether a privileged migration/bootstrap is required.
418
+ */
419
+ declare function requiresMigration<G extends GraphDef>(backend: GraphBackend, graph: G): Promise<boolean>;
420
+ /**
421
+ * Reads the committed schema version for a graph in a single round-trip — no
422
+ * schema reconcile, no diff, no materialization-marker reads.
423
+ *
424
+ * This is the cross-isolate invalidation probe for a cached reconciled schema:
425
+ * compare the returned version against the one a verified open recorded
426
+ * (`store.reconciledSchema.version`); when it has moved, another process
427
+ * committed a schema change and the cached reconciliation must be refreshed via
428
+ * `createVerifiedAdapterStore`. One read replaces the three-query verified open
429
+ * on the steady-state (unchanged) path — the round-trip that saturated the
430
+ * connection pool under fan-out.
431
+ *
432
+ * It reads the active schema *row* (via `backend.getActiveSchema`), so the
433
+ * committed `schema_doc` is transferred and normalized even though only the
434
+ * version is used. A version-only backend query would shrink the payload
435
+ * further; it is a backward-compatible follow-up, not required for the
436
+ * round-trip win above.
437
+ *
438
+ * @param backend - The database backend
439
+ * @param graphId - The graph ID
440
+ * @returns The active committed version, or `undefined` if the schema has not
441
+ * been initialized for this graph.
442
+ */
443
+ declare function getCommittedSchemaVersion(backend: GraphBackend, graphId: string): Promise<number | undefined>;
555
444
 
556
- export { type ChangeSeverity as C, type DeprecatedKindsChange as D, type EdgeChange as E, type IndexChange as I, KindRegistry as K, type MigrationHookContext as M, type NodeChange as N, type OntologyChange as O, type SchemaManagerOptions as S, type ChangeType as a, type ExtensionChange as b, type SchemaDiff as c, type SchemaValidationResult as d, applyDeprecatedKinds as e, assertSchemaCurrent as f, computeSchemaDiff as g, ensureSchema as h, getActiveSchema as i, getMigrationActions as j, getSchemaChanges as k, initializeSchema as l, isBackwardsCompatible as m, isSchemaInitialized as n, loadActiveSchemaWithBootstrap as o, loadAndMergeGraphExtensionDocument as p, migrateSchema as q, parseSerializedSchema as r, rollbackSchema as s };
445
+ export { KindRegistry as K, type MigrationHookContext as M, type SchemaManagerOptions as S, type SchemaValidationResult as a, applyDeprecatedKinds as b, assertSchemaCurrent as c, getCommittedSchemaVersion as d, ensureSchema as e, getSchemaChanges as f, getActiveSchema as g, isSchemaInitialized as h, initializeSchema as i, loadAndMergeGraphExtensionDocument as j, rollbackSchema as k, loadActiveSchemaWithBootstrap as l, migrateSchema as m, parseSerializedSchema as p, requiresMigration as r };
@@ -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.js';
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 };