@graphrefly/graphrefly 0.34.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 (333) hide show
  1. package/dist/{cascading-DKIb6Pk8.d.cts → cascading-B25wxpRa.d.cts} +3 -3
  2. package/dist/{cascading-Bg0a4VSf.d.ts → cascading-BsJ4GbnS.d.ts} +3 -3
  3. package/dist/{chunk-TZLEMGAK.js → chunk-2Y3DKIZL.js} +2 -2
  4. package/dist/chunk-3OT7K33Q.js +1 -0
  5. package/dist/chunk-53XJ2S6D.js +1 -0
  6. package/dist/chunk-5CPPC75H.js +1 -0
  7. package/dist/chunk-5KPIYVCC.js +7 -0
  8. package/dist/{chunk-GAOX6OPT.js → chunk-5XZRCS2M.js} +1 -1
  9. package/dist/{chunk-C5DINHNP.js → chunk-6G5YD37E.js} +1 -1
  10. package/dist/{chunk-WBWBY6LI.js → chunk-6SVKZ7VI.js} +1 -1
  11. package/dist/chunk-A5HZZYRK.js +1 -0
  12. package/dist/chunk-BGEY3PXH.js +1 -0
  13. package/dist/chunk-CD4CB6S7.js +1 -0
  14. package/dist/chunk-CE72X3WO.js +1 -0
  15. package/dist/chunk-CUQFO6MT.js +1 -0
  16. package/dist/chunk-D5RFJOZ2.js +1 -0
  17. package/dist/{chunk-A3GDELMY.js → chunk-E5YSBQSF.js} +7 -7
  18. package/dist/{chunk-SFIM774L.js → chunk-EUE7ELFQ.js} +1 -1
  19. package/dist/chunk-F3IGTWCQ.js +1 -0
  20. package/dist/chunk-F672GV32.js +1 -0
  21. package/dist/{chunk-GCUYSIM4.js → chunk-GWOKTENT.js} +1 -1
  22. package/dist/{chunk-4NYSEUKV.js → chunk-J6TGRQUP.js} +1 -1
  23. package/dist/{chunk-4F564IPP.js → chunk-JJTF75VS.js} +1 -1
  24. package/dist/{chunk-BY4WKPKM.js → chunk-JUJEPZOI.js} +1 -1
  25. package/dist/{chunk-65WWQ5CB.js → chunk-M5UC63ZI.js} +5 -5
  26. package/dist/chunk-MQZWA3DF.js +1 -0
  27. package/dist/chunk-MYFR67PY.js +18 -0
  28. package/dist/{chunk-KN2UMFT6.js → chunk-PCD2MU7X.js} +1 -1
  29. package/dist/{chunk-YDWTVO4E.js → chunk-PIIUJIF7.js} +1 -1
  30. package/dist/chunk-PVUTRA5K.js +5 -0
  31. package/dist/chunk-Q7EUZ6NN.js +1 -0
  32. package/dist/chunk-RLMYS3XZ.js +1 -0
  33. package/dist/chunk-RRFOCAH6.js +1 -0
  34. package/dist/{chunk-Q46YJCQH.js → chunk-T6RPUERH.js} +1 -1
  35. package/dist/{chunk-IPNJDNE7.js → chunk-T7GWBGOO.js} +1 -1
  36. package/dist/{chunk-U2T2XWDA.js → chunk-U347KVM4.js} +1 -1
  37. package/dist/chunk-UAMWD4GG.js +1 -0
  38. package/dist/chunk-VN6RDSK2.js +1 -0
  39. package/dist/{chunk-CJMFZXIZ.js → chunk-W2ZU226Q.js} +1 -1
  40. package/dist/{chunk-UF746BQ4.js → chunk-XINLP35X.js} +1 -1
  41. package/dist/{chunk-TONEKQM3.js → chunk-XMDNNSMK.js} +1 -1
  42. package/dist/{chunk-INXDSJRC.js → chunk-YOUAVGHJ.js} +1 -1
  43. package/dist/chunk-YV2A2VWG.js +1 -0
  44. package/dist/{chunk-PBN426RU.js → chunk-ZGVA2SR5.js} +1 -1
  45. package/dist/compat/index.cjs +10 -10
  46. package/dist/compat/index.d.cts +17 -14
  47. package/dist/compat/index.d.ts +17 -14
  48. package/dist/compat/index.js +1 -1
  49. package/dist/compat/jotai/index.d.cts +2 -2
  50. package/dist/compat/jotai/index.d.ts +2 -2
  51. package/dist/compat/nanostores/index.d.cts +2 -2
  52. package/dist/compat/nanostores/index.d.ts +2 -2
  53. package/dist/compat/nestjs/index.cjs +12 -12
  54. package/dist/compat/nestjs/index.d.cts +9 -6
  55. package/dist/compat/nestjs/index.d.ts +9 -6
  56. package/dist/compat/nestjs/index.js +1 -1
  57. package/dist/compat/react/index.d.cts +2 -2
  58. package/dist/compat/react/index.d.ts +2 -2
  59. package/dist/compat/solid/index.d.cts +2 -2
  60. package/dist/compat/solid/index.d.ts +2 -2
  61. package/dist/compat/svelte/index.d.cts +2 -2
  62. package/dist/compat/svelte/index.d.ts +2 -2
  63. package/dist/compat/vue/index.d.cts +2 -2
  64. package/dist/compat/vue/index.d.ts +2 -2
  65. package/dist/compat/zustand/index.cjs +7 -7
  66. package/dist/compat/zustand/index.d.cts +5 -4
  67. package/dist/compat/zustand/index.d.ts +5 -4
  68. package/dist/compat/zustand/index.js +1 -1
  69. package/dist/{composite-BPDU_XV1.d.ts → composite-CT_mApQD.d.ts} +2 -2
  70. package/dist/{composite-CmvdhTJe.d.cts → composite-_XckYx2e.d.cts} +2 -2
  71. package/dist/{content-addressed-storage-DqIWCmZG.d.cts → content-addressed-storage-4-ST1tYk.d.cts} +5 -5
  72. package/dist/{content-addressed-storage-BUiREIuj.d.ts → content-addressed-storage-DuYMjV7o.d.ts} +5 -5
  73. package/dist/core/index.d.cts +4 -4
  74. package/dist/core/index.d.ts +4 -4
  75. package/dist/extra/browser.cjs +1 -1
  76. package/dist/extra/browser.d.cts +4 -3
  77. package/dist/extra/browser.d.ts +4 -3
  78. package/dist/extra/browser.js +1 -1
  79. package/dist/extra/index.cjs +19 -19
  80. package/dist/extra/index.d.cts +13 -12
  81. package/dist/extra/index.d.ts +13 -12
  82. package/dist/extra/index.js +1 -1
  83. package/dist/extra/node.cjs +2 -3
  84. package/dist/extra/node.d.cts +3 -3
  85. package/dist/extra/node.d.ts +3 -3
  86. package/dist/extra/node.js +2 -2
  87. package/dist/extra/operators.cjs +1 -1
  88. package/dist/extra/operators.d.cts +1 -1
  89. package/dist/extra/operators.d.ts +1 -1
  90. package/dist/extra/operators.js +1 -1
  91. package/dist/extra/reactive.cjs +1 -1
  92. package/dist/extra/reactive.d.cts +4 -3
  93. package/dist/extra/reactive.d.ts +4 -3
  94. package/dist/extra/reactive.js +1 -1
  95. package/dist/extra/sources.cjs +1 -1
  96. package/dist/extra/sources.d.cts +57 -2
  97. package/dist/extra/sources.d.ts +57 -2
  98. package/dist/extra/sources.js +1 -1
  99. package/dist/extra/storage-browser.cjs +1 -1
  100. package/dist/extra/storage-browser.d.cts +8 -42
  101. package/dist/extra/storage-browser.d.ts +8 -42
  102. package/dist/extra/storage-browser.js +1 -1
  103. package/dist/extra/storage-core.cjs +1 -1
  104. package/dist/extra/storage-core.d.cts +13 -83
  105. package/dist/extra/storage-core.d.ts +13 -83
  106. package/dist/extra/storage-core.js +1 -1
  107. package/dist/extra/storage-node.cjs +1 -2
  108. package/dist/extra/storage-node.d.cts +1 -59
  109. package/dist/extra/storage-node.d.ts +1 -59
  110. package/dist/extra/storage-node.js +0 -1
  111. package/dist/extra/storage-tiers-browser.cjs +1 -0
  112. package/dist/extra/storage-tiers-browser.d.cts +49 -0
  113. package/dist/extra/storage-tiers-browser.d.ts +49 -0
  114. package/dist/extra/storage-tiers-browser.js +1 -0
  115. package/dist/extra/storage-tiers-node.cjs +1 -0
  116. package/dist/extra/storage-tiers-node.d.cts +86 -0
  117. package/dist/extra/storage-tiers-node.d.ts +86 -0
  118. package/dist/extra/storage-tiers-node.js +1 -0
  119. package/dist/extra/storage-tiers.cjs +1 -0
  120. package/dist/extra/storage-tiers.d.cts +284 -0
  121. package/dist/extra/storage-tiers.d.ts +284 -0
  122. package/dist/extra/storage-tiers.js +1 -0
  123. package/dist/{fallback-mYSd8vQo.d.ts → fallback-DuEXfA4F.d.ts} +14 -14
  124. package/dist/{fallback-9YznPvPP.d.cts → fallback-axI2cXwt.d.cts} +14 -14
  125. package/dist/graph/index.cjs +3 -3
  126. package/dist/graph/index.d.cts +6 -5
  127. package/dist/graph/index.d.ts +6 -5
  128. package/dist/graph/index.js +1 -1
  129. package/dist/{graph-BROUZPG9.d.ts → graph-Cv-8x0ZI.d.ts} +28 -16
  130. package/dist/{graph-DaoydJ_u.d.cts → graph-kTltt95s.d.cts} +28 -16
  131. package/dist/imperative-audit-ahAE65a9.d.cts +28 -0
  132. package/dist/imperative-audit-ahAE65a9.d.ts +28 -0
  133. package/dist/{index-CI5fULSz.d.ts → index-8OxXae3g.d.ts} +1 -1
  134. package/dist/{index-CQ1gt4rn.d.cts → index-9xhIaM-w.d.cts} +1 -1
  135. package/dist/{index-DhWrMTI6.d.cts → index-B3D_z0Z6.d.cts} +1 -1
  136. package/dist/{index-Ccv_61jG.d.cts → index-B3Dfl5sS.d.cts} +110 -27
  137. package/dist/{index-Dia4yc2y.d.ts → index-B4s70vYf.d.ts} +4 -4
  138. package/dist/{index-Db21wuaD.d.ts → index-B5UR87KG.d.ts} +3 -3
  139. package/dist/{index-DuvQAU02.d.ts → index-BBdwz2BW.d.ts} +2 -2
  140. package/dist/{index-B5eS17Bz.d.ts → index-BEvsFlfH.d.ts} +47 -32
  141. package/dist/{index-BUtCR0k6.d.ts → index-BF-ssbJB.d.ts} +7 -7
  142. package/dist/{index-ClKm7CFB.d.cts → index-BFuVcqL8.d.cts} +1 -1
  143. package/dist/{index-BkfL5MXh.d.cts → index-BWH17rK_.d.cts} +3 -3
  144. package/dist/{index-CD7qmvSf.d.ts → index-BZ1V5GzX.d.ts} +3 -3
  145. package/dist/{index-BDEhWLF4.d.cts → index-BhkPzu-Z.d.cts} +4 -4
  146. package/dist/{index-CNxdDb2e.d.ts → index-Bilohojo.d.ts} +3 -3
  147. package/dist/{index-zA1uVtk0.d.ts → index-BiomL7AW.d.ts} +1 -1
  148. package/dist/{index-BWiX5foT.d.ts → index-BjWZARLy.d.ts} +1 -1
  149. package/dist/{index-IxinNgAH.d.cts → index-BkbawFkI.d.cts} +16 -15
  150. package/dist/{index-RJX4snyi.d.cts → index-BlRVj-7Q.d.cts} +21 -21
  151. package/dist/index-BpFwRAf9.d.cts +26 -0
  152. package/dist/{index-Ds3Rz9m9.d.cts → index-BsZlbHM5.d.cts} +3 -3
  153. package/dist/{index-BFHpNSsV.d.ts → index-BtY2QVDf.d.cts} +8 -7
  154. package/dist/{index-BsxqmV6u.d.ts → index-BuMzxRO2.d.ts} +2 -2
  155. package/dist/{index-C5uMGVJw.d.ts → index-BwYGLgmI.d.ts} +4 -4
  156. package/dist/{index-3L3RC3VJ.d.ts → index-C40wA8zt.d.ts} +7 -7
  157. package/dist/{index-Bi4ZP6Hc.d.ts → index-C9xF16gc.d.ts} +110 -27
  158. package/dist/index-CAIhFfws.d.ts +171 -0
  159. package/dist/{index-BRisOxlx.d.ts → index-CDvC1m5p.d.ts} +1 -1
  160. package/dist/index-CGKs5ixV.d.cts +287 -0
  161. package/dist/{index-ygRFoyrN.d.ts → index-CI_yjtua.d.ts} +2 -2
  162. package/dist/{index-DxEcY7Om.d.ts → index-CIcu6fIR.d.ts} +1 -1
  163. package/dist/{index-CQtnGFrZ.d.cts → index-CfOSES72.d.cts} +7 -7
  164. package/dist/{index-Bd2AjMQY.d.ts → index-Cot94_82.d.ts} +21 -21
  165. package/dist/{index-B1hFhK1K.d.cts → index-CpZKtdMw.d.cts} +1 -1
  166. package/dist/{index-BO6t0HjV.d.cts → index-CqSJ25A9.d.cts} +1 -1
  167. package/dist/{index-Jgl7ev9I.d.cts → index-CzC0G0C3.d.cts} +9 -9
  168. package/dist/{index-p0bkNfby.d.cts → index-D6JRP-1_.d.cts} +3 -3
  169. package/dist/{index-D23g00HE.d.cts → index-D7r_vd0b.d.cts} +4 -4
  170. package/dist/{index-Cp91Sxbo.d.cts → index-D8IyqHvT.d.cts} +3 -3
  171. package/dist/{index-iKsmdnq6.d.cts → index-D9qoEOj_.d.cts} +2 -2
  172. package/dist/index-DBmBtqAN.d.ts +461 -0
  173. package/dist/{index-nP13Qe6T.d.ts → index-DFe2Pk2u.d.ts} +1 -1
  174. package/dist/{index-Cn3taOmp.d.cts → index-DKp1CIbG.d.cts} +2 -2
  175. package/dist/{index-CoR-tOZA.d.cts → index-DSD6xnbT.d.ts} +8 -7
  176. package/dist/{index-DheNs40A.d.ts → index-DXSLMoma.d.ts} +2 -2
  177. package/dist/{index-ZIQaKIdY.d.cts → index-DXZsXxtU.d.cts} +47 -32
  178. package/dist/{index-BVTjuKeP.d.cts → index-D_QQ_dTD.d.cts} +1 -1
  179. package/dist/{index-ChZvMC4M.d.cts → index-DeyzuqAi.d.cts} +7 -7
  180. package/dist/{index-Chi9IiHJ.d.ts → index-DlccEIi3.d.ts} +3 -3
  181. package/dist/{index-DR3XqZlV.d.cts → index-DmtWMP0X.d.cts} +1 -1
  182. package/dist/{index-CbCNoogR.d.ts → index-Dp69u0ym.d.ts} +16 -15
  183. package/dist/{index-b4a6Sg0R.d.ts → index-DwNNufVa.d.ts} +4 -4
  184. package/dist/{index-D80nGRb9.d.ts → index-DzYTXMBz.d.ts} +3 -3
  185. package/dist/index-DzgS5uYi.d.ts +26 -0
  186. package/dist/{index-B-KCkW4M.d.cts → index-GaW6Welt.d.cts} +4 -4
  187. package/dist/{index-DupIl9wI.d.ts → index-JYtN9uqM.d.ts} +1 -1
  188. package/dist/{index-Ced0dphF.d.ts → index-KNAMYngu.d.ts} +9 -9
  189. package/dist/{index-BpjQanLs.d.cts → index-PluovH45.d.cts} +2 -2
  190. package/dist/index-Qq-G9B6g.d.cts +171 -0
  191. package/dist/{index-yJY9thRY.d.cts → index-XxSeddWP.d.cts} +2 -2
  192. package/dist/{index-C8_bnDBZ.d.cts → index-ZhKyR8co.d.cts} +3 -3
  193. package/dist/index-hXKhbfh-.d.ts +287 -0
  194. package/dist/index-zK_mN1D-.d.cts +461 -0
  195. package/dist/index.cjs +59 -59
  196. package/dist/index.d.cts +53 -49
  197. package/dist/index.d.ts +53 -49
  198. package/dist/index.js +1 -1
  199. package/dist/{meta-BdjSt8ky.d.cts → meta-BGO6C7K9.d.cts} +1 -1
  200. package/dist/{meta-CtDjj7cU.d.ts → meta-CC6EPdpK.d.ts} +1 -1
  201. package/dist/{node-8qx0kgYt.d.cts → node-fSc-hCv8.d.cts} +1 -1
  202. package/dist/{node-8qx0kgYt.d.ts → node-fSc-hCv8.d.ts} +1 -1
  203. package/dist/{observable-B6Ba-TTI.d.cts → observable-Cqty11jG.d.cts} +1 -1
  204. package/dist/{observable-DOniYM2B.d.ts → observable-EAV_rNfM.d.ts} +1 -1
  205. package/dist/patterns/ai/browser.cjs +5 -5
  206. package/dist/patterns/ai/browser.d.cts +4 -4
  207. package/dist/patterns/ai/browser.d.ts +4 -4
  208. package/dist/patterns/ai/browser.js +1 -1
  209. package/dist/patterns/ai/index.cjs +19 -19
  210. package/dist/patterns/ai/index.d.cts +19 -17
  211. package/dist/patterns/ai/index.d.ts +19 -17
  212. package/dist/patterns/ai/index.js +1 -1
  213. package/dist/patterns/ai/node.cjs +1 -2
  214. package/dist/patterns/ai/node.d.cts +9 -9
  215. package/dist/patterns/ai/node.d.ts +9 -9
  216. package/dist/patterns/ai/node.js +1 -1
  217. package/dist/patterns/audit/index.cjs +6 -6
  218. package/dist/patterns/audit/index.d.cts +7 -5
  219. package/dist/patterns/audit/index.d.ts +7 -5
  220. package/dist/patterns/audit/index.js +1 -1
  221. package/dist/patterns/cqrs/index.cjs +7 -7
  222. package/dist/patterns/cqrs/index.d.cts +7 -4
  223. package/dist/patterns/cqrs/index.d.ts +7 -4
  224. package/dist/patterns/cqrs/index.js +1 -1
  225. package/dist/patterns/demo-shell/index.cjs +8 -8
  226. package/dist/patterns/demo-shell/index.d.cts +6 -5
  227. package/dist/patterns/demo-shell/index.d.ts +6 -5
  228. package/dist/patterns/demo-shell/index.js +1 -1
  229. package/dist/patterns/domain-templates/index.cjs +5 -5
  230. package/dist/patterns/domain-templates/index.d.cts +5 -4
  231. package/dist/patterns/domain-templates/index.d.ts +5 -4
  232. package/dist/patterns/domain-templates/index.js +1 -1
  233. package/dist/patterns/graphspec/index.cjs +20 -20
  234. package/dist/patterns/graphspec/index.d.cts +6 -5
  235. package/dist/patterns/graphspec/index.d.ts +6 -5
  236. package/dist/patterns/graphspec/index.js +1 -1
  237. package/dist/patterns/guarded-execution/index.cjs +7 -7
  238. package/dist/patterns/guarded-execution/index.d.cts +8 -6
  239. package/dist/patterns/guarded-execution/index.d.ts +8 -6
  240. package/dist/patterns/guarded-execution/index.js +1 -1
  241. package/dist/patterns/harness/index.cjs +12 -12
  242. package/dist/patterns/harness/index.d.cts +13 -10
  243. package/dist/patterns/harness/index.d.ts +13 -10
  244. package/dist/patterns/harness/index.js +1 -1
  245. package/dist/patterns/job-queue/index.cjs +7 -7
  246. package/dist/patterns/job-queue/index.d.cts +8 -4
  247. package/dist/patterns/job-queue/index.d.ts +8 -4
  248. package/dist/patterns/job-queue/index.js +1 -1
  249. package/dist/patterns/lens/index.cjs +4 -4
  250. package/dist/patterns/lens/index.d.cts +7 -6
  251. package/dist/patterns/lens/index.d.ts +7 -6
  252. package/dist/patterns/lens/index.js +1 -1
  253. package/dist/patterns/memory/index.cjs +1 -1
  254. package/dist/patterns/memory/index.d.cts +5 -4
  255. package/dist/patterns/memory/index.d.ts +5 -4
  256. package/dist/patterns/memory/index.js +1 -1
  257. package/dist/patterns/messaging/index.cjs +7 -7
  258. package/dist/patterns/messaging/index.d.cts +6 -4
  259. package/dist/patterns/messaging/index.d.ts +6 -4
  260. package/dist/patterns/messaging/index.js +1 -1
  261. package/dist/patterns/orchestration/index.cjs +7 -7
  262. package/dist/patterns/orchestration/index.d.cts +8 -5
  263. package/dist/patterns/orchestration/index.d.ts +8 -5
  264. package/dist/patterns/orchestration/index.js +1 -1
  265. package/dist/patterns/process/index.cjs +1 -0
  266. package/dist/patterns/process/index.d.cts +10 -0
  267. package/dist/patterns/process/index.d.ts +10 -0
  268. package/dist/patterns/process/index.js +1 -0
  269. package/dist/patterns/reactive-layout/index.cjs +5 -5
  270. package/dist/patterns/reactive-layout/index.d.cts +6 -5
  271. package/dist/patterns/reactive-layout/index.d.ts +6 -5
  272. package/dist/patterns/reactive-layout/index.js +1 -1
  273. package/dist/patterns/reduction/index.cjs +1 -1
  274. package/dist/patterns/reduction/index.d.cts +5 -4
  275. package/dist/patterns/reduction/index.d.ts +5 -4
  276. package/dist/patterns/reduction/index.js +1 -1
  277. package/dist/patterns/refine-loop/index.cjs +8 -8
  278. package/dist/patterns/refine-loop/index.d.cts +7 -5
  279. package/dist/patterns/refine-loop/index.d.ts +7 -5
  280. package/dist/patterns/refine-loop/index.js +1 -1
  281. package/dist/patterns/resilient-pipeline/index.cjs +1 -1
  282. package/dist/patterns/resilient-pipeline/index.d.cts +7 -6
  283. package/dist/patterns/resilient-pipeline/index.d.ts +7 -6
  284. package/dist/patterns/resilient-pipeline/index.js +1 -1
  285. package/dist/patterns/surface/index.cjs +11 -11
  286. package/dist/patterns/surface/index.d.cts +7 -6
  287. package/dist/patterns/surface/index.d.ts +7 -6
  288. package/dist/patterns/surface/index.js +1 -1
  289. package/dist/pipeline-graph-B85HUrWg.d.cts +120 -0
  290. package/dist/pipeline-graph-HOTU4UG0.d.ts +120 -0
  291. package/dist/{reactive-layout-DBJ3Vz-m.d.ts → reactive-layout-Btv0-efV.d.ts} +2 -2
  292. package/dist/{reactive-layout-Dk9AOQb_.d.cts → reactive-layout-D9zqqaqK.d.cts} +2 -2
  293. package/dist/reactive-log-ByBb8g6A.d.ts +188 -0
  294. package/dist/reactive-log-CgbNqksB.d.cts +188 -0
  295. package/dist/{reactive-map-LjwjcFaW.d.ts → reactive-map-CHyeCf4D.d.ts} +1 -1
  296. package/dist/{reactive-map-Cm89Hk0c.d.cts → reactive-map-DmgeADH8.d.cts} +1 -1
  297. package/dist/{resilience-RjDIHZNZ.d.ts → resilience-BWP2c7Af.d.cts} +27 -45
  298. package/dist/{resilience-N_VtLf7W.d.cts → resilience-Bys63Cpd.d.ts} +27 -45
  299. package/dist/resilience-OBU472D2.js +1 -0
  300. package/dist/{sugar-CQkn_rxB.d.ts → sugar-D13E2M_z.d.ts} +1 -1
  301. package/dist/{sugar-DVEYhR7a.d.cts → sugar-DgaGJcI6.d.cts} +1 -1
  302. package/dist/{topology-tree-BB6oJxMz.d.cts → topology-tree-C50l9ARE.d.cts} +1 -1
  303. package/dist/{topology-tree-CAFOG5S5.d.ts → topology-tree-CJsT24DP.d.ts} +1 -1
  304. package/dist/{types-Cp_4coR_.d.cts → types-BMSGPlpO.d.cts} +1 -1
  305. package/dist/{types-B2LfBvNc.d.ts → types-CidcBDuk.d.ts} +1 -1
  306. package/package.json +41 -1
  307. package/dist/chunk-2JO6LXFT.js +0 -7
  308. package/dist/chunk-2LZ6DL45.js +0 -1
  309. package/dist/chunk-3JXNEPCD.js +0 -2
  310. package/dist/chunk-3Y4BXFFR.js +0 -1
  311. package/dist/chunk-55T3K37W.js +0 -1
  312. package/dist/chunk-6HQ6HVTF.js +0 -1
  313. package/dist/chunk-7Q2WPFQ7.js +0 -1
  314. package/dist/chunk-FKRPIRE6.js +0 -1
  315. package/dist/chunk-HTBOCKVD.js +0 -1
  316. package/dist/chunk-I6VIH3VA.js +0 -1
  317. package/dist/chunk-IB64M7VP.js +0 -1
  318. package/dist/chunk-IJFSR4NU.js +0 -1
  319. package/dist/chunk-LOF5HSD3.js +0 -18
  320. package/dist/chunk-T2TB37TW.js +0 -1
  321. package/dist/chunk-T7EQPKOP.js +0 -1
  322. package/dist/chunk-Y63GWRHO.js +0 -5
  323. package/dist/chunk-YUBV7EEE.js +0 -1
  324. package/dist/index-C2Dey3L-.d.cts +0 -152
  325. package/dist/index-ClJUZAOr.d.cts +0 -101
  326. package/dist/index-Cq7Uqgu4.d.ts +0 -192
  327. package/dist/index-Dtpr2FIB.d.ts +0 -101
  328. package/dist/index-HvJ90_tX.d.ts +0 -152
  329. package/dist/index-wcfc7W-f.d.cts +0 -192
  330. package/dist/reactive-log-CWC7jO4J.d.cts +0 -190
  331. package/dist/reactive-log-CqaBg8nf.d.ts +0 -190
  332. package/dist/resilience-7UZHSSGC.js +0 -1
  333. /package/dist/{chunk-L3KUKDZC.js → chunk-O32GJOUJ.js} +0 -0
@@ -0,0 +1,86 @@
1
+ import { AppendLogStorageOptions, AppendLogStorageTier, StorageBackend, KvStorageOptions, KvStorageTier, SnapshotStorageOptions, SnapshotStorageTier } from './storage-tiers.cjs';
2
+
3
+ /**
4
+ * Node-only Audit 4 storage backends + convenience factories.
5
+ *
6
+ * Imports `node:fs`, `node:path`, `node:crypto`, `node:sqlite`. Browser-safe
7
+ * consumers should not import this module.
8
+ *
9
+ * @module
10
+ */
11
+
12
+ /**
13
+ * Filesystem backend. Each key becomes a file under `dir`; values are written
14
+ * via temp + rename for atomic replace.
15
+ *
16
+ * @category extra
17
+ */
18
+ declare function fileBackend(dir: string): StorageBackend;
19
+ /**
20
+ * SQLite backend (Node 22.5+ `node:sqlite`). Stores byte values under string
21
+ * keys in a single table; caller owns the connection lifetime via `close()`.
22
+ *
23
+ * @category extra
24
+ */
25
+ declare function sqliteBackend(path: string): StorageBackend & {
26
+ close(): void;
27
+ };
28
+ /**
29
+ * Filesystem snapshot tier — `snapshotStorage(fileBackend(dir), opts)`.
30
+ *
31
+ * @category extra
32
+ */
33
+ declare function fileSnapshot<T>(dir: string, opts?: Omit<SnapshotStorageOptions<T>, "name"> & {
34
+ name?: string;
35
+ }): SnapshotStorageTier<T>;
36
+ /**
37
+ * Filesystem append-log tier — `appendLogStorage(fileBackend(dir), opts)`.
38
+ *
39
+ * @category extra
40
+ */
41
+ declare function fileAppendLog<T>(dir: string, opts?: Omit<AppendLogStorageOptions<T>, "name"> & {
42
+ name?: string;
43
+ }): AppendLogStorageTier<T>;
44
+ /**
45
+ * SQLite snapshot tier — caller owns the connection. Use the underlying
46
+ * backend's `close()` for explicit teardown.
47
+ *
48
+ * @category extra
49
+ */
50
+ declare function sqliteSnapshot<T>(path: string, opts?: Omit<SnapshotStorageOptions<T>, "name"> & {
51
+ name?: string;
52
+ }): SnapshotStorageTier<T> & {
53
+ close(): void;
54
+ };
55
+ /**
56
+ * SQLite append-log tier — caller owns the connection. Use the underlying
57
+ * backend's `close()` for explicit teardown.
58
+ *
59
+ * @category extra
60
+ */
61
+ declare function sqliteAppendLog<T>(path: string, opts?: Omit<AppendLogStorageOptions<T>, "name"> & {
62
+ name?: string;
63
+ }): AppendLogStorageTier<T> & {
64
+ close(): void;
65
+ };
66
+ /**
67
+ * Filesystem kv tier — `kvStorage(fileBackend(dir), opts)`.
68
+ *
69
+ * @category extra
70
+ */
71
+ declare function fileKv<T>(dir: string, opts?: Omit<KvStorageOptions<T>, "name"> & {
72
+ name?: string;
73
+ }): KvStorageTier<T>;
74
+ /**
75
+ * SQLite kv tier — caller owns the connection. Use the underlying
76
+ * backend's `close()` for explicit teardown.
77
+ *
78
+ * @category extra
79
+ */
80
+ declare function sqliteKv<T>(path: string, opts?: Omit<KvStorageOptions<T>, "name"> & {
81
+ name?: string;
82
+ }): KvStorageTier<T> & {
83
+ close(): void;
84
+ };
85
+
86
+ export { fileAppendLog, fileBackend, fileKv, fileSnapshot, sqliteAppendLog, sqliteBackend, sqliteKv, sqliteSnapshot };
@@ -0,0 +1,86 @@
1
+ import { AppendLogStorageOptions, AppendLogStorageTier, StorageBackend, KvStorageOptions, KvStorageTier, SnapshotStorageOptions, SnapshotStorageTier } from './storage-tiers.js';
2
+
3
+ /**
4
+ * Node-only Audit 4 storage backends + convenience factories.
5
+ *
6
+ * Imports `node:fs`, `node:path`, `node:crypto`, `node:sqlite`. Browser-safe
7
+ * consumers should not import this module.
8
+ *
9
+ * @module
10
+ */
11
+
12
+ /**
13
+ * Filesystem backend. Each key becomes a file under `dir`; values are written
14
+ * via temp + rename for atomic replace.
15
+ *
16
+ * @category extra
17
+ */
18
+ declare function fileBackend(dir: string): StorageBackend;
19
+ /**
20
+ * SQLite backend (Node 22.5+ `node:sqlite`). Stores byte values under string
21
+ * keys in a single table; caller owns the connection lifetime via `close()`.
22
+ *
23
+ * @category extra
24
+ */
25
+ declare function sqliteBackend(path: string): StorageBackend & {
26
+ close(): void;
27
+ };
28
+ /**
29
+ * Filesystem snapshot tier — `snapshotStorage(fileBackend(dir), opts)`.
30
+ *
31
+ * @category extra
32
+ */
33
+ declare function fileSnapshot<T>(dir: string, opts?: Omit<SnapshotStorageOptions<T>, "name"> & {
34
+ name?: string;
35
+ }): SnapshotStorageTier<T>;
36
+ /**
37
+ * Filesystem append-log tier — `appendLogStorage(fileBackend(dir), opts)`.
38
+ *
39
+ * @category extra
40
+ */
41
+ declare function fileAppendLog<T>(dir: string, opts?: Omit<AppendLogStorageOptions<T>, "name"> & {
42
+ name?: string;
43
+ }): AppendLogStorageTier<T>;
44
+ /**
45
+ * SQLite snapshot tier — caller owns the connection. Use the underlying
46
+ * backend's `close()` for explicit teardown.
47
+ *
48
+ * @category extra
49
+ */
50
+ declare function sqliteSnapshot<T>(path: string, opts?: Omit<SnapshotStorageOptions<T>, "name"> & {
51
+ name?: string;
52
+ }): SnapshotStorageTier<T> & {
53
+ close(): void;
54
+ };
55
+ /**
56
+ * SQLite append-log tier — caller owns the connection. Use the underlying
57
+ * backend's `close()` for explicit teardown.
58
+ *
59
+ * @category extra
60
+ */
61
+ declare function sqliteAppendLog<T>(path: string, opts?: Omit<AppendLogStorageOptions<T>, "name"> & {
62
+ name?: string;
63
+ }): AppendLogStorageTier<T> & {
64
+ close(): void;
65
+ };
66
+ /**
67
+ * Filesystem kv tier — `kvStorage(fileBackend(dir), opts)`.
68
+ *
69
+ * @category extra
70
+ */
71
+ declare function fileKv<T>(dir: string, opts?: Omit<KvStorageOptions<T>, "name"> & {
72
+ name?: string;
73
+ }): KvStorageTier<T>;
74
+ /**
75
+ * SQLite kv tier — caller owns the connection. Use the underlying
76
+ * backend's `close()` for explicit teardown.
77
+ *
78
+ * @category extra
79
+ */
80
+ declare function sqliteKv<T>(path: string, opts?: Omit<KvStorageOptions<T>, "name"> & {
81
+ name?: string;
82
+ }): KvStorageTier<T> & {
83
+ close(): void;
84
+ };
85
+
86
+ export { fileAppendLog, fileBackend, fileKv, fileSnapshot, sqliteAppendLog, sqliteBackend, sqliteKv, sqliteSnapshot };
@@ -0,0 +1 @@
1
+ import{a,b,c,d,e,f,g,h}from"../chunk-VN6RDSK2.js";import"../chunk-D5RFJOZ2.js";import"../chunk-CE72X3WO.js";import"../chunk-QYADASLV.js";export{d as fileAppendLog,a as fileBackend,g as fileKv,c as fileSnapshot,f as sqliteAppendLog,b as sqliteBackend,h as sqliteKv,e as sqliteSnapshot};
@@ -0,0 +1 @@
1
+ "use strict";var w=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var K=(e,n)=>{for(var t in n)w(e,t,{get:n[t],enumerable:!0})},L=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of U(n))!B.call(e,o)&&o!==t&&w(e,o,{get:()=>n[o],enumerable:!(r=E(n,o))||r.enumerable});return e};var j=e=>L(w({},"__esModule",{value:!0}),e);var H={};K(H,{appendLogStorage:()=>O,dictKv:()=>W,dictSnapshot:()=>D,jsonCodec:()=>h,jsonCodecFor:()=>N,kvStorage:()=>b,memoryAppendLog:()=>_,memoryBackend:()=>S,memoryKv:()=>z,memorySnapshot:()=>F,snapshotStorage:()=>A});module.exports=j(H);function P(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(P);let n=e,t=Object.keys(n).sort(),r={};for(let o of t)r[o]=P(n[o]);return r}function x(e){return JSON.stringify(P(e),void 0,0)}var R=new TextEncoder,J=new TextDecoder("utf-8",{fatal:!0}),h={name:"json",version:1,encode(e){return R.encode(x(e))},decode(e){return JSON.parse(J.decode(e))}};function N(){return h}function S(){let e=new Map;return{name:"memory",read(n){let t=e.get(n);return t===void 0?void 0:new Uint8Array(t)},write(n,t){e.set(n,new Uint8Array(t))},delete(n){e.delete(n)},list(n){let t=[...e.keys()];return n?t.filter(r=>r.startsWith(n)).sort():t.sort()}}}function A(e,n={}){let t=n.codec??h,r=n.name??e.name??"snapshot",o=n.keyOf??(c=>c.name??n.name??e.name??"snapshot"),a,m=0,y=n.compactEvery,l,f={name:r,debounceMs:n.debounceMs,compactEvery:y,filter:n.filter,keyOf:o,save(c){if(!(n.filter&&!n.filter(c))&&(a={snapshot:c},m+=1,y!==void 0&&m%y===0||!n.debounceMs))return d()},load(){let c=l??r,i=e.read(c);if(i!==void 0)return i instanceof Uint8Array?i.length===0?void 0:t.decode(i):Promise.resolve(i).then(s=>s===void 0||s.length===0?void 0:t.decode(s))},async flush(){await d()},async rollback(){a=void 0}};function d(){let c=a;if(!c)return;a=void 0;let i=o(c.snapshot),s=t.encode(c.snapshot),u=e.write(i,s);if(u instanceof Promise)return u.then(()=>{l=i});l=i}return f}function O(e,n={}){let t=n.codec??h,r=n.name??e.name??"append-log",o=n.keyOf??(i=>r),a=n.compactEvery,m=new Map,y=0,l,f={name:r,debounceMs:n.debounceMs,compactEvery:a,keyOf:o,appendEntries(i){if(i.length!==0){for(let s of i){let u=o(s),g=m.get(u);g||(g=[],m.set(u,g)),g.push(s)}if(y+=i.length,a!==void 0&&y%a===0||!n.debounceMs)return d()}},async loadEntries(i){let s=i?.keyFilter,u=e.list===void 0?s!==void 0?[s]:[r]:await Promise.resolve(e.list(s)),g=[];for(let v of u){let T=await Promise.resolve(e.read(v));if(T===void 0||T.length===0)continue;let p=t.decode(T);Array.isArray(p)&&g.push(...p)}return{entries:g,cursor:void 0}},async flush(){await d()},async rollback(){m=new Map}};function d(){if(m.size===0)return;let i=m;m=new Map;let s=(l??Promise.resolve()).then(()=>{let u=c(i);return u instanceof Promise?u:Promise.resolve()},()=>{let u=c(i);return u instanceof Promise?u:Promise.resolve()});return l=s.finally(()=>{l===s&&(l=void 0)}),l}function c(i){let s=[];for(let[u,g]of i){let v=e.read(u),T=p=>{let M=[...p===void 0||p.length===0?[]:t.decode(p)??[],...g],C=t.encode(M);return e.write(u,C)};if(v instanceof Promise)s.push(v.then(async p=>{let k=T(p);k instanceof Promise&&await k}));else{let p=T(v);p instanceof Promise&&s.push(p)}}if(s.length>0)return Promise.all(s).then(()=>{})}return f}function b(e,n={}){let t=n.codec??h,r=n.name??e.name??"kv",o=n.compactEvery,a=new Map,m=0,y={name:r,debounceMs:n.debounceMs,compactEvery:o,filter:n.filter,save(f,d){if(!(n.filter&&!n.filter(f,d))&&(a.set(f,d),m+=1,o!==void 0&&m%o===0||!n.debounceMs))return l()},load(f){let d=e.read(f);if(d!==void 0)return d instanceof Uint8Array?d.length===0?void 0:t.decode(d):Promise.resolve(d).then(c=>c===void 0||c.length===0?void 0:t.decode(c))},delete(f){if(a.delete(f),!!e.delete)return e.delete(f)},list(f){return e.list?e.list(f):[]},async flush(){await l()},async rollback(){a=new Map}};function l(){if(a.size===0)return;let f=a;a=new Map;let d=[];for(let[c,i]of f){let s=t.encode(i),u=e.write(c,s);u instanceof Promise&&d.push(u)}if(d.length>0)return Promise.all(d).then(()=>{})}return y}function F(e){return A(S(),e)}function _(e){return O(S(),e)}function z(e){return b(S(),e)}function W(e,n){let t={name:n?.name??"dict-kv",read(r){return e[r]},write(r,o){e[r]=new Uint8Array(o)},delete(r){delete e[r]},list(r){let o=Object.keys(e).sort();return r?o.filter(a=>a.startsWith(r)):o}};return b(t,n)}function D(e,n){return A({name:"dict",read(r){return e[r]},write(r,o){e[r]=new Uint8Array(o)},delete(r){delete e[r]},list(r){let o=Object.keys(e).sort();return r?o.filter(a=>a.startsWith(r)):o}},n)}0&&(module.exports={appendLogStorage,dictKv,dictSnapshot,jsonCodec,jsonCodecFor,kvStorage,memoryAppendLog,memoryBackend,memoryKv,memorySnapshot,snapshotStorage});
@@ -0,0 +1,284 @@
1
+ /**
2
+ * Storage tier architecture (Audit 4 — locked 2026-04-24).
3
+ *
4
+ * Three-layer design:
5
+ *
6
+ * - **Layer 1 — {@link StorageBackend}:** generic bytes-level kv I/O. One
7
+ * `read(key) → Uint8Array | undefined`, `write(key, bytes)`, optional
8
+ * `delete(key)` / `list(prefix)`. No tier-level concerns (debounce, codec).
9
+ * - **Layer 2 — Tier specializations** layered over a backend, parametric over
10
+ * `T`: {@link SnapshotStorageTier} (one snapshot under one key) and
11
+ * {@link AppendLogStorageTier} (sequential entries, optional partition via
12
+ * `keyOf`). Both extend {@link BaseStorageTier} which carries
13
+ * `flush?` / `rollback?` for the wave-as-transaction model.
14
+ * - **Layer 3 — High-level wiring:** `Graph.attachSnapshotStorage(tiers)`,
15
+ * `reactiveLog.attachStorage(tiers)`, `cqrsGraph.attachEventStorage(tiers)`,
16
+ * `jobQueueGraph.attachEventStorage(tiers)`. These layers consume tier
17
+ * specializations directly — they don't see the backend.
18
+ *
19
+ * Browser-safe by default. {@link memoryBackend} + the in-memory factories
20
+ * live here; Node-only (`fileBackend` / `sqliteBackend`) lives in
21
+ * `extra/storage-node.ts`; browser-only (`indexedDbBackend`) lives in
22
+ * `extra/storage-browser.ts`.
23
+ *
24
+ * @module
25
+ */
26
+ /**
27
+ * Bytes-level kv backend. One responsibility: read/write byte ranges under
28
+ * string keys. Tier specializations layer on top.
29
+ *
30
+ * @category extra
31
+ */
32
+ interface StorageBackend {
33
+ /** Diagnostic name (e.g., `"memory"`, `"file:./checkpoints"`). */
34
+ readonly name: string;
35
+ /** Read raw bytes; returns `undefined` on miss. */
36
+ read(key: string): Uint8Array | undefined | Promise<Uint8Array | undefined>;
37
+ /** Write raw bytes. Sync backends return `void`; async return `Promise<void>`. */
38
+ write(key: string, bytes: Uint8Array): void | Promise<void>;
39
+ /** Optional delete-by-key. */
40
+ delete?(key: string): void | Promise<void>;
41
+ /** Optional enumeration; `prefix` filters keys. */
42
+ list?(prefix?: string): readonly string[] | Promise<readonly string[]>;
43
+ /** Optional drain hook — adapter authors implement when buffering writes. */
44
+ flush?(): Promise<void>;
45
+ }
46
+ /**
47
+ * Codec for tier serialization. Tiers call `encode(value) → bytes` before
48
+ * `backend.write` and `decode(bytes) → value` after `backend.read`.
49
+ *
50
+ * @category extra
51
+ */
52
+ interface Codec<T = unknown> {
53
+ readonly name: string;
54
+ readonly version: number;
55
+ encode(value: T): Uint8Array;
56
+ decode(bytes: Uint8Array): T;
57
+ }
58
+ /**
59
+ * Default JSON codec — UTF-8 text, stable key order (via `stableJsonString`).
60
+ * Any value JSON-serializable is supported.
61
+ *
62
+ * @category extra
63
+ */
64
+ declare const jsonCodec: Codec<unknown>;
65
+ /** Build a `Codec<T>` over the default JSON encoding. Pure typing helper. */
66
+ declare function jsonCodecFor<T>(): Codec<T>;
67
+ /**
68
+ * Common tier surface: name + cadence knobs + transaction lifecycle.
69
+ *
70
+ * Lifecycle hooks (`flush` / `rollback`) implement Audit 4's "one wave = one
71
+ * transaction" model. Framework integration:
72
+ * - After every wave (and on `batch()` close), framework iterates attached
73
+ * tiers and calls `tier.flush()` if exposed.
74
+ * - On wave-throw (per C.2 F rollback policy), framework calls
75
+ * `tier.rollback()` if exposed — pending writes discarded.
76
+ * - Cross-tier atomicity is best-effort. Each tier is its own transaction.
77
+ *
78
+ * @category extra
79
+ */
80
+ interface BaseStorageTier {
81
+ readonly name: string;
82
+ /** Debounce window (ms). `0` = sync-through; >0 batches across waves. */
83
+ readonly debounceMs?: number;
84
+ /** Force flush every Nth write regardless of debounce. */
85
+ readonly compactEvery?: number;
86
+ /** Commit pending; framework calls at wave-close / debounce-fire. */
87
+ flush?(): Promise<void>;
88
+ /** Discard pending; framework calls on wave-throw. */
89
+ rollback?(): Promise<void>;
90
+ }
91
+ /**
92
+ * Snapshot tier — writes a single record per `save(snapshot)` call.
93
+ *
94
+ * The tier maps the snapshot to a backend key via `keyOf(snapshot)` (default
95
+ * `() => name ?? "snapshot"`). For `Graph.attachSnapshotStorage`, the framework
96
+ * supplies a closure that pulls the graph name out of the record envelope.
97
+ *
98
+ * @category extra
99
+ */
100
+ interface SnapshotStorageTier<T = unknown> extends BaseStorageTier {
101
+ save(snapshot: T): void | Promise<void>;
102
+ load?(): T | Promise<T | undefined> | undefined;
103
+ /** Skip-save policy — return `false` to skip persisting this snapshot. */
104
+ filter?: (snapshot: T) => boolean;
105
+ /** Extract the backend key per-snapshot; default `() => name ?? "snapshot"`. */
106
+ keyOf?: (snapshot: T) => string;
107
+ }
108
+ /**
109
+ * Append-log tier — bulk-friendly entry persistence with optional partitioning.
110
+ *
111
+ * Entries are appended to a logical stream; `keyOf?` partitions across backend
112
+ * keys (e.g., `(e) => `${e.type}::${e.aggregateId}`` for CQRS).
113
+ *
114
+ * @category extra
115
+ */
116
+ interface AppendLogStorageTier<T = unknown> extends BaseStorageTier {
117
+ appendEntries(entries: readonly T[]): void | Promise<void>;
118
+ loadEntries?(opts?: {
119
+ cursor?: AppendCursor;
120
+ pageSize?: number;
121
+ keyFilter?: string;
122
+ }): AppendLoadResult<T> | Promise<AppendLoadResult<T>>;
123
+ /** Partition key per-entry (default `() => name ?? "append-log"`). */
124
+ keyOf?: (entry: T) => string;
125
+ }
126
+ /** Opaque cursor for windowed `loadEntries` pagination. */
127
+ type AppendCursor = Readonly<{
128
+ position: number;
129
+ tag?: string;
130
+ }> & {
131
+ readonly __brand: "AppendCursor";
132
+ };
133
+ type AppendLoadResult<T> = {
134
+ entries: readonly T[];
135
+ cursor: AppendCursor | undefined;
136
+ };
137
+ /**
138
+ * In-process bytes backend backed by `Map<string, Uint8Array>`. Useful for
139
+ * tests, hot tiers, and as a default for the convenience factories below.
140
+ *
141
+ * @category extra
142
+ */
143
+ declare function memoryBackend(): StorageBackend;
144
+ type SnapshotStorageOptions<T> = {
145
+ name?: string;
146
+ codec?: Codec<T>;
147
+ debounceMs?: number;
148
+ compactEvery?: number;
149
+ filter?: (snapshot: T) => boolean;
150
+ keyOf?: (snapshot: T) => string;
151
+ };
152
+ /**
153
+ * Wrap a {@link StorageBackend} as a typed snapshot tier.
154
+ *
155
+ * Buffer model: `save(snapshot)` accumulates one pending snapshot in memory.
156
+ * `flush()` encodes via codec and writes to the backend under
157
+ * `keyOf(snapshot)` (default `name ?? "snapshot"`). `rollback()` discards
158
+ * the pending write.
159
+ *
160
+ * @category extra
161
+ */
162
+ declare function snapshotStorage<T>(backend: StorageBackend, opts?: SnapshotStorageOptions<T>): SnapshotStorageTier<T>;
163
+ type AppendLogStorageOptions<T> = {
164
+ name?: string;
165
+ codec?: Codec<readonly T[]>;
166
+ keyOf?: (entry: T) => string;
167
+ debounceMs?: number;
168
+ compactEvery?: number;
169
+ };
170
+ /**
171
+ * Wrap a {@link StorageBackend} as a typed append-log tier.
172
+ *
173
+ * Buffer model: `appendEntries(entries)` accumulates per-key buckets in
174
+ * memory. `flush()` encodes each bucket as a JSON array via codec and writes
175
+ * under that bucket key. `rollback()` discards pending appends.
176
+ *
177
+ * Storage shape: each backend key holds a JSON array of all entries for that
178
+ * partition, growing on every flush. Adapters that need true append semantics
179
+ * (versus rewrite) should layer their own tier impl over the same backend.
180
+ *
181
+ * @category extra
182
+ */
183
+ declare function appendLogStorage<T>(backend: StorageBackend, opts?: AppendLogStorageOptions<T>): AppendLogStorageTier<T>;
184
+ /**
185
+ * Key-value tier — typed records under arbitrary string keys with codec
186
+ * serialization at the storage-tier boundary. Use for content-addressed
187
+ * caches (replay), multi-record archives (snapshot index, AI memory), and
188
+ * fixture stores. Snapshot tier is "one record"; append-log is "sequential
189
+ * entries"; kv is "many records, addressable by key".
190
+ *
191
+ * @category extra
192
+ */
193
+ interface KvStorageTier<T = unknown> extends BaseStorageTier {
194
+ load(key: string): T | undefined | Promise<T | undefined>;
195
+ save(key: string, value: T): void | Promise<void>;
196
+ delete?(key: string): void | Promise<void>;
197
+ list?(prefix?: string): readonly string[] | Promise<readonly string[]>;
198
+ /** Pre-save filter — return `false` to skip persisting this record. */
199
+ filter?: (key: string, value: T) => boolean;
200
+ }
201
+ type KvStorageOptions<T> = {
202
+ name?: string;
203
+ codec?: Codec<T>;
204
+ debounceMs?: number;
205
+ compactEvery?: number;
206
+ filter?: (key: string, value: T) => boolean;
207
+ };
208
+ /**
209
+ * Wrap a {@link StorageBackend} as a typed kv tier.
210
+ *
211
+ * Buffer model: `save(k, v)` encodes via codec and writes to the backend
212
+ * unless debounced. Pending writes are committed on `flush()` and discarded
213
+ * on `rollback()` — the wave-as-transaction model.
214
+ *
215
+ * @category extra
216
+ */
217
+ declare function kvStorage<T>(backend: StorageBackend, opts?: KvStorageOptions<T>): KvStorageTier<T>;
218
+ /**
219
+ * In-memory snapshot tier — `snapshotStorage(memoryBackend(), opts)`.
220
+ *
221
+ * @category extra
222
+ */
223
+ declare function memorySnapshot<T>(opts?: Omit<SnapshotStorageOptions<T>, "name"> & {
224
+ name?: string;
225
+ }): SnapshotStorageTier<T>;
226
+ /**
227
+ * In-memory append-log tier — `appendLogStorage(memoryBackend(), opts)`.
228
+ *
229
+ * @category extra
230
+ */
231
+ declare function memoryAppendLog<T>(opts?: Omit<AppendLogStorageOptions<T>, "name"> & {
232
+ name?: string;
233
+ }): AppendLogStorageTier<T>;
234
+ /**
235
+ * In-memory kv tier — `kvStorage(memoryBackend(), opts)`.
236
+ *
237
+ * @category extra
238
+ */
239
+ declare function memoryKv<T>(opts?: Omit<KvStorageOptions<T>, "name"> & {
240
+ name?: string;
241
+ }): KvStorageTier<T>;
242
+ /**
243
+ * Dict-backed kv tier — wraps a caller-owned plain object as a
244
+ * {@link StorageBackend} and returns a kv tier over it. Useful for
245
+ * embedding in a parent state shape or for tests that need access to the
246
+ * raw bytes.
247
+ *
248
+ * The dict stores raw encoded bytes as `Uint8Array`. Use `opts.name` to
249
+ * control the tier's diagnostic name (defaults to `"dict-kv"`).
250
+ *
251
+ * @example
252
+ * ```ts
253
+ * const store: Record<string, Uint8Array> = {};
254
+ * const tier = dictKv<MyRecord>(store);
255
+ * await tier.save("key1", myRecord);
256
+ * ```
257
+ *
258
+ * @category extra
259
+ */
260
+ declare function dictKv<T>(storage: Record<string, Uint8Array>, opts?: Omit<KvStorageOptions<T>, "name"> & {
261
+ name?: string;
262
+ }): KvStorageTier<T>;
263
+ /**
264
+ * Dict-backed snapshot tier — wraps a caller-owned plain object as a
265
+ * {@link StorageBackend} and returns a snapshot tier over it. Useful for
266
+ * embedding checkpoints inside a parent state shape or for tests that need
267
+ * access to the raw bytes.
268
+ *
269
+ * The dict stores raw JSON bytes as `Uint8Array`. Use `opts.name` to control
270
+ * the storage key (defaults to `"snapshot"`).
271
+ *
272
+ * @example
273
+ * ```ts
274
+ * const store: Record<string, Uint8Array> = {};
275
+ * graph.attachSnapshotStorage([dictSnapshot(store, { name: graph.name })]);
276
+ * ```
277
+ *
278
+ * @category extra
279
+ */
280
+ declare function dictSnapshot<T>(storage: Record<string, Uint8Array>, opts?: Omit<SnapshotStorageOptions<T>, "name"> & {
281
+ name?: string;
282
+ }): SnapshotStorageTier<T>;
283
+
284
+ export { type AppendCursor, type AppendLoadResult, type AppendLogStorageOptions, type AppendLogStorageTier, type BaseStorageTier, type Codec, type KvStorageOptions, type KvStorageTier, type SnapshotStorageOptions, type SnapshotStorageTier, type StorageBackend, appendLogStorage, dictKv, dictSnapshot, jsonCodec, jsonCodecFor, kvStorage, memoryAppendLog, memoryBackend, memoryKv, memorySnapshot, snapshotStorage };