@graphrefly/graphrefly 0.44.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -19
- package/dist/_internal-B23BagFd.d.cts +33 -0
- package/dist/_internal-B23BagFd.d.ts +33 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.cts +111 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.ts +111 -0
- package/dist/agents-C0Ji9ldU.d.cts +629 -0
- package/dist/agents-C9zexT7I.d.ts +629 -0
- package/dist/audit-BAXb3VOg.d.ts +246 -0
- package/dist/audit-C_bPfkqS.d.cts +246 -0
- package/dist/backoff-7KIK3WQW.js +24 -0
- package/dist/backoff-7KIK3WQW.js.map +1 -0
- package/dist/backoff-Bnb9OoPh.d.cts +6 -0
- package/dist/backoff-Bnb9OoPh.d.ts +6 -0
- package/dist/base/composition/index.cjs +811 -0
- package/dist/base/composition/index.cjs.map +1 -0
- package/dist/base/composition/index.d.cts +469 -0
- package/dist/base/composition/index.d.ts +469 -0
- package/dist/base/composition/index.js +40 -0
- package/dist/base/composition/index.js.map +1 -0
- package/dist/base/index.cjs +6336 -0
- package/dist/base/index.cjs.map +1 -0
- package/dist/base/index.d.cts +22 -0
- package/dist/base/index.d.ts +22 -0
- package/dist/base/index.js +259 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/io/index.cjs +3270 -0
- package/dist/base/io/index.cjs.map +1 -0
- package/dist/base/io/index.d.cts +2245 -0
- package/dist/base/io/index.d.ts +2245 -0
- package/dist/base/io/index.js +117 -0
- package/dist/base/io/index.js.map +1 -0
- package/dist/base/meta/index.cjs +43 -0
- package/dist/base/meta/index.cjs.map +1 -0
- package/dist/base/meta/index.d.cts +45 -0
- package/dist/base/meta/index.d.ts +45 -0
- package/dist/base/meta/index.js +13 -0
- package/dist/base/meta/index.js.map +1 -0
- package/dist/base/mutation/index.cjs +200 -0
- package/dist/base/mutation/index.cjs.map +1 -0
- package/dist/base/mutation/index.d.cts +177 -0
- package/dist/base/mutation/index.d.ts +177 -0
- package/dist/base/mutation/index.js +22 -0
- package/dist/base/mutation/index.js.map +1 -0
- package/dist/base/render/index.cjs +1120 -0
- package/dist/base/render/index.cjs.map +1 -0
- package/dist/{extra/render/index.d.ts → base/render/index.d.cts} +75 -31
- package/dist/{extra/render/index.d.cts → base/render/index.d.ts} +75 -31
- package/dist/base/render/index.js +24 -0
- package/dist/base/render/index.js.map +1 -0
- package/dist/base/sources/browser/index.cjs +172 -0
- package/dist/base/sources/browser/index.cjs.map +1 -0
- package/dist/base/sources/browser/index.d.cts +84 -0
- package/dist/base/sources/browser/index.d.ts +84 -0
- package/dist/base/sources/browser/index.js +151 -0
- package/dist/base/sources/browser/index.js.map +1 -0
- package/dist/base/sources/event/index.cjs +98 -0
- package/dist/base/sources/event/index.cjs.map +1 -0
- package/dist/base/sources/event/index.d.cts +91 -0
- package/dist/base/sources/event/index.d.ts +91 -0
- package/dist/base/sources/event/index.js +13 -0
- package/dist/base/sources/event/index.js.map +1 -0
- package/dist/base/sources/index.cjs +755 -0
- package/dist/base/sources/index.cjs.map +1 -0
- package/dist/{extra/sources.d.ts → base/sources/index.d.cts} +74 -301
- package/dist/{extra/sources.d.cts → base/sources/index.d.ts} +74 -301
- package/dist/base/sources/index.js +42 -0
- package/dist/base/sources/index.js.map +1 -0
- package/dist/base/sources/node/index.cjs +320 -0
- package/dist/base/sources/node/index.cjs.map +1 -0
- package/dist/{extra/node.d.ts → base/sources/node/index.d.cts} +35 -37
- package/dist/{extra/node.d.cts → base/sources/node/index.d.ts} +35 -37
- package/dist/base/sources/node/index.js +306 -0
- package/dist/base/sources/node/index.js.map +1 -0
- package/dist/base/utils/index.cjs +37 -0
- package/dist/base/utils/index.cjs.map +1 -0
- package/dist/base/utils/index.d.cts +37 -0
- package/dist/base/utils/index.d.ts +37 -0
- package/dist/base/utils/index.js +11 -0
- package/dist/base/utils/index.js.map +1 -0
- package/dist/base/worker/index.cjs +548 -0
- package/dist/base/worker/index.cjs.map +1 -0
- package/dist/base/worker/index.d.cts +207 -0
- package/dist/base/worker/index.d.ts +207 -0
- package/dist/base/worker/index.js +20 -0
- package/dist/base/worker/index.js.map +1 -0
- package/dist/breaker-C9skL3d8.d.ts +175 -0
- package/dist/breaker-ugSdq54q.d.cts +175 -0
- package/dist/{cascading-BglDkMdX.d.cts → cascading-CSSbKGrJ.d.ts} +3 -3
- package/dist/{cascading-MFgxu7Yo.d.ts → cascading-baGkiihI.d.cts} +3 -3
- package/dist/chunk-255UCBG4.js +58 -0
- package/dist/chunk-255UCBG4.js.map +1 -0
- package/dist/chunk-2LO3EL4W.js +1 -0
- package/dist/chunk-2LO3EL4W.js.map +1 -0
- package/dist/chunk-2OB3CEJS.js +1065 -0
- package/dist/chunk-2OB3CEJS.js.map +1 -0
- package/dist/chunk-36NMM65U.js +144 -0
- package/dist/chunk-36NMM65U.js.map +1 -0
- package/dist/chunk-3CEXCBN6.js +1 -0
- package/dist/chunk-3CEXCBN6.js.map +1 -0
- package/dist/chunk-3MUSLI6E.js +105 -0
- package/dist/chunk-3MUSLI6E.js.map +1 -0
- package/dist/chunk-3PSLNJDU.js +884 -0
- package/dist/chunk-3PSLNJDU.js.map +1 -0
- package/dist/chunk-3QZY5BI7.js +92 -0
- package/dist/chunk-3QZY5BI7.js.map +1 -0
- package/dist/chunk-42FQ27MQ.js +594 -0
- package/dist/chunk-42FQ27MQ.js.map +1 -0
- package/dist/chunk-4GYMCUDZ.js +1085 -0
- package/dist/chunk-4GYMCUDZ.js.map +1 -0
- package/dist/chunk-4S53H2KR.js +382 -0
- package/dist/chunk-4S53H2KR.js.map +1 -0
- package/dist/chunk-4XCHZRUJ.js +128 -0
- package/dist/chunk-4XCHZRUJ.js.map +1 -0
- package/dist/chunk-5THCXDWY.js +725 -0
- package/dist/chunk-5THCXDWY.js.map +1 -0
- package/dist/chunk-6XZYT4SW.js +256 -0
- package/dist/chunk-6XZYT4SW.js.map +1 -0
- package/dist/chunk-7EGRP2VX.js +76 -0
- package/dist/chunk-7EGRP2VX.js.map +1 -0
- package/dist/chunk-A7KV5UK4.js +150 -0
- package/dist/chunk-A7KV5UK4.js.map +1 -0
- package/dist/chunk-APY2SS5X.js +156 -0
- package/dist/chunk-APY2SS5X.js.map +1 -0
- package/dist/chunk-AZDQPQ3V.js +66 -0
- package/dist/chunk-AZDQPQ3V.js.map +1 -0
- package/dist/chunk-BU3SEFA5.js +90 -0
- package/dist/chunk-BU3SEFA5.js.map +1 -0
- package/dist/chunk-BXGZFGZ4.js +189 -0
- package/dist/chunk-BXGZFGZ4.js.map +1 -0
- package/dist/chunk-CGHORL6G.js +579 -0
- package/dist/chunk-CGHORL6G.js.map +1 -0
- package/dist/chunk-CXANAIZU.js +530 -0
- package/dist/chunk-CXANAIZU.js.map +1 -0
- package/dist/chunk-CZQHCKKG.js +1 -0
- package/dist/chunk-CZQHCKKG.js.map +1 -0
- package/dist/chunk-DKNHAICT.js +133 -0
- package/dist/chunk-DKNHAICT.js.map +1 -0
- package/dist/chunk-DM4OMPWK.js +584 -0
- package/dist/chunk-DM4OMPWK.js.map +1 -0
- package/dist/chunk-DMSNO6ZB.js +452 -0
- package/dist/chunk-DMSNO6ZB.js.map +1 -0
- package/dist/chunk-E5OZPDIW.js +229 -0
- package/dist/chunk-E5OZPDIW.js.map +1 -0
- package/dist/chunk-EVYY4X5A.js +509 -0
- package/dist/chunk-EVYY4X5A.js.map +1 -0
- package/dist/chunk-FDFD67UO.js +1 -0
- package/dist/chunk-FDFD67UO.js.map +1 -0
- package/dist/chunk-FMPF42Q4.js +13 -0
- package/dist/chunk-FMPF42Q4.js.map +1 -0
- package/dist/chunk-FR6RGA3B.js +1277 -0
- package/dist/chunk-FR6RGA3B.js.map +1 -0
- package/dist/chunk-FW23JYNQ.js +454 -0
- package/dist/chunk-FW23JYNQ.js.map +1 -0
- package/dist/chunk-GBCENOLN.js +1575 -0
- package/dist/chunk-GBCENOLN.js.map +1 -0
- package/dist/chunk-HL7HUJIX.js +1 -0
- package/dist/chunk-HL7HUJIX.js.map +1 -0
- package/dist/chunk-HULCUY35.js +2508 -0
- package/dist/chunk-HULCUY35.js.map +1 -0
- package/dist/chunk-IHTWQEDR.js +169 -0
- package/dist/chunk-IHTWQEDR.js.map +1 -0
- package/dist/chunk-IJRR6YAI.js +128 -0
- package/dist/chunk-IJRR6YAI.js.map +1 -0
- package/dist/chunk-JGFRAFDL.js +221 -0
- package/dist/chunk-JGFRAFDL.js.map +1 -0
- package/dist/chunk-KIIXR252.js +211 -0
- package/dist/chunk-KIIXR252.js.map +1 -0
- package/dist/chunk-KN3H5CNT.js +11 -0
- package/dist/chunk-KN3H5CNT.js.map +1 -0
- package/dist/chunk-KPG3DGLA.js +1 -0
- package/dist/chunk-KPG3DGLA.js.map +1 -0
- package/dist/chunk-KRNQ6RGQ.js +1 -0
- package/dist/chunk-KRNQ6RGQ.js.map +1 -0
- package/dist/chunk-LBAJK24K.js +1071 -0
- package/dist/chunk-LBAJK24K.js.map +1 -0
- package/dist/chunk-MLTPJMH6.js +417 -0
- package/dist/chunk-MLTPJMH6.js.map +1 -0
- package/dist/chunk-N3SZ7BMH.js +95 -0
- package/dist/chunk-N3SZ7BMH.js.map +1 -0
- package/dist/chunk-NDUD3IMO.js +540 -0
- package/dist/chunk-NDUD3IMO.js.map +1 -0
- package/dist/chunk-NY2PYHNC.js +873 -0
- package/dist/chunk-NY2PYHNC.js.map +1 -0
- package/dist/chunk-O3MT7DYI.js +225 -0
- package/dist/chunk-O3MT7DYI.js.map +1 -0
- package/dist/chunk-OCUDSN63.js +2386 -0
- package/dist/chunk-OCUDSN63.js.map +1 -0
- package/dist/chunk-OIWU3NYV.js +199 -0
- package/dist/chunk-OIWU3NYV.js.map +1 -0
- package/dist/chunk-OO5BM6CJ.js +1153 -0
- package/dist/chunk-OO5BM6CJ.js.map +1 -0
- package/dist/chunk-OQUIJT7A.js +1 -0
- package/dist/chunk-OQUIJT7A.js.map +1 -0
- package/dist/chunk-P5LBT622.js +105 -0
- package/dist/chunk-P5LBT622.js.map +1 -0
- package/dist/chunk-PKGQG5QQ.js +519 -0
- package/dist/chunk-PKGQG5QQ.js.map +1 -0
- package/dist/chunk-PKPO3JTZ.js +561 -0
- package/dist/chunk-PKPO3JTZ.js.map +1 -0
- package/dist/chunk-PL5UDIQ5.js +118 -0
- package/dist/chunk-PL5UDIQ5.js.map +1 -0
- package/dist/chunk-PZWISPIQ.js +432 -0
- package/dist/chunk-PZWISPIQ.js.map +1 -0
- package/dist/chunk-Q3EYOCZB.js +510 -0
- package/dist/chunk-Q3EYOCZB.js.map +1 -0
- package/dist/chunk-QMBYUVRL.js +15 -0
- package/dist/chunk-QMBYUVRL.js.map +1 -0
- package/dist/chunk-RAGGHLCV.js +200 -0
- package/dist/chunk-RAGGHLCV.js.map +1 -0
- package/dist/chunk-RGL53X5G.js +574 -0
- package/dist/chunk-RGL53X5G.js.map +1 -0
- package/dist/chunk-RJOG4IJU.js +1039 -0
- package/dist/chunk-RJOG4IJU.js.map +1 -0
- package/dist/chunk-SOOKUYVM.js +403 -0
- package/dist/chunk-SOOKUYVM.js.map +1 -0
- package/dist/chunk-T5BN5KG7.js +1 -0
- package/dist/chunk-T5BN5KG7.js.map +1 -0
- package/dist/chunk-TP7244Y6.js +207 -0
- package/dist/chunk-TP7244Y6.js.map +1 -0
- package/dist/chunk-TSBFTJKM.js +57 -0
- package/dist/chunk-TSBFTJKM.js.map +1 -0
- package/dist/chunk-URQ2CBBF.js +143 -0
- package/dist/chunk-URQ2CBBF.js.map +1 -0
- package/dist/chunk-W2BOPXTI.js +1 -0
- package/dist/chunk-W2BOPXTI.js.map +1 -0
- package/dist/chunk-WKSWLSCX.js +207 -0
- package/dist/chunk-WKSWLSCX.js.map +1 -0
- package/dist/chunk-Y52CS6YA.js +88 -0
- package/dist/chunk-Y52CS6YA.js.map +1 -0
- package/dist/chunk-YCBUWK77.js +92 -0
- package/dist/chunk-YCBUWK77.js.map +1 -0
- package/dist/chunk-YJ4U2D2C.js +314 -0
- package/dist/chunk-YJ4U2D2C.js.map +1 -0
- package/dist/chunk-Z4YXAUDN.js +239 -0
- package/dist/chunk-Z4YXAUDN.js.map +1 -0
- package/dist/chunk-Z6EGP5D7.js +92 -0
- package/dist/chunk-Z6EGP5D7.js.map +1 -0
- package/dist/compat/index.cjs +3100 -9
- package/dist/compat/index.cjs.map +1 -0
- package/dist/compat/index.d.cts +112 -18
- package/dist/compat/index.d.ts +112 -18
- package/dist/compat/index.js +176 -1
- package/dist/compat/index.js.map +1 -0
- package/dist/compat/jotai/index.cjs +149 -1
- package/dist/compat/jotai/index.cjs.map +1 -0
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/jotai/index.js +8 -1
- package/dist/compat/jotai/index.js.map +1 -0
- package/dist/compat/nanostores/index.cjs +205 -1
- package/dist/compat/nanostores/index.cjs.map +1 -0
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nanostores/index.js +22 -1
- package/dist/compat/nanostores/index.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +2241 -9
- package/dist/compat/nestjs/index.cjs.map +1 -0
- package/dist/compat/nestjs/index.d.cts +7 -10
- package/dist/compat/nestjs/index.d.ts +7 -10
- package/dist/compat/nestjs/index.js +78 -1
- package/dist/compat/nestjs/index.js.map +1 -0
- package/dist/compat/react/index.cjs +114 -1
- package/dist/compat/react/index.cjs.map +1 -0
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/react/index.js +12 -1
- package/dist/compat/react/index.js.map +1 -0
- package/dist/compat/solid/index.cjs +101 -1
- package/dist/compat/solid/index.cjs.map +1 -0
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/solid/index.js +12 -1
- package/dist/compat/solid/index.js.map +1 -0
- package/dist/compat/svelte/index.cjs +104 -1
- package/dist/compat/svelte/index.cjs.map +1 -0
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/svelte/index.js +12 -1
- package/dist/compat/svelte/index.js.map +1 -0
- package/dist/compat/vue/index.cjs +119 -1
- package/dist/compat/vue/index.cjs.map +1 -0
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/vue/index.js +12 -1
- package/dist/compat/vue/index.js.map +1 -0
- package/dist/compat/zustand/index.cjs +69 -3
- package/dist/compat/zustand/index.cjs.map +1 -0
- package/dist/compat/zustand/index.d.cts +2 -6
- package/dist/compat/zustand/index.d.ts +2 -6
- package/dist/compat/zustand/index.js +8 -1
- package/dist/compat/zustand/index.js.map +1 -0
- package/dist/distill-De6Rnn15.d.cts +48 -0
- package/dist/distill-De6Rnn15.d.ts +48 -0
- package/dist/external-register-CWyroXb_.d.cts +138 -0
- package/dist/external-register-CWyroXb_.d.ts +138 -0
- package/dist/{fallback-74oxi34l.d.cts → fallback-Bx46zqky.d.cts} +3 -10
- package/dist/{fallback-DUyyBTBK.d.ts → fallback-pIWW8A2d.d.ts} +3 -10
- package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
- package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
- package/dist/{index-CBGUK09R.d.ts → index-5SU_O78r.d.cts} +5 -5
- package/dist/{index-BmZXHqkE.d.ts → index-B6pxYJzO.d.cts} +1 -1
- package/dist/{index-hcDJ8PSI.d.cts → index-B6pxYJzO.d.ts} +1 -1
- package/dist/{index-C5stwKcw.d.cts → index-BFsng6v1.d.cts} +1 -1
- package/dist/{index-CdAlHFEt.d.ts → index-BFsng6v1.d.ts} +1 -1
- package/dist/{index-_6ODbuOu.d.cts → index-Bg-LwEt-.d.cts} +1 -1
- package/dist/{index-CviRnE4K.d.ts → index-Bg-LwEt-.d.ts} +1 -1
- package/dist/{index-CBBLl_rc.d.ts → index-Brp888t0.d.cts} +1 -1
- package/dist/{index-BQSKmbuG.d.cts → index-Brp888t0.d.ts} +1 -1
- package/dist/{index-sqkqlb1p.d.ts → index-CDfk6jHN.d.cts} +1 -1
- package/dist/{index-ZVQhLa2i.d.cts → index-CDfk6jHN.d.ts} +1 -1
- package/dist/{index-Climxqsu.d.cts → index-CEXCtYYJ.d.ts} +5 -5
- package/dist/index-DLAxYaN5.d.cts +169 -0
- package/dist/index-DLAxYaN5.d.ts +169 -0
- package/dist/{index-CK29LV56.d.cts → index-DeWbQzMe.d.cts} +1 -1
- package/dist/{index-CPQlGA29.d.ts → index-DeWbQzMe.d.ts} +1 -1
- package/dist/{index-BrPrLl4e.d.cts → index-dX9IzPqj.d.cts} +1 -1
- package/dist/{index-Dgl1HpPn.d.ts → index-dX9IzPqj.d.ts} +1 -1
- package/dist/index.cjs +25934 -191
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +58 -94
- package/dist/index.d.ts +58 -94
- package/dist/index.js +852 -1
- package/dist/index.js.map +1 -0
- package/dist/layout-types-B5aiHYgk.d.cts +72 -0
- package/dist/layout-types-B5aiHYgk.d.ts +72 -0
- package/dist/memory-composers-BryDrRBX.d.cts +529 -0
- package/dist/memory-composers-CVQqPYEV.d.ts +529 -0
- package/dist/{observable-DWjNfLvC.d.ts → observable-BXQoW1P-.d.cts} +1 -1
- package/dist/{observable-e3eiPPFy.d.cts → observable-BXQoW1P-.d.ts} +1 -1
- package/dist/{pipeline-graph-Sgj0gCwn.d.ts → pipeline-graph-Ce47CB6Y.d.cts} +13 -10
- package/dist/{pipeline-graph-CIKhynsF.d.cts → pipeline-graph-DXCwY9vG.d.ts} +13 -10
- package/dist/presets/ai/index.cjs +4377 -0
- package/dist/presets/ai/index.cjs.map +1 -0
- package/dist/presets/ai/index.d.cts +98 -0
- package/dist/presets/ai/index.d.ts +98 -0
- package/dist/presets/ai/index.js +54 -0
- package/dist/presets/ai/index.js.map +1 -0
- package/dist/presets/harness/index.cjs +5929 -0
- package/dist/presets/harness/index.cjs.map +1 -0
- package/dist/presets/harness/index.d.cts +566 -0
- package/dist/presets/harness/index.d.ts +566 -0
- package/dist/presets/harness/index.js +71 -0
- package/dist/presets/harness/index.js.map +1 -0
- package/dist/presets/index.cjs +9782 -0
- package/dist/presets/index.cjs.map +1 -0
- package/dist/presets/index.d.cts +28 -0
- package/dist/presets/index.d.ts +28 -0
- package/dist/presets/index.js +129 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/presets/inspect/index.cjs +1087 -0
- package/dist/presets/inspect/index.cjs.map +1 -0
- package/dist/presets/inspect/index.d.cts +172 -0
- package/dist/presets/inspect/index.d.ts +172 -0
- package/dist/presets/inspect/index.js +21 -0
- package/dist/presets/inspect/index.js.map +1 -0
- package/dist/presets/resilience/index.cjs +1593 -0
- package/dist/presets/resilience/index.cjs.map +1 -0
- package/dist/presets/resilience/index.d.cts +205 -0
- package/dist/presets/resilience/index.d.ts +205 -0
- package/dist/presets/resilience/index.js +18 -0
- package/dist/presets/resilience/index.js.map +1 -0
- package/dist/rate-limiter-CEALq4N1.d.ts +559 -0
- package/dist/rate-limiter-DpVbSYdH.d.cts +559 -0
- package/dist/{reactive-layout-DOTs9P3X.d.ts → reactive-layout-fswlBUvX.d.cts} +19 -7
- package/dist/{reactive-layout-DgctbqZo.d.cts → reactive-layout-fswlBUvX.d.ts} +19 -7
- package/dist/retry-BDbRZ_gx.d.ts +125 -0
- package/dist/retry-DWuhjvsA.d.cts +125 -0
- package/dist/solutions/index.cjs +8200 -0
- package/dist/solutions/index.cjs.map +1 -0
- package/dist/solutions/index.d.cts +23 -0
- package/dist/solutions/index.d.ts +23 -0
- package/dist/solutions/index.js +55 -0
- package/dist/solutions/index.js.map +1 -0
- package/dist/spawnable-5mDY501F.d.cts +746 -0
- package/dist/spawnable-D3lR0oQu.d.ts +746 -0
- package/dist/status-U-rUI79b.d.cts +84 -0
- package/dist/status-U-rUI79b.d.ts +84 -0
- package/dist/timeout-U5O4ESK3.js +12 -0
- package/dist/timeout-U5O4ESK3.js.map +1 -0
- package/dist/{types-CWFysE9E.d.ts → types-BB5Lw-pB.d.cts} +3 -3
- package/dist/{types-C0_yquda.d.cts → types-BB5Lw-pB.d.ts} +3 -3
- package/dist/types-CJWIMJiZ.d.ts +548 -0
- package/dist/types-vCq7ShIm.d.cts +548 -0
- package/dist/utils/ai/browser.cjs +2169 -0
- package/dist/utils/ai/browser.cjs.map +1 -0
- package/dist/{patterns → utils}/ai/browser.d.cts +7 -5
- package/dist/{patterns → utils}/ai/browser.d.ts +7 -5
- package/dist/utils/ai/browser.js +255 -0
- package/dist/utils/ai/browser.js.map +1 -0
- package/dist/utils/ai/index.cjs +8468 -0
- package/dist/utils/ai/index.cjs.map +1 -0
- package/dist/{index-CR8QpwX8.d.ts → utils/ai/index.d.cts} +73 -976
- package/dist/{index-UPSiS-X7.d.cts → utils/ai/index.d.ts} +73 -976
- package/dist/utils/ai/index.js +173 -0
- package/dist/utils/ai/index.js.map +1 -0
- package/dist/utils/ai/node.cjs +648 -0
- package/dist/utils/ai/node.cjs.map +1 -0
- package/dist/{patterns → utils}/ai/node.d.cts +5 -7
- package/dist/{patterns → utils}/ai/node.d.ts +5 -7
- package/dist/utils/ai/node.js +84 -0
- package/dist/utils/ai/node.js.map +1 -0
- package/dist/utils/cqrs/index.cjs +1036 -0
- package/dist/utils/cqrs/index.cjs.map +1 -0
- package/dist/{index-CeFiHtAg.d.ts → utils/cqrs/index.d.cts} +7 -37
- package/dist/{index-B-_tFaqV.d.cts → utils/cqrs/index.d.ts} +7 -37
- package/dist/utils/cqrs/index.js +18 -0
- package/dist/utils/cqrs/index.js.map +1 -0
- package/dist/utils/demo-shell/index.cjs +865 -0
- package/dist/utils/demo-shell/index.cjs.map +1 -0
- package/dist/{index-B8YnZpIR.d.ts → utils/demo-shell/index.d.cts} +4 -16
- package/dist/{index-Cwv0KWcU.d.cts → utils/demo-shell/index.d.ts} +4 -16
- package/dist/utils/demo-shell/index.js +13 -0
- package/dist/utils/demo-shell/index.js.map +1 -0
- package/dist/utils/domain-templates/index.cjs +732 -0
- package/dist/utils/domain-templates/index.cjs.map +1 -0
- package/dist/{index-CzLVrjxn.d.ts → utils/domain-templates/index.d.cts} +3 -20
- package/dist/{index-BaQaY_IQ.d.cts → utils/domain-templates/index.d.ts} +3 -20
- package/dist/utils/domain-templates/index.js +17 -0
- package/dist/utils/domain-templates/index.js.map +1 -0
- package/dist/utils/graphspec/index.cjs +1174 -0
- package/dist/utils/graphspec/index.cjs.map +1 -0
- package/dist/{index-CMh5Rz1y.d.ts → utils/graphspec/index.d.cts} +106 -42
- package/dist/{index-CS0LTlB8.d.cts → utils/graphspec/index.d.ts} +106 -42
- package/dist/utils/graphspec/index.js +35 -0
- package/dist/utils/graphspec/index.js.map +1 -0
- package/dist/utils/harness/index.cjs +656 -0
- package/dist/utils/harness/index.cjs.map +1 -0
- package/dist/utils/harness/index.d.cts +542 -0
- package/dist/utils/harness/index.d.ts +542 -0
- package/dist/utils/harness/index.js +56 -0
- package/dist/utils/harness/index.js.map +1 -0
- package/dist/utils/index.cjs +17609 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +96 -0
- package/dist/utils/index.d.ts +96 -0
- package/dist/utils/index.js +514 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/inspect/index.cjs +807 -0
- package/dist/utils/inspect/index.cjs.map +1 -0
- package/dist/utils/inspect/index.d.cts +123 -0
- package/dist/utils/inspect/index.d.ts +123 -0
- package/dist/utils/inspect/index.js +30 -0
- package/dist/utils/inspect/index.js.map +1 -0
- package/dist/utils/job-queue/index.cjs +717 -0
- package/dist/utils/job-queue/index.cjs.map +1 -0
- package/dist/{index-DisjX8a-.d.ts → utils/job-queue/index.d.cts} +5 -26
- package/dist/{index-DV_1YuVk.d.cts → utils/job-queue/index.d.ts} +5 -26
- package/dist/utils/job-queue/index.js +18 -0
- package/dist/utils/job-queue/index.js.map +1 -0
- package/dist/utils/memory/index.cjs +1451 -0
- package/dist/utils/memory/index.cjs.map +1 -0
- package/dist/{index-CZ3r5Rxp.d.ts → utils/memory/index.d.cts} +242 -34
- package/dist/{index-B17QddL1.d.cts → utils/memory/index.d.ts} +242 -34
- package/dist/utils/memory/index.js +19 -0
- package/dist/utils/memory/index.js.map +1 -0
- package/dist/utils/messaging/index.cjs +666 -0
- package/dist/utils/messaging/index.cjs.map +1 -0
- package/dist/utils/messaging/index.d.cts +562 -0
- package/dist/utils/messaging/index.d.ts +562 -0
- package/dist/utils/messaging/index.js +50 -0
- package/dist/utils/messaging/index.js.map +1 -0
- package/dist/utils/orchestration/index.cjs +876 -0
- package/dist/utils/orchestration/index.cjs.map +1 -0
- package/dist/utils/orchestration/index.d.cts +233 -0
- package/dist/utils/orchestration/index.d.ts +233 -0
- package/dist/utils/orchestration/index.js +19 -0
- package/dist/utils/orchestration/index.js.map +1 -0
- package/dist/utils/process/index.cjs +743 -0
- package/dist/utils/process/index.cjs.map +1 -0
- package/dist/{index-p09KSrTN.d.ts → utils/process/index.d.cts} +97 -44
- package/dist/{index-CasX6Pfq.d.cts → utils/process/index.d.ts} +97 -44
- package/dist/utils/process/index.js +14 -0
- package/dist/utils/process/index.js.map +1 -0
- package/dist/utils/reactive-layout/index.cjs +1607 -0
- package/dist/utils/reactive-layout/index.cjs.map +1 -0
- package/dist/{index-B5S8ULbU.d.ts → utils/reactive-layout/index.d.cts} +58 -81
- package/dist/{index-Dc4AYqrJ.d.cts → utils/reactive-layout/index.d.ts} +58 -81
- package/dist/utils/reactive-layout/index.js +52 -0
- package/dist/utils/reactive-layout/index.js.map +1 -0
- package/dist/utils/reduction/index.cjs +203 -0
- package/dist/utils/reduction/index.cjs.map +1 -0
- package/dist/{index-Byu-OpX_.d.ts → utils/reduction/index.d.cts} +6 -17
- package/dist/{index-tRCxuAXF.d.cts → utils/reduction/index.d.ts} +6 -17
- package/dist/utils/reduction/index.js +14 -0
- package/dist/utils/reduction/index.js.map +1 -0
- package/dist/utils/resilience/index.cjs +1617 -0
- package/dist/utils/resilience/index.cjs.map +1 -0
- package/dist/utils/resilience/index.d.cts +9 -0
- package/dist/utils/resilience/index.d.ts +9 -0
- package/dist/utils/resilience/index.js +44 -0
- package/dist/utils/resilience/index.js.map +1 -0
- package/dist/utils/surface/index.cjs +1070 -0
- package/dist/utils/surface/index.cjs.map +1 -0
- package/dist/{index-CYq8vAyV.d.ts → utils/surface/index.d.cts} +7 -58
- package/dist/{index-CSOmP7xT.d.cts → utils/surface/index.d.ts} +7 -58
- package/dist/utils/surface/index.js +30 -0
- package/dist/utils/surface/index.js.map +1 -0
- package/dist/utils/topology-view/index.cjs +620 -0
- package/dist/utils/topology-view/index.cjs.map +1 -0
- package/dist/utils/topology-view/index.d.cts +68 -0
- package/dist/utils/topology-view/index.d.ts +68 -0
- package/dist/utils/topology-view/index.js +11 -0
- package/dist/utils/topology-view/index.js.map +1 -0
- package/package.json +664 -584
- package/dist/backoff-HPZMEZNF.js +0 -1
- package/dist/chunk-2T7U5EU6.js +0 -1
- package/dist/chunk-3G5U5QNE.js +0 -5
- package/dist/chunk-4VVTGLXJ.js +0 -1
- package/dist/chunk-5M4CCMMD.js +0 -45
- package/dist/chunk-5QDBSZBV.js +0 -1
- package/dist/chunk-5XJ6B66J.js +0 -1
- package/dist/chunk-6QZNQS5B.js +0 -1
- package/dist/chunk-6X7AFUJV.js +0 -9
- package/dist/chunk-7K6PWTDQ.js +0 -1
- package/dist/chunk-7LIAPXJB.js +0 -1
- package/dist/chunk-7WPU3UHQ.js +0 -1
- package/dist/chunk-A5WCQ5NO.js +0 -1
- package/dist/chunk-APPIWSGD.js +0 -84
- package/dist/chunk-BEZWM2SY.js +0 -1
- package/dist/chunk-C72GO4IZ.js +0 -1
- package/dist/chunk-CB676TKJ.js +0 -1
- package/dist/chunk-CE6TI2TL.js +0 -1
- package/dist/chunk-CE72X3WO.js +0 -1
- package/dist/chunk-CK2E7BTU.js +0 -1
- package/dist/chunk-CLVB32RD.js +0 -1
- package/dist/chunk-CRVT7D2P.js +0 -1
- package/dist/chunk-D5RFJOZ2.js +0 -1
- package/dist/chunk-D7GPHKFH.js +0 -1
- package/dist/chunk-DHRX7JX4.js +0 -2
- package/dist/chunk-ESMPEKEV.js +0 -1
- package/dist/chunk-F672GV32.js +0 -1
- package/dist/chunk-FZMYDOWV.js +0 -1
- package/dist/chunk-GHBWHMRZ.js +0 -1
- package/dist/chunk-GLERH466.js +0 -1
- package/dist/chunk-GPW2V3RE.js +0 -1
- package/dist/chunk-HIDYF36O.js +0 -1
- package/dist/chunk-HITNVN6B.js +0 -3
- package/dist/chunk-HY4DJBA7.js +0 -5
- package/dist/chunk-KZIEYVXN.js +0 -1
- package/dist/chunk-L6NSJVJZ.js +0 -1
- package/dist/chunk-N4MQX6JU.js +0 -18
- package/dist/chunk-N7FHEL4D.js +0 -1
- package/dist/chunk-NTEURFZH.js +0 -1
- package/dist/chunk-OIVP6KFV.js +0 -1
- package/dist/chunk-OPHBU3LG.js +0 -1
- package/dist/chunk-OYQOZP2F.js +0 -5
- package/dist/chunk-PTZK576G.js +0 -1
- package/dist/chunk-QYADASLV.js +0 -1
- package/dist/chunk-ST7UXLWR.js +0 -1
- package/dist/chunk-SVY7VUYU.js +0 -1
- package/dist/chunk-TK3NWWD4.js +0 -1
- package/dist/chunk-TSOYJ743.js +0 -1
- package/dist/chunk-UNGSTR4X.js +0 -61
- package/dist/chunk-VIMF6LGM.js +0 -1
- package/dist/chunk-VJLMUKOI.js +0 -1
- package/dist/chunk-VN6RDSK2.js +0 -1
- package/dist/chunk-VV4N5P64.js +0 -1
- package/dist/chunk-W3I423PS.js +0 -1
- package/dist/chunk-WJR24TAG.js +0 -1
- package/dist/chunk-XTGKMHSW.js +0 -1
- package/dist/chunk-YBB7ZGTY.js +0 -1
- package/dist/chunk-Z4NPUARF.js +0 -1
- package/dist/chunk-ZGNQRPDT.js +0 -1
- package/dist/chunk-ZKPSFFKU.js +0 -1
- package/dist/chunk-ZLV5SQSX.js +0 -1
- package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
- package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
- package/dist/core/index.cjs +0 -1
- package/dist/core/index.d.cts +0 -3
- package/dist/core/index.d.ts +0 -3
- package/dist/core/index.js +0 -1
- package/dist/decay-BvOWTZ00.d.ts +0 -112
- package/dist/decay-CFlLvXUT.d.cts +0 -112
- package/dist/extra/browser.cjs +0 -1
- package/dist/extra/browser.d.cts +0 -4
- package/dist/extra/browser.d.ts +0 -4
- package/dist/extra/browser.js +0 -1
- package/dist/extra/index.cjs +0 -20
- package/dist/extra/index.d.cts +0 -17
- package/dist/extra/index.d.ts +0 -17
- package/dist/extra/index.js +0 -1
- package/dist/extra/node.cjs +0 -2
- package/dist/extra/node.js +0 -2
- package/dist/extra/operators.cjs +0 -1
- package/dist/extra/operators.d.cts +0 -958
- package/dist/extra/operators.d.ts +0 -958
- package/dist/extra/operators.js +0 -1
- package/dist/extra/reactive.cjs +0 -1
- package/dist/extra/reactive.d.cts +0 -353
- package/dist/extra/reactive.d.ts +0 -353
- package/dist/extra/reactive.js +0 -1
- package/dist/extra/render/index.cjs +0 -5
- package/dist/extra/render/index.js +0 -1
- package/dist/extra/sources.cjs +0 -3
- package/dist/extra/sources.js +0 -1
- package/dist/extra/storage-browser.cjs +0 -1
- package/dist/extra/storage-browser.d.cts +0 -37
- package/dist/extra/storage-browser.d.ts +0 -37
- package/dist/extra/storage-browser.js +0 -1
- package/dist/extra/storage-core.cjs +0 -1
- package/dist/extra/storage-core.d.cts +0 -28
- package/dist/extra/storage-core.d.ts +0 -28
- package/dist/extra/storage-core.js +0 -1
- package/dist/extra/storage-node.cjs +0 -1
- package/dist/extra/storage-node.d.cts +0 -2
- package/dist/extra/storage-node.d.ts +0 -2
- package/dist/extra/storage-node.js +0 -0
- package/dist/extra/storage-tiers-browser.cjs +0 -1
- package/dist/extra/storage-tiers-browser.d.cts +0 -120
- package/dist/extra/storage-tiers-browser.d.ts +0 -120
- package/dist/extra/storage-tiers-browser.js +0 -1
- package/dist/extra/storage-tiers-node.cjs +0 -1
- package/dist/extra/storage-tiers-node.d.cts +0 -210
- package/dist/extra/storage-tiers-node.d.ts +0 -210
- package/dist/extra/storage-tiers-node.js +0 -1
- package/dist/extra/storage-tiers.cjs +0 -1
- package/dist/extra/storage-tiers.d.cts +0 -412
- package/dist/extra/storage-tiers.d.ts +0 -412
- package/dist/extra/storage-tiers.js +0 -1
- package/dist/graph/index.cjs +0 -7
- package/dist/graph/index.d.cts +0 -7
- package/dist/graph/index.d.ts +0 -7
- package/dist/graph/index.js +0 -1
- package/dist/graph-CWvEUQAq.d.cts +0 -1861
- package/dist/graph-D9LFnda9.d.ts +0 -1861
- package/dist/index-5k1T6jl0.d.cts +0 -121
- package/dist/index-9770hRuQ.d.cts +0 -779
- package/dist/index-B1F8Enjf.d.ts +0 -704
- package/dist/index-BHskSB8v.d.ts +0 -3413
- package/dist/index-BIYAkbAi.d.cts +0 -26
- package/dist/index-BoJ5JHxI.d.ts +0 -557
- package/dist/index-BocU7pqs.d.ts +0 -779
- package/dist/index-BxNs2HB9.d.cts +0 -1858
- package/dist/index-C1T3d7V-.d.cts +0 -704
- package/dist/index-C5ri2Axc.d.cts +0 -301
- package/dist/index-C9l6OEBL.d.ts +0 -26
- package/dist/index-CC-AvFTy.d.cts +0 -557
- package/dist/index-CJF1URuX.d.ts +0 -121
- package/dist/index-CdTelp1M.d.ts +0 -202
- package/dist/index-Cj3WohTd.d.cts +0 -202
- package/dist/index-Co7uli2l.d.cts +0 -3413
- package/dist/index-D0aciIex.d.cts +0 -209
- package/dist/index-DHen9Klo.d.ts +0 -1858
- package/dist/index-Yq60JP3s.d.ts +0 -209
- package/dist/index-nozs3fFC.d.ts +0 -301
- package/dist/node-kK3CvTrR.d.cts +0 -1347
- package/dist/node-kK3CvTrR.d.ts +0 -1347
- package/dist/patterns/ai/browser.cjs +0 -8
- package/dist/patterns/ai/browser.js +0 -3
- package/dist/patterns/ai/index.cjs +0 -74
- package/dist/patterns/ai/index.d.cts +0 -20
- package/dist/patterns/ai/index.d.ts +0 -20
- package/dist/patterns/ai/index.js +0 -1
- package/dist/patterns/ai/node.cjs +0 -1
- package/dist/patterns/ai/node.js +0 -1
- package/dist/patterns/cqrs/index.cjs +0 -3
- package/dist/patterns/cqrs/index.d.cts +0 -8
- package/dist/patterns/cqrs/index.d.ts +0 -8
- package/dist/patterns/cqrs/index.js +0 -1
- package/dist/patterns/demo-shell/index.cjs +0 -5
- package/dist/patterns/demo-shell/index.d.cts +0 -7
- package/dist/patterns/demo-shell/index.d.ts +0 -7
- package/dist/patterns/demo-shell/index.js +0 -1
- package/dist/patterns/domain-templates/index.cjs +0 -3
- package/dist/patterns/domain-templates/index.d.cts +0 -6
- package/dist/patterns/domain-templates/index.d.ts +0 -6
- package/dist/patterns/domain-templates/index.js +0 -1
- package/dist/patterns/graphspec/index.cjs +0 -86
- package/dist/patterns/graphspec/index.d.cts +0 -8
- package/dist/patterns/graphspec/index.d.ts +0 -8
- package/dist/patterns/graphspec/index.js +0 -1
- package/dist/patterns/harness/index.cjs +0 -48
- package/dist/patterns/harness/index.d.cts +0 -13
- package/dist/patterns/harness/index.d.ts +0 -13
- package/dist/patterns/harness/index.js +0 -1
- package/dist/patterns/inspect/index.cjs +0 -3
- package/dist/patterns/inspect/index.d.cts +0 -9
- package/dist/patterns/inspect/index.d.ts +0 -9
- package/dist/patterns/inspect/index.js +0 -1
- package/dist/patterns/job-queue/index.cjs +0 -3
- package/dist/patterns/job-queue/index.d.cts +0 -9
- package/dist/patterns/job-queue/index.d.ts +0 -9
- package/dist/patterns/job-queue/index.js +0 -1
- package/dist/patterns/memory/index.cjs +0 -3
- package/dist/patterns/memory/index.d.cts +0 -8
- package/dist/patterns/memory/index.d.ts +0 -8
- package/dist/patterns/memory/index.js +0 -1
- package/dist/patterns/messaging/index.cjs +0 -3
- package/dist/patterns/messaging/index.d.cts +0 -7
- package/dist/patterns/messaging/index.d.ts +0 -7
- package/dist/patterns/messaging/index.js +0 -1
- package/dist/patterns/orchestration/index.cjs +0 -3
- package/dist/patterns/orchestration/index.d.cts +0 -8
- package/dist/patterns/orchestration/index.d.ts +0 -8
- package/dist/patterns/orchestration/index.js +0 -1
- package/dist/patterns/process/index.cjs +0 -3
- package/dist/patterns/process/index.d.cts +0 -10
- package/dist/patterns/process/index.d.ts +0 -10
- package/dist/patterns/process/index.js +0 -1
- package/dist/patterns/reactive-layout/index.cjs +0 -4
- package/dist/patterns/reactive-layout/index.d.cts +0 -7
- package/dist/patterns/reactive-layout/index.d.ts +0 -7
- package/dist/patterns/reactive-layout/index.js +0 -1
- package/dist/patterns/reduction/index.cjs +0 -3
- package/dist/patterns/reduction/index.d.cts +0 -6
- package/dist/patterns/reduction/index.d.ts +0 -6
- package/dist/patterns/reduction/index.js +0 -1
- package/dist/patterns/surface/index.cjs +0 -13
- package/dist/patterns/surface/index.d.cts +0 -9
- package/dist/patterns/surface/index.d.ts +0 -9
- package/dist/patterns/surface/index.js +0 -1
- package/dist/reactive-log-BKALbfal.d.ts +0 -223
- package/dist/reactive-log-DIGdYqQ6.d.cts +0 -223
- package/dist/reactive-map-CEFGp8TK.d.cts +0 -296
- package/dist/reactive-map-DS_SIAxv.d.ts +0 -296
- package/dist/resilience-6LYQJAC5.js +0 -1
- package/dist/sugar-DQjFmVqb.d.cts +0 -399
- package/dist/sugar-fhLIE7TT.d.ts +0 -399
- package/dist/topology-tree-Bcz27hpF.d.cts +0 -25
- package/dist/topology-tree-xvaD0fOX.d.ts +0 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/harness/index.ts","../../../src/utils/harness/actuator-executor.ts","../../../src/utils/harness/auto-solidify.ts","../../../src/utils/harness/bridge.ts","../../../src/base/utils/decay.ts","../../../src/utils/harness/defaults.ts","../../../src/utils/harness/strategy.ts","../../../src/utils/orchestration/audited-success-tracker.ts","../../../src/utils/harness/types.ts"],"sourcesContent":["/**\n * Harness wiring (roadmap §9.0).\n *\n * Reactive collaboration loop: static-topology, flowing data.\n * Composes orchestration (gate), AI (promptNode), reduction (scorer/stratify),\n * and messaging (TopicGraph/bridge) into a 7-stage loop.\n *\n * @module\n */\n\nexport * from \"./actuator-executor.js\";\nexport * from \"./auto-solidify.js\";\nexport * from \"./bridge.js\";\nexport * from \"./defaults.js\";\n// `effectivenessTracker` was deleted per Class B audit Alt E (2026-04-30).\n// The shared substrate now lives in `extra/composition/audited-success-tracker.ts`\n// — re-exported via `@graphrefly/graphrefly-ts/extra` for general use. The\n// (zero-consumer) `effectivenessTracker(opts?)` factory shape was not retained.\nexport * from \"./strategy.js\";\nexport * from \"./types.js\";\n","/**\n * actuatorExecutor — bridge a side-effecting actuator into the harness\n * EXECUTE work fn.\n *\n * `refineExecutor` covers the artifact-typed case (refine a candidate\n * `T` against an evaluator); `actuatorExecutor` covers the side-effecting\n * case (write a catalog entry, mutate a template registry, edit a doc on\n * disk). The user's `apply` callback owns the side effect; the executor\n * wraps it in the per-claim lifecycle:\n *\n * 1. **One DATA per claim.** The producer captures the first DATA from\n * the bridged `apply` result, emits a {@link HarnessJobPayload} with\n * `execution` filled in, and completes. Subsequent inner DATAs are\n * ignored.\n * 2. **Cancel-on-teardown.** When the JobFlow pump unsubscribes (after\n * capturing first DATA, or on graph teardown), the producer's cleanup\n * fires `ac.abort()` which propagates into `apply`'s `signal`.\n * 3. **Errors surfaced as failure payload.** A thrown / ERROR result is\n * mapped via `onError` into a `failure`-outcome `ExecuteOutput` so the\n * dispatch effect can route the item rather than silently dropping it.\n *\n * **What `apply` may return.** Anything `fromAny` accepts: `Promise<R>`,\n * `Node<R>`, `AsyncIterable<R>`, `Iterable<R>`, or a synchronous `R`.\n * `Promise<R>` is the typical shape (`writeFile`, `fetch`, `db.execute`).\n *\n * **Pairing with `evalVerifier`.** `ExecuteOutput.artifact` is set to\n * the actuation record; an `evalVerifier<R>` whose `extractArtifact`\n * returns the record (or the post-apply world state) closes EXECUTE →\n * VERIFY with consistent typing end-to-end.\n *\n * @module\n */\n\nimport { COMPLETE, DATA, ERROR, type Messages, type Node, node } from \"@graphrefly/pure-ts/core\";\nimport { fromAny, type NodeInput } from \"@graphrefly/pure-ts/extra\";\nimport type { JobEnvelope } from \"../job-queue/index.js\";\n\nimport type { ExecuteOutput, HarnessExecutor, HarnessJobPayload, TriagedItem } from \"./types.js\";\n\n/**\n * What an actuator's `apply` may return. Mirrors `NodeInput<R>` plus a\n * raw `R` for synchronous side effects.\n */\nexport type ActuatorResult<R> = NodeInput<R>;\n\n/** Configuration for {@link actuatorExecutor}. */\nexport interface ActuatorExecutorConfig<R> {\n\t/**\n\t * Apply the side effect for this triaged item. Receives the abort\n\t * signal — actuators that own real I/O should thread `signal` into\n\t * `fetch`, `fs.writeFile`, child-process kills, etc. so that the\n\t * pump's teardown actually cancels in-flight work.\n\t *\n\t * The first DATA emitted by the bridged result wins; later DATAs are\n\t * discarded. ERROR (or a synchronous throw) is mapped via `onError`.\n\t */\n\tapply: (item: TriagedItem, opts: { signal: AbortSignal }) => ActuatorResult<R>;\n\n\t/**\n\t * Optional gate — when provided and returning `false`, the actuator\n\t * is skipped and the executor emits an `ExecuteOutput` with\n\t * `outcome: \"failure\"`. Use to route interventions the actuator can't\n\t * handle into the failure path.\n\t */\n\tshouldApply?: (item: TriagedItem) => boolean;\n\n\t/** Detail string for the skip path. Default: includes intervention name. */\n\tskipDetail?: (item: TriagedItem) => string;\n\n\t/**\n\t * Map a successfully-applied actuation record into an `ExecuteOutput<R>`.\n\t */\n\ttoOutput?: (record: R, item: TriagedItem) => ExecuteOutput<R>;\n\n\t/**\n\t * Map a thrown / ERROR result into an `ExecuteOutput<R>`.\n\t */\n\tonError?: (err: unknown, item: TriagedItem) => ExecuteOutput<R>;\n\n\t/** Node name prefix for `describe()` introspection. */\n\tname?: string;\n}\n\nfunction defaultToOutput<R>(record: R, item: TriagedItem): ExecuteOutput<R> {\n\treturn {\n\t\toutcome: \"success\",\n\t\tdetail: `actuator applied ${item.intervention} for ${truncate(item.summary)}`,\n\t\tartifact: record,\n\t};\n}\n\nfunction defaultOnError<R>(err: unknown, item: TriagedItem): ExecuteOutput<R> {\n\tconst message = err instanceof Error ? err.message : String(err);\n\treturn {\n\t\toutcome: \"failure\",\n\t\tdetail: `actuator threw on ${item.intervention}: ${message}`,\n\t};\n}\n\nfunction defaultSkipDetail(item: TriagedItem): string {\n\treturn `actuator skipped ${item.intervention} (shouldApply returned false)`;\n}\n\nfunction truncate(s: string, max = 80): string {\n\treturn s.length <= max ? s : `${s.slice(0, max - 1)}…`;\n}\n\n/**\n * Build a {@link HarnessExecutor} backed by a side-effecting actuator.\n *\n * @example File-system actuator that writes a catalog entry and emits the diff.\n * ```ts\n * const harness = harnessLoop(\"repair\", {\n * adapter,\n * executor: actuatorExecutor<CatalogPatch>({\n * async apply(item, { signal }) {\n * const patch = patchFromItem(item);\n * await fs.writeFile(patch.path, patch.contents, { signal });\n * return patch;\n * },\n * shouldApply: (item) => item.intervention === \"catalog-fn\",\n * }),\n * verifier: evalVerifier<CatalogPatch>({ ... }),\n * });\n * ```\n */\nexport function actuatorExecutor<R>(config: ActuatorExecutorConfig<R>): HarnessExecutor<R> {\n\tconst name = config.name ?? \"actuator-executor\";\n\tconst toOutput = config.toOutput ?? defaultToOutput<R>;\n\tconst onError = config.onError ?? defaultOnError<R>;\n\tconst skipDetail = config.skipDetail ?? defaultSkipDetail;\n\n\treturn (job: JobEnvelope<HarnessJobPayload<R>>, opts) => {\n\t\tconst item = job.payload.item;\n\n\t\tif (config.shouldApply && !config.shouldApply(item)) {\n\t\t\t// Synchronous failure payload — return as a plain object;\n\t\t\t// `fromAny` accepts the bare value and emits one DATA.\n\t\t\treturn {\n\t\t\t\t...job.payload,\n\t\t\t\texecution: { item, outcome: \"failure\", detail: skipDetail(item) },\n\t\t\t} satisfies HarnessJobPayload<R>;\n\t\t}\n\n\t\treturn node<HarnessJobPayload<R>>(\n\t\t\t[],\n\t\t\t(_data, actions) => {\n\t\t\t\tconst ac = new AbortController();\n\t\t\t\t// Link pump-supplied signal (Tier 6.5 2.5b): parent abort\n\t\t\t\t// (e.g. `harness.destroy()`) cascades into the inner AC and\n\t\t\t\t// thus into `apply(item, { signal })` + `fromAny({ signal })`.\n\t\t\t\tconst parentSignal = opts?.signal;\n\t\t\t\tlet unlinkParent: () => void = () => undefined;\n\t\t\t\tif (parentSignal) {\n\t\t\t\t\tif (parentSignal.aborted) {\n\t\t\t\t\t\tac.abort();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst onParentAbort = (): void => ac.abort();\n\t\t\t\t\t\tparentSignal.addEventListener(\"abort\", onParentAbort, { once: true });\n\t\t\t\t\t\tunlinkParent = () => parentSignal.removeEventListener(\"abort\", onParentAbort);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet captured = false;\n\t\t\t\tlet unsub: (() => void) | null = null;\n\t\t\t\tconst emitOnce = (out: ExecuteOutput<R>): void => {\n\t\t\t\t\tif (captured) return;\n\t\t\t\t\tcaptured = true;\n\t\t\t\t\tactions.down([\n\t\t\t\t\t\t[DATA, { ...job.payload, execution: { item, ...out } }],\n\t\t\t\t\t\t[COMPLETE],\n\t\t\t\t\t] satisfies Messages);\n\t\t\t\t\tunsub?.();\n\t\t\t\t\tunsub = null;\n\t\t\t\t};\n\t\t\t\tlet inner: Node<R>;\n\t\t\t\ttry {\n\t\t\t\t\tconst rawResult = config.apply(item, { signal: ac.signal });\n\t\t\t\t\tinner = fromAny<R>(rawResult, { signal: ac.signal });\n\t\t\t\t} catch (err) {\n\t\t\t\t\temitOnce(onError(err, item));\n\t\t\t\t\treturn () => {\n\t\t\t\t\t\tunlinkParent();\n\t\t\t\t\t\tac.abort();\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tunsub = inner.subscribe((batch) => {\n\t\t\t\t\tfor (const m of batch) {\n\t\t\t\t\t\tif (captured) return;\n\t\t\t\t\t\tif (m[0] === DATA) {\n\t\t\t\t\t\t\temitOnce(toOutput(m[1] as R, item));\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m[0] === ERROR) {\n\t\t\t\t\t\t\temitOnce(onError(m[1], item));\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m[0] === COMPLETE) {\n\t\t\t\t\t\t\temitOnce(onError(new Error(\"actuator inner completed without emitting DATA\"), item));\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// Sync DATA delivery (cached state / `fromAny` over a sync value):\n\t\t\t\t// the callback ran reentrantly before `unsub` was assigned, so\n\t\t\t\t// `emitOnce`'s `unsub?.()` was a no-op. Drop the upstream subscription\n\t\t\t\t// now that we have the handle. Without this, the inner stays\n\t\t\t\t// subscribed until producer teardown — leaks at high volume.\n\t\t\t\tif (captured && unsub) {\n\t\t\t\t\tunsub();\n\t\t\t\t\tunsub = null;\n\t\t\t\t}\n\t\t\t\treturn () => {\n\t\t\t\t\tunlinkParent();\n\t\t\t\t\tac.abort();\n\t\t\t\t\tunsub?.();\n\t\t\t\t\tunsub = null;\n\t\t\t\t};\n\t\t\t},\n\t\t\t{ name: `${name}/inner`, describeKind: \"producer\" },\n\t\t);\n\t};\n}\n\n// ---------------------------------------------------------------------------\n// dispatchActuator\n// ---------------------------------------------------------------------------\n\n/**\n * Apply callback shape consumed by {@link dispatchActuator}. Same shape as\n * {@link ActuatorExecutorConfig.apply}.\n */\nexport type ActuatorApplyFn<R> = (\n\titem: TriagedItem,\n\topts: { signal: AbortSignal },\n) => ActuatorResult<R>;\n\n/** Configuration for {@link dispatchActuator}. */\nexport interface DispatchActuatorConfig<R> {\n\t/**\n\t * Per-intervention apply callbacks. Keyed by `TriagedItem.intervention`.\n\t * Items whose intervention is not in `routes` fall through to `default`\n\t * (when set) or emit a skip-failure `ExecuteOutput`.\n\t */\n\troutes: Readonly<Partial<Record<TriagedItem[\"intervention\"], ActuatorApplyFn<R>>>>;\n\t/** Fallback apply callback for items whose intervention is not in `routes`. */\n\tdefault?: ActuatorApplyFn<R>;\n\t/** Node name prefix for `describe()` introspection. */\n\tname?: string;\n}\n\n/**\n * Multi-intervention actuator — dispatches each `TriagedItem` to one of\n * several `apply` callbacks based on `item.intervention`.\n *\n * Internally builds a single `actuatorExecutor` whose `apply` resolves the\n * intervention → callback at call-time. Items with no matching route and no\n * `default` emit a skip-failure with detail\n * `\"no route for intervention 'X'\"`.\n */\nexport function dispatchActuator<R>(config: DispatchActuatorConfig<R>): HarnessExecutor<R> {\n\tconst name = config.name ?? \"dispatch-actuator\";\n\tconst defaultFn = config.default ?? null;\n\tconst hasDefault = defaultFn != null;\n\treturn actuatorExecutor<R>({\n\t\tapply: (item, opts) => {\n\t\t\tconst fn = Object.hasOwn(config.routes, item.intervention)\n\t\t\t\t? config.routes[item.intervention]!\n\t\t\t\t: defaultFn;\n\t\t\tif (!fn) {\n\t\t\t\tthrow new Error(`dispatchActuator: no route for intervention '${item.intervention}'`);\n\t\t\t}\n\t\t\treturn fn(item, opts);\n\t\t},\n\t\tshouldApply: (item) => Object.hasOwn(config.routes, item.intervention) || hasDefault,\n\t\tskipDetail: (item) => `no route for intervention '${item.intervention}'`,\n\t\tname,\n\t});\n}\n","/**\n * autoSolidify — promote successful VERIFY runs into a durable artifact\n * (catalog entry, skill, template, doc edit, …).\n *\n * Closes the dogfood retrospective loop: when the harness's VERIFY\n * stage reports `verified: true`, the validated intervention should\n * become an authoring artifact the next loop run can rely on. This\n * primitive is the generic substrate — pass a `write` callback that\n * does the actual promotion (e.g. `overlay.upsertTemplate` for the\n * dogfood catalog overlay; `fs.writeFile` for a doc edit; `ctx.skill`\n * for a Hermes-style skill registry).\n *\n * @example Wire the catalog overlay as the solidify target.\n * ```ts\n * const solidified = autoSolidify({\n * verifyResults: harness.verifyResults.latest,\n * extract: (vr) => vr.execution.artifact ?? null,\n * write: (entry, vr) => overlay.upsertFn(`learned-${vr.item.summary}`, entry),\n * });\n * solidified.subscribe(() => {}); // keep alive for log\n * ```\n *\n * **Why a node and not just an effect.** The returned `Node<R>` emits\n * each promoted artifact, so callers can pipe solidifications through\n * the standard reactive surface (`describe()`, `observe()`, replay\n * buffers) instead of side-channel logging. An audit / dashboard that\n * wants \"what was learned this run?\" subscribes to the returned node;\n * the `write` callback owns the durable side effect.\n *\n * **Idempotency is the caller's responsibility.** The primitive\n * promotes every `verified: true` wave that passes the predicate. If\n * the harness re-verifies the same item (e.g. via reingestion), the\n * `write` callback is invoked again. Wrap your write fn with a\n * dedup-by-key guard if your target store would otherwise bloat. The\n * inner `seen` set inside this factory is intentionally absent — the\n * harness already retains via topic logs and the user may want\n * re-promotion semantics that are domain-specific.\n *\n * @module\n */\n\nimport { COMPLETE, DATA, ERROR, type Messages, type Node, node } from \"@graphrefly/pure-ts/core\";\n\nimport type { VerifyResult } from \"./types.js\";\n\n/**\n * Configuration for {@link autoSolidify}.\n *\n * `R` is the artifact type the upstream EXECUTE stage produced (and\n * `evalVerifier` carries through `execution.artifact`). `T` is the\n * promotion shape — what `write` consumes and what the returned node\n * emits. Often `T = R`, but they diverge when the actuator's raw\n * artifact needs a transform before storing (e.g. wrap a `CatalogPatch`\n * into a `CatalogEntry` with effectiveness metadata).\n */\nexport interface AutoSolidifyConfig<R, T = R> {\n\t/** Reactive verify-result stream. Typically `harness.verifyResults.latest`. */\n\tverifyResults: Node<VerifyResult<R> | null>;\n\t/**\n\t * Pull the value-to-promote out of a verified VerifyResult.\n\t * Default: `(vr) => vr.execution.artifact as T | null`. Return `null`\n\t * to skip a particular VerifyResult even when `verified: true` (e.g.\n\t * an LLM-default executor produces no artifact and there's nothing to\n\t * solidify).\n\t */\n\textract?: (vr: VerifyResult<R>) => T | null;\n\t/**\n\t * Optional gate beyond `verified === true`. When provided, the\n\t * primitive only promotes when this returns `true`. Default: pass\n\t * everything verified.\n\t *\n\t * Useful predicates:\n\t * - `(vr) => vr.item.intervention === \"catalog-fn\"` — only catalog work.\n\t * - `(vr) => (vr.findings ?? []).every(f => !/regression/i.test(f))` —\n\t * skip even-passes that mention regressions.\n\t */\n\tpredicate?: (vr: VerifyResult<R>) => boolean;\n\t/**\n\t * Promote — usually a side effect (write to overlay, fs, KG, etc.).\n\t * Receives the extracted artifact AND the originating VerifyResult so\n\t * the writer can use any context it needs (item summary, eval task\n\t * IDs, finding text, …) when shaping the durable record.\n\t */\n\twrite: (artifact: T, vr: VerifyResult<R>) => void;\n\t/** Node name for `describe()` introspection. Default `\"auto-solidify\"`. */\n\tname?: string;\n}\n\n/**\n * Build a `Node<T>` that subscribes to `verifyResults`, filters to\n * verified passes that produced an extractable artifact, runs `write`,\n * and emits the artifact. Use the returned node as a subscription\n * point for audit / dashboard / log pipelines.\n *\n * **Terminal-on-error semantics.** A throw from `predicate`, `extract`,\n * or `write` surfaces as `[[ERROR]]` on the returned node and\n * **terminates** it — the upstream subscription tears down and no\n * further DATA is emitted. This matches the spec's terminal-frame\n * contract for ERROR. If you want the solidify node to stay live\n * across user-callback throws, wrap your callbacks with try/catch\n * internally and emit a sentinel value or no-op on failure. A future\n * non-terminal `errors: Node<unknown>` companion may surface failures\n * without terminating the success stream — flagged as a follow-up.\n *\n * @returns A `Node<T>` that emits one DATA per promoted artifact.\n * Stays live as long as `verifyResults` is live AND no user callback\n * has thrown.\n */\nexport function autoSolidify<R, T = R>(config: AutoSolidifyConfig<R, T>): Node<T> {\n\tconst name = config.name ?? \"auto-solidify\";\n\tconst extract =\n\t\tconfig.extract ?? ((vr: VerifyResult<R>) => (vr.execution.artifact ?? null) as T | null);\n\tconst predicate = config.predicate ?? (() => true);\n\n\treturn node<T>(\n\t\t[],\n\t\t(_data, actions) => {\n\t\t\tlet unsub: (() => void) | null = null;\n\t\t\tlet terminated = false;\n\t\t\tconst tearDown = (): void => {\n\t\t\t\tif (terminated) return;\n\t\t\t\tterminated = true;\n\t\t\t\tunsub?.();\n\t\t\t\tunsub = null;\n\t\t\t};\n\t\t\tconst emitTerminalError = (err: unknown): void => {\n\t\t\t\tif (terminated) return;\n\t\t\t\tactions.down([[ERROR, err]] satisfies Messages);\n\t\t\t\ttearDown();\n\t\t\t};\n\t\t\tunsub = config.verifyResults.subscribe((batch) => {\n\t\t\t\tif (terminated) return;\n\t\t\t\tfor (const m of batch) {\n\t\t\t\t\tif (terminated) return;\n\t\t\t\t\tif (m[0] !== DATA) {\n\t\t\t\t\t\tif (m[0] === COMPLETE) {\n\t\t\t\t\t\t\t// Upstream verifyResults completed (rare; harness destroy).\n\t\t\t\t\t\t\t// Forward COMPLETE and tear down — solidify is terminal too.\n\t\t\t\t\t\t\tactions.down([[COMPLETE]] satisfies Messages);\n\t\t\t\t\t\t\ttearDown();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst vr = m[1] as VerifyResult<R> | null;\n\t\t\t\t\tif (vr == null) continue;\n\t\t\t\t\tif (!vr.verified) continue;\n\t\t\t\t\t// User callbacks (predicate / extract / write) are isolated\n\t\t\t\t\t// in try/catch so a throw lands as a single terminal ERROR\n\t\t\t\t\t// rather than propagating into the upstream emitter where\n\t\t\t\t\t// it would skip later messages in the same batch and leave\n\t\t\t\t\t// the solidify node un-terminated.\n\t\t\t\t\tlet pass: boolean;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpass = predicate(vr);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\temitTerminalError(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (!pass) continue;\n\t\t\t\t\tlet artifact: T | null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tartifact = extract(vr);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\temitTerminalError(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (artifact == null) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconfig.write(artifact, vr);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\temitTerminalError(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tactions.down([[DATA, artifact]] satisfies Messages);\n\t\t\t\t}\n\t\t\t});\n\t\t\t// If `subscribe` fired terminally during the call (push-on-subscribe\n\t\t\t// of an already-COMPLETE upstream), `tearDown()` ran inside the\n\t\t\t// callback before `unsub` was assigned, so the unsub is still\n\t\t\t// dangling. Drop it now if we're already terminated.\n\t\t\tif (terminated && unsub) {\n\t\t\t\tunsub();\n\t\t\t\tunsub = null;\n\t\t\t}\n\t\t\treturn () => {\n\t\t\t\ttearDown();\n\t\t\t};\n\t\t},\n\t\t{ name, describeKind: \"producer\" },\n\t);\n}\n","/**\n * Harness bridge factories (roadmap §9.0).\n *\n * Intake bridges, eval source wrapper, before/after comparison,\n * affected-task filter, code-change bridge, and notification effect.\n * All are compositions of existing primitives — no new abstractions.\n *\n * @module\n */\n\nimport { type Node, node } from \"@graphrefly/pure-ts/core\";\nimport { fromAny, switchMap } from \"@graphrefly/pure-ts/extra\";\nimport type { Graph } from \"@graphrefly/pure-ts/graph\";\nimport type { TopicGraph } from \"../messaging/index.js\";\n\nimport type { IntakeItem, Severity, TriagedItem } from \"./types.js\";\n\n// ---------------------------------------------------------------------------\n// Generic intake bridge\n// ---------------------------------------------------------------------------\n\n/** Options for {@link createIntakeBridge}. */\nexport interface CreateIntakeBridgeOptions<T> {\n\t/** Graph to register the effect node on (B.1 narrow-waist visibility). */\n\tgraph: Graph;\n\t/** Reactive node emitting domain-specific data. */\n\tsource: Node<T>;\n\t/** TopicGraph to publish IntakeItem entries to. */\n\tintakeTopic: TopicGraph<IntakeItem>;\n\t/** Converts source data into IntakeItem[]. Return empty array to skip. */\n\tparser: (value: T) => IntakeItem[];\n\t/** Effect-node name (default `\"intake-bridge\"`). */\n\tname?: string;\n}\n\n/**\n * Generic source→intake bridge factory.\n *\n * Watches a source node for new values, passes each through a user-supplied\n * `parser` that produces zero or more `IntakeItem`s, and publishes them to\n * the given intake topic.\n *\n * This is the generalized pattern behind {@link evalIntakeBridge}. Use it for\n * CI results, test failures, Slack messages, monitoring alerts, or any domain\n * where structured results should flow into a harness loop.\n *\n * The effect node is registered on the supplied `graph` so it appears in\n * `describe()` and is owned by the graph's lifecycle.\n *\n * @returns The effect node (for lifecycle management).\n */\nexport function createIntakeBridge<T>(opts: CreateIntakeBridgeOptions<T>): Node<unknown> {\n\tconst { graph, source, intakeTopic, parser, name = \"intake-bridge\" } = opts;\n\tconst eff = node(\n\t\t[source as Node<unknown>],\n\t\t(batchData, _actions, ctx) => {\n\t\t\tconst data = batchData.map((batch, i) =>\n\t\t\t\tbatch != null && batch.length > 0 ? batch.at(-1) : ctx.prevData[i],\n\t\t\t);\n\t\t\tconst value = data[0];\n\t\t\tif (value === undefined) return;\n\t\t\tconst items = parser(value as T);\n\t\t\tfor (const item of items) {\n\t\t\t\tintakeTopic.publish(item);\n\t\t\t}\n\t\t},\n\t\t{ describeKind: \"effect\" },\n\t);\n\tgraph.add(eff, { name });\n\treturn eff;\n}\n\n// ---------------------------------------------------------------------------\n// Generic eval result shape\n// ---------------------------------------------------------------------------\n\n/**\n * Minimal eval result shape accepted by the bridge.\n *\n * TS eval runner uses `EvalRun` from `evals/lib/types.ts` which is a superset\n * of this shape. The bridge only reads what it needs.\n */\nexport interface EvalRunResult {\n\trun_id: string;\n\tmodel: string;\n\ttasks: EvalTaskResult[];\n}\n\nexport interface EvalTaskResult {\n\ttask_id: string;\n\tvalid: boolean;\n\tjudge_scores?: EvalJudgeScore[];\n}\n\nexport interface EvalJudgeScore {\n\tclaim: string;\n\tpass: boolean;\n\treasoning: string;\n}\n\n// ---------------------------------------------------------------------------\n// Bridge factory\n// ---------------------------------------------------------------------------\n\nexport interface EvalIntakeBridgeOptions {\n\t/** Graph to register the effect node on (B.1 narrow-waist visibility). */\n\tgraph: Graph;\n\t/** Node emitting EvalRunResult (or EvalRunResult[]). */\n\tsource: Node<EvalRunResult | EvalRunResult[]>;\n\t/** TopicGraph to publish IntakeItem entries to. */\n\tintakeTopic: TopicGraph<IntakeItem>;\n\t/** Effect-node name (default `\"eval-intake-bridge\"`). */\n\tname?: string;\n\t/** Minimum severity for eval-sourced items (default `\"medium\"`). */\n\tdefaultSeverity?: Severity;\n}\n\n/**\n * Create an effect node that watches an eval results source and publishes\n * per-criterion findings to an intake topic.\n *\n * Each failing judge criterion produces a separate IntakeItem — not one\n * item per task. This gives the triage stage granular findings to classify.\n *\n * The effect node is registered on the supplied `graph` so it appears in\n * `describe()` and is owned by the graph's lifecycle.\n *\n * @returns The effect node (for lifecycle management).\n */\nexport function evalIntakeBridge(opts: EvalIntakeBridgeOptions): Node<unknown> {\n\tconst {\n\t\tgraph,\n\t\tsource,\n\t\tintakeTopic,\n\t\tname = \"eval-intake-bridge\",\n\t\tdefaultSeverity = \"medium\",\n\t} = opts;\n\n\tconst eff = node(\n\t\t[source as Node<unknown>],\n\t\t(batchData, _actions, ctx) => {\n\t\t\tconst data = batchData.map((batch, i) =>\n\t\t\t\tbatch != null && batch.length > 0 ? batch.at(-1) : ctx.prevData[i],\n\t\t\t);\n\t\t\tconst results = data[0];\n\t\t\tif (results === undefined) return;\n\t\t\tconst runs = Array.isArray(results)\n\t\t\t\t? (results as EvalRunResult[])\n\t\t\t\t: [results as EvalRunResult];\n\n\t\t\tfor (const run of runs) {\n\t\t\t\tfor (const task of run.tasks) {\n\t\t\t\t\t// Only process tasks with failures\n\t\t\t\t\tif (task.valid && task.judge_scores?.every((s) => s.pass)) continue;\n\n\t\t\t\t\t// Task-level validity failure (no judge scores or overall invalid)\n\t\t\t\t\tif (!task.valid && (!task.judge_scores || task.judge_scores.length === 0)) {\n\t\t\t\t\t\tintakeTopic.publish({\n\t\t\t\t\t\t\tsource: \"eval\",\n\t\t\t\t\t\t\tsummary: `Task ${task.task_id} invalid (model: ${run.model})`,\n\t\t\t\t\t\t\tevidence: `Run ${run.run_id}: task produced invalid output`,\n\t\t\t\t\t\t\taffectsAreas: [\"graphspec\"],\n\t\t\t\t\t\t\taffectsEvalTasks: [task.task_id],\n\t\t\t\t\t\t\tseverity: defaultSeverity,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Per-criterion findings\n\t\t\t\t\tif (task.judge_scores) {\n\t\t\t\t\t\tfor (const score of task.judge_scores) {\n\t\t\t\t\t\t\tif (score.pass) continue;\n\t\t\t\t\t\t\tintakeTopic.publish({\n\t\t\t\t\t\t\t\tsource: \"eval\",\n\t\t\t\t\t\t\t\tsummary: `${task.task_id}: ${score.claim} (model: ${run.model})`,\n\t\t\t\t\t\t\t\tevidence: score.reasoning,\n\t\t\t\t\t\t\t\taffectsAreas: [\"graphspec\"],\n\t\t\t\t\t\t\t\taffectsEvalTasks: [task.task_id],\n\t\t\t\t\t\t\t\tseverity: defaultSeverity,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{ describeKind: \"effect\" },\n\t);\n\tgraph.add(eff, { name });\n\treturn eff;\n}\n\n// ---------------------------------------------------------------------------\n// Composition A: Eval-driven improvement loop\n// ---------------------------------------------------------------------------\n\n/**\n * Wrap any eval runner as a reactive producer node.\n *\n * When `trigger` emits, calls `runner()` and emits the result downstream.\n * Uses `switchMap` + `fromAny` — the async boundary stays in the source\n * layer (spec §5.10). A new trigger cancels any in-flight run.\n *\n * Pure transform via operator composition — does not construct an\n * effect/derived node, so no `graph` parameter is needed.\n *\n * ```ts\n * const trigger = state(0); // bump to trigger a new run\n * const results = evalSource(trigger, () => runEvals(config));\n * results.subscribe(msgs => { ... });\n * trigger.emit(1); // fires the runner\n * ```\n *\n * @param trigger - Any node; each new DATA emission fires the runner.\n * @param runner - Returns an EvalRunResult (or promise of one).\n */\nexport function evalSource<T extends EvalRunResult>(\n\ttrigger: Node<unknown>,\n\trunner: () => T | Promise<T>,\n): Node<T> {\n\treturn switchMap(trigger, () => fromAny(runner()) as Node<T>);\n}\n\n// ---------------------------------------------------------------------------\n\n/** Per-task delta produced by {@link beforeAfterCompare}. */\nexport interface EvalTaskDelta {\n\ttaskId: string;\n\tbefore: boolean;\n\tafter: boolean;\n\t/** Score-level diff (after − before), undefined if no scores present. */\n\tscoreDiff?: number;\n}\n\n/** Output of {@link beforeAfterCompare}. */\nexport interface EvalDelta {\n\t/** Task IDs that newly fail in `after` (were passing in `before`). */\n\tnewFailures: string[];\n\t/** Task IDs that now pass in `after` (were failing in `before`). */\n\tresolved: string[];\n\t/** Full per-task breakdown. */\n\ttaskDeltas: EvalTaskDelta[];\n\t/** True when net resolutions > net failures. */\n\toverallImproved: boolean;\n}\n\n/** Options for {@link beforeAfterCompare}. */\nexport interface BeforeAfterCompareOptions {\n\t/** Graph to register the derived node on (B.1 narrow-waist visibility). */\n\tgraph: Graph;\n\t/** Node holding the baseline eval result. */\n\tbefore: Node<EvalRunResult>;\n\t/** Node holding the new eval result. */\n\tafter: Node<EvalRunResult>;\n\t/** Derived-node name (default `\"eval-delta\"`). */\n\tname?: string;\n}\n\n/**\n * Derived node that computes before/after eval deltas.\n *\n * Pure computation: no LLM, no async. Compares per-task validity and\n * pass counts between two `EvalRunResult` snapshots.\n *\n * The derived node is registered on the supplied `graph` so it appears in\n * `describe()` and is owned by the graph's lifecycle.\n */\nexport function beforeAfterCompare(opts: BeforeAfterCompareOptions): Node<EvalDelta> {\n\tconst { graph, before, after, name = \"eval-delta\" } = opts;\n\tconst der = node<EvalDelta>(\n\t\t[before as Node<unknown>, after as Node<unknown>],\n\t\t(batchData, actions, ctx) => {\n\t\t\tconst data = batchData.map((batch, i) =>\n\t\t\t\tbatch != null && batch.length > 0 ? batch.at(-1) : ctx.prevData[i],\n\t\t\t);\n\t\t\tconst bRes = data[0] as EvalRunResult;\n\t\t\tconst aRes = data[1] as EvalRunResult;\n\n\t\t\tconst beforeMap = new Map<string, EvalTaskResult>(bRes.tasks.map((t) => [t.task_id, t]));\n\t\t\tconst afterMap = new Map<string, EvalTaskResult>(aRes.tasks.map((t) => [t.task_id, t]));\n\n\t\t\tconst allIds = new Set([...beforeMap.keys(), ...afterMap.keys()]);\n\t\t\tconst taskDeltas: EvalTaskDelta[] = [];\n\t\t\tconst newFailures: string[] = [];\n\t\t\tconst resolved: string[] = [];\n\n\t\t\tfor (const id of allIds) {\n\t\t\t\tconst bt = beforeMap.get(id);\n\t\t\t\tconst at = afterMap.get(id);\n\t\t\t\tconst beforeValid = bt?.valid ?? false;\n\t\t\t\tconst afterValid = at?.valid ?? false;\n\n\t\t\t\tconst beforeScore = bt?.judge_scores\n\t\t\t\t\t? bt.judge_scores.filter((s) => s.pass).length\n\t\t\t\t\t: undefined;\n\t\t\t\tconst afterScore = at?.judge_scores\n\t\t\t\t\t? at.judge_scores.filter((s) => s.pass).length\n\t\t\t\t\t: undefined;\n\t\t\t\tconst scoreDiff =\n\t\t\t\t\tbeforeScore !== undefined && afterScore !== undefined\n\t\t\t\t\t\t? afterScore - beforeScore\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\ttaskDeltas.push({ taskId: id, before: beforeValid, after: afterValid, scoreDiff });\n\t\t\t\tif (beforeValid && !afterValid) newFailures.push(id);\n\t\t\t\tif (!beforeValid && afterValid) resolved.push(id);\n\t\t\t}\n\n\t\t\tactions.emit({\n\t\t\t\tnewFailures,\n\t\t\t\tresolved,\n\t\t\t\ttaskDeltas,\n\t\t\t\toverallImproved: resolved.length > newFailures.length,\n\t\t\t});\n\t\t},\n\t\t{ describeKind: \"derived\" },\n\t);\n\tgraph.add(der as Node<unknown>, { name });\n\treturn der;\n}\n\n// ---------------------------------------------------------------------------\n\n/** Options for {@link affectedTaskFilter}. */\nexport interface AffectedTaskFilterOptions {\n\t/** Graph to register the derived node on (B.1 narrow-waist visibility). */\n\tgraph: Graph;\n\t/** Node holding the current list of triaged items. */\n\tissues: Node<readonly TriagedItem[]>;\n\t/**\n\t * Optional node (or plain array) of all known task IDs.\n\t * When provided, output is the intersection.\n\t */\n\tfullTaskSet?: Node<readonly string[]> | readonly string[];\n\t/** Derived-node name (default `\"affected-task-filter\"`). */\n\tname?: string;\n}\n\n/**\n * Derived node that selects which eval task IDs to re-run.\n *\n * Collects `affectsEvalTasks` from all triaged items, deduplicates, then\n * optionally intersects with `fullTaskSet`. Returns a sorted array of IDs.\n *\n * Use this to avoid re-running the full eval suite after each fix: only the\n * tasks that the triaged items claim to affect are returned.\n *\n * The derived node is registered on the supplied `graph` so it appears in\n * `describe()` and is owned by the graph's lifecycle.\n */\nexport function affectedTaskFilter(opts: AffectedTaskFilterOptions): Node<string[]> {\n\tconst { graph, issues, fullTaskSet, name = \"affected-task-filter\" } = opts;\n\n\tlet taskSetNode: Node<unknown> | null = null;\n\tif (fullTaskSet != null) {\n\t\tif (Array.isArray(fullTaskSet)) {\n\t\t\t// Static-array form: register the inline state node so it appears\n\t\t\t// in `describe()`/`explain()` walks (EC8 — qa 2026-04-30).\n\t\t\tconst inlineSet = node([], { initial: fullTaskSet as readonly string[] });\n\t\t\tgraph.add(inlineSet, { name: `${name}/fullTaskSet` });\n\t\t\ttaskSetNode = inlineSet as Node<unknown>;\n\t\t} else {\n\t\t\t// User-supplied Node — owned by the caller's graph; don't re-add.\n\t\t\ttaskSetNode = fullTaskSet as Node<unknown>;\n\t\t}\n\t}\n\n\tconst deps: Node<unknown>[] = [issues as Node<unknown>];\n\tif (taskSetNode) deps.push(taskSetNode);\n\n\tconst der = node<string[]>(\n\t\tdeps,\n\t\t(batchData, actions, ctx) => {\n\t\t\tconst data = batchData.map((batch, i) =>\n\t\t\t\tbatch != null && batch.length > 0 ? batch.at(-1) : ctx.prevData[i],\n\t\t\t);\n\t\t\tconst items = data[0] as readonly TriagedItem[];\n\t\t\tconst all = taskSetNode ? new Set(data[1] as readonly string[]) : null;\n\n\t\t\tconst affected = new Set<string>();\n\t\t\tfor (const item of items) {\n\t\t\t\tfor (const id of item.affectsEvalTasks ?? []) {\n\t\t\t\t\tif (all == null || all.has(id)) affected.add(id);\n\t\t\t\t}\n\t\t\t}\n\t\t\tactions.emit([...affected].sort());\n\t\t},\n\t\t{ describeKind: \"derived\" },\n\t);\n\tgraph.add(der as Node<unknown>, { name });\n\treturn der;\n}\n\n// ---------------------------------------------------------------------------\n// Composition D: Quality gate (CI/CD)\n// ---------------------------------------------------------------------------\n\n/** A single lint error emitted by a CI tool. */\nexport interface LintError {\n\tfile: string;\n\tline: number;\n\tcol: number;\n\trule: string;\n\tmessage: string;\n}\n\n/** A single test failure emitted by a test runner. */\nexport interface TestFailure {\n\ttestId: string;\n\tfile: string;\n\tmessage: string;\n}\n\n/** Structured code-change / CI event. */\nexport interface CodeChange {\n\t/** Files touched by the change. */\n\tfiles: string[];\n\tlintErrors?: LintError[];\n\ttestFailures?: TestFailure[];\n}\n\n/** Options for {@link codeChangeBridge}. */\nexport interface CodeChangeBridgeOptions {\n\t/** Graph to register the effect node on (B.1 narrow-waist visibility). */\n\tgraph: Graph;\n\t/** Node emitting CodeChange events. */\n\tsource: Node<CodeChange>;\n\t/** TopicGraph to publish IntakeItem entries to. */\n\tintakeTopic: TopicGraph<IntakeItem>;\n\t/** Optional custom parser (overrides default). */\n\tparser?: (change: CodeChange) => IntakeItem[];\n\t/** Effect-node name (default `\"code-change-bridge\"`). */\n\tname?: string;\n\t/** Default severity for generated IntakeItems (default `\"high\"`). */\n\tdefaultSeverity?: Severity;\n}\n\n/**\n * Intake bridge for code-change / CI events.\n *\n * Watches a source node for `CodeChange` events and publishes one\n * `IntakeItem` per lint error and per test failure to the intake topic.\n * Pass a custom `parser` to override the default mapping.\n *\n * The effect node is registered on the supplied `graph` so it appears in\n * `describe()` and is owned by the graph's lifecycle.\n */\nexport function codeChangeBridge(opts: CodeChangeBridgeOptions): Node<unknown> {\n\tconst {\n\t\tgraph,\n\t\tsource,\n\t\tintakeTopic,\n\t\tparser,\n\t\tname = \"code-change-bridge\",\n\t\tdefaultSeverity = \"high\",\n\t} = opts;\n\n\tfunction defaultParser(change: CodeChange): IntakeItem[] {\n\t\tconst items: IntakeItem[] = [];\n\t\tfor (const err of change.lintErrors ?? []) {\n\t\t\titems.push({\n\t\t\t\tsource: \"code-change\",\n\t\t\t\tsummary: `Lint: ${err.rule} in ${err.file}:${err.line}`,\n\t\t\t\tevidence: err.message,\n\t\t\t\taffectsAreas: [err.file],\n\t\t\t\tseverity: defaultSeverity,\n\t\t\t});\n\t\t}\n\t\tfor (const fail of change.testFailures ?? []) {\n\t\t\titems.push({\n\t\t\t\tsource: \"test\",\n\t\t\t\tsummary: `Test failure: ${fail.testId}`,\n\t\t\t\tevidence: fail.message,\n\t\t\t\taffectsAreas: [fail.file],\n\t\t\t\taffectsEvalTasks: [fail.testId],\n\t\t\t\tseverity: defaultSeverity,\n\t\t\t});\n\t\t}\n\t\treturn items;\n\t}\n\n\tconst resolve = parser ?? defaultParser;\n\n\tconst eff = node(\n\t\t[source as Node<unknown>],\n\t\t(batchData, _actions, ctx) => {\n\t\t\tconst data = batchData.map((batch, i) =>\n\t\t\t\tbatch != null && batch.length > 0 ? batch.at(-1) : ctx.prevData[i],\n\t\t\t);\n\t\t\tconst change = data[0];\n\t\t\tif (change === undefined) return;\n\t\t\tfor (const item of resolve(change as CodeChange)) {\n\t\t\t\tintakeTopic.publish(item);\n\t\t\t}\n\t\t},\n\t\t{ describeKind: \"effect\" },\n\t);\n\tgraph.add(eff, { name });\n\treturn eff;\n}\n\n// ---------------------------------------------------------------------------\n\n/** Transport function for {@link notifyEffect}. Sync or async. */\nexport type NotifyTransport<T> = (item: T) => void | Promise<void>;\n\n/** Options for {@link notifyEffect}. */\nexport interface NotifyEffectOptions<T> {\n\t/** Graph to register the effect node on (B.1 narrow-waist visibility). */\n\tgraph: Graph;\n\t/** TopicGraph whose latest entry triggers the notification. */\n\ttopic: TopicGraph<T>;\n\t/** Called with each new item. May return a Promise. */\n\ttransport: NotifyTransport<T>;\n\t/** Effect-node name (default `\"notify-effect\"`). */\n\tname?: string;\n}\n\n/**\n * Effect node that sends each new topic entry to an external channel.\n *\n * The `transport` function is called for every item published to `topic`.\n * Async transports are bridged via `fromAny` (spec §5.10 compliant).\n *\n * Typical use: Slack webhook, GitHub PR comment, email notification, etc.\n * The factory provides reactive wiring; the transport supplies domain logic.\n *\n * The effect node is registered on the supplied `graph` so it appears in\n * `describe()` and is owned by the graph's lifecycle.\n *\n * ```ts\n * notifyEffect({ graph, topic: alertQueue, transport: async (item) => {\n * await fetch(SLACK_WEBHOOK, { method: 'POST', body: JSON.stringify({ text: item.summary }) });\n * }});\n * ```\n */\nexport function notifyEffect<T>(opts: NotifyEffectOptions<T>): Node<unknown> {\n\tconst { graph, topic, transport, name = \"notify-effect\" } = opts;\n\t// SENTINEL contract on `topic.latest` (COMPOSITION-GUIDE §1a + spec §5.12):\n\t// - `topic.publish(undefined)` is rejected at the publish boundary, so\n\t// `undefined` is exclusively the protocol SENTINEL on the read side.\n\t// - `topic.latest` stays SENTINEL on empty (no eager DATA emission), so\n\t// the partial-false first-run gate holds this fn until the first publish.\n\t// - Legit `null` DATA (when `T` includes `null`) reaches `transport`;\n\t// user transports must handle `null` themselves per v5.\n\t// The `=== undefined` guard below is defense-in-depth for any future\n\t// empty-batch wave where `prevData[0]` is still SENTINEL — in normal flow\n\t// the first-run gate has already filtered the empty case.\n\tconst eff = node(\n\t\t[topic.latest as Node<unknown>],\n\t\t(batchData, _actions, ctx) => {\n\t\t\tconst data = batchData.map((batch, i) =>\n\t\t\t\tbatch != null && batch.length > 0 ? batch.at(-1) : ctx.prevData[i],\n\t\t\t);\n\t\t\tconst item = data[0];\n\t\t\tif (item === undefined) return;\n\t\t\t// transport is a side effect (webhook, Slack, email). Async transports\n\t\t\t// are fire-and-forget — the Promise result does not feed back into the\n\t\t\t// graph. Suppress unhandled-rejection noise by voiding the return.\n\t\t\tvoid transport(item as T);\n\t\t},\n\t\t{ describeKind: \"effect\" },\n\t);\n\tgraph.add(eff, { name });\n\treturn eff;\n}\n","/**\n * Pure exponential-decay utility (Tier 2.2 promotion from `patterns/memory/`).\n *\n * Used by `collection`, `agentMemory`, harness `strategy.ts`, and any\n * downstream consumer that needs decay-with-floor scoring. Promoted to\n * `extra/utils/` because the math has zero domain semantics and is reusable\n * by non-memory primitives (e.g. routing weight decay, retry-attempt aging).\n *\n * @module\n */\n\n/**\n * Default exponential-decay rate corresponding to a 7-day half-life.\n *\n * `Math.LN2 / (7 × 86_400)` ≈ `1.146e-6`. Imported by memory tiers + any\n * consumer that wants the same default cadence as `agentMemory`'s active\n * tier. Tier 4.4 (Wave AM Unit 1) — promoted from\n * `patterns/ai/memory/tiers.ts` so non-memory consumers can share the\n * canonical default without reaching across domains.\n */\nexport const DEFAULT_DECAY_RATE = Math.LN2 / (7 * 86_400);\n\n/**\n * Exponential decay with floor: `score = max(minScore, baseScore * exp(-ratePerSecond * ageSeconds))`.\n *\n * Tolerant fallbacks (deliberate for use inside reactive derived fns):\n * - non-finite `baseScore` → `minScore`\n * - non-positive `ageSeconds` (incl. clock skew) → `max(minScore, baseScore)` (no decay)\n * - non-positive `ratePerSecond` → `max(minScore, baseScore)` (no decay; rate=0 disables)\n *\n * Underflow boundary: `Math.exp(-745) === 0`. For very long ages × rates the\n * result clamps to `minScore`; if you need slow decay over years, choose a\n * smaller `ratePerSecond` rather than relying on graceful underflow.\n *\n * Half-life conversion: `ratePerSecond = Math.LN2 / halfLifeSeconds`.\n */\nexport function decay(\n\tbaseScore: number,\n\tageSeconds: number,\n\tratePerSecond: number,\n\tminScore = 0,\n): number {\n\tif (!Number.isFinite(baseScore)) return minScore;\n\tif (!Number.isFinite(ageSeconds) || ageSeconds <= 0) return Math.max(minScore, baseScore);\n\tif (!Number.isFinite(ratePerSecond) || ratePerSecond <= 0) return Math.max(minScore, baseScore);\n\tconst decayed = baseScore * Math.exp(-ratePerSecond * ageSeconds);\n\treturn Math.max(minScore, decayed);\n}\n","/**\n * Harness runtime defaults (roadmap §9.0).\n *\n * Split out from `types.ts` in Wave B Unit 15 G so the type file holds\n * only type declarations and plug-in contracts. Runtime constants and\n * helpers live here; the harness barrel (`index.ts`) re-exports both so\n * external consumers see a single surface.\n *\n * @module\n */\n\nimport type {\n\tErrorClass,\n\tErrorClassifier,\n\tExecutionResult,\n\tIntervention,\n\tPresetId,\n\tQueueConfig,\n\tQueueRoute,\n\tRootCause,\n\tSeverity,\n\tStrategyKey,\n} from \"./types.js\";\n\n// ---------------------------------------------------------------------------\n// Route / queue\n// ---------------------------------------------------------------------------\n\n/** Ordered queue route names for iteration. */\nexport const QUEUE_NAMES: readonly QueueRoute[] = [\n\t\"auto-fix\",\n\t\"needs-decision\",\n\t\"investigation\",\n\t\"backlog\",\n];\n\n/** Default queue configurations. */\nexport const DEFAULT_QUEUE_CONFIGS: Record<QueueRoute, QueueConfig> = {\n\t\"auto-fix\": { gated: false },\n\t\"needs-decision\": { gated: true },\n\tinvestigation: { gated: true },\n\t// `startOpen` intentionally omitted — backlog is not gated, so the flag\n\t// would be meaningless. Dropped in Unit 15 G trim pass.\n\tbacklog: { gated: false },\n};\n\n// ---------------------------------------------------------------------------\n// Priority scoring\n// ---------------------------------------------------------------------------\n\n/** Default severity weights. */\nexport const DEFAULT_SEVERITY_WEIGHTS: Record<Severity, number> = {\n\tcritical: 100,\n\thigh: 70,\n\tmedium: 40,\n\tlow: 10,\n};\n\n/** Default decay rate: ~7-day half-life. Re-exported from `base/utils/decay.ts`. */\nexport { DEFAULT_DECAY_RATE } from \"../../base/utils/decay.js\";\n\n// ---------------------------------------------------------------------------\n// Strategy model\n// ---------------------------------------------------------------------------\n\n/**\n * Canonical 3-axis composite-key factory: `${presetId}|${rootCause}→${intervention}`.\n *\n * **Phase 13.I axis extension (DS-13.I, 2026-05-01).** Pre-multi-agent\n * callers without a preset registry pass {@link DEFAULT_PRESET_ID}\n * (`\"default\"`) for the first arg. Pre-1.0 breaking signature change;\n * persisted strategy-model snapshots from before this date are NOT portable.\n */\nexport function strategyKey(\n\tpresetId: PresetId,\n\trootCause: RootCause,\n\tintervention: Intervention,\n): StrategyKey {\n\treturn `${presetId}|${rootCause}→${intervention}`;\n}\n\n// ---------------------------------------------------------------------------\n// Error classifier\n// ---------------------------------------------------------------------------\n\n/**\n * Regex-word-boundary match over a closed keyword set. Callers needing\n * domain-specific failure modes should supply a custom\n * {@link ErrorClassifier}; this default exists so zero-config harness runs\n * still distinguish parse-class failures (fast-retry) from everything\n * else (full loop via reingestion).\n */\nconst SELF_CORRECTABLE_RE = /\\b(parse|json|config|validation|syntax)\\b/i;\n\n/** Default error classifier: parse/config errors are self-correctable. */\nexport const defaultErrorClassifier: ErrorClassifier = (result: ExecutionResult): ErrorClass =>\n\tSELF_CORRECTABLE_RE.test(result.detail) ? \"self-correctable\" : \"structural\";\n\n// ---------------------------------------------------------------------------\n// Default stage prompts\n// ---------------------------------------------------------------------------\n\n/** Default TRIAGE prompt — LLM classifies intake items into root-cause + intervention + route + priority. */\nexport const DEFAULT_TRIAGE_PROMPT = `You are a triage classifier for a reactive collaboration harness.\n\nGiven an intake item, classify it and output JSON:\n{\n \"rootCause\": \"composition\" | \"missing-fn\" | \"bad-docs\" | \"schema-gap\" | \"regression\" | \"unknown\",\n \"intervention\": \"template\" | \"catalog-fn\" | \"docs\" | \"wrapper\" | \"schema-change\" | \"investigate\",\n \"route\": \"auto-fix\" | \"needs-decision\" | \"investigation\" | \"backlog\",\n \"priority\": <number 0-100>,\n \"triageReasoning\": \"<one sentence>\"\n}\n\nStrategy model (past effectiveness):\n{{strategy}}\n\nIntake item:\n{{item}}`;\n\n/** Default EXECUTE prompt — LLM produces a fix given a triaged issue. */\nexport const DEFAULT_EXECUTE_PROMPT = `You are an implementation agent.\n\nGiven a triaged issue with root cause and intervention type, produce a fix.\n\nIssue:\n{{item}}\n\nOutput JSON:\n{\n \"outcome\": \"success\" | \"failure\" | \"partial\",\n \"detail\": \"<description of what was done or what failed>\"\n}`;\n\n/** Default VERIFY prompt — LLM reviews an execution result against the original issue. */\nexport const DEFAULT_VERIFY_PROMPT = `You are a QA reviewer.\n\nGiven an execution result, verify whether the fix is correct.\n\nExecution:\n{{execution}}\n\nOriginal issue:\n{{item}}\n\nOutput JSON:\n{\n \"verified\": true/false,\n \"findings\": [\"<finding1>\", ...],\n \"errorClass\": \"self-correctable\" | \"structural\" // only if verified=false\n}`;\n\n// ---------------------------------------------------------------------------\n// Prompt resolver helper\n// ---------------------------------------------------------------------------\n\n/**\n * Collapse the `string | ((input: In) => string) | undefined` prompt-template\n * pattern into a single `(input: In) => string`. A function `raw` is used as-is\n * (the caller opted into full control). Otherwise `raw ?? fallbackTemplate`\n * is fed through `substitute`, which does the placeholder replacement.\n *\n * Used by the three harness stages (TRIAGE / EXECUTE / VERIFY), which each\n * accept a `string | function` config but use different placeholder schemes\n * (`{{item}}`, `{{execution}}`, `{{strategy}}`). The helper absorbs only the\n * branch logic; the per-stage placeholder substitution lives at the call site.\n */\nexport function resolvePromptFn<In>(\n\traw: string | ((input: In) => string) | undefined,\n\tfallbackTemplate: string,\n\tsubstitute: (template: string, input: In) => string,\n): (input: In) => string {\n\tif (typeof raw === \"function\") return raw;\n\tconst template = raw ?? fallbackTemplate;\n\treturn (input) => substitute(template, input);\n}\n","/**\n * Strategy model and priority scoring (roadmap §9.0).\n *\n * `strategyModel` returns a typed alias of {@link AuditedSuccessTrackerGraph}\n * keyed by `StrategyKey` (the composite `rootCause→intervention` string).\n * The shared substrate (Class B audit Alt E collapse, 2026-04-30) replaces\n * the prior bespoke bundle shape; composite-key callers use {@link strategyKey}\n * to compute the key and pass `{ rootCause, intervention }` as record decoration.\n *\n * @module\n */\n\nimport { monotonicNs, type Node, node } from \"@graphrefly/pure-ts/core\";\nimport { decay } from \"../../base/utils/decay.js\";\nimport {\n\ttype AuditedSuccessTrackerGraph,\n\tauditedSuccessTracker,\n} from \"../orchestration/audited-success-tracker.js\";\n\nimport {\n\tDEFAULT_DECAY_RATE,\n\tDEFAULT_PRESET_ID,\n\tDEFAULT_SEVERITY_WEIGHTS,\n\ttype PrioritySignals,\n\ttype StrategyEntry,\n\ttype StrategyKey,\n\tstrategyKey,\n\ttype TriagedItem,\n} from \"./types.js\";\n\n// ---------------------------------------------------------------------------\n// Strategy model\n// ---------------------------------------------------------------------------\n\n/** Snapshot shape for the strategy-model `entries` node. */\nexport type StrategySnapshot = ReadonlyMap<StrategyKey, StrategyEntry>;\n\n/** Strategy-model graph: a typed alias of {@link AuditedSuccessTrackerGraph}. */\nexport type StrategyModelGraph = AuditedSuccessTrackerGraph<StrategyKey, StrategyEntry>;\n\n/**\n * Create a strategy model that tracks\n * `presetId × rootCause × intervention → successRate` over completed\n * issues (presetId axis added in Phase 13.I, 2026-05-01). Returns an\n * {@link AuditedSuccessTrackerGraph} keyed by {@link StrategyKey}.\n *\n * The reactive `entries` field is a `Node<StrategySnapshot>` suitable for\n * `describe()` / `withLatestFrom` composition.\n *\n * Composite-key conversion happens at the call site:\n * ```ts\n * const strategy = strategyModel();\n * strategy.record(strategyKey(presetId, rootCause, intervention), success, {\n * presetId,\n * rootCause,\n * intervention,\n * });\n * strategy.lookup(strategyKey(presetId, rootCause, intervention));\n * ```\n *\n * Pass {@link DEFAULT_PRESET_ID} (`\"default\"`) for the presetId axis when\n * no preset registry is wired (single-agent harness).\n *\n * The model feeds back into TRIAGE for routing hints.\n */\nexport function strategyModel(): StrategyModelGraph {\n\treturn auditedSuccessTracker<StrategyKey, StrategyEntry>({ name: \"strategy\" });\n}\n\n// ---------------------------------------------------------------------------\n// Priority scoring\n// ---------------------------------------------------------------------------\n\n/**\n * Create a priority scoring derived node for a single triaged item.\n *\n * Combines severity weight, attention decay, strategy model effectiveness,\n * and an optional external urgency signal.\n *\n * **Age sampling caveat.** The `ageSeconds` term is computed as\n * `monotonicNs() - lastInteractionNs.cache` at *each reactive update*. If\n * nothing upstream settles, the score node does not recompute — so a\n * long-idle queue may show a stale score. Pass a `fromTimer(...)`-driven\n * node as a dep (or re-emit on `lastInteractionNs`) when live age decay\n * matters.\n *\n * **Not the same as `TriagedItem.priority`.** The LLM-emitted\n * `priority: 0..100` field on each triaged item is decorative today — the\n * queue consumption order ignores it (tracked in `docs/optimizations.md`\n * as a priority-ordered queue enhancement). This function computes an\n * orthogonal reactive score; it does NOT override the LLM's per-item\n * priority, nor does it drive queue ordering. Wire it to\n * `HarnessGraph.priorityScores` to surface per-route pressure.\n *\n * @param item - Node holding the triaged item.\n * @param strategy - Strategy model node.\n * @param lastInteractionNs - Node holding the monotonic timestamp (ns) of last human interaction.\n * @param urgency - Optional external urgency signal node (0–1 scale).\n * @param signals - Configurable scoring parameters.\n */\nexport function priorityScore(\n\titem: Node<TriagedItem>,\n\tstrategy: Node<StrategySnapshot>,\n\tlastInteractionNs: Node<number>,\n\turgency?: Node<number>,\n\tsignals?: PrioritySignals,\n): Node<number> {\n\tconst severityWeights = { ...DEFAULT_SEVERITY_WEIGHTS, ...signals?.severityWeights };\n\tconst decayRate = signals?.decayRate ?? DEFAULT_DECAY_RATE;\n\tconst effectivenessThreshold = signals?.effectivenessThreshold ?? 0.7;\n\tconst effectivenessBoost = signals?.effectivenessBoost ?? 15;\n\n\tconst deps: Node<unknown>[] = [item, strategy, lastInteractionNs];\n\tif (urgency) deps.push(urgency);\n\n\treturn node<number>(\n\t\tdeps,\n\t\t(batchData, actions, ctx) => {\n\t\t\tconst values = batchData.map((batch, i) =>\n\t\t\t\tbatch != null && batch.length > 0 ? batch.at(-1) : ctx.prevData[i],\n\t\t\t);\n\t\t\tconst itm = values[0] as TriagedItem;\n\t\t\tconst strat = values[1] as StrategySnapshot;\n\t\t\tconst lastNs = values[2] as number;\n\t\t\tconst urg = urgency ? (values[3] as number) : 0;\n\n\t\t\t// Base score from severity\n\t\t\tconst baseWeight = severityWeights[itm.severity ?? \"medium\"];\n\t\t\tconst ageSeconds = (monotonicNs() - lastNs) / 1e9;\n\t\t\tlet score = decay(baseWeight, ageSeconds, decayRate, 0);\n\n\t\t\t// Strategy model boost\n\t\t\tconst key = strategyKey(DEFAULT_PRESET_ID, itm.rootCause, itm.intervention);\n\t\t\tconst entry = strat.get(key);\n\t\t\tif (entry && entry.successRate >= effectivenessThreshold) {\n\t\t\t\tscore += effectivenessBoost;\n\t\t\t}\n\n\t\t\t// External urgency boost (0–1 scale → 0–20 points)\n\t\t\tscore += urg * 20;\n\n\t\t\tactions.emit(score);\n\t\t},\n\t\t{ name: \"priority-score\", describeKind: \"derived\" },\n\t);\n}\n","/**\n * `auditedSuccessTracker` — domain-agnostic per-key success-rate tracker.\n *\n * Reactive `key → { attempts, successes, successRate }` map mounted as a\n * Graph subclass. Reusable substrate for any domain that needs to track\n * outcomes per identifier (routing strategy effectiveness, A/B-test arms,\n * cache-policy tuning, retry-strategy selection, etc.).\n *\n * Replaces the prior `effectivenessTracker` and `strategyModel` factories\n * (Class B audit Alt E collapse, 2026-04-30). Composite-key callers (e.g.\n * `rootCause × intervention`) convert to a string key at the call site.\n *\n * @module\n */\n\nimport type { Node } from \"@graphrefly/pure-ts/core\";\nimport { keepalive, type ReactiveMapBundle, reactiveMap } from \"@graphrefly/pure-ts/extra\";\nimport { Graph, type GraphOptions } from \"@graphrefly/pure-ts/graph\";\n\n/** A single success-rate record for one key. */\nexport interface AuditedSuccessEntry<TKey extends string = string> {\n\treadonly key: TKey;\n\treadonly attempts: number;\n\treadonly successes: number;\n\treadonly successRate: number;\n}\n\n/** Snapshot shape — fresh `ReadonlyMap` on every mutation. */\nexport type AuditedSuccessSnapshot<\n\tTKey extends string = string,\n\tTEntry extends AuditedSuccessEntry<TKey> = AuditedSuccessEntry<TKey>,\n> = ReadonlyMap<TKey, TEntry>;\n\n/** Options for {@link auditedSuccessTracker}. */\nexport interface AuditedSuccessTrackerOptions {\n\t/** Optional graph identity (passed to the underlying Graph constructor). */\n\tgraph?: GraphOptions;\n\t/** Name of the tracker subgraph. Default `\"audited-success-tracker\"`. */\n\tname?: string;\n}\n\n/**\n * Reactive success-rate tracker mounted as a Graph subclass.\n *\n * `key → AuditedSuccessEntry` with `record(key, success, extra?)` /\n * `lookup(key)` methods. The {@link entries} field is a\n * `Node<ReadonlyMap<TKey, TEntry>>` suitable for graph composition —\n * exposed under name `\"entries\"` for `describe()` / `explain()`.\n *\n * Backed by the {@link reactiveMap} substrate; each successful `record(...)`\n * fires a DATA emission carrying the post-mutation map.\n *\n * **Field name.** This Graph subclass uses `entries` (not `snapshot`) for\n * the public-face Node because `Graph.prototype.snapshot()` is the\n * built-in persistence-snapshot method on the parent class — using\n * `snapshot` here would shadow it and break DTS generation.\n *\n * @typeParam TKey - String-typed key shape. Composite-key domains (e.g.\n * `rootCause × intervention`) convert to a string at the call site.\n * @typeParam TEntry - Entry shape; defaults to {@link AuditedSuccessEntry}.\n * Domains that need extra fields (e.g. `rootCause`/`intervention`) extend\n * this interface and pass the extra fields via `record(...)`'s `extra` arg.\n */\nexport class AuditedSuccessTrackerGraph<\n\tTKey extends string = string,\n\tTEntry extends AuditedSuccessEntry<TKey> = AuditedSuccessEntry<TKey>,\n> extends Graph {\n\t/** Reactive entries — `Node<ReadonlyMap<TKey, TEntry>>`, fresh map per mutation. */\n\treadonly entries: Node<AuditedSuccessSnapshot<TKey, TEntry>>;\n\n\tprivate readonly _map: ReactiveMapBundle<TKey, TEntry>;\n\n\tconstructor(opts?: AuditedSuccessTrackerOptions) {\n\t\tsuper(opts?.name ?? \"audited-success-tracker\", opts?.graph);\n\t\tthis._map = reactiveMap<TKey, TEntry>({ name: \"entries\" });\n\t\tthis.entries = this._map.entries;\n\t\tthis.add(this.entries, { name: \"entries\" });\n\n\t\t// Keep the entries node activated without external subscribers so\n\t\t// `tracker.entries.cache` is readable from sync code paths and\n\t\t// `lookup()` callers don't have to manage subscriptions. Released on\n\t\t// Graph dispose along with the underlying reactiveMap.\n\t\tthis.addDisposer(keepalive(this.entries));\n\t\tthis.addDisposer(() => this._map.dispose());\n\t}\n\n\t/**\n\t * Record a completed attempt. `extra` fields are merged into the stored\n\t * entry — use for domain-specific decoration (e.g. `{ rootCause,\n\t * intervention }` on the strategy-model collapse path).\n\t *\n\t * **Caller contract for typed `TEntry`.** When `TEntry` extends\n\t * {@link AuditedSuccessEntry} with required fields beyond\n\t * `key`/`attempts`/`successes`/`successRate`, the caller must supply\n\t * those required fields in `extra` on the **first** `record(key, ...)`\n\t * for that key. The internal `as TEntry` cast trusts this. Subsequent\n\t * `record(key, ...)` calls inherit the prior entry's fields, so `extra`\n\t * may be omitted or partial. Forgetting required fields on the first\n\t * record produces an entry whose typed-required fields are `undefined`\n\t * at runtime — TS won't catch it. Strategy callers always pass\n\t * `{ rootCause, intervention }`, so the StrategyEntry case is safe.\n\t */\n\trecord(\n\t\tkey: TKey,\n\t\tsuccess: boolean,\n\t\textra?: Partial<Omit<TEntry, \"key\" | \"attempts\" | \"successes\" | \"successRate\">>,\n\t): void {\n\t\tconst existing = this._map.get(key);\n\t\tconst attempts = (existing?.attempts ?? 0) + 1;\n\t\tconst successes = (existing?.successes ?? 0) + (success ? 1 : 0);\n\t\tthis._map.set(key, {\n\t\t\t...(existing ?? {}),\n\t\t\t...(extra ?? {}),\n\t\t\tkey,\n\t\t\tattempts,\n\t\t\tsuccesses,\n\t\t\tsuccessRate: successes / attempts,\n\t\t} as TEntry);\n\t}\n\n\t/**\n\t * Look up the entry for a key.\n\t *\n\t * Pure read: this tracker doesn't configure a TTL on the underlying\n\t * `reactiveMap`, so `_map.get(key)` never triggers TTL-expiry pruning\n\t * (which would otherwise be an observable side effect emitting a fresh\n\t * `entries` snapshot). If `AuditedSuccessTrackerOptions` ever gains a\n\t * `mapOptions` carve-out exposing TTL, revisit this contract.\n\t */\n\tlookup(key: TKey): TEntry | undefined {\n\t\treturn this._map.get(key);\n\t}\n}\n\n/**\n * Construct an {@link AuditedSuccessTrackerGraph}. Replaces the prior\n * `effectivenessTracker()` and `strategyModel()` factories.\n *\n * @example\n * ```ts\n * // Generic per-action tracker\n * const tracker = auditedSuccessTracker({ name: \"ab-test\" });\n * tracker.record(\"variant-a\", true);\n * tracker.record(\"variant-b\", false);\n * tracker.entries.subscribe(snap => console.log(snap.get(\"variant-a\")));\n *\n * // Composite-key (rootCause × intervention) tracker — caller computes the key\n * type StrategyEntry = AuditedSuccessEntry<StrategyKey> & {\n * rootCause: RootCause;\n * intervention: Intervention;\n * };\n * const strategy = auditedSuccessTracker<StrategyKey, StrategyEntry>({\n * name: \"strategy\",\n * });\n * strategy.record(\n * strategyKey(rootCause, intervention),\n * true,\n * { rootCause, intervention },\n * );\n * ```\n *\n * @category extra\n */\nexport function auditedSuccessTracker<\n\tTKey extends string = string,\n\tTEntry extends AuditedSuccessEntry<TKey> = AuditedSuccessEntry<TKey>,\n>(opts?: AuditedSuccessTrackerOptions): AuditedSuccessTrackerGraph<TKey, TEntry> {\n\treturn new AuditedSuccessTrackerGraph<TKey, TEntry>(opts);\n}\n","/**\n * Harness wiring types (roadmap §9.0).\n *\n * Shared types for the reactive collaboration loop: intake, triage, queue,\n * gate, execute, verify, reflect. These types are intentionally domain-agnostic\n * — the harness loop is not specific to eval workflows.\n *\n * Runtime constants and helpers live in `./defaults.ts`. The harness barrel\n * (`./index.ts`) re-exports both so external consumers see a single surface.\n *\n * @module\n */\n\nimport type { Node } from \"@graphrefly/pure-ts/core\";\nimport type { NodeInput } from \"@graphrefly/pure-ts/extra\";\n// Type-only import avoids a runtime cycle with `patterns/ai`.\nimport type { LLMAdapter } from \"../ai/index.js\";\nimport type { JobEnvelope } from \"../job-queue/index.js\";\n\n// ---------------------------------------------------------------------------\n// Intake\n// ---------------------------------------------------------------------------\n\n/** Known intake source tags. */\nexport type KnownIntakeSource = \"eval\" | \"test\" | \"human\" | \"code-change\" | \"hypothesis\" | \"parity\";\n\n/**\n * Sources that can produce intake items. Open union — the known tags\n * retain IDE autocomplete while user-supplied strings (e.g. `\"schema\"`,\n * `\"slack\"`) pass through without a type change.\n */\nexport type IntakeSource = KnownIntakeSource | (string & {});\n\n/** Severity levels for intake items. */\nexport type Severity = \"critical\" | \"high\" | \"medium\" | \"low\";\n\n/** Root cause categories for triage classification. */\nexport type RootCause =\n\t| \"composition\"\n\t| \"missing-fn\"\n\t| \"bad-docs\"\n\t| \"schema-gap\"\n\t| \"regression\"\n\t| \"unknown\";\n\n/** Intervention types that address root causes. */\nexport type Intervention =\n\t| \"template\"\n\t| \"catalog-fn\"\n\t| \"docs\"\n\t| \"wrapper\"\n\t| \"schema-change\"\n\t| \"investigate\";\n\n/** Routing destinations after triage. Closed union — iterated via `QUEUE_NAMES`. */\nexport type QueueRoute = \"auto-fix\" | \"needs-decision\" | \"investigation\" | \"backlog\";\n\n/**\n * An item entering the harness loop via the INTAKE stage.\n *\n * All intake sources produce this uniform shape — the intake topic\n * doesn't care where items came from.\n *\n * `$`-prefix keys (`$reingestions`, `$retries` on {@link TriagedItem}) are\n * framework-only — an LLM round-tripping the serialized item is far less\n * likely to echo back a `$`-prefixed key than an `_`-prefixed one, which\n * neutralizes the field-collision class that surfaced earlier in the\n * router's spread order.\n */\nexport interface IntakeItem {\n\tsource: IntakeSource;\n\tsummary: string;\n\tevidence: string;\n\taffectsAreas: string[];\n\taffectsEvalTasks?: string[];\n\tseverity?: Severity;\n\t/**\n\t * Identity-preservation key for retried / reingested items.\n\t *\n\t * `relatedTo[0]` MUST carry the original tracking key for retry /\n\t * reingest items so the harness's `routeJobIds` map preserves\n\t * identity across decorated retry summaries (per qa D1, 2026-04-29).\n\t * First-time publishes leave this `undefined`; the tracking key\n\t * falls back to `summary` via {@link trackingKey}.\n\t *\n\t * **Collision contract (DS-13.5.D.3, locked 2026-05-01).** Items\n\t * lacking `relatedTo[0]` and producing colliding `trackingKey()`\n\t * derivations overwrite the prior `routeJobIds` entry —\n\t * **last-write-wins**. Framework-enforced uniqueness was rejected\n\t * because it would break legitimate retry / reingest patterns where\n\t * an explicit `relatedTo[0]` carries the original key forward.\n\t *\n\t * **Single-threaded contract.** Ack runs before reingest publishes\n\t * (harness flow invariant) — under the standard single-threaded JS\n\t * pump this collapses the only practical race window. Multi-publisher\n\t * concurrency or batched intake of two first-time items with identical\n\t * `summary` can still race at boundaries; callers carrying their own\n\t * stable id should set `relatedTo[0]`.\n\t *\n\t * See {@link trackingKey} JSDoc in `patterns/_internal/index.ts` for\n\t * the uniqueness caller contract.\n\t *\n\t * Spec: docs/implementation-plan.md DS-13.5.D.3\n\t */\n\trelatedTo?: string[];\n\t/** Item-carried reingestion count. Incremented on each full-loop reingestion. */\n\t$reingestions?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Triage output\n// ---------------------------------------------------------------------------\n\n/** Output of the TRIAGE stage — enriched intake item with classification. */\nexport interface TriagedItem extends IntakeItem {\n\trootCause: RootCause;\n\tintervention: Intervention;\n\troute: QueueRoute;\n\tpriority: number;\n\ttriageReasoning?: string;\n\t/** Item-carried retry count. Incremented on each fast-retry pass. */\n\t$retries?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Strategy model\n// ---------------------------------------------------------------------------\n\n/**\n * Preset / persona / skill identifier. Open string set; conventionally\n * matches keys used in {@link presetRegistry} (Phase 13.H). Use\n * {@link DEFAULT_PRESET_ID} (\"default\") when no preset registry is wired.\n */\nexport type PresetId = string;\n\n/** Default presetId used when no preset registry is wired (back-compat for 2-axis callers). */\nexport const DEFAULT_PRESET_ID: PresetId = \"default\";\n\n/**\n * Key format: `${presetId}|${rootCause}→${intervention}`.\n *\n * **Phase 13.I axis extension (DS-13.I, 2026-05-01).** Widened from the\n * pre-multi-agent 2-axis `${rootCause}→${intervention}` to a 3-axis key\n * carrying the presetId of the agent that ran. Pre-1.0 breaking change;\n * existing callsites pass {@link DEFAULT_PRESET_ID} for the new axis when\n * they don't have a preset registry wired. The strategy-model storage\n * (`auditedSuccessTracker<StrategyKey, StrategyEntry>`) is unchanged\n * structurally — the key shape change cascades through the existing\n * tracker without surface refactor.\n */\nexport type StrategyKey = `${PresetId}|${RootCause}→${Intervention}`;\n\n/**\n * Effectiveness record for a `(presetId, rootCause, intervention)` triple.\n * Stored under `auditedSuccessTracker<StrategyKey, StrategyEntry>` (Class B\n * audit Alt E collapse, 2026-04-30; presetId axis added Phase 13.I,\n * 2026-05-01) — `key` is the composite `strategyKey(presetId, rc, intv)`\n * computed at the call site; `presetId` / `rootCause` / `intervention` are\n * decoration carried via `record(...)` so consumers can read them without\n * re-parsing the key.\n */\nexport interface StrategyEntry {\n\tkey: StrategyKey;\n\tpresetId: PresetId;\n\trootCause: RootCause;\n\tintervention: Intervention;\n\tattempts: number;\n\tsuccesses: number;\n\tsuccessRate: number;\n}\n\n// ---------------------------------------------------------------------------\n// Execution & verification\n// ---------------------------------------------------------------------------\n\n/**\n * LLM output shape from the EXECUTE stage (partial — lacks `item`).\n *\n * Generic over the artifact type `A` so typed executors like\n * `refineExecutor<T>` can flow `T` through to an `evalVerifier<T>` without\n * the caller casting `artifact` at the boundary. Defaults to `unknown`\n * for escape-hatch executors that carry opaque state.\n */\nexport type ExecuteOutput<A = unknown> = {\n\t/**\n\t * Execution outcome classification:\n\t *\n\t * - `\"success\"`: execution completed cleanly and the artifact (if any) is\n\t * ready for verification. The verifier should proceed with a full\n\t * evaluation pass.\n\t * - `\"failure\"`: execution did not produce a usable artifact — the actuator\n\t * threw, a prompt parse failed, or `shouldApply` skipped the item. The\n\t * verifier should treat this as a non-result and route accordingly.\n\t * - `\"partial\"`: execution produced a candidate that converged but did not\n\t * fully meet verification criteria. Used by `refineExecutor` when the\n\t * iteration cap is reached without full convergence; the artifact holds\n\t * the best candidate achieved.\n\t */\n\toutcome: \"success\" | \"failure\" | \"partial\";\n\tdetail: string;\n\t/**\n\t * Optional opaque artifact that a custom executor (e.g. `refineExecutor`)\n\t * may attach so downstream verifiers can re-run evaluation against the\n\t * thing that was produced. LLM-backed default executors never populate\n\t * this — it's an escape hatch for reactive executors carrying structured\n\t * output (a refined prompt, a patched spec, a generated template, ...).\n\t */\n\tartifact?: A;\n};\n\n/** Full execution result assembled downstream (LLM output + context). */\nexport interface ExecutionResult<A = unknown> {\n\titem: TriagedItem;\n\t/**\n\t * Execution outcome classification. Same semantics as\n\t * {@link ExecuteOutput.outcome}:\n\t *\n\t * - `\"success\"`: execution completed cleanly; artifact is ready for\n\t * verification.\n\t * - `\"failure\"`: no usable artifact was produced.\n\t * - `\"partial\"`: best candidate produced but convergence criteria not met\n\t * (iteration cap reached in `refineExecutor`).\n\t */\n\toutcome: \"success\" | \"failure\" | \"partial\";\n\tdetail: string;\n\t/**\n\t * Passthrough of {@link ExecuteOutput.artifact} when the executor emitted\n\t * one. Reactive executors like `refineExecutor` populate this; LLM-backed\n\t * default executors leave it undefined.\n\t */\n\tartifact?: A;\n}\n\n/** Whether an error is self-correctable (fast-retry) or structural (full loop). */\nexport type ErrorClass = \"self-correctable\" | \"structural\";\n\n/** Classifier for fast-retry path. */\nexport type ErrorClassifier = (result: ExecutionResult) => ErrorClass;\n\n// ---------------------------------------------------------------------------\n// Verification output\n// ---------------------------------------------------------------------------\n\n/** Result of the VERIFY stage. */\nexport interface VerifyResult<A = unknown> {\n\titem: TriagedItem;\n\texecution: ExecutionResult<A>;\n\tverified: boolean;\n\tfindings: string[];\n\terrorClass?: ErrorClass;\n}\n\n/**\n * Verifier output shape — what a custom verifier emits. The harness\n * assembles this into the full {@link VerifyResult} using the triaged\n * item + execute output sampled from `executeContextNode`.\n */\nexport interface VerifyOutput {\n\tverified: boolean;\n\tfindings: string[];\n\terrorClass?: ErrorClass;\n}\n\n// ---------------------------------------------------------------------------\n// Priority scoring\n// ---------------------------------------------------------------------------\n\n/** Configurable signals for priority scoring. */\nexport interface PrioritySignals {\n\t/** Per-severity base weight (default: critical=100, high=70, medium=40, low=10). */\n\tseverityWeights?: Partial<Record<Severity, number>>;\n\t/** Decay rate per second for attention decay (default ~1.15e-6 ≈ 7-day half-life). */\n\tdecayRate?: number;\n\t/** Strategy model effectiveness boost threshold (default 0.7). */\n\teffectivenessThreshold?: number;\n\t/** Strategy model effectiveness boost amount (default 15). */\n\teffectivenessBoost?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Harness loop configuration\n// ---------------------------------------------------------------------------\n\nimport type { StrategySnapshot } from \"./strategy.js\";\n\n/** Per-queue configuration in the harness loop. */\nexport interface QueueConfig {\n\t/** Whether this queue is gated (requires human approval). */\n\tgated: boolean;\n\t/** Maximum pending items in the gate (default Infinity). */\n\tmaxPending?: number;\n\t/** Start the gate in open (auto-approve) mode? Only meaningful when `gated: true`. */\n\tstartOpen?: boolean;\n}\n\n/**\n * Accumulating per-job payload threaded through the harness's\n * `executeFlow` ({@link harnessLoop} Tier 6.5 C2 lock). Each stage's work fn\n * receives the prior payload and returns a new one with its own field\n * filled in:\n *\n * - The `enqueueEffect` seeds with `{ item }` only.\n * - The execute work fn fills `execution`.\n * - The verify work fn fills `verify`.\n *\n * The post-completed dispatch effect reads `verify.verified` /\n * `verify.errorClass` to route the item to `verifyResults` /\n * `retryTopic.publish(...)` / `intake.publish(...)` (3-way verdict).\n *\n * Carrying `item` through stage payloads (rather than re-pairing via a\n * separate `withLatestFrom` node) is the C2 deviation from today's\n * `executeContextNode` design: each `JobEnvelope` is self-contained, so the\n * verify pump can run multiple in-flight jobs in parallel without an\n * external pairing node.\n */\nexport interface HarnessJobPayload<A = unknown> {\n\t/** The triaged item flowing through execute → verify → dispatch. */\n\titem: TriagedItem;\n\t/** Filled by the execute work fn. Verify reads this; dispatch routes. */\n\texecution?: ExecutionResult<A>;\n\t/** Filled by the verify work fn. Dispatch reads `verified` / `errorClass`. */\n\tverify?: VerifyOutput;\n}\n\n/**\n * Pluggable EXECUTE work fn — receives a {@link JobEnvelope} carrying a\n * {@link HarnessJobPayload} (with `item` set, `execution` / `verify`\n * unset), returns a {@link NodeInput} that emits the same payload with\n * `execution` filled.\n *\n * **C2 contract (Tier 6.5 lock, 2026-04-28):**\n * 1. Emit DATA exactly once per claimed job. The JobFlow pump subscribes\n * once, takes the first DATA, then unsubscribes. Subsequent emissions\n * are ignored.\n * 2. Errors must be caught and surfaced as a `failure` outcome inside the\n * payload — never throw / return ERROR. A pump nack would drop the\n * item from JobFlow before the dispatch effect could route it.\n * 3. The work fn runs once per claim — no internal `switchMap` needed.\n * Per-item subgraphs (e.g. a fresh `refineLoop` per claim) are\n * instantiated inside the work fn body.\n *\n * `defaultLlmExecutor` (in `defaults.ts`) is a thin `adapter.invoke()`\n * wrapper. `refineExecutor` builds a per-claim `refineLoop`.\n * `actuatorExecutor` runs a side-effecting `apply(item, signal)`.\n */\nexport type HarnessExecutor<A = unknown> = (\n\tjob: JobEnvelope<HarnessJobPayload<A>>,\n\topts?: { signal: AbortSignal },\n) => NodeInput<HarnessJobPayload<A>>;\n\n/**\n * Pluggable VERIFY work fn — receives a {@link JobEnvelope} whose payload\n * has `item` + `execution` populated, returns a {@link NodeInput} that\n * emits the same payload with `verify` filled.\n *\n * Same C2 contract rules 1–3 as {@link HarnessExecutor}. The dispatch\n * effect downstream reads `verify.verified` (success → ack +\n * verifyResults publish), `verify.errorClass === \"self-correctable\"`\n * (retry → republish to retry topic with `$retries` bumped), or anything\n * else (structural → reingest to intake if budget remains).\n *\n * Verify-LLM-call failures (parse error, adapter throw, timeout) MUST be\n * caught and surfaced as a structural-failure `verify` payload (`{\n * verified: false, findings: [...], errorClass: \"structural\" }`) so the\n * dispatch effect can route the item rather than silently drop it.\n */\nexport type HarnessVerifier<A = unknown> = (\n\tjob: JobEnvelope<HarnessJobPayload<A>>,\n\topts?: { signal: AbortSignal },\n) => NodeInput<HarnessJobPayload<A>>;\n\n/** Triage prompt callable shape — pair of `[intake item, strategy snapshot]`. */\nexport type TriagePromptFn = (pair: readonly [IntakeItem, StrategySnapshot]) => string;\n/** Execute prompt callable shape. */\nexport type ExecutePromptFn = (item: TriagedItem) => string;\n/** Verify prompt callable shape — pair of `[execute output, triaged item]`. */\nexport type VerifyPromptFn<A = unknown> = (\n\tpair: readonly [ExecuteOutput<A> | null, TriagedItem | null],\n) => string;\n\n/** Options for {@link harnessLoop}. */\nexport interface HarnessLoopOptions<A = unknown> {\n\t/** LLM adapter for promptNode-based stages (triage + any default executor/verifier). */\n\tadapter: LLMAdapter;\n\n\t/** Custom triage prompt (receives IntakeItem + strategy snapshot as a tuple). */\n\ttriagePrompt?: string | TriagePromptFn;\n\n\t/**\n\t * Execute prompt — sugar over the default LLM executor. Ignored when\n\t * `executor` is set.\n\t */\n\texecutePrompt?: string | ExecutePromptFn;\n\n\t/**\n\t * Verify prompt — sugar over the default LLM verifier. Ignored when\n\t * `verifier` is set.\n\t */\n\tverifyPrompt?: string | VerifyPromptFn<A>;\n\n\t/**\n\t * Pluggable EXECUTE slot. When omitted, the harness uses a `promptNode`\n\t * driven by `adapter` + `executePrompt`. Replace to plug in a\n\t * `refineExecutor`, tool-using agent, or any reactive execution pipeline.\n\t */\n\texecutor?: HarnessExecutor<A>;\n\n\t/**\n\t * Pluggable VERIFY slot. When omitted, the harness uses a `promptNode`\n\t * driven by `adapter` + `verifyPrompt`. Replace to plug in an\n\t * `evalVerifier` that re-runs affected eval tasks.\n\t */\n\tverifier?: HarnessVerifier<A>;\n\n\t/** Per-queue configuration overrides. */\n\tqueues?: Partial<Record<QueueRoute, QueueConfig>>;\n\n\t/** Priority scoring signals. */\n\tpriority?: PrioritySignals;\n\n\t/**\n\t * Reactive last-human-interaction timestamp (monotonic ns). Drives the\n\t * priority score age-decay term for `HarnessGraph.priorityScores`.\n\t *\n\t * **Required when `opts.priority` is set.** Priority score nodes only\n\t * re-derive when `topic.latest`, `strategy.snapshot`, or this tick settles —\n\t * an idle queue would freeze its age at construction time if we\n\t * auto-defaulted. Typical sources:\n\t * - `fromTimer(60_000)` — steady tick, uniform decay.\n\t * - `state(monotonicNs())` — bumped from a human-interaction handler.\n\t * - A reactive view over a DB column / external metrics source.\n\t */\n\tlastInteractionNs?: Node<number>;\n\n\t/** Error classifier for fast-retry path. */\n\terrorClassifier?: ErrorClassifier;\n\n\t/** Max fast-retries per item before routing to full intake (default 2). */\n\tmaxRetries?: number;\n\n\t/** Global retry cap across all items — circuit breaker (default maxRetries × 10). */\n\tmaxTotalRetries?: number;\n\n\t/** Max re-ingestions from verify→intake before giving up (default 1). */\n\tmaxReingestions?: number;\n\n\t/** Global reingestion cap across all items — circuit breaker (default maxReingestions × 10). */\n\tmaxTotalReingestions?: number;\n\n\t/** Retained limit for topic logs (default 1000). */\n\tretainedLimit?: number;\n\n\t/**\n\t * Per-pump-tick claim cap on the internal `executeFlow` JobFlow's `execute`\n\t * stage (Tier 6.5 C2). Default `Number.MAX_SAFE_INTEGER` — every pending\n\t * claim is processed in one tick (matches today's unbounded `merge()`\n\t * parallelism). Lower this to bound LLM cost spikes on bursty intake.\n\t *\n\t * **Caveat.** This caps **claims per pump tick**, not total concurrent\n\t * inflight. Bounded-inflight is a separate primitive concern — see\n\t * `docs/optimizations.md` \"Tier 6.5 follow-up — bounded concurrent inflight\n\t * on JobFlow stages\".\n\t */\n\texecuteMaxPerPump?: number;\n\n\t/**\n\t * Per-pump-tick claim cap on the internal `executeFlow` JobFlow's\n\t * `verify` stage. Default `Number.MAX_SAFE_INTEGER`. Same caveat as\n\t * {@link HarnessLoopOptions.executeMaxPerPump}. Honored independently\n\t * of the execute cap via `StageDef.maxPerPump` (Tier 6.5 D1).\n\t */\n\tverifyMaxPerPump?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Barrel re-exports from defaults.ts — preserves the pre-split import\n// surface (`import { QUEUE_NAMES, defaultErrorClassifier } from \".../types\"`).\n// ---------------------------------------------------------------------------\n\nexport {\n\tDEFAULT_DECAY_RATE,\n\tDEFAULT_QUEUE_CONFIGS,\n\tDEFAULT_SEVERITY_WEIGHTS,\n\tdefaultErrorClassifier,\n\tQUEUE_NAMES,\n\tstrategyKey,\n} from \"./defaults.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiCA,kBAAsE;AACtE,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