@graphrefly/graphrefly 0.45.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 +1 -2
- 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/base/render/index.d.cts +227 -0
- package/dist/base/render/index.d.ts +227 -0
- 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/base/sources/index.d.cts +357 -0
- package/dist/base/sources/index.d.ts +357 -0
- 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/base/sources/node/index.d.cts +185 -0
- package/dist/base/sources/node/index.d.ts +185 -0
- 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-CSSbKGrJ.d.ts +199 -0
- package/dist/cascading-baGkiihI.d.cts +199 -0
- 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 +3083 -2
- package/dist/compat/index.cjs.map +1 -1
- package/dist/compat/index.d.cts +116 -1
- package/dist/compat/index.d.ts +116 -1
- package/dist/compat/index.js +175 -2
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/jotai/index.cjs +130 -2
- package/dist/compat/jotai/index.cjs.map +1 -1
- package/dist/compat/jotai/index.d.cts +2 -1
- package/dist/compat/jotai/index.d.ts +2 -1
- package/dist/compat/jotai/index.js +7 -2
- package/dist/compat/jotai/index.js.map +1 -1
- package/dist/compat/nanostores/index.cjs +186 -2
- package/dist/compat/nanostores/index.cjs.map +1 -1
- package/dist/compat/nanostores/index.d.cts +2 -1
- package/dist/compat/nanostores/index.d.ts +2 -1
- package/dist/compat/nanostores/index.js +21 -2
- package/dist/compat/nanostores/index.js.map +1 -1
- package/dist/compat/nestjs/index.cjs +2224 -2
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +10 -1
- package/dist/compat/nestjs/index.d.ts +10 -1
- package/dist/compat/nestjs/index.js +77 -2
- package/dist/compat/nestjs/index.js.map +1 -1
- package/dist/compat/react/index.cjs +95 -2
- package/dist/compat/react/index.cjs.map +1 -1
- package/dist/compat/react/index.d.cts +2 -1
- package/dist/compat/react/index.d.ts +2 -1
- package/dist/compat/react/index.js +11 -2
- package/dist/compat/react/index.js.map +1 -1
- package/dist/compat/solid/index.cjs +82 -2
- package/dist/compat/solid/index.cjs.map +1 -1
- package/dist/compat/solid/index.d.cts +2 -1
- package/dist/compat/solid/index.d.ts +2 -1
- package/dist/compat/solid/index.js +11 -2
- package/dist/compat/solid/index.js.map +1 -1
- package/dist/compat/svelte/index.cjs +85 -2
- package/dist/compat/svelte/index.cjs.map +1 -1
- package/dist/compat/svelte/index.d.cts +2 -1
- package/dist/compat/svelte/index.d.ts +2 -1
- package/dist/compat/svelte/index.js +11 -2
- package/dist/compat/svelte/index.js.map +1 -1
- package/dist/compat/vue/index.cjs +100 -2
- package/dist/compat/vue/index.cjs.map +1 -1
- package/dist/compat/vue/index.d.cts +3 -1
- package/dist/compat/vue/index.d.ts +3 -1
- package/dist/compat/vue/index.js +11 -2
- package/dist/compat/vue/index.js.map +1 -1
- package/dist/compat/zustand/index.cjs +50 -2
- package/dist/compat/zustand/index.cjs.map +1 -1
- package/dist/compat/zustand/index.d.cts +2 -1
- package/dist/compat/zustand/index.d.ts +2 -1
- package/dist/compat/zustand/index.js +7 -2
- package/dist/compat/zustand/index.js.map +1 -1
- 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-Bx46zqky.d.cts +243 -0
- package/dist/fallback-pIWW8A2d.d.ts +243 -0
- package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
- package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
- package/dist/index-5SU_O78r.d.cts +754 -0
- package/dist/index-B6pxYJzO.d.cts +36 -0
- package/dist/index-B6pxYJzO.d.ts +36 -0
- package/dist/index-BFsng6v1.d.cts +44 -0
- package/dist/index-BFsng6v1.d.ts +44 -0
- package/dist/index-Bg-LwEt-.d.cts +45 -0
- package/dist/index-Bg-LwEt-.d.ts +45 -0
- package/dist/index-Brp888t0.d.cts +127 -0
- package/dist/index-Brp888t0.d.ts +127 -0
- package/dist/index-CDfk6jHN.d.cts +37 -0
- package/dist/index-CDfk6jHN.d.ts +37 -0
- package/dist/index-CEXCtYYJ.d.ts +754 -0
- package/dist/index-DLAxYaN5.d.cts +169 -0
- package/dist/index-DLAxYaN5.d.ts +169 -0
- package/dist/index-DeWbQzMe.d.cts +34 -0
- package/dist/index-DeWbQzMe.d.ts +34 -0
- package/dist/index-dX9IzPqj.d.cts +86 -0
- package/dist/index-dX9IzPqj.d.ts +86 -0
- package/dist/index.cjs +25950 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -42
- package/dist/index.d.ts +56 -42
- package/dist/index.js +849 -0
- package/dist/index.js.map +1 -1
- 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-BXQoW1P-.d.cts +36 -0
- package/dist/observable-BXQoW1P-.d.ts +36 -0
- package/dist/pipeline-graph-Ce47CB6Y.d.cts +145 -0
- package/dist/pipeline-graph-DXCwY9vG.d.ts +145 -0
- 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-fswlBUvX.d.cts +195 -0
- package/dist/reactive-layout-fswlBUvX.d.ts +195 -0
- 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-BB5Lw-pB.d.cts +442 -0
- package/dist/types-BB5Lw-pB.d.ts +442 -0
- 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/utils/ai/browser.d.cts +129 -0
- package/dist/utils/ai/browser.d.ts +129 -0
- 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/utils/ai/index.d.cts +1777 -0
- package/dist/utils/ai/index.d.ts +1777 -0
- 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/utils/ai/node.d.cts +57 -0
- package/dist/utils/ai/node.d.ts +57 -0
- 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/utils/cqrs/index.d.cts +438 -0
- package/dist/utils/cqrs/index.d.ts +438 -0
- 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/utils/demo-shell/index.d.cts +90 -0
- package/dist/utils/demo-shell/index.d.ts +90 -0
- 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/utils/domain-templates/index.d.cts +214 -0
- package/dist/utils/domain-templates/index.d.ts +214 -0
- 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/utils/graphspec/index.d.cts +449 -0
- package/dist/utils/graphspec/index.d.ts +449 -0
- 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/utils/job-queue/index.d.cts +200 -0
- package/dist/utils/job-queue/index.d.ts +200 -0
- 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/utils/memory/index.d.cts +582 -0
- package/dist/utils/memory/index.d.ts +582 -0
- 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/utils/process/index.d.cts +411 -0
- package/dist/utils/process/index.d.ts +411 -0
- 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/utils/reactive-layout/index.d.cts +492 -0
- package/dist/utils/reactive-layout/index.d.ts +492 -0
- 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/utils/reduction/index.d.cts +102 -0
- package/dist/utils/reduction/index.d.ts +102 -0
- 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/utils/surface/index.d.cts +240 -0
- package/dist/utils/surface/index.d.ts +240 -0
- 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 +293 -237
- package/dist/core/index.cjs +0 -21
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.d.cts +0 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -3
- package/dist/core/index.js.map +0 -1
- package/dist/extra/browser.cjs +0 -21
- package/dist/extra/browser.cjs.map +0 -1
- package/dist/extra/browser.d.cts +0 -1
- package/dist/extra/browser.d.ts +0 -1
- package/dist/extra/browser.js +0 -3
- package/dist/extra/browser.js.map +0 -1
- package/dist/extra/index.cjs +0 -21
- package/dist/extra/index.cjs.map +0 -1
- package/dist/extra/index.d.cts +0 -1
- package/dist/extra/index.d.ts +0 -1
- package/dist/extra/index.js +0 -3
- package/dist/extra/index.js.map +0 -1
- package/dist/extra/node.cjs +0 -21
- package/dist/extra/node.cjs.map +0 -1
- package/dist/extra/node.d.cts +0 -1
- package/dist/extra/node.d.ts +0 -1
- package/dist/extra/node.js +0 -3
- package/dist/extra/node.js.map +0 -1
- package/dist/extra/operators.cjs +0 -21
- package/dist/extra/operators.cjs.map +0 -1
- package/dist/extra/operators.d.cts +0 -1
- package/dist/extra/operators.d.ts +0 -1
- package/dist/extra/operators.js +0 -3
- package/dist/extra/operators.js.map +0 -1
- package/dist/extra/reactive.cjs +0 -21
- package/dist/extra/reactive.cjs.map +0 -1
- package/dist/extra/reactive.d.cts +0 -1
- package/dist/extra/reactive.d.ts +0 -1
- package/dist/extra/reactive.js +0 -3
- package/dist/extra/reactive.js.map +0 -1
- package/dist/extra/render/index.cjs +0 -21
- package/dist/extra/render/index.cjs.map +0 -1
- package/dist/extra/render/index.d.cts +0 -1
- package/dist/extra/render/index.d.ts +0 -1
- package/dist/extra/render/index.js +0 -3
- package/dist/extra/render/index.js.map +0 -1
- package/dist/extra/sources.cjs +0 -21
- package/dist/extra/sources.cjs.map +0 -1
- package/dist/extra/sources.d.cts +0 -1
- package/dist/extra/sources.d.ts +0 -1
- package/dist/extra/sources.js +0 -3
- package/dist/extra/sources.js.map +0 -1
- package/dist/extra/storage-browser.cjs +0 -21
- package/dist/extra/storage-browser.cjs.map +0 -1
- package/dist/extra/storage-browser.d.cts +0 -1
- package/dist/extra/storage-browser.d.ts +0 -1
- package/dist/extra/storage-browser.js +0 -3
- package/dist/extra/storage-browser.js.map +0 -1
- package/dist/extra/storage-core.cjs +0 -21
- package/dist/extra/storage-core.cjs.map +0 -1
- package/dist/extra/storage-core.d.cts +0 -1
- package/dist/extra/storage-core.d.ts +0 -1
- package/dist/extra/storage-core.js +0 -3
- package/dist/extra/storage-core.js.map +0 -1
- package/dist/extra/storage-node.cjs +0 -21
- package/dist/extra/storage-node.cjs.map +0 -1
- package/dist/extra/storage-node.d.cts +0 -1
- package/dist/extra/storage-node.d.ts +0 -1
- package/dist/extra/storage-node.js +0 -3
- package/dist/extra/storage-node.js.map +0 -1
- package/dist/extra/storage-tiers-browser.cjs +0 -21
- package/dist/extra/storage-tiers-browser.cjs.map +0 -1
- package/dist/extra/storage-tiers-browser.d.cts +0 -1
- package/dist/extra/storage-tiers-browser.d.ts +0 -1
- package/dist/extra/storage-tiers-browser.js +0 -3
- package/dist/extra/storage-tiers-browser.js.map +0 -1
- package/dist/extra/storage-tiers-node.cjs +0 -21
- package/dist/extra/storage-tiers-node.cjs.map +0 -1
- package/dist/extra/storage-tiers-node.d.cts +0 -1
- package/dist/extra/storage-tiers-node.d.ts +0 -1
- package/dist/extra/storage-tiers-node.js +0 -3
- package/dist/extra/storage-tiers-node.js.map +0 -1
- package/dist/extra/storage-tiers.cjs +0 -21
- package/dist/extra/storage-tiers.cjs.map +0 -1
- package/dist/extra/storage-tiers.d.cts +0 -1
- package/dist/extra/storage-tiers.d.ts +0 -1
- package/dist/extra/storage-tiers.js +0 -3
- package/dist/extra/storage-tiers.js.map +0 -1
- package/dist/extra/storage-wal.cjs +0 -21
- package/dist/extra/storage-wal.cjs.map +0 -1
- package/dist/extra/storage-wal.d.cts +0 -1
- package/dist/extra/storage-wal.d.ts +0 -1
- package/dist/extra/storage-wal.js +0 -3
- package/dist/extra/storage-wal.js.map +0 -1
- package/dist/graph/index.cjs +0 -21
- package/dist/graph/index.cjs.map +0 -1
- package/dist/graph/index.d.cts +0 -1
- package/dist/graph/index.d.ts +0 -1
- package/dist/graph/index.js +0 -3
- package/dist/graph/index.js.map +0 -1
- package/dist/patterns/ai/browser.cjs +0 -21
- package/dist/patterns/ai/browser.cjs.map +0 -1
- package/dist/patterns/ai/browser.d.cts +0 -1
- package/dist/patterns/ai/browser.d.ts +0 -1
- package/dist/patterns/ai/browser.js +0 -3
- package/dist/patterns/ai/browser.js.map +0 -1
- package/dist/patterns/ai/index.cjs +0 -21
- package/dist/patterns/ai/index.cjs.map +0 -1
- package/dist/patterns/ai/index.d.cts +0 -1
- package/dist/patterns/ai/index.d.ts +0 -1
- package/dist/patterns/ai/index.js +0 -3
- package/dist/patterns/ai/index.js.map +0 -1
- package/dist/patterns/ai/node.cjs +0 -21
- package/dist/patterns/ai/node.cjs.map +0 -1
- package/dist/patterns/ai/node.d.cts +0 -1
- package/dist/patterns/ai/node.d.ts +0 -1
- package/dist/patterns/ai/node.js +0 -3
- package/dist/patterns/ai/node.js.map +0 -1
- package/dist/patterns/cqrs/index.cjs +0 -21
- package/dist/patterns/cqrs/index.cjs.map +0 -1
- package/dist/patterns/cqrs/index.d.cts +0 -1
- package/dist/patterns/cqrs/index.d.ts +0 -1
- package/dist/patterns/cqrs/index.js +0 -3
- package/dist/patterns/cqrs/index.js.map +0 -1
- package/dist/patterns/demo-shell/index.cjs +0 -21
- package/dist/patterns/demo-shell/index.cjs.map +0 -1
- package/dist/patterns/demo-shell/index.d.cts +0 -1
- package/dist/patterns/demo-shell/index.d.ts +0 -1
- package/dist/patterns/demo-shell/index.js +0 -3
- package/dist/patterns/demo-shell/index.js.map +0 -1
- package/dist/patterns/domain-templates/index.cjs +0 -21
- package/dist/patterns/domain-templates/index.cjs.map +0 -1
- package/dist/patterns/domain-templates/index.d.cts +0 -1
- package/dist/patterns/domain-templates/index.d.ts +0 -1
- package/dist/patterns/domain-templates/index.js +0 -3
- package/dist/patterns/domain-templates/index.js.map +0 -1
- package/dist/patterns/graphspec/index.cjs +0 -21
- package/dist/patterns/graphspec/index.cjs.map +0 -1
- package/dist/patterns/graphspec/index.d.cts +0 -1
- package/dist/patterns/graphspec/index.d.ts +0 -1
- package/dist/patterns/graphspec/index.js +0 -3
- package/dist/patterns/graphspec/index.js.map +0 -1
- package/dist/patterns/harness/index.cjs +0 -21
- package/dist/patterns/harness/index.cjs.map +0 -1
- package/dist/patterns/harness/index.d.cts +0 -1
- package/dist/patterns/harness/index.d.ts +0 -1
- package/dist/patterns/harness/index.js +0 -3
- package/dist/patterns/harness/index.js.map +0 -1
- package/dist/patterns/inspect/index.cjs +0 -21
- package/dist/patterns/inspect/index.cjs.map +0 -1
- package/dist/patterns/inspect/index.d.cts +0 -1
- package/dist/patterns/inspect/index.d.ts +0 -1
- package/dist/patterns/inspect/index.js +0 -3
- package/dist/patterns/inspect/index.js.map +0 -1
- package/dist/patterns/job-queue/index.cjs +0 -21
- package/dist/patterns/job-queue/index.cjs.map +0 -1
- package/dist/patterns/job-queue/index.d.cts +0 -1
- package/dist/patterns/job-queue/index.d.ts +0 -1
- package/dist/patterns/job-queue/index.js +0 -3
- package/dist/patterns/job-queue/index.js.map +0 -1
- package/dist/patterns/memory/index.cjs +0 -21
- package/dist/patterns/memory/index.cjs.map +0 -1
- package/dist/patterns/memory/index.d.cts +0 -1
- package/dist/patterns/memory/index.d.ts +0 -1
- package/dist/patterns/memory/index.js +0 -3
- package/dist/patterns/memory/index.js.map +0 -1
- package/dist/patterns/messaging/index.cjs +0 -21
- package/dist/patterns/messaging/index.cjs.map +0 -1
- package/dist/patterns/messaging/index.d.cts +0 -1
- package/dist/patterns/messaging/index.d.ts +0 -1
- package/dist/patterns/messaging/index.js +0 -3
- package/dist/patterns/messaging/index.js.map +0 -1
- package/dist/patterns/orchestration/index.cjs +0 -21
- package/dist/patterns/orchestration/index.cjs.map +0 -1
- package/dist/patterns/orchestration/index.d.cts +0 -1
- package/dist/patterns/orchestration/index.d.ts +0 -1
- package/dist/patterns/orchestration/index.js +0 -3
- package/dist/patterns/orchestration/index.js.map +0 -1
- package/dist/patterns/process/index.cjs +0 -21
- package/dist/patterns/process/index.cjs.map +0 -1
- package/dist/patterns/process/index.d.cts +0 -1
- package/dist/patterns/process/index.d.ts +0 -1
- package/dist/patterns/process/index.js +0 -3
- package/dist/patterns/process/index.js.map +0 -1
- package/dist/patterns/reactive-layout/index.cjs +0 -21
- package/dist/patterns/reactive-layout/index.cjs.map +0 -1
- package/dist/patterns/reactive-layout/index.d.cts +0 -1
- package/dist/patterns/reactive-layout/index.d.ts +0 -1
- package/dist/patterns/reactive-layout/index.js +0 -3
- package/dist/patterns/reactive-layout/index.js.map +0 -1
- package/dist/patterns/reduction/index.cjs +0 -21
- package/dist/patterns/reduction/index.cjs.map +0 -1
- package/dist/patterns/reduction/index.d.cts +0 -1
- package/dist/patterns/reduction/index.d.ts +0 -1
- package/dist/patterns/reduction/index.js +0 -3
- package/dist/patterns/reduction/index.js.map +0 -1
- package/dist/patterns/surface/index.cjs +0 -21
- package/dist/patterns/surface/index.cjs.map +0 -1
- package/dist/patterns/surface/index.d.cts +0 -1
- package/dist/patterns/surface/index.d.ts +0 -1
- package/dist/patterns/surface/index.js +0 -3
- package/dist/patterns/surface/index.js.map +0 -1
- package/dist/patterns/topology-view/index.cjs +0 -21
- package/dist/patterns/topology-view/index.cjs.map +0 -1
- package/dist/patterns/topology-view/index.d.cts +0 -1
- package/dist/patterns/topology-view/index.d.ts +0 -1
- package/dist/patterns/topology-view/index.js +0 -3
- package/dist/patterns/topology-view/index.js.map +0 -1
- package/dist/testing/index.cjs +0 -21
- package/dist/testing/index.cjs.map +0 -1
- package/dist/testing/index.d.cts +0 -1
- package/dist/testing/index.d.ts +0 -1
- package/dist/testing/index.js +0 -3
- package/dist/testing/index.js.map +0 -1
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
import { Node } from '@graphrefly/pure-ts/core';
|
|
2
|
+
import { NodeInput } from '@graphrefly/pure-ts/extra';
|
|
3
|
+
import { L as LLMAdapter } from './types-BB5Lw-pB.js';
|
|
4
|
+
import { JobEnvelope } from './utils/job-queue/index.js';
|
|
5
|
+
import { Graph, GraphOptions } from '@graphrefly/pure-ts/graph';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* `auditedSuccessTracker` — domain-agnostic per-key success-rate tracker.
|
|
9
|
+
*
|
|
10
|
+
* Reactive `key → { attempts, successes, successRate }` map mounted as a
|
|
11
|
+
* Graph subclass. Reusable substrate for any domain that needs to track
|
|
12
|
+
* outcomes per identifier (routing strategy effectiveness, A/B-test arms,
|
|
13
|
+
* cache-policy tuning, retry-strategy selection, etc.).
|
|
14
|
+
*
|
|
15
|
+
* Replaces the prior `effectivenessTracker` and `strategyModel` factories
|
|
16
|
+
* (Class B audit Alt E collapse, 2026-04-30). Composite-key callers (e.g.
|
|
17
|
+
* `rootCause × intervention`) convert to a string key at the call site.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** A single success-rate record for one key. */
|
|
23
|
+
interface AuditedSuccessEntry<TKey extends string = string> {
|
|
24
|
+
readonly key: TKey;
|
|
25
|
+
readonly attempts: number;
|
|
26
|
+
readonly successes: number;
|
|
27
|
+
readonly successRate: number;
|
|
28
|
+
}
|
|
29
|
+
/** Snapshot shape — fresh `ReadonlyMap` on every mutation. */
|
|
30
|
+
type AuditedSuccessSnapshot<TKey extends string = string, TEntry extends AuditedSuccessEntry<TKey> = AuditedSuccessEntry<TKey>> = ReadonlyMap<TKey, TEntry>;
|
|
31
|
+
/** Options for {@link auditedSuccessTracker}. */
|
|
32
|
+
interface AuditedSuccessTrackerOptions {
|
|
33
|
+
/** Optional graph identity (passed to the underlying Graph constructor). */
|
|
34
|
+
graph?: GraphOptions;
|
|
35
|
+
/** Name of the tracker subgraph. Default `"audited-success-tracker"`. */
|
|
36
|
+
name?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Reactive success-rate tracker mounted as a Graph subclass.
|
|
40
|
+
*
|
|
41
|
+
* `key → AuditedSuccessEntry` with `record(key, success, extra?)` /
|
|
42
|
+
* `lookup(key)` methods. The {@link entries} field is a
|
|
43
|
+
* `Node<ReadonlyMap<TKey, TEntry>>` suitable for graph composition —
|
|
44
|
+
* exposed under name `"entries"` for `describe()` / `explain()`.
|
|
45
|
+
*
|
|
46
|
+
* Backed by the {@link reactiveMap} substrate; each successful `record(...)`
|
|
47
|
+
* fires a DATA emission carrying the post-mutation map.
|
|
48
|
+
*
|
|
49
|
+
* **Field name.** This Graph subclass uses `entries` (not `snapshot`) for
|
|
50
|
+
* the public-face Node because `Graph.prototype.snapshot()` is the
|
|
51
|
+
* built-in persistence-snapshot method on the parent class — using
|
|
52
|
+
* `snapshot` here would shadow it and break DTS generation.
|
|
53
|
+
*
|
|
54
|
+
* @typeParam TKey - String-typed key shape. Composite-key domains (e.g.
|
|
55
|
+
* `rootCause × intervention`) convert to a string at the call site.
|
|
56
|
+
* @typeParam TEntry - Entry shape; defaults to {@link AuditedSuccessEntry}.
|
|
57
|
+
* Domains that need extra fields (e.g. `rootCause`/`intervention`) extend
|
|
58
|
+
* this interface and pass the extra fields via `record(...)`'s `extra` arg.
|
|
59
|
+
*/
|
|
60
|
+
declare class AuditedSuccessTrackerGraph<TKey extends string = string, TEntry extends AuditedSuccessEntry<TKey> = AuditedSuccessEntry<TKey>> extends Graph {
|
|
61
|
+
/** Reactive entries — `Node<ReadonlyMap<TKey, TEntry>>`, fresh map per mutation. */
|
|
62
|
+
readonly entries: Node<AuditedSuccessSnapshot<TKey, TEntry>>;
|
|
63
|
+
private readonly _map;
|
|
64
|
+
constructor(opts?: AuditedSuccessTrackerOptions);
|
|
65
|
+
/**
|
|
66
|
+
* Record a completed attempt. `extra` fields are merged into the stored
|
|
67
|
+
* entry — use for domain-specific decoration (e.g. `{ rootCause,
|
|
68
|
+
* intervention }` on the strategy-model collapse path).
|
|
69
|
+
*
|
|
70
|
+
* **Caller contract for typed `TEntry`.** When `TEntry` extends
|
|
71
|
+
* {@link AuditedSuccessEntry} with required fields beyond
|
|
72
|
+
* `key`/`attempts`/`successes`/`successRate`, the caller must supply
|
|
73
|
+
* those required fields in `extra` on the **first** `record(key, ...)`
|
|
74
|
+
* for that key. The internal `as TEntry` cast trusts this. Subsequent
|
|
75
|
+
* `record(key, ...)` calls inherit the prior entry's fields, so `extra`
|
|
76
|
+
* may be omitted or partial. Forgetting required fields on the first
|
|
77
|
+
* record produces an entry whose typed-required fields are `undefined`
|
|
78
|
+
* at runtime — TS won't catch it. Strategy callers always pass
|
|
79
|
+
* `{ rootCause, intervention }`, so the StrategyEntry case is safe.
|
|
80
|
+
*/
|
|
81
|
+
record(key: TKey, success: boolean, extra?: Partial<Omit<TEntry, "key" | "attempts" | "successes" | "successRate">>): void;
|
|
82
|
+
/**
|
|
83
|
+
* Look up the entry for a key.
|
|
84
|
+
*
|
|
85
|
+
* Pure read: this tracker doesn't configure a TTL on the underlying
|
|
86
|
+
* `reactiveMap`, so `_map.get(key)` never triggers TTL-expiry pruning
|
|
87
|
+
* (which would otherwise be an observable side effect emitting a fresh
|
|
88
|
+
* `entries` snapshot). If `AuditedSuccessTrackerOptions` ever gains a
|
|
89
|
+
* `mapOptions` carve-out exposing TTL, revisit this contract.
|
|
90
|
+
*/
|
|
91
|
+
lookup(key: TKey): TEntry | undefined;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Strategy model and priority scoring (roadmap §9.0).
|
|
96
|
+
*
|
|
97
|
+
* `strategyModel` returns a typed alias of {@link AuditedSuccessTrackerGraph}
|
|
98
|
+
* keyed by `StrategyKey` (the composite `rootCause→intervention` string).
|
|
99
|
+
* The shared substrate (Class B audit Alt E collapse, 2026-04-30) replaces
|
|
100
|
+
* the prior bespoke bundle shape; composite-key callers use {@link strategyKey}
|
|
101
|
+
* to compute the key and pass `{ rootCause, intervention }` as record decoration.
|
|
102
|
+
*
|
|
103
|
+
* @module
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/** Snapshot shape for the strategy-model `entries` node. */
|
|
107
|
+
type StrategySnapshot = ReadonlyMap<StrategyKey, StrategyEntry>;
|
|
108
|
+
/** Strategy-model graph: a typed alias of {@link AuditedSuccessTrackerGraph}. */
|
|
109
|
+
type StrategyModelGraph = AuditedSuccessTrackerGraph<StrategyKey, StrategyEntry>;
|
|
110
|
+
/**
|
|
111
|
+
* Create a strategy model that tracks
|
|
112
|
+
* `presetId × rootCause × intervention → successRate` over completed
|
|
113
|
+
* issues (presetId axis added in Phase 13.I, 2026-05-01). Returns an
|
|
114
|
+
* {@link AuditedSuccessTrackerGraph} keyed by {@link StrategyKey}.
|
|
115
|
+
*
|
|
116
|
+
* The reactive `entries` field is a `Node<StrategySnapshot>` suitable for
|
|
117
|
+
* `describe()` / `withLatestFrom` composition.
|
|
118
|
+
*
|
|
119
|
+
* Composite-key conversion happens at the call site:
|
|
120
|
+
* ```ts
|
|
121
|
+
* const strategy = strategyModel();
|
|
122
|
+
* strategy.record(strategyKey(presetId, rootCause, intervention), success, {
|
|
123
|
+
* presetId,
|
|
124
|
+
* rootCause,
|
|
125
|
+
* intervention,
|
|
126
|
+
* });
|
|
127
|
+
* strategy.lookup(strategyKey(presetId, rootCause, intervention));
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* Pass {@link DEFAULT_PRESET_ID} (`"default"`) for the presetId axis when
|
|
131
|
+
* no preset registry is wired (single-agent harness).
|
|
132
|
+
*
|
|
133
|
+
* The model feeds back into TRIAGE for routing hints.
|
|
134
|
+
*/
|
|
135
|
+
declare function strategyModel(): StrategyModelGraph;
|
|
136
|
+
/**
|
|
137
|
+
* Create a priority scoring derived node for a single triaged item.
|
|
138
|
+
*
|
|
139
|
+
* Combines severity weight, attention decay, strategy model effectiveness,
|
|
140
|
+
* and an optional external urgency signal.
|
|
141
|
+
*
|
|
142
|
+
* **Age sampling caveat.** The `ageSeconds` term is computed as
|
|
143
|
+
* `monotonicNs() - lastInteractionNs.cache` at *each reactive update*. If
|
|
144
|
+
* nothing upstream settles, the score node does not recompute — so a
|
|
145
|
+
* long-idle queue may show a stale score. Pass a `fromTimer(...)`-driven
|
|
146
|
+
* node as a dep (or re-emit on `lastInteractionNs`) when live age decay
|
|
147
|
+
* matters.
|
|
148
|
+
*
|
|
149
|
+
* **Not the same as `TriagedItem.priority`.** The LLM-emitted
|
|
150
|
+
* `priority: 0..100` field on each triaged item is decorative today — the
|
|
151
|
+
* queue consumption order ignores it (tracked in `docs/optimizations.md`
|
|
152
|
+
* as a priority-ordered queue enhancement). This function computes an
|
|
153
|
+
* orthogonal reactive score; it does NOT override the LLM's per-item
|
|
154
|
+
* priority, nor does it drive queue ordering. Wire it to
|
|
155
|
+
* `HarnessGraph.priorityScores` to surface per-route pressure.
|
|
156
|
+
*
|
|
157
|
+
* @param item - Node holding the triaged item.
|
|
158
|
+
* @param strategy - Strategy model node.
|
|
159
|
+
* @param lastInteractionNs - Node holding the monotonic timestamp (ns) of last human interaction.
|
|
160
|
+
* @param urgency - Optional external urgency signal node (0–1 scale).
|
|
161
|
+
* @param signals - Configurable scoring parameters.
|
|
162
|
+
*/
|
|
163
|
+
declare function priorityScore(item: Node<TriagedItem>, strategy: Node<StrategySnapshot>, lastInteractionNs: Node<number>, urgency?: Node<number>, signals?: PrioritySignals): Node<number>;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Harness wiring types (roadmap §9.0).
|
|
167
|
+
*
|
|
168
|
+
* Shared types for the reactive collaboration loop: intake, triage, queue,
|
|
169
|
+
* gate, execute, verify, reflect. These types are intentionally domain-agnostic
|
|
170
|
+
* — the harness loop is not specific to eval workflows.
|
|
171
|
+
*
|
|
172
|
+
* Runtime constants and helpers live in `./defaults.ts`. The harness barrel
|
|
173
|
+
* (`./index.ts`) re-exports both so external consumers see a single surface.
|
|
174
|
+
*
|
|
175
|
+
* @module
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
/** Known intake source tags. */
|
|
179
|
+
type KnownIntakeSource = "eval" | "test" | "human" | "code-change" | "hypothesis" | "parity";
|
|
180
|
+
/**
|
|
181
|
+
* Sources that can produce intake items. Open union — the known tags
|
|
182
|
+
* retain IDE autocomplete while user-supplied strings (e.g. `"schema"`,
|
|
183
|
+
* `"slack"`) pass through without a type change.
|
|
184
|
+
*/
|
|
185
|
+
type IntakeSource = KnownIntakeSource | (string & {});
|
|
186
|
+
/** Severity levels for intake items. */
|
|
187
|
+
type Severity = "critical" | "high" | "medium" | "low";
|
|
188
|
+
/** Root cause categories for triage classification. */
|
|
189
|
+
type RootCause = "composition" | "missing-fn" | "bad-docs" | "schema-gap" | "regression" | "unknown";
|
|
190
|
+
/** Intervention types that address root causes. */
|
|
191
|
+
type Intervention = "template" | "catalog-fn" | "docs" | "wrapper" | "schema-change" | "investigate";
|
|
192
|
+
/** Routing destinations after triage. Closed union — iterated via `QUEUE_NAMES`. */
|
|
193
|
+
type QueueRoute = "auto-fix" | "needs-decision" | "investigation" | "backlog";
|
|
194
|
+
/**
|
|
195
|
+
* An item entering the harness loop via the INTAKE stage.
|
|
196
|
+
*
|
|
197
|
+
* All intake sources produce this uniform shape — the intake topic
|
|
198
|
+
* doesn't care where items came from.
|
|
199
|
+
*
|
|
200
|
+
* `$`-prefix keys (`$reingestions`, `$retries` on {@link TriagedItem}) are
|
|
201
|
+
* framework-only — an LLM round-tripping the serialized item is far less
|
|
202
|
+
* likely to echo back a `$`-prefixed key than an `_`-prefixed one, which
|
|
203
|
+
* neutralizes the field-collision class that surfaced earlier in the
|
|
204
|
+
* router's spread order.
|
|
205
|
+
*/
|
|
206
|
+
interface IntakeItem {
|
|
207
|
+
source: IntakeSource;
|
|
208
|
+
summary: string;
|
|
209
|
+
evidence: string;
|
|
210
|
+
affectsAreas: string[];
|
|
211
|
+
affectsEvalTasks?: string[];
|
|
212
|
+
severity?: Severity;
|
|
213
|
+
/**
|
|
214
|
+
* Identity-preservation key for retried / reingested items.
|
|
215
|
+
*
|
|
216
|
+
* `relatedTo[0]` MUST carry the original tracking key for retry /
|
|
217
|
+
* reingest items so the harness's `routeJobIds` map preserves
|
|
218
|
+
* identity across decorated retry summaries (per qa D1, 2026-04-29).
|
|
219
|
+
* First-time publishes leave this `undefined`; the tracking key
|
|
220
|
+
* falls back to `summary` via {@link trackingKey}.
|
|
221
|
+
*
|
|
222
|
+
* **Collision contract (DS-13.5.D.3, locked 2026-05-01).** Items
|
|
223
|
+
* lacking `relatedTo[0]` and producing colliding `trackingKey()`
|
|
224
|
+
* derivations overwrite the prior `routeJobIds` entry —
|
|
225
|
+
* **last-write-wins**. Framework-enforced uniqueness was rejected
|
|
226
|
+
* because it would break legitimate retry / reingest patterns where
|
|
227
|
+
* an explicit `relatedTo[0]` carries the original key forward.
|
|
228
|
+
*
|
|
229
|
+
* **Single-threaded contract.** Ack runs before reingest publishes
|
|
230
|
+
* (harness flow invariant) — under the standard single-threaded JS
|
|
231
|
+
* pump this collapses the only practical race window. Multi-publisher
|
|
232
|
+
* concurrency or batched intake of two first-time items with identical
|
|
233
|
+
* `summary` can still race at boundaries; callers carrying their own
|
|
234
|
+
* stable id should set `relatedTo[0]`.
|
|
235
|
+
*
|
|
236
|
+
* See {@link trackingKey} JSDoc in `patterns/_internal/index.ts` for
|
|
237
|
+
* the uniqueness caller contract.
|
|
238
|
+
*
|
|
239
|
+
* Spec: docs/implementation-plan.md DS-13.5.D.3
|
|
240
|
+
*/
|
|
241
|
+
relatedTo?: string[];
|
|
242
|
+
/** Item-carried reingestion count. Incremented on each full-loop reingestion. */
|
|
243
|
+
$reingestions?: number;
|
|
244
|
+
}
|
|
245
|
+
/** Output of the TRIAGE stage — enriched intake item with classification. */
|
|
246
|
+
interface TriagedItem extends IntakeItem {
|
|
247
|
+
rootCause: RootCause;
|
|
248
|
+
intervention: Intervention;
|
|
249
|
+
route: QueueRoute;
|
|
250
|
+
priority: number;
|
|
251
|
+
triageReasoning?: string;
|
|
252
|
+
/** Item-carried retry count. Incremented on each fast-retry pass. */
|
|
253
|
+
$retries?: number;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Preset / persona / skill identifier. Open string set; conventionally
|
|
257
|
+
* matches keys used in {@link presetRegistry} (Phase 13.H). Use
|
|
258
|
+
* {@link DEFAULT_PRESET_ID} ("default") when no preset registry is wired.
|
|
259
|
+
*/
|
|
260
|
+
type PresetId = string;
|
|
261
|
+
/** Default presetId used when no preset registry is wired (back-compat for 2-axis callers). */
|
|
262
|
+
declare const DEFAULT_PRESET_ID: PresetId;
|
|
263
|
+
/**
|
|
264
|
+
* Key format: `${presetId}|${rootCause}→${intervention}`.
|
|
265
|
+
*
|
|
266
|
+
* **Phase 13.I axis extension (DS-13.I, 2026-05-01).** Widened from the
|
|
267
|
+
* pre-multi-agent 2-axis `${rootCause}→${intervention}` to a 3-axis key
|
|
268
|
+
* carrying the presetId of the agent that ran. Pre-1.0 breaking change;
|
|
269
|
+
* existing callsites pass {@link DEFAULT_PRESET_ID} for the new axis when
|
|
270
|
+
* they don't have a preset registry wired. The strategy-model storage
|
|
271
|
+
* (`auditedSuccessTracker<StrategyKey, StrategyEntry>`) is unchanged
|
|
272
|
+
* structurally — the key shape change cascades through the existing
|
|
273
|
+
* tracker without surface refactor.
|
|
274
|
+
*/
|
|
275
|
+
type StrategyKey = `${PresetId}|${RootCause}→${Intervention}`;
|
|
276
|
+
/**
|
|
277
|
+
* Effectiveness record for a `(presetId, rootCause, intervention)` triple.
|
|
278
|
+
* Stored under `auditedSuccessTracker<StrategyKey, StrategyEntry>` (Class B
|
|
279
|
+
* audit Alt E collapse, 2026-04-30; presetId axis added Phase 13.I,
|
|
280
|
+
* 2026-05-01) — `key` is the composite `strategyKey(presetId, rc, intv)`
|
|
281
|
+
* computed at the call site; `presetId` / `rootCause` / `intervention` are
|
|
282
|
+
* decoration carried via `record(...)` so consumers can read them without
|
|
283
|
+
* re-parsing the key.
|
|
284
|
+
*/
|
|
285
|
+
interface StrategyEntry {
|
|
286
|
+
key: StrategyKey;
|
|
287
|
+
presetId: PresetId;
|
|
288
|
+
rootCause: RootCause;
|
|
289
|
+
intervention: Intervention;
|
|
290
|
+
attempts: number;
|
|
291
|
+
successes: number;
|
|
292
|
+
successRate: number;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* LLM output shape from the EXECUTE stage (partial — lacks `item`).
|
|
296
|
+
*
|
|
297
|
+
* Generic over the artifact type `A` so typed executors like
|
|
298
|
+
* `refineExecutor<T>` can flow `T` through to an `evalVerifier<T>` without
|
|
299
|
+
* the caller casting `artifact` at the boundary. Defaults to `unknown`
|
|
300
|
+
* for escape-hatch executors that carry opaque state.
|
|
301
|
+
*/
|
|
302
|
+
type ExecuteOutput<A = unknown> = {
|
|
303
|
+
/**
|
|
304
|
+
* Execution outcome classification:
|
|
305
|
+
*
|
|
306
|
+
* - `"success"`: execution completed cleanly and the artifact (if any) is
|
|
307
|
+
* ready for verification. The verifier should proceed with a full
|
|
308
|
+
* evaluation pass.
|
|
309
|
+
* - `"failure"`: execution did not produce a usable artifact — the actuator
|
|
310
|
+
* threw, a prompt parse failed, or `shouldApply` skipped the item. The
|
|
311
|
+
* verifier should treat this as a non-result and route accordingly.
|
|
312
|
+
* - `"partial"`: execution produced a candidate that converged but did not
|
|
313
|
+
* fully meet verification criteria. Used by `refineExecutor` when the
|
|
314
|
+
* iteration cap is reached without full convergence; the artifact holds
|
|
315
|
+
* the best candidate achieved.
|
|
316
|
+
*/
|
|
317
|
+
outcome: "success" | "failure" | "partial";
|
|
318
|
+
detail: string;
|
|
319
|
+
/**
|
|
320
|
+
* Optional opaque artifact that a custom executor (e.g. `refineExecutor`)
|
|
321
|
+
* may attach so downstream verifiers can re-run evaluation against the
|
|
322
|
+
* thing that was produced. LLM-backed default executors never populate
|
|
323
|
+
* this — it's an escape hatch for reactive executors carrying structured
|
|
324
|
+
* output (a refined prompt, a patched spec, a generated template, ...).
|
|
325
|
+
*/
|
|
326
|
+
artifact?: A;
|
|
327
|
+
};
|
|
328
|
+
/** Full execution result assembled downstream (LLM output + context). */
|
|
329
|
+
interface ExecutionResult<A = unknown> {
|
|
330
|
+
item: TriagedItem;
|
|
331
|
+
/**
|
|
332
|
+
* Execution outcome classification. Same semantics as
|
|
333
|
+
* {@link ExecuteOutput.outcome}:
|
|
334
|
+
*
|
|
335
|
+
* - `"success"`: execution completed cleanly; artifact is ready for
|
|
336
|
+
* verification.
|
|
337
|
+
* - `"failure"`: no usable artifact was produced.
|
|
338
|
+
* - `"partial"`: best candidate produced but convergence criteria not met
|
|
339
|
+
* (iteration cap reached in `refineExecutor`).
|
|
340
|
+
*/
|
|
341
|
+
outcome: "success" | "failure" | "partial";
|
|
342
|
+
detail: string;
|
|
343
|
+
/**
|
|
344
|
+
* Passthrough of {@link ExecuteOutput.artifact} when the executor emitted
|
|
345
|
+
* one. Reactive executors like `refineExecutor` populate this; LLM-backed
|
|
346
|
+
* default executors leave it undefined.
|
|
347
|
+
*/
|
|
348
|
+
artifact?: A;
|
|
349
|
+
}
|
|
350
|
+
/** Whether an error is self-correctable (fast-retry) or structural (full loop). */
|
|
351
|
+
type ErrorClass = "self-correctable" | "structural";
|
|
352
|
+
/** Classifier for fast-retry path. */
|
|
353
|
+
type ErrorClassifier = (result: ExecutionResult) => ErrorClass;
|
|
354
|
+
/** Result of the VERIFY stage. */
|
|
355
|
+
interface VerifyResult<A = unknown> {
|
|
356
|
+
item: TriagedItem;
|
|
357
|
+
execution: ExecutionResult<A>;
|
|
358
|
+
verified: boolean;
|
|
359
|
+
findings: string[];
|
|
360
|
+
errorClass?: ErrorClass;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Verifier output shape — what a custom verifier emits. The harness
|
|
364
|
+
* assembles this into the full {@link VerifyResult} using the triaged
|
|
365
|
+
* item + execute output sampled from `executeContextNode`.
|
|
366
|
+
*/
|
|
367
|
+
interface VerifyOutput {
|
|
368
|
+
verified: boolean;
|
|
369
|
+
findings: string[];
|
|
370
|
+
errorClass?: ErrorClass;
|
|
371
|
+
}
|
|
372
|
+
/** Configurable signals for priority scoring. */
|
|
373
|
+
interface PrioritySignals {
|
|
374
|
+
/** Per-severity base weight (default: critical=100, high=70, medium=40, low=10). */
|
|
375
|
+
severityWeights?: Partial<Record<Severity, number>>;
|
|
376
|
+
/** Decay rate per second for attention decay (default ~1.15e-6 ≈ 7-day half-life). */
|
|
377
|
+
decayRate?: number;
|
|
378
|
+
/** Strategy model effectiveness boost threshold (default 0.7). */
|
|
379
|
+
effectivenessThreshold?: number;
|
|
380
|
+
/** Strategy model effectiveness boost amount (default 15). */
|
|
381
|
+
effectivenessBoost?: number;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/** Per-queue configuration in the harness loop. */
|
|
385
|
+
interface QueueConfig {
|
|
386
|
+
/** Whether this queue is gated (requires human approval). */
|
|
387
|
+
gated: boolean;
|
|
388
|
+
/** Maximum pending items in the gate (default Infinity). */
|
|
389
|
+
maxPending?: number;
|
|
390
|
+
/** Start the gate in open (auto-approve) mode? Only meaningful when `gated: true`. */
|
|
391
|
+
startOpen?: boolean;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Accumulating per-job payload threaded through the harness's
|
|
395
|
+
* `executeFlow` ({@link harnessLoop} Tier 6.5 C2 lock). Each stage's work fn
|
|
396
|
+
* receives the prior payload and returns a new one with its own field
|
|
397
|
+
* filled in:
|
|
398
|
+
*
|
|
399
|
+
* - The `enqueueEffect` seeds with `{ item }` only.
|
|
400
|
+
* - The execute work fn fills `execution`.
|
|
401
|
+
* - The verify work fn fills `verify`.
|
|
402
|
+
*
|
|
403
|
+
* The post-completed dispatch effect reads `verify.verified` /
|
|
404
|
+
* `verify.errorClass` to route the item to `verifyResults` /
|
|
405
|
+
* `retryTopic.publish(...)` / `intake.publish(...)` (3-way verdict).
|
|
406
|
+
*
|
|
407
|
+
* Carrying `item` through stage payloads (rather than re-pairing via a
|
|
408
|
+
* separate `withLatestFrom` node) is the C2 deviation from today's
|
|
409
|
+
* `executeContextNode` design: each `JobEnvelope` is self-contained, so the
|
|
410
|
+
* verify pump can run multiple in-flight jobs in parallel without an
|
|
411
|
+
* external pairing node.
|
|
412
|
+
*/
|
|
413
|
+
interface HarnessJobPayload<A = unknown> {
|
|
414
|
+
/** The triaged item flowing through execute → verify → dispatch. */
|
|
415
|
+
item: TriagedItem;
|
|
416
|
+
/** Filled by the execute work fn. Verify reads this; dispatch routes. */
|
|
417
|
+
execution?: ExecutionResult<A>;
|
|
418
|
+
/** Filled by the verify work fn. Dispatch reads `verified` / `errorClass`. */
|
|
419
|
+
verify?: VerifyOutput;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Pluggable EXECUTE work fn — receives a {@link JobEnvelope} carrying a
|
|
423
|
+
* {@link HarnessJobPayload} (with `item` set, `execution` / `verify`
|
|
424
|
+
* unset), returns a {@link NodeInput} that emits the same payload with
|
|
425
|
+
* `execution` filled.
|
|
426
|
+
*
|
|
427
|
+
* **C2 contract (Tier 6.5 lock, 2026-04-28):**
|
|
428
|
+
* 1. Emit DATA exactly once per claimed job. The JobFlow pump subscribes
|
|
429
|
+
* once, takes the first DATA, then unsubscribes. Subsequent emissions
|
|
430
|
+
* are ignored.
|
|
431
|
+
* 2. Errors must be caught and surfaced as a `failure` outcome inside the
|
|
432
|
+
* payload — never throw / return ERROR. A pump nack would drop the
|
|
433
|
+
* item from JobFlow before the dispatch effect could route it.
|
|
434
|
+
* 3. The work fn runs once per claim — no internal `switchMap` needed.
|
|
435
|
+
* Per-item subgraphs (e.g. a fresh `refineLoop` per claim) are
|
|
436
|
+
* instantiated inside the work fn body.
|
|
437
|
+
*
|
|
438
|
+
* `defaultLlmExecutor` (in `defaults.ts`) is a thin `adapter.invoke()`
|
|
439
|
+
* wrapper. `refineExecutor` builds a per-claim `refineLoop`.
|
|
440
|
+
* `actuatorExecutor` runs a side-effecting `apply(item, signal)`.
|
|
441
|
+
*/
|
|
442
|
+
type HarnessExecutor<A = unknown> = (job: JobEnvelope<HarnessJobPayload<A>>, opts?: {
|
|
443
|
+
signal: AbortSignal;
|
|
444
|
+
}) => NodeInput<HarnessJobPayload<A>>;
|
|
445
|
+
/**
|
|
446
|
+
* Pluggable VERIFY work fn — receives a {@link JobEnvelope} whose payload
|
|
447
|
+
* has `item` + `execution` populated, returns a {@link NodeInput} that
|
|
448
|
+
* emits the same payload with `verify` filled.
|
|
449
|
+
*
|
|
450
|
+
* Same C2 contract rules 1–3 as {@link HarnessExecutor}. The dispatch
|
|
451
|
+
* effect downstream reads `verify.verified` (success → ack +
|
|
452
|
+
* verifyResults publish), `verify.errorClass === "self-correctable"`
|
|
453
|
+
* (retry → republish to retry topic with `$retries` bumped), or anything
|
|
454
|
+
* else (structural → reingest to intake if budget remains).
|
|
455
|
+
*
|
|
456
|
+
* Verify-LLM-call failures (parse error, adapter throw, timeout) MUST be
|
|
457
|
+
* caught and surfaced as a structural-failure `verify` payload (`{
|
|
458
|
+
* verified: false, findings: [...], errorClass: "structural" }`) so the
|
|
459
|
+
* dispatch effect can route the item rather than silently drop it.
|
|
460
|
+
*/
|
|
461
|
+
type HarnessVerifier<A = unknown> = (job: JobEnvelope<HarnessJobPayload<A>>, opts?: {
|
|
462
|
+
signal: AbortSignal;
|
|
463
|
+
}) => NodeInput<HarnessJobPayload<A>>;
|
|
464
|
+
/** Triage prompt callable shape — pair of `[intake item, strategy snapshot]`. */
|
|
465
|
+
type TriagePromptFn = (pair: readonly [IntakeItem, StrategySnapshot]) => string;
|
|
466
|
+
/** Execute prompt callable shape. */
|
|
467
|
+
type ExecutePromptFn = (item: TriagedItem) => string;
|
|
468
|
+
/** Verify prompt callable shape — pair of `[execute output, triaged item]`. */
|
|
469
|
+
type VerifyPromptFn<A = unknown> = (pair: readonly [ExecuteOutput<A> | null, TriagedItem | null]) => string;
|
|
470
|
+
/** Options for {@link harnessLoop}. */
|
|
471
|
+
interface HarnessLoopOptions<A = unknown> {
|
|
472
|
+
/** LLM adapter for promptNode-based stages (triage + any default executor/verifier). */
|
|
473
|
+
adapter: LLMAdapter;
|
|
474
|
+
/** Custom triage prompt (receives IntakeItem + strategy snapshot as a tuple). */
|
|
475
|
+
triagePrompt?: string | TriagePromptFn;
|
|
476
|
+
/**
|
|
477
|
+
* Execute prompt — sugar over the default LLM executor. Ignored when
|
|
478
|
+
* `executor` is set.
|
|
479
|
+
*/
|
|
480
|
+
executePrompt?: string | ExecutePromptFn;
|
|
481
|
+
/**
|
|
482
|
+
* Verify prompt — sugar over the default LLM verifier. Ignored when
|
|
483
|
+
* `verifier` is set.
|
|
484
|
+
*/
|
|
485
|
+
verifyPrompt?: string | VerifyPromptFn<A>;
|
|
486
|
+
/**
|
|
487
|
+
* Pluggable EXECUTE slot. When omitted, the harness uses a `promptNode`
|
|
488
|
+
* driven by `adapter` + `executePrompt`. Replace to plug in a
|
|
489
|
+
* `refineExecutor`, tool-using agent, or any reactive execution pipeline.
|
|
490
|
+
*/
|
|
491
|
+
executor?: HarnessExecutor<A>;
|
|
492
|
+
/**
|
|
493
|
+
* Pluggable VERIFY slot. When omitted, the harness uses a `promptNode`
|
|
494
|
+
* driven by `adapter` + `verifyPrompt`. Replace to plug in an
|
|
495
|
+
* `evalVerifier` that re-runs affected eval tasks.
|
|
496
|
+
*/
|
|
497
|
+
verifier?: HarnessVerifier<A>;
|
|
498
|
+
/** Per-queue configuration overrides. */
|
|
499
|
+
queues?: Partial<Record<QueueRoute, QueueConfig>>;
|
|
500
|
+
/** Priority scoring signals. */
|
|
501
|
+
priority?: PrioritySignals;
|
|
502
|
+
/**
|
|
503
|
+
* Reactive last-human-interaction timestamp (monotonic ns). Drives the
|
|
504
|
+
* priority score age-decay term for `HarnessGraph.priorityScores`.
|
|
505
|
+
*
|
|
506
|
+
* **Required when `opts.priority` is set.** Priority score nodes only
|
|
507
|
+
* re-derive when `topic.latest`, `strategy.snapshot`, or this tick settles —
|
|
508
|
+
* an idle queue would freeze its age at construction time if we
|
|
509
|
+
* auto-defaulted. Typical sources:
|
|
510
|
+
* - `fromTimer(60_000)` — steady tick, uniform decay.
|
|
511
|
+
* - `state(monotonicNs())` — bumped from a human-interaction handler.
|
|
512
|
+
* - A reactive view over a DB column / external metrics source.
|
|
513
|
+
*/
|
|
514
|
+
lastInteractionNs?: Node<number>;
|
|
515
|
+
/** Error classifier for fast-retry path. */
|
|
516
|
+
errorClassifier?: ErrorClassifier;
|
|
517
|
+
/** Max fast-retries per item before routing to full intake (default 2). */
|
|
518
|
+
maxRetries?: number;
|
|
519
|
+
/** Global retry cap across all items — circuit breaker (default maxRetries × 10). */
|
|
520
|
+
maxTotalRetries?: number;
|
|
521
|
+
/** Max re-ingestions from verify→intake before giving up (default 1). */
|
|
522
|
+
maxReingestions?: number;
|
|
523
|
+
/** Global reingestion cap across all items — circuit breaker (default maxReingestions × 10). */
|
|
524
|
+
maxTotalReingestions?: number;
|
|
525
|
+
/** Retained limit for topic logs (default 1000). */
|
|
526
|
+
retainedLimit?: number;
|
|
527
|
+
/**
|
|
528
|
+
* Per-pump-tick claim cap on the internal `executeFlow` JobFlow's `execute`
|
|
529
|
+
* stage (Tier 6.5 C2). Default `Number.MAX_SAFE_INTEGER` — every pending
|
|
530
|
+
* claim is processed in one tick (matches today's unbounded `merge()`
|
|
531
|
+
* parallelism). Lower this to bound LLM cost spikes on bursty intake.
|
|
532
|
+
*
|
|
533
|
+
* **Caveat.** This caps **claims per pump tick**, not total concurrent
|
|
534
|
+
* inflight. Bounded-inflight is a separate primitive concern — see
|
|
535
|
+
* `docs/optimizations.md` "Tier 6.5 follow-up — bounded concurrent inflight
|
|
536
|
+
* on JobFlow stages".
|
|
537
|
+
*/
|
|
538
|
+
executeMaxPerPump?: number;
|
|
539
|
+
/**
|
|
540
|
+
* Per-pump-tick claim cap on the internal `executeFlow` JobFlow's
|
|
541
|
+
* `verify` stage. Default `Number.MAX_SAFE_INTEGER`. Same caveat as
|
|
542
|
+
* {@link HarnessLoopOptions.executeMaxPerPump}. Honored independently
|
|
543
|
+
* of the execute cap via `StageDef.maxPerPump` (Tier 6.5 D1).
|
|
544
|
+
*/
|
|
545
|
+
verifyMaxPerPump?: number;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export { DEFAULT_PRESET_ID as D, type ErrorClass as E, type HarnessExecutor as H, type IntakeItem as I, type KnownIntakeSource as K, type PresetId as P, type QueueConfig as Q, type RootCause as R, type Severity as S, type TriagePromptFn as T, type VerifyOutput as V, type ErrorClassifier as a, type ExecuteOutput as b, type ExecutePromptFn as c, type ExecutionResult as d, type HarnessJobPayload as e, type HarnessLoopOptions as f, type HarnessVerifier as g, type IntakeSource as h, type Intervention as i, type PrioritySignals as j, type QueueRoute as k, type StrategyEntry as l, type StrategyKey as m, type StrategyModelGraph as n, type StrategySnapshot as o, type TriagedItem as p, type VerifyPromptFn as q, type VerifyResult as r, priorityScore as s, strategyModel as t };
|