@nicia-ai/typegraph 0.50.0 → 0.51.1

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 (326) hide show
  1. package/README.md +12 -0
  2. package/dist/backend/drizzle/indexes.cjs +10 -8
  3. package/dist/backend/drizzle/indexes.d.cts +1 -1
  4. package/dist/backend/drizzle/indexes.d.ts +1 -1
  5. package/dist/backend/drizzle/indexes.js +6 -4
  6. package/dist/backend/index.cjs +183 -50
  7. package/dist/backend/index.d.cts +90 -4
  8. package/dist/backend/index.d.ts +90 -4
  9. package/dist/backend/index.js +6 -9
  10. package/dist/backend/postgres/index.cjs +30 -28
  11. package/dist/backend/postgres/index.d.cts +7 -7
  12. package/dist/backend/postgres/index.d.ts +7 -7
  13. package/dist/backend/postgres/index.js +16 -14
  14. package/dist/backend/postgres/pglite-store.cjs +6 -62
  15. package/dist/backend/postgres/pglite-store.cjs.map +1 -1
  16. package/dist/backend/postgres/pglite-store.d.cts +8 -8
  17. package/dist/backend/postgres/pglite-store.d.ts +8 -8
  18. package/dist/backend/postgres/pglite-store.js +6 -62
  19. package/dist/backend/postgres/pglite-store.js.map +1 -1
  20. package/dist/backend/postgres/pglite.cjs +18 -16
  21. package/dist/backend/postgres/pglite.d.cts +3 -3
  22. package/dist/backend/postgres/pglite.d.ts +3 -3
  23. package/dist/backend/postgres/pglite.js +17 -15
  24. package/dist/backend/sqlite/index.cjs +27 -25
  25. package/dist/backend/sqlite/index.d.cts +7 -7
  26. package/dist/backend/sqlite/index.d.ts +7 -7
  27. package/dist/backend/sqlite/index.js +14 -12
  28. package/dist/backend/sqlite/libsql.cjs +21 -19
  29. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  30. package/dist/backend/sqlite/libsql.d.cts +3 -3
  31. package/dist/backend/sqlite/libsql.d.ts +3 -3
  32. package/dist/backend/sqlite/libsql.js +16 -14
  33. package/dist/backend/sqlite/libsql.js.map +1 -1
  34. package/dist/backend/sqlite/local-store.cjs +8 -64
  35. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  36. package/dist/backend/sqlite/local-store.d.cts +8 -8
  37. package/dist/backend/sqlite/local-store.d.ts +8 -8
  38. package/dist/backend/sqlite/local-store.js +7 -64
  39. package/dist/backend/sqlite/local-store.js.map +1 -1
  40. package/dist/backend/sqlite/local.cjs +22 -19
  41. package/dist/backend/sqlite/local.d.cts +3 -3
  42. package/dist/backend/sqlite/local.d.ts +3 -3
  43. package/dist/backend/sqlite/local.js +18 -15
  44. package/dist/{chunk-TUVD4DFR.cjs → chunk-2CVDZCXH.cjs} +122 -51
  45. package/dist/chunk-2CVDZCXH.cjs.map +1 -0
  46. package/dist/{chunk-I5C6OTKR.js → chunk-2DWTBNSH.js} +3 -3
  47. package/dist/{chunk-I5C6OTKR.js.map → chunk-2DWTBNSH.js.map} +1 -1
  48. package/dist/{chunk-C76WFIVZ.cjs → chunk-2KCTP3U2.cjs} +180 -127
  49. package/dist/chunk-2KCTP3U2.cjs.map +1 -0
  50. package/dist/{chunk-BYBDM423.cjs → chunk-322TBTOQ.cjs} +48 -48
  51. package/dist/{chunk-BYBDM423.cjs.map → chunk-322TBTOQ.cjs.map} +1 -1
  52. package/dist/chunk-36SX6QXP.cjs +186 -0
  53. package/dist/chunk-36SX6QXP.cjs.map +1 -0
  54. package/dist/{chunk-H3XP6BAV.js → chunk-36VYWVQU.js} +3 -3
  55. package/dist/{chunk-H3XP6BAV.js.map → chunk-36VYWVQU.js.map} +1 -1
  56. package/dist/{chunk-VTJVMP4I.js → chunk-4DKY6RIU.js} +102 -31
  57. package/dist/chunk-4DKY6RIU.js.map +1 -0
  58. package/dist/chunk-4QKOZYMV.js +9 -0
  59. package/dist/chunk-4QKOZYMV.js.map +1 -0
  60. package/dist/{chunk-U3Z7XKAG.js → chunk-57JM6NW3.js} +8 -18
  61. package/dist/chunk-57JM6NW3.js.map +1 -0
  62. package/dist/{chunk-WCLMKNQE.cjs → chunk-5FVZSE3B.cjs} +1356 -1108
  63. package/dist/chunk-5FVZSE3B.cjs.map +1 -0
  64. package/dist/{chunk-XMY2SXOH.cjs → chunk-5WWEYV4H.cjs} +2208 -579
  65. package/dist/chunk-5WWEYV4H.cjs.map +1 -0
  66. package/dist/{chunk-WQBAQZHR.js → chunk-6NLYIMJO.js} +4 -4
  67. package/dist/{chunk-WQBAQZHR.js.map → chunk-6NLYIMJO.js.map} +1 -1
  68. package/dist/{chunk-G2TLHH6T.cjs → chunk-7B7I7YAW.cjs} +6 -6
  69. package/dist/{chunk-G2TLHH6T.cjs.map → chunk-7B7I7YAW.cjs.map} +1 -1
  70. package/dist/{chunk-EDLKIQRI.js → chunk-7G5IYROL.js} +6 -548
  71. package/dist/chunk-7G5IYROL.js.map +1 -0
  72. package/dist/{chunk-46UGOVRW.js → chunk-7QFRK6PU.js} +3 -7
  73. package/dist/chunk-7QFRK6PU.js.map +1 -0
  74. package/dist/chunk-A4C4NJ5U.cjs +12 -0
  75. package/dist/chunk-A4C4NJ5U.cjs.map +1 -0
  76. package/dist/{chunk-7CCMCMJO.cjs → chunk-AOGOC6JF.cjs} +77 -68
  77. package/dist/chunk-AOGOC6JF.cjs.map +1 -0
  78. package/dist/{chunk-TYGGUWMS.cjs → chunk-B3MN7EJR.cjs} +177 -137
  79. package/dist/chunk-B3MN7EJR.cjs.map +1 -0
  80. package/dist/{chunk-K6VKTBST.cjs → chunk-BZ5MVITP.cjs} +4 -4
  81. package/dist/{chunk-K6VKTBST.cjs.map → chunk-BZ5MVITP.cjs.map} +1 -1
  82. package/dist/{chunk-ZAQUKCUC.js → chunk-CBOD7TXH.js} +5 -5
  83. package/dist/{chunk-ZAQUKCUC.js.map → chunk-CBOD7TXH.js.map} +1 -1
  84. package/dist/{chunk-LLVOQOWE.cjs → chunk-CRZ56SZU.cjs} +6 -5
  85. package/dist/chunk-CRZ56SZU.cjs.map +1 -0
  86. package/dist/{chunk-ON47CBE4.cjs → chunk-D3GWARN7.cjs} +47 -47
  87. package/dist/{chunk-ON47CBE4.cjs.map → chunk-D3GWARN7.cjs.map} +1 -1
  88. package/dist/{chunk-W5SOCUBL.js → chunk-D3OUDFU7.js} +5 -5
  89. package/dist/{chunk-W5SOCUBL.js.map → chunk-D3OUDFU7.js.map} +1 -1
  90. package/dist/chunk-EKG2UXNX.cjs +23 -0
  91. package/dist/chunk-EKG2UXNX.cjs.map +1 -0
  92. package/dist/{chunk-2Q45FAIE.js → chunk-EVYW3532.js} +28 -19
  93. package/dist/chunk-EVYW3532.js.map +1 -0
  94. package/dist/{chunk-7PRMDZIA.cjs → chunk-FMMW3KX7.cjs} +21 -55
  95. package/dist/chunk-FMMW3KX7.cjs.map +1 -0
  96. package/dist/chunk-H2VWDQWC.cjs +571 -0
  97. package/dist/chunk-H2VWDQWC.cjs.map +1 -0
  98. package/dist/chunk-H4FY6OZK.js +13 -0
  99. package/dist/chunk-H4FY6OZK.js.map +1 -0
  100. package/dist/{chunk-OJHD3LXJ.cjs → chunk-H5IJSROF.cjs} +2 -8
  101. package/dist/chunk-H5IJSROF.cjs.map +1 -0
  102. package/dist/{chunk-U5EL6JUV.js → chunk-I5IOSA27.js} +101 -103
  103. package/dist/chunk-I5IOSA27.js.map +1 -0
  104. package/dist/{chunk-SHC7BCG5.cjs → chunk-I7YAY2VQ.cjs} +7 -7
  105. package/dist/{chunk-SHC7BCG5.cjs.map → chunk-I7YAY2VQ.cjs.map} +1 -1
  106. package/dist/chunk-IRCWIA3R.js +20 -0
  107. package/dist/chunk-IRCWIA3R.js.map +1 -0
  108. package/dist/chunk-IVQBLXBK.cjs +55 -0
  109. package/dist/chunk-IVQBLXBK.cjs.map +1 -0
  110. package/dist/{chunk-5PP4KRPV.js → chunk-IZD4HTCP.js} +5 -5
  111. package/dist/{chunk-5PP4KRPV.js.map → chunk-IZD4HTCP.js.map} +1 -1
  112. package/dist/{chunk-RDP6ZRSM.cjs → chunk-JQKMEKKW.cjs} +261 -204
  113. package/dist/chunk-JQKMEKKW.cjs.map +1 -0
  114. package/dist/chunk-JVA3KDEA.cjs +691 -0
  115. package/dist/chunk-JVA3KDEA.cjs.map +1 -0
  116. package/dist/{chunk-JG5XIJDY.js → chunk-K67P5DLL.js} +62 -22
  117. package/dist/chunk-K67P5DLL.js.map +1 -0
  118. package/dist/{chunk-MX7EKQPM.js → chunk-K6OZIHKI.js} +345 -97
  119. package/dist/chunk-K6OZIHKI.js.map +1 -0
  120. package/dist/{chunk-CS6JTQQ2.cjs → chunk-KACEYDYV.cjs} +94 -62
  121. package/dist/chunk-KACEYDYV.cjs.map +1 -0
  122. package/dist/{chunk-5OWHU7Z7.cjs → chunk-L6EVYIID.cjs} +248 -210
  123. package/dist/chunk-L6EVYIID.cjs.map +1 -0
  124. package/dist/{chunk-7OWE7WD6.js → chunk-LI4K2KEJ.js} +4 -4
  125. package/dist/{chunk-7OWE7WD6.js.map → chunk-LI4K2KEJ.js.map} +1 -1
  126. package/dist/chunk-LKZDQ2B4.js +1581 -0
  127. package/dist/chunk-LKZDQ2B4.js.map +1 -0
  128. package/dist/{chunk-45YZXI6X.cjs → chunk-LLFPQOBA.cjs} +27 -27
  129. package/dist/{chunk-45YZXI6X.cjs.map → chunk-LLFPQOBA.cjs.map} +1 -1
  130. package/dist/{chunk-ZRJTM7MT.js → chunk-LZMQ3SFK.js} +3 -3
  131. package/dist/{chunk-ZRJTM7MT.js.map → chunk-LZMQ3SFK.js.map} +1 -1
  132. package/dist/{chunk-DI6VC62F.js → chunk-M3VTS3F6.js} +3 -3
  133. package/dist/{chunk-DI6VC62F.js.map → chunk-M3VTS3F6.js.map} +1 -1
  134. package/dist/{chunk-MZ34E2GN.js → chunk-NBOS7BY3.js} +60 -21
  135. package/dist/chunk-NBOS7BY3.js.map +1 -0
  136. package/dist/{chunk-YA36ABIL.js → chunk-NGQDGL5X.js} +14 -48
  137. package/dist/chunk-NGQDGL5X.js.map +1 -0
  138. package/dist/{chunk-ZBFZGLZE.cjs → chunk-NLX5OWK7.cjs} +6 -2
  139. package/dist/chunk-NLX5OWK7.cjs.map +1 -0
  140. package/dist/chunk-NUQ2YFFH.cjs +1637 -0
  141. package/dist/chunk-NUQ2YFFH.cjs.map +1 -0
  142. package/dist/{chunk-TTCOPKUL.cjs → chunk-OGL4X4PH.cjs} +182 -184
  143. package/dist/chunk-OGL4X4PH.cjs.map +1 -0
  144. package/dist/{chunk-HY5BNOUN.cjs → chunk-OTNTGEXR.cjs} +4 -4
  145. package/dist/{chunk-HY5BNOUN.cjs.map → chunk-OTNTGEXR.cjs.map} +1 -1
  146. package/dist/chunk-OTWE63BW.js +53 -0
  147. package/dist/chunk-OTWE63BW.js.map +1 -0
  148. package/dist/chunk-PC5NGH5A.js +549 -0
  149. package/dist/chunk-PC5NGH5A.js.map +1 -0
  150. package/dist/{chunk-IPRP6TDL.cjs → chunk-PS3TUWJM.cjs} +7 -7
  151. package/dist/{chunk-IPRP6TDL.cjs.map → chunk-PS3TUWJM.cjs.map} +1 -1
  152. package/dist/{chunk-V76FGHY3.js → chunk-PVFFH7TL.js} +5 -5
  153. package/dist/{chunk-V76FGHY3.js.map → chunk-PVFFH7TL.js.map} +1 -1
  154. package/dist/chunk-QCD5JKU4.cjs +15 -0
  155. package/dist/chunk-QCD5JKU4.cjs.map +1 -0
  156. package/dist/{chunk-IRPYOHRC.js → chunk-QG5VEOKX.js} +6 -2
  157. package/dist/chunk-QG5VEOKX.js.map +1 -0
  158. package/dist/{chunk-2CYI5HRH.js → chunk-RI7RJH4G.js} +49 -17
  159. package/dist/chunk-RI7RJH4G.js.map +1 -0
  160. package/dist/{chunk-5LKOVCPP.js → chunk-RVUL2HXY.js} +6 -5
  161. package/dist/chunk-RVUL2HXY.js.map +1 -0
  162. package/dist/{chunk-WK23PGTP.cjs → chunk-S5GU4LUN.cjs} +11 -11
  163. package/dist/{chunk-WK23PGTP.cjs.map → chunk-S5GU4LUN.cjs.map} +1 -1
  164. package/dist/{chunk-S33YQEL7.js → chunk-SDPWO2Z5.js} +6 -6
  165. package/dist/{chunk-S33YQEL7.js.map → chunk-SDPWO2Z5.js.map} +1 -1
  166. package/dist/{chunk-6S3PTHL4.js → chunk-SLGGT2XD.js} +3 -3
  167. package/dist/{chunk-6S3PTHL4.js.map → chunk-SLGGT2XD.js.map} +1 -1
  168. package/dist/{chunk-HSEZ7X6Y.cjs → chunk-TIJUA4I6.cjs} +45 -45
  169. package/dist/{chunk-HSEZ7X6Y.cjs.map → chunk-TIJUA4I6.cjs.map} +1 -1
  170. package/dist/{chunk-CSNOYIB4.cjs → chunk-TM54OBHX.cjs} +13 -13
  171. package/dist/{chunk-CSNOYIB4.cjs.map → chunk-TM54OBHX.cjs.map} +1 -1
  172. package/dist/{chunk-MM3JHVKZ.cjs → chunk-TUWSVL6I.cjs} +4 -4
  173. package/dist/{chunk-MM3JHVKZ.cjs.map → chunk-TUWSVL6I.cjs.map} +1 -1
  174. package/dist/{chunk-2GIV5X4P.js → chunk-TYEYRCXL.js} +86 -33
  175. package/dist/chunk-TYEYRCXL.js.map +1 -0
  176. package/dist/{chunk-MJPZNEJZ.js → chunk-UKOVGCRN.js} +2095 -496
  177. package/dist/chunk-UKOVGCRN.js.map +1 -0
  178. package/dist/chunk-UYKDYE5D.cjs +12 -0
  179. package/dist/{chunk-KWNWG4RC.cjs.map → chunk-UYKDYE5D.cjs.map} +1 -1
  180. package/dist/{chunk-FX5ZW6PN.js → chunk-VAAC7L57.js} +95 -40
  181. package/dist/chunk-VAAC7L57.js.map +1 -0
  182. package/dist/{chunk-ISKCIQF2.cjs → chunk-VKHXYVN7.cjs} +14 -25
  183. package/dist/chunk-VKHXYVN7.cjs.map +1 -0
  184. package/dist/chunk-VUQZNUHU.js +171 -0
  185. package/dist/chunk-VUQZNUHU.js.map +1 -0
  186. package/dist/{chunk-K2XYLVVB.cjs → chunk-WDM5WQK4.cjs} +175 -136
  187. package/dist/chunk-WDM5WQK4.cjs.map +1 -0
  188. package/dist/{chunk-GVYVGGPJ.js → chunk-WFSYYU4W.js} +66 -28
  189. package/dist/chunk-WFSYYU4W.js.map +1 -0
  190. package/dist/{chunk-R7MRFE5P.js → chunk-WS5MT2UJ.js} +3 -3
  191. package/dist/{chunk-R7MRFE5P.js.map → chunk-WS5MT2UJ.js.map} +1 -1
  192. package/dist/chunk-XORONCV3.js +202 -0
  193. package/dist/chunk-XORONCV3.js.map +1 -0
  194. package/dist/chunk-ZGVTNKTX.cjs +217 -0
  195. package/dist/chunk-ZGVTNKTX.cjs.map +1 -0
  196. package/dist/core/index.cjs +20 -20
  197. package/dist/core/index.d.cts +4 -4
  198. package/dist/core/index.d.ts +4 -4
  199. package/dist/core/index.js +4 -4
  200. package/dist/{ddl-B49O7dB_.d.ts → ddl-BvcbgzHo.d.ts} +3 -3
  201. package/dist/{ddl-DcZG660s.d.cts → ddl-Ufebz5q5.d.cts} +3 -3
  202. package/dist/graph-extension/index.d.cts +2 -4
  203. package/dist/graph-extension/index.d.ts +2 -4
  204. package/dist/graph-merge/index.cjs +140 -125
  205. package/dist/graph-merge/index.cjs.map +1 -1
  206. package/dist/graph-merge/index.d.cts +8 -9
  207. package/dist/graph-merge/index.d.ts +8 -9
  208. package/dist/graph-merge/index.js +42 -27
  209. package/dist/graph-merge/index.js.map +1 -1
  210. package/dist/index.cjs +144 -143
  211. package/dist/index.cjs.map +1 -1
  212. package/dist/index.d.cts +11 -12
  213. package/dist/index.d.ts +11 -12
  214. package/dist/index.js +30 -29
  215. package/dist/index.js.map +1 -1
  216. package/dist/indexes/index.cjs +14 -12
  217. package/dist/indexes/index.d.cts +4 -4
  218. package/dist/indexes/index.d.ts +4 -4
  219. package/dist/indexes/index.js +7 -5
  220. package/dist/{ingestion-import-target-CI8OWIkM.d.ts → ingestion-import-target-CAs1OX-l.d.cts} +1 -1
  221. package/dist/{ingestion-import-target-DCpfM1PX.d.cts → ingestion-import-target-DCQSPfNx.d.ts} +1 -1
  222. package/dist/interchange/index.cjs +41 -39
  223. package/dist/interchange/index.cjs.map +1 -1
  224. package/dist/interchange/index.d.cts +8 -8
  225. package/dist/interchange/index.d.ts +8 -8
  226. package/dist/interchange/index.js +16 -14
  227. package/dist/interchange/index.js.map +1 -1
  228. package/dist/local-store-impl-JC7OBRAW.js +75 -0
  229. package/dist/local-store-impl-JC7OBRAW.js.map +1 -0
  230. package/dist/local-store-impl-UOS2LUIG.cjs +77 -0
  231. package/dist/local-store-impl-UOS2LUIG.cjs.map +1 -0
  232. package/dist/{manager-Cfg1ENj1.d.ts → manager-B68OrPR2.d.ts} +1 -2
  233. package/dist/{manager-D348fa6W.d.cts → manager-D_t7oK69.d.cts} +1 -2
  234. package/dist/pglite-store-impl-J5J5AA52.cjs +75 -0
  235. package/dist/pglite-store-impl-J5J5AA52.cjs.map +1 -0
  236. package/dist/pglite-store-impl-LDRH2DUH.js +73 -0
  237. package/dist/pglite-store-impl-LDRH2DUH.js.map +1 -0
  238. package/dist/{postgres-UStOycLI.d.ts → postgres-BPLSVyHM.d.ts} +1 -1
  239. package/dist/{postgres-CH1kkM5J.d.cts → postgres-CqvtFC2y.d.cts} +1 -1
  240. package/dist/profiler/index.d.cts +9 -9
  241. package/dist/profiler/index.d.ts +9 -9
  242. package/dist/provenance/index.cjs +33 -20
  243. package/dist/provenance/index.cjs.map +1 -1
  244. package/dist/provenance/index.d.cts +7 -7
  245. package/dist/provenance/index.d.ts +7 -7
  246. package/dist/provenance/index.js +24 -11
  247. package/dist/provenance/index.js.map +1 -1
  248. package/dist/{repair-validity-windows-aWX7VNvv.d.cts → repair-validity-windows-DEzCKAdy.d.cts} +7 -3
  249. package/dist/{repair-validity-windows-BtOEe2pS.d.ts → repair-validity-windows-GMdaS2AH.d.ts} +7 -3
  250. package/dist/resolve-D_H8MHtq.d.ts +1805 -0
  251. package/dist/resolve-WEW8gWws.d.cts +1805 -0
  252. package/dist/schema/index.cjs +42 -40
  253. package/dist/schema/index.d.cts +4 -6
  254. package/dist/schema/index.d.ts +4 -6
  255. package/dist/schema/index.js +15 -13
  256. package/dist/{searchable-z4BiFfHI.d.ts → searchable-C_UREI9K.d.ts} +1 -1
  257. package/dist/{searchable-C8-RrL3l.d.cts → searchable-ClgET_i7.d.cts} +1 -1
  258. package/dist/{sqlite-axLw5Lo5.d.ts → sqlite-D1mXO9Kp.d.cts} +2 -1
  259. package/dist/{sqlite-Cyx9j9o6.d.cts → sqlite-MZA3oZNB.d.ts} +2 -1
  260. package/dist/{store-CTfQ9taw.d.ts → store-CuFX7fCx.d.cts} +38 -41
  261. package/dist/{store-DR9J7JVB.d.cts → store-D-ZjXQpW.d.ts} +38 -41
  262. package/dist/{temporal-CBOrERz5.d.ts → temporal-CpyEiRY8.d.cts} +1 -1
  263. package/dist/{temporal-B4Ky4wzh.d.cts → temporal-y0Aep9Su.d.ts} +1 -1
  264. package/dist/{types-CWg4dTjj.d.ts → types-6yf0Vv-_.d.cts} +1672 -1
  265. package/dist/{types-CWg4dTjj.d.cts → types-6yf0Vv-_.d.ts} +1672 -1
  266. package/dist/{types-BScHXVM7.d.ts → types-DzJ4dlzk.d.cts} +1 -1
  267. package/dist/{types-BE921wRl.d.cts → types-_vVSB9k-.d.ts} +1 -1
  268. package/dist/{where-BWXUPV3C.d.ts → where-DuG2LCLe.d.ts} +1 -1
  269. package/dist/{where-CNtx1aLc.d.cts → where-Mhf_yyKX.d.cts} +1 -1
  270. package/package.json +5 -1
  271. package/dist/chunk-2CYI5HRH.js.map +0 -1
  272. package/dist/chunk-2GIV5X4P.js.map +0 -1
  273. package/dist/chunk-2Q45FAIE.js.map +0 -1
  274. package/dist/chunk-46UGOVRW.js.map +0 -1
  275. package/dist/chunk-5LKOVCPP.js.map +0 -1
  276. package/dist/chunk-5OWHU7Z7.cjs.map +0 -1
  277. package/dist/chunk-6LEOAIIB.js +0 -1160
  278. package/dist/chunk-6LEOAIIB.js.map +0 -1
  279. package/dist/chunk-7CCMCMJO.cjs.map +0 -1
  280. package/dist/chunk-7PRMDZIA.cjs.map +0 -1
  281. package/dist/chunk-C76WFIVZ.cjs.map +0 -1
  282. package/dist/chunk-CS6JTQQ2.cjs.map +0 -1
  283. package/dist/chunk-EDLKIQRI.js.map +0 -1
  284. package/dist/chunk-EH3JZJUM.cjs +0 -567
  285. package/dist/chunk-EH3JZJUM.cjs.map +0 -1
  286. package/dist/chunk-FX5ZW6PN.js.map +0 -1
  287. package/dist/chunk-GHZPZNFC.cjs +0 -132
  288. package/dist/chunk-GHZPZNFC.cjs.map +0 -1
  289. package/dist/chunk-GVYVGGPJ.js.map +0 -1
  290. package/dist/chunk-IHK5KA2Q.cjs +0 -262
  291. package/dist/chunk-IHK5KA2Q.cjs.map +0 -1
  292. package/dist/chunk-IRPYOHRC.js.map +0 -1
  293. package/dist/chunk-ISKCIQF2.cjs.map +0 -1
  294. package/dist/chunk-JG5XIJDY.js.map +0 -1
  295. package/dist/chunk-K2XYLVVB.cjs.map +0 -1
  296. package/dist/chunk-KWNWG4RC.cjs +0 -12
  297. package/dist/chunk-LLVOQOWE.cjs.map +0 -1
  298. package/dist/chunk-MJPZNEJZ.js.map +0 -1
  299. package/dist/chunk-MX7EKQPM.js.map +0 -1
  300. package/dist/chunk-MZ34E2GN.js.map +0 -1
  301. package/dist/chunk-OJHD3LXJ.cjs.map +0 -1
  302. package/dist/chunk-PALYTHGM.js +0 -114
  303. package/dist/chunk-PALYTHGM.js.map +0 -1
  304. package/dist/chunk-RDP6ZRSM.cjs.map +0 -1
  305. package/dist/chunk-S3SDEQMC.js +0 -532
  306. package/dist/chunk-S3SDEQMC.js.map +0 -1
  307. package/dist/chunk-TEC24ZDA.cjs +0 -1254
  308. package/dist/chunk-TEC24ZDA.cjs.map +0 -1
  309. package/dist/chunk-TP4NJTI3.cjs +0 -1192
  310. package/dist/chunk-TP4NJTI3.cjs.map +0 -1
  311. package/dist/chunk-TTCOPKUL.cjs.map +0 -1
  312. package/dist/chunk-TUVD4DFR.cjs.map +0 -1
  313. package/dist/chunk-TYGGUWMS.cjs.map +0 -1
  314. package/dist/chunk-U3Z7XKAG.js.map +0 -1
  315. package/dist/chunk-U5EL6JUV.js.map +0 -1
  316. package/dist/chunk-VTJVMP4I.js.map +0 -1
  317. package/dist/chunk-WCLMKNQE.cjs.map +0 -1
  318. package/dist/chunk-XMY2SXOH.cjs.map +0 -1
  319. package/dist/chunk-Y55DLLEG.js +0 -247
  320. package/dist/chunk-Y55DLLEG.js.map +0 -1
  321. package/dist/chunk-YA36ABIL.js.map +0 -1
  322. package/dist/chunk-ZBFZGLZE.cjs.map +0 -1
  323. package/dist/index-B0PrmE3K.d.cts +0 -1146
  324. package/dist/index-CwcXsL5R.d.ts +0 -1146
  325. package/dist/materialize-indexes-C9GG3O3C.d.ts +0 -266
  326. package/dist/materialize-indexes-CrSiW_lT.d.cts +0 -266
@@ -1,1146 +0,0 @@
1
- import { bt as KindEntity } from './types-CWg4dTjj.js';
2
- import { M as MaterializeIndexesResult, S as SchemaDiff } from './materialize-indexes-C9GG3O3C.js';
3
-
4
- /**
5
- * TypeGraph Error Hierarchy
6
- *
7
- * All errors extend TypeGraphError with:
8
- * - `code`: Machine-readable error code for programmatic handling
9
- * - `category`: Classification for error handling strategies
10
- * - `suggestion`: Optional recovery guidance for users
11
- * - `details`: Structured context about the error
12
- *
13
- * @example
14
- * ```typescript
15
- * try {
16
- * await store.nodes.Person.create({ name: "" });
17
- * } catch (error) {
18
- * if (isTypeGraphError(error)) {
19
- * console.error(error.toUserMessage());
20
- * if (isUserRecoverable(error)) {
21
- * // Show to user for correction
22
- * }
23
- * }
24
- * }
25
- * ```
26
- */
27
-
28
- /**
29
- * Error category for programmatic handling.
30
- *
31
- * - `user`: Caused by invalid input or incorrect usage. Recoverable by fixing input.
32
- * - `constraint`: Business rule or schema constraint violation. Recoverable by changing data.
33
- * - `system`: Internal error or infrastructure issue. May require investigation or retry.
34
- */
35
- type ErrorCategory = "user" | "constraint" | "system";
36
- /**
37
- * Options for TypeGraphError constructor.
38
- */
39
- type TypeGraphErrorOptions = Readonly<{
40
- /** Structured context about the error */
41
- details?: Record<string, unknown>;
42
- /** Error category for handling strategies */
43
- category: ErrorCategory;
44
- /** Recovery guidance for users */
45
- suggestion?: string;
46
- /** Underlying cause of the error */
47
- cause?: unknown;
48
- }>;
49
- /**
50
- * Base error class for all TypeGraph errors.
51
- *
52
- * Provides structured error information for both programmatic handling
53
- * and user-friendly messages.
54
- */
55
- declare class TypeGraphError extends Error {
56
- /** Machine-readable error code (e.g., "VALIDATION_ERROR") */
57
- readonly code: string;
58
- /** Error category for handling strategies */
59
- readonly category: ErrorCategory;
60
- /** Structured context about the error */
61
- readonly details: Readonly<Record<string, unknown>>;
62
- /** Recovery guidance for users */
63
- readonly suggestion?: string;
64
- constructor(message: string, code: string, options: TypeGraphErrorOptions);
65
- /**
66
- * Returns a user-friendly error message with suggestion if available.
67
- */
68
- toUserMessage(): string;
69
- /**
70
- * Returns a detailed string representation for logging.
71
- */
72
- toLogString(): string;
73
- }
74
- /**
75
- * Validation issue from Zod or custom validation.
76
- */
77
- type ValidationIssue = Readonly<{
78
- /** Path to the invalid field (e.g., "address.city") */
79
- path: string;
80
- /** Human-readable error message */
81
- message: string;
82
- /** Zod error code if from Zod validation */
83
- code?: string;
84
- /**
85
- * The identity assertion the issue is about, carried structurally so
86
- * consumers (e.g. interchange import error reporting) never have to parse
87
- * the human-readable message for it.
88
- */
89
- assertionId?: string;
90
- }>;
91
- /**
92
- * The stable {@link ValidationIssue.code} every inverted-validity-window
93
- * refusal carries, so a caller can recognize that specific failure without
94
- * matching on the message. `ValidationError`'s own code is the family-wide
95
- * `VALIDATION_ERROR`, so the discriminator lives on the issue — mirroring the
96
- * identity-import window refusal (`IDENTITY_IMPORT_INVALID_WINDOW`).
97
- *
98
- * A write carrying it was refused because `validTo` precedes the row's
99
- * effective `validFrom`: the row would have stopped being true before it
100
- * started, observable at no `asOf` coordinate at all. Zero-width windows
101
- * (`validTo === validFrom`) are legal and never raise it.
102
- */
103
- declare const INVERTED_VALIDITY_WINDOW_CODE = "INVERTED_VALIDITY_WINDOW";
104
- /**
105
- * The stable {@link ValidationIssue.code} carried by a refusal to accept a
106
- * `validFrom` the write cannot apply: the target row is LIVE, and an in-place
107
- * update never rewrites a live row's lower bound — that bound is history.
108
- * `ValidationError`'s own code is the family-wide `VALIDATION_ERROR`, so the
109
- * discriminator lives on the issue — mirroring
110
- * {@link INVERTED_VALIDITY_WINDOW_CODE}.
111
- *
112
- * Only a bound naming a DIFFERENT instant than the row already stores raises it.
113
- * Restating the stored bound is legal and writes nothing new, and a resurrection
114
- * — which does rewrite `valid_from` — applies a stated bound rather than
115
- * refusing it.
116
- *
117
- * The message names both instants: the one stated and the one the row stores, so
118
- * the caller can restate the stored bound without a second read.
119
- */
120
- declare const IMMUTABLE_VALIDITY_LOWER_BOUND_CODE = "IMMUTABLE_VALIDITY_LOWER_BOUND";
121
- /**
122
- * Stable {@link ValidationIssue.code} for an edge-id ownership mismatch.
123
- *
124
- * Edge ids are graph-global. A collection-scoped write therefore has to prove
125
- * that the stored row has the collection's kind and, when the caller supplies
126
- * endpoints, the same immutable endpoints. This refusal prevents a collection
127
- * from mutating another kind's row and prevents an upsert from silently
128
- * ignoring an attempted repoint.
129
- */
130
- declare const EDGE_IDENTITY_MISMATCH_CODE = "EDGE_IDENTITY_MISMATCH";
131
- /**
132
- * The stable {@link ValidationIssue.code} every "this id is already taken"
133
- * create refusal carries, whichever way the create found out: its own existence
134
- * probe, or the engine refusing the INSERT. `ValidationError`'s own code is the
135
- * family-wide `VALIDATION_ERROR`, so the discriminator lives on the issue —
136
- * mirroring {@link INVERTED_VALIDITY_WINDOW_CODE}.
137
- *
138
- * `details.entityType` says whether a node or an edge was refused and
139
- * `details.kind` names its kind. `details.id` names the taken id, and is absent
140
- * only when the refused statement inserted MORE THAN ONE row: the engine reports
141
- * that the statement collided without saying which row did.
142
- */
143
- declare const ENTITY_ALREADY_EXISTS_CODE = "ENTITY_ALREADY_EXISTS";
144
- /**
145
- * Details for ValidationError.
146
- */
147
- type ValidationErrorDetails = Readonly<{
148
- /** Type of entity being validated */
149
- entityType?: KindEntity;
150
- /** Kind/type name of the entity */
151
- kind?: string;
152
- /** Operation being performed */
153
- operation?: "create" | "update" | "delete" | "hardDelete";
154
- /** Entity ID if updating */
155
- id?: string;
156
- /** Individual validation issues */
157
- issues: readonly ValidationIssue[];
158
- }>;
159
- /**
160
- * Thrown when schema validation fails during node or edge operations.
161
- *
162
- * @example
163
- * ```typescript
164
- * try {
165
- * await store.nodes.Person.create({ email: "invalid" });
166
- * } catch (error) {
167
- * if (error instanceof ValidationError) {
168
- * console.log(error.details.issues);
169
- * // [{ path: "email", message: "Invalid email" }]
170
- * }
171
- * }
172
- * ```
173
- */
174
- declare class ValidationError extends TypeGraphError {
175
- readonly details: ValidationErrorDetails;
176
- constructor(message: string, details: ValidationErrorDetails, options?: {
177
- cause?: unknown;
178
- suggestion?: string;
179
- });
180
- }
181
- /**
182
- * Details for NodeNotFoundError.
183
- */
184
- type NodeNotFoundErrorDetails = Readonly<{
185
- kind: string;
186
- id: string;
187
- }>;
188
- /**
189
- * Thrown when a node is not found.
190
- *
191
- * @example
192
- * ```typescript
193
- * try {
194
- * await store.nodes.Person.get("nonexistent-id");
195
- * } catch (error) {
196
- * if (error instanceof NodeNotFoundError) {
197
- * console.log(error.details.kind, error.details.id);
198
- * }
199
- * }
200
- * ```
201
- */
202
- declare class NodeNotFoundError extends TypeGraphError {
203
- readonly details: NodeNotFoundErrorDetails;
204
- constructor(kind: string, id: string, options?: {
205
- cause?: unknown;
206
- });
207
- }
208
- /**
209
- * Details for EdgeNotFoundError.
210
- */
211
- type EdgeNotFoundErrorDetails = Readonly<{
212
- kind: string;
213
- id: string;
214
- }>;
215
- /**
216
- * Thrown when an edge is not found.
217
- */
218
- declare class EdgeNotFoundError extends TypeGraphError {
219
- readonly details: EdgeNotFoundErrorDetails;
220
- constructor(kind: string, id: string, options?: {
221
- cause?: unknown;
222
- });
223
- }
224
- /**
225
- * Details for KindNotFoundError.
226
- */
227
- type KindNotFoundErrorDetails = Readonly<{
228
- kindName: string;
229
- entity: KindEntity;
230
- graphId?: string;
231
- }>;
232
- /**
233
- * Thrown when an operation references a kind that isn't registered on
234
- * the graph — `getNodeCollectionOrThrow` against an unknown kind, a
235
- * `materializeIndexes({ kinds })` filter naming a missing kind, an
236
- * extension referencing an unresolved endpoint, search facade typos,
237
- * etc. Carries the offending `kindName` and `entity` plus the host
238
- * `graphId` so logs are unambiguous when multiple stores share a
239
- * process.
240
- */
241
- declare class KindNotFoundError extends TypeGraphError {
242
- readonly details: KindNotFoundErrorDetails;
243
- readonly kindName: string;
244
- readonly entity: KindEntity;
245
- constructor(kindName: string, entity: KindEntity, options?: Readonly<{
246
- graphId?: string;
247
- suggestion?: string;
248
- cause?: unknown;
249
- }>);
250
- }
251
- /**
252
- * Details for NodeConstraintNotFoundError.
253
- */
254
- type NodeConstraintNotFoundErrorDetails = Readonly<{
255
- constraintName: string;
256
- kind: string;
257
- }>;
258
- /**
259
- * Thrown when a uniqueness constraint name is not found on a node kind.
260
- */
261
- declare class NodeConstraintNotFoundError extends TypeGraphError {
262
- readonly details: NodeConstraintNotFoundErrorDetails;
263
- constructor(constraintName: string, kind: string, options?: {
264
- cause?: unknown;
265
- });
266
- }
267
- /**
268
- * Details for NodeIndexNotFoundError.
269
- */
270
- type NodeIndexNotFoundErrorDetails = Readonly<{
271
- indexName: string;
272
- kind: string;
273
- }>;
274
- /**
275
- * Thrown when a declared node index name is not found on a node kind.
276
- */
277
- declare class NodeIndexNotFoundError extends TypeGraphError {
278
- readonly details: NodeIndexNotFoundErrorDetails;
279
- constructor(indexName: string, kind: string, options?: {
280
- cause?: unknown;
281
- });
282
- }
283
- /**
284
- * Details for EndpointNotFoundError.
285
- */
286
- type EndpointNotFoundErrorDetails = Readonly<{
287
- edgeKind: string;
288
- endpoint: "from" | "to";
289
- nodeKind: string;
290
- nodeId: string;
291
- }>;
292
- /**
293
- * Thrown when edge endpoint node does not exist or is deleted.
294
- */
295
- declare class EndpointNotFoundError extends TypeGraphError {
296
- readonly details: EndpointNotFoundErrorDetails;
297
- constructor(details: EndpointNotFoundErrorDetails, options?: {
298
- cause?: unknown;
299
- });
300
- }
301
- /**
302
- * Details for EndpointError.
303
- */
304
- type EndpointErrorDetails = Readonly<{
305
- edgeKind: string;
306
- endpoint: "from" | "to";
307
- actualKind: string;
308
- expectedKinds: readonly string[];
309
- }>;
310
- /**
311
- * Thrown when edge endpoint has wrong node type.
312
- */
313
- declare class EndpointError extends TypeGraphError {
314
- readonly details: EndpointErrorDetails;
315
- constructor(details: EndpointErrorDetails, options?: {
316
- cause?: unknown;
317
- });
318
- }
319
- /**
320
- * Details for UniquenessError.
321
- */
322
- type UniquenessErrorDetails = Readonly<{
323
- constraintName: string;
324
- kind: string;
325
- existingId: string;
326
- newId: string;
327
- fields: readonly string[];
328
- /**
329
- * The claim row's `node_kind` — the axis this violation was found at.
330
- * Optional so a third-party backend implementing the documented "throws
331
- * `UniquenessError`" contract keeps working unchanged; when a throw site
332
- * omits it, a caller loses only the disambiguation this field exists for,
333
- * never correctness of the refusal itself.
334
- *
335
- * `constraintName` alone cannot tell two disjoint pairs apart — every
336
- * `disjointWith` pair shares the single reserved `DISJOINT_CONSTRAINT_NAME`
337
- * — so `mapClaimRefusal` (`store/claims/node-claims.ts`) matches on this
338
- * field together with `constraintName` and the key, which is exactly the
339
- * claim row's primary key and therefore unambiguous.
340
- */
341
- axis?: string;
342
- }>;
343
- /**
344
- * Thrown when uniqueness constraint is violated.
345
- */
346
- declare class UniquenessError extends TypeGraphError {
347
- readonly details: UniquenessErrorDetails;
348
- constructor(details: UniquenessErrorDetails, options?: {
349
- cause?: unknown;
350
- });
351
- }
352
- /**
353
- * Details for CardinalityError.
354
- */
355
- type CardinalityErrorDetails = Readonly<{
356
- edgeKind: string;
357
- fromKind: string;
358
- fromId: string;
359
- cardinality: string;
360
- existingCount: number;
361
- }>;
362
- /**
363
- * Thrown when cardinality constraint is violated.
364
- */
365
- declare class CardinalityError extends TypeGraphError {
366
- readonly details: CardinalityErrorDetails;
367
- constructor(details: CardinalityErrorDetails, options?: {
368
- cause?: unknown;
369
- });
370
- }
371
- /**
372
- * Details for DisjointError.
373
- */
374
- type DisjointErrorDetails = Readonly<{
375
- nodeId: string;
376
- attemptedKind: string;
377
- conflictingKind: string;
378
- }>;
379
- /**
380
- * Thrown when disjointness constraint is violated.
381
- *
382
- * Disjoint types cannot share the same ID - a node cannot be both
383
- * a Person and an Organization if they are declared disjoint.
384
- */
385
- declare class DisjointError extends TypeGraphError {
386
- readonly details: DisjointErrorDetails;
387
- constructor(details: DisjointErrorDetails, options?: {
388
- cause?: unknown;
389
- });
390
- }
391
- type IdentityContradictionErrorDetails = Readonly<{
392
- /**
393
- * The identity write that could not stand. `merge` is the post-write
394
- * affected-class assertion a graph merge runs inside its commit
395
- * transaction, which names the whole merge rather than a single assertion
396
- * because the contradiction is a property of the state the merge would
397
- * leave behind.
398
- */
399
- operation: "assertSame" | "assertDifferent" | "fold" | "import" | "merge";
400
- a: Readonly<{
401
- kind: string;
402
- id: string;
403
- }>;
404
- b: Readonly<{
405
- kind: string;
406
- id: string;
407
- }>;
408
- reason: "different-assertion" | "same-class" | "disjoint-kinds";
409
- conflictingAssertionId?: string;
410
- conflictingKinds?: readonly [string, string];
411
- }>;
412
- /** Thrown when an identity mutation would make the ledger contradictory. */
413
- declare class IdentityContradictionError extends TypeGraphError {
414
- readonly details: IdentityContradictionErrorDetails;
415
- constructor(details: IdentityContradictionErrorDetails, options?: Readonly<{
416
- cause?: unknown;
417
- }>);
418
- }
419
- type IdentityValidityWindowErrorDetails = Readonly<{
420
- reason: "future-valid-from" | "future-valid-to" | "inverted" | "overlapping-open-window";
421
- validFrom: string;
422
- validTo?: string;
423
- operationInstant: string;
424
- }>;
425
- /** Thrown when an identity assertion validity window cannot be applied. */
426
- declare class IdentityValidityWindowError extends TypeGraphError {
427
- readonly details: IdentityValidityWindowErrorDetails;
428
- constructor(details: IdentityValidityWindowErrorDetails);
429
- }
430
- type IdentityEndpointValidityErrorDetails = Readonly<{
431
- endpoint: Readonly<{
432
- kind: string;
433
- id: string;
434
- }>;
435
- assertionWindow: Readonly<{
436
- validFrom: string;
437
- validTo?: string;
438
- }>;
439
- endpointWindow: Readonly<{
440
- validFrom?: string;
441
- validTo?: string;
442
- deletedAt?: string;
443
- }>;
444
- }>;
445
- /** Thrown when an identity endpoint does not exist throughout the assertion window. */
446
- declare class IdentityEndpointValidityError extends TypeGraphError {
447
- readonly details: IdentityEndpointValidityErrorDetails;
448
- constructor(details: IdentityEndpointValidityErrorDetails);
449
- }
450
- type IdentitySeparationViolationErrorDetails = Readonly<{
451
- graphId: string;
452
- /**
453
- * `"database"` when the CHECK constraint on the separation relation aborted
454
- * the write — the backstop firing as designed. `"writer"` when the write was
455
- * accepted, which means the relation was provisioned without its constraint
456
- * and only the writer's own re-check caught the contradiction.
457
- */
458
- enforcedBy: "database" | "writer";
459
- /** The single class key both endpoints collapsed onto. */
460
- classKey: string;
461
- /** The `different` assertion whose endpoints landed in one class. */
462
- assertionId: string;
463
- a: Readonly<{
464
- kind: string;
465
- id: string;
466
- }>;
467
- b: Readonly<{
468
- kind: string;
469
- id: string;
470
- }>;
471
- }>;
472
- /**
473
- * Thrown when the derived separation relation refuses a write that would place
474
- * both endpoints of a current `different` assertion in one identity class.
475
- *
476
- * This is the database-level backstop beneath the plan-time simulation and the
477
- * applier's validation. Reaching it means an earlier layer let a contradiction
478
- * through: the transaction is aborted rather than committed, but the layer that
479
- * should have refused it typed and early is worth investigating.
480
- */
481
- declare class IdentitySeparationViolationError extends TypeGraphError {
482
- readonly details: IdentitySeparationViolationErrorDetails;
483
- constructor(details: IdentitySeparationViolationErrorDetails, options?: Readonly<{
484
- cause?: unknown;
485
- }>);
486
- }
487
- /**
488
- * Details for RestrictedDeleteError.
489
- */
490
- type RestrictedDeleteErrorDetails = Readonly<{
491
- nodeKind: string;
492
- nodeId: string;
493
- edgeCount: number;
494
- edgeKinds: readonly string[];
495
- }>;
496
- /**
497
- * Thrown when deletion is blocked due to existing edges (restrict behavior).
498
- */
499
- declare class RestrictedDeleteError extends TypeGraphError {
500
- readonly details: RestrictedDeleteErrorDetails;
501
- constructor(details: RestrictedDeleteErrorDetails, options?: {
502
- cause?: unknown;
503
- });
504
- }
505
- /**
506
- * Details for VersionConflictError.
507
- */
508
- type VersionConflictErrorDetails = Readonly<{
509
- kind: string;
510
- id: string;
511
- expectedVersion: number;
512
- actualVersion: number;
513
- }>;
514
- /**
515
- * Thrown when optimistic locking detects a concurrent modification.
516
- *
517
- * This occurs when two operations try to update the same entity simultaneously.
518
- * The operation with the stale version fails.
519
- */
520
- declare class VersionConflictError extends TypeGraphError {
521
- readonly details: VersionConflictErrorDetails;
522
- constructor(details: VersionConflictErrorDetails, options?: {
523
- cause?: unknown;
524
- });
525
- }
526
- /**
527
- * Details for SchemaMismatchError.
528
- */
529
- type SchemaMismatchErrorDetails = Readonly<{
530
- graphId: string;
531
- expectedHash: string;
532
- actualHash: string;
533
- }>;
534
- /**
535
- * Thrown when the schema in code doesn't match the schema in the database.
536
- */
537
- declare class SchemaMismatchError extends TypeGraphError {
538
- readonly details: SchemaMismatchErrorDetails;
539
- constructor(details: SchemaMismatchErrorDetails, options?: {
540
- cause?: unknown;
541
- });
542
- }
543
- /**
544
- * Details for MigrationError.
545
- */
546
- /**
547
- * Why a migration operation failed. A stable discriminant so callers can
548
- * branch on the outcome instead of matching the message text, which is free
549
- * to be reworded in any release.
550
- */
551
- declare const MIGRATION_FAILURE_REASONS: readonly ["schema-behind", "breaking-change", "no-active-version", "version-not-found", "kind-removal"];
552
- type MigrationFailureReason = (typeof MIGRATION_FAILURE_REASONS)[number];
553
- /**
554
- * Structured context for a {@link MigrationError}, discriminated on `reason`.
555
- *
556
- * Modelled as a union rather than one shape with optional fields so the
557
- * payload a reason promises is the payload it must carry: narrowing on
558
- * `reason === "kind-removal"` gives you a non-optional `droppedKinds`, and the
559
- * constructor cannot be handed a `kind-removal` without one.
560
- *
561
- * The common fields are repeated per member rather than factored into a shared
562
- * base alias, which would be a hoisted-unexported symbol on the public
563
- * entrypoint.
564
- */
565
- type MigrationErrorDetails = Readonly<{
566
- graphId: string;
567
- fromVersion: number;
568
- toVersion: number;
569
- /** Stable discriminant — branch on this, not the message. */
570
- reason: "schema-behind" | "breaking-change";
571
- /**
572
- * The structured diff behind the failure. Carries per-change `severity`
573
- * alongside `hasChanges` / `hasBreakingChanges`, so a caller can decide
574
- * "additive → proceed, incompatible → ask the user" without re-querying.
575
- */
576
- diff?: SchemaDiff;
577
- }> | Readonly<{
578
- graphId: string;
579
- fromVersion: number;
580
- toVersion: number;
581
- reason: "no-active-version" | "version-not-found";
582
- }> | Readonly<{
583
- graphId: string;
584
- fromVersion: number;
585
- toVersion: number;
586
- reason: "kind-removal";
587
- /**
588
- * The dropped kinds that still held rows, and so caused the refusal. A
589
- * kind the commit drops but that is already empty is permitted and does
590
- * NOT appear here. Both lists are sorted; at least one is non-empty.
591
- */
592
- droppedKinds: Readonly<{
593
- nodes: readonly string[];
594
- edges: readonly string[];
595
- }>;
596
- }>;
597
- /**
598
- * Thrown when schema migration fails.
599
- */
600
- declare class MigrationError extends TypeGraphError {
601
- readonly details: MigrationErrorDetails;
602
- constructor(message: string, details: MigrationErrorDetails, options?: {
603
- cause?: unknown;
604
- });
605
- }
606
- /**
607
- * Details for EagerMaterializationError.
608
- */
609
- type EagerMaterializationErrorDetails = Readonly<{
610
- graphId: string;
611
- failedIndexNames: readonly string[];
612
- }>;
613
- /**
614
- * Thrown by `Store.evolve(extension, { eager })` when the schema
615
- * commit succeeded but the follow-on `materializeIndexes()` produced
616
- * one or more failed entries.
617
- *
618
- * Recovery: the schema commit is NOT rolled back. The new `Store` is
619
- * fully constructed and (when `options.ref` was supplied) `ref.current`
620
- * already points to it — the caller can read the new store via the ref
621
- * and decide how to handle the failed indexes (retry, skip, alert).
622
- * The full `MaterializeIndexesResult` is attached as `.materialization`.
623
- *
624
- * @example
625
- * ```ts
626
- * const ref = { current: store };
627
- * try {
628
- * await store.evolve(extension, { ref, eager: {} });
629
- * } catch (error) {
630
- * if (error instanceof EagerMaterializationError) {
631
- * // schema is committed; ref.current is the new store
632
- * log.warn(
633
- * { failed: error.failedIndexNames },
634
- * "indexes did not materialize; will retry",
635
- * );
636
- * await ref.current.materializeIndexes();
637
- * } else {
638
- * throw error;
639
- * }
640
- * }
641
- * ```
642
- */
643
- declare class EagerMaterializationError extends TypeGraphError {
644
- readonly details: EagerMaterializationErrorDetails;
645
- /**
646
- * The full materialization result, including successful and failed
647
- * entries. Same shape as `Store.materializeIndexes()` returns.
648
- */
649
- readonly materialization: MaterializeIndexesResult;
650
- constructor(materialization: MaterializeIndexesResult, graphId: string);
651
- /**
652
- * Names of just the indexes that failed — derived from
653
- * `materialization.results` so the two views can never disagree.
654
- */
655
- get failedIndexNames(): readonly string[];
656
- }
657
- /**
658
- * Details for StaleVersionError. `actual` is the active version the rejecting
659
- * read observed, and is `0` only when the graph genuinely has no active version
660
- * (an initial-commit race where another writer initialized first, or a graph
661
- * whose schema rows were removed out of band). A concurrent advance always
662
- * reports the newly active version, so `0` is a reliable signal of absence
663
- * rather than of contention.
664
- */
665
- type StaleVersionErrorDetails = Readonly<{
666
- graphId: string;
667
- expected: number;
668
- actual: number;
669
- }>;
670
- /**
671
- * Thrown by `commitSchemaVersion`, `setActiveVersion`, and the schema write
672
- * fence a schema-managed Store write takes, when the caller's view of the
673
- * active schema version is out of date — another writer has already advanced
674
- * it.
675
- *
676
- * Recovery: re-read the active version with `getActiveSchema(graphId)`,
677
- * recompute against the new baseline, and retry. This is a routine
678
- * concurrency signal, not a bug.
679
- */
680
- declare class StaleVersionError extends TypeGraphError {
681
- readonly details: StaleVersionErrorDetails;
682
- constructor(details: StaleVersionErrorDetails, options?: {
683
- cause?: unknown;
684
- });
685
- }
686
- /**
687
- * Details for SchemaContentConflictError.
688
- */
689
- type SchemaContentConflictErrorDetails = Readonly<{
690
- graphId: string;
691
- version: number;
692
- existingHash: string;
693
- incomingHash: string;
694
- }>;
695
- /**
696
- * Thrown by `commitSchemaVersion` when a row already exists at the
697
- * target version with a *different* schema hash — i.e. two writers
698
- * committed materially different schemas at the same version number.
699
- *
700
- * Distinct from `StaleVersionError`: this is not a refetch-and-retry
701
- * situation, it's a content disagreement that needs operator
702
- * intervention. Typically caused by inconsistent application
703
- * deployments writing schemas that hash differently.
704
- */
705
- declare class SchemaContentConflictError extends TypeGraphError {
706
- readonly details: SchemaContentConflictErrorDetails;
707
- constructor(details: SchemaContentConflictErrorDetails, options?: {
708
- cause?: unknown;
709
- });
710
- }
711
- /**
712
- * Thrown when graph configuration is invalid.
713
- *
714
- * This includes invalid schema definitions, ontology conflicts,
715
- * and other configuration issues detected at graph creation time.
716
- */
717
- declare class ConfigurationError extends TypeGraphError {
718
- constructor(message: string, details?: Record<string, unknown>, options?: {
719
- cause?: unknown;
720
- suggestion?: string;
721
- });
722
- }
723
- /**
724
- * Why a destructive contribution rebuild is refused.
725
- *
726
- * - `vector-source-unavailable` — the projection is vector storage.
727
- * TypeGraph stores caller-supplied embeddings and nothing else: the
728
- * vectors exist only in the table a rebuild would drop, so there is no
729
- * source to reconstruct them from. Dropping anyway would silently
730
- * destroy the embeddings and hand back storage that looks healthy and
731
- * returns nothing. `store.reembedVectorField(kind, fieldPath, {
732
- * embed })` is the sanctioned destructive path — it takes the callback
733
- * that can regenerate what the drop destroys.
734
- * - `no-drop-ddl` — the active strategy declares no `dropDdl` for the
735
- * contribution, so TypeGraph does not know how to tear its storage
736
- * down. Synthesizing a `DROP TABLE` from the resolved name would
737
- * guess at a teardown the strategy never sanctioned.
738
- * - `no-schema-fence` — the backend exposes no transactional schema
739
- * fence (`schemaWriteTransaction`), so the drop, recreate, refill, and
740
- * stamp could not be made atomic. Running them unfenced could leave
741
- * storage attested but empty, or a concurrent schema writer
742
- * interleaved with the drop.
743
- * - `shared-storage-in-use` — the contribution's recorded shape is stale,
744
- * so only recreating its storage repairs it, but that storage is one
745
- * table holding other graphs' rows as well. Their content is derived
746
- * from their own nodes through their own schemas, so this process cannot
747
- * put it back. A rebuild that dropped anyway would leave every other
748
- * graph's search silently empty; one that re-stamped this graph's marker
749
- * without the drop would bless a physical shape nothing verified.
750
- */
751
- type ContributionRebuildRefusal = "vector-source-unavailable" | "no-drop-ddl" | "no-schema-fence" | "shared-storage-in-use";
752
- /**
753
- * Thrown when `store.rebuildContribution()` cannot honor a rebuild.
754
- *
755
- * A refusal, never a partial attempt: nothing has been dropped when this
756
- * throws. The point is that the alternative — proceeding — destroys data
757
- * that cannot be reconstructed, so the operation declines instead of
758
- * quietly doing less than its name promises.
759
- */
760
- declare class ContributionRebuildUnsupportedError extends TypeGraphError {
761
- readonly reason: ContributionRebuildRefusal;
762
- constructor(reason: ContributionRebuildRefusal, details?: Readonly<Record<string, unknown>>, options?: {
763
- cause?: unknown;
764
- });
765
- }
766
- /**
767
- * Thrown when an iterative graph algorithm exhausts its caller-visible round
768
- * budget before reaching its convergence predicate.
769
- */
770
- declare class GraphAlgorithmConvergenceError extends TypeGraphError {
771
- constructor(algorithm: string, maxIterations: number, options?: Readonly<{
772
- oscillating?: boolean;
773
- }>);
774
- }
775
- /** Stable reasons a weighted traversal can reject an edge's weight value. */
776
- type InvalidEdgeWeightReason = "missing" | "negative" | "non_numeric" | "out_of_range";
777
- /** Details for InvalidEdgeWeightError. */
778
- type InvalidEdgeWeightErrorDetails = Readonly<{
779
- /** Id of the first offending edge, in binary-collation order. */
780
- edgeId: string;
781
- /** Kind of the offending edge. */
782
- edgeKind: string;
783
- /** The audited weight property. */
784
- property: string;
785
- /** Why the weight was rejected. */
786
- reason: InvalidEdgeWeightReason;
787
- /** The offending value, when one was present and renderable. */
788
- value?: string;
789
- }>;
790
- /**
791
- * Thrown when a weighted graph algorithm finds an edge whose weight property
792
- * violates the weighted-traversal contract (missing without a default,
793
- * non-numeric, or negative). Raised before any traversal rounds run, so a
794
- * weighted call either observes a fully valid weight domain or fails fast.
795
- */
796
- declare class InvalidEdgeWeightError extends TypeGraphError {
797
- readonly details: InvalidEdgeWeightErrorDetails;
798
- constructor(details: InvalidEdgeWeightErrorDetails);
799
- }
800
- /** Thrown when an operation requires a backend capability it does not expose. */
801
- declare class UnsupportedBackendCapabilityError extends TypeGraphError {
802
- constructor(operation: string, capability: string, details?: Readonly<Record<string, unknown>>, suggestion?: string);
803
- }
804
- /** Stable reasons an intentionally trusted initial import can be rejected. */
805
- type TrustedImportErrorReason = "backend_unsupported" | "database_not_empty" | "fulltext_unsupported" | "history_unsupported" | "identity_unsupported" | "invalid_stream" | "revision_tracking_unsupported" | "uniqueness_unsupported" | "vector_unsupported";
806
- /** Thrown when the trusted initial-import contract is unavailable or violated. */
807
- declare class TrustedImportError extends TypeGraphError {
808
- constructor(message: string, reason: TrustedImportErrorReason, details?: Readonly<Record<string, unknown>>, options?: Readonly<{
809
- cause?: unknown;
810
- suggestion?: string;
811
- }>);
812
- }
813
- /**
814
- * Thrown to a graph export stream's consumer when the caller's `AbortSignal`
815
- * settled the stream instead of it reaching its end.
816
- *
817
- * Raised only after the export has given back everything it took, so receiving
818
- * it means the connection is already usable again. WHAT it took depends on the
819
- * backend: an export on one reporting `capabilities.transactions` holds a
820
- * repeatable-read snapshot (and, on a serialized connection, that connection's
821
- * stream lease), and both are settled before this is thrown; an export on a
822
- * backend without transactions holds neither, and its remaining reads are
823
- * simply abandoned — its already-delivered chunks were never one snapshot to
824
- * begin with. The message says which case applies. `cause` carries the signal's
825
- * own `reason` when the caller supplied one.
826
- */
827
- declare class ExportStreamCancelledError extends TypeGraphError {
828
- constructor(message: string, details?: Readonly<Record<string, unknown>>, options?: Readonly<{
829
- cause?: unknown;
830
- suggestion?: string;
831
- }>);
832
- }
833
- /**
834
- * Thrown when an export stream's consumer leaves a delivered chunk
835
- * unacknowledged for longer than its configured idle timeout.
836
- *
837
- * The timeout measures consumer idleness only: it starts when a chunk is
838
- * yielded and stops when the consumer asks for the next one. Receiving this
839
- * error means the timed-out export has settled its snapshot transaction and
840
- * released any serialized connection lease it held. `details.idleTimeoutMs`
841
- * carries the configured bound.
842
- */
843
- declare class ExportStreamIdleTimeoutError extends TypeGraphError {
844
- constructor(graphId: string, idleTimeoutMs: number, transactional: boolean);
845
- }
846
- /**
847
- * The stable `details.code` values raised by the recorded-capture guards on a
848
- * history- or revision-tracked store. These are the sanctioned branch points
849
- * for a portable caller that must pick a transaction strategy without
850
- * substring-matching {@link ConfigurationError} messages.
851
- *
852
- * - `RECORDED_CAPTURE_REQUIRES_CALLBACK_TRANSACTION`: `store.withTransaction`
853
- * was called on a history-enabled store, which has no flush point before the
854
- * caller commits — use `store.withRecordedTransaction` instead.
855
- * - `RECORDED_CAPTURE_RAW_SQL_DISABLED`: a raw SQL escape (`tx.sql`,
856
- * `backend.executeStatement`/`executeDdl`) was reached on a history-enabled
857
- * store, where it would bypass recorded-time capture.
858
- * - `REVISION_TRACKING_RAW_SQL_DISABLED`: the same raw SQL escape on a
859
- * revision-tracked store, where it would bypass the revision anchor.
860
- *
861
- * @see isRecordedCaptureGuardError
862
- */
863
- declare const RECORDED_CAPTURE_GUARD_CODES: readonly ["RECORDED_CAPTURE_REQUIRES_CALLBACK_TRANSACTION", "RECORDED_CAPTURE_RAW_SQL_DISABLED", "REVISION_TRACKING_RAW_SQL_DISABLED"];
864
- /** A stable, branchable code raised by a recorded-capture guard. */
865
- type RecordedCaptureGuardCode = (typeof RECORDED_CAPTURE_GUARD_CODES)[number];
866
- /**
867
- * A {@link ConfigurationError} narrowed to carry a {@link RecordedCaptureGuardCode}
868
- * in `details.code` — the shape {@link isRecordedCaptureGuardError} guarantees.
869
- * `C` narrows `details.code` to a single code when the guard was called with a
870
- * specific one; it defaults to the full union.
871
- */
872
- type RecordedCaptureGuardError<C extends RecordedCaptureGuardCode = RecordedCaptureGuardCode> = ConfigurationError & Readonly<{
873
- details: Readonly<{
874
- code: C;
875
- }>;
876
- }>;
877
- /**
878
- * Type guard for the recorded-capture guard errors, so a portable caller can
879
- * branch on the invariant a store enforced instead of substring-matching the
880
- * message. Pass `code` to narrow to a single guard; omit it to match any.
881
- *
882
- * Distinguishes "history capture forbids raw SQL here" from "this backend has
883
- * no transactions" (the latter carries no guard code — see
884
- * `TransactionContext.sqlAvailability` for the capability discriminant).
885
- *
886
- * Passing `code` also narrows `details.code` to that literal on the guarded
887
- * branch, so a caller can read the payload without re-checking.
888
- *
889
- * @example
890
- * ```typescript
891
- * // `withTransaction` is a compile error on a history-enabled store, so widen
892
- * // to the base Store surface to reach the runtime guard this branches on.
893
- * const store: Store<typeof graph> = historyStore;
894
- * try {
895
- * store.withTransaction(externalTx);
896
- * } catch (error) {
897
- * if (
898
- * isRecordedCaptureGuardError(
899
- * error,
900
- * "RECORDED_CAPTURE_REQUIRES_CALLBACK_TRANSACTION",
901
- * )
902
- * ) {
903
- * // error.details.code is now the literal, not the union.
904
- * await historyStore.withRecordedTransaction(externalTx, run);
905
- * } else {
906
- * throw error;
907
- * }
908
- * }
909
- * ```
910
- */
911
- declare function isRecordedCaptureGuardError<C extends RecordedCaptureGuardCode>(error: unknown, code: C): error is RecordedCaptureGuardError<C>;
912
- declare function isRecordedCaptureGuardError(error: unknown): error is RecordedCaptureGuardError;
913
- /**
914
- * Why a store's strategy-owned storage is not usable on the current
915
- * connection. Drives the {@link StoreNotInitializedError} message and
916
- * is surfaced in `details.reason` for programmatic handling.
917
- *
918
- * - `missing`: no durable materialization marker exists — the database
919
- * was never initialized for this graph's runtime contributions.
920
- * - `stale`: a marker exists but its recorded signature no longer
921
- * matches the resolved contribution DDL (strategy swap or DDL drift).
922
- * The hot path refuses rather than silently re-materializing.
923
- * - `failed`: the most recent boot-time materialization attempt
924
- * recorded an error. Boot may retry; the hot path refuses.
925
- */
926
- type StoreNotInitializedReason = "missing" | "stale" | "failed";
927
- /**
928
- * Details for StoreNotInitializedError. `graphId`/`reason` are always
929
- * present; callers may merge additional context (e.g. `logicalName`) via
930
- * `options.details`.
931
- */
932
- type StoreNotInitializedErrorDetails = Readonly<{
933
- graphId: string;
934
- reason: StoreNotInitializedReason;
935
- }> & Readonly<Record<string, unknown>>;
936
- /**
937
- * Thrown when a fulltext- or vector-dependent operation runs against a
938
- * connection whose strategy-owned storage has not been durably materialized.
939
- *
940
- * `createStore()` is a synchronous, zero-I/O attach: it never creates
941
- * tables, repairs DDL, or writes materialization markers. The durable
942
- * marker is written exclusively by the async boot path
943
- * (`createStoreWithSchema`). When a fulltext or embedding read/write — or
944
- * an adopted/business transaction — observes no valid marker, it refuses
945
- * loudly here instead of lazily emitting DDL on the hot path.
946
- */
947
- declare class StoreNotInitializedError extends TypeGraphError {
948
- readonly details: StoreNotInitializedErrorDetails;
949
- constructor(graphId: string, reason: StoreNotInitializedReason, options?: {
950
- cause?: unknown;
951
- details?: Readonly<Record<string, unknown>> & Readonly<{
952
- graphId?: never;
953
- reason?: never;
954
- }>;
955
- });
956
- }
957
- /** Details for a runtime contribution whose durable marker outlived storage. */
958
- type ContributionUnavailableErrorDetails = Readonly<{
959
- graphId: string;
960
- logicalName: "fulltext";
961
- physicalName: string;
962
- state: "physical-storage-missing";
963
- }>;
964
- /**
965
- * Thrown when a gated fulltext operation discovers that materialized storage
966
- * disappeared after its durable marker recorded successful initialization.
967
- */
968
- declare class ContributionUnavailableError extends TypeGraphError {
969
- readonly details: ContributionUnavailableErrorDetails;
970
- constructor(graphId: string, physicalName: string, options?: Readonly<{
971
- cause?: unknown;
972
- }>);
973
- }
974
- /**
975
- * Details for DatabaseOperationError.
976
- */
977
- type DatabaseOperationErrorDetails = Readonly<{
978
- operation: string;
979
- entity: string;
980
- /**
981
- * `"duplicate_key"` means the engine refused the write because the entity's
982
- * identity is already taken — the shape a concurrent create of the same new id
983
- * produces on an engine that does not serialize the two writers. It is a
984
- * *classified* driver failure, so callers that own a better error for the
985
- * condition (the create paths, which report it as "already exists") translate
986
- * it rather than surfacing it.
987
- */
988
- reason?: "no_row_returned" | "duplicate_key";
989
- /**
990
- * The entities the failed statement tried to insert, carried structurally so a
991
- * translating caller never has to parse the driver's message for them. One
992
- * element for a single insert; for a batch, every row in the failing chunk —
993
- * the engine reports the collision without saying which row lost.
994
- */
995
- attempted?: readonly Readonly<{
996
- kind: string;
997
- id: string;
998
- }>[];
999
- }>;
1000
- /**
1001
- * Thrown when a database operation fails unexpectedly.
1002
- *
1003
- * This indicates a system-level failure in the database backend,
1004
- * not a user-recoverable error.
1005
- */
1006
- declare class DatabaseOperationError extends TypeGraphError {
1007
- readonly details: DatabaseOperationErrorDetails;
1008
- constructor(message: string, details: DatabaseOperationErrorDetails, options?: {
1009
- cause?: unknown;
1010
- });
1011
- }
1012
- /**
1013
- * Details for EmbeddingDimensionChangedError.
1014
- */
1015
- type EmbeddingDimensionChangedErrorDetails = Readonly<{
1016
- kind: string;
1017
- fieldPath: string;
1018
- declaredDimensions?: number;
1019
- storedDimensions?: number;
1020
- }>;
1021
- /**
1022
- * Thrown when an embedding field's declared dimension no longer matches the
1023
- * dimension of its materialized per-field storage — i.e. a field's
1024
- * `embedding(N)` was changed to `embedding(M)`. The stored vectors are invalid
1025
- * under the new dimension and cannot be converted, only recomputed, so this is
1026
- * a deliberate app-driven migration: call
1027
- * `store.reembedVectorField(kind, fieldPath, ...)` to recreate the storage at
1028
- * the new dimension and re-embed existing rows.
1029
- */
1030
- declare class EmbeddingDimensionChangedError extends TypeGraphError {
1031
- readonly details: EmbeddingDimensionChangedErrorDetails;
1032
- constructor(message: string, details: EmbeddingDimensionChangedErrorDetails, options?: {
1033
- cause?: unknown;
1034
- });
1035
- }
1036
- /**
1037
- * Thrown when a query predicate cannot be compiled for the target database.
1038
- */
1039
- declare class UnsupportedPredicateError extends TypeGraphError {
1040
- constructor(message: string, details?: Readonly<Record<string, unknown>>, options?: {
1041
- cause?: unknown;
1042
- suggestion?: string;
1043
- });
1044
- }
1045
- /**
1046
- * Thrown when a compiler invariant is violated.
1047
- *
1048
- * This indicates a bug in the query compiler — the compiler reached
1049
- * a state that should be unreachable. These errors are not user-recoverable.
1050
- */
1051
- declare class CompilerInvariantError extends TypeGraphError {
1052
- constructor(message: string, details?: Readonly<Record<string, unknown>>, options?: {
1053
- cause?: unknown;
1054
- });
1055
- }
1056
- /**
1057
- * Thrown when an operation is attempted on a backend that has been disposed.
1058
- *
1059
- * This typically occurs during runtime teardown — for example, when a
1060
- * Cloudflare Workers test runner resets Durable Object storage while
1061
- * the TypeGraph backend still has queued operations.
1062
- */
1063
- declare class BackendDisposedError extends TypeGraphError {
1064
- constructor(options?: {
1065
- cause?: unknown;
1066
- });
1067
- }
1068
- /**
1069
- * Thrown when a statement is issued on a transaction-scoped backend after
1070
- * its transaction boundary has already returned.
1071
- *
1072
- * The usual source is a callback that lets work escape it. `Promise.all`
1073
- * rejects on its first rejection while its siblings keep running, so
1074
- *
1075
- * ```typescript
1076
- * await store.transaction(async (tx) => {
1077
- * await Promise.all([tx.nodes.Doc.create(a), tx.nodes.Doc.create(b)]);
1078
- * });
1079
- * ```
1080
- *
1081
- * leaves `b`'s remaining statements in flight when `a` fails. Those
1082
- * statements have nowhere safe to go: the driver is about to emit `ROLLBACK`
1083
- * on the same pinned connection and then hand it back to the pool, where a
1084
- * late arrival would execute inside somebody else's transaction. TypeGraph
1085
- * refuses them here instead.
1086
- *
1087
- * The error is normally invisible — `Promise.all` has already rejected with
1088
- * the original failure, and discards this one.
1089
- */
1090
- declare class TransactionClosedError extends TypeGraphError {
1091
- constructor(options?: {
1092
- cause?: unknown;
1093
- });
1094
- }
1095
- /**
1096
- * Type guard for TypeGraphError.
1097
- *
1098
- * @example
1099
- * ```typescript
1100
- * try {
1101
- * await store.nodes.Person.create({});
1102
- * } catch (error) {
1103
- * if (isTypeGraphError(error)) {
1104
- * console.log(error.code, error.category);
1105
- * }
1106
- * }
1107
- * ```
1108
- */
1109
- declare function isTypeGraphError(error: unknown): error is TypeGraphError;
1110
- /**
1111
- * Check if error is recoverable by user action (user or constraint error).
1112
- *
1113
- * User-recoverable errors can typically be resolved by:
1114
- * - Fixing invalid input data
1115
- * - Using different IDs or values
1116
- * - Deleting conflicting data first
1117
- *
1118
- * @example
1119
- * ```typescript
1120
- * if (isUserRecoverable(error)) {
1121
- * showErrorToUser(error.toUserMessage());
1122
- * } else {
1123
- * logAndAlertOps(error);
1124
- * }
1125
- * ```
1126
- */
1127
- declare function isUserRecoverable(error: unknown): boolean;
1128
- /**
1129
- * Check if error indicates a system/infrastructure issue.
1130
- *
1131
- * System errors typically require:
1132
- * - Retry logic (for transient failures)
1133
- * - Investigation (for persistent failures)
1134
- * - Ops team notification
1135
- */
1136
- declare function isSystemError(error: unknown): boolean;
1137
- /**
1138
- * Check if error is a constraint violation.
1139
- */
1140
- declare function isConstraintError(error: unknown): boolean;
1141
- /**
1142
- * Extract suggestion from error if available.
1143
- */
1144
- declare function getErrorSuggestion(error: unknown): string | undefined;
1145
-
1146
- export { type NodeIndexNotFoundErrorDetails as $, IdentityContradictionError as A, BackendDisposedError as B, CardinalityError as C, DatabaseOperationError as D, EDGE_IDENTITY_MISMATCH_CODE as E, type IdentityContradictionErrorDetails as F, GraphAlgorithmConvergenceError as G, IdentityEndpointValidityError as H, IMMUTABLE_VALIDITY_LOWER_BOUND_CODE as I, type IdentityEndpointValidityErrorDetails as J, IdentitySeparationViolationError as K, type IdentitySeparationViolationErrorDetails as L, IdentityValidityWindowError as M, type IdentityValidityWindowErrorDetails as N, InvalidEdgeWeightError as O, type InvalidEdgeWeightErrorDetails as P, type InvalidEdgeWeightReason as Q, KindNotFoundError as R, type KindNotFoundErrorDetails as S, MIGRATION_FAILURE_REASONS as T, MigrationError as U, type ValidationIssue as V, type MigrationErrorDetails as W, type MigrationFailureReason as X, NodeConstraintNotFoundError as Y, type NodeConstraintNotFoundErrorDetails as Z, NodeIndexNotFoundError as _, ValidationError as a, NodeNotFoundError as a0, type NodeNotFoundErrorDetails as a1, RECORDED_CAPTURE_GUARD_CODES as a2, type RecordedCaptureGuardCode as a3, type RecordedCaptureGuardError as a4, RestrictedDeleteError as a5, type RestrictedDeleteErrorDetails as a6, SchemaContentConflictError as a7, type SchemaContentConflictErrorDetails as a8, SchemaMismatchError as a9, type SchemaMismatchErrorDetails as aa, StaleVersionError as ab, type StaleVersionErrorDetails as ac, StoreNotInitializedError as ad, type StoreNotInitializedErrorDetails as ae, type StoreNotInitializedReason as af, TransactionClosedError as ag, TrustedImportError as ah, type TrustedImportErrorReason as ai, TypeGraphError as aj, type TypeGraphErrorOptions as ak, UniquenessError as al, type UniquenessErrorDetails as am, UnsupportedBackendCapabilityError as an, UnsupportedPredicateError as ao, type ValidationErrorDetails as ap, VersionConflictError as aq, type VersionConflictErrorDetails as ar, getErrorSuggestion as as, isConstraintError as at, isRecordedCaptureGuardError as au, isSystemError as av, isTypeGraphError as aw, isUserRecoverable as ax, type CardinalityErrorDetails as b, CompilerInvariantError as c, ConfigurationError as d, type ContributionRebuildRefusal as e, ContributionRebuildUnsupportedError as f, ContributionUnavailableError as g, type ContributionUnavailableErrorDetails as h, type DatabaseOperationErrorDetails as i, DisjointError as j, type DisjointErrorDetails as k, ENTITY_ALREADY_EXISTS_CODE as l, EagerMaterializationError as m, type EagerMaterializationErrorDetails as n, EdgeNotFoundError as o, type EdgeNotFoundErrorDetails as p, EmbeddingDimensionChangedError as q, type EmbeddingDimensionChangedErrorDetails as r, EndpointError as s, type EndpointErrorDetails as t, EndpointNotFoundError as u, type EndpointNotFoundErrorDetails as v, type ErrorCategory as w, ExportStreamCancelledError as x, ExportStreamIdleTimeoutError as y, INVERTED_VALIDITY_WINDOW_CODE as z };