@nicia-ai/typegraph 0.42.1 → 0.44.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 (289) hide show
  1. package/dist/backend/drizzle/indexes.cjs +9 -9
  2. package/dist/backend/drizzle/indexes.d.cts +1 -1
  3. package/dist/backend/drizzle/indexes.d.ts +1 -1
  4. package/dist/backend/drizzle/indexes.js +5 -5
  5. package/dist/backend/index.cjs +50 -50
  6. package/dist/backend/index.d.cts +3 -3
  7. package/dist/backend/index.d.ts +3 -3
  8. package/dist/backend/index.js +11 -11
  9. package/dist/backend/postgres/index.cjs +26 -26
  10. package/dist/backend/postgres/index.d.cts +6 -5
  11. package/dist/backend/postgres/index.d.ts +6 -5
  12. package/dist/backend/postgres/index.js +13 -13
  13. package/dist/backend/postgres/pglite-store.cjs +33 -33
  14. package/dist/backend/postgres/pglite-store.cjs.map +1 -1
  15. package/dist/backend/postgres/pglite-store.d.cts +7 -7
  16. package/dist/backend/postgres/pglite-store.d.ts +7 -7
  17. package/dist/backend/postgres/pglite-store.js +29 -29
  18. package/dist/backend/postgres/pglite-store.js.map +1 -1
  19. package/dist/backend/postgres/pglite.cjs +15 -15
  20. package/dist/backend/postgres/pglite.d.cts +3 -2
  21. package/dist/backend/postgres/pglite.d.ts +3 -2
  22. package/dist/backend/postgres/pglite.js +14 -14
  23. package/dist/backend/sqlite/index.cjs +23 -23
  24. package/dist/backend/sqlite/index.d.cts +7 -6
  25. package/dist/backend/sqlite/index.d.ts +7 -6
  26. package/dist/backend/sqlite/index.js +11 -11
  27. package/dist/backend/sqlite/libsql.cjs +17 -17
  28. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  29. package/dist/backend/sqlite/libsql.d.cts +3 -2
  30. package/dist/backend/sqlite/libsql.d.ts +3 -2
  31. package/dist/backend/sqlite/libsql.js +13 -13
  32. package/dist/backend/sqlite/libsql.js.map +1 -1
  33. package/dist/backend/sqlite/local-store.cjs +34 -34
  34. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  35. package/dist/backend/sqlite/local-store.d.cts +8 -7
  36. package/dist/backend/sqlite/local-store.d.ts +8 -7
  37. package/dist/backend/sqlite/local-store.js +30 -30
  38. package/dist/backend/sqlite/local-store.js.map +1 -1
  39. package/dist/backend/sqlite/local.cjs +16 -16
  40. package/dist/backend/sqlite/local.d.cts +3 -2
  41. package/dist/backend/sqlite/local.d.ts +3 -2
  42. package/dist/backend/sqlite/local.js +14 -14
  43. package/dist/{chunk-3RPQDGUE.cjs → chunk-2BIG7U6E.cjs} +5 -5
  44. package/dist/{chunk-3RPQDGUE.cjs.map → chunk-2BIG7U6E.cjs.map} +1 -1
  45. package/dist/{chunk-2OOY4OYT.js → chunk-2L54C2C2.js} +4 -4
  46. package/dist/{chunk-2OOY4OYT.js.map → chunk-2L54C2C2.js.map} +1 -1
  47. package/dist/{chunk-V2GZBPY2.cjs → chunk-2VLBGQBY.cjs} +310 -61
  48. package/dist/chunk-2VLBGQBY.cjs.map +1 -0
  49. package/dist/{chunk-RXOAXO3R.js → chunk-2WDD2NO3.js} +3 -3
  50. package/dist/{chunk-RXOAXO3R.js.map → chunk-2WDD2NO3.js.map} +1 -1
  51. package/dist/{chunk-2HKIID5K.js → chunk-2Y4IFKW7.js} +5 -5
  52. package/dist/{chunk-2HKIID5K.js.map → chunk-2Y4IFKW7.js.map} +1 -1
  53. package/dist/{chunk-ECU53PMN.cjs → chunk-3PRKZW6D.cjs} +5 -5
  54. package/dist/chunk-3PRKZW6D.cjs.map +1 -0
  55. package/dist/{chunk-2G6ZEGYO.js → chunk-46GDII45.js} +4 -4
  56. package/dist/{chunk-2G6ZEGYO.js.map → chunk-46GDII45.js.map} +1 -1
  57. package/dist/{chunk-OYJSYDIH.js → chunk-4MB3AQAQ.js} +13 -3
  58. package/dist/chunk-4MB3AQAQ.js.map +1 -0
  59. package/dist/chunk-4SZ6XPTG.cjs +12 -0
  60. package/dist/{chunk-VGMNGWBR.cjs.map → chunk-4SZ6XPTG.cjs.map} +1 -1
  61. package/dist/{chunk-FY4VY5EV.cjs → chunk-5MUSU4ZP.cjs} +20 -20
  62. package/dist/chunk-5MUSU4ZP.cjs.map +1 -0
  63. package/dist/{chunk-ZIRC2U6G.js → chunk-63KCKSSH.js} +78 -16
  64. package/dist/chunk-63KCKSSH.js.map +1 -0
  65. package/dist/{chunk-7Y6BV3TK.cjs → chunk-66UVLHQA.cjs} +100 -100
  66. package/dist/{chunk-7Y6BV3TK.cjs.map → chunk-66UVLHQA.cjs.map} +1 -1
  67. package/dist/{chunk-M4GYQF2H.js → chunk-6DCB664D.js} +7 -4
  68. package/dist/chunk-6DCB664D.js.map +1 -0
  69. package/dist/{chunk-OMQ2NBOR.cjs → chunk-6JZUSDY2.cjs} +27 -27
  70. package/dist/{chunk-OMQ2NBOR.cjs.map → chunk-6JZUSDY2.cjs.map} +1 -1
  71. package/dist/{chunk-Z3WIL6S3.js → chunk-7G32LIQM.js} +5 -5
  72. package/dist/{chunk-Z3WIL6S3.js.map → chunk-7G32LIQM.js.map} +1 -1
  73. package/dist/{chunk-2SO5I5AI.cjs → chunk-7V2FGGI2.cjs} +250 -198
  74. package/dist/chunk-7V2FGGI2.cjs.map +1 -0
  75. package/dist/{chunk-I73ATSAH.cjs → chunk-A2I2XO52.cjs} +4 -4
  76. package/dist/{chunk-I73ATSAH.cjs.map → chunk-A2I2XO52.cjs.map} +1 -1
  77. package/dist/{chunk-O2GZM7UK.cjs → chunk-A4PBRX4C.cjs} +7 -7
  78. package/dist/{chunk-O2GZM7UK.cjs.map → chunk-A4PBRX4C.cjs.map} +1 -1
  79. package/dist/{chunk-5P6IPIT6.cjs → chunk-ALFUGRYB.cjs} +75 -65
  80. package/dist/chunk-ALFUGRYB.cjs.map +1 -0
  81. package/dist/{chunk-NXIZL7ZZ.js → chunk-ATLN63JA.js} +6 -6
  82. package/dist/chunk-ATLN63JA.js.map +1 -0
  83. package/dist/{chunk-CUPJL6TS.js → chunk-B75XRV3O.js} +3 -3
  84. package/dist/{chunk-CUPJL6TS.js.map → chunk-B75XRV3O.js.map} +1 -1
  85. package/dist/{chunk-DP7KC6CL.js → chunk-BCP7LLOY.js} +754 -476
  86. package/dist/chunk-BCP7LLOY.js.map +1 -0
  87. package/dist/{chunk-RAWG2FEU.js → chunk-BEFM74L2.js} +264 -18
  88. package/dist/chunk-BEFM74L2.js.map +1 -0
  89. package/dist/{chunk-LQLVJWUH.js → chunk-BNUFUFAU.js} +7 -7
  90. package/dist/chunk-BNUFUFAU.js.map +1 -0
  91. package/dist/{chunk-KTBTSHU6.cjs → chunk-C4F7VJ5D.cjs} +13 -3
  92. package/dist/chunk-C4F7VJ5D.cjs.map +1 -0
  93. package/dist/{chunk-CVK4T34X.cjs → chunk-CPEL3YIR.cjs} +22 -22
  94. package/dist/{chunk-CVK4T34X.cjs.map → chunk-CPEL3YIR.cjs.map} +1 -1
  95. package/dist/{chunk-O3USVVWS.js → chunk-DK2S42XB.js} +3 -3
  96. package/dist/{chunk-O3USVVWS.js.map → chunk-DK2S42XB.js.map} +1 -1
  97. package/dist/{chunk-DMZEVJGL.cjs → chunk-EE7N5XXQ.cjs} +13 -13
  98. package/dist/{chunk-DMZEVJGL.cjs.map → chunk-EE7N5XXQ.cjs.map} +1 -1
  99. package/dist/{chunk-ZGOUVMVS.js → chunk-EFELJVLA.js} +5 -5
  100. package/dist/{chunk-ZGOUVMVS.js.map → chunk-EFELJVLA.js.map} +1 -1
  101. package/dist/chunk-EPTSMFH7.cjs +12 -0
  102. package/dist/{chunk-U3YRCZ5L.cjs.map → chunk-EPTSMFH7.cjs.map} +1 -1
  103. package/dist/{chunk-FSCJOTHF.cjs → chunk-EQ7JKLZO.cjs} +10 -10
  104. package/dist/{chunk-FSCJOTHF.cjs.map → chunk-EQ7JKLZO.cjs.map} +1 -1
  105. package/dist/{chunk-5Q3P6OIC.cjs → chunk-FGO5JFVJ.cjs} +12 -12
  106. package/dist/chunk-FGO5JFVJ.cjs.map +1 -0
  107. package/dist/{chunk-VC26BUNP.js → chunk-FMGEZBAQ.js} +5 -5
  108. package/dist/{chunk-VC26BUNP.js.map → chunk-FMGEZBAQ.js.map} +1 -1
  109. package/dist/{chunk-UZLEQFTV.js → chunk-FMMIX6N4.js} +4 -4
  110. package/dist/chunk-FMMIX6N4.js.map +1 -0
  111. package/dist/{chunk-5C75HQYQ.js → chunk-FRHHDHKH.js} +5 -5
  112. package/dist/{chunk-5C75HQYQ.js.map → chunk-FRHHDHKH.js.map} +1 -1
  113. package/dist/{chunk-EVFL2ZY5.js → chunk-FSXTPBRN.js} +63 -12
  114. package/dist/chunk-FSXTPBRN.js.map +1 -0
  115. package/dist/{chunk-TRC646QQ.cjs → chunk-GFRGG2US.cjs} +7 -7
  116. package/dist/{chunk-TRC646QQ.cjs.map → chunk-GFRGG2US.cjs.map} +1 -1
  117. package/dist/{chunk-UJRWOV5B.js → chunk-GWEDD3DH.js} +5 -5
  118. package/dist/{chunk-UJRWOV5B.js.map → chunk-GWEDD3DH.js.map} +1 -1
  119. package/dist/{chunk-AQR6BHB3.cjs → chunk-HJH3RMXG.cjs} +10 -10
  120. package/dist/{chunk-AQR6BHB3.cjs.map → chunk-HJH3RMXG.cjs.map} +1 -1
  121. package/dist/{chunk-F7TDKSVB.cjs → chunk-HOHAJ2NR.cjs} +4 -4
  122. package/dist/{chunk-F7TDKSVB.cjs.map → chunk-HOHAJ2NR.cjs.map} +1 -1
  123. package/dist/{chunk-YPVQYM3L.js → chunk-HOIFFY4M.js} +100 -20
  124. package/dist/chunk-HOIFFY4M.js.map +1 -0
  125. package/dist/{chunk-LDCWO5B6.js → chunk-IIMQJYAM.js} +3 -3
  126. package/dist/{chunk-LDCWO5B6.js.map → chunk-IIMQJYAM.js.map} +1 -1
  127. package/dist/{chunk-OM6RIOA5.cjs → chunk-IIT5K7SK.cjs} +13 -13
  128. package/dist/{chunk-OM6RIOA5.cjs.map → chunk-IIT5K7SK.cjs.map} +1 -1
  129. package/dist/{chunk-EQOQOT55.js → chunk-IJTLXNGJ.js} +5 -5
  130. package/dist/{chunk-EQOQOT55.js.map → chunk-IJTLXNGJ.js.map} +1 -1
  131. package/dist/{chunk-4XRP2N6B.js → chunk-JRP3VGHS.js} +3 -3
  132. package/dist/{chunk-4XRP2N6B.js.map → chunk-JRP3VGHS.js.map} +1 -1
  133. package/dist/{chunk-42XYPKZU.js → chunk-K3BUWSFR.js} +41 -3
  134. package/dist/chunk-K3BUWSFR.js.map +1 -0
  135. package/dist/{chunk-GT7NEXSU.js → chunk-KCO5EFJU.js} +3 -3
  136. package/dist/{chunk-GT7NEXSU.js.map → chunk-KCO5EFJU.js.map} +1 -1
  137. package/dist/{chunk-ARN3ZODS.cjs → chunk-KKYELPZ2.cjs} +6 -6
  138. package/dist/{chunk-ARN3ZODS.cjs.map → chunk-KKYELPZ2.cjs.map} +1 -1
  139. package/dist/{chunk-33PAKPED.cjs → chunk-MCHP7RHZ.cjs} +41 -41
  140. package/dist/{chunk-33PAKPED.cjs.map → chunk-MCHP7RHZ.cjs.map} +1 -1
  141. package/dist/{chunk-CDYRPI5U.js → chunk-MIJKEVV7.js} +4 -4
  142. package/dist/{chunk-CDYRPI5U.js.map → chunk-MIJKEVV7.js.map} +1 -1
  143. package/dist/{chunk-K2HHCWZO.cjs → chunk-NCX65HBY.cjs} +137 -108
  144. package/dist/chunk-NCX65HBY.cjs.map +1 -0
  145. package/dist/{chunk-6TJ6PKPS.cjs → chunk-NN3QSOVS.cjs} +27 -27
  146. package/dist/{chunk-6TJ6PKPS.cjs.map → chunk-NN3QSOVS.cjs.map} +1 -1
  147. package/dist/{chunk-F2KVJ6FF.cjs → chunk-OSZPLZIV.cjs} +179 -117
  148. package/dist/chunk-OSZPLZIV.cjs.map +1 -0
  149. package/dist/{chunk-UTTW2Q3M.cjs → chunk-OVUUTCPJ.cjs} +171 -133
  150. package/dist/chunk-OVUUTCPJ.cjs.map +1 -0
  151. package/dist/{chunk-FMPZPOUD.js → chunk-PAW2XUZN.js} +3 -3
  152. package/dist/{chunk-FMPZPOUD.js.map → chunk-PAW2XUZN.js.map} +1 -1
  153. package/dist/{chunk-5ZPRE4CV.cjs → chunk-PDGEXGS6.cjs} +204 -124
  154. package/dist/chunk-PDGEXGS6.cjs.map +1 -0
  155. package/dist/{chunk-CVNGKTHO.js → chunk-PHXITZE4.js} +4 -4
  156. package/dist/{chunk-CVNGKTHO.js.map → chunk-PHXITZE4.js.map} +1 -1
  157. package/dist/{chunk-ZPCKPLMX.cjs → chunk-QB6VMOJ2.cjs} +8 -8
  158. package/dist/{chunk-ZPCKPLMX.cjs.map → chunk-QB6VMOJ2.cjs.map} +1 -1
  159. package/dist/{chunk-5AERZSHC.cjs → chunk-QGKILWGZ.cjs} +4 -4
  160. package/dist/{chunk-5AERZSHC.cjs.map → chunk-QGKILWGZ.cjs.map} +1 -1
  161. package/dist/{chunk-ZOHCFYXE.js → chunk-QT6V3YRH.js} +3 -3
  162. package/dist/{chunk-ZOHCFYXE.js.map → chunk-QT6V3YRH.js.map} +1 -1
  163. package/dist/{chunk-XDMPDUKL.cjs → chunk-QYWINYEA.cjs} +9 -9
  164. package/dist/{chunk-XDMPDUKL.cjs.map → chunk-QYWINYEA.cjs.map} +1 -1
  165. package/dist/{chunk-3V6D5DEC.js → chunk-S4KQ5LV4.js} +3 -3
  166. package/dist/{chunk-3V6D5DEC.js.map → chunk-S4KQ5LV4.js.map} +1 -1
  167. package/dist/{chunk-6NB73BXV.js → chunk-SBPC5IP3.js} +40 -12
  168. package/dist/chunk-SBPC5IP3.js.map +1 -0
  169. package/dist/{chunk-HHBKGPEI.js → chunk-SQRD2CYF.js} +264 -21
  170. package/dist/chunk-SQRD2CYF.js.map +1 -0
  171. package/dist/{chunk-O7XVCLXW.cjs → chunk-ST3LPB2V.cjs} +324 -77
  172. package/dist/chunk-ST3LPB2V.cjs.map +1 -0
  173. package/dist/{chunk-FFQGI67R.cjs → chunk-STQ3BSED.cjs} +44 -44
  174. package/dist/{chunk-FFQGI67R.cjs.map → chunk-STQ3BSED.cjs.map} +1 -1
  175. package/dist/{chunk-JOYPNY33.js → chunk-TCRIQMBU.js} +9 -9
  176. package/dist/{chunk-JOYPNY33.js.map → chunk-TCRIQMBU.js.map} +1 -1
  177. package/dist/{chunk-ZP2KPDNN.js → chunk-TFMVL4QH.js} +3 -3
  178. package/dist/{chunk-ZP2KPDNN.js.map → chunk-TFMVL4QH.js.map} +1 -1
  179. package/dist/{chunk-4WYFRACU.js → chunk-TVLKA4AY.js} +3 -3
  180. package/dist/{chunk-4WYFRACU.js.map → chunk-TVLKA4AY.js.map} +1 -1
  181. package/dist/{chunk-X2XOQZT3.cjs → chunk-U5W4LKZV.cjs} +13 -9
  182. package/dist/chunk-U5W4LKZV.cjs.map +1 -0
  183. package/dist/{chunk-WYQILW5V.js → chunk-VITTKBWF.js} +43 -33
  184. package/dist/chunk-VITTKBWF.js.map +1 -0
  185. package/dist/{chunk-AO2WPYFZ.cjs → chunk-WBUFJ7BS.cjs} +4 -4
  186. package/dist/{chunk-AO2WPYFZ.cjs.map → chunk-WBUFJ7BS.cjs.map} +1 -1
  187. package/dist/{chunk-CI5NPLXX.js → chunk-XMYJY7NI.js} +3 -3
  188. package/dist/{chunk-CI5NPLXX.js.map → chunk-XMYJY7NI.js.map} +1 -1
  189. package/dist/{chunk-277UZV7X.cjs → chunk-XR4YZFKW.cjs} +1803 -1525
  190. package/dist/chunk-XR4YZFKW.cjs.map +1 -0
  191. package/dist/{chunk-5GV4JQNA.cjs → chunk-YNULOIR5.cjs} +43 -43
  192. package/dist/{chunk-5GV4JQNA.cjs.map → chunk-YNULOIR5.cjs.map} +1 -1
  193. package/dist/{chunk-ZBV4LQD2.cjs → chunk-ZTAJL4DT.cjs} +4 -4
  194. package/dist/{chunk-ZBV4LQD2.cjs.map → chunk-ZTAJL4DT.cjs.map} +1 -1
  195. package/dist/core/index.cjs +28 -28
  196. package/dist/core/index.d.cts +5 -5
  197. package/dist/core/index.d.ts +5 -5
  198. package/dist/core/index.js +8 -8
  199. package/dist/{ddl-Bc4Dl8fu.d.ts → ddl-D5369kOY.d.ts} +3 -3
  200. package/dist/{ddl-3unqC-kg.d.cts → ddl-eWg7hx6R.d.cts} +3 -3
  201. package/dist/{define-graph-Byslw2OO.d.cts → define-graph-DVF-oN1i.d.cts} +1 -1
  202. package/dist/{define-graph-DBFnc7u_.d.ts → define-graph-SvYXOl78.d.ts} +1 -1
  203. package/dist/graph-extension/index.cjs +20 -20
  204. package/dist/graph-extension/index.d.cts +4 -4
  205. package/dist/graph-extension/index.d.ts +4 -4
  206. package/dist/graph-extension/index.js +5 -5
  207. package/dist/graph-merge/index.cjs +104 -104
  208. package/dist/graph-merge/index.d.cts +9 -8
  209. package/dist/graph-merge/index.d.ts +9 -8
  210. package/dist/graph-merge/index.js +24 -24
  211. package/dist/{index-DQzVJBHa.d.ts → index-By89Sezh.d.ts} +37 -7
  212. package/dist/{index-DHXw7QAl.d.cts → index-DcQ3Sxs-.d.cts} +37 -7
  213. package/dist/index.cjs +210 -202
  214. package/dist/index.d.cts +13 -13
  215. package/dist/index.d.ts +13 -13
  216. package/dist/index.js +34 -34
  217. package/dist/indexes/index.cjs +13 -13
  218. package/dist/indexes/index.d.cts +4 -4
  219. package/dist/indexes/index.d.ts +4 -4
  220. package/dist/indexes/index.js +6 -6
  221. package/dist/interchange/index.cjs +49 -41
  222. package/dist/interchange/index.cjs.map +1 -1
  223. package/dist/interchange/index.d.cts +11 -11
  224. package/dist/interchange/index.d.ts +11 -11
  225. package/dist/interchange/index.js +23 -15
  226. package/dist/interchange/index.js.map +1 -1
  227. package/dist/{manager-Dl0-er1G.d.ts → manager-B0KjKE93.d.ts} +44 -6
  228. package/dist/{manager-U9_zopqr.d.cts → manager-Cn0NFIhN.d.cts} +44 -6
  229. package/dist/{materialize-indexes-BM3u0aXE.d.ts → materialize-indexes-BD4V3svD.d.ts} +1 -1
  230. package/dist/{materialize-indexes-DzMCetZe.d.cts → materialize-indexes-DVRhd5h4.d.cts} +1 -1
  231. package/dist/{postgres-C5-WMKFA.d.ts → postgres-DaEWvN4x.d.cts} +1 -1
  232. package/dist/{postgres-DpJqtbSX.d.cts → postgres-u0a0HN2D.d.ts} +1 -1
  233. package/dist/profiler/index.d.cts +10 -9
  234. package/dist/profiler/index.d.ts +10 -9
  235. package/dist/provenance/index.cjs +38 -38
  236. package/dist/provenance/index.cjs.map +1 -1
  237. package/dist/provenance/index.d.cts +7 -7
  238. package/dist/provenance/index.d.ts +7 -7
  239. package/dist/provenance/index.js +8 -8
  240. package/dist/provenance/index.js.map +1 -1
  241. package/dist/schema/index.cjs +41 -41
  242. package/dist/schema/index.d.cts +7 -7
  243. package/dist/schema/index.d.ts +7 -7
  244. package/dist/schema/index.js +14 -14
  245. package/dist/{searchable-B4mUXZT6.d.cts → searchable-BT7j9_IK.d.cts} +2 -2
  246. package/dist/{searchable-C7jmPNLT.d.ts → searchable-CnYEancP.d.ts} +2 -2
  247. package/dist/{sqlite-Da7jiYu9.d.cts → sqlite-BrMoSsI7.d.cts} +1 -1
  248. package/dist/{sqlite-Ch5tSYQY.d.ts → sqlite-CHhZUyO5.d.ts} +1 -1
  249. package/dist/{store-view-CNcOG8bQ.d.cts → store-view-Bvdku0Ht.d.ts} +199 -35
  250. package/dist/{store-view-6C2vTWqf.d.ts → store-view-w-md0nQ4.d.cts} +199 -35
  251. package/dist/{temporal-BtrTYTiB.d.ts → temporal--x9T8K4S.d.ts} +1 -1
  252. package/dist/{temporal-CMpigMCW.d.cts → temporal-BCORwUau.d.cts} +1 -1
  253. package/dist/{types-G4sVM-76.d.cts → types-6-WJmSD4.d.cts} +1 -1
  254. package/dist/{types-D2rU5Taq.d.ts → types-COODtTJU.d.ts} +1 -1
  255. package/dist/{types-Dh-EgT-w.d.ts → types-Cjvkj0jA.d.cts} +351 -12
  256. package/dist/{types-Dh-EgT-w.d.cts → types-Cjvkj0jA.d.ts} +351 -12
  257. package/dist/{where-B8Y21kig.d.ts → where-5xVawAwL.d.ts} +1 -1
  258. package/dist/{where-DbZ9XDOI.d.cts → where-CUQmCR6d.d.cts} +1 -1
  259. package/package.json +1 -1
  260. package/dist/chunk-277UZV7X.cjs.map +0 -1
  261. package/dist/chunk-2SO5I5AI.cjs.map +0 -1
  262. package/dist/chunk-42XYPKZU.js.map +0 -1
  263. package/dist/chunk-5P6IPIT6.cjs.map +0 -1
  264. package/dist/chunk-5Q3P6OIC.cjs.map +0 -1
  265. package/dist/chunk-5ZPRE4CV.cjs.map +0 -1
  266. package/dist/chunk-6NB73BXV.js.map +0 -1
  267. package/dist/chunk-DP7KC6CL.js.map +0 -1
  268. package/dist/chunk-ECU53PMN.cjs.map +0 -1
  269. package/dist/chunk-EVFL2ZY5.js.map +0 -1
  270. package/dist/chunk-F2KVJ6FF.cjs.map +0 -1
  271. package/dist/chunk-FY4VY5EV.cjs.map +0 -1
  272. package/dist/chunk-HHBKGPEI.js.map +0 -1
  273. package/dist/chunk-K2HHCWZO.cjs.map +0 -1
  274. package/dist/chunk-KTBTSHU6.cjs.map +0 -1
  275. package/dist/chunk-LQLVJWUH.js.map +0 -1
  276. package/dist/chunk-M4GYQF2H.js.map +0 -1
  277. package/dist/chunk-NXIZL7ZZ.js.map +0 -1
  278. package/dist/chunk-O7XVCLXW.cjs.map +0 -1
  279. package/dist/chunk-OYJSYDIH.js.map +0 -1
  280. package/dist/chunk-RAWG2FEU.js.map +0 -1
  281. package/dist/chunk-U3YRCZ5L.cjs +0 -12
  282. package/dist/chunk-UTTW2Q3M.cjs.map +0 -1
  283. package/dist/chunk-UZLEQFTV.js.map +0 -1
  284. package/dist/chunk-V2GZBPY2.cjs.map +0 -1
  285. package/dist/chunk-VGMNGWBR.cjs +0 -12
  286. package/dist/chunk-WYQILW5V.js.map +0 -1
  287. package/dist/chunk-X2XOQZT3.cjs.map +0 -1
  288. package/dist/chunk-YPVQYM3L.js.map +0 -1
  289. package/dist/chunk-ZIRC2U6G.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/backend/sqlite/libsql.ts"],"names":["tables","drizzle","generateSqliteDDL","createSqliteBackend","libsqlVectorStrategy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuGA,eAAsB,mBAAA,CACpB,MAAA,EACA,OAAA,GAAgC,EAAC,EACH;AAC9B,EAAA,MAAMA,OAAAA,GAAS,QAAQ,MAAA,IAAUA,yBAAA;AACjC,EAAA,MAAM,EAAA,GAAKC,eAAQ,MAAM,CAAA;AAEzB,EAAA,MAAM,aAAA,GAAgBC,oCAAkBF,OAAM,CAAA;AAC9C,EAAA,MAAM,MAAA,CAAO,eAAA,CAAgB,aAAA,CAAc,IAAA,CAAK,KAAK,CAAC,CAAA;AAEtD,EAAA,MAAM,OAAA,GAAUG,sCAAoB,EAAA,EAAI;AAAA,IACtC,gBAAA,EAAkB;AAAA,MAChB,MAAA,EAAQ,KAAA;AAAA,MACR,eAAA,EAAiB,MAAA,CAAO,QAAA,KAAa,MAAA,GAAS,KAAA,GAAQ;AAAA,KACxD;AAAA,IACA,MAAA,EAAAH,OAAAA;AAAA;AAAA;AAAA,IAGA,MAAA,EAAQI;AAAA,GACT,CAAA;AAED,EAAA,OAAO,EAAE,SAAS,EAAA,EAAG;AACvB","file":"libsql.cjs","sourcesContent":["/**\n * libsql backend for TypeGraph.\n *\n * This module wraps `@libsql/client` with the correct execution profile\n * for use with TypeGraph. It is compatible with any `@libsql/client`\n * instance (local file, remote Turso, embedded replicas).\n *\n * @example In-memory database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n *\n * @example Remote Turso database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"libsql://my-db.turso.io\", authToken: \"...\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n */\nimport type { Client } from \"@libsql/client\";\nimport { drizzle, type LibSQLDatabase } from \"drizzle-orm/libsql\";\n\nimport { libsqlVectorStrategy } from \"../../query/dialect/vector/libsql-strategy\";\nimport { generateSqliteDDL } from \"../drizzle/ddl\";\nimport { type AnySqliteDatabase } from \"../drizzle/execution\";\nexport type { AnySqliteDatabase } from \"../drizzle/execution\";\nimport {\n createSqliteBackend,\n type SqliteTables,\n tables as defaultTables,\n} from \"../drizzle/sqlite\";\nimport type { AdapterBackend } from \"../types\";\n\n// ============================================================\n// Types\n// ============================================================\n\n/**\n * Options for creating a libsql backend.\n */\nexport type LibsqlBackendOptions = Readonly<{\n /**\n * Custom table definitions.\n * Defaults to standard TypeGraph table names.\n */\n tables?: SqliteTables;\n}>;\n\n/**\n * Result of creating a libsql backend.\n */\nexport type LibsqlBackendResult = Readonly<{\n /**\n * The GraphBackend instance for use with createStore.\n */\n backend: AdapterBackend<AnySqliteDatabase>;\n\n /**\n * The underlying Drizzle database instance.\n * Useful for direct SQL access or sharing the connection.\n */\n db: LibSQLDatabase;\n}>;\n\n// ============================================================\n// Factory Function\n// ============================================================\n\n/**\n * Creates a TypeGraph backend backed by `@libsql/client`.\n *\n * Handles DDL execution and configures the correct execution profile.\n * Local clients (`client.protocol === \"file\"`, covering `file:` paths and\n * `:memory:` databases) run transactions as raw BEGIN/COMMIT statements on\n * the client's single stable connection (`transactionMode: \"sql\"`):\n * `client.transaction()` permanently hands that connection to the\n * transaction and lazily opens a fresh one afterwards, which for an\n * in-memory database is a fresh, empty database. Remote clients (`http` /\n * `ws`) run each transaction on its own stream via Drizzle's\n * `db.transaction()` (`transactionMode: \"drizzle\"`). The caller retains\n * ownership of the client and is responsible for closing it.\n *\n * @param client - An `@libsql/client` Client instance\n * @param options - Configuration options\n * @returns Backend and Drizzle database instances\n *\n * @example\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * ```\n */\nexport async function createLibsqlBackend(\n client: Client,\n options: LibsqlBackendOptions = {},\n): Promise<LibsqlBackendResult> {\n const tables = options.tables ?? defaultTables;\n const db = drizzle(client);\n\n const ddlStatements = generateSqliteDDL(tables);\n await client.executeMultiple(ddlStatements.join(\";\\n\"));\n\n const backend = createSqliteBackend(db, {\n executionProfile: {\n isSync: false,\n transactionMode: client.protocol === \"file\" ? \"sql\" : \"drizzle\",\n },\n tables,\n // libSQL ships native vector search in core — no extension to load —\n // so the strategy is wired unconditionally.\n vector: libsqlVectorStrategy,\n });\n\n return { backend, db };\n}\n"]}
1
+ {"version":3,"sources":["../../../src/backend/sqlite/libsql.ts"],"names":["tables","drizzle","generateSqliteDDL","createSqliteBackend","libsqlVectorStrategy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4GA,eAAsB,mBAAA,CACpB,MAAA,EACA,OAAA,GAAgC,EAAC,EACH;AAC9B,EAAA,MAAMA,OAAAA,GAAS,QAAQ,MAAA,IAAUA,yBAAA;AACjC,EAAA,MAAM,EAAA,GAAKC,eAAQ,MAAM,CAAA;AAEzB,EAAA,MAAM,aAAA,GAAgBC,oCAAkBF,OAAM,CAAA;AAC9C,EAAA,MAAM,MAAA,CAAO,eAAA,CAAgB,aAAA,CAAc,IAAA,CAAK,KAAK,CAAC,CAAA;AAEtD,EAAA,MAAM,OAAA,GAAUG,sCAAoB,EAAA,EAAI;AAAA,IACtC,gBAAA,EAAkB;AAAA,MAChB,MAAA,EAAQ,KAAA;AAAA,MACR,eAAA,EAAiB,MAAA,CAAO,QAAA,KAAa,MAAA,GAAS,KAAA,GAAQ;AAAA,KACxD;AAAA,IACA,MAAA,EAAAH,OAAAA;AAAA;AAAA;AAAA,IAGA,MAAA,EAAQI;AAAA,GACT,CAAA;AAED,EAAA,OAAO,EAAE,SAAS,EAAA,EAAG;AACvB","file":"libsql.cjs","sourcesContent":["/**\n * libsql backend for TypeGraph.\n *\n * This module wraps `@libsql/client` with the correct execution profile\n * for use with TypeGraph. It is compatible with any `@libsql/client`\n * instance (local file, remote Turso, embedded replicas).\n *\n * @example In-memory database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n *\n * @example Remote Turso database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"libsql://my-db.turso.io\", authToken: \"...\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n */\nimport type { Client } from \"@libsql/client\";\nimport { drizzle, type LibSQLDatabase } from \"drizzle-orm/libsql\";\n\nimport { libsqlVectorStrategy } from \"../../query/dialect/vector/libsql-strategy\";\nimport { generateSqliteDDL } from \"../drizzle/ddl\";\nimport { type AnySqliteDatabase } from \"../drizzle/execution\";\nexport type { AnySqliteDatabase } from \"../drizzle/execution\";\nimport {\n createSqliteBackend,\n type SqliteTables,\n tables as defaultTables,\n} from \"../drizzle/sqlite\";\nimport type { AdapterBackend } from \"../types\";\n\nexport type {\n ContributionDiagnostic,\n ContributionDiagnosticState,\n} from \"../types\";\n\n// ============================================================\n// Types\n// ============================================================\n\n/**\n * Options for creating a libsql backend.\n */\nexport type LibsqlBackendOptions = Readonly<{\n /**\n * Custom table definitions.\n * Defaults to standard TypeGraph table names.\n */\n tables?: SqliteTables;\n}>;\n\n/**\n * Result of creating a libsql backend.\n */\nexport type LibsqlBackendResult = Readonly<{\n /**\n * The GraphBackend instance for use with createStore.\n */\n backend: AdapterBackend<AnySqliteDatabase>;\n\n /**\n * The underlying Drizzle database instance.\n * Useful for direct SQL access or sharing the connection.\n */\n db: LibSQLDatabase;\n}>;\n\n// ============================================================\n// Factory Function\n// ============================================================\n\n/**\n * Creates a TypeGraph backend backed by `@libsql/client`.\n *\n * Handles DDL execution and configures the correct execution profile.\n * Local clients (`client.protocol === \"file\"`, covering `file:` paths and\n * `:memory:` databases) run transactions as raw BEGIN/COMMIT statements on\n * the client's single stable connection (`transactionMode: \"sql\"`):\n * `client.transaction()` permanently hands that connection to the\n * transaction and lazily opens a fresh one afterwards, which for an\n * in-memory database is a fresh, empty database. Remote clients (`http` /\n * `ws`) run each transaction on its own stream via Drizzle's\n * `db.transaction()` (`transactionMode: \"drizzle\"`). The caller retains\n * ownership of the client and is responsible for closing it.\n *\n * @param client - An `@libsql/client` Client instance\n * @param options - Configuration options\n * @returns Backend and Drizzle database instances\n *\n * @example\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * ```\n */\nexport async function createLibsqlBackend(\n client: Client,\n options: LibsqlBackendOptions = {},\n): Promise<LibsqlBackendResult> {\n const tables = options.tables ?? defaultTables;\n const db = drizzle(client);\n\n const ddlStatements = generateSqliteDDL(tables);\n await client.executeMultiple(ddlStatements.join(\";\\n\"));\n\n const backend = createSqliteBackend(db, {\n executionProfile: {\n isSync: false,\n transactionMode: client.protocol === \"file\" ? \"sql\" : \"drizzle\",\n },\n tables,\n // libSQL ships native vector search in core — no extension to load —\n // so the strategy is wired unconditionally.\n vector: libsqlVectorStrategy,\n });\n\n return { backend, db };\n}\n"]}
@@ -1,8 +1,9 @@
1
1
  import { Client } from '@libsql/client';
2
2
  import { LibSQLDatabase } from 'drizzle-orm/libsql';
3
- import { A as AdapterBackend } from '../../types-Dh-EgT-w.cjs';
3
+ import { A as AdapterBackend } from '../../types-Cjvkj0jA.cjs';
4
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState } from '../../types-Cjvkj0jA.cjs';
4
5
  import { A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.cjs';
5
- import { S as SqliteTables } from '../../sqlite-Da7jiYu9.cjs';
6
+ import { S as SqliteTables } from '../../sqlite-BrMoSsI7.cjs';
6
7
  import 'zod';
7
8
  import 'drizzle-orm/sqlite-core';
8
9
 
@@ -1,8 +1,9 @@
1
1
  import { Client } from '@libsql/client';
2
2
  import { LibSQLDatabase } from 'drizzle-orm/libsql';
3
- import { A as AdapterBackend } from '../../types-Dh-EgT-w.js';
3
+ import { A as AdapterBackend } from '../../types-Cjvkj0jA.js';
4
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState } from '../../types-Cjvkj0jA.js';
4
5
  import { A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.js';
5
- import { S as SqliteTables } from '../../sqlite-Ch5tSYQY.js';
6
+ import { S as SqliteTables } from '../../sqlite-CHhZUyO5.js';
6
7
  import 'zod';
7
8
  import 'drizzle-orm/sqlite-core';
8
9
 
@@ -1,21 +1,21 @@
1
- import { createSqliteBackend } from '../../chunk-ZIRC2U6G.js';
2
- import '../../chunk-HHBKGPEI.js';
3
- import { libsqlVectorStrategy } from '../../chunk-5C75HQYQ.js';
4
- import '../../chunk-ZOHCFYXE.js';
5
- import '../../chunk-CVNGKTHO.js';
6
- import { tables2, generateSqliteDDL } from '../../chunk-Z3WIL6S3.js';
7
- import '../../chunk-UJRWOV5B.js';
1
+ import { createSqliteBackend } from '../../chunk-63KCKSSH.js';
2
+ import '../../chunk-SQRD2CYF.js';
3
+ import { libsqlVectorStrategy } from '../../chunk-FRHHDHKH.js';
4
+ import '../../chunk-QT6V3YRH.js';
5
+ import '../../chunk-PHXITZE4.js';
6
+ import { tables2, generateSqliteDDL } from '../../chunk-7G32LIQM.js';
7
+ import '../../chunk-GWEDD3DH.js';
8
8
  import '../../chunk-35S6P5ZU.js';
9
- import '../../chunk-UZLEQFTV.js';
9
+ import '../../chunk-FMMIX6N4.js';
10
10
  import '../../chunk-UR7W5YQK.js';
11
- import '../../chunk-CUPJL6TS.js';
12
- import '../../chunk-4XRP2N6B.js';
11
+ import '../../chunk-B75XRV3O.js';
12
+ import '../../chunk-JRP3VGHS.js';
13
13
  import '../../chunk-K34OPSJK.js';
14
14
  import '../../chunk-2EBMPJBO.js';
15
- import '../../chunk-42XYPKZU.js';
16
- import '../../chunk-M4GYQF2H.js';
15
+ import '../../chunk-K3BUWSFR.js';
16
+ import '../../chunk-6DCB664D.js';
17
17
  import '../../chunk-QMQLUA66.js';
18
- import '../../chunk-OYJSYDIH.js';
18
+ import '../../chunk-4MB3AQAQ.js';
19
19
  import '../../chunk-G6Q5UM7U.js';
20
20
  import { drizzle } from 'drizzle-orm/libsql';
21
21
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/backend/sqlite/libsql.ts"],"names":["tables"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuGA,eAAsB,mBAAA,CACpB,MAAA,EACA,OAAA,GAAgC,EAAC,EACH;AAC9B,EAAA,MAAMA,SAAAA,GAAS,QAAQ,MAAA,IAAUA,OAAA;AACjC,EAAA,MAAM,EAAA,GAAK,QAAQ,MAAM,CAAA;AAEzB,EAAA,MAAM,aAAA,GAAgB,kBAAkBA,SAAM,CAAA;AAC9C,EAAA,MAAM,MAAA,CAAO,eAAA,CAAgB,aAAA,CAAc,IAAA,CAAK,KAAK,CAAC,CAAA;AAEtD,EAAA,MAAM,OAAA,GAAU,oBAAoB,EAAA,EAAI;AAAA,IACtC,gBAAA,EAAkB;AAAA,MAChB,MAAA,EAAQ,KAAA;AAAA,MACR,eAAA,EAAiB,MAAA,CAAO,QAAA,KAAa,MAAA,GAAS,KAAA,GAAQ;AAAA,KACxD;AAAA,IACA,MAAA,EAAAA,SAAAA;AAAA;AAAA;AAAA,IAGA,MAAA,EAAQ;AAAA,GACT,CAAA;AAED,EAAA,OAAO,EAAE,SAAS,EAAA,EAAG;AACvB","file":"libsql.js","sourcesContent":["/**\n * libsql backend for TypeGraph.\n *\n * This module wraps `@libsql/client` with the correct execution profile\n * for use with TypeGraph. It is compatible with any `@libsql/client`\n * instance (local file, remote Turso, embedded replicas).\n *\n * @example In-memory database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n *\n * @example Remote Turso database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"libsql://my-db.turso.io\", authToken: \"...\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n */\nimport type { Client } from \"@libsql/client\";\nimport { drizzle, type LibSQLDatabase } from \"drizzle-orm/libsql\";\n\nimport { libsqlVectorStrategy } from \"../../query/dialect/vector/libsql-strategy\";\nimport { generateSqliteDDL } from \"../drizzle/ddl\";\nimport { type AnySqliteDatabase } from \"../drizzle/execution\";\nexport type { AnySqliteDatabase } from \"../drizzle/execution\";\nimport {\n createSqliteBackend,\n type SqliteTables,\n tables as defaultTables,\n} from \"../drizzle/sqlite\";\nimport type { AdapterBackend } from \"../types\";\n\n// ============================================================\n// Types\n// ============================================================\n\n/**\n * Options for creating a libsql backend.\n */\nexport type LibsqlBackendOptions = Readonly<{\n /**\n * Custom table definitions.\n * Defaults to standard TypeGraph table names.\n */\n tables?: SqliteTables;\n}>;\n\n/**\n * Result of creating a libsql backend.\n */\nexport type LibsqlBackendResult = Readonly<{\n /**\n * The GraphBackend instance for use with createStore.\n */\n backend: AdapterBackend<AnySqliteDatabase>;\n\n /**\n * The underlying Drizzle database instance.\n * Useful for direct SQL access or sharing the connection.\n */\n db: LibSQLDatabase;\n}>;\n\n// ============================================================\n// Factory Function\n// ============================================================\n\n/**\n * Creates a TypeGraph backend backed by `@libsql/client`.\n *\n * Handles DDL execution and configures the correct execution profile.\n * Local clients (`client.protocol === \"file\"`, covering `file:` paths and\n * `:memory:` databases) run transactions as raw BEGIN/COMMIT statements on\n * the client's single stable connection (`transactionMode: \"sql\"`):\n * `client.transaction()` permanently hands that connection to the\n * transaction and lazily opens a fresh one afterwards, which for an\n * in-memory database is a fresh, empty database. Remote clients (`http` /\n * `ws`) run each transaction on its own stream via Drizzle's\n * `db.transaction()` (`transactionMode: \"drizzle\"`). The caller retains\n * ownership of the client and is responsible for closing it.\n *\n * @param client - An `@libsql/client` Client instance\n * @param options - Configuration options\n * @returns Backend and Drizzle database instances\n *\n * @example\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * ```\n */\nexport async function createLibsqlBackend(\n client: Client,\n options: LibsqlBackendOptions = {},\n): Promise<LibsqlBackendResult> {\n const tables = options.tables ?? defaultTables;\n const db = drizzle(client);\n\n const ddlStatements = generateSqliteDDL(tables);\n await client.executeMultiple(ddlStatements.join(\";\\n\"));\n\n const backend = createSqliteBackend(db, {\n executionProfile: {\n isSync: false,\n transactionMode: client.protocol === \"file\" ? \"sql\" : \"drizzle\",\n },\n tables,\n // libSQL ships native vector search in core — no extension to load —\n // so the strategy is wired unconditionally.\n vector: libsqlVectorStrategy,\n });\n\n return { backend, db };\n}\n"]}
1
+ {"version":3,"sources":["../../../src/backend/sqlite/libsql.ts"],"names":["tables"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4GA,eAAsB,mBAAA,CACpB,MAAA,EACA,OAAA,GAAgC,EAAC,EACH;AAC9B,EAAA,MAAMA,SAAAA,GAAS,QAAQ,MAAA,IAAUA,OAAA;AACjC,EAAA,MAAM,EAAA,GAAK,QAAQ,MAAM,CAAA;AAEzB,EAAA,MAAM,aAAA,GAAgB,kBAAkBA,SAAM,CAAA;AAC9C,EAAA,MAAM,MAAA,CAAO,eAAA,CAAgB,aAAA,CAAc,IAAA,CAAK,KAAK,CAAC,CAAA;AAEtD,EAAA,MAAM,OAAA,GAAU,oBAAoB,EAAA,EAAI;AAAA,IACtC,gBAAA,EAAkB;AAAA,MAChB,MAAA,EAAQ,KAAA;AAAA,MACR,eAAA,EAAiB,MAAA,CAAO,QAAA,KAAa,MAAA,GAAS,KAAA,GAAQ;AAAA,KACxD;AAAA,IACA,MAAA,EAAAA,SAAAA;AAAA;AAAA;AAAA,IAGA,MAAA,EAAQ;AAAA,GACT,CAAA;AAED,EAAA,OAAO,EAAE,SAAS,EAAA,EAAG;AACvB","file":"libsql.js","sourcesContent":["/**\n * libsql backend for TypeGraph.\n *\n * This module wraps `@libsql/client` with the correct execution profile\n * for use with TypeGraph. It is compatible with any `@libsql/client`\n * instance (local file, remote Turso, embedded replicas).\n *\n * @example In-memory database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n *\n * @example Remote Turso database\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"libsql://my-db.turso.io\", authToken: \"...\" });\n * const { backend } = await createLibsqlBackend(client);\n * const store = createStore(graph, backend);\n * ```\n */\nimport type { Client } from \"@libsql/client\";\nimport { drizzle, type LibSQLDatabase } from \"drizzle-orm/libsql\";\n\nimport { libsqlVectorStrategy } from \"../../query/dialect/vector/libsql-strategy\";\nimport { generateSqliteDDL } from \"../drizzle/ddl\";\nimport { type AnySqliteDatabase } from \"../drizzle/execution\";\nexport type { AnySqliteDatabase } from \"../drizzle/execution\";\nimport {\n createSqliteBackend,\n type SqliteTables,\n tables as defaultTables,\n} from \"../drizzle/sqlite\";\nimport type { AdapterBackend } from \"../types\";\n\nexport type {\n ContributionDiagnostic,\n ContributionDiagnosticState,\n} from \"../types\";\n\n// ============================================================\n// Types\n// ============================================================\n\n/**\n * Options for creating a libsql backend.\n */\nexport type LibsqlBackendOptions = Readonly<{\n /**\n * Custom table definitions.\n * Defaults to standard TypeGraph table names.\n */\n tables?: SqliteTables;\n}>;\n\n/**\n * Result of creating a libsql backend.\n */\nexport type LibsqlBackendResult = Readonly<{\n /**\n * The GraphBackend instance for use with createStore.\n */\n backend: AdapterBackend<AnySqliteDatabase>;\n\n /**\n * The underlying Drizzle database instance.\n * Useful for direct SQL access or sharing the connection.\n */\n db: LibSQLDatabase;\n}>;\n\n// ============================================================\n// Factory Function\n// ============================================================\n\n/**\n * Creates a TypeGraph backend backed by `@libsql/client`.\n *\n * Handles DDL execution and configures the correct execution profile.\n * Local clients (`client.protocol === \"file\"`, covering `file:` paths and\n * `:memory:` databases) run transactions as raw BEGIN/COMMIT statements on\n * the client's single stable connection (`transactionMode: \"sql\"`):\n * `client.transaction()` permanently hands that connection to the\n * transaction and lazily opens a fresh one afterwards, which for an\n * in-memory database is a fresh, empty database. Remote clients (`http` /\n * `ws`) run each transaction on its own stream via Drizzle's\n * `db.transaction()` (`transactionMode: \"drizzle\"`). The caller retains\n * ownership of the client and is responsible for closing it.\n *\n * @param client - An `@libsql/client` Client instance\n * @param options - Configuration options\n * @returns Backend and Drizzle database instances\n *\n * @example\n * ```typescript\n * import { createClient } from \"@libsql/client\";\n * import { createLibsqlBackend } from \"@nicia-ai/typegraph/adapters/drizzle/sqlite/libsql\";\n *\n * const client = createClient({ url: \"file::memory:\" });\n * const { backend } = await createLibsqlBackend(client);\n * ```\n */\nexport async function createLibsqlBackend(\n client: Client,\n options: LibsqlBackendOptions = {},\n): Promise<LibsqlBackendResult> {\n const tables = options.tables ?? defaultTables;\n const db = drizzle(client);\n\n const ddlStatements = generateSqliteDDL(tables);\n await client.executeMultiple(ddlStatements.join(\";\\n\"));\n\n const backend = createSqliteBackend(db, {\n executionProfile: {\n isSync: false,\n transactionMode: client.protocol === \"file\" ? \"sql\" : \"drizzle\",\n },\n tables,\n // libSQL ships native vector search in core — no extension to load —\n // so the strategy is wired unconditionally.\n vector: libsqlVectorStrategy,\n });\n\n return { backend, db };\n}\n"]}
@@ -1,70 +1,70 @@
1
1
  'use strict';
2
2
 
3
- var chunkFY4VY5EV_cjs = require('../../chunk-FY4VY5EV.cjs');
4
- require('../../chunk-F2KVJ6FF.cjs');
5
- require('../../chunk-O7XVCLXW.cjs');
6
- var chunk277UZV7X_cjs = require('../../chunk-277UZV7X.cjs');
7
- require('../../chunk-FFQGI67R.cjs');
8
- require('../../chunk-VGMNGWBR.cjs');
9
- require('../../chunk-AQR6BHB3.cjs');
10
- var chunkOMQ2NBOR_cjs = require('../../chunk-OMQ2NBOR.cjs');
11
- require('../../chunk-6TJ6PKPS.cjs');
12
- require('../../chunk-K2HHCWZO.cjs');
13
- require('../../chunk-2SO5I5AI.cjs');
3
+ var chunk5MUSU4ZP_cjs = require('../../chunk-5MUSU4ZP.cjs');
4
+ require('../../chunk-OSZPLZIV.cjs');
5
+ require('../../chunk-ST3LPB2V.cjs');
6
+ var chunkXR4YZFKW_cjs = require('../../chunk-XR4YZFKW.cjs');
7
+ require('../../chunk-STQ3BSED.cjs');
8
+ require('../../chunk-4SZ6XPTG.cjs');
9
+ require('../../chunk-HJH3RMXG.cjs');
10
+ var chunk6JZUSDY2_cjs = require('../../chunk-6JZUSDY2.cjs');
11
+ require('../../chunk-NN3QSOVS.cjs');
12
+ require('../../chunk-NCX65HBY.cjs');
13
+ require('../../chunk-7V2FGGI2.cjs');
14
14
  require('../../chunk-ZDH3DX3C.cjs');
15
- require('../../chunk-CVK4T34X.cjs');
16
- var chunkECU53PMN_cjs = require('../../chunk-ECU53PMN.cjs');
17
- require('../../chunk-FSCJOTHF.cjs');
18
- require('../../chunk-V2GZBPY2.cjs');
15
+ require('../../chunk-CPEL3YIR.cjs');
16
+ var chunk3PRKZW6D_cjs = require('../../chunk-3PRKZW6D.cjs');
17
+ require('../../chunk-EQ7JKLZO.cjs');
18
+ require('../../chunk-2VLBGQBY.cjs');
19
19
  require('../../chunk-TRF4EBJT.cjs');
20
- require('../../chunk-DMZEVJGL.cjs');
21
- require('../../chunk-ARN3ZODS.cjs');
20
+ require('../../chunk-EE7N5XXQ.cjs');
21
+ require('../../chunk-KKYELPZ2.cjs');
22
22
  require('../../chunk-ACSVZPK7.cjs');
23
- require('../../chunk-AO2WPYFZ.cjs');
24
- require('../../chunk-ZPCKPLMX.cjs');
25
- require('../../chunk-ZBV4LQD2.cjs');
26
- require('../../chunk-OM6RIOA5.cjs');
27
- require('../../chunk-TRC646QQ.cjs');
28
- require('../../chunk-I73ATSAH.cjs');
23
+ require('../../chunk-WBUFJ7BS.cjs');
24
+ require('../../chunk-QB6VMOJ2.cjs');
25
+ require('../../chunk-ZTAJL4DT.cjs');
26
+ require('../../chunk-IIT5K7SK.cjs');
27
+ require('../../chunk-GFRGG2US.cjs');
28
+ require('../../chunk-A2I2XO52.cjs');
29
29
  require('../../chunk-ZY4GXIVN.cjs');
30
30
  require('../../chunk-NAUA4PW5.cjs');
31
- require('../../chunk-UTTW2Q3M.cjs');
32
- require('../../chunk-X2XOQZT3.cjs');
31
+ require('../../chunk-OVUUTCPJ.cjs');
32
+ require('../../chunk-U5W4LKZV.cjs');
33
33
  require('../../chunk-FJMPR3OH.cjs');
34
34
  require('../../chunk-SJDMVITW.cjs');
35
35
  require('../../chunk-764JHTLT.cjs');
36
36
  require('../../chunk-HAHNRASW.cjs');
37
- require('../../chunk-XDMPDUKL.cjs');
37
+ require('../../chunk-QYWINYEA.cjs');
38
38
  require('../../chunk-SVJ5GEXW.cjs');
39
- require('../../chunk-F7TDKSVB.cjs');
39
+ require('../../chunk-HOHAJ2NR.cjs');
40
40
  require('../../chunk-DI74SMXS.cjs');
41
- require('../../chunk-O2GZM7UK.cjs');
42
- require('../../chunk-KTBTSHU6.cjs');
41
+ require('../../chunk-A4PBRX4C.cjs');
42
+ require('../../chunk-C4F7VJ5D.cjs');
43
43
  require('../../chunk-TDXIBCGY.cjs');
44
44
 
45
45
  // src/backend/sqlite/local-store.ts
46
46
  async function createLocalSqliteStore(graph, options = {}) {
47
- const tables = options.store?.schema === void 0 ? void 0 : chunkOMQ2NBOR_cjs.createSqliteTables(options.store.schema.tables);
48
- const { backend } = chunkFY4VY5EV_cjs.createLocalSqliteBackend({
47
+ const tables = options.store?.schema === void 0 ? void 0 : chunk6JZUSDY2_cjs.createSqliteTables(options.store.schema.tables);
48
+ const { backend } = chunk5MUSU4ZP_cjs.createLocalSqliteBackend({
49
49
  ...options.path === void 0 ? {} : { path: options.path },
50
50
  ...options.pragmas === void 0 ? {} : { pragmas: options.pragmas },
51
51
  ...options.capabilities === void 0 ? {} : { capabilities: options.capabilities },
52
52
  ...tables === void 0 ? {} : { tables }
53
53
  });
54
54
  try {
55
- const [store] = await chunk277UZV7X_cjs.createStoreWithSchema(graph, backend, {
55
+ const [store] = await chunkXR4YZFKW_cjs.createStoreWithSchema(graph, backend, {
56
56
  ...options.store,
57
57
  ...options.schemaManagement
58
58
  });
59
59
  return store;
60
60
  } catch (error) {
61
- return chunkECU53PMN_cjs.closeAfterFailure(backend, error);
61
+ return chunk3PRKZW6D_cjs.closeAfterFailure(backend, error);
62
62
  }
63
63
  }
64
64
 
65
65
  Object.defineProperty(exports, "DEFAULT_LOCAL_SQLITE_PRAGMAS", {
66
66
  enumerable: true,
67
- get: function () { return chunkFY4VY5EV_cjs.DEFAULT_LOCAL_SQLITE_PRAGMAS; }
67
+ get: function () { return chunk5MUSU4ZP_cjs.DEFAULT_LOCAL_SQLITE_PRAGMAS; }
68
68
  });
69
69
  exports.createLocalSqliteStore = createLocalSqliteStore;
70
70
  //# sourceMappingURL=local-store.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/backend/sqlite/local-store.ts"],"names":["createSqliteTables","createLocalSqliteBackend","createStoreWithSchema","closeAfterFailure"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,eAAsB,sBAAA,CACpB,KAAA,EACA,OAAA,GAAmC,EAAC,EACwB;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,MACX,GAAG,OAAA,CAAQ;AAAA,KACZ,CAAA;AACD,IAAA,OAAO,KAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAOC,mCAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EACzC;AACF","file":"local-store.cjs","sourcesContent":["/**\n * Batteries-included local SQLite Store for strict TypeScript consumers.\n *\n * This entrypoint owns the connection and intentionally exposes the portable\n * TypeGraph Store surface rather than the adapter-native Drizzle handle.\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 {\n type HistoryStoreOptions,\n type LiveStoreOptions,\n type RecordedReadStoreOptions,\n type StoreOptions,\n type UnboundLiveStoreOptions,\n} from \"../../store/types\";\nimport { createSqliteTables } from \"../drizzle/schema/sqlite\";\nimport { type BackendCapabilities, closeAfterFailure } from \"../types\";\nimport { createLocalSqliteBackend } from \"./local\";\nimport { type LocalSqlitePragmaOptions } from \"./local-options\";\n\nexport {\n DEFAULT_LOCAL_SQLITE_PRAGMAS,\n type LocalSqliteJournalMode,\n type LocalSqlitePragmaOptions,\n type LocalSqliteSynchronousMode,\n} from \"./local-options\";\n\nexport type LocalSqliteStoreOptions<\n TStoreOptions extends StoreOptions = StoreOptions,\n> = Readonly<{\n /** SQLite file path. Defaults to an in-memory database. */\n path?: string;\n /** Connection pragmas applied when the owned database is opened. */\n pragmas?: LocalSqlitePragmaOptions | false;\n /** Optional backend capability overrides, primarily for controlled hosts. */\n capabilities?: Partial<BackendCapabilities>;\n /** Store behavior, including hooks, history, and custom table names. */\n store?: TStoreOptions;\n /** Schema initialization and migration policy. */\n schemaManagement?: SchemaManagerOptions;\n}>;\n\n/** Creates, provisions, and returns a full typed local SQLite Store. */\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options?: LocalSqliteStoreOptions<UnboundLiveStoreOptions>,\n): Promise<Store<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<HistoryStoreOptions> &\n Readonly<{ store: HistoryStoreOptions }>,\n): Promise<HistoryStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<RecordedReadStoreOptions> &\n Readonly<{ store: RecordedReadStoreOptions }>,\n): Promise<RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<LiveStoreOptions>,\n): Promise<Store<G> | RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions,\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>>;\nexport async function createLocalSqliteStore<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 ...options.schemaManagement,\n });\n return store;\n } catch (error) {\n return closeAfterFailure(backend, error);\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/backend/sqlite/local-store.ts"],"names":["createSqliteTables","createLocalSqliteBackend","createStoreWithSchema","closeAfterFailure"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,eAAsB,sBAAA,CACpB,KAAA,EACA,OAAA,GAAmC,EAAC,EACwB;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,MACX,GAAG,OAAA,CAAQ;AAAA,KACZ,CAAA;AACD,IAAA,OAAO,KAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAOC,mCAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EACzC;AACF","file":"local-store.cjs","sourcesContent":["/**\n * Batteries-included local SQLite Store for strict TypeScript consumers.\n *\n * This entrypoint owns the connection and intentionally exposes the portable\n * TypeGraph Store surface rather than the adapter-native Drizzle handle.\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 {\n type HistoryStoreOptions,\n type LiveStoreOptions,\n type RecordedReadStoreOptions,\n type StoreOptions,\n type UnboundLiveStoreOptions,\n} from \"../../store/types\";\nimport { createSqliteTables } from \"../drizzle/schema/sqlite\";\nimport { type BackendCapabilities, closeAfterFailure } from \"../types\";\nimport { createLocalSqliteBackend } from \"./local\";\nimport { type LocalSqlitePragmaOptions } from \"./local-options\";\n\nexport type {\n ContributionDiagnostic,\n ContributionDiagnosticState,\n} from \"../types\";\nexport {\n DEFAULT_LOCAL_SQLITE_PRAGMAS,\n type LocalSqliteJournalMode,\n type LocalSqlitePragmaOptions,\n type LocalSqliteSynchronousMode,\n} from \"./local-options\";\n\nexport type LocalSqliteStoreOptions<\n TStoreOptions extends StoreOptions = StoreOptions,\n> = Readonly<{\n /** SQLite file path. Defaults to an in-memory database. */\n path?: string;\n /** Connection pragmas applied when the owned database is opened. */\n pragmas?: LocalSqlitePragmaOptions | false;\n /** Optional backend capability overrides, primarily for controlled hosts. */\n capabilities?: Partial<BackendCapabilities>;\n /** Store behavior, including hooks, history, and custom table names. */\n store?: TStoreOptions;\n /** Schema initialization and migration policy. */\n schemaManagement?: SchemaManagerOptions;\n}>;\n\n/** Creates, provisions, and returns a full typed local SQLite Store. */\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options?: LocalSqliteStoreOptions<UnboundLiveStoreOptions>,\n): Promise<Store<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<HistoryStoreOptions> &\n Readonly<{ store: HistoryStoreOptions }>,\n): Promise<HistoryStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<RecordedReadStoreOptions> &\n Readonly<{ store: RecordedReadStoreOptions }>,\n): Promise<RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<LiveStoreOptions>,\n): Promise<Store<G> | RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions,\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>>;\nexport async function createLocalSqliteStore<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 ...options.schemaManagement,\n });\n return store;\n } catch (error) {\n return closeAfterFailure(backend, error);\n }\n}\n"]}
@@ -1,13 +1,14 @@
1
- import { G as GraphDef } from '../../define-graph-Byslw2OO.cjs';
2
- import { S as SchemaManagerOptions } from '../../manager-U9_zopqr.cjs';
3
- import { S as StoreOptions, U as UnboundLiveStoreOptions, a as Store, H as HistoryStoreOptions, b as HistoryStore, R as RecordedReadStoreOptions, c as RecordedReadStore, L as LiveStoreOptions } from '../../store-view-CNcOG8bQ.cjs';
4
- import { B as BackendCapabilities } from '../../types-Dh-EgT-w.cjs';
1
+ import { G as GraphDef } from '../../define-graph-DVF-oN1i.cjs';
2
+ import { S as SchemaManagerOptions } from '../../manager-Cn0NFIhN.cjs';
3
+ import { S as StoreOptions, U as UnboundLiveStoreOptions, a as Store, H as HistoryStoreOptions, b as HistoryStore, R as RecordedReadStoreOptions, c as RecordedReadStore, L as LiveStoreOptions } from '../../store-view-w-md0nQ4.cjs';
4
+ import { B as BackendCapabilities } from '../../types-Cjvkj0jA.cjs';
5
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState } from '../../types-Cjvkj0jA.cjs';
5
6
  import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.cjs';
6
7
  export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.cjs';
7
- import '../../materialize-indexes-DzMCetZe.cjs';
8
- import '../../temporal-CMpigMCW.cjs';
8
+ import '../../materialize-indexes-DVRhd5h4.cjs';
9
+ import '../../temporal-BCORwUau.cjs';
9
10
  import 'zod';
10
- import '../../searchable-B4mUXZT6.cjs';
11
+ import '../../searchable-BT7j9_IK.cjs';
11
12
 
12
13
  /**
13
14
  * Batteries-included local SQLite Store for strict TypeScript consumers.
@@ -1,13 +1,14 @@
1
- import { G as GraphDef } from '../../define-graph-DBFnc7u_.js';
2
- import { S as SchemaManagerOptions } from '../../manager-Dl0-er1G.js';
3
- import { S as StoreOptions, U as UnboundLiveStoreOptions, a as Store, H as HistoryStoreOptions, b as HistoryStore, R as RecordedReadStoreOptions, c as RecordedReadStore, L as LiveStoreOptions } from '../../store-view-6C2vTWqf.js';
4
- import { B as BackendCapabilities } from '../../types-Dh-EgT-w.js';
1
+ import { G as GraphDef } from '../../define-graph-SvYXOl78.js';
2
+ import { S as SchemaManagerOptions } from '../../manager-B0KjKE93.js';
3
+ import { S as StoreOptions, U as UnboundLiveStoreOptions, a as Store, H as HistoryStoreOptions, b as HistoryStore, R as RecordedReadStoreOptions, c as RecordedReadStore, L as LiveStoreOptions } from '../../store-view-Bvdku0Ht.js';
4
+ import { B as BackendCapabilities } from '../../types-Cjvkj0jA.js';
5
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState } from '../../types-Cjvkj0jA.js';
5
6
  import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.js';
6
7
  export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.js';
7
- import '../../materialize-indexes-BM3u0aXE.js';
8
- import '../../temporal-BtrTYTiB.js';
8
+ import '../../materialize-indexes-BD4V3svD.js';
9
+ import '../../temporal--x9T8K4S.js';
9
10
  import 'zod';
10
- import '../../searchable-C7jmPNLT.js';
11
+ import '../../searchable-CnYEancP.js';
11
12
 
12
13
  /**
13
14
  * Batteries-included local SQLite Store for strict TypeScript consumers.
@@ -1,44 +1,44 @@
1
- import { createLocalSqliteBackend } from '../../chunk-LQLVJWUH.js';
2
- export { DEFAULT_LOCAL_SQLITE_PRAGMAS } from '../../chunk-LQLVJWUH.js';
3
- import '../../chunk-ZIRC2U6G.js';
4
- import '../../chunk-HHBKGPEI.js';
5
- import { createStoreWithSchema } from '../../chunk-DP7KC6CL.js';
6
- import '../../chunk-VC26BUNP.js';
7
- import '../../chunk-ZOHCFYXE.js';
8
- import '../../chunk-CVNGKTHO.js';
9
- import { createSqliteTables } from '../../chunk-Z3WIL6S3.js';
10
- import '../../chunk-UJRWOV5B.js';
11
- import '../../chunk-6NB73BXV.js';
12
- import '../../chunk-EVFL2ZY5.js';
1
+ import { createLocalSqliteBackend } from '../../chunk-BNUFUFAU.js';
2
+ export { DEFAULT_LOCAL_SQLITE_PRAGMAS } from '../../chunk-BNUFUFAU.js';
3
+ import '../../chunk-63KCKSSH.js';
4
+ import '../../chunk-SQRD2CYF.js';
5
+ import { createStoreWithSchema } from '../../chunk-BCP7LLOY.js';
6
+ import '../../chunk-FMGEZBAQ.js';
7
+ import '../../chunk-QT6V3YRH.js';
8
+ import '../../chunk-PHXITZE4.js';
9
+ import { createSqliteTables } from '../../chunk-7G32LIQM.js';
10
+ import '../../chunk-GWEDD3DH.js';
11
+ import '../../chunk-SBPC5IP3.js';
12
+ import '../../chunk-FSXTPBRN.js';
13
13
  import '../../chunk-35S6P5ZU.js';
14
- import '../../chunk-CDYRPI5U.js';
15
- import { closeAfterFailure } from '../../chunk-UZLEQFTV.js';
16
- import '../../chunk-2OOY4OYT.js';
17
- import '../../chunk-RAWG2FEU.js';
14
+ import '../../chunk-MIJKEVV7.js';
15
+ import { closeAfterFailure } from '../../chunk-FMMIX6N4.js';
16
+ import '../../chunk-2L54C2C2.js';
17
+ import '../../chunk-BEFM74L2.js';
18
18
  import '../../chunk-DRACN6XG.js';
19
- import '../../chunk-2HKIID5K.js';
20
- import '../../chunk-O3USVVWS.js';
19
+ import '../../chunk-2Y4IFKW7.js';
20
+ import '../../chunk-DK2S42XB.js';
21
21
  import '../../chunk-UR7W5YQK.js';
22
- import '../../chunk-CUPJL6TS.js';
23
- import '../../chunk-3V6D5DEC.js';
24
- import '../../chunk-GT7NEXSU.js';
25
- import '../../chunk-2G6ZEGYO.js';
26
- import '../../chunk-4XRP2N6B.js';
27
- import '../../chunk-ZP2KPDNN.js';
22
+ import '../../chunk-B75XRV3O.js';
23
+ import '../../chunk-S4KQ5LV4.js';
24
+ import '../../chunk-KCO5EFJU.js';
25
+ import '../../chunk-46GDII45.js';
26
+ import '../../chunk-JRP3VGHS.js';
27
+ import '../../chunk-TFMVL4QH.js';
28
28
  import '../../chunk-K34OPSJK.js';
29
29
  import '../../chunk-2EBMPJBO.js';
30
- import '../../chunk-42XYPKZU.js';
31
- import '../../chunk-M4GYQF2H.js';
30
+ import '../../chunk-K3BUWSFR.js';
31
+ import '../../chunk-6DCB664D.js';
32
32
  import '../../chunk-D7PG5D5K.js';
33
33
  import '../../chunk-SNXVDZAJ.js';
34
34
  import '../../chunk-QMQLUA66.js';
35
35
  import '../../chunk-PC2UBAUB.js';
36
- import '../../chunk-EQOQOT55.js';
36
+ import '../../chunk-IJTLXNGJ.js';
37
37
  import '../../chunk-GYA4JRP5.js';
38
- import '../../chunk-RXOAXO3R.js';
38
+ import '../../chunk-2WDD2NO3.js';
39
39
  import '../../chunk-ITE4IXAK.js';
40
- import '../../chunk-4WYFRACU.js';
41
- import '../../chunk-OYJSYDIH.js';
40
+ import '../../chunk-TVLKA4AY.js';
41
+ import '../../chunk-4MB3AQAQ.js';
42
42
  import '../../chunk-G6Q5UM7U.js';
43
43
 
44
44
  // src/backend/sqlite/local-store.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/backend/sqlite/local-store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,eAAsB,sBAAA,CACpB,KAAA,EACA,OAAA,GAAmC,EAAC,EACwB;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,MACX,GAAG,OAAA,CAAQ;AAAA,KACZ,CAAA;AACD,IAAA,OAAO,KAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,iBAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EACzC;AACF","file":"local-store.js","sourcesContent":["/**\n * Batteries-included local SQLite Store for strict TypeScript consumers.\n *\n * This entrypoint owns the connection and intentionally exposes the portable\n * TypeGraph Store surface rather than the adapter-native Drizzle handle.\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 {\n type HistoryStoreOptions,\n type LiveStoreOptions,\n type RecordedReadStoreOptions,\n type StoreOptions,\n type UnboundLiveStoreOptions,\n} from \"../../store/types\";\nimport { createSqliteTables } from \"../drizzle/schema/sqlite\";\nimport { type BackendCapabilities, closeAfterFailure } from \"../types\";\nimport { createLocalSqliteBackend } from \"./local\";\nimport { type LocalSqlitePragmaOptions } from \"./local-options\";\n\nexport {\n DEFAULT_LOCAL_SQLITE_PRAGMAS,\n type LocalSqliteJournalMode,\n type LocalSqlitePragmaOptions,\n type LocalSqliteSynchronousMode,\n} from \"./local-options\";\n\nexport type LocalSqliteStoreOptions<\n TStoreOptions extends StoreOptions = StoreOptions,\n> = Readonly<{\n /** SQLite file path. Defaults to an in-memory database. */\n path?: string;\n /** Connection pragmas applied when the owned database is opened. */\n pragmas?: LocalSqlitePragmaOptions | false;\n /** Optional backend capability overrides, primarily for controlled hosts. */\n capabilities?: Partial<BackendCapabilities>;\n /** Store behavior, including hooks, history, and custom table names. */\n store?: TStoreOptions;\n /** Schema initialization and migration policy. */\n schemaManagement?: SchemaManagerOptions;\n}>;\n\n/** Creates, provisions, and returns a full typed local SQLite Store. */\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options?: LocalSqliteStoreOptions<UnboundLiveStoreOptions>,\n): Promise<Store<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<HistoryStoreOptions> &\n Readonly<{ store: HistoryStoreOptions }>,\n): Promise<HistoryStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<RecordedReadStoreOptions> &\n Readonly<{ store: RecordedReadStoreOptions }>,\n): Promise<RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<LiveStoreOptions>,\n): Promise<Store<G> | RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions,\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>>;\nexport async function createLocalSqliteStore<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 ...options.schemaManagement,\n });\n return store;\n } catch (error) {\n return closeAfterFailure(backend, error);\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/backend/sqlite/local-store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,eAAsB,sBAAA,CACpB,KAAA,EACA,OAAA,GAAmC,EAAC,EACwB;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,MACX,GAAG,OAAA,CAAQ;AAAA,KACZ,CAAA;AACD,IAAA,OAAO,KAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,iBAAA,CAAkB,SAAS,KAAK,CAAA;AAAA,EACzC;AACF","file":"local-store.js","sourcesContent":["/**\n * Batteries-included local SQLite Store for strict TypeScript consumers.\n *\n * This entrypoint owns the connection and intentionally exposes the portable\n * TypeGraph Store surface rather than the adapter-native Drizzle handle.\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 {\n type HistoryStoreOptions,\n type LiveStoreOptions,\n type RecordedReadStoreOptions,\n type StoreOptions,\n type UnboundLiveStoreOptions,\n} from \"../../store/types\";\nimport { createSqliteTables } from \"../drizzle/schema/sqlite\";\nimport { type BackendCapabilities, closeAfterFailure } from \"../types\";\nimport { createLocalSqliteBackend } from \"./local\";\nimport { type LocalSqlitePragmaOptions } from \"./local-options\";\n\nexport type {\n ContributionDiagnostic,\n ContributionDiagnosticState,\n} from \"../types\";\nexport {\n DEFAULT_LOCAL_SQLITE_PRAGMAS,\n type LocalSqliteJournalMode,\n type LocalSqlitePragmaOptions,\n type LocalSqliteSynchronousMode,\n} from \"./local-options\";\n\nexport type LocalSqliteStoreOptions<\n TStoreOptions extends StoreOptions = StoreOptions,\n> = Readonly<{\n /** SQLite file path. Defaults to an in-memory database. */\n path?: string;\n /** Connection pragmas applied when the owned database is opened. */\n pragmas?: LocalSqlitePragmaOptions | false;\n /** Optional backend capability overrides, primarily for controlled hosts. */\n capabilities?: Partial<BackendCapabilities>;\n /** Store behavior, including hooks, history, and custom table names. */\n store?: TStoreOptions;\n /** Schema initialization and migration policy. */\n schemaManagement?: SchemaManagerOptions;\n}>;\n\n/** Creates, provisions, and returns a full typed local SQLite Store. */\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options?: LocalSqliteStoreOptions<UnboundLiveStoreOptions>,\n): Promise<Store<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<HistoryStoreOptions> &\n Readonly<{ store: HistoryStoreOptions }>,\n): Promise<HistoryStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<RecordedReadStoreOptions> &\n Readonly<{ store: RecordedReadStoreOptions }>,\n): Promise<RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions<LiveStoreOptions>,\n): Promise<Store<G> | RecordedReadStore<G>>;\nexport function createLocalSqliteStore<G extends GraphDef>(\n graph: G,\n options: LocalSqliteStoreOptions,\n): Promise<Store<G> | HistoryStore<G> | RecordedReadStore<G>>;\nexport async function createLocalSqliteStore<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 ...options.schemaManagement,\n });\n return store;\n } catch (error) {\n return closeAfterFailure(backend, error);\n }\n}\n"]}
@@ -1,35 +1,35 @@
1
1
  'use strict';
2
2
 
3
- var chunkFY4VY5EV_cjs = require('../../chunk-FY4VY5EV.cjs');
4
- require('../../chunk-F2KVJ6FF.cjs');
5
- require('../../chunk-O7XVCLXW.cjs');
6
- require('../../chunk-FFQGI67R.cjs');
7
- require('../../chunk-VGMNGWBR.cjs');
8
- require('../../chunk-AQR6BHB3.cjs');
9
- require('../../chunk-OMQ2NBOR.cjs');
10
- require('../../chunk-6TJ6PKPS.cjs');
3
+ var chunk5MUSU4ZP_cjs = require('../../chunk-5MUSU4ZP.cjs');
4
+ require('../../chunk-OSZPLZIV.cjs');
5
+ require('../../chunk-ST3LPB2V.cjs');
6
+ require('../../chunk-STQ3BSED.cjs');
7
+ require('../../chunk-4SZ6XPTG.cjs');
8
+ require('../../chunk-HJH3RMXG.cjs');
9
+ require('../../chunk-6JZUSDY2.cjs');
10
+ require('../../chunk-NN3QSOVS.cjs');
11
11
  require('../../chunk-ZDH3DX3C.cjs');
12
- require('../../chunk-ECU53PMN.cjs');
12
+ require('../../chunk-3PRKZW6D.cjs');
13
13
  require('../../chunk-ACSVZPK7.cjs');
14
- require('../../chunk-AO2WPYFZ.cjs');
15
- require('../../chunk-TRC646QQ.cjs');
14
+ require('../../chunk-WBUFJ7BS.cjs');
15
+ require('../../chunk-GFRGG2US.cjs');
16
16
  require('../../chunk-ZY4GXIVN.cjs');
17
17
  require('../../chunk-NAUA4PW5.cjs');
18
- require('../../chunk-UTTW2Q3M.cjs');
19
- require('../../chunk-X2XOQZT3.cjs');
18
+ require('../../chunk-OVUUTCPJ.cjs');
19
+ require('../../chunk-U5W4LKZV.cjs');
20
20
  require('../../chunk-764JHTLT.cjs');
21
- require('../../chunk-KTBTSHU6.cjs');
21
+ require('../../chunk-C4F7VJ5D.cjs');
22
22
  require('../../chunk-TDXIBCGY.cjs');
23
23
 
24
24
 
25
25
 
26
26
  Object.defineProperty(exports, "DEFAULT_LOCAL_SQLITE_PRAGMAS", {
27
27
  enumerable: true,
28
- get: function () { return chunkFY4VY5EV_cjs.DEFAULT_LOCAL_SQLITE_PRAGMAS; }
28
+ get: function () { return chunk5MUSU4ZP_cjs.DEFAULT_LOCAL_SQLITE_PRAGMAS; }
29
29
  });
30
30
  Object.defineProperty(exports, "createLocalSqliteBackend", {
31
31
  enumerable: true,
32
- get: function () { return chunkFY4VY5EV_cjs.createLocalSqliteBackend; }
32
+ get: function () { return chunk5MUSU4ZP_cjs.createLocalSqliteBackend; }
33
33
  });
34
34
  //# sourceMappingURL=local.cjs.map
35
35
  //# sourceMappingURL=local.cjs.map
@@ -1,7 +1,8 @@
1
1
  import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
2
- import { B as BackendCapabilities, A as AdapterBackend } from '../../types-Dh-EgT-w.cjs';
2
+ import { B as BackendCapabilities, A as AdapterBackend } from '../../types-Cjvkj0jA.cjs';
3
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState } from '../../types-Cjvkj0jA.cjs';
3
4
  import { A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.cjs';
4
- import { S as SqliteTables } from '../../sqlite-Da7jiYu9.cjs';
5
+ import { S as SqliteTables } from '../../sqlite-BrMoSsI7.cjs';
5
6
  import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.cjs';
6
7
  export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.cjs';
7
8
  import 'zod';
@@ -1,7 +1,8 @@
1
1
  import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
2
- import { B as BackendCapabilities, A as AdapterBackend } from '../../types-Dh-EgT-w.js';
2
+ import { B as BackendCapabilities, A as AdapterBackend } from '../../types-Cjvkj0jA.js';
3
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState } from '../../types-Cjvkj0jA.js';
3
4
  import { A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.js';
4
- import { S as SqliteTables } from '../../sqlite-Ch5tSYQY.js';
5
+ import { S as SqliteTables } from '../../sqlite-CHhZUyO5.js';
5
6
  import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.js';
6
7
  export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.js';
7
8
  import 'zod';
@@ -1,22 +1,22 @@
1
- export { DEFAULT_LOCAL_SQLITE_PRAGMAS, createLocalSqliteBackend } from '../../chunk-LQLVJWUH.js';
2
- import '../../chunk-ZIRC2U6G.js';
3
- import '../../chunk-HHBKGPEI.js';
4
- import '../../chunk-VC26BUNP.js';
5
- import '../../chunk-ZOHCFYXE.js';
6
- import '../../chunk-CVNGKTHO.js';
7
- import '../../chunk-Z3WIL6S3.js';
8
- import '../../chunk-UJRWOV5B.js';
1
+ export { DEFAULT_LOCAL_SQLITE_PRAGMAS, createLocalSqliteBackend } from '../../chunk-BNUFUFAU.js';
2
+ import '../../chunk-63KCKSSH.js';
3
+ import '../../chunk-SQRD2CYF.js';
4
+ import '../../chunk-FMGEZBAQ.js';
5
+ import '../../chunk-QT6V3YRH.js';
6
+ import '../../chunk-PHXITZE4.js';
7
+ import '../../chunk-7G32LIQM.js';
8
+ import '../../chunk-GWEDD3DH.js';
9
9
  import '../../chunk-35S6P5ZU.js';
10
- import '../../chunk-UZLEQFTV.js';
10
+ import '../../chunk-FMMIX6N4.js';
11
11
  import '../../chunk-UR7W5YQK.js';
12
- import '../../chunk-CUPJL6TS.js';
13
- import '../../chunk-4XRP2N6B.js';
12
+ import '../../chunk-B75XRV3O.js';
13
+ import '../../chunk-JRP3VGHS.js';
14
14
  import '../../chunk-K34OPSJK.js';
15
15
  import '../../chunk-2EBMPJBO.js';
16
- import '../../chunk-42XYPKZU.js';
17
- import '../../chunk-M4GYQF2H.js';
16
+ import '../../chunk-K3BUWSFR.js';
17
+ import '../../chunk-6DCB664D.js';
18
18
  import '../../chunk-QMQLUA66.js';
19
- import '../../chunk-OYJSYDIH.js';
19
+ import '../../chunk-4MB3AQAQ.js';
20
20
  import '../../chunk-G6Q5UM7U.js';
21
21
  //# sourceMappingURL=local.js.map
22
22
  //# sourceMappingURL=local.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkV2GZBPY2_cjs = require('./chunk-V2GZBPY2.cjs');
3
+ var chunk2VLBGQBY_cjs = require('./chunk-2VLBGQBY.cjs');
4
4
 
5
5
  // src/schema/deserializer.ts
6
6
  function deserializeSchema(schema) {
@@ -40,7 +40,7 @@ function buildRegistryFromClosures(schema) {
40
40
  const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
41
41
  const nodeKinds = /* @__PURE__ */ new Map();
42
42
  const edgeKinds = /* @__PURE__ */ new Map();
43
- const registry = new chunkV2GZBPY2_cjs.KindRegistry(nodeKinds, edgeKinds, {
43
+ const registry = new chunk2VLBGQBY_cjs.KindRegistry(nodeKinds, edgeKinds, {
44
44
  subClassAncestors,
45
45
  subClassDescendants,
46
46
  broaderClosure,
@@ -54,7 +54,7 @@ function buildRegistryFromClosures(schema) {
54
54
  edgeImplicationsClosure,
55
55
  edgeImplyingClosure
56
56
  });
57
- chunkV2GZBPY2_cjs.validateImpliesEndpointCompatibility(
57
+ chunk2VLBGQBY_cjs.validateImpliesEndpointCompatibility(
58
58
  buildEdgeEndpointKinds(schema.edges),
59
59
  registry
60
60
  );
@@ -79,5 +79,5 @@ function simpleRecordToMap(record) {
79
79
  }
80
80
 
81
81
  exports.deserializeSchema = deserializeSchema;
82
- //# sourceMappingURL=chunk-3RPQDGUE.cjs.map
83
- //# sourceMappingURL=chunk-3RPQDGUE.cjs.map
82
+ //# sourceMappingURL=chunk-2BIG7U6E.cjs.map
83
+ //# sourceMappingURL=chunk-2BIG7U6E.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/schema/deserializer.ts"],"names":["KindRegistry","validateImpliesEndpointCompatibility"],"mappings":"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","file":"chunk-3RPQDGUE.cjs","sourcesContent":["/**\n * Schema deserializer for loading stored schemas.\n *\n * Reconstructs runtime objects from SerializedSchema.\n * Note: Zod schemas cannot be fully reconstructed from JSON Schema,\n * so this provides access to the serialized data for introspection.\n */\nimport { KindRegistry } from \"../registry/kind-registry\";\nimport {\n type EdgeEndpointKinds,\n validateImpliesEndpointCompatibility,\n} from \"../registry/validate-implies\";\nimport {\n type SerializedClosures,\n type SerializedEdgeDef,\n type SerializedMetaEdge,\n type SerializedNodeDef,\n type SerializedOntologyRelation,\n type SerializedSchema,\n} from \"./types\";\n\n// ============================================================\n// Deserialized Schema\n// ============================================================\n\n/**\n * A deserialized schema provides read-only access to schema metadata.\n *\n * Note: Unlike the original GraphDef, this does not include Zod schemas\n * since those cannot be reconstructed from JSON Schema. Use this for\n * introspection and metadata access only.\n */\nexport type DeserializedSchema = Readonly<{\n graphId: string;\n version: number;\n generatedAt: string;\n\n /** Get node definition by name */\n getNode: (name: string) => SerializedNodeDef | undefined;\n\n /** Get all node names */\n getNodeNames: () => readonly string[];\n\n /** Get edge definition by name */\n getEdge: (name: string) => SerializedEdgeDef | undefined;\n\n /** Get all edge names */\n getEdgeNames: () => readonly string[];\n\n /** Get meta-edge definition by name */\n getMetaEdge: (name: string) => SerializedMetaEdge | undefined;\n\n /** Get all meta-edge names */\n getMetaEdgeNames: () => readonly string[];\n\n /** Get all ontology relations */\n getRelations: () => readonly SerializedOntologyRelation[];\n\n /** Get precomputed closures */\n getClosures: () => SerializedClosures;\n\n /** Get graph defaults */\n getDefaults: () => SerializedSchema[\"defaults\"];\n\n /** Get the raw serialized schema */\n getRaw: () => SerializedSchema;\n\n /** Build a KindRegistry from the closures */\n buildRegistry: () => KindRegistry;\n}>;\n\n// ============================================================\n// Deserialization\n// ============================================================\n\n/**\n * Deserializes a SerializedSchema into a DeserializedSchema.\n *\n * @param schema - The serialized schema to deserialize\n * @returns A deserialized schema with accessor methods\n */\nexport function deserializeSchema(\n schema: SerializedSchema,\n): DeserializedSchema {\n const nodeNames = Object.keys(schema.nodes);\n const edgeNames = Object.keys(schema.edges);\n const metaEdgeNames = Object.keys(schema.ontology.metaEdges);\n\n return {\n graphId: schema.graphId,\n version: schema.version,\n generatedAt: schema.generatedAt,\n\n getNode: (name) => schema.nodes[name],\n getNodeNames: () => nodeNames,\n\n getEdge: (name) => schema.edges[name],\n getEdgeNames: () => edgeNames,\n\n getMetaEdge: (name) => schema.ontology.metaEdges[name],\n getMetaEdgeNames: () => metaEdgeNames,\n\n getRelations: () => schema.ontology.relations,\n getClosures: () => schema.ontology.closures,\n\n getDefaults: () => schema.defaults,\n getRaw: () => schema,\n\n buildRegistry: () => buildRegistryFromClosures(schema),\n };\n}\n\n// ============================================================\n// Registry Building\n// ============================================================\n\n/**\n * Builds a KindRegistry from serialized closures.\n *\n * This allows query execution without recomputing closures.\n */\nfunction buildRegistryFromClosures(schema: SerializedSchema): KindRegistry {\n const { closures } = schema.ontology;\n\n // Convert Record<string, string[]> back to Map<string, Set<string>>\n const subClassAncestors = recordToMap(closures.subClassAncestors);\n const subClassDescendants = recordToMap(closures.subClassDescendants);\n const broaderClosure = recordToMap(closures.broaderClosure);\n const narrowerClosure = recordToMap(closures.narrowerClosure);\n const equivalenceSets = recordToMap(closures.equivalenceSets);\n const partOfClosure = recordToMap(closures.partOfClosure);\n const hasPartClosure = recordToMap(closures.hasPartClosure);\n const iriToKind = simpleRecordToMap(closures.iriToKind);\n const disjointPairs = new Set(closures.disjointPairs);\n const edgeInverses = simpleRecordToMap(closures.edgeInverses);\n const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);\n const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);\n\n // Build empty node/edge kind maps (we don't have the actual Zod schemas)\n const nodeKinds = new Map();\n const edgeKinds = new Map();\n\n const registry = new KindRegistry(nodeKinds, edgeKinds, {\n subClassAncestors,\n subClassDescendants,\n broaderClosure,\n narrowerClosure,\n equivalenceSets,\n iriToKind,\n disjointPairs,\n partOfClosure,\n hasPartClosure,\n edgeInverses,\n edgeImplicationsClosure,\n edgeImplyingClosure,\n });\n\n validateImpliesEndpointCompatibility(\n buildEdgeEndpointKinds(schema.edges),\n registry,\n );\n\n return registry;\n}\n\n/**\n * Maps each edge kind's serialized definition to its domain/range kind\n * names, for `validateImpliesEndpointCompatibility`. A `Map` (rather than\n * the plain `schema.edges` object) so a lookup for an edge kind literally\n * named \"toString\" or another `Object.prototype` member can't resolve to\n * an inherited member instead of `undefined`.\n */\nfunction buildEdgeEndpointKinds(\n edges: Record<string, SerializedEdgeDef>,\n): ReadonlyMap<string, EdgeEndpointKinds> {\n const result = new Map<string, EdgeEndpointKinds>();\n for (const [kind, def] of Object.entries(edges)) {\n result.set(kind, { from: def.fromKinds, to: def.toKinds });\n }\n return result;\n}\n\n/**\n * Converts Record<string, string[]> to Map<string, Set<string>>.\n */\nfunction recordToMap(\n record: Record<string, readonly string[]>,\n): ReadonlyMap<string, ReadonlySet<string>> {\n const result = new Map<string, Set<string>>();\n for (const [key, values] of Object.entries(record)) {\n result.set(key, new Set(values));\n }\n return result;\n}\n\n/**\n * Converts Record<string, string> to Map<string, string>.\n */\nfunction simpleRecordToMap(\n record: Record<string, string>,\n): ReadonlyMap<string, string> {\n return new Map(Object.entries(record));\n}\n"]}
1
+ {"version":3,"sources":["../src/schema/deserializer.ts"],"names":["KindRegistry","validateImpliesEndpointCompatibility"],"mappings":"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","file":"chunk-2BIG7U6E.cjs","sourcesContent":["/**\n * Schema deserializer for loading stored schemas.\n *\n * Reconstructs runtime objects from SerializedSchema.\n * Note: Zod schemas cannot be fully reconstructed from JSON Schema,\n * so this provides access to the serialized data for introspection.\n */\nimport { KindRegistry } from \"../registry/kind-registry\";\nimport {\n type EdgeEndpointKinds,\n validateImpliesEndpointCompatibility,\n} from \"../registry/validate-implies\";\nimport {\n type SerializedClosures,\n type SerializedEdgeDef,\n type SerializedMetaEdge,\n type SerializedNodeDef,\n type SerializedOntologyRelation,\n type SerializedSchema,\n} from \"./types\";\n\n// ============================================================\n// Deserialized Schema\n// ============================================================\n\n/**\n * A deserialized schema provides read-only access to schema metadata.\n *\n * Note: Unlike the original GraphDef, this does not include Zod schemas\n * since those cannot be reconstructed from JSON Schema. Use this for\n * introspection and metadata access only.\n */\nexport type DeserializedSchema = Readonly<{\n graphId: string;\n version: number;\n generatedAt: string;\n\n /** Get node definition by name */\n getNode: (name: string) => SerializedNodeDef | undefined;\n\n /** Get all node names */\n getNodeNames: () => readonly string[];\n\n /** Get edge definition by name */\n getEdge: (name: string) => SerializedEdgeDef | undefined;\n\n /** Get all edge names */\n getEdgeNames: () => readonly string[];\n\n /** Get meta-edge definition by name */\n getMetaEdge: (name: string) => SerializedMetaEdge | undefined;\n\n /** Get all meta-edge names */\n getMetaEdgeNames: () => readonly string[];\n\n /** Get all ontology relations */\n getRelations: () => readonly SerializedOntologyRelation[];\n\n /** Get precomputed closures */\n getClosures: () => SerializedClosures;\n\n /** Get graph defaults */\n getDefaults: () => SerializedSchema[\"defaults\"];\n\n /** Get the raw serialized schema */\n getRaw: () => SerializedSchema;\n\n /** Build a KindRegistry from the closures */\n buildRegistry: () => KindRegistry;\n}>;\n\n// ============================================================\n// Deserialization\n// ============================================================\n\n/**\n * Deserializes a SerializedSchema into a DeserializedSchema.\n *\n * @param schema - The serialized schema to deserialize\n * @returns A deserialized schema with accessor methods\n */\nexport function deserializeSchema(\n schema: SerializedSchema,\n): DeserializedSchema {\n const nodeNames = Object.keys(schema.nodes);\n const edgeNames = Object.keys(schema.edges);\n const metaEdgeNames = Object.keys(schema.ontology.metaEdges);\n\n return {\n graphId: schema.graphId,\n version: schema.version,\n generatedAt: schema.generatedAt,\n\n getNode: (name) => schema.nodes[name],\n getNodeNames: () => nodeNames,\n\n getEdge: (name) => schema.edges[name],\n getEdgeNames: () => edgeNames,\n\n getMetaEdge: (name) => schema.ontology.metaEdges[name],\n getMetaEdgeNames: () => metaEdgeNames,\n\n getRelations: () => schema.ontology.relations,\n getClosures: () => schema.ontology.closures,\n\n getDefaults: () => schema.defaults,\n getRaw: () => schema,\n\n buildRegistry: () => buildRegistryFromClosures(schema),\n };\n}\n\n// ============================================================\n// Registry Building\n// ============================================================\n\n/**\n * Builds a KindRegistry from serialized closures.\n *\n * This allows query execution without recomputing closures.\n */\nfunction buildRegistryFromClosures(schema: SerializedSchema): KindRegistry {\n const { closures } = schema.ontology;\n\n // Convert Record<string, string[]> back to Map<string, Set<string>>\n const subClassAncestors = recordToMap(closures.subClassAncestors);\n const subClassDescendants = recordToMap(closures.subClassDescendants);\n const broaderClosure = recordToMap(closures.broaderClosure);\n const narrowerClosure = recordToMap(closures.narrowerClosure);\n const equivalenceSets = recordToMap(closures.equivalenceSets);\n const partOfClosure = recordToMap(closures.partOfClosure);\n const hasPartClosure = recordToMap(closures.hasPartClosure);\n const iriToKind = simpleRecordToMap(closures.iriToKind);\n const disjointPairs = new Set(closures.disjointPairs);\n const edgeInverses = simpleRecordToMap(closures.edgeInverses);\n const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);\n const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);\n\n // Build empty node/edge kind maps (we don't have the actual Zod schemas)\n const nodeKinds = new Map();\n const edgeKinds = new Map();\n\n const registry = new KindRegistry(nodeKinds, edgeKinds, {\n subClassAncestors,\n subClassDescendants,\n broaderClosure,\n narrowerClosure,\n equivalenceSets,\n iriToKind,\n disjointPairs,\n partOfClosure,\n hasPartClosure,\n edgeInverses,\n edgeImplicationsClosure,\n edgeImplyingClosure,\n });\n\n validateImpliesEndpointCompatibility(\n buildEdgeEndpointKinds(schema.edges),\n registry,\n );\n\n return registry;\n}\n\n/**\n * Maps each edge kind's serialized definition to its domain/range kind\n * names, for `validateImpliesEndpointCompatibility`. A `Map` (rather than\n * the plain `schema.edges` object) so a lookup for an edge kind literally\n * named \"toString\" or another `Object.prototype` member can't resolve to\n * an inherited member instead of `undefined`.\n */\nfunction buildEdgeEndpointKinds(\n edges: Record<string, SerializedEdgeDef>,\n): ReadonlyMap<string, EdgeEndpointKinds> {\n const result = new Map<string, EdgeEndpointKinds>();\n for (const [kind, def] of Object.entries(edges)) {\n result.set(kind, { from: def.fromKinds, to: def.toKinds });\n }\n return result;\n}\n\n/**\n * Converts Record<string, string[]> to Map<string, Set<string>>.\n */\nfunction recordToMap(\n record: Record<string, readonly string[]>,\n): ReadonlyMap<string, ReadonlySet<string>> {\n const result = new Map<string, Set<string>>();\n for (const [key, values] of Object.entries(record)) {\n result.set(key, new Set(values));\n }\n return result;\n}\n\n/**\n * Converts Record<string, string> to Map<string, string>.\n */\nfunction simpleRecordToMap(\n record: Record<string, string>,\n): ReadonlyMap<string, string> {\n return new Map(Object.entries(record));\n}\n"]}