@graphrefly/graphrefly 0.26.0 → 0.28.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 (396) hide show
  1. package/dist/backoff-HPZMEZNF.js +1 -0
  2. package/dist/cascading-B-5zmAUv.d.cts +180 -0
  3. package/dist/cascading-D9WG1-9L.d.ts +180 -0
  4. package/dist/chunk-2FOAM3OR.js +1 -0
  5. package/dist/chunk-2PMCKKRK.js +1 -0
  6. package/dist/chunk-3JXNEPCD.js +2 -0
  7. package/dist/chunk-3R5HFPX7.js +78 -0
  8. package/dist/chunk-4GKB4OUJ.js +1 -0
  9. package/dist/chunk-4VVTGLXJ.js +1 -0
  10. package/dist/chunk-5QDBSZBV.js +1 -0
  11. package/dist/chunk-6QZNQS5B.js +1 -0
  12. package/dist/chunk-6V3SEX2I.js +1 -0
  13. package/dist/chunk-76A3HVQE.js +9 -0
  14. package/dist/chunk-7H6LGFUG.js +64 -0
  15. package/dist/chunk-CK2E7BTU.js +1 -0
  16. package/dist/chunk-CKCSDI7T.js +6 -0
  17. package/dist/chunk-CRXTH3SH.js +1 -0
  18. package/dist/chunk-CWLN3X3N.js +1 -0
  19. package/dist/chunk-D7A7DBE4.js +1 -0
  20. package/dist/chunk-DBGGMN3D.js +1 -0
  21. package/dist/chunk-DQA3UIQ2.js +1 -0
  22. package/dist/chunk-ERLIRFPA.js +1 -0
  23. package/dist/chunk-ESMPEKEV.js +1 -0
  24. package/dist/chunk-ETWTCCJI.js +1 -0
  25. package/dist/chunk-FNYWM6JC.js +1 -0
  26. package/dist/chunk-GHJJR5P4.js +1 -0
  27. package/dist/chunk-GPW2V3RE.js +1 -0
  28. package/dist/chunk-I6VIH3VA.js +1 -0
  29. package/dist/chunk-K2GNMCQT.js +1 -0
  30. package/dist/chunk-LBTDSCCO.js +3 -0
  31. package/dist/chunk-LQ3Y5NJS.js +1 -0
  32. package/dist/chunk-MIQTDPY4.js +5 -0
  33. package/dist/chunk-MTTAAPCK.js +1 -0
  34. package/dist/chunk-OAWLCNJJ.js +1 -0
  35. package/dist/chunk-OBKQQA5I.js +1 -0
  36. package/dist/chunk-OYHGKYQM.js +1 -0
  37. package/dist/chunk-PIOGHC63.js +1 -0
  38. package/dist/chunk-QWAPKG3O.js +2 -0
  39. package/dist/chunk-QYADASLV.js +1 -0
  40. package/dist/chunk-RHESUC3V.js +43 -0
  41. package/dist/chunk-S35VARIR.js +1 -0
  42. package/dist/chunk-SC3U7ETD.js +1 -0
  43. package/dist/chunk-U3AICJKU.js +1 -0
  44. package/dist/chunk-UMBIDLJ4.js +1 -0
  45. package/dist/chunk-UPHHLMHE.js +1 -0
  46. package/dist/chunk-UPXUCFMX.js +1 -0
  47. package/dist/chunk-UWJE5FQA.js +18 -0
  48. package/dist/chunk-V6YQICXZ.js +1 -0
  49. package/dist/chunk-VIMF6LGM.js +1 -0
  50. package/dist/chunk-VJLMUKOI.js +1 -0
  51. package/dist/chunk-VPYBOXVT.js +1 -0
  52. package/dist/chunk-VTPVOGHH.js +1 -0
  53. package/dist/chunk-WQ2BN6X6.js +1 -0
  54. package/dist/chunk-XAUNPIMX.js +1 -0
  55. package/dist/chunk-Y2EMPB3I.js +1 -0
  56. package/dist/chunk-Z4HDAS2Q.js +1 -0
  57. package/dist/chunk-ZB5EHBIO.js +1 -0
  58. package/dist/chunk-ZV2DXV5A.js +23 -0
  59. package/dist/compat/index.cjs +14 -7656
  60. package/dist/compat/index.d.cts +15 -14
  61. package/dist/compat/index.d.ts +15 -14
  62. package/dist/compat/index.js +1 -49
  63. package/dist/compat/jotai/index.cjs +1 -2048
  64. package/dist/compat/jotai/index.d.cts +2 -2
  65. package/dist/compat/jotai/index.d.ts +2 -2
  66. package/dist/compat/jotai/index.js +1 -9
  67. package/dist/compat/nanostores/index.cjs +1 -2175
  68. package/dist/compat/nanostores/index.d.cts +2 -2
  69. package/dist/compat/nanostores/index.d.ts +2 -2
  70. package/dist/compat/nanostores/index.js +1 -23
  71. package/dist/compat/nestjs/index.cjs +14 -6782
  72. package/dist/compat/nestjs/index.d.cts +7 -6
  73. package/dist/compat/nestjs/index.d.ts +7 -6
  74. package/dist/compat/nestjs/index.js +1 -82
  75. package/dist/compat/react/index.cjs +1 -141
  76. package/dist/compat/react/index.d.cts +2 -2
  77. package/dist/compat/react/index.d.ts +2 -2
  78. package/dist/compat/react/index.js +1 -12
  79. package/dist/compat/solid/index.cjs +1 -128
  80. package/dist/compat/solid/index.d.cts +2 -2
  81. package/dist/compat/solid/index.d.ts +2 -2
  82. package/dist/compat/solid/index.js +1 -12
  83. package/dist/compat/svelte/index.cjs +1 -131
  84. package/dist/compat/svelte/index.d.cts +2 -2
  85. package/dist/compat/svelte/index.d.ts +2 -2
  86. package/dist/compat/svelte/index.js +1 -12
  87. package/dist/compat/vue/index.cjs +1 -146
  88. package/dist/compat/vue/index.d.cts +2 -2
  89. package/dist/compat/vue/index.d.ts +2 -2
  90. package/dist/compat/vue/index.js +1 -12
  91. package/dist/compat/zustand/index.cjs +6 -4931
  92. package/dist/compat/zustand/index.d.cts +5 -5
  93. package/dist/compat/zustand/index.d.ts +5 -5
  94. package/dist/compat/zustand/index.js +1 -12
  95. package/dist/composite-B-xqw4Kk.d.cts +69 -0
  96. package/dist/composite-BhbKHbOS.d.ts +69 -0
  97. package/dist/core/index.cjs +1 -2271
  98. package/dist/core/index.d.cts +4 -3
  99. package/dist/core/index.d.ts +4 -3
  100. package/dist/core/index.js +1 -110
  101. package/dist/extra/browser.cjs +1 -0
  102. package/dist/extra/browser.d.cts +3 -0
  103. package/dist/extra/browser.d.ts +3 -0
  104. package/dist/extra/browser.js +1 -0
  105. package/dist/extra/index.cjs +23 -9971
  106. package/dist/extra/index.d.cts +13 -5
  107. package/dist/extra/index.d.ts +13 -5
  108. package/dist/extra/index.js +1 -375
  109. package/dist/extra/node.cjs +3 -0
  110. package/dist/extra/node.d.cts +81 -0
  111. package/dist/extra/node.d.ts +81 -0
  112. package/dist/extra/node.js +2 -0
  113. package/dist/extra/operators.cjs +1 -0
  114. package/dist/extra/operators.d.cts +910 -0
  115. package/dist/extra/operators.d.ts +910 -0
  116. package/dist/extra/operators.js +1 -0
  117. package/dist/extra/reactive.cjs +1 -0
  118. package/dist/extra/reactive.d.cts +352 -0
  119. package/dist/extra/reactive.d.ts +352 -0
  120. package/dist/extra/reactive.js +1 -0
  121. package/dist/extra/sources.cjs +1 -2486
  122. package/dist/extra/sources.d.cts +6 -2
  123. package/dist/extra/sources.d.ts +6 -2
  124. package/dist/extra/sources.js +1 -57
  125. package/dist/extra/storage-browser.cjs +1 -0
  126. package/dist/extra/storage-browser.d.cts +71 -0
  127. package/dist/extra/storage-browser.d.ts +71 -0
  128. package/dist/extra/storage-browser.js +1 -0
  129. package/dist/extra/storage-core.cjs +1 -0
  130. package/dist/extra/storage-core.d.cts +98 -0
  131. package/dist/extra/storage-core.d.ts +98 -0
  132. package/dist/extra/storage-core.js +1 -0
  133. package/dist/extra/storage-node.cjs +2 -0
  134. package/dist/extra/storage-node.d.cts +60 -0
  135. package/dist/extra/storage-node.d.ts +60 -0
  136. package/dist/extra/storage-node.js +1 -0
  137. package/dist/fallback-BaTS7vVY.d.cts +258 -0
  138. package/dist/fallback-eOm3LNxP.d.ts +258 -0
  139. package/dist/graph/index.cjs +6 -5030
  140. package/dist/graph/index.d.cts +6 -5
  141. package/dist/graph/index.d.ts +6 -5
  142. package/dist/graph/index.js +1 -50
  143. package/dist/{graph-6tZ5jEzr.d.cts → graph-BZGRXwOm.d.ts} +134 -31
  144. package/dist/{graph-DQ69XU0g.d.ts → graph-D48Qw9Cg.d.cts} +134 -31
  145. package/dist/index-8FSVk4Uf.d.ts +135 -0
  146. package/dist/index-9oDeHH2u.d.cts +291 -0
  147. package/dist/index-B0c4cmIO.d.ts +207 -0
  148. package/dist/{index-CDAjUFIv.d.ts → index-B1AmmSlb.d.ts} +1 -1
  149. package/dist/{index-Bd_fwmLf.d.cts → index-B2pwesl9.d.cts} +1 -1
  150. package/dist/index-BHvIquRZ.d.ts +1957 -0
  151. package/dist/{index-CPgZ5wRl.d.ts → index-BVHOrDwO.d.ts} +1 -1
  152. package/dist/{index-DrISNAOm.d.ts → index-BWJV63ti.d.ts} +1 -1
  153. package/dist/{index-B_IP40nB.d.cts → index-B_agccPe.d.cts} +1 -1
  154. package/dist/index-BgyGlizc.d.ts +163 -0
  155. package/dist/index-BpA5c4G9.d.ts +357 -0
  156. package/dist/index-BpIFjILY.d.cts +357 -0
  157. package/dist/{index-qldRdbQw.d.ts → index-Bqachn9_.d.ts} +1 -1
  158. package/dist/index-Btib9rsU.d.ts +607 -0
  159. package/dist/{index-BYOHF0zP.d.ts → index-BwM9BEkt.d.ts} +1 -1
  160. package/dist/index-BxJ86YZZ.d.cts +105 -0
  161. package/dist/index-C73n7lo-.d.cts +251 -0
  162. package/dist/index-CEXXwWVH.d.cts +192 -0
  163. package/dist/index-CHEswufn.d.cts +163 -0
  164. package/dist/{index-xdGjv0nO.d.ts → index-CMn8S8Hw.d.ts} +1 -1
  165. package/dist/{index-QBpffFW-.d.cts → index-CRO83MmV.d.cts} +1 -1
  166. package/dist/{index-BjI6ty9z.d.ts → index-CloUk1kY.d.ts} +9 -9
  167. package/dist/index-CpgYhnrG.d.ts +291 -0
  168. package/dist/{index-CUyrtuOf.d.cts → index-Cyojz0AE.d.cts} +1 -1
  169. package/dist/{demo-shell-DEp-nMTl.d.ts → index-CzobVSMr.d.ts} +14 -14
  170. package/dist/index-Czq6ynh8.d.ts +143 -0
  171. package/dist/index-D-YB-Vl3.d.ts +195 -0
  172. package/dist/index-DAlweici.d.ts +231 -0
  173. package/dist/index-DEwTb_fm.d.cts +1957 -0
  174. package/dist/{index-DFhjO4Gg.d.cts → index-DL-rYJrx.d.cts} +1 -1
  175. package/dist/index-DP4ZTkdw.d.ts +139 -0
  176. package/dist/{index-BeIdBfcb.d.cts → index-DUqMOlKZ.d.cts} +200 -2366
  177. package/dist/{index-Bxb5ZYc9.d.cts → index-D_NwnRYS.d.cts} +1 -1
  178. package/dist/index-DaLJvH8Z.d.ts +105 -0
  179. package/dist/index-DcXZBF5a.d.cts +135 -0
  180. package/dist/index-DfyOkTvs.d.ts +321 -0
  181. package/dist/{index-CmnuOibw.d.ts → index-DiOXyAwt.d.ts} +1 -1
  182. package/dist/index-DpHe5e0Q.d.ts +186 -0
  183. package/dist/index-DraikLjn.d.ts +86 -0
  184. package/dist/{index-BEfE8H_G.d.cts → index-DxsnAMWD.d.cts} +9 -9
  185. package/dist/index-DyxjtScX.d.cts +207 -0
  186. package/dist/index-HDpJe9hX.d.ts +251 -0
  187. package/dist/index-O6TgGUBV.d.cts +195 -0
  188. package/dist/{index-B4MP_8V_.d.cts → index-Oi8d8w4R.d.cts} +1 -1
  189. package/dist/{index-BW1z3BN9.d.ts → index-ROpQmGjE.d.ts} +30 -6
  190. package/dist/index-RukJ4DLS.d.cts +607 -0
  191. package/dist/{index-DdD5MVDL.d.ts → index-ZftwfxJM.d.ts} +200 -2366
  192. package/dist/{index-CuYwdKO-.d.ts → index-cByzxQIC.d.cts} +10 -195
  193. package/dist/index-dtN7YA2x.d.cts +143 -0
  194. package/dist/{index-C8mdwMXc.d.cts → index-fM6y00vT.d.cts} +30 -6
  195. package/dist/{index-_oMEWlDq.d.cts → index-m-yHof5p.d.ts} +10 -195
  196. package/dist/index-pXrDMpRO.d.cts +231 -0
  197. package/dist/index-rHJSKsU8.d.cts +186 -0
  198. package/dist/index-rX8HBM5h.d.cts +321 -0
  199. package/dist/{index-CUwyr1Kk.d.cts → index-rnwQly8X.d.cts} +147 -20
  200. package/dist/index-sm373fsH.d.ts +192 -0
  201. package/dist/index-tbf2gKHd.d.cts +139 -0
  202. package/dist/{demo-shell-26p5fVxn.d.cts → index-u15meRxL.d.cts} +14 -14
  203. package/dist/{index-eJ6T_qGM.d.ts → index-umtoWT8K.d.ts} +147 -20
  204. package/dist/index-vscRDkjW.d.cts +86 -0
  205. package/dist/index.cjs +150 -24142
  206. package/dist/index.d.cts +69 -3756
  207. package/dist/index.d.ts +69 -3756
  208. package/dist/index.js +1 -7292
  209. package/dist/{meta-C0-8XW6Q.d.cts → meta-Cgj6zeji.d.cts} +5 -5
  210. package/dist/{meta-BGqSZ7mt.d.ts → meta-CwesDrMD.d.ts} +5 -5
  211. package/dist/{node-C_IBuvX2.d.cts → node-Cc1TniY8.d.cts} +36 -9
  212. package/dist/{node-C_IBuvX2.d.ts → node-Cc1TniY8.d.ts} +36 -9
  213. package/dist/{observable-DCk45RH5.d.ts → observable-Ct-gJ9jI.d.ts} +1 -1
  214. package/dist/{observable-Crr1jgzx.d.cts → observable-glXQoGj2.d.cts} +1 -1
  215. package/dist/patterns/ai/browser.cjs +25 -0
  216. package/dist/patterns/ai/browser.d.cts +127 -0
  217. package/dist/patterns/ai/browser.d.ts +127 -0
  218. package/dist/patterns/ai/browser.js +3 -0
  219. package/dist/patterns/ai/index.cjs +91 -0
  220. package/dist/patterns/ai/index.d.cts +17 -0
  221. package/dist/patterns/ai/index.d.ts +17 -0
  222. package/dist/patterns/ai/index.js +1 -0
  223. package/dist/patterns/ai/node.cjs +2 -0
  224. package/dist/patterns/ai/node.d.cts +58 -0
  225. package/dist/patterns/ai/node.d.ts +58 -0
  226. package/dist/patterns/ai/node.js +1 -0
  227. package/dist/patterns/audit/index.cjs +6 -0
  228. package/dist/patterns/audit/index.d.cts +6 -0
  229. package/dist/patterns/audit/index.d.ts +6 -0
  230. package/dist/patterns/audit/index.js +1 -0
  231. package/dist/patterns/cqrs/index.cjs +6 -0
  232. package/dist/patterns/cqrs/index.d.cts +5 -0
  233. package/dist/patterns/cqrs/index.d.ts +5 -0
  234. package/dist/patterns/cqrs/index.js +1 -0
  235. package/dist/patterns/demo-shell/index.cjs +7 -0
  236. package/dist/patterns/demo-shell/index.d.cts +6 -0
  237. package/dist/patterns/demo-shell/index.d.ts +6 -0
  238. package/dist/patterns/demo-shell/index.js +1 -0
  239. package/dist/patterns/domain-templates/index.cjs +6 -0
  240. package/dist/patterns/domain-templates/index.d.cts +5 -0
  241. package/dist/patterns/domain-templates/index.d.ts +5 -0
  242. package/dist/patterns/domain-templates/index.js +1 -0
  243. package/dist/patterns/graphspec/index.cjs +83 -0
  244. package/dist/patterns/graphspec/index.d.cts +7 -0
  245. package/dist/patterns/graphspec/index.d.ts +7 -0
  246. package/dist/patterns/graphspec/index.js +1 -0
  247. package/dist/patterns/guarded-execution/index.cjs +6 -0
  248. package/dist/patterns/guarded-execution/index.d.cts +7 -0
  249. package/dist/patterns/guarded-execution/index.d.ts +7 -0
  250. package/dist/patterns/guarded-execution/index.js +1 -0
  251. package/dist/patterns/harness/index.cjs +48 -0
  252. package/dist/patterns/harness/index.d.cts +8 -0
  253. package/dist/patterns/harness/index.d.ts +8 -0
  254. package/dist/patterns/harness/index.js +1 -0
  255. package/dist/patterns/job-queue/index.cjs +6 -0
  256. package/dist/patterns/job-queue/index.d.cts +5 -0
  257. package/dist/patterns/job-queue/index.d.ts +5 -0
  258. package/dist/patterns/job-queue/index.js +1 -0
  259. package/dist/patterns/lens/index.cjs +6 -0
  260. package/dist/patterns/lens/index.d.cts +7 -0
  261. package/dist/patterns/lens/index.d.ts +7 -0
  262. package/dist/patterns/lens/index.js +1 -0
  263. package/dist/patterns/memory/index.cjs +6 -0
  264. package/dist/patterns/memory/index.d.cts +5 -0
  265. package/dist/patterns/memory/index.d.ts +5 -0
  266. package/dist/patterns/memory/index.js +1 -0
  267. package/dist/patterns/messaging/index.cjs +6 -0
  268. package/dist/patterns/messaging/index.d.cts +5 -0
  269. package/dist/patterns/messaging/index.d.ts +5 -0
  270. package/dist/patterns/messaging/index.js +1 -0
  271. package/dist/patterns/orchestration/index.cjs +6 -0
  272. package/dist/patterns/orchestration/index.d.cts +6 -0
  273. package/dist/patterns/orchestration/index.d.ts +6 -0
  274. package/dist/patterns/orchestration/index.js +1 -0
  275. package/dist/patterns/reactive-layout/index.cjs +7 -6444
  276. package/dist/patterns/reactive-layout/index.d.cts +6 -6
  277. package/dist/patterns/reactive-layout/index.d.ts +6 -6
  278. package/dist/patterns/reactive-layout/index.js +1 -56
  279. package/dist/patterns/reduction/index.cjs +6 -0
  280. package/dist/patterns/reduction/index.d.cts +5 -0
  281. package/dist/patterns/reduction/index.d.ts +5 -0
  282. package/dist/patterns/reduction/index.js +1 -0
  283. package/dist/patterns/refine-loop/index.cjs +8 -0
  284. package/dist/patterns/refine-loop/index.d.cts +7 -0
  285. package/dist/patterns/refine-loop/index.d.ts +7 -0
  286. package/dist/patterns/refine-loop/index.js +1 -0
  287. package/dist/patterns/resilient-pipeline/index.cjs +1 -0
  288. package/dist/patterns/resilient-pipeline/index.d.cts +7 -0
  289. package/dist/patterns/resilient-pipeline/index.d.ts +7 -0
  290. package/dist/patterns/resilient-pipeline/index.js +1 -0
  291. package/dist/patterns/surface/index.cjs +14 -0
  292. package/dist/patterns/surface/index.d.cts +8 -0
  293. package/dist/patterns/surface/index.d.ts +8 -0
  294. package/dist/patterns/surface/index.js +1 -0
  295. package/dist/{reactive-layout-BaOQefHu.d.cts → reactive-layout-CpYb5qLP.d.cts} +2 -2
  296. package/dist/{reactive-layout-D9gejYXE.d.ts → reactive-layout-D8u4wuUR.d.ts} +2 -2
  297. package/dist/reactive-log-DPzuUDj5.d.cts +190 -0
  298. package/dist/reactive-log-YuH9VYN8.d.ts +190 -0
  299. package/dist/reactive-map-CdbNoSgP.d.ts +238 -0
  300. package/dist/reactive-map-DUeRmb9d.d.cts +238 -0
  301. package/dist/resilience-Ba5-b4WD.d.cts +493 -0
  302. package/dist/resilience-CGRzhnD3.d.ts +493 -0
  303. package/dist/resilience-QAHKANT5.js +1 -0
  304. package/dist/sugar-BV0htudb.d.cts +205 -0
  305. package/dist/sugar-Dtyrq2_q.d.ts +205 -0
  306. package/dist/topology-tree-CYHOwQZ_.d.ts +25 -0
  307. package/dist/topology-tree-DROUdq5B.d.cts +25 -0
  308. package/dist/types-O3GzJY2U.d.cts +401 -0
  309. package/dist/types-u64Ose53.d.ts +401 -0
  310. package/package.json +267 -7
  311. package/dist/chunk-3ZWCKRHX.js +0 -117
  312. package/dist/chunk-3ZWCKRHX.js.map +0 -1
  313. package/dist/chunk-6LDQFTYS.js +0 -102
  314. package/dist/chunk-6LDQFTYS.js.map +0 -1
  315. package/dist/chunk-7TAQJHQV.js +0 -103
  316. package/dist/chunk-7TAQJHQV.js.map +0 -1
  317. package/dist/chunk-AMCG74RZ.js +0 -7000
  318. package/dist/chunk-AMCG74RZ.js.map +0 -1
  319. package/dist/chunk-BVZYTZ5H.js +0 -599
  320. package/dist/chunk-BVZYTZ5H.js.map +0 -1
  321. package/dist/chunk-FQMKGR6L.js +0 -330
  322. package/dist/chunk-FQMKGR6L.js.map +0 -1
  323. package/dist/chunk-HXZEYDUR.js +0 -94
  324. package/dist/chunk-HXZEYDUR.js.map +0 -1
  325. package/dist/chunk-IZYUSJC7.js +0 -1369
  326. package/dist/chunk-IZYUSJC7.js.map +0 -1
  327. package/dist/chunk-J22W6HV3.js +0 -107
  328. package/dist/chunk-J22W6HV3.js.map +0 -1
  329. package/dist/chunk-JSCT3CR4.js +0 -38
  330. package/dist/chunk-JSCT3CR4.js.map +0 -1
  331. package/dist/chunk-JYXEWPH4.js +0 -62
  332. package/dist/chunk-JYXEWPH4.js.map +0 -1
  333. package/dist/chunk-LCE3GF5P.js +0 -866
  334. package/dist/chunk-LCE3GF5P.js.map +0 -1
  335. package/dist/chunk-MJ2NKQQL.js +0 -119
  336. package/dist/chunk-MJ2NKQQL.js.map +0 -1
  337. package/dist/chunk-N6UR7YVY.js +0 -198
  338. package/dist/chunk-N6UR7YVY.js.map +0 -1
  339. package/dist/chunk-OHISZPOJ.js +0 -97
  340. package/dist/chunk-OHISZPOJ.js.map +0 -1
  341. package/dist/chunk-PHOUUNK7.js +0 -2291
  342. package/dist/chunk-PHOUUNK7.js.map +0 -1
  343. package/dist/chunk-RB6QPHJ7.js +0 -393
  344. package/dist/chunk-RB6QPHJ7.js.map +0 -1
  345. package/dist/chunk-SN4YWWYO.js +0 -171
  346. package/dist/chunk-SN4YWWYO.js.map +0 -1
  347. package/dist/chunk-SX52TAR4.js +0 -110
  348. package/dist/chunk-SX52TAR4.js.map +0 -1
  349. package/dist/chunk-THTWHNU4.js +0 -2712
  350. package/dist/chunk-THTWHNU4.js.map +0 -1
  351. package/dist/chunk-VYPWMZ6H.js +0 -98
  352. package/dist/chunk-VYPWMZ6H.js.map +0 -1
  353. package/dist/chunk-XGPU467M.js +0 -136
  354. package/dist/chunk-XGPU467M.js.map +0 -1
  355. package/dist/chunk-ZQMEI34O.js +0 -713
  356. package/dist/chunk-ZQMEI34O.js.map +0 -1
  357. package/dist/compat/index.cjs.map +0 -1
  358. package/dist/compat/index.js.map +0 -1
  359. package/dist/compat/jotai/index.cjs.map +0 -1
  360. package/dist/compat/jotai/index.js.map +0 -1
  361. package/dist/compat/nanostores/index.cjs.map +0 -1
  362. package/dist/compat/nanostores/index.js.map +0 -1
  363. package/dist/compat/nestjs/index.cjs.map +0 -1
  364. package/dist/compat/nestjs/index.js.map +0 -1
  365. package/dist/compat/react/index.cjs.map +0 -1
  366. package/dist/compat/react/index.js.map +0 -1
  367. package/dist/compat/solid/index.cjs.map +0 -1
  368. package/dist/compat/solid/index.js.map +0 -1
  369. package/dist/compat/svelte/index.cjs.map +0 -1
  370. package/dist/compat/svelte/index.js.map +0 -1
  371. package/dist/compat/vue/index.cjs.map +0 -1
  372. package/dist/compat/vue/index.js.map +0 -1
  373. package/dist/compat/zustand/index.cjs.map +0 -1
  374. package/dist/compat/zustand/index.js.map +0 -1
  375. package/dist/core/index.cjs.map +0 -1
  376. package/dist/core/index.js.map +0 -1
  377. package/dist/extra/index.cjs.map +0 -1
  378. package/dist/extra/index.js.map +0 -1
  379. package/dist/extra/sources.cjs.map +0 -1
  380. package/dist/extra/sources.js.map +0 -1
  381. package/dist/graph/index.cjs.map +0 -1
  382. package/dist/graph/index.js.map +0 -1
  383. package/dist/index-C0ZXMaXO.d.cts +0 -392
  384. package/dist/index-CY2TljO4.d.ts +0 -392
  385. package/dist/index.cjs.map +0 -1
  386. package/dist/index.js.map +0 -1
  387. package/dist/patterns/demo-shell.cjs +0 -5604
  388. package/dist/patterns/demo-shell.cjs.map +0 -1
  389. package/dist/patterns/demo-shell.d.cts +0 -6
  390. package/dist/patterns/demo-shell.d.ts +0 -6
  391. package/dist/patterns/demo-shell.js +0 -15
  392. package/dist/patterns/demo-shell.js.map +0 -1
  393. package/dist/patterns/reactive-layout/index.cjs.map +0 -1
  394. package/dist/patterns/reactive-layout/index.js.map +0 -1
  395. package/dist/storage-BMycWEh2.d.ts +0 -190
  396. package/dist/storage-DiqWHzVI.d.cts +0 -190
@@ -0,0 +1,105 @@
1
+ import { a as Node } from './node-Cc1TniY8.cjs';
2
+ import { S as StatusValue, C as CircuitState, R as RateLimiterOptions, a as CircuitBreakerOptions, b as RetryOptions, F as FallbackInput, N as NS_PER_MS, c as NS_PER_SEC } from './resilience-Ba5-b4WD.cjs';
3
+ import { B as BudgetConstraint } from './index-rHJSKsU8.cjs';
4
+
5
+ /**
6
+ * Resilience composition with correct nesting order (roadmap §9.0b).
7
+ *
8
+ * {@link resilientPipeline} composes the resilience primitives from
9
+ * `extra/resilience.ts` in the order discovered during the §9.1 eval runs:
10
+ *
11
+ * ```text
12
+ * rateLimit → budget → breaker → timeout → retry → fallback → status
13
+ * ```
14
+ *
15
+ * Note on retry/timeout ordering: `timeout` is applied BEFORE `retry` so each
16
+ * retry attempt resubscribes to a fresh deadline (per-attempt semantics). If
17
+ * `timeout` wrapped `retry`, a single deadline would apply to the entire
18
+ * retry chain — not what callers expect.
19
+ *
20
+ * Every step is optional — omit the option and that layer is skipped. The
21
+ * returned bundle exposes the final `Node<T>` plus the status/error/breaker
22
+ * companions so callers can wire them into dashboards, alerts, or
23
+ * {@link graphLens}.
24
+ *
25
+ * Subsumes the pre-1.0 `resilientFetch` template — that template becomes a
26
+ * preconfigured instance of this factory for the HTTP fetch case.
27
+ *
28
+ * @module
29
+ */
30
+
31
+ /** Options for {@link resilientPipeline}. Every field is optional — omit to skip that layer. */
32
+ interface ResilientPipelineOptions<T> {
33
+ /** Admission control — at most `maxEvents` DATA per `windowNs`. See {@link rateLimiter}. */
34
+ rateLimit?: RateLimiterOptions;
35
+ /** Cost/constraint gate. See {@link budgetGate}. */
36
+ budget?: ReadonlyArray<BudgetConstraint>;
37
+ /** Circuit breaker — fail-fast when the downstream resource is unhealthy. See {@link circuitBreaker}. */
38
+ breaker?: CircuitBreakerOptions;
39
+ /**
40
+ * Behavior when the breaker is open:
41
+ * - `"skip"` — emit RESOLVED (default, lets downstream drop the beat)
42
+ * - `"error"` — emit a `CircuitOpenError` so `retry`/`fallback` can react
43
+ *
44
+ * Only used when `breaker` is provided.
45
+ */
46
+ breakerOnOpen?: "skip" | "error";
47
+ /** Retry policy on terminal ERROR. See {@link retry}. */
48
+ retry?: RetryOptions;
49
+ /**
50
+ * Per-attempt deadline in milliseconds. Converted to ns internally. Omit to skip the timeout wrap.
51
+ *
52
+ * Specified in ms (not ns) because callers consistently think in millisecond deadlines;
53
+ * retry/breaker/ratelimit options take ns to match their primitives exactly.
54
+ */
55
+ timeoutMs?: number;
56
+ /** Final fallback value emitted on terminal ERROR after retry exhausts. See {@link fallback}. */
57
+ fallback?: FallbackInput<T>;
58
+ /** Initial status reported by the status node. Default `"pending"`. */
59
+ initialStatus?: StatusValue;
60
+ }
61
+ /** Output bundle of {@link resilientPipeline}. */
62
+ interface ResilientPipelineBundle<T> {
63
+ /** The final resilient node. Subscribe to this for DATA emissions. */
64
+ node: Node<T>;
65
+ /** Live status: `"pending" | "active" | "completed" | "errored"`. */
66
+ status: Node<StatusValue>;
67
+ /** Last error payload, or `null` when not errored. */
68
+ error: Node<unknown | null>;
69
+ /** Breaker state when `opts.breaker` was provided; `undefined` otherwise. */
70
+ breakerState: Node<CircuitState> | undefined;
71
+ }
72
+ /**
73
+ * Compose a resilient pipeline around `source` in the canonical nesting
74
+ * order — `rateLimit → budget → breaker → timeout → retry → fallback → status`.
75
+ * Omit any option to skip that layer.
76
+ *
77
+ * @param source - Upstream node to wrap.
78
+ * @param opts - See {@link ResilientPipelineOptions}. All fields optional.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const safeFetch = resilientPipeline(fetchNode, {
83
+ * rateLimit: { maxEvents: 10, windowNs: NS_PER_SEC },
84
+ * breaker: { failureThreshold: 5 },
85
+ * retry: { count: 3, backoff: "exponential" },
86
+ * timeoutMs: 10_000,
87
+ * fallback: null,
88
+ * });
89
+ * safeFetch.status.subscribe(msgs => console.log(msgs));
90
+ * ```
91
+ *
92
+ * @category patterns
93
+ */
94
+ declare function resilientPipeline<T>(source: Node<T>, opts?: ResilientPipelineOptions<T>): ResilientPipelineBundle<T>;
95
+
96
+ declare const index_NS_PER_MS: typeof NS_PER_MS;
97
+ declare const index_NS_PER_SEC: typeof NS_PER_SEC;
98
+ type index_ResilientPipelineBundle<T> = ResilientPipelineBundle<T>;
99
+ type index_ResilientPipelineOptions<T> = ResilientPipelineOptions<T>;
100
+ declare const index_resilientPipeline: typeof resilientPipeline;
101
+ declare namespace index {
102
+ export { index_NS_PER_MS as NS_PER_MS, index_NS_PER_SEC as NS_PER_SEC, type index_ResilientPipelineBundle as ResilientPipelineBundle, type index_ResilientPipelineOptions as ResilientPipelineOptions, index_resilientPipeline as resilientPipeline };
103
+ }
104
+
105
+ export { type ResilientPipelineBundle as R, type ResilientPipelineOptions as a, index as i, resilientPipeline as r };
@@ -0,0 +1,251 @@
1
+ import { A as Actor, a as Node, P as PolicyRuleData, G as GuardAction } from './node-Cc1TniY8.cjs';
2
+ import { G as Graph, a as GraphOptions, d as GraphPersistSnapshot, C as CausalChain } from './graph-D48Qw9Cg.cjs';
3
+ import { T as TopicGraph } from './index-DyxjtScX.cjs';
4
+
5
+ /**
6
+ * Audit, policy enforcement, and compliance export (roadmap §9.2).
7
+ *
8
+ * Three composed factories that wrap any {@link Graph} with the harness
9
+ * accountability layer:
10
+ *
11
+ * - {@link auditTrail} — reactive mutation log with by-node/by-actor/by-time
12
+ * queries.
13
+ * - {@link policyEnforcer} — reactive ABAC enforcement; in `"audit"` mode
14
+ * records would-be denials, in `"enforce"` mode pushes guards onto target
15
+ * nodes so subsequent writes throw {@link GuardDenied}.
16
+ * - {@link complianceSnapshot} — point-in-time export of graph state +
17
+ * audit trail + policies for regulatory archival.
18
+ *
19
+ * @module
20
+ */
21
+
22
+ /** A single recorded mutation/event in an {@link AuditTrailGraph}. */
23
+ interface AuditEntry {
24
+ seq: number;
25
+ timestamp_ns: number;
26
+ wall_clock_ns: number;
27
+ path: string;
28
+ type: "data" | "dirty" | "resolved" | "invalidate" | "pause" | "resume" | "complete" | "error" | "teardown";
29
+ actor?: Actor;
30
+ value?: unknown;
31
+ error?: unknown;
32
+ annotation?: string;
33
+ }
34
+ /** Options for {@link auditTrail}. */
35
+ interface AuditTrailOptions {
36
+ name?: string;
37
+ graph?: GraphOptions;
38
+ /** Ring-buffer cap for the underlying `reactiveLog`. Default: unbounded. */
39
+ maxSize?: number;
40
+ /**
41
+ * Which event types to record. Default: `["data", "error", "complete",
42
+ * "teardown"]` — the user-meaningful set. Opt in to mid-wave protocol
43
+ * events (`"dirty"`, `"resolved"`, `"invalidate"`, `"pause"`, `"resume"`)
44
+ * by listing them explicitly. Note: those tier-1/tier-2 events do not
45
+ * carry an `actor` (no `lastMutation` populated) — record them only for
46
+ * protocol-level diagnostics.
47
+ */
48
+ includeTypes?: readonly AuditEntry["type"][];
49
+ /** Per-event filter; return false to skip. */
50
+ filter?: (entry: AuditEntry) => boolean;
51
+ }
52
+ /**
53
+ * Mounted audit log — `entries` exposes the reactive `AuditEntry[]`; query
54
+ * helpers are sync convenience wrappers over the cached snapshot.
55
+ */
56
+ declare class AuditTrailGraph extends Graph {
57
+ readonly entries: Node<readonly AuditEntry[]>;
58
+ readonly count: Node<number>;
59
+ private readonly _log;
60
+ private readonly _target;
61
+ constructor(target: Graph, opts: AuditTrailOptions);
62
+ /** All entries currently in the ring (snapshot). */
63
+ all(): readonly AuditEntry[];
64
+ /** Entries matching `path`. Order preserved. */
65
+ byNode(path: string): readonly AuditEntry[];
66
+ /** Entries whose `actor.id` matches. Use `byActorType` for type filtering. */
67
+ byActor(actorId: string): readonly AuditEntry[];
68
+ /** Entries whose `actor.type` matches (e.g. `"llm"`, `"human"`). */
69
+ byActorType(type: string): readonly AuditEntry[];
70
+ /**
71
+ * Entries with `timestamp_ns` in `[start_ns, end_ns)` (end exclusive).
72
+ * Omit `end_ns` to query open-ended.
73
+ */
74
+ byTimeRange(start_ns: number, end_ns?: number): readonly AuditEntry[];
75
+ /** Reference to the audited graph (escape hatch for tooling). */
76
+ get target(): Graph;
77
+ }
78
+ /**
79
+ * Wraps any {@link Graph} with a reactive audit trail recording every event
80
+ * matching `includeTypes` (default: data + error + complete + teardown).
81
+ *
82
+ * Each entry carries `seq`, `timestamp_ns` (monotonic), `wall_clock_ns`,
83
+ * `path`, `type`, and — when available — `actor`, `value`, `error`, and the
84
+ * `graph.trace()` reasoning annotation for the path.
85
+ *
86
+ * The returned graph mounts an `entries` node + `count` derived. Query
87
+ * helpers (`byNode`, `byActor`, `byTimeRange`) operate on the cached
88
+ * snapshot synchronously.
89
+ */
90
+ declare function auditTrail(target: Graph, opts?: AuditTrailOptions): AuditTrailGraph;
91
+ /** A single policy denial recorded by {@link PolicyEnforcerGraph}. */
92
+ interface PolicyViolation {
93
+ timestamp_ns: number;
94
+ wall_clock_ns: number;
95
+ path: string;
96
+ actor: Actor;
97
+ action: GuardAction;
98
+ mode: "audit" | "enforce";
99
+ /** `"observed"` (audit mode after-the-fact) or `"blocked"` (enforce mode pre-write). */
100
+ result: "observed" | "blocked";
101
+ }
102
+ /** Options for {@link policyEnforcer}. */
103
+ interface PolicyEnforcerOptions {
104
+ name?: string;
105
+ graph?: GraphOptions;
106
+ /**
107
+ * `"audit"` (default) — observe events and record would-be denials;
108
+ * does not block writes. Audit mode requires `lastMutation` attribution
109
+ * on the audited node — anonymous/internal writes (no `actor` passed,
110
+ * unguarded node) are skipped silently because the policy cannot be
111
+ * evaluated without an actor.
112
+ *
113
+ * `"enforce"` — push guards onto target nodes so disallowed writes
114
+ * throw {@link GuardDenied}. Reverted on dispose.
115
+ */
116
+ mode?: "audit" | "enforce";
117
+ /**
118
+ * Restrict enforcement to specific node paths (qualified). When omitted,
119
+ * applies to every node visible in `target.describe()` at construction
120
+ * time (subgraphs are walked transitively) AND subscribes to the full
121
+ * topology tree via {@link watchTopologyTree}, so nodes added to
122
+ * `target` OR any transitively-mounted subgraph after construction are
123
+ * guarded automatically (enforce mode only).
124
+ *
125
+ * **Cost:** unrestricted mode runs `describe({detail:"minimal"})` once
126
+ * at construction (O(N) over the graph tree) plus one topology
127
+ * subscription per graph instance in the mount tree. Restricted mode
128
+ * skips both and disables dynamic coverage — callers providing
129
+ * `paths` must re-create on subgraph changes.
130
+ */
131
+ paths?: readonly string[];
132
+ /** Ring-buffer cap for the violations topic. Default: 1000. */
133
+ violationsLimit?: number;
134
+ }
135
+ /**
136
+ * Reactive ABAC enforcement layer. Policies are reactive — pass a
137
+ * `Node<readonly PolicyRuleData[]>` to allow LLMs (or any reactive source)
138
+ * to update them at runtime; the enforcer rebinds its internal
139
+ * {@link NodeGuard} on every push.
140
+ */
141
+ declare class PolicyEnforcerGraph extends Graph {
142
+ readonly policies: Node<readonly PolicyRuleData[]>;
143
+ readonly violations: TopicGraph<PolicyViolation>;
144
+ readonly violationCount: Node<number>;
145
+ private readonly _target;
146
+ private readonly _mode;
147
+ private _currentGuard;
148
+ constructor(target: Graph, policies: readonly PolicyRuleData[] | Node<readonly PolicyRuleData[]>, opts: PolicyEnforcerOptions);
149
+ private _publishViolation;
150
+ /** Snapshot of recorded violations. */
151
+ all(): readonly PolicyViolation[];
152
+ get mode(): "audit" | "enforce";
153
+ get target(): Graph;
154
+ }
155
+ /**
156
+ * Wraps a {@link Graph} with reactive policy enforcement. Pass either a
157
+ * static rule list or a {@link Node} of rules (LLM-updatable). Records
158
+ * `PolicyViolation` entries to `violations` topic; in `"enforce"` mode also
159
+ * pushes guards onto target nodes so disallowed writes throw.
160
+ */
161
+ declare function policyEnforcer(target: Graph, policies: readonly PolicyRuleData[] | Node<readonly PolicyRuleData[]>, opts?: PolicyEnforcerOptions): PolicyEnforcerGraph;
162
+ /**
163
+ * Reactive {@link CausalChain} that recomputes whenever the audited graph
164
+ * changes. Returns a `Node<CausalChain>` suitable for subscription, mounting,
165
+ * or composition (e.g. inside `graphLens.why(node)`).
166
+ *
167
+ * **How it stays live:** an internal `version` state is bumped by an observer
168
+ * attached to `target.observe()`; the derived chain depends on `version`, so
169
+ * each mutation triggers a recompute. To avoid stalling on no-op events, only
170
+ * `data`, `error`, `complete`, and `teardown` bump the version (matching the
171
+ * audit defaults).
172
+ */
173
+ /**
174
+ * @deprecated Use `graph.explain(from, to, { reactive: true, ... })` directly.
175
+ * This free-function wrapper now dispatches to the consolidated
176
+ * {@link Graph.explain} overload for mental-model consistency with
177
+ * `describe` / `observe`. Will be removed pre-1.0.
178
+ */
179
+ declare function reactiveExplainPath(target: Graph, from: string, to: string, opts?: {
180
+ maxDepth?: number;
181
+ name?: string;
182
+ findCycle?: boolean;
183
+ }): {
184
+ node: Node<CausalChain>;
185
+ dispose: () => void;
186
+ };
187
+ /** Options for {@link complianceSnapshot}. */
188
+ interface ComplianceSnapshotOptions {
189
+ audit?: AuditTrailGraph;
190
+ policies?: PolicyEnforcerGraph;
191
+ /** Actor recorded as the snapshot taker. */
192
+ actor?: Actor;
193
+ }
194
+ /** Output of {@link complianceSnapshot}. JSON-serializable. */
195
+ interface ComplianceSnapshotResult {
196
+ format_version: 1;
197
+ timestamp_ns: number;
198
+ wall_clock_ns: number;
199
+ actor?: Actor;
200
+ graph: GraphPersistSnapshot;
201
+ audit?: {
202
+ count: number;
203
+ entries: AuditEntry[];
204
+ };
205
+ policies?: {
206
+ mode: "audit" | "enforce";
207
+ rules: readonly PolicyRuleData[];
208
+ violations: readonly PolicyViolation[];
209
+ };
210
+ /**
211
+ * Truncated SHA-256 hex (16 chars / ~64 bits) over a canonical encoding
212
+ * of every field above (excluding `fingerprint` itself). Deterministic
213
+ * across runs given identical inputs. Suitable for casual tamper-evidence
214
+ * and content-addressed dedup; for full cryptographic strength, hash the
215
+ * canonical JSON externally with Web Crypto / Node `crypto`.
216
+ */
217
+ fingerprint: string;
218
+ }
219
+ /**
220
+ * One-shot point-in-time export of a {@link Graph}'s state plus optional
221
+ * audit + policy bundles. Returns a JSON-serializable object with a
222
+ * deterministic truncated-SHA-256 {@link ComplianceSnapshotResult.fingerprint}
223
+ * over the canonical payload for tamper-evidence in regulatory archival.
224
+ *
225
+ * **Cryptographic strength:** the fingerprint is truncated to 64 bits for
226
+ * compact archival. Collision-resistant for casual integrity checks but NOT
227
+ * sufficient for adversarial tamper-evidence — pair with a full SHA-256
228
+ * (or stronger) over the canonical JSON when regulatory requirements demand
229
+ * collision resistance.
230
+ */
231
+ declare function complianceSnapshot(target: Graph, opts?: ComplianceSnapshotOptions): ComplianceSnapshotResult;
232
+
233
+ type index_AuditEntry = AuditEntry;
234
+ type index_AuditTrailGraph = AuditTrailGraph;
235
+ declare const index_AuditTrailGraph: typeof AuditTrailGraph;
236
+ type index_AuditTrailOptions = AuditTrailOptions;
237
+ type index_ComplianceSnapshotOptions = ComplianceSnapshotOptions;
238
+ type index_ComplianceSnapshotResult = ComplianceSnapshotResult;
239
+ type index_PolicyEnforcerGraph = PolicyEnforcerGraph;
240
+ declare const index_PolicyEnforcerGraph: typeof PolicyEnforcerGraph;
241
+ type index_PolicyEnforcerOptions = PolicyEnforcerOptions;
242
+ type index_PolicyViolation = PolicyViolation;
243
+ declare const index_auditTrail: typeof auditTrail;
244
+ declare const index_complianceSnapshot: typeof complianceSnapshot;
245
+ declare const index_policyEnforcer: typeof policyEnforcer;
246
+ declare const index_reactiveExplainPath: typeof reactiveExplainPath;
247
+ declare namespace index {
248
+ export { type index_AuditEntry as AuditEntry, index_AuditTrailGraph as AuditTrailGraph, type index_AuditTrailOptions as AuditTrailOptions, type index_ComplianceSnapshotOptions as ComplianceSnapshotOptions, type index_ComplianceSnapshotResult as ComplianceSnapshotResult, index_PolicyEnforcerGraph as PolicyEnforcerGraph, type index_PolicyEnforcerOptions as PolicyEnforcerOptions, type index_PolicyViolation as PolicyViolation, index_auditTrail as auditTrail, index_complianceSnapshot as complianceSnapshot, index_policyEnforcer as policyEnforcer, index_reactiveExplainPath as reactiveExplainPath };
249
+ }
250
+
251
+ export { type AuditEntry as A, type ComplianceSnapshotOptions as C, PolicyEnforcerGraph as P, type PolicyViolation as a, AuditTrailGraph as b, type AuditTrailOptions as c, type ComplianceSnapshotResult as d, type PolicyEnforcerOptions as e, auditTrail as f, complianceSnapshot as g, index as i, policyEnforcer as p, reactiveExplainPath as r };
@@ -0,0 +1,192 @@
1
+ import { a as Node } from './node-Cc1TniY8.cjs';
2
+ import { a as GraphOptions, G as Graph } from './graph-D48Qw9Cg.cjs';
3
+
4
+ /**
5
+ * CQRS patterns (roadmap §4.5).
6
+ *
7
+ * Composition layer over reactiveLog (3.2), pipeline/sagas (4.1), event bus (4.2),
8
+ * projections (4.3). Guards (1.5) enforce command/query boundary.
9
+ *
10
+ * - `cqrs(name, opts?)` → `CqrsGraph` — top-level factory
11
+ * - `CqrsGraph.command(name, handler)` — write-only node; guard rejects `observe`
12
+ * - `CqrsGraph.event(name)` — backed by `reactiveLog`; append-only
13
+ * - `CqrsGraph.projection(name, events, reducer, initial)` — read-only derived; guard rejects `write`
14
+ * - `CqrsGraph.saga(name, events, handler)` — event-driven side effects
15
+ */
16
+
17
+ /**
18
+ * Immutable envelope for events emitted by command handlers.
19
+ *
20
+ * `seq` is a per-graph monotonic counter that provides stable ordering when
21
+ * multiple events share the same `timestampNs` (same wall-clock tick).
22
+ */
23
+ type CqrsEvent<T = unknown> = {
24
+ type: string;
25
+ payload: T;
26
+ /** Wall-clock nanoseconds (via `wallClockNs()`). */
27
+ timestampNs: number;
28
+ /** Monotonic sequence within this CqrsGraph instance. */
29
+ seq: number;
30
+ /** V0 identity of the event log node at append time (§6.0b). */
31
+ v0?: {
32
+ id: string;
33
+ version: number;
34
+ };
35
+ };
36
+ /**
37
+ * Opaque replay cursor returned by `loadEvents`. Pass it back to
38
+ * `loadEvents` to resume from the last position.
39
+ */
40
+ type EventStoreCursor = {
41
+ readonly __brand?: "EventStoreCursor";
42
+ [key: string]: unknown;
43
+ };
44
+ /**
45
+ * Result of `loadEvents` — events plus an opaque cursor for resumption.
46
+ */
47
+ type LoadEventsResult = {
48
+ events: CqrsEvent[];
49
+ cursor: EventStoreCursor | undefined;
50
+ };
51
+ /**
52
+ * Pluggable persistence for CQRS events.
53
+ *
54
+ * **`persist`:** Must be synchronous. Called from the dispatch path inside
55
+ * `batch()`. Adapters that need async I/O should buffer internally and
56
+ * expose a `flush()` method for explicit drain.
57
+ */
58
+ interface EventStoreAdapter {
59
+ persist(event: CqrsEvent): void;
60
+ /**
61
+ * Load persisted events. When `cursor` is provided, returns only events
62
+ * after that position. The returned `cursor` should be passed to the next
63
+ * `loadEvents` call for incremental replay.
64
+ */
65
+ loadEvents(eventType: string, cursor?: EventStoreCursor): LoadEventsResult | Promise<LoadEventsResult>;
66
+ /** Optional explicit flush for adapters with async I/O. */
67
+ flush?(): Promise<void>;
68
+ }
69
+ declare class MemoryEventStore implements EventStoreAdapter {
70
+ private readonly _store;
71
+ persist(event: CqrsEvent): void;
72
+ loadEvents(eventType: string, cursor?: EventStoreCursor): LoadEventsResult;
73
+ clear(): void;
74
+ }
75
+ type CommandActions = {
76
+ /** Append an event to a named event log (bypasses event guard). */
77
+ emit: (eventName: string, payload: unknown) => void;
78
+ };
79
+ /**
80
+ * Command handler receives the dispatch payload and actions to emit events.
81
+ *
82
+ * **Purity:** Handlers should not mutate the payload. Event emission via
83
+ * `actions.emit()` is the only sanctioned side effect.
84
+ */
85
+ type CommandHandler<T = unknown> = (payload: T, actions: CommandActions) => void;
86
+ /**
87
+ * Projection reducer folds events into a read model.
88
+ *
89
+ * **Purity contract:** Reducers MUST be pure — return a new state value
90
+ * without mutating `state` or any event. The `state` parameter is the
91
+ * original `initial` value on every invocation (full event-sourcing replay),
92
+ * so mutation would corrupt future recomputations.
93
+ */
94
+ type ProjectionReducer<TState = unknown, TEvent = unknown> = (state: TState, events: readonly CqrsEvent<TEvent>[]) => TState;
95
+ type SagaHandler<T = unknown> = (event: CqrsEvent<T>) => void;
96
+ type CqrsOptions = {
97
+ graph?: GraphOptions;
98
+ };
99
+ declare class CqrsGraph extends Graph {
100
+ private readonly _eventLogs;
101
+ private readonly _commandHandlers;
102
+ private readonly _projections;
103
+ private readonly _sagas;
104
+ private readonly _keepaliveDisposers;
105
+ private _eventStore;
106
+ private _seq;
107
+ constructor(name: string, opts?: CqrsOptions);
108
+ destroy(): void;
109
+ /**
110
+ * Register a named event stream backed by `reactiveLog`.
111
+ * Guard denies external `write` — only commands append internally.
112
+ */
113
+ event(name: string): Node<readonly CqrsEvent[]>;
114
+ /** Internal: append to an event log, auto-registering if needed. */
115
+ private _appendEvent;
116
+ /**
117
+ * Register a command with its handler. Guard denies `observe` (write-only).
118
+ * Use `dispatch(name, payload)` to execute.
119
+ *
120
+ * The command node carries dynamic `meta.error` — a reactive companion
121
+ * that holds the last handler error (or `null` on success).
122
+ */
123
+ command<T = unknown>(name: string, handler: CommandHandler<T>): Node<T>;
124
+ /**
125
+ * Execute a registered command. Wraps the entire dispatch in `batch()` so
126
+ * the command node DATA and all emitted events settle atomically.
127
+ *
128
+ * If the handler throws, `meta.error` on the command node is set to the
129
+ * error and the exception is re-thrown.
130
+ */
131
+ dispatch<T = unknown>(commandName: string, payload: T): void;
132
+ /**
133
+ * Register a read-only projection derived from event streams.
134
+ * Guard denies `write` — value is computed from events only.
135
+ *
136
+ * **Purity contract:** The `reducer` must be a pure function — it receives
137
+ * the original `initial` on every invocation (full event-sourcing replay).
138
+ * Never mutate `initial`; always return a new value.
139
+ */
140
+ projection<TState>(name: string, eventNames: readonly string[], reducer: ProjectionReducer<TState>, initial: TState): Node<TState>;
141
+ /**
142
+ * Register an event-driven side effect. Runs handler for each **new** event
143
+ * from the specified streams (tracks last-processed entry count per stream).
144
+ *
145
+ * The saga node carries dynamic `meta.error` — a reactive companion that
146
+ * holds the last handler error (or `null` on success). Handler errors do
147
+ * not propagate out of the saga run (the event cursor still advances so
148
+ * the same entry is not delivered twice).
149
+ */
150
+ saga<T = unknown>(name: string, eventNames: readonly string[], handler: SagaHandler<T>): Node<unknown>;
151
+ useEventStore(adapter: EventStoreAdapter): void;
152
+ /**
153
+ * Replay persisted events through a reducer to rebuild a read model.
154
+ * Requires an event store adapter wired via `useEventStore()`.
155
+ */
156
+ rebuildProjection<TState>(eventNames: readonly string[], reducer: ProjectionReducer<TState>, initial: TState): Promise<TState>;
157
+ }
158
+ /**
159
+ * Create a CQRS graph container.
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * const app = cqrs("orders");
164
+ * app.event("orderPlaced");
165
+ * app.command("placeOrder", (payload, { emit }) => {
166
+ * emit("orderPlaced", { orderId: payload.id, amount: payload.amount });
167
+ * });
168
+ * app.projection("orderCount", ["orderPlaced"], (_s, events) => events.length, 0);
169
+ * app.dispatch("placeOrder", { id: "1", amount: 100 });
170
+ * ```
171
+ */
172
+ declare function cqrs(name: string, opts?: CqrsOptions): CqrsGraph;
173
+
174
+ type index_CommandActions = CommandActions;
175
+ type index_CommandHandler<T = unknown> = CommandHandler<T>;
176
+ type index_CqrsEvent<T = unknown> = CqrsEvent<T>;
177
+ type index_CqrsGraph = CqrsGraph;
178
+ declare const index_CqrsGraph: typeof CqrsGraph;
179
+ type index_CqrsOptions = CqrsOptions;
180
+ type index_EventStoreAdapter = EventStoreAdapter;
181
+ type index_EventStoreCursor = EventStoreCursor;
182
+ type index_LoadEventsResult = LoadEventsResult;
183
+ type index_MemoryEventStore = MemoryEventStore;
184
+ declare const index_MemoryEventStore: typeof MemoryEventStore;
185
+ type index_ProjectionReducer<TState = unknown, TEvent = unknown> = ProjectionReducer<TState, TEvent>;
186
+ type index_SagaHandler<T = unknown> = SagaHandler<T>;
187
+ declare const index_cqrs: typeof cqrs;
188
+ declare namespace index {
189
+ export { type index_CommandActions as CommandActions, type index_CommandHandler as CommandHandler, type index_CqrsEvent as CqrsEvent, index_CqrsGraph as CqrsGraph, type index_CqrsOptions as CqrsOptions, type index_EventStoreAdapter as EventStoreAdapter, type index_EventStoreCursor as EventStoreCursor, type index_LoadEventsResult as LoadEventsResult, index_MemoryEventStore as MemoryEventStore, type index_ProjectionReducer as ProjectionReducer, type index_SagaHandler as SagaHandler, index_cqrs as cqrs };
190
+ }
191
+
192
+ export { type CqrsOptions as C, type EventStoreAdapter as E, type LoadEventsResult as L, MemoryEventStore as M, type ProjectionReducer as P, type SagaHandler as S, CqrsGraph as a, type CommandActions as b, type CommandHandler as c, type CqrsEvent as d, type EventStoreCursor as e, cqrs as f, index as i };