@nicia-ai/typegraph 0.33.0 → 0.35.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 (284) hide show
  1. package/README.md +20 -0
  2. package/dist/backend/postgres/index.cjs +30 -26
  3. package/dist/backend/postgres/index.d.cts +39 -7
  4. package/dist/backend/postgres/index.d.ts +39 -7
  5. package/dist/backend/postgres/index.js +17 -13
  6. package/dist/backend/postgres/pglite.cjs +22 -18
  7. package/dist/backend/postgres/pglite.cjs.map +1 -1
  8. package/dist/backend/postgres/pglite.d.cts +4 -4
  9. package/dist/backend/postgres/pglite.d.ts +4 -4
  10. package/dist/backend/postgres/pglite.js +17 -13
  11. package/dist/backend/postgres/pglite.js.map +1 -1
  12. package/dist/backend/sqlite/index.cjs +26 -23
  13. package/dist/backend/sqlite/index.d.cts +8 -8
  14. package/dist/backend/sqlite/index.d.ts +8 -8
  15. package/dist/backend/sqlite/index.js +14 -11
  16. package/dist/backend/sqlite/libsql.cjs +21 -17
  17. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  18. package/dist/backend/sqlite/libsql.d.cts +13 -6
  19. package/dist/backend/sqlite/libsql.d.ts +13 -6
  20. package/dist/backend/sqlite/libsql.js +17 -13
  21. package/dist/backend/sqlite/libsql.js.map +1 -1
  22. package/dist/backend/sqlite/local.cjs +102 -18
  23. package/dist/backend/sqlite/local.cjs.map +1 -1
  24. package/dist/backend/sqlite/local.d.cts +95 -5
  25. package/dist/backend/sqlite/local.d.ts +95 -5
  26. package/dist/backend/sqlite/local.js +96 -13
  27. package/dist/backend/sqlite/local.js.map +1 -1
  28. package/dist/{chunk-JHOBXD7O.js → chunk-3TWF3SH4.js} +332 -64
  29. package/dist/chunk-3TWF3SH4.js.map +1 -0
  30. package/dist/chunk-4JEZZJ6S.cjs +1271 -0
  31. package/dist/chunk-4JEZZJ6S.cjs.map +1 -0
  32. package/dist/{chunk-I4W7MKVG.cjs → chunk-4TOD4LBZ.cjs} +249 -294
  33. package/dist/chunk-4TOD4LBZ.cjs.map +1 -0
  34. package/dist/chunk-55MZDDZV.js +239 -0
  35. package/dist/chunk-55MZDDZV.js.map +1 -0
  36. package/dist/{chunk-LM2IC4ZJ.cjs → chunk-5A6FNS6N.cjs} +75 -19
  37. package/dist/chunk-5A6FNS6N.cjs.map +1 -0
  38. package/dist/{chunk-FDN43KXV.cjs → chunk-5AQIKK56.cjs} +65 -24
  39. package/dist/chunk-5AQIKK56.cjs.map +1 -0
  40. package/dist/{chunk-IZ4PCL47.js → chunk-5SEGFTZX.js} +4 -66
  41. package/dist/chunk-5SEGFTZX.js.map +1 -0
  42. package/dist/{chunk-CWFPJ3RC.js → chunk-6FR2MMS6.js} +7 -7
  43. package/dist/chunk-6FR2MMS6.js.map +1 -0
  44. package/dist/chunk-7YSP4V4R.cjs +69 -0
  45. package/dist/chunk-7YSP4V4R.cjs.map +1 -0
  46. package/dist/chunk-A42GCBGX.cjs +28 -0
  47. package/dist/chunk-A42GCBGX.cjs.map +1 -0
  48. package/dist/chunk-ACSVZPK7.cjs +21 -0
  49. package/dist/chunk-ACSVZPK7.cjs.map +1 -0
  50. package/dist/{chunk-OIE2UPVG.cjs → chunk-BLZDPRXT.cjs} +52 -21
  51. package/dist/chunk-BLZDPRXT.cjs.map +1 -0
  52. package/dist/chunk-BYPOGQWK.js +25 -0
  53. package/dist/chunk-BYPOGQWK.js.map +1 -0
  54. package/dist/{chunk-NG5N7R45.cjs → chunk-CK5BVQOW.cjs} +325 -213
  55. package/dist/chunk-CK5BVQOW.cjs.map +1 -0
  56. package/dist/chunk-CTTSDJLY.cjs +261 -0
  57. package/dist/chunk-CTTSDJLY.cjs.map +1 -0
  58. package/dist/chunk-CUHM5CWJ.cjs +12 -0
  59. package/dist/chunk-CUHM5CWJ.cjs.map +1 -0
  60. package/dist/chunk-CZQ3FO2Q.js +2320 -0
  61. package/dist/chunk-CZQ3FO2Q.js.map +1 -0
  62. package/dist/{chunk-CFNT3ITG.cjs → chunk-D7ZEOS56.cjs} +25 -52
  63. package/dist/chunk-D7ZEOS56.cjs.map +1 -0
  64. package/dist/chunk-DFVLCOP6.js +10 -0
  65. package/dist/chunk-DFVLCOP6.js.map +1 -0
  66. package/dist/chunk-DI74SMXS.cjs +29 -0
  67. package/dist/chunk-DI74SMXS.cjs.map +1 -0
  68. package/dist/{chunk-KY5SDVA7.cjs → chunk-EM3CWPND.cjs} +442 -113
  69. package/dist/chunk-EM3CWPND.cjs.map +1 -0
  70. package/dist/chunk-EMF62TZG.cjs +1176 -0
  71. package/dist/chunk-EMF62TZG.cjs.map +1 -0
  72. package/dist/chunk-EOLERH7Y.cjs +40 -0
  73. package/dist/chunk-EOLERH7Y.cjs.map +1 -0
  74. package/dist/{chunk-3QRBXYT5.cjs → chunk-FACJJWGF.cjs} +24 -6
  75. package/dist/chunk-FACJJWGF.cjs.map +1 -0
  76. package/dist/{chunk-KTIEB7VH.cjs → chunk-FL472AMI.cjs} +49 -165
  77. package/dist/chunk-FL472AMI.cjs.map +1 -0
  78. package/dist/{chunk-4RBAJVEC.cjs → chunk-FN35DLCN.cjs} +31 -9
  79. package/dist/chunk-FN35DLCN.cjs.map +1 -0
  80. package/dist/{chunk-C4C4Q7A6.js → chunk-FPIZFYHE.js} +12 -35
  81. package/dist/chunk-FPIZFYHE.js.map +1 -0
  82. package/dist/{chunk-XKNAK27R.js → chunk-FRV5Q5IO.js} +64 -8
  83. package/dist/chunk-FRV5Q5IO.js.map +1 -0
  84. package/dist/{chunk-K5P5OZXS.js → chunk-G6Q5UM7U.js} +2 -2
  85. package/dist/{chunk-K5P5OZXS.js.map → chunk-G6Q5UM7U.js.map} +1 -1
  86. package/dist/chunk-GSQ6NPH6.cjs +100 -0
  87. package/dist/chunk-GSQ6NPH6.cjs.map +1 -0
  88. package/dist/chunk-GUR2FNB5.cjs +12 -0
  89. package/dist/{chunk-6ZR4QC3O.cjs.map → chunk-GUR2FNB5.cjs.map} +1 -1
  90. package/dist/{chunk-ZFWNO3GE.cjs → chunk-H7YNSMA7.cjs} +107 -2
  91. package/dist/chunk-H7YNSMA7.cjs.map +1 -0
  92. package/dist/{chunk-GYVBEZAO.js → chunk-I7ZUZKFD.js} +47 -19
  93. package/dist/chunk-I7ZUZKFD.js.map +1 -0
  94. package/dist/chunk-ITE4IXAK.js +25 -0
  95. package/dist/chunk-ITE4IXAK.js.map +1 -0
  96. package/dist/{chunk-D3EWZ67S.cjs → chunk-J7WFGBJR.cjs} +3372 -4970
  97. package/dist/chunk-J7WFGBJR.cjs.map +1 -0
  98. package/dist/{chunk-PYD3UCDU.js → chunk-JBTOYDMN.js} +202 -251
  99. package/dist/chunk-JBTOYDMN.js.map +1 -0
  100. package/dist/{chunk-XVUJY72M.js → chunk-K3PPLHY7.js} +234 -118
  101. package/dist/chunk-K3PPLHY7.js.map +1 -0
  102. package/dist/{chunk-454I6GDF.js → chunk-KBGQIPRQ.js} +102 -3
  103. package/dist/chunk-KBGQIPRQ.js.map +1 -0
  104. package/dist/chunk-KMI7LYAF.js +1252 -0
  105. package/dist/chunk-KMI7LYAF.js.map +1 -0
  106. package/dist/{chunk-JIEJCTDS.cjs → chunk-LGEALRC6.cjs} +21 -4
  107. package/dist/chunk-LGEALRC6.cjs.map +1 -0
  108. package/dist/{chunk-TQOYM4LN.js → chunk-MP2JQKSG.js} +21 -5
  109. package/dist/chunk-MP2JQKSG.js.map +1 -0
  110. package/dist/{chunk-3642VBVC.cjs → chunk-O7UN7OXA.cjs} +389 -121
  111. package/dist/chunk-O7UN7OXA.cjs.map +1 -0
  112. package/dist/chunk-OHMP6N2J.js +47 -0
  113. package/dist/chunk-OHMP6N2J.js.map +1 -0
  114. package/dist/{chunk-6NRFUHMS.js → chunk-OR5ZA5WP.js} +135 -24
  115. package/dist/chunk-OR5ZA5WP.js.map +1 -0
  116. package/dist/{chunk-PRMKPFN5.js → chunk-Q5TEXCTB.js} +61 -6
  117. package/dist/chunk-Q5TEXCTB.js.map +1 -0
  118. package/dist/chunk-QNKSQTKQ.js +1312 -0
  119. package/dist/chunk-QNKSQTKQ.js.map +1 -0
  120. package/dist/{chunk-YCV72E6L.js → chunk-QOTI55H7.js} +7 -116
  121. package/dist/chunk-QOTI55H7.js.map +1 -0
  122. package/dist/{chunk-QBYTJSAY.js → chunk-QWEUYILR.js} +99 -34
  123. package/dist/chunk-QWEUYILR.js.map +1 -0
  124. package/dist/{chunk-OS6KS3HV.js → chunk-RGP33ZJ5.js} +485 -82
  125. package/dist/chunk-RGP33ZJ5.js.map +1 -0
  126. package/dist/chunk-RGPG7EOJ.js +94 -0
  127. package/dist/chunk-RGPG7EOJ.js.map +1 -0
  128. package/dist/{chunk-WWVV44DY.cjs → chunk-S55OV6PW.cjs} +15 -15
  129. package/dist/chunk-S55OV6PW.cjs.map +1 -0
  130. package/dist/{chunk-3E7SNSIA.cjs → chunk-SJDMVITW.cjs} +4 -4
  131. package/dist/{chunk-3E7SNSIA.cjs.map → chunk-SJDMVITW.cjs.map} +1 -1
  132. package/dist/{chunk-XLUNB2TZ.js → chunk-SNXVDZAJ.js} +3 -3
  133. package/dist/{chunk-XLUNB2TZ.js.map → chunk-SNXVDZAJ.js.map} +1 -1
  134. package/dist/{chunk-CEF2QOTO.js → chunk-T2WUSPDA.js} +49 -8
  135. package/dist/chunk-T2WUSPDA.js.map +1 -0
  136. package/dist/{chunk-YW7GHMF4.cjs → chunk-TCOCYN2P.cjs} +75 -20
  137. package/dist/chunk-TCOCYN2P.cjs.map +1 -0
  138. package/dist/{chunk-FLRCVI2G.cjs → chunk-TDXIBCGY.cjs} +2 -2
  139. package/dist/{chunk-FLRCVI2G.cjs.map → chunk-TDXIBCGY.cjs.map} +1 -1
  140. package/dist/chunk-TEDRJXOG.cjs +32 -0
  141. package/dist/chunk-TEDRJXOG.cjs.map +1 -0
  142. package/dist/{chunk-WLP6TKFB.js → chunk-UES55P7G.js} +2809 -4398
  143. package/dist/chunk-UES55P7G.js.map +1 -0
  144. package/dist/{chunk-EF3Z645U.cjs → chunk-UMDVATGY.cjs} +6 -72
  145. package/dist/chunk-UMDVATGY.cjs.map +1 -0
  146. package/dist/chunk-UR7W5YQK.js +18 -0
  147. package/dist/chunk-UR7W5YQK.js.map +1 -0
  148. package/dist/chunk-UT3S4SEN.js +31 -0
  149. package/dist/chunk-UT3S4SEN.js.map +1 -0
  150. package/dist/{chunk-3IR2GEMJ.cjs → chunk-UUT7UN2N.cjs} +149 -38
  151. package/dist/chunk-UUT7UN2N.cjs.map +1 -0
  152. package/dist/{chunk-PIHXFF73.js → chunk-UZV3AZKF.js} +21 -3
  153. package/dist/chunk-UZV3AZKF.js.map +1 -0
  154. package/dist/{chunk-DJYRRDHA.js → chunk-VHMPG6UL.js} +29 -7
  155. package/dist/chunk-VHMPG6UL.js.map +1 -0
  156. package/dist/{chunk-MBLXCV2Y.cjs → chunk-VPYHY3LJ.cjs} +111 -43
  157. package/dist/chunk-VPYHY3LJ.cjs.map +1 -0
  158. package/dist/{chunk-WYTUF3QO.js → chunk-VSPCZAXF.js} +3 -3
  159. package/dist/{chunk-WYTUF3QO.js.map → chunk-VSPCZAXF.js.map} +1 -1
  160. package/dist/chunk-W63OVYY4.js +29 -0
  161. package/dist/chunk-W63OVYY4.js.map +1 -0
  162. package/dist/{chunk-UPDMJEW6.js → chunk-WDBCBWC4.js} +356 -30
  163. package/dist/chunk-WDBCBWC4.js.map +1 -0
  164. package/dist/chunk-WJT7OU7E.cjs +1334 -0
  165. package/dist/chunk-WJT7OU7E.cjs.map +1 -0
  166. package/dist/chunk-XOX22WHL.cjs +2383 -0
  167. package/dist/chunk-XOX22WHL.cjs.map +1 -0
  168. package/dist/{ddl-CVnHJcar.d.ts → ddl-C2rZ-Aen.d.ts} +4 -4
  169. package/dist/{ddl-Dxt_fBHr.d.cts → ddl-CZz7a0E8.d.cts} +4 -4
  170. package/dist/{extension-types-YGFJPrzK.d.cts → extension-types-ixRpJVUp.d.cts} +24 -1
  171. package/dist/{extension-types-YGFJPrzK.d.ts → extension-types-ixRpJVUp.d.ts} +24 -1
  172. package/dist/{types-DGylBhWo.d.ts → fulltext-strategy-B57yvC5Q.d.ts} +2558 -2125
  173. package/dist/{types-C_UnQOQp.d.cts → fulltext-strategy-CDkSSYhq.d.cts} +2558 -2125
  174. package/dist/graph-extension/index.cjs +21 -19
  175. package/dist/graph-extension/index.d.cts +4 -4
  176. package/dist/graph-extension/index.d.ts +4 -4
  177. package/dist/graph-extension/index.js +6 -4
  178. package/dist/graph-merge/index.cjs +408 -169
  179. package/dist/graph-merge/index.cjs.map +1 -1
  180. package/dist/graph-merge/index.d.cts +63 -33
  181. package/dist/graph-merge/index.d.ts +63 -33
  182. package/dist/graph-merge/index.js +286 -47
  183. package/dist/graph-merge/index.js.map +1 -1
  184. package/dist/{index-DGX6D9j1.d.ts → index-6CSUAq-x.d.ts} +234 -93
  185. package/dist/{index-SEvUHDA6.d.cts → index-Bks_3HHK.d.cts} +234 -93
  186. package/dist/index.cjs +240 -211
  187. package/dist/index.cjs.map +1 -1
  188. package/dist/index.d.cts +11 -11
  189. package/dist/index.d.ts +11 -11
  190. package/dist/index.js +35 -27
  191. package/dist/index.js.map +1 -1
  192. package/dist/indexes/index.cjs +28 -27
  193. package/dist/indexes/index.d.cts +5 -5
  194. package/dist/indexes/index.d.ts +5 -5
  195. package/dist/indexes/index.js +10 -9
  196. package/dist/interchange/index.cjs +47 -17
  197. package/dist/interchange/index.d.cts +126 -12
  198. package/dist/interchange/index.d.ts +126 -12
  199. package/dist/interchange/index.js +14 -4
  200. package/dist/{manager-BYl_zyZR.d.cts → manager-DwQi8eV0.d.cts} +9 -2
  201. package/dist/{manager-C0_r0ALf.d.ts → manager-ejUCB52T.d.ts} +9 -2
  202. package/dist/{materialize-indexes-D20xNluI.d.cts → materialize-indexes-B4e9360H.d.cts} +20 -4
  203. package/dist/{materialize-indexes-CAkIYFV-.d.ts → materialize-indexes-te9TPMMJ.d.ts} +20 -4
  204. package/dist/{postgres-_9psmVGm.d.cts → postgres-CfEqsRMp.d.cts} +152 -1
  205. package/dist/{postgres-MzBPkYzq.d.ts → postgres-DQ5R6rzV.d.ts} +152 -1
  206. package/dist/profiler/index.cjs +11 -11
  207. package/dist/profiler/index.d.cts +7 -7
  208. package/dist/profiler/index.d.ts +7 -7
  209. package/dist/profiler/index.js +4 -4
  210. package/dist/provenance/index.cjs +590 -0
  211. package/dist/provenance/index.cjs.map +1 -0
  212. package/dist/provenance/index.d.cts +73 -0
  213. package/dist/provenance/index.d.ts +73 -0
  214. package/dist/provenance/index.js +588 -0
  215. package/dist/provenance/index.js.map +1 -0
  216. package/dist/schema/index.cjs +55 -38
  217. package/dist/schema/index.cjs.map +1 -1
  218. package/dist/schema/index.d.cts +57 -57
  219. package/dist/schema/index.d.ts +57 -57
  220. package/dist/schema/index.js +30 -13
  221. package/dist/schema/index.js.map +1 -1
  222. package/dist/{sqlite-gm44dShb.d.ts → sqlite-D7zBinNR.d.cts} +92 -1
  223. package/dist/{sqlite-BfksSb45.d.cts → sqlite-DvQndLky.d.ts} +92 -1
  224. package/dist/{store-view-FfE5_7eo.d.ts → store-view-BSpqvAxK.d.cts} +445 -46
  225. package/dist/{store-view-9jQ2rPum.d.cts → store-view-CKbHFRnn.d.ts} +445 -46
  226. package/dist/{types-B6mhrcLv.d.cts → types-Bv9DcS_E.d.cts} +2 -2
  227. package/dist/{types-CdWxK-nD.d.ts → types-CoxuV7EJ.d.ts} +2 -2
  228. package/dist/{where-Bpp2ul_z.d.cts → where-7RKFOsXt.d.ts} +2 -2
  229. package/dist/{where-BsEXraKW.d.ts → where-DdMIXOtH.d.cts} +2 -2
  230. package/package.json +21 -14
  231. package/dist/chunk-2YMGNYXY.js +0 -40
  232. package/dist/chunk-2YMGNYXY.js.map +0 -1
  233. package/dist/chunk-3642VBVC.cjs.map +0 -1
  234. package/dist/chunk-3EUKJEQ3.js +0 -77
  235. package/dist/chunk-3EUKJEQ3.js.map +0 -1
  236. package/dist/chunk-3IR2GEMJ.cjs.map +0 -1
  237. package/dist/chunk-3QRBXYT5.cjs.map +0 -1
  238. package/dist/chunk-454I6GDF.js.map +0 -1
  239. package/dist/chunk-4RBAJVEC.cjs.map +0 -1
  240. package/dist/chunk-6NRFUHMS.js.map +0 -1
  241. package/dist/chunk-6ZR4QC3O.cjs +0 -12
  242. package/dist/chunk-73KASJGO.cjs +0 -52
  243. package/dist/chunk-73KASJGO.cjs.map +0 -1
  244. package/dist/chunk-BF3ZDEUE.cjs +0 -773
  245. package/dist/chunk-BF3ZDEUE.cjs.map +0 -1
  246. package/dist/chunk-C4C4Q7A6.js.map +0 -1
  247. package/dist/chunk-CEF2QOTO.js.map +0 -1
  248. package/dist/chunk-CFNT3ITG.cjs.map +0 -1
  249. package/dist/chunk-CWFPJ3RC.js.map +0 -1
  250. package/dist/chunk-D3EWZ67S.cjs.map +0 -1
  251. package/dist/chunk-DJYRRDHA.js.map +0 -1
  252. package/dist/chunk-EF3Z645U.cjs.map +0 -1
  253. package/dist/chunk-FDN43KXV.cjs.map +0 -1
  254. package/dist/chunk-GYVBEZAO.js.map +0 -1
  255. package/dist/chunk-HTGDWIDE.cjs +0 -89
  256. package/dist/chunk-HTGDWIDE.cjs.map +0 -1
  257. package/dist/chunk-I4W7MKVG.cjs.map +0 -1
  258. package/dist/chunk-IZ4PCL47.js.map +0 -1
  259. package/dist/chunk-JHOBXD7O.js.map +0 -1
  260. package/dist/chunk-JIEJCTDS.cjs.map +0 -1
  261. package/dist/chunk-KTIEB7VH.cjs.map +0 -1
  262. package/dist/chunk-KY5SDVA7.cjs.map +0 -1
  263. package/dist/chunk-LM2IC4ZJ.cjs.map +0 -1
  264. package/dist/chunk-MBLXCV2Y.cjs.map +0 -1
  265. package/dist/chunk-NG5N7R45.cjs.map +0 -1
  266. package/dist/chunk-OIE2UPVG.cjs.map +0 -1
  267. package/dist/chunk-OS6KS3HV.js.map +0 -1
  268. package/dist/chunk-PIHXFF73.js.map +0 -1
  269. package/dist/chunk-PRMKPFN5.js.map +0 -1
  270. package/dist/chunk-PYD3UCDU.js.map +0 -1
  271. package/dist/chunk-QBYTJSAY.js.map +0 -1
  272. package/dist/chunk-SPT5JMME.js +0 -610
  273. package/dist/chunk-SPT5JMME.js.map +0 -1
  274. package/dist/chunk-SST7XDY6.cjs +0 -624
  275. package/dist/chunk-SST7XDY6.cjs.map +0 -1
  276. package/dist/chunk-TQOYM4LN.js.map +0 -1
  277. package/dist/chunk-UPDMJEW6.js.map +0 -1
  278. package/dist/chunk-WLP6TKFB.js.map +0 -1
  279. package/dist/chunk-WWVV44DY.cjs.map +0 -1
  280. package/dist/chunk-XKNAK27R.js.map +0 -1
  281. package/dist/chunk-XVUJY72M.js.map +0 -1
  282. package/dist/chunk-YCV72E6L.js.map +0 -1
  283. package/dist/chunk-YW7GHMF4.cjs.map +0 -1
  284. package/dist/chunk-ZFWNO3GE.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
- import { G as GraphDef, t as NodeKinds, u as GetNodeType } from '../manager-BYl_zyZR.cjs';
2
- import { S as Store, N as Node, U as UniqueIntrospection } from '../store-view-9jQ2rPum.cjs';
3
- import { d as NodeId, N as NodeType, e as EdgeId, J as JsonValue, f as KindAnnotations, g as EdgeType, D as DeleteBehavior, T as TemporalMode, h as GraphExtensionVersion, i as ExtensionNodeDef, j as ExtensionEdgeDef, k as ExtensionOntologyRelation, l as ExtensionIndex } from '../extension-types-YGFJPrzK.cjs';
4
- import { T as TypeGraphError } from '../index-SEvUHDA6.cjs';
1
+ import { G as GraphDef, t as NodeKinds, u as GetNodeType } from '../manager-DwQi8eV0.cjs';
2
+ import { S as Store, N as Node, U as UniqueIntrospection } from '../store-view-BSpqvAxK.cjs';
3
+ import { d as NodeId, N as NodeType, e as EdgeId, J as JsonValue, f as KindAnnotations, g as EdgeType, D as DeleteBehavior, T as TemporalMode, h as GraphExtensionVersion, i as ExtensionNodeDef, j as ExtensionEdgeDef, k as ExtensionOntologyRelation, l as ExtensionIndex } from '../extension-types-ixRpJVUp.cjs';
4
+ import { T as TypeGraphError } from '../index-Bks_3HHK.cjs';
5
5
  import { R as Result } from '../result-DWo6mUVz.cjs';
6
6
  export { i as isErr, a as isOk, u as unwrap } from '../result-DWo6mUVz.cjs';
7
- import { G as GraphBackend, M as MetaEdge, I as IndexDeclaration } from '../types-C_UnQOQp.cjs';
7
+ import { G as GraphBackend, M as MetaEdge, I as IndexDeclaration } from '../fulltext-strategy-CDkSSYhq.cjs';
8
8
  import { z } from 'zod';
9
- import '../materialize-indexes-D20xNluI.cjs';
9
+ import '../materialize-indexes-B4e9360H.cjs';
10
10
  import 'drizzle-orm';
11
11
  import 'drizzle-orm/pg-core';
12
12
  import 'drizzle-orm/sqlite-core';
@@ -34,8 +34,10 @@ type BranchId = string & Readonly<{
34
34
  }>;
35
35
  /**
36
36
  * Opaque token identifying the immutable `base@V` a branch was forked from.
37
- * Combines a schema hash with a content fingerprint (computed in T3). Branded so
38
- * it cannot be confused with an arbitrary string.
37
+ * Combines a schema hash with a staleness component. Branded so it cannot be
38
+ * confused with an arbitrary string. The second component is a
39
+ * durable revision anchor for stores with revision tracking enabled and a
40
+ * compatibility content fingerprint otherwise.
39
41
  */
40
42
  type BaseVersion = string & Readonly<{
41
43
  readonly __brand: "BaseVersion";
@@ -486,7 +488,13 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
486
488
  * This is content-addressed (the public `computeSchemaHash` deliberately
487
489
  * excludes the version number and `generatedAt`, so it is stable across
488
490
  * re-saves of the same schema).
489
- * 2. A **content fingerprint** — a SHA-256 digest (truncated to a fixed-width
491
+ * 2. A **revision anchor** when the Store has `revisionTracking` (or
492
+ * `history`) enabled — a durable random per-graph origin plus the
493
+ * monotonic revision clock. This is O(1) to read and changes after every
494
+ * successful Store write; the origin prevents independent stores with
495
+ * coincident timestamps from sharing an anchor.
496
+ * Stores without tracking retain the compatibility fallback: a
497
+ * **content fingerprint**, a SHA-256 digest (truncated to a fixed-width
490
498
  * hex string) of every LIVE node and edge over the base store (`id`,
491
499
  * `updated_at`, the bitemporal `valid_from`/`valid_to`, and canonicalized
492
500
  * `props`; edges also carry their endpoint ids), sorted by id, so two stores
@@ -501,17 +509,20 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
501
509
  * fingerprint would not match its source. (See the working-copy fidelity note in
502
510
  * T4.)
503
511
  *
504
- * `computeBaseVersion` is async because schema hashing and live-content
505
- * enumeration go through async TypeGraph internals. The design's synchronous
506
- * illustrative signature does not survive contact with the real store surface.
512
+ * `computeBaseVersion` is async because schema hashing, revision reads, and the
513
+ * compatibility live-content enumeration go through async TypeGraph internals.
514
+ * The design's synchronous illustrative signature does not survive contact with
515
+ * the real store surface.
507
516
  */
508
517
 
509
518
  /**
510
519
  * Computes the immutable `base@V` token for a store. Combines the schema hash
511
- * with a live-content fingerprint into a single branded {@link BaseVersion}.
520
+ * with a durable revision anchor when tracking is enabled, otherwise with the
521
+ * compatibility live-content fingerprint.
512
522
  *
513
523
  * MUST be called on the ORIGINAL base store, not a clone (clones regenerate
514
- * timestamps and would fingerprint differently).
524
+ * timestamps and would fingerprint differently when the compatibility path is
525
+ * in use).
515
526
  */
516
527
  declare function computeBaseVersion<G extends GraphDef>(store: Store<G>): Promise<BaseVersion>;
517
528
 
@@ -590,12 +601,12 @@ declare class BaseVersionMismatchError extends MergeError {
590
601
  * Pluggable working-copy strategy: how `branch()` produces an isolated,
591
602
  * independently-mutable copy of a base store.
592
603
  *
593
- * The P0 default is a faithful CLONE via the public interchange API
594
- * ({@link cloneWorkingCopyStrategy}): `exportGraph` the base, then `importGraph`
595
- * into a fresh store on a caller-provided backend. IDs are preserved by
596
- * interchange, so the diff engine (T3) can key on stable ids across base and
597
- * fork. This leverages public entrypoints only, needs zero schema changes, and
598
- * behaves identically across SQLite and Postgres.
604
+ * The P0 default is a faithful CLONE via streamed public interchange
605
+ * ({@link cloneWorkingCopyStrategy}): `exportGraphStream` the base, then
606
+ * `importGraphStream` into a fresh store on a caller-provided backend. IDs are
607
+ * preserved by interchange, so the diff engine (T3) can key on stable ids across
608
+ * base and fork. This leverages public entrypoints only, needs zero schema
609
+ * changes, and behaves identically across SQLite and Postgres.
599
610
  *
600
611
  * INTERCHANGE FIDELITY LIMITATION (verified, design §13.x): the interchange
601
612
  * `meta` schema has no `deletedAt` field, so a base row that is already
@@ -609,6 +620,18 @@ declare class BaseVersionMismatchError extends MergeError {
609
620
  * only) as the immutable reference, never against the clone (clones regenerate
610
621
  * `created_at`/`updated_at`, which would otherwise destabilize `base@V`).
611
622
  *
623
+ * `includeTemporal: true` carries `validFrom`/`validTo` through unchanged,
624
+ * preserving the base's exact valid-time window on the clone: create-time
625
+ * paths default an omitted `validFrom` to the row's own creation instant
626
+ * (see #240), and export/import round-trip a still-open-left `valid_from`
627
+ * (e.g. a row that predates the #240 fix) as an explicit `null` rather than
628
+ * silently dropping it — see `InterchangeNodeSchema.validFrom`'s doc.
629
+ * Without either half of this, the clone's re-import would re-stamp the
630
+ * affected base rows to the CLONE's creation instant instead — narrowing
631
+ * their validity window and making `asOf` reads on the fork diverge from
632
+ * identical reads on the base for any instant between the row's real
633
+ * creation and the clone.
634
+ *
612
635
  * Logical-namespace (copy-on-write within one backend, no full data copy) is a
613
636
  * future strategy slot — see the `WorkingCopyStrategy` interface — deferred past
614
637
  * P0.
@@ -637,29 +660,35 @@ type WorkingCopyStrategy<G extends GraphDef> = Readonly<{
637
660
  * in-process Postgres engine) be constructed lazily at branch time.
638
661
  *
639
662
  * The returned backend MUST be EMPTY (no rows for the base graph): the clone
640
- * seeds it from the base via `importGraph` with `onConflict: "error"`, so a
663
+ * seeds it from the base via `importGraphStream` with `onConflict: "error"`, so a
641
664
  * pre-existing row is surfaced as a {@link BranchError} rather than silently
642
665
  * skipped (which would leave the working copy diverging from the base).
666
+ * When the source store uses `revisionTracking`, the backend must also satisfy
667
+ * that option's transactional revision-clock requirements because the clone
668
+ * preserves the source's branchability contract.
643
669
  */
644
670
  type MakeBackend = () => Promise<GraphBackend>;
645
671
  /**
646
- * The P0 default working-copy strategy: faithful clone via export/import.
672
+ * The P0 default working-copy strategy: faithful clone via streamed interchange.
647
673
  *
648
674
  * On each `create(baseStore)`:
649
- * 1. `exportGraph(baseStore, { includeMeta: true, includeDeleted: false })` —
650
- * `includeMeta: true` carries `created_at`/`updated_at`; `includeDeleted:
651
- * false` keeps the clone to LIVE rows only. Shipping soft-deleted rows is
652
- * unsafe: the meta schema has no `deletedAt`, so they would import as live and
653
- * resurrect on the fork's diff (see the fidelity note above). `branch()` only
654
- * needs the base's live state.
675
+ * 1. `exportGraphStream(baseStore, { includeMeta: true, includeTemporal: true,
676
+ * includeDeleted: false })` — `includeMeta: true` carries
677
+ * `created_at`/`updated_at`; `includeTemporal: true` carries
678
+ * `validFrom`/`validTo` so the clone's valid-time window matches the base's
679
+ * exactly (see the fidelity note above); `includeDeleted: false` keeps the
680
+ * clone to LIVE rows only. Shipping soft-deleted rows is unsafe: the meta
681
+ * schema has no `deletedAt`, so they would import as live and resurrect on
682
+ * the fork's diff (see the fidelity note above). `branch()` only needs the
683
+ * base's live state.
655
684
  * 2. Create a fresh store over the caller-provided backend with the SAME graph
656
685
  * definition via `createStoreWithSchema`.
657
- * 3. `importGraph(freshStore, data, { onConflict: "error", ... })` — ids are
686
+ * 3. `importGraphStream(freshStore, data, { onConflict: "error", ... })` — ids are
658
687
  * preserved so the diff engine can key on them. `onConflict: "error"`
659
688
  * requires the backend to be EMPTY: a pre-existing row is a contract
660
689
  * violation that must surface loudly, never be silently skipped (a skipped
661
690
  * row would leave the clone diverging from the base, so the fork's diff would
662
- * report phantom modifications/deletions). `importGraph` RETURNS
691
+ * report phantom modifications/deletions). `importGraphStream` RETURNS
663
692
  * `{ success, errors }` rather than throwing on a per-row rejection, so its
664
693
  * result is checked and any failure fails the branch.
665
694
  *
@@ -682,7 +711,8 @@ declare function cloneWorkingCopyStrategy<G extends GraphDef>(makeBackend: MakeB
682
711
  * branch's own backend seeded with the base's live state.
683
712
  *
684
713
  * The copy mechanism is pluggable behind {@link WorkingCopyStrategy}. The P0
685
- * default is the faithful export/import clone ({@link cloneWorkingCopyStrategy}),
714
+ * default is the faithful streamed-interchange clone
715
+ * ({@link cloneWorkingCopyStrategy}),
686
716
  * which keeps this primitive backend-agnostic: the caller supplies a
687
717
  * `makeBackend` factory, and `branch()` never names a concrete backend.
688
718
  */
@@ -697,7 +727,7 @@ declare function cloneWorkingCopyStrategy<G extends GraphDef>(makeBackend: MakeB
697
727
  * logical-namespace copy-on-write).
698
728
  *
699
729
  * Returns a {@link Result}: success yields the {@link GraphBranch}; any failure
700
- * (base-version stamping, backend construction, export/import) is wrapped in a
730
+ * (base-version stamping, backend construction, streamed interchange) is wrapped in a
701
731
  * {@link BranchError} with the underlying cause attached. Errors are returned,
702
732
  * never thrown — this is internal-logic surface (the caller converts to a thrown
703
733
  * error at the framework boundary).
@@ -814,7 +844,7 @@ type CandidatePair<K extends NodeType = NodeType> = Readonly<{
814
844
  *
815
845
  * 1. PRECONDITION — compute the target's `base@V` and reject any branch whose
816
846
  * `base` token does not match it (`BaseVersionMismatchError`). A branch
817
- * forked from a divergent schema or content fingerprint cannot be merged
847
+ * forked from a divergent schema or base revision cannot be merged
818
848
  * safely (design §5.2 / §13.6).
819
849
  * 2. STAGE — `stageBranches` (T7): the provenance-tagged UNION of every
820
850
  * branch's state-diff against the immutable base.
@@ -1,12 +1,12 @@
1
- import { G as GraphDef, t as NodeKinds, u as GetNodeType } from '../manager-C0_r0ALf.js';
2
- import { S as Store, N as Node, U as UniqueIntrospection } from '../store-view-FfE5_7eo.js';
3
- import { d as NodeId, N as NodeType, e as EdgeId, J as JsonValue, f as KindAnnotations, g as EdgeType, D as DeleteBehavior, T as TemporalMode, h as GraphExtensionVersion, i as ExtensionNodeDef, j as ExtensionEdgeDef, k as ExtensionOntologyRelation, l as ExtensionIndex } from '../extension-types-YGFJPrzK.js';
4
- import { T as TypeGraphError } from '../index-DGX6D9j1.js';
1
+ import { G as GraphDef, t as NodeKinds, u as GetNodeType } from '../manager-ejUCB52T.js';
2
+ import { S as Store, N as Node, U as UniqueIntrospection } from '../store-view-CKbHFRnn.js';
3
+ import { d as NodeId, N as NodeType, e as EdgeId, J as JsonValue, f as KindAnnotations, g as EdgeType, D as DeleteBehavior, T as TemporalMode, h as GraphExtensionVersion, i as ExtensionNodeDef, j as ExtensionEdgeDef, k as ExtensionOntologyRelation, l as ExtensionIndex } from '../extension-types-ixRpJVUp.js';
4
+ import { T as TypeGraphError } from '../index-6CSUAq-x.js';
5
5
  import { R as Result } from '../result-DWo6mUVz.js';
6
6
  export { i as isErr, a as isOk, u as unwrap } from '../result-DWo6mUVz.js';
7
- import { G as GraphBackend, M as MetaEdge, I as IndexDeclaration } from '../types-DGylBhWo.js';
7
+ import { G as GraphBackend, M as MetaEdge, I as IndexDeclaration } from '../fulltext-strategy-B57yvC5Q.js';
8
8
  import { z } from 'zod';
9
- import '../materialize-indexes-CAkIYFV-.js';
9
+ import '../materialize-indexes-te9TPMMJ.js';
10
10
  import 'drizzle-orm';
11
11
  import 'drizzle-orm/pg-core';
12
12
  import 'drizzle-orm/sqlite-core';
@@ -34,8 +34,10 @@ type BranchId = string & Readonly<{
34
34
  }>;
35
35
  /**
36
36
  * Opaque token identifying the immutable `base@V` a branch was forked from.
37
- * Combines a schema hash with a content fingerprint (computed in T3). Branded so
38
- * it cannot be confused with an arbitrary string.
37
+ * Combines a schema hash with a staleness component. Branded so it cannot be
38
+ * confused with an arbitrary string. The second component is a
39
+ * durable revision anchor for stores with revision tracking enabled and a
40
+ * compatibility content fingerprint otherwise.
39
41
  */
40
42
  type BaseVersion = string & Readonly<{
41
43
  readonly __brand: "BaseVersion";
@@ -486,7 +488,13 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
486
488
  * This is content-addressed (the public `computeSchemaHash` deliberately
487
489
  * excludes the version number and `generatedAt`, so it is stable across
488
490
  * re-saves of the same schema).
489
- * 2. A **content fingerprint** — a SHA-256 digest (truncated to a fixed-width
491
+ * 2. A **revision anchor** when the Store has `revisionTracking` (or
492
+ * `history`) enabled — a durable random per-graph origin plus the
493
+ * monotonic revision clock. This is O(1) to read and changes after every
494
+ * successful Store write; the origin prevents independent stores with
495
+ * coincident timestamps from sharing an anchor.
496
+ * Stores without tracking retain the compatibility fallback: a
497
+ * **content fingerprint**, a SHA-256 digest (truncated to a fixed-width
490
498
  * hex string) of every LIVE node and edge over the base store (`id`,
491
499
  * `updated_at`, the bitemporal `valid_from`/`valid_to`, and canonicalized
492
500
  * `props`; edges also carry their endpoint ids), sorted by id, so two stores
@@ -501,17 +509,20 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
501
509
  * fingerprint would not match its source. (See the working-copy fidelity note in
502
510
  * T4.)
503
511
  *
504
- * `computeBaseVersion` is async because schema hashing and live-content
505
- * enumeration go through async TypeGraph internals. The design's synchronous
506
- * illustrative signature does not survive contact with the real store surface.
512
+ * `computeBaseVersion` is async because schema hashing, revision reads, and the
513
+ * compatibility live-content enumeration go through async TypeGraph internals.
514
+ * The design's synchronous illustrative signature does not survive contact with
515
+ * the real store surface.
507
516
  */
508
517
 
509
518
  /**
510
519
  * Computes the immutable `base@V` token for a store. Combines the schema hash
511
- * with a live-content fingerprint into a single branded {@link BaseVersion}.
520
+ * with a durable revision anchor when tracking is enabled, otherwise with the
521
+ * compatibility live-content fingerprint.
512
522
  *
513
523
  * MUST be called on the ORIGINAL base store, not a clone (clones regenerate
514
- * timestamps and would fingerprint differently).
524
+ * timestamps and would fingerprint differently when the compatibility path is
525
+ * in use).
515
526
  */
516
527
  declare function computeBaseVersion<G extends GraphDef>(store: Store<G>): Promise<BaseVersion>;
517
528
 
@@ -590,12 +601,12 @@ declare class BaseVersionMismatchError extends MergeError {
590
601
  * Pluggable working-copy strategy: how `branch()` produces an isolated,
591
602
  * independently-mutable copy of a base store.
592
603
  *
593
- * The P0 default is a faithful CLONE via the public interchange API
594
- * ({@link cloneWorkingCopyStrategy}): `exportGraph` the base, then `importGraph`
595
- * into a fresh store on a caller-provided backend. IDs are preserved by
596
- * interchange, so the diff engine (T3) can key on stable ids across base and
597
- * fork. This leverages public entrypoints only, needs zero schema changes, and
598
- * behaves identically across SQLite and Postgres.
604
+ * The P0 default is a faithful CLONE via streamed public interchange
605
+ * ({@link cloneWorkingCopyStrategy}): `exportGraphStream` the base, then
606
+ * `importGraphStream` into a fresh store on a caller-provided backend. IDs are
607
+ * preserved by interchange, so the diff engine (T3) can key on stable ids across
608
+ * base and fork. This leverages public entrypoints only, needs zero schema
609
+ * changes, and behaves identically across SQLite and Postgres.
599
610
  *
600
611
  * INTERCHANGE FIDELITY LIMITATION (verified, design §13.x): the interchange
601
612
  * `meta` schema has no `deletedAt` field, so a base row that is already
@@ -609,6 +620,18 @@ declare class BaseVersionMismatchError extends MergeError {
609
620
  * only) as the immutable reference, never against the clone (clones regenerate
610
621
  * `created_at`/`updated_at`, which would otherwise destabilize `base@V`).
611
622
  *
623
+ * `includeTemporal: true` carries `validFrom`/`validTo` through unchanged,
624
+ * preserving the base's exact valid-time window on the clone: create-time
625
+ * paths default an omitted `validFrom` to the row's own creation instant
626
+ * (see #240), and export/import round-trip a still-open-left `valid_from`
627
+ * (e.g. a row that predates the #240 fix) as an explicit `null` rather than
628
+ * silently dropping it — see `InterchangeNodeSchema.validFrom`'s doc.
629
+ * Without either half of this, the clone's re-import would re-stamp the
630
+ * affected base rows to the CLONE's creation instant instead — narrowing
631
+ * their validity window and making `asOf` reads on the fork diverge from
632
+ * identical reads on the base for any instant between the row's real
633
+ * creation and the clone.
634
+ *
612
635
  * Logical-namespace (copy-on-write within one backend, no full data copy) is a
613
636
  * future strategy slot — see the `WorkingCopyStrategy` interface — deferred past
614
637
  * P0.
@@ -637,29 +660,35 @@ type WorkingCopyStrategy<G extends GraphDef> = Readonly<{
637
660
  * in-process Postgres engine) be constructed lazily at branch time.
638
661
  *
639
662
  * The returned backend MUST be EMPTY (no rows for the base graph): the clone
640
- * seeds it from the base via `importGraph` with `onConflict: "error"`, so a
663
+ * seeds it from the base via `importGraphStream` with `onConflict: "error"`, so a
641
664
  * pre-existing row is surfaced as a {@link BranchError} rather than silently
642
665
  * skipped (which would leave the working copy diverging from the base).
666
+ * When the source store uses `revisionTracking`, the backend must also satisfy
667
+ * that option's transactional revision-clock requirements because the clone
668
+ * preserves the source's branchability contract.
643
669
  */
644
670
  type MakeBackend = () => Promise<GraphBackend>;
645
671
  /**
646
- * The P0 default working-copy strategy: faithful clone via export/import.
672
+ * The P0 default working-copy strategy: faithful clone via streamed interchange.
647
673
  *
648
674
  * On each `create(baseStore)`:
649
- * 1. `exportGraph(baseStore, { includeMeta: true, includeDeleted: false })` —
650
- * `includeMeta: true` carries `created_at`/`updated_at`; `includeDeleted:
651
- * false` keeps the clone to LIVE rows only. Shipping soft-deleted rows is
652
- * unsafe: the meta schema has no `deletedAt`, so they would import as live and
653
- * resurrect on the fork's diff (see the fidelity note above). `branch()` only
654
- * needs the base's live state.
675
+ * 1. `exportGraphStream(baseStore, { includeMeta: true, includeTemporal: true,
676
+ * includeDeleted: false })` — `includeMeta: true` carries
677
+ * `created_at`/`updated_at`; `includeTemporal: true` carries
678
+ * `validFrom`/`validTo` so the clone's valid-time window matches the base's
679
+ * exactly (see the fidelity note above); `includeDeleted: false` keeps the
680
+ * clone to LIVE rows only. Shipping soft-deleted rows is unsafe: the meta
681
+ * schema has no `deletedAt`, so they would import as live and resurrect on
682
+ * the fork's diff (see the fidelity note above). `branch()` only needs the
683
+ * base's live state.
655
684
  * 2. Create a fresh store over the caller-provided backend with the SAME graph
656
685
  * definition via `createStoreWithSchema`.
657
- * 3. `importGraph(freshStore, data, { onConflict: "error", ... })` — ids are
686
+ * 3. `importGraphStream(freshStore, data, { onConflict: "error", ... })` — ids are
658
687
  * preserved so the diff engine can key on them. `onConflict: "error"`
659
688
  * requires the backend to be EMPTY: a pre-existing row is a contract
660
689
  * violation that must surface loudly, never be silently skipped (a skipped
661
690
  * row would leave the clone diverging from the base, so the fork's diff would
662
- * report phantom modifications/deletions). `importGraph` RETURNS
691
+ * report phantom modifications/deletions). `importGraphStream` RETURNS
663
692
  * `{ success, errors }` rather than throwing on a per-row rejection, so its
664
693
  * result is checked and any failure fails the branch.
665
694
  *
@@ -682,7 +711,8 @@ declare function cloneWorkingCopyStrategy<G extends GraphDef>(makeBackend: MakeB
682
711
  * branch's own backend seeded with the base's live state.
683
712
  *
684
713
  * The copy mechanism is pluggable behind {@link WorkingCopyStrategy}. The P0
685
- * default is the faithful export/import clone ({@link cloneWorkingCopyStrategy}),
714
+ * default is the faithful streamed-interchange clone
715
+ * ({@link cloneWorkingCopyStrategy}),
686
716
  * which keeps this primitive backend-agnostic: the caller supplies a
687
717
  * `makeBackend` factory, and `branch()` never names a concrete backend.
688
718
  */
@@ -697,7 +727,7 @@ declare function cloneWorkingCopyStrategy<G extends GraphDef>(makeBackend: MakeB
697
727
  * logical-namespace copy-on-write).
698
728
  *
699
729
  * Returns a {@link Result}: success yields the {@link GraphBranch}; any failure
700
- * (base-version stamping, backend construction, export/import) is wrapped in a
730
+ * (base-version stamping, backend construction, streamed interchange) is wrapped in a
701
731
  * {@link BranchError} with the underlying cause attached. Errors are returned,
702
732
  * never thrown — this is internal-logic surface (the caller converts to a thrown
703
733
  * error at the framework boundary).
@@ -814,7 +844,7 @@ type CandidatePair<K extends NodeType = NodeType> = Readonly<{
814
844
  *
815
845
  * 1. PRECONDITION — compute the target's `base@V` and reject any branch whose
816
846
  * `base` token does not match it (`BaseVersionMismatchError`). A branch
817
- * forked from a divergent schema or content fingerprint cannot be merged
847
+ * forked from a divergent schema or base revision cannot be merged
818
848
  * safely (design §5.2 / §13.6).
819
849
  * 2. STAGE — `stageBranches` (T7): the provenance-tagged UNION of every
820
850
  * branch's state-diff against the immutable base.