@nicia-ai/typegraph 0.45.0 → 0.46.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/dist/backend/drizzle/indexes.cjs +11 -11
  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 +7 -7
  5. package/dist/backend/index.cjs +53 -54
  6. package/dist/backend/index.d.cts +3 -3
  7. package/dist/backend/index.d.ts +3 -3
  8. package/dist/backend/index.js +13 -14
  9. package/dist/backend/postgres/index.cjs +29 -30
  10. package/dist/backend/postgres/index.d.cts +7 -7
  11. package/dist/backend/postgres/index.d.ts +7 -7
  12. package/dist/backend/postgres/index.js +16 -17
  13. package/dist/backend/postgres/pglite-store.cjs +48 -42
  14. package/dist/backend/postgres/pglite-store.cjs.map +1 -1
  15. package/dist/backend/postgres/pglite-store.d.cts +15 -9
  16. package/dist/backend/postgres/pglite-store.d.ts +15 -9
  17. package/dist/backend/postgres/pglite-store.js +44 -38
  18. package/dist/backend/postgres/pglite-store.js.map +1 -1
  19. package/dist/backend/postgres/pglite.cjs +18 -19
  20. package/dist/backend/postgres/pglite.d.cts +4 -4
  21. package/dist/backend/postgres/pglite.d.ts +4 -4
  22. package/dist/backend/postgres/pglite.js +17 -18
  23. package/dist/backend/sqlite/index.cjs +26 -27
  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 +14 -15
  27. package/dist/backend/sqlite/libsql.cjs +21 -22
  28. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  29. package/dist/backend/sqlite/libsql.d.cts +15 -8
  30. package/dist/backend/sqlite/libsql.d.ts +15 -8
  31. package/dist/backend/sqlite/libsql.js +17 -18
  32. package/dist/backend/sqlite/libsql.js.map +1 -1
  33. package/dist/backend/sqlite/local-store.cjs +49 -43
  34. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  35. package/dist/backend/sqlite/local-store.d.cts +15 -10
  36. package/dist/backend/sqlite/local-store.d.ts +15 -10
  37. package/dist/backend/sqlite/local-store.js +45 -39
  38. package/dist/backend/sqlite/local-store.js.map +1 -1
  39. package/dist/backend/sqlite/local.cjs +19 -20
  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 +17 -18
  43. package/dist/{chunk-S3ZRKJHY.js → chunk-2LG2XB2M.js} +3 -3
  44. package/dist/{chunk-S3ZRKJHY.js.map → chunk-2LG2XB2M.js.map} +1 -1
  45. package/dist/{chunk-7PF2L3H6.cjs → chunk-2NA5DYLO.cjs} +4 -4
  46. package/dist/{chunk-7PF2L3H6.cjs.map → chunk-2NA5DYLO.cjs.map} +1 -1
  47. package/dist/chunk-2Z2Z3ZD6.js +58 -0
  48. package/dist/chunk-2Z2Z3ZD6.js.map +1 -0
  49. package/dist/{chunk-VVQM4CZD.cjs → chunk-3DHZCOT7.cjs} +20 -20
  50. package/dist/{chunk-VVQM4CZD.cjs.map → chunk-3DHZCOT7.cjs.map} +1 -1
  51. package/dist/{chunk-JXUTCSXX.cjs → chunk-4UGOKMI5.cjs} +250 -158
  52. package/dist/chunk-4UGOKMI5.cjs.map +1 -0
  53. package/dist/{chunk-RFRM3Q5K.js → chunk-5262ZMTR.js} +14 -5
  54. package/dist/chunk-5262ZMTR.js.map +1 -0
  55. package/dist/{chunk-QRNYDV5Z.js → chunk-5763DULU.js} +214 -69
  56. package/dist/chunk-5763DULU.js.map +1 -0
  57. package/dist/{chunk-BGYJW37L.js → chunk-5UVRGXD3.js} +277 -7
  58. package/dist/chunk-5UVRGXD3.js.map +1 -0
  59. package/dist/{chunk-QR24DJDF.cjs → chunk-62ZP23AW.cjs} +15 -15
  60. package/dist/{chunk-QR24DJDF.cjs.map → chunk-62ZP23AW.cjs.map} +1 -1
  61. package/dist/{chunk-ZI6VQSZA.cjs → chunk-65E3XWGF.cjs} +724 -577
  62. package/dist/chunk-65E3XWGF.cjs.map +1 -0
  63. package/dist/{chunk-S4KQ5LV4.js → chunk-775A4ZMN.js} +40 -6
  64. package/dist/chunk-775A4ZMN.js.map +1 -0
  65. package/dist/{chunk-J2ICGNHO.cjs → chunk-7BQXPCGN.cjs} +830 -169
  66. package/dist/chunk-7BQXPCGN.cjs.map +1 -0
  67. package/dist/{chunk-FJMPR3OH.cjs → chunk-7EO3TCQB.cjs} +33 -7
  68. package/dist/chunk-7EO3TCQB.cjs.map +1 -0
  69. package/dist/{chunk-DXEEHSGN.js → chunk-7VQXLT5O.js} +436 -43
  70. package/dist/chunk-7VQXLT5O.js.map +1 -0
  71. package/dist/chunk-A4OC4DVN.cjs +12 -0
  72. package/dist/{chunk-4SZ6XPTG.cjs.map → chunk-A4OC4DVN.cjs.map} +1 -1
  73. package/dist/{chunk-TDXIBCGY.cjs → chunk-A7J2YDDI.cjs} +5 -3
  74. package/dist/chunk-A7J2YDDI.cjs.map +1 -0
  75. package/dist/{chunk-55ITBQJI.js → chunk-AKLS3BYZ.js} +56 -5
  76. package/dist/chunk-AKLS3BYZ.js.map +1 -0
  77. package/dist/{chunk-D7PG5D5K.js → chunk-AMKPPFUO.js} +32 -6
  78. package/dist/chunk-AMKPPFUO.js.map +1 -0
  79. package/dist/{chunk-WUFASQUO.js → chunk-ASTI57H3.js} +3 -3
  80. package/dist/{chunk-WUFASQUO.js.map → chunk-ASTI57H3.js.map} +1 -1
  81. package/dist/{chunk-4QIKLIGG.js → chunk-BKCUOV7A.js} +15 -5
  82. package/dist/chunk-BKCUOV7A.js.map +1 -0
  83. package/dist/{chunk-JQXSZHF2.cjs → chunk-BSFJMMV3.cjs} +134 -7
  84. package/dist/chunk-BSFJMMV3.cjs.map +1 -0
  85. package/dist/{chunk-4GUTQPVO.js → chunk-C23WSN5E.js} +185 -24
  86. package/dist/chunk-C23WSN5E.js.map +1 -0
  87. package/dist/{chunk-QLUXRWKL.js → chunk-CBTIUB76.js} +3 -3
  88. package/dist/{chunk-QLUXRWKL.js.map → chunk-CBTIUB76.js.map} +1 -1
  89. package/dist/chunk-CMWHLBVN.cjs +2082 -0
  90. package/dist/chunk-CMWHLBVN.cjs.map +1 -0
  91. package/dist/{chunk-QB6VMOJ2.cjs → chunk-CXBHOOIQ.cjs} +45 -10
  92. package/dist/chunk-CXBHOOIQ.cjs.map +1 -0
  93. package/dist/{chunk-FL5UQRES.js → chunk-DCQVHAYQ.js} +5 -5
  94. package/dist/{chunk-FL5UQRES.js.map → chunk-DCQVHAYQ.js.map} +1 -1
  95. package/dist/chunk-DTVWX77L.cjs +3432 -0
  96. package/dist/chunk-DTVWX77L.cjs.map +1 -0
  97. package/dist/chunk-DYATYRY4.js +47 -0
  98. package/dist/chunk-DYATYRY4.js.map +1 -0
  99. package/dist/chunk-E4WNQBEF.cjs +217 -0
  100. package/dist/chunk-E4WNQBEF.cjs.map +1 -0
  101. package/dist/{chunk-G6Q5UM7U.js → chunk-FWJKWH6U.js} +5 -3
  102. package/dist/chunk-FWJKWH6U.js.map +1 -0
  103. package/dist/chunk-GF3KXUTW.js +3393 -0
  104. package/dist/chunk-GF3KXUTW.js.map +1 -0
  105. package/dist/{chunk-VTN3C3CH.js → chunk-HFHTMECK.js} +7 -7
  106. package/dist/{chunk-VTN3C3CH.js.map → chunk-HFHTMECK.js.map} +1 -1
  107. package/dist/{chunk-FLEQ2HBK.js → chunk-I5MOXA4H.js} +20 -14
  108. package/dist/chunk-I5MOXA4H.js.map +1 -0
  109. package/dist/{chunk-4MB3AQAQ.js → chunk-J3WZ3FA2.js} +77 -3
  110. package/dist/chunk-J3WZ3FA2.js.map +1 -0
  111. package/dist/{chunk-UR7W5YQK.js → chunk-JBQQ7THH.js} +5 -3
  112. package/dist/chunk-JBQQ7THH.js.map +1 -0
  113. package/dist/{chunk-TKP5T34P.js → chunk-JXA2ZP2Q.js} +6 -16
  114. package/dist/chunk-JXA2ZP2Q.js.map +1 -0
  115. package/dist/{chunk-GYA4JRP5.js → chunk-JXXDZTMN.js} +2 -2
  116. package/dist/chunk-JXXDZTMN.js.map +1 -0
  117. package/dist/chunk-JZUR7ZWE.js +254 -0
  118. package/dist/chunk-JZUR7ZWE.js.map +1 -0
  119. package/dist/{chunk-42PYUGLS.js → chunk-K5ELX2GT.js} +108 -8
  120. package/dist/chunk-K5ELX2GT.js.map +1 -0
  121. package/dist/{chunk-Q6EDCUXV.js → chunk-L65OU2U3.js} +556 -204
  122. package/dist/chunk-L65OU2U3.js.map +1 -0
  123. package/dist/{chunk-D54WH24V.cjs → chunk-LBJKZXDE.cjs} +115 -13
  124. package/dist/chunk-LBJKZXDE.cjs.map +1 -0
  125. package/dist/{chunk-FQ7ZPOTZ.js → chunk-LGHCOKTT.js} +637 -493
  126. package/dist/chunk-LGHCOKTT.js.map +1 -0
  127. package/dist/chunk-M3WP7RQZ.js +736 -0
  128. package/dist/chunk-M3WP7RQZ.js.map +1 -0
  129. package/dist/{chunk-4MEWSUVM.cjs → chunk-M4BDU5RX.cjs} +12 -12
  130. package/dist/chunk-M4BDU5RX.cjs.map +1 -0
  131. package/dist/chunk-MCLYU6BN.cjs +332 -0
  132. package/dist/chunk-MCLYU6BN.cjs.map +1 -0
  133. package/dist/{chunk-MIJKEVV7.js → chunk-MSY7FSX4.js} +37 -4
  134. package/dist/chunk-MSY7FSX4.js.map +1 -0
  135. package/dist/{chunk-H7VE3FL4.cjs → chunk-MUK4BU7K.cjs} +519 -125
  136. package/dist/chunk-MUK4BU7K.cjs.map +1 -0
  137. package/dist/{chunk-D56XG4EI.cjs → chunk-MXJDTH5B.cjs} +56 -45
  138. package/dist/chunk-MXJDTH5B.cjs.map +1 -0
  139. package/dist/{chunk-5EKPX6QU.js → chunk-MZLPX2R7.js} +8 -9
  140. package/dist/chunk-MZLPX2R7.js.map +1 -0
  141. package/dist/chunk-N66HCGCY.cjs +57 -0
  142. package/dist/chunk-N66HCGCY.cjs.map +1 -0
  143. package/dist/{chunk-CPEL3YIR.cjs → chunk-NFCVHQ5P.cjs} +55 -22
  144. package/dist/chunk-NFCVHQ5P.cjs.map +1 -0
  145. package/dist/{chunk-C4F7VJ5D.cjs → chunk-NI72YOJB.cjs} +84 -2
  146. package/dist/chunk-NI72YOJB.cjs.map +1 -0
  147. package/dist/{chunk-BNS75YNF.cjs → chunk-NK5Q7UNE.cjs} +10 -20
  148. package/dist/chunk-NK5Q7UNE.cjs.map +1 -0
  149. package/dist/{chunk-TKORQCG4.js → chunk-NLI2AVEF.js} +386 -862
  150. package/dist/chunk-NLI2AVEF.js.map +1 -0
  151. package/dist/{chunk-YMTXMPV6.js → chunk-NMWDXFPH.js} +4 -4
  152. package/dist/{chunk-YMTXMPV6.js.map → chunk-NMWDXFPH.js.map} +1 -1
  153. package/dist/{chunk-J7LXTUTP.cjs → chunk-PF6F5NLJ.cjs} +604 -1094
  154. package/dist/chunk-PF6F5NLJ.cjs.map +1 -0
  155. package/dist/{chunk-NAAMUYMS.cjs → chunk-PNN7RHVR.cjs} +58 -48
  156. package/dist/chunk-PNN7RHVR.cjs.map +1 -0
  157. package/dist/{chunk-YOALGKRE.cjs → chunk-PNTCATDE.cjs} +3528 -1763
  158. package/dist/chunk-PNTCATDE.cjs.map +1 -0
  159. package/dist/{chunk-6DCB664D.js → chunk-PQBQG7IM.js} +3 -3
  160. package/dist/{chunk-6DCB664D.js.map → chunk-PQBQG7IM.js.map} +1 -1
  161. package/dist/{chunk-UCQ3BFSY.cjs → chunk-PT7RIRIZ.cjs} +684 -332
  162. package/dist/chunk-PT7RIRIZ.cjs.map +1 -0
  163. package/dist/{chunk-ACSVZPK7.cjs → chunk-PWLJ77UV.cjs} +5 -3
  164. package/dist/chunk-PWLJ77UV.cjs.map +1 -0
  165. package/dist/chunk-Q3G6A4I3.cjs +755 -0
  166. package/dist/chunk-Q3G6A4I3.cjs.map +1 -0
  167. package/dist/{chunk-Z3WO6MND.cjs → chunk-RMQLSPA2.cjs} +297 -27
  168. package/dist/chunk-RMQLSPA2.cjs.map +1 -0
  169. package/dist/{chunk-SJDMVITW.cjs → chunk-RT5ZY4XA.cjs} +6 -5
  170. package/dist/chunk-RT5ZY4XA.cjs.map +1 -0
  171. package/dist/{chunk-ID4WXTKL.js → chunk-S6PW7VV5.js} +2382 -617
  172. package/dist/chunk-S6PW7VV5.js.map +1 -0
  173. package/dist/{chunk-4GUBTVPV.js → chunk-T4XNKYXB.js} +780 -126
  174. package/dist/chunk-T4XNKYXB.js.map +1 -0
  175. package/dist/{chunk-YDWLUT5V.cjs → chunk-TQR4KBY2.cjs} +323 -178
  176. package/dist/chunk-TQR4KBY2.cjs.map +1 -0
  177. package/dist/{chunk-OOA273IJ.cjs → chunk-U5SON7R2.cjs} +27 -27
  178. package/dist/{chunk-OOA273IJ.cjs.map → chunk-U5SON7R2.cjs.map} +1 -1
  179. package/dist/{chunk-IX64T5OL.cjs → chunk-U63GDNRC.cjs} +32 -26
  180. package/dist/chunk-U63GDNRC.cjs.map +1 -0
  181. package/dist/{chunk-WDBXJOU5.cjs → chunk-UDISNXDL.cjs} +56 -47
  182. package/dist/chunk-UDISNXDL.cjs.map +1 -0
  183. package/dist/{chunk-EFEOOCJ3.js → chunk-UV3SN74I.js} +5 -5
  184. package/dist/{chunk-EFEOOCJ3.js.map → chunk-UV3SN74I.js.map} +1 -1
  185. package/dist/{chunk-U5W4LKZV.cjs → chunk-VCRRKBLN.cjs} +9 -9
  186. package/dist/{chunk-U5W4LKZV.cjs.map → chunk-VCRRKBLN.cjs.map} +1 -1
  187. package/dist/{chunk-ISLPNELU.js → chunk-VGTJPTIC.js} +16 -5
  188. package/dist/chunk-VGTJPTIC.js.map +1 -0
  189. package/dist/chunk-VLT6PEWR.cjs +60 -0
  190. package/dist/chunk-VLT6PEWR.cjs.map +1 -0
  191. package/dist/chunk-VQH4VAWD.cjs +12 -0
  192. package/dist/{chunk-B3F2D3SP.cjs.map → chunk-VQH4VAWD.cjs.map} +1 -1
  193. package/dist/{chunk-SNXVDZAJ.js → chunk-W6OG3HDG.js} +5 -4
  194. package/dist/chunk-W6OG3HDG.js.map +1 -0
  195. package/dist/chunk-WDGA7IYB.js +207 -0
  196. package/dist/chunk-WDGA7IYB.js.map +1 -0
  197. package/dist/chunk-WQZLUGVR.js +2057 -0
  198. package/dist/chunk-WQZLUGVR.js.map +1 -0
  199. package/dist/{chunk-EKFUG4G7.cjs → chunk-XBYVV3MP.cjs} +60 -5
  200. package/dist/chunk-XBYVV3MP.cjs.map +1 -0
  201. package/dist/{chunk-5GAONX5G.cjs → chunk-XCAGZAKP.cjs} +7 -7
  202. package/dist/{chunk-5GAONX5G.cjs.map → chunk-XCAGZAKP.cjs.map} +1 -1
  203. package/dist/chunk-XL7SLCXS.js +309 -0
  204. package/dist/chunk-XL7SLCXS.js.map +1 -0
  205. package/dist/{chunk-SVJ5GEXW.cjs → chunk-XUO3KQFO.cjs} +2 -2
  206. package/dist/chunk-XUO3KQFO.cjs.map +1 -0
  207. package/dist/{chunk-F4NHQHEZ.cjs → chunk-YAAM3M2S.cjs} +10 -10
  208. package/dist/{chunk-F4NHQHEZ.cjs.map → chunk-YAAM3M2S.cjs.map} +1 -1
  209. package/dist/{chunk-RUQS6M7G.js → chunk-YBFHZUXX.js} +6 -6
  210. package/dist/chunk-YBFHZUXX.js.map +1 -0
  211. package/dist/{chunk-KMXWZLQX.cjs → chunk-YBQOHKHN.cjs} +99 -100
  212. package/dist/chunk-YBQOHKHN.cjs.map +1 -0
  213. package/dist/{chunk-PVUI6KGR.js → chunk-YDFDBE6D.js} +93 -6
  214. package/dist/chunk-YDFDBE6D.js.map +1 -0
  215. package/dist/{chunk-P7GTYOLB.cjs → chunk-YVWGEQJE.cjs} +297 -135
  216. package/dist/chunk-YVWGEQJE.cjs.map +1 -0
  217. package/dist/{chunk-QT6V3YRH.js → chunk-YWGVVALJ.js} +3 -3
  218. package/dist/{chunk-QT6V3YRH.js.map → chunk-YWGVVALJ.js.map} +1 -1
  219. package/dist/core/index.cjs +40 -40
  220. package/dist/core/index.d.cts +4 -5
  221. package/dist/core/index.d.ts +4 -5
  222. package/dist/core/index.js +8 -8
  223. package/dist/{ddl-BG4J805L.d.cts → ddl-BJcOp4WZ.d.cts} +3 -3
  224. package/dist/{ddl-CgiS9QLj.d.ts → ddl-BXfGHbPN.d.ts} +3 -3
  225. package/dist/graph-extension/index.cjs +26 -22
  226. package/dist/graph-extension/index.d.cts +16 -6
  227. package/dist/graph-extension/index.d.ts +16 -6
  228. package/dist/graph-extension/index.js +7 -7
  229. package/dist/graph-merge/index.cjs +2459 -654
  230. package/dist/graph-merge/index.cjs.map +1 -1
  231. package/dist/graph-merge/index.d.cts +170 -33
  232. package/dist/graph-merge/index.d.ts +170 -33
  233. package/dist/graph-merge/index.js +2269 -467
  234. package/dist/graph-merge/index.js.map +1 -1
  235. package/dist/{index-C3y_98iN.d.cts → index-BSHvKfok.d.ts} +221 -10
  236. package/dist/{index-BBxZCUdu.d.ts → index-DxaYCv8Y.d.cts} +221 -10
  237. package/dist/index.cjs +330 -268
  238. package/dist/index.cjs.map +1 -1
  239. package/dist/index.d.cts +590 -576
  240. package/dist/index.d.ts +590 -576
  241. package/dist/index.js +73 -49
  242. package/dist/index.js.map +1 -1
  243. package/dist/indexes/index.cjs +17 -17
  244. package/dist/indexes/index.d.cts +4 -4
  245. package/dist/indexes/index.d.ts +4 -4
  246. package/dist/indexes/index.js +10 -10
  247. package/dist/interchange/index.cjs +165 -51
  248. package/dist/interchange/index.cjs.map +1 -1
  249. package/dist/interchange/index.d.cts +261 -16
  250. package/dist/interchange/index.d.ts +261 -16
  251. package/dist/interchange/index.js +128 -25
  252. package/dist/interchange/index.js.map +1 -1
  253. package/dist/{manager-YoLEfcc1.d.ts → manager-CfZAimti.d.ts} +36 -5
  254. package/dist/{manager-KS7CGQQT.d.cts → manager-HGk6E_HW.d.cts} +36 -5
  255. package/dist/{materialize-indexes-Bhhyb1B3.d.ts → materialize-indexes-6A7dWGtb.d.cts} +10 -2
  256. package/dist/{materialize-indexes-OHRWypW6.d.cts → materialize-indexes-BMJP6Tms.d.ts} +10 -2
  257. package/dist/{postgres-DpkW3R5Y.d.cts → postgres-DFYWENdR.d.cts} +1961 -439
  258. package/dist/{postgres-DwqyIniy.d.ts → postgres-e7a9TdvR.d.ts} +1961 -439
  259. package/dist/profiler/index.cjs +15 -15
  260. package/dist/profiler/index.d.cts +9 -10
  261. package/dist/profiler/index.d.ts +9 -10
  262. package/dist/profiler/index.js +4 -4
  263. package/dist/provenance/index.cjs +46 -48
  264. package/dist/provenance/index.cjs.map +1 -1
  265. package/dist/provenance/index.d.cts +7 -7
  266. package/dist/provenance/index.d.ts +7 -7
  267. package/dist/provenance/index.js +12 -14
  268. package/dist/provenance/index.js.map +1 -1
  269. package/dist/schema/index.cjs +50 -48
  270. package/dist/schema/index.d.cts +9 -16
  271. package/dist/schema/index.d.ts +9 -16
  272. package/dist/schema/index.js +23 -21
  273. package/dist/{searchable-DLWEfC4a.d.ts → searchable-9OQoPuRs.d.ts} +1 -2
  274. package/dist/{searchable-CIZL8Hyw.d.cts → searchable-CIje5XYD.d.cts} +1 -2
  275. package/dist/{sqlite-DY0WODUK.d.cts → sqlite-DerU5tc7.d.ts} +2029 -347
  276. package/dist/{sqlite-L-VIRzqA.d.ts → sqlite-DitnISa9.d.cts} +2029 -347
  277. package/dist/{store-view-A85FFRnk.d.cts → store-B0h6x7wo.d.cts} +1289 -767
  278. package/dist/{store-view-66p92IPi.d.ts → store-ClQ-MZQS.d.ts} +1289 -767
  279. package/dist/{temporal-BNbjXqer.d.cts → temporal-Bn-Fi8FJ.d.cts} +1 -1
  280. package/dist/{temporal-Bob6Nfbp.d.ts → temporal-BtM4UALv.d.ts} +1 -1
  281. package/dist/{types-DeORZhxn.d.cts → types-CoIx8HX5.d.cts} +1 -1
  282. package/dist/{types-Ch9a0Dx6.d.ts → types-HkveCCx0.d.cts} +726 -5
  283. package/dist/{types-Ch9a0Dx6.d.cts → types-HkveCCx0.d.ts} +726 -5
  284. package/dist/{types-ClCzT-dT.d.ts → types-KFfk-8Ah.d.ts} +1 -1
  285. package/dist/{where-DPw52ksb.d.cts → where--fk7_0kv.d.cts} +1 -1
  286. package/dist/{where-kWUZPvEA.d.ts → where-ws5hf-Ov.d.ts} +1 -1
  287. package/package.json +3 -3
  288. package/dist/chunk-2L54C2C2.js +0 -144
  289. package/dist/chunk-2L54C2C2.js.map +0 -1
  290. package/dist/chunk-35S6P5ZU.js +0 -27
  291. package/dist/chunk-35S6P5ZU.js.map +0 -1
  292. package/dist/chunk-42PYUGLS.js.map +0 -1
  293. package/dist/chunk-4GUBTVPV.js.map +0 -1
  294. package/dist/chunk-4GUTQPVO.js.map +0 -1
  295. package/dist/chunk-4MB3AQAQ.js.map +0 -1
  296. package/dist/chunk-4MEWSUVM.cjs.map +0 -1
  297. package/dist/chunk-4QIKLIGG.js.map +0 -1
  298. package/dist/chunk-4SZ6XPTG.cjs +0 -12
  299. package/dist/chunk-55ITBQJI.js.map +0 -1
  300. package/dist/chunk-5EKPX6QU.js.map +0 -1
  301. package/dist/chunk-6RYPD3NJ.cjs +0 -1282
  302. package/dist/chunk-6RYPD3NJ.cjs.map +0 -1
  303. package/dist/chunk-764JHTLT.cjs +0 -15
  304. package/dist/chunk-764JHTLT.cjs.map +0 -1
  305. package/dist/chunk-ACSVZPK7.cjs.map +0 -1
  306. package/dist/chunk-B3F2D3SP.cjs +0 -12
  307. package/dist/chunk-BGYJW37L.js.map +0 -1
  308. package/dist/chunk-BNS75YNF.cjs.map +0 -1
  309. package/dist/chunk-C4F7VJ5D.cjs.map +0 -1
  310. package/dist/chunk-CBKG6HEP.js +0 -1263
  311. package/dist/chunk-CBKG6HEP.js.map +0 -1
  312. package/dist/chunk-CPEL3YIR.cjs.map +0 -1
  313. package/dist/chunk-D54WH24V.cjs.map +0 -1
  314. package/dist/chunk-D56XG4EI.cjs.map +0 -1
  315. package/dist/chunk-D7PG5D5K.js.map +0 -1
  316. package/dist/chunk-DI74SMXS.cjs +0 -29
  317. package/dist/chunk-DI74SMXS.cjs.map +0 -1
  318. package/dist/chunk-DK2S42XB.js +0 -77
  319. package/dist/chunk-DK2S42XB.js.map +0 -1
  320. package/dist/chunk-DRACN6XG.js +0 -27
  321. package/dist/chunk-DRACN6XG.js.map +0 -1
  322. package/dist/chunk-DXEEHSGN.js.map +0 -1
  323. package/dist/chunk-EKFUG4G7.cjs.map +0 -1
  324. package/dist/chunk-EQ7JKLZO.cjs +0 -157
  325. package/dist/chunk-EQ7JKLZO.cjs.map +0 -1
  326. package/dist/chunk-FJMPR3OH.cjs.map +0 -1
  327. package/dist/chunk-FLEQ2HBK.js.map +0 -1
  328. package/dist/chunk-FQ7ZPOTZ.js.map +0 -1
  329. package/dist/chunk-G6Q5UM7U.js.map +0 -1
  330. package/dist/chunk-GYA4JRP5.js.map +0 -1
  331. package/dist/chunk-H7VE3FL4.cjs.map +0 -1
  332. package/dist/chunk-ID4WXTKL.js.map +0 -1
  333. package/dist/chunk-ISLPNELU.js.map +0 -1
  334. package/dist/chunk-ITE4IXAK.js +0 -25
  335. package/dist/chunk-ITE4IXAK.js.map +0 -1
  336. package/dist/chunk-IX64T5OL.cjs.map +0 -1
  337. package/dist/chunk-J2ICGNHO.cjs.map +0 -1
  338. package/dist/chunk-J7LXTUTP.cjs.map +0 -1
  339. package/dist/chunk-JQXSZHF2.cjs.map +0 -1
  340. package/dist/chunk-JXUTCSXX.cjs.map +0 -1
  341. package/dist/chunk-KCO5EFJU.js +0 -79
  342. package/dist/chunk-KCO5EFJU.js.map +0 -1
  343. package/dist/chunk-KKYELPZ2.cjs +0 -83
  344. package/dist/chunk-KKYELPZ2.cjs.map +0 -1
  345. package/dist/chunk-KMXWZLQX.cjs.map +0 -1
  346. package/dist/chunk-MIJKEVV7.js.map +0 -1
  347. package/dist/chunk-NAAMUYMS.cjs.map +0 -1
  348. package/dist/chunk-P7GTYOLB.cjs.map +0 -1
  349. package/dist/chunk-PVUI6KGR.js.map +0 -1
  350. package/dist/chunk-Q6EDCUXV.js.map +0 -1
  351. package/dist/chunk-QB6VMOJ2.cjs.map +0 -1
  352. package/dist/chunk-QC4MCOFV.cjs +0 -83
  353. package/dist/chunk-QC4MCOFV.cjs.map +0 -1
  354. package/dist/chunk-QMQLUA66.js +0 -12
  355. package/dist/chunk-QMQLUA66.js.map +0 -1
  356. package/dist/chunk-QRNYDV5Z.js.map +0 -1
  357. package/dist/chunk-RFRM3Q5K.js.map +0 -1
  358. package/dist/chunk-RUQS6M7G.js.map +0 -1
  359. package/dist/chunk-S4KQ5LV4.js.map +0 -1
  360. package/dist/chunk-SJDMVITW.cjs.map +0 -1
  361. package/dist/chunk-SNXVDZAJ.js.map +0 -1
  362. package/dist/chunk-SVJ5GEXW.cjs.map +0 -1
  363. package/dist/chunk-TDXIBCGY.cjs.map +0 -1
  364. package/dist/chunk-TKORQCG4.js.map +0 -1
  365. package/dist/chunk-TKP5T34P.js.map +0 -1
  366. package/dist/chunk-TRF4EBJT.cjs +0 -30
  367. package/dist/chunk-TRF4EBJT.cjs.map +0 -1
  368. package/dist/chunk-UCQ3BFSY.cjs.map +0 -1
  369. package/dist/chunk-UR7W5YQK.js.map +0 -1
  370. package/dist/chunk-V34A6R5V.js +0 -134
  371. package/dist/chunk-V34A6R5V.js.map +0 -1
  372. package/dist/chunk-WDAVPX46.js +0 -81
  373. package/dist/chunk-WDAVPX46.js.map +0 -1
  374. package/dist/chunk-WDBXJOU5.cjs.map +0 -1
  375. package/dist/chunk-YDWLUT5V.cjs.map +0 -1
  376. package/dist/chunk-YOALGKRE.cjs.map +0 -1
  377. package/dist/chunk-Z3WO6MND.cjs.map +0 -1
  378. package/dist/chunk-ZDH3DX3C.cjs +0 -30
  379. package/dist/chunk-ZDH3DX3C.cjs.map +0 -1
  380. package/dist/chunk-ZI6VQSZA.cjs.map +0 -1
  381. package/dist/chunk-ZTAJL4DT.cjs +0 -85
  382. package/dist/chunk-ZTAJL4DT.cjs.map +0 -1
  383. package/dist/define-graph-BGrJahvp.d.ts +0 -173
  384. package/dist/define-graph-alREY2wj.d.cts +0 -173
@@ -1,15 +1,14 @@
1
- import { b0 as NodeId, d as NodeType, ar as EdgeId, aT as JsonValue, z as GraphBackend, aU as KindAnnotations, aY as MetaEdge, a2 as EdgeType, D as DeleteBehavior, T as TemporalMode, I as IndexDeclaration, aI as GraphExtensionVersion, c7 as ExtensionNodeDef, c8 as ExtensionEdgeDef, c9 as ExtensionOntologyRelation, ca as ExtensionIndex } from '../types-Ch9a0Dx6.js';
2
- export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../types-Ch9a0Dx6.js';
3
- import { G as GraphDef, N as NodeKinds, c as GetNodeType } from '../define-graph-BGrJahvp.js';
4
- import { a as Store, az as Node, bZ as UniqueIntrospection } from '../store-view-66p92IPi.js';
5
- import { a1 as TypeGraphError } from '../index-BBxZCUdu.js';
1
+ import { _ as NodeId, u as NodeType, $ as EdgeId, a0 as JsonValue, d as GraphDef, a1 as NodeKinds, a2 as GetNodeType, y as GraphBackend, a3 as KindAnnotations, a4 as MetaEdge, a5 as EdgeType, a6 as DeleteBehavior, T as TemporalMode, I as IndexDeclaration, a7 as GraphExtensionVersion, a8 as ExtensionNodeDef, a9 as ExtensionEdgeDef, aa as ExtensionOntologyRelation, ab as ExtensionIndex } from '../types-HkveCCx0.js';
2
+ export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../types-HkveCCx0.js';
3
+ import { a as Store, N as Node, m as UniqueIntrospection } from '../store-ClQ-MZQS.js';
4
+ import { T as TypeGraphError, b as TypeGraphErrorOptions } from '../index-BSHvKfok.js';
6
5
  import { R as Result } from '../result-DWo6mUVz.js';
7
6
  export { i as isErr, a as isOk, u as unwrap } from '../result-DWo6mUVz.js';
8
7
  import { z } from 'zod';
9
- import '../temporal-Bob6Nfbp.js';
10
- import '../manager-YoLEfcc1.js';
11
- import '../materialize-indexes-Bhhyb1B3.js';
12
- import '../searchable-DLWEfC4a.js';
8
+ import '../temporal-BtM4UALv.js';
9
+ import '../searchable-9OQoPuRs.js';
10
+ import '../manager-CfZAimti.js';
11
+ import '../materialize-indexes-BMJP6Tms.js';
13
12
 
14
13
  /**
15
14
  * Core type model for the graph-merge primitive.
@@ -60,6 +59,21 @@ type GraphBranch<G extends GraphDef> = Readonly<{
60
59
  id: BranchId;
61
60
  base: BaseVersion;
62
61
  store: Store<G>;
62
+ /**
63
+ * The branch store's committed schema row `(version, hash)` captured AT
64
+ * FORK. The merge requires the branch's CURRENT committed schema to still
65
+ * equal this anchor: any schema operation on the branch after forking —
66
+ * including a round-trip that restores the original document hash —
67
+ * advances the version and is refused, so its row side effects can never
68
+ * be projected into a merge as bare data changes. `undefined` inside the
69
+ * tuple-less field means the clone committed no schema row (unmanaged
70
+ * stores); absent entirely on hand-built branch objects, where the merge
71
+ * falls back to comparing the branch's hash against the fork source's.
72
+ */
73
+ schemaAnchor?: Readonly<{
74
+ version: number;
75
+ hash: string;
76
+ }> | undefined;
63
77
  }>;
64
78
  /**
65
79
  * Options for {@link GraphBranch} creation. `id` is optional — when omitted a
@@ -301,9 +315,9 @@ type MergeOptions<G extends GraphDef = GraphDef> = Readonly<{
301
315
  * the value contributed by the highest-weight branch wins. Ties fall back to
302
316
  * {@link branchOrder} (then canonical value order); branches absent from the map
303
317
  * default to weight `0`. Ignored by every other policy. Keyed by
304
- * {@link BranchId}, like {@link branchOrder}. Without this map,
305
- * `"provenanceWeighted"` has no weights to consult and degrades to
306
- * `"lastWriteWins"` semantics.
318
+ * {@link BranchId}, like {@link branchOrder}. A non-empty map is required when
319
+ * either property-conflict policy is `"provenanceWeighted"`; otherwise option
320
+ * validation refuses the merge rather than silently changing policy.
307
321
  */
308
322
  provenanceWeights?: ReadonlyMap<BranchId, number>;
309
323
  }>;
@@ -311,14 +325,14 @@ type MergeOptions<G extends GraphDef = GraphDef> = Readonly<{
311
325
  * Object-form arguments for {@link mergeIncremental} (§6.6). The two same-typed
312
326
  * stores are NAMED so `forkPoint` (the frozen ancestor the branches forked from, the
313
327
  * diff reference) and `target` (the live committed graph that base lookups and the
314
- * commit land on) cannot be swapped. `options.target` is ignored — `target` is the
315
- * explicit arg.
328
+ * commit land on) cannot be swapped. The target is deliberately absent from the
329
+ * options type because the named `target` argument is authoritative.
316
330
  */
317
331
  type MergeIncrementalArgs<G extends GraphDef = GraphDef> = Readonly<{
318
332
  forkPoint: Store<G>;
319
333
  target: Store<G>;
320
334
  branches: readonly GraphBranch<G>[];
321
- options?: MergeOptions<G>;
335
+ options?: Omit<MergeOptions<G>, "target">;
322
336
  }>;
323
337
  /**
324
338
  * Records that a set of fork node ids resolved to a single canonical survivor.
@@ -373,13 +387,64 @@ type TypeReconciliation = Readonly<{
373
387
  }>;
374
388
  /**
375
389
  * An item omitted from the merged result (e.g. an edge whose endpoint was
376
- * deleted, or an incompatible-typed cluster member).
390
+ * deleted, an incompatible-typed cluster member, or an identity assertion that
391
+ * lost the survivor rule to an equivalent assertion from another branch).
392
+ *
393
+ * Discriminated on `kind` so each variant keeps its own id type: node and edge
394
+ * ids are branded, while an identity assertion is named by the ledger's plain
395
+ * assertion id (it is not a graph entity and carries no brand).
377
396
  */
378
397
  type DroppedItem = Readonly<{
379
- kind: "edge" | "node";
380
- id: NodeId<NodeType> | EdgeId;
398
+ kind: "node";
399
+ id: NodeId<NodeType>;
400
+ reason: string;
401
+ }> | Readonly<{
402
+ kind: "edge";
403
+ id: EdgeId;
404
+ reason: string;
405
+ }> | Readonly<{
406
+ kind: "identity";
407
+ id: string;
381
408
  reason: string;
382
409
  }>;
410
+ /**
411
+ * The {@link ValidityEndResolution.precedence} of an entry the INCREMENTAL TARGET
412
+ * decided rather than the merge: the destination had already moved this row's end
413
+ * before the merge ran, so every branch claim was discarded and no write was staged.
414
+ */
415
+ declare const VALIDITY_END_TARGET_PRECEDENCE: "target";
416
+ /**
417
+ * One inherited row whose end-of-validity the merge RESOLVED: the instant that
418
+ * stands and every branch that claimed an end for the row (including the ones whose
419
+ * claim lost the least-claim tie-break).
420
+ *
421
+ * `id` is bare because `entity` + `kind` already disambiguate it — a node and an
422
+ * edge, or two kinds, that share an id string are distinct entries.
423
+ */
424
+ type ValidityEndResolution = Readonly<{
425
+ entity: "node" | "edge";
426
+ kind: string;
427
+ id: string;
428
+ /**
429
+ * The row's end-of-validity as a canonical UTC ISO 8601 string: the instant the
430
+ * commit WROTE, or — under {@link VALIDITY_END_TARGET_PRECEDENCE} — the instant
431
+ * the target already held and the merge left alone.
432
+ */
433
+ validTo: string;
434
+ /** Every branch that claimed an end, sorted; length > 1 means arbitration. */
435
+ claimedBy: readonly BranchId[];
436
+ /**
437
+ * Present only as {@link VALIDITY_END_TARGET_PRECEDENCE}, marking an entry the
438
+ * merge did NOT decide: the incremental target had already moved this end, so
439
+ * `validTo` is the target's own committed instant, every claim in `claimedBy` was
440
+ * discarded, and nothing was written or credited for the row.
441
+ *
442
+ * ABSENT means the merge decided the end — `validTo` is the instant it wrote and
443
+ * `claimedBy` names the claims it arbitrated between. A consumer that ignores the
444
+ * field therefore keeps reading the entries it always read.
445
+ */
446
+ precedence?: typeof VALIDITY_END_TARGET_PRECEDENCE;
447
+ }>;
383
448
  /**
384
449
  * A `(kind, id)` node identity as surfaced in the merge report. Node identity is the
385
450
  * PAIR, never the bare id (a `Doctor` and a `SpecialistDoctor` can share an id string),
@@ -437,20 +502,49 @@ type ProvenanceRecord = Readonly<{
437
502
  branchId: BranchId;
438
503
  sourceId: string;
439
504
  }>;
505
+ /**
506
+ * What the merge actually wrote to the target: node and edge counts plus the
507
+ * identity-ledger effects. `identity.asserted` counts rows the applier
508
+ * CREATED — planned assertions the target already held (idempotent exact or
509
+ * semantic-pair matches, the normal incremental case) are excluded — and
510
+ * `identity.retracted` counts rows the applier ENDED, excluding already-ended
511
+ * or unknown ids. Assertions dropped by the survivor rule are enumerated in
512
+ * {@link MergeReport.dropped} rather than counted here.
513
+ */
514
+ type MergedCounts = Readonly<{
515
+ nodes: number;
516
+ edges: number;
517
+ identity: Readonly<{
518
+ asserted: number;
519
+ retracted: number;
520
+ }>;
521
+ }>;
440
522
  /**
441
523
  * The full result of a {@link merge}: counts, every resolution/conflict/
442
524
  * reconciliation/drop, and the report-only provenance index.
443
525
  */
444
526
  type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
445
- merged: Readonly<{
446
- nodes: number;
447
- edges: number;
448
- }>;
527
+ merged: MergedCounts;
449
528
  resolutions: readonly EntityResolution[];
450
529
  conflicts: readonly PropertyConflict<G>[];
451
530
  deleteModifyConflicts: readonly DeleteModifyConflict[];
452
531
  typeReconciliations: readonly TypeReconciliation[];
453
532
  dropped: readonly DroppedItem[];
533
+ /**
534
+ * Every inherited row whose END-OF-VALIDITY the merge resolved, with the instant
535
+ * that stands and the branches that claimed an end.
536
+ *
537
+ * Reported because the resolution is silent by design: two branches ending the
538
+ * same row at different instants are not in conflict (an ending is a monotone
539
+ * claim, like a deletion), so the earliest end is taken without a
540
+ * `PropertyConflict`. This list is how a caller sees that arbitration happened.
541
+ * It includes the rows where the arbitration discarded EVERY claim because the
542
+ * incremental target had already moved the end — those carry
543
+ * `precedence: "target"` and staged no write. Window deltas the commit CANNOT
544
+ * apply appear in {@link MergeReport.dropped} instead, with reason
545
+ * `"window-not-applicable"`.
546
+ */
547
+ validityEnds: readonly ValidityEndResolution[];
454
548
  /**
455
549
  * Ambiguous new-vs-base matches (§6.4-A): components that bridged ≥2 committed
456
550
  * base entities. Empty on the staged-vs-staged snapshot path.
@@ -540,9 +634,11 @@ declare function computeBaseVersion<G extends GraphDef>(store: Store<G>): Promis
540
634
  */
541
635
  declare const MERGE_ERROR_CODES: {
542
636
  readonly merge: "GRAPH_MERGE_ERROR";
637
+ readonly invalidOptions: "GRAPH_MERGE_INVALID_OPTIONS";
543
638
  readonly branch: "GRAPH_MERGE_BRANCH_ERROR";
544
639
  readonly similarityUnavailable: "GRAPH_MERGE_SIMILARITY_UNAVAILABLE";
545
640
  readonly conflict: "GRAPH_MERGE_CONFLICT";
641
+ readonly identityConflict: "GRAPH_MERGE_IDENTITY_CONFLICT";
546
642
  readonly baseVersionMismatch: "GRAPH_MERGE_BASE_VERSION_MISMATCH";
547
643
  };
548
644
  /**
@@ -560,6 +656,13 @@ type MergeErrorOptions = Readonly<{
560
656
  * for the orchestrator (comparison-ceiling overruns, commit failures, etc.).
561
657
  */
562
658
  declare class MergeError extends TypeGraphError {
659
+ protected static readonly errorCategory: TypeGraphErrorOptions["category"];
660
+ constructor(message: string, options?: MergeErrorOptions);
661
+ }
662
+ /** Raised when caller-supplied merge options are invalid or unsupported. */
663
+ declare class InvalidMergeOptionsError extends MergeError {
664
+ protected static readonly errorCategory = "user";
665
+ readonly code: "GRAPH_MERGE_INVALID_OPTIONS";
563
666
  constructor(message: string, options?: MergeErrorOptions);
564
667
  }
565
668
  /**
@@ -587,6 +690,11 @@ declare class MergeConflictError extends MergeError {
587
690
  readonly code: "GRAPH_MERGE_CONFLICT";
588
691
  constructor(message: string, options?: MergeErrorOptions);
589
692
  }
693
+ /** Raised when identity branches contain opposing or retract/reassert truth. */
694
+ declare class IdentityMergeConflictError extends MergeError {
695
+ readonly code: "GRAPH_MERGE_IDENTITY_CONFLICT";
696
+ constructor(message: string, options?: MergeErrorOptions);
697
+ }
590
698
  /**
591
699
  * Raised by the `merge()` precondition check when a branch's `base@V` token
592
700
  * does not match the merge target's current base version (the branch forked
@@ -870,12 +978,21 @@ declare function merge<G extends GraphDef>(store: Store<G>, branches: readonly G
870
978
  * through the same three-way merge planner.
871
979
  *
872
980
  * Object-form args so the two same-typed stores (`forkPoint`, `target`) cannot be
873
- * swapped. `options.target` is ignored — `target` is the explicit arg.
981
+ * swapped. The named `target` is authoritative; an untyped caller that also
982
+ * supplies `options.target` is refused rather than silently ignored.
874
983
  *
875
984
  * Preconditions (typed errors): every branch forked from `forkPoint`
876
985
  * (`branch.base === computeBaseVersion(forkPoint)`); `forkPoint` and `target` share a
877
986
  * schema hash (schema drift is fatal; target CONTENT may have advanced); and
878
987
  * `onBasePropertyConflict` is `"flag"` (keep-base for committed-row conflicts).
988
+ *
989
+ * The fork-point precondition is not merely an entry check: it is re-verified
990
+ * inside the commit transaction, so `forkPoint` must stay immutable for the
991
+ * duration of the call. A write to it while the merge is in flight makes every
992
+ * branch diff describe an ancestor that no longer exists, and is refused with
993
+ * `BaseVersionMismatchError` rather than committed (see
994
+ * {@link assertForkPointUnchanged}). The TARGET, by contrast, may advance
995
+ * throughout — that is what "incremental" means.
879
996
  */
880
997
  declare function mergeIncremental<G extends GraphDef>(args: MergeIncrementalArgs<G>): Promise<Result<MergeReport<G>, MergeError>>;
881
998
 
@@ -964,7 +1081,7 @@ declare const Provenance: Readonly<{
964
1081
  * shared backend, while a single `Provenance` schema serves all of them.
965
1082
  */
966
1083
  declare function provenanceGraphId(targetGraphId: string): string;
967
- /** Builds the sidecar provenance graph definition for a target graph. */
1084
+ /** The schema written by releases before durable sidecar ownership markers. */
968
1085
  declare function buildProvenanceGraph(targetGraphId: string): Readonly<{
969
1086
  id: string;
970
1087
  nodes: {
@@ -994,6 +1111,7 @@ declare function buildProvenanceGraph(targetGraphId: string): Readonly<{
994
1111
  from: NodeType | EdgeType | string;
995
1112
  to: NodeType | EdgeType | string;
996
1113
  }>[];
1114
+ identity: undefined;
997
1115
  defaults: Readonly<{
998
1116
  onNodeDelete: DeleteBehavior;
999
1117
  temporalMode: TemporalMode;
@@ -1009,27 +1127,46 @@ declare function buildProvenanceGraph(targetGraphId: string): Readonly<{
1009
1127
  deprecatedKinds: ReadonlySet<string>;
1010
1128
  __graphDef: true;
1011
1129
  }>;
1012
- /** The concrete sidecar provenance graph type. */
1130
+ /**
1131
+ * Public view of the sidecar graph. The ownership kind is deliberately hidden:
1132
+ * it is framework metadata, not provenance data or an application collection.
1133
+ */
1013
1134
  type ProvenanceGraph = ReturnType<typeof buildProvenanceGraph>;
1014
1135
  /** A persisted provenance node (the queryable record). */
1015
1136
  type ProvenanceNode = Node<typeof Provenance>;
1016
1137
  /**
1017
- * Opens — materializing the schema if needed — the provenance store for a target.
1018
- * Pass the target Store in ordinary application code; inspection tools that do
1019
- * not have its GraphDef may instead pass the backend and target graph id.
1138
+ * Opens the provenance store for a target — OPENING OR CREATING, never merely
1139
+ * reading. On a free graph id this claims the ownership marker and registers the
1140
+ * sidecar schema; on an occupied one it throws. There is no read-only entry
1141
+ * point: a tool that wants to inspect an existing sidecar without creating one
1142
+ * must decide for itself (e.g. by checking `backend.getActiveSchema` for
1143
+ * {@link provenanceGraphId}) before calling this.
1144
+ *
1145
+ * Pass the target Store in ordinary application code; callers that do not have
1146
+ * its GraphDef may instead pass the backend and target graph id.
1020
1147
  *
1021
- * Idempotent: safe to call before every persist/query, and shares the backend
1022
- * with the target (so the caller must NOT close it separately — closing the
1023
- * shared backend is the target owner's job).
1148
+ * Idempotent in the sense that matters for the persist/query path: repeated calls
1149
+ * converge on one sidecar and write no second marker. It shares the backend with
1150
+ * the target, so the caller must NOT close it separately — closing the shared
1151
+ * backend is the target owner's job.
1024
1152
  */
1025
1153
  declare function openProvenanceStore<G extends GraphDef>(target: Store<G>): Promise<Store<ProvenanceGraph>>;
1026
- /** Opens a provenance store for standalone inspection without a target GraphDef. */
1154
+ /**
1155
+ * Opens (or creates — see above) a provenance store without a target GraphDef,
1156
+ * for callers that hold only the backend and the target's graph id.
1157
+ */
1027
1158
  declare function openProvenanceStore(backend: GraphBackend, targetGraphId: string): Promise<Store<ProvenanceGraph>>;
1028
1159
  /**
1029
1160
  * Upserts one `Provenance` node per record into the sidecar store, keyed by the
1030
1161
  * deterministic id (re-running the same merge is a no-op upsert, never a
1031
1162
  * duplicate). Returns the row count written. The caller wraps this for best-effort
1032
1163
  * behavior — a failure here must not fail an already-committed merge.
1164
+ *
1165
+ * Records that hash to the SAME id are collapsed before the batch: the id is the
1166
+ * contribution's identity, so they are one row by definition — and a single
1167
+ * `bulkUpsertById` batch cannot create the same id twice. Collapsing here is what
1168
+ * makes the returned number the rows actually written for ANY caller, whatever
1169
+ * shape its record list arrived in.
1033
1170
  */
1034
1171
  declare function persistProvenanceRecords(store: Store<ProvenanceGraph>, targetGraphId: string, records: readonly ProvenanceRecord[]): Promise<number>;
1035
1172
  /** Filter for {@link readProvenance}. Each field, when set, narrows the result. */
@@ -1143,4 +1280,4 @@ type KeylessConfig = Readonly<{
1143
1280
  sortFields: readonly string[];
1144
1281
  }>;
1145
1282
 
1146
- export { type BaseAmbiguity, type BaseNodeLookup, type BaseVersion, BaseVersionMismatchError, BranchError, type BranchId, type BranchOptions, type BranchProvenance, type CandidateSource, type ComparisonCeilingPolicy, type ConflictingValue, type DeleteModifyConflict, type DeleteModifyPolicy, type DroppedItem, type Embedder, type EntityResolution, type GraphBranch, type KeylessConfig, MERGE_ERROR_CODES, MERGE_OPTION_DEFAULTS, type MakeBackend, MergeConflictError, MergeError, type MergeIncrementalArgs, type MergeOptions, type MergeReport, type NormalizedMergeOptions, type PropertyConflict, type PropertyConflictPolicy, type ProvenanceGraph, type ProvenanceIndex, type ProvenanceNode, type ProvenanceQuery, type ProvenanceRecord, type ReconcileTypesMode, type ResolveConfig, type ResolveMap, type ResolvedCluster, Result, type SimilarityStrategy, SimilarityUnavailableError, type SourceScope, type TypeReconciliation, type WorkingCopyStrategy, asBaseVersion, asBranchId, branch, cloneWorkingCopyStrategy, computeBaseVersion, merge, mergeIncremental, normalizeMergeOptions, openProvenanceStore, persistProvenanceRecords, provenanceGraphId, readProvenance };
1283
+ export { type BaseAmbiguity, type BaseNodeLookup, type BaseVersion, BaseVersionMismatchError, BranchError, type BranchId, type BranchOptions, type BranchProvenance, type CandidateSource, type ComparisonCeilingPolicy, type ConflictingValue, type DeleteModifyConflict, type DeleteModifyPolicy, type DroppedItem, type Embedder, type EntityResolution, type GraphBranch, IdentityMergeConflictError, InvalidMergeOptionsError, type KeylessConfig, MERGE_ERROR_CODES, MERGE_OPTION_DEFAULTS, type MakeBackend, MergeConflictError, MergeError, type MergeIncrementalArgs, type MergeOptions, type MergeReport, type MergedCounts, type NormalizedMergeOptions, type PropertyConflict, type PropertyConflictPolicy, type ProvenanceGraph, type ProvenanceIndex, type ProvenanceNode, type ProvenanceQuery, type ProvenanceRecord, type ReconcileTypesMode, type ResolveConfig, type ResolveMap, type ResolvedCluster, Result, type SimilarityStrategy, SimilarityUnavailableError, type SourceScope, type TypeReconciliation, VALIDITY_END_TARGET_PRECEDENCE, type ValidityEndResolution, type WorkingCopyStrategy, asBaseVersion, asBranchId, branch, cloneWorkingCopyStrategy, computeBaseVersion, merge, mergeIncremental, normalizeMergeOptions, openProvenanceStore, persistProvenanceRecords, provenanceGraphId, readProvenance };