@graphrefly/graphrefly 0.37.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/dist/budget-gate-CmmVtasH.d.ts +115 -0
  2. package/dist/budget-gate-DiP_nK0n.d.cts +115 -0
  3. package/dist/{cascading-BsJ4GbnS.d.ts → cascading-BzuxW0_w.d.cts} +2 -2
  4. package/dist/{cascading-B25wxpRa.d.cts → cascading-g2_rhhaM.d.ts} +2 -2
  5. package/dist/chunk-35JTVPOX.js +1 -0
  6. package/dist/chunk-3G5U5QNE.js +5 -0
  7. package/dist/chunk-4I45FVQS.js +1 -0
  8. package/dist/chunk-5LK7XMEV.js +1 -0
  9. package/dist/chunk-5XRI6RM3.js +1 -0
  10. package/dist/chunk-73PBQNST.js +1 -0
  11. package/dist/chunk-7JRF5YEK.js +3 -0
  12. package/dist/{chunk-YVYSO5CW.js → chunk-7NZMZJMW.js} +1 -1
  13. package/dist/chunk-7QFRK3N3.js +84 -0
  14. package/dist/{chunk-K6ZFJ473.js → chunk-7SD73DS6.js} +1 -1
  15. package/dist/{chunk-LOQRPP4Y.js → chunk-A6ZSKGUG.js} +1 -1
  16. package/dist/{chunk-KUVDFOJH.js → chunk-AU7YTQX7.js} +1 -1
  17. package/dist/chunk-C72GO4IZ.js +1 -0
  18. package/dist/{chunk-Q7EUZ6NN.js → chunk-CGDMTXSY.js} +1 -1
  19. package/dist/chunk-D27JNOLZ.js +1 -0
  20. package/dist/chunk-D47YVDR5.js +1 -0
  21. package/dist/chunk-EWF7KCDJ.js +61 -0
  22. package/dist/{chunk-PCD2MU7X.js → chunk-GEAO3TL3.js} +1 -1
  23. package/dist/chunk-GX5LSSRE.js +1 -0
  24. package/dist/{chunk-2C4NESZE.js → chunk-HAWKGIXM.js} +1 -1
  25. package/dist/chunk-HX3EGQ5Z.js +1 -0
  26. package/dist/{chunk-MQZWA3DF.js → chunk-IA7DUNGB.js} +1 -1
  27. package/dist/{chunk-MYFR67PY.js → chunk-INH6FS2G.js} +2 -2
  28. package/dist/chunk-INHC33EH.js +1 -0
  29. package/dist/chunk-IUB4NYI2.js +1 -0
  30. package/dist/{chunk-TFK4P4CX.js → chunk-JNMC2WJ6.js} +1 -1
  31. package/dist/{chunk-TLS7M7H4.js → chunk-KD4NHLMU.js} +1 -1
  32. package/dist/chunk-L6NSJVJZ.js +1 -0
  33. package/dist/chunk-L7WY6TZS.js +1 -0
  34. package/dist/chunk-LQNOXGET.js +1 -0
  35. package/dist/chunk-MC4UYY2X.js +1 -0
  36. package/dist/{chunk-U3COB5WU.js → chunk-N7UIBZCW.js} +1 -1
  37. package/dist/chunk-NQI2C36M.js +1 -0
  38. package/dist/chunk-R75BMDLA.js +1 -0
  39. package/dist/chunk-RF3QZP6D.js +1 -0
  40. package/dist/{chunk-MC5LZG3U.js → chunk-S2U57TFC.js} +1 -1
  41. package/dist/{chunk-QP5TH523.js → chunk-SC7BQDNP.js} +1 -1
  42. package/dist/{chunk-5CPPC75H.js → chunk-TFPZLQ5H.js} +1 -1
  43. package/dist/chunk-VJJLIEAL.js +1 -0
  44. package/dist/chunk-WHIZM6JV.js +1 -0
  45. package/dist/chunk-XEUANKBO.js +43 -0
  46. package/dist/chunk-XQ55HO5N.js +1 -0
  47. package/dist/chunk-ZJ7SM3G2.js +1 -0
  48. package/dist/{chunk-T4U24DXX.js → chunk-ZOX3LBRV.js} +1 -1
  49. package/dist/compat/index.cjs +9 -13
  50. package/dist/compat/index.d.cts +16 -16
  51. package/dist/compat/index.d.ts +16 -16
  52. package/dist/compat/index.js +1 -1
  53. package/dist/compat/jotai/index.d.cts +2 -2
  54. package/dist/compat/jotai/index.d.ts +2 -2
  55. package/dist/compat/nanostores/index.d.cts +2 -2
  56. package/dist/compat/nanostores/index.d.ts +2 -2
  57. package/dist/compat/nestjs/index.cjs +8 -12
  58. package/dist/compat/nestjs/index.d.cts +8 -8
  59. package/dist/compat/nestjs/index.d.ts +8 -8
  60. package/dist/compat/nestjs/index.js +1 -1
  61. package/dist/compat/react/index.d.cts +2 -2
  62. package/dist/compat/react/index.d.ts +2 -2
  63. package/dist/compat/solid/index.d.cts +2 -2
  64. package/dist/compat/solid/index.d.ts +2 -2
  65. package/dist/compat/svelte/index.d.cts +2 -2
  66. package/dist/compat/svelte/index.d.ts +2 -2
  67. package/dist/compat/vue/index.d.cts +2 -2
  68. package/dist/compat/vue/index.d.ts +2 -2
  69. package/dist/compat/zustand/index.cjs +3 -7
  70. package/dist/compat/zustand/index.d.cts +4 -4
  71. package/dist/compat/zustand/index.d.ts +4 -4
  72. package/dist/compat/zustand/index.js +1 -1
  73. package/dist/{composite-_XckYx2e.d.cts → composite-CKd0e2vz.d.cts} +10 -3
  74. package/dist/{composite-CT_mApQD.d.ts → composite-DGatA-JK.d.ts} +10 -3
  75. package/dist/core/index.cjs +1 -1
  76. package/dist/core/index.d.cts +4 -4
  77. package/dist/core/index.d.ts +4 -4
  78. package/dist/core/index.js +1 -1
  79. package/dist/extra/browser.d.cts +1 -1
  80. package/dist/extra/browser.d.ts +1 -1
  81. package/dist/extra/index.cjs +17 -21
  82. package/dist/extra/index.d.cts +11 -9
  83. package/dist/extra/index.d.ts +11 -9
  84. package/dist/extra/index.js +1 -1
  85. package/dist/extra/node.cjs +2 -2
  86. package/dist/extra/node.d.cts +108 -2
  87. package/dist/extra/node.d.ts +108 -2
  88. package/dist/extra/node.js +2 -2
  89. package/dist/extra/operators.cjs +1 -1
  90. package/dist/extra/operators.d.cts +1 -1
  91. package/dist/extra/operators.d.ts +1 -1
  92. package/dist/extra/operators.js +1 -1
  93. package/dist/extra/reactive.cjs +1 -1
  94. package/dist/extra/reactive.d.cts +3 -3
  95. package/dist/extra/reactive.d.ts +3 -3
  96. package/dist/extra/reactive.js +1 -1
  97. package/dist/extra/render/index.cjs +5 -0
  98. package/dist/extra/render/index.d.cts +183 -0
  99. package/dist/extra/render/index.d.ts +183 -0
  100. package/dist/extra/render/index.js +1 -0
  101. package/dist/extra/sources.cjs +1 -1
  102. package/dist/extra/sources.d.cts +1 -1
  103. package/dist/extra/sources.d.ts +1 -1
  104. package/dist/extra/sources.js +1 -1
  105. package/dist/extra/storage-browser.d.cts +1 -1
  106. package/dist/extra/storage-browser.d.ts +1 -1
  107. package/dist/extra/storage-tiers-browser.d.cts +76 -5
  108. package/dist/extra/storage-tiers-browser.d.ts +76 -5
  109. package/dist/extra/storage-tiers-node.d.cts +137 -13
  110. package/dist/extra/storage-tiers-node.d.ts +137 -13
  111. package/dist/extra/storage-tiers.d.cts +151 -23
  112. package/dist/extra/storage-tiers.d.ts +151 -23
  113. package/dist/{fallback-axI2cXwt.d.cts → fallback-8JYU8tlT.d.cts} +1 -1
  114. package/dist/{fallback-DuEXfA4F.d.ts → fallback-CMZl39L5.d.ts} +1 -1
  115. package/dist/graph/index.cjs +7 -7
  116. package/dist/graph/index.d.cts +5 -5
  117. package/dist/graph/index.d.ts +5 -5
  118. package/dist/graph/index.js +1 -1
  119. package/dist/{graph-YQXDndFy.d.ts → graph-30XSgtVX.d.ts} +287 -104
  120. package/dist/{graph-CaNXUc3c.d.cts → graph-BUwMAxJI.d.cts} +287 -104
  121. package/dist/{index-CIcu6fIR.d.ts → index-2n8Eai6M.d.ts} +1 -1
  122. package/dist/{index-BmLkcDlj.d.ts → index-89FczVZ_.d.ts} +47 -71
  123. package/dist/{index-Ci358GSC.d.cts → index-8R1vzNOx.d.cts} +9 -9
  124. package/dist/{index-CDvC1m5p.d.ts → index-B2RUoIUz.d.ts} +1 -1
  125. package/dist/{index-DuhOdNyg.d.ts → index-B41Asm7D.d.ts} +10 -8
  126. package/dist/{index-CKcnuQ2c.d.ts → index-B9fmw5n2.d.ts} +4 -6
  127. package/dist/{index-0qOD-421.d.ts → index-BAlaVimV.d.ts} +9 -9
  128. package/dist/{index-Ae6L8liv.d.ts → index-BC9VybQs.d.ts} +41 -48
  129. package/dist/{index-CUTHDZ7Q.d.ts → index-BEHmxORq.d.ts} +11 -11
  130. package/dist/{index-C_qi0WlF.d.cts → index-BJ26eEjs.d.cts} +26 -19
  131. package/dist/{index-BiomL7AW.d.ts → index-BJSZxSFX.d.ts} +1 -1
  132. package/dist/{index-DCAuN9u5.d.cts → index-BKMdnYnk.d.ts} +75 -39
  133. package/dist/{index-DfAo9WKr.d.ts → index-BM9szD8n.d.cts} +14 -6
  134. package/dist/{index-CajEOoAN.d.ts → index-BUPVld1w.d.ts} +2 -2
  135. package/dist/{index-C-pFD_FV.d.ts → index-BXd6OMEy.d.ts} +3 -3
  136. package/dist/index-BhUaMYm_.d.ts +113 -0
  137. package/dist/{index-DAKm44My.d.cts → index-BndG0cpK.d.cts} +3 -3
  138. package/dist/{index-Bpzw8hx3.d.ts → index-Br3WnqEn.d.ts} +84 -9
  139. package/dist/{index-D6tRNEKz.d.cts → index-BskfDoZ_.d.ts} +14 -6
  140. package/dist/{index-9mbs_PIG.d.ts → index-C19qqa38.d.ts} +4 -4
  141. package/dist/{index-fHKHdAso.d.ts → index-C7VV_qOs.d.ts} +4 -4
  142. package/dist/{index-CLPQyYY5.d.cts → index-CIRG8Hxp.d.cts} +11 -11
  143. package/dist/{index-B3D_z0Z6.d.cts → index-CL7oilfm.d.cts} +1 -1
  144. package/dist/{index-BOfHwQc1.d.ts → index-CPhBvRJU.d.ts} +1 -1
  145. package/dist/{index-B9qJmmv3.d.cts → index-CWHtYmSh.d.cts} +1 -1
  146. package/dist/{index-D_d1erkR.d.ts → index-Cey6VTnX.d.ts} +8 -5
  147. package/dist/{resilience-BWP2c7Af.d.cts → index-CmqiJZKM.d.ts} +141 -23
  148. package/dist/{index-JYtN9uqM.d.ts → index-CoM4rzyB.d.ts} +1 -1
  149. package/dist/{index-DTYIRT_v.d.cts → index-CpLpJb6A.d.cts} +8 -5
  150. package/dist/{index-BjWZARLy.d.ts → index-Ctb7_2sG.d.ts} +1 -1
  151. package/dist/index-CusEP3Sv.d.ts +210 -0
  152. package/dist/{resilience-Bys63Cpd.d.ts → index-CwP_KAMS.d.cts} +141 -23
  153. package/dist/{index-BFuVcqL8.d.cts → index-D3ayz3hy.d.cts} +1 -1
  154. package/dist/{index-CrpjECS6.d.cts → index-DCbE8fFM.d.cts} +3 -3
  155. package/dist/{index-D_DThl_J.d.cts → index-DIHcMLr6.d.cts} +1 -1
  156. package/dist/index-DINuaZlJ.d.cts +210 -0
  157. package/dist/{index-9xhIaM-w.d.cts → index-DOBLxOti.d.cts} +1 -1
  158. package/dist/index-DQUVq1_d.d.ts +374 -0
  159. package/dist/{index-B1IcU--K.d.cts → index-DTtBpuQy.d.cts} +4 -6
  160. package/dist/{index-D_QQ_dTD.d.cts → index-DYTBbF8T.d.cts} +1 -1
  161. package/dist/{index-DqtXA3yX.d.cts → index-DlgHqQxW.d.cts} +84 -9
  162. package/dist/{index-D1E1tqHT.d.ts → index-DlrWu9Hs.d.cts} +75 -39
  163. package/dist/{index-DcWbx58m.d.cts → index-DoYc8BWK.d.cts} +41 -48
  164. package/dist/{index-D0ZxFXYl.d.ts → index-DszPlZzK.d.ts} +3 -3
  165. package/dist/{index-BECJ8M0T.d.cts → index-DyM4tFAe.d.cts} +10 -8
  166. package/dist/{index-D11pGlaI.d.cts → index-FVoPvhAu.d.cts} +4 -4
  167. package/dist/{index-BwtIbzSV.d.cts → index-H_I66pav.d.cts} +2 -2
  168. package/dist/{index-e1m3ZHgc.d.cts → index-IwFqHxCs.d.cts} +2 -2
  169. package/dist/index-K-vl_c6A.d.cts +113 -0
  170. package/dist/{index-C4N-dg5U.d.cts → index-KlZ_ZUip.d.cts} +2 -2
  171. package/dist/index-L8XI8Zql.d.cts +374 -0
  172. package/dist/{index-D8IyqHvT.d.cts → index-MxYuWOrf.d.cts} +6 -4
  173. package/dist/{index-CpZKtdMw.d.cts → index-PgwvGWa1.d.cts} +1 -1
  174. package/dist/{index-B46GWgk3.d.ts → index-PlJ3MraE.d.ts} +1 -1
  175. package/dist/{index-DPqR3wdW.d.ts → index-PqbnoScQ.d.ts} +3 -3
  176. package/dist/{index-CU3z8Cel.d.cts → index-PsVHpPwP.d.cts} +3 -3
  177. package/dist/{index-C0tga1_x.d.ts → index-WyFKER-c.d.ts} +2 -2
  178. package/dist/{index-B5UR87KG.d.ts → index-eaQuGJnv.d.ts} +6 -4
  179. package/dist/{index-CzIWlnPp.d.ts → index-iTX5IqSP.d.ts} +140 -9
  180. package/dist/{index-CRycrNfn.d.ts → index-jKLph6cu.d.ts} +2 -2
  181. package/dist/{index-BhLA9feT.d.ts → index-jr6PuSBt.d.ts} +26 -19
  182. package/dist/{index-4IwO4mH2.d.cts → index-mNwgxC21.d.cts} +140 -9
  183. package/dist/{index-CkN8CZlT.d.cts → index-pVDQcbar.d.cts} +47 -71
  184. package/dist/{index-D6pwWiOc.d.cts → index-xZYcDqFH.d.cts} +4 -4
  185. package/dist/{index-8OxXae3g.d.ts → index-yLt-aPMp.d.ts} +1 -1
  186. package/dist/{index-CqSJ25A9.d.cts → index-z8WFPVI8.d.cts} +1 -1
  187. package/dist/index.cjs +64 -60
  188. package/dist/index.d.cts +48 -47
  189. package/dist/index.d.ts +48 -47
  190. package/dist/index.js +1 -1
  191. package/dist/meta-Ct9nqQS5.d.cts +102 -0
  192. package/dist/meta-D8OyedKp.d.ts +102 -0
  193. package/dist/{node-fSc-hCv8.d.cts → node-BYInONRr.d.cts} +3 -3
  194. package/dist/{node-fSc-hCv8.d.ts → node-BYInONRr.d.ts} +3 -3
  195. package/dist/{observable-Cqty11jG.d.cts → observable-DMIlYJV1.d.cts} +1 -1
  196. package/dist/{observable-EAV_rNfM.d.ts → observable-DO8DDEzv.d.ts} +1 -1
  197. package/dist/patterns/ai/browser.cjs +5 -5
  198. package/dist/patterns/ai/browser.d.cts +4 -4
  199. package/dist/patterns/ai/browser.d.ts +4 -4
  200. package/dist/patterns/ai/browser.js +1 -1
  201. package/dist/patterns/ai/index.cjs +17 -21
  202. package/dist/patterns/ai/index.d.cts +17 -17
  203. package/dist/patterns/ai/index.d.ts +17 -17
  204. package/dist/patterns/ai/index.js +1 -1
  205. package/dist/patterns/ai/node.cjs +1 -1
  206. package/dist/patterns/ai/node.d.cts +4 -4
  207. package/dist/patterns/ai/node.d.ts +4 -4
  208. package/dist/patterns/ai/node.js +1 -1
  209. package/dist/patterns/audit/index.cjs +3 -7
  210. package/dist/patterns/audit/index.d.cts +6 -6
  211. package/dist/patterns/audit/index.d.ts +6 -6
  212. package/dist/patterns/audit/index.js +1 -1
  213. package/dist/patterns/cqrs/index.cjs +3 -7
  214. package/dist/patterns/cqrs/index.d.cts +6 -6
  215. package/dist/patterns/cqrs/index.d.ts +6 -6
  216. package/dist/patterns/cqrs/index.js +1 -1
  217. package/dist/patterns/demo-shell/index.cjs +5 -8
  218. package/dist/patterns/demo-shell/index.d.cts +5 -5
  219. package/dist/patterns/demo-shell/index.d.ts +5 -5
  220. package/dist/patterns/demo-shell/index.js +1 -1
  221. package/dist/patterns/domain-templates/index.cjs +3 -7
  222. package/dist/patterns/domain-templates/index.d.cts +4 -4
  223. package/dist/patterns/domain-templates/index.d.ts +4 -4
  224. package/dist/patterns/domain-templates/index.js +1 -1
  225. package/dist/patterns/graphspec/index.cjs +38 -38
  226. package/dist/patterns/graphspec/index.d.cts +5 -5
  227. package/dist/patterns/graphspec/index.d.ts +5 -5
  228. package/dist/patterns/graphspec/index.js +1 -1
  229. package/dist/patterns/guarded-execution/index.cjs +3 -7
  230. package/dist/patterns/guarded-execution/index.d.cts +7 -7
  231. package/dist/patterns/guarded-execution/index.d.ts +7 -7
  232. package/dist/patterns/guarded-execution/index.js +1 -1
  233. package/dist/patterns/harness/index.cjs +8 -12
  234. package/dist/patterns/harness/index.d.cts +12 -12
  235. package/dist/patterns/harness/index.d.ts +12 -12
  236. package/dist/patterns/harness/index.js +1 -1
  237. package/dist/patterns/job-queue/index.cjs +3 -7
  238. package/dist/patterns/job-queue/index.d.cts +6 -6
  239. package/dist/patterns/job-queue/index.d.ts +6 -6
  240. package/dist/patterns/job-queue/index.js +1 -1
  241. package/dist/patterns/lens/index.cjs +3 -7
  242. package/dist/patterns/lens/index.d.cts +6 -6
  243. package/dist/patterns/lens/index.d.ts +6 -6
  244. package/dist/patterns/lens/index.js +1 -1
  245. package/dist/patterns/memory/index.cjs +3 -7
  246. package/dist/patterns/memory/index.d.cts +7 -5
  247. package/dist/patterns/memory/index.d.ts +7 -5
  248. package/dist/patterns/memory/index.js +1 -1
  249. package/dist/patterns/messaging/index.cjs +3 -7
  250. package/dist/patterns/messaging/index.d.cts +5 -5
  251. package/dist/patterns/messaging/index.d.ts +5 -5
  252. package/dist/patterns/messaging/index.js +1 -1
  253. package/dist/patterns/orchestration/index.cjs +3 -7
  254. package/dist/patterns/orchestration/index.d.cts +8 -8
  255. package/dist/patterns/orchestration/index.d.ts +8 -8
  256. package/dist/patterns/orchestration/index.js +1 -1
  257. package/dist/patterns/process/index.cjs +1 -1
  258. package/dist/patterns/process/index.d.cts +7 -7
  259. package/dist/patterns/process/index.d.ts +7 -7
  260. package/dist/patterns/process/index.js +1 -1
  261. package/dist/patterns/reactive-layout/index.cjs +4 -8
  262. package/dist/patterns/reactive-layout/index.d.cts +5 -5
  263. package/dist/patterns/reactive-layout/index.d.ts +5 -5
  264. package/dist/patterns/reactive-layout/index.js +1 -1
  265. package/dist/patterns/reduction/index.cjs +3 -7
  266. package/dist/patterns/reduction/index.d.cts +4 -4
  267. package/dist/patterns/reduction/index.d.ts +4 -4
  268. package/dist/patterns/reduction/index.js +1 -1
  269. package/dist/patterns/refine-loop/index.cjs +5 -9
  270. package/dist/patterns/refine-loop/index.d.cts +6 -6
  271. package/dist/patterns/refine-loop/index.d.ts +6 -6
  272. package/dist/patterns/refine-loop/index.js +1 -1
  273. package/dist/patterns/resilient-pipeline/index.cjs +1 -1
  274. package/dist/patterns/resilient-pipeline/index.d.cts +4 -8
  275. package/dist/patterns/resilient-pipeline/index.d.ts +4 -8
  276. package/dist/patterns/resilient-pipeline/index.js +1 -1
  277. package/dist/patterns/surface/index.cjs +13 -17
  278. package/dist/patterns/surface/index.d.cts +6 -6
  279. package/dist/patterns/surface/index.d.ts +6 -6
  280. package/dist/patterns/surface/index.js +1 -1
  281. package/dist/{pipeline-graph-BrrYGjuZ.d.cts → pipeline-graph-BQPr2Lqs.d.cts} +34 -17
  282. package/dist/{pipeline-graph-DX2Twdj-.d.ts → pipeline-graph-D8vKcO_p.d.ts} +34 -17
  283. package/dist/{reactive-layout-DrGjuwyC.d.cts → reactive-layout-8CSc0tiA.d.cts} +2 -2
  284. package/dist/{reactive-layout-BDdngW56.d.ts → reactive-layout-DkTXxtSy.d.ts} +2 -2
  285. package/dist/{reactive-log-jirQsxMY.d.ts → reactive-log-BlAsPLl2.d.ts} +30 -3
  286. package/dist/{reactive-log-ScpWyqny.d.cts → reactive-log-_zeEnB9H.d.cts} +30 -3
  287. package/dist/{reactive-map-DmgeADH8.d.cts → reactive-map-B2qfD3hb.d.cts} +1 -1
  288. package/dist/{reactive-map-CHyeCf4D.d.ts → reactive-map-jFIsE6Kt.d.ts} +1 -1
  289. package/dist/resilience-HTF2LBRS.js +1 -0
  290. package/dist/{sugar-D13E2M_z.d.ts → sugar-BhfjgetH.d.ts} +1 -1
  291. package/dist/{sugar-DgaGJcI6.d.cts → sugar-DzePN5-g.d.cts} +1 -1
  292. package/dist/{topology-tree-BkhmMg2a.d.cts → topology-tree-B5Ngw3j0.d.cts} +1 -1
  293. package/dist/{topology-tree-BI665P0L.d.ts → topology-tree-BtvbgMXJ.d.ts} +1 -1
  294. package/dist/{types-BMSGPlpO.d.cts → types-1Dhoi7HM.d.cts} +1 -1
  295. package/dist/{types-CidcBDuk.d.ts → types-39jk0kaV.d.ts} +1 -1
  296. package/package.json +11 -1
  297. package/dist/chunk-4EATTNAE.js +0 -1
  298. package/dist/chunk-533RQFF6.js +0 -1
  299. package/dist/chunk-6SVKZ7VI.js +0 -1
  300. package/dist/chunk-A5HZZYRK.js +0 -1
  301. package/dist/chunk-B4L5X2QO.js +0 -7
  302. package/dist/chunk-C5CBVOCB.js +0 -1
  303. package/dist/chunk-CZIQ6JCE.js +0 -1
  304. package/dist/chunk-FJ6IEMOS.js +0 -1
  305. package/dist/chunk-FMI4CWFL.js +0 -1
  306. package/dist/chunk-G6Q3DUMJ.js +0 -1
  307. package/dist/chunk-GDDPCDLG.js +0 -1
  308. package/dist/chunk-GFOT6UBB.js +0 -1
  309. package/dist/chunk-JJTF75VS.js +0 -1
  310. package/dist/chunk-K2WYIVHM.js +0 -1
  311. package/dist/chunk-KTWBUJO5.js +0 -61
  312. package/dist/chunk-M27MVZCP.js +0 -1
  313. package/dist/chunk-NKKUUKPD.js +0 -43
  314. package/dist/chunk-O32GJOUJ.js +0 -1
  315. package/dist/chunk-QKBCTKH7.js +0 -1
  316. package/dist/chunk-QWVQIL3T.js +0 -1
  317. package/dist/chunk-UODQF4EY.js +0 -1
  318. package/dist/chunk-WGST56ZH.js +0 -80
  319. package/dist/chunk-WSLN4JFO.js +0 -1
  320. package/dist/chunk-XIJKEXWR.js +0 -1
  321. package/dist/imperative-audit-ahAE65a9.d.cts +0 -28
  322. package/dist/imperative-audit-ahAE65a9.d.ts +0 -28
  323. package/dist/index-BCq12BqB.d.ts +0 -139
  324. package/dist/index-BokynmA4.d.cts +0 -186
  325. package/dist/index-DXz9uwcs.d.ts +0 -186
  326. package/dist/index-DbWwMWiB.d.cts +0 -139
  327. package/dist/meta-BGO6C7K9.d.cts +0 -41
  328. package/dist/meta-CC6EPdpK.d.ts +0 -41
  329. package/dist/resilience-OBU472D2.js +0 -1
@@ -1,80 +0,0 @@
1
- import{b as z}from"./chunk-XIJKEXWR.js";import{g as Y,j as J}from"./chunk-B4L5X2QO.js";import{E as L,F as T,G as D,H as P}from"./chunk-LYCLF26R.js";import{b as Z}from"./chunk-QYADASLV.js";var pe={};Z(pe,{compileSpec:()=>se,decompileGraph:()=>ae,extractFnFactory:()=>V,extractSourceFactory:()=>B,generateCatalogPrompt:()=>K,isRichFnEntry:()=>M,isRichSourceEntry:()=>W,llmCompose:()=>ce,llmRefine:()=>X,specDiff:()=>ie,validateSpec:()=>A,validateSpecAgainstCatalog:()=>q});function M(i){return typeof i=="object"&&i!==null&&"factory"in i}function W(i){return typeof i=="object"&&i!==null&&"factory"in i}function V(i){return M(i)?i.factory:i}function B(i){return W(i)?i.factory:i}function K(i){let n=[];if(i.fns){let o=new Map;for(let[r,d]of Object.entries(i.fns)){let p=M(d)?d.tags?.[0]??"Other":"Other";o.has(p)||o.set(p,[]),o.get(p).push(ee(r,d))}for(let[r,d]of o)n.push(`${r}:
2
- ${d.join(`
3
- `)}`)}if(i.sources){let o=[];for(let[r,d]of Object.entries(i.sources))o.push(te(r,d));o.length>0&&n.push(`Sources:
4
- ${o.join(`
5
- `)}`)}return n.join(`
6
-
7
- `)}function ee(i,n){if(!M(n))return`- ${i}`;let o=`- ${i}: ${n.description}`;if(n.configSchema){let r=Object.entries(n.configSchema).map(([d,p])=>{let l=`${d}: ${p.type}`;return p.enum&&(l+=` (${p.enum.join("|")})`),p.required===!1&&(l+="?"),l});o+=`. Config: { ${r.join(", ")} }`}return o}function te(i,n){if(!W(n))return`- ${i}`;let o=`- ${i}: ${n.description}`;if(n.configSchema){let r=Object.entries(n.configSchema).map(([d,p])=>{let l=`${d}: ${p.type}`;return p.required===!1&&(l+="?"),l});o+=`. Config: { ${r.join(", ")} }`}return o}function q(i,n){let o=[],r=new Set(Object.keys(n.fns??{})),d=new Set(Object.keys(n.sources??{}));for(let[p,l]of Object.entries(i.nodes)){if(l.type==="template")continue;let s=l;if(s.fn&&r.size>0&&!r.has(s.fn))if(d.has(s.fn))o.push(`Node "${p}": fn "${s.fn}" is a source, not a function. Use it as a producer source instead, or use a function from: ${[...r].join(", ")}`);else{let c=I(s.fn,r);o.push(`Node "${p}": fn "${s.fn}" not found in catalog`+(c?`. Did you mean "${c}"?`:""))}if(s.source&&d.size>0&&!d.has(s.source))if(r.has(s.source))o.push(`Node "${p}": source "${s.source}" is a function, not a source. Use it as fn instead, or use a source from: ${[...d].join(", ")}`);else{let c=I(s.source,d);o.push(`Node "${p}": source "${s.source}" not found in catalog`+(c?`. Did you mean "${c}"?`:""))}if(s.fn&&s.config&&n.fns?.[s.fn]){let c=n.fns[s.fn];if(M(c)&&c.configSchema){for(let[t,$]of Object.entries(c.configSchema))if($.required!==!1&&!(t in s.config)&&o.push(`Node "${p}": config missing required field "${t}"`),t in s.config&&$.enum){let O=s.config[t];$.enum.includes(O)||o.push(`Node "${p}": config.${t} = ${JSON.stringify(O)}, expected one of: ${$.enum.join(", ")}`)}}}}if(i.templates){for(let[p,l]of Object.entries(i.templates))for(let[s,c]of Object.entries(l.nodes))if(c.fn&&r.size>0&&!r.has(c.fn)){let t=I(c.fn,r);o.push(`Template "${p}" node "${s}": fn "${c.fn}" not found in catalog`+(t?`. Did you mean "${t}"?`:""))}}return{valid:o.length===0,errors:o,warnings:[]}}function I(i,n){let o=null,r=1/0,d=i.toLowerCase();for(let p of n){let l=ne(d,p.toLowerCase());l<r&&l<=Math.max(3,Math.floor(i.length/2))&&(r=l,o=p)}return o}function ne(i,n){let o=i.length,r=n.length,d=Array.from({length:o+1},(p,l)=>Array.from({length:r+1},(s,c)=>l===0?c:c===0?l:0));for(let p=1;p<=o;p++)for(let l=1;l<=r;l++)d[p][l]=i[p-1]===n[l-1]?d[p-1][l-1]:1+Math.min(d[p-1][l],d[p][l-1],d[p-1][l-1]);return d[o][r]}var U=new Set(["state","producer","derived","effect","operator","template"]),oe=new Set(["state","producer","derived","effect","operator"]);function A(i){let n=[],o=[];if(i==null||typeof i!="object")return{valid:!1,errors:["GraphSpec must be a non-null object"],warnings:o};let r=i;if((typeof r.name!="string"||r.name.length===0)&&n.push("Missing or empty 'name' field"),r.nodes==null||typeof r.nodes!="object"||Array.isArray(r.nodes))return n.push("Missing or invalid 'nodes' field (must be an object)"),{valid:!1,errors:n,warnings:o};let d=new Set(Object.keys(r.nodes)),p=new Map,l=new Map;if(r.templates!=null&&typeof r.templates=="object"&&!Array.isArray(r.templates)){for(let[s,c]of Object.entries(r.templates))if(c!=null&&typeof c=="object"){let t=c;l.set(s,{params:Array.isArray(t.params)?t.params:[]})}}if(r.templates!=null)if(typeof r.templates!="object"||Array.isArray(r.templates))n.push("'templates' must be an object");else for(let[s,c]of Object.entries(r.templates)){if(c==null||typeof c!="object"){n.push(`Template "${s}": must be an object`);continue}let t=c;if(Array.isArray(t.params)||n.push(`Template "${s}": missing 'params' array`),t.nodes==null||typeof t.nodes!="object"||Array.isArray(t.nodes))n.push(`Template "${s}": missing or invalid 'nodes' object`);else{let $=new Set(Array.isArray(t.params)?t.params:[]),O=new Set(Object.keys(t.nodes));for(let[w,m]of Object.entries(t.nodes)){if(m==null||typeof m!="object"){n.push(`Template "${s}" node "${w}": must be an object`);continue}let g=m;if((typeof g.type!="string"||!oe.has(g.type))&&n.push(`Template "${s}" node "${w}": invalid type`),Array.isArray(g.deps))for(let y of g.deps)!O.has(y)&&!$.has(y)&&n.push(`Template "${s}" node "${w}": dep "${y}" is not an inner node or param`)}typeof t.output!="string"?n.push(`Template "${s}": missing 'output' string`):t.nodes[t.output]||n.push(`Template "${s}": output "${t.output}" is not a declared node`)}}for(let[s,c]of Object.entries(r.nodes)){if(c==null||typeof c!="object"){n.push(`Node "${s}": must be an object`);continue}let t=c;if(typeof t.type!="string"||!U.has(t.type)){n.push(`Node "${s}": invalid type "${String(t.type)}" (expected: ${[...U].join(", ")})`);continue}if(p.set(s,t.type),t.type==="template")if(typeof t.template!="string"||!l.has(t.template))n.push(`Node "${s}": template "${String(t.template)}" not found in templates`);else if(t.bind==null||typeof t.bind!="object"||Array.isArray(t.bind))n.push(`Node "${s}": template ref requires 'bind' object`);else{let $=l.get(t.template),O=t.bind;for(let w of $.params)w in O||n.push(`Node "${s}": template param "${w}" is not bound (template "${t.template}")`);for(let[,w]of Object.entries(O))typeof w=="string"&&!d.has(w)&&n.push(`Node "${s}": bind target "${w}" does not reference an existing node`)}else{if(Array.isArray(t.deps))for(let $ of t.deps)$===s?n.push(`Node "${s}": self-referencing dep`):d.has($)||n.push(`Node "${s}": dep "${$}" does not reference an existing node`);(t.type==="derived"||t.type==="effect"||t.type==="operator")&&!Array.isArray(t.deps)&&n.push(`Node "${s}": ${t.type} node should have a 'deps' array`)}}if(r.feedback!=null)if(!Array.isArray(r.feedback))n.push("'feedback' must be an array");else for(let s=0;s<r.feedback.length;s++){let c=r.feedback[s];if(c==null||typeof c!="object"){n.push(`Feedback [${s}]: must be an object`);continue}let t=c;typeof t.from!="string"||!d.has(t.from)?n.push(`Feedback [${s}]: 'from' "${String(t.from)}" does not reference an existing node`):p.get(t.from)==="effect"&&o.push(`Feedback [${s}]: 'from' "${t.from}" is an effect node \u2014 effects emit no DATA, so the feedback edge will never fire. Did you mean a derived/state node upstream?`),typeof t.from=="string"&&t.from===t.to&&n.push(`Feedback [${s}]: 'from' and 'to' must be different nodes`),typeof t.to!="string"||!d.has(t.to)?n.push(`Feedback [${s}]: 'to' "${String(t.to)}" does not reference an existing node`):typeof t.to=="string"&&p.get(t.to)!=="state"&&n.push(`Feedback [${s}]: 'to' node "${t.to}" must be a state node (got "${p.get(t.to)??"unknown"}")`)}return{valid:n.length===0,errors:n,warnings:o}}function se(i,n){let o=A(i);if(!o.valid)throw new Error(`compileSpec: invalid GraphSpec:
8
- ${o.errors.join(`
9
- `)}`);let r=n?.catalog??{},d=n?.onMissing??"placeholder",p=new J(i.name),l=i.templates??{},s=q(i,r);if(!s.valid)throw new Error(`compileSpec: catalog validation errors:
10
- ${s.errors.join(`
11
- `)}`);let c=[],t=(a,f,e)=>{if(e){c.push({path:a,kind:"source",name:e});return}f&&c.push({path:a,kind:"fn",name:f})},$=a=>{let f=r.fns?.[a];return f?V(f):void 0},O=a=>{let f=r.sources?.[a];return f?B(f):void 0},w=new Map,m=[];for(let[a,f]of Object.entries(i.nodes)){if(f.type==="template")continue;let e=f;if(e.type==="state"){let h=L(e.initial,{name:a,meta:e.meta?{...e.meta}:void 0});p.add(h,{name:a}),w.set(a,h)}else if(e.type==="producer"){let h=e.source?O(e.source):void 0,b=e.fn?$(e.fn):void 0;if(h){let u=h(e.config??{});p.add(u,{name:a}),w.set(a,u)}else if(b){let u=b([],e.config??{});p.add(u,{name:a}),w.set(a,u)}else{t(a,e.fn,e.source);let u=T(()=>{},{name:a,meta:{...e.meta,_specFn:e.fn,_specSource:e.source}});p.add(u,{name:a}),w.set(a,u)}}else m.push([a,e])}let g=!0,y=new Map(m);for(;y.size>0&&g;){g=!1;for(let[a,f]of[...y.entries()]){let e=f.deps??[];if(!e.every(x=>w.has(x)))continue;let h=e.map(x=>w.get(x)),b=f.fn?$(f.fn):void 0,u;b?u=b(h,f.config??{}):f.type==="effect"?(f.fn&&t(a,f.fn,void 0),u=P(h,()=>{})):(f.fn&&t(a,f.fn,void 0),u=D(h,x=>x[0])),p.add(u,{name:a}),w.set(a,u),y.delete(a),g=!0}}if(y.size>0){let a=[...y.keys()].sort().join(", ");throw new Error(`compileSpec: unresolvable deps for nodes: ${a}`)}for(let[a,f]of Object.entries(i.nodes)){if(f.type!=="template")continue;let e=f,h=l[e.template],b=new J(a),u=new Map,x=[];for(let[k,S]of Object.entries(h.nodes)){let v=(S.deps??[]).map(j=>j.startsWith("$")&&e.bind[j]?e.bind[j]:j),G={...S,deps:v};if(S.type==="state"){let j=L(S.initial,{name:k,meta:S.meta?{...S.meta}:void 0});b.add(j,{name:k}),u.set(k,j)}else if(S.type==="producer"){let j=S.source?O(S.source):void 0,E=S.fn?$(S.fn):void 0;if(j){let F=j(S.config??{});b.add(F,{name:k}),u.set(k,F)}else if(E){let F=E([],S.config??{});b.add(F,{name:k}),u.set(k,F)}else{t(`${a}.${k}`,S.fn,S.source);let F=T(()=>{},{name:k,meta:{...S.meta,_specFn:S.fn,_specSource:S.source}});b.add(F,{name:k}),u.set(k,F)}}else x.push([k,G])}let R=!0,N=new Map(x);for(;N.size>0&&R;){R=!1;for(let[k,S]of[...N.entries()]){let v=S.deps??[];if(!v.every(C=>u.has(C)||w.has(C)))continue;let j=v.map(C=>u.get(C)??w.get(C)),E=S.fn?$(S.fn):void 0,F;E?F=E(j,S.config??{}):S.type==="effect"?(S.fn&&t(`${a}.${k}`,S.fn,void 0),F=P(j,()=>{})):(S.fn&&t(`${a}.${k}`,S.fn,void 0),F=D(j,C=>C[0])),b.add(F,{name:k}),u.set(k,F),N.delete(k),R=!0}}if(N.size>0){let k=[...N.keys()].sort().join(", ");throw new Error(`compileSpec: template "${e.template}" has unresolvable deps: ${k}`)}p.mount(a,b);let _=`${a}::${h.output}`;w.set(a,p.resolve(_));try{let k=p.resolve(_);k.meta._templateName?.emit(e.template),k.meta._templateBind?.emit(e.bind)}catch{}}for(let a of i.feedback??[])z(p,a.from,a.to,{maxIterations:a.maxIterations});if(c.length>0){if(d==="error"){let a=c.map(f=>` - ${f.path}: missing ${f.kind} "${f.name}"`);throw new Error(`compileSpec: ${c.length} catalog entr${c.length===1?"y":"ies"} missing \u2014 pass them via opts.catalog or set opts.onMissing to "warn"/"placeholder":
12
- ${a.join(`
13
- `)}`)}if(d==="warn"){let a=n?.onWarn??(f=>console.warn(f));for(let f of c)a(`compileSpec: ${f.path} references missing ${f.kind} "${f.name}" \u2014 substituted placeholder`)}}return p}var re=new Set(["reduction","reduction_type","_specFn","_specSource","_templateName","_templateBind","feedbackFrom","feedbackTo","_internal"]);function ae(i){let n=i.describe({detail:"standard"}),o={},r=[],d=`::${Y}::`,p=/^__feedback_(?!effect_)(.+)$/,l=new Set;for(let m of Object.keys(n.nodes)){if(m.includes(d))continue;let g=p.exec(m);if(g){l.add(g[1]);let y=n.nodes[m]?.meta;y?.feedbackFrom&&y?.feedbackTo&&r.push({from:y.feedbackFrom,to:y.feedbackTo,...y.maxIterations?{maxIterations:y.maxIterations}:{}})}}for(let[m,g]of Object.entries(n.nodes)){if(m.includes(d)||p.test(m)||g.meta?._internal||m.startsWith("__feedback_effect_")||m.startsWith("__bridge_")||m.includes("::"))continue;let y={type:g.type};if(g.deps.length>0&&(y.deps=g.deps.filter(a=>!a.includes("::"))),g.type==="state"&&g.value!==void 0&&(y.initial=g.value),g.meta&&Object.keys(g.meta).length>0){let a={};for(let[f,e]of Object.entries(g.meta))re.has(f)||(a[f]=e);Object.keys(a).length>0&&(y.meta=a)}o[m]=y}let s={},c={},t=new Set;for(let m of n.subgraphs){let g=`${m}::`;for(let[y,a]of Object.entries(n.nodes)){if(!y.startsWith(g)||y.includes(d))continue;let f=a.meta;if(f?._templateName&&f?._templateBind){let e=f._templateName,h=f._templateBind;if(!s[e]){let b={},u=new Set,x=`${m}::`;for(let[v,G]of Object.entries(n.nodes)){if(!v.startsWith(x)||v.includes(d))continue;let j=v.slice(x.length);j.includes("::")||(u.add(j),b[j]={type:G.type,...G.deps.length>0?{deps:G.deps.map(E=>E.startsWith(x)?E.slice(x.length):E)}:{}})}let R=[],N=new Map;for(let v of Object.values(b))for(let G of v.deps??[])if(!u.has(G)&&!N.has(G)){let j=`$${G}`;R.push(j),N.set(G,j)}for(let v of Object.values(b))v.deps&&(v.deps=v.deps.map(G=>N.get(G)??G));let _=new Set;for(let v of Object.values(b))for(let G of v.deps??[])u.has(G)&&_.add(G);let S=[...u].filter(v=>!_.has(v))[0]??[...u].pop();s[e]={params:R,nodes:b,output:S}}delete o[m],c[m]={type:"template",template:e,bind:h},t.add(m);break}}}let $=new Map;for(let m of n.subgraphs){if(t.has(m))continue;let g={},y=`${m}::`;for(let[f,e]of Object.entries(n.nodes)){if(f.includes(d)||!f.startsWith(y))continue;let h=f.slice(y.length);h.includes("::")||(g[h]={type:e.type,...e.deps.length>0?{deps:e.deps.map(b=>b.startsWith(y)?b.slice(y.length):b)}:{}})}let a=JSON.stringify(Object.fromEntries(Object.entries(g).sort(([f],[e])=>f.localeCompare(e)).map(([f,e])=>[f,{type:e.type,deps:e.deps??[]}])));$.has(a)||$.set(a,[]),$.get(a).push({name:m,nodes:g})}for(let[,m]of $){if(m.length<2)continue;let g=`${m[0].name}_template`,y=m[0].nodes,a=new Set(Object.keys(y)),f=[],e=new Map;for(let R of Object.values(y))for(let N of R.deps??[])if(!a.has(N)&&!e.has(N)){let _=`$${N}`;f.push(_),e.set(N,_)}let h=new Set;for(let R of Object.values(y))for(let N of R.deps??[])a.has(N)&&h.add(N);let u=[...a].filter(R=>!h.has(R))[0]??[...a].pop(),x={};for(let[R,N]of Object.entries(y))x[R]={...N,deps:N.deps?.map(_=>e.get(_)??_)};s[g]={params:f,nodes:x,output:u};for(let R of m){delete o[R.name];let N={},_=new Set(Object.keys(R.nodes));for(let k of Object.values(R.nodes))for(let S of k.deps??[])if(!_.has(S)){let v=e.get(S)??`$${S}`;N[v]=S}c[R.name]={type:"template",template:g,bind:N}}}let O={...o,...c},w={name:n.name,nodes:O};return Object.keys(s).length>0&&(w.templates=s),r.length>0&&(w.feedback=r),w}function ie(i,n){let o=[];i.name!==n.name&&o.push({type:"changed",path:"name",detail:`"${i.name}" \u2192 "${n.name}"`});let r=new Set(Object.keys(i.nodes)),d=new Set(Object.keys(n.nodes));for(let e of d)if(!r.has(e)){let h=n.nodes[e];o.push({type:"added",path:`nodes.${e}`,detail:`type: ${h.type}`})}for(let e of r)d.has(e)||o.push({type:"removed",path:`nodes.${e}`});for(let e of r){if(!d.has(e))continue;let h=i.nodes[e],b=n.nodes[e];if(JSON.stringify(h)!==JSON.stringify(b)){let u=[];h.type!==b.type&&u.push(`type: ${h.type} \u2192 ${b.type}`),JSON.stringify(h.deps)!==JSON.stringify(b.deps)&&u.push("deps changed"),h.fn!==b.fn&&u.push(`fn: ${h.fn} \u2192 ${b.fn}`),JSON.stringify(h.config)!==JSON.stringify(b.config)&&u.push("config changed"),o.push({type:"changed",path:`nodes.${e}`,detail:u.join("; ")||"modified"})}}let p=i.templates??{},l=n.templates??{},s=new Set(Object.keys(p)),c=new Set(Object.keys(l));for(let e of c)s.has(e)||o.push({type:"added",path:`templates.${e}`});for(let e of s)c.has(e)||o.push({type:"removed",path:`templates.${e}`});for(let e of s)c.has(e)&&JSON.stringify(p[e])!==JSON.stringify(l[e])&&o.push({type:"changed",path:`templates.${e}`,detail:"template definition changed"});let t=i.feedback??[],$=n.feedback??[],O=new Set(t.map(e=>`${e.from}->${e.to}`)),w=new Set($.map(e=>`${e.from}->${e.to}`));for(let e of $){let h=`${e.from}->${e.to}`;O.has(h)||o.push({type:"added",path:`feedback.${h}`,detail:`maxIterations: ${e.maxIterations??10}`})}for(let e of t){let h=`${e.from}->${e.to}`;w.has(h)||o.push({type:"removed",path:`feedback.${h}`})}for(let e of t){let h=`${e.from}->${e.to}`,b=$.find(u=>u.from===e.from&&u.to===e.to);b&&JSON.stringify(e)!==JSON.stringify(b)&&o.push({type:"changed",path:`feedback.${h}`,detail:`maxIterations: ${e.maxIterations??10} \u2192 ${b.maxIterations??10}`})}let m=o.filter(e=>e.type==="added").length,g=o.filter(e=>e.type==="removed").length,y=o.filter(e=>e.type==="changed").length,a=[];m&&a.push(`${m} added`),g&&a.push(`${g} removed`),y&&a.push(`${y} changed`);let f=a.length>0?a.join(", "):"no changes";return{entries:o,summary:f}}var H=`You are a graph architect for GraphReFly, a reactive graph protocol.
14
-
15
- Given a natural-language description, produce a JSON GraphSpec with this structure:
16
-
17
- {
18
- "name": "<graph_name>",
19
- "nodes": {
20
- "<node_name>": {
21
- "type": "state" | "derived" | "producer" | "effect" | "operator",
22
- "deps": ["<dep_node_name>", ...],
23
- "fn": "<catalog_function_name>",
24
- "source": "<catalog_source_name>",
25
- "config": { ... },
26
- "initial": <value>,
27
- "meta": { "description": "<purpose>" }
28
- },
29
- "<template_instance>": {
30
- "type": "template",
31
- "template": "<template_name>",
32
- "bind": { "$param": "node_name" }
33
- }
34
- },
35
- "templates": {
36
- "<template_name>": {
37
- "params": ["$param1", "$param2"],
38
- "nodes": { ... },
39
- "output": "<output_node>"
40
- }
41
- },
42
- "feedback": [
43
- { "from": "<condition_node>", "to": "<state_node>", "maxIterations": 10 }
44
- ]
45
- }
46
-
47
- Rules:
48
- - "state" nodes hold user/LLM-writable values (knobs). Use "initial" for default values.
49
- - "derived" nodes compute from deps using a named "fn".
50
- - "effect" nodes produce side effects from deps.
51
- - "producer" nodes generate values from a named "source".
52
- - Use "templates" when the same subgraph pattern repeats (e.g., per-source resilience).
53
- - Use "feedback" for bounded cycles where a derived value writes back to a state node.
54
- - meta.description is required for every node.
55
- - Return ONLY valid JSON, no markdown fences or commentary.`;function Q(i){let n=i.match(/^```(?:json)?\s*([\s\S]*?)\s*```[\s\S]*$/);return n?n[1]:i}async function ce(i,n,o){let r=H,d=o?.catalogDescription??(o?.catalog?K(o.catalog):void 0);d&&(r+=`
56
-
57
- Available catalog (use ONLY these names):
58
- ${d}`),o?.systemPromptExtra&&(r+=`
59
-
60
- ${o.systemPromptExtra}`);let p=[{role:"system",content:r},{role:"user",content:i}],c=(await n.invoke(p,{model:o?.model,temperature:o?.temperature??0,maxTokens:o?.maxTokens})).content.trim();c.startsWith("```")&&(c=Q(c));let t;try{t=JSON.parse(c)}catch{throw new Error(`llmCompose: LLM response is not valid JSON: ${c.slice(0,200)}`)}let $=A(t);if(!$.valid)throw new Error(`llmCompose: invalid GraphSpec:
61
- ${$.errors.join(`
62
- `)}`);let O=t;if(o?.catalog){let w=o.maxAutoRefine??0;for(let m=0;m<=w;m++){let g=q(O,o.catalog);if(g.valid)break;if(m===w)throw new Error(`llmCompose: catalog validation failed after ${w} refine attempts:
63
- ${g.errors.join(`
64
- `)}`);O=await X(O,`Fix these catalog errors:
65
- ${g.errors.join(`
66
- `)}
67
-
68
- Use ONLY functions and sources from the catalog.`,n,{...o,catalogDescription:d})}}return O}async function X(i,n,o,r){let d=H;r?.catalogDescription&&(d+=`
69
-
70
- Available catalog:
71
- ${r.catalogDescription}`),r?.systemPromptExtra&&(d+=`
72
-
73
- ${r.systemPromptExtra}`);let p=[{role:"system",content:d},{role:"user",content:`Current GraphSpec:
74
- ${JSON.stringify(i,null,2)}
75
-
76
- Modification request: ${n}
77
-
78
- Return the complete modified GraphSpec as JSON.`}],c=(await o.invoke(p,{model:r?.model,temperature:r?.temperature??0,maxTokens:r?.maxTokens})).content.trim();c.startsWith("```")&&(c=Q(c));let t;try{t=JSON.parse(c)}catch{throw new Error(`llmRefine: LLM response is not valid JSON: ${c.slice(0,200)}`)}let $=A(t);if(!$.valid)throw new Error(`llmRefine: invalid GraphSpec:
79
- ${$.errors.join(`
80
- `)}`);return t}export{M as a,W as b,V as c,B as d,K as e,q as f,A as g,se as h,ae as i,ie as j,ce as k,X as l,pe as m};
@@ -1 +0,0 @@
1
- import{a as H,b as T}from"./chunk-QP5TH523.js";import{j as q}from"./chunk-B4L5X2QO.js";import{a as O,b as j}from"./chunk-533RQFF6.js";import{E as d,G as o,H as x,m as A}from"./chunk-LYCLF26R.js";import{b as ae}from"./chunk-QYADASLV.js";var ie={};ae(ie,{demoShell:()=>re});function w(h){return Math.max(0,Math.min(1,h))}function re(h){let B=w(h?.mainRatio??.65),E=w(h?.sideSplit??.5),J=Math.max(0,h?.viewportWidth??1280),k=h?.nodeRegistry??new Map,p=h?.adapter??null,S=h?.layoutFont??"14px monospace",u=h?.onHighlight,t=new q("demo-shell"),F=d(B,{name:"pane/main-ratio"}),D=d(E,{name:"pane/side-split"}),g=d(null,{name:"pane/fullscreen"}),G=d(J,{name:"viewport/width"});t.add(F,{name:"pane/main-ratio"}),t.add(D,{name:"pane/side-split"}),t.add(g,{name:"pane/fullscreen"}),t.add(G,{name:"viewport/width"});let L=o([F,G,g],([e,a,n])=>{let l=e,r=a,i=n;return i==="main"?r:i==="graph"||i==="code"?0:Math.round(r*l)},{name:"pane/main-width"}),R=o([L,G,g],([e,a,n])=>{let l=n,r=a;return l==="main"?0:l==="graph"||l==="code"?r:r-e},{name:"pane/side-width"}),C=o([D,g],([e,a])=>{let n=a;return n==="graph"?1:n==="code"||n==="main"?0:w(e)},{name:"pane/graph-height-ratio"}),K=o([C,g],([e,a])=>{let n=a;return n==="code"?1:n==="graph"||n==="main"?0:1-e},{name:"pane/code-height-ratio"});t.add(L,{name:"pane/main-width"}),t.add(R,{name:"pane/side-width"}),t.add(C,{name:"pane/graph-height-ratio"}),t.add(K,{name:"pane/code-height-ratio"});let b=d(null,{name:"demo/graph-ref"}),m=d(0,{name:"demo/graph-tick"});t.add(b,{name:"demo/graph-ref"}),t.add(m,{name:"demo/graph-tick"});let Q=o([b,m],([e,a])=>{let n=e;return n?n.describe({format:"mermaid"}):""},{name:"graph/mermaid"}),z=o([b,m],([e,a])=>{let n=e;if(!n)return null;let{expand:l,...r}=n.describe({detail:"standard"});return r},{name:"graph/describe"});t.add(Q,{name:"graph/mermaid"}),t.add(z,{name:"graph/describe"});let M=d(null,{name:"hover/target"});t.add(M,{name:"hover/target"});let P=o([M],([e])=>{let a=e;if(!a)return null;let n=k.get(a.id);return n?n.codeLine:null},{name:"highlight/code-scroll"}),W=o([M],([e])=>{let a=e;if(!a)return null;let n=k.get(a.id);return n?n.visualSelector:null},{name:"highlight/visual"}),N=o([M],([e])=>{let a=e;return a?a.id:null},{name:"highlight/graph"});if(t.add(P,{name:"highlight/code-scroll"}),t.add(W,{name:"highlight/visual"}),t.add(N,{name:"highlight/graph"}),u?.codeScroll){let e=u.codeScroll,a=x([P],([n])=>{e(n)});t.add(a,{name:"highlight/apply-code-scroll"})}if(u?.visual){let e=u.visual,a=x([W],([n])=>{e(n)});t.add(a,{name:"highlight/apply-visual"})}if(u?.graph){let e=u.graph,a=x([N],([n])=>{e(n)});t.add(a,{name:"highlight/apply-graph"})}let _=d(null,{name:"inspect/selected-node"});t.add(_,{name:"inspect/selected-node"});let U=O("standard"),X=o([_,b,m],([e,a,n])=>{let l=a,r=e;if(!l||!r)return null;try{let i=l.resolve(r),s=j(i,U);return{path:r,...s,value:i.cache}}catch{return null}},{name:"inspect/node-detail"}),Y=o([b,m],([e,a])=>{let n=e;return n?n.trace():[]},{name:"inspect/trace-log"});t.add(X,{name:"inspect/node-detail"}),t.add(Y,{name:"inspect/trace-log"});let I=d(!1,{name:"meta/debug"});t.add(I,{name:"meta/debug"});let Z=o([I,m],([e,a])=>e?t.describe({format:"mermaid"}):"",{name:"meta/shell-mermaid"});t.add(Z,{name:"meta/shell-mermaid"});let V=d("",{name:"layout/code-text"});if(t.add(V,{name:"layout/code-text"}),p){let e=new Map,a=o([z],([r])=>{let i=r;if(!i)return new Map;let s=new Map;for(let[c]of Object.entries(i.nodes)){let f=H(c,S,p,e),v=T(f,1/0,p,S,e),y=v.lines.reduce((te,ne)=>Math.max(te,ne.width),0),ee=v.lineCount*20;s.set(c,{width:y,height:ee})}return s},{name:"layout/graph-labels",equals:(r,i)=>{if(r===i)return!0;let s=r,c=i;if(s.size!==c.size)return!1;for(let[f,v]of s){let y=c.get(f);if(!y||y.width!==v.width||y.height!==v.height)return!1}return!0}}),n=o([V,R],([r,i])=>{let s=r;if(!s)return{lineCount:0,lines:[]};let c=H(s,S,p,e),f=i-40;return T(c,Math.max(100,f),p,S,e)},{name:"layout/code-lines"}),l=o([a],([r])=>{let i=r;if(i.size===0)return 200;let s=0;for(let{width:c}of i.values())c>s&&(s=c);return Math.max(200,Math.round(s+80))},{name:"layout/side-width-hint"});t.add(a,{name:"layout/graph-labels"}),t.add(n,{name:"layout/code-lines"}),t.add(l,{name:"layout/side-width-hint"})}let $=0;return{graph:t,setMainRatio(e){t.set("pane/main-ratio",w(e))},setSideSplit(e){t.set("pane/side-split",w(e))},setFullscreen(e){t.set("pane/fullscreen",e)},setViewportWidth(e){t.set("viewport/width",Math.max(0,e))},setHoverTarget(e){t.set("hover/target",e)},setDemoGraph(e){t.set("demo/graph-ref",e)},bumpGraphTick(){t.set("demo/graph-tick",++$)},selectNode(e){t.set("inspect/selected-node",e)},setMetaDebug(e){t.set("meta/debug",e)},setCodeText(e){t.set("layout/code-text",e)},batch(e){A(e)},destroy(){t.destroy()}}}export{re as a,ie as b};
@@ -1 +0,0 @@
1
- import{b as F,c as G}from"./chunk-O32GJOUJ.js";import{j as _}from"./chunk-B4L5X2QO.js";import{t as B}from"./chunk-JJTF75VS.js";import{b as $}from"./chunk-TZQPPQEQ.js";import{C as N}from"./chunk-MQZWA3DF.js";import{D as x,E as I,G as S,H as M,m as A}from"./chunk-LYCLF26R.js";import{b as k,c as v,d as y,f as T,g as O,i as E,j as w}from"./chunk-CK2E7BTU.js";import{b as K}from"./chunk-QYADASLV.js";var U={};K(U,{budgetGate:()=>C,effectivenessTracker:()=>L,feedback:()=>V,funnel:()=>P,scorer:()=>z});function R(u,t){return G("reduction",u,t)}function P(u,t,i,b){if(t.length===0)throw new RangeError("funnel requires at least one source");if(i.length===0)throw new RangeError("funnel requires at least one stage");let d=new _(u,b),s=t.length===1?t[0]:B(...t);d.add(s,{name:"merged"});let e="merged";for(let f=0;f<i.length;f++){let o=i[f],c=new _(o.name);o.build(c);try{c.resolve("input")}catch{throw new Error(`funnel stage "${o.name}" must define an "input" node`)}try{c.resolve("output")}catch{throw new Error(`funnel stage "${o.name}" must define an "output" node`)}d.mount(o.name,c);let l=d.resolve(e),m=`${o.name}::input`,g=d.resolve(m),a=`__bridge_${e}\u2192${o.name}_input`,p=M([l],([r])=>{g.emit(r)},{name:a});d.add(p,{name:a}),d.addDisposer(N(p)),e=`${o.name}::output`}return d}function V(u,t,i,b){let d=b?.maxIterations??10,s=`__feedback_${t}`,e=I(0,{meta:R("feedback_counter",{maxIterations:d,feedbackFrom:t,feedbackTo:i})});u.add(e,{name:s});let f=u.resolve(t),o=u.resolve(i),c=`__feedback_effect_${t}`,l=x([],(m,g)=>{let a=f.subscribe(p=>{for(let r of p){let n=r[0];if(n===k){let h=r[1];if(h==null)return;A(()=>{F(e,d)&&o.emit(h)})}else if(n===E||n===w){let h=n===w&&r.length>1?[w,r[1]]:[n];e.down([h])}}});return()=>a()},{name:c,describeKind:"effect",meta:{...R("feedback_effect",{feedbackFrom:t,feedbackTo:i}),_internal:!0}});return u.add(l,{name:c}),u.addDisposer(N(l)),u}function C(u,t,i){if(t.length===0)throw new RangeError("budgetGate requires at least one constraint");let b=t.map(a=>a.node),d=[u,...b],s=[],e=!1,f=!1,o=Symbol("budget-gate"),c=new Array(t.length);function l(){return t.every((a,p)=>a.check(c[p]))}function m(a){for(;s.length>0&&l();){let p=s[0];s=s.slice(1),a.emit(p)}s.length===0&&f&&(f=!1,a.down([[y]]))}return x([],(a,p)=>{for(let n=0;n<t.length;n++)c[n]=t[n].node.cache;let r=[];for(let n=0;n<d.length;n++){let h=d[n];r.push(h.subscribe(q=>{for(let D of q)g(D,n,p)}))}return()=>{for(let n of r)n()}},{...i,describeKind:"derived",meta:R("budget_gate",i?.meta)});function g(a,p,r){let n=a[0];if(p===0){if(n===k)return l()&&s.length===0?r.emit(a[1]):(s.push(a[1]),e||(e=!0,r.up([[T,o]]))),!0;if(n===v)return r.down([[v]]),!0;if(n===y)return s.length===0?r.down([[y]]):f=!0,!0;if(n===E||n===w){for(let h of s)r.emit(h);return s=[],f=!1,e&&(e=!1,r.up([[O,o]])),r.down([a]),!0}return!1}return n===k&&(c[p-1]=a[1]),n===k||n===y?(l()&&s.length>0?(m(r),s.length===0&&e&&(e=!1,r.up([[O,o]]))):!l()&&!e&&s.length>0&&(e=!0,r.up([[T,o]])),!0):n===v?!0:n===w?(r.down([a]),!0):n===E}}function z(u,t,i){if(u.length===0)throw new RangeError("scorer requires at least one source");if(u.length!==t.length)throw new RangeError("scorer requires the same number of sources and weights");let b=[...u,...t],d=u.length,s=i?.scoreFns;return S(b,e=>{let f=e.slice(0,d),o=e.slice(d),c=[],l=0;for(let m=0;m<d;m++){let g=f[m]??0,a=o[m]??0,r=(s?.[m]?s[m](g):g)*a;c.push(r),l+=r}return{value:f,score:l,breakdown:c}},{...i?{equals:i.equals,resubscribable:i.resubscribable,resetOnTeardown:i.resetOnTeardown}:{},describeKind:"derived",meta:R("scorer",i?.meta)})}function L(u){let t=$({name:u?.name??"effectiveness-entries"}),i=S([t.entries],([e])=>new Map(e),{name:`${u?.name??"effectiveness"}-snapshot`,equals:(e,f)=>{let o=e,c=f;if(o.size!==c.size)return!1;for(let[l,m]of o){let g=c.get(l);if(!g||m.attempts!==g.attempts||m.successes!==g.successes)return!1}return!0}});function b(e,f){let o=t.get(e),c=(o?.attempts??0)+1,l=(o?.successes??0)+(f?1:0);t.set(e,{key:e,attempts:c,successes:l,successRate:l/c})}function d(e){return t.get(e)}let s=N(i);return{node:i,record:b,lookup:d,dispose:()=>s()}}export{P as a,V as b,C as c,z as d,L as e,U as f};
@@ -1,28 +0,0 @@
1
- /**
2
- * Imperative-controller-with-audit helper layer (Audit 2 — locked 2026-04-24).
3
- *
4
- * Five Phase-4 primitives share the same shape: imperative mutation methods +
5
- * closure state + reactive audit log + freeze-at-entry + rollback-on-throw.
6
- * This module factors out the common machinery so each primitive becomes
7
- * declarative wiring over typed audit records:
8
- * - `gate`, `pipeline.gate` (Wave A.2 Unit 8)
9
- * - `JobQueueGraph` (Wave B.3 Unit 15)
10
- * - `CqrsGraph.dispatch` (Wave C.2 Unit 20)
11
- * - `CqrsGraph.saga` (Wave C.3 Unit 22)
12
- * - `processManager` (Wave 7) [out of scope this commit]
13
- *
14
- * @internal — exposed for primitive impls only; not re-exported through any
15
- * patterns/<x>/index.ts barrel.
16
- */
17
-
18
- /** Shared base shape for every audit record. Per-primitive types extend this. */
19
- interface BaseAuditRecord {
20
- readonly t_ns: number;
21
- readonly seq?: number;
22
- readonly handlerVersion?: {
23
- id: string;
24
- version: string | number;
25
- };
26
- }
27
-
28
- export type { BaseAuditRecord as B };
@@ -1,28 +0,0 @@
1
- /**
2
- * Imperative-controller-with-audit helper layer (Audit 2 — locked 2026-04-24).
3
- *
4
- * Five Phase-4 primitives share the same shape: imperative mutation methods +
5
- * closure state + reactive audit log + freeze-at-entry + rollback-on-throw.
6
- * This module factors out the common machinery so each primitive becomes
7
- * declarative wiring over typed audit records:
8
- * - `gate`, `pipeline.gate` (Wave A.2 Unit 8)
9
- * - `JobQueueGraph` (Wave B.3 Unit 15)
10
- * - `CqrsGraph.dispatch` (Wave C.2 Unit 20)
11
- * - `CqrsGraph.saga` (Wave C.3 Unit 22)
12
- * - `processManager` (Wave 7) [out of scope this commit]
13
- *
14
- * @internal — exposed for primitive impls only; not re-exported through any
15
- * patterns/<x>/index.ts barrel.
16
- */
17
-
18
- /** Shared base shape for every audit record. Per-primitive types extend this. */
19
- interface BaseAuditRecord {
20
- readonly t_ns: number;
21
- readonly seq?: number;
22
- readonly handlerVersion?: {
23
- id: string;
24
- version: string | number;
25
- };
26
- }
27
-
28
- export type { BaseAuditRecord as B };
@@ -1,139 +0,0 @@
1
- import { a as Node } from './node-fSc-hCv8.js';
2
- import { G as Graph } from './graph-YQXDndFy.js';
3
-
4
- /**
5
- * Memory patterns (roadmap §4.3).
6
- *
7
- * Domain-layer helpers composed from GraphRefly primitives. `vectorIndex` uses
8
- * an exact-search backend by default; an HNSW adapter can be injected as an
9
- * optional dependency.
10
- */
11
-
12
- type CollectionPolicy = "fifo" | "lru";
13
- type VectorBackend = "flat" | "hnsw";
14
- type LightCollectionEntry<T> = {
15
- readonly id: string;
16
- readonly value: T;
17
- readonly createdAtNs: number;
18
- readonly lastAccessNs: number;
19
- };
20
- type LightCollectionOptions = {
21
- name?: string;
22
- maxSize?: number;
23
- policy?: CollectionPolicy;
24
- };
25
- type LightCollectionBundle<T> = {
26
- readonly entries: Node<ReadonlyMap<string, LightCollectionEntry<T>>>;
27
- upsert: (id: string, value: T) => void;
28
- remove: (id: string) => void;
29
- clear: () => void;
30
- get: (id: string) => T | undefined;
31
- has: (id: string) => boolean;
32
- };
33
- type CollectionEntry<T> = LightCollectionEntry<T> & {
34
- readonly baseScore: number;
35
- };
36
- type RankedCollectionEntry<T> = CollectionEntry<T> & {
37
- readonly score: number;
38
- };
39
- type CollectionOptions<T> = {
40
- maxSize?: number;
41
- policy?: CollectionPolicy;
42
- /**
43
- * Produces a base score at insert/update time.
44
- */
45
- score?: (value: T) => number;
46
- /**
47
- * Exponential decay rate per second. 0 disables decay.
48
- */
49
- decayRate?: number;
50
- /**
51
- * Minimum score floor after decay.
52
- */
53
- minScore?: number;
54
- };
55
- type CollectionGraph<T> = Graph & {
56
- upsert: (id: string, value: T, opts?: {
57
- score?: number;
58
- }) => void;
59
- remove: (id: string) => void;
60
- clear: () => void;
61
- getItem: (id: string) => CollectionEntry<T> | undefined;
62
- };
63
- type VectorRecord<TMeta> = {
64
- readonly id: string;
65
- readonly vector: readonly number[];
66
- readonly meta?: TMeta;
67
- };
68
- type VectorSearchResult<TMeta> = {
69
- readonly id: string;
70
- readonly score: number;
71
- readonly meta?: TMeta;
72
- };
73
- type HnswAdapter<TMeta> = {
74
- upsert: (id: string, vector: readonly number[], meta?: TMeta) => void;
75
- remove: (id: string) => void;
76
- clear: () => void;
77
- search: (query: readonly number[], k: number) => ReadonlyArray<VectorSearchResult<TMeta>>;
78
- };
79
- type VectorIndexOptions<TMeta> = {
80
- backend?: VectorBackend;
81
- dimension?: number;
82
- /**
83
- * Optional dependency seam for HNSW.
84
- */
85
- hnswFactory?: () => HnswAdapter<TMeta>;
86
- };
87
- type VectorIndexBundle<TMeta> = {
88
- readonly backend: VectorBackend;
89
- readonly entries: Node<ReadonlyMap<string, VectorRecord<TMeta>>>;
90
- upsert: (id: string, vector: readonly number[], meta?: TMeta) => void;
91
- remove: (id: string) => void;
92
- clear: () => void;
93
- search: (query: readonly number[], k?: number) => ReadonlyArray<VectorSearchResult<TMeta>>;
94
- };
95
- type KnowledgeEdge<TRelation extends string = string> = {
96
- readonly from: string;
97
- readonly to: string;
98
- readonly relation: TRelation;
99
- readonly weight: number;
100
- };
101
- type KnowledgeGraphGraph<TEntity, TRelation extends string = string> = Graph & {
102
- upsertEntity: (id: string, value: TEntity) => void;
103
- removeEntity: (id: string) => void;
104
- link: (from: string, to: string, relation: TRelation, weight?: number) => void;
105
- unlink: (from: string, to: string, relation?: TRelation) => void;
106
- related: (id: string, relation?: TRelation) => ReadonlyArray<KnowledgeEdge<TRelation>>;
107
- };
108
- declare function decay(baseScore: number, ageSeconds: number, ratePerSecond: number, minScore?: number): number;
109
- declare function lightCollection<T>(opts?: LightCollectionOptions): LightCollectionBundle<T>;
110
- declare function collection<T>(name: string, opts?: CollectionOptions<T>): CollectionGraph<T>;
111
- declare function vectorIndex<TMeta>(opts?: VectorIndexOptions<TMeta>): VectorIndexBundle<TMeta>;
112
- declare function knowledgeGraph<TEntity, TRelation extends string = string>(name: string): KnowledgeGraphGraph<TEntity, TRelation>;
113
-
114
- type index_CollectionEntry<T> = CollectionEntry<T>;
115
- type index_CollectionGraph<T> = CollectionGraph<T>;
116
- type index_CollectionOptions<T> = CollectionOptions<T>;
117
- type index_CollectionPolicy = CollectionPolicy;
118
- type index_HnswAdapter<TMeta> = HnswAdapter<TMeta>;
119
- type index_KnowledgeEdge<TRelation extends string = string> = KnowledgeEdge<TRelation>;
120
- type index_KnowledgeGraphGraph<TEntity, TRelation extends string = string> = KnowledgeGraphGraph<TEntity, TRelation>;
121
- type index_LightCollectionBundle<T> = LightCollectionBundle<T>;
122
- type index_LightCollectionEntry<T> = LightCollectionEntry<T>;
123
- type index_LightCollectionOptions = LightCollectionOptions;
124
- type index_RankedCollectionEntry<T> = RankedCollectionEntry<T>;
125
- type index_VectorBackend = VectorBackend;
126
- type index_VectorIndexBundle<TMeta> = VectorIndexBundle<TMeta>;
127
- type index_VectorIndexOptions<TMeta> = VectorIndexOptions<TMeta>;
128
- type index_VectorRecord<TMeta> = VectorRecord<TMeta>;
129
- type index_VectorSearchResult<TMeta> = VectorSearchResult<TMeta>;
130
- declare const index_collection: typeof collection;
131
- declare const index_decay: typeof decay;
132
- declare const index_knowledgeGraph: typeof knowledgeGraph;
133
- declare const index_lightCollection: typeof lightCollection;
134
- declare const index_vectorIndex: typeof vectorIndex;
135
- declare namespace index {
136
- export { type index_CollectionEntry as CollectionEntry, type index_CollectionGraph as CollectionGraph, type index_CollectionOptions as CollectionOptions, type index_CollectionPolicy as CollectionPolicy, type index_HnswAdapter as HnswAdapter, type index_KnowledgeEdge as KnowledgeEdge, type index_KnowledgeGraphGraph as KnowledgeGraphGraph, type index_LightCollectionBundle as LightCollectionBundle, type index_LightCollectionEntry as LightCollectionEntry, type index_LightCollectionOptions as LightCollectionOptions, type index_RankedCollectionEntry as RankedCollectionEntry, type index_VectorBackend as VectorBackend, type index_VectorIndexBundle as VectorIndexBundle, type index_VectorIndexOptions as VectorIndexOptions, type index_VectorRecord as VectorRecord, type index_VectorSearchResult as VectorSearchResult, index_collection as collection, index_decay as decay, index_knowledgeGraph as knowledgeGraph, index_lightCollection as lightCollection, index_vectorIndex as vectorIndex };
137
- }
138
-
139
- export { type CollectionEntry as C, type HnswAdapter as H, type KnowledgeGraphGraph as K, type LightCollectionBundle as L, type RankedCollectionEntry as R, type VectorSearchResult as V, type VectorIndexBundle as a, type CollectionGraph as b, type CollectionOptions as c, type CollectionPolicy as d, type KnowledgeEdge as e, type LightCollectionEntry as f, type LightCollectionOptions as g, type VectorBackend as h, index as i, type VectorIndexOptions as j, type VectorRecord as k, collection as l, decay as m, knowledgeGraph as n, lightCollection as o, vectorIndex as v };
@@ -1,186 +0,0 @@
1
- import { a as Node, N as NodeOptions } from './node-fSc-hCv8.cjs';
2
- import { a as GraphOptions, G as Graph } from './graph-CaNXUc3c.cjs';
3
-
4
- /**
5
- * Reduction primitives (roadmap §8.1).
6
- *
7
- * Composable building blocks for taking heterogeneous massive inputs and producing
8
- * prioritized, auditable, human-actionable output. Each primitive is either a Graph
9
- * factory or a Node factory, built on top of core + extra primitives.
10
- *
11
- * @module
12
- */
13
-
14
- type StepRef = string | Node<unknown>;
15
- /** A named stage for {@link funnel}. */
16
- type FunnelStage = {
17
- /** Stage name (mounted as subgraph). */
18
- name: string;
19
- /** Builder: receives a sub-graph, should add an `"input"` and `"output"` node. */
20
- build: (sub: Graph) => void;
21
- };
22
- /** Options for {@link funnel}. */
23
- type FunnelOptions = GraphOptions & {
24
- meta?: Record<string, unknown>;
25
- };
26
- /**
27
- * Multi-source merge with sequential reduction stages.
28
- *
29
- * Sources are merged into a single stream. Each stage is a named subgraph
30
- * (mounted via `graph.mount()`). Stages connect linearly:
31
- * `merged → stage[0].input → stage[0].output → stage[1].input → ...`
32
- *
33
- * @param name - Graph name.
34
- * @param sources - Input nodes to merge.
35
- * @param stages - Sequential reduction stages.
36
- * @param opts - Optional graph/meta options.
37
- * @returns Graph with `"merged"` and mounted stage subgraphs.
38
- *
39
- * @category patterns
40
- */
41
- declare function funnel<T>(name: string, sources: ReadonlyArray<Node<T>>, stages: ReadonlyArray<FunnelStage>, opts?: FunnelOptions): Graph;
42
- /** Options for {@link feedback}. */
43
- type FeedbackOptions = {
44
- /** Maximum feedback iterations before stopping (default: 10). */
45
- maxIterations?: number;
46
- /** Optional budget gate node path for cost-bounded iteration. */
47
- budgetNode?: StepRef;
48
- meta?: Record<string, unknown>;
49
- };
50
- /**
51
- * Introduce a bounded reactive cycle into an existing graph.
52
- *
53
- * When `condition` emits a non-null DATA value, the feedback effect routes it
54
- * back to the `reentry` state node — creating a cycle. Bounded by
55
- * `maxIterations` (default 10). The counter node (`__feedback_<condition>`)
56
- * is the source of truth — reset it to 0 to allow more iterations.
57
- *
58
- * To remove the feedback cycle, call `graph.remove("__feedback_<condition>")`.
59
- *
60
- * @param graph - Existing graph to augment with a feedback cycle.
61
- * @param condition - Path to a node whose DATA triggers feedback.
62
- * @param reentry - Path to a state node that receives the feedback value.
63
- * @param opts - Iteration bounds and metadata.
64
- * @returns The same graph (mutated with feedback nodes added).
65
- *
66
- * @category patterns
67
- */
68
- declare function feedback(graph: Graph, condition: string, reentry: string, opts?: FeedbackOptions): Graph;
69
- /** A reactive constraint for {@link budgetGate}. */
70
- type BudgetConstraint<T = unknown> = {
71
- /** Constraint node whose value is checked. */
72
- node: Node<T>;
73
- /** Returns `true` when the constraint is satisfied (budget available). */
74
- check: (value: T) => boolean;
75
- };
76
- /** Options for {@link budgetGate}. */
77
- type BudgetGateOptions = Omit<NodeOptions<unknown>, "describeKind" | "name" | "meta"> & {
78
- meta?: Record<string, unknown>;
79
- };
80
- /**
81
- * Pass-through that respects reactive constraint nodes.
82
- *
83
- * DATA flows through when all constraints are satisfied. When any constraint
84
- * is exceeded, PAUSE is sent upstream and DATA is buffered. When constraints
85
- * relax, RESUME is sent and buffered DATA flushes.
86
- *
87
- * @param source - Input node.
88
- * @param constraints - Reactive constraint checks.
89
- * @param opts - Optional node options.
90
- * @returns Gated node.
91
- *
92
- * @category patterns
93
- */
94
- declare function budgetGate<T>(source: Node<T>, constraints: ReadonlyArray<BudgetConstraint>, opts?: BudgetGateOptions): Node<T>;
95
- /** A scored item with full breakdown. */
96
- type ScoredItem<T = unknown> = {
97
- /** Original value. */
98
- value: T;
99
- /** Final weighted score. */
100
- score: number;
101
- /** Per-signal breakdown: signal index → weighted contribution. */
102
- breakdown: number[];
103
- };
104
- /** Options for {@link scorer}. */
105
- type ScorerOptions = Omit<NodeOptions<unknown>, "describeKind" | "name" | "meta"> & {
106
- meta?: Record<string, unknown>;
107
- /** Custom scoring function per signal. Default: identity (signal value IS the score). */
108
- scoreFns?: ReadonlyArray<(value: unknown) => number>;
109
- };
110
- /**
111
- * Reactive multi-signal scoring with live weights.
112
- *
113
- * Each source emits items to score. Weights are reactive state nodes that
114
- * LLM or human can adjust live. Output is sorted scored items with full
115
- * breakdown.
116
- *
117
- * @param sources - Signal nodes (each emits a numeric score dimension).
118
- * @param weights - Reactive weight nodes (one per source).
119
- * @param opts - Optional node/meta options.
120
- * @returns Node emitting scored output.
121
- *
122
- * @category patterns
123
- */
124
- declare function scorer(sources: ReadonlyArray<Node<number>>, weights: ReadonlyArray<Node<number>>, opts?: ScorerOptions): Node<ScoredItem<number[]>>;
125
- /** A single effectiveness record for an action×context pair. */
126
- type EffectivenessEntry = {
127
- readonly key: string;
128
- readonly attempts: number;
129
- readonly successes: number;
130
- readonly successRate: number;
131
- };
132
- /** Snapshot shape for the effectiveness tracker node. */
133
- type EffectivenessSnapshot = ReadonlyMap<string, EffectivenessEntry>;
134
- /** Bundle returned by {@link effectivenessTracker}. */
135
- interface EffectivenessTrackerBundle {
136
- /** Reactive node — current effectiveness map snapshot. */
137
- readonly node: Node<EffectivenessSnapshot>;
138
- /** Record a completed action (success or failure). */
139
- record(key: string, success: boolean): void;
140
- /** Look up effectiveness for a specific key. */
141
- lookup(key: string): EffectivenessEntry | undefined;
142
- /** Tear down internal keepalive subscriptions. */
143
- dispose(): void;
144
- }
145
- /** Options for {@link effectivenessTracker}. */
146
- type EffectivenessTrackerOptions = {
147
- /** Name for the reactive map (default "effectiveness-entries"). */
148
- name?: string;
149
- };
150
- /**
151
- * Generic action×context → success rate tracker.
152
- *
153
- * Generalized from the harness `strategyModel` pattern. Tracks attempts and
154
- * successes per string key, exposes a reactive snapshot node, and provides
155
- * `record()` / `lookup()` methods.
156
- *
157
- * Use cases: A/B testing, routing optimization, cache policy tuning, retry
158
- * strategy selection — any domain that tracks effectiveness per action.
159
- *
160
- * @param opts - Optional configuration.
161
- * @returns Bundle with reactive node, record(), lookup(), dispose().
162
- */
163
- declare function effectivenessTracker(opts?: EffectivenessTrackerOptions): EffectivenessTrackerBundle;
164
-
165
- type index_BudgetConstraint<T = unknown> = BudgetConstraint<T>;
166
- type index_BudgetGateOptions = BudgetGateOptions;
167
- type index_EffectivenessEntry = EffectivenessEntry;
168
- type index_EffectivenessSnapshot = EffectivenessSnapshot;
169
- type index_EffectivenessTrackerBundle = EffectivenessTrackerBundle;
170
- type index_EffectivenessTrackerOptions = EffectivenessTrackerOptions;
171
- type index_FeedbackOptions = FeedbackOptions;
172
- type index_FunnelOptions = FunnelOptions;
173
- type index_FunnelStage = FunnelStage;
174
- type index_ScoredItem<T = unknown> = ScoredItem<T>;
175
- type index_ScorerOptions = ScorerOptions;
176
- type index_StepRef = StepRef;
177
- declare const index_budgetGate: typeof budgetGate;
178
- declare const index_effectivenessTracker: typeof effectivenessTracker;
179
- declare const index_feedback: typeof feedback;
180
- declare const index_funnel: typeof funnel;
181
- declare const index_scorer: typeof scorer;
182
- declare namespace index {
183
- export { type index_BudgetConstraint as BudgetConstraint, type index_BudgetGateOptions as BudgetGateOptions, type index_EffectivenessEntry as EffectivenessEntry, type index_EffectivenessSnapshot as EffectivenessSnapshot, type index_EffectivenessTrackerBundle as EffectivenessTrackerBundle, type index_EffectivenessTrackerOptions as EffectivenessTrackerOptions, type index_FeedbackOptions as FeedbackOptions, type index_FunnelOptions as FunnelOptions, type index_FunnelStage as FunnelStage, type index_ScoredItem as ScoredItem, type index_ScorerOptions as ScorerOptions, type index_StepRef as StepRef, index_budgetGate as budgetGate, index_effectivenessTracker as effectivenessTracker, index_feedback as feedback, index_funnel as funnel, index_scorer as scorer };
184
- }
185
-
186
- export { type BudgetConstraint as B, type EffectivenessEntry as E, type FeedbackOptions as F, type ScoredItem as S, type BudgetGateOptions as a, type EffectivenessSnapshot as b, type EffectivenessTrackerBundle as c, type EffectivenessTrackerOptions as d, type FunnelOptions as e, type FunnelStage as f, type ScorerOptions as g, type StepRef as h, index as i, budgetGate as j, effectivenessTracker as k, feedback as l, funnel as m, scorer as s };