@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,12 +1,12 @@
1
- import { dk as GraphDef } from '../types-CWg4dTjj.cjs';
2
- export { y as ContributionDiagnostic, z as ContributionDiagnosticState, N as ContributionRepairEntry, O as ContributionRepairResult } from '../types-CWg4dTjj.cjs';
1
+ import { d as GraphDef } from '../types-6yf0Vv-_.cjs';
2
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../types-6yf0Vv-_.cjs';
3
3
  import { z } from 'zod';
4
- import { a as Store } from '../store-DR9J7JVB.cjs';
5
- import { I as IngestionImportTarget } from '../ingestion-import-target-DCpfM1PX.cjs';
6
- import '../temporal-B4Ky4wzh.cjs';
7
- import '../searchable-C8-RrL3l.cjs';
8
- import '../manager-D348fa6W.cjs';
9
- import '../materialize-indexes-CrSiW_lT.cjs';
4
+ import { a as Store } from '../store-CuFX7fCx.cjs';
5
+ import { I as IngestionImportTarget } from '../ingestion-import-target-CAs1OX-l.cjs';
6
+ import '../temporal-CpyEiRY8.cjs';
7
+ import '../searchable-ClgET_i7.cjs';
8
+ import '../manager-D_t7oK69.cjs';
9
+ import '../resolve-WEW8gWws.cjs';
10
10
 
11
11
  /**
12
12
  * Graph interchange format types.
@@ -1,12 +1,12 @@
1
- import { dk as GraphDef } from '../types-CWg4dTjj.js';
2
- export { y as ContributionDiagnostic, z as ContributionDiagnosticState, N as ContributionRepairEntry, O as ContributionRepairResult } from '../types-CWg4dTjj.js';
1
+ import { d as GraphDef } from '../types-6yf0Vv-_.js';
2
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../types-6yf0Vv-_.js';
3
3
  import { z } from 'zod';
4
- import { a as Store } from '../store-CTfQ9taw.js';
5
- import { I as IngestionImportTarget } from '../ingestion-import-target-CI8OWIkM.js';
6
- import '../temporal-CBOrERz5.js';
7
- import '../searchable-z4BiFfHI.js';
8
- import '../manager-Cfg1ENj1.js';
9
- import '../materialize-indexes-C9GG3O3C.js';
4
+ import { a as Store } from '../store-D-ZjXQpW.js';
5
+ import { I as IngestionImportTarget } from '../ingestion-import-target-DCQSPfNx.js';
6
+ import '../temporal-y0Aep9Su.js';
7
+ import '../searchable-C_UREI9K.js';
8
+ import '../manager-B68OrPR2.js';
9
+ import '../resolve-D_H8MHtq.js';
10
10
 
11
11
  /**
12
12
  * Graph interchange format types.
@@ -1,20 +1,22 @@
1
- import { exportStreamBackend, serializedStreamRefusal, withImportStreamLease } from '../chunk-2CYI5HRH.js';
2
- export { ConflictStrategySchema, ExportOptionsSchema, ExportStreamOptionsSchema, FORMAT_VERSION, GraphDataHeaderSchema, GraphDataSchema, GraphDataSourceSchema, GraphInterchangeChunkSchema, IdentityInterchangeModeSchema, ImportErrorSchema, ImportOptionsSchema, ImportResultSchema, InterchangeEdgeSchema, InterchangeIdentityAssertionSchema, InterchangeIdentitySchema, InterchangeNodeSchema, UnknownPropertyStrategySchema, exportGraph, exportGraphStream, importGraph, importGraphStream } from '../chunk-2CYI5HRH.js';
3
- import '../chunk-2GIV5X4P.js';
4
- import { storeBackend } from '../chunk-VTJVMP4I.js';
5
- import '../chunk-YA36ABIL.js';
6
- import '../chunk-GVYVGGPJ.js';
7
- import '../chunk-FX5ZW6PN.js';
8
- import { snapshotExportContention } from '../chunk-IRPYOHRC.js';
9
- import '../chunk-Y55DLLEG.js';
10
- import '../chunk-PALYTHGM.js';
11
- import '../chunk-DI6VC62F.js';
12
- import '../chunk-5LKOVCPP.js';
1
+ import { exportStreamBackend, serializedStreamRefusal, withImportStreamLease } from '../chunk-RI7RJH4G.js';
2
+ export { ConflictStrategySchema, ExportOptionsSchema, ExportStreamOptionsSchema, FORMAT_VERSION, GraphDataHeaderSchema, GraphDataSchema, GraphDataSourceSchema, GraphInterchangeChunkSchema, IdentityInterchangeModeSchema, ImportErrorSchema, ImportOptionsSchema, ImportResultSchema, InterchangeEdgeSchema, InterchangeIdentityAssertionSchema, InterchangeIdentitySchema, InterchangeNodeSchema, UnknownPropertyStrategySchema, exportGraph, exportGraphStream, importGraph, importGraphStream } from '../chunk-RI7RJH4G.js';
3
+ import '../chunk-TYEYRCXL.js';
4
+ import { storeBackend } from '../chunk-4DKY6RIU.js';
5
+ import '../chunk-NGQDGL5X.js';
6
+ import '../chunk-WFSYYU4W.js';
7
+ import '../chunk-VAAC7L57.js';
8
+ import { snapshotExportContention } from '../chunk-QG5VEOKX.js';
9
+ import '../chunk-XORONCV3.js';
10
+ import '../chunk-LKZDQ2B4.js';
11
+ import '../chunk-M3VTS3F6.js';
12
+ import '../chunk-RVUL2HXY.js';
13
13
  import '../chunk-6NKSE5AU.js';
14
14
  import { isInvertedValidityWindow, isCanonicalIsoDate } from '../chunk-K46SDNQD.js';
15
+ import '../chunk-7G5IYROL.js';
16
+ import '../chunk-4QKOZYMV.js';
15
17
  import '../chunk-2EBMPJBO.js';
16
- import '../chunk-EDLKIQRI.js';
17
- import '../chunk-46UGOVRW.js';
18
+ import '../chunk-PC5NGH5A.js';
19
+ import '../chunk-7QFRK6PU.js';
18
20
  import '../chunk-W6OG3HDG.js';
19
21
  import { getSearchableFields, resolveGraphVectorSlots } from '../chunk-PC2UBAUB.js';
20
22
  import '../chunk-FZHF5UWR.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/interchange/trusted-import.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A,EAAM,SAAS,IAAA;AAAK;AAC7D,GAEN;AACA,EAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAS,KAAA,EAAM;AAC7B,EAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAS,KAAA,EAAM;AAC7B,EAAA,IAAI,aAAa,MAAA,EAAW;AAC1B,IAAA,MAAM,EAAE,IAAA,EAAM,UAAA,EAAY,UAAA,EAAY,SAAS,UAAA,EAAW;AAAA,EAC5D;AACF;AAGO,SAAS,kBAAA,CACd,OACA,IAAA,EAC8B;AAC9B,EAAA,OAAO,wBAAA,CAAyB,KAAA,EAAO,eAAA,CAAgB,IAAI,CAAC,CAAA;AAC9D","file":"index.js","sourcesContent":["import { snapshotExportContention } from \"../backend/transaction-resource\";\nimport type {\n InsertEdgeParams,\n InsertNodeParams,\n TrustedImportOptions,\n TrustedImportSession,\n} from \"../backend/types\";\nimport type { GraphDef } from \"../core/define-graph\";\nimport { resolveGraphVectorSlots } from \"../core/embedding\";\nimport { getSearchableFields } from \"../core/searchable\";\nimport { TrustedImportError } from \"../errors\";\nimport { storeBackend } from \"../store/runtime-port\";\nimport type { Store } from \"../store/store\";\nimport { isCanonicalIsoDate, isInvertedValidityWindow } from \"../utils/date\";\nimport { serializedStreamRefusal, withImportStreamLease } from \"./import\";\nimport { exportStreamBackend } from \"./stream-source\";\nimport type {\n GraphData,\n GraphInterchangeChunk,\n InterchangeEdge,\n InterchangeNode,\n} from \"./types\";\n\n/** Counts committed by a trusted initial import. */\nexport type TrustedImportResult = Readonly<{\n nodes: number;\n edges: number;\n}>;\n\nfunction rejectUnsupportedStoreFeatures<G extends GraphDef>(\n store: Store<G>,\n): void {\n if (store.historyEnabled) {\n throw new TrustedImportError(\n \"Trusted import does not support recorded-time history capture.\",\n \"history_unsupported\",\n { graphId: store.graphId },\n );\n }\n if (store.revisionTrackingEnabled) {\n throw new TrustedImportError(\n \"Trusted import does not support revision tracking.\",\n \"revision_tracking_unsupported\",\n { graphId: store.graphId },\n );\n }\n if (store.graph.identity !== undefined) {\n throw new TrustedImportError(\n \"Trusted import does not maintain Operational Identity assertions or closure.\",\n \"identity_unsupported\",\n { graphId: store.graphId },\n );\n }\n\n const uniqueKinds = Object.values(store.graph.nodes)\n .filter((registration) => (registration.unique?.length ?? 0) > 0)\n .map((registration) => registration.type.kind);\n if (uniqueKinds.length > 0) {\n throw new TrustedImportError(\n \"Trusted import does not maintain node uniqueness sidecars.\",\n \"uniqueness_unsupported\",\n { graphId: store.graphId, nodeKinds: uniqueKinds },\n );\n }\n\n const searchableKinds = Object.values(store.graph.nodes)\n .filter(\n (registration) =>\n getSearchableFields(registration.type.schema).length > 0,\n )\n .map((registration) => registration.type.kind);\n if (searchableKinds.length > 0) {\n throw new TrustedImportError(\n \"Trusted import does not maintain fulltext sidecars.\",\n \"fulltext_unsupported\",\n { graphId: store.graphId, nodeKinds: searchableKinds },\n );\n }\n\n const vectorSlots = resolveGraphVectorSlots(store.graph);\n if (vectorSlots.length > 0) {\n throw new TrustedImportError(\n \"Trusted import does not maintain vector sidecars.\",\n \"vector_unsupported\",\n {\n graphId: store.graphId,\n fields: vectorSlots.map((slot) => `${slot.nodeKind}.${slot.fieldPath}`),\n },\n );\n }\n}\n\nfunction invalidStream(message: string): TrustedImportError {\n return new TrustedImportError(message, \"invalid_stream\");\n}\n\n/** The stated validity window of a streamed node or edge. */\ntype StatedValidityWindow = Readonly<{\n validFrom?: string | null | undefined;\n validTo?: string | undefined;\n}>;\n\ntype ValidityWindowField = \"validFrom\" | \"validTo\";\n\n/** A stated window field that is not canonical, with the offending value. */\ntype NonCanonicalWindow = Readonly<{\n field: ValidityWindowField;\n value: string;\n}>;\n\n/**\n * The first window field of `entity` stating a timestamp that is not canonical\n * fixed-width UTC ISO 8601 — with the offending value — or `undefined` when\n * every stated one is canonical.\n *\n * A trusted stream is never re-parsed, so this is the only place its timestamps\n * are held to the format the rest of the system assumes. It is deliberately\n * format-ONLY — the same {@link isCanonicalIsoDate} decision the untrusted\n * path's schema and the store's own write validation make, and nothing more —\n * because a non-canonical instant is not merely ugly: every temporal filter\n * compares these values AS TEXT against an `asOf` coordinate, so a variable-width\n * one (`...:00.1Z`, an offset, date-only) mis-sorts and silently includes or\n * excludes the wrong rows once stored, and it would mis-decide the negative-width\n * check below on the way in. Two field tests per row costs about a microsecond\n * against the ~4µs an in-memory SQLite row already costs — the price of the\n * stream's ordering claims meaning anything.\n *\n * An absent field states nothing, and a `null` validFrom is a confirmed\n * open-left window (see {@link nodeParams}) — neither is a timestamp to check.\n */\nfunction nonCanonicalWindowOf(\n entity: StatedValidityWindow,\n): NonCanonicalWindow | undefined {\n const { validFrom, validTo } = entity;\n if (typeof validFrom === \"string\" && !isCanonicalIsoDate(validFrom)) {\n return { field: \"validFrom\", value: validFrom };\n }\n if (typeof validTo === \"string\" && !isCanonicalIsoDate(validTo)) {\n return { field: \"validTo\", value: validTo };\n }\n return undefined;\n}\n\n/**\n * The first entity in `entities` stating a non-canonical window timestamp, with\n * the offending field and value. Allocates only on the failing path, so a clean\n * chunk pays one predicate per stated timestamp and nothing else.\n */\nfunction findNonCanonicalWindow<Entity extends StatedValidityWindow>(\n entities: readonly Entity[],\n): (NonCanonicalWindow & Readonly<{ entity: Entity }>) | undefined {\n for (const entity of entities) {\n const nonCanonical = nonCanonicalWindowOf(entity);\n if (nonCanonical !== undefined) return { entity, ...nonCanonical };\n }\n return undefined;\n}\n\n/** The refusal message for a non-canonical window timestamp on `subject`. */\nfunction nonCanonicalWindowMessage(\n subject: string,\n field: ValidityWindowField,\n value: string,\n): string {\n return (\n `Non-canonical ${field} in trusted import: ${subject} states \"${value}\". ` +\n `Expected canonical fixed-width UTC ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ), ` +\n `which is what makes a stored timestamp sort chronologically against an asOf ` +\n `coordinate. Convert with new Date(value).toISOString().`\n );\n}\n\n/**\n * An entity whose stated window has negative width. Trusted import writes\n * straight to SQL and skips schema validation for throughput, but a row that\n * stopped being true before it started is a stream SHAPE fault rather than a\n * policy check: it is unobservable at every `asOf` coordinate, and no later\n * write repairs it. `null` validFrom is a confirmed open-left window, so there\n * is no lower bound to invert against; zero width is legal (see\n * {@link isInvertedValidityWindow}).\n *\n * Only ever reached for a chunk whose timestamps {@link findNonCanonicalWindow}\n * has already accepted, which is what makes the lexicographic compare inside a\n * chronological one.\n */\nfunction hasInvertedWindow(entity: StatedValidityWindow): boolean {\n return isInvertedValidityWindow(\n entity.validFrom ?? undefined,\n entity.validTo,\n );\n}\n\nfunction nodeParams(graphId: string, node: InterchangeNode): InsertNodeParams {\n return {\n graphId,\n kind: node.kind,\n id: node.id,\n props: node.properties,\n ...(node.validFrom === undefined ? {} : { validFrom: node.validFrom }),\n ...(node.validTo === undefined ? {} : { validTo: node.validTo }),\n };\n}\n\nfunction edgeParams(graphId: string, edge: InterchangeEdge): InsertEdgeParams {\n return {\n graphId,\n id: edge.id,\n kind: edge.kind,\n fromKind: edge.from.kind,\n fromId: edge.from.id,\n toKind: edge.to.kind,\n toId: edge.to.id,\n props: edge.properties,\n ...(edge.validFrom === undefined ? {} : { validFrom: edge.validFrom }),\n ...(edge.validTo === undefined ? {} : { validTo: edge.validTo }),\n };\n}\n\nasync function consumeTrustedChunks<G extends GraphDef>(\n store: Store<G>,\n session: TrustedImportSession,\n chunks:\n AsyncIterable<GraphInterchangeChunk> | Iterable<GraphInterchangeChunk>,\n): Promise<TrustedImportResult> {\n const nodeKinds = new Set(\n Object.values(store.graph.nodes).map(\n (registration) => registration.type.kind,\n ),\n );\n const edgeKinds = new Set(\n Object.values(store.graph.edges).map(\n (registration) => registration.type.kind,\n ),\n );\n let receivedHeader = false;\n let receivedEdges = false;\n let nodeCount = 0;\n let edgeCount = 0;\n\n for await (const chunk of chunks) {\n switch (chunk.type) {\n case \"header\": {\n if (receivedHeader) {\n throw invalidStream(\n \"Trusted graph interchange stream emitted more than one header.\",\n );\n }\n if (chunk.header.identity !== undefined) {\n throw invalidStream(\n \"Trusted graph interchange import does not support identity data. \" +\n \"Use importGraphStream() for an identity export.\",\n );\n }\n receivedHeader = true;\n break;\n }\n case \"nodes\": {\n if (!receivedHeader) {\n throw invalidStream(\n \"Trusted graph interchange stream must start with a header.\",\n );\n }\n if (receivedEdges) {\n throw invalidStream(\n \"Trusted graph interchange stream cannot emit nodes after edges.\",\n );\n }\n const unknownKind = chunk.nodes.find(\n (node) => !nodeKinds.has(node.kind),\n )?.kind;\n if (unknownKind !== undefined) {\n throw invalidStream(\n `Unknown node kind in trusted import: ${unknownKind}`,\n );\n }\n const nonCanonicalNode = findNonCanonicalWindow(chunk.nodes);\n if (nonCanonicalNode !== undefined) {\n const { entity, field, value } = nonCanonicalNode;\n throw invalidStream(\n nonCanonicalWindowMessage(\n `${entity.kind} \"${entity.id}\"`,\n field,\n value,\n ),\n );\n }\n const invertedNode = chunk.nodes.find((node) =>\n hasInvertedWindow(node),\n );\n if (invertedNode !== undefined) {\n throw invalidStream(\n `Inverted validity window in trusted import: ${invertedNode.kind} \"${invertedNode.id}\" ends at ` +\n `\"${String(invertedNode.validTo)}\", before its validFrom \"${String(invertedNode.validFrom)}\".`,\n );\n }\n await session.insertNodes(\n chunk.nodes.map((node) => nodeParams(store.graphId, node)),\n );\n nodeCount += chunk.nodes.length;\n break;\n }\n case \"edges\": {\n if (!receivedHeader) {\n throw invalidStream(\n \"Trusted graph interchange stream must start with a header.\",\n );\n }\n receivedEdges = true;\n const invalidEdge = chunk.edges.find(\n (edge) =>\n !edgeKinds.has(edge.kind) ||\n !nodeKinds.has(edge.from.kind) ||\n !nodeKinds.has(edge.to.kind),\n );\n if (invalidEdge !== undefined) {\n throw invalidStream(\n `Unknown edge or endpoint kind in trusted import: ${invalidEdge.kind}`,\n );\n }\n const nonCanonicalEdge = findNonCanonicalWindow(chunk.edges);\n if (nonCanonicalEdge !== undefined) {\n const { entity, field, value } = nonCanonicalEdge;\n throw invalidStream(\n nonCanonicalWindowMessage(\n `${entity.kind} edge \"${entity.id}\"`,\n field,\n value,\n ),\n );\n }\n const invertedEdge = chunk.edges.find((edge) =>\n hasInvertedWindow(edge),\n );\n if (invertedEdge !== undefined) {\n throw invalidStream(\n `Inverted validity window in trusted import: ${invertedEdge.kind} edge \"${invertedEdge.id}\" ends at ` +\n `\"${String(invertedEdge.validTo)}\", before its validFrom \"${String(invertedEdge.validFrom)}\".`,\n );\n }\n await session.insertEdges(\n chunk.edges.map((edge) => edgeParams(store.graphId, edge)),\n );\n edgeCount += chunk.edges.length;\n break;\n }\n case \"identity\": {\n // The trusted session writes only the node and edge relations, so it\n // has no way to persist assertions or materialize the derived closure.\n // Refuse rather than drop identity truth from an identity-enabled\n // export: `importGraph` / `importGraphStream` carry it correctly.\n throw invalidStream(\n \"Trusted graph interchange import does not support identity assertions. \" +\n \"Use importGraphStream() for an export that carries identity truth.\",\n );\n }\n }\n }\n\n if (!receivedHeader) {\n throw invalidStream(\n \"Trusted graph interchange stream ended before emitting a header.\",\n );\n }\n return { nodes: nodeCount, edges: edgeCount };\n}\n\n/**\n * Atomically imports a header-first stream into a fresh, dedicated database.\n *\n * This is an intentionally trusted path. It checks stream ordering and kind\n * names, but it does not validate properties, references, cardinality, or\n * conflicts. The caller must guarantee those invariants. Use\n * {@link importGraphStream} for untrusted data.\n *\n * Trusted of the DATA, not of the connection: this holds ONE write transaction\n * open for the entire stream, which makes it a long-lived import holder exactly\n * like {@link importGraphStream}, and it is guarded the same way — the source\n * stream's own backend is checked against the target before the first chunk, and\n * the target connection's exclusive stream lease is held for the whole import.\n * `trustedImportGraphStream(target, exportGraphStream(source))` over one\n * serialized connection is therefore refused with the shared typed\n * {@link ConfigurationError} (codes and `details.heldBy` / `details.requested`\n * as documented on `importGraphStream`) rather than reaching the driver as a\n * nested BEGIN.\n */\nexport async function trustedImportGraphStream<G extends GraphDef>(\n store: Store<G>,\n chunks:\n AsyncIterable<GraphInterchangeChunk> | Iterable<GraphInterchangeChunk>,\n): Promise<TrustedImportResult> {\n rejectUnsupportedStoreFeatures(store);\n const backend = storeBackend(store);\n const trustedImport = backend.trustedImport;\n if (trustedImport === undefined) {\n throw new TrustedImportError(\n `The ${backend.dialect} backend does not support trusted import.`,\n \"backend_unsupported\",\n { dialect: backend.dialect },\n );\n }\n // The same pre-flight `importGraphStream` runs, through the same owner of\n // \"would this export hold the connection that write needs\": a synchronous\n // iterable was materialized by its producer and holds nothing, so only an\n // async stream can name a source backend.\n const sourceBackend =\n Symbol.asyncIterator in chunks ? exportStreamBackend(chunks) : undefined;\n const contention =\n sourceBackend === undefined ? undefined : (\n snapshotExportContention(sourceBackend, backend)\n );\n if (contention !== undefined) {\n throw serializedStreamRefusal({\n graphId: store.graphId,\n requested: \"import-stream\",\n heldBy: \"export-snapshot\",\n detector: contention,\n });\n }\n const schemaVersion = store.introspect().schemaVersion;\n const options: TrustedImportOptions | undefined =\n schemaVersion === undefined ? undefined : (\n {\n schemaWrite: {\n graphId: store.graphId,\n expectedVersion: schemaVersion,\n },\n }\n );\n return withImportStreamLease(store, () =>\n trustedImport(\n (session) => consumeTrustedChunks(store, session, chunks),\n options,\n ),\n );\n}\n\nfunction* graphDataChunks(data: GraphData): Iterable<GraphInterchangeChunk> {\n const { nodes, edges, identity, ...header } = data;\n yield {\n type: \"header\",\n header:\n identity === undefined ? header : (\n {\n ...header,\n identity: { profile: identity.profile, mode: identity.mode },\n }\n ),\n };\n yield { type: \"nodes\", nodes };\n yield { type: \"edges\", edges };\n if (identity !== undefined) {\n yield { type: \"identity\", assertions: identity.assertions };\n }\n}\n\n/** In-memory convenience wrapper around {@link trustedImportGraphStream}. */\nexport function trustedImportGraph<G extends GraphDef>(\n store: Store<G>,\n data: GraphData,\n): Promise<TrustedImportResult> {\n return trustedImportGraphStream(store, graphDataChunks(data));\n}\n"]}
1
+ {"version":3,"sources":["../../src/interchange/trusted-import.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,+BACP,KAAA,EACM;AACN,EAAA,IAAI,MAAM,cAAA,EAAgB;A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AM,EAAE,IAAA,EAAM,OAAA,EAAS,KAAA,EAAM;AAC7B,EAAA,IAAI,aAAa,MAAA,EAAW;AAC1B,IAAA,MAAM,EAAE,IAAA,EAAM,UAAA,EAAY,UAAA,EAAY,SAAS,UAAA,EAAW;AAAA,EAC5D;AACF;AAGO,SAAS,kBAAA,CACd,OACA,IAAA,EAC8B;AAC9B,EAAA,OAAO,wBAAA,CAAyB,KAAA,EAAO,eAAA,CAAgB,IAAI,CAAC,CAAA;AAC9D","file":"index.js","sourcesContent":["import { snapshotExportContention } from \"../backend/transaction-resource\";\nimport type {\n InsertEdgeParams,\n InsertNodeParams,\n TrustedImportOptions,\n TrustedImportSession,\n} from \"../backend/types\";\nimport type { GraphDef } from \"../core/define-graph\";\nimport { resolveGraphVectorSlots } from \"../core/embedding\";\nimport { getSearchableFields } from \"../core/searchable\";\nimport { TrustedImportError } from \"../errors\";\nimport { storeBackend } from \"../store/runtime-port\";\nimport type { Store } from \"../store/store\";\nimport { isCanonicalIsoDate, isInvertedValidityWindow } from \"../utils/date\";\nimport { serializedStreamRefusal, withImportStreamLease } from \"./import\";\nimport { exportStreamBackend } from \"./stream-source\";\nimport type {\n GraphData,\n GraphInterchangeChunk,\n InterchangeEdge,\n InterchangeNode,\n} from \"./types\";\n\n/** Counts committed by a trusted initial import. */\nexport type TrustedImportResult = Readonly<{\n nodes: number;\n edges: number;\n}>;\n\nfunction rejectUnsupportedStoreFeatures<G extends GraphDef>(\n store: Store<G>,\n): void {\n if (store.historyEnabled) {\n throw new TrustedImportError(\n \"Trusted import does not support recorded-time history capture.\",\n \"history_unsupported\",\n { graphId: store.graphId },\n );\n }\n if (store.revisionTrackingEnabled) {\n throw new TrustedImportError(\n \"Trusted import does not support revision tracking.\",\n \"revision_tracking_unsupported\",\n { graphId: store.graphId },\n );\n }\n if (store.graph.identity !== undefined) {\n throw new TrustedImportError(\n \"Trusted import does not maintain Operational Identity assertions or closure.\",\n \"identity_unsupported\",\n { graphId: store.graphId },\n );\n }\n\n const uniqueKinds = Object.values(store.graph.nodes)\n .filter((registration) => (registration.unique?.length ?? 0) > 0)\n .map((registration) => registration.type.kind);\n if (uniqueKinds.length > 0) {\n throw new TrustedImportError(\n \"Trusted import does not maintain node uniqueness sidecars.\",\n \"uniqueness_unsupported\",\n { graphId: store.graphId, nodeKinds: uniqueKinds },\n );\n }\n\n const searchableKinds = Object.values(store.graph.nodes)\n .filter(\n (registration) =>\n getSearchableFields(registration.type.schema).length > 0,\n )\n .map((registration) => registration.type.kind);\n if (searchableKinds.length > 0) {\n throw new TrustedImportError(\n \"Trusted import does not maintain fulltext sidecars.\",\n \"fulltext_unsupported\",\n { graphId: store.graphId, nodeKinds: searchableKinds },\n );\n }\n\n const vectorSlots = resolveGraphVectorSlots(store.graph);\n if (vectorSlots.length > 0) {\n throw new TrustedImportError(\n \"Trusted import does not maintain vector sidecars.\",\n \"vector_unsupported\",\n {\n graphId: store.graphId,\n fields: vectorSlots.map((slot) => `${slot.nodeKind}.${slot.fieldPath}`),\n },\n );\n }\n}\n\nfunction invalidStream(message: string): TrustedImportError {\n return new TrustedImportError(message, \"invalid_stream\");\n}\n\n/** The stated validity window of a streamed node or edge. */\ntype StatedValidityWindow = Readonly<{\n validFrom?: string | null | undefined;\n validTo?: string | undefined;\n}>;\n\ntype ValidityWindowField = \"validFrom\" | \"validTo\";\n\n/** A stated window field that is not canonical, with the offending value. */\ntype NonCanonicalWindow = Readonly<{\n field: ValidityWindowField;\n value: string;\n}>;\n\n/**\n * The first window field of `entity` stating a timestamp that is not canonical\n * fixed-width UTC ISO 8601 — with the offending value — or `undefined` when\n * every stated one is canonical.\n *\n * A trusted stream is never re-parsed, so this is the only place its timestamps\n * are held to the format the rest of the system assumes. It is deliberately\n * format-ONLY — the same {@link isCanonicalIsoDate} decision the untrusted\n * path's schema and the store's own write validation make, and nothing more —\n * because a non-canonical instant is not merely ugly: every temporal filter\n * compares these values AS TEXT against an `asOf` coordinate, so a variable-width\n * one (`...:00.1Z`, an offset, date-only) mis-sorts and silently includes or\n * excludes the wrong rows once stored, and it would mis-decide the negative-width\n * check below on the way in. Two field tests per row costs about a microsecond\n * against the ~4µs an in-memory SQLite row already costs — the price of the\n * stream's ordering claims meaning anything.\n *\n * An absent field states nothing, and a `null` validFrom is a confirmed\n * open-left window (see {@link nodeParams}) — neither is a timestamp to check.\n */\nfunction nonCanonicalWindowOf(\n entity: StatedValidityWindow,\n): NonCanonicalWindow | undefined {\n const { validFrom, validTo } = entity;\n if (typeof validFrom === \"string\" && !isCanonicalIsoDate(validFrom)) {\n return { field: \"validFrom\", value: validFrom };\n }\n if (typeof validTo === \"string\" && !isCanonicalIsoDate(validTo)) {\n return { field: \"validTo\", value: validTo };\n }\n return undefined;\n}\n\n/**\n * The first entity in `entities` stating a non-canonical window timestamp, with\n * the offending field and value. Allocates only on the failing path, so a clean\n * chunk pays one predicate per stated timestamp and nothing else.\n */\nfunction findNonCanonicalWindow<Entity extends StatedValidityWindow>(\n entities: readonly Entity[],\n): (NonCanonicalWindow & Readonly<{ entity: Entity }>) | undefined {\n for (const entity of entities) {\n const nonCanonical = nonCanonicalWindowOf(entity);\n if (nonCanonical !== undefined) return { entity, ...nonCanonical };\n }\n return undefined;\n}\n\n/** The refusal message for a non-canonical window timestamp on `subject`. */\nfunction nonCanonicalWindowMessage(\n subject: string,\n field: ValidityWindowField,\n value: string,\n): string {\n return (\n `Non-canonical ${field} in trusted import: ${subject} states \"${value}\". ` +\n `Expected canonical fixed-width UTC ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ), ` +\n `which is what makes a stored timestamp sort chronologically against an asOf ` +\n `coordinate. Convert with new Date(value).toISOString().`\n );\n}\n\n/**\n * An entity whose stated window has negative width. Trusted import writes\n * straight to SQL and skips schema validation for throughput, but a row that\n * stopped being true before it started is a stream SHAPE fault rather than a\n * policy check: it is unobservable at every `asOf` coordinate, and no later\n * write repairs it. `null` validFrom is a confirmed open-left window, so there\n * is no lower bound to invert against; zero width is legal (see\n * {@link isInvertedValidityWindow}).\n *\n * Only ever reached for a chunk whose timestamps {@link findNonCanonicalWindow}\n * has already accepted, which is what makes the lexicographic compare inside a\n * chronological one.\n */\nfunction hasInvertedWindow(entity: StatedValidityWindow): boolean {\n return isInvertedValidityWindow(\n entity.validFrom ?? undefined,\n entity.validTo,\n );\n}\n\nfunction nodeParams(graphId: string, node: InterchangeNode): InsertNodeParams {\n return {\n graphId,\n kind: node.kind,\n id: node.id,\n props: node.properties,\n ...(node.validFrom === undefined ? {} : { validFrom: node.validFrom }),\n ...(node.validTo === undefined ? {} : { validTo: node.validTo }),\n };\n}\n\nfunction edgeParams(graphId: string, edge: InterchangeEdge): InsertEdgeParams {\n return {\n graphId,\n id: edge.id,\n kind: edge.kind,\n fromKind: edge.from.kind,\n fromId: edge.from.id,\n toKind: edge.to.kind,\n toId: edge.to.id,\n props: edge.properties,\n ...(edge.validFrom === undefined ? {} : { validFrom: edge.validFrom }),\n ...(edge.validTo === undefined ? {} : { validTo: edge.validTo }),\n };\n}\n\nasync function consumeTrustedChunks<G extends GraphDef>(\n store: Store<G>,\n session: TrustedImportSession,\n chunks:\n AsyncIterable<GraphInterchangeChunk> | Iterable<GraphInterchangeChunk>,\n): Promise<TrustedImportResult> {\n const nodeKinds = new Set(\n Object.values(store.graph.nodes).map(\n (registration) => registration.type.kind,\n ),\n );\n const edgeKinds = new Set(\n Object.values(store.graph.edges).map(\n (registration) => registration.type.kind,\n ),\n );\n let receivedHeader = false;\n let receivedEdges = false;\n let nodeCount = 0;\n let edgeCount = 0;\n\n for await (const chunk of chunks) {\n switch (chunk.type) {\n case \"header\": {\n if (receivedHeader) {\n throw invalidStream(\n \"Trusted graph interchange stream emitted more than one header.\",\n );\n }\n if (chunk.header.identity !== undefined) {\n throw invalidStream(\n \"Trusted graph interchange import does not support identity data. \" +\n \"Use importGraphStream() for an identity export.\",\n );\n }\n receivedHeader = true;\n break;\n }\n case \"nodes\": {\n if (!receivedHeader) {\n throw invalidStream(\n \"Trusted graph interchange stream must start with a header.\",\n );\n }\n if (receivedEdges) {\n throw invalidStream(\n \"Trusted graph interchange stream cannot emit nodes after edges.\",\n );\n }\n const unknownKind = chunk.nodes.find(\n (node) => !nodeKinds.has(node.kind),\n )?.kind;\n if (unknownKind !== undefined) {\n throw invalidStream(\n `Unknown node kind in trusted import: ${unknownKind}`,\n );\n }\n const nonCanonicalNode = findNonCanonicalWindow(chunk.nodes);\n if (nonCanonicalNode !== undefined) {\n const { entity, field, value } = nonCanonicalNode;\n throw invalidStream(\n nonCanonicalWindowMessage(\n `${entity.kind} \"${entity.id}\"`,\n field,\n value,\n ),\n );\n }\n const invertedNode = chunk.nodes.find((node) =>\n hasInvertedWindow(node),\n );\n if (invertedNode !== undefined) {\n throw invalidStream(\n `Inverted validity window in trusted import: ${invertedNode.kind} \"${invertedNode.id}\" ends at ` +\n `\"${String(invertedNode.validTo)}\", before its validFrom \"${String(invertedNode.validFrom)}\".`,\n );\n }\n await session.insertNodes(\n chunk.nodes.map((node) => nodeParams(store.graphId, node)),\n );\n nodeCount += chunk.nodes.length;\n break;\n }\n case \"edges\": {\n if (!receivedHeader) {\n throw invalidStream(\n \"Trusted graph interchange stream must start with a header.\",\n );\n }\n receivedEdges = true;\n const invalidEdge = chunk.edges.find(\n (edge) =>\n !edgeKinds.has(edge.kind) ||\n !nodeKinds.has(edge.from.kind) ||\n !nodeKinds.has(edge.to.kind),\n );\n if (invalidEdge !== undefined) {\n throw invalidStream(\n `Unknown edge or endpoint kind in trusted import: ${invalidEdge.kind}`,\n );\n }\n const nonCanonicalEdge = findNonCanonicalWindow(chunk.edges);\n if (nonCanonicalEdge !== undefined) {\n const { entity, field, value } = nonCanonicalEdge;\n throw invalidStream(\n nonCanonicalWindowMessage(\n `${entity.kind} edge \"${entity.id}\"`,\n field,\n value,\n ),\n );\n }\n const invertedEdge = chunk.edges.find((edge) =>\n hasInvertedWindow(edge),\n );\n if (invertedEdge !== undefined) {\n throw invalidStream(\n `Inverted validity window in trusted import: ${invertedEdge.kind} edge \"${invertedEdge.id}\" ends at ` +\n `\"${String(invertedEdge.validTo)}\", before its validFrom \"${String(invertedEdge.validFrom)}\".`,\n );\n }\n await session.insertEdges(\n chunk.edges.map((edge) => edgeParams(store.graphId, edge)),\n );\n edgeCount += chunk.edges.length;\n break;\n }\n case \"identity\": {\n // The trusted session writes only the node and edge relations, so it\n // has no way to persist assertions or materialize the derived closure.\n // Refuse rather than drop identity truth from an identity-enabled\n // export: `importGraph` / `importGraphStream` carry it correctly.\n throw invalidStream(\n \"Trusted graph interchange import does not support identity assertions. \" +\n \"Use importGraphStream() for an export that carries identity truth.\",\n );\n }\n }\n }\n\n if (!receivedHeader) {\n throw invalidStream(\n \"Trusted graph interchange stream ended before emitting a header.\",\n );\n }\n return { nodes: nodeCount, edges: edgeCount };\n}\n\n/**\n * Atomically imports a header-first stream into a fresh, dedicated database.\n *\n * This is an intentionally trusted path. It checks stream ordering and kind\n * names, but it does not validate properties, references, cardinality, or\n * conflicts. The caller must guarantee those invariants. Use\n * {@link importGraphStream} for untrusted data.\n *\n * Trusted of the DATA, not of the connection: this holds ONE write transaction\n * open for the entire stream, which makes it a long-lived import holder exactly\n * like {@link importGraphStream}, and it is guarded the same way — the source\n * stream's own backend is checked against the target before the first chunk, and\n * the target connection's exclusive stream lease is held for the whole import.\n * `trustedImportGraphStream(target, exportGraphStream(source))` over one\n * serialized connection is therefore refused with the shared typed\n * {@link ConfigurationError} (codes and `details.heldBy` / `details.requested`\n * as documented on `importGraphStream`) rather than reaching the driver as a\n * nested BEGIN.\n */\nexport async function trustedImportGraphStream<G extends GraphDef>(\n store: Store<G>,\n chunks:\n AsyncIterable<GraphInterchangeChunk> | Iterable<GraphInterchangeChunk>,\n): Promise<TrustedImportResult> {\n rejectUnsupportedStoreFeatures(store);\n const backend = storeBackend(store);\n const trustedImport = backend.trustedImport;\n if (trustedImport === undefined) {\n throw new TrustedImportError(\n `The ${backend.dialect} backend does not support trusted import.`,\n \"backend_unsupported\",\n { dialect: backend.dialect },\n );\n }\n // The same pre-flight `importGraphStream` runs, through the same owner of\n // \"would this export hold the connection that write needs\": a synchronous\n // iterable was materialized by its producer and holds nothing, so only an\n // async stream can name a source backend.\n const sourceBackend =\n Symbol.asyncIterator in chunks ? exportStreamBackend(chunks) : undefined;\n const contention =\n sourceBackend === undefined ? undefined : (\n snapshotExportContention(sourceBackend, backend)\n );\n if (contention !== undefined) {\n throw serializedStreamRefusal({\n graphId: store.graphId,\n requested: \"import-stream\",\n heldBy: \"export-snapshot\",\n detector: contention,\n });\n }\n const schemaVersion = store.introspect().schemaVersion;\n const options: TrustedImportOptions | undefined =\n schemaVersion === undefined ? undefined : (\n {\n schemaWrite: {\n graphId: store.graphId,\n expectedVersion: schemaVersion,\n },\n }\n );\n return withImportStreamLease(store, () =>\n trustedImport(\n (session) => consumeTrustedChunks(store, session, chunks),\n options,\n ),\n );\n}\n\nfunction* graphDataChunks(data: GraphData): Iterable<GraphInterchangeChunk> {\n const { nodes, edges, identity, ...header } = data;\n yield {\n type: \"header\",\n header:\n identity === undefined ? header : (\n {\n ...header,\n identity: { profile: identity.profile, mode: identity.mode },\n }\n ),\n };\n yield { type: \"nodes\", nodes };\n yield { type: \"edges\", edges };\n if (identity !== undefined) {\n yield { type: \"identity\", assertions: identity.assertions };\n }\n}\n\n/** In-memory convenience wrapper around {@link trustedImportGraphStream}. */\nexport function trustedImportGraph<G extends GraphDef>(\n store: Store<G>,\n data: GraphData,\n): Promise<TrustedImportResult> {\n return trustedImportGraphStream(store, graphDataChunks(data));\n}\n"]}
@@ -0,0 +1,75 @@
1
+ import { createLocalSqliteBackend } from './chunk-57JM6NW3.js';
2
+ import './chunk-H4FY6OZK.js';
3
+ import './chunk-NBOS7BY3.js';
4
+ import { createSqliteTables } from './chunk-UKOVGCRN.js';
5
+ import './chunk-PVFFH7TL.js';
6
+ import { createStoreWithSchema } from './chunk-K6OZIHKI.js';
7
+ import './chunk-IZD4HTCP.js';
8
+ import './chunk-SLGGT2XD.js';
9
+ import './chunk-VUQZNUHU.js';
10
+ import './chunk-IRCWIA3R.js';
11
+ import './chunk-TYEYRCXL.js';
12
+ import './chunk-4DKY6RIU.js';
13
+ import './chunk-NGQDGL5X.js';
14
+ import './chunk-EVYW3532.js';
15
+ import './chunk-LI4K2KEJ.js';
16
+ import './chunk-WFSYYU4W.js';
17
+ import './chunk-VAAC7L57.js';
18
+ import './chunk-QG5VEOKX.js';
19
+ import './chunk-XORONCV3.js';
20
+ import { closeAfterFailure } from './chunk-LKZDQ2B4.js';
21
+ import './chunk-M3VTS3F6.js';
22
+ import './chunk-RVUL2HXY.js';
23
+ import './chunk-6NKSE5AU.js';
24
+ import './chunk-K46SDNQD.js';
25
+ import './chunk-6NLYIMJO.js';
26
+ import './chunk-36VYWVQU.js';
27
+ import './chunk-LZMQ3SFK.js';
28
+ import './chunk-K34OPSJK.js';
29
+ import './chunk-7G5IYROL.js';
30
+ import './chunk-4QKOZYMV.js';
31
+ import './chunk-2EBMPJBO.js';
32
+ import './chunk-PC5NGH5A.js';
33
+ import './chunk-7QFRK6PU.js';
34
+ import './chunk-AMKPPFUO.js';
35
+ import './chunk-W6OG3HDG.js';
36
+ import './chunk-PC2UBAUB.js';
37
+ import './chunk-XZW2CTNO.js';
38
+ import './chunk-JXXDZTMN.js';
39
+ import './chunk-FZHF5UWR.js';
40
+ import './chunk-HZUB5CON.js';
41
+ import './chunk-YDEJQWOL.js';
42
+ import './chunk-FWJKWH6U.js';
43
+ import './chunk-DYATYRY4.js';
44
+
45
+ // src/backend/sqlite/local-store-impl.ts
46
+ function withoutSchemaOverride(schemaManagement) {
47
+ if (schemaManagement === void 0) return {};
48
+ const { schema: smuggled, ...rest } = schemaManagement;
49
+ return rest;
50
+ }
51
+ async function createLocalSqliteStoreImpl(graph, options) {
52
+ const tables = options.store?.schema === void 0 ? void 0 : createSqliteTables(options.store.schema.tables);
53
+ const { backend } = createLocalSqliteBackend({
54
+ ...options.path === void 0 ? {} : { path: options.path },
55
+ ...options.pragmas === void 0 ? {} : { pragmas: options.pragmas },
56
+ ...options.capabilities === void 0 ? {} : { capabilities: options.capabilities },
57
+ ...tables === void 0 ? {} : { tables }
58
+ });
59
+ try {
60
+ const [store] = await createStoreWithSchema(graph, backend, {
61
+ ...options.store,
62
+ // The type already excludes `schema` here; the runtime strip guards
63
+ // untyped callers, so the provisioned schema (or the default tables)
64
+ // can never diverge from the one the Store reads.
65
+ ...withoutSchemaOverride(options.schemaManagement)
66
+ });
67
+ return store;
68
+ } catch (error) {
69
+ return closeAfterFailure(backend, error);
70
+ }
71
+ }
72
+
73
+ export { createLocalSqliteStoreImpl };
74
+ //# sourceMappingURL=local-store-impl-JC7OBRAW.js.map
75
+ //# sourceMappingURL=local-store-impl-JC7OBRAW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/backend/sqlite/local-store-impl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAS,sBACP,gBAAA,EACsC;AACtC,EAAA,IAAI,gBAAA,KAAqB,MAAA,EAAW,OAAO,EAAC;AAC5C,EAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAU,GAAG,MAAK,GAChC,gBAAA;AAEF,EAAA,OAAO,IAAA;AACT;AAGA,eAAsB,0BAAA,CACpB,OACA,OAAA,EAC4D;AAC5D,EAAA,MAAM,MAAA,GACJ,OAAA,CAAQ,KAAA,EAAO,MAAA,KAAW,MAAA,GACxB,SACA,kBAAA,CAAmB,OAAA,CAAQ,KAAA,CAAM,MAAA,CAAO,MAAM,CAAA;AAClD,EAAA,MAAM,EAAE,OAAA,EAAQ,GAAI,wBAAA,CAAyB;AAAA,IAC3C,GAAI,QAAQ,IAAA,KAAS,MAAA,GAAY,EAAC,GAAI,EAAE,IAAA,EAAM,OAAA,CAAQ,IAAA,EAAK;AAAA,IAC3D,GAAI,QAAQ,OAAA,KAAY,MAAA,GAAY,EAAC,GAAI,EAAE,OAAA,EAAS,OAAA,CAAQ,OAAA,EAAQ;AAAA,IACpE,GAAI,QAAQ,YAAA,KAAiB,MAAA,GAC3B,EAAC,GACD,EAAE,YAAA,EAAc,OAAA,CAAQ,YAAA,EAAa;AAAA,IACvC,GAAI,MAAA,KAAW,MAAA,GAAY,EAAC,GAAI,EAAE,MAAA;AAAO,GAC1C,CAAA;AACD,EAAA,IAAI;AACF,IAAA,MAAM,CAAC,KAAK,CAAA,GAAI,MAAM,qBAAA,CAAsB,OAAO,OAAA,EAAS;AAAA,MAC1D,GAAG,OAAA,CAAQ,KAAA;AAAA;AAAA;AAAA;AAAA,MAIX,GAAG,qBAAA,CAAsB,OAAA,CAAQ,gBAAgB;AAAA,KAClD,CAAA;AACD,IAAA,OAAO,KAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,iBAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EACzC;AACF","file":"local-store-impl-JC7OBRAW.js","sourcesContent":["/**\n * `createLocalSqliteStore`'s implementation body, loaded behind a dynamic\n * import from `./local-store.ts` so a missing `drizzle-orm` peer surfaces as\n * a typed refusal rather than a bare module-resolution stack (design §4.4b).\n *\n * This module owns every value import that reaches `drizzle-orm` for this\n * entrypoint. `local-store.ts` must hold no static reference to this module\n * — only the `import(\"./local-store-impl\")` expression inside its factory —\n * so the dynamic import survives into its own chunk in both the ESM and CJS\n * shipped artifacts (I12).\n */\nimport { type GraphDef } from \"../../core/define-graph\";\nimport { type SchemaManagerOptions } from \"../../schema/manager\";\nimport {\n createStoreWithSchema,\n type HistoryStore,\n type RecordedReadStore,\n type Store,\n} from \"../../store/store\";\nimport { createSqliteTables } from \"../drizzle/schema/sqlite\";\nimport { closeAfterFailure } from \"../types\";\nimport { createLocalSqliteBackend } from \"./local\";\n// Type-only import: the option types are defined in `local-store.ts`, which\n// is this module's ONLY caller. A static value import in the other direction\n// would give `collectModuleEdges` a real edge from the store module to this\n// one, turning I12's `load` verdict dirty; a type-only import is erased at\n// runtime (no `verbatimModuleSyntax` in `tsconfig.base.json`), so this\n// back-edge never becomes a value cycle — the same precedent documented at\n// `src/errors/index.ts:26-29`.\nimport type { LocalSqliteStoreOptions } from \"./local-store\";\n\n/**\n * Drops a smuggled `schema` from the nested schema-management options: the\n * effective `SqlSchema` has exactly one source (`store.schema`), which also\n * drives physical table provisioning in this constructor.\n */\nfunction withoutSchemaOverride(\n schemaManagement: Omit<SchemaManagerOptions, \"schema\"> | undefined,\n): Omit<SchemaManagerOptions, \"schema\"> {\n if (schemaManagement === undefined) return {};\n const { schema: smuggled, ...rest } =\n schemaManagement as SchemaManagerOptions;\n void smuggled;\n return rest;\n}\n\n/** {@link createLocalSqliteStore}'s implementation body, verbatim from before the split. */\nexport async function createLocalSqliteStoreImpl<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions,\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>> {\n const tables =\n options.store?.schema === undefined ?\n undefined\n : createSqliteTables(options.store.schema.tables);\n const { backend } = createLocalSqliteBackend({\n ...(options.path === undefined ? {} : { path: options.path }),\n ...(options.pragmas === undefined ? {} : { pragmas: options.pragmas }),\n ...(options.capabilities === undefined ?\n {}\n : { capabilities: options.capabilities }),\n ...(tables === undefined ? {} : { tables }),\n });\n try {\n const [store] = await createStoreWithSchema(graph, backend, {\n ...options.store,\n // The type already excludes `schema` here; the runtime strip guards\n // untyped callers, so the provisioned schema (or the default tables)\n // can never diverge from the one the Store reads.\n ...withoutSchemaOverride(options.schemaManagement),\n });\n return store;\n } catch (error) {\n return closeAfterFailure(backend, error);\n }\n}\n"]}
@@ -0,0 +1,77 @@
1
+ 'use strict';
2
+
3
+ var chunkVKHXYVN7_cjs = require('./chunk-VKHXYVN7.cjs');
4
+ require('./chunk-QCD5JKU4.cjs');
5
+ require('./chunk-WDM5WQK4.cjs');
6
+ var chunk5WWEYV4H_cjs = require('./chunk-5WWEYV4H.cjs');
7
+ require('./chunk-LLFPQOBA.cjs');
8
+ var chunk5FVZSE3B_cjs = require('./chunk-5FVZSE3B.cjs');
9
+ require('./chunk-322TBTOQ.cjs');
10
+ require('./chunk-UYKDYE5D.cjs');
11
+ require('./chunk-36SX6QXP.cjs');
12
+ require('./chunk-EKG2UXNX.cjs');
13
+ require('./chunk-2KCTP3U2.cjs');
14
+ require('./chunk-2CVDZCXH.cjs');
15
+ require('./chunk-FMMW3KX7.cjs');
16
+ require('./chunk-AOGOC6JF.cjs');
17
+ require('./chunk-PS3TUWJM.cjs');
18
+ require('./chunk-L6EVYIID.cjs');
19
+ require('./chunk-JQKMEKKW.cjs');
20
+ require('./chunk-NLX5OWK7.cjs');
21
+ require('./chunk-ZGVTNKTX.cjs');
22
+ var chunkNUQ2YFFH_cjs = require('./chunk-NUQ2YFFH.cjs');
23
+ require('./chunk-7B7I7YAW.cjs');
24
+ require('./chunk-CRZ56SZU.cjs');
25
+ require('./chunk-DWUDZ66O.cjs');
26
+ require('./chunk-M5MSP3BI.cjs');
27
+ require('./chunk-TM54OBHX.cjs');
28
+ require('./chunk-I7YAY2VQ.cjs');
29
+ require('./chunk-OTNTGEXR.cjs');
30
+ require('./chunk-ZY4GXIVN.cjs');
31
+ require('./chunk-JVA3KDEA.cjs');
32
+ require('./chunk-A4C4NJ5U.cjs');
33
+ require('./chunk-NAUA4PW5.cjs');
34
+ require('./chunk-H2VWDQWC.cjs');
35
+ require('./chunk-H5IJSROF.cjs');
36
+ require('./chunk-7EO3TCQB.cjs');
37
+ require('./chunk-RT5ZY4XA.cjs');
38
+ require('./chunk-HAHNRASW.cjs');
39
+ require('./chunk-RJMHU2MG.cjs');
40
+ require('./chunk-XUO3KQFO.cjs');
41
+ require('./chunk-VLBTRXA2.cjs');
42
+ require('./chunk-RWUWTJQY.cjs');
43
+ require('./chunk-X4GDXBOP.cjs');
44
+ require('./chunk-A7J2YDDI.cjs');
45
+ require('./chunk-N66HCGCY.cjs');
46
+
47
+ // src/backend/sqlite/local-store-impl.ts
48
+ function withoutSchemaOverride(schemaManagement) {
49
+ if (schemaManagement === void 0) return {};
50
+ const { schema: smuggled, ...rest } = schemaManagement;
51
+ return rest;
52
+ }
53
+ async function createLocalSqliteStoreImpl(graph, options) {
54
+ const tables = options.store?.schema === void 0 ? void 0 : chunk5WWEYV4H_cjs.createSqliteTables(options.store.schema.tables);
55
+ const { backend } = chunkVKHXYVN7_cjs.createLocalSqliteBackend({
56
+ ...options.path === void 0 ? {} : { path: options.path },
57
+ ...options.pragmas === void 0 ? {} : { pragmas: options.pragmas },
58
+ ...options.capabilities === void 0 ? {} : { capabilities: options.capabilities },
59
+ ...tables === void 0 ? {} : { tables }
60
+ });
61
+ try {
62
+ const [store] = await chunk5FVZSE3B_cjs.createStoreWithSchema(graph, backend, {
63
+ ...options.store,
64
+ // The type already excludes `schema` here; the runtime strip guards
65
+ // untyped callers, so the provisioned schema (or the default tables)
66
+ // can never diverge from the one the Store reads.
67
+ ...withoutSchemaOverride(options.schemaManagement)
68
+ });
69
+ return store;
70
+ } catch (error) {
71
+ return chunkNUQ2YFFH_cjs.closeAfterFailure(backend, error);
72
+ }
73
+ }
74
+
75
+ exports.createLocalSqliteStoreImpl = createLocalSqliteStoreImpl;
76
+ //# sourceMappingURL=local-store-impl-UOS2LUIG.cjs.map
77
+ //# sourceMappingURL=local-store-impl-UOS2LUIG.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/backend/sqlite/local-store-impl.ts"],"names":["createSqliteTables","createLocalSqliteBackend","createStoreWithSchema","closeAfterFailure"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAS,sBACP,gBAAA,EACsC;AACtC,EAAA,IAAI,gBAAA,KAAqB,MAAA,EAAW,OAAO,EAAC;AAC5C,EAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAU,GAAG,MAAK,GAChC,gBAAA;AAEF,EAAA,OAAO,IAAA;AACT;AAGA,eAAsB,0BAAA,CACpB,OACA,OAAA,EAC4D;AAC5D,EAAA,MAAM,MAAA,GACJ,OAAA,CAAQ,KAAA,EAAO,MAAA,KAAW,MAAA,GACxB,SACAA,oCAAA,CAAmB,OAAA,CAAQ,KAAA,CAAM,MAAA,CAAO,MAAM,CAAA;AAClD,EAAA,MAAM,EAAE,OAAA,EAAQ,GAAIC,0CAAA,CAAyB;AAAA,IAC3C,GAAI,QAAQ,IAAA,KAAS,MAAA,GAAY,EAAC,GAAI,EAAE,IAAA,EAAM,OAAA,CAAQ,IAAA,EAAK;AAAA,IAC3D,GAAI,QAAQ,OAAA,KAAY,MAAA,GAAY,EAAC,GAAI,EAAE,OAAA,EAAS,OAAA,CAAQ,OAAA,EAAQ;AAAA,IACpE,GAAI,QAAQ,YAAA,KAAiB,MAAA,GAC3B,EAAC,GACD,EAAE,YAAA,EAAc,OAAA,CAAQ,YAAA,EAAa;AAAA,IACvC,GAAI,MAAA,KAAW,MAAA,GAAY,EAAC,GAAI,EAAE,MAAA;AAAO,GAC1C,CAAA;AACD,EAAA,IAAI;AACF,IAAA,MAAM,CAAC,KAAK,CAAA,GAAI,MAAMC,uCAAA,CAAsB,OAAO,OAAA,EAAS;AAAA,MAC1D,GAAG,OAAA,CAAQ,KAAA;AAAA;AAAA;AAAA;AAAA,MAIX,GAAG,qBAAA,CAAsB,OAAA,CAAQ,gBAAgB;AAAA,KAClD,CAAA;AACD,IAAA,OAAO,KAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAOC,mCAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EACzC;AACF","file":"local-store-impl-UOS2LUIG.cjs","sourcesContent":["/**\n * `createLocalSqliteStore`'s implementation body, loaded behind a dynamic\n * import from `./local-store.ts` so a missing `drizzle-orm` peer surfaces as\n * a typed refusal rather than a bare module-resolution stack (design §4.4b).\n *\n * This module owns every value import that reaches `drizzle-orm` for this\n * entrypoint. `local-store.ts` must hold no static reference to this module\n * — only the `import(\"./local-store-impl\")` expression inside its factory —\n * so the dynamic import survives into its own chunk in both the ESM and CJS\n * shipped artifacts (I12).\n */\nimport { type GraphDef } from \"../../core/define-graph\";\nimport { type SchemaManagerOptions } from \"../../schema/manager\";\nimport {\n createStoreWithSchema,\n type HistoryStore,\n type RecordedReadStore,\n type Store,\n} from \"../../store/store\";\nimport { createSqliteTables } from \"../drizzle/schema/sqlite\";\nimport { closeAfterFailure } from \"../types\";\nimport { createLocalSqliteBackend } from \"./local\";\n// Type-only import: the option types are defined in `local-store.ts`, which\n// is this module's ONLY caller. A static value import in the other direction\n// would give `collectModuleEdges` a real edge from the store module to this\n// one, turning I12's `load` verdict dirty; a type-only import is erased at\n// runtime (no `verbatimModuleSyntax` in `tsconfig.base.json`), so this\n// back-edge never becomes a value cycle — the same precedent documented at\n// `src/errors/index.ts:26-29`.\nimport type { LocalSqliteStoreOptions } from \"./local-store\";\n\n/**\n * Drops a smuggled `schema` from the nested schema-management options: the\n * effective `SqlSchema` has exactly one source (`store.schema`), which also\n * drives physical table provisioning in this constructor.\n */\nfunction withoutSchemaOverride(\n schemaManagement: Omit<SchemaManagerOptions, \"schema\"> | undefined,\n): Omit<SchemaManagerOptions, \"schema\"> {\n if (schemaManagement === undefined) return {};\n const { schema: smuggled, ...rest } =\n schemaManagement as SchemaManagerOptions;\n void smuggled;\n return rest;\n}\n\n/** {@link createLocalSqliteStore}'s implementation body, verbatim from before the split. */\nexport async function createLocalSqliteStoreImpl<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions,\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>> {\n const tables =\n options.store?.schema === undefined ?\n undefined\n : createSqliteTables(options.store.schema.tables);\n const { backend } = createLocalSqliteBackend({\n ...(options.path === undefined ? {} : { path: options.path }),\n ...(options.pragmas === undefined ? {} : { pragmas: options.pragmas }),\n ...(options.capabilities === undefined ?\n {}\n : { capabilities: options.capabilities }),\n ...(tables === undefined ? {} : { tables }),\n });\n try {\n const [store] = await createStoreWithSchema(graph, backend, {\n ...options.store,\n // The type already excludes `schema` here; the runtime strip guards\n // untyped callers, so the provisioned schema (or the default tables)\n // can never diverge from the one the Store reads.\n ...withoutSchemaOverride(options.schemaManagement),\n });\n return store;\n } catch (error) {\n return closeAfterFailure(backend, error);\n }\n}\n"]}
@@ -1,5 +1,4 @@
1
- import { dt as NodeType, du as AnyEdgeType, a_ as GraphIdentityConfig, dv as SqlSchema, c1 as SchemaVersionRow, aV as GraphBackend, c9 as SerializedSchema, dk as GraphDef } from './types-CWg4dTjj.js';
2
- import { S as SchemaDiff } from './materialize-indexes-C9GG3O3C.js';
1
+ import { dF as NodeType, dG as AnyEdgeType, G as GraphIdentityConfig, dH as SchemaDiff, dI as SqlSchema, ca as SchemaVersionRow, e as GraphBackend, ci as SerializedSchema, d as GraphDef } from './types-6yf0Vv-_.js';
3
2
 
4
3
  /**
5
4
  * KindRegistry holds precomputed closures for ontological reasoning.
@@ -1,5 +1,4 @@
1
- import { dt as NodeType, du as AnyEdgeType, a_ as GraphIdentityConfig, dv as SqlSchema, c1 as SchemaVersionRow, aV as GraphBackend, c9 as SerializedSchema, dk as GraphDef } from './types-CWg4dTjj.cjs';
2
- import { S as SchemaDiff } from './materialize-indexes-CrSiW_lT.cjs';
1
+ import { dF as NodeType, dG as AnyEdgeType, G as GraphIdentityConfig, dH as SchemaDiff, dI as SqlSchema, ca as SchemaVersionRow, e as GraphBackend, ci as SerializedSchema, d as GraphDef } from './types-6yf0Vv-_.cjs';
3
2
 
4
3
  /**
5
4
  * KindRegistry holds precomputed closures for ontological reasoning.
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ var chunkS5GU4LUN_cjs = require('./chunk-S5GU4LUN.cjs');
4
+ require('./chunk-B3MN7EJR.cjs');
5
+ var chunk5WWEYV4H_cjs = require('./chunk-5WWEYV4H.cjs');
6
+ require('./chunk-LLFPQOBA.cjs');
7
+ var chunk5FVZSE3B_cjs = require('./chunk-5FVZSE3B.cjs');
8
+ require('./chunk-TIJUA4I6.cjs');
9
+ require('./chunk-UYKDYE5D.cjs');
10
+ require('./chunk-36SX6QXP.cjs');
11
+ require('./chunk-EKG2UXNX.cjs');
12
+ require('./chunk-2KCTP3U2.cjs');
13
+ require('./chunk-2CVDZCXH.cjs');
14
+ require('./chunk-FMMW3KX7.cjs');
15
+ require('./chunk-AOGOC6JF.cjs');
16
+ require('./chunk-PS3TUWJM.cjs');
17
+ require('./chunk-L6EVYIID.cjs');
18
+ require('./chunk-JQKMEKKW.cjs');
19
+ require('./chunk-NLX5OWK7.cjs');
20
+ require('./chunk-ZGVTNKTX.cjs');
21
+ var chunkNUQ2YFFH_cjs = require('./chunk-NUQ2YFFH.cjs');
22
+ require('./chunk-7B7I7YAW.cjs');
23
+ require('./chunk-CRZ56SZU.cjs');
24
+ require('./chunk-DWUDZ66O.cjs');
25
+ require('./chunk-M5MSP3BI.cjs');
26
+ require('./chunk-TM54OBHX.cjs');
27
+ require('./chunk-I7YAY2VQ.cjs');
28
+ require('./chunk-OTNTGEXR.cjs');
29
+ require('./chunk-ZY4GXIVN.cjs');
30
+ require('./chunk-JVA3KDEA.cjs');
31
+ require('./chunk-A4C4NJ5U.cjs');
32
+ require('./chunk-NAUA4PW5.cjs');
33
+ require('./chunk-H2VWDQWC.cjs');
34
+ require('./chunk-H5IJSROF.cjs');
35
+ require('./chunk-7EO3TCQB.cjs');
36
+ require('./chunk-RT5ZY4XA.cjs');
37
+ require('./chunk-HAHNRASW.cjs');
38
+ require('./chunk-RJMHU2MG.cjs');
39
+ require('./chunk-XUO3KQFO.cjs');
40
+ require('./chunk-VLBTRXA2.cjs');
41
+ require('./chunk-RWUWTJQY.cjs');
42
+ require('./chunk-X4GDXBOP.cjs');
43
+ require('./chunk-A7J2YDDI.cjs');
44
+ require('./chunk-N66HCGCY.cjs');
45
+
46
+ // src/backend/postgres/pglite-store-impl.ts
47
+ function withoutSchemaOverride(schemaManagement) {
48
+ if (schemaManagement === void 0) return {};
49
+ const { schema: smuggled, ...rest } = schemaManagement;
50
+ return rest;
51
+ }
52
+ async function createLocalPgliteStoreImpl(graph, options) {
53
+ const tables = options.store?.schema === void 0 ? void 0 : chunk5WWEYV4H_cjs.createPostgresTables(options.store.schema.tables);
54
+ const { backend } = await chunkS5GU4LUN_cjs.createLocalPgliteBackend({
55
+ ...options.dataDir === void 0 ? {} : { dataDir: options.dataDir },
56
+ ...options.vector === false ? { vector: false } : {},
57
+ ...tables === void 0 ? {} : { tables }
58
+ });
59
+ try {
60
+ const [store] = await chunk5FVZSE3B_cjs.createStoreWithSchema(graph, backend, {
61
+ ...options.store,
62
+ // The type already excludes `schema` here; the runtime strip guards
63
+ // untyped callers, so the provisioned schema (or the default tables)
64
+ // can never diverge from the one the Store reads.
65
+ ...withoutSchemaOverride(options.schemaManagement)
66
+ });
67
+ return store;
68
+ } catch (error) {
69
+ return chunkNUQ2YFFH_cjs.closeAfterFailure(backend, error);
70
+ }
71
+ }
72
+
73
+ exports.createLocalPgliteStoreImpl = createLocalPgliteStoreImpl;
74
+ //# sourceMappingURL=pglite-store-impl-J5J5AA52.cjs.map
75
+ //# sourceMappingURL=pglite-store-impl-J5J5AA52.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/backend/postgres/pglite-store-impl.ts"],"names":["createPostgresTables","createLocalPgliteBackend","createStoreWithSchema","closeAfterFailure"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAS,sBACP,gBAAA,EACsC;AACtC,EAAA,IAAI,gBAAA,KAAqB,MAAA,EAAW,OAAO,EAAC;AAC5C,EAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAU,GAAG,MAAK,GAChC,gBAAA;AAEF,EAAA,OAAO,IAAA;AACT;AAGA,eAAsB,0BAAA,CACpB,OACA,OAAA,EAC4D;AAC5D,EAAA,MAAM,MAAA,GACJ,OAAA,CAAQ,KAAA,EAAO,MAAA,KAAW,MAAA,GACxB,SACAA,sCAAA,CAAqB,OAAA,CAAQ,KAAA,CAAM,MAAA,CAAO,MAAM,CAAA;AACpD,EAAA,MAAM,EAAE,OAAA,EAAQ,GAAI,MAAMC,0CAAA,CAAyB;AAAA,IACjD,GAAI,QAAQ,OAAA,KAAY,MAAA,GAAY,EAAC,GAAI,EAAE,OAAA,EAAS,OAAA,CAAQ,OAAA,EAAQ;AAAA,IACpE,GAAI,QAAQ,MAAA,KAAW,KAAA,GAAQ,EAAE,MAAA,EAAQ,KAAA,KAAmB,EAAC;AAAA,IAC7D,GAAI,MAAA,KAAW,MAAA,GAAY,EAAC,GAAI,EAAE,MAAA;AAAO,GAC1C,CAAA;AACD,EAAA,IAAI;AACF,IAAA,MAAM,CAAC,KAAK,CAAA,GAAI,MAAMC,uCAAA,CAAsB,OAAO,OAAA,EAAS;AAAA,MAC1D,GAAG,OAAA,CAAQ,KAAA;AAAA;AAAA;AAAA;AAAA,MAIX,GAAG,qBAAA,CAAsB,OAAA,CAAQ,gBAAgB;AAAA,KAClD,CAAA;AACD,IAAA,OAAO,KAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAOC,mCAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EACzC;AACF","file":"pglite-store-impl-J5J5AA52.cjs","sourcesContent":["/**\n * `createLocalPgliteStore`'s implementation body, loaded behind a dynamic\n * import from `./pglite-store.ts` so a missing `drizzle-orm` peer surfaces as\n * a typed refusal rather than a bare module-resolution stack (design §4.4b).\n *\n * This module owns every value import that reaches `drizzle-orm` for this\n * entrypoint. `pglite-store.ts` must hold no static reference to this module\n * — only the `import(\"./pglite-store-impl\")` expression inside its factory —\n * so the dynamic import survives into its own chunk in both the ESM and CJS\n * shipped artifacts (I12).\n */\nimport { type GraphDef } from \"../../core/define-graph\";\nimport { type SchemaManagerOptions } from \"../../schema/manager\";\nimport {\n createStoreWithSchema,\n type HistoryStore,\n type RecordedReadStore,\n type Store,\n} from \"../../store/store\";\nimport { createPostgresTables } from \"../drizzle/schema/postgres\";\nimport { closeAfterFailure } from \"../types\";\nimport { createLocalPgliteBackend } from \"./pglite\";\n// Type-only import: the option types are defined in `pglite-store.ts`, which\n// is this module's ONLY caller. A static value import in the other direction\n// would give `collectModuleEdges` a real edge from the store module to this\n// one, turning I12's `load` verdict dirty; a type-only import is erased at\n// runtime (no `verbatimModuleSyntax` in `tsconfig.base.json`), so this\n// back-edge never becomes a value cycle — the same precedent documented at\n// `src/errors/index.ts:26-29`.\nimport type { LocalPgliteStoreOptions } from \"./pglite-store\";\n\n/**\n * Drops a smuggled `schema` from the nested schema-management options: the\n * effective `SqlSchema` has exactly one source (`store.schema`), which also\n * drives physical table provisioning in this constructor.\n */\nfunction withoutSchemaOverride(\n schemaManagement: Omit<SchemaManagerOptions, \"schema\"> | undefined,\n): Omit<SchemaManagerOptions, \"schema\"> {\n if (schemaManagement === undefined) return {};\n const { schema: smuggled, ...rest } =\n schemaManagement as SchemaManagerOptions;\n void smuggled;\n return rest;\n}\n\n/** {@link createLocalPgliteStore}'s implementation body, verbatim from before the split. */\nexport async function createLocalPgliteStoreImpl<G extends GraphDef>(\n graph: G,\n options: LocalPgliteStoreOptions,\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>> {\n const tables =\n options.store?.schema === undefined ?\n undefined\n : createPostgresTables(options.store.schema.tables);\n const { backend } = await createLocalPgliteBackend({\n ...(options.dataDir === undefined ? {} : { dataDir: options.dataDir }),\n ...(options.vector === false ? { vector: false as const } : {}),\n ...(tables === undefined ? {} : { tables }),\n });\n try {\n const [store] = await createStoreWithSchema(graph, backend, {\n ...options.store,\n // The type already excludes `schema` here; the runtime strip guards\n // untyped callers, so the provisioned schema (or the default tables)\n // can never diverge from the one the Store reads.\n ...withoutSchemaOverride(options.schemaManagement),\n });\n return store;\n } catch (error) {\n return closeAfterFailure(backend, error);\n }\n}\n"]}
@@ -0,0 +1,73 @@
1
+ import { createLocalPgliteBackend } from './chunk-SDPWO2Z5.js';
2
+ import './chunk-K67P5DLL.js';
3
+ import { createPostgresTables } from './chunk-UKOVGCRN.js';
4
+ import './chunk-PVFFH7TL.js';
5
+ import { createStoreWithSchema } from './chunk-K6OZIHKI.js';
6
+ import './chunk-CBOD7TXH.js';
7
+ import './chunk-SLGGT2XD.js';
8
+ import './chunk-VUQZNUHU.js';
9
+ import './chunk-IRCWIA3R.js';
10
+ import './chunk-TYEYRCXL.js';
11
+ import './chunk-4DKY6RIU.js';
12
+ import './chunk-NGQDGL5X.js';
13
+ import './chunk-EVYW3532.js';
14
+ import './chunk-LI4K2KEJ.js';
15
+ import './chunk-WFSYYU4W.js';
16
+ import './chunk-VAAC7L57.js';
17
+ import './chunk-QG5VEOKX.js';
18
+ import './chunk-XORONCV3.js';
19
+ import { closeAfterFailure } from './chunk-LKZDQ2B4.js';
20
+ import './chunk-M3VTS3F6.js';
21
+ import './chunk-RVUL2HXY.js';
22
+ import './chunk-6NKSE5AU.js';
23
+ import './chunk-K46SDNQD.js';
24
+ import './chunk-6NLYIMJO.js';
25
+ import './chunk-36VYWVQU.js';
26
+ import './chunk-LZMQ3SFK.js';
27
+ import './chunk-K34OPSJK.js';
28
+ import './chunk-7G5IYROL.js';
29
+ import './chunk-4QKOZYMV.js';
30
+ import './chunk-2EBMPJBO.js';
31
+ import './chunk-PC5NGH5A.js';
32
+ import './chunk-7QFRK6PU.js';
33
+ import './chunk-AMKPPFUO.js';
34
+ import './chunk-W6OG3HDG.js';
35
+ import './chunk-PC2UBAUB.js';
36
+ import './chunk-XZW2CTNO.js';
37
+ import './chunk-JXXDZTMN.js';
38
+ import './chunk-FZHF5UWR.js';
39
+ import './chunk-HZUB5CON.js';
40
+ import './chunk-YDEJQWOL.js';
41
+ import './chunk-FWJKWH6U.js';
42
+ import './chunk-DYATYRY4.js';
43
+
44
+ // src/backend/postgres/pglite-store-impl.ts
45
+ function withoutSchemaOverride(schemaManagement) {
46
+ if (schemaManagement === void 0) return {};
47
+ const { schema: smuggled, ...rest } = schemaManagement;
48
+ return rest;
49
+ }
50
+ async function createLocalPgliteStoreImpl(graph, options) {
51
+ const tables = options.store?.schema === void 0 ? void 0 : createPostgresTables(options.store.schema.tables);
52
+ const { backend } = await createLocalPgliteBackend({
53
+ ...options.dataDir === void 0 ? {} : { dataDir: options.dataDir },
54
+ ...options.vector === false ? { vector: false } : {},
55
+ ...tables === void 0 ? {} : { tables }
56
+ });
57
+ try {
58
+ const [store] = await createStoreWithSchema(graph, backend, {
59
+ ...options.store,
60
+ // The type already excludes `schema` here; the runtime strip guards
61
+ // untyped callers, so the provisioned schema (or the default tables)
62
+ // can never diverge from the one the Store reads.
63
+ ...withoutSchemaOverride(options.schemaManagement)
64
+ });
65
+ return store;
66
+ } catch (error) {
67
+ return closeAfterFailure(backend, error);
68
+ }
69
+ }
70
+
71
+ export { createLocalPgliteStoreImpl };
72
+ //# sourceMappingURL=pglite-store-impl-LDRH2DUH.js.map
73
+ //# sourceMappingURL=pglite-store-impl-LDRH2DUH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/backend/postgres/pglite-store-impl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAS,sBACP,gBAAA,EACsC;AACtC,EAAA,IAAI,gBAAA,KAAqB,MAAA,EAAW,OAAO,EAAC;AAC5C,EAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAU,GAAG,MAAK,GAChC,gBAAA;AAEF,EAAA,OAAO,IAAA;AACT;AAGA,eAAsB,0BAAA,CACpB,OACA,OAAA,EAC4D;AAC5D,EAAA,MAAM,MAAA,GACJ,OAAA,CAAQ,KAAA,EAAO,MAAA,KAAW,MAAA,GACxB,SACA,oBAAA,CAAqB,OAAA,CAAQ,KAAA,CAAM,MAAA,CAAO,MAAM,CAAA;AACpD,EAAA,MAAM,EAAE,OAAA,EAAQ,GAAI,MAAM,wBAAA,CAAyB;AAAA,IACjD,GAAI,QAAQ,OAAA,KAAY,MAAA,GAAY,EAAC,GAAI,EAAE,OAAA,EAAS,OAAA,CAAQ,OAAA,EAAQ;AAAA,IACpE,GAAI,QAAQ,MAAA,KAAW,KAAA,GAAQ,EAAE,MAAA,EAAQ,KAAA,KAAmB,EAAC;AAAA,IAC7D,GAAI,MAAA,KAAW,MAAA,GAAY,EAAC,GAAI,EAAE,MAAA;AAAO,GAC1C,CAAA;AACD,EAAA,IAAI;AACF,IAAA,MAAM,CAAC,KAAK,CAAA,GAAI,MAAM,qBAAA,CAAsB,OAAO,OAAA,EAAS;AAAA,MAC1D,GAAG,OAAA,CAAQ,KAAA;AAAA;AAAA;AAAA;AAAA,MAIX,GAAG,qBAAA,CAAsB,OAAA,CAAQ,gBAAgB;AAAA,KAClD,CAAA;AACD,IAAA,OAAO,KAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,iBAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EACzC;AACF","file":"pglite-store-impl-LDRH2DUH.js","sourcesContent":["/**\n * `createLocalPgliteStore`'s implementation body, loaded behind a dynamic\n * import from `./pglite-store.ts` so a missing `drizzle-orm` peer surfaces as\n * a typed refusal rather than a bare module-resolution stack (design §4.4b).\n *\n * This module owns every value import that reaches `drizzle-orm` for this\n * entrypoint. `pglite-store.ts` must hold no static reference to this module\n * — only the `import(\"./pglite-store-impl\")` expression inside its factory —\n * so the dynamic import survives into its own chunk in both the ESM and CJS\n * shipped artifacts (I12).\n */\nimport { type GraphDef } from \"../../core/define-graph\";\nimport { type SchemaManagerOptions } from \"../../schema/manager\";\nimport {\n createStoreWithSchema,\n type HistoryStore,\n type RecordedReadStore,\n type Store,\n} from \"../../store/store\";\nimport { createPostgresTables } from \"../drizzle/schema/postgres\";\nimport { closeAfterFailure } from \"../types\";\nimport { createLocalPgliteBackend } from \"./pglite\";\n// Type-only import: the option types are defined in `pglite-store.ts`, which\n// is this module's ONLY caller. A static value import in the other direction\n// would give `collectModuleEdges` a real edge from the store module to this\n// one, turning I12's `load` verdict dirty; a type-only import is erased at\n// runtime (no `verbatimModuleSyntax` in `tsconfig.base.json`), so this\n// back-edge never becomes a value cycle — the same precedent documented at\n// `src/errors/index.ts:26-29`.\nimport type { LocalPgliteStoreOptions } from \"./pglite-store\";\n\n/**\n * Drops a smuggled `schema` from the nested schema-management options: the\n * effective `SqlSchema` has exactly one source (`store.schema`), which also\n * drives physical table provisioning in this constructor.\n */\nfunction withoutSchemaOverride(\n schemaManagement: Omit<SchemaManagerOptions, \"schema\"> | undefined,\n): Omit<SchemaManagerOptions, \"schema\"> {\n if (schemaManagement === undefined) return {};\n const { schema: smuggled, ...rest } =\n schemaManagement as SchemaManagerOptions;\n void smuggled;\n return rest;\n}\n\n/** {@link createLocalPgliteStore}'s implementation body, verbatim from before the split. */\nexport async function createLocalPgliteStoreImpl<G extends GraphDef>(\n graph: G,\n options: LocalPgliteStoreOptions,\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>> {\n const tables =\n options.store?.schema === undefined ?\n undefined\n : createPostgresTables(options.store.schema.tables);\n const { backend } = await createLocalPgliteBackend({\n ...(options.dataDir === undefined ? {} : { dataDir: options.dataDir }),\n ...(options.vector === false ? { vector: false as const } : {}),\n ...(tables === undefined ? {} : { tables }),\n });\n try {\n const [store] = await createStoreWithSchema(graph, backend, {\n ...options.store,\n // The type already excludes `schema` here; the runtime strip guards\n // untyped callers, so the provisioned schema (or the default tables)\n // can never diverge from the one the Store reads.\n ...withoutSchemaOverride(options.schemaManagement),\n });\n return store;\n } catch (error) {\n return closeAfterFailure(backend, error);\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
2
- import { I as IndexDeclaration } from './types-CWg4dTjj.js';
2
+ import { I as IndexDeclaration } from './types-6yf0Vv-_.js';
3
3
 
4
4
  /**
5
5
  * Table name configuration.
@@ -1,5 +1,5 @@
1
1
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
2
- import { I as IndexDeclaration } from './types-CWg4dTjj.cjs';
2
+ import { I as IndexDeclaration } from './types-6yf0Vv-_.cjs';
3
3
 
4
4
  /**
5
5
  * Table name configuration.
@@ -1,13 +1,13 @@
1
- import { dk as GraphDef, dl as QueryAst } from '../types-CWg4dTjj.cjs';
2
- export { y as ContributionDiagnostic, z as ContributionDiagnosticState, N as ContributionRepairEntry, O as ContributionRepairResult } from '../types-CWg4dTjj.cjs';
3
- import { a as Store } from '../store-DR9J7JVB.cjs';
4
- import { P as ProfilerOptions, a as ProfileReport } from '../types-BE921wRl.cjs';
5
- export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-BE921wRl.cjs';
1
+ import { d as GraphDef, Q as QueryAst } from '../types-6yf0Vv-_.cjs';
2
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../types-6yf0Vv-_.cjs';
3
+ import { a as Store } from '../store-CuFX7fCx.cjs';
4
+ import { P as ProfilerOptions, a as ProfileReport } from '../types-DzJ4dlzk.cjs';
5
+ export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-DzJ4dlzk.cjs';
6
6
  import 'zod';
7
- import '../temporal-B4Ky4wzh.cjs';
8
- import '../searchable-C8-RrL3l.cjs';
9
- import '../manager-D348fa6W.cjs';
10
- import '../materialize-indexes-CrSiW_lT.cjs';
7
+ import '../temporal-CpyEiRY8.cjs';
8
+ import '../searchable-ClgET_i7.cjs';
9
+ import '../manager-D_t7oK69.cjs';
10
+ import '../resolve-WEW8gWws.cjs';
11
11
 
12
12
  /**
13
13
  * A Store with profiling capabilities.