@nicia-ai/typegraph 0.46.1 → 0.47.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 (296) hide show
  1. package/README.md +20 -1
  2. package/dist/backend/drizzle/indexes.cjs +9 -9
  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 +5 -5
  6. package/dist/backend/index.cjs +50 -49
  7. package/dist/backend/index.d.cts +3 -3
  8. package/dist/backend/index.d.ts +3 -3
  9. package/dist/backend/index.js +11 -10
  10. package/dist/backend/postgres/index.cjs +27 -26
  11. package/dist/backend/postgres/index.d.cts +6 -6
  12. package/dist/backend/postgres/index.d.ts +6 -6
  13. package/dist/backend/postgres/index.js +14 -13
  14. package/dist/backend/postgres/pglite-store.cjs +34 -33
  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 +30 -29
  19. package/dist/backend/postgres/pglite-store.js.map +1 -1
  20. package/dist/backend/postgres/pglite.cjs +16 -15
  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 +15 -14
  24. package/dist/backend/sqlite/index.cjs +24 -23
  25. package/dist/backend/sqlite/index.d.cts +6 -6
  26. package/dist/backend/sqlite/index.d.ts +6 -6
  27. package/dist/backend/sqlite/index.js +12 -11
  28. package/dist/backend/sqlite/libsql.cjs +19 -18
  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 +14 -13
  33. package/dist/backend/sqlite/libsql.js.map +1 -1
  34. package/dist/backend/sqlite/local-store.cjs +35 -34
  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 +31 -30
  39. package/dist/backend/sqlite/local-store.js.map +1 -1
  40. package/dist/backend/sqlite/local.cjs +17 -16
  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 +15 -14
  44. package/dist/{chunk-NK5Q7UNE.cjs → chunk-26YKDNUD.cjs} +10 -10
  45. package/dist/{chunk-NK5Q7UNE.cjs.map → chunk-26YKDNUD.cjs.map} +1 -1
  46. package/dist/{chunk-PQBQG7IM.js → chunk-3DMMGT6S.js} +3 -3
  47. package/dist/{chunk-PQBQG7IM.js.map → chunk-3DMMGT6S.js.map} +1 -1
  48. package/dist/{chunk-XBYVV3MP.cjs → chunk-3HGRTCDU.cjs} +6 -4
  49. package/dist/chunk-3HGRTCDU.cjs.map +1 -0
  50. package/dist/{chunk-NFCVHQ5P.cjs → chunk-3U5ABFDW.cjs} +26 -26
  51. package/dist/{chunk-NFCVHQ5P.cjs.map → chunk-3U5ABFDW.cjs.map} +1 -1
  52. package/dist/{chunk-MCLYU6BN.cjs → chunk-425IZOQ5.cjs} +11 -164
  53. package/dist/chunk-425IZOQ5.cjs.map +1 -0
  54. package/dist/{chunk-M4BDU5RX.cjs → chunk-5FBRVORR.cjs} +12 -12
  55. package/dist/{chunk-M4BDU5RX.cjs.map → chunk-5FBRVORR.cjs.map} +1 -1
  56. package/dist/{chunk-C23WSN5E.js → chunk-5FT3TLPK.js} +20 -14
  57. package/dist/chunk-5FT3TLPK.js.map +1 -0
  58. package/dist/{chunk-YBFHZUXX.js → chunk-5UMTUOM5.js} +6 -6
  59. package/dist/{chunk-YBFHZUXX.js.map → chunk-5UMTUOM5.js.map} +1 -1
  60. package/dist/{chunk-HFHTMECK.js → chunk-6FWSNSRE.js} +7 -7
  61. package/dist/{chunk-HFHTMECK.js.map → chunk-6FWSNSRE.js.map} +1 -1
  62. package/dist/{chunk-65E3XWGF.cjs → chunk-6JVZSOHQ.cjs} +91 -91
  63. package/dist/{chunk-65E3XWGF.cjs.map → chunk-6JVZSOHQ.cjs.map} +1 -1
  64. package/dist/chunk-6KFLYYOC.cjs +161 -0
  65. package/dist/chunk-6KFLYYOC.cjs.map +1 -0
  66. package/dist/{chunk-LBJKZXDE.cjs → chunk-6NGW27EO.cjs} +10 -10
  67. package/dist/{chunk-LBJKZXDE.cjs.map → chunk-6NGW27EO.cjs.map} +1 -1
  68. package/dist/{chunk-5UVRGXD3.js → chunk-6SWPJEYN.js} +5 -5
  69. package/dist/{chunk-5UVRGXD3.js.map → chunk-6SWPJEYN.js.map} +1 -1
  70. package/dist/{chunk-BKCUOV7A.js → chunk-7SQSZN2J.js} +5 -5
  71. package/dist/{chunk-BKCUOV7A.js.map → chunk-7SQSZN2J.js.map} +1 -1
  72. package/dist/{chunk-YAAM3M2S.cjs → chunk-AMMWA76F.cjs} +51 -59
  73. package/dist/chunk-AMMWA76F.cjs.map +1 -0
  74. package/dist/{chunk-62ZP23AW.cjs → chunk-AOSSQDVO.cjs} +13 -13
  75. package/dist/{chunk-62ZP23AW.cjs.map → chunk-AOSSQDVO.cjs.map} +1 -1
  76. package/dist/{chunk-NLI2AVEF.js → chunk-AVGUJWVX.js} +30 -10
  77. package/dist/chunk-AVGUJWVX.js.map +1 -0
  78. package/dist/{chunk-TQR4KBY2.cjs → chunk-BCQ76AXA.cjs} +262 -155
  79. package/dist/chunk-BCQ76AXA.cjs.map +1 -0
  80. package/dist/{chunk-CXBHOOIQ.cjs → chunk-BFUOME67.cjs} +11 -11
  81. package/dist/{chunk-CXBHOOIQ.cjs.map → chunk-BFUOME67.cjs.map} +1 -1
  82. package/dist/{chunk-PNTCATDE.cjs → chunk-BR7SHKGM.cjs} +1672 -1400
  83. package/dist/chunk-BR7SHKGM.cjs.map +1 -0
  84. package/dist/{chunk-ASTI57H3.js → chunk-CHAOFCHV.js} +3 -3
  85. package/dist/{chunk-ASTI57H3.js.map → chunk-CHAOFCHV.js.map} +1 -1
  86. package/dist/chunk-CICO5GXD.cjs +12 -0
  87. package/dist/{chunk-A4OC4DVN.cjs.map → chunk-CICO5GXD.cjs.map} +1 -1
  88. package/dist/{chunk-T4XNKYXB.js → chunk-D5R42W5D.js} +4 -4
  89. package/dist/{chunk-T4XNKYXB.js.map → chunk-D5R42W5D.js.map} +1 -1
  90. package/dist/{chunk-S6PW7VV5.js → chunk-DJZTXBWY.js} +410 -138
  91. package/dist/chunk-DJZTXBWY.js.map +1 -0
  92. package/dist/{chunk-UDISNXDL.cjs → chunk-DO7SAMEK.cjs} +47 -47
  93. package/dist/{chunk-UDISNXDL.cjs.map → chunk-DO7SAMEK.cjs.map} +1 -1
  94. package/dist/{chunk-VCRRKBLN.cjs → chunk-EDN4Y4ZG.cjs} +9 -9
  95. package/dist/{chunk-VCRRKBLN.cjs.map → chunk-EDN4Y4ZG.cjs.map} +1 -1
  96. package/dist/{chunk-YVWGEQJE.cjs → chunk-EMIB2RXD.cjs} +139 -133
  97. package/dist/chunk-EMIB2RXD.cjs.map +1 -0
  98. package/dist/{chunk-2Z2Z3ZD6.js → chunk-EP4RUYD6.js} +3 -3
  99. package/dist/{chunk-2Z2Z3ZD6.js.map → chunk-EP4RUYD6.js.map} +1 -1
  100. package/dist/{chunk-M3WP7RQZ.js → chunk-FNOMT74T.js} +10 -8
  101. package/dist/chunk-FNOMT74T.js.map +1 -0
  102. package/dist/{chunk-E4WNQBEF.cjs → chunk-FQPEMEWX.cjs} +12 -12
  103. package/dist/{chunk-E4WNQBEF.cjs.map → chunk-FQPEMEWX.cjs.map} +1 -1
  104. package/dist/{chunk-WDGA7IYB.js → chunk-GLHXM7C4.js} +3 -3
  105. package/dist/{chunk-WDGA7IYB.js.map → chunk-GLHXM7C4.js.map} +1 -1
  106. package/dist/{chunk-7BQXPCGN.cjs → chunk-GYEG3ZLZ.cjs} +10 -10
  107. package/dist/{chunk-7BQXPCGN.cjs.map → chunk-GYEG3ZLZ.cjs.map} +1 -1
  108. package/dist/{chunk-VLT6PEWR.cjs → chunk-GYUJZARH.cjs} +4 -4
  109. package/dist/{chunk-VLT6PEWR.cjs.map → chunk-GYUJZARH.cjs.map} +1 -1
  110. package/dist/{chunk-RMQLSPA2.cjs → chunk-HDL2ARHX.cjs} +27 -27
  111. package/dist/{chunk-RMQLSPA2.cjs.map → chunk-HDL2ARHX.cjs.map} +1 -1
  112. package/dist/{chunk-775A4ZMN.js → chunk-HEV35TGT.js} +4 -4
  113. package/dist/{chunk-775A4ZMN.js.map → chunk-HEV35TGT.js.map} +1 -1
  114. package/dist/{chunk-3DHZCOT7.cjs → chunk-I4G3SQPF.cjs} +20 -20
  115. package/dist/{chunk-3DHZCOT7.cjs.map → chunk-I4G3SQPF.cjs.map} +1 -1
  116. package/dist/{chunk-VGTJPTIC.js → chunk-JONXFAPO.js} +5 -5
  117. package/dist/{chunk-VGTJPTIC.js.map → chunk-JONXFAPO.js.map} +1 -1
  118. package/dist/{chunk-BSFJMMV3.cjs → chunk-JR6SX5RH.cjs} +4 -4
  119. package/dist/{chunk-BSFJMMV3.cjs.map → chunk-JR6SX5RH.cjs.map} +1 -1
  120. package/dist/{chunk-YBQOHKHN.cjs → chunk-KABFHAL7.cjs} +100 -99
  121. package/dist/chunk-KABFHAL7.cjs.map +1 -0
  122. package/dist/{chunk-7VQXLT5O.js → chunk-KH7XW7VV.js} +111 -27
  123. package/dist/chunk-KH7XW7VV.js.map +1 -0
  124. package/dist/{chunk-DCQVHAYQ.js → chunk-KKBDXCLQ.js} +4 -4
  125. package/dist/{chunk-DCQVHAYQ.js.map → chunk-KKBDXCLQ.js.map} +1 -1
  126. package/dist/{chunk-4UGOKMI5.cjs → chunk-L3LQNR34.cjs} +161 -161
  127. package/dist/{chunk-4UGOKMI5.cjs.map → chunk-L3LQNR34.cjs.map} +1 -1
  128. package/dist/{chunk-NMWDXFPH.js → chunk-LEWHMOUY.js} +46 -56
  129. package/dist/chunk-LEWHMOUY.js.map +1 -0
  130. package/dist/{chunk-U63GDNRC.cjs → chunk-LRQKXRXO.cjs} +4 -4
  131. package/dist/{chunk-U63GDNRC.cjs.map → chunk-LRQKXRXO.cjs.map} +1 -1
  132. package/dist/{chunk-5763DULU.js → chunk-M35DF33T.js} +147 -40
  133. package/dist/chunk-M35DF33T.js.map +1 -0
  134. package/dist/{chunk-Q3G6A4I3.cjs → chunk-MFZR4QKM.cjs} +30 -28
  135. package/dist/chunk-MFZR4QKM.cjs.map +1 -0
  136. package/dist/chunk-MKJ4KXL5.cjs +12 -0
  137. package/dist/{chunk-VQH4VAWD.cjs.map → chunk-MKJ4KXL5.cjs.map} +1 -1
  138. package/dist/{chunk-NI72YOJB.cjs → chunk-MRDBBHIZ.cjs} +70 -2
  139. package/dist/chunk-MRDBBHIZ.cjs.map +1 -0
  140. package/dist/{chunk-DTVWX77L.cjs → chunk-MX4DHSQP.cjs} +1023 -360
  141. package/dist/chunk-MX4DHSQP.cjs.map +1 -0
  142. package/dist/{chunk-2LG2XB2M.js → chunk-MYKHJI2J.js} +3 -3
  143. package/dist/{chunk-2LG2XB2M.js.map → chunk-MYKHJI2J.js.map} +1 -1
  144. package/dist/{chunk-JZUR7ZWE.js → chunk-NAZ2RA4L.js} +3 -3
  145. package/dist/{chunk-JZUR7ZWE.js.map → chunk-NAZ2RA4L.js.map} +1 -1
  146. package/dist/{chunk-XL7SLCXS.js → chunk-NG2RB5WL.js} +4 -145
  147. package/dist/chunk-NG2RB5WL.js.map +1 -0
  148. package/dist/{chunk-GF3KXUTW.js → chunk-NNQ6A3RM.js} +803 -143
  149. package/dist/chunk-NNQ6A3RM.js.map +1 -0
  150. package/dist/{chunk-MSY7FSX4.js → chunk-NVY5CJFP.js} +4 -4
  151. package/dist/{chunk-MSY7FSX4.js.map → chunk-NVY5CJFP.js.map} +1 -1
  152. package/dist/{chunk-XCAGZAKP.cjs → chunk-OI2GQ25X.cjs} +7 -7
  153. package/dist/{chunk-XCAGZAKP.cjs.map → chunk-OI2GQ25X.cjs.map} +1 -1
  154. package/dist/{chunk-PF6F5NLJ.cjs → chunk-OIFSOPSR.cjs} +259 -238
  155. package/dist/chunk-OIFSOPSR.cjs.map +1 -0
  156. package/dist/{chunk-UV3SN74I.js → chunk-OMZ37BM2.js} +5 -5
  157. package/dist/{chunk-UV3SN74I.js.map → chunk-OMZ37BM2.js.map} +1 -1
  158. package/dist/{chunk-PNN7RHVR.cjs → chunk-OORXGFL5.cjs} +48 -48
  159. package/dist/{chunk-PNN7RHVR.cjs.map → chunk-OORXGFL5.cjs.map} +1 -1
  160. package/dist/{chunk-YWGVVALJ.js → chunk-OVI7IXYX.js} +3 -3
  161. package/dist/{chunk-YWGVVALJ.js.map → chunk-OVI7IXYX.js.map} +1 -1
  162. package/dist/{chunk-I5MOXA4H.js → chunk-P6YLZTRE.js} +3 -3
  163. package/dist/{chunk-I5MOXA4H.js.map → chunk-P6YLZTRE.js.map} +1 -1
  164. package/dist/{chunk-WQZLUGVR.js → chunk-QS3NQZVC.js} +82 -16
  165. package/dist/chunk-QS3NQZVC.js.map +1 -0
  166. package/dist/{chunk-5262ZMTR.js → chunk-QTD6HX4O.js} +5 -5
  167. package/dist/{chunk-5262ZMTR.js.map → chunk-QTD6HX4O.js.map} +1 -1
  168. package/dist/{chunk-MXJDTH5B.cjs → chunk-ROR5ZR6A.cjs} +45 -45
  169. package/dist/{chunk-MXJDTH5B.cjs.map → chunk-ROR5ZR6A.cjs.map} +1 -1
  170. package/dist/{chunk-CBTIUB76.js → chunk-SDBBMD4N.js} +3 -3
  171. package/dist/{chunk-CBTIUB76.js.map → chunk-SDBBMD4N.js.map} +1 -1
  172. package/dist/{chunk-L65OU2U3.js → chunk-SE6EGQSD.js} +78 -16
  173. package/dist/chunk-SE6EGQSD.js.map +1 -0
  174. package/dist/{chunk-JXA2ZP2Q.js → chunk-SHFBB23Q.js} +4 -4
  175. package/dist/{chunk-JXA2ZP2Q.js.map → chunk-SHFBB23Q.js.map} +1 -1
  176. package/dist/{chunk-AKLS3BYZ.js → chunk-SHSSRCFR.js} +5 -3
  177. package/dist/chunk-SHSSRCFR.js.map +1 -0
  178. package/dist/{chunk-2NA5DYLO.cjs → chunk-TZEGUG6D.cjs} +4 -4
  179. package/dist/{chunk-2NA5DYLO.cjs.map → chunk-TZEGUG6D.cjs.map} +1 -1
  180. package/dist/{chunk-CMWHLBVN.cjs → chunk-U5EDAVOJ.cjs} +140 -74
  181. package/dist/chunk-U5EDAVOJ.cjs.map +1 -0
  182. package/dist/{chunk-MUK4BU7K.cjs → chunk-UPAJHMW3.cjs} +210 -126
  183. package/dist/chunk-UPAJHMW3.cjs.map +1 -0
  184. package/dist/{chunk-PT7RIRIZ.cjs → chunk-WGX7JH7E.cjs} +235 -170
  185. package/dist/chunk-WGX7JH7E.cjs.map +1 -0
  186. package/dist/{chunk-U5SON7R2.cjs → chunk-WODMN3Q2.cjs} +27 -27
  187. package/dist/{chunk-U5SON7R2.cjs.map → chunk-WODMN3Q2.cjs.map} +1 -1
  188. package/dist/{chunk-K5ELX2GT.js → chunk-XVWOYKIK.js} +3 -3
  189. package/dist/{chunk-K5ELX2GT.js.map → chunk-XVWOYKIK.js.map} +1 -1
  190. package/dist/chunk-XY5OMOJD.js +147 -0
  191. package/dist/chunk-XY5OMOJD.js.map +1 -0
  192. package/dist/{chunk-LGHCOKTT.js → chunk-XYBQI6LE.js} +14 -14
  193. package/dist/{chunk-LGHCOKTT.js.map → chunk-XYBQI6LE.js.map} +1 -1
  194. package/dist/{chunk-YDFDBE6D.js → chunk-ZDKTPBGV.js} +4 -4
  195. package/dist/{chunk-YDFDBE6D.js.map → chunk-ZDKTPBGV.js.map} +1 -1
  196. package/dist/{chunk-MZLPX2R7.js → chunk-ZHNXLS3C.js} +9 -8
  197. package/dist/chunk-ZHNXLS3C.js.map +1 -0
  198. package/dist/{chunk-J3WZ3FA2.js → chunk-ZLONH2UD.js} +67 -3
  199. package/dist/chunk-ZLONH2UD.js.map +1 -0
  200. package/dist/core/index.cjs +28 -27
  201. package/dist/core/index.d.cts +4 -4
  202. package/dist/core/index.d.ts +4 -4
  203. package/dist/core/index.js +8 -7
  204. package/dist/{ddl-BXfGHbPN.d.ts → ddl-CprnMXJ-.d.ts} +3 -3
  205. package/dist/{ddl-BJcOp4WZ.d.cts → ddl-DJA7Lci5.d.cts} +3 -3
  206. package/dist/graph-extension/index.cjs +20 -20
  207. package/dist/graph-extension/index.d.cts +4 -4
  208. package/dist/graph-extension/index.d.ts +4 -4
  209. package/dist/graph-extension/index.js +4 -4
  210. package/dist/graph-merge/index.cjs +3204 -635
  211. package/dist/graph-merge/index.cjs.map +1 -1
  212. package/dist/graph-merge/index.d.cts +502 -60
  213. package/dist/graph-merge/index.d.ts +502 -60
  214. package/dist/graph-merge/index.js +2979 -427
  215. package/dist/graph-merge/index.js.map +1 -1
  216. package/dist/{index-BSHvKfok.d.ts → index-CHTv4XMZ.d.cts} +64 -3
  217. package/dist/{index-DxaYCv8Y.d.cts → index-CzoJ3MUw.d.ts} +64 -3
  218. package/dist/index.cjs +232 -215
  219. package/dist/index.cjs.map +1 -1
  220. package/dist/index.d.cts +11 -11
  221. package/dist/index.d.ts +11 -11
  222. package/dist/index.js +35 -34
  223. package/dist/index.js.map +1 -1
  224. package/dist/indexes/index.cjs +13 -13
  225. package/dist/indexes/index.d.cts +4 -4
  226. package/dist/indexes/index.d.ts +4 -4
  227. package/dist/indexes/index.js +6 -6
  228. package/dist/interchange/index.cjs +53 -52
  229. package/dist/interchange/index.cjs.map +1 -1
  230. package/dist/interchange/index.d.cts +17 -13
  231. package/dist/interchange/index.d.ts +17 -13
  232. package/dist/interchange/index.js +17 -16
  233. package/dist/interchange/index.js.map +1 -1
  234. package/dist/{manager-CfZAimti.d.ts → manager-B6sOQzcQ.d.ts} +2 -2
  235. package/dist/{manager-HGk6E_HW.d.cts → manager-DlY1vlla.d.cts} +2 -2
  236. package/dist/{materialize-indexes-BMJP6Tms.d.ts → materialize-indexes-DQL4xcpf.d.ts} +1 -1
  237. package/dist/{materialize-indexes-6A7dWGtb.d.cts → materialize-indexes-sskhp-c_.d.cts} +1 -1
  238. package/dist/{postgres-DFYWENdR.d.cts → postgres-B6YOUcaK.d.ts} +1 -1
  239. package/dist/{postgres-e7a9TdvR.d.ts → postgres-BXy_nyMs.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 +43 -42
  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 +10 -9
  247. package/dist/provenance/index.js.map +1 -1
  248. package/dist/schema/index.cjs +45 -44
  249. package/dist/schema/index.d.cts +6 -6
  250. package/dist/schema/index.d.ts +6 -6
  251. package/dist/schema/index.js +18 -17
  252. package/dist/{searchable-CIje5XYD.d.cts → searchable-0Cn_lY8U.d.cts} +1 -1
  253. package/dist/{searchable-9OQoPuRs.d.ts → searchable-D9gMiwcS.d.ts} +1 -1
  254. package/dist/{sqlite-DerU5tc7.d.ts → sqlite-ClXuBYAj.d.ts} +1 -1
  255. package/dist/{sqlite-DitnISa9.d.cts → sqlite-DioSxaPe.d.cts} +1 -1
  256. package/dist/{store-ClQ-MZQS.d.ts → store-5j-w5onJ.d.ts} +128 -69
  257. package/dist/{store-B0h6x7wo.d.cts → store-CFedKGU5.d.cts} +128 -69
  258. package/dist/{temporal-Bn-Fi8FJ.d.cts → temporal-Ce1pG0S1.d.cts} +1 -1
  259. package/dist/{temporal-BtM4UALv.d.ts → temporal-CjO9FH1l.d.ts} +1 -1
  260. package/dist/{types-KFfk-8Ah.d.ts → types-BrdOFu48.d.ts} +1 -1
  261. package/dist/{types-HkveCCx0.d.ts → types-DKkMJZjR.d.cts} +39 -12
  262. package/dist/{types-HkveCCx0.d.cts → types-DKkMJZjR.d.ts} +39 -12
  263. package/dist/{types-CoIx8HX5.d.cts → types-oj_OGAaZ.d.cts} +1 -1
  264. package/dist/{where-ws5hf-Ov.d.ts → where-C8w2627G.d.ts} +1 -1
  265. package/dist/{where--fk7_0kv.d.cts → where-D1wKCJ4Q.d.cts} +1 -1
  266. package/package.json +1 -1
  267. package/dist/chunk-5763DULU.js.map +0 -1
  268. package/dist/chunk-7VQXLT5O.js.map +0 -1
  269. package/dist/chunk-A4OC4DVN.cjs +0 -12
  270. package/dist/chunk-AKLS3BYZ.js.map +0 -1
  271. package/dist/chunk-C23WSN5E.js.map +0 -1
  272. package/dist/chunk-CMWHLBVN.cjs.map +0 -1
  273. package/dist/chunk-DTVWX77L.cjs.map +0 -1
  274. package/dist/chunk-GF3KXUTW.js.map +0 -1
  275. package/dist/chunk-J3WZ3FA2.js.map +0 -1
  276. package/dist/chunk-L65OU2U3.js.map +0 -1
  277. package/dist/chunk-M3WP7RQZ.js.map +0 -1
  278. package/dist/chunk-MCLYU6BN.cjs.map +0 -1
  279. package/dist/chunk-MUK4BU7K.cjs.map +0 -1
  280. package/dist/chunk-MZLPX2R7.js.map +0 -1
  281. package/dist/chunk-NI72YOJB.cjs.map +0 -1
  282. package/dist/chunk-NLI2AVEF.js.map +0 -1
  283. package/dist/chunk-NMWDXFPH.js.map +0 -1
  284. package/dist/chunk-PF6F5NLJ.cjs.map +0 -1
  285. package/dist/chunk-PNTCATDE.cjs.map +0 -1
  286. package/dist/chunk-PT7RIRIZ.cjs.map +0 -1
  287. package/dist/chunk-Q3G6A4I3.cjs.map +0 -1
  288. package/dist/chunk-S6PW7VV5.js.map +0 -1
  289. package/dist/chunk-TQR4KBY2.cjs.map +0 -1
  290. package/dist/chunk-VQH4VAWD.cjs +0 -12
  291. package/dist/chunk-WQZLUGVR.js.map +0 -1
  292. package/dist/chunk-XBYVV3MP.cjs.map +0 -1
  293. package/dist/chunk-XL7SLCXS.js.map +0 -1
  294. package/dist/chunk-YAAM3M2S.cjs.map +0 -1
  295. package/dist/chunk-YBQOHKHN.cjs.map +0 -1
  296. package/dist/chunk-YVWGEQJE.cjs.map +0 -1
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkYAAM3M2S_cjs = require('./chunk-YAAM3M2S.cjs');
4
- var chunkRMQLSPA2_cjs = require('./chunk-RMQLSPA2.cjs');
5
- var chunkU5SON7R2_cjs = require('./chunk-U5SON7R2.cjs');
3
+ var chunkAMMWA76F_cjs = require('./chunk-AMMWA76F.cjs');
4
+ var chunkHDL2ARHX_cjs = require('./chunk-HDL2ARHX.cjs');
5
+ var chunkWODMN3Q2_cjs = require('./chunk-WODMN3Q2.cjs');
6
6
  var chunkPWLJ77UV_cjs = require('./chunk-PWLJ77UV.cjs');
7
- var chunkBSFJMMV3_cjs = require('./chunk-BSFJMMV3.cjs');
8
- var chunkXBYVV3MP_cjs = require('./chunk-XBYVV3MP.cjs');
7
+ var chunkJR6SX5RH_cjs = require('./chunk-JR6SX5RH.cjs');
8
+ var chunk3HGRTCDU_cjs = require('./chunk-3HGRTCDU.cjs');
9
9
  var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
10
- var chunk4UGOKMI5_cjs = require('./chunk-4UGOKMI5.cjs');
11
- var chunkVCRRKBLN_cjs = require('./chunk-VCRRKBLN.cjs');
12
- var chunkNI72YOJB_cjs = require('./chunk-NI72YOJB.cjs');
10
+ var chunkL3LQNR34_cjs = require('./chunk-L3LQNR34.cjs');
11
+ var chunkEDN4Y4ZG_cjs = require('./chunk-EDN4Y4ZG.cjs');
12
+ var chunkMRDBBHIZ_cjs = require('./chunk-MRDBBHIZ.cjs');
13
13
  var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
14
14
  var drizzleOrm = require('drizzle-orm');
15
15
 
@@ -20,7 +20,7 @@ function assertLimitPerEndpoint(operation, graphId, limitPerEndpoint, kind) {
20
20
  if (limitPerEndpoint === void 0 || Number.isInteger(limitPerEndpoint) && limitPerEndpoint > 0) {
21
21
  return;
22
22
  }
23
- throw new chunkNI72YOJB_cjs.ConfigurationError(
23
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
24
24
  `${operation} \`limitPerEndpoint\` must be a positive integer, received ${String(limitPerEndpoint)}.`,
25
25
  {
26
26
  code: "EDGE_ENDPOINT_SET_INVALID",
@@ -64,7 +64,7 @@ function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
64
64
  if (endpointChunkSize >= 1) {
65
65
  return { edgeKinds, endpoints, endpointChunkSize };
66
66
  }
67
- throw new chunkNI72YOJB_cjs.ConfigurationError(
67
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
68
68
  "findEdgesByHeterogeneousEndpointSet cannot fit one endpoint and the selected edge kinds within the backend bind-parameter budget.",
69
69
  {
70
70
  code: "EDGE_HETEROGENEOUS_READ_BIND_BUDGET_EXCEEDED",
@@ -80,8 +80,8 @@ function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
80
80
 
81
81
  // src/backend/live-node-candidates.ts
82
82
  function buildLiveNodeCandidates(nodesTableName, graphId, nodeKind, now) {
83
- const nodes = chunkVCRRKBLN_cjs.sql.identifier(nodesTableName);
84
- return chunkVCRRKBLN_cjs.sql`
83
+ const nodes = chunkEDN4Y4ZG_cjs.sql.identifier(nodesTableName);
84
+ return chunkEDN4Y4ZG_cjs.sql`
85
85
  SELECT "id" AS node_id
86
86
  FROM ${nodes}
87
87
  WHERE "graph_id" = ${graphId}
@@ -122,10 +122,10 @@ function vectorSlotFromDropIndexParams(params) {
122
122
  };
123
123
  }
124
124
  function mapVectorWriteError(error, params) {
125
- const mismatch = chunkBSFJMMV3_cjs.parseDimensionMismatch(error);
125
+ const mismatch = chunkJR6SX5RH_cjs.parseDimensionMismatch(error);
126
126
  if (mismatch === void 0) return error;
127
127
  const attempted = mismatch.actual ?? "a different number of";
128
- return new chunkNI72YOJB_cjs.EmbeddingDimensionChangedError(
128
+ return new chunkMRDBBHIZ_cjs.EmbeddingDimensionChangedError(
129
129
  `Embedding "${params.nodeKind}.${params.fieldPath}" was written with ${attempted} dimensions, but its per-field storage expects ${mismatch.expected}. The field's embedding dimension changed; existing vectors must be recreated and re-embedded.`,
130
130
  {
131
131
  kind: params.nodeKind,
@@ -141,7 +141,7 @@ var SQLITE_CONTRIBUTION_MAT_TIMESTAMPS = {
141
141
  encode: (value) => value
142
142
  };
143
143
  var POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS = {
144
- decode: chunkYAAM3M2S_cjs.formatPostgresTimestamp,
144
+ decode: chunkAMMWA76F_cjs.formatPostgresTimestamp,
145
145
  encode: (value) => new Date(value)
146
146
  };
147
147
  function mapContributionMaterializationRow(row, decode) {
@@ -248,60 +248,120 @@ function identityOf(graphId, contribution) {
248
248
  tableName: contribution.tableName
249
249
  };
250
250
  }
251
- function gateFulltextMethods(source, assert) {
251
+ function missingTableErrorNames(error, tableName) {
252
+ const quotedTableName2 = `"${tableName.replaceAll('"', '""')}"`;
253
+ for (const link of chunkJR6SX5RH_cjs.errorChain(error)) {
254
+ const message = errorMessage(link);
255
+ if (typeof message !== "string") continue;
256
+ const sqliteMatch = /\bno such table:\s*([^\s;]+)/i.exec(message);
257
+ const sqliteName = unquoteSqliteIdentifier(sqliteMatch?.[1]);
258
+ if (sqliteName === tableName) return true;
259
+ const namesPostgresTable = message.includes(`relation ${quotedTableName2} does not exist`) || message.includes(`table ${quotedTableName2} does not exist`);
260
+ if (namesPostgresTable) return true;
261
+ }
262
+ return false;
263
+ }
264
+ function errorMessage(error) {
265
+ if (typeof error === "string") return error;
266
+ if (error instanceof Error) return error.message;
267
+ if (typeof error !== "object" || error === null || !("message" in error)) {
268
+ return void 0;
269
+ }
270
+ return typeof error.message === "string" ? error.message : void 0;
271
+ }
272
+ function unquoteSqliteIdentifier(identifier) {
273
+ if (identifier === void 0) return void 0;
274
+ const first = identifier.at(0);
275
+ const last = identifier.at(-1);
276
+ const isQuoted = first === '"' && last === '"' || first === "'" && last === "'" || first === "`" && last === "`" || first === "[" && last === "]";
277
+ return isQuoted ? identifier.slice(1, -1) : identifier;
278
+ }
279
+ async function executeGatedFulltext(graphId, assert, refuseUnavailable, execute) {
280
+ await assert(graphId);
281
+ try {
282
+ return await execute();
283
+ } catch (error) {
284
+ return refuseUnavailable(graphId, error);
285
+ }
286
+ }
287
+ function gateFulltextMethods(source, assert, refuseUnavailable) {
252
288
  const gated = {};
253
289
  if (source.upsertFulltext) {
254
290
  const raw = source.upsertFulltext;
255
291
  gated.upsertFulltext = async (params) => {
256
- await assert(params.graphId);
257
- await raw(params);
292
+ await executeGatedFulltext(
293
+ params.graphId,
294
+ assert,
295
+ refuseUnavailable,
296
+ () => raw(params)
297
+ );
258
298
  };
259
299
  }
260
300
  if (source.deleteFulltext) {
261
301
  const raw = source.deleteFulltext;
262
302
  gated.deleteFulltext = async (params) => {
263
- await assert(params.graphId);
264
- await raw(params);
303
+ await executeGatedFulltext(
304
+ params.graphId,
305
+ assert,
306
+ refuseUnavailable,
307
+ () => raw(params)
308
+ );
265
309
  };
266
310
  }
267
311
  if (source.upsertFulltextBatch) {
268
312
  const raw = source.upsertFulltextBatch;
269
313
  gated.upsertFulltextBatch = async (params) => {
270
314
  if (params.rows.length === 0) return;
271
- await assert(params.graphId);
272
- await raw(params);
315
+ await executeGatedFulltext(
316
+ params.graphId,
317
+ assert,
318
+ refuseUnavailable,
319
+ () => raw(params)
320
+ );
273
321
  };
274
322
  }
275
323
  if (source.deleteFulltextBatch) {
276
324
  const raw = source.deleteFulltextBatch;
277
325
  gated.deleteFulltextBatch = async (params) => {
278
326
  if (params.nodeIds.length === 0) return;
279
- await assert(params.graphId);
280
- await raw(params);
327
+ await executeGatedFulltext(
328
+ params.graphId,
329
+ assert,
330
+ refuseUnavailable,
331
+ () => raw(params)
332
+ );
281
333
  };
282
334
  }
283
335
  if (source.fulltextSearch) {
284
336
  const raw = source.fulltextSearch;
285
337
  gated.fulltextSearch = async (params) => {
286
- await assert(params.graphId);
287
- return raw(params);
338
+ return executeGatedFulltext(
339
+ params.graphId,
340
+ assert,
341
+ refuseUnavailable,
342
+ () => raw(params)
343
+ );
288
344
  };
289
345
  }
290
346
  const rawHardDelete = source.hardDeleteNode;
291
347
  gated.hardDeleteNode = async (params) => {
292
- await assert(params.graphId);
293
- await rawHardDelete(params);
348
+ await executeGatedFulltext(
349
+ params.graphId,
350
+ assert,
351
+ refuseUnavailable,
352
+ () => rawHardDelete(params)
353
+ );
294
354
  };
295
355
  return gated;
296
356
  }
297
- function gateFulltext(tx, assert) {
298
- return chunkXBYVV3MP_cjs.createBackendOverlay(
357
+ function gateFulltext(tx, assert, refuseUnavailable) {
358
+ return chunk3HGRTCDU_cjs.createBackendOverlay(
299
359
  tx,
300
- gateFulltextMethods(tx, assert)
360
+ gateFulltextMethods(tx, assert, refuseUnavailable)
301
361
  );
302
362
  }
303
363
  function contributionRebuildSupported(fulltextStrategy, fulltextTableName, transactional) {
304
- return transactional && chunkRMQLSPA2_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName).every(
364
+ return transactional && chunkHDL2ARHX_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName).every(
305
365
  (contribution) => contribution.dropDdl !== void 0
306
366
  );
307
367
  }
@@ -350,7 +410,7 @@ function createContributionMaterializer(deps) {
350
410
  }
351
411
  }
352
412
  function runtimeContributions() {
353
- return chunkRMQLSPA2_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
413
+ return chunkHDL2ARHX_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
354
414
  }
355
415
  function cacheInitializedSignature(key, signature) {
356
416
  if (!uncacheableKeys.has(key)) {
@@ -377,13 +437,13 @@ function createContributionMaterializer(deps) {
377
437
  await deps.recordMarker({
378
438
  ...identity,
379
439
  signature: existing.signature,
380
- attemptedAt: chunkYAAM3M2S_cjs.nowIso(),
440
+ attemptedAt: chunkAMMWA76F_cjs.nowIso(),
381
441
  materializedAt: void 0,
382
442
  error: error.message
383
443
  });
384
444
  throw error;
385
445
  }
386
- const attemptedAt = chunkYAAM3M2S_cjs.nowIso();
446
+ const attemptedAt = chunkAMMWA76F_cjs.nowIso();
387
447
  try {
388
448
  for (const statement of contribution.createDdl) {
389
449
  await deps.execDdl(statement);
@@ -419,7 +479,7 @@ function createContributionMaterializer(deps) {
419
479
  rows: indexMarkerRows(graphId, await deps.getMarkers(graphId))
420
480
  };
421
481
  } catch (error) {
422
- if (!chunkBSFJMMV3_cjs.isMissingTableError(error)) throw error;
482
+ if (!chunkJR6SX5RH_cjs.isMissingTableError(error)) throw error;
423
483
  return { kind: "missing-table", error };
424
484
  }
425
485
  }
@@ -498,7 +558,7 @@ function createContributionMaterializer(deps) {
498
558
  if (read.kind === "missing-table") {
499
559
  const first = pending[0];
500
560
  if (first === void 0) return;
501
- throw new chunkNI72YOJB_cjs.StoreNotInitializedError(graphId, "missing", {
561
+ throw new chunkMRDBBHIZ_cjs.StoreNotInitializedError(graphId, "missing", {
502
562
  cause: read.error,
503
563
  details: { logicalName: first.contribution.logicalName }
504
564
  });
@@ -507,7 +567,7 @@ function createContributionMaterializer(deps) {
507
567
  const { contribution, key, signature } = entry;
508
568
  const state = evaluateContributionState(read.rows.get(key), signature);
509
569
  if (state !== "initialized") {
510
- throw new chunkNI72YOJB_cjs.StoreNotInitializedError(graphId, state, {
570
+ throw new chunkMRDBBHIZ_cjs.StoreNotInitializedError(graphId, state, {
511
571
  details: { logicalName: contribution.logicalName }
512
572
  });
513
573
  }
@@ -520,6 +580,21 @@ function createContributionMaterializer(deps) {
520
580
  async function assertInitialized(graphId) {
521
581
  await assertContributions(graphId, runtimeContributions());
522
582
  }
583
+ async function refuseUnavailableFulltext(graphId, error) {
584
+ await Promise.resolve();
585
+ if (!chunkJR6SX5RH_cjs.isMissingTableError(error)) throw error;
586
+ const missingContribution = runtimeContributions().find(
587
+ (contribution) => contribution.logicalName === "fulltext" && missingTableErrorNames(error, contribution.tableName)
588
+ );
589
+ if (missingContribution !== void 0) {
590
+ throw new chunkMRDBBHIZ_cjs.ContributionUnavailableError(
591
+ graphId,
592
+ missingContribution.tableName,
593
+ { cause: error }
594
+ );
595
+ }
596
+ throw error;
597
+ }
523
598
  async function ensureVectorSlot(slot, options) {
524
599
  await ensureVectorSlots([slot], options);
525
600
  }
@@ -681,23 +756,23 @@ function createContributionMaterializer(deps) {
681
756
  async function lockContributionDdl(tx) {
682
757
  if (dialect !== "postgres") return;
683
758
  await tx.execute(
684
- chunkVCRRKBLN_cjs.asCompiledRowsSql(
685
- chunkVCRRKBLN_cjs.sql`SELECT pg_advisory_xact_lock(hashtext(${CONTRIBUTION_DDL_LOCK_KEY}), 0)`
759
+ chunkEDN4Y4ZG_cjs.asCompiledRowsSql(
760
+ chunkEDN4Y4ZG_cjs.sql`SELECT pg_advisory_xact_lock(hashtext(${CONTRIBUTION_DDL_LOCK_KEY}), 0)`
686
761
  )
687
762
  );
688
763
  }
689
764
  async function lockSharedFulltextTable(tx, tableName) {
690
765
  if (dialect !== "postgres") return;
691
766
  await tx.executeStatement(
692
- chunkVCRRKBLN_cjs.asCompiledStatementSql(
693
- chunkVCRRKBLN_cjs.sql`LOCK TABLE ${chunkVCRRKBLN_cjs.sql.identifier(tableName)} IN ACCESS EXCLUSIVE MODE`
767
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
768
+ chunkEDN4Y4ZG_cjs.sql`LOCK TABLE ${chunkEDN4Y4ZG_cjs.sql.identifier(tableName)} IN ACCESS EXCLUSIVE MODE`
694
769
  )
695
770
  );
696
771
  }
697
772
  async function readForeignGraphIds(tx, tableName, graphId) {
698
773
  const rows = await tx.execute(
699
- chunkVCRRKBLN_cjs.asCompiledRowsSql(
700
- chunk4UGOKMI5_cjs.buildForeignFulltextGraphProbe(
774
+ chunkEDN4Y4ZG_cjs.asCompiledRowsSql(
775
+ chunkL3LQNR34_cjs.buildForeignFulltextGraphProbe(
701
776
  tableName,
702
777
  graphId,
703
778
  FOREIGN_GRAPH_REPORT_LIMIT
@@ -708,7 +783,7 @@ function createContributionMaterializer(deps) {
708
783
  }
709
784
  async function rebuildContribution(graphId, scope, repopulate) {
710
785
  if (scope === "vector") {
711
- throw new chunkNI72YOJB_cjs.ContributionRebuildUnsupportedError(
786
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError(
712
787
  "vector-source-unavailable",
713
788
  { graphId, contribution: scope }
714
789
  );
@@ -718,7 +793,7 @@ function createContributionMaterializer(deps) {
718
793
  (contribution) => contribution.dropDdl === void 0
719
794
  );
720
795
  if (withoutTeardown !== void 0) {
721
- throw new chunkNI72YOJB_cjs.ContributionRebuildUnsupportedError("no-drop-ddl", {
796
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError("no-drop-ddl", {
722
797
  graphId,
723
798
  contribution: scope,
724
799
  owner: withoutTeardown.owner,
@@ -728,7 +803,7 @@ function createContributionMaterializer(deps) {
728
803
  }
729
804
  const fence = deps.schemaWriteTransaction;
730
805
  if (fence === void 0) {
731
- throw new chunkNI72YOJB_cjs.ContributionRebuildUnsupportedError("no-schema-fence", {
806
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError("no-schema-fence", {
732
807
  graphId,
733
808
  contribution: scope,
734
809
  backend: dialect
@@ -751,7 +826,7 @@ function createContributionMaterializer(deps) {
751
826
  const rebuilt = await fence(graphId, async (tx) => {
752
827
  const record = tx.recordContributionMaterialization;
753
828
  if (record === void 0) {
754
- throw new chunkNI72YOJB_cjs.ConfigurationError(
829
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
755
830
  "rebuildContribution requires a transaction-scoped backend that can write contribution markers; without it the drop, recreate, and stamp could not commit together.",
756
831
  {
757
832
  backend: dialect,
@@ -775,7 +850,7 @@ function createContributionMaterializer(deps) {
775
850
  ) === "stale"
776
851
  );
777
852
  if (staleStamp !== void 0) {
778
- throw new chunkNI72YOJB_cjs.ContributionRebuildUnsupportedError(
853
+ throw new chunkMRDBBHIZ_cjs.ContributionRebuildUnsupportedError(
779
854
  "shared-storage-in-use",
780
855
  {
781
856
  graphId,
@@ -800,13 +875,13 @@ function createContributionMaterializer(deps) {
800
875
  }
801
876
  if (!recreateStorage) {
802
877
  await tx.executeStatement(
803
- chunkVCRRKBLN_cjs.asCompiledStatementSql(
804
- chunk4UGOKMI5_cjs.buildFulltextGraphDelete(sharedTable, graphId)
878
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
879
+ chunkL3LQNR34_cjs.buildFulltextGraphDelete(sharedTable, graphId)
805
880
  )
806
881
  );
807
882
  }
808
883
  const stats = await repopulate(tx);
809
- const now = chunkYAAM3M2S_cjs.nowIso();
884
+ const now = chunkAMMWA76F_cjs.nowIso();
810
885
  for (const { contribution, signature } of stamps) {
811
886
  await record({
812
887
  ...identityOf(graphId, contribution),
@@ -850,6 +925,7 @@ function createContributionMaterializer(deps) {
850
925
  return {
851
926
  ensureRuntimeContributions,
852
927
  assertInitialized,
928
+ refuseUnavailableFulltext,
853
929
  ensureVectorSlot,
854
930
  ensureVectorSlots,
855
931
  assertVectorSlot,
@@ -867,7 +943,7 @@ var SQLITE_INDEX_MAT_TIMESTAMPS = {
867
943
  encode: (value) => value
868
944
  };
869
945
  var POSTGRES_INDEX_MAT_TIMESTAMPS = {
870
- decode: chunkYAAM3M2S_cjs.formatPostgresTimestamp,
946
+ decode: chunkAMMWA76F_cjs.formatPostgresTimestamp,
871
947
  encode: (value) => new Date(value)
872
948
  };
873
949
  function mapMaterializationRow(row, decode) {
@@ -925,7 +1001,7 @@ var SQLITE_KIND_REMOVAL_TIMESTAMPS = {
925
1001
  encode: (value) => value
926
1002
  };
927
1003
  var POSTGRES_KIND_REMOVAL_TIMESTAMPS = {
928
- decode: chunkYAAM3M2S_cjs.formatPostgresTimestamp,
1004
+ decode: chunkAMMWA76F_cjs.formatPostgresTimestamp,
929
1005
  encode: (value) => new Date(value)
930
1006
  };
931
1007
  function mapKindRemovalRow(row, decode) {
@@ -1121,12 +1197,12 @@ function present(value) {
1121
1197
  function mapHybridSearchRow(row, toNodeRow) {
1122
1198
  return {
1123
1199
  node: toNodeRow(row),
1124
- fusedScore: chunkYAAM3M2S_cjs.coerceNumericScore(row["fused_score"]),
1200
+ fusedScore: chunkAMMWA76F_cjs.coerceNumericScore(row["fused_score"]),
1125
1201
  ...present(row["vector_rank"]) ? { vectorRank: Number(row["vector_rank"]) } : {},
1126
- ...present(row["vector_score"]) ? { vectorScore: chunkYAAM3M2S_cjs.coerceNumericScore(row["vector_score"]) } : {},
1202
+ ...present(row["vector_score"]) ? { vectorScore: chunkAMMWA76F_cjs.coerceNumericScore(row["vector_score"]) } : {},
1127
1203
  ...present(row["fulltext_rank"]) ? { fulltextRank: Number(row["fulltext_rank"]) } : {},
1128
1204
  ...present(row["fulltext_score"]) ? {
1129
- fulltextScore: chunkYAAM3M2S_cjs.coerceNumericScore(
1205
+ fulltextScore: chunkAMMWA76F_cjs.coerceNumericScore(
1130
1206
  row["fulltext_score"]
1131
1207
  )
1132
1208
  } : {},
@@ -1138,7 +1214,7 @@ function buildClearGraph(tables, graphId) {
1138
1214
  // The fulltext table is shared by every graph in the database, so its
1139
1215
  // graph-scoped delete is owned by one builder the destructive
1140
1216
  // contribution rebuild calls too — see `buildFulltextGraphDelete`.
1141
- { query: chunk4UGOKMI5_cjs.buildFulltextGraphDelete(tables.fulltextTableName, graphId) },
1217
+ { query: chunkL3LQNR34_cjs.buildFulltextGraphDelete(tables.fulltextTableName, graphId) },
1142
1218
  {
1143
1219
  query: drizzleOrm.sql`DELETE FROM ${tables.recordedIdentityAssertions} WHERE ${tables.recordedIdentityAssertions.graphId} = ${graphId}`,
1144
1220
  ignoreMissingTable: true,
@@ -1533,6 +1609,8 @@ function buildUpdateEdge(tables, params, timestamp) {
1533
1609
  drizzleOrm.sql`${quotedColumn(edges.validFrom)} = ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}`,
1534
1610
  drizzleOrm.sql`${quotedColumn(edges.validTo)} = ${sqlNull(params.validTo)}`
1535
1611
  );
1612
+ } else if (params.clearValidTo === true) {
1613
+ setParts.push(drizzleOrm.sql`${quotedColumn(edges.validTo)} = NULL`);
1536
1614
  } else if (params.validTo !== void 0) {
1537
1615
  setParts.push(drizzleOrm.sql`${quotedColumn(edges.validTo)} = ${params.validTo}`);
1538
1616
  }
@@ -1545,12 +1623,16 @@ function buildUpdateEdge(tables, params, timestamp) {
1545
1623
  edges.validFrom,
1546
1624
  params.expectedValidFrom
1547
1625
  );
1626
+ const expectedValidTo = expectedValidFromPredicate(
1627
+ edges.validTo,
1628
+ params.expectedValidTo
1629
+ );
1548
1630
  if (params.clearDeleted) {
1549
1631
  return drizzleOrm.sql`
1550
1632
  UPDATE ${edges}
1551
1633
  SET ${setClause}
1552
1634
  WHERE ${edges.graphId} = ${params.graphId}
1553
- AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}
1635
+ AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}${expectedValidTo}
1554
1636
  RETURNING *
1555
1637
  `;
1556
1638
  }
@@ -1558,7 +1640,7 @@ function buildUpdateEdge(tables, params, timestamp) {
1558
1640
  UPDATE ${edges}
1559
1641
  SET ${setClause}
1560
1642
  WHERE ${edges.graphId} = ${params.graphId}
1561
- AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}
1643
+ AND ${edges.id} = ${params.id}${expectedIdentity}${expectedValidFrom}${expectedValidTo}
1562
1644
  AND ${edges.deletedAt} IS NULL
1563
1645
  RETURNING *
1564
1646
  `;
@@ -1679,11 +1761,11 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
1679
1761
  assertValidSearchParams(params);
1680
1762
  const mode = resolveMode(params.mode);
1681
1763
  const table = quotedTableName(tableName);
1682
- const matchCondition = chunkU5SON7R2_cjs.toDrizzleSql(
1764
+ const matchCondition = chunkWODMN3Q2_cjs.toDrizzleSql(
1683
1765
  strategy.matchCondition(tableName, params.query, mode, params.language),
1684
1766
  dialect
1685
1767
  );
1686
- const rankExpression = chunkU5SON7R2_cjs.toDrizzleSql(
1768
+ const rankExpression = chunkWODMN3Q2_cjs.toDrizzleSql(
1687
1769
  strategy.rankExpression(tableName, params.query, mode, params.language),
1688
1770
  dialect
1689
1771
  );
@@ -1696,10 +1778,10 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
1696
1778
  conditions.push(drizzleOrm.sql`${rankExpression} >= ${params.minScore}`);
1697
1779
  }
1698
1780
  if (candidates !== void 0) {
1699
- const candidateSql = chunkVCRRKBLN_cjs.isSqlFragment(candidates) ? chunkU5SON7R2_cjs.toDrizzleSql(candidates, dialect) : candidates;
1781
+ const candidateSql = chunkEDN4Y4ZG_cjs.isSqlFragment(candidates) ? chunkWODMN3Q2_cjs.toDrizzleSql(candidates, dialect) : candidates;
1700
1782
  conditions.push(drizzleOrm.sql`"node_id" IN (${candidateSql})`);
1701
1783
  }
1702
- const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkU5SON7R2_cjs.toDrizzleSql(
1784
+ const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkWODMN3Q2_cjs.toDrizzleSql(
1703
1785
  strategy.snippetExpression(
1704
1786
  tableName,
1705
1787
  params.query,
@@ -1820,6 +1902,8 @@ function buildUpdateNode(tables, params, timestamp) {
1820
1902
  drizzleOrm.sql`${quotedColumn(nodes.validFrom)} = ${sqlNull(resolveValidFrom(params.validFrom, timestamp))}`,
1821
1903
  drizzleOrm.sql`${quotedColumn(nodes.validTo)} = ${sqlNull(params.validTo)}`
1822
1904
  );
1905
+ } else if (params.clearValidTo === true) {
1906
+ setParts.push(drizzleOrm.sql`${quotedColumn(nodes.validTo)} = NULL`);
1823
1907
  } else if (params.validTo !== void 0) {
1824
1908
  setParts.push(drizzleOrm.sql`${quotedColumn(nodes.validTo)} = ${params.validTo}`);
1825
1909
  }
@@ -1854,18 +1938,18 @@ function buildUpdateNode(tables, params, timestamp) {
1854
1938
  }
1855
1939
  function buildUpdateNodeSet(tables, dialect, params, timestamp) {
1856
1940
  const { nodes } = tables;
1857
- const adapter = chunk4UGOKMI5_cjs.getDialect(dialect);
1858
- const patchedProps = chunkU5SON7R2_cjs.toDrizzleSql(
1941
+ const adapter = chunkL3LQNR34_cjs.getDialect(dialect);
1942
+ const patchedProps = chunkWODMN3Q2_cjs.toDrizzleSql(
1859
1943
  adapter.jsonSetProperties(
1860
- chunkVCRRKBLN_cjs.sql.identifier(nodes.props.name),
1944
+ chunkEDN4Y4ZG_cjs.sql.identifier(nodes.props.name),
1861
1945
  params.patch,
1862
1946
  params.unsetProperties ?? []
1863
1947
  ),
1864
1948
  dialect
1865
1949
  );
1866
- const candidateIds = chunkU5SON7R2_cjs.toDrizzleSql(params.candidateIds, dialect);
1867
- const candidateIdColumn = chunkU5SON7R2_cjs.toDrizzleSql(
1868
- chunkVCRRKBLN_cjs.sql.identifier(params.candidateIdColumn),
1950
+ const candidateIds = chunkWODMN3Q2_cjs.toDrizzleSql(params.candidateIds, dialect);
1951
+ const candidateIdColumn = chunkWODMN3Q2_cjs.toDrizzleSql(
1952
+ chunkEDN4Y4ZG_cjs.sql.identifier(params.candidateIdColumn),
1869
1953
  dialect
1870
1954
  );
1871
1955
  return drizzleOrm.sql`
@@ -2243,15 +2327,15 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2243
2327
  const fulltextTable = tables.fulltextTableName;
2244
2328
  const contributionMaterializations = tables.contributionMaterializations;
2245
2329
  const fulltextBuilders = {
2246
- buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkU5SON7R2_cjs.toDrizzleSql(statement, dialect)),
2247
- buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkU5SON7R2_cjs.toDrizzleSql(statement, dialect)),
2330
+ buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2331
+ buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2248
2332
  buildDeleteFulltextByNode: (graphId, nodeKind, nodeId) => fulltextStrategy.buildDelete(fulltextTable, {
2249
2333
  graphId,
2250
2334
  nodeKind,
2251
2335
  nodeId
2252
- }).map((statement) => chunkU5SON7R2_cjs.toDrizzleSql(statement, dialect)),
2253
- buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkU5SON7R2_cjs.toDrizzleSql(statement, dialect)),
2254
- buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkU5SON7R2_cjs.toDrizzleSql(statement, dialect)),
2336
+ }).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2337
+ buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2338
+ buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkWODMN3Q2_cjs.toDrizzleSql(statement, dialect)),
2255
2339
  buildFulltextSearch: (params) => buildFulltextSearch(
2256
2340
  fulltextTable,
2257
2341
  params,
@@ -2263,7 +2347,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2263
2347
  tables.nodes,
2264
2348
  params.graphId,
2265
2349
  params.nodeKind,
2266
- chunkYAAM3M2S_cjs.nowIso()
2350
+ chunkAMMWA76F_cjs.nowIso()
2267
2351
  )
2268
2352
  ),
2269
2353
  buildHybridSearch: (params, vectorSql, vectorScoreDescending) => {
@@ -2271,7 +2355,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2271
2355
  tables.nodes,
2272
2356
  params.graphId,
2273
2357
  params.nodeKind,
2274
- chunkYAAM3M2S_cjs.nowIso()
2358
+ chunkAMMWA76F_cjs.nowIso()
2275
2359
  );
2276
2360
  const fulltextSql = buildFulltextSearch(
2277
2361
  fulltextTable,
@@ -2292,7 +2376,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
2292
2376
  hybridCandidatesRef()
2293
2377
  );
2294
2378
  return buildHybridSearchStatement({
2295
- candidatesSql: chunkVCRRKBLN_cjs.isSqlFragment(candidates) ? chunkU5SON7R2_cjs.toDrizzleSql(candidates, dialect) : candidates,
2379
+ candidatesSql: chunkEDN4Y4ZG_cjs.isSqlFragment(candidates) ? chunkWODMN3Q2_cjs.toDrizzleSql(candidates, dialect) : candidates,
2296
2380
  vectorSql,
2297
2381
  vectorScoreDescending,
2298
2382
  fulltextSql,
@@ -2422,7 +2506,7 @@ var DRIZZLE_DIALECT_LABELS = {
2422
2506
  function assertAdoptedDialect(externalTx, brand, backend) {
2423
2507
  if (drizzleOrm.is(externalTx, brand)) return;
2424
2508
  const label = DRIZZLE_DIALECT_LABELS[backend];
2425
- throw new chunkNI72YOJB_cjs.ConfigurationError(
2509
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
2426
2510
  `adoptTransaction received a handle that is not a ${label} Drizzle transaction. Pass the \`tx\` from a ${label} \`db.transaction(...)\` opened on this backend's connection.`,
2427
2511
  { backend, capability: "adoptTransaction" }
2428
2512
  );
@@ -2431,8 +2515,8 @@ async function withDuplicateKeyClassification(run, context) {
2431
2515
  try {
2432
2516
  return await run();
2433
2517
  } catch (error) {
2434
- if (!chunkBSFJMMV3_cjs.isDuplicatePrimaryKeyError(error, context.relation)) throw error;
2435
- throw new chunkNI72YOJB_cjs.DatabaseOperationError(
2518
+ if (!chunkJR6SX5RH_cjs.isDuplicatePrimaryKeyError(error, context.relation)) throw error;
2519
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2436
2520
  `Insert ${context.entity} failed: a row with this identity already exists`,
2437
2521
  {
2438
2522
  operation: "insert",
@@ -2453,7 +2537,7 @@ function verifyExpectedActiveVersion(graphId, expected, actualActiveVersion) {
2453
2537
  }
2454
2538
  function assertActiveSchemaVersion(graphId, expectedVersion, actualActiveVersion) {
2455
2539
  if (actualActiveVersion !== expectedVersion) {
2456
- throw new chunkNI72YOJB_cjs.StaleVersionError({
2540
+ throw new chunkMRDBBHIZ_cjs.StaleVersionError({
2457
2541
  graphId,
2458
2542
  expected: expectedVersion,
2459
2543
  actual: actualActiveVersion
@@ -2503,7 +2587,7 @@ function createCommonOperationBackend(options) {
2503
2587
  operationStrategy,
2504
2588
  rowMappers
2505
2589
  } = options;
2506
- const nowIso2 = options.nowIso ?? chunkYAAM3M2S_cjs.nowIso;
2590
+ const nowIso2 = options.nowIso ?? chunkAMMWA76F_cjs.nowIso;
2507
2591
  const tableExists = createCachedTableExistence(
2508
2592
  (tableName) => execution.execGet(
2509
2593
  operationStrategy.buildTableExists(tableName)
@@ -2525,7 +2609,7 @@ function createCommonOperationBackend(options) {
2525
2609
  return {
2526
2610
  tableExists,
2527
2611
  async executeSchemaDdl(ddl) {
2528
- await execution.execRun(chunkVCRRKBLN_cjs.asCompiledStatementSql(chunkVCRRKBLN_cjs.sql.raw(ddl)));
2612
+ await execution.execRun(chunkEDN4Y4ZG_cjs.asCompiledStatementSql(chunkEDN4Y4ZG_cjs.sql.raw(ddl)));
2529
2613
  },
2530
2614
  async executeStatement(query) {
2531
2615
  await execution.execRun(query);
@@ -2545,7 +2629,7 @@ function createCommonOperationBackend(options) {
2545
2629
  }
2546
2630
  );
2547
2631
  if (!row)
2548
- throw new chunkNI72YOJB_cjs.DatabaseOperationError(
2632
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2549
2633
  "Insert node failed: no row returned",
2550
2634
  {
2551
2635
  operation: "insert",
@@ -2572,7 +2656,7 @@ function createCommonOperationBackend(options) {
2572
2656
  return;
2573
2657
  }
2574
2658
  const timestamp = nowIso2();
2575
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2659
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2576
2660
  const query = operationStrategy.buildInsertNodesBatch(chunk2, timestamp);
2577
2661
  await withDuplicateKeyClassification(() => execution.execRun(query), {
2578
2662
  entity: "node",
@@ -2587,7 +2671,7 @@ function createCommonOperationBackend(options) {
2587
2671
  }
2588
2672
  const timestamp = nowIso2();
2589
2673
  const allRows = [];
2590
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2674
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
2591
2675
  const query = operationStrategy.buildInsertNodesBatchReturning(
2592
2676
  chunk2,
2593
2677
  timestamp
@@ -2612,7 +2696,7 @@ function createCommonOperationBackend(options) {
2612
2696
  async getNodes(graphId, kind, ids) {
2613
2697
  if (ids.length === 0) return [];
2614
2698
  const allRows = [];
2615
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(ids, batchConfig.getNodesChunkSize)) {
2699
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(ids, batchConfig.getNodesChunkSize)) {
2616
2700
  const query = operationStrategy.buildGetNodes(graphId, kind, chunk2);
2617
2701
  const rows = await execution.execAll(query);
2618
2702
  allRows.push(...rows.map((row) => rowMappers.toNodeRow(row)));
@@ -2624,7 +2708,7 @@ function createCommonOperationBackend(options) {
2624
2708
  const query = operationStrategy.buildUpdateNode(params, timestamp);
2625
2709
  const row = await execution.execGet(query);
2626
2710
  if (!row)
2627
- throw new chunkNI72YOJB_cjs.DatabaseOperationError(
2711
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2628
2712
  "Update node failed: no row returned",
2629
2713
  {
2630
2714
  operation: "update",
@@ -2636,13 +2720,13 @@ function createCommonOperationBackend(options) {
2636
2720
  },
2637
2721
  async updateNodeSet(params) {
2638
2722
  if (Object.keys(params.patch).length === 0 && (params.unsetProperties?.length ?? 0) === 0) {
2639
- throw new chunkNI72YOJB_cjs.ConfigurationError(
2723
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
2640
2724
  "Set-based node update requires at least one property",
2641
2725
  { operation: "updateNodeSet", kind: params.kind }
2642
2726
  );
2643
2727
  }
2644
2728
  if (params.candidateIdColumn.length === 0) {
2645
- throw new chunkNI72YOJB_cjs.ConfigurationError(
2729
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
2646
2730
  "Set-based node update requires a candidate id column",
2647
2731
  { operation: "updateNodeSet", kind: params.kind }
2648
2732
  );
@@ -2703,7 +2787,7 @@ function createCommonOperationBackend(options) {
2703
2787
  }
2704
2788
  );
2705
2789
  if (!row)
2706
- throw new chunkNI72YOJB_cjs.DatabaseOperationError(
2790
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2707
2791
  "Insert edge failed: no row returned",
2708
2792
  {
2709
2793
  operation: "insert",
@@ -2730,7 +2814,7 @@ function createCommonOperationBackend(options) {
2730
2814
  return;
2731
2815
  }
2732
2816
  const timestamp = nowIso2();
2733
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2817
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2734
2818
  const query = operationStrategy.buildInsertEdgesBatch(chunk2, timestamp);
2735
2819
  await withDuplicateKeyClassification(() => execution.execRun(query), {
2736
2820
  entity: "edge",
@@ -2745,7 +2829,7 @@ function createCommonOperationBackend(options) {
2745
2829
  }
2746
2830
  const timestamp = nowIso2();
2747
2831
  const allRows = [];
2748
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2832
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
2749
2833
  const query = operationStrategy.buildInsertEdgesBatchReturning(
2750
2834
  chunk2,
2751
2835
  timestamp
@@ -2770,7 +2854,7 @@ function createCommonOperationBackend(options) {
2770
2854
  async getEdges(graphId, ids) {
2771
2855
  if (ids.length === 0) return [];
2772
2856
  const allRows = [];
2773
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(ids, batchConfig.getEdgesChunkSize)) {
2857
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(ids, batchConfig.getEdgesChunkSize)) {
2774
2858
  const query = operationStrategy.buildGetEdges(graphId, chunk2);
2775
2859
  const rows = await execution.execAll(query);
2776
2860
  allRows.push(...rows.map((row) => rowMappers.toEdgeRow(row)));
@@ -2782,7 +2866,7 @@ function createCommonOperationBackend(options) {
2782
2866
  const query = operationStrategy.buildUpdateEdge(params, timestamp);
2783
2867
  const row = await execution.execGet(query);
2784
2868
  if (!row)
2785
- throw new chunkNI72YOJB_cjs.DatabaseOperationError(
2869
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
2786
2870
  "Update edge failed: no row returned",
2787
2871
  {
2788
2872
  operation: "update",
@@ -2808,7 +2892,7 @@ function createCommonOperationBackend(options) {
2808
2892
  1,
2809
2893
  batchConfig.getEdgesChunkSize - 1
2810
2894
  );
2811
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(params.ids, softDeleteChunkSize)) {
2895
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(params.ids, softDeleteChunkSize)) {
2812
2896
  const query = operationStrategy.buildDeleteEdgesBatch(
2813
2897
  { graphId: params.graphId, ids: chunk2 },
2814
2898
  timestamp
@@ -2818,7 +2902,7 @@ function createCommonOperationBackend(options) {
2818
2902
  },
2819
2903
  async hardDeleteEdgesBatch(params) {
2820
2904
  if (params.ids.length === 0) return;
2821
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(
2905
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(
2822
2906
  params.ids,
2823
2907
  batchConfig.getEdgesChunkSize
2824
2908
  )) {
@@ -2862,7 +2946,7 @@ function createCommonOperationBackend(options) {
2862
2946
  async findEdgesByEndpointSet(params) {
2863
2947
  const ids = resolveEdgeEndpointIds(params);
2864
2948
  const edgeRows = [];
2865
- for (const idChunk of chunkBSFJMMV3_cjs.chunk(
2949
+ for (const idChunk of chunkJR6SX5RH_cjs.chunk(
2866
2950
  ids,
2867
2951
  batchConfig.findEdgesEndpointChunkSize
2868
2952
  )) {
@@ -2879,7 +2963,7 @@ function createCommonOperationBackend(options) {
2879
2963
  const { edgeKinds, endpoints, endpointChunkSize } = resolveHeterogeneousEdgeRead(params, maxBindParameters);
2880
2964
  if (edgeKinds.length === 0 || endpoints.length === 0) return [];
2881
2965
  const edgeRows = [];
2882
- for (const endpointChunk of chunkBSFJMMV3_cjs.chunk(endpoints, endpointChunkSize)) {
2966
+ for (const endpointChunk of chunkJR6SX5RH_cjs.chunk(endpoints, endpointChunkSize)) {
2883
2967
  const query = operationStrategy.buildFindEdgesByHeterogeneousEndpointSet(
2884
2968
  params,
2885
2969
  endpointChunk,
@@ -2899,7 +2983,7 @@ function createCommonOperationBackend(options) {
2899
2983
  const query = operationStrategy.buildInsertUnique(params);
2900
2984
  const result = await execution.execGet(query);
2901
2985
  if (result && result.node_id !== params.nodeId) {
2902
- throw new chunkNI72YOJB_cjs.UniquenessError({
2986
+ throw new chunkMRDBBHIZ_cjs.UniquenessError({
2903
2987
  constraintName: params.constraintName,
2904
2988
  kind: params.nodeKind,
2905
2989
  existingId: result.node_id,
@@ -2919,7 +3003,7 @@ function createCommonOperationBackend(options) {
2919
3003
  continue;
2920
3004
  }
2921
3005
  if (existing.nodeId !== entry.nodeId) {
2922
- throw new chunkNI72YOJB_cjs.UniquenessError({
3006
+ throw new chunkMRDBBHIZ_cjs.UniquenessError({
2923
3007
  constraintName: entry.constraintName,
2924
3008
  kind: entry.nodeKind,
2925
3009
  existingId: existing.nodeId,
@@ -2929,7 +3013,7 @@ function createCommonOperationBackend(options) {
2929
3013
  }
2930
3014
  }
2931
3015
  const deduped = [...byTarget.values()];
2932
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(
3016
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(
2933
3017
  deduped,
2934
3018
  batchConfig.uniqueInsertBatchSize
2935
3019
  )) {
@@ -2944,7 +3028,7 @@ function createCommonOperationBackend(options) {
2944
3028
  for (const entry of chunk2) {
2945
3029
  const owner = ownerByTarget.get(targetKey(entry));
2946
3030
  if (owner !== void 0 && owner !== entry.nodeId) {
2947
- throw new chunkNI72YOJB_cjs.UniquenessError({
3031
+ throw new chunkMRDBBHIZ_cjs.UniquenessError({
2948
3032
  constraintName: entry.constraintName,
2949
3033
  kind: entry.nodeKind,
2950
3034
  existingId: owner,
@@ -2962,7 +3046,7 @@ function createCommonOperationBackend(options) {
2962
3046
  },
2963
3047
  async hardDeleteUniquesByNodeIds(params) {
2964
3048
  const nodeIds = [...new Set(params.nodeIds)];
2965
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(
3049
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(
2966
3050
  nodeIds,
2967
3051
  batchConfig.uniqueDeleteChunkSize
2968
3052
  )) {
@@ -2981,7 +3065,7 @@ function createCommonOperationBackend(options) {
2981
3065
  async checkUniqueBatch(params) {
2982
3066
  if (params.keys.length === 0) return [];
2983
3067
  const allRows = [];
2984
- for (const chunk2 of chunkBSFJMMV3_cjs.chunk(
3068
+ for (const chunk2 of chunkJR6SX5RH_cjs.chunk(
2985
3069
  params.keys,
2986
3070
  batchConfig.checkUniqueBatchChunkSize
2987
3071
  )) {
@@ -3012,7 +3096,7 @@ function createCommonOperationBackend(options) {
3012
3096
  if (existingRaw !== void 0) {
3013
3097
  const existing = rowMappers.toSchemaVersionRow(existingRaw);
3014
3098
  if (existing.schema_hash !== params.schemaHash) {
3015
- throw new chunkNI72YOJB_cjs.SchemaContentConflictError({
3099
+ throw new chunkMRDBBHIZ_cjs.SchemaContentConflictError({
3016
3100
  graphId: params.graphId,
3017
3101
  version: params.version,
3018
3102
  existingHash: existing.schema_hash,
@@ -3060,7 +3144,7 @@ function createCommonOperationBackend(options) {
3060
3144
  );
3061
3145
  const insertedRaw = await execution.execGet(insertQuery);
3062
3146
  if (!insertedRaw) {
3063
- throw new chunkNI72YOJB_cjs.DatabaseOperationError(
3147
+ throw new chunkMRDBBHIZ_cjs.DatabaseOperationError(
3064
3148
  "Insert schema failed: no row returned",
3065
3149
  { operation: "insert", entity: "schema" }
3066
3150
  );
@@ -3078,7 +3162,7 @@ function createCommonOperationBackend(options) {
3078
3162
  operationStrategy.buildGetSchemaVersion(params.graphId, params.version)
3079
3163
  );
3080
3164
  if (!targetRaw) {
3081
- throw new chunkNI72YOJB_cjs.MigrationError(
3165
+ throw new chunkMRDBBHIZ_cjs.MigrationError(
3082
3166
  `Cannot activate version ${params.version}: version does not exist for graph "${params.graphId}".`,
3083
3167
  {
3084
3168
  graphId: params.graphId,
@@ -3111,7 +3195,7 @@ function quoteSqlIdentifier(identifier) {
3111
3195
  }
3112
3196
  function requireRawExecution(backend) {
3113
3197
  if (backend.executeRaw === void 0) {
3114
- throw new chunkNI72YOJB_cjs.TrustedImportError(
3198
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3115
3199
  "This backend cannot execute the raw statements required by trusted import.",
3116
3200
  "backend_unsupported"
3117
3201
  );
@@ -3120,7 +3204,7 @@ function requireRawExecution(backend) {
3120
3204
  }
3121
3205
  function requireStatementExecution(backend) {
3122
3206
  if (backend.executeStatement === void 0) {
3123
- throw new chunkNI72YOJB_cjs.TrustedImportError(
3207
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3124
3208
  "This backend cannot execute the index lifecycle required by trusted import.",
3125
3209
  "backend_unsupported"
3126
3210
  );
@@ -3142,7 +3226,7 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
3142
3226
  []
3143
3227
  );
3144
3228
  if (!rowIndicatesExistingData(rows[0])) return;
3145
- throw new chunkNI72YOJB_cjs.TrustedImportError(
3229
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3146
3230
  "Trusted import requires globally empty TypeGraph node and edge tables.",
3147
3231
  "database_not_empty",
3148
3232
  { tables: [tableNames.nodes, tableNames.edges] },
@@ -3154,8 +3238,8 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
3154
3238
  async function lockPostgresTrustedImportTables(backend, tableNames) {
3155
3239
  const executeStatement = requireStatementExecution(backend);
3156
3240
  await executeStatement(
3157
- chunkVCRRKBLN_cjs.asCompiledStatementSql(
3158
- chunkVCRRKBLN_cjs.sql.raw(
3241
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3242
+ chunkEDN4Y4ZG_cjs.sql.raw(
3159
3243
  `LOCK TABLE ${quoteSqlIdentifier(tableNames.nodes)}, ${quoteSqlIdentifier(tableNames.edges)} IN ACCESS EXCLUSIVE MODE`
3160
3244
  )
3161
3245
  )
@@ -3175,8 +3259,8 @@ async function suspendSqliteSecondaryIndexes(backend, tableNames) {
3175
3259
  );
3176
3260
  for (const definition of definitions) {
3177
3261
  await executeStatement(
3178
- chunkVCRRKBLN_cjs.asCompiledStatementSql(
3179
- chunkVCRRKBLN_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3262
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3263
+ chunkEDN4Y4ZG_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3180
3264
  )
3181
3265
  );
3182
3266
  }
@@ -3206,8 +3290,8 @@ async function suspendPostgresSecondaryIndexes(backend, tableNames) {
3206
3290
  );
3207
3291
  for (const definition of definitions) {
3208
3292
  await executeStatement(
3209
- chunkVCRRKBLN_cjs.asCompiledStatementSql(
3210
- chunkVCRRKBLN_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3293
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3294
+ chunkEDN4Y4ZG_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
3211
3295
  )
3212
3296
  );
3213
3297
  }
@@ -3217,20 +3301,20 @@ async function restoreSecondaryIndexes(backend, definitions) {
3217
3301
  const executeStatement = requireStatementExecution(backend);
3218
3302
  for (const definition of definitions) {
3219
3303
  await executeStatement(
3220
- chunkVCRRKBLN_cjs.asCompiledStatementSql(chunkVCRRKBLN_cjs.sql.raw(definition.index_definition))
3304
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(chunkEDN4Y4ZG_cjs.sql.raw(definition.index_definition))
3221
3305
  );
3222
3306
  }
3223
3307
  }
3224
3308
  async function analyzeImportedTables(backend, tableNames) {
3225
3309
  const executeStatement = requireStatementExecution(backend);
3226
3310
  await executeStatement(
3227
- chunkVCRRKBLN_cjs.asCompiledStatementSql(
3228
- chunkVCRRKBLN_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.nodes)}`)
3311
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3312
+ chunkEDN4Y4ZG_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.nodes)}`)
3229
3313
  )
3230
3314
  );
3231
3315
  await executeStatement(
3232
- chunkVCRRKBLN_cjs.asCompiledStatementSql(
3233
- chunkVCRRKBLN_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.edges)}`)
3316
+ chunkEDN4Y4ZG_cjs.asCompiledStatementSql(
3317
+ chunkEDN4Y4ZG_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.edges)}`)
3234
3318
  )
3235
3319
  );
3236
3320
  }
@@ -3245,7 +3329,7 @@ function postgresArray(values) {
3245
3329
  function createSqliteTrustedImportSession(executionAdapter, tableNames) {
3246
3330
  const executePreparedRunBatch = executionAdapter.executePreparedRunBatch;
3247
3331
  if (executePreparedRunBatch === void 0) {
3248
- throw new chunkNI72YOJB_cjs.TrustedImportError(
3332
+ throw new chunkMRDBBHIZ_cjs.TrustedImportError(
3249
3333
  "Trusted import requires a synchronous SQLite driver with prepared statement support.",
3250
3334
  "backend_unsupported"
3251
3335
  );
@@ -3417,5 +3501,5 @@ exports.tableExistsFromRow = tableExistsFromRow;
3417
3501
  exports.vectorSlotFromCreateIndexParams = vectorSlotFromCreateIndexParams;
3418
3502
  exports.vectorSlotFromDropIndexParams = vectorSlotFromDropIndexParams;
3419
3503
  exports.vectorSlotFromParams = vectorSlotFromParams;
3420
- //# sourceMappingURL=chunk-MUK4BU7K.cjs.map
3421
- //# sourceMappingURL=chunk-MUK4BU7K.cjs.map
3504
+ //# sourceMappingURL=chunk-UPAJHMW3.cjs.map
3505
+ //# sourceMappingURL=chunk-UPAJHMW3.cjs.map