@graphrefly/graphrefly 0.44.0 → 0.45.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 (420) hide show
  1. package/README.md +21 -17
  2. package/dist/compat/index.cjs +20 -10
  3. package/dist/compat/index.cjs.map +1 -0
  4. package/dist/compat/index.d.cts +1 -22
  5. package/dist/compat/index.d.ts +1 -22
  6. package/dist/compat/index.js +3 -1
  7. package/dist/compat/index.js.map +1 -0
  8. package/dist/compat/jotai/index.cjs +21 -1
  9. package/dist/compat/jotai/index.cjs.map +1 -0
  10. package/dist/compat/jotai/index.d.cts +1 -2
  11. package/dist/compat/jotai/index.d.ts +1 -2
  12. package/dist/compat/jotai/index.js +3 -1
  13. package/dist/compat/jotai/index.js.map +1 -0
  14. package/dist/compat/nanostores/index.cjs +21 -1
  15. package/dist/compat/nanostores/index.cjs.map +1 -0
  16. package/dist/compat/nanostores/index.d.cts +1 -2
  17. package/dist/compat/nanostores/index.d.ts +1 -2
  18. package/dist/compat/nanostores/index.js +3 -1
  19. package/dist/compat/nanostores/index.js.map +1 -0
  20. package/dist/compat/nestjs/index.cjs +20 -10
  21. package/dist/compat/nestjs/index.cjs.map +1 -0
  22. package/dist/compat/nestjs/index.d.cts +1 -13
  23. package/dist/compat/nestjs/index.d.ts +1 -13
  24. package/dist/compat/nestjs/index.js +3 -1
  25. package/dist/compat/nestjs/index.js.map +1 -0
  26. package/dist/compat/react/index.cjs +21 -1
  27. package/dist/compat/react/index.cjs.map +1 -0
  28. package/dist/compat/react/index.d.cts +1 -2
  29. package/dist/compat/react/index.d.ts +1 -2
  30. package/dist/compat/react/index.js +3 -1
  31. package/dist/compat/react/index.js.map +1 -0
  32. package/dist/compat/solid/index.cjs +21 -1
  33. package/dist/compat/solid/index.cjs.map +1 -0
  34. package/dist/compat/solid/index.d.cts +1 -2
  35. package/dist/compat/solid/index.d.ts +1 -2
  36. package/dist/compat/solid/index.js +3 -1
  37. package/dist/compat/solid/index.js.map +1 -0
  38. package/dist/compat/svelte/index.cjs +21 -1
  39. package/dist/compat/svelte/index.cjs.map +1 -0
  40. package/dist/compat/svelte/index.d.cts +1 -2
  41. package/dist/compat/svelte/index.d.ts +1 -2
  42. package/dist/compat/svelte/index.js +3 -1
  43. package/dist/compat/svelte/index.js.map +1 -0
  44. package/dist/compat/vue/index.cjs +21 -1
  45. package/dist/compat/vue/index.cjs.map +1 -0
  46. package/dist/compat/vue/index.d.cts +1 -3
  47. package/dist/compat/vue/index.d.ts +1 -3
  48. package/dist/compat/vue/index.js +3 -1
  49. package/dist/compat/vue/index.js.map +1 -0
  50. package/dist/compat/zustand/index.cjs +21 -3
  51. package/dist/compat/zustand/index.cjs.map +1 -0
  52. package/dist/compat/zustand/index.d.cts +1 -6
  53. package/dist/compat/zustand/index.d.ts +1 -6
  54. package/dist/compat/zustand/index.js +3 -1
  55. package/dist/compat/zustand/index.js.map +1 -0
  56. package/dist/core/index.cjs +21 -1
  57. package/dist/core/index.cjs.map +1 -0
  58. package/dist/core/index.d.cts +1 -3
  59. package/dist/core/index.d.ts +1 -3
  60. package/dist/core/index.js +3 -1
  61. package/dist/core/index.js.map +1 -0
  62. package/dist/extra/browser.cjs +21 -1
  63. package/dist/extra/browser.cjs.map +1 -0
  64. package/dist/extra/browser.d.cts +1 -4
  65. package/dist/extra/browser.d.ts +1 -4
  66. package/dist/extra/browser.js +3 -1
  67. package/dist/extra/browser.js.map +1 -0
  68. package/dist/extra/index.cjs +20 -19
  69. package/dist/extra/index.cjs.map +1 -0
  70. package/dist/extra/index.d.cts +1 -17
  71. package/dist/extra/index.d.ts +1 -17
  72. package/dist/extra/index.js +3 -1
  73. package/dist/extra/index.js.map +1 -0
  74. package/dist/extra/node.cjs +21 -2
  75. package/dist/extra/node.cjs.map +1 -0
  76. package/dist/extra/node.d.cts +1 -187
  77. package/dist/extra/node.d.ts +1 -187
  78. package/dist/extra/node.js +3 -2
  79. package/dist/extra/node.js.map +1 -0
  80. package/dist/extra/operators.cjs +21 -1
  81. package/dist/extra/operators.cjs.map +1 -0
  82. package/dist/extra/operators.d.cts +1 -958
  83. package/dist/extra/operators.d.ts +1 -958
  84. package/dist/extra/operators.js +3 -1
  85. package/dist/extra/operators.js.map +1 -0
  86. package/dist/extra/reactive.cjs +21 -1
  87. package/dist/extra/reactive.cjs.map +1 -0
  88. package/dist/extra/reactive.d.cts +1 -353
  89. package/dist/extra/reactive.d.ts +1 -353
  90. package/dist/extra/reactive.js +3 -1
  91. package/dist/extra/reactive.js.map +1 -0
  92. package/dist/extra/render/index.cjs +21 -5
  93. package/dist/extra/render/index.cjs.map +1 -0
  94. package/dist/extra/render/index.d.cts +1 -183
  95. package/dist/extra/render/index.d.ts +1 -183
  96. package/dist/extra/render/index.js +3 -1
  97. package/dist/extra/render/index.js.map +1 -0
  98. package/dist/extra/sources.cjs +21 -3
  99. package/dist/extra/sources.cjs.map +1 -0
  100. package/dist/extra/sources.d.cts +1 -584
  101. package/dist/extra/sources.d.ts +1 -584
  102. package/dist/extra/sources.js +3 -1
  103. package/dist/extra/sources.js.map +1 -0
  104. package/dist/extra/storage-browser.cjs +21 -1
  105. package/dist/extra/storage-browser.cjs.map +1 -0
  106. package/dist/extra/storage-browser.d.cts +1 -37
  107. package/dist/extra/storage-browser.d.ts +1 -37
  108. package/dist/extra/storage-browser.js +3 -1
  109. package/dist/extra/storage-browser.js.map +1 -0
  110. package/dist/extra/storage-core.cjs +21 -1
  111. package/dist/extra/storage-core.cjs.map +1 -0
  112. package/dist/extra/storage-core.d.cts +1 -28
  113. package/dist/extra/storage-core.d.ts +1 -28
  114. package/dist/extra/storage-core.js +3 -1
  115. package/dist/extra/storage-core.js.map +1 -0
  116. package/dist/extra/storage-node.cjs +20 -0
  117. package/dist/extra/storage-node.cjs.map +1 -0
  118. package/dist/extra/storage-node.d.cts +1 -2
  119. package/dist/extra/storage-node.d.ts +1 -2
  120. package/dist/extra/storage-node.js +3 -0
  121. package/dist/extra/storage-node.js.map +1 -0
  122. package/dist/extra/storage-tiers-browser.cjs +21 -1
  123. package/dist/extra/storage-tiers-browser.cjs.map +1 -0
  124. package/dist/extra/storage-tiers-browser.d.cts +1 -120
  125. package/dist/extra/storage-tiers-browser.d.ts +1 -120
  126. package/dist/extra/storage-tiers-browser.js +3 -1
  127. package/dist/extra/storage-tiers-browser.js.map +1 -0
  128. package/dist/extra/storage-tiers-node.cjs +21 -1
  129. package/dist/extra/storage-tiers-node.cjs.map +1 -0
  130. package/dist/extra/storage-tiers-node.d.cts +1 -210
  131. package/dist/extra/storage-tiers-node.d.ts +1 -210
  132. package/dist/extra/storage-tiers-node.js +3 -1
  133. package/dist/extra/storage-tiers-node.js.map +1 -0
  134. package/dist/extra/storage-tiers.cjs +21 -1
  135. package/dist/extra/storage-tiers.cjs.map +1 -0
  136. package/dist/extra/storage-tiers.d.cts +1 -412
  137. package/dist/extra/storage-tiers.d.ts +1 -412
  138. package/dist/extra/storage-tiers.js +3 -1
  139. package/dist/extra/storage-tiers.js.map +1 -0
  140. package/dist/extra/storage-wal.cjs +21 -0
  141. package/dist/extra/storage-wal.cjs.map +1 -0
  142. package/dist/extra/storage-wal.d.cts +1 -0
  143. package/dist/extra/storage-wal.d.ts +1 -0
  144. package/dist/extra/storage-wal.js +3 -0
  145. package/dist/extra/storage-wal.js.map +1 -0
  146. package/dist/graph/index.cjs +21 -7
  147. package/dist/graph/index.cjs.map +1 -0
  148. package/dist/graph/index.d.cts +1 -7
  149. package/dist/graph/index.d.ts +1 -7
  150. package/dist/graph/index.js +3 -1
  151. package/dist/graph/index.js.map +1 -0
  152. package/dist/index.cjs +20 -227
  153. package/dist/index.cjs.map +1 -0
  154. package/dist/index.d.cts +45 -95
  155. package/dist/index.d.ts +45 -95
  156. package/dist/index.js +3 -1
  157. package/dist/index.js.map +1 -0
  158. package/dist/patterns/ai/browser.cjs +20 -7
  159. package/dist/patterns/ai/browser.cjs.map +1 -0
  160. package/dist/patterns/ai/browser.d.cts +1 -127
  161. package/dist/patterns/ai/browser.d.ts +1 -127
  162. package/dist/patterns/ai/browser.js +3 -3
  163. package/dist/patterns/ai/browser.js.map +1 -0
  164. package/dist/patterns/ai/index.cjs +20 -73
  165. package/dist/patterns/ai/index.cjs.map +1 -0
  166. package/dist/patterns/ai/index.d.cts +1 -20
  167. package/dist/patterns/ai/index.d.ts +1 -20
  168. package/dist/patterns/ai/index.js +3 -1
  169. package/dist/patterns/ai/index.js.map +1 -0
  170. package/dist/patterns/ai/node.cjs +21 -1
  171. package/dist/patterns/ai/node.cjs.map +1 -0
  172. package/dist/patterns/ai/node.d.cts +1 -59
  173. package/dist/patterns/ai/node.d.ts +1 -59
  174. package/dist/patterns/ai/node.js +3 -1
  175. package/dist/patterns/ai/node.js.map +1 -0
  176. package/dist/patterns/cqrs/index.cjs +21 -3
  177. package/dist/patterns/cqrs/index.cjs.map +1 -0
  178. package/dist/patterns/cqrs/index.d.cts +1 -8
  179. package/dist/patterns/cqrs/index.d.ts +1 -8
  180. package/dist/patterns/cqrs/index.js +3 -1
  181. package/dist/patterns/cqrs/index.js.map +1 -0
  182. package/dist/patterns/demo-shell/index.cjs +21 -5
  183. package/dist/patterns/demo-shell/index.cjs.map +1 -0
  184. package/dist/patterns/demo-shell/index.d.cts +1 -7
  185. package/dist/patterns/demo-shell/index.d.ts +1 -7
  186. package/dist/patterns/demo-shell/index.js +3 -1
  187. package/dist/patterns/demo-shell/index.js.map +1 -0
  188. package/dist/patterns/domain-templates/index.cjs +21 -3
  189. package/dist/patterns/domain-templates/index.cjs.map +1 -0
  190. package/dist/patterns/domain-templates/index.d.cts +1 -6
  191. package/dist/patterns/domain-templates/index.d.ts +1 -6
  192. package/dist/patterns/domain-templates/index.js +3 -1
  193. package/dist/patterns/domain-templates/index.js.map +1 -0
  194. package/dist/patterns/graphspec/index.cjs +21 -86
  195. package/dist/patterns/graphspec/index.cjs.map +1 -0
  196. package/dist/patterns/graphspec/index.d.cts +1 -8
  197. package/dist/patterns/graphspec/index.d.ts +1 -8
  198. package/dist/patterns/graphspec/index.js +3 -1
  199. package/dist/patterns/graphspec/index.js.map +1 -0
  200. package/dist/patterns/harness/index.cjs +21 -48
  201. package/dist/patterns/harness/index.cjs.map +1 -0
  202. package/dist/patterns/harness/index.d.cts +1 -13
  203. package/dist/patterns/harness/index.d.ts +1 -13
  204. package/dist/patterns/harness/index.js +3 -1
  205. package/dist/patterns/harness/index.js.map +1 -0
  206. package/dist/patterns/inspect/index.cjs +21 -3
  207. package/dist/patterns/inspect/index.cjs.map +1 -0
  208. package/dist/patterns/inspect/index.d.cts +1 -9
  209. package/dist/patterns/inspect/index.d.ts +1 -9
  210. package/dist/patterns/inspect/index.js +3 -1
  211. package/dist/patterns/inspect/index.js.map +1 -0
  212. package/dist/patterns/job-queue/index.cjs +21 -3
  213. package/dist/patterns/job-queue/index.cjs.map +1 -0
  214. package/dist/patterns/job-queue/index.d.cts +1 -9
  215. package/dist/patterns/job-queue/index.d.ts +1 -9
  216. package/dist/patterns/job-queue/index.js +3 -1
  217. package/dist/patterns/job-queue/index.js.map +1 -0
  218. package/dist/patterns/memory/index.cjs +21 -3
  219. package/dist/patterns/memory/index.cjs.map +1 -0
  220. package/dist/patterns/memory/index.d.cts +1 -8
  221. package/dist/patterns/memory/index.d.ts +1 -8
  222. package/dist/patterns/memory/index.js +3 -1
  223. package/dist/patterns/memory/index.js.map +1 -0
  224. package/dist/patterns/messaging/index.cjs +21 -3
  225. package/dist/patterns/messaging/index.cjs.map +1 -0
  226. package/dist/patterns/messaging/index.d.cts +1 -7
  227. package/dist/patterns/messaging/index.d.ts +1 -7
  228. package/dist/patterns/messaging/index.js +3 -1
  229. package/dist/patterns/messaging/index.js.map +1 -0
  230. package/dist/patterns/orchestration/index.cjs +21 -3
  231. package/dist/patterns/orchestration/index.cjs.map +1 -0
  232. package/dist/patterns/orchestration/index.d.cts +1 -8
  233. package/dist/patterns/orchestration/index.d.ts +1 -8
  234. package/dist/patterns/orchestration/index.js +3 -1
  235. package/dist/patterns/orchestration/index.js.map +1 -0
  236. package/dist/patterns/process/index.cjs +21 -3
  237. package/dist/patterns/process/index.cjs.map +1 -0
  238. package/dist/patterns/process/index.d.cts +1 -10
  239. package/dist/patterns/process/index.d.ts +1 -10
  240. package/dist/patterns/process/index.js +3 -1
  241. package/dist/patterns/process/index.js.map +1 -0
  242. package/dist/patterns/reactive-layout/index.cjs +21 -4
  243. package/dist/patterns/reactive-layout/index.cjs.map +1 -0
  244. package/dist/patterns/reactive-layout/index.d.cts +1 -7
  245. package/dist/patterns/reactive-layout/index.d.ts +1 -7
  246. package/dist/patterns/reactive-layout/index.js +3 -1
  247. package/dist/patterns/reactive-layout/index.js.map +1 -0
  248. package/dist/patterns/reduction/index.cjs +21 -3
  249. package/dist/patterns/reduction/index.cjs.map +1 -0
  250. package/dist/patterns/reduction/index.d.cts +1 -6
  251. package/dist/patterns/reduction/index.d.ts +1 -6
  252. package/dist/patterns/reduction/index.js +3 -1
  253. package/dist/patterns/reduction/index.js.map +1 -0
  254. package/dist/patterns/surface/index.cjs +21 -13
  255. package/dist/patterns/surface/index.cjs.map +1 -0
  256. package/dist/patterns/surface/index.d.cts +1 -9
  257. package/dist/patterns/surface/index.d.ts +1 -9
  258. package/dist/patterns/surface/index.js +3 -1
  259. package/dist/patterns/surface/index.js.map +1 -0
  260. package/dist/patterns/topology-view/index.cjs +21 -0
  261. package/dist/patterns/topology-view/index.cjs.map +1 -0
  262. package/dist/patterns/topology-view/index.d.cts +1 -0
  263. package/dist/patterns/topology-view/index.d.ts +1 -0
  264. package/dist/patterns/topology-view/index.js +3 -0
  265. package/dist/patterns/topology-view/index.js.map +1 -0
  266. package/dist/testing/index.cjs +21 -0
  267. package/dist/testing/index.cjs.map +1 -0
  268. package/dist/testing/index.d.cts +1 -0
  269. package/dist/testing/index.d.ts +1 -0
  270. package/dist/testing/index.js +3 -0
  271. package/dist/testing/index.js.map +1 -0
  272. package/package.json +608 -584
  273. package/dist/backoff-HPZMEZNF.js +0 -1
  274. package/dist/cascading-BglDkMdX.d.cts +0 -199
  275. package/dist/cascading-MFgxu7Yo.d.ts +0 -199
  276. package/dist/chunk-2T7U5EU6.js +0 -1
  277. package/dist/chunk-3G5U5QNE.js +0 -5
  278. package/dist/chunk-4VVTGLXJ.js +0 -1
  279. package/dist/chunk-5M4CCMMD.js +0 -45
  280. package/dist/chunk-5QDBSZBV.js +0 -1
  281. package/dist/chunk-5XJ6B66J.js +0 -1
  282. package/dist/chunk-6QZNQS5B.js +0 -1
  283. package/dist/chunk-6X7AFUJV.js +0 -9
  284. package/dist/chunk-7K6PWTDQ.js +0 -1
  285. package/dist/chunk-7LIAPXJB.js +0 -1
  286. package/dist/chunk-7WPU3UHQ.js +0 -1
  287. package/dist/chunk-A5WCQ5NO.js +0 -1
  288. package/dist/chunk-APPIWSGD.js +0 -84
  289. package/dist/chunk-BEZWM2SY.js +0 -1
  290. package/dist/chunk-C72GO4IZ.js +0 -1
  291. package/dist/chunk-CB676TKJ.js +0 -1
  292. package/dist/chunk-CE6TI2TL.js +0 -1
  293. package/dist/chunk-CE72X3WO.js +0 -1
  294. package/dist/chunk-CK2E7BTU.js +0 -1
  295. package/dist/chunk-CLVB32RD.js +0 -1
  296. package/dist/chunk-CRVT7D2P.js +0 -1
  297. package/dist/chunk-D5RFJOZ2.js +0 -1
  298. package/dist/chunk-D7GPHKFH.js +0 -1
  299. package/dist/chunk-DHRX7JX4.js +0 -2
  300. package/dist/chunk-ESMPEKEV.js +0 -1
  301. package/dist/chunk-F672GV32.js +0 -1
  302. package/dist/chunk-FZMYDOWV.js +0 -1
  303. package/dist/chunk-GHBWHMRZ.js +0 -1
  304. package/dist/chunk-GLERH466.js +0 -1
  305. package/dist/chunk-GPW2V3RE.js +0 -1
  306. package/dist/chunk-HIDYF36O.js +0 -1
  307. package/dist/chunk-HITNVN6B.js +0 -3
  308. package/dist/chunk-HY4DJBA7.js +0 -5
  309. package/dist/chunk-KZIEYVXN.js +0 -1
  310. package/dist/chunk-L6NSJVJZ.js +0 -1
  311. package/dist/chunk-N4MQX6JU.js +0 -18
  312. package/dist/chunk-N7FHEL4D.js +0 -1
  313. package/dist/chunk-NTEURFZH.js +0 -1
  314. package/dist/chunk-OIVP6KFV.js +0 -1
  315. package/dist/chunk-OPHBU3LG.js +0 -1
  316. package/dist/chunk-OYQOZP2F.js +0 -5
  317. package/dist/chunk-PTZK576G.js +0 -1
  318. package/dist/chunk-QYADASLV.js +0 -1
  319. package/dist/chunk-ST7UXLWR.js +0 -1
  320. package/dist/chunk-SVY7VUYU.js +0 -1
  321. package/dist/chunk-TK3NWWD4.js +0 -1
  322. package/dist/chunk-TSOYJ743.js +0 -1
  323. package/dist/chunk-UNGSTR4X.js +0 -61
  324. package/dist/chunk-VIMF6LGM.js +0 -1
  325. package/dist/chunk-VJLMUKOI.js +0 -1
  326. package/dist/chunk-VN6RDSK2.js +0 -1
  327. package/dist/chunk-VV4N5P64.js +0 -1
  328. package/dist/chunk-W3I423PS.js +0 -1
  329. package/dist/chunk-WJR24TAG.js +0 -1
  330. package/dist/chunk-XTGKMHSW.js +0 -1
  331. package/dist/chunk-YBB7ZGTY.js +0 -1
  332. package/dist/chunk-Z4NPUARF.js +0 -1
  333. package/dist/chunk-ZGNQRPDT.js +0 -1
  334. package/dist/chunk-ZKPSFFKU.js +0 -1
  335. package/dist/chunk-ZLV5SQSX.js +0 -1
  336. package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
  337. package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
  338. package/dist/decay-BvOWTZ00.d.ts +0 -112
  339. package/dist/decay-CFlLvXUT.d.cts +0 -112
  340. package/dist/fallback-74oxi34l.d.cts +0 -250
  341. package/dist/fallback-DUyyBTBK.d.ts +0 -250
  342. package/dist/graph-CWvEUQAq.d.cts +0 -1861
  343. package/dist/graph-D9LFnda9.d.ts +0 -1861
  344. package/dist/index-5k1T6jl0.d.cts +0 -121
  345. package/dist/index-9770hRuQ.d.cts +0 -779
  346. package/dist/index-B-_tFaqV.d.cts +0 -468
  347. package/dist/index-B17QddL1.d.cts +0 -374
  348. package/dist/index-B1F8Enjf.d.ts +0 -704
  349. package/dist/index-B5S8ULbU.d.ts +0 -515
  350. package/dist/index-B8YnZpIR.d.ts +0 -102
  351. package/dist/index-BHskSB8v.d.ts +0 -3413
  352. package/dist/index-BIYAkbAi.d.cts +0 -26
  353. package/dist/index-BQSKmbuG.d.cts +0 -127
  354. package/dist/index-BaQaY_IQ.d.cts +0 -231
  355. package/dist/index-BmZXHqkE.d.ts +0 -36
  356. package/dist/index-BoJ5JHxI.d.ts +0 -557
  357. package/dist/index-BocU7pqs.d.ts +0 -779
  358. package/dist/index-BrPrLl4e.d.cts +0 -86
  359. package/dist/index-BxNs2HB9.d.cts +0 -1858
  360. package/dist/index-Byu-OpX_.d.ts +0 -113
  361. package/dist/index-C1T3d7V-.d.cts +0 -704
  362. package/dist/index-C5ri2Axc.d.cts +0 -301
  363. package/dist/index-C5stwKcw.d.cts +0 -44
  364. package/dist/index-C9l6OEBL.d.ts +0 -26
  365. package/dist/index-CBBLl_rc.d.ts +0 -127
  366. package/dist/index-CBGUK09R.d.ts +0 -754
  367. package/dist/index-CC-AvFTy.d.cts +0 -557
  368. package/dist/index-CJF1URuX.d.ts +0 -121
  369. package/dist/index-CK29LV56.d.cts +0 -34
  370. package/dist/index-CMh5Rz1y.d.ts +0 -385
  371. package/dist/index-CPQlGA29.d.ts +0 -34
  372. package/dist/index-CR8QpwX8.d.ts +0 -2680
  373. package/dist/index-CS0LTlB8.d.cts +0 -385
  374. package/dist/index-CSOmP7xT.d.cts +0 -291
  375. package/dist/index-CYq8vAyV.d.ts +0 -291
  376. package/dist/index-CZ3r5Rxp.d.ts +0 -374
  377. package/dist/index-CasX6Pfq.d.cts +0 -358
  378. package/dist/index-CdAlHFEt.d.ts +0 -44
  379. package/dist/index-CdTelp1M.d.ts +0 -202
  380. package/dist/index-CeFiHtAg.d.ts +0 -468
  381. package/dist/index-Cj3WohTd.d.cts +0 -202
  382. package/dist/index-Climxqsu.d.cts +0 -754
  383. package/dist/index-Co7uli2l.d.cts +0 -3413
  384. package/dist/index-CviRnE4K.d.ts +0 -45
  385. package/dist/index-Cwv0KWcU.d.cts +0 -102
  386. package/dist/index-CzLVrjxn.d.ts +0 -231
  387. package/dist/index-D0aciIex.d.cts +0 -209
  388. package/dist/index-DHen9Klo.d.ts +0 -1858
  389. package/dist/index-DV_1YuVk.d.cts +0 -221
  390. package/dist/index-Dc4AYqrJ.d.cts +0 -515
  391. package/dist/index-Dgl1HpPn.d.ts +0 -86
  392. package/dist/index-DisjX8a-.d.ts +0 -221
  393. package/dist/index-UPSiS-X7.d.cts +0 -2680
  394. package/dist/index-Yq60JP3s.d.ts +0 -209
  395. package/dist/index-ZVQhLa2i.d.cts +0 -37
  396. package/dist/index-_6ODbuOu.d.cts +0 -45
  397. package/dist/index-hcDJ8PSI.d.cts +0 -36
  398. package/dist/index-nozs3fFC.d.ts +0 -301
  399. package/dist/index-p09KSrTN.d.ts +0 -358
  400. package/dist/index-sqkqlb1p.d.ts +0 -37
  401. package/dist/index-tRCxuAXF.d.cts +0 -113
  402. package/dist/node-kK3CvTrR.d.cts +0 -1347
  403. package/dist/node-kK3CvTrR.d.ts +0 -1347
  404. package/dist/observable-DWjNfLvC.d.ts +0 -36
  405. package/dist/observable-e3eiPPFy.d.cts +0 -36
  406. package/dist/pipeline-graph-CIKhynsF.d.cts +0 -142
  407. package/dist/pipeline-graph-Sgj0gCwn.d.ts +0 -142
  408. package/dist/reactive-layout-DOTs9P3X.d.ts +0 -183
  409. package/dist/reactive-layout-DgctbqZo.d.cts +0 -183
  410. package/dist/reactive-log-BKALbfal.d.ts +0 -223
  411. package/dist/reactive-log-DIGdYqQ6.d.cts +0 -223
  412. package/dist/reactive-map-CEFGp8TK.d.cts +0 -296
  413. package/dist/reactive-map-DS_SIAxv.d.ts +0 -296
  414. package/dist/resilience-6LYQJAC5.js +0 -1
  415. package/dist/sugar-DQjFmVqb.d.cts +0 -399
  416. package/dist/sugar-fhLIE7TT.d.ts +0 -399
  417. package/dist/topology-tree-Bcz27hpF.d.cts +0 -25
  418. package/dist/topology-tree-xvaD0fOX.d.ts +0 -25
  419. package/dist/types-C0_yquda.d.cts +0 -442
  420. package/dist/types-CWFysE9E.d.ts +0 -442
@@ -1,45 +0,0 @@
1
- import { N as Node } from './node-kK3CvTrR.js';
2
-
3
- /** Svelte store contract — implements the minimal `subscribe` method. */
4
- interface SvelteReadable<T> {
5
- subscribe(run: (value: T) => void): () => void;
6
- }
7
- /** Svelte writable store contract. */
8
- interface SvelteWritable<T> extends SvelteReadable<T> {
9
- set(value: T): void;
10
- update(updater: (value: T) => T): void;
11
- }
12
- /**
13
- * Subscribe to a `Node<T>` as a Svelte readable store (implements Svelte store contract).
14
- * Subscription lifecycle is tied to Svelte store unsubscription (not node terminal messages).
15
- */
16
- declare function useSubscribe<T>(node: Node<T>): SvelteReadable<T | undefined | null>;
17
- /**
18
- * Bind a writable `Node<T>` as a Svelte writable store.
19
- * Reads and writes adapt seamlessly.
20
- * Setter/update always forward `[[DIRTY], [DATA, value]]`, including `value === undefined`.
21
- * Subscription lifecycle is tied to Svelte store unsubscription (not node terminal messages).
22
- */
23
- declare function useStore<T>(node: Node<T>): SvelteWritable<T | undefined | null>;
24
- /** Maps a key to an object of nodes. Used by `useSubscribeRecord`. */
25
- type NodeFactory<K, R extends Record<string, any>> = (key: K) => {
26
- [P in keyof R]: Node<R[P]>;
27
- };
28
- /**
29
- * Subscribe to a dynamic keyed record of nodes as a Svelte readable store.
30
- * Re-subscribes all per-key fields whenever `keysNode` changes.
31
- * Key re-sync is gated to settled batches (`messageTier >= 3`) to avoid DIRTY-phase churn.
32
- */
33
- declare function useSubscribeRecord<K extends string, R extends Record<string, any>>(keysNode: Node<K[]>, factory: NodeFactory<K, R>): SvelteReadable<Record<K, R>>;
34
-
35
- type index_NodeFactory<K, R extends Record<string, any>> = NodeFactory<K, R>;
36
- type index_SvelteReadable<T> = SvelteReadable<T>;
37
- type index_SvelteWritable<T> = SvelteWritable<T>;
38
- declare const index_useStore: typeof useStore;
39
- declare const index_useSubscribe: typeof useSubscribe;
40
- declare const index_useSubscribeRecord: typeof useSubscribeRecord;
41
- declare namespace index {
42
- export { type index_NodeFactory as NodeFactory, type index_SvelteReadable as SvelteReadable, type index_SvelteWritable as SvelteWritable, index_useStore as useStore, index_useSubscribe as useSubscribe, index_useSubscribeRecord as useSubscribeRecord };
43
- }
44
-
45
- export { type NodeFactory as N, type SvelteReadable as S, type SvelteWritable as a, useSubscribe as b, useSubscribeRecord as c, index as i, useStore as u };
@@ -1,102 +0,0 @@
1
- import { G as Graph } from './graph-CWvEUQAq.cjs';
2
- import { M as MeasurementAdapter } from './reactive-layout-DgctbqZo.cjs';
3
-
4
- /**
5
- * Three-pane demo shell (roadmap §7.2).
6
- *
7
- * A `Graph("demo-shell")` that dogfoods reactive coordination for the
8
- * main/side split layout with synchronized cross-highlighting.
9
- *
10
- * **Zero framework dependency** — framework bindings wrap pane components only.
11
- * The shell graph is headless and fully testable.
12
- */
13
-
14
- /** Identifies which pane is the source of a hover event. */
15
- type HoverPaneType = "visual" | "graph" | "code";
16
- /** Cross-highlighting hover target. `null` means nothing hovered. */
17
- type HoverTarget = {
18
- pane: HoverPaneType;
19
- id: string;
20
- } | null;
21
- /** Which pane is full-screened (null = normal layout). */
22
- type FullscreenPane = "main" | "graph" | "code" | null;
23
- /**
24
- * Cross-referencing registry: maps node paths to code line numbers and
25
- * visual element selectors. Provided by each demo's `store.ts`.
26
- */
27
- type NodeRegistry = Map<string, {
28
- codeLine: number;
29
- visualSelector: string;
30
- }>;
31
- /** Callbacks for cross-highlighting effect nodes. */
32
- type HighlightCallbacks = {
33
- /** Called when code-scroll highlight target changes. */
34
- codeScroll?: (line: number | null) => void;
35
- /** Called when visual highlight target changes. */
36
- visual?: (selector: string | null) => void;
37
- /** Called when graph highlight target changes. */
38
- graph?: (nodeId: string | null) => void;
39
- };
40
- /** Label dimensions for graph node sizing. */
41
- type GraphLabelSize = {
42
- width: number;
43
- height: number;
44
- };
45
- /** Options for {@link demoShell}. */
46
- type DemoShellOptions = {
47
- /** Initial main/side split ratio (0–1). Default: `0.65`. */
48
- mainRatio?: number;
49
- /** Initial graph/code vertical split in the side pane (0–1). Default: `0.5`. */
50
- sideSplit?: number;
51
- /** Initial viewport width in pixels. Default: `1280`. */
52
- viewportWidth?: number;
53
- /** Cross-referencing registry for hover→code/visual/graph mapping. */
54
- nodeRegistry?: NodeRegistry;
55
- /** Measurement adapter for layout engine integration. When provided, enables layout/* derived nodes. */
56
- adapter?: MeasurementAdapter;
57
- /** Font string for layout measurement. Default: `"14px monospace"`. */
58
- layoutFont?: string;
59
- /** Callbacks for cross-highlighting effect nodes. When provided, creates effect nodes visible in describe(). */
60
- onHighlight?: HighlightCallbacks;
61
- };
62
- /** Return type of {@link demoShell}. */
63
- type DemoShellHandle = {
64
- /** The demo-shell graph. */
65
- graph: Graph;
66
- setMainRatio(ratio: number): void;
67
- setSideSplit(ratio: number): void;
68
- setFullscreen(pane: FullscreenPane): void;
69
- setViewportWidth(width: number): void;
70
- setHoverTarget(target: HoverTarget): void;
71
- setDemoGraph(g: Graph | null): void;
72
- bumpGraphTick(): void;
73
- selectNode(path: string | null): void;
74
- setMetaDebug(on: boolean): void;
75
- /** Set code text for layout/code-lines measurement (requires adapter). */
76
- setCodeText(text: string): void;
77
- /** Atomic multi-set — wraps core `batch()` for glitch-free updates. */
78
- batch(fn: () => void): void;
79
- destroy(): void;
80
- };
81
- /**
82
- * Creates the three-pane demo shell graph (roadmap §7.2).
83
- *
84
- * All coordination is reactive — no polling, no imperative triggers.
85
- * Framework bindings subscribe to named nodes and drive `state` inputs.
86
- */
87
- declare function demoShell(opts?: DemoShellOptions): DemoShellHandle;
88
-
89
- type index_DemoShellHandle = DemoShellHandle;
90
- type index_DemoShellOptions = DemoShellOptions;
91
- type index_FullscreenPane = FullscreenPane;
92
- type index_GraphLabelSize = GraphLabelSize;
93
- type index_HighlightCallbacks = HighlightCallbacks;
94
- type index_HoverPaneType = HoverPaneType;
95
- type index_HoverTarget = HoverTarget;
96
- type index_NodeRegistry = NodeRegistry;
97
- declare const index_demoShell: typeof demoShell;
98
- declare namespace index {
99
- export { type index_DemoShellHandle as DemoShellHandle, type index_DemoShellOptions as DemoShellOptions, type index_FullscreenPane as FullscreenPane, type index_GraphLabelSize as GraphLabelSize, type index_HighlightCallbacks as HighlightCallbacks, type index_HoverPaneType as HoverPaneType, type index_HoverTarget as HoverTarget, type index_NodeRegistry as NodeRegistry, index_demoShell as demoShell };
100
- }
101
-
102
- export { type DemoShellHandle as D, type FullscreenPane as F, type GraphLabelSize as G, type HighlightCallbacks as H, type NodeRegistry as N, type DemoShellOptions as a, type HoverPaneType as b, type HoverTarget as c, demoShell as d, index as i };
@@ -1,231 +0,0 @@
1
- import { N as Node } from './node-kK3CvTrR.js';
2
- import { a as GraphOptions, G as Graph } from './graph-D9LFnda9.js';
3
-
4
- /**
5
- * Domain templates (roadmap §8.2).
6
- *
7
- * Opinionated Graph factories for common "info → action" domains.
8
- * Each template wires up §8.1 reduction primitives (stratify, funnel, feedback,
9
- * budgetGate, scorer) with domain-specific stages. Users fork/extend by
10
- * accessing named nodes and swapping stages.
11
- *
12
- * **Source injection (option B):** templates accept a `source` node, not a
13
- * hardcoded adapter. Pass `fromOTel(...)`, `fromGitHook(...)`, or a test
14
- * `state()` — the topology is the same.
15
- *
16
- * @module
17
- */
18
-
19
- /** Stratification branch config for observability signals. */
20
- type ObservabilityBranch = {
21
- name: string;
22
- classify: (value: unknown) => boolean;
23
- };
24
- /** Options for {@link observabilityGraph}. */
25
- type ObservabilityGraphOptions = GraphOptions & {
26
- /** Ingested signal source (e.g. fromOTel(...) or test state). */
27
- source: Node<unknown>;
28
- /**
29
- * Classification rules for signal stratification.
30
- * Default: errors / traces / metrics branches.
31
- */
32
- branches?: ObservabilityBranch[];
33
- /**
34
- * Correlation function: receives stratified branch values and produces
35
- * correlated insights. Default: identity pass-through.
36
- */
37
- correlate?: (values: unknown[]) => unknown;
38
- /**
39
- * SLO verification function: returns a verification result for a
40
- * correlated insight. Default: always passes.
41
- */
42
- sloCheck?: (value: unknown) => unknown;
43
- /**
44
- * Scorer weights for alert prioritization. One per branch.
45
- * Default: equal weights [1, 1, 1].
46
- */
47
- weights?: number[];
48
- /** Max feedback iterations for false-positive learning. Default: 5. */
49
- maxFeedbackIterations?: number;
50
- };
51
- /**
52
- * OTel ingest → stratified reduction → correlation → SLO verification →
53
- * alert prioritization → output.
54
- *
55
- * Well-known node names:
56
- * - `"source"` — injected signal source
57
- * - `"stratify::branch/<name>"` — per-branch classification
58
- * - `"correlate"` — cross-branch correlation
59
- * - `"slo_value"`, `"slo_verified"` — SLO verification pair
60
- * - `"alerts"` — scored, prioritized output
61
- * - `"output"` — final output (alias for alerts)
62
- *
63
- * @category patterns
64
- */
65
- declare function observabilityGraph(name: string, opts: ObservabilityGraphOptions): Graph;
66
- /** A structured issue extracted from raw findings. */
67
- type ExtractedIssue = {
68
- id: string;
69
- title: string;
70
- severity: number;
71
- source: string;
72
- raw: unknown;
73
- };
74
- /** Options for {@link issueTrackerGraph}. */
75
- type IssueTrackerGraphOptions = GraphOptions & {
76
- /** Findings source (e.g. fromGitHook(...), fromFSWatch(...)). */
77
- source: Node<unknown>;
78
- /**
79
- * Extract structured issues from raw findings.
80
- * Default: wraps raw value as a single issue.
81
- */
82
- extract?: (raw: unknown) => ExtractedIssue;
83
- /**
84
- * Verify an extracted issue (assertion check).
85
- * Default: always valid.
86
- */
87
- verify?: (issue: ExtractedIssue) => unknown;
88
- /**
89
- * Detect regression by comparing against known patterns.
90
- * Receives (current issue, known patterns).
91
- * Default: no regression detected.
92
- */
93
- detectRegression?: (issue: ExtractedIssue, known: unknown) => unknown;
94
- /** Max feedback iterations for re-scanning. Default: 3. */
95
- maxFeedbackIterations?: number;
96
- };
97
- /**
98
- * Findings ingest → extraction → verification → regression detection →
99
- * distillation → prioritized queue.
100
- *
101
- * Well-known node names:
102
- * - `"source"` — injected findings source
103
- * - `"extract"` — structured issue extraction
104
- * - `"verify"` — issue verification
105
- * - `"known_patterns"` — accumulated known issue patterns (state)
106
- * - `"regression"` — regression detection
107
- * - `"priority"` — severity-based prioritization
108
- * - `"output"` — final prioritized output
109
- *
110
- * @category patterns
111
- */
112
- declare function issueTrackerGraph(name: string, opts: IssueTrackerGraphOptions): Graph;
113
- /** Classification result from LLM moderation. */
114
- type ModerationResult = {
115
- label: "safe" | "review" | "block";
116
- confidence: number;
117
- reason?: string;
118
- original: unknown;
119
- };
120
- /** Options for {@link contentModerationGraph}. */
121
- type ContentModerationGraphOptions = GraphOptions & {
122
- /** Content source (text/multimedia ingest). */
123
- source: Node<unknown>;
124
- /**
125
- * Classification function: returns a ModerationResult.
126
- * Default: labels everything "review" with confidence 0.5.
127
- */
128
- classify?: (content: unknown) => ModerationResult;
129
- /** System prompt for LLM classification. */
130
- systemPrompt?: string;
131
- /** Scorer weights: [safe, review, block]. Default: [0.1, 1, 2]. */
132
- weights?: [number, number, number];
133
- /** Max feedback iterations for policy refinement. Default: 5. */
134
- maxFeedbackIterations?: number;
135
- /** Max review queue size. When set, oldest entries are trimmed on overflow. */
136
- maxQueueSize?: number;
137
- };
138
- /**
139
- * Content ingest → LLM/rule classification → stratified routing (safe/review/block) →
140
- * human review queue → scorer → feedback (false positives → policy refinement) → output.
141
- *
142
- * Well-known node names:
143
- * - `"source"` — content ingest
144
- * - `"classify"` — LLM or rule-based classification
145
- * - `"stratify::branch/safe"`, `"stratify::branch/review"`, `"stratify::branch/block"` — routed branches
146
- * - `"review_queue"` — state node for human review items
147
- * - `"priority"` — scored priority output
148
- * - `"policy"` — writable state for policy refinement
149
- * - `"output"` — final moderation output
150
- *
151
- * @category patterns
152
- */
153
- declare function contentModerationGraph(name: string, opts: ContentModerationGraphOptions): Graph;
154
- /** Schema validation result. */
155
- type ValidationResult = {
156
- valid: boolean;
157
- errors: string[];
158
- record: unknown;
159
- };
160
- /** Anomaly detection result. */
161
- type AnomalyResult = {
162
- anomaly: boolean;
163
- score: number;
164
- detail?: string;
165
- record: unknown;
166
- };
167
- /** Options for {@link dataQualityGraph}. */
168
- type DataQualityGraphOptions = GraphOptions & {
169
- /** Data source (e.g. fromPrisma(...), fromKysely(...)). */
170
- source: Node<unknown>;
171
- /**
172
- * Schema validation function.
173
- * Default: always valid.
174
- */
175
- validate?: (record: unknown) => ValidationResult;
176
- /**
177
- * Anomaly detection function.
178
- * Default: no anomaly.
179
- */
180
- detectAnomaly?: (record: unknown) => AnomalyResult;
181
- /**
182
- * Drift detection: compares current record against baseline.
183
- * Default: no drift.
184
- */
185
- detectDrift?: (record: unknown, baseline: unknown) => unknown;
186
- /**
187
- * Remediation suggestion function.
188
- * Default: no suggestion.
189
- */
190
- suggest?: (result: {
191
- validation: ValidationResult;
192
- anomaly: AnomalyResult;
193
- }) => unknown;
194
- /** Max feedback iterations for rule refinement. Default: 3. */
195
- maxFeedbackIterations?: number;
196
- };
197
- /**
198
- * Data ingest → schema validation → anomaly detection → drift alerting →
199
- * auto-remediation suggestions → output.
200
- *
201
- * Well-known node names:
202
- * - `"source"` — data ingest
203
- * - `"validate"` — schema validation
204
- * - `"anomaly"` — anomaly detection
205
- * - `"baseline"` — rolling baseline state
206
- * - `"drift"` — drift detection
207
- * - `"remediate"` — auto-remediation suggestions
208
- * - `"output"` — combined quality report
209
- *
210
- * @category patterns
211
- */
212
- declare function dataQualityGraph(name: string, opts: DataQualityGraphOptions): Graph;
213
-
214
- type index_AnomalyResult = AnomalyResult;
215
- type index_ContentModerationGraphOptions = ContentModerationGraphOptions;
216
- type index_DataQualityGraphOptions = DataQualityGraphOptions;
217
- type index_ExtractedIssue = ExtractedIssue;
218
- type index_IssueTrackerGraphOptions = IssueTrackerGraphOptions;
219
- type index_ModerationResult = ModerationResult;
220
- type index_ObservabilityBranch = ObservabilityBranch;
221
- type index_ObservabilityGraphOptions = ObservabilityGraphOptions;
222
- type index_ValidationResult = ValidationResult;
223
- declare const index_contentModerationGraph: typeof contentModerationGraph;
224
- declare const index_dataQualityGraph: typeof dataQualityGraph;
225
- declare const index_issueTrackerGraph: typeof issueTrackerGraph;
226
- declare const index_observabilityGraph: typeof observabilityGraph;
227
- declare namespace index {
228
- export { type index_AnomalyResult as AnomalyResult, type index_ContentModerationGraphOptions as ContentModerationGraphOptions, type index_DataQualityGraphOptions as DataQualityGraphOptions, type index_ExtractedIssue as ExtractedIssue, type index_IssueTrackerGraphOptions as IssueTrackerGraphOptions, type index_ModerationResult as ModerationResult, type index_ObservabilityBranch as ObservabilityBranch, type index_ObservabilityGraphOptions as ObservabilityGraphOptions, type index_ValidationResult as ValidationResult, index_contentModerationGraph as contentModerationGraph, index_dataQualityGraph as dataQualityGraph, index_issueTrackerGraph as issueTrackerGraph, index_observabilityGraph as observabilityGraph };
229
- }
230
-
231
- export { type AnomalyResult as A, type ContentModerationGraphOptions as C, type DataQualityGraphOptions as D, type ExtractedIssue as E, type IssueTrackerGraphOptions as I, type ModerationResult as M, type ObservabilityBranch as O, type ValidationResult as V, type ObservabilityGraphOptions as a, issueTrackerGraph as b, contentModerationGraph as c, dataQualityGraph as d, index as i, observabilityGraph as o };
@@ -1,209 +0,0 @@
1
- import { b as NodeGuard, N as Node } from './node-kK3CvTrR.cjs';
2
- import { G as Graph } from './graph-CWvEUQAq.cjs';
3
- import { R as ReactiveLogOptions, a as ReactiveLogBundle } from './reactive-log-DIGdYqQ6.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[], TResult, R extends BaseAuditRecord> = {
85
- /**
86
- * Optional audit log. When omitted, the wrapper still provides freeze /
87
- * seq-advance / rollback-on-throw (`wrapMutation`) but skips audit-record
88
- * emission entirely — useful for primitives that want centralized mutation
89
- * semantics without a dedicated audit log surface (e.g. `Topic.publish`).
90
- * Pair with `onSuccess` / `onFailure` to emit records.
91
- */
92
- audit?: ReactiveLogBundle<R>;
93
- /** Build the success record from the action's args + result + meta. */
94
- onSuccess?: (args: TArgs, result: TResult, meta: SuccessMeta) => R | undefined;
95
- /** Build the failure record from the args + error + meta. */
96
- onFailure?: (args: TArgs, error: unknown, meta: FailureMeta) => R | undefined;
97
- /** Freeze inputs at entry (default `true`). Pass `false` for hot paths. */
98
- freeze?: boolean;
99
- /** Optional sequence cursor — auto-advanced and stamped onto records. */
100
- seq?: Node<number>;
101
- /** Optional handler version — stamped into the record (Audit 5). */
102
- handlerVersion?: {
103
- id: string;
104
- version: string | number;
105
- };
106
- };
107
- type WrapMutationOpts<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord> = MutationOpts<TArgs, TResult, R>;
108
- type LightMutationOpts<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord> = MutationOpts<TArgs, TResult, R>;
109
- declare function bumpCursor(seq: Node<number>): number;
110
- /**
111
- * Build a record via the supplied builder, stamp `handlerVersion` if present,
112
- * and append it to the audit log. `undefined` records are skipped (callers
113
- * pass an `onSuccess` / `onFailure` that returns `undefined` to opt out per
114
- * call).
115
- *
116
- * @category internal
117
- */
118
- 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?: {
119
- id: string;
120
- version: string | number;
121
- }): void;
122
- /**
123
- * Substrate-tier wrapper: run `action`, optionally append a typed audit record
124
- * on success or failure, advance an optional `seq` cursor. No batch frame —
125
- * this is the hot-path-friendly variant for atomic single-write mutations.
126
- *
127
- * Behavior contract:
128
- * 1. Freeze args at entry (default `true`; opt out with `freeze: false` for
129
- * hot paths — e.g. wrapping `vectorIndex.upsert(id, vector[768], meta)`
130
- * where the deep-freeze of a 768-dim vector is a measurable tax).
131
- * 2. Bump `seq` (if provided) BEFORE the action runs. There is no batch frame,
132
- * so the bump persists even on throw — the failure-audit record stamps the
133
- * same `seq` so audit consumers see a contiguous sequence.
134
- * 3. Run `action(args)`. On success, if `audit` is provided AND `onSuccess`
135
- * is set, `appendAudit(onSuccess, ...)`.
136
- * 4. On throw, if `audit` is provided AND `onFailure` is set,
137
- * `appendAudit(onFailure, ...)` then re-throw. When `audit` is omitted the
138
- * wrapper still provides freeze + seq + re-throw semantics — useful for
139
- * primitives that want centralized mutation contracts without an audit log
140
- * surface (e.g. `Topic.publish`).
141
- *
142
- * **Distinguish from {@link wrapMutation}:** `wrapMutation` opens a `batch()`
143
- * frame (rollback-on-throw, seq advance discarded on rollback) and is the
144
- * right choice when the action runs a user-supplied handler or a multi-step
145
- * sequence that could leave inconsistent state mid-throw.
146
- *
147
- * **Cursor / log alignment caveat (substrate-tier):** `seq` is bumped BEFORE
148
- * `action()` runs, and the audit-log append happens AFTER. There is no batch
149
- * frame, so a synchronous subscriber to `seq` that fires between the two —
150
- * including a subscriber on `audit.entries` itself if the substrate causes
151
- * it to fire transitively — observes `seq=N` while the corresponding record
152
- * is not yet in the log. Audit consumers that join `seq` and `audit.entries`
153
- * reactively must tolerate this one-tick lag, or use {@link wrapMutation}
154
- * (whose `batch()` frame defers downstream delivery until commit, so cursor
155
- * and log appear together to subscribers). The same caveat applies to
156
- * **re-entrant** invocation: if an `audit.entries` / `seq` subscriber
157
- * triggers another `lightMutation`, the inner record can land on the log
158
- * before the outer call's success/failure record.
159
- *
160
- * @category internal
161
- */
162
- declare function lightMutation<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord>(action: (...args: TArgs) => TResult, opts: LightMutationOpts<TArgs, TResult, R>): (...args: TArgs) => TResult;
163
- /**
164
- * Orchestration-tier wrapper: like {@link lightMutation} but adds a `batch()`
165
- * frame around the action so an in-flight throw rolls back partial state.
166
- *
167
- * Behavior contract:
168
- * 1. Freeze args at entry (default `true`).
169
- * 2. Open a batch frame (rollback-on-throw via core batch — Audit 2 #6).
170
- * 3. Bump `seq` INSIDE the batch so a framework-level rollback discards the
171
- * cursor advance (cursor stays in sync with audit log). M5.
172
- * 4. Run `action(args)` and capture result.
173
- * 5. On success: if `audit` is provided AND `onSuccess` is set,
174
- * `appendAudit(onSuccess, ...)` inside the batch.
175
- * 6. On throw: catch OUTSIDE the batch so the failure record (if any) emits
176
- * in a fresh transaction after rollback — it persists. Re-throw so callers
177
- * see the failure. When `audit` is omitted the wrapper still provides
178
- * batch + freeze + rollback + re-throw semantics — useful for primitives
179
- * that want orchestration-tier mutation contracts without an audit log
180
- * surface.
181
- *
182
- * **Distinguish from the file-private `wrapMutation` in
183
- * `src/extra/reactive-map.ts:540`:** that helper is a transactional wrapper
184
- * for the reactiveMap version counter (`pre/post-version` snapshot diffing,
185
- * read vs. mutation gating). Different concern, file-private, not exported.
186
- * This `wrapMutation` is the public Phase-4 audit framework.
187
- *
188
- * @category internal
189
- */
190
- declare function wrapMutation<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord>(action: (...args: TArgs) => TResult, opts: WrapMutationOpts<TArgs, TResult, R>): (...args: TArgs) => TResult;
191
- /**
192
- * Promote a closure counter to a state node mounted under `graph`.
193
- * Replaces ad-hoc `let _seq = 0` patterns with a node observable in
194
- * `describe()` and persistable via storage tiers.
195
- *
196
- * @category internal
197
- */
198
- declare function registerCursor(graph: Graph, name: string, initial?: number): Node<number>;
199
- /**
200
- * Promote a closure `Map<K, number>` to N state nodes (one per key) mounted
201
- * under `<graph>::<name>::<key>`. Used by saga (per-event-type cursor).
202
- *
203
- * @category internal
204
- */
205
- declare function registerCursorMap<K extends string>(graph: Graph, name: string, keys: readonly K[], initial?: number): {
206
- readonly [P in K]: Node<number>;
207
- };
208
-
209
- 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 };