@graphrefly/graphrefly 0.37.0 → 0.39.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 (329) hide show
  1. package/dist/budget-gate-CmmVtasH.d.ts +115 -0
  2. package/dist/budget-gate-DiP_nK0n.d.cts +115 -0
  3. package/dist/{cascading-BsJ4GbnS.d.ts → cascading-BzuxW0_w.d.cts} +2 -2
  4. package/dist/{cascading-B25wxpRa.d.cts → cascading-g2_rhhaM.d.ts} +2 -2
  5. package/dist/chunk-35JTVPOX.js +1 -0
  6. package/dist/chunk-3G5U5QNE.js +5 -0
  7. package/dist/chunk-4I45FVQS.js +1 -0
  8. package/dist/chunk-5LK7XMEV.js +1 -0
  9. package/dist/chunk-5XRI6RM3.js +1 -0
  10. package/dist/chunk-73PBQNST.js +1 -0
  11. package/dist/chunk-7JRF5YEK.js +3 -0
  12. package/dist/{chunk-YVYSO5CW.js → chunk-7NZMZJMW.js} +1 -1
  13. package/dist/chunk-7QFRK3N3.js +84 -0
  14. package/dist/{chunk-K6ZFJ473.js → chunk-7SD73DS6.js} +1 -1
  15. package/dist/{chunk-LOQRPP4Y.js → chunk-A6ZSKGUG.js} +1 -1
  16. package/dist/{chunk-KUVDFOJH.js → chunk-AU7YTQX7.js} +1 -1
  17. package/dist/chunk-C72GO4IZ.js +1 -0
  18. package/dist/{chunk-Q7EUZ6NN.js → chunk-CGDMTXSY.js} +1 -1
  19. package/dist/chunk-D27JNOLZ.js +1 -0
  20. package/dist/chunk-D47YVDR5.js +1 -0
  21. package/dist/chunk-EWF7KCDJ.js +61 -0
  22. package/dist/{chunk-PCD2MU7X.js → chunk-GEAO3TL3.js} +1 -1
  23. package/dist/chunk-GX5LSSRE.js +1 -0
  24. package/dist/{chunk-2C4NESZE.js → chunk-HAWKGIXM.js} +1 -1
  25. package/dist/chunk-HX3EGQ5Z.js +1 -0
  26. package/dist/{chunk-MQZWA3DF.js → chunk-IA7DUNGB.js} +1 -1
  27. package/dist/{chunk-MYFR67PY.js → chunk-INH6FS2G.js} +2 -2
  28. package/dist/chunk-INHC33EH.js +1 -0
  29. package/dist/chunk-IUB4NYI2.js +1 -0
  30. package/dist/{chunk-TFK4P4CX.js → chunk-JNMC2WJ6.js} +1 -1
  31. package/dist/{chunk-TLS7M7H4.js → chunk-KD4NHLMU.js} +1 -1
  32. package/dist/chunk-L6NSJVJZ.js +1 -0
  33. package/dist/chunk-L7WY6TZS.js +1 -0
  34. package/dist/chunk-LQNOXGET.js +1 -0
  35. package/dist/chunk-MC4UYY2X.js +1 -0
  36. package/dist/{chunk-U3COB5WU.js → chunk-N7UIBZCW.js} +1 -1
  37. package/dist/chunk-NQI2C36M.js +1 -0
  38. package/dist/chunk-R75BMDLA.js +1 -0
  39. package/dist/chunk-RF3QZP6D.js +1 -0
  40. package/dist/{chunk-MC5LZG3U.js → chunk-S2U57TFC.js} +1 -1
  41. package/dist/{chunk-QP5TH523.js → chunk-SC7BQDNP.js} +1 -1
  42. package/dist/{chunk-5CPPC75H.js → chunk-TFPZLQ5H.js} +1 -1
  43. package/dist/chunk-VJJLIEAL.js +1 -0
  44. package/dist/chunk-WHIZM6JV.js +1 -0
  45. package/dist/chunk-XEUANKBO.js +43 -0
  46. package/dist/chunk-XQ55HO5N.js +1 -0
  47. package/dist/chunk-ZJ7SM3G2.js +1 -0
  48. package/dist/{chunk-T4U24DXX.js → chunk-ZOX3LBRV.js} +1 -1
  49. package/dist/compat/index.cjs +9 -13
  50. package/dist/compat/index.d.cts +16 -16
  51. package/dist/compat/index.d.ts +16 -16
  52. package/dist/compat/index.js +1 -1
  53. package/dist/compat/jotai/index.d.cts +2 -2
  54. package/dist/compat/jotai/index.d.ts +2 -2
  55. package/dist/compat/nanostores/index.d.cts +2 -2
  56. package/dist/compat/nanostores/index.d.ts +2 -2
  57. package/dist/compat/nestjs/index.cjs +8 -12
  58. package/dist/compat/nestjs/index.d.cts +8 -8
  59. package/dist/compat/nestjs/index.d.ts +8 -8
  60. package/dist/compat/nestjs/index.js +1 -1
  61. package/dist/compat/react/index.d.cts +2 -2
  62. package/dist/compat/react/index.d.ts +2 -2
  63. package/dist/compat/solid/index.d.cts +2 -2
  64. package/dist/compat/solid/index.d.ts +2 -2
  65. package/dist/compat/svelte/index.d.cts +2 -2
  66. package/dist/compat/svelte/index.d.ts +2 -2
  67. package/dist/compat/vue/index.d.cts +2 -2
  68. package/dist/compat/vue/index.d.ts +2 -2
  69. package/dist/compat/zustand/index.cjs +3 -7
  70. package/dist/compat/zustand/index.d.cts +4 -4
  71. package/dist/compat/zustand/index.d.ts +4 -4
  72. package/dist/compat/zustand/index.js +1 -1
  73. package/dist/{composite-_XckYx2e.d.cts → composite-CKd0e2vz.d.cts} +10 -3
  74. package/dist/{composite-CT_mApQD.d.ts → composite-DGatA-JK.d.ts} +10 -3
  75. package/dist/core/index.cjs +1 -1
  76. package/dist/core/index.d.cts +4 -4
  77. package/dist/core/index.d.ts +4 -4
  78. package/dist/core/index.js +1 -1
  79. package/dist/extra/browser.d.cts +1 -1
  80. package/dist/extra/browser.d.ts +1 -1
  81. package/dist/extra/index.cjs +17 -21
  82. package/dist/extra/index.d.cts +11 -9
  83. package/dist/extra/index.d.ts +11 -9
  84. package/dist/extra/index.js +1 -1
  85. package/dist/extra/node.cjs +2 -2
  86. package/dist/extra/node.d.cts +108 -2
  87. package/dist/extra/node.d.ts +108 -2
  88. package/dist/extra/node.js +2 -2
  89. package/dist/extra/operators.cjs +1 -1
  90. package/dist/extra/operators.d.cts +1 -1
  91. package/dist/extra/operators.d.ts +1 -1
  92. package/dist/extra/operators.js +1 -1
  93. package/dist/extra/reactive.cjs +1 -1
  94. package/dist/extra/reactive.d.cts +3 -3
  95. package/dist/extra/reactive.d.ts +3 -3
  96. package/dist/extra/reactive.js +1 -1
  97. package/dist/extra/render/index.cjs +5 -0
  98. package/dist/extra/render/index.d.cts +183 -0
  99. package/dist/extra/render/index.d.ts +183 -0
  100. package/dist/extra/render/index.js +1 -0
  101. package/dist/extra/sources.cjs +1 -1
  102. package/dist/extra/sources.d.cts +1 -1
  103. package/dist/extra/sources.d.ts +1 -1
  104. package/dist/extra/sources.js +1 -1
  105. package/dist/extra/storage-browser.d.cts +1 -1
  106. package/dist/extra/storage-browser.d.ts +1 -1
  107. package/dist/extra/storage-tiers-browser.d.cts +76 -5
  108. package/dist/extra/storage-tiers-browser.d.ts +76 -5
  109. package/dist/extra/storage-tiers-node.d.cts +137 -13
  110. package/dist/extra/storage-tiers-node.d.ts +137 -13
  111. package/dist/extra/storage-tiers.d.cts +151 -23
  112. package/dist/extra/storage-tiers.d.ts +151 -23
  113. package/dist/{fallback-axI2cXwt.d.cts → fallback-8JYU8tlT.d.cts} +1 -1
  114. package/dist/{fallback-DuEXfA4F.d.ts → fallback-CMZl39L5.d.ts} +1 -1
  115. package/dist/graph/index.cjs +7 -7
  116. package/dist/graph/index.d.cts +5 -5
  117. package/dist/graph/index.d.ts +5 -5
  118. package/dist/graph/index.js +1 -1
  119. package/dist/{graph-YQXDndFy.d.ts → graph-30XSgtVX.d.ts} +287 -104
  120. package/dist/{graph-CaNXUc3c.d.cts → graph-BUwMAxJI.d.cts} +287 -104
  121. package/dist/{index-CIcu6fIR.d.ts → index-2n8Eai6M.d.ts} +1 -1
  122. package/dist/{index-BmLkcDlj.d.ts → index-89FczVZ_.d.ts} +47 -71
  123. package/dist/{index-Ci358GSC.d.cts → index-8R1vzNOx.d.cts} +9 -9
  124. package/dist/{index-CDvC1m5p.d.ts → index-B2RUoIUz.d.ts} +1 -1
  125. package/dist/{index-DuhOdNyg.d.ts → index-B41Asm7D.d.ts} +10 -8
  126. package/dist/{index-CKcnuQ2c.d.ts → index-B9fmw5n2.d.ts} +4 -6
  127. package/dist/{index-0qOD-421.d.ts → index-BAlaVimV.d.ts} +9 -9
  128. package/dist/{index-Ae6L8liv.d.ts → index-BC9VybQs.d.ts} +41 -48
  129. package/dist/{index-CUTHDZ7Q.d.ts → index-BEHmxORq.d.ts} +11 -11
  130. package/dist/{index-C_qi0WlF.d.cts → index-BJ26eEjs.d.cts} +26 -19
  131. package/dist/{index-BiomL7AW.d.ts → index-BJSZxSFX.d.ts} +1 -1
  132. package/dist/{index-DCAuN9u5.d.cts → index-BKMdnYnk.d.ts} +75 -39
  133. package/dist/{index-DfAo9WKr.d.ts → index-BM9szD8n.d.cts} +14 -6
  134. package/dist/{index-CajEOoAN.d.ts → index-BUPVld1w.d.ts} +2 -2
  135. package/dist/{index-C-pFD_FV.d.ts → index-BXd6OMEy.d.ts} +3 -3
  136. package/dist/index-BhUaMYm_.d.ts +113 -0
  137. package/dist/{index-DAKm44My.d.cts → index-BndG0cpK.d.cts} +3 -3
  138. package/dist/{index-Bpzw8hx3.d.ts → index-Br3WnqEn.d.ts} +84 -9
  139. package/dist/{index-D6tRNEKz.d.cts → index-BskfDoZ_.d.ts} +14 -6
  140. package/dist/{index-9mbs_PIG.d.ts → index-C19qqa38.d.ts} +4 -4
  141. package/dist/{index-fHKHdAso.d.ts → index-C7VV_qOs.d.ts} +4 -4
  142. package/dist/{index-CLPQyYY5.d.cts → index-CIRG8Hxp.d.cts} +11 -11
  143. package/dist/{index-B3D_z0Z6.d.cts → index-CL7oilfm.d.cts} +1 -1
  144. package/dist/{index-BOfHwQc1.d.ts → index-CPhBvRJU.d.ts} +1 -1
  145. package/dist/{index-B9qJmmv3.d.cts → index-CWHtYmSh.d.cts} +1 -1
  146. package/dist/{index-D_d1erkR.d.ts → index-Cey6VTnX.d.ts} +8 -5
  147. package/dist/{resilience-BWP2c7Af.d.cts → index-CmqiJZKM.d.ts} +141 -23
  148. package/dist/{index-JYtN9uqM.d.ts → index-CoM4rzyB.d.ts} +1 -1
  149. package/dist/{index-DTYIRT_v.d.cts → index-CpLpJb6A.d.cts} +8 -5
  150. package/dist/{index-BjWZARLy.d.ts → index-Ctb7_2sG.d.ts} +1 -1
  151. package/dist/index-CusEP3Sv.d.ts +210 -0
  152. package/dist/{resilience-Bys63Cpd.d.ts → index-CwP_KAMS.d.cts} +141 -23
  153. package/dist/{index-BFuVcqL8.d.cts → index-D3ayz3hy.d.cts} +1 -1
  154. package/dist/{index-CrpjECS6.d.cts → index-DCbE8fFM.d.cts} +3 -3
  155. package/dist/{index-D_DThl_J.d.cts → index-DIHcMLr6.d.cts} +1 -1
  156. package/dist/index-DINuaZlJ.d.cts +210 -0
  157. package/dist/{index-9xhIaM-w.d.cts → index-DOBLxOti.d.cts} +1 -1
  158. package/dist/index-DQUVq1_d.d.ts +374 -0
  159. package/dist/{index-B1IcU--K.d.cts → index-DTtBpuQy.d.cts} +4 -6
  160. package/dist/{index-D_QQ_dTD.d.cts → index-DYTBbF8T.d.cts} +1 -1
  161. package/dist/{index-DqtXA3yX.d.cts → index-DlgHqQxW.d.cts} +84 -9
  162. package/dist/{index-D1E1tqHT.d.ts → index-DlrWu9Hs.d.cts} +75 -39
  163. package/dist/{index-DcWbx58m.d.cts → index-DoYc8BWK.d.cts} +41 -48
  164. package/dist/{index-D0ZxFXYl.d.ts → index-DszPlZzK.d.ts} +3 -3
  165. package/dist/{index-BECJ8M0T.d.cts → index-DyM4tFAe.d.cts} +10 -8
  166. package/dist/{index-D11pGlaI.d.cts → index-FVoPvhAu.d.cts} +4 -4
  167. package/dist/{index-BwtIbzSV.d.cts → index-H_I66pav.d.cts} +2 -2
  168. package/dist/{index-e1m3ZHgc.d.cts → index-IwFqHxCs.d.cts} +2 -2
  169. package/dist/index-K-vl_c6A.d.cts +113 -0
  170. package/dist/{index-C4N-dg5U.d.cts → index-KlZ_ZUip.d.cts} +2 -2
  171. package/dist/index-L8XI8Zql.d.cts +374 -0
  172. package/dist/{index-D8IyqHvT.d.cts → index-MxYuWOrf.d.cts} +6 -4
  173. package/dist/{index-CpZKtdMw.d.cts → index-PgwvGWa1.d.cts} +1 -1
  174. package/dist/{index-B46GWgk3.d.ts → index-PlJ3MraE.d.ts} +1 -1
  175. package/dist/{index-DPqR3wdW.d.ts → index-PqbnoScQ.d.ts} +3 -3
  176. package/dist/{index-CU3z8Cel.d.cts → index-PsVHpPwP.d.cts} +3 -3
  177. package/dist/{index-C0tga1_x.d.ts → index-WyFKER-c.d.ts} +2 -2
  178. package/dist/{index-B5UR87KG.d.ts → index-eaQuGJnv.d.ts} +6 -4
  179. package/dist/{index-CzIWlnPp.d.ts → index-iTX5IqSP.d.ts} +140 -9
  180. package/dist/{index-CRycrNfn.d.ts → index-jKLph6cu.d.ts} +2 -2
  181. package/dist/{index-BhLA9feT.d.ts → index-jr6PuSBt.d.ts} +26 -19
  182. package/dist/{index-4IwO4mH2.d.cts → index-mNwgxC21.d.cts} +140 -9
  183. package/dist/{index-CkN8CZlT.d.cts → index-pVDQcbar.d.cts} +47 -71
  184. package/dist/{index-D6pwWiOc.d.cts → index-xZYcDqFH.d.cts} +4 -4
  185. package/dist/{index-8OxXae3g.d.ts → index-yLt-aPMp.d.ts} +1 -1
  186. package/dist/{index-CqSJ25A9.d.cts → index-z8WFPVI8.d.cts} +1 -1
  187. package/dist/index.cjs +64 -60
  188. package/dist/index.d.cts +48 -47
  189. package/dist/index.d.ts +48 -47
  190. package/dist/index.js +1 -1
  191. package/dist/meta-Ct9nqQS5.d.cts +102 -0
  192. package/dist/meta-D8OyedKp.d.ts +102 -0
  193. package/dist/{node-fSc-hCv8.d.cts → node-BYInONRr.d.cts} +3 -3
  194. package/dist/{node-fSc-hCv8.d.ts → node-BYInONRr.d.ts} +3 -3
  195. package/dist/{observable-Cqty11jG.d.cts → observable-DMIlYJV1.d.cts} +1 -1
  196. package/dist/{observable-EAV_rNfM.d.ts → observable-DO8DDEzv.d.ts} +1 -1
  197. package/dist/patterns/ai/browser.cjs +5 -5
  198. package/dist/patterns/ai/browser.d.cts +4 -4
  199. package/dist/patterns/ai/browser.d.ts +4 -4
  200. package/dist/patterns/ai/browser.js +1 -1
  201. package/dist/patterns/ai/index.cjs +17 -21
  202. package/dist/patterns/ai/index.d.cts +17 -17
  203. package/dist/patterns/ai/index.d.ts +17 -17
  204. package/dist/patterns/ai/index.js +1 -1
  205. package/dist/patterns/ai/node.cjs +1 -1
  206. package/dist/patterns/ai/node.d.cts +4 -4
  207. package/dist/patterns/ai/node.d.ts +4 -4
  208. package/dist/patterns/ai/node.js +1 -1
  209. package/dist/patterns/audit/index.cjs +3 -7
  210. package/dist/patterns/audit/index.d.cts +6 -6
  211. package/dist/patterns/audit/index.d.ts +6 -6
  212. package/dist/patterns/audit/index.js +1 -1
  213. package/dist/patterns/cqrs/index.cjs +3 -7
  214. package/dist/patterns/cqrs/index.d.cts +6 -6
  215. package/dist/patterns/cqrs/index.d.ts +6 -6
  216. package/dist/patterns/cqrs/index.js +1 -1
  217. package/dist/patterns/demo-shell/index.cjs +5 -8
  218. package/dist/patterns/demo-shell/index.d.cts +5 -5
  219. package/dist/patterns/demo-shell/index.d.ts +5 -5
  220. package/dist/patterns/demo-shell/index.js +1 -1
  221. package/dist/patterns/domain-templates/index.cjs +3 -7
  222. package/dist/patterns/domain-templates/index.d.cts +4 -4
  223. package/dist/patterns/domain-templates/index.d.ts +4 -4
  224. package/dist/patterns/domain-templates/index.js +1 -1
  225. package/dist/patterns/graphspec/index.cjs +38 -38
  226. package/dist/patterns/graphspec/index.d.cts +5 -5
  227. package/dist/patterns/graphspec/index.d.ts +5 -5
  228. package/dist/patterns/graphspec/index.js +1 -1
  229. package/dist/patterns/guarded-execution/index.cjs +3 -7
  230. package/dist/patterns/guarded-execution/index.d.cts +7 -7
  231. package/dist/patterns/guarded-execution/index.d.ts +7 -7
  232. package/dist/patterns/guarded-execution/index.js +1 -1
  233. package/dist/patterns/harness/index.cjs +8 -12
  234. package/dist/patterns/harness/index.d.cts +12 -12
  235. package/dist/patterns/harness/index.d.ts +12 -12
  236. package/dist/patterns/harness/index.js +1 -1
  237. package/dist/patterns/job-queue/index.cjs +3 -7
  238. package/dist/patterns/job-queue/index.d.cts +6 -6
  239. package/dist/patterns/job-queue/index.d.ts +6 -6
  240. package/dist/patterns/job-queue/index.js +1 -1
  241. package/dist/patterns/lens/index.cjs +3 -7
  242. package/dist/patterns/lens/index.d.cts +6 -6
  243. package/dist/patterns/lens/index.d.ts +6 -6
  244. package/dist/patterns/lens/index.js +1 -1
  245. package/dist/patterns/memory/index.cjs +3 -7
  246. package/dist/patterns/memory/index.d.cts +7 -5
  247. package/dist/patterns/memory/index.d.ts +7 -5
  248. package/dist/patterns/memory/index.js +1 -1
  249. package/dist/patterns/messaging/index.cjs +3 -7
  250. package/dist/patterns/messaging/index.d.cts +5 -5
  251. package/dist/patterns/messaging/index.d.ts +5 -5
  252. package/dist/patterns/messaging/index.js +1 -1
  253. package/dist/patterns/orchestration/index.cjs +3 -7
  254. package/dist/patterns/orchestration/index.d.cts +8 -8
  255. package/dist/patterns/orchestration/index.d.ts +8 -8
  256. package/dist/patterns/orchestration/index.js +1 -1
  257. package/dist/patterns/process/index.cjs +1 -1
  258. package/dist/patterns/process/index.d.cts +7 -7
  259. package/dist/patterns/process/index.d.ts +7 -7
  260. package/dist/patterns/process/index.js +1 -1
  261. package/dist/patterns/reactive-layout/index.cjs +4 -8
  262. package/dist/patterns/reactive-layout/index.d.cts +5 -5
  263. package/dist/patterns/reactive-layout/index.d.ts +5 -5
  264. package/dist/patterns/reactive-layout/index.js +1 -1
  265. package/dist/patterns/reduction/index.cjs +3 -7
  266. package/dist/patterns/reduction/index.d.cts +4 -4
  267. package/dist/patterns/reduction/index.d.ts +4 -4
  268. package/dist/patterns/reduction/index.js +1 -1
  269. package/dist/patterns/refine-loop/index.cjs +5 -9
  270. package/dist/patterns/refine-loop/index.d.cts +6 -6
  271. package/dist/patterns/refine-loop/index.d.ts +6 -6
  272. package/dist/patterns/refine-loop/index.js +1 -1
  273. package/dist/patterns/resilient-pipeline/index.cjs +1 -1
  274. package/dist/patterns/resilient-pipeline/index.d.cts +4 -8
  275. package/dist/patterns/resilient-pipeline/index.d.ts +4 -8
  276. package/dist/patterns/resilient-pipeline/index.js +1 -1
  277. package/dist/patterns/surface/index.cjs +13 -17
  278. package/dist/patterns/surface/index.d.cts +6 -6
  279. package/dist/patterns/surface/index.d.ts +6 -6
  280. package/dist/patterns/surface/index.js +1 -1
  281. package/dist/{pipeline-graph-BrrYGjuZ.d.cts → pipeline-graph-BQPr2Lqs.d.cts} +34 -17
  282. package/dist/{pipeline-graph-DX2Twdj-.d.ts → pipeline-graph-D8vKcO_p.d.ts} +34 -17
  283. package/dist/{reactive-layout-DrGjuwyC.d.cts → reactive-layout-8CSc0tiA.d.cts} +2 -2
  284. package/dist/{reactive-layout-BDdngW56.d.ts → reactive-layout-DkTXxtSy.d.ts} +2 -2
  285. package/dist/{reactive-log-jirQsxMY.d.ts → reactive-log-BlAsPLl2.d.ts} +30 -3
  286. package/dist/{reactive-log-ScpWyqny.d.cts → reactive-log-_zeEnB9H.d.cts} +30 -3
  287. package/dist/{reactive-map-DmgeADH8.d.cts → reactive-map-B2qfD3hb.d.cts} +1 -1
  288. package/dist/{reactive-map-CHyeCf4D.d.ts → reactive-map-jFIsE6Kt.d.ts} +1 -1
  289. package/dist/resilience-HTF2LBRS.js +1 -0
  290. package/dist/{sugar-D13E2M_z.d.ts → sugar-BhfjgetH.d.ts} +1 -1
  291. package/dist/{sugar-DgaGJcI6.d.cts → sugar-DzePN5-g.d.cts} +1 -1
  292. package/dist/{topology-tree-BkhmMg2a.d.cts → topology-tree-B5Ngw3j0.d.cts} +1 -1
  293. package/dist/{topology-tree-BI665P0L.d.ts → topology-tree-BtvbgMXJ.d.ts} +1 -1
  294. package/dist/{types-BMSGPlpO.d.cts → types-1Dhoi7HM.d.cts} +1 -1
  295. package/dist/{types-CidcBDuk.d.ts → types-39jk0kaV.d.ts} +1 -1
  296. package/package.json +11 -1
  297. package/dist/chunk-4EATTNAE.js +0 -1
  298. package/dist/chunk-533RQFF6.js +0 -1
  299. package/dist/chunk-6SVKZ7VI.js +0 -1
  300. package/dist/chunk-A5HZZYRK.js +0 -1
  301. package/dist/chunk-B4L5X2QO.js +0 -7
  302. package/dist/chunk-C5CBVOCB.js +0 -1
  303. package/dist/chunk-CZIQ6JCE.js +0 -1
  304. package/dist/chunk-FJ6IEMOS.js +0 -1
  305. package/dist/chunk-FMI4CWFL.js +0 -1
  306. package/dist/chunk-G6Q3DUMJ.js +0 -1
  307. package/dist/chunk-GDDPCDLG.js +0 -1
  308. package/dist/chunk-GFOT6UBB.js +0 -1
  309. package/dist/chunk-JJTF75VS.js +0 -1
  310. package/dist/chunk-K2WYIVHM.js +0 -1
  311. package/dist/chunk-KTWBUJO5.js +0 -61
  312. package/dist/chunk-M27MVZCP.js +0 -1
  313. package/dist/chunk-NKKUUKPD.js +0 -43
  314. package/dist/chunk-O32GJOUJ.js +0 -1
  315. package/dist/chunk-QKBCTKH7.js +0 -1
  316. package/dist/chunk-QWVQIL3T.js +0 -1
  317. package/dist/chunk-UODQF4EY.js +0 -1
  318. package/dist/chunk-WGST56ZH.js +0 -80
  319. package/dist/chunk-WSLN4JFO.js +0 -1
  320. package/dist/chunk-XIJKEXWR.js +0 -1
  321. package/dist/imperative-audit-ahAE65a9.d.cts +0 -28
  322. package/dist/imperative-audit-ahAE65a9.d.ts +0 -28
  323. package/dist/index-BCq12BqB.d.ts +0 -139
  324. package/dist/index-BokynmA4.d.cts +0 -186
  325. package/dist/index-DXz9uwcs.d.ts +0 -186
  326. package/dist/index-DbWwMWiB.d.cts +0 -139
  327. package/dist/meta-BGO6C7K9.d.cts +0 -41
  328. package/dist/meta-CC6EPdpK.d.ts +0 -41
  329. package/dist/resilience-OBU472D2.js +0 -1
@@ -1,4 +1,4 @@
1
- import { a as Node } from './node-fSc-hCv8.js';
1
+ import { N as Node } from './node-BYInONRr.cjs';
2
2
 
3
3
  /**
4
4
  * Backoff strategies for {@link retry} (roadmap §3.1). Delays are in **nanoseconds**.
@@ -153,8 +153,19 @@ declare function withMaxAttempts(strategy: BackoffStrategy, maxAttempts: number)
153
153
  */
154
154
  declare function resolveBackoffPreset(name: BackoffPreset): BackoffStrategy;
155
155
 
156
+ /**
157
+ * Resilience utilities — roadmap §3.1 + §3.1c (retry, breaker, rate limit, status,
158
+ * fallback, cache, timeout, budgetGate).
159
+ */
160
+
156
161
  type RetryOptions = {
157
- /** Max retry attempts after each terminal `ERROR` (not counting the first failure). */
162
+ /**
163
+ * Max retry attempts after each terminal `ERROR` (not counting the first failure).
164
+ *
165
+ * **Required when `backoff` is set.** Pass `Infinity` to opt in to unbounded retries
166
+ * — the explicit value rules out the silent-infinite-budget footgun (a flaky provider
167
+ * + exponential backoff + omitted `count` would previously default to ~2.1B retries).
168
+ */
158
169
  count?: number;
159
170
  /** Delay between attempts; strategies use **nanoseconds**. */
160
171
  backoff?: BackoffStrategy | BackoffPreset;
@@ -177,12 +188,16 @@ type RetryFactoryOptions<T> = RetryOptions & {
177
188
  * same retry pipeline as inner-node ERROR.
178
189
  *
179
190
  * @param input - Upstream node or factory that returns a fresh node per attempt.
180
- * @param opts - `count` caps attempts; `backoff` supplies delay in **nanoseconds** (or a preset name); `initial` seeds the outer node cache (factory mode only).
191
+ * @param opts - `count` caps attempts (**required when `backoff` is set**; pass `Infinity` to opt in to unbounded); `backoff` supplies delay in **nanoseconds** (or a preset name); `initial` seeds the outer node cache (factory mode only).
181
192
  * @returns Node that retries on error.
182
193
  *
194
+ * @throws {RangeError} when `backoff` is provided without an explicit `count` (unbounded-retry footgun guard) or when `count < 0`.
195
+ *
183
196
  * @remarks
184
197
  * **Protocol:** Forwards unknown message tuples unchanged; handles `DIRTY`, `DATA`, `RESOLVED`, `COMPLETE`, `ERROR`.
185
198
  *
199
+ * **Backoff floor:** every scheduled delay is floored at 1ms via `Math.max(1, delayNs / NS_PER_MS)` even when the strategy returns 0ns. This avoids 0-delay re-entrancy on the active stack frame on a tight ERROR loop. Strategies that return `null`/`undefined` stop retrying immediately and forward the original error.
200
+ *
186
201
  * @example
187
202
  * ```ts
188
203
  * // Source mode — resubscribe the same node:
@@ -226,7 +241,12 @@ interface CircuitBreakerOptions {
226
241
  cooldown?: BackoffStrategy;
227
242
  /** Max trial requests allowed in half-open state. Default: 1. */
228
243
  halfOpenMax?: number;
229
- /** Clock function returning nanoseconds (for testability). Default: `monotonicNs`. */
244
+ /**
245
+ * Clock function returning **nanoseconds** with `monotonicNs()` semantics
246
+ * (monotonically non-decreasing; suitable for elapsed-time arithmetic — never
247
+ * use `Date.now()` because wall-clock skew can flip elapsed math negative).
248
+ * Default: `monotonicNs` from `core/clock`. Override for deterministic tests.
249
+ */
230
250
  now?: () => number;
231
251
  }
232
252
  interface CircuitBreaker {
@@ -236,7 +256,13 @@ interface CircuitBreaker {
236
256
  recordSuccess(): void;
237
257
  /** Record a failed execution. May transition to open. */
238
258
  recordFailure(error?: unknown): void;
239
- /** Current circuit state (read-only, does not trigger transitions). */
259
+ /**
260
+ * Current circuit state (read-only, does not trigger transitions).
261
+ *
262
+ * **Telemetry:** wrap with {@link withBreaker} to surface this as a reactive
263
+ * `Node<CircuitState>` companion (`bundle.breakerState`) — every state
264
+ * transition (`closed`/`open`/`half-open`) emits to subscribers.
265
+ */
240
266
  readonly state: CircuitState;
241
267
  /** Number of consecutive failures in the current closed period. */
242
268
  readonly failureCount: number;
@@ -282,6 +308,8 @@ type WithBreakerBundle<T> = {
282
308
  * @remarks
283
309
  * **Success path:** `COMPLETE` calls {@link CircuitBreaker.recordSuccess}. **Failure path:** upstream `ERROR` calls {@link CircuitBreaker.recordFailure} and is forwarded.
284
310
  *
311
+ * **State telemetry:** `breakerState: Node<CircuitState>` is a reactive companion that mirrors `breaker.state` — every transition (`closed`/`open`/`half-open`) emits a `DATA`. Also accessible via `node.meta.breakerState` for `describe()` traversal.
312
+ *
285
313
  * @example
286
314
  * ```ts
287
315
  * import { state, withBreaker, circuitBreaker } from "@graphrefly/graphrefly-ts";
@@ -297,7 +325,14 @@ declare function withBreaker<T>(breaker: CircuitBreaker, options?: {
297
325
  onOpen?: "skip" | "error";
298
326
  }): (source: Node<T>) => WithBreakerBundle<T>;
299
327
  interface TokenBucket {
300
- /** Number of tokens currently available (after refill). */
328
+ /**
329
+ * Number of tokens currently available (after refill).
330
+ *
331
+ * **Float-valued.** When `refillPerSecond` is fractional (or `capacity` × elapsed-fraction
332
+ * yields a non-integer), the bucket accumulates fractional refill credit between
333
+ * `tryConsume`s. Consumers should not assume integer tokens — e.g. with
334
+ * `tokenBucket(10, 2.5)` after 100ms of elapsed time `available()` may report `0.25`.
335
+ */
301
336
  available(): number;
302
337
  /** Try to consume `cost` tokens. Returns `true` if successful. */
303
338
  tryConsume(cost?: number): boolean;
@@ -310,33 +345,68 @@ interface TokenBucket {
310
345
  */
311
346
  putBack(cost?: number): void;
312
347
  }
348
+ /** Optional configuration for {@link tokenBucket}. */
349
+ interface TokenBucketOptions {
350
+ /**
351
+ * Clock function returning **nanoseconds** with `monotonicNs()` semantics
352
+ * (monotonically non-decreasing). Default: `monotonicNs` from `core/clock`.
353
+ * Override for deterministic tests — eliminates the need for `vi.useFakeTimers`
354
+ * to drive token-refill scheduling.
355
+ */
356
+ clock?: () => number;
357
+ }
313
358
  /**
314
359
  * Token-bucket meter (capacity + refill rate per second). Use with {@link rateLimiter} or custom gates.
315
360
  *
316
361
  * @param capacity - Maximum tokens (must be positive).
317
- * @param refillPerSecond - Tokens added per elapsed second (non-negative).
362
+ * @param refillPerSecond - Tokens added per elapsed second (non-negative; may be fractional).
363
+ * @param opts - Optional `clock` override for deterministic testing.
318
364
  * @returns {@link TokenBucket} instance.
319
365
  *
366
+ * @remarks
367
+ * **Float behavior:** the internal token counter is float-valued — fractional refill
368
+ * accumulates between `tryConsume` calls. See {@link TokenBucket.available} for caveats.
369
+ *
370
+ * **Clock injection:** pass `opts.clock` to drive refill scheduling deterministically
371
+ * in tests. The contract matches {@link circuitBreaker}'s `now` option: must return
372
+ * `monotonicNs()`-style nanoseconds, never `Date.now()` (wall-clock skew breaks
373
+ * elapsed math).
374
+ *
320
375
  * @example
321
376
  * ```ts
322
377
  * import { tokenBucket } from "@graphrefly/graphrefly-ts";
323
378
  *
324
379
  * const bucket = tokenBucket(10, 2); // capacity 10, refill 2 tokens/sec
325
380
  * bucket.tryConsume(3); // true — 7 tokens remaining
326
- * bucket.available(); // ~7 (plus any elapsed refill)
381
+ * bucket.available(); // ~7 (plus any elapsed refill — float-valued)
382
+ *
383
+ * // Deterministic test:
384
+ * let t = 0;
385
+ * const tb = tokenBucket(5, 1, { clock: () => t });
386
+ * tb.tryConsume(5); // exhausts
387
+ * t = 1_000_000_000; // advance 1s → +1 refill
388
+ * tb.tryConsume(1); // true
327
389
  * ```
328
390
  *
329
391
  * @category extra
330
392
  */
331
- declare function tokenBucket(capacity: number, refillPerSecond: number): TokenBucket;
393
+ declare function tokenBucket(capacity: number, refillPerSecond: number, opts?: TokenBucketOptions): TokenBucket;
332
394
  type RateLimiterOverflowPolicy = "drop-oldest" | "drop-newest" | "error";
333
395
  type RateLimiterOptions = {
334
396
  /** Maximum `DATA` emissions per window (must be > 0). */
335
397
  maxEvents: number;
336
398
  /** Window length in nanoseconds (must be > 0). */
337
399
  windowNs: number;
338
- /** Cap on items queued while waiting for token refill (must be >= 1). Unbounded if omitted. */
339
- maxBuffer?: number;
400
+ /**
401
+ * Cap on items queued while waiting for token refill.
402
+ *
403
+ * **Required.** Pass a finite positive integer (>= 1) for a bounded queue, OR
404
+ * the literal `Infinity` to opt in to an unbounded queue (caller acknowledges
405
+ * the unbounded-memory-growth risk on a high-rate source). Omitting this
406
+ * throws at construction time — the silent-unbounded-buffer footgun is the
407
+ * most common rateLimiter mis-configuration.
408
+ */
409
+ maxBuffer: number;
340
410
  /** Overflow policy when `maxBuffer` is exceeded. Default: `"drop-newest"`. */
341
411
  onOverflow?: RateLimiterOverflowPolicy;
342
412
  };
@@ -349,19 +419,42 @@ declare class RateLimiterOverflowError extends Error {
349
419
  name: string;
350
420
  constructor(maxBuffer: number);
351
421
  }
422
+ /** Bundle returned by {@link rateLimiter}. */
423
+ type RateLimiterBundle<T> = {
424
+ /** The throttled stream — at most `maxEvents` `DATA` per `windowNs`. */
425
+ node: Node<T>;
426
+ /**
427
+ * Reactive companion: count of `DATA` items dropped since subscription start.
428
+ *
429
+ * - Increments on every drop under any overflow policy (`drop-newest`,
430
+ * `drop-oldest`). The `error` policy terminates the stream after a single
431
+ * overflow, so `droppedCount` increments at most once in that path.
432
+ * - Resets to `0` on terminal (`COMPLETE` / `ERROR` / `TEARDOWN`) — i.e. the
433
+ * counter scopes to the active subscription cycle.
434
+ * - Producer-pattern note: this companion is invisible to `describe()`
435
+ * traversal from `node` (effect-mirror limitation; same shape as
436
+ * `withBreaker.breakerState` and `withStatus.status`). Surface it via
437
+ * `node.meta.droppedCount` if you need it in topology snapshots.
438
+ */
439
+ droppedCount: Node<number>;
440
+ };
352
441
  /**
353
442
  * Token-bucket rate limiter: at most `maxEvents` `DATA` values per `windowNs`.
354
443
  *
355
444
  * Uses {@link tokenBucket} internally (capacity = `maxEvents`, refill = `maxEvents / windowSeconds`).
356
- * Excess items are queued FIFO until a token is available. The queue may be bounded via
357
- * `maxBuffer` with a configurable overflow policy.
445
+ * Excess items are queued FIFO (in a fixed-capacity {@link RingBuffer} for O(1) push/shift)
446
+ * until a token is available. The queue is bounded by the **required** `maxBuffer` option
447
+ * with a configurable overflow policy.
358
448
  *
359
449
  * @param source - Upstream node.
360
- * @param opts - Rate + optional bounded-buffer configuration.
361
- * @returns Node that emits DATA at most `maxEvents` per `windowNs`.
450
+ * @param opts - Rate + bounded-buffer configuration. `maxBuffer` is required (use `Infinity` to opt in to unbounded).
451
+ * @returns `{ node, droppedCount }` bundle. Subscribe to `node` for the throttled stream and to `droppedCount` for backpressure pressure.
452
+ *
453
+ * @throws {RangeError} when `maxEvents` / `windowNs` is non-positive, when `maxBuffer` is omitted, or when `maxBuffer` is a finite value < 1.
362
454
  *
363
455
  * @remarks
364
- * **Terminal:** `COMPLETE` / `ERROR` cancel the refill timer, drop the pending queue, and propagate.
456
+ * **Terminal:** `COMPLETE` / `ERROR` cancel the refill timer, drop the pending queue,
457
+ * reset `droppedCount` to `0`, and propagate.
365
458
  *
366
459
  * @example
367
460
  * ```ts
@@ -369,13 +462,18 @@ declare class RateLimiterOverflowError extends Error {
369
462
  *
370
463
  * const src = state(0);
371
464
  * // Allow at most 5 DATA values per second; queue up to 100 excess items, drop newest beyond.
372
- * const limited = rateLimiter(src, { maxEvents: 5, windowNs: NS_PER_SEC, maxBuffer: 100 });
465
+ * const { node: limited, droppedCount } = rateLimiter(src, {
466
+ * maxEvents: 5,
467
+ * windowNs: NS_PER_SEC,
468
+ * maxBuffer: 100,
469
+ * });
470
+ * droppedCount.subscribe(([m]) => console.log("dropped so far:", m[1]));
373
471
  * ```
374
472
  *
375
473
  * @category extra
376
474
  */
377
- declare function rateLimiter<T>(source: Node<T>, opts: RateLimiterOptions): Node<T>;
378
- type StatusValue = "pending" | "active" | "completed" | "errored";
475
+ declare function rateLimiter<T>(source: Node<T>, opts: RateLimiterOptions): RateLimiterBundle<T>;
476
+ type StatusValue = "pending" | "running" | "completed" | "errored";
379
477
  type WithStatusBundle<T> = {
380
478
  node: Node<T>;
381
479
  status: Node<StatusValue>;
@@ -386,10 +484,25 @@ type WithStatusBundle<T> = {
386
484
  *
387
485
  * @param src - Upstream node to mirror.
388
486
  * @param options - `initialStatus` defaults to `"pending"`.
389
- * @returns `{ node, status, error }` where `error` holds the last `ERROR` payload.
487
+ * @returns `{ node, status, error }` where `out` is the mirrored stream, `status` is a
488
+ * reactive `Node<StatusValue>` (`"pending" | "running" | "completed" | "errored"`),
489
+ * and `error` holds the last `ERROR` payload (cleared to `null` on the next `DATA`
490
+ * after `errored`).
390
491
  *
391
492
  * @remarks
392
- * **Recovery:** After `errored`, the next `DATA` clears `error` and sets `active` inside {@link batch} (matches graphrefly-py).
493
+ * **Lifecycle:** `pending` (no DATA yet) `running` (on first DATA) `completed`
494
+ * (on COMPLETE) or `errored` (on ERROR). After `errored`, the next `DATA` clears
495
+ * `error` and re-enters `running` inside a {@link batch} so subscribers see one
496
+ * consistent transition (matches graphrefly-py).
497
+ *
498
+ * **Producer-pattern visibility:** `out` is built via `node([], fn, …)`, so `src`
499
+ * appears as the source dependency in `describe()` traversal but the `status` /
500
+ * `error` companions are mirrored via subscribe-callback effects — they appear
501
+ * under `out.meta.status` / `out.meta.error` (and as `<name>::__meta__::status`
502
+ * paths in `describe()`) rather than as separate top-level edges. Subscribers
503
+ * to `out` see the throttled DATA stream; `status` / `error` companions may not
504
+ * appear as edges in `describe()` if no consumer subscribes to them (per
505
+ * COMPOSITION-GUIDE §1, push-on-subscribe semantics).
393
506
  *
394
507
  * @example
395
508
  * ```ts
@@ -399,7 +512,7 @@ type WithStatusBundle<T> = {
399
512
  * const { node, status, error } = withStatus(src);
400
513
  *
401
514
  * status.subscribe((msgs) => console.log("status:", msgs));
402
- * src.down([[DATA, 42]]); // status → "active"
515
+ * src.down([[DATA, 42]]); // status → "running"
403
516
  * ```
404
517
  *
405
518
  * @category extra
@@ -457,9 +570,14 @@ declare function fallback<T>(source: Node<T>, fb: FallbackInput<T>): Node<T>;
457
570
  * the timer. Terminal messages (`COMPLETE`/`ERROR`) cancel the timer.
458
571
  *
459
572
  * @param source - Upstream node.
460
- * @param timeoutNs - Deadline in nanoseconds.
573
+ * @param timeoutNs - Deadline in **nanoseconds** (must be > 0). Internally converted to milliseconds for `setTimeout` scheduling.
461
574
  * @returns Node that errors on timeout.
462
575
  *
576
+ * @throws {RangeError} when `timeoutNs <= 0`.
577
+ *
578
+ * @remarks
579
+ * **Scheduling:** internally uses {@link ResettableTimer} (raw `setTimeout`) per spec §5.10's resilience-operator carve-out. The deadline is `timeoutNs / NS_PER_MS` ms; sub-millisecond `timeoutNs` values get the same minimum-1ms host-scheduler granularity that `setTimeout` provides.
580
+ *
463
581
  * @example
464
582
  * ```ts
465
583
  * import { timeout, never, NS_PER_SEC } from "@graphrefly/graphrefly-ts";
@@ -1,4 +1,4 @@
1
- import { a as Node } from './node-fSc-hCv8.cjs';
1
+ import { N as Node } from './node-BYInONRr.cjs';
2
2
 
3
3
  /**
4
4
  * Subscribe to a read-only `Node<T>` as a React value. Re-renders on node value settlement.
@@ -1,6 +1,6 @@
1
- import { M as MeasurementAdapter, P as PreparedSegment, L as LineBreaksResult, C as CharPosition, a as LayoutCursor, I as Interval, b as LayoutLine, c as LayoutNextLineContext, d as LayoutNextLineResult, R as ReactiveLayoutBundle, e as ReactiveLayoutOptions, S as SegmentBreakKind, f as SegmentMeasureStats, g as analyzeAndMeasure, h as carveTextLineSlots, i as computeCharPositions, j as computeLineBreaks, l as layoutNextLine, r as reactiveLayout } from './reactive-layout-DrGjuwyC.cjs';
2
- import { a as Node } from './node-fSc-hCv8.cjs';
3
- import { G as Graph } from './graph-CaNXUc3c.cjs';
1
+ import { M as MeasurementAdapter, P as PreparedSegment, L as LineBreaksResult, C as CharPosition, a as LayoutCursor, I as Interval, b as LayoutLine, c as LayoutNextLineContext, d as LayoutNextLineResult, R as ReactiveLayoutBundle, e as ReactiveLayoutOptions, S as SegmentBreakKind, f as SegmentMeasureStats, g as analyzeAndMeasure, h as carveTextLineSlots, i as computeCharPositions, j as computeLineBreaks, l as layoutNextLine, r as reactiveLayout } from './reactive-layout-8CSc0tiA.cjs';
2
+ import { N as Node } from './node-BYInONRr.cjs';
3
+ import { G as Graph } from './graph-BUwMAxJI.cjs';
4
4
 
5
5
  /**
6
6
  * MeasurementAdapter implementations (roadmap §7.1 — pluggable backends).
@@ -1,4 +1,4 @@
1
- import { G as Graph } from './graph-CaNXUc3c.cjs';
1
+ import { G as Graph } from './graph-BUwMAxJI.cjs';
2
2
 
3
3
  /** Zustand-compatible Store API. */
4
4
  interface StoreApi<T> {
@@ -0,0 +1,210 @@
1
+ import { b as NodeGuard, N as Node } from './node-BYInONRr.cjs';
2
+ import { G as Graph } from './graph-BUwMAxJI.cjs';
3
+ import { R as ReactiveLogOptions, a as ReactiveLogBundle } from './reactive-log-_zeEnB9H.cjs';
4
+
5
+ /**
6
+ * Audited-mutation framework (Audit 2 — locked 2026-04-24; promoted to
7
+ * `extra/mutation/` per consolidation plan §1, Tier 2.2).
8
+ *
9
+ * Phase-4 primitives share the same shape: imperative mutation methods +
10
+ * closure state + reactive audit log + freeze-at-entry + rollback-on-throw.
11
+ * This module factors out the common machinery so each primitive becomes
12
+ * declarative wiring over typed audit records:
13
+ * - `approvalGate`, `pipeline.approvalGate` (Wave A.2 Unit 8)
14
+ * - `JobQueueGraph` (Wave B.3 Unit 15)
15
+ * - `CqrsGraph.dispatch` (Wave C.2 Unit 20)
16
+ * - `CqrsGraph.saga` (Wave C.3 Unit 22)
17
+ * - `processManager` (Wave 7)
18
+ */
19
+
20
+ /**
21
+ * Bounded increment for a self-owned counter state node.
22
+ *
23
+ * Reads `counter.cache`, bumps by 1 if under `cap`, writes back. Returns
24
+ * `false` when the cap is reached. Documented P3 exception: the counter is
25
+ * not a declared dep of the caller — it's a private budget read+written from
26
+ * a single call site. This helper keeps the `.cache` access in one named
27
+ * place.
28
+ *
29
+ * **Safety today:**
30
+ * 1. Single-threaded JS runner never invokes the caller concurrently.
31
+ * 2. `counter.down` writes the cache synchronously before returning, so
32
+ * synchronous re-entry through a downstream publish reads the
33
+ * freshly-incremented value — no double-count.
34
+ *
35
+ * **Future risk:** under a free-threaded runner (PY no-GIL or hypothetical
36
+ * concurrent TS runner), two concurrent firings could still race. Revisit
37
+ * when that surfaces.
38
+ */
39
+ declare function tryIncrementBounded(counter: Node<number>, cap: number): boolean;
40
+ /** Shared base shape for every audit record. Per-primitive types extend this. */
41
+ interface BaseAuditRecord {
42
+ readonly t_ns: number;
43
+ readonly seq?: number;
44
+ readonly handlerVersion?: {
45
+ id: string;
46
+ version: string | number;
47
+ };
48
+ }
49
+ /**
50
+ * Allow `observe` and `signal`; deny external `write` on the audit log so
51
+ * consumers can subscribe + signal-bridge but cannot inject fake records.
52
+ */
53
+ declare const DEFAULT_AUDIT_GUARD: NodeGuard;
54
+ type AuditLogOpts<R extends BaseAuditRecord> = {
55
+ name: string;
56
+ /** Bounded retention; default 1024 per Audit 2 / cross-cutting bounded-default policy. */
57
+ retainedLimit?: number;
58
+ /** Override the default audit guard. */
59
+ guard?: NodeGuard;
60
+ /** Mount the audit `entries` Node under this graph (and activate withLatest). */
61
+ graph?: Graph;
62
+ /** Pass-through to {@link reactiveLog}. */
63
+ versioning?: ReactiveLogOptions<R>["versioning"];
64
+ };
65
+ /**
66
+ * Build a reactive audit log with sane defaults: bounded retention, deny-write
67
+ * guard, `withLatest()` companions activated. Returns the {@link ReactiveLogBundle}
68
+ * directly — primitives expose this as `<primitive>.events` / `.decisions` /
69
+ * `.dispatches` / `.invocations` and alias it as `.audit`.
70
+ *
71
+ * @category internal
72
+ */
73
+ declare function createAuditLog<R extends BaseAuditRecord>(opts: AuditLogOpts<R>): ReactiveLogBundle<R>;
74
+ type FailureMeta = {
75
+ t_ns: number;
76
+ seq?: number;
77
+ errorType: string;
78
+ };
79
+ type SuccessMeta = {
80
+ t_ns: number;
81
+ seq?: number;
82
+ };
83
+ /** Common opts shared by both tiers. */
84
+ type MutationOpts<TArgs extends readonly unknown[], R extends BaseAuditRecord> = {
85
+ /** Where to emit the audit record on success / failure. */
86
+ audit: ReactiveLogBundle<R>;
87
+ /** Build the success record from the action's args + result + meta. */
88
+ onSuccess?: (args: TArgs, result: unknown, meta: SuccessMeta) => R | undefined;
89
+ /** Build the failure record from the args + error + meta. */
90
+ onFailure?: (args: TArgs, error: unknown, meta: FailureMeta) => R | undefined;
91
+ /** Freeze inputs at entry (default `true`). Pass `false` for hot paths. */
92
+ freeze?: boolean;
93
+ /** Optional sequence cursor — auto-advanced and stamped onto records. */
94
+ seq?: Node<number>;
95
+ /** Optional handler version — stamped into the record (Audit 5). */
96
+ handlerVersion?: {
97
+ id: string;
98
+ version: string | number;
99
+ };
100
+ };
101
+ type WrapMutationOpts<TArgs extends readonly unknown[], R extends BaseAuditRecord> = MutationOpts<TArgs, R>;
102
+ type LightMutationOpts<TArgs extends readonly unknown[], R extends BaseAuditRecord> = MutationOpts<TArgs, R>;
103
+ /**
104
+ * Advance a cursor node and return the new value. Emits `[DIRTY], [DATA, next]`
105
+ * directly on the cursor — atomic outside a batch, rollback-discardable inside.
106
+ *
107
+ * Resets to `0` if the cursor cache is missing, non-numeric, `NaN`, or
108
+ * non-finite (e.g. corrupted by `restore()` from a malformed snapshot, or
109
+ * by a misbehaving codec). `??` alone would let `NaN` and `""` pass through
110
+ * and silently corrupt audit ordering downstream.
111
+ *
112
+ * Works whether or not the cursor has any subscribers — `down` updates the
113
+ * cache regardless, so primitives that bump before consumers attach (e.g.
114
+ * `JobQueueGraph.enqueue`) still see a coherent sequence.
115
+ *
116
+ * @category internal
117
+ */
118
+ declare function bumpCursor(seq: Node<number>): number;
119
+ /**
120
+ * Build a record via the supplied builder, stamp `handlerVersion` if present,
121
+ * and append it to the audit log. `undefined` records are skipped (callers
122
+ * pass an `onSuccess` / `onFailure` that returns `undefined` to opt out per
123
+ * call).
124
+ *
125
+ * @category internal
126
+ */
127
+ declare function appendAudit<TArgs extends readonly unknown[], TValue, R extends BaseAuditRecord, M extends SuccessMeta | FailureMeta>(audit: ReactiveLogBundle<R>, builder: (args: TArgs, value: TValue, meta: M) => R | undefined, args: TArgs, value: TValue, meta: M, handlerVersion?: {
128
+ id: string;
129
+ version: string | number;
130
+ }): void;
131
+ /**
132
+ * Substrate-tier wrapper: run `action`, append a typed audit record on
133
+ * success or failure, advance an optional `seq` cursor. No batch frame — this
134
+ * is the hot-path-friendly variant for atomic single-write mutations.
135
+ *
136
+ * Behavior contract:
137
+ * 1. Freeze args at entry (default `true`; opt out with `freeze: false` for
138
+ * hot paths — e.g. wrapping `vectorIndex.upsert(id, vector[768], meta)`
139
+ * where the deep-freeze of a 768-dim vector is a measurable tax).
140
+ * 2. Bump `seq` (if provided) BEFORE the action runs. There is no batch frame,
141
+ * so the bump persists even on throw — the failure-audit record stamps the
142
+ * same `seq` so audit consumers see a contiguous sequence.
143
+ * 3. Run `action(args)`. On success, `appendAudit(onSuccess, ...)`.
144
+ * 4. On throw, `appendAudit(onFailure, ...)` then re-throw so callers see the
145
+ * failure.
146
+ *
147
+ * **Distinguish from {@link wrapMutation}:** `wrapMutation` opens a `batch()`
148
+ * frame (rollback-on-throw, seq advance discarded on rollback) and is the
149
+ * right choice when the action runs a user-supplied handler or a multi-step
150
+ * sequence that could leave inconsistent state mid-throw.
151
+ *
152
+ * **Cursor / log alignment caveat (substrate-tier):** `seq` is bumped BEFORE
153
+ * `action()` runs, and the audit-log append happens AFTER. There is no batch
154
+ * frame, so a synchronous subscriber to `seq` that fires between the two —
155
+ * including a subscriber on `audit.entries` itself if the substrate causes
156
+ * it to fire transitively — observes `seq=N` while the corresponding record
157
+ * is not yet in the log. Audit consumers that join `seq` and `audit.entries`
158
+ * reactively must tolerate this one-tick lag, or use {@link wrapMutation}
159
+ * (whose `batch()` frame defers downstream delivery until commit, so cursor
160
+ * and log appear together to subscribers). The same caveat applies to
161
+ * **re-entrant** invocation: if an `audit.entries` / `seq` subscriber
162
+ * triggers another `lightMutation`, the inner record can land on the log
163
+ * before the outer call's success/failure record.
164
+ *
165
+ * @category internal
166
+ */
167
+ declare function lightMutation<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord>(action: (...args: TArgs) => TResult, opts: LightMutationOpts<TArgs, R>): (...args: TArgs) => TResult;
168
+ /**
169
+ * Orchestration-tier wrapper: like {@link lightMutation} but adds a `batch()`
170
+ * frame around the action so an in-flight throw rolls back partial state.
171
+ *
172
+ * Behavior contract:
173
+ * 1. Freeze args at entry (default `true`).
174
+ * 2. Open a batch frame (rollback-on-throw via core batch — Audit 2 #6).
175
+ * 3. Bump `seq` INSIDE the batch so a framework-level rollback discards the
176
+ * cursor advance (cursor stays in sync with audit log). M5.
177
+ * 4. Run `action(args)` and capture result.
178
+ * 5. On success: `appendAudit(onSuccess, ...)` inside the batch.
179
+ * 6. On throw: catch OUTSIDE the batch so the failure record emits in a
180
+ * fresh transaction after rollback — it persists. Re-throw so callers see
181
+ * the failure.
182
+ *
183
+ * **Distinguish from the file-private `wrapMutation` in
184
+ * `src/extra/reactive-map.ts:540`:** that helper is a transactional wrapper
185
+ * for the reactiveMap version counter (`pre/post-version` snapshot diffing,
186
+ * read vs. mutation gating). Different concern, file-private, not exported.
187
+ * This `wrapMutation` is the public Phase-4 audit framework.
188
+ *
189
+ * @category internal
190
+ */
191
+ declare function wrapMutation<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord>(action: (...args: TArgs) => TResult, opts: WrapMutationOpts<TArgs, R>): (...args: TArgs) => TResult;
192
+ /**
193
+ * Promote a closure counter to a state node mounted under `graph`.
194
+ * Replaces ad-hoc `let _seq = 0` patterns with a node observable in
195
+ * `describe()` and persistable via storage tiers.
196
+ *
197
+ * @category internal
198
+ */
199
+ declare function registerCursor(graph: Graph, name: string, initial?: number): Node<number>;
200
+ /**
201
+ * Promote a closure `Map<K, number>` to N state nodes (one per key) mounted
202
+ * under `<graph>::<name>::<key>`. Used by saga (per-event-type cursor).
203
+ *
204
+ * @category internal
205
+ */
206
+ declare function registerCursorMap<K extends string>(graph: Graph, name: string, keys: readonly K[], initial?: number): {
207
+ readonly [P in K]: Node<number>;
208
+ };
209
+
210
+ export { type AuditLogOpts as A, type BaseAuditRecord as B, DEFAULT_AUDIT_GUARD as D, type FailureMeta as F, type LightMutationOpts as L, type MutationOpts as M, type SuccessMeta as S, type WrapMutationOpts as W, appendAudit as a, bumpCursor as b, createAuditLog as c, registerCursorMap as d, lightMutation as l, registerCursor as r, tryIncrementBounded as t, wrapMutation as w };
@@ -1,4 +1,4 @@
1
- import { a as Node } from './node-fSc-hCv8.cjs';
1
+ import { N as Node } from './node-BYInONRr.cjs';
2
2
 
3
3
  /** Solid accessor function — returns current value when called. */
4
4
  type Accessor<T> = () => T;