@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,358 +0,0 @@
1
- import { B as BaseAuditRecord } from './index-D0aciIex.cjs';
2
- import { a as ReactiveLogBundle } from './reactive-log-DIGdYqQ6.cjs';
3
- import { NodeInput } from './extra/sources.cjs';
4
- import { AppendLogStorageTier, KvStorageTier } from './extra/storage-tiers.cjs';
5
- import { C as CqrsEventMap, a as CqrsEvent, b as CqrsGraph } from './index-B-_tFaqV.cjs';
6
-
7
- /**
8
- * Process Manager pattern (Phase 7 — roadmap §4.6, Audit 3 — locked 2026-04-24).
9
- *
10
- * Reactive long-running workflow primitive over CQRS event nodes.
11
- * Correlates events across aggregates, tracks per-instance state, supports
12
- * retries with backoff, and runs compensation on failure or explicit cancel.
13
- *
14
- * ## Architecture
15
- *
16
- * - Per-instance state lives in a `Map<correlationId, TState>` closure (in-memory).
17
- * The `_process_<name>_started` synthetic event is dispatched per `start()`
18
- * for an event-sourced audit trail using `correlationId` as `aggregateId`.
19
- * Cross-restart state recovery is opt-in via
20
- * `opts.persistence.stateStorage` (kv-tier per-correlationId snapshot,
21
- * Tier 6.5 3.5) plus an explicit `restore()` call after construction.
22
- * - Watched-event subscriptions are imperative (coordinator role) — each
23
- * watched CQRS event type is subscribed to via `entries.subscribe(...)`.
24
- * These are NOT reactive node edges; the process manager is intentionally
25
- * a coordinator that bridges reactive CQRS events into imperative instance logic.
26
- * - Step execution uses `fromAny` to uniformly handle sync and async handlers.
27
- * - Retry delays use `setTimeout` (same sanctioned pattern as `extra/resilience.ts`
28
- * retry helper — this primitive is a coordinator, not a reactive pipeline stage).
29
- * - Timer scheduling uses `fromTimer` from `extra/sources.ts` per spec §5.8.
30
- * - Audit log uses `createAuditLog` per Audit 2.
31
- *
32
- * @module
33
- */
34
-
35
- /**
36
- * Discriminated union returned by each step handler.
37
- *
38
- * - `"success"` — step ran cleanly; update state, optionally emit
39
- * side-effect events and schedule a future synthetic event. The process
40
- * instance stays `"running"`.
41
- * - `"terminate"` — workflow complete; instance moves to `"terminated"`.
42
- * Process-specific extension to the canonical outcome enum.
43
- * - `"failure"` — triggers compensation; instance moves to `"compensated"` /
44
- * `"errored"`.
45
- *
46
- * Field name is `outcome` (matching `cqrs.DispatchRecord.outcome` and the
47
- * canonical Tier 1.6.2 / 2.3 enum). `"success"` and `"failure"` are the
48
- * canonical values; `"terminate"` is the process-specific extension for
49
- * "early-return success".
50
- */
51
- type ProcessStepResult<TState> = {
52
- outcome: "success";
53
- state: TState;
54
- emit?: readonly {
55
- type: string;
56
- payload: unknown;
57
- }[];
58
- schedule?: ProcessSchedule;
59
- } | {
60
- outcome: "terminate";
61
- state: TState;
62
- emit?: readonly {
63
- type: string;
64
- payload: unknown;
65
- }[];
66
- reason?: string;
67
- } | {
68
- outcome: "failure";
69
- error: unknown;
70
- };
71
- /**
72
- * Schedule a synthetic timer event after `afterMs` milliseconds.
73
- * When the timer fires, the synthetic event of `eventType` is routed to the
74
- * matching step (if one is registered) for this correlationId.
75
- */
76
- type ProcessSchedule = {
77
- afterMs: number;
78
- eventType: string;
79
- };
80
- /**
81
- * Step handler signature.
82
- *
83
- * Receives the current instance state and the triggering CQRS event.
84
- * Returns a {@link ProcessStepResult} — sync value, Promise, or any
85
- * {@link NodeInput} consumed via `fromAny`.
86
- */
87
- type ProcessStep<TState, EM extends CqrsEventMap, K extends keyof EM & string> = (state: TState, event: CqrsEvent<EM[K]>) => NodeInput<ProcessStepResult<TState>>;
88
- /**
89
- * Compensation handler. Runs when a step returns `outcome: "failure"`, throws, or
90
- * when `cancel(correlationId)` is called on a running instance.
91
- *
92
- * Should undo any side effects performed by prior steps (refund, cancel
93
- * reservation, etc.). Errors thrown inside compensate are swallowed and
94
- * recorded in the audit log with `status: "errored"` to prevent cascading
95
- * failure loops.
96
- */
97
- type ProcessCompensate<TState> = (state: TState, error: unknown) => NodeInput<void>;
98
- /**
99
- * Audit record for a single process instance state transition.
100
- *
101
- * Every status change (start → running → terminated / errored / compensated)
102
- * appends one record. `correlationId` is the stable process key.
103
- *
104
- * Extends {@link BaseAuditRecord} so records carry `t_ns` / `seq` /
105
- * `handlerVersion` from the cross-cutting Audit 2 schema.
106
- */
107
- interface ProcessInstance<TState> extends BaseAuditRecord {
108
- /** Stable correlation key that identifies this process instance. */
109
- readonly correlationId: string;
110
- /** Most-recent instance state at this transition. */
111
- readonly state: TState;
112
- /** Current lifecycle status after this transition. */
113
- readonly status: "running" | "terminated" | "errored" | "compensated";
114
- /** Wall-clock nanoseconds when `start()` was called. */
115
- readonly startedAt: number;
116
- /** Wall-clock nanoseconds of this transition. */
117
- readonly updatedAt: number;
118
- /** Handler version stamped at transition time (Audit 5). */
119
- readonly handlerVersion?: {
120
- id: string;
121
- version: string | number;
122
- };
123
- /** Optional human-readable reason for cancellation. Present only on `"compensated"` records produced by `cancel()`. */
124
- readonly reason?: string;
125
- }
126
- /**
127
- * Recommended `keyOf` for storage tiers keyed by correlationId (Audit 2).
128
- */
129
- declare const processInstanceKeyOf: <TState>(i: ProcessInstance<TState>) => string;
130
- /**
131
- * Per-correlationId state snapshot persisted via
132
- * {@link ProcessManagerOpts.persistence.stateStorage} (Tier 6.5 3.5,
133
- * 2026-04-29). Captures the running instance's current state plus
134
- * lifecycle metadata so a fresh `processManager` can resume in-flight
135
- * workflows after restart via {@link ProcessManagerResult.restore}.
136
- *
137
- * Terminal records (`status` ∈ `"terminated" | "errored" | "compensated"`)
138
- * are deleted from the kv tier on transition — only running instances
139
- * persist between restarts.
140
- */
141
- interface ProcessStateSnapshot<TState> {
142
- readonly correlationId: string;
143
- readonly state: TState;
144
- readonly status: "running" | "terminated" | "errored" | "compensated";
145
- readonly startedAt: number;
146
- readonly updatedAt: number;
147
- readonly handlerVersion?: {
148
- id: string;
149
- version: string | number;
150
- };
151
- }
152
- /** Recommended `keyOf` for `KvStorageTier<ProcessStateSnapshot<...>>`. */
153
- declare const processStateKeyOf: <TState>(s: ProcessStateSnapshot<TState>) => string;
154
- /**
155
- * Options for {@link processManager}.
156
- */
157
- interface ProcessManagerOpts<TState, EM extends CqrsEventMap> {
158
- /** Initial state value for every new process instance. */
159
- readonly initial: TState;
160
- /** CQRS event types to watch for correlation routing. */
161
- readonly watching: readonly (keyof EM & string)[];
162
- /**
163
- * Per-event-type step handlers. A step is invoked when a watched event's
164
- * `correlationId` matches a running instance and the event type is in
165
- * `steps`. Events with no matching step are silently ignored.
166
- */
167
- readonly steps: {
168
- [K in keyof EM & string]?: ProcessStep<TState, EM, K>;
169
- };
170
- /**
171
- * Optional compensation handler. Runs on step `outcome: "failure"` / step throw
172
- * and on explicit `cancel()`. If omitted, instances fail silently with
173
- * status `"errored"` instead of `"compensated"`.
174
- */
175
- readonly compensate?: ProcessCompensate<TState>;
176
- /**
177
- * Optional predicate called after each `"success"` step. When it returns
178
- * `true`, the instance is moved to `"terminated"` immediately without
179
- * waiting for a `"terminate"` step result.
180
- */
181
- readonly isTerminal?: (state: TState) => boolean;
182
- /**
183
- * Maximum number of retry attempts after a step throws (not counting the
184
- * first attempt). Default: `0` (no retry — fail immediately on throw).
185
- */
186
- readonly retryMax?: number;
187
- /**
188
- * Per-retry backoff delays in milliseconds. `backoffMs[i]` is the delay
189
- * before attempt `i + 1`. If fewer entries than `retryMax`, the last entry
190
- * is repeated. Default: `[0]` (no delay).
191
- *
192
- * **Implementation note:** retry delays are implemented with `setTimeout`
193
- * (same sanctioned exception as `extra/resilience.ts`). This is a
194
- * coordinator-layer primitive — `fromTimer` would require subscribing to
195
- * an additional node per attempt, which would leak timer nodes without a
196
- * clear disposal scope.
197
- */
198
- readonly backoffMs?: readonly number[];
199
- /** Handler version tag stamped onto audit records (Audit 5). */
200
- readonly handlerVersion?: {
201
- id: string;
202
- version: string | number;
203
- };
204
- /** Optional persistence wiring (Audit 4). */
205
- readonly persistence?: {
206
- /**
207
- * Wire the per-process synthetic state event stream to append-log tiers.
208
- * Reuses `CqrsGraph.attachEventStorage` so events persist across restarts.
209
- */
210
- eventStorage?: readonly AppendLogStorageTier<CqrsEvent>[];
211
- /**
212
- * Wire per-correlationId state snapshots to kv tiers (Tier 6.5 3.5,
213
- * 2026-04-29). Each `start()` and step transition writes the running
214
- * instance's state under its `correlationId`; terminal transitions
215
- * (`terminated` / `errored` / `compensated`) `delete` the key. After
216
- * restart, callers invoke {@link ProcessManagerResult.restore} to
217
- * reload running instances from the first tier.
218
- *
219
- * Uses {@link KvStorageTier} (not snapshot tier) because per-instance
220
- * state is N records keyed by correlationId, not a single global
221
- * snapshot. {@link processStateKeyOf} is the recommended `keyOf`
222
- * (already aligned with the kv tier's `save(key, value)` shape).
223
- *
224
- * Terminal records are NOT preserved — historical lifecycle is the
225
- * audit log's job. State persistence covers crash-recovery only.
226
- */
227
- stateStorage?: readonly KvStorageTier<ProcessStateSnapshot<TState>>[];
228
- };
229
- }
230
- /**
231
- * Result handle returned by {@link processManager}.
232
- */
233
- interface ProcessManagerResult<TState> {
234
- /**
235
- * Reactive audit log of every process instance state transition.
236
- * Every `start()`, step result, retry, cancellation, and compensation
237
- * appends a {@link ProcessInstance} record.
238
- */
239
- readonly instances: ReactiveLogBundle<ProcessInstance<TState>>;
240
- /**
241
- * Alias for {@link instances} (Audit 2 `.audit` duplication convention).
242
- */
243
- readonly audit: ReactiveLogBundle<ProcessInstance<TState>>;
244
- /**
245
- * Start a new process instance identified by `correlationId`.
246
- *
247
- * Emits a synthetic `_process_<name>_started` event into the CQRS graph
248
- * with `correlationId` as `aggregateId` so per-aggregate streams record
249
- * the process lifecycle. If the correlationId already has an active
250
- * (running) instance, this call is a no-op (idempotent).
251
- *
252
- * @param correlationId - Stable key for this workflow instance.
253
- * @param initialPayload - Optional payload carried on the start event.
254
- */
255
- start(correlationId: string, initialPayload?: unknown): void;
256
- /**
257
- * Cancel a running instance by correlationId.
258
- *
259
- * Triggers the `compensate` handler (if configured), then marks the
260
- * instance as `"compensated"`. If the instance is not running, this is
261
- * a no-op.
262
- *
263
- * @param correlationId - Instance to cancel.
264
- * @param reason - Optional human-readable reason recorded in the audit log.
265
- */
266
- cancel(correlationId: string, reason?: string): void;
267
- /**
268
- * Synchronous read of the current in-memory state for a correlationId.
269
- * Returns `undefined` if the instance does not exist or has terminated.
270
- */
271
- getState(correlationId: string): TState | undefined;
272
- /**
273
- * Restore running instances from the first {@link
274
- * ProcessManagerOpts.persistence.stateStorage} tier (Tier 6.5 3.5,
275
- * 2026-04-29). Loads every record in the tier and re-hydrates
276
- * `instanceStates` / `activeInstances` / `startedAt` for any record
277
- * whose `status === "running"`. Terminal records, if any persisted
278
- * before delete fired, are silently skipped.
279
- *
280
- * Idempotent — calling twice doesn't double-restore (existing entries
281
- * are overwritten). Returns the count of running instances rehydrated.
282
- *
283
- * No-op when no `stateStorage` tier is configured OR the first tier
284
- * lacks a `list?` method (returns 0). Async because kv tier `load` /
285
- * `list` may be async.
286
- */
287
- restore(): Promise<number>;
288
- /**
289
- * Release all watched-event subscriptions and stop processing new events.
290
- *
291
- * After `dispose()`, subsequent `start()` and `cancel()` calls are no-ops.
292
- * In-flight async steps complete naturally; no new steps are dispatched.
293
- */
294
- dispose(): void;
295
- }
296
- /**
297
- * Create a process manager that coordinates long-running reactive workflows
298
- * over a {@link CqrsGraph}.
299
- *
300
- * Process instances are identified by `correlationId`. Events from the watched
301
- * event types are routed to per-instance step handlers when the event's
302
- * `correlationId` matches a running instance.
303
- *
304
- * ```ts
305
- * const app = cqrs<{ orderPlaced: { orderId: string }; paymentReceived: { amount: number } }>("orders");
306
- *
307
- * const pm = processManager(app, "fulfillment", {
308
- * initial: { step: "awaiting-payment", total: 0 },
309
- * watching: ["orderPlaced", "paymentReceived"],
310
- * steps: {
311
- * orderPlaced(state, event) {
312
- * return { outcome: "success", state: { ...state, orderId: event.payload.orderId } };
313
- * },
314
- * paymentReceived(state, event) {
315
- * return { outcome: "terminate", state: { ...state, total: event.payload.amount } };
316
- * },
317
- * },
318
- * compensate(state, _error) {
319
- * // undo reservation, issue refund, etc.
320
- * },
321
- * retryMax: 2,
322
- * backoffMs: [100, 500],
323
- * });
324
- *
325
- * pm.start("order-123");
326
- * app.dispatch("orderPlaced", { orderId: "order-123" }, { correlationId: "order-123" });
327
- * ```
328
- *
329
- * @param cqrsGraph - The CQRS graph whose event streams the manager watches.
330
- * @param name - Stable identifier for this process type; used for the
331
- * synthetic event-type prefix `_process_<name>_*`. Currently emits
332
- * `_process_<name>_started` per `start()`; the prefix is reserved for
333
- * future `_state` / `_timer` channels.
334
- * @param opts - Configuration: initial state, watched events, steps, retry,
335
- * compensation, and optional persistence.
336
- * @returns {@link ProcessManagerResult} with `instances` audit log and
337
- * `start`, `cancel`, `getState` imperative controls.
338
- *
339
- * @category patterns
340
- */
341
- declare function processManager<TState, EM extends CqrsEventMap = Record<string, unknown>>(cqrsGraph: CqrsGraph<EM>, name: string, opts: ProcessManagerOpts<TState, EM>): ProcessManagerResult<TState>;
342
-
343
- type index_ProcessCompensate<TState> = ProcessCompensate<TState>;
344
- type index_ProcessInstance<TState> = ProcessInstance<TState>;
345
- type index_ProcessManagerOpts<TState, EM extends CqrsEventMap> = ProcessManagerOpts<TState, EM>;
346
- type index_ProcessManagerResult<TState> = ProcessManagerResult<TState>;
347
- type index_ProcessSchedule = ProcessSchedule;
348
- type index_ProcessStateSnapshot<TState> = ProcessStateSnapshot<TState>;
349
- type index_ProcessStep<TState, EM extends CqrsEventMap, K extends keyof EM & string> = ProcessStep<TState, EM, K>;
350
- type index_ProcessStepResult<TState> = ProcessStepResult<TState>;
351
- declare const index_processInstanceKeyOf: typeof processInstanceKeyOf;
352
- declare const index_processManager: typeof processManager;
353
- declare const index_processStateKeyOf: typeof processStateKeyOf;
354
- declare namespace index {
355
- export { type index_ProcessCompensate as ProcessCompensate, type index_ProcessInstance as ProcessInstance, type index_ProcessManagerOpts as ProcessManagerOpts, type index_ProcessManagerResult as ProcessManagerResult, type index_ProcessSchedule as ProcessSchedule, type index_ProcessStateSnapshot as ProcessStateSnapshot, type index_ProcessStep as ProcessStep, type index_ProcessStepResult as ProcessStepResult, index_processInstanceKeyOf as processInstanceKeyOf, index_processManager as processManager, index_processStateKeyOf as processStateKeyOf };
356
- }
357
-
358
- export { type ProcessCompensate as P, type ProcessInstance as a, type ProcessManagerOpts as b, type ProcessManagerResult as c, type ProcessSchedule as d, type ProcessStateSnapshot as e, type ProcessStep as f, type ProcessStepResult as g, processManager as h, index as i, processStateKeyOf as j, processInstanceKeyOf as p };
@@ -1,44 +0,0 @@
1
- import { N as Node } from './node-kK3CvTrR.js';
2
-
3
- /**
4
- * Subscribe to a read-only `Node<T>` as a React value. Re-renders on node value settlement.
5
- * Subscription lifecycle is tied to React mount/unmount (not node terminal messages).
6
- *
7
- * @param node - Any `Node<T>`.
8
- * @returns `T | undefined` — the current node value, kept in sync via `useSyncExternalStore`.
9
- */
10
- declare function useSubscribe<T>(node: Node<T>): T | undefined | null;
11
- /**
12
- * Bind a writable `Node<T>` as a React `[value, setter]` tuple.
13
- * Setting the value always pushes `[[DIRTY], [DATA, value]]`, including `value === undefined`.
14
- * Subscription lifecycle is tied to React mount/unmount (not node terminal messages).
15
- *
16
- * @param node - A `Node<T>` (e.g. state node).
17
- * @returns `[T | undefined, (value: T) => void]` — current value and setter function.
18
- */
19
- declare function useStore<T>(node: Node<T>): [T | undefined | null, (value: T) => void];
20
- /** Maps a key to an object of nodes. Used by `useSubscribeRecord`. */
21
- type NodeFactory<K, R extends Record<string, any>> = (key: K) => {
22
- [P in keyof R]: Node<R[P]>;
23
- };
24
- /**
25
- * Subscribe to a dynamic set of keyed node records.
26
- * Re-subscribes all per-key fields whenever `keysNode` changes.
27
- * Key re-sync is gated to settled batches (`messageTier >= 3`) to avoid DIRTY-phase churn.
28
- * Guaranteed to clean up strictly with React hook lifecycle, utilizing no global mappings.
29
- *
30
- * @param keysNode - Node of current keys (e.g. node IDs)
31
- * @param factory - Function returning `{ [field]: Node<V> }` for each key.
32
- * @returns `Record<K, R>` — snapshot of resolved values for all keys.
33
- */
34
- declare function useSubscribeRecord<K extends string, R extends Record<string, any>>(keysNode: Node<K[]>, factory: NodeFactory<K, R>): Record<K, R>;
35
-
36
- type index_NodeFactory<K, R extends Record<string, any>> = NodeFactory<K, R>;
37
- declare const index_useStore: typeof useStore;
38
- declare const index_useSubscribe: typeof useSubscribe;
39
- declare const index_useSubscribeRecord: typeof useSubscribeRecord;
40
- declare namespace index {
41
- export { type index_NodeFactory as NodeFactory, index_useStore as useStore, index_useSubscribe as useSubscribe, index_useSubscribeRecord as useSubscribeRecord };
42
- }
43
-
44
- export { type NodeFactory as N, useSubscribe as a, useSubscribeRecord as b, index as i, useStore as u };
@@ -1,202 +0,0 @@
1
- import { M as Messages, A as Actor, C as COMPLETE, d as COMPLETE_MSG, e as COMPLETE_ONLY_BATCH, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DIRTY_MSG, i as DIRTY_ONLY_BATCH, j as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, k as GlobalInspectorHook, l as GraphReFlyConfig, m as GuardAction, n as GuardDenied, o as GuardDeniedDetails, H as HashFn, I as INVALIDATE, p as INVALIDATE_MSG, q as INVALIDATE_ONLY_BATCH, r as Message, s as MessageContext, t as MessageTypeRegistration, u as MessageTypeRegistrationInput, N as Node, c as NodeActions, v as NodeCtx, w as NodeDescribeKind, x as NodeFn, y as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, W as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from './node-kK3CvTrR.js';
2
- import { A as AutoTrackOptions, a as DerivedFn, b as DerivedTFn, c as DescribeDetail, d as DescribeField, D as DescribeNodeOutput, e as DynamicFn, E as EffectFn, f as EffectTFn, N as NodeValues, P as PipeOperator, g as ProducerFn, T as TrackFn, h as autoTrackNode, i as derived, j as derivedT, k as dynamicNode, l as effect, m as effectT, n as factoryTag, p as pipe, o as placeholderArgs, q as producer, r as resolveDescribeFields, s as state } from './sugar-fhLIE7TT.js';
3
-
4
- /**
5
- * Batch deferral for tier-3+ messages, plus per-node emit coalescing inside
6
- * explicit `batch()` scopes.
7
- *
8
- * **Canonical invariant:** GRAPHREFLY-SPEC.md §1.3.7 — inside a batch,
9
- * tier 0–2 signals propagate immediately; tier 3 (DATA/RESOLVED), tier 4
10
- * (COMPLETE/ERROR), and tier 5 (TEARDOWN) are queued and drained in ascending
11
- * phase order after the outermost `batch()` callback returns.
12
- *
13
- * **Per-node emit coalescing (Bug 2 fix, 2026-04-17).** Inside an explicit
14
- * `batch()` scope, consecutive emissions from the same node accumulate in
15
- * `NodeImpl._batchPendingMessages` (see JSDoc there) instead of each producing
16
- * a separate downstream wave. K `.emit()` calls to the same source collapse to
17
- * one coalesced `downWithBatch` call per child edge at batch end. Outside batch
18
- * (or during drain), coalescing does NOT apply — each emit produces its own wave.
19
- *
20
- * **Phase vocabulary:**
21
- * - Phase 1 = tiers 0–2 — immediate, never queued.
22
- * - Phase 2 = tier 3 — {@link drainPhase2}. Value settlements.
23
- * - Phase 3 = tier 4 — {@link drainPhase3}. Terminal signals.
24
- * - Phase 4 = tier 5 — {@link drainPhase4}. TEARDOWN (unified deferral).
25
- *
26
- * Drain rule: fire any pending flush hooks first, then the lowest non-empty
27
- * phase. Re-enqueues during drain (and hooks registered by reentrant batches
28
- * inside subscriber callbacks) bump the loop back to the top so newly-added
29
- * hooks and closures get processed.
30
- */
31
-
32
- /**
33
- * Returns whether the current call stack is inside a batch scope **or** while
34
- * a deferred drain is in progress. Nested `downWithBatch` calls during drain
35
- * still defer (they bump the drain loop).
36
- */
37
- declare function isBatching(): boolean;
38
- /**
39
- * Runs `fn` inside a batch scope. Nested `batch()` calls share one deferral
40
- * queue. If `fn` throws, deferred work for the outer frame is discarded
41
- * (unless a drain is already in progress — cross-language decision A4).
42
- */
43
- declare function batch(fn: () => void): void;
44
- /**
45
- * Deliver pre-sorted messages through `sink` with tier-based deferral applied.
46
- *
47
- * `messages` MUST be in ascending tier order (produced by `_frameBatch` in
48
- * `node.ts`); the walker exploits that invariant to find phase cuts in one
49
- * pass without re-sorting.
50
- *
51
- * Behavior:
52
- * - Tier 0–2 — delivered synchronously.
53
- * - Tier 3 — deferred to {@link drainPhase2} when batching, else synchronous.
54
- * - Tier 4 — deferred to {@link drainPhase3} when batching, else synchronous.
55
- * - Tier 5 — deferred to {@link drainPhase4} when batching, else synchronous.
56
- *
57
- * Tier-classification uses the caller-supplied `tierOf` so that batch stays
58
- * decoupled from `GraphReFlyConfig`. NodeImpl passes `config.tierOf` (a
59
- * pre-bound closure built once in the config constructor) at the emit site;
60
- * alternate configs can pass their own lookup.
61
- */
62
- declare function downWithBatch(sink: (messages: Messages) => void, messages: Messages, tierOf: (t: symbol) => number): void;
63
-
64
- /**
65
- * Centralised timestamp utilities.
66
- *
67
- * Convention: all graphrefly-ts timestamps use nanoseconds (`_ns` suffix).
68
- *
69
- * - {@link monotonicNs} — monotonic clock (ordering, durations, timeline events).
70
- * - {@link wallClockNs} — wall-clock (mutation attribution, cron emission).
71
- *
72
- * **Precision limits (JS platform):**
73
- *
74
- * - `monotonicNs`: effective ~microsecond precision. `performance.now()` returns
75
- * milliseconds with ~5µs resolution; the last 3 digits of the nanosecond value
76
- * are always zero. Python's `time.monotonic_ns()` gives true nanoseconds.
77
- *
78
- * - `wallClockNs`: ~256ns precision loss at current epoch. `Date.now() * 1e6`
79
- * produces values around 1.8×10¹⁸ which exceed IEEE 754's 2⁵³ safe integer
80
- * limit. Python's `time.time_ns()` (arbitrary-precision `int`) has no loss.
81
- * In practice this is irrelevant — JS is single-threaded, so sub-microsecond
82
- * timestamp collisions cannot occur.
83
- */
84
- /** Monotonic nanosecond timestamp via `performance.now()`. */
85
- declare function monotonicNs(): number;
86
- /** Wall-clock nanosecond timestamp via `Date.now()`. */
87
- declare function wallClockNs(): number;
88
-
89
- /**
90
- * Core layer: message protocol, node primitive, lifecycle (Phase 0).
91
- */
92
-
93
- declare const index_Actor: typeof Actor;
94
- declare const index_AutoTrackOptions: typeof AutoTrackOptions;
95
- declare const index_COMPLETE: typeof COMPLETE;
96
- declare const index_COMPLETE_MSG: typeof COMPLETE_MSG;
97
- declare const index_COMPLETE_ONLY_BATCH: typeof COMPLETE_ONLY_BATCH;
98
- declare const index_DATA: typeof DATA;
99
- declare const index_DEFAULT_ACTOR: typeof DEFAULT_ACTOR;
100
- declare const index_DIRTY: typeof DIRTY;
101
- declare const index_DIRTY_MSG: typeof DIRTY_MSG;
102
- declare const index_DIRTY_ONLY_BATCH: typeof DIRTY_ONLY_BATCH;
103
- declare const index_DepRecord: typeof DepRecord;
104
- declare const index_DerivedFn: typeof DerivedFn;
105
- declare const index_DerivedTFn: typeof DerivedTFn;
106
- declare const index_DescribeDetail: typeof DescribeDetail;
107
- declare const index_DescribeField: typeof DescribeField;
108
- declare const index_DescribeNodeOutput: typeof DescribeNodeOutput;
109
- declare const index_DynamicFn: typeof DynamicFn;
110
- declare const index_ERROR: typeof ERROR;
111
- declare const index_EffectFn: typeof EffectFn;
112
- declare const index_EffectTFn: typeof EffectTFn;
113
- declare const index_FnCtx: typeof FnCtx;
114
- declare const index_GlobalInspectorEvent: typeof GlobalInspectorEvent;
115
- declare const index_GlobalInspectorHook: typeof GlobalInspectorHook;
116
- declare const index_GraphReFlyConfig: typeof GraphReFlyConfig;
117
- declare const index_GuardAction: typeof GuardAction;
118
- declare const index_GuardDenied: typeof GuardDenied;
119
- declare const index_GuardDeniedDetails: typeof GuardDeniedDetails;
120
- declare const index_HashFn: typeof HashFn;
121
- declare const index_INVALIDATE: typeof INVALIDATE;
122
- declare const index_INVALIDATE_MSG: typeof INVALIDATE_MSG;
123
- declare const index_INVALIDATE_ONLY_BATCH: typeof INVALIDATE_ONLY_BATCH;
124
- declare const index_Message: typeof Message;
125
- declare const index_MessageContext: typeof MessageContext;
126
- declare const index_MessageTypeRegistration: typeof MessageTypeRegistration;
127
- declare const index_MessageTypeRegistrationInput: typeof MessageTypeRegistrationInput;
128
- declare const index_Messages: typeof Messages;
129
- declare const index_Node: typeof Node;
130
- declare const index_NodeActions: typeof NodeActions;
131
- declare const index_NodeCtx: typeof NodeCtx;
132
- declare const index_NodeDescribeKind: typeof NodeDescribeKind;
133
- declare const index_NodeFn: typeof NodeFn;
134
- declare const index_NodeFnCleanup: typeof NodeFnCleanup;
135
- declare const index_NodeGuard: typeof NodeGuard;
136
- declare const index_NodeImpl: typeof NodeImpl;
137
- declare const index_NodeInspectorHook: typeof NodeInspectorHook;
138
- declare const index_NodeInspectorHookEvent: typeof NodeInspectorHookEvent;
139
- declare const index_NodeOptions: typeof NodeOptions;
140
- declare const index_NodeSink: typeof NodeSink;
141
- declare const index_NodeStatus: typeof NodeStatus;
142
- declare const index_NodeTransportOptions: typeof NodeTransportOptions;
143
- declare const index_NodeValues: typeof NodeValues;
144
- declare const index_NodeVersionInfo: typeof NodeVersionInfo;
145
- declare const index_OnMessageHandler: typeof OnMessageHandler;
146
- declare const index_OnSubscribeHandler: typeof OnSubscribeHandler;
147
- declare const index_PAUSE: typeof PAUSE;
148
- declare const index_PipeOperator: typeof PipeOperator;
149
- declare const index_PolicyAllow: typeof PolicyAllow;
150
- declare const index_PolicyDeny: typeof PolicyDeny;
151
- declare const index_PolicyRuleData: typeof PolicyRuleData;
152
- declare const index_ProducerFn: typeof ProducerFn;
153
- declare const index_RESOLVED: typeof RESOLVED;
154
- declare const index_RESOLVED_MSG: typeof RESOLVED_MSG;
155
- declare const index_RESOLVED_ONLY_BATCH: typeof RESOLVED_ONLY_BATCH;
156
- declare const index_RESUME: typeof RESUME;
157
- declare const index_RigorRecorder: typeof RigorRecorder;
158
- declare const index_START: typeof START;
159
- declare const index_START_MSG: typeof START_MSG;
160
- declare const index_SubscribeContext: typeof SubscribeContext;
161
- declare const index_TEARDOWN: typeof TEARDOWN;
162
- declare const index_TEARDOWN_MSG: typeof TEARDOWN_MSG;
163
- declare const index_TEARDOWN_ONLY_BATCH: typeof TEARDOWN_ONLY_BATCH;
164
- declare const index_TrackFn: typeof TrackFn;
165
- declare const index_V0: typeof V0;
166
- declare const index_V1: typeof V1;
167
- declare const index_VersioningLevel: typeof VersioningLevel;
168
- declare const index_VersioningOptions: typeof VersioningOptions;
169
- declare const index_accessHintForGuard: typeof accessHintForGuard;
170
- declare const index_advanceVersion: typeof advanceVersion;
171
- declare const index_autoTrackNode: typeof autoTrackNode;
172
- declare const index_batch: typeof batch;
173
- declare const index_configure: typeof configure;
174
- declare const index_createVersioning: typeof createVersioning;
175
- declare const index_defaultConfig: typeof defaultConfig;
176
- declare const index_defaultHash: typeof defaultHash;
177
- declare const index_derived: typeof derived;
178
- declare const index_derivedT: typeof derivedT;
179
- declare const index_downWithBatch: typeof downWithBatch;
180
- declare const index_dynamicNode: typeof dynamicNode;
181
- declare const index_effect: typeof effect;
182
- declare const index_effectT: typeof effectT;
183
- declare const index_factoryTag: typeof factoryTag;
184
- declare const index_isBatching: typeof isBatching;
185
- declare const index_isV1: typeof isV1;
186
- declare const index_monotonicNs: typeof monotonicNs;
187
- declare const index_node: typeof node;
188
- declare const index_normalizeActor: typeof normalizeActor;
189
- declare const index_pipe: typeof pipe;
190
- declare const index_placeholderArgs: typeof placeholderArgs;
191
- declare const index_policy: typeof policy;
192
- declare const index_policyFromRules: typeof policyFromRules;
193
- declare const index_producer: typeof producer;
194
- declare const index_registerBuiltins: typeof registerBuiltins;
195
- declare const index_resolveDescribeFields: typeof resolveDescribeFields;
196
- declare const index_state: typeof state;
197
- declare const index_wallClockNs: typeof wallClockNs;
198
- declare namespace index {
199
- export { index_Actor as Actor, index_AutoTrackOptions as AutoTrackOptions, index_COMPLETE as COMPLETE, index_COMPLETE_MSG as COMPLETE_MSG, index_COMPLETE_ONLY_BATCH as COMPLETE_ONLY_BATCH, index_DATA as DATA, index_DEFAULT_ACTOR as DEFAULT_ACTOR, index_DIRTY as DIRTY, index_DIRTY_MSG as DIRTY_MSG, index_DIRTY_ONLY_BATCH as DIRTY_ONLY_BATCH, index_DepRecord as DepRecord, index_DerivedFn as DerivedFn, index_DerivedTFn as DerivedTFn, index_DescribeDetail as DescribeDetail, index_DescribeField as DescribeField, index_DescribeNodeOutput as DescribeNodeOutput, index_DynamicFn as DynamicFn, index_ERROR as ERROR, index_EffectFn as EffectFn, index_EffectTFn as EffectTFn, index_FnCtx as FnCtx, index_GlobalInspectorEvent as GlobalInspectorEvent, index_GlobalInspectorHook as GlobalInspectorHook, index_GraphReFlyConfig as GraphReFlyConfig, index_GuardAction as GuardAction, index_GuardDenied as GuardDenied, index_GuardDeniedDetails as GuardDeniedDetails, index_HashFn as HashFn, index_INVALIDATE as INVALIDATE, index_INVALIDATE_MSG as INVALIDATE_MSG, index_INVALIDATE_ONLY_BATCH as INVALIDATE_ONLY_BATCH, index_Message as Message, index_MessageContext as MessageContext, index_MessageTypeRegistration as MessageTypeRegistration, index_MessageTypeRegistrationInput as MessageTypeRegistrationInput, index_Messages as Messages, index_Node as Node, index_NodeActions as NodeActions, index_NodeCtx as NodeCtx, index_NodeDescribeKind as NodeDescribeKind, index_NodeFn as NodeFn, index_NodeFnCleanup as NodeFnCleanup, index_NodeGuard as NodeGuard, index_NodeImpl as NodeImpl, index_NodeInspectorHook as NodeInspectorHook, index_NodeInspectorHookEvent as NodeInspectorHookEvent, index_NodeOptions as NodeOptions, index_NodeSink as NodeSink, index_NodeStatus as NodeStatus, index_NodeTransportOptions as NodeTransportOptions, index_NodeValues as NodeValues, index_NodeVersionInfo as NodeVersionInfo, index_OnMessageHandler as OnMessageHandler, index_OnSubscribeHandler as OnSubscribeHandler, index_PAUSE as PAUSE, index_PipeOperator as PipeOperator, index_PolicyAllow as PolicyAllow, index_PolicyDeny as PolicyDeny, index_PolicyRuleData as PolicyRuleData, index_ProducerFn as ProducerFn, index_RESOLVED as RESOLVED, index_RESOLVED_MSG as RESOLVED_MSG, index_RESOLVED_ONLY_BATCH as RESOLVED_ONLY_BATCH, index_RESUME as RESUME, index_RigorRecorder as RigorRecorder, index_START as START, index_START_MSG as START_MSG, index_SubscribeContext as SubscribeContext, index_TEARDOWN as TEARDOWN, index_TEARDOWN_MSG as TEARDOWN_MSG, index_TEARDOWN_ONLY_BATCH as TEARDOWN_ONLY_BATCH, index_TrackFn as TrackFn, index_V0 as V0, index_V1 as V1, index_VersioningLevel as VersioningLevel, index_VersioningOptions as VersioningOptions, index_accessHintForGuard as accessHintForGuard, index_advanceVersion as advanceVersion, index_autoTrackNode as autoTrackNode, index_batch as batch, index_configure as configure, index_createVersioning as createVersioning, index_defaultConfig as defaultConfig, index_defaultHash as defaultHash, index_derived as derived, index_derivedT as derivedT, index_downWithBatch as downWithBatch, index_dynamicNode as dynamicNode, index_effect as effect, index_effectT as effectT, index_factoryTag as factoryTag, index_isBatching as isBatching, index_isV1 as isV1, index_monotonicNs as monotonicNs, index_node as node, index_normalizeActor as normalizeActor, index_pipe as pipe, index_placeholderArgs as placeholderArgs, index_policy as policy, index_policyFromRules as policyFromRules, index_producer as producer, index_registerBuiltins as registerBuiltins, index_resolveDescribeFields as resolveDescribeFields, index_state as state, index_wallClockNs as wallClockNs };
200
- }
201
-
202
- export { isBatching as a, batch as b, downWithBatch as d, index as i, monotonicNs as m, wallClockNs as w };