@graphrefly/graphrefly 0.27.0 → 0.29.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.
- package/dist/backoff-HPZMEZNF.js +1 -0
- package/dist/cascading-Bp99ckMJ.d.ts +180 -0
- package/dist/cascading-CcAgRacD.d.cts +180 -0
- package/dist/chunk-22F4K3G7.js +1 -0
- package/dist/chunk-22SVXUPB.js +64 -0
- package/dist/chunk-2GQREQ6C.js +1 -0
- package/dist/chunk-3JXNEPCD.js +2 -0
- package/dist/chunk-4JJCCD5S.js +2 -0
- package/dist/chunk-4OFIQ66T.js +1 -0
- package/dist/chunk-4V4C7K56.js +1 -0
- package/dist/chunk-4VVTGLXJ.js +1 -0
- package/dist/chunk-567NWZ3T.js +1 -0
- package/dist/chunk-5JDE5JHE.js +1 -0
- package/dist/chunk-5QDBSZBV.js +1 -0
- package/dist/chunk-5Z4HDCO6.js +1 -0
- package/dist/chunk-63FFOHLA.js +1 -0
- package/dist/chunk-6QZNQS5B.js +1 -0
- package/dist/chunk-7JDLFI6N.js +1 -0
- package/dist/chunk-7TDOES3L.js +1 -0
- package/dist/chunk-A7IAQQ63.js +1 -0
- package/dist/chunk-AMG5VBHW.js +1 -0
- package/dist/chunk-AUY2YKCO.js +1 -0
- package/dist/chunk-AV3PIDFQ.js +1 -0
- package/dist/chunk-BA5URFYW.js +1 -0
- package/dist/chunk-BKPLTBL5.js +1 -0
- package/dist/chunk-BZP5T4X6.js +1 -0
- package/dist/chunk-CK2E7BTU.js +1 -0
- package/dist/chunk-CSJE2EKV.js +1 -0
- package/dist/chunk-E3AXATVZ.js +9 -0
- package/dist/chunk-ESMPEKEV.js +1 -0
- package/dist/chunk-GJR3P6JG.js +1 -0
- package/dist/chunk-GNCBXARM.js +1 -0
- package/dist/chunk-GPW2V3RE.js +1 -0
- package/dist/chunk-HSIEYSDY.js +1 -0
- package/dist/chunk-I6VIH3VA.js +1 -0
- package/dist/chunk-ISCENNXS.js +1 -0
- package/dist/chunk-JYOUF6UQ.js +1 -0
- package/dist/chunk-KASHOCF5.js +1 -0
- package/dist/chunk-LGSNR4LU.js +5 -0
- package/dist/chunk-LVGBLZM2.js +1 -0
- package/dist/chunk-MGKAO4EK.js +7 -0
- package/dist/chunk-NSG4C6BF.js +23 -0
- package/dist/chunk-OL33ZI6R.js +1 -0
- package/dist/chunk-PCZ35NXD.js +78 -0
- package/dist/chunk-PGMUCUHG.js +43 -0
- package/dist/chunk-QYADASLV.js +1 -0
- package/dist/chunk-RD52SNH2.js +1 -0
- package/dist/chunk-SLMYTGTU.js +1 -0
- package/dist/chunk-TWMEGG45.js +1 -0
- package/dist/chunk-UVJQ35G2.js +1 -0
- package/dist/chunk-VGTCGNRX.js +18 -0
- package/dist/chunk-VIMF6LGM.js +1 -0
- package/dist/chunk-VJLMUKOI.js +1 -0
- package/dist/chunk-VWPRPPKR.js +1 -0
- package/dist/chunk-W4TSQ6RJ.js +1 -0
- package/dist/chunk-WM7H7WTY.js +3 -0
- package/dist/chunk-Y32RJO24.js +1 -0
- package/dist/chunk-Y53B6NS4.js +1 -0
- package/dist/compat/index.cjs +15 -7656
- package/dist/compat/index.d.cts +15 -14
- package/dist/compat/index.d.ts +15 -14
- package/dist/compat/index.js +1 -50
- package/dist/compat/jotai/index.cjs +1 -2048
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/jotai/index.js +1 -9
- package/dist/compat/nanostores/index.cjs +1 -2175
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nanostores/index.js +1 -23
- package/dist/compat/nestjs/index.cjs +15 -6782
- package/dist/compat/nestjs/index.d.cts +7 -6
- package/dist/compat/nestjs/index.d.ts +7 -6
- package/dist/compat/nestjs/index.js +1 -83
- package/dist/compat/react/index.cjs +1 -141
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/react/index.js +1 -12
- package/dist/compat/solid/index.cjs +1 -128
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/solid/index.js +1 -12
- package/dist/compat/svelte/index.cjs +1 -131
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/svelte/index.js +1 -12
- package/dist/compat/vue/index.cjs +1 -146
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/vue/index.js +1 -12
- package/dist/compat/zustand/index.cjs +7 -4931
- package/dist/compat/zustand/index.d.cts +5 -5
- package/dist/compat/zustand/index.d.ts +5 -5
- package/dist/compat/zustand/index.js +1 -12
- package/dist/composite-BL-llbnE.d.ts +69 -0
- package/dist/composite-Dze--DaA.d.cts +69 -0
- package/dist/core/index.cjs +1 -2271
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +1 -110
- package/dist/extra/browser.cjs +1 -0
- package/dist/extra/browser.d.cts +3 -0
- package/dist/extra/browser.d.ts +3 -0
- package/dist/extra/browser.js +1 -0
- package/dist/extra/index.cjs +24 -9971
- package/dist/extra/index.d.cts +13 -6
- package/dist/extra/index.d.ts +13 -6
- package/dist/extra/index.js +1 -381
- package/dist/extra/node.cjs +3 -0
- package/dist/extra/node.d.cts +81 -0
- package/dist/extra/node.d.ts +81 -0
- package/dist/extra/node.js +2 -0
- package/dist/extra/operators.cjs +1 -0
- package/dist/extra/operators.d.cts +910 -0
- package/dist/extra/operators.d.ts +910 -0
- package/dist/extra/operators.js +1 -0
- package/dist/extra/reactive.cjs +1 -0
- package/dist/extra/reactive.d.cts +352 -0
- package/dist/extra/reactive.d.ts +352 -0
- package/dist/extra/reactive.js +1 -0
- package/dist/extra/sources.cjs +1 -2486
- package/dist/extra/sources.d.cts +6 -2
- package/dist/extra/sources.d.ts +6 -2
- package/dist/extra/sources.js +1 -57
- package/dist/extra/storage-browser.cjs +1 -0
- package/dist/extra/storage-browser.d.cts +71 -0
- package/dist/extra/storage-browser.d.ts +71 -0
- package/dist/extra/storage-browser.js +1 -0
- package/dist/extra/storage-core.cjs +1 -0
- package/dist/extra/storage-core.d.cts +98 -0
- package/dist/extra/storage-core.d.ts +98 -0
- package/dist/extra/storage-core.js +1 -0
- package/dist/extra/storage-node.cjs +2 -0
- package/dist/extra/storage-node.d.cts +60 -0
- package/dist/extra/storage-node.d.ts +60 -0
- package/dist/extra/storage-node.js +1 -0
- package/dist/fallback-BaTS7vVY.d.cts +258 -0
- package/dist/fallback-eOm3LNxP.d.ts +258 -0
- package/dist/graph/index.cjs +7 -5030
- package/dist/graph/index.d.cts +6 -5
- package/dist/graph/index.d.ts +6 -5
- package/dist/graph/index.js +1 -50
- package/dist/{graph-DNCrvZSn.d.cts → graph-DgohqXK-.d.cts} +151 -32
- package/dist/{graph-CCwGKLCm.d.ts → graph-Qjg9gWHI.d.ts} +151 -32
- package/dist/{index-BwfLUNw4.d.ts → index-2BVuRCI4.d.ts} +173 -2040
- package/dist/{index-BPVt8kqc.d.ts → index-2NvguqQA.d.ts} +10 -195
- package/dist/index-A65LZhoM.d.ts +186 -0
- package/dist/{index-DlLp-2Xn.d.cts → index-B-8FCEua.d.cts} +10 -195
- package/dist/index-B-gqvYel.d.ts +135 -0
- package/dist/index-B2PRuolf.d.cts +86 -0
- package/dist/index-BJqt9EwW.d.ts +231 -0
- package/dist/{index-BHlKbUwO.d.cts → index-BKjT5DiZ.d.cts} +173 -2040
- package/dist/{index-C0svESO4.d.ts → index-BM8BU4q6.d.ts} +1 -1
- package/dist/{index-VdHQMPy1.d.ts → index-BQaEnxBf.d.ts} +1 -1
- package/dist/index-BSfwiy5B.d.ts +192 -0
- package/dist/index-BTSkeCZs.d.cts +291 -0
- package/dist/index-BUVtw1Ay.d.cts +186 -0
- package/dist/index-BUi57v_p.d.ts +163 -0
- package/dist/{messaging-Gt4LPbyA.d.cts → index-BanNUILp.d.cts} +31 -93
- package/dist/{audit-DRlSzBu9.d.ts → index-BayHDRx6.d.cts} +27 -21
- package/dist/{index-B6D3QNSA.d.ts → index-BiyjsZ0m.d.ts} +148 -20
- package/dist/index-BqZ6vB2A.d.ts +2057 -0
- package/dist/{memory-li6FL5RM.d.ts → index-BuVidq3D.d.cts} +26 -26
- package/dist/index-Byh-xTyp.d.ts +105 -0
- package/dist/index-C08QPDcV.d.cts +321 -0
- package/dist/{demo-shell-BDkOptd6.d.ts → index-C66RJiX8.d.ts} +14 -14
- package/dist/index-C8RfjffH.d.ts +291 -0
- package/dist/index-CA1Cu7Ud.d.ts +873 -0
- package/dist/{index-ByQxazQJ.d.cts → index-CABbltIu.d.cts} +1 -1
- package/dist/{index-VHqptjhu.d.cts → index-CHEBsnYv.d.cts} +1 -1
- package/dist/{index-BuEoe-Qu.d.ts → index-CI0yDnLp.d.ts} +9 -9
- package/dist/{index-B9B7_HEY.d.ts → index-CJ45TW-h.d.ts} +1 -1
- package/dist/{index-CO8uBlUh.d.cts → index-CJZKZoo4.d.cts} +148 -20
- package/dist/{index-wEn0eFe8.d.ts → index-CX2tFJL1.d.ts} +1 -1
- package/dist/{index-BaSM3aYt.d.ts → index-CcWOJ6F0.d.ts} +3 -3
- package/dist/{audit-ClmqGOCx.d.cts → index-CiaVoZGo.d.ts} +27 -21
- package/dist/{index-Dzk2hrlR.d.ts → index-Ct5CWc4E.d.ts} +1 -1
- package/dist/index-D38duMCv.d.cts +357 -0
- package/dist/{index-C8oil6M6.d.ts → index-D5XJ2tSx.d.ts} +30 -6
- package/dist/{index-DO_6JN9Z.d.cts → index-D80do5jX.d.cts} +1 -1
- package/dist/index-D9HKAH_-.d.cts +231 -0
- package/dist/index-DBe_8XW5.d.cts +143 -0
- package/dist/{memory-C6Z2tGpC.d.cts → index-DCeTyFlB.d.ts} +26 -26
- package/dist/index-DDy8eeXS.d.ts +321 -0
- package/dist/index-DJ5oNBc8.d.ts +143 -0
- package/dist/{index-CI3DprxP.d.cts → index-DP0_O3ls.d.cts} +30 -6
- package/dist/{demo-shell-Crid1WdR.d.cts → index-DX8xS-yB.d.cts} +14 -14
- package/dist/index-DiZejfCI.d.cts +2057 -0
- package/dist/index-DknyJ2Fu.d.cts +163 -0
- package/dist/index-DoWMs-Kk.d.cts +135 -0
- package/dist/{messaging-XDoYablx.d.ts → index-DuB5aO4-.d.ts} +31 -93
- package/dist/index-DwjJGKxV.d.ts +357 -0
- package/dist/{index-B6EhDnjH.d.cts → index-H_oxVec5.d.cts} +1 -1
- package/dist/{index-3lsddbbS.d.ts → index-IMAHq-ia.d.ts} +1 -1
- package/dist/{index-B1tloyhO.d.cts → index-U1nir7MX.d.cts} +1 -1
- package/dist/index-Vg7tORgk.d.ts +86 -0
- package/dist/index-dig-r2tQ.d.cts +873 -0
- package/dist/{index-CxFrXH4m.d.ts → index-gsT79Xu9.d.ts} +1 -1
- package/dist/{index-D8wS_PeY.d.cts → index-i99Ka8s7.d.cts} +9 -9
- package/dist/index-iKkyJosF.d.cts +105 -0
- package/dist/{index-Xi3u0HCQ.d.cts → index-jleeotBT.d.cts} +1 -1
- package/dist/{index-DVGiGFGT.d.cts → index-kykKWwV-.d.cts} +3 -3
- package/dist/index-vgcLF5TH.d.cts +192 -0
- package/dist/{index-DYme44FM.d.cts → index-y1RllPn4.d.cts} +1 -1
- package/dist/index.cjs +151 -24142
- package/dist/index.d.cts +69 -2099
- package/dist/index.d.ts +69 -2099
- package/dist/index.js +1 -3868
- package/dist/{meta-CbznRPYJ.d.ts → meta-CX7YsOzp.d.cts} +5 -5
- package/dist/{meta-BxCA7rcr.d.cts → meta-CckhhFRd.d.ts} +5 -5
- package/dist/{node-BmerH3kS.d.cts → node-Dd6wHSib.d.cts} +71 -11
- package/dist/{node-BmerH3kS.d.ts → node-Dd6wHSib.d.ts} +71 -11
- package/dist/{observable-BgGUwcqp.d.ts → observable-BZJgo616.d.ts} +1 -1
- package/dist/{observable-DJt_AxzQ.d.cts → observable-kwzpLvbi.d.cts} +1 -1
- package/dist/patterns/ai/browser.cjs +25 -0
- package/dist/patterns/ai/browser.d.cts +127 -0
- package/dist/patterns/ai/browser.d.ts +127 -0
- package/dist/patterns/ai/browser.js +3 -0
- package/dist/patterns/ai/index.cjs +92 -0
- package/dist/patterns/ai/index.d.cts +17 -0
- package/dist/patterns/ai/index.d.ts +17 -0
- package/dist/patterns/ai/index.js +1 -0
- package/dist/patterns/ai/node.cjs +2 -0
- package/dist/patterns/ai/node.d.cts +58 -0
- package/dist/patterns/ai/node.d.ts +58 -0
- package/dist/patterns/ai/node.js +1 -0
- package/dist/patterns/audit/index.cjs +7 -0
- package/dist/patterns/audit/index.d.cts +6 -0
- package/dist/patterns/audit/index.d.ts +6 -0
- package/dist/patterns/audit/index.js +1 -0
- package/dist/patterns/cqrs/index.cjs +7 -0
- package/dist/patterns/cqrs/index.d.cts +5 -0
- package/dist/patterns/cqrs/index.d.ts +5 -0
- package/dist/patterns/cqrs/index.js +1 -0
- package/dist/patterns/demo-shell/index.cjs +8 -0
- package/dist/patterns/demo-shell/index.d.cts +6 -0
- package/dist/patterns/demo-shell/index.d.ts +6 -0
- package/dist/patterns/demo-shell/index.js +1 -0
- package/dist/patterns/domain-templates/index.cjs +7 -0
- package/dist/patterns/domain-templates/index.d.cts +5 -0
- package/dist/patterns/domain-templates/index.d.ts +5 -0
- package/dist/patterns/domain-templates/index.js +1 -0
- package/dist/patterns/graphspec/index.cjs +84 -0
- package/dist/patterns/graphspec/index.d.cts +7 -0
- package/dist/patterns/graphspec/index.d.ts +7 -0
- package/dist/patterns/graphspec/index.js +1 -0
- package/dist/patterns/guarded-execution/index.cjs +7 -0
- package/dist/patterns/guarded-execution/index.d.cts +7 -0
- package/dist/patterns/guarded-execution/index.d.ts +7 -0
- package/dist/patterns/guarded-execution/index.js +1 -0
- package/dist/patterns/harness/index.cjs +49 -0
- package/dist/patterns/harness/index.d.cts +11 -0
- package/dist/patterns/harness/index.d.ts +11 -0
- package/dist/patterns/harness/index.js +1 -0
- package/dist/patterns/job-queue/index.cjs +7 -0
- package/dist/patterns/job-queue/index.d.cts +5 -0
- package/dist/patterns/job-queue/index.d.ts +5 -0
- package/dist/patterns/job-queue/index.js +1 -0
- package/dist/patterns/lens/index.cjs +7 -0
- package/dist/patterns/lens/index.d.cts +7 -0
- package/dist/patterns/lens/index.d.ts +7 -0
- package/dist/patterns/lens/index.js +1 -0
- package/dist/patterns/memory/index.cjs +7 -0
- package/dist/patterns/memory/index.d.cts +5 -0
- package/dist/patterns/memory/index.d.ts +5 -0
- package/dist/patterns/memory/index.js +1 -0
- package/dist/patterns/messaging/index.cjs +7 -0
- package/dist/patterns/messaging/index.d.cts +5 -0
- package/dist/patterns/messaging/index.d.ts +5 -0
- package/dist/patterns/messaging/index.js +1 -0
- package/dist/patterns/orchestration/index.cjs +7 -0
- package/dist/patterns/orchestration/index.d.cts +6 -0
- package/dist/patterns/orchestration/index.d.ts +6 -0
- package/dist/patterns/orchestration/index.js +1 -0
- package/dist/patterns/reactive-layout/index.cjs +8 -6444
- package/dist/patterns/reactive-layout/index.d.cts +6 -6
- package/dist/patterns/reactive-layout/index.d.ts +6 -6
- package/dist/patterns/reactive-layout/index.js +1 -56
- package/dist/patterns/reduction/index.cjs +7 -0
- package/dist/patterns/reduction/index.d.cts +5 -0
- package/dist/patterns/reduction/index.d.ts +5 -0
- package/dist/patterns/reduction/index.js +1 -0
- package/dist/patterns/refine-loop/index.cjs +9 -0
- package/dist/patterns/refine-loop/index.d.cts +7 -0
- package/dist/patterns/refine-loop/index.d.ts +7 -0
- package/dist/patterns/refine-loop/index.js +1 -0
- package/dist/patterns/resilient-pipeline/index.cjs +1 -0
- package/dist/patterns/resilient-pipeline/index.d.cts +7 -0
- package/dist/patterns/resilient-pipeline/index.d.ts +7 -0
- package/dist/patterns/resilient-pipeline/index.js +1 -0
- package/dist/patterns/surface/index.cjs +15 -0
- package/dist/patterns/surface/index.d.cts +8 -0
- package/dist/patterns/surface/index.d.ts +8 -0
- package/dist/patterns/surface/index.js +1 -0
- package/dist/{reactive-layout-u5Ulnqag.d.ts → reactive-layout-BkBwVvwm.d.ts} +2 -2
- package/dist/{reactive-layout-MQP--J3F.d.cts → reactive-layout-PiFwVaWS.d.cts} +2 -2
- package/dist/reactive-log-1QTyx10a.d.ts +190 -0
- package/dist/reactive-log-BiVoSxke.d.cts +190 -0
- package/dist/{composite-aUCvjZVR.d.ts → reactive-map-CwO_COHy.d.cts} +2 -67
- package/dist/{composite-C7PcQvcs.d.cts → reactive-map-FeuTVAJb.d.ts} +2 -67
- package/dist/resilience-CBfYJW5C.d.ts +493 -0
- package/dist/resilience-XRUF267O.js +1 -0
- package/dist/resilience-uBz4yvYB.d.cts +493 -0
- package/dist/{sugar-CCOxXK1e.d.ts → sugar-CY-MCfZ9.d.ts} +17 -15
- package/dist/{sugar-D02n5JjF.d.cts → sugar-DHttV0LX.d.cts} +17 -15
- package/dist/topology-tree-CVjt2gp7.d.cts +25 -0
- package/dist/topology-tree-one6oSKY.d.ts +25 -0
- package/dist/types-O3GzJY2U.d.cts +401 -0
- package/dist/types-u64Ose53.d.ts +401 -0
- package/package.json +252 -22
- package/dist/ai-CaR_912Q.d.cts +0 -1033
- package/dist/ai-WlRltJV7.d.ts +0 -1033
- package/dist/chunk-3ZWCKRHX.js +0 -117
- package/dist/chunk-3ZWCKRHX.js.map +0 -1
- package/dist/chunk-7TAQJHQV.js +0 -103
- package/dist/chunk-7TAQJHQV.js.map +0 -1
- package/dist/chunk-APFNLIRG.js +0 -62
- package/dist/chunk-APFNLIRG.js.map +0 -1
- package/dist/chunk-AT5LKYNL.js +0 -395
- package/dist/chunk-AT5LKYNL.js.map +0 -1
- package/dist/chunk-BQ6RQQFF.js +0 -5087
- package/dist/chunk-BQ6RQQFF.js.map +0 -1
- package/dist/chunk-BVZYTZ5H.js +0 -599
- package/dist/chunk-BVZYTZ5H.js.map +0 -1
- package/dist/chunk-DST5DKZS.js +0 -1371
- package/dist/chunk-DST5DKZS.js.map +0 -1
- package/dist/chunk-GTE6PWRZ.js +0 -866
- package/dist/chunk-GTE6PWRZ.js.map +0 -1
- package/dist/chunk-HXZEYDUR.js +0 -94
- package/dist/chunk-HXZEYDUR.js.map +0 -1
- package/dist/chunk-J22W6HV3.js +0 -107
- package/dist/chunk-J22W6HV3.js.map +0 -1
- package/dist/chunk-J2VBW3DZ.js +0 -302
- package/dist/chunk-J2VBW3DZ.js.map +0 -1
- package/dist/chunk-JSCT3CR4.js +0 -38
- package/dist/chunk-JSCT3CR4.js.map +0 -1
- package/dist/chunk-JWBCY4NC.js +0 -330
- package/dist/chunk-JWBCY4NC.js.map +0 -1
- package/dist/chunk-K2AUJHVP.js +0 -2251
- package/dist/chunk-K2AUJHVP.js.map +0 -1
- package/dist/chunk-MJ2NKQQL.js +0 -119
- package/dist/chunk-MJ2NKQQL.js.map +0 -1
- package/dist/chunk-N6UR7YVY.js +0 -198
- package/dist/chunk-N6UR7YVY.js.map +0 -1
- package/dist/chunk-NC6S43JJ.js +0 -456
- package/dist/chunk-NC6S43JJ.js.map +0 -1
- package/dist/chunk-OFVJBJXR.js +0 -98
- package/dist/chunk-OFVJBJXR.js.map +0 -1
- package/dist/chunk-OHISZPOJ.js +0 -97
- package/dist/chunk-OHISZPOJ.js.map +0 -1
- package/dist/chunk-OU5CQKNW.js +0 -102
- package/dist/chunk-OU5CQKNW.js.map +0 -1
- package/dist/chunk-PF7GRZMW.js +0 -2712
- package/dist/chunk-PF7GRZMW.js.map +0 -1
- package/dist/chunk-PHOUUNK7.js +0 -2291
- package/dist/chunk-PHOUUNK7.js.map +0 -1
- package/dist/chunk-RNHBMHKA.js +0 -1665
- package/dist/chunk-RNHBMHKA.js.map +0 -1
- package/dist/chunk-SX52TAR4.js +0 -110
- package/dist/chunk-SX52TAR4.js.map +0 -1
- package/dist/chunk-VYPWMZ6H.js +0 -98
- package/dist/chunk-VYPWMZ6H.js.map +0 -1
- package/dist/chunk-WBZOVTYK.js +0 -171
- package/dist/chunk-WBZOVTYK.js.map +0 -1
- package/dist/chunk-WKNUIZOY.js +0 -354
- package/dist/chunk-WKNUIZOY.js.map +0 -1
- package/dist/chunk-X3VMZYBT.js +0 -713
- package/dist/chunk-X3VMZYBT.js.map +0 -1
- package/dist/chunk-X5R3GL6H.js +0 -525
- package/dist/chunk-X5R3GL6H.js.map +0 -1
- package/dist/chunk-XGPU467M.js +0 -136
- package/dist/chunk-XGPU467M.js.map +0 -1
- package/dist/compat/index.cjs.map +0 -1
- package/dist/compat/index.js.map +0 -1
- package/dist/compat/jotai/index.cjs.map +0 -1
- package/dist/compat/jotai/index.js.map +0 -1
- package/dist/compat/nanostores/index.cjs.map +0 -1
- package/dist/compat/nanostores/index.js.map +0 -1
- package/dist/compat/nestjs/index.cjs.map +0 -1
- package/dist/compat/nestjs/index.js.map +0 -1
- package/dist/compat/react/index.cjs.map +0 -1
- package/dist/compat/react/index.js.map +0 -1
- package/dist/compat/solid/index.cjs.map +0 -1
- package/dist/compat/solid/index.js.map +0 -1
- package/dist/compat/svelte/index.cjs.map +0 -1
- package/dist/compat/svelte/index.js.map +0 -1
- package/dist/compat/vue/index.cjs.map +0 -1
- package/dist/compat/vue/index.js.map +0 -1
- package/dist/compat/zustand/index.cjs.map +0 -1
- package/dist/compat/zustand/index.js.map +0 -1
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/extra/index.cjs.map +0 -1
- package/dist/extra/index.js.map +0 -1
- package/dist/extra/sources.cjs.map +0 -1
- package/dist/extra/sources.js.map +0 -1
- package/dist/graph/index.cjs.map +0 -1
- package/dist/graph/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/patterns/ai.cjs +0 -7930
- package/dist/patterns/ai.cjs.map +0 -1
- package/dist/patterns/ai.d.cts +0 -10
- package/dist/patterns/ai.d.ts +0 -10
- package/dist/patterns/ai.js +0 -71
- package/dist/patterns/ai.js.map +0 -1
- package/dist/patterns/audit.cjs +0 -5805
- package/dist/patterns/audit.cjs.map +0 -1
- package/dist/patterns/audit.d.cts +0 -6
- package/dist/patterns/audit.d.ts +0 -6
- package/dist/patterns/audit.js +0 -29
- package/dist/patterns/audit.js.map +0 -1
- package/dist/patterns/demo-shell.cjs +0 -5604
- package/dist/patterns/demo-shell.cjs.map +0 -1
- package/dist/patterns/demo-shell.d.cts +0 -6
- package/dist/patterns/demo-shell.d.ts +0 -6
- package/dist/patterns/demo-shell.js +0 -15
- package/dist/patterns/demo-shell.js.map +0 -1
- package/dist/patterns/memory.cjs +0 -5283
- package/dist/patterns/memory.cjs.map +0 -1
- package/dist/patterns/memory.d.cts +0 -5
- package/dist/patterns/memory.d.ts +0 -5
- package/dist/patterns/memory.js +0 -20
- package/dist/patterns/memory.js.map +0 -1
- package/dist/patterns/reactive-layout/index.cjs.map +0 -1
- package/dist/patterns/reactive-layout/index.js.map +0 -1
- package/dist/storage-CMjUUuxn.d.ts +0 -190
- package/dist/storage-DdWlZo6U.d.cts +0 -190
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import { a as Node } from './node-Dd6wHSib.js';
|
|
2
|
+
import { NodeInput } from './extra/sources.js';
|
|
3
|
+
import { a as GraphOptions, G as Graph } from './graph-Qjg9gWHI.js';
|
|
4
|
+
import { T as TopicGraph } from './index-DuB5aO4-.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* refineLoop — universal prompt/artifact optimization loop as a reactive Graph.
|
|
8
|
+
*
|
|
9
|
+
* Roadmap §9.8 (Wave 2.5). The loop is a 4-topic reactive pipeline:
|
|
10
|
+
*
|
|
11
|
+
* iterationTrigger ──▶ GENERATE ──▶ EVALUATE ──▶ ANALYZE ──▶ DECIDE
|
|
12
|
+
* │ │
|
|
13
|
+
* └─────── feedback + trigger ◀─────┘
|
|
14
|
+
*
|
|
15
|
+
* Each stage is a `TopicGraph` so dispatches stay O(1) per subscriber (cursor-
|
|
16
|
+
* based) and every iteration is observable, replayable, and checkpointable.
|
|
17
|
+
*
|
|
18
|
+
* Composition invariants (from COMPOSITION-GUIDE):
|
|
19
|
+
* - §7 feedback cycle: only `iterationTrigger` drives re-generation. Strategy
|
|
20
|
+
* + feedback + dataset are read via closure updaters (§28 factory-time seed)
|
|
21
|
+
* so mid-run swaps apply to the NEXT iteration, never retrigger the current.
|
|
22
|
+
* - §28 factory-time seed: strategy, lastFeedback, prevCandidates, dataset
|
|
23
|
+
* closures captured at wiring time + updated via subscribe handlers so the
|
|
24
|
+
* first activation doesn't drop the initial pair.
|
|
25
|
+
* - §32 nested-drain state-mirror: the decide-effect writes `lastFeedback`
|
|
26
|
+
* BEFORE bumping `iterationTrigger` inside its `batch()`, guaranteeing the
|
|
27
|
+
* mirror is current when the next-iteration wave reaches the generate fn.
|
|
28
|
+
* - §19 terminal-emission: history / best emit once per iteration (settled),
|
|
29
|
+
* not on every intermediate wave.
|
|
30
|
+
* - §27 attachStorage: the whole graph is checkpointable — pause overnight,
|
|
31
|
+
* resume tomorrow from the exact iteration count, candidate set, strategy.
|
|
32
|
+
*
|
|
33
|
+
* Scope clamp (v1): core factory + `RefineStrategy<T>` + `blindVariation` and
|
|
34
|
+
* `errorCritique` built-ins + budget gating + checkpoint/resume.
|
|
35
|
+
* `mutateAndRefine` / registry / `autoSelectStrategy` / `optimizeCatalog` /
|
|
36
|
+
* `refineExecutor` are deferred.
|
|
37
|
+
*
|
|
38
|
+
* @module
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/** A single task row — the unit the evaluator scores one candidate against. */
|
|
42
|
+
interface DatasetItem {
|
|
43
|
+
readonly id: string;
|
|
44
|
+
readonly [k: string]: unknown;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* One candidate's score on one task. Higher is better by convention.
|
|
48
|
+
*
|
|
49
|
+
* Set `candidateIndex` when the evaluator fans out scores across multiple
|
|
50
|
+
* candidates (e.g. `candidates × tasks`). `pickBest` aggregates mean scores
|
|
51
|
+
* per `candidateIndex` when present; when absent, falls back to positional
|
|
52
|
+
* alignment (`scores[i]` ↔ `candidates[i]`).
|
|
53
|
+
*/
|
|
54
|
+
interface EvalResult {
|
|
55
|
+
readonly taskId: string;
|
|
56
|
+
readonly score: number;
|
|
57
|
+
readonly error?: string;
|
|
58
|
+
readonly detail?: unknown;
|
|
59
|
+
/** 0-based index into the `candidates` batch this score belongs to. */
|
|
60
|
+
readonly candidateIndex?: number;
|
|
61
|
+
}
|
|
62
|
+
/** Aggregated feedback the strategy produces from a scores batch. */
|
|
63
|
+
interface Feedback {
|
|
64
|
+
readonly summary: string;
|
|
65
|
+
readonly critique?: unknown;
|
|
66
|
+
readonly weakTasks?: readonly string[];
|
|
67
|
+
readonly score: number;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Strategy interface — plain object, no base class. Strategies implement three
|
|
71
|
+
* pure hooks; the loop infrastructure wraps them in reactive nodes so every
|
|
72
|
+
* decision is visible in `describe()`.
|
|
73
|
+
*
|
|
74
|
+
* `generate` may be sync or async. Async generates yield a microtask per
|
|
75
|
+
* iteration — that's what gives `pause()` / `setStrategy()` a window to
|
|
76
|
+
* interleave. **A fully synchronous `generate` will drain the entire loop
|
|
77
|
+
* during factory activation** (all iterations run before `refineLoop()`
|
|
78
|
+
* returns), which is usually not what you want for observable, steerable
|
|
79
|
+
* loops. Real strategies that call LLMs / evals are async and Just Work;
|
|
80
|
+
* custom sync strategies for tests are fine but should be marked `async`
|
|
81
|
+
* to match real cadence.
|
|
82
|
+
*/
|
|
83
|
+
interface RefineStrategy<T> {
|
|
84
|
+
readonly name: string;
|
|
85
|
+
/** Produce initial candidates from the seed. Called at iteration 0. */
|
|
86
|
+
seed(seed: T): readonly T[];
|
|
87
|
+
/** Reduce scores to feedback. Pure function. */
|
|
88
|
+
analyze(scores: readonly EvalResult[], candidates: readonly T[]): Feedback;
|
|
89
|
+
/**
|
|
90
|
+
* Generate next-iteration candidates from feedback + prior candidates.
|
|
91
|
+
* Async allowed — the loop awaits via `fromAny`.
|
|
92
|
+
*/
|
|
93
|
+
generate(feedback: Feedback, candidates: readonly T[]): Promise<readonly T[]> | readonly T[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Evaluator shape — Shape 4 (2026-04-22): both `candidates` and `dataset` are
|
|
97
|
+
* reactive nodes; the evaluator's returned node IS the EVALUATE topic's source
|
|
98
|
+
* (no glue). Implementers can batch-eval (e.g. `funnel` with concurrency) or
|
|
99
|
+
* map per-candidate — user's code.
|
|
100
|
+
*/
|
|
101
|
+
type Evaluator<T> = (candidates: Node<readonly T[]>, dataset: Node<readonly DatasetItem[]>) => Node<readonly EvalResult[]>;
|
|
102
|
+
/**
|
|
103
|
+
* Early-stop controls. Each field fans into its own derived node; the four
|
|
104
|
+
* combine via `||` into `converged: Node<boolean>`. Callers see exactly
|
|
105
|
+
* which rule tripped via `status` / the DECIDE topic's `reason`.
|
|
106
|
+
*/
|
|
107
|
+
interface ConvergenceOptions {
|
|
108
|
+
/** Stop when aggregate score has not improved for N iterations. */
|
|
109
|
+
patience?: number;
|
|
110
|
+
/** Stop when aggregate score reaches or exceeds this. */
|
|
111
|
+
minScore?: number;
|
|
112
|
+
/** Stop when absolute delta between consecutive scores falls below this. */
|
|
113
|
+
minDelta?: number;
|
|
114
|
+
/** Stop after N total evaluations (iteration count × per-iter candidates). */
|
|
115
|
+
maxEvaluations?: number;
|
|
116
|
+
/** Stop after N iterations. Always set a finite bound in production. */
|
|
117
|
+
maxIterations?: number;
|
|
118
|
+
}
|
|
119
|
+
/** Emitted to the GENERATE topic each time the strategy produces a batch. */
|
|
120
|
+
interface GenerateEvent<T> {
|
|
121
|
+
readonly iteration: number;
|
|
122
|
+
readonly candidates: readonly T[];
|
|
123
|
+
readonly timestamp_ns: number;
|
|
124
|
+
}
|
|
125
|
+
/** Emitted to the EVALUATE topic when scores settle for an iteration. */
|
|
126
|
+
interface EvaluateEvent<T> {
|
|
127
|
+
readonly iteration: number;
|
|
128
|
+
readonly candidates: readonly T[];
|
|
129
|
+
readonly scores: readonly EvalResult[];
|
|
130
|
+
readonly timestamp_ns: number;
|
|
131
|
+
}
|
|
132
|
+
/** Emitted to the ANALYZE topic — strategy's reduction over scores. */
|
|
133
|
+
interface AnalyzeEvent<T> {
|
|
134
|
+
readonly iteration: number;
|
|
135
|
+
readonly candidates: readonly T[];
|
|
136
|
+
readonly feedback: Feedback;
|
|
137
|
+
readonly timestamp_ns: number;
|
|
138
|
+
}
|
|
139
|
+
/** Emitted to the DECIDE topic — branch taken this iteration. */
|
|
140
|
+
interface DecideEvent {
|
|
141
|
+
readonly iteration: number;
|
|
142
|
+
readonly decision: "continue" | "converged" | "budget" | "paused";
|
|
143
|
+
readonly reason?: string;
|
|
144
|
+
readonly timestamp_ns: number;
|
|
145
|
+
}
|
|
146
|
+
type RefineStatus = "running" | "converged" | "budget" | "paused" | "errored";
|
|
147
|
+
interface Iteration<T> {
|
|
148
|
+
readonly n: number;
|
|
149
|
+
readonly candidates: readonly T[];
|
|
150
|
+
readonly scores: readonly EvalResult[];
|
|
151
|
+
readonly feedback: Feedback;
|
|
152
|
+
/** `null` iff the candidate batch for this iteration was empty. */
|
|
153
|
+
readonly best: T | null;
|
|
154
|
+
readonly bestScore: number;
|
|
155
|
+
readonly timestamp_ns: number;
|
|
156
|
+
}
|
|
157
|
+
interface RefineLoopOptions extends ConvergenceOptions {
|
|
158
|
+
/** Reactive dataset OR a plain array (auto-wrapped into `state`). */
|
|
159
|
+
dataset: NodeInput<readonly DatasetItem[]> | readonly DatasetItem[];
|
|
160
|
+
/** Total teacher calls cap across iterations. Default: unlimited. */
|
|
161
|
+
budget?: number;
|
|
162
|
+
/** Graph name. Default: `"refine-loop"`. */
|
|
163
|
+
name?: string;
|
|
164
|
+
/** Extra graph options forwarded to the underlying `Graph`. */
|
|
165
|
+
graph?: GraphOptions;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Return type — extends Graph so all observability tools (`describe`,
|
|
169
|
+
* `explain`, `observe`, `attachStorage`, `snapshot`) Just Work.
|
|
170
|
+
*/
|
|
171
|
+
interface RefineLoopGraph<T> extends Graph {
|
|
172
|
+
readonly best: Node<T | null>;
|
|
173
|
+
readonly score: Node<number>;
|
|
174
|
+
readonly status: Node<RefineStatus>;
|
|
175
|
+
readonly history: Node<readonly Iteration<T>[]>;
|
|
176
|
+
readonly strategy: Node<RefineStrategy<T>>;
|
|
177
|
+
readonly iteration: Node<number>;
|
|
178
|
+
/** Stage topics — subscribe for per-stage streaming / cursor consumers. */
|
|
179
|
+
readonly generate: TopicGraph<GenerateEvent<T>>;
|
|
180
|
+
readonly evaluate: TopicGraph<EvaluateEvent<T>>;
|
|
181
|
+
readonly analyze: TopicGraph<AnalyzeEvent<T>>;
|
|
182
|
+
readonly decide: TopicGraph<DecideEvent>;
|
|
183
|
+
/** Swap the active strategy mid-run (human-in-the-loop handoff). */
|
|
184
|
+
setStrategy(next: RefineStrategy<T>): void;
|
|
185
|
+
/** Pause after the current iteration completes. */
|
|
186
|
+
pause(): void;
|
|
187
|
+
/** Resume a paused loop. */
|
|
188
|
+
resume(): void;
|
|
189
|
+
}
|
|
190
|
+
declare function refineLoop<T>(seed: T, evaluator: Evaluator<T>, initialStrategy: RefineStrategy<T>, opts: RefineLoopOptions): RefineLoopGraph<T>;
|
|
191
|
+
/**
|
|
192
|
+
* Context passed to a `blindVariation` teacher per call. `reportCost` is a
|
|
193
|
+
* per-call hook — see `BlindVariationOptions.tokens`.
|
|
194
|
+
*/
|
|
195
|
+
interface BlindVariationContext<T> {
|
|
196
|
+
readonly prior: T;
|
|
197
|
+
/**
|
|
198
|
+
* Report tokens consumed by this teacher call. Aggregated per iteration
|
|
199
|
+
* and flushed to `opts.tokens` in the strategy's `finally` block so
|
|
200
|
+
* partial spend is preserved when the teacher throws mid-batch.
|
|
201
|
+
*/
|
|
202
|
+
readonly reportCost: (tokens: number) => void;
|
|
203
|
+
}
|
|
204
|
+
interface BlindVariationOptions<T> {
|
|
205
|
+
/** Name — default: `"blindVariation"`. */
|
|
206
|
+
name?: string;
|
|
207
|
+
/** Number of candidates generated per iteration. Default: 4. */
|
|
208
|
+
width?: number;
|
|
209
|
+
/**
|
|
210
|
+
* Run teacher calls in parallel via `Promise.all`. Default `true` — the
|
|
211
|
+
* common case (independent LLM calls). Set `false` to run sequentially
|
|
212
|
+
* via `for/await` when teachers share stateful resources (rate limiters,
|
|
213
|
+
* rolling context, serial API ordering) that don't tolerate concurrency.
|
|
214
|
+
*/
|
|
215
|
+
parallel?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Optional cost counter node. Running total tokens reported via
|
|
218
|
+
* `ctx.reportCost` during each iteration is added to this node in the
|
|
219
|
+
* strategy's `finally` block — fires on success AND on teacher throw so
|
|
220
|
+
* partial spend is never lost. User owns the node; wire to `budgetGate`,
|
|
221
|
+
* `attachStorage`, telemetry, etc.
|
|
222
|
+
*/
|
|
223
|
+
tokens?: Node<number>;
|
|
224
|
+
/**
|
|
225
|
+
* Teacher — given `{prior, reportCost}`, produce one variant. Async
|
|
226
|
+
* allowed. Called `width` times per iteration. Call `ctx.reportCost(n)`
|
|
227
|
+
* to track tokens consumed per call (optional, no-op if `opts.tokens`
|
|
228
|
+
* is not set).
|
|
229
|
+
*/
|
|
230
|
+
teacher: (ctx: BlindVariationContext<T>) => Promise<T> | T;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Simplest built-in strategy: generate N variants per iteration via the
|
|
234
|
+
* supplied `teacher`; no feedback-informed steering (equivalent to Random
|
|
235
|
+
* Search). Validates the loop infrastructure end-to-end and is the baseline
|
|
236
|
+
* every other strategy should outperform.
|
|
237
|
+
*
|
|
238
|
+
* `analyze` records the mean score and flags the worst task — strategies that
|
|
239
|
+
* care about per-task critique layer on top.
|
|
240
|
+
*/
|
|
241
|
+
declare function blindVariation<T>(opts: BlindVariationOptions<T>): RefineStrategy<T>;
|
|
242
|
+
/**
|
|
243
|
+
* Context passed to an `errorCritique` teacher. `critique` is the pre-formatted
|
|
244
|
+
* summary a prompt template can drop in verbatim; `failures` carries the
|
|
245
|
+
* structured evidence (per-task error / score / detail) for richer prompts.
|
|
246
|
+
*/
|
|
247
|
+
interface ErrorCritiqueContext<T> {
|
|
248
|
+
readonly prior: T;
|
|
249
|
+
readonly critique: string;
|
|
250
|
+
readonly failures: readonly EvalResult[];
|
|
251
|
+
/**
|
|
252
|
+
* Report tokens consumed by this teacher call. Aggregated per iteration
|
|
253
|
+
* and flushed to `opts.tokens` in the strategy's `finally` block so
|
|
254
|
+
* partial spend is preserved when the teacher throws mid-batch.
|
|
255
|
+
*/
|
|
256
|
+
readonly reportCost: (tokens: number) => void;
|
|
257
|
+
}
|
|
258
|
+
interface ErrorCritiqueOptions<T> {
|
|
259
|
+
/** Name — default: `"errorCritique"`. */
|
|
260
|
+
name?: string;
|
|
261
|
+
/** Number of candidates generated per iteration. Default: 4. */
|
|
262
|
+
width?: number;
|
|
263
|
+
/**
|
|
264
|
+
* Cut-off below which a task is classified as a failure and fed into the
|
|
265
|
+
* critique. Default: the batch mean — any task scoring below the batch
|
|
266
|
+
* mean is a failure. Pass a number for an absolute cut-off, or a function
|
|
267
|
+
* for per-batch computation (e.g. a percentile). When the default mean
|
|
268
|
+
* is non-finite (NaN / ±Infinity from a degenerate evaluator), ALL scores
|
|
269
|
+
* are treated as failures so the critique loop continues to steer.
|
|
270
|
+
*/
|
|
271
|
+
failureThreshold?: number | ((scores: readonly EvalResult[]) => number);
|
|
272
|
+
/** Cap on failure samples packed into the critique. Default: 5. */
|
|
273
|
+
maxFailureSamples?: number;
|
|
274
|
+
/**
|
|
275
|
+
* Format failures into the `critique` string passed to the teacher. Default
|
|
276
|
+
* joins `- taskId (score=N) | error: …` lines. Override to shape LLM prompts.
|
|
277
|
+
*
|
|
278
|
+
* **Note:** the `feedback` argument is a shell with `{score, weakTasks}`
|
|
279
|
+
* populated; `summary` is empty because `analyze` computes the final summary
|
|
280
|
+
* AFTER `formatCritique` runs (the summary embeds the formatted count).
|
|
281
|
+
* Rely on `failures` and `feedback.score` — do not read `feedback.summary`
|
|
282
|
+
* here.
|
|
283
|
+
*/
|
|
284
|
+
formatCritique?: (failures: readonly EvalResult[], feedback: Feedback) => string;
|
|
285
|
+
/**
|
|
286
|
+
* Run teacher calls in parallel via `Promise.all`. Default `true` — the
|
|
287
|
+
* common case (independent LLM calls). Set `false` to run sequentially
|
|
288
|
+
* via `for/await` when teachers share stateful resources (rate limiters,
|
|
289
|
+
* rolling context, serial API ordering) that don't tolerate concurrency.
|
|
290
|
+
*/
|
|
291
|
+
parallel?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Optional cost counter node. Running total tokens reported via
|
|
294
|
+
* `ctx.reportCost` during each iteration is added to this node in the
|
|
295
|
+
* strategy's `finally` block — fires on success AND on teacher throw so
|
|
296
|
+
* partial spend is never lost. User owns the node; wire to `budgetGate`,
|
|
297
|
+
* `attachStorage`, telemetry, etc.
|
|
298
|
+
*/
|
|
299
|
+
tokens?: Node<number>;
|
|
300
|
+
/**
|
|
301
|
+
* Teacher — given `{prior, critique, failures, reportCost}`, produce one
|
|
302
|
+
* refined variant. Called `width` times per iteration. Async allowed.
|
|
303
|
+
* Call `ctx.reportCost(n)` to track tokens consumed per call (optional,
|
|
304
|
+
* no-op if `opts.tokens` is not set).
|
|
305
|
+
*/
|
|
306
|
+
teacher: (ctx: ErrorCritiqueContext<T>) => Promise<T> | T;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Critique-driven strategy (ProTeGi-style "textual gradient"). Each iteration:
|
|
310
|
+
* 1. `analyze` classifies tasks scoring below a threshold as failures, picks
|
|
311
|
+
* the best candidate from the batch, and packs both plus a formatted
|
|
312
|
+
* critique string into `feedback.critique` as a private payload.
|
|
313
|
+
* 2. `generate` unpacks that payload and calls the teacher with
|
|
314
|
+
* `{prior, critique, failures, reportCost}` `width` times, returning the
|
|
315
|
+
* refined batch.
|
|
316
|
+
*
|
|
317
|
+
* The teacher receives a pre-formatted string (drop into an LLM prompt) AND
|
|
318
|
+
* the structured failure list (for richer prompts that want per-task detail).
|
|
319
|
+
* Throws on empty candidate batches — matches `blindVariation`'s contract
|
|
320
|
+
* (no silent zero-candidate cycles).
|
|
321
|
+
*
|
|
322
|
+
* When `setStrategy()` swaps this strategy in mid-run, the first `generate`
|
|
323
|
+
* may receive a `Feedback` produced by the prior strategy (no private payload);
|
|
324
|
+
* the fallback path uses `candidates[last]` as the prior and the feedback
|
|
325
|
+
* summary as the critique, so the loop keeps running without a stall. When a
|
|
326
|
+
* private payload IS present, `priv.critiqueText` takes precedence over any
|
|
327
|
+
* edits a caller made to `feedback.summary` — treat `critique` as the
|
|
328
|
+
* strategy-owned channel.
|
|
329
|
+
*/
|
|
330
|
+
declare function errorCritique<T>(opts: ErrorCritiqueOptions<T>): RefineStrategy<T>;
|
|
331
|
+
|
|
332
|
+
type index_AnalyzeEvent<T> = AnalyzeEvent<T>;
|
|
333
|
+
type index_BlindVariationContext<T> = BlindVariationContext<T>;
|
|
334
|
+
type index_BlindVariationOptions<T> = BlindVariationOptions<T>;
|
|
335
|
+
type index_ConvergenceOptions = ConvergenceOptions;
|
|
336
|
+
type index_DatasetItem = DatasetItem;
|
|
337
|
+
type index_DecideEvent = DecideEvent;
|
|
338
|
+
type index_ErrorCritiqueContext<T> = ErrorCritiqueContext<T>;
|
|
339
|
+
type index_ErrorCritiqueOptions<T> = ErrorCritiqueOptions<T>;
|
|
340
|
+
type index_EvalResult = EvalResult;
|
|
341
|
+
type index_EvaluateEvent<T> = EvaluateEvent<T>;
|
|
342
|
+
type index_Evaluator<T> = Evaluator<T>;
|
|
343
|
+
type index_Feedback = Feedback;
|
|
344
|
+
type index_GenerateEvent<T> = GenerateEvent<T>;
|
|
345
|
+
type index_Iteration<T> = Iteration<T>;
|
|
346
|
+
type index_RefineLoopGraph<T> = RefineLoopGraph<T>;
|
|
347
|
+
type index_RefineLoopOptions = RefineLoopOptions;
|
|
348
|
+
type index_RefineStatus = RefineStatus;
|
|
349
|
+
type index_RefineStrategy<T> = RefineStrategy<T>;
|
|
350
|
+
declare const index_blindVariation: typeof blindVariation;
|
|
351
|
+
declare const index_errorCritique: typeof errorCritique;
|
|
352
|
+
declare const index_refineLoop: typeof refineLoop;
|
|
353
|
+
declare namespace index {
|
|
354
|
+
export { type index_AnalyzeEvent as AnalyzeEvent, type index_BlindVariationContext as BlindVariationContext, type index_BlindVariationOptions as BlindVariationOptions, type index_ConvergenceOptions as ConvergenceOptions, type index_DatasetItem as DatasetItem, type index_DecideEvent as DecideEvent, type index_ErrorCritiqueContext as ErrorCritiqueContext, type index_ErrorCritiqueOptions as ErrorCritiqueOptions, type index_EvalResult as EvalResult, type index_EvaluateEvent as EvaluateEvent, type index_Evaluator as Evaluator, type index_Feedback as Feedback, type index_GenerateEvent as GenerateEvent, type index_Iteration as Iteration, type index_RefineLoopGraph as RefineLoopGraph, type index_RefineLoopOptions as RefineLoopOptions, type index_RefineStatus as RefineStatus, type index_RefineStrategy as RefineStrategy, index_blindVariation as blindVariation, index_errorCritique as errorCritique, index_refineLoop as refineLoop };
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export { type AnalyzeEvent as A, type BlindVariationContext as B, type ConvergenceOptions as C, type DatasetItem as D, type Evaluator as E, type Feedback as F, type GenerateEvent as G, type Iteration as I, type RefineStrategy as R, type EvalResult as a, type RefineStatus as b, type RefineLoopOptions as c, type BlindVariationOptions as d, type DecideEvent as e, type ErrorCritiqueContext as f, type ErrorCritiqueOptions as g, type EvaluateEvent as h, index as i, type RefineLoopGraph as j, blindVariation as k, errorCritique as l, refineLoop as r };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { a as Node } from './node-Dd6wHSib.js';
|
|
2
|
+
import { G as Graph, a as GraphOptions } from './graph-Qjg9gWHI.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Job queue patterns (roadmap §4.2).
|
|
6
|
+
*
|
|
7
|
+
* Queue / flow primitives modeled as graph factories:
|
|
8
|
+
* - `jobQueue()` — claim/ack/nack workflow with reactive depth.
|
|
9
|
+
* - `jobFlow()` — multi-stage queue chain.
|
|
10
|
+
*
|
|
11
|
+
* Topic / subscription / hub primitives live in `patterns/messaging`.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
type JobState = "queued" | "inflight";
|
|
15
|
+
type JobEnvelope<T> = {
|
|
16
|
+
id: string;
|
|
17
|
+
payload: T;
|
|
18
|
+
attempts: number;
|
|
19
|
+
metadata: Readonly<Record<string, unknown>>;
|
|
20
|
+
state: JobState;
|
|
21
|
+
};
|
|
22
|
+
type JobQueueOptions = {
|
|
23
|
+
graph?: GraphOptions;
|
|
24
|
+
};
|
|
25
|
+
declare class JobQueueGraph<T> extends Graph {
|
|
26
|
+
private readonly _pending;
|
|
27
|
+
private readonly _jobs;
|
|
28
|
+
private _seq;
|
|
29
|
+
readonly pending: Node<readonly string[]>;
|
|
30
|
+
readonly jobs: Node<ReadonlyMap<string, JobEnvelope<T>>>;
|
|
31
|
+
readonly depth: Node<number>;
|
|
32
|
+
constructor(name: string, opts?: JobQueueOptions);
|
|
33
|
+
enqueue(payload: T, opts?: {
|
|
34
|
+
id?: string;
|
|
35
|
+
metadata?: Record<string, unknown>;
|
|
36
|
+
}): string;
|
|
37
|
+
claim(limit?: number): readonly JobEnvelope<T>[];
|
|
38
|
+
ack(id: string): boolean;
|
|
39
|
+
nack(id: string, opts?: {
|
|
40
|
+
requeue?: boolean;
|
|
41
|
+
}): boolean;
|
|
42
|
+
}
|
|
43
|
+
type JobFlowOptions = {
|
|
44
|
+
graph?: GraphOptions;
|
|
45
|
+
stages?: readonly string[];
|
|
46
|
+
maxPerPump?: number;
|
|
47
|
+
};
|
|
48
|
+
declare class JobFlowGraph<T> extends Graph {
|
|
49
|
+
private readonly _stageNames;
|
|
50
|
+
private readonly _queues;
|
|
51
|
+
private readonly _completed;
|
|
52
|
+
readonly completed: Node<readonly JobEnvelope<T>[]>;
|
|
53
|
+
readonly completedCount: Node<number>;
|
|
54
|
+
constructor(name: string, opts?: JobFlowOptions);
|
|
55
|
+
stages(): readonly string[];
|
|
56
|
+
queue(stage: string): JobQueueGraph<T>;
|
|
57
|
+
enqueue(payload: T, opts?: {
|
|
58
|
+
id?: string;
|
|
59
|
+
metadata?: Record<string, unknown>;
|
|
60
|
+
}): string;
|
|
61
|
+
retainedCompleted(): readonly JobEnvelope<T>[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Creates a Pulsar-inspired job queue graph with claim/ack/nack workflow.
|
|
65
|
+
*/
|
|
66
|
+
declare function jobQueue<T>(name: string, opts?: JobQueueOptions): JobQueueGraph<T>;
|
|
67
|
+
/**
|
|
68
|
+
* Creates an autonomous multi-stage queue chain graph.
|
|
69
|
+
*/
|
|
70
|
+
declare function jobFlow<T>(name: string, opts?: JobFlowOptions): JobFlowGraph<T>;
|
|
71
|
+
|
|
72
|
+
type index_JobEnvelope<T> = JobEnvelope<T>;
|
|
73
|
+
type index_JobFlowGraph<T> = JobFlowGraph<T>;
|
|
74
|
+
declare const index_JobFlowGraph: typeof JobFlowGraph;
|
|
75
|
+
type index_JobFlowOptions = JobFlowOptions;
|
|
76
|
+
type index_JobQueueGraph<T> = JobQueueGraph<T>;
|
|
77
|
+
declare const index_JobQueueGraph: typeof JobQueueGraph;
|
|
78
|
+
type index_JobQueueOptions = JobQueueOptions;
|
|
79
|
+
type index_JobState = JobState;
|
|
80
|
+
declare const index_jobFlow: typeof jobFlow;
|
|
81
|
+
declare const index_jobQueue: typeof jobQueue;
|
|
82
|
+
declare namespace index {
|
|
83
|
+
export { type index_JobEnvelope as JobEnvelope, index_JobFlowGraph as JobFlowGraph, type index_JobFlowOptions as JobFlowOptions, index_JobQueueGraph as JobQueueGraph, type index_JobQueueOptions as JobQueueOptions, type index_JobState as JobState, index_jobFlow as jobFlow, index_jobQueue as jobQueue };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { type JobEnvelope as J, JobFlowGraph as a, type JobFlowOptions as b, JobQueueGraph as c, type JobQueueOptions as d, type JobState as e, jobQueue as f, index as i, jobFlow as j };
|