@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/presets/harness/actor-pool.ts","../src/presets/harness/eval-verifier.ts","../src/presets/harness/refine-executor.ts","../src/presets/harness/ownership-controller.ts","../src/presets/harness/profile.ts","../src/presets/harness/trace.ts"],"sourcesContent":["/**\n * DS-14.6.A U-B — `actorPool()` (Phase 14.5).\n *\n * The dynamic-track complement to `spawnable()` (SESSION-DS-14.6-A L7/L8 +\n * 9Q walk). An actor is **identity + cursor + tool closure, NOT a subgraph**\n * (D-B1): no per-actor mount, so `describe()` shows only the pool / todo /\n * context-hub collections and the actor count drifts inside a single\n * reactive `active` map node. `depthCap` is enforced via the depth carried\n * on the attach request (D-B2); `release()` cascades teardown to the\n * actor's context view + todo cursor subscriptions (§3i — free).\n *\n * Contrast `spawnable()`: agent IS a subgraph, topology reflects the agent\n * set, `describe()`-visible — use it when agent identities are pre-known.\n * Use `actorPool()` for runtime recursive fan-out where agent count drifts.\n *\n * @module\n */\n\nimport { type Node, node } from \"@graphrefly/pure-ts/core\";\nimport { type ReactiveLogBundle, reactiveLog } from \"@graphrefly/pure-ts/extra\";\nimport { Graph } from \"@graphrefly/pure-ts/graph\";\nimport {\n\ttype ContextEntry,\n\ttype ContextView,\n\ttype RenderedEntry,\n\trenderContextView,\n\ttype TaggedContextPoolBundle,\n\ttaggedContextPool,\n} from \"../ai/context/index.js\";\n\nexport type ActorId = string;\n\nexport interface Todo {\n\treadonly id: string;\n\treadonly assignee?: ActorId;\n\treadonly payload: unknown;\n}\n\nexport type ActorStatus = \"idle\" | \"running\" | \"blocked\" | \"done\";\n\nexport interface ActorState {\n\treadonly id: ActorId;\n\treadonly depth: number;\n\treadonly status: ActorStatus;\n}\n\nexport interface ActorSpec<T> {\n\treadonly id?: ActorId;\n\t/** Recursion depth — gated against `depthCap` (D-B2). Default 0 (root). */\n\treadonly depth?: number;\n\t/** Per-actor compression view over the shared context pool. */\n\treadonly view: Omit<ContextView<T>, \"pressure\"> & { readonly pressure: Node<number> };\n}\n\nexport interface ActorHandle<T> {\n\treadonly id: ActorId;\n\t/** This actor's compressed context slice. */\n\treadonly context: Node<readonly RenderedEntry<T>[]>;\n\t/** Todos currently assigned to this actor (or unassigned). */\n\treadonly todoCursor: Node<readonly Todo[]>;\n\t/** Write an entry into the shared pool, stamped with this actor's id tag. */\n\tpublish(entry: Omit<ContextEntry<T>, \"id\" | \"t_ns\"> & { id?: string }): string;\n\tenqueueTodo(t: Todo): void;\n\treadonly status: Node<ActorStatus>;\n\tsetStatus(s: ActorStatus): void;\n\t/** Idempotent. Tears the actor's subscriptions + removes it from `active`. */\n\trelease(): void;\n}\n\nexport interface ActorPoolOptions<T> {\n\treadonly name?: string;\n\t/** Max recursion depth; `attachActor` with `depth > depthCap` throws. */\n\treadonly depthCap?: number;\n\t/** Forwarded to the backing context pool. */\n\treadonly contextTopic?: string;\n\treadonly llmCompress?: TaggedContextPoolBundle<T>[\"_opts\"][\"llmCompress\"];\n}\n\nexport interface ActorPoolBundle<T> {\n\tattachActor(spec: ActorSpec<T>): ActorHandle<T>;\n\treadonly contextPool: TaggedContextPoolBundle<T>;\n\treadonly todos: ReactiveLogBundle<Todo>;\n\t/** Single reactive map of live actors — `describe()`-coherent (D-B1). */\n\treadonly active: Node<ReadonlyMap<ActorId, ActorState>>;\n\treadonly graph: Graph;\n\tdispose(): void;\n}\n\n/** Process-wide sequence for collision-safe default mount names (QA P6). */\nlet _actorPoolSeq = 0;\n\nexport function actorPool<T = unknown>(\n\tparent: Graph,\n\topts: ActorPoolOptions<T> = {},\n): ActorPoolBundle<T> {\n\t// QA P6: collision-safe default — recursive fan-out spins nested pools\n\t// under one parent; static \"actorPool\" would collide on `parent.mount`.\n\tconst name = opts.name ?? `actorPool-${++_actorPoolSeq}`;\n\tconst graph = new Graph(name);\n\tparent.mount(name, graph);\n\tconst depthCap = opts.depthCap ?? Number.POSITIVE_INFINITY;\n\t// QA P5: per-pool actor counter (was module-global → test-pollution).\n\tlet autoActor = 0;\n\t// QA P7: track live handles so dispose() can release them all.\n\tconst liveHandles = new Set<ActorHandle<T>>();\n\n\tconst contextPool = taggedContextPool<T>(graph, {\n\t\ttopic: opts.contextTopic ?? \"context\",\n\t\tllmCompress: opts.llmCompress,\n\t\tname: `${name}.ctx`,\n\t});\n\tconst todos: ReactiveLogBundle<Todo> = reactiveLog<Todo>(undefined, { name: `${name}.todos` });\n\n\t// Single reactive `active` map node — actor count drifts inside it; no\n\t// per-actor subgraph mount (D-B1, describe-coherent).\n\tconst stateMap = new Map<ActorId, ActorState>();\n\tconst active = node<ReadonlyMap<ActorId, ActorState>>([], {\n\t\tname: `${name}.active`,\n\t\tinitial: new Map(),\n\t});\n\tfunction pushActive(): void {\n\t\tactive.emit(new Map(stateMap));\n\t}\n\n\tfunction attachActor(spec: ActorSpec<T>): ActorHandle<T> {\n\t\tconst depth = spec.depth ?? 0;\n\t\tif (depth > depthCap) {\n\t\t\tthrow new RangeError(`actorPool: depth ${depth} exceeds depthCap ${depthCap}`);\n\t\t}\n\t\tconst id = spec.id ?? `actor-${++autoActor}`;\n\n\t\tconst context = renderContextView(contextPool, spec.view as ContextView<T>);\n\t\t// Per-actor todo cursor — assigned-to-me or unassigned.\n\t\tconst todoCursor = node<readonly Todo[]>(\n\t\t\t[todos.entries as Node],\n\t\t\t(data, actions, ctx) => {\n\t\t\t\tconst all = (data[0] != null && data[0].length > 0 ? data[0].at(-1) : ctx.prevData[0]) as\n\t\t\t\t\t| readonly Todo[]\n\t\t\t\t\t| undefined;\n\t\t\t\tactions.emit((all ?? []).filter((t) => t.assignee === id || t.assignee === undefined));\n\t\t\t},\n\t\t\t{ describeKind: \"derived\" },\n\t\t);\n\t\tconst status = node<ActorStatus>([], { name: `${name}.${id}.status`, initial: \"idle\" });\n\n\t\tstateMap.set(id, { id, depth, status: \"idle\" });\n\t\tpushActive();\n\n\t\t// Keepalive subs so `.cache` stays warm; torn on release (cascade-cancel).\n\t\tconst subs = [\n\t\t\tcontext.subscribe(() => {}),\n\t\t\ttodoCursor.subscribe(() => {}),\n\t\t\tstatus.subscribe(() => {}),\n\t\t];\n\t\tlet released = false;\n\n\t\tconst handle: ActorHandle<T> = {\n\t\t\tid,\n\t\t\tcontext,\n\t\t\ttodoCursor,\n\t\t\tstatus,\n\t\t\tpublish(entry) {\n\t\t\t\tconst tags = [...(entry.tags ?? []), `actor:${id}`];\n\t\t\t\treturn contextPool.add({ ...entry, tags });\n\t\t\t},\n\t\t\tenqueueTodo(t) {\n\t\t\t\ttodos.append(t);\n\t\t\t},\n\t\t\tsetStatus(s) {\n\t\t\t\tstatus.emit(s);\n\t\t\t\tconst prev = stateMap.get(id);\n\t\t\t\tif (prev) {\n\t\t\t\t\tstateMap.set(id, { ...prev, status: s });\n\t\t\t\t\tpushActive();\n\t\t\t\t}\n\t\t\t},\n\t\t\trelease() {\n\t\t\t\tif (released) return;\n\t\t\t\treleased = true;\n\t\t\t\t// Cascade-cancel: tearing the keepalive subs deactivates the\n\t\t\t\t// per-actor derived nodes (lazy-deactivation — COMPOSITION-GUIDE\n\t\t\t\t// §1), detaching `context`/`todoCursor`/`status` from the shared\n\t\t\t\t// pool/todos logs once no other subscriber remains.\n\t\t\t\tfor (const u of subs) u();\n\t\t\t\tstateMap.delete(id);\n\t\t\t\tliveHandles.delete(handle);\n\t\t\t\tpushActive();\n\t\t\t},\n\t\t};\n\t\tliveHandles.add(handle);\n\t\treturn handle;\n\t}\n\n\treturn {\n\t\tattachActor,\n\t\tcontextPool,\n\t\ttodos,\n\t\tactive,\n\t\tgraph,\n\t\tdispose(): void {\n\t\t\t// QA P7: release outstanding actors first (tears their keepalive\n\t\t\t// subs / deactivates per-actor derived nodes) before disposing the\n\t\t\t// shared pool + todo log.\n\t\t\tfor (const h of [...liveHandles]) h.release();\n\t\t\tcontextPool.dispose();\n\t\t\ttodos.dispose();\n\t\t},\n\t};\n}\n","/**\n * evalVerifier — re-run the affected eval tasks against the execute-stage\n * artifact instead of asking an LLM to opine on the fix.\n *\n * Pairs naturally with {@link refineExecutor}: refineExecutor emits an\n * `ExecuteOutput<T>.artifact` holding the converged candidate; evalVerifier\n * pulls it out via `extractArtifact` and feeds a single-candidate batch\n * into the same `Evaluator<T>` shape that `refineLoop` used. Consistent\n * scoring between EXECUTE and VERIFY — no \"LLM said it looks fine\" gap.\n *\n * **C2 lifecycle (Tier 6.5).** The work fn is invoked once per claimed\n * verify-stage job. A fresh single-candidate eval subgraph is mounted\n * inside the work fn and tears down when the JobFlow pump ack/unsubs.\n *\n * @module\n */\n\nimport { batch, type Node, node } from \"@graphrefly/pure-ts/core\";\nimport { filter } from \"@graphrefly/pure-ts/extra\";\nimport { Graph } from \"@graphrefly/pure-ts/graph\";\nimport type {\n\tExecuteOutput,\n\tHarnessExecutor,\n\tHarnessJobPayload,\n\tHarnessVerifier,\n\tTriagedItem,\n\tVerifyOutput,\n} from \"../../utils/harness/types.js\";\nimport type { JobEnvelope } from \"../../utils/job-queue/index.js\";\nimport { refineExecutor } from \"./refine-executor.js\";\nimport type {\n\tDatasetItem,\n\tEvalResult,\n\tEvaluator,\n\tRefineLoopOptions,\n\tRefineStrategy,\n} from \"./refine-loop.js\";\n\n/** Summary of the re-eval wave passed to a custom `toOutput` mapper. */\nexport interface EvalVerifierSummary {\n\treadonly scores: readonly EvalResult[];\n\treadonly meanScore: number;\n\treadonly passCount: number;\n\treadonly total: number;\n\treadonly threshold: number;\n\t/**\n\t * True when the EXECUTE stage did not produce an artifact (i.e.\n\t * `extractArtifact` returned `null` / `undefined`). Downstream mappers\n\t * can distinguish this from \"evaluator ran but everything scored zero\".\n\t */\n\treadonly missingArtifact?: boolean;\n}\n\n/** Configuration for {@link evalVerifier}. */\nexport interface EvalVerifierConfig<T> {\n\t/**\n\t * Pull the artifact that should be re-evaluated out of the execute-stage\n\t * output. Default: `(exec) => exec.artifact as T` — works out-of-the-box\n\t * with `refineExecutor` (which populates `artifact` by default).\n\t */\n\textractArtifact?: (exec: ExecuteOutput<T>, item: TriagedItem) => T | null | undefined;\n\n\t/**\n\t * Reactive evaluator — same contract as `refineLoop`'s `Evaluator<T>`.\n\t */\n\tevaluator: Evaluator<T>;\n\n\t/**\n\t * Resolve which dataset rows to score this verification against.\n\t */\n\tdatasetFor: (item: TriagedItem) => readonly DatasetItem[];\n\n\t/** Mean score required to pass verification. Default `0.5`. */\n\tthreshold?: number;\n\n\t/** Optional output mapper — override the default findings / errorClass shape. */\n\ttoOutput?: (summary: EvalVerifierSummary) => VerifyOutput;\n\n\t/** Node name prefix for introspection. */\n\tname?: string;\n\n\t/**\n\t * Optional parent graph on which per-claim eval subgraphs mount at\n\t * `eval/${claimId}` (DS-13.5.D.4, locked 2026-05-01). When provided,\n\t * each claim creates a fresh `Graph(\\`eval_${claimId}\\`)` subgraph\n\t * carrying `candidates` / `dataset` / `output` and mounts it at\n\t * `eval/${claimId}` on this parent — `describe()` walks the parent\n\t * see the per-claim topology while the claim is in flight, and the\n\t * subgraph is removed via `parent.remove(\"eval/${claimId}\")` on the\n\t * output node's `deactivate` cleanup (fires when JobFlow's pump\n\t * unsubscribes after ack/nack).\n\t *\n\t * **claimId source.** `JobEnvelope.id` (assigned at enqueue time);\n\t * unique within a JobFlow lifetime — uniqueness within a single pump\n\t * cycle is the JobFlow's contract.\n\t *\n\t * When omitted, internal nodes float (pre-DS-13.5.D.4 behavior).\n\t */\n\tgraph?: Graph;\n}\n\nfunction meanScore(scores: readonly EvalResult[]): number {\n\tif (scores.length === 0) return Number.NEGATIVE_INFINITY;\n\tlet sum = 0;\n\tfor (const s of scores) sum += s.score;\n\treturn sum / scores.length;\n}\n\nfunction defaultToOutput(summary: EvalVerifierSummary): VerifyOutput {\n\tconst { passCount, total, meanScore: mean, threshold, missingArtifact } = summary;\n\tconst meanStr = Number.isFinite(mean) ? mean.toFixed(3) : String(mean);\n\tconst verified = !missingArtifact && total > 0 && mean >= threshold;\n\tconst findings = missingArtifact\n\t\t? [\"EXECUTE stage did not emit an artifact; cannot verify reactively\"]\n\t\t: verified\n\t\t\t? [`${passCount}/${total} eval tasks passed; mean score ${meanStr} ≥ ${threshold}`]\n\t\t\t: total === 0\n\t\t\t\t? [\"No eval tasks were selected for this item — cannot verify\"]\n\t\t\t\t: [\n\t\t\t\t\t\t`${passCount}/${total} eval tasks passed; mean score ${meanStr} < threshold ${threshold}`,\n\t\t\t\t\t];\n\treturn verified\n\t\t? { verified: true, findings }\n\t\t: { verified: false, findings, errorClass: \"structural\" };\n}\n\nfunction defaultExtractArtifact<T>(exec: ExecuteOutput<T>): T | null | undefined {\n\treturn exec.artifact ?? null;\n}\n\n/**\n * Build a {@link HarnessVerifier} that re-runs the eval suite against the\n * artifact produced by EXECUTE.\n *\n * Reads `job.payload.execution` (filled by the upstream execute work fn)\n * and runs the evaluator against `extractArtifact(execution, item)`.\n * Returns the same payload with `verify` filled in.\n *\n * @example Pair with refineExecutor for end-to-end eval consistency.\n * ```ts\n * const evaluator: Evaluator<CatalogEntry> = (cands, ds) => runEval(cands, ds);\n * const harness = harnessLoop(\"repair\", {\n * adapter,\n * executor: refineExecutor({ ..., evaluator, ...strategyConfig }),\n * verifier: evalVerifier({ evaluator, datasetFor, threshold: 0.8 }),\n * });\n * ```\n */\nexport function evalVerifier<T>(config: EvalVerifierConfig<T>): HarnessVerifier<T> {\n\tconst name = config.name ?? \"eval-verifier\";\n\tconst threshold = config.threshold ?? 0.5;\n\tconst toOutput = config.toOutput ?? defaultToOutput;\n\tconst extract = config.extractArtifact ?? defaultExtractArtifact<T>;\n\tconst parentGraph = config.graph;\n\t// DS-13.5.B QA A7 (2026-05-03): per-claimId collision counter.\n\t// Reingest paths preserve identity per DS-13.5.D.3 so the same\n\t// claimId can land on the verifier while a prior cycle is still\n\t// in-flight. Without disambiguation, `parentGraph.mount(\n\t// \"eval/${id}\", sub)` would either silently overwrite the prior\n\t// mount or throw \"mount already exists\". The counter is keyed by\n\t// claimId so DISTINCT ids start at seq=0 (`eval/${id}`) and only\n\t// REPEAT ids get a `_${seq}` suffix.\n\tconst mountSeqByClaimId = new Map<string, number>();\n\n\treturn (job: JobEnvelope<HarnessJobPayload<T>>) => {\n\t\tconst { item, execution } = job.payload;\n\t\t// Defensive: verify stage should always run AFTER execute stage with\n\t\t// `execution` populated. If it isn't, surface that as a structural\n\t\t// failure so the dispatch effect can route the item.\n\t\tif (execution == null) {\n\t\t\treturn {\n\t\t\t\t...job.payload,\n\t\t\t\tverify: {\n\t\t\t\t\tverified: false,\n\t\t\t\t\tfindings: [\"evalVerifier: prior execute stage produced no execution\"],\n\t\t\t\t\terrorClass: \"structural\" as const,\n\t\t\t\t},\n\t\t\t} satisfies HarnessJobPayload<T>;\n\t\t}\n\t\tconst artifact = extract(execution, item);\n\t\tif (artifact == null) {\n\t\t\treturn {\n\t\t\t\t...job.payload,\n\t\t\t\tverify: toOutput({\n\t\t\t\t\tscores: [],\n\t\t\t\t\tmeanScore: Number.NEGATIVE_INFINITY,\n\t\t\t\t\tpassCount: 0,\n\t\t\t\t\ttotal: 0,\n\t\t\t\t\tthreshold,\n\t\t\t\t\tmissingArtifact: true,\n\t\t\t\t}),\n\t\t\t} satisfies HarnessJobPayload<T>;\n\t\t}\n\n\t\t// Per-claim eval subgraph. State seeds with the single candidate +\n\t\t// resolved dataset; the evaluator returns a Node<readonly EvalResult[]>.\n\t\t// The terminal payload emits when the evaluator settles; intermediate\n\t\t// nulls are filtered.\n\t\t//\n\t\t// **Batch-coalescing for synchronous-emit-during-subscribe evaluators\n\t\t// (COMPOSITION-GUIDE §9a).** This `batch()` wrap is load-bearing for a\n\t\t// SPECIFIC evaluator pattern: evaluators that, during the\n\t\t// `evaluator(candidates, dataset)` constructor call, synchronously\n\t\t// `subscribe()` to BOTH inputs and emit on each subscribe-callback\n\t\t// firing. Each subscribe pushes the cached value to its callback, the\n\t\t// callback runs `out.emit(...)`, and that emit becomes its own wave\n\t\t// when not inside a batch — leaving multiple DATA messages visible to\n\t\t// the downstream `derived` once it activates. The JobFlow pump's\n\t\t// \"first DATA wins\" capture would then fire on the FIRST intermediate\n\t\t// emit (e.g. empty scores from a pre-dataset recompute) instead of\n\t\t// the final settled value.\n\t\t//\n\t\t// Wrapping the constructor call in `batch()` coalesces those internal\n\t\t// emits into one multi-message delivery (§9a); sugar `derived`\n\t\t// auto-unwraps to the LAST value per its snapshot/combine semantics\n\t\t// (sugar.ts), so the downstream sees only the final settled scores.\n\t\t//\n\t\t// **Async evaluators are NOT covered by this fix.** Evaluators that\n\t\t// subscribe via microtask / Promise.then() / setTimeout don't see the\n\t\t// §9a hazard at all — their emits land in separate waves regardless\n\t\t// of whether the constructor call is batched. The fix is strictly\n\t\t// for the synchronous-emit-during-subscribe pattern (today's tests:\n\t\t// `presenceEvaluator` in actuator-executor.test.ts; `keywordEvaluator`\n\t\t// in refine-executor.test.ts uses `derived` and is naturally\n\t\t// single-emit). See `harness-default-bridges.test.ts` regression test\n\t\t// \"evalVerifier coalesces synchronous-emit-during-subscribe\n\t\t// evaluators\" for the locked contract.\n\t\t// DS-13.5.D.4 (locked 2026-05-01): when `parentGraph` is configured,\n\t\t// each claim creates its own subgraph `eval_${claimId}` and mounts\n\t\t// it at `eval/${claimId}` on the parent. Internal node names use\n\t\t// the simple shape (`candidates`, `dataset`, `output`) since each\n\t\t// subgraph is a fresh namespace. Cleanup attaches to `raw`'s\n\t\t// deactivate hook so the segment is removed when JobFlow\n\t\t// unsubscribes after ack/nack (canonical \"last unsubscribe\"\n\t\t// signal via the existing NodeFnCleanup.onDeactivation protocol).\n\t\tconst claimId = job.id;\n\t\t// QA A7: only append a `_${seq}` suffix when this claimId has\n\t\t// already been mounted (collision case). Distinct claimIds\n\t\t// resolve to `eval/${claimId}` as before.\n\t\tconst seq = mountSeqByClaimId.get(claimId) ?? 0;\n\t\tmountSeqByClaimId.set(claimId, seq + 1);\n\t\tconst segmentSuffix = seq === 0 ? \"\" : `_${seq}`;\n\t\tconst segmentPath = `eval/${claimId}${segmentSuffix}`;\n\t\tconst sub = parentGraph != null ? new Graph(`eval_${claimId}${segmentSuffix}`) : null;\n\t\tconst candidatesName = sub != null ? \"candidates\" : `${name}/candidates`;\n\t\tconst datasetName = sub != null ? \"dataset\" : `${name}/dataset`;\n\t\tconst outputName = sub != null ? \"output\" : `${name}/output`;\n\t\tconst gateName = sub != null ? \"gate-out\" : `${name}/gate-out`;\n\n\t\tconst candidates = node<readonly T[]>([], {\n\t\t\tinitial: [artifact as T],\n\t\t\tname: candidatesName,\n\t\t});\n\t\tconst dataset = node<readonly DatasetItem[]>([], {\n\t\t\tinitial: config.datasetFor(item),\n\t\t\tname: datasetName,\n\t\t});\n\t\tif (sub != null) {\n\t\t\tsub.add(candidates, { name: \"candidates\" });\n\t\t\tsub.add(dataset, { name: \"dataset\" });\n\t\t}\n\t\tlet scoresNode!: ReturnType<Evaluator<T>>;\n\t\tbatch(() => {\n\t\t\tscoresNode = config.evaluator(candidates, dataset);\n\t\t});\n\t\t// DS-13.5.B QA A1 (2026-05-03): the deactivate cleanup hook MUST\n\t\t// be returned on every fn run, including the early-return path\n\t\t// where `arr == null` (evaluator emits a placeholder before\n\t\t// settling). Cleanup capture happens at the END of fn execution\n\t\t// (NodeFnCleanup contract), so a fn that returned early without\n\t\t// the cleanup object would leak `eval/${claimId}` if its first\n\t\t// run produced null and the consumer unsubscribed before\n\t\t// scoresNode emits non-null.\n\t\tconst cleanup =\n\t\t\tparentGraph != null\n\t\t\t\t? () => ({\n\t\t\t\t\t\tonDeactivation: () => {\n\t\t\t\t\t\t\t// Auto-unmount on JobFlow's pump unsubscribe after\n\t\t\t\t\t\t\t// ack/nack (DS-13.5.D.4). Idempotent: try/catch\n\t\t\t\t\t\t\t// covers the case where the segment was already\n\t\t\t\t\t\t\t// removed (e.g. parent destroy cascade ran first).\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tparentGraph.remove(segmentPath);\n\t\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t\t/* best-effort cleanup */\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: () => undefined;\n\t\tconst raw = node<HarnessJobPayload<T> | null>(\n\t\t\t[scoresNode as Node<unknown>],\n\t\t\t(batchData, actions, ctx) => {\n\t\t\t\tconst data = batchData.map((batch, i) =>\n\t\t\t\t\tbatch != null && batch.length > 0 ? batch.at(-1) : ctx.prevData[i],\n\t\t\t\t);\n\t\t\t\tconst arr = data[0] as readonly EvalResult[] | null | undefined;\n\t\t\t\tif (arr == null) {\n\t\t\t\t\tactions.emit(null);\n\t\t\t\t\treturn cleanup();\n\t\t\t\t}\n\t\t\t\tconst mean = meanScore(arr);\n\t\t\t\tconst passCount = arr.filter((s) => s.score >= threshold).length;\n\t\t\t\tactions.emit({\n\t\t\t\t\t...job.payload,\n\t\t\t\t\tverify: toOutput({\n\t\t\t\t\t\tscores: arr,\n\t\t\t\t\t\tmeanScore: mean,\n\t\t\t\t\t\tpassCount,\n\t\t\t\t\t\ttotal: arr.length,\n\t\t\t\t\t\tthreshold,\n\t\t\t\t\t}),\n\t\t\t\t});\n\t\t\t\treturn cleanup();\n\t\t\t},\n\t\t\t{ name: outputName, describeKind: \"derived\" },\n\t\t);\n\t\tconst gateOut = filter(raw, (v) => v != null, { name: gateName }) as ReturnType<\n\t\t\tHarnessVerifier<T>\n\t\t>;\n\t\tif (sub != null) {\n\t\t\tsub.add(raw, { name: \"output\" });\n\t\t\t// QA A6: register the gate-out filter on the per-claim\n\t\t\t// subgraph so describe() walks see the consumer-facing node\n\t\t\t// alongside candidates/dataset/output. Without this, the\n\t\t\t// returned filter floats and the subgraph's external surface\n\t\t\t// is incomplete in topology snapshots.\n\t\t\tsub.add(gateOut as Node<unknown>, { name: \"gate-out\" });\n\t\t\t(parentGraph as Graph).mount(segmentPath, sub);\n\t\t}\n\t\treturn gateOut;\n\t};\n}\n\n/**\n * Config for {@link harnessEvalPair} — the typed bundle that produces a\n * matched `refineExecutor<T>` + `evalVerifier<T>` pair sharing one\n * {@link Evaluator} and one `datasetFor` resolver.\n */\nexport interface HarnessEvalPairConfig<T> {\n\t/** Map a triaged item to the seed candidate. */\n\tseedFrom: (item: TriagedItem) => T;\n\t/** The reactive evaluator used by BOTH executor and verifier. */\n\tevaluator: Evaluator<T>;\n\t/** The refinement strategy (e.g. `errorCritique(teacher)`). */\n\tstrategy: RefineStrategy<T>;\n\t/** Resolve dataset rows per triaged item. */\n\tdatasetFor: (item: TriagedItem) => readonly DatasetItem[];\n\t/** Pass-threshold for the verifier. Default `0.5`. */\n\tthreshold?: number;\n\t/** Convergence / budget options forwarded to each inner `refineLoop`. */\n\trefine?: Omit<RefineLoopOptions, \"dataset\" | \"name\">;\n\t/**\n\t * Shared node-name prefix — the executor becomes `${name}-exec` and the\n\t * verifier `${name}-verify` for distinct but related describe() paths.\n\t * Default `\"harness-pair\"`.\n\t */\n\tname?: string;\n}\n\n/**\n * Typed factory that returns a matched `{ executor, verifier }` pair.\n *\n * Prevents the \"executor wrote `A`, verifier expected `B`\" class of runtime\n * cast errors — `T` is threaded through both sides, so mixing up the\n * configuration is a compile error instead of a silent `as T` in\n * `extractArtifact`. Shares the evaluator so EXECUTE and VERIFY score with\n * identical semantics (the whole point of `evalVerifier`).\n */\nexport function harnessEvalPair<T>(config: HarnessEvalPairConfig<T>): {\n\texecutor: HarnessExecutor<T>;\n\tverifier: HarnessVerifier<T>;\n} {\n\tconst baseName = config.name ?? \"harness-pair\";\n\tconst executor = refineExecutor<T>({\n\t\tname: `${baseName}-exec`,\n\t\tseedFrom: config.seedFrom,\n\t\tevaluator: config.evaluator,\n\t\tstrategy: config.strategy,\n\t\tdatasetFor: config.datasetFor,\n\t\trefine: config.refine,\n\t});\n\tconst verifier = evalVerifier<T>({\n\t\tname: `${baseName}-verify`,\n\t\tevaluator: config.evaluator,\n\t\tdatasetFor: config.datasetFor,\n\t\tthreshold: config.threshold,\n\t});\n\treturn { executor, verifier };\n}\n","/**\n * refineExecutor — bridge a `refineLoop` into the harness EXECUTE work fn.\n *\n * Each claimed job mounts a fresh `refineLoop`; when the loop reaches a\n * terminal status (`converged` / `budget` / `errored`), the work fn emits a\n * single {@link HarnessJobPayload} with `execution` filled in. The JobFlow\n * pump subscribes once, takes the first DATA, then unsubscribes — so the\n * inner loop tears down cleanly when the harness acks the job.\n *\n * **C2 lifecycle (Tier 6.5).** The work fn is invoked once per claim, so\n * no internal `switchMap` is needed (the prior pre-C2 shape used switchMap\n * to handle a stream of items). The pump owns the per-claim lifecycle:\n * activation when the work fn returns, teardown when the result Node is\n * unsubscribed.\n *\n * **Cross-item learning:** a fresh refineLoop per item means\n * `errorCritique`-style failure sampling does NOT accumulate across items\n * sharing a `rootCause`. A persistent-loop + re-seed surface is filed in\n * `docs/optimizations.md` as a long-term follow-up.\n *\n * @module\n */\n\nimport { node } from \"@graphrefly/pure-ts/core\";\nimport { filter } from \"@graphrefly/pure-ts/extra\";\nimport type {\n\tExecuteOutput,\n\tHarnessExecutor,\n\tHarnessJobPayload,\n\tTriagedItem,\n} from \"../../utils/harness/types.js\";\nimport type { JobEnvelope } from \"../../utils/job-queue/index.js\";\nimport {\n\ttype DatasetItem,\n\ttype Evaluator,\n\ttype RefineLoopOptions,\n\ttype RefineStatus,\n\ttype RefineStrategy,\n\trefineLoop,\n} from \"./refine-loop.js\";\n\n/** Terminal-run snapshot passed to a custom `toOutput` mapper. */\nexport interface RefineExecutorResult<T> {\n\t/** Best candidate the inner loop converged on. `null` if no candidates were scored. */\n\treadonly best: T | null;\n\t/** Aggregate score at termination. `-Infinity` if the batch was empty. */\n\treadonly score: number;\n\t/** Reason the loop terminated. */\n\treadonly status: RefineStatus;\n}\n\n/** Configuration for {@link refineExecutor}. */\nexport interface RefineExecutorConfig<T> {\n\t/** Map a triaged item to the seed candidate (e.g. a catalog entry, prompt, patch). */\n\tseedFrom: (item: TriagedItem) => T;\n\n\t/** Reactive evaluator — same shape as passed to `refineLoop`. */\n\tevaluator: Evaluator<T>;\n\n\t/** Strategy (e.g. `errorCritique(teacher)`). Applied to every item's inner loop. */\n\tstrategy: RefineStrategy<T>;\n\n\t/** Map a triaged item to the dataset rows the evaluator should score against. */\n\tdatasetFor: (item: TriagedItem) => readonly DatasetItem[];\n\n\t/**\n\t * Optional mapper from the inner loop's terminal snapshot to an\n\t * `ExecuteOutput<T>`. Default: converged→success, budget→partial,\n\t * errored→failure.\n\t */\n\ttoOutput?: (result: RefineExecutorResult<T>) => ExecuteOutput<T>;\n\n\t/** Convergence / budget options forwarded to each inner `refineLoop`. */\n\trefine?: Omit<RefineLoopOptions, \"dataset\" | \"name\">;\n\n\t/** Node name prefix for introspection. Default `\"refine-executor\"`. */\n\tname?: string;\n}\n\nfunction defaultToOutput<T>(result: RefineExecutorResult<T>): ExecuteOutput<T> {\n\tconst { best, score, status } = result;\n\tconst scoreStr = Number.isFinite(score) ? score.toFixed(3) : String(score);\n\tconst artifact = (best ?? undefined) as T | undefined;\n\tif (status === \"converged\") {\n\t\treturn {\n\t\t\toutcome: \"success\",\n\t\t\tdetail: `refineLoop converged at score ${scoreStr}`,\n\t\t\tartifact,\n\t\t};\n\t}\n\tif (status === \"budget\") {\n\t\treturn {\n\t\t\toutcome: \"partial\",\n\t\t\tdetail: `refineLoop hit budget at score ${scoreStr}`,\n\t\t\tartifact,\n\t\t};\n\t}\n\treturn {\n\t\toutcome: \"failure\",\n\t\tdetail: `refineLoop errored (status=${status})`,\n\t\tartifact,\n\t};\n}\n\n/**\n * Build a {@link HarnessExecutor} backed by a `refineLoop` per claimed\n * job.\n *\n * @example Eval-driven repair loop in the harness EXECUTE slot.\n * ```ts\n * const harness = harnessLoop(\"repair\", {\n * adapter,\n * executor: refineExecutor({\n * seedFrom: (item) => initialCatalogEntry(item),\n * datasetFor: (item) => pickAffectedTasks(item, allTasks),\n * evaluator: (cands, tasks) => runEvalBatch(cands, tasks),\n * strategy: errorCritique({ teacher, width: 3 }),\n * refine: { maxIterations: 5, minScore: 0.9 },\n * }),\n * });\n * ```\n */\nexport function refineExecutor<T>(config: RefineExecutorConfig<T>): HarnessExecutor<T> {\n\tconst name = config.name ?? \"refine-executor\";\n\tconst toOutput = config.toOutput ?? defaultToOutput<T>;\n\n\treturn (job: JobEnvelope<HarnessJobPayload<T>>) => {\n\t\tconst item = job.payload.item;\n\t\tconst loop = refineLoop<T>(config.seedFrom(item), config.evaluator, config.strategy, {\n\t\t\t...config.refine,\n\t\t\tdataset: config.datasetFor(item),\n\t\t\tname: `${name}/inner`,\n\t\t});\n\t\t// Terminal-allowlist guard — emit non-null only on `converged` / `budget` /\n\t\t// `errored`; intermediate `running` waves emit `null` (deduped via the\n\t\t// node's default Object.is). The trailing `filter(v != null)` strips\n\t\t// the null DATA so the JobFlow pump's first-DATA capture sees the\n\t\t// terminal payload, not the intermediate null.\n\t\tconst raw = node<HarnessJobPayload<T> | null>(\n\t\t\t[loop.status, loop.best, loop._score],\n\t\t\t(batchData, actions, ctx) => {\n\t\t\t\tconst data = batchData.map((batch, i) =>\n\t\t\t\t\tbatch != null && batch.length > 0 ? batch.at(-1) : ctx.prevData[i],\n\t\t\t\t);\n\t\t\t\tconst s = data[0] as RefineStatus;\n\t\t\t\tif (s !== \"converged\" && s !== \"budget\" && s !== \"errored\") {\n\t\t\t\t\tactions.emit(null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst exec = toOutput({\n\t\t\t\t\tbest: data[1] as T | null,\n\t\t\t\t\tscore: data[2] as number,\n\t\t\t\t\tstatus: s,\n\t\t\t\t});\n\t\t\t\tactions.emit({\n\t\t\t\t\t...job.payload,\n\t\t\t\t\texecution: { item, ...exec },\n\t\t\t\t});\n\t\t\t},\n\t\t\t{ name: `${name}/output`, describeKind: \"derived\" },\n\t\t);\n\t\treturn filter(raw, (v) => v != null, { name: `${name}/gate-out` }) as ReturnType<\n\t\t\tHarnessExecutor<T>\n\t\t>;\n\t};\n}\n","/**\n * `ownershipController()` — multi-agent subgraph ownership preset\n * (DS-14.5.A delta #8; L5/L6 + Q1–Q10).\n *\n * **Placement (documented choice).** Lives in `presets/harness/` alongside\n * the other multi-agent coordination presets (`spawnable()`, `actorPool()`).\n * Per the 4-layer rubric this is a ≥3-utils composition (messaging `topic` +\n * `derived` arbitration + Guard ABAC) wiring multi-agent coordination — the\n * same charter as `harness/`'s existing `spawnable`/`actorPool`. A separate\n * `presets/multi-agent/` directory was rejected to avoid fragmenting the\n * multi-agent presets across two folders for a single factory (L6: \"recipe +\n * preset, NO new primitive\").\n *\n * **What it is.** A `Graph` that owns a shared ownership `topic` (Q3 — one\n * topic carries claim / release / override; subscribers narrow by `kind`),\n * a reactive `current` derivation that folds the ownership log applying the\n * L0–L3 staircase, and a `guard` (`policyAllowing` — the Q7 reactive-options\n * Guard widening) the caller mounts on the owned subgraph. It **consumes the\n * existing DS-14 {@link OwnershipChange}** envelope — it does NOT redefine it.\n *\n * **Staircase (Q10 — `level` is a priority axis, NOT a mechanism enum):**\n * - **L1 TTL** — a `claim` carries a level; the controller's `ttl` (ms)\n * bounds the live window. L1 honors TTL strictly (Q4): a crash inside the\n * window does NOT early-release; recommend `ttl ≤ 60s`.\n * - **L2 heartbeat** — `heartbeat?: NodeInput<unknown>` (Q2). Any reactive\n * trigger Node; each emission resets the countdown (\"max tolerance since\n * last sign of life\", unified across L1/L2). No library timer is shipped\n * and no `claim.heartbeat()` method exists (`feedback_no_imperative` +\n * `feedback_no_imperative_wrap_as_primitive`).\n * - **L3 supervisor** — a `kind:\"override\"` change wins by `level` priority\n * regardless of expiry/heartbeat (priority axis independent of the expiry\n * axis). Supervisor publishes to the SAME topic (Q3).\n *\n * **No polling / no timer (spec §5.8/§5.9/§5.10).** Expiry is evaluated\n * reactively: `current` recomputes whenever the ownership topic OR the\n * heartbeat OR the optional `clock` trigger emits, folding the whole log\n * from scratch (idempotent — no carried mutable cursor). Auto-release on\n * wall-clock TTL requires the caller to wire a reactive `clock` tick\n * (`fromTimer({ ms })` or an activity-derived Node) — the library does not\n * own a timer (L6 / Q2). Without `clock`, expiry still resolves at the next\n * topic/heartbeat emission and on any read that recomputes the derivation.\n *\n * @module\n */\n\nimport { type Node, type NodeGuard, policyAllowing, wallClockNs } from \"@graphrefly/pure-ts/core\";\nimport type { NodeInput, OwnershipChange, OwnershipChangePayload } from \"@graphrefly/pure-ts/extra\";\nimport { fromAny } from \"@graphrefly/pure-ts/extra\";\nimport { Graph } from \"@graphrefly/pure-ts/graph\";\nimport { type TopicGraph, topic } from \"../../utils/messaging/index.js\";\n\n/** Ownership level — priority axis (Q10). Higher rank = higher priority. */\nconst LEVEL_RANK = { L0: 0, L1: 1, L2: 2, L3: 3 } as const;\ntype OwnershipLevel = keyof typeof LEVEL_RANK;\n\n/** Options for {@link ownershipController}. */\nexport type OwnershipControllerOptions = {\n\t/**\n\t * TTL (milliseconds) bounding the live window of a claim. Honored\n\t * strictly (Q4) — a crash inside the window does not early-release.\n\t * Recommend ≤ 60_000 for L1 holds; wire `heartbeat` (L2) for longer.\n\t */\n\treadonly ttl: number;\n\t/**\n\t * L2 heartbeat (Q2). Any reactive trigger Node — each emission resets the\n\t * TTL countdown. Simple: `fromTimer({ ms: ttl / 3 })`. Activity-based:\n\t * `derived([toolCalls.events], …)`. Omitted → pure L1 TTL semantics.\n\t */\n\treadonly heartbeat?: NodeInput<unknown>;\n\t/**\n\t * L3 supervisor id. A `kind:\"override\"` change whose `actor` equals this\n\t * id wins by `level` priority regardless of expiry/heartbeat. Override\n\t * delivery is the shared topic with the `kind:\"override\"` discriminant\n\t * (Q3) — not a separate priority topic.\n\t */\n\treadonly supervisor?: string;\n\t/**\n\t * Optional reactive clock trigger used ONLY to re-evaluate TTL expiry\n\t * (e.g. `fromTimer({ ms: 1_000 })`). The library ships no timer (L6/Q2);\n\t * wire this for wall-clock-driven auto-release without an intervening\n\t * claim/heartbeat. Without it, expiry resolves lazily on the next\n\t * topic/heartbeat emission.\n\t */\n\treadonly clock?: NodeInput<unknown>;\n\t/** Bounded retention for the ownership topic (default 256). */\n\treadonly retainedLimit?: number;\n};\n\n/**\n * Resolved ownership state emitted by {@link OwnershipControllerGraph.current}.\n * `owner` is `null` when unclaimed or the live claim has expired.\n */\nexport type OwnershipState = {\n\treadonly owner: string | null;\n\treadonly level: OwnershipLevel | null;\n\t/** Allow-set fed to the Guard. `[]` (deny-all) when `owner === null`. */\n\treadonly allowed: readonly string[];\n\t/**\n\t * Internal (F3/F4) — last sign-of-life (wall-clock ns) for the *current*\n\t * claim: `max(claim.sinceNs, last in-window heartbeat)`. Carried in the\n\t * derivation's OWN emitted state (read back via `ctx.prevData`) so the\n\t * fold is pure — same (folded log, beat-this-wave, now, prevState) →\n\t * same output. NEVER an instance field. `null` when unclaimed. Scoped to\n\t * the active claim: a value older than the active claim's `sinceNs` (a\n\t * prior owner's beat) is discarded so it cannot extend a new owner.\n\t */\n\treadonly signOfLifeNs: number | null;\n};\n\nconst EMPTY_STATE: OwnershipState = {\n\towner: null,\n\tlevel: null,\n\tallowed: [],\n\tsignOfLifeNs: null,\n};\n\ntype ActiveOwner = { owner: string; level: OwnershipLevel; sinceNs: number };\n\n/**\n * Multi-agent subgraph ownership controller. See module docs.\n *\n * Public surface:\n * - `topic` — the shared ownership `TopicGraph<OwnershipChange>` (Q3).\n * Agents publish claim/release/override here (use the `claim`/`release`/\n * `override` helpers — thin reactive wrappers over `topic.publish`, i.e.\n * message flow, NOT imperative triggers).\n * - `current` — `Node<OwnershipState>`: the reactively-resolved owner after\n * applying L1 TTL + L2 heartbeat + L3 supervisor arbitration.\n * - `allowed` — `Node<readonly string[]>`: the Guard allow-set (derived from\n * `current`); re-points on claim/release/override with no rewire.\n * - `guard` — `NodeGuard` from `policyAllowing(this.allowed)`. Mount on the\n * owned subgraph's nodes (`node({ guard })`) for the Q7 hard-block.\n */\nexport class OwnershipControllerGraph extends Graph {\n\treadonly topic: TopicGraph<OwnershipChange>;\n\treadonly current: Node<OwnershipState>;\n\treadonly allowed: Node<readonly string[]>;\n\treadonly guard: NodeGuard;\n\n\tprivate readonly _ttlNs: number;\n\tprivate readonly _supervisor: string | undefined;\n\t/**\n\t * Whether a heartbeat `NodeInput` was supplied at construction (F14 —\n\t * `claim()`'s `level` default is `\"L2\"` when wired, else `\"L1\"`). NOT a\n\t * mutable accumulator — set once in the constructor, read-only after.\n\t */\n\tprivate readonly _hasHeartbeat: boolean;\n\n\tconstructor(name: string, opts: OwnershipControllerOptions) {\n\t\tsuper(name);\n\t\tthis._ttlNs = Math.max(0, opts.ttl) * 1_000_000;\n\t\tthis._supervisor = opts.supervisor;\n\t\tthis._hasHeartbeat = opts.heartbeat != null;\n\n\t\tthis.topic = topic<OwnershipChange>(`${name}__ownership`, {\n\t\t\tretainedLimit: opts.retainedLimit ?? 256,\n\t\t});\n\t\t// The topic is its own TopicGraph; tear it down with this controller.\n\t\t// (Not mounted — `topic.events` already belongs to the TopicGraph; a\n\t\t// re-`add` would violate single-graph node ownership. Consumers\n\t\t// inspect ownership via `current` / `allowed`, not via a mount.)\n\t\tthis.addDisposer(() => {\n\t\t\tthis.topic.destroy();\n\t\t});\n\n\t\t// `current` recomputes whenever the ownership stream changes, the\n\t\t// heartbeat fires, or the optional clock ticks — the only sources\n\t\t// that can change the resolved owner. ALL deps wired BEFORE any claim\n\t\t// can be published (observers before emitters — §47 rule 2).\n\t\tconst deps: Node<unknown>[] = [this.topic.events as Node<unknown>];\n\t\tconst heartbeatIdx = opts.heartbeat != null ? deps.push(fromAny(opts.heartbeat)) - 1 : -1;\n\t\tif (opts.clock != null) deps.push(fromAny(opts.clock) as Node<unknown>);\n\n\t\tthis.current = this.derived<OwnershipState>(\n\t\t\t\"currentOwner\",\n\t\t\tdeps,\n\t\t\t(batchData, ctx) => {\n\t\t\t\t// Wall-clock (F2) — must match `makeChange`'s `t_ns` stamp so\n\t\t\t\t// `nowNs - active.sinceNs` compares like-for-like. Mixing\n\t\t\t\t// monotonic + wall clocks (the prior bug) made TTL math\n\t\t\t\t// nonsense once the two clocks diverged.\n\t\t\t\tconst nowNs = wallClockNs();\n\t\t\t\t// Did the heartbeat dep emit this wave? `batchData[i]` is the\n\t\t\t\t// array of values dep `i` emitted THIS wave; a non-empty\n\t\t\t\t// heartbeat batch is one or more beats.\n\t\t\t\tconst beatThisWave =\n\t\t\t\t\theartbeatIdx >= 0 &&\n\t\t\t\t\t(() => {\n\t\t\t\t\t\tconst hb = batchData[heartbeatIdx] as readonly unknown[] | null | undefined;\n\t\t\t\t\t\treturn hb != null && hb.length > 0;\n\t\t\t\t\t})();\n\n\t\t\t\t// Fold the WHOLE ownership log from scratch (idempotent — the\n\t\t\t\t// topic emits the full retained array, so a cursor would be a\n\t\t\t\t// bug surface; pure reduction is correct and simple, §47).\n\t\t\t\t// `batchData[0]` is `(readonly OwnershipChange[])[]` — the\n\t\t\t\t// snapshots emitted this wave; take the latest (mirrors\n\t\t\t\t// `topic.latest`'s `batch.at(-1)` pattern). On a SENTINEL\n\t\t\t\t// first-activation wave fall back to `ctx.prevData[0]`.\n\t\t\t\tconst topoBatch = batchData[0] as\n\t\t\t\t\t| readonly (readonly OwnershipChange[])[]\n\t\t\t\t\t| null\n\t\t\t\t\t| undefined;\n\t\t\t\tconst log = (\n\t\t\t\t\ttopoBatch != null && topoBatch.length > 0\n\t\t\t\t\t\t? topoBatch[topoBatch.length - 1]\n\t\t\t\t\t\t: (ctx.prevData[0] as readonly OwnershipChange[] | undefined)\n\t\t\t\t) as readonly OwnershipChange[] | undefined;\n\t\t\t\tlet active: ActiveOwner | null = null;\n\t\t\t\tif (log != null) {\n\t\t\t\t\tfor (const ch of log) {\n\t\t\t\t\t\tif (ch?.change == null) continue;\n\t\t\t\t\t\tactive = applyChange(active, ch, this._supervisor);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// F3/F4 — PURE sign-of-life. Read the prior `signOfLifeNs`\n\t\t\t\t// from THIS derivation's own previously-emitted state\n\t\t\t\t// (`ctx.prevData[0]` for the `current` node is unavailable —\n\t\t\t\t// `prevData[0]` is the topic dep — so we read `ctx.cache`,\n\t\t\t\t// the node's own last emit). No instance field anywhere.\n\t\t\t\tconst prevState = (ctx.cache ?? undefined) as OwnershipState | undefined;\n\n\t\t\t\tlet nextActive: ActiveOwner | null = active;\n\t\t\t\tlet signOfLifeNs: number | null = null;\n\n\t\t\t\tif (active != null && this._ttlNs > 0) {\n\t\t\t\t\t// Carry the prior sign-of-life ONLY if it belongs to THIS\n\t\t\t\t\t// claim (>= the active claim's `sinceNs`). A value from a\n\t\t\t\t\t// prior owner (older than `sinceNs`) is discarded so a\n\t\t\t\t\t// stale beat cannot extend a freshly-claimed window. A new\n\t\t\t\t\t// owner therefore starts from its own claim time.\n\t\t\t\t\tconst carried =\n\t\t\t\t\t\tprevState?.signOfLifeNs != null && prevState.signOfLifeNs >= active.sinceNs\n\t\t\t\t\t\t\t? prevState.signOfLifeNs\n\t\t\t\t\t\t\t: active.sinceNs;\n\t\t\t\t\t// Expire FIRST against the carried sign-of-life (Q4 strict —\n\t\t\t\t\t// a late beat must NOT resurrect an already-lapsed claim),\n\t\t\t\t\t// THEN accept a still-timely beat THIS wave. `signOfLifeNs`\n\t\t\t\t\t// only ever advances on an actual beat-this-wave, so a\n\t\t\t\t\t// recompute storm with no beat cannot renew a dead claim\n\t\t\t\t\t// (idempotent re-fold).\n\t\t\t\t\tconst lapsed = nowNs - carried >= this._ttlNs;\n\t\t\t\t\tif (lapsed) {\n\t\t\t\t\t\tnextActive = null;\n\t\t\t\t\t\tsignOfLifeNs = null;\n\t\t\t\t\t} else if (beatThisWave) {\n\t\t\t\t\t\tsignOfLifeNs = nowNs; // timely beat → renew\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsignOfLifeNs = carried; // unchanged — carry forward\n\t\t\t\t\t}\n\t\t\t\t} else if (active != null) {\n\t\t\t\t\t// No TTL configured — never expires; sign-of-life still\n\t\t\t\t\t// tracked (owner-scoped) for completeness/observability.\n\t\t\t\t\tconst carried =\n\t\t\t\t\t\tprevState?.signOfLifeNs != null && prevState.signOfLifeNs >= active.sinceNs\n\t\t\t\t\t\t\t? prevState.signOfLifeNs\n\t\t\t\t\t\t\t: active.sinceNs;\n\t\t\t\t\tsignOfLifeNs = beatThisWave ? nowNs : carried;\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\tnextActive == null\n\t\t\t\t\t\t? EMPTY_STATE\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\towner: nextActive.owner,\n\t\t\t\t\t\t\t\tlevel: nextActive.level,\n\t\t\t\t\t\t\t\tallowed: [nextActive.owner],\n\t\t\t\t\t\t\t\tsignOfLifeNs,\n\t\t\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t},\n\t\t\t{ keepAlive: true },\n\t\t);\n\n\t\tthis.allowed = this.derived<readonly string[]>(\n\t\t\t\"allowed\",\n\t\t\t[this.current],\n\t\t\t(batchData, ctx) => {\n\t\t\t\tconst batch = batchData[0] as readonly OwnershipState[] | null | undefined;\n\t\t\t\tconst s = (batch != null && batch.length > 0 ? batch[batch.length - 1] : ctx.prevData[0]) as\n\t\t\t\t\t| OwnershipState\n\t\t\t\t\t| undefined;\n\t\t\t\treturn [s?.allowed ?? []];\n\t\t\t},\n\t\t\t{ keepAlive: true },\n\t\t);\n\t\t// F12 — `keepAlive: true` above already installs a self-pruning\n\t\t// keepalive subscription (same as `current`); a second\n\t\t// `keepalive(this.allowed)` disposer was redundant double-subscription.\n\n\t\t// Q7 — the reactive-options Guard. `policyAllowing` reads\n\t\t// `this.allowed.cache` synchronously at write-check time, so\n\t\t// claim/release/override re-point the allow-set with NO rewire.\n\t\tthis.guard = policyAllowing(this.allowed);\n\t}\n\n\t/**\n\t * Publish a `claim`. Thin reactive wrapper over `topic.publish` (message\n\t * flow per §29 — NOT an imperative trigger). `level` defaults to `\"L2\"`\n\t * when this controller has a heartbeat wired, else `\"L1\"`.\n\t */\n\tclaim(actor: string, level?: OwnershipLevel): void {\n\t\t// F14 — documented default (JSDoc + §47): L2 when a heartbeat\n\t\t// NodeInput was wired at construction, else L1.\n\t\tconst lvl = level ?? (this._hasHeartbeat ? \"L2\" : \"L1\");\n\t\tthis.topic.publish(makeChange({ kind: \"claim\", subgraphId: this.name, actor, level: lvl }));\n\t}\n\n\t/** Publish a `release`. Clears ownership iff `actor` is the current owner. */\n\trelease(actor: string): void {\n\t\tthis.topic.publish(makeChange({ kind: \"release\", subgraphId: this.name, actor }));\n\t}\n\n\t/**\n\t * Publish a supervisor `override` (L3). Wins by `level` priority\n\t * regardless of expiry (Q10). `actor` should be this controller's\n\t * `supervisor` id for the override to take precedence.\n\t */\n\toverride(actor: string, previousActor: string, reason: string): void {\n\t\tthis.topic.publish(\n\t\t\tmakeChange({ kind: \"override\", subgraphId: this.name, actor, previousActor, reason }),\n\t\t);\n\t}\n}\n\n/** Wrap an {@link OwnershipChangePayload} in the DS-14 {@link OwnershipChange} envelope. */\nfunction makeChange(payload: OwnershipChangePayload): OwnershipChange {\n\t// F2 — `BaseChange.t_ns` is contractually wall-clock (`wallClockNs()`,\n\t// see change.ts). The fold compares `nowNs (wallClockNs)` against\n\t// `ch.t_ns` for TTL/expiry, so stamp + compare MUST use the same clock.\n\tconst t = wallClockNs();\n\treturn { structure: \"ownership\", version: t, t_ns: t, lifecycle: \"ownership\", change: payload };\n}\n\n/**\n * Fold one ownership change into the resolved-owner state.\n *\n * - `claim` — sets the active owner (records claim time for L1 TTL). A\n * lower-priority claim cannot displace a higher-`level` live owner (Q10 —\n * override arbitration is pure level comparison).\n * - `release` — clears ownership iff the releasing actor is the owner.\n * - `override` — supervisor override: wins by `level` priority. Carries\n * `previousActor` + `reason` per DS-14 (Q3); modeled as an L3 hand-off to\n * `p.actor`.\n */\nfunction applyChange(\n\tactive: ActiveOwner | null,\n\tch: OwnershipChange,\n\tsupervisor: string | undefined,\n): ActiveOwner | null {\n\tconst p = ch.change;\n\t// Use the change's publish timestamp (`t_ns` — wall-clock, stamped in\n\t// `makeChange`) as the claim time — NOT the fold time. The log is re-folded\n\t// from scratch on every recompute (§47), so stamping a fresh clock read\n\t// here would re-baseline the TTL window every recompute and the claim would\n\t// never expire. The fold compares against `wallClockNs()` (F2 — same clock).\n\tif (p.kind === \"claim\") {\n\t\tif (active != null && LEVEL_RANK[active.level] > LEVEL_RANK[p.level]) return active;\n\t\treturn { owner: p.actor, level: p.level, sinceNs: ch.t_ns };\n\t}\n\tif (p.kind === \"release\") {\n\t\tif (active != null && active.owner === p.actor) return null;\n\t\treturn active;\n\t}\n\t// override (F5) — a `kind:\"override\"` only seizes ownership when the\n\t// publishing actor IS the configured supervisor. The prior disjunction\n\t// `|| LEVEL_RANK.L3 >= LEVEL_RANK[active.level]` was a tautology (L3 is the\n\t// max rank ⇒ always true), so ANY actor's override took over. If no\n\t// supervisor is configured, overrides are explicitly disabled (a non-null\n\t// `supervisor` is the gate, not an accidental fall-through).\n\tconst isSupervisor = supervisor != null && p.actor === supervisor;\n\tif (isSupervisor) {\n\t\treturn { owner: p.actor, level: \"L3\", sinceNs: ch.t_ns };\n\t}\n\treturn active;\n}\n\n/**\n * Create a multi-agent subgraph ownership controller (DS-14.5.A #8).\n *\n * @example\n * ```ts\n * const oc = ownershipController(\"payments\", { ttl: 30_000, supervisor: \"lead\" });\n * // Mount the Guard on the owned subgraph:\n * const n = node([], { initial: 0, guard: oc.guard });\n * oc.claim(\"agent-a\"); // agent-a now owns; non-owner writes throw\n * oc.override(\"lead\", \"agent-a\", \"rebalance\"); // supervisor takes over\n * ```\n */\nexport function ownershipController(\n\tname: string,\n\topts: OwnershipControllerOptions,\n): OwnershipControllerGraph {\n\treturn new OwnershipControllerGraph(name, opts);\n}\n","/**\n * Harness-specific graph profiling (roadmap §9.0).\n *\n * Extends {@link graphProfile} with harness domain counters:\n * queue depths, strategy entries, retry/reingestion tracker sizes.\n *\n * @module\n */\n\nimport {\n\ttype GraphProfileOptions,\n\ttype GraphProfileResult,\n\tgraphProfile,\n} from \"@graphrefly/pure-ts/graph\";\nimport { QUEUE_NAMES } from \"../../utils/harness/defaults.js\";\nimport type { QueueRoute, TriagedItem } from \"../../utils/harness/types.js\";\nimport type { HarnessGraph } from \"./harness-loop.js\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/** Harness-specific profile extending the base graph profile. */\nexport interface HarnessProfileResult extends GraphProfileResult {\n\t/** Per-queue retained item counts. */\n\tqueueDepths: Record<QueueRoute, number>;\n\t/** Number of rootCause→intervention entries in the strategy model. */\n\tstrategyEntries: number;\n\t/** Global retry count across all items. */\n\ttotalRetries: number;\n\t/** Global reingestion count across all items. */\n\ttotalReingestions: number;\n}\n\n// ---------------------------------------------------------------------------\n// Implementation\n// ---------------------------------------------------------------------------\n\n/**\n * Profile a harness graph with domain-specific counters.\n *\n * **Snapshot caveat (Unit 22 B).** Reads `.cache` values from the\n * strategy / retry / reingestion nodes + each queue topic's `.retained()`\n * view. These are point-in-time reads and are not transactional — if you\n * invoke this during an in-flight reactive wave the values may reflect\n * a partially-settled frame. For end-of-wave accuracy, call from outside\n * any batch boundary.\n *\n * @param harness - The HarnessGraph to profile.\n * @param opts - Optional base profile options.\n * @returns Harness profile with queue depths, strategy stats, and tracker sizes.\n */\nexport function harnessProfile(\n\tharness: HarnessGraph,\n\topts?: GraphProfileOptions,\n): HarnessProfileResult {\n\tconst base = graphProfile(harness, opts);\n\n\t// Unit 22 B: iterate the hub's topic registry instead of a raw Map so\n\t// queue topics added post-construction (dead-letter `__unrouted`, etc.)\n\t// don't get silently ignored.\n\tconst queueDepths: Record<string, number> = {};\n\tfor (const route of QUEUE_NAMES) {\n\t\tconst t = harness.queues.has(route) ? harness.queues.topic<TriagedItem>(route) : null;\n\t\tqueueDepths[route] = t?.retained().length ?? 0;\n\t}\n\n\treturn {\n\t\t...base,\n\t\tqueueDepths: queueDepths as Record<QueueRoute, number>,\n\t\tstrategyEntries: harness.strategy.entries.cache?.size ?? 0,\n\t\ttotalRetries: harness.totalRetries.cache ?? 0,\n\t\ttotalReingestions: harness.totalReingestions.cache ?? 0,\n\t};\n}\n","/**\n * Harness pipeline trace — thin sugar over `graph.observe({ format: \"stage-log\" })`.\n *\n * Since 2026-04-22 (D2), stage-labeled tracing is a first-class observe format\n * on {@link Graph}. `harnessTrace` wires that format over the 7 pipeline stages\n * (INTAKE → TRIAGE → QUEUE → GATE → EXECUTE → VERIFY → STRATEGY) with sensible\n * defaults so harness consumers don't need to restate the stage map.\n *\n * For non-harness graphs, call `graph.observe({ format: \"stage-log\", stageLabels })`\n * directly — the format is domain-agnostic.\n *\n * @module\n */\n\nimport { monotonicNs } from \"@graphrefly/pure-ts/core\";\nimport type { ObserveEvent, ObserveResult } from \"@graphrefly/pure-ts/graph\";\nimport type { HarnessGraph } from \"./harness-loop.js\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/** Event type captured by structured trace. */\nexport type TraceEventType = \"data\" | \"error\" | \"complete\";\n\n/** A single structured trace event. */\nexport interface TraceEvent {\n\t/** Elapsed seconds since trace was created. */\n\telapsed: number;\n\t/** Pipeline stage label (INTAKE, TRIAGE, QUEUE, GATE, EXECUTE, VERIFY, STRATEGY). */\n\tstage: string;\n\t/** Event type. */\n\ttype: TraceEventType;\n\t/** Data payload (present for \"data\" and \"error\" events). Omitted at \"summary\" detail. */\n\tdata?: unknown;\n\t/** Human-readable summary of the data. Present at \"standard\" and \"full\" detail. */\n\tsummary?: string;\n}\n\n/** Detail level for trace output. */\nexport type TraceDetail =\n\t/** Stage + elapsed only. No data preview. Lowest overhead. */\n\t| \"summary\"\n\t/** Stage + elapsed + truncated data preview. Default. */\n\t| \"standard\"\n\t/** Stage + elapsed + full raw data. Use for debugging, not production. */\n\t| \"full\";\n\n/** Handle returned by {@link harnessTrace}. Call `dispose()` to stop tracing. */\nexport interface HarnessTraceHandle {\n\t/** Stop tracing and detach all observers. Safe to call multiple times. */\n\tdispose(): void;\n\t/**\n\t * Structured trace events collected since creation. Plain array — no\n\t * subscription needed (COMPOSITION-GUIDE §1: avoid lazy-activation\n\t * friction for inspection tools). Populated reactively via observe().\n\t */\n\treadonly events: readonly TraceEvent[];\n}\n\n/** Options for {@link harnessTrace}. */\nexport interface HarnessTraceOptions {\n\t/** Sink for rendered trace lines. Default: `console.log`. Pass `null` for structured-only. */\n\tlogger?: ((line: string) => void) | null;\n\t/** Detail level for both string and structured output. Default: `\"summary\"`. */\n\tdetail?: TraceDetail;\n}\n\n// ---------------------------------------------------------------------------\n// Stage labels\n// ---------------------------------------------------------------------------\n\n/**\n * Observe paths → stage labels for the 7 harness stages. Path set is\n * sourced from {@link HarnessGraph.stageNodes} so inspection tools stay\n * decoupled from mount-structure changes (Unit 22 C).\n */\nfunction buildStageLabels(harness: HarnessGraph): Record<string, string> {\n\tconst labels: Record<string, string> = {};\n\tfor (const { label, paths } of harness.stageNodes()) {\n\t\tfor (const p of paths) labels[p] = label;\n\t}\n\treturn labels;\n}\n\n// ---------------------------------------------------------------------------\n// Implementation\n// ---------------------------------------------------------------------------\n\n/**\n * Attach a stage-log trace over the harness pipeline. Delegates to\n * `harness.observe({ format: \"stage-log\", ... })` for each stage path —\n * every event is captured in `handle.events` (structured) AND rendered via\n * the `logger` (string output).\n *\n * **Detail levels:**\n * - `\"summary\"` — stage + elapsed only. Minimal overhead.\n * - `\"standard\"` (default) — stage + elapsed + truncated data preview.\n * - `\"full\"` — stage + elapsed + full raw data object in events.\n *\n * Elapsed timestamps are relative to the `harnessTrace()` invocation time,\n * not the first event.\n */\nexport function harnessTrace(\n\tharness: HarnessGraph,\n\topts?: HarnessTraceOptions,\n): HarnessTraceHandle {\n\tconst logger: ((line: string) => void) | null =\n\t\topts?.logger === null ? null : (opts?.logger ?? console.log);\n\tconst detail: TraceDetail = opts?.detail ?? \"summary\";\n\tconst startNs = monotonicNs();\n\tconst observations: ObserveResult[] = [];\n\tconst events: TraceEvent[] = [];\n\tconst stageLabels = buildStageLabels(harness);\n\n\tfunction elapsedSecs(): number {\n\t\treturn (monotonicNs() - startNs) / 1e9;\n\t}\n\n\tfunction recordEvent(stage: string, type: TraceEventType, rawData: unknown): void {\n\t\tconst ev: TraceEvent = { elapsed: elapsedSecs(), stage, type };\n\t\tif (detail !== \"summary\") ev.summary = summarize(rawData);\n\t\tif (detail === \"full\") ev.data = rawData;\n\t\tevents.push(ev);\n\t}\n\n\t// One observe call per path — keeps per-stage elapsed offsets anchored to\n\t// this invocation (the shared stage-log format uses its own elapsed clock\n\t// per observation, which matches the legacy behavior). We also intercept\n\t// each event through `onEvent` so structured `events[]` stays populated\n\t// regardless of `logger`.\n\tfor (const [path, stage] of Object.entries(stageLabels)) {\n\t\ttry {\n\t\t\tconst obs = harness.observe(path, {\n\t\t\t\tformat: \"stage-log\",\n\t\t\t\tstageLabels,\n\t\t\t\tlogger: logger ? (line: string) => logger(line) : () => {},\n\t\t\t\tincludeTypes: [\"data\", \"error\", \"complete\"],\n\t\t\t});\n\t\t\tobs.onEvent((event: ObserveEvent) => {\n\t\t\t\tif (event.type === \"data\") recordEvent(stage, \"data\", (event as { data: unknown }).data);\n\t\t\t\telse if (event.type === \"error\")\n\t\t\t\t\trecordEvent(stage, \"error\", (event as { data: unknown }).data);\n\t\t\t\telse if (event.type === \"complete\") recordEvent(stage, \"complete\", undefined);\n\t\t\t});\n\t\t\tobservations.push(obs);\n\t\t} catch (err) {\n\t\t\t// Node may not exist yet (e.g., a gated-queue route that hasn't been\n\t\t\t// mounted on this harness). Record a synthetic error trace event so\n\t\t\t// consumers see WHICH stage dropped out and why — silent swallow\n\t\t\t// breaks dry-run equivalence (a regression in stage wiring would\n\t\t\t// not surface in the trace).\n\t\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\t\trecordEvent(stage, \"error\", `observe-unavailable: ${path} — ${msg}`);\n\t\t\tif (logger) {\n\t\t\t\tlogger(`[${elapsedSecs().toFixed(3)}s] ${stage.padEnd(9)} ✗ observe-unavailable: ${msg}`);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tget events(): readonly TraceEvent[] {\n\t\t\treturn events;\n\t\t},\n\t\tdispose() {\n\t\t\tfor (const obs of observations) obs.dispose();\n\t\t\tobservations.length = 0;\n\t\t},\n\t};\n}\n\n// ---------------------------------------------------------------------------\n// Helpers — kept here because `observe({ format: \"stage-log\" })` emits short\n// one-line previews; the structured `events[]` is free to carry richer\n// summaries with different truncation bounds (120 for JSON, 80 for strings).\n// ---------------------------------------------------------------------------\n\nfunction summarize(value: unknown): string {\n\tif (value == null) return \"null\";\n\tif (typeof value === \"string\") return truncate(value, 80);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n\tif (typeof value === \"bigint\") return String(value);\n\ttry {\n\t\tconst json = JSON.stringify(value);\n\t\treturn truncate(json, 120);\n\t} catch {\n\t\treturn String(value);\n\t}\n}\n\nfunction truncate(s: string, max: number): string {\n\treturn s.length > max ? `${s.slice(0, max - 1)}…` : s;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,SAAoB,YAAY;AAChC,SAAiC,mBAAmB;AACpD,SAAS,aAAa;AAqEtB,IAAI,gBAAgB;AAEb,SAAS,UACf,QACA,OAA4B,CAAC,GACR;AAGrB,QAAM,OAAO,KAAK,QAAQ,aAAa,EAAE,aAAa;AACtD,QAAM,QAAQ,IAAI,MAAM,IAAI;AAC5B,SAAO,MAAM,MAAM,KAAK;AACxB,QAAM,WAAW,KAAK,YAAY,OAAO;AAEzC,MAAI,YAAY;AAEhB,QAAM,cAAc,oBAAI,IAAoB;AAE5C,QAAM,cAAc,kBAAqB,OAAO;AAAA,IAC/C,OAAO,KAAK,gBAAgB;AAAA,IAC5B,aAAa,KAAK;AAAA,IAClB,MAAM,GAAG,IAAI;AAAA,EACd,CAAC;AACD,QAAM,QAAiC,YAAkB,QAAW,EAAE,MAAM,GAAG,IAAI,SAAS,CAAC;AAI7F,QAAM,WAAW,oBAAI,IAAyB;AAC9C,QAAM,SAAS,KAAuC,CAAC,GAAG;AAAA,IACzD,MAAM,GAAG,IAAI;AAAA,IACb,SAAS,oBAAI,IAAI;AAAA,EAClB,CAAC;AACD,WAAS,aAAmB;AAC3B,WAAO,KAAK,IAAI,IAAI,QAAQ,CAAC;AAAA,EAC9B;AAEA,WAAS,YAAY,MAAoC;AACxD,UAAM,QAAQ,KAAK,SAAS;AAC5B,QAAI,QAAQ,UAAU;AACrB,YAAM,IAAI,WAAW,oBAAoB,KAAK,qBAAqB,QAAQ,EAAE;AAAA,IAC9E;AACA,UAAM,KAAK,KAAK,MAAM,SAAS,EAAE,SAAS;AAE1C,UAAM,UAAU,kBAAkB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