@nicia-ai/typegraph 0.44.0 → 0.45.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 (265) hide show
  1. package/dist/backend/drizzle/indexes.cjs +7 -7
  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 +3 -3
  5. package/dist/backend/index.cjs +37 -37
  6. package/dist/backend/index.d.cts +3 -3
  7. package/dist/backend/index.d.ts +3 -3
  8. package/dist/backend/index.js +6 -6
  9. package/dist/backend/postgres/index.cjs +23 -23
  10. package/dist/backend/postgres/index.d.cts +6 -6
  11. package/dist/backend/postgres/index.d.ts +6 -6
  12. package/dist/backend/postgres/index.js +10 -10
  13. package/dist/backend/postgres/pglite-store.cjs +24 -25
  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 +20 -21
  18. package/dist/backend/postgres/pglite-store.js.map +1 -1
  19. package/dist/backend/postgres/pglite.cjs +12 -12
  20. package/dist/backend/postgres/pglite.d.cts +3 -3
  21. package/dist/backend/postgres/pglite.d.ts +3 -3
  22. package/dist/backend/postgres/pglite.js +11 -11
  23. package/dist/backend/sqlite/index.cjs +21 -21
  24. package/dist/backend/sqlite/index.d.cts +6 -6
  25. package/dist/backend/sqlite/index.d.ts +6 -6
  26. package/dist/backend/sqlite/index.js +9 -9
  27. package/dist/backend/sqlite/libsql.cjs +14 -14
  28. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  29. package/dist/backend/sqlite/libsql.d.cts +3 -3
  30. package/dist/backend/sqlite/libsql.d.ts +3 -3
  31. package/dist/backend/sqlite/libsql.js +10 -10
  32. package/dist/backend/sqlite/libsql.js.map +1 -1
  33. package/dist/backend/sqlite/local-store.cjs +25 -26
  34. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  35. package/dist/backend/sqlite/local-store.d.cts +8 -8
  36. package/dist/backend/sqlite/local-store.d.ts +8 -8
  37. package/dist/backend/sqlite/local-store.js +21 -22
  38. package/dist/backend/sqlite/local-store.js.map +1 -1
  39. package/dist/backend/sqlite/local.cjs +13 -13
  40. package/dist/backend/sqlite/local.d.cts +3 -3
  41. package/dist/backend/sqlite/local.d.ts +3 -3
  42. package/dist/backend/sqlite/local.js +11 -11
  43. package/dist/{chunk-TVLKA4AY.js → chunk-42PYUGLS.js} +57 -3
  44. package/dist/chunk-42PYUGLS.js.map +1 -0
  45. package/dist/{chunk-IJTLXNGJ.js → chunk-4GUBTVPV.js} +3 -4
  46. package/dist/chunk-4GUBTVPV.js.map +1 -0
  47. package/dist/{chunk-63KCKSSH.js → chunk-4GUTQPVO.js} +33 -9
  48. package/dist/chunk-4GUTQPVO.js.map +1 -0
  49. package/dist/{chunk-FGO5JFVJ.cjs → chunk-4MEWSUVM.cjs} +10 -10
  50. package/dist/chunk-4MEWSUVM.cjs.map +1 -0
  51. package/dist/{chunk-FMGEZBAQ.js → chunk-4QIKLIGG.js} +15 -3
  52. package/dist/chunk-4QIKLIGG.js.map +1 -0
  53. package/dist/{chunk-FMMIX6N4.js → chunk-55ITBQJI.js} +2 -2
  54. package/dist/chunk-55ITBQJI.js.map +1 -0
  55. package/dist/{chunk-TCRIQMBU.js → chunk-5EKPX6QU.js} +4 -4
  56. package/dist/{chunk-TCRIQMBU.js.map → chunk-5EKPX6QU.js.map} +1 -1
  57. package/dist/{chunk-GFRGG2US.cjs → chunk-5GAONX5G.cjs} +7 -7
  58. package/dist/{chunk-GFRGG2US.cjs.map → chunk-5GAONX5G.cjs.map} +1 -1
  59. package/dist/{chunk-ALFUGRYB.cjs → chunk-6RYPD3NJ.cjs} +29 -29
  60. package/dist/{chunk-ALFUGRYB.cjs.map → chunk-6RYPD3NJ.cjs.map} +1 -1
  61. package/dist/{chunk-QGKILWGZ.cjs → chunk-7PF2L3H6.cjs} +4 -4
  62. package/dist/{chunk-QGKILWGZ.cjs.map → chunk-7PF2L3H6.cjs.map} +1 -1
  63. package/dist/chunk-B3F2D3SP.cjs +12 -0
  64. package/dist/{chunk-EPTSMFH7.cjs.map → chunk-B3F2D3SP.cjs.map} +1 -1
  65. package/dist/{chunk-7G32LIQM.js → chunk-BGYJW37L.js} +5 -5
  66. package/dist/{chunk-7G32LIQM.js.map → chunk-BGYJW37L.js.map} +1 -1
  67. package/dist/{chunk-EE7N5XXQ.cjs → chunk-BNS75YNF.cjs} +9 -10
  68. package/dist/chunk-BNS75YNF.cjs.map +1 -0
  69. package/dist/{chunk-VITTKBWF.js → chunk-CBKG6HEP.js} +5 -5
  70. package/dist/{chunk-VITTKBWF.js.map → chunk-CBKG6HEP.js.map} +1 -1
  71. package/dist/{chunk-A4PBRX4C.cjs → chunk-D54WH24V.cjs} +57 -2
  72. package/dist/chunk-D54WH24V.cjs.map +1 -0
  73. package/dist/{chunk-MCHP7RHZ.cjs → chunk-D56XG4EI.cjs} +26 -14
  74. package/dist/chunk-D56XG4EI.cjs.map +1 -0
  75. package/dist/{chunk-SQRD2CYF.js → chunk-DXEEHSGN.js} +293 -45
  76. package/dist/chunk-DXEEHSGN.js.map +1 -0
  77. package/dist/{chunk-GWEDD3DH.js → chunk-EFEOOCJ3.js} +4 -4
  78. package/dist/{chunk-GWEDD3DH.js.map → chunk-EFEOOCJ3.js.map} +1 -1
  79. package/dist/{chunk-3PRKZW6D.cjs → chunk-EKFUG4G7.cjs} +2 -2
  80. package/dist/chunk-EKFUG4G7.cjs.map +1 -0
  81. package/dist/{chunk-HJH3RMXG.cjs → chunk-F4NHQHEZ.cjs} +4 -4
  82. package/dist/{chunk-HJH3RMXG.cjs.map → chunk-F4NHQHEZ.cjs.map} +1 -1
  83. package/dist/{chunk-46GDII45.js → chunk-FL5UQRES.js} +3 -3
  84. package/dist/{chunk-46GDII45.js.map → chunk-FL5UQRES.js.map} +1 -1
  85. package/dist/{chunk-TFMVL4QH.js → chunk-FLEQ2HBK.js} +3 -3
  86. package/dist/{chunk-TFMVL4QH.js.map → chunk-FLEQ2HBK.js.map} +1 -1
  87. package/dist/{chunk-BEFM74L2.js → chunk-FQ7ZPOTZ.js} +6 -6
  88. package/dist/{chunk-BEFM74L2.js.map → chunk-FQ7ZPOTZ.js.map} +1 -1
  89. package/dist/{chunk-ST3LPB2V.cjs → chunk-H7VE3FL4.cjs} +318 -70
  90. package/dist/chunk-H7VE3FL4.cjs.map +1 -0
  91. package/dist/{chunk-BCP7LLOY.js → chunk-ID4WXTKL.js} +367 -41
  92. package/dist/{chunk-BCP7LLOY.js.map → chunk-ID4WXTKL.js.map} +1 -1
  93. package/dist/{chunk-EFELJVLA.js → chunk-ISLPNELU.js} +15 -3
  94. package/dist/chunk-ISLPNELU.js.map +1 -0
  95. package/dist/{chunk-A2I2XO52.cjs → chunk-IX64T5OL.cjs} +4 -4
  96. package/dist/{chunk-A2I2XO52.cjs.map → chunk-IX64T5OL.cjs.map} +1 -1
  97. package/dist/{chunk-QYWINYEA.cjs → chunk-J2ICGNHO.cjs} +5 -6
  98. package/dist/chunk-J2ICGNHO.cjs.map +1 -0
  99. package/dist/{chunk-7V2FGGI2.cjs → chunk-J7LXTUTP.cjs} +54 -12
  100. package/dist/chunk-J7LXTUTP.cjs.map +1 -0
  101. package/dist/{chunk-WBUFJ7BS.cjs → chunk-JQXSZHF2.cjs} +12 -2
  102. package/dist/chunk-JQXSZHF2.cjs.map +1 -0
  103. package/dist/{chunk-OVUUTCPJ.cjs → chunk-JXUTCSXX.cjs} +28 -2
  104. package/dist/chunk-JXUTCSXX.cjs.map +1 -0
  105. package/dist/{chunk-66UVLHQA.cjs → chunk-KMXWZLQX.cjs} +14 -14
  106. package/dist/{chunk-66UVLHQA.cjs.map → chunk-KMXWZLQX.cjs.map} +1 -1
  107. package/dist/{chunk-STQ3BSED.cjs → chunk-NAAMUYMS.cjs} +23 -11
  108. package/dist/chunk-NAAMUYMS.cjs.map +1 -0
  109. package/dist/{chunk-NN3QSOVS.cjs → chunk-OOA273IJ.cjs} +14 -14
  110. package/dist/{chunk-NN3QSOVS.cjs.map → chunk-OOA273IJ.cjs.map} +1 -1
  111. package/dist/{chunk-OSZPLZIV.cjs → chunk-P7GTYOLB.cjs} +130 -106
  112. package/dist/chunk-P7GTYOLB.cjs.map +1 -0
  113. package/dist/{chunk-K3BUWSFR.js → chunk-PVUI6KGR.js} +28 -2
  114. package/dist/chunk-PVUI6KGR.js.map +1 -0
  115. package/dist/{chunk-SBPC5IP3.js → chunk-Q6EDCUXV.js} +242 -10
  116. package/dist/chunk-Q6EDCUXV.js.map +1 -0
  117. package/dist/{chunk-2BIG7U6E.cjs → chunk-QC4MCOFV.cjs} +5 -5
  118. package/dist/{chunk-2BIG7U6E.cjs.map → chunk-QC4MCOFV.cjs.map} +1 -1
  119. package/dist/{chunk-JRP3VGHS.js → chunk-QLUXRWKL.js} +3 -3
  120. package/dist/{chunk-JRP3VGHS.js.map → chunk-QLUXRWKL.js.map} +1 -1
  121. package/dist/{chunk-IIT5K7SK.cjs → chunk-QR24DJDF.cjs} +6 -6
  122. package/dist/{chunk-IIT5K7SK.cjs.map → chunk-QR24DJDF.cjs.map} +1 -1
  123. package/dist/{chunk-HOIFFY4M.js → chunk-QRNYDV5Z.js} +48 -21
  124. package/dist/chunk-QRNYDV5Z.js.map +1 -0
  125. package/dist/{chunk-FRHHDHKH.js → chunk-RFRM3Q5K.js} +15 -3
  126. package/dist/chunk-RFRM3Q5K.js.map +1 -0
  127. package/dist/{chunk-ATLN63JA.js → chunk-RUQS6M7G.js} +5 -5
  128. package/dist/chunk-RUQS6M7G.js.map +1 -0
  129. package/dist/{chunk-XMYJY7NI.js → chunk-S3ZRKJHY.js} +3 -3
  130. package/dist/{chunk-XMYJY7NI.js.map → chunk-S3ZRKJHY.js.map} +1 -1
  131. package/dist/{chunk-FSXTPBRN.js → chunk-TKORQCG4.js} +49 -7
  132. package/dist/chunk-TKORQCG4.js.map +1 -0
  133. package/dist/{chunk-2Y4IFKW7.js → chunk-TKP5T34P.js} +3 -4
  134. package/dist/chunk-TKP5T34P.js.map +1 -0
  135. package/dist/{chunk-NCX65HBY.cjs → chunk-UCQ3BFSY.cjs} +301 -68
  136. package/dist/chunk-UCQ3BFSY.cjs.map +1 -0
  137. package/dist/{chunk-B75XRV3O.js → chunk-V34A6R5V.js} +12 -3
  138. package/dist/chunk-V34A6R5V.js.map +1 -0
  139. package/dist/{chunk-BNUFUFAU.js → chunk-VTN3C3CH.js} +6 -6
  140. package/dist/chunk-VTN3C3CH.js.map +1 -0
  141. package/dist/{chunk-5MUSU4ZP.cjs → chunk-VVQM4CZD.cjs} +12 -12
  142. package/dist/chunk-VVQM4CZD.cjs.map +1 -0
  143. package/dist/{chunk-IIMQJYAM.js → chunk-WDAVPX46.js} +3 -3
  144. package/dist/{chunk-IIMQJYAM.js.map → chunk-WDAVPX46.js.map} +1 -1
  145. package/dist/{chunk-YNULOIR5.cjs → chunk-WDBXJOU5.cjs} +28 -16
  146. package/dist/chunk-WDBXJOU5.cjs.map +1 -0
  147. package/dist/{chunk-PAW2XUZN.js → chunk-WUFASQUO.js} +3 -3
  148. package/dist/{chunk-PAW2XUZN.js.map → chunk-WUFASQUO.js.map} +1 -1
  149. package/dist/{chunk-PDGEXGS6.cjs → chunk-YDWLUT5V.cjs} +136 -109
  150. package/dist/chunk-YDWLUT5V.cjs.map +1 -0
  151. package/dist/{chunk-PHXITZE4.js → chunk-YMTXMPV6.js} +3 -3
  152. package/dist/{chunk-PHXITZE4.js.map → chunk-YMTXMPV6.js.map} +1 -1
  153. package/dist/{chunk-XR4YZFKW.cjs → chunk-YOALGKRE.cjs} +690 -364
  154. package/dist/chunk-YOALGKRE.cjs.map +1 -0
  155. package/dist/{chunk-6JZUSDY2.cjs → chunk-Z3WO6MND.cjs} +27 -27
  156. package/dist/{chunk-6JZUSDY2.cjs.map → chunk-Z3WO6MND.cjs.map} +1 -1
  157. package/dist/{chunk-2VLBGQBY.cjs → chunk-ZI6VQSZA.cjs} +37 -37
  158. package/dist/{chunk-2VLBGQBY.cjs.map → chunk-ZI6VQSZA.cjs.map} +1 -1
  159. package/dist/core/index.cjs +10 -11
  160. package/dist/core/index.d.cts +5 -5
  161. package/dist/core/index.d.ts +5 -5
  162. package/dist/core/index.js +3 -4
  163. package/dist/{ddl-eWg7hx6R.d.cts → ddl-BG4J805L.d.cts} +3 -3
  164. package/dist/{ddl-D5369kOY.d.ts → ddl-CgiS9QLj.d.ts} +3 -3
  165. package/dist/{define-graph-SvYXOl78.d.ts → define-graph-BGrJahvp.d.ts} +1 -1
  166. package/dist/{define-graph-DVF-oN1i.d.cts → define-graph-alREY2wj.d.cts} +1 -1
  167. package/dist/graph-extension/index.cjs +18 -19
  168. package/dist/graph-extension/index.d.cts +4 -4
  169. package/dist/graph-extension/index.d.ts +4 -4
  170. package/dist/graph-extension/index.js +3 -4
  171. package/dist/graph-merge/index.cjs +89 -90
  172. package/dist/graph-merge/index.cjs.map +1 -1
  173. package/dist/graph-merge/index.d.cts +9 -9
  174. package/dist/graph-merge/index.d.ts +9 -9
  175. package/dist/graph-merge/index.js +16 -17
  176. package/dist/graph-merge/index.js.map +1 -1
  177. package/dist/{index-By89Sezh.d.ts → index-BBxZCUdu.d.ts} +2 -2
  178. package/dist/{index-DcQ3Sxs-.d.cts → index-C3y_98iN.d.cts} +2 -2
  179. package/dist/index.cjs +124 -125
  180. package/dist/index.cjs.map +1 -1
  181. package/dist/index.d.cts +13 -13
  182. package/dist/index.d.ts +13 -13
  183. package/dist/index.js +23 -24
  184. package/dist/index.js.map +1 -1
  185. package/dist/indexes/index.cjs +11 -11
  186. package/dist/indexes/index.d.cts +4 -4
  187. package/dist/indexes/index.d.ts +4 -4
  188. package/dist/indexes/index.js +4 -4
  189. package/dist/interchange/index.cjs +27 -26
  190. package/dist/interchange/index.cjs.map +1 -1
  191. package/dist/interchange/index.d.cts +7 -7
  192. package/dist/interchange/index.d.ts +7 -7
  193. package/dist/interchange/index.js +8 -7
  194. package/dist/interchange/index.js.map +1 -1
  195. package/dist/{manager-Cn0NFIhN.d.cts → manager-KS7CGQQT.d.cts} +3 -3
  196. package/dist/{manager-B0KjKE93.d.ts → manager-YoLEfcc1.d.ts} +3 -3
  197. package/dist/{materialize-indexes-BD4V3svD.d.ts → materialize-indexes-Bhhyb1B3.d.ts} +1 -1
  198. package/dist/{materialize-indexes-DVRhd5h4.d.cts → materialize-indexes-OHRWypW6.d.cts} +1 -1
  199. package/dist/{postgres-DaEWvN4x.d.cts → postgres-DpkW3R5Y.d.cts} +1 -1
  200. package/dist/{postgres-u0a0HN2D.d.ts → postgres-DwqyIniy.d.ts} +1 -1
  201. package/dist/profiler/index.d.cts +10 -10
  202. package/dist/profiler/index.d.ts +10 -10
  203. package/dist/provenance/index.cjs +15 -15
  204. package/dist/provenance/index.cjs.map +1 -1
  205. package/dist/provenance/index.d.cts +7 -7
  206. package/dist/provenance/index.d.ts +7 -7
  207. package/dist/provenance/index.js +3 -3
  208. package/dist/provenance/index.js.map +1 -1
  209. package/dist/schema/index.cjs +30 -31
  210. package/dist/schema/index.d.cts +7 -7
  211. package/dist/schema/index.d.ts +7 -7
  212. package/dist/schema/index.js +8 -9
  213. package/dist/{searchable-BT7j9_IK.d.cts → searchable-CIZL8Hyw.d.cts} +2 -2
  214. package/dist/{searchable-CnYEancP.d.ts → searchable-DLWEfC4a.d.ts} +2 -2
  215. package/dist/{sqlite-BrMoSsI7.d.cts → sqlite-DY0WODUK.d.cts} +1 -1
  216. package/dist/{sqlite-CHhZUyO5.d.ts → sqlite-L-VIRzqA.d.ts} +1 -1
  217. package/dist/{store-view-Bvdku0Ht.d.ts → store-view-66p92IPi.d.ts} +1887 -1811
  218. package/dist/{store-view-w-md0nQ4.d.cts → store-view-A85FFRnk.d.cts} +1887 -1811
  219. package/dist/{temporal-BCORwUau.d.cts → temporal-BNbjXqer.d.cts} +1 -1
  220. package/dist/{temporal--x9T8K4S.d.ts → temporal-Bob6Nfbp.d.ts} +1 -1
  221. package/dist/{types-Cjvkj0jA.d.ts → types-Ch9a0Dx6.d.cts} +141 -17
  222. package/dist/{types-Cjvkj0jA.d.cts → types-Ch9a0Dx6.d.ts} +141 -17
  223. package/dist/{types-COODtTJU.d.ts → types-ClCzT-dT.d.ts} +1 -1
  224. package/dist/{types-6-WJmSD4.d.cts → types-DeORZhxn.d.cts} +1 -1
  225. package/dist/{where-CUQmCR6d.d.cts → where-DPw52ksb.d.cts} +1 -1
  226. package/dist/{where-5xVawAwL.d.ts → where-kWUZPvEA.d.ts} +1 -1
  227. package/package.json +1 -1
  228. package/dist/chunk-2WDD2NO3.js +0 -59
  229. package/dist/chunk-2WDD2NO3.js.map +0 -1
  230. package/dist/chunk-2Y4IFKW7.js.map +0 -1
  231. package/dist/chunk-3PRKZW6D.cjs.map +0 -1
  232. package/dist/chunk-5MUSU4ZP.cjs.map +0 -1
  233. package/dist/chunk-63KCKSSH.js.map +0 -1
  234. package/dist/chunk-7V2FGGI2.cjs.map +0 -1
  235. package/dist/chunk-A4PBRX4C.cjs.map +0 -1
  236. package/dist/chunk-ATLN63JA.js.map +0 -1
  237. package/dist/chunk-B75XRV3O.js.map +0 -1
  238. package/dist/chunk-BNUFUFAU.js.map +0 -1
  239. package/dist/chunk-EE7N5XXQ.cjs.map +0 -1
  240. package/dist/chunk-EFELJVLA.js.map +0 -1
  241. package/dist/chunk-EPTSMFH7.cjs +0 -12
  242. package/dist/chunk-FGO5JFVJ.cjs.map +0 -1
  243. package/dist/chunk-FMGEZBAQ.js.map +0 -1
  244. package/dist/chunk-FMMIX6N4.js.map +0 -1
  245. package/dist/chunk-FRHHDHKH.js.map +0 -1
  246. package/dist/chunk-FSXTPBRN.js.map +0 -1
  247. package/dist/chunk-HOHAJ2NR.cjs +0 -61
  248. package/dist/chunk-HOHAJ2NR.cjs.map +0 -1
  249. package/dist/chunk-HOIFFY4M.js.map +0 -1
  250. package/dist/chunk-IJTLXNGJ.js.map +0 -1
  251. package/dist/chunk-K3BUWSFR.js.map +0 -1
  252. package/dist/chunk-MCHP7RHZ.cjs.map +0 -1
  253. package/dist/chunk-NCX65HBY.cjs.map +0 -1
  254. package/dist/chunk-OSZPLZIV.cjs.map +0 -1
  255. package/dist/chunk-OVUUTCPJ.cjs.map +0 -1
  256. package/dist/chunk-PDGEXGS6.cjs.map +0 -1
  257. package/dist/chunk-QYWINYEA.cjs.map +0 -1
  258. package/dist/chunk-SBPC5IP3.js.map +0 -1
  259. package/dist/chunk-SQRD2CYF.js.map +0 -1
  260. package/dist/chunk-ST3LPB2V.cjs.map +0 -1
  261. package/dist/chunk-STQ3BSED.cjs.map +0 -1
  262. package/dist/chunk-TVLKA4AY.js.map +0 -1
  263. package/dist/chunk-WBUFJ7BS.cjs.map +0 -1
  264. package/dist/chunk-XR4YZFKW.cjs.map +0 -1
  265. package/dist/chunk-YNULOIR5.cjs.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { Client } from '@libsql/client';
2
2
  import { LibSQLDatabase } from 'drizzle-orm/libsql';
3
- import { A as AdapterBackend } from '../../types-Cjvkj0jA.js';
4
- export { C as ContributionDiagnostic, a as ContributionDiagnosticState } from '../../types-Cjvkj0jA.js';
3
+ import { A as AdapterBackend } from '../../types-Ch9a0Dx6.js';
4
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../../types-Ch9a0Dx6.js';
5
5
  import { A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.js';
6
- import { S as SqliteTables } from '../../sqlite-CHhZUyO5.js';
6
+ import { S as SqliteTables } from '../../sqlite-L-VIRzqA.js';
7
7
  import 'zod';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
 
@@ -1,18 +1,18 @@
1
- import { createSqliteBackend } from '../../chunk-63KCKSSH.js';
2
- import '../../chunk-SQRD2CYF.js';
3
- import { libsqlVectorStrategy } from '../../chunk-FRHHDHKH.js';
1
+ import { createSqliteBackend } from '../../chunk-4GUTQPVO.js';
2
+ import '../../chunk-DXEEHSGN.js';
3
+ import { libsqlVectorStrategy } from '../../chunk-RFRM3Q5K.js';
4
4
  import '../../chunk-QT6V3YRH.js';
5
- import '../../chunk-PHXITZE4.js';
6
- import { tables2, generateSqliteDDL } from '../../chunk-7G32LIQM.js';
7
- import '../../chunk-GWEDD3DH.js';
5
+ import '../../chunk-YMTXMPV6.js';
6
+ import { tables2, generateSqliteDDL } from '../../chunk-BGYJW37L.js';
7
+ import '../../chunk-EFEOOCJ3.js';
8
8
  import '../../chunk-35S6P5ZU.js';
9
- import '../../chunk-FMMIX6N4.js';
9
+ import '../../chunk-55ITBQJI.js';
10
10
  import '../../chunk-UR7W5YQK.js';
11
- import '../../chunk-B75XRV3O.js';
12
- import '../../chunk-JRP3VGHS.js';
11
+ import '../../chunk-V34A6R5V.js';
12
+ import '../../chunk-QLUXRWKL.js';
13
13
  import '../../chunk-K34OPSJK.js';
14
14
  import '../../chunk-2EBMPJBO.js';
15
- import '../../chunk-K3BUWSFR.js';
15
+ import '../../chunk-PVUI6KGR.js';
16
16
  import '../../chunk-6DCB664D.js';
17
17
  import '../../chunk-QMQLUA66.js';
18
18
  import '../../chunk-4MB3AQAQ.js';
@@ -1 +1 @@
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
+ {"version":3,"sources":["../../../src/backend/sqlite/libsql.ts"],"names":["tables"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8GA,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 ContributionRepairEntry,\n ContributionRepairResult,\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,69 @@
1
1
  'use strict';
2
2
 
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');
3
+ var chunkVVQM4CZD_cjs = require('../../chunk-VVQM4CZD.cjs');
4
+ require('../../chunk-P7GTYOLB.cjs');
5
+ require('../../chunk-H7VE3FL4.cjs');
6
+ var chunkYOALGKRE_cjs = require('../../chunk-YOALGKRE.cjs');
7
+ require('../../chunk-NAAMUYMS.cjs');
8
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');
9
+ require('../../chunk-F4NHQHEZ.cjs');
10
+ var chunkZ3WO6MND_cjs = require('../../chunk-Z3WO6MND.cjs');
11
+ require('../../chunk-OOA273IJ.cjs');
12
+ require('../../chunk-UCQ3BFSY.cjs');
13
+ require('../../chunk-J7LXTUTP.cjs');
14
14
  require('../../chunk-ZDH3DX3C.cjs');
15
15
  require('../../chunk-CPEL3YIR.cjs');
16
- var chunk3PRKZW6D_cjs = require('../../chunk-3PRKZW6D.cjs');
16
+ var chunkEKFUG4G7_cjs = require('../../chunk-EKFUG4G7.cjs');
17
17
  require('../../chunk-EQ7JKLZO.cjs');
18
- require('../../chunk-2VLBGQBY.cjs');
18
+ require('../../chunk-ZI6VQSZA.cjs');
19
19
  require('../../chunk-TRF4EBJT.cjs');
20
- require('../../chunk-EE7N5XXQ.cjs');
20
+ require('../../chunk-BNS75YNF.cjs');
21
21
  require('../../chunk-KKYELPZ2.cjs');
22
22
  require('../../chunk-ACSVZPK7.cjs');
23
- require('../../chunk-WBUFJ7BS.cjs');
23
+ require('../../chunk-JQXSZHF2.cjs');
24
24
  require('../../chunk-QB6VMOJ2.cjs');
25
25
  require('../../chunk-ZTAJL4DT.cjs');
26
- require('../../chunk-IIT5K7SK.cjs');
27
- require('../../chunk-GFRGG2US.cjs');
28
- require('../../chunk-A2I2XO52.cjs');
26
+ require('../../chunk-QR24DJDF.cjs');
27
+ require('../../chunk-5GAONX5G.cjs');
28
+ require('../../chunk-IX64T5OL.cjs');
29
29
  require('../../chunk-ZY4GXIVN.cjs');
30
30
  require('../../chunk-NAUA4PW5.cjs');
31
- require('../../chunk-OVUUTCPJ.cjs');
31
+ require('../../chunk-JXUTCSXX.cjs');
32
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-QYWINYEA.cjs');
37
+ require('../../chunk-J2ICGNHO.cjs');
38
38
  require('../../chunk-SVJ5GEXW.cjs');
39
- require('../../chunk-HOHAJ2NR.cjs');
39
+ require('../../chunk-D54WH24V.cjs');
40
40
  require('../../chunk-DI74SMXS.cjs');
41
- require('../../chunk-A4PBRX4C.cjs');
42
41
  require('../../chunk-C4F7VJ5D.cjs');
43
42
  require('../../chunk-TDXIBCGY.cjs');
44
43
 
45
44
  // src/backend/sqlite/local-store.ts
46
45
  async function createLocalSqliteStore(graph, options = {}) {
47
- const tables = options.store?.schema === void 0 ? void 0 : chunk6JZUSDY2_cjs.createSqliteTables(options.store.schema.tables);
48
- const { backend } = chunk5MUSU4ZP_cjs.createLocalSqliteBackend({
46
+ const tables = options.store?.schema === void 0 ? void 0 : chunkZ3WO6MND_cjs.createSqliteTables(options.store.schema.tables);
47
+ const { backend } = chunkVVQM4CZD_cjs.createLocalSqliteBackend({
49
48
  ...options.path === void 0 ? {} : { path: options.path },
50
49
  ...options.pragmas === void 0 ? {} : { pragmas: options.pragmas },
51
50
  ...options.capabilities === void 0 ? {} : { capabilities: options.capabilities },
52
51
  ...tables === void 0 ? {} : { tables }
53
52
  });
54
53
  try {
55
- const [store] = await chunkXR4YZFKW_cjs.createStoreWithSchema(graph, backend, {
54
+ const [store] = await chunkYOALGKRE_cjs.createStoreWithSchema(graph, backend, {
56
55
  ...options.store,
57
56
  ...options.schemaManagement
58
57
  });
59
58
  return store;
60
59
  } catch (error) {
61
- return chunk3PRKZW6D_cjs.closeAfterFailure(backend, error);
60
+ return chunkEKFUG4G7_cjs.closeAfterFailure(backend, error);
62
61
  }
63
62
  }
64
63
 
65
64
  Object.defineProperty(exports, "DEFAULT_LOCAL_SQLITE_PRAGMAS", {
66
65
  enumerable: true,
67
- get: function () { return chunk5MUSU4ZP_cjs.DEFAULT_LOCAL_SQLITE_PRAGMAS; }
66
+ get: function () { return chunkVVQM4CZD_cjs.DEFAULT_LOCAL_SQLITE_PRAGMAS; }
68
67
  });
69
68
  exports.createLocalSqliteStore = createLocalSqliteStore;
70
69
  //# sourceMappingURL=local-store.cjs.map
@@ -1 +1 @@
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
+ {"version":3,"sources":["../../../src/backend/sqlite/local-store.ts"],"names":["createSqliteTables","createLocalSqliteBackend","createStoreWithSchema","closeAfterFailure"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,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 ContributionRepairEntry,\n ContributionRepairResult,\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,14 +1,14 @@
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';
1
+ import { G as GraphDef } from '../../define-graph-alREY2wj.cjs';
2
+ import { S as SchemaManagerOptions } from '../../manager-KS7CGQQT.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-A85FFRnk.cjs';
4
+ import { B as BackendCapabilities } from '../../types-Ch9a0Dx6.cjs';
5
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../../types-Ch9a0Dx6.cjs';
6
6
  import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.cjs';
7
7
  export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.cjs';
8
- import '../../materialize-indexes-DVRhd5h4.cjs';
9
- import '../../temporal-BCORwUau.cjs';
8
+ import '../../materialize-indexes-OHRWypW6.cjs';
9
+ import '../../temporal-BNbjXqer.cjs';
10
10
  import 'zod';
11
- import '../../searchable-BT7j9_IK.cjs';
11
+ import '../../searchable-CIZL8Hyw.cjs';
12
12
 
13
13
  /**
14
14
  * Batteries-included local SQLite Store for strict TypeScript consumers.
@@ -1,14 +1,14 @@
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';
1
+ import { G as GraphDef } from '../../define-graph-BGrJahvp.js';
2
+ import { S as SchemaManagerOptions } from '../../manager-YoLEfcc1.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-66p92IPi.js';
4
+ import { B as BackendCapabilities } from '../../types-Ch9a0Dx6.js';
5
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../../types-Ch9a0Dx6.js';
6
6
  import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.js';
7
7
  export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.js';
8
- import '../../materialize-indexes-BD4V3svD.js';
9
- import '../../temporal--x9T8K4S.js';
8
+ import '../../materialize-indexes-Bhhyb1B3.js';
9
+ import '../../temporal-Bob6Nfbp.js';
10
10
  import 'zod';
11
- import '../../searchable-CnYEancP.js';
11
+ import '../../searchable-DLWEfC4a.js';
12
12
 
13
13
  /**
14
14
  * Batteries-included local SQLite Store for strict TypeScript consumers.
@@ -1,43 +1,42 @@
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';
1
+ import { createLocalSqliteBackend } from '../../chunk-VTN3C3CH.js';
2
+ export { DEFAULT_LOCAL_SQLITE_PRAGMAS } from '../../chunk-VTN3C3CH.js';
3
+ import '../../chunk-4GUTQPVO.js';
4
+ import '../../chunk-DXEEHSGN.js';
5
+ import { createStoreWithSchema } from '../../chunk-ID4WXTKL.js';
6
+ import '../../chunk-4QIKLIGG.js';
7
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';
8
+ import '../../chunk-YMTXMPV6.js';
9
+ import { createSqliteTables } from '../../chunk-BGYJW37L.js';
10
+ import '../../chunk-EFEOOCJ3.js';
11
+ import '../../chunk-Q6EDCUXV.js';
12
+ import '../../chunk-TKORQCG4.js';
13
13
  import '../../chunk-35S6P5ZU.js';
14
14
  import '../../chunk-MIJKEVV7.js';
15
- import { closeAfterFailure } from '../../chunk-FMMIX6N4.js';
15
+ import { closeAfterFailure } from '../../chunk-55ITBQJI.js';
16
16
  import '../../chunk-2L54C2C2.js';
17
- import '../../chunk-BEFM74L2.js';
17
+ import '../../chunk-FQ7ZPOTZ.js';
18
18
  import '../../chunk-DRACN6XG.js';
19
- import '../../chunk-2Y4IFKW7.js';
19
+ import '../../chunk-TKP5T34P.js';
20
20
  import '../../chunk-DK2S42XB.js';
21
21
  import '../../chunk-UR7W5YQK.js';
22
- import '../../chunk-B75XRV3O.js';
22
+ import '../../chunk-V34A6R5V.js';
23
23
  import '../../chunk-S4KQ5LV4.js';
24
24
  import '../../chunk-KCO5EFJU.js';
25
- import '../../chunk-46GDII45.js';
26
- import '../../chunk-JRP3VGHS.js';
27
- import '../../chunk-TFMVL4QH.js';
25
+ import '../../chunk-FL5UQRES.js';
26
+ import '../../chunk-QLUXRWKL.js';
27
+ import '../../chunk-FLEQ2HBK.js';
28
28
  import '../../chunk-K34OPSJK.js';
29
29
  import '../../chunk-2EBMPJBO.js';
30
- import '../../chunk-K3BUWSFR.js';
30
+ import '../../chunk-PVUI6KGR.js';
31
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-IJTLXNGJ.js';
36
+ import '../../chunk-4GUBTVPV.js';
37
37
  import '../../chunk-GYA4JRP5.js';
38
- import '../../chunk-2WDD2NO3.js';
38
+ import '../../chunk-42PYUGLS.js';
39
39
  import '../../chunk-ITE4IXAK.js';
40
- import '../../chunk-TVLKA4AY.js';
41
40
  import '../../chunk-4MB3AQAQ.js';
42
41
  import '../../chunk-G6Q5UM7U.js';
43
42
 
@@ -1 +1 @@
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
+ {"version":3,"sources":["../../../src/backend/sqlite/local-store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EA,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 ContributionRepairEntry,\n ContributionRepairResult,\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,21 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var chunk5MUSU4ZP_cjs = require('../../chunk-5MUSU4ZP.cjs');
4
- require('../../chunk-OSZPLZIV.cjs');
5
- require('../../chunk-ST3LPB2V.cjs');
6
- require('../../chunk-STQ3BSED.cjs');
3
+ var chunkVVQM4CZD_cjs = require('../../chunk-VVQM4CZD.cjs');
4
+ require('../../chunk-P7GTYOLB.cjs');
5
+ require('../../chunk-H7VE3FL4.cjs');
6
+ require('../../chunk-NAAMUYMS.cjs');
7
7
  require('../../chunk-4SZ6XPTG.cjs');
8
- require('../../chunk-HJH3RMXG.cjs');
9
- require('../../chunk-6JZUSDY2.cjs');
10
- require('../../chunk-NN3QSOVS.cjs');
8
+ require('../../chunk-F4NHQHEZ.cjs');
9
+ require('../../chunk-Z3WO6MND.cjs');
10
+ require('../../chunk-OOA273IJ.cjs');
11
11
  require('../../chunk-ZDH3DX3C.cjs');
12
- require('../../chunk-3PRKZW6D.cjs');
12
+ require('../../chunk-EKFUG4G7.cjs');
13
13
  require('../../chunk-ACSVZPK7.cjs');
14
- require('../../chunk-WBUFJ7BS.cjs');
15
- require('../../chunk-GFRGG2US.cjs');
14
+ require('../../chunk-JQXSZHF2.cjs');
15
+ require('../../chunk-5GAONX5G.cjs');
16
16
  require('../../chunk-ZY4GXIVN.cjs');
17
17
  require('../../chunk-NAUA4PW5.cjs');
18
- require('../../chunk-OVUUTCPJ.cjs');
18
+ require('../../chunk-JXUTCSXX.cjs');
19
19
  require('../../chunk-U5W4LKZV.cjs');
20
20
  require('../../chunk-764JHTLT.cjs');
21
21
  require('../../chunk-C4F7VJ5D.cjs');
@@ -25,11 +25,11 @@ require('../../chunk-TDXIBCGY.cjs');
25
25
 
26
26
  Object.defineProperty(exports, "DEFAULT_LOCAL_SQLITE_PRAGMAS", {
27
27
  enumerable: true,
28
- get: function () { return chunk5MUSU4ZP_cjs.DEFAULT_LOCAL_SQLITE_PRAGMAS; }
28
+ get: function () { return chunkVVQM4CZD_cjs.DEFAULT_LOCAL_SQLITE_PRAGMAS; }
29
29
  });
30
30
  Object.defineProperty(exports, "createLocalSqliteBackend", {
31
31
  enumerable: true,
32
- get: function () { return chunk5MUSU4ZP_cjs.createLocalSqliteBackend; }
32
+ get: function () { return chunkVVQM4CZD_cjs.createLocalSqliteBackend; }
33
33
  });
34
34
  //# sourceMappingURL=local.cjs.map
35
35
  //# sourceMappingURL=local.cjs.map
@@ -1,8 +1,8 @@
1
1
  import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
2
- import { B as BackendCapabilities, A as AdapterBackend } from '../../types-Cjvkj0jA.cjs';
3
- export { C as ContributionDiagnostic, a as ContributionDiagnosticState } from '../../types-Cjvkj0jA.cjs';
2
+ import { B as BackendCapabilities, A as AdapterBackend } from '../../types-Ch9a0Dx6.cjs';
3
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../../types-Ch9a0Dx6.cjs';
4
4
  import { A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.cjs';
5
- import { S as SqliteTables } from '../../sqlite-BrMoSsI7.cjs';
5
+ import { S as SqliteTables } from '../../sqlite-DY0WODUK.cjs';
6
6
  import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.cjs';
7
7
  export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.cjs';
8
8
  import 'zod';
@@ -1,8 +1,8 @@
1
1
  import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
2
- import { B as BackendCapabilities, A as AdapterBackend } from '../../types-Cjvkj0jA.js';
3
- export { C as ContributionDiagnostic, a as ContributionDiagnosticState } from '../../types-Cjvkj0jA.js';
2
+ import { B as BackendCapabilities, A as AdapterBackend } from '../../types-Ch9a0Dx6.js';
3
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../../types-Ch9a0Dx6.js';
4
4
  import { A as AnySqliteDatabase } from '../../sqlite-execution-DwbE2a9y.js';
5
- import { S as SqliteTables } from '../../sqlite-CHhZUyO5.js';
5
+ import { S as SqliteTables } from '../../sqlite-L-VIRzqA.js';
6
6
  import { L as LocalSqlitePragmaOptions } from '../../local-options-CZ1BnIoF.js';
7
7
  export { D as DEFAULT_LOCAL_SQLITE_PRAGMAS, a as LocalSqliteJournalMode, b as LocalSqliteSynchronousMode } from '../../local-options-CZ1BnIoF.js';
8
8
  import 'zod';
@@ -1,19 +1,19 @@
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';
1
+ export { DEFAULT_LOCAL_SQLITE_PRAGMAS, createLocalSqliteBackend } from '../../chunk-VTN3C3CH.js';
2
+ import '../../chunk-4GUTQPVO.js';
3
+ import '../../chunk-DXEEHSGN.js';
4
+ import '../../chunk-4QIKLIGG.js';
5
5
  import '../../chunk-QT6V3YRH.js';
6
- import '../../chunk-PHXITZE4.js';
7
- import '../../chunk-7G32LIQM.js';
8
- import '../../chunk-GWEDD3DH.js';
6
+ import '../../chunk-YMTXMPV6.js';
7
+ import '../../chunk-BGYJW37L.js';
8
+ import '../../chunk-EFEOOCJ3.js';
9
9
  import '../../chunk-35S6P5ZU.js';
10
- import '../../chunk-FMMIX6N4.js';
10
+ import '../../chunk-55ITBQJI.js';
11
11
  import '../../chunk-UR7W5YQK.js';
12
- import '../../chunk-B75XRV3O.js';
13
- import '../../chunk-JRP3VGHS.js';
12
+ import '../../chunk-V34A6R5V.js';
13
+ import '../../chunk-QLUXRWKL.js';
14
14
  import '../../chunk-K34OPSJK.js';
15
15
  import '../../chunk-2EBMPJBO.js';
16
- import '../../chunk-K3BUWSFR.js';
16
+ import '../../chunk-PVUI6KGR.js';
17
17
  import '../../chunk-6DCB664D.js';
18
18
  import '../../chunk-QMQLUA66.js';
19
19
  import '../../chunk-4MB3AQAQ.js';
@@ -1,3 +1,4 @@
1
+ import { isPlainObject } from './chunk-ITE4IXAK.js';
1
2
  import { ConfigurationError } from './chunk-4MB3AQAQ.js';
2
3
 
3
4
  // src/store/reserved-keys.ts
@@ -89,6 +90,59 @@ function filterReservedKeys(props, reservedKeys) {
89
90
  return filtered;
90
91
  }
91
92
 
92
- export { RESERVED_EDGE_KEYS, RESERVED_NODE_KEYS, assertSchemaKeysAreFree, filterReservedKeys, validateProjectionField };
93
- //# sourceMappingURL=chunk-TVLKA4AY.js.map
94
- //# sourceMappingURL=chunk-TVLKA4AY.js.map
93
+ // src/core/json-value.ts
94
+ function assertJsonValue(value, rootLabel, ownerKind) {
95
+ walk(value, rootLabel, ownerKind);
96
+ }
97
+ function walk(value, path, ownerKind) {
98
+ if (value === null) return;
99
+ const valueType = typeof value;
100
+ if (valueType === "number") {
101
+ if (!Number.isFinite(value)) {
102
+ throwInvalid(path, describeNonFinite(value), ownerKind);
103
+ }
104
+ return;
105
+ }
106
+ if (valueType === "string" || valueType === "boolean") return;
107
+ if (valueType === "bigint" || valueType === "function" || valueType === "symbol" || valueType === "undefined") {
108
+ throwInvalid(path, valueType, ownerKind);
109
+ }
110
+ if (Array.isArray(value)) {
111
+ for (const [index, element] of value.entries()) {
112
+ walk(element, `${path}[${index}]`, ownerKind);
113
+ }
114
+ return;
115
+ }
116
+ if (!isPlainObject(value)) {
117
+ throwInvalid(path, describeNonPlain(value), ownerKind);
118
+ }
119
+ for (const [key, nested] of Object.entries(value)) {
120
+ walk(nested, `${path}.${key}`, ownerKind);
121
+ }
122
+ }
123
+ function describeNonFinite(value) {
124
+ if (Number.isNaN(value)) return "NaN";
125
+ if (value === Number.POSITIVE_INFINITY) return "Infinity";
126
+ if (value === Number.NEGATIVE_INFINITY) return "-Infinity";
127
+ return "non-finite number";
128
+ }
129
+ function describeNonPlain(value) {
130
+ const constructorName = value?.constructor?.name;
131
+ if (typeof constructorName === "string" && constructorName.length > 0) {
132
+ return `${constructorName} instance`;
133
+ }
134
+ return "non-plain object";
135
+ }
136
+ function throwInvalid(path, kind, ownerKind) {
137
+ throw new ConfigurationError(
138
+ `${ownerKind} ${path} contains a non-JSON value (${kind}). Annotations must be JSON-serializable.`,
139
+ { path, valueKind: kind },
140
+ {
141
+ suggestion: "Use only strings, numbers, booleans, null, arrays, and plain objects in annotations."
142
+ }
143
+ );
144
+ }
145
+
146
+ export { RESERVED_EDGE_KEYS, RESERVED_NODE_KEYS, assertJsonValue, assertSchemaKeysAreFree, filterReservedKeys, validateProjectionField };
147
+ //# sourceMappingURL=chunk-42PYUGLS.js.map
148
+ //# sourceMappingURL=chunk-42PYUGLS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/store/reserved-keys.ts","../src/core/json-value.ts"],"names":[],"mappings":"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","file":"chunk-42PYUGLS.js","sourcesContent":["/**\n * Reserved Keys for Store Entities\n *\n * Structural keys that cannot be overwritten by user-defined properties.\n * Shared across row-mappers, subgraph projection, and schema validation.\n */\nimport type { KindEntity } from \"../core/types\";\nimport { ConfigurationError } from \"../errors\";\n\nexport const RESERVED_NODE_KEYS: ReadonlySet<string> = new Set([\n \"id\",\n \"kind\",\n \"meta\",\n]);\n\nexport const RESERVED_EDGE_KEYS: ReadonlySet<string> = new Set([\n \"id\",\n \"kind\",\n \"meta\",\n \"fromKind\",\n \"fromId\",\n \"toKind\",\n \"toId\",\n]);\n\nconst PROTOTYPE_POLLUTION_KEYS: ReadonlySet<string> = new Set([\n \"__proto__\",\n \"constructor\",\n \"prototype\",\n]);\n\n/**\n * Properties starting with `$` are reserved for TypeGraph-owned accessors\n * on the query-builder node/edge proxies (today: `$fulltext`). Reserving\n * the whole prefix — not just the currently-used names — keeps future\n * accessors (e.g. `$vector`, `$json`) from colliding with user fields.\n */\nconst RESERVED_PROPERTY_PREFIX = \"$\";\n\n/**\n * True if a user-defined field name is reserved by TypeGraph's accessor\n * namespace. `defineNode` / `defineEdge` call this against schema keys so\n * the collision fails fast at graph-definition time rather than silently\n * at query time.\n */\nfunction isReservedPropertyName(name: string): boolean {\n return name.startsWith(RESERVED_PROPERTY_PREFIX);\n}\n\n/**\n * Validates that a node or edge schema does not use any reserved property\n * name. Covers both the structural keys (`id`, `kind`, etc.) and the\n * `$`-prefix accessor namespace. Throws a single `ConfigurationError`\n * per conflict class so the user sees all collisions in one pass.\n */\nexport function assertSchemaKeysAreFree(\n entityKind: \"Node\" | \"Edge\",\n name: string,\n keys: readonly string[],\n reservedStructuralKeys: ReadonlySet<string>,\n): void {\n const structuralConflicts = keys.filter((key) =>\n reservedStructuralKeys.has(key),\n );\n if (structuralConflicts.length > 0) {\n const label = entityKind.toLowerCase();\n throw new ConfigurationError(\n `${entityKind} \"${name}\" schema contains reserved property names: ${structuralConflicts.join(\", \")}`,\n {\n [`${label}Type`]: name,\n conflicts: structuralConflicts,\n reservedKeys: [...reservedStructuralKeys],\n },\n {\n suggestion: `Rename the conflicting properties. Reserved names (${[...reservedStructuralKeys].join(\", \")}) are added automatically to all ${label}s.`,\n },\n );\n }\n\n const prefixConflicts = keys.filter((key) => isReservedPropertyName(key));\n if (prefixConflicts.length > 0) {\n const label = entityKind.toLowerCase();\n throw new ConfigurationError(\n `${entityKind} \"${name}\" schema uses the reserved \"${RESERVED_PROPERTY_PREFIX}\" prefix on: ${prefixConflicts.join(\", \")}`,\n {\n [`${label}Type`]: name,\n conflicts: prefixConflicts,\n reservedPrefix: RESERVED_PROPERTY_PREFIX,\n },\n {\n suggestion: `Property names starting with \"${RESERVED_PROPERTY_PREFIX}\" are reserved for TypeGraph accessors (e.g. $fulltext). Rename each field.`,\n },\n );\n }\n}\n\n/**\n * Validates that a projection field name is safe to assign onto a result object.\n * Rejects reserved structural keys and prototype-pollution vectors.\n *\n * @throws ConfigurationError if the field is reserved or dangerous\n */\nexport function validateProjectionField(\n field: string,\n entityType: KindEntity,\n kind: string,\n): void {\n const reserved =\n entityType === \"node\" ? RESERVED_NODE_KEYS : RESERVED_EDGE_KEYS;\n\n if (reserved.has(field)) {\n throw new ConfigurationError(\n `Projection field \"${field}\" on ${entityType} kind \"${kind}\" conflicts with a reserved structural key`,\n { field, kind, entityType, reservedKeys: [...reserved] },\n {\n suggestion: `Remove \"${field}\" from the projection. Structural fields (${[...reserved].join(\", \")}) are included automatically when relevant.`,\n },\n );\n }\n\n if (PROTOTYPE_POLLUTION_KEYS.has(field)) {\n throw new ConfigurationError(\n `Projection field \"${field}\" on ${entityType} kind \"${kind}\" is not allowed`,\n { field, kind, entityType },\n {\n suggestion: `\"${field}\" cannot be used as a projection field name.`,\n },\n );\n }\n}\n\n/**\n * Filters out reserved keys from a props object to prevent runtime collisions.\n */\nexport function filterReservedKeys(\n props: Record<string, unknown>,\n reservedKeys: ReadonlySet<string>,\n): Record<string, unknown> {\n const filtered: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(props)) {\n if (!reservedKeys.has(key)) {\n filtered[key] = value;\n }\n }\n return filtered;\n}\n","/**\n * Runtime validation for JSON-serializable values.\n *\n * Used at definition-time boundaries (e.g., `defineNode`/`defineEdge` annotations)\n * to reject values that would silently break `JSON.stringify` round-trips or\n * throw at hash time. Catches accidental violations from untyped JS callers\n * and `as any` escape hatches that bypass the `JsonValue` type.\n */\nimport { ConfigurationError } from \"../errors\";\nimport { isPlainObject } from \"../utils/object\";\n\n/**\n * Asserts that `value` is JSON-serializable.\n *\n * Throws `ConfigurationError` with a dotted path identifying the offending\n * field. Rejects `bigint`, `function`, `symbol`, `undefined`, and class\n * instances such as `Date`, `Map`, `Set`, regex literals, and Buffers — all\n * of which either throw or silently coerce under `JSON.stringify`.\n *\n * @param value - The value to validate\n * @param rootLabel - Label for the root of the value (e.g., `\"annotations\"`)\n * used as the prefix of the error path\n * @param ownerKind - Human-readable owner identifier for the error message\n * (e.g., `'Node \"Person\"'`)\n */\nexport function assertJsonValue(\n value: unknown,\n rootLabel: string,\n ownerKind: string,\n): void {\n walk(value, rootLabel, ownerKind);\n}\n\nfunction walk(value: unknown, path: string, ownerKind: string): void {\n if (value === null) return;\n const valueType = typeof value;\n if (valueType === \"number\") {\n // NaN/Infinity/-Infinity are not JSON values; JSON.stringify silently\n // coerces them to `null`, which would change the canonical hash input\n // without the consumer noticing.\n if (!Number.isFinite(value)) {\n throwInvalid(path, describeNonFinite(value as number), ownerKind);\n }\n return;\n }\n if (valueType === \"string\" || valueType === \"boolean\") return;\n if (\n valueType === \"bigint\" ||\n valueType === \"function\" ||\n valueType === \"symbol\" ||\n valueType === \"undefined\"\n ) {\n throwInvalid(path, valueType, ownerKind);\n }\n if (Array.isArray(value)) {\n for (const [index, element] of value.entries()) {\n walk(element, `${path}[${index}]`, ownerKind);\n }\n return;\n }\n if (!isPlainObject(value)) {\n throwInvalid(path, describeNonPlain(value), ownerKind);\n }\n for (const [key, nested] of Object.entries(value)) {\n walk(nested, `${path}.${key}`, ownerKind);\n }\n}\n\nfunction describeNonFinite(value: number): string {\n if (Number.isNaN(value)) return \"NaN\";\n if (value === Number.POSITIVE_INFINITY) return \"Infinity\";\n if (value === Number.NEGATIVE_INFINITY) return \"-Infinity\";\n return \"non-finite number\";\n}\n\nfunction describeNonPlain(value: unknown): string {\n const constructorName = (value as { constructor?: { name?: unknown } } | null)\n ?.constructor?.name;\n if (typeof constructorName === \"string\" && constructorName.length > 0) {\n return `${constructorName} instance`;\n }\n return \"non-plain object\";\n}\n\nfunction throwInvalid(path: string, kind: string, ownerKind: string): never {\n throw new ConfigurationError(\n `${ownerKind} ${path} contains a non-JSON value (${kind}). Annotations must be JSON-serializable.`,\n { path, valueKind: kind },\n {\n suggestion:\n \"Use only strings, numbers, booleans, null, arrays, and plain objects in annotations.\",\n },\n );\n}\n"]}
@@ -1,7 +1,6 @@
1
1
  import { ALL_META_EDGE_NAMES } from './chunk-GYA4JRP5.js';
2
- import { assertJsonValue } from './chunk-2WDD2NO3.js';
2
+ import { RESERVED_NODE_KEYS, RESERVED_EDGE_KEYS, assertJsonValue } from './chunk-42PYUGLS.js';
3
3
  import { isPlainObject, compactUndefined, freezeDeep } from './chunk-ITE4IXAK.js';
4
- import { RESERVED_NODE_KEYS, RESERVED_EDGE_KEYS } from './chunk-TVLKA4AY.js';
5
4
  import { TypeGraphError, ConfigurationError } from './chunk-4MB3AQAQ.js';
6
5
  import { encodeJsonPointerSegment } from './chunk-G6Q5UM7U.js';
7
6
 
@@ -1843,5 +1842,5 @@ function freezeDocument(input) {
1843
1842
  }
1844
1843
 
1845
1844
  export { CURRENT_GRAPH_EXTENSION_VERSION, GRAPH_EXTENSION_ISSUE_CODES, GRAPH_EXTENSION_TOP_LEVEL_KEYS, GraphExtensionError, GraphExtensionUnresolvedEndpointError, GraphExtensionValidationError, GraphExtensionVersionUnsupportedError, INCOMPATIBLE_CHANGE_TYPES, IncompatibleChangeError, KindCollisionError, KindHasReferentsError, LEGACY_GRAPH_EXTENSION_VERSION, RemoveCompileTimeKindError, computeTransitiveClosure, err, invertClosure, isErr, isOk, isReachable, ok, unwrap, validateGraphExtension };
1846
- //# sourceMappingURL=chunk-IJTLXNGJ.js.map
1847
- //# sourceMappingURL=chunk-IJTLXNGJ.js.map
1845
+ //# sourceMappingURL=chunk-4GUBTVPV.js.map
1846
+ //# sourceMappingURL=chunk-4GUBTVPV.js.map