@graphrefly/graphrefly 0.44.0 → 0.46.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 (720) hide show
  1. package/README.md +22 -19
  2. package/dist/_internal-B23BagFd.d.cts +33 -0
  3. package/dist/_internal-B23BagFd.d.ts +33 -0
  4. package/dist/adaptive-rate-limiter-Dch_xYIi.d.cts +111 -0
  5. package/dist/adaptive-rate-limiter-Dch_xYIi.d.ts +111 -0
  6. package/dist/agents-C0Ji9ldU.d.cts +629 -0
  7. package/dist/agents-C9zexT7I.d.ts +629 -0
  8. package/dist/audit-BAXb3VOg.d.ts +246 -0
  9. package/dist/audit-C_bPfkqS.d.cts +246 -0
  10. package/dist/backoff-7KIK3WQW.js +24 -0
  11. package/dist/backoff-7KIK3WQW.js.map +1 -0
  12. package/dist/backoff-Bnb9OoPh.d.cts +6 -0
  13. package/dist/backoff-Bnb9OoPh.d.ts +6 -0
  14. package/dist/base/composition/index.cjs +811 -0
  15. package/dist/base/composition/index.cjs.map +1 -0
  16. package/dist/base/composition/index.d.cts +469 -0
  17. package/dist/base/composition/index.d.ts +469 -0
  18. package/dist/base/composition/index.js +40 -0
  19. package/dist/base/composition/index.js.map +1 -0
  20. package/dist/base/index.cjs +6336 -0
  21. package/dist/base/index.cjs.map +1 -0
  22. package/dist/base/index.d.cts +22 -0
  23. package/dist/base/index.d.ts +22 -0
  24. package/dist/base/index.js +259 -0
  25. package/dist/base/index.js.map +1 -0
  26. package/dist/base/io/index.cjs +3270 -0
  27. package/dist/base/io/index.cjs.map +1 -0
  28. package/dist/base/io/index.d.cts +2245 -0
  29. package/dist/base/io/index.d.ts +2245 -0
  30. package/dist/base/io/index.js +117 -0
  31. package/dist/base/io/index.js.map +1 -0
  32. package/dist/base/meta/index.cjs +43 -0
  33. package/dist/base/meta/index.cjs.map +1 -0
  34. package/dist/base/meta/index.d.cts +45 -0
  35. package/dist/base/meta/index.d.ts +45 -0
  36. package/dist/base/meta/index.js +13 -0
  37. package/dist/base/meta/index.js.map +1 -0
  38. package/dist/base/mutation/index.cjs +200 -0
  39. package/dist/base/mutation/index.cjs.map +1 -0
  40. package/dist/base/mutation/index.d.cts +177 -0
  41. package/dist/base/mutation/index.d.ts +177 -0
  42. package/dist/base/mutation/index.js +22 -0
  43. package/dist/base/mutation/index.js.map +1 -0
  44. package/dist/base/render/index.cjs +1120 -0
  45. package/dist/base/render/index.cjs.map +1 -0
  46. package/dist/{extra/render/index.d.ts → base/render/index.d.cts} +75 -31
  47. package/dist/{extra/render/index.d.cts → base/render/index.d.ts} +75 -31
  48. package/dist/base/render/index.js +24 -0
  49. package/dist/base/render/index.js.map +1 -0
  50. package/dist/base/sources/browser/index.cjs +172 -0
  51. package/dist/base/sources/browser/index.cjs.map +1 -0
  52. package/dist/base/sources/browser/index.d.cts +84 -0
  53. package/dist/base/sources/browser/index.d.ts +84 -0
  54. package/dist/base/sources/browser/index.js +151 -0
  55. package/dist/base/sources/browser/index.js.map +1 -0
  56. package/dist/base/sources/event/index.cjs +98 -0
  57. package/dist/base/sources/event/index.cjs.map +1 -0
  58. package/dist/base/sources/event/index.d.cts +91 -0
  59. package/dist/base/sources/event/index.d.ts +91 -0
  60. package/dist/base/sources/event/index.js +13 -0
  61. package/dist/base/sources/event/index.js.map +1 -0
  62. package/dist/base/sources/index.cjs +755 -0
  63. package/dist/base/sources/index.cjs.map +1 -0
  64. package/dist/{extra/sources.d.ts → base/sources/index.d.cts} +74 -301
  65. package/dist/{extra/sources.d.cts → base/sources/index.d.ts} +74 -301
  66. package/dist/base/sources/index.js +42 -0
  67. package/dist/base/sources/index.js.map +1 -0
  68. package/dist/base/sources/node/index.cjs +320 -0
  69. package/dist/base/sources/node/index.cjs.map +1 -0
  70. package/dist/{extra/node.d.ts → base/sources/node/index.d.cts} +35 -37
  71. package/dist/{extra/node.d.cts → base/sources/node/index.d.ts} +35 -37
  72. package/dist/base/sources/node/index.js +306 -0
  73. package/dist/base/sources/node/index.js.map +1 -0
  74. package/dist/base/utils/index.cjs +37 -0
  75. package/dist/base/utils/index.cjs.map +1 -0
  76. package/dist/base/utils/index.d.cts +37 -0
  77. package/dist/base/utils/index.d.ts +37 -0
  78. package/dist/base/utils/index.js +11 -0
  79. package/dist/base/utils/index.js.map +1 -0
  80. package/dist/base/worker/index.cjs +548 -0
  81. package/dist/base/worker/index.cjs.map +1 -0
  82. package/dist/base/worker/index.d.cts +207 -0
  83. package/dist/base/worker/index.d.ts +207 -0
  84. package/dist/base/worker/index.js +20 -0
  85. package/dist/base/worker/index.js.map +1 -0
  86. package/dist/breaker-C9skL3d8.d.ts +175 -0
  87. package/dist/breaker-ugSdq54q.d.cts +175 -0
  88. package/dist/{cascading-BglDkMdX.d.cts → cascading-CSSbKGrJ.d.ts} +3 -3
  89. package/dist/{cascading-MFgxu7Yo.d.ts → cascading-baGkiihI.d.cts} +3 -3
  90. package/dist/chunk-255UCBG4.js +58 -0
  91. package/dist/chunk-255UCBG4.js.map +1 -0
  92. package/dist/chunk-2LO3EL4W.js +1 -0
  93. package/dist/chunk-2LO3EL4W.js.map +1 -0
  94. package/dist/chunk-2OB3CEJS.js +1065 -0
  95. package/dist/chunk-2OB3CEJS.js.map +1 -0
  96. package/dist/chunk-36NMM65U.js +144 -0
  97. package/dist/chunk-36NMM65U.js.map +1 -0
  98. package/dist/chunk-3CEXCBN6.js +1 -0
  99. package/dist/chunk-3CEXCBN6.js.map +1 -0
  100. package/dist/chunk-3MUSLI6E.js +105 -0
  101. package/dist/chunk-3MUSLI6E.js.map +1 -0
  102. package/dist/chunk-3PSLNJDU.js +884 -0
  103. package/dist/chunk-3PSLNJDU.js.map +1 -0
  104. package/dist/chunk-3QZY5BI7.js +92 -0
  105. package/dist/chunk-3QZY5BI7.js.map +1 -0
  106. package/dist/chunk-42FQ27MQ.js +594 -0
  107. package/dist/chunk-42FQ27MQ.js.map +1 -0
  108. package/dist/chunk-4GYMCUDZ.js +1085 -0
  109. package/dist/chunk-4GYMCUDZ.js.map +1 -0
  110. package/dist/chunk-4S53H2KR.js +382 -0
  111. package/dist/chunk-4S53H2KR.js.map +1 -0
  112. package/dist/chunk-4XCHZRUJ.js +128 -0
  113. package/dist/chunk-4XCHZRUJ.js.map +1 -0
  114. package/dist/chunk-5THCXDWY.js +725 -0
  115. package/dist/chunk-5THCXDWY.js.map +1 -0
  116. package/dist/chunk-6XZYT4SW.js +256 -0
  117. package/dist/chunk-6XZYT4SW.js.map +1 -0
  118. package/dist/chunk-7EGRP2VX.js +76 -0
  119. package/dist/chunk-7EGRP2VX.js.map +1 -0
  120. package/dist/chunk-A7KV5UK4.js +150 -0
  121. package/dist/chunk-A7KV5UK4.js.map +1 -0
  122. package/dist/chunk-APY2SS5X.js +156 -0
  123. package/dist/chunk-APY2SS5X.js.map +1 -0
  124. package/dist/chunk-AZDQPQ3V.js +66 -0
  125. package/dist/chunk-AZDQPQ3V.js.map +1 -0
  126. package/dist/chunk-BU3SEFA5.js +90 -0
  127. package/dist/chunk-BU3SEFA5.js.map +1 -0
  128. package/dist/chunk-BXGZFGZ4.js +189 -0
  129. package/dist/chunk-BXGZFGZ4.js.map +1 -0
  130. package/dist/chunk-CGHORL6G.js +579 -0
  131. package/dist/chunk-CGHORL6G.js.map +1 -0
  132. package/dist/chunk-CXANAIZU.js +530 -0
  133. package/dist/chunk-CXANAIZU.js.map +1 -0
  134. package/dist/chunk-CZQHCKKG.js +1 -0
  135. package/dist/chunk-CZQHCKKG.js.map +1 -0
  136. package/dist/chunk-DKNHAICT.js +133 -0
  137. package/dist/chunk-DKNHAICT.js.map +1 -0
  138. package/dist/chunk-DM4OMPWK.js +584 -0
  139. package/dist/chunk-DM4OMPWK.js.map +1 -0
  140. package/dist/chunk-DMSNO6ZB.js +452 -0
  141. package/dist/chunk-DMSNO6ZB.js.map +1 -0
  142. package/dist/chunk-E5OZPDIW.js +229 -0
  143. package/dist/chunk-E5OZPDIW.js.map +1 -0
  144. package/dist/chunk-EVYY4X5A.js +509 -0
  145. package/dist/chunk-EVYY4X5A.js.map +1 -0
  146. package/dist/chunk-FDFD67UO.js +1 -0
  147. package/dist/chunk-FDFD67UO.js.map +1 -0
  148. package/dist/chunk-FMPF42Q4.js +13 -0
  149. package/dist/chunk-FMPF42Q4.js.map +1 -0
  150. package/dist/chunk-FR6RGA3B.js +1277 -0
  151. package/dist/chunk-FR6RGA3B.js.map +1 -0
  152. package/dist/chunk-FW23JYNQ.js +454 -0
  153. package/dist/chunk-FW23JYNQ.js.map +1 -0
  154. package/dist/chunk-GBCENOLN.js +1575 -0
  155. package/dist/chunk-GBCENOLN.js.map +1 -0
  156. package/dist/chunk-HL7HUJIX.js +1 -0
  157. package/dist/chunk-HL7HUJIX.js.map +1 -0
  158. package/dist/chunk-HULCUY35.js +2508 -0
  159. package/dist/chunk-HULCUY35.js.map +1 -0
  160. package/dist/chunk-IHTWQEDR.js +169 -0
  161. package/dist/chunk-IHTWQEDR.js.map +1 -0
  162. package/dist/chunk-IJRR6YAI.js +128 -0
  163. package/dist/chunk-IJRR6YAI.js.map +1 -0
  164. package/dist/chunk-JGFRAFDL.js +221 -0
  165. package/dist/chunk-JGFRAFDL.js.map +1 -0
  166. package/dist/chunk-KIIXR252.js +211 -0
  167. package/dist/chunk-KIIXR252.js.map +1 -0
  168. package/dist/chunk-KN3H5CNT.js +11 -0
  169. package/dist/chunk-KN3H5CNT.js.map +1 -0
  170. package/dist/chunk-KPG3DGLA.js +1 -0
  171. package/dist/chunk-KPG3DGLA.js.map +1 -0
  172. package/dist/chunk-KRNQ6RGQ.js +1 -0
  173. package/dist/chunk-KRNQ6RGQ.js.map +1 -0
  174. package/dist/chunk-LBAJK24K.js +1071 -0
  175. package/dist/chunk-LBAJK24K.js.map +1 -0
  176. package/dist/chunk-MLTPJMH6.js +417 -0
  177. package/dist/chunk-MLTPJMH6.js.map +1 -0
  178. package/dist/chunk-N3SZ7BMH.js +95 -0
  179. package/dist/chunk-N3SZ7BMH.js.map +1 -0
  180. package/dist/chunk-NDUD3IMO.js +540 -0
  181. package/dist/chunk-NDUD3IMO.js.map +1 -0
  182. package/dist/chunk-NY2PYHNC.js +873 -0
  183. package/dist/chunk-NY2PYHNC.js.map +1 -0
  184. package/dist/chunk-O3MT7DYI.js +225 -0
  185. package/dist/chunk-O3MT7DYI.js.map +1 -0
  186. package/dist/chunk-OCUDSN63.js +2386 -0
  187. package/dist/chunk-OCUDSN63.js.map +1 -0
  188. package/dist/chunk-OIWU3NYV.js +199 -0
  189. package/dist/chunk-OIWU3NYV.js.map +1 -0
  190. package/dist/chunk-OO5BM6CJ.js +1153 -0
  191. package/dist/chunk-OO5BM6CJ.js.map +1 -0
  192. package/dist/chunk-OQUIJT7A.js +1 -0
  193. package/dist/chunk-OQUIJT7A.js.map +1 -0
  194. package/dist/chunk-P5LBT622.js +105 -0
  195. package/dist/chunk-P5LBT622.js.map +1 -0
  196. package/dist/chunk-PKGQG5QQ.js +519 -0
  197. package/dist/chunk-PKGQG5QQ.js.map +1 -0
  198. package/dist/chunk-PKPO3JTZ.js +561 -0
  199. package/dist/chunk-PKPO3JTZ.js.map +1 -0
  200. package/dist/chunk-PL5UDIQ5.js +118 -0
  201. package/dist/chunk-PL5UDIQ5.js.map +1 -0
  202. package/dist/chunk-PZWISPIQ.js +432 -0
  203. package/dist/chunk-PZWISPIQ.js.map +1 -0
  204. package/dist/chunk-Q3EYOCZB.js +510 -0
  205. package/dist/chunk-Q3EYOCZB.js.map +1 -0
  206. package/dist/chunk-QMBYUVRL.js +15 -0
  207. package/dist/chunk-QMBYUVRL.js.map +1 -0
  208. package/dist/chunk-RAGGHLCV.js +200 -0
  209. package/dist/chunk-RAGGHLCV.js.map +1 -0
  210. package/dist/chunk-RGL53X5G.js +574 -0
  211. package/dist/chunk-RGL53X5G.js.map +1 -0
  212. package/dist/chunk-RJOG4IJU.js +1039 -0
  213. package/dist/chunk-RJOG4IJU.js.map +1 -0
  214. package/dist/chunk-SOOKUYVM.js +403 -0
  215. package/dist/chunk-SOOKUYVM.js.map +1 -0
  216. package/dist/chunk-T5BN5KG7.js +1 -0
  217. package/dist/chunk-T5BN5KG7.js.map +1 -0
  218. package/dist/chunk-TP7244Y6.js +207 -0
  219. package/dist/chunk-TP7244Y6.js.map +1 -0
  220. package/dist/chunk-TSBFTJKM.js +57 -0
  221. package/dist/chunk-TSBFTJKM.js.map +1 -0
  222. package/dist/chunk-URQ2CBBF.js +143 -0
  223. package/dist/chunk-URQ2CBBF.js.map +1 -0
  224. package/dist/chunk-W2BOPXTI.js +1 -0
  225. package/dist/chunk-W2BOPXTI.js.map +1 -0
  226. package/dist/chunk-WKSWLSCX.js +207 -0
  227. package/dist/chunk-WKSWLSCX.js.map +1 -0
  228. package/dist/chunk-Y52CS6YA.js +88 -0
  229. package/dist/chunk-Y52CS6YA.js.map +1 -0
  230. package/dist/chunk-YCBUWK77.js +92 -0
  231. package/dist/chunk-YCBUWK77.js.map +1 -0
  232. package/dist/chunk-YJ4U2D2C.js +314 -0
  233. package/dist/chunk-YJ4U2D2C.js.map +1 -0
  234. package/dist/chunk-Z4YXAUDN.js +239 -0
  235. package/dist/chunk-Z4YXAUDN.js.map +1 -0
  236. package/dist/chunk-Z6EGP5D7.js +92 -0
  237. package/dist/chunk-Z6EGP5D7.js.map +1 -0
  238. package/dist/compat/index.cjs +3100 -9
  239. package/dist/compat/index.cjs.map +1 -0
  240. package/dist/compat/index.d.cts +112 -18
  241. package/dist/compat/index.d.ts +112 -18
  242. package/dist/compat/index.js +176 -1
  243. package/dist/compat/index.js.map +1 -0
  244. package/dist/compat/jotai/index.cjs +149 -1
  245. package/dist/compat/jotai/index.cjs.map +1 -0
  246. package/dist/compat/jotai/index.d.cts +2 -2
  247. package/dist/compat/jotai/index.d.ts +2 -2
  248. package/dist/compat/jotai/index.js +8 -1
  249. package/dist/compat/jotai/index.js.map +1 -0
  250. package/dist/compat/nanostores/index.cjs +205 -1
  251. package/dist/compat/nanostores/index.cjs.map +1 -0
  252. package/dist/compat/nanostores/index.d.cts +2 -2
  253. package/dist/compat/nanostores/index.d.ts +2 -2
  254. package/dist/compat/nanostores/index.js +22 -1
  255. package/dist/compat/nanostores/index.js.map +1 -0
  256. package/dist/compat/nestjs/index.cjs +2241 -9
  257. package/dist/compat/nestjs/index.cjs.map +1 -0
  258. package/dist/compat/nestjs/index.d.cts +7 -10
  259. package/dist/compat/nestjs/index.d.ts +7 -10
  260. package/dist/compat/nestjs/index.js +78 -1
  261. package/dist/compat/nestjs/index.js.map +1 -0
  262. package/dist/compat/react/index.cjs +114 -1
  263. package/dist/compat/react/index.cjs.map +1 -0
  264. package/dist/compat/react/index.d.cts +2 -2
  265. package/dist/compat/react/index.d.ts +2 -2
  266. package/dist/compat/react/index.js +12 -1
  267. package/dist/compat/react/index.js.map +1 -0
  268. package/dist/compat/solid/index.cjs +101 -1
  269. package/dist/compat/solid/index.cjs.map +1 -0
  270. package/dist/compat/solid/index.d.cts +2 -2
  271. package/dist/compat/solid/index.d.ts +2 -2
  272. package/dist/compat/solid/index.js +12 -1
  273. package/dist/compat/solid/index.js.map +1 -0
  274. package/dist/compat/svelte/index.cjs +104 -1
  275. package/dist/compat/svelte/index.cjs.map +1 -0
  276. package/dist/compat/svelte/index.d.cts +2 -2
  277. package/dist/compat/svelte/index.d.ts +2 -2
  278. package/dist/compat/svelte/index.js +12 -1
  279. package/dist/compat/svelte/index.js.map +1 -0
  280. package/dist/compat/vue/index.cjs +119 -1
  281. package/dist/compat/vue/index.cjs.map +1 -0
  282. package/dist/compat/vue/index.d.cts +2 -2
  283. package/dist/compat/vue/index.d.ts +2 -2
  284. package/dist/compat/vue/index.js +12 -1
  285. package/dist/compat/vue/index.js.map +1 -0
  286. package/dist/compat/zustand/index.cjs +69 -3
  287. package/dist/compat/zustand/index.cjs.map +1 -0
  288. package/dist/compat/zustand/index.d.cts +2 -6
  289. package/dist/compat/zustand/index.d.ts +2 -6
  290. package/dist/compat/zustand/index.js +8 -1
  291. package/dist/compat/zustand/index.js.map +1 -0
  292. package/dist/distill-De6Rnn15.d.cts +48 -0
  293. package/dist/distill-De6Rnn15.d.ts +48 -0
  294. package/dist/external-register-CWyroXb_.d.cts +138 -0
  295. package/dist/external-register-CWyroXb_.d.ts +138 -0
  296. package/dist/{fallback-74oxi34l.d.cts → fallback-Bx46zqky.d.cts} +3 -10
  297. package/dist/{fallback-DUyyBTBK.d.ts → fallback-pIWW8A2d.d.ts} +3 -10
  298. package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
  299. package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
  300. package/dist/{index-CBGUK09R.d.ts → index-5SU_O78r.d.cts} +5 -5
  301. package/dist/{index-BmZXHqkE.d.ts → index-B6pxYJzO.d.cts} +1 -1
  302. package/dist/{index-hcDJ8PSI.d.cts → index-B6pxYJzO.d.ts} +1 -1
  303. package/dist/{index-C5stwKcw.d.cts → index-BFsng6v1.d.cts} +1 -1
  304. package/dist/{index-CdAlHFEt.d.ts → index-BFsng6v1.d.ts} +1 -1
  305. package/dist/{index-_6ODbuOu.d.cts → index-Bg-LwEt-.d.cts} +1 -1
  306. package/dist/{index-CviRnE4K.d.ts → index-Bg-LwEt-.d.ts} +1 -1
  307. package/dist/{index-CBBLl_rc.d.ts → index-Brp888t0.d.cts} +1 -1
  308. package/dist/{index-BQSKmbuG.d.cts → index-Brp888t0.d.ts} +1 -1
  309. package/dist/{index-sqkqlb1p.d.ts → index-CDfk6jHN.d.cts} +1 -1
  310. package/dist/{index-ZVQhLa2i.d.cts → index-CDfk6jHN.d.ts} +1 -1
  311. package/dist/{index-Climxqsu.d.cts → index-CEXCtYYJ.d.ts} +5 -5
  312. package/dist/index-DLAxYaN5.d.cts +169 -0
  313. package/dist/index-DLAxYaN5.d.ts +169 -0
  314. package/dist/{index-CK29LV56.d.cts → index-DeWbQzMe.d.cts} +1 -1
  315. package/dist/{index-CPQlGA29.d.ts → index-DeWbQzMe.d.ts} +1 -1
  316. package/dist/{index-BrPrLl4e.d.cts → index-dX9IzPqj.d.cts} +1 -1
  317. package/dist/{index-Dgl1HpPn.d.ts → index-dX9IzPqj.d.ts} +1 -1
  318. package/dist/index.cjs +25934 -191
  319. package/dist/index.cjs.map +1 -0
  320. package/dist/index.d.cts +58 -94
  321. package/dist/index.d.ts +58 -94
  322. package/dist/index.js +852 -1
  323. package/dist/index.js.map +1 -0
  324. package/dist/layout-types-B5aiHYgk.d.cts +72 -0
  325. package/dist/layout-types-B5aiHYgk.d.ts +72 -0
  326. package/dist/memory-composers-BryDrRBX.d.cts +529 -0
  327. package/dist/memory-composers-CVQqPYEV.d.ts +529 -0
  328. package/dist/{observable-DWjNfLvC.d.ts → observable-BXQoW1P-.d.cts} +1 -1
  329. package/dist/{observable-e3eiPPFy.d.cts → observable-BXQoW1P-.d.ts} +1 -1
  330. package/dist/{pipeline-graph-Sgj0gCwn.d.ts → pipeline-graph-Ce47CB6Y.d.cts} +13 -10
  331. package/dist/{pipeline-graph-CIKhynsF.d.cts → pipeline-graph-DXCwY9vG.d.ts} +13 -10
  332. package/dist/presets/ai/index.cjs +4377 -0
  333. package/dist/presets/ai/index.cjs.map +1 -0
  334. package/dist/presets/ai/index.d.cts +98 -0
  335. package/dist/presets/ai/index.d.ts +98 -0
  336. package/dist/presets/ai/index.js +54 -0
  337. package/dist/presets/ai/index.js.map +1 -0
  338. package/dist/presets/harness/index.cjs +5929 -0
  339. package/dist/presets/harness/index.cjs.map +1 -0
  340. package/dist/presets/harness/index.d.cts +566 -0
  341. package/dist/presets/harness/index.d.ts +566 -0
  342. package/dist/presets/harness/index.js +71 -0
  343. package/dist/presets/harness/index.js.map +1 -0
  344. package/dist/presets/index.cjs +9782 -0
  345. package/dist/presets/index.cjs.map +1 -0
  346. package/dist/presets/index.d.cts +28 -0
  347. package/dist/presets/index.d.ts +28 -0
  348. package/dist/presets/index.js +129 -0
  349. package/dist/presets/index.js.map +1 -0
  350. package/dist/presets/inspect/index.cjs +1087 -0
  351. package/dist/presets/inspect/index.cjs.map +1 -0
  352. package/dist/presets/inspect/index.d.cts +172 -0
  353. package/dist/presets/inspect/index.d.ts +172 -0
  354. package/dist/presets/inspect/index.js +21 -0
  355. package/dist/presets/inspect/index.js.map +1 -0
  356. package/dist/presets/resilience/index.cjs +1593 -0
  357. package/dist/presets/resilience/index.cjs.map +1 -0
  358. package/dist/presets/resilience/index.d.cts +205 -0
  359. package/dist/presets/resilience/index.d.ts +205 -0
  360. package/dist/presets/resilience/index.js +18 -0
  361. package/dist/presets/resilience/index.js.map +1 -0
  362. package/dist/rate-limiter-CEALq4N1.d.ts +559 -0
  363. package/dist/rate-limiter-DpVbSYdH.d.cts +559 -0
  364. package/dist/{reactive-layout-DOTs9P3X.d.ts → reactive-layout-fswlBUvX.d.cts} +19 -7
  365. package/dist/{reactive-layout-DgctbqZo.d.cts → reactive-layout-fswlBUvX.d.ts} +19 -7
  366. package/dist/retry-BDbRZ_gx.d.ts +125 -0
  367. package/dist/retry-DWuhjvsA.d.cts +125 -0
  368. package/dist/solutions/index.cjs +8200 -0
  369. package/dist/solutions/index.cjs.map +1 -0
  370. package/dist/solutions/index.d.cts +23 -0
  371. package/dist/solutions/index.d.ts +23 -0
  372. package/dist/solutions/index.js +55 -0
  373. package/dist/solutions/index.js.map +1 -0
  374. package/dist/spawnable-5mDY501F.d.cts +746 -0
  375. package/dist/spawnable-D3lR0oQu.d.ts +746 -0
  376. package/dist/status-U-rUI79b.d.cts +84 -0
  377. package/dist/status-U-rUI79b.d.ts +84 -0
  378. package/dist/timeout-U5O4ESK3.js +12 -0
  379. package/dist/timeout-U5O4ESK3.js.map +1 -0
  380. package/dist/{types-CWFysE9E.d.ts → types-BB5Lw-pB.d.cts} +3 -3
  381. package/dist/{types-C0_yquda.d.cts → types-BB5Lw-pB.d.ts} +3 -3
  382. package/dist/types-CJWIMJiZ.d.ts +548 -0
  383. package/dist/types-vCq7ShIm.d.cts +548 -0
  384. package/dist/utils/ai/browser.cjs +2169 -0
  385. package/dist/utils/ai/browser.cjs.map +1 -0
  386. package/dist/{patterns → utils}/ai/browser.d.cts +7 -5
  387. package/dist/{patterns → utils}/ai/browser.d.ts +7 -5
  388. package/dist/utils/ai/browser.js +255 -0
  389. package/dist/utils/ai/browser.js.map +1 -0
  390. package/dist/utils/ai/index.cjs +8468 -0
  391. package/dist/utils/ai/index.cjs.map +1 -0
  392. package/dist/{index-CR8QpwX8.d.ts → utils/ai/index.d.cts} +73 -976
  393. package/dist/{index-UPSiS-X7.d.cts → utils/ai/index.d.ts} +73 -976
  394. package/dist/utils/ai/index.js +173 -0
  395. package/dist/utils/ai/index.js.map +1 -0
  396. package/dist/utils/ai/node.cjs +648 -0
  397. package/dist/utils/ai/node.cjs.map +1 -0
  398. package/dist/{patterns → utils}/ai/node.d.cts +5 -7
  399. package/dist/{patterns → utils}/ai/node.d.ts +5 -7
  400. package/dist/utils/ai/node.js +84 -0
  401. package/dist/utils/ai/node.js.map +1 -0
  402. package/dist/utils/cqrs/index.cjs +1036 -0
  403. package/dist/utils/cqrs/index.cjs.map +1 -0
  404. package/dist/{index-CeFiHtAg.d.ts → utils/cqrs/index.d.cts} +7 -37
  405. package/dist/{index-B-_tFaqV.d.cts → utils/cqrs/index.d.ts} +7 -37
  406. package/dist/utils/cqrs/index.js +18 -0
  407. package/dist/utils/cqrs/index.js.map +1 -0
  408. package/dist/utils/demo-shell/index.cjs +865 -0
  409. package/dist/utils/demo-shell/index.cjs.map +1 -0
  410. package/dist/{index-B8YnZpIR.d.ts → utils/demo-shell/index.d.cts} +4 -16
  411. package/dist/{index-Cwv0KWcU.d.cts → utils/demo-shell/index.d.ts} +4 -16
  412. package/dist/utils/demo-shell/index.js +13 -0
  413. package/dist/utils/demo-shell/index.js.map +1 -0
  414. package/dist/utils/domain-templates/index.cjs +732 -0
  415. package/dist/utils/domain-templates/index.cjs.map +1 -0
  416. package/dist/{index-CzLVrjxn.d.ts → utils/domain-templates/index.d.cts} +3 -20
  417. package/dist/{index-BaQaY_IQ.d.cts → utils/domain-templates/index.d.ts} +3 -20
  418. package/dist/utils/domain-templates/index.js +17 -0
  419. package/dist/utils/domain-templates/index.js.map +1 -0
  420. package/dist/utils/graphspec/index.cjs +1174 -0
  421. package/dist/utils/graphspec/index.cjs.map +1 -0
  422. package/dist/{index-CMh5Rz1y.d.ts → utils/graphspec/index.d.cts} +106 -42
  423. package/dist/{index-CS0LTlB8.d.cts → utils/graphspec/index.d.ts} +106 -42
  424. package/dist/utils/graphspec/index.js +35 -0
  425. package/dist/utils/graphspec/index.js.map +1 -0
  426. package/dist/utils/harness/index.cjs +656 -0
  427. package/dist/utils/harness/index.cjs.map +1 -0
  428. package/dist/utils/harness/index.d.cts +542 -0
  429. package/dist/utils/harness/index.d.ts +542 -0
  430. package/dist/utils/harness/index.js +56 -0
  431. package/dist/utils/harness/index.js.map +1 -0
  432. package/dist/utils/index.cjs +17609 -0
  433. package/dist/utils/index.cjs.map +1 -0
  434. package/dist/utils/index.d.cts +96 -0
  435. package/dist/utils/index.d.ts +96 -0
  436. package/dist/utils/index.js +514 -0
  437. package/dist/utils/index.js.map +1 -0
  438. package/dist/utils/inspect/index.cjs +807 -0
  439. package/dist/utils/inspect/index.cjs.map +1 -0
  440. package/dist/utils/inspect/index.d.cts +123 -0
  441. package/dist/utils/inspect/index.d.ts +123 -0
  442. package/dist/utils/inspect/index.js +30 -0
  443. package/dist/utils/inspect/index.js.map +1 -0
  444. package/dist/utils/job-queue/index.cjs +717 -0
  445. package/dist/utils/job-queue/index.cjs.map +1 -0
  446. package/dist/{index-DisjX8a-.d.ts → utils/job-queue/index.d.cts} +5 -26
  447. package/dist/{index-DV_1YuVk.d.cts → utils/job-queue/index.d.ts} +5 -26
  448. package/dist/utils/job-queue/index.js +18 -0
  449. package/dist/utils/job-queue/index.js.map +1 -0
  450. package/dist/utils/memory/index.cjs +1451 -0
  451. package/dist/utils/memory/index.cjs.map +1 -0
  452. package/dist/{index-CZ3r5Rxp.d.ts → utils/memory/index.d.cts} +242 -34
  453. package/dist/{index-B17QddL1.d.cts → utils/memory/index.d.ts} +242 -34
  454. package/dist/utils/memory/index.js +19 -0
  455. package/dist/utils/memory/index.js.map +1 -0
  456. package/dist/utils/messaging/index.cjs +666 -0
  457. package/dist/utils/messaging/index.cjs.map +1 -0
  458. package/dist/utils/messaging/index.d.cts +562 -0
  459. package/dist/utils/messaging/index.d.ts +562 -0
  460. package/dist/utils/messaging/index.js +50 -0
  461. package/dist/utils/messaging/index.js.map +1 -0
  462. package/dist/utils/orchestration/index.cjs +876 -0
  463. package/dist/utils/orchestration/index.cjs.map +1 -0
  464. package/dist/utils/orchestration/index.d.cts +233 -0
  465. package/dist/utils/orchestration/index.d.ts +233 -0
  466. package/dist/utils/orchestration/index.js +19 -0
  467. package/dist/utils/orchestration/index.js.map +1 -0
  468. package/dist/utils/process/index.cjs +743 -0
  469. package/dist/utils/process/index.cjs.map +1 -0
  470. package/dist/{index-p09KSrTN.d.ts → utils/process/index.d.cts} +97 -44
  471. package/dist/{index-CasX6Pfq.d.cts → utils/process/index.d.ts} +97 -44
  472. package/dist/utils/process/index.js +14 -0
  473. package/dist/utils/process/index.js.map +1 -0
  474. package/dist/utils/reactive-layout/index.cjs +1607 -0
  475. package/dist/utils/reactive-layout/index.cjs.map +1 -0
  476. package/dist/{index-B5S8ULbU.d.ts → utils/reactive-layout/index.d.cts} +58 -81
  477. package/dist/{index-Dc4AYqrJ.d.cts → utils/reactive-layout/index.d.ts} +58 -81
  478. package/dist/utils/reactive-layout/index.js +52 -0
  479. package/dist/utils/reactive-layout/index.js.map +1 -0
  480. package/dist/utils/reduction/index.cjs +203 -0
  481. package/dist/utils/reduction/index.cjs.map +1 -0
  482. package/dist/{index-Byu-OpX_.d.ts → utils/reduction/index.d.cts} +6 -17
  483. package/dist/{index-tRCxuAXF.d.cts → utils/reduction/index.d.ts} +6 -17
  484. package/dist/utils/reduction/index.js +14 -0
  485. package/dist/utils/reduction/index.js.map +1 -0
  486. package/dist/utils/resilience/index.cjs +1617 -0
  487. package/dist/utils/resilience/index.cjs.map +1 -0
  488. package/dist/utils/resilience/index.d.cts +9 -0
  489. package/dist/utils/resilience/index.d.ts +9 -0
  490. package/dist/utils/resilience/index.js +44 -0
  491. package/dist/utils/resilience/index.js.map +1 -0
  492. package/dist/utils/surface/index.cjs +1070 -0
  493. package/dist/utils/surface/index.cjs.map +1 -0
  494. package/dist/{index-CYq8vAyV.d.ts → utils/surface/index.d.cts} +7 -58
  495. package/dist/{index-CSOmP7xT.d.cts → utils/surface/index.d.ts} +7 -58
  496. package/dist/utils/surface/index.js +30 -0
  497. package/dist/utils/surface/index.js.map +1 -0
  498. package/dist/utils/topology-view/index.cjs +620 -0
  499. package/dist/utils/topology-view/index.cjs.map +1 -0
  500. package/dist/utils/topology-view/index.d.cts +68 -0
  501. package/dist/utils/topology-view/index.d.ts +68 -0
  502. package/dist/utils/topology-view/index.js +11 -0
  503. package/dist/utils/topology-view/index.js.map +1 -0
  504. package/package.json +664 -584
  505. package/dist/backoff-HPZMEZNF.js +0 -1
  506. package/dist/chunk-2T7U5EU6.js +0 -1
  507. package/dist/chunk-3G5U5QNE.js +0 -5
  508. package/dist/chunk-4VVTGLXJ.js +0 -1
  509. package/dist/chunk-5M4CCMMD.js +0 -45
  510. package/dist/chunk-5QDBSZBV.js +0 -1
  511. package/dist/chunk-5XJ6B66J.js +0 -1
  512. package/dist/chunk-6QZNQS5B.js +0 -1
  513. package/dist/chunk-6X7AFUJV.js +0 -9
  514. package/dist/chunk-7K6PWTDQ.js +0 -1
  515. package/dist/chunk-7LIAPXJB.js +0 -1
  516. package/dist/chunk-7WPU3UHQ.js +0 -1
  517. package/dist/chunk-A5WCQ5NO.js +0 -1
  518. package/dist/chunk-APPIWSGD.js +0 -84
  519. package/dist/chunk-BEZWM2SY.js +0 -1
  520. package/dist/chunk-C72GO4IZ.js +0 -1
  521. package/dist/chunk-CB676TKJ.js +0 -1
  522. package/dist/chunk-CE6TI2TL.js +0 -1
  523. package/dist/chunk-CE72X3WO.js +0 -1
  524. package/dist/chunk-CK2E7BTU.js +0 -1
  525. package/dist/chunk-CLVB32RD.js +0 -1
  526. package/dist/chunk-CRVT7D2P.js +0 -1
  527. package/dist/chunk-D5RFJOZ2.js +0 -1
  528. package/dist/chunk-D7GPHKFH.js +0 -1
  529. package/dist/chunk-DHRX7JX4.js +0 -2
  530. package/dist/chunk-ESMPEKEV.js +0 -1
  531. package/dist/chunk-F672GV32.js +0 -1
  532. package/dist/chunk-FZMYDOWV.js +0 -1
  533. package/dist/chunk-GHBWHMRZ.js +0 -1
  534. package/dist/chunk-GLERH466.js +0 -1
  535. package/dist/chunk-GPW2V3RE.js +0 -1
  536. package/dist/chunk-HIDYF36O.js +0 -1
  537. package/dist/chunk-HITNVN6B.js +0 -3
  538. package/dist/chunk-HY4DJBA7.js +0 -5
  539. package/dist/chunk-KZIEYVXN.js +0 -1
  540. package/dist/chunk-L6NSJVJZ.js +0 -1
  541. package/dist/chunk-N4MQX6JU.js +0 -18
  542. package/dist/chunk-N7FHEL4D.js +0 -1
  543. package/dist/chunk-NTEURFZH.js +0 -1
  544. package/dist/chunk-OIVP6KFV.js +0 -1
  545. package/dist/chunk-OPHBU3LG.js +0 -1
  546. package/dist/chunk-OYQOZP2F.js +0 -5
  547. package/dist/chunk-PTZK576G.js +0 -1
  548. package/dist/chunk-QYADASLV.js +0 -1
  549. package/dist/chunk-ST7UXLWR.js +0 -1
  550. package/dist/chunk-SVY7VUYU.js +0 -1
  551. package/dist/chunk-TK3NWWD4.js +0 -1
  552. package/dist/chunk-TSOYJ743.js +0 -1
  553. package/dist/chunk-UNGSTR4X.js +0 -61
  554. package/dist/chunk-VIMF6LGM.js +0 -1
  555. package/dist/chunk-VJLMUKOI.js +0 -1
  556. package/dist/chunk-VN6RDSK2.js +0 -1
  557. package/dist/chunk-VV4N5P64.js +0 -1
  558. package/dist/chunk-W3I423PS.js +0 -1
  559. package/dist/chunk-WJR24TAG.js +0 -1
  560. package/dist/chunk-XTGKMHSW.js +0 -1
  561. package/dist/chunk-YBB7ZGTY.js +0 -1
  562. package/dist/chunk-Z4NPUARF.js +0 -1
  563. package/dist/chunk-ZGNQRPDT.js +0 -1
  564. package/dist/chunk-ZKPSFFKU.js +0 -1
  565. package/dist/chunk-ZLV5SQSX.js +0 -1
  566. package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
  567. package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
  568. package/dist/core/index.cjs +0 -1
  569. package/dist/core/index.d.cts +0 -3
  570. package/dist/core/index.d.ts +0 -3
  571. package/dist/core/index.js +0 -1
  572. package/dist/decay-BvOWTZ00.d.ts +0 -112
  573. package/dist/decay-CFlLvXUT.d.cts +0 -112
  574. package/dist/extra/browser.cjs +0 -1
  575. package/dist/extra/browser.d.cts +0 -4
  576. package/dist/extra/browser.d.ts +0 -4
  577. package/dist/extra/browser.js +0 -1
  578. package/dist/extra/index.cjs +0 -20
  579. package/dist/extra/index.d.cts +0 -17
  580. package/dist/extra/index.d.ts +0 -17
  581. package/dist/extra/index.js +0 -1
  582. package/dist/extra/node.cjs +0 -2
  583. package/dist/extra/node.js +0 -2
  584. package/dist/extra/operators.cjs +0 -1
  585. package/dist/extra/operators.d.cts +0 -958
  586. package/dist/extra/operators.d.ts +0 -958
  587. package/dist/extra/operators.js +0 -1
  588. package/dist/extra/reactive.cjs +0 -1
  589. package/dist/extra/reactive.d.cts +0 -353
  590. package/dist/extra/reactive.d.ts +0 -353
  591. package/dist/extra/reactive.js +0 -1
  592. package/dist/extra/render/index.cjs +0 -5
  593. package/dist/extra/render/index.js +0 -1
  594. package/dist/extra/sources.cjs +0 -3
  595. package/dist/extra/sources.js +0 -1
  596. package/dist/extra/storage-browser.cjs +0 -1
  597. package/dist/extra/storage-browser.d.cts +0 -37
  598. package/dist/extra/storage-browser.d.ts +0 -37
  599. package/dist/extra/storage-browser.js +0 -1
  600. package/dist/extra/storage-core.cjs +0 -1
  601. package/dist/extra/storage-core.d.cts +0 -28
  602. package/dist/extra/storage-core.d.ts +0 -28
  603. package/dist/extra/storage-core.js +0 -1
  604. package/dist/extra/storage-node.cjs +0 -1
  605. package/dist/extra/storage-node.d.cts +0 -2
  606. package/dist/extra/storage-node.d.ts +0 -2
  607. package/dist/extra/storage-node.js +0 -0
  608. package/dist/extra/storage-tiers-browser.cjs +0 -1
  609. package/dist/extra/storage-tiers-browser.d.cts +0 -120
  610. package/dist/extra/storage-tiers-browser.d.ts +0 -120
  611. package/dist/extra/storage-tiers-browser.js +0 -1
  612. package/dist/extra/storage-tiers-node.cjs +0 -1
  613. package/dist/extra/storage-tiers-node.d.cts +0 -210
  614. package/dist/extra/storage-tiers-node.d.ts +0 -210
  615. package/dist/extra/storage-tiers-node.js +0 -1
  616. package/dist/extra/storage-tiers.cjs +0 -1
  617. package/dist/extra/storage-tiers.d.cts +0 -412
  618. package/dist/extra/storage-tiers.d.ts +0 -412
  619. package/dist/extra/storage-tiers.js +0 -1
  620. package/dist/graph/index.cjs +0 -7
  621. package/dist/graph/index.d.cts +0 -7
  622. package/dist/graph/index.d.ts +0 -7
  623. package/dist/graph/index.js +0 -1
  624. package/dist/graph-CWvEUQAq.d.cts +0 -1861
  625. package/dist/graph-D9LFnda9.d.ts +0 -1861
  626. package/dist/index-5k1T6jl0.d.cts +0 -121
  627. package/dist/index-9770hRuQ.d.cts +0 -779
  628. package/dist/index-B1F8Enjf.d.ts +0 -704
  629. package/dist/index-BHskSB8v.d.ts +0 -3413
  630. package/dist/index-BIYAkbAi.d.cts +0 -26
  631. package/dist/index-BoJ5JHxI.d.ts +0 -557
  632. package/dist/index-BocU7pqs.d.ts +0 -779
  633. package/dist/index-BxNs2HB9.d.cts +0 -1858
  634. package/dist/index-C1T3d7V-.d.cts +0 -704
  635. package/dist/index-C5ri2Axc.d.cts +0 -301
  636. package/dist/index-C9l6OEBL.d.ts +0 -26
  637. package/dist/index-CC-AvFTy.d.cts +0 -557
  638. package/dist/index-CJF1URuX.d.ts +0 -121
  639. package/dist/index-CdTelp1M.d.ts +0 -202
  640. package/dist/index-Cj3WohTd.d.cts +0 -202
  641. package/dist/index-Co7uli2l.d.cts +0 -3413
  642. package/dist/index-D0aciIex.d.cts +0 -209
  643. package/dist/index-DHen9Klo.d.ts +0 -1858
  644. package/dist/index-Yq60JP3s.d.ts +0 -209
  645. package/dist/index-nozs3fFC.d.ts +0 -301
  646. package/dist/node-kK3CvTrR.d.cts +0 -1347
  647. package/dist/node-kK3CvTrR.d.ts +0 -1347
  648. package/dist/patterns/ai/browser.cjs +0 -8
  649. package/dist/patterns/ai/browser.js +0 -3
  650. package/dist/patterns/ai/index.cjs +0 -74
  651. package/dist/patterns/ai/index.d.cts +0 -20
  652. package/dist/patterns/ai/index.d.ts +0 -20
  653. package/dist/patterns/ai/index.js +0 -1
  654. package/dist/patterns/ai/node.cjs +0 -1
  655. package/dist/patterns/ai/node.js +0 -1
  656. package/dist/patterns/cqrs/index.cjs +0 -3
  657. package/dist/patterns/cqrs/index.d.cts +0 -8
  658. package/dist/patterns/cqrs/index.d.ts +0 -8
  659. package/dist/patterns/cqrs/index.js +0 -1
  660. package/dist/patterns/demo-shell/index.cjs +0 -5
  661. package/dist/patterns/demo-shell/index.d.cts +0 -7
  662. package/dist/patterns/demo-shell/index.d.ts +0 -7
  663. package/dist/patterns/demo-shell/index.js +0 -1
  664. package/dist/patterns/domain-templates/index.cjs +0 -3
  665. package/dist/patterns/domain-templates/index.d.cts +0 -6
  666. package/dist/patterns/domain-templates/index.d.ts +0 -6
  667. package/dist/patterns/domain-templates/index.js +0 -1
  668. package/dist/patterns/graphspec/index.cjs +0 -86
  669. package/dist/patterns/graphspec/index.d.cts +0 -8
  670. package/dist/patterns/graphspec/index.d.ts +0 -8
  671. package/dist/patterns/graphspec/index.js +0 -1
  672. package/dist/patterns/harness/index.cjs +0 -48
  673. package/dist/patterns/harness/index.d.cts +0 -13
  674. package/dist/patterns/harness/index.d.ts +0 -13
  675. package/dist/patterns/harness/index.js +0 -1
  676. package/dist/patterns/inspect/index.cjs +0 -3
  677. package/dist/patterns/inspect/index.d.cts +0 -9
  678. package/dist/patterns/inspect/index.d.ts +0 -9
  679. package/dist/patterns/inspect/index.js +0 -1
  680. package/dist/patterns/job-queue/index.cjs +0 -3
  681. package/dist/patterns/job-queue/index.d.cts +0 -9
  682. package/dist/patterns/job-queue/index.d.ts +0 -9
  683. package/dist/patterns/job-queue/index.js +0 -1
  684. package/dist/patterns/memory/index.cjs +0 -3
  685. package/dist/patterns/memory/index.d.cts +0 -8
  686. package/dist/patterns/memory/index.d.ts +0 -8
  687. package/dist/patterns/memory/index.js +0 -1
  688. package/dist/patterns/messaging/index.cjs +0 -3
  689. package/dist/patterns/messaging/index.d.cts +0 -7
  690. package/dist/patterns/messaging/index.d.ts +0 -7
  691. package/dist/patterns/messaging/index.js +0 -1
  692. package/dist/patterns/orchestration/index.cjs +0 -3
  693. package/dist/patterns/orchestration/index.d.cts +0 -8
  694. package/dist/patterns/orchestration/index.d.ts +0 -8
  695. package/dist/patterns/orchestration/index.js +0 -1
  696. package/dist/patterns/process/index.cjs +0 -3
  697. package/dist/patterns/process/index.d.cts +0 -10
  698. package/dist/patterns/process/index.d.ts +0 -10
  699. package/dist/patterns/process/index.js +0 -1
  700. package/dist/patterns/reactive-layout/index.cjs +0 -4
  701. package/dist/patterns/reactive-layout/index.d.cts +0 -7
  702. package/dist/patterns/reactive-layout/index.d.ts +0 -7
  703. package/dist/patterns/reactive-layout/index.js +0 -1
  704. package/dist/patterns/reduction/index.cjs +0 -3
  705. package/dist/patterns/reduction/index.d.cts +0 -6
  706. package/dist/patterns/reduction/index.d.ts +0 -6
  707. package/dist/patterns/reduction/index.js +0 -1
  708. package/dist/patterns/surface/index.cjs +0 -13
  709. package/dist/patterns/surface/index.d.cts +0 -9
  710. package/dist/patterns/surface/index.d.ts +0 -9
  711. package/dist/patterns/surface/index.js +0 -1
  712. package/dist/reactive-log-BKALbfal.d.ts +0 -223
  713. package/dist/reactive-log-DIGdYqQ6.d.cts +0 -223
  714. package/dist/reactive-map-CEFGp8TK.d.cts +0 -296
  715. package/dist/reactive-map-DS_SIAxv.d.ts +0 -296
  716. package/dist/resilience-6LYQJAC5.js +0 -1
  717. package/dist/sugar-DQjFmVqb.d.cts +0 -399
  718. package/dist/sugar-fhLIE7TT.d.ts +0 -399
  719. package/dist/topology-tree-Bcz27hpF.d.cts +0 -25
  720. package/dist/topology-tree-xvaD0fOX.d.ts +0 -25
@@ -0,0 +1,876 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/orchestration/index.ts
21
+ var orchestration_exports = {};
22
+ __export(orchestration_exports, {
23
+ PipelineGraph: () => PipelineGraph,
24
+ decisionKeyOf: () => decisionKeyOf,
25
+ humanInput: () => humanInput,
26
+ pipelineGraph: () => pipelineGraph,
27
+ tracker: () => tracker
28
+ });
29
+ module.exports = __toCommonJS(orchestration_exports);
30
+
31
+ // src/utils/orchestration/human-input.ts
32
+ var import_core3 = require("@graphrefly/pure-ts/core");
33
+ var import_extra3 = require("@graphrefly/pure-ts/extra");
34
+
35
+ // src/utils/messaging/message.ts
36
+ var PROMPTS_TOPIC = "prompts";
37
+ var RESPONSES_TOPIC = "responses";
38
+ var DEFERRED_TOPIC = "deferred";
39
+
40
+ // src/utils/messaging/index.ts
41
+ var import_core2 = require("@graphrefly/pure-ts/core");
42
+ var import_extra2 = require("@graphrefly/pure-ts/extra");
43
+ var import_graph2 = require("@graphrefly/pure-ts/graph");
44
+
45
+ // src/base/meta/domain-meta.ts
46
+ function domainMeta(domain, kind, extra) {
47
+ return {
48
+ [domain]: true,
49
+ [`${domain}_type`]: kind,
50
+ ...extra ?? {}
51
+ };
52
+ }
53
+
54
+ // src/base/mutation/index.ts
55
+ var import_core = require("@graphrefly/pure-ts/core");
56
+ var import_extra = require("@graphrefly/pure-ts/extra");
57
+ var import_graph = require("@graphrefly/pure-ts/graph");
58
+ var DEFAULT_AUDIT_GUARD = (0, import_core.policy)((allow, deny) => {
59
+ allow("observe");
60
+ allow("signal");
61
+ deny("write");
62
+ });
63
+ function createAuditLog(opts) {
64
+ const log = (0, import_extra.reactiveLog)([], {
65
+ name: opts.name,
66
+ maxSize: opts.retainedLimit ?? 1024,
67
+ guard: opts.guard ?? DEFAULT_AUDIT_GUARD,
68
+ ...opts.versioning != null ? { versioning: opts.versioning } : {}
69
+ });
70
+ log.withLatest();
71
+ if (opts.graph) {
72
+ opts.graph.add(log.entries, { name: opts.name });
73
+ }
74
+ return log;
75
+ }
76
+ function deepFreeze(value) {
77
+ if (value === null || typeof value !== "object" || Object.isFrozen(value)) return value;
78
+ for (const k of Object.keys(value)) {
79
+ deepFreeze(value[k]);
80
+ }
81
+ return Object.freeze(value);
82
+ }
83
+ function mutate(act, opts) {
84
+ const { up, down } = typeof act === "function" ? { up: act, down: void 0 } : act;
85
+ const freeze = opts.freeze ?? true;
86
+ if (opts.frame === "inline") {
87
+ return function wrapped(...args) {
88
+ const sealed = freeze ? args.map(deepFreeze) : args;
89
+ const t_ns = (0, import_core.wallClockNs)();
90
+ const seq = opts.seq ? bumpCursor(opts.seq) : void 0;
91
+ try {
92
+ const result = up(...sealed);
93
+ if (opts.log && opts.onSuccessRecord) {
94
+ appendAudit(
95
+ opts.log,
96
+ opts.onSuccessRecord,
97
+ sealed,
98
+ result,
99
+ { t_ns, seq },
100
+ opts.handlerVersion
101
+ );
102
+ }
103
+ return result;
104
+ } catch (err) {
105
+ if (opts.log && opts.onFailureRecord) {
106
+ const errorType = err instanceof Error ? err.name : typeof err;
107
+ appendAudit(
108
+ opts.log,
109
+ opts.onFailureRecord,
110
+ sealed,
111
+ err,
112
+ { t_ns, seq, errorType },
113
+ opts.handlerVersion
114
+ );
115
+ }
116
+ throw err;
117
+ }
118
+ };
119
+ }
120
+ return function wrapped(...args) {
121
+ const sealed = freeze ? args.map(deepFreeze) : args;
122
+ const t_ns = (0, import_core.wallClockNs)();
123
+ let result;
124
+ let captured;
125
+ let captureSet = false;
126
+ let seq;
127
+ try {
128
+ (0, import_core.batch)(() => {
129
+ if (opts.seq) seq = bumpCursor(opts.seq);
130
+ try {
131
+ result = up(...sealed);
132
+ if (opts.log && opts.onSuccessRecord) {
133
+ appendAudit(
134
+ opts.log,
135
+ opts.onSuccessRecord,
136
+ sealed,
137
+ result,
138
+ { t_ns, seq },
139
+ opts.handlerVersion
140
+ );
141
+ }
142
+ } catch (err) {
143
+ captured = err;
144
+ captureSet = true;
145
+ throw err;
146
+ }
147
+ });
148
+ } catch (outerErr) {
149
+ if (captureSet && down) {
150
+ try {
151
+ down(...sealed);
152
+ } catch (downErr) {
153
+ console.error(
154
+ `mutate: down hook threw \u2014 original action error preserved (${captured instanceof Error ? captured.name : typeof captured}). Down error:`,
155
+ downErr
156
+ );
157
+ }
158
+ }
159
+ if (captureSet && opts.log && opts.onFailureRecord) {
160
+ const errorType = captured instanceof Error ? captured.name : typeof captured;
161
+ appendAudit(
162
+ opts.log,
163
+ opts.onFailureRecord,
164
+ sealed,
165
+ captured,
166
+ { t_ns, seq, errorType },
167
+ opts.handlerVersion
168
+ );
169
+ }
170
+ throw captureSet ? captured : outerErr;
171
+ }
172
+ return result;
173
+ };
174
+ }
175
+ var _bumpCursorWarned = /* @__PURE__ */ new WeakSet();
176
+ function bumpCursor(seq) {
177
+ const raw = seq.cache;
178
+ const valid = typeof raw === "number" && Number.isFinite(raw);
179
+ if (!valid && raw !== void 0 && !_bumpCursorWarned.has(seq)) {
180
+ _bumpCursorWarned.add(seq);
181
+ console.warn(
182
+ `bumpCursor: cursor cache held a non-numeric value (${String(raw)}); resetting to 0. Causes include: a snapshot codec round-tripping the cursor as a string / null / NaN, OR a malformed initial seed (e.g. state<number>(NaN)). Audit consumers may see colliding seq values after this point.`
183
+ );
184
+ }
185
+ const cur = valid ? raw : 0;
186
+ const next = cur + 1;
187
+ seq.down([[import_core.DIRTY], [import_core.DATA, next]]);
188
+ return next;
189
+ }
190
+ function appendAudit(audit, builder, args, value, meta2, handlerVersion) {
191
+ const record = builder(args, value, meta2);
192
+ if (record === void 0) return;
193
+ const stamped = handlerVersion != null ? { ...record, handlerVersion } : record;
194
+ audit.append(stamped);
195
+ }
196
+
197
+ // src/utils/messaging/index.ts
198
+ function requireNonNegativeInt(value, label) {
199
+ if (!Number.isFinite(value) || !Number.isInteger(value) || value < 0) {
200
+ throw new Error(`${label} must be a non-negative integer`);
201
+ }
202
+ return value;
203
+ }
204
+ function messagingMeta(kind, extra) {
205
+ return domainMeta("messaging", kind, extra);
206
+ }
207
+ var SubscriptionGraph = class extends import_graph2.Graph {
208
+ cursor;
209
+ available;
210
+ /**
211
+ * Reference to the upstream topic graph. Intentionally NOT mounted
212
+ * under this subscription: a subscription is a VIEW over an
213
+ * externally-owned topic. Double-mounting (e.g. hub-owned topic +
214
+ * sub-mount here) would make either-side teardown leave the other
215
+ * holding a dead reference. Node-level `derived([topicEvents], …)`
216
+ * still wires the data dependency across graph boundaries. D1(e).
217
+ */
218
+ topic;
219
+ _disposed = false;
220
+ _ackImpl;
221
+ _pullAndAckImpl;
222
+ constructor(name, topicGraph, opts = {}) {
223
+ super(name, opts.graph);
224
+ this.topic = topicGraph;
225
+ let initialCursor;
226
+ if (opts.from !== void 0) {
227
+ if (opts.from === "retained") {
228
+ initialCursor = 0;
229
+ } else if (opts.from === "now") {
230
+ initialCursor = topicGraph.events.cache.length;
231
+ } else {
232
+ initialCursor = requireNonNegativeInt(opts.from, "subscription from");
233
+ }
234
+ } else {
235
+ initialCursor = requireNonNegativeInt(opts.cursor ?? 0, "subscription cursor");
236
+ }
237
+ this.cursor = this.state("cursor", initialCursor, {
238
+ meta: messagingMeta("subscription_cursor")
239
+ });
240
+ this.available = topicGraph._logBundle.view({ kind: "fromCursor", cursor: this.cursor });
241
+ this.add(this.available, { name: "available" });
242
+ this.addDisposer((0, import_extra2.keepalive)(this.available));
243
+ if (opts.advanceOn !== void 0) {
244
+ const advanceOn = opts.advanceOn;
245
+ let advanceInitialized = false;
246
+ const advancePump = (0, import_core2.node)(
247
+ [advanceOn],
248
+ () => {
249
+ if (!advanceInitialized) {
250
+ advanceInitialized = true;
251
+ return;
252
+ }
253
+ if (this._disposed) return;
254
+ const avail = this.available.cache;
255
+ if (avail.length === 0) return;
256
+ const next = this.cursor.cache + avail.length;
257
+ this.cursor.emit(next);
258
+ },
259
+ {
260
+ name: "advancePump",
261
+ describeKind: "effect",
262
+ meta: messagingMeta("subscription_advance_pump")
263
+ }
264
+ );
265
+ this.add(advancePump, { name: "advancePump" });
266
+ this.addDisposer((0, import_extra2.keepalive)(advancePump));
267
+ }
268
+ this._ackImpl = mutate(
269
+ (count) => {
270
+ const available = this.available.cache;
271
+ const requested = count === void 0 ? available.length : requireNonNegativeInt(count, "subscription ack count");
272
+ const step = Math.min(requested, available.length);
273
+ if (step <= 0) return this.cursor.cache;
274
+ const next = this.cursor.cache + step;
275
+ this.cursor.emit(next);
276
+ return next;
277
+ },
278
+ { frame: "inline", freeze: false }
279
+ );
280
+ this._pullAndAckImpl = mutate(
281
+ (limit) => {
282
+ const available = this.available.cache;
283
+ const max = limit === void 0 ? available.length : requireNonNegativeInt(limit, "subscription pullAndAck limit");
284
+ const items = available.slice(0, max);
285
+ if (items.length === 0) return { items, cursor: this.cursor.cache };
286
+ const next = this.cursor.cache + items.length;
287
+ this.cursor.emit(next);
288
+ return { items, cursor: next };
289
+ },
290
+ { frame: "inline", freeze: false }
291
+ );
292
+ }
293
+ ack(count) {
294
+ if (this._disposed) return this.cursor.cache;
295
+ return this._ackImpl(count);
296
+ }
297
+ pull(limit) {
298
+ if (this._disposed) return [];
299
+ const available = this.available.cache;
300
+ const max = limit === void 0 ? available.length : requireNonNegativeInt(limit, "subscription pull limit");
301
+ return available.slice(0, max);
302
+ }
303
+ /**
304
+ * Atomic pull-and-acknowledge. Returns `{ items, cursor }` where `cursor`
305
+ * is the new cursor position after advancing. Under single-threaded JS the
306
+ * snapshot and advance are atomic; PY callers use a per-subscription Lock.
307
+ *
308
+ * Replaces `pull(limit, { ack: true })`.
309
+ */
310
+ pullAndAck(limit) {
311
+ if (this._disposed) return { items: [], cursor: this.cursor.cache };
312
+ return this._pullAndAckImpl(limit);
313
+ }
314
+ /**
315
+ * Release internal subscriptions and mark the subscription torn-down.
316
+ * Subsequent `pull`, `pullAndAck`, `ack` return empty / current cursor.
317
+ * Emits COMPLETE on `cursor` so derived consumers (e.g. `available`) see
318
+ * the termination signal. Also drains `addDisposer` callbacks (including
319
+ * the `keepalive(advancePump)` subscription) so no keepalive leak occurs.
320
+ */
321
+ dispose() {
322
+ if (this._disposed) return;
323
+ this._disposed = true;
324
+ this.cursor.down([[import_core2.COMPLETE]]);
325
+ this.destroy();
326
+ }
327
+ };
328
+ function subscription(name, topicGraph, opts) {
329
+ return new SubscriptionGraph(name, topicGraph, opts);
330
+ }
331
+
332
+ // src/utils/orchestration/human-input.ts
333
+ function humanInput(opts) {
334
+ const { hub, prompt, schema, idGenerator } = opts;
335
+ const promptNode = (0, import_extra3.fromAny)(prompt);
336
+ const promptsTopic = hub.topic(PROMPTS_TOPIC);
337
+ const responsesTopic = hub.topic(RESPONSES_TOPIC);
338
+ const nextId = idGenerator ?? defaultIdGenerator();
339
+ return (0, import_core3.node)(
340
+ (_data, a) => {
341
+ let activeCorrelationId;
342
+ let respUnsub;
343
+ const promptUnsub = promptNode.subscribe((msgs) => {
344
+ for (const m of msgs) {
345
+ if (m[0] === import_core3.COMPLETE) {
346
+ respUnsub?.();
347
+ respUnsub = void 0;
348
+ a.down([[import_core3.COMPLETE]]);
349
+ return;
350
+ }
351
+ if (m[0] !== import_core3.DATA) continue;
352
+ const promptStr = m[1];
353
+ respUnsub?.();
354
+ respUnsub = void 0;
355
+ const correlationId = nextId();
356
+ activeCorrelationId = correlationId;
357
+ const responseCursorAtSubscribe = responsesTopic.events.cache?.length ?? 0;
358
+ const envelope = {
359
+ id: correlationId,
360
+ correlationId,
361
+ payload: { prompt: promptStr },
362
+ ...schema != null && { schema }
363
+ };
364
+ promptsTopic.publish(envelope);
365
+ respUnsub = responsesTopic.events.subscribe((rspMsgs) => {
366
+ for (const rm of rspMsgs) {
367
+ if (rm[0] !== import_core3.DATA) continue;
368
+ const arr = rm[1];
369
+ for (let i = responseCursorAtSubscribe; i < arr.length; i++) {
370
+ const env = arr[i];
371
+ if (env.correlationId === activeCorrelationId) {
372
+ a.emit(env.payload);
373
+ respUnsub?.();
374
+ respUnsub = void 0;
375
+ return;
376
+ }
377
+ }
378
+ }
379
+ });
380
+ }
381
+ });
382
+ return () => {
383
+ promptUnsub();
384
+ respUnsub?.();
385
+ };
386
+ },
387
+ {
388
+ describeKind: "derived",
389
+ name: "humanInput",
390
+ // Each new prompt may produce a structurally-equal response (e.g.
391
+ // from a deterministic UI mock) — disable framework dedup so
392
+ // repeat emissions propagate. Same precedent as `agent.out`.
393
+ equals: () => false
394
+ }
395
+ );
396
+ }
397
+ function defaultIdGenerator() {
398
+ let n = 0;
399
+ const base = (0, import_core3.wallClockNs)().toString(36);
400
+ return () => {
401
+ n += 1;
402
+ return `humanInput-${base}-${n.toString(36)}`;
403
+ };
404
+ }
405
+
406
+ // src/utils/orchestration/pipeline-graph.ts
407
+ var import_core4 = require("@graphrefly/pure-ts/core");
408
+ var import_graph3 = require("@graphrefly/pure-ts/graph");
409
+ function meta(kind, extra) {
410
+ return domainMeta("orchestration", kind, extra);
411
+ }
412
+ var decisionKeyOf = (d) => d.action;
413
+ var PipelineGraph = class extends import_graph3.Graph {
414
+ // -- task -----------------------------------------------------------------
415
+ /**
416
+ * Register a workflow task (`node` + auto-add). String deps resolve via
417
+ * `this.resolve(path)`; Node deps via {@link Graph.nameOf} O(1) lookup.
418
+ *
419
+ * `run` receives `(data: readonly unknown[], ctx)` — the snapshot of latest
420
+ * values per dep (same shape as the old `DerivedFn` sugar).
421
+ */
422
+ task(name, run, opts = {}) {
423
+ const deps = (opts.deps ?? []).map((d) => this._resolveStep(d));
424
+ const step = (0, import_core4.node)(
425
+ deps,
426
+ (batchData, actions, ctx) => {
427
+ const data = batchData.map(
428
+ (batch4, i) => batch4 != null && batch4.length > 0 ? batch4.at(-1) : ctx.prevData[i]
429
+ );
430
+ const result = run(data, ctx);
431
+ if (result !== void 0 && result !== null) actions.emit(result);
432
+ },
433
+ {
434
+ name,
435
+ describeKind: "derived",
436
+ meta: meta("task", opts.meta)
437
+ }
438
+ );
439
+ this.add(step, { name });
440
+ return step;
441
+ }
442
+ // -- classify (n-way; replaces binary `branch`) --------------------------
443
+ classify(name, source, tagger, opts = {}) {
444
+ const src = this._resolveStep(source);
445
+ const step = (0, import_core4.node)(
446
+ [src],
447
+ (batchData, actions, ctx) => {
448
+ const data = batchData.map(
449
+ (batch4, i) => batch4 != null && batch4.length > 0 ? batch4.at(-1) : ctx.prevData[i]
450
+ );
451
+ const value = data[0];
452
+ try {
453
+ actions.emit({ tag: tagger(value), value });
454
+ } catch (error) {
455
+ actions.emit({ tag: "error", value, error });
456
+ }
457
+ },
458
+ {
459
+ name,
460
+ describeKind: "derived",
461
+ meta: meta("classify", opts.meta)
462
+ }
463
+ );
464
+ this.add(step, { name });
465
+ return step;
466
+ }
467
+ // -- combine (keyed-record fan-in; replaces positional `join`) -----------
468
+ combine(name, deps, opts = {}) {
469
+ const keys = Object.keys(deps);
470
+ const nodes = keys.map((k) => this._resolveStep(deps[k]));
471
+ const step = (0, import_core4.node)(
472
+ nodes,
473
+ (batchData, actions, ctx) => {
474
+ const values = batchData.map(
475
+ (batch4, i) => batch4 != null && batch4.length > 0 ? batch4.at(-1) : ctx.prevData[i]
476
+ );
477
+ const out = {};
478
+ for (let i = 0; i < keys.length; i++) {
479
+ out[keys[i]] = values[i];
480
+ }
481
+ actions.emit(out);
482
+ },
483
+ {
484
+ name,
485
+ describeKind: "derived",
486
+ meta: meta("combine", opts.meta)
487
+ }
488
+ );
489
+ this.add(step, { name });
490
+ return step;
491
+ }
492
+ // -- approvalGate ---------------------------------------------------------
493
+ approvalGate(name, source, opts = {}) {
494
+ const maxPending = opts.maxPending ?? 1e3;
495
+ if (maxPending < 1 && maxPending !== Number.POSITIVE_INFINITY) {
496
+ throw new RangeError("approvalGate: maxPending must be >= 1");
497
+ }
498
+ const startOpen = opts.startOpen ?? false;
499
+ let src;
500
+ if (typeof source === "string") {
501
+ src = this._resolveStep(source);
502
+ } else if (this.nameOf(source) !== void 0) {
503
+ src = source;
504
+ } else {
505
+ const proxy = (0, import_core4.node)(
506
+ [source],
507
+ (batchData, actions) => {
508
+ const batch0 = batchData[0];
509
+ if (batch0 == null || batch0.length === 0) return;
510
+ for (const v of batch0) actions.emit(v);
511
+ },
512
+ {
513
+ describeKind: "derived",
514
+ meta: (0, import_core4.factoryTag)("proxy")
515
+ }
516
+ );
517
+ this.add(proxy, { name: `${name}/source` });
518
+ src = proxy;
519
+ }
520
+ const internal = new import_graph3.Graph(`${name}-state`);
521
+ const pendingNode = internal.state("pending", [], {
522
+ equals: () => false
523
+ });
524
+ const isOpenNode = internal.state("isOpen", startOpen);
525
+ const countNode = internal.derived("count", ["pending"], (batchData, ctx) => {
526
+ const data = batchData.map(
527
+ (batch4, i) => batch4 != null && batch4.length > 0 ? batch4.at(-1) : ctx.prevData[i]
528
+ );
529
+ return [data[0].length];
530
+ });
531
+ const droppedCountNode = internal.state("droppedCount", 0);
532
+ const decisions = createAuditLog({
533
+ name: "decisions",
534
+ retainedLimit: 1024,
535
+ graph: internal
536
+ });
537
+ this.mount(`${name}-state`, internal);
538
+ let queue = [];
539
+ let torn = false;
540
+ let latched = false;
541
+ let latestIsOpen = startOpen;
542
+ const isOpenUnsub = isOpenNode.subscribe((msgs) => {
543
+ for (const m of msgs) {
544
+ if (m[0] === import_core4.DATA) latestIsOpen = m[1];
545
+ }
546
+ });
547
+ this.addDisposer(isOpenUnsub);
548
+ function syncPending() {
549
+ pendingNode.emit([...queue]);
550
+ }
551
+ function recordDecision(action, items, unflushed) {
552
+ decisions.append({
553
+ action,
554
+ t_ns: (0, import_core4.wallClockNs)(),
555
+ ...items !== void 0 ? { items, count: items.length } : {},
556
+ ...unflushed !== void 0 ? { unflushed } : {},
557
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
558
+ });
559
+ }
560
+ function enqueue(value) {
561
+ queue.push(value);
562
+ if (queue.length > maxPending) {
563
+ const dropped = queue.shift();
564
+ droppedCountNode.emit(droppedCountNode.cache + 1);
565
+ recordDecision("drop", [dropped]);
566
+ }
567
+ syncPending();
568
+ }
569
+ function dequeue(n) {
570
+ const items = queue.splice(0, n);
571
+ syncPending();
572
+ return items;
573
+ }
574
+ const output = (0, import_core4.node)(
575
+ [src],
576
+ (batchData, actions, ctx) => {
577
+ const terminal = ctx.terminalDeps[0];
578
+ if (terminal !== void 0) {
579
+ torn = true;
580
+ const unflushed = queue.length;
581
+ queue = [];
582
+ syncPending();
583
+ recordDecision("teardown", void 0, unflushed);
584
+ actions.down(terminal === true ? [[import_core4.COMPLETE]] : [[import_core4.ERROR, terminal]]);
585
+ return;
586
+ }
587
+ const batch0 = batchData[0];
588
+ if (batch0 == null || batch0.length === 0) {
589
+ actions.down([[import_core4.RESOLVED]]);
590
+ return;
591
+ }
592
+ for (const v of batch0) {
593
+ if (latestIsOpen) {
594
+ actions.emit(v);
595
+ } else {
596
+ enqueue(v);
597
+ actions.down([[import_core4.RESOLVED]]);
598
+ }
599
+ }
600
+ },
601
+ {
602
+ name,
603
+ describeKind: "derived",
604
+ meta: meta("approval_gate", opts.meta)
605
+ }
606
+ );
607
+ this.add(output, { name });
608
+ if (opts.approver != null) {
609
+ const initialApproved = Boolean(opts.approver.cache);
610
+ if (initialApproved) {
611
+ isOpenNode.emit(true);
612
+ latestIsOpen = true;
613
+ if (opts.onceOnly) latched = true;
614
+ }
615
+ const approverSub = opts.approver.subscribe((msgs) => {
616
+ for (const m of msgs) {
617
+ if (m[0] !== import_core4.DATA) continue;
618
+ const truthy = Boolean(m[1]);
619
+ if (truthy && !latestIsOpen) {
620
+ if (opts.onceOnly) {
621
+ if (latched) continue;
622
+ latched = true;
623
+ }
624
+ (0, import_core4.batch)(() => {
625
+ isOpenNode.emit(true);
626
+ const items = dequeue(queue.length);
627
+ recordDecision("open", items);
628
+ for (const item of items) {
629
+ if (torn) break;
630
+ output.emit(item);
631
+ }
632
+ });
633
+ } else if (!truthy && latestIsOpen) {
634
+ if (opts.onceOnly && latched) continue;
635
+ (0, import_core4.batch)(() => {
636
+ isOpenNode.emit(false);
637
+ recordDecision("close");
638
+ });
639
+ }
640
+ }
641
+ });
642
+ this.addDisposer(approverSub);
643
+ }
644
+ const guardTorn = (method) => {
645
+ if (torn) throw new Error(`approvalGate: ${method}() called after the gate was torn down`);
646
+ };
647
+ const approveImpl = (count = 1) => {
648
+ guardTorn("approve");
649
+ const items = dequeue(count);
650
+ for (const item of items) {
651
+ if (torn) break;
652
+ output.emit(item);
653
+ }
654
+ };
655
+ const rejectImpl = (count = 1) => {
656
+ guardTorn("reject");
657
+ dequeue(count);
658
+ };
659
+ const modifyImpl = (fn, count = 1) => {
660
+ guardTorn("modify");
661
+ const snapshot = [...queue];
662
+ const items = dequeue(count);
663
+ for (let i = 0; i < items.length; i++) {
664
+ if (torn) break;
665
+ output.emit(fn(items[i], i, snapshot));
666
+ }
667
+ };
668
+ const openImpl = () => {
669
+ guardTorn("open");
670
+ isOpenNode.emit(true);
671
+ const items = dequeue(queue.length);
672
+ for (const item of items) {
673
+ if (torn) break;
674
+ output.emit(item);
675
+ }
676
+ };
677
+ const closeImpl = () => {
678
+ guardTorn("close");
679
+ if (opts.onceOnly && latched) return;
680
+ isOpenNode.emit(false);
681
+ };
682
+ const approve = mutate(approveImpl, {
683
+ frame: "transactional",
684
+ log: decisions,
685
+ freeze: false,
686
+ onSuccessRecord: (args, _r, m) => ({
687
+ action: "approve",
688
+ count: args[0] ?? 1,
689
+ t_ns: m.t_ns,
690
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
691
+ }),
692
+ onFailureRecord: (_a, _e, m) => ({
693
+ action: "drop",
694
+ t_ns: m.t_ns,
695
+ errorType: m.errorType,
696
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
697
+ })
698
+ });
699
+ const reject = mutate(rejectImpl, {
700
+ frame: "transactional",
701
+ log: decisions,
702
+ freeze: false,
703
+ onSuccessRecord: (args, _r, m) => ({
704
+ action: "reject",
705
+ count: args[0] ?? 1,
706
+ t_ns: m.t_ns,
707
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
708
+ }),
709
+ onFailureRecord: (_a, _e, m) => ({
710
+ action: "drop",
711
+ t_ns: m.t_ns,
712
+ errorType: m.errorType,
713
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
714
+ })
715
+ });
716
+ const modify = mutate(modifyImpl, {
717
+ frame: "transactional",
718
+ log: decisions,
719
+ freeze: false,
720
+ onSuccessRecord: (args, _r, m) => ({
721
+ action: "modify",
722
+ count: args[1] ?? 1,
723
+ t_ns: m.t_ns,
724
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
725
+ }),
726
+ onFailureRecord: (_a, _e, m) => ({
727
+ action: "drop",
728
+ t_ns: m.t_ns,
729
+ errorType: m.errorType,
730
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
731
+ })
732
+ });
733
+ const open = mutate(openImpl, {
734
+ frame: "transactional",
735
+ log: decisions,
736
+ freeze: false,
737
+ onSuccessRecord: (_a, _r, m) => ({
738
+ action: "open",
739
+ t_ns: m.t_ns,
740
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
741
+ }),
742
+ onFailureRecord: (_a, _e, m) => ({
743
+ action: "drop",
744
+ t_ns: m.t_ns,
745
+ errorType: m.errorType,
746
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
747
+ })
748
+ });
749
+ const close = mutate(closeImpl, {
750
+ frame: "transactional",
751
+ log: decisions,
752
+ freeze: false,
753
+ onSuccessRecord: (_a, _r, m) => ({
754
+ action: "close",
755
+ t_ns: m.t_ns,
756
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
757
+ }),
758
+ onFailureRecord: (_a, _e, m) => ({
759
+ action: "drop",
760
+ t_ns: m.t_ns,
761
+ errorType: m.errorType,
762
+ ...opts.handlerVersion != null ? { handlerVersion: opts.handlerVersion } : {}
763
+ })
764
+ });
765
+ this.addDisposer(countNode.subscribe(() => void 0));
766
+ const controller = {
767
+ output,
768
+ pending: pendingNode,
769
+ count: countNode,
770
+ isOpen: isOpenNode,
771
+ droppedCount: droppedCountNode,
772
+ decisions,
773
+ audit: decisions,
774
+ approve,
775
+ reject,
776
+ modify,
777
+ open,
778
+ close
779
+ };
780
+ return controller;
781
+ }
782
+ // -- approval (thin alias over approvalGate({ approver, maxPending: 1 })) -
783
+ /**
784
+ * Reactive approval step: passes items through when `approver` is truthy;
785
+ * holds at most one pending item (maxPending: 1) when falsy. A thin alias
786
+ * over `approvalGate({ approver, maxPending: 1 })` — use `approvalGate()`
787
+ * directly for finer control (maxPending, onceOnly, manual approve/reject).
788
+ */
789
+ approval(name, source, approver, opts = {}) {
790
+ return this.approvalGate(name, source, { ...opts, approver, maxPending: 1 });
791
+ }
792
+ // -- catch (renamed onFailure; dep-channel intercept) -------------------
793
+ catch(name, source, recover, opts = {}) {
794
+ const src = this._resolveStep(source);
795
+ const mode = opts.on ?? "errored";
796
+ const step = (0, import_core4.node)(
797
+ [src],
798
+ (batchData, actions, ctx) => {
799
+ const terminal = ctx.terminalDeps[0];
800
+ if (terminal !== void 0) {
801
+ const cause = terminal === true ? { kind: "completed" } : { kind: "errored", error: terminal };
802
+ if (mode === "terminal" || mode === cause.kind) {
803
+ actions.emit(recover(cause, actions));
804
+ return;
805
+ }
806
+ actions.down(cause.kind === "completed" ? [[import_core4.COMPLETE]] : [[import_core4.ERROR, cause.error]]);
807
+ return;
808
+ }
809
+ const batch0 = batchData[0];
810
+ if (batch0 == null || batch0.length === 0) {
811
+ actions.down([[import_core4.RESOLVED]]);
812
+ return;
813
+ }
814
+ for (const v of batch0) actions.emit(v);
815
+ },
816
+ {
817
+ name,
818
+ describeKind: "derived",
819
+ completeWhenDepsComplete: opts.completeWhenDepsComplete ?? !(mode === "completed" || mode === "terminal"),
820
+ errorWhenDepsError: !(mode === "errored" || mode === "terminal"),
821
+ meta: meta("catch", opts.meta)
822
+ }
823
+ );
824
+ this.add(step, { name });
825
+ return step;
826
+ }
827
+ // -- internals ----------------------------------------------------------
828
+ _resolveStep(dep) {
829
+ if (typeof dep === "string") return this.resolve(dep);
830
+ const existing = this.nameOf(dep);
831
+ if (existing === void 0) {
832
+ throw new Error(
833
+ `PipelineGraph "${this.name}": Node dep is not registered. Pass a string path or call graph.add(node) first.`
834
+ );
835
+ }
836
+ return dep;
837
+ }
838
+ };
839
+ function pipelineGraph(name, opts) {
840
+ const g = new PipelineGraph(name, opts);
841
+ const { factory: _f, factoryArgs: _fa, ...tagArgs } = opts ?? {};
842
+ g.tagFactory("pipelineGraph", (0, import_core4.placeholderArgs)(tagArgs));
843
+ return g;
844
+ }
845
+
846
+ // src/utils/orchestration/tracker.ts
847
+ function tracker(opts) {
848
+ const { hub, topicName, name, from } = opts;
849
+ const effectiveTopicName = topicName ?? DEFERRED_TOPIC;
850
+ const effectiveName = name ?? "tracker";
851
+ const topicGraph = hub.topic(effectiveTopicName);
852
+ const sub = subscription(effectiveName, topicGraph, {
853
+ ...from != null && { from }
854
+ });
855
+ const total = sub.derived(
856
+ "tracker-total",
857
+ [topicGraph.events],
858
+ (data, ctx) => {
859
+ const b0 = data[0];
860
+ const arr = b0 != null && b0.length > 0 ? b0.at(-1) : ctx.prevData[0] ?? [];
861
+ return [arr.length];
862
+ },
863
+ { keepAlive: true }
864
+ );
865
+ return {
866
+ topic: topicGraph,
867
+ subscription: sub,
868
+ pending: sub.available,
869
+ cursor: sub.cursor,
870
+ total,
871
+ add: (item) => topicGraph.publish(item),
872
+ ack: (n) => sub.ack(n ?? 1),
873
+ pullAndAck: (limit) => sub.pullAndAck(limit)
874
+ };
875
+ }
876
+ //# sourceMappingURL=index.cjs.map