@graphrefly/graphrefly 0.47.1 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/composition/index.cjs +28 -19
- package/dist/base/composition/index.cjs.map +1 -1
- package/dist/base/composition/index.d.cts +14 -5
- package/dist/base/composition/index.d.ts +14 -5
- package/dist/base/composition/index.js +9 -9
- package/dist/base/index.cjs +294 -164
- package/dist/base/index.cjs.map +1 -1
- package/dist/base/index.d.cts +2 -2
- package/dist/base/index.d.ts +2 -2
- package/dist/base/index.js +77 -72
- package/dist/base/io/index.cjs +145 -85
- package/dist/base/io/index.cjs.map +1 -1
- package/dist/base/io/index.d.cts +32 -5
- package/dist/base/io/index.d.ts +32 -5
- package/dist/base/io/index.js +5 -5
- package/dist/base/mutation/index.cjs +21 -0
- package/dist/base/mutation/index.cjs.map +1 -1
- package/dist/base/mutation/index.d.cts +23 -1
- package/dist/base/mutation/index.d.ts +23 -1
- package/dist/base/mutation/index.js +3 -1
- package/dist/base/sources/browser/index.cjs +18 -12
- package/dist/base/sources/browser/index.cjs.map +1 -1
- package/dist/base/sources/browser/index.d.cts +20 -2
- package/dist/base/sources/browser/index.d.ts +20 -2
- package/dist/base/sources/browser/index.js +18 -12
- package/dist/base/sources/browser/index.js.map +1 -1
- package/dist/base/sources/event/index.cjs +29 -1
- package/dist/base/sources/event/index.cjs.map +1 -1
- package/dist/base/sources/event/index.d.cts +67 -3
- package/dist/base/sources/event/index.d.ts +67 -3
- package/dist/base/sources/event/index.js +5 -2
- package/dist/base/sources/index.cjs +96 -50
- package/dist/base/sources/index.cjs.map +1 -1
- package/dist/base/sources/index.d.cts +1 -1
- package/dist/base/sources/index.d.ts +1 -1
- package/dist/base/sources/index.js +7 -4
- package/dist/base/sources/node/index.cjs +43 -37
- package/dist/base/sources/node/index.cjs.map +1 -1
- package/dist/base/sources/node/index.js +43 -37
- package/dist/base/sources/node/index.js.map +1 -1
- package/dist/{chunk-J5WFUEO4.js → chunk-23MAWVOJ.js} +3 -3
- package/dist/{chunk-YXCPV26R.js → chunk-3REMCHSS.js} +39 -27
- package/dist/chunk-3REMCHSS.js.map +1 -0
- package/dist/{chunk-CEVNQ74M.js → chunk-3YGXPUHW.js} +2 -2
- package/dist/{chunk-CEVNQ74M.js.map → chunk-3YGXPUHW.js.map} +1 -1
- package/dist/{chunk-EVYY4X5A.js → chunk-46X2EFQH.js} +16 -5
- package/dist/chunk-46X2EFQH.js.map +1 -0
- package/dist/{chunk-NY2PYHNC.js → chunk-5UY3PNFY.js} +12 -5
- package/dist/chunk-5UY3PNFY.js.map +1 -0
- package/dist/{chunk-RGMTUZCL.js → chunk-65OM4XLQ.js} +50 -4
- package/dist/chunk-65OM4XLQ.js.map +1 -0
- package/dist/{chunk-3PSLNJDU.js → chunk-6DQYBIHW.js} +314 -49
- package/dist/chunk-6DQYBIHW.js.map +1 -0
- package/dist/{chunk-LDCSZ72P.js → chunk-6YBER5UP.js} +3 -3
- package/dist/{chunk-LDCSZ72P.js.map → chunk-6YBER5UP.js.map} +1 -1
- package/dist/{chunk-7EGRP2VX.js → chunk-7BULJTL6.js} +2 -2
- package/dist/{chunk-7EGRP2VX.js.map → chunk-7BULJTL6.js.map} +1 -1
- package/dist/{chunk-VLAGJZSL.js → chunk-7T7WLEPM.js} +25 -4
- package/dist/chunk-7T7WLEPM.js.map +1 -0
- package/dist/{chunk-PKPO3JTZ.js → chunk-AQAKDE7F.js} +29 -11
- package/dist/chunk-AQAKDE7F.js.map +1 -0
- package/dist/{chunk-2OB3CEJS.js → chunk-B5Y5GPD5.js} +2 -2
- package/dist/{chunk-BXGZFGZ4.js → chunk-C5QD5DQX.js} +22 -1
- package/dist/chunk-C5QD5DQX.js.map +1 -0
- package/dist/{chunk-4XCHZRUJ.js → chunk-D5YGR4TP.js} +58 -7
- package/dist/chunk-D5YGR4TP.js.map +1 -0
- package/dist/{chunk-NPRP3MCV.js → chunk-DHDCOOJU.js} +2 -2
- package/dist/chunk-DHDCOOJU.js.map +1 -0
- package/dist/{chunk-MTTRCEJT.js → chunk-DVTDF5OI.js} +2 -2
- package/dist/{chunk-SOOKUYVM.js → chunk-F7EKHR32.js} +13 -9
- package/dist/chunk-F7EKHR32.js.map +1 -0
- package/dist/{chunk-A7KV5UK4.js → chunk-G7H6PN7P.js} +2 -2
- package/dist/{chunk-OCUDSN63.js → chunk-GGKHHG5Y.js} +110 -64
- package/dist/chunk-GGKHHG5Y.js.map +1 -0
- package/dist/{chunk-RAGGHLCV.js → chunk-GUNIRPEJ.js} +8 -6
- package/dist/{chunk-RAGGHLCV.js.map → chunk-GUNIRPEJ.js.map} +1 -1
- package/dist/{chunk-YJ4U2D2C.js → chunk-J5TBZFBD.js} +9 -7
- package/dist/chunk-J5TBZFBD.js.map +1 -0
- package/dist/{chunk-Y52CS6YA.js → chunk-JA67ZQG2.js} +2 -2
- package/dist/{chunk-Y52CS6YA.js.map → chunk-JA67ZQG2.js.map} +1 -1
- package/dist/{chunk-U225SKB4.js → chunk-K4ZYJ4EM.js} +569 -424
- package/dist/chunk-K4ZYJ4EM.js.map +1 -0
- package/dist/{chunk-Z4YXAUDN.js → chunk-KUFXLAEY.js} +11 -7
- package/dist/{chunk-Z4YXAUDN.js.map → chunk-KUFXLAEY.js.map} +1 -1
- package/dist/{chunk-IHTWQEDR.js → chunk-LTSI7ULC.js} +3 -3
- package/dist/{chunk-IHTWQEDR.js.map → chunk-LTSI7ULC.js.map} +1 -1
- package/dist/{chunk-DKNHAICT.js → chunk-MMHGYX44.js} +25 -9
- package/dist/chunk-MMHGYX44.js.map +1 -0
- package/dist/{chunk-K7PDZYQE.js → chunk-MQMTRKY3.js} +129 -50
- package/dist/chunk-MQMTRKY3.js.map +1 -0
- package/dist/{chunk-42FQ27MQ.js → chunk-MTODGQBR.js} +44 -179
- package/dist/chunk-MTODGQBR.js.map +1 -0
- package/dist/{chunk-O3MT7DYI.js → chunk-N6MNJNHB.js} +2 -2
- package/dist/{chunk-FVINAAKA.js → chunk-NBK6QQMG.js} +14 -13
- package/dist/{chunk-FVINAAKA.js.map → chunk-NBK6QQMG.js.map} +1 -1
- package/dist/{chunk-DM4OMPWK.js → chunk-NSA5K5G2.js} +2 -2
- package/dist/{chunk-MLTPJMH6.js → chunk-QQYULEZL.js} +2 -2
- package/dist/chunk-QSW4DFKE.js +31 -0
- package/dist/chunk-QSW4DFKE.js.map +1 -0
- package/dist/{chunk-PZWISPIQ.js → chunk-S7HN5FHL.js} +17 -11
- package/dist/chunk-S7HN5FHL.js.map +1 -0
- package/dist/{chunk-4S53H2KR.js → chunk-SUNCHMML.js} +2 -2
- package/dist/{chunk-4GYMCUDZ.js → chunk-T2U6N3FV.js} +7 -7
- package/dist/{chunk-RJOG4IJU.js → chunk-T5URUIIY.js} +50 -35
- package/dist/chunk-T5URUIIY.js.map +1 -0
- package/dist/{chunk-B4AKFXGE.js → chunk-TPTZZV25.js} +6 -6
- package/dist/chunk-TPTZZV25.js.map +1 -0
- package/dist/{chunk-BU3SEFA5.js → chunk-V46JWFGV.js} +7 -6
- package/dist/chunk-V46JWFGV.js.map +1 -0
- package/dist/{chunk-IJRR6YAI.js → chunk-VLDRAMP7.js} +18 -12
- package/dist/chunk-VLDRAMP7.js.map +1 -0
- package/dist/{chunk-6XZYT4SW.js → chunk-X6ESZDR6.js} +8 -9
- package/dist/chunk-X6ESZDR6.js.map +1 -0
- package/dist/{chunk-E5OZPDIW.js → chunk-X7BA5PWG.js} +7 -5
- package/dist/chunk-X7BA5PWG.js.map +1 -0
- package/dist/{chunk-CXANAIZU.js → chunk-XEWV254I.js} +3 -3
- package/dist/{chunk-CXANAIZU.js.map → chunk-XEWV254I.js.map} +1 -1
- package/dist/{chunk-V4Y3TM7U.js → chunk-YBJVKMTM.js} +38 -16
- package/dist/chunk-YBJVKMTM.js.map +1 -0
- package/dist/{chunk-7ADWWI2T.js → chunk-ZW32BPXV.js} +17 -6
- package/dist/chunk-ZW32BPXV.js.map +1 -0
- package/dist/compat/index.cjs +52 -5
- package/dist/compat/index.cjs.map +1 -1
- package/dist/compat/index.d.cts +1 -1
- package/dist/compat/index.d.ts +1 -1
- package/dist/compat/index.js +7 -7
- package/dist/compat/nestjs/index.cjs +52 -5
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +1 -1
- package/dist/compat/nestjs/index.d.ts +1 -1
- package/dist/compat/nestjs/index.js +4 -4
- package/dist/{fallback-Bx46zqky.d.cts → fallback-BROR6ZhO.d.cts} +1 -1
- package/dist/{fallback-pIWW8A2d.d.ts → fallback-DO80aM_3.d.ts} +1 -1
- package/dist/{index-B_p8tnvf.d.cts → index-D1z3XcF9.d.cts} +1 -0
- package/dist/{index-_HDSmPyp.d.ts → index-DZ6yua0Q.d.ts} +1 -0
- package/dist/index.cjs +2387 -1707
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +173 -150
- package/dist/index.js.map +1 -1
- package/dist/presets/ai/index.cjs +88 -26
- package/dist/presets/ai/index.cjs.map +1 -1
- package/dist/presets/ai/index.js +14 -14
- package/dist/presets/harness/index.cjs +183 -51
- package/dist/presets/harness/index.cjs.map +1 -1
- package/dist/presets/harness/index.d.cts +15 -5
- package/dist/presets/harness/index.d.ts +15 -5
- package/dist/presets/harness/index.js +26 -26
- package/dist/presets/index.cjs +298 -101
- package/dist/presets/index.cjs.map +1 -1
- package/dist/presets/index.d.cts +2 -2
- package/dist/presets/index.d.ts +2 -2
- package/dist/presets/index.js +49 -49
- package/dist/presets/inspect/index.cjs +63 -14
- package/dist/presets/inspect/index.cjs.map +1 -1
- package/dist/presets/inspect/index.d.cts +1 -1
- package/dist/presets/inspect/index.d.ts +1 -1
- package/dist/presets/inspect/index.js +6 -6
- package/dist/presets/resilience/index.cjs +64 -44
- package/dist/presets/resilience/index.cjs.map +1 -1
- package/dist/presets/resilience/index.d.cts +12 -8
- package/dist/presets/resilience/index.d.ts +12 -8
- package/dist/presets/resilience/index.js +6 -6
- package/dist/{rate-limiter-DpVbSYdH.d.cts → rate-limiter-DC26FM8J.d.cts} +10 -1
- package/dist/{rate-limiter-CEALq4N1.d.ts → rate-limiter-DyWpwpQP.d.ts} +10 -1
- package/dist/{reactive-layout-fswlBUvX.d.ts → reactive-layout-BBBWH0V_.d.cts} +85 -4
- package/dist/{reactive-layout-fswlBUvX.d.cts → reactive-layout-BBBWH0V_.d.ts} +85 -4
- package/dist/solutions/index.cjs +239 -92
- package/dist/solutions/index.cjs.map +1 -1
- package/dist/solutions/index.d.cts +2 -2
- package/dist/solutions/index.d.ts +2 -2
- package/dist/solutions/index.js +32 -32
- package/dist/{spawnable-5mDY501F.d.cts → spawnable-B2IlW60f.d.cts} +23 -2
- package/dist/{spawnable-D3lR0oQu.d.ts → spawnable-tttFz2Nh.d.ts} +23 -2
- package/dist/testing/index.cjs +94 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +59 -0
- package/dist/testing/index.d.ts +59 -0
- package/dist/testing/index.js +73 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/{timeout-U5O4ESK3.js → timeout-BEABACRP.js} +2 -2
- package/dist/utils/ai/browser.cjs.map +1 -1
- package/dist/utils/ai/browser.d.cts +2 -2
- package/dist/utils/ai/browser.d.ts +2 -2
- package/dist/utils/ai/browser.js +10 -10
- package/dist/utils/ai/browser.js.map +1 -1
- package/dist/utils/ai/index.cjs +291 -191
- package/dist/utils/ai/index.cjs.map +1 -1
- package/dist/utils/ai/index.d.cts +108 -12
- package/dist/utils/ai/index.d.ts +108 -12
- package/dist/utils/ai/index.js +23 -21
- package/dist/utils/ai/node.cjs.map +1 -1
- package/dist/utils/ai/node.d.cts +5 -5
- package/dist/utils/ai/node.d.ts +5 -5
- package/dist/utils/ai/node.js +3 -3
- package/dist/utils/ai/node.js.map +1 -1
- package/dist/utils/cqrs/index.cjs +29 -3
- package/dist/utils/cqrs/index.cjs.map +1 -1
- package/dist/utils/cqrs/index.d.cts +12 -7
- package/dist/utils/cqrs/index.d.ts +12 -7
- package/dist/utils/cqrs/index.js +2 -2
- package/dist/utils/demo-shell/index.cjs +45 -19
- package/dist/utils/demo-shell/index.cjs.map +1 -1
- package/dist/utils/demo-shell/index.d.cts +1 -1
- package/dist/utils/demo-shell/index.d.ts +1 -1
- package/dist/utils/demo-shell/index.js +2 -2
- package/dist/utils/domain-templates/index.cjs +1 -1
- package/dist/utils/domain-templates/index.cjs.map +1 -1
- package/dist/utils/domain-templates/index.js +3 -3
- package/dist/utils/graphspec/index.cjs +1 -1
- package/dist/utils/graphspec/index.cjs.map +1 -1
- package/dist/utils/graphspec/index.js +3 -3
- package/dist/utils/harness/index.cjs +16 -10
- package/dist/utils/harness/index.cjs.map +1 -1
- package/dist/utils/harness/index.js +1 -1
- package/dist/utils/index.cjs +1692 -1192
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +7 -7
- package/dist/utils/index.d.ts +7 -7
- package/dist/utils/index.js +77 -59
- package/dist/utils/inspect/index.cjs +52 -4
- package/dist/utils/inspect/index.cjs.map +1 -1
- package/dist/utils/inspect/index.d.cts +32 -3
- package/dist/utils/inspect/index.d.ts +32 -3
- package/dist/utils/inspect/index.js +4 -4
- package/dist/utils/job-queue/index.cjs +46 -9
- package/dist/utils/job-queue/index.cjs.map +1 -1
- package/dist/utils/job-queue/index.d.cts +33 -3
- package/dist/utils/job-queue/index.d.ts +33 -3
- package/dist/utils/job-queue/index.js +2 -2
- package/dist/utils/memory/index.cjs +570 -425
- package/dist/utils/memory/index.cjs.map +1 -1
- package/dist/utils/memory/index.d.cts +261 -33
- package/dist/utils/memory/index.d.ts +261 -33
- package/dist/utils/memory/index.js +10 -2
- package/dist/utils/messaging/index.cjs.map +1 -1
- package/dist/utils/messaging/index.d.cts +4 -3
- package/dist/utils/messaging/index.d.ts +4 -3
- package/dist/utils/messaging/index.js +2 -2
- package/dist/utils/orchestration/index.cjs +14 -3
- package/dist/utils/orchestration/index.cjs.map +1 -1
- package/dist/utils/orchestration/index.js +3 -3
- package/dist/utils/process/index.cjs +32 -2
- package/dist/utils/process/index.cjs.map +1 -1
- package/dist/utils/process/index.d.cts +4 -3
- package/dist/utils/process/index.d.ts +4 -3
- package/dist/utils/process/index.js +3 -3
- package/dist/utils/reactive-layout/index.cjs +184 -55
- package/dist/utils/reactive-layout/index.cjs.map +1 -1
- package/dist/utils/reactive-layout/index.d.cts +128 -3
- package/dist/utils/reactive-layout/index.d.ts +128 -3
- package/dist/utils/reactive-layout/index.js +16 -8
- package/dist/utils/reduction/index.cjs +1 -1
- package/dist/utils/reduction/index.cjs.map +1 -1
- package/dist/utils/reduction/index.js +2 -2
- package/dist/utils/resilience/index.cjs +64 -43
- package/dist/utils/resilience/index.cjs.map +1 -1
- package/dist/utils/resilience/index.d.cts +1 -1
- package/dist/utils/resilience/index.d.ts +1 -1
- package/dist/utils/resilience/index.js +5 -5
- package/dist/utils/surface/index.cjs +1 -1
- package/dist/utils/surface/index.cjs.map +1 -1
- package/dist/utils/surface/index.js +4 -4
- package/package.json +15 -3
- package/dist/chunk-3PSLNJDU.js.map +0 -1
- package/dist/chunk-42FQ27MQ.js.map +0 -1
- package/dist/chunk-4XCHZRUJ.js.map +0 -1
- package/dist/chunk-6XZYT4SW.js.map +0 -1
- package/dist/chunk-7ADWWI2T.js.map +0 -1
- package/dist/chunk-B4AKFXGE.js.map +0 -1
- package/dist/chunk-BU3SEFA5.js.map +0 -1
- package/dist/chunk-BXGZFGZ4.js.map +0 -1
- package/dist/chunk-DKNHAICT.js.map +0 -1
- package/dist/chunk-E5OZPDIW.js.map +0 -1
- package/dist/chunk-EVYY4X5A.js.map +0 -1
- package/dist/chunk-IJRR6YAI.js.map +0 -1
- package/dist/chunk-K7PDZYQE.js.map +0 -1
- package/dist/chunk-NPRP3MCV.js.map +0 -1
- package/dist/chunk-NY2PYHNC.js.map +0 -1
- package/dist/chunk-OCUDSN63.js.map +0 -1
- package/dist/chunk-PKPO3JTZ.js.map +0 -1
- package/dist/chunk-PZWISPIQ.js.map +0 -1
- package/dist/chunk-RGMTUZCL.js.map +0 -1
- package/dist/chunk-RJOG4IJU.js.map +0 -1
- package/dist/chunk-SOOKUYVM.js.map +0 -1
- package/dist/chunk-U225SKB4.js.map +0 -1
- package/dist/chunk-V4Y3TM7U.js.map +0 -1
- package/dist/chunk-VLAGJZSL.js.map +0 -1
- package/dist/chunk-W2BOPXTI.js +0 -1
- package/dist/chunk-YJ4U2D2C.js.map +0 -1
- package/dist/chunk-YXCPV26R.js.map +0 -1
- package/dist/timeout-U5O4ESK3.js.map +0 -1
- /package/dist/{chunk-J5WFUEO4.js.map → chunk-23MAWVOJ.js.map} +0 -0
- /package/dist/{chunk-2OB3CEJS.js.map → chunk-B5Y5GPD5.js.map} +0 -0
- /package/dist/{chunk-MTTRCEJT.js.map → chunk-DVTDF5OI.js.map} +0 -0
- /package/dist/{chunk-A7KV5UK4.js.map → chunk-G7H6PN7P.js.map} +0 -0
- /package/dist/{chunk-O3MT7DYI.js.map → chunk-N6MNJNHB.js.map} +0 -0
- /package/dist/{chunk-DM4OMPWK.js.map → chunk-NSA5K5G2.js.map} +0 -0
- /package/dist/{chunk-MLTPJMH6.js.map → chunk-QQYULEZL.js.map} +0 -0
- /package/dist/{chunk-4S53H2KR.js.map → chunk-SUNCHMML.js.map} +0 -0
- /package/dist/{chunk-4GYMCUDZ.js.map → chunk-T2U6N3FV.js.map} +0 -0
- /package/dist/{chunk-W2BOPXTI.js.map → timeout-BEABACRP.js.map} +0 -0
package/dist/presets/ai/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DebateGraph,
|
|
3
3
|
heterogeneousDebate
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-X7BA5PWG.js";
|
|
5
5
|
import {
|
|
6
6
|
CompressionCache,
|
|
7
7
|
renderContextView,
|
|
8
8
|
taggedContextPool,
|
|
9
9
|
tierCompress
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-DVTDF5OI.js";
|
|
11
11
|
import {
|
|
12
12
|
AgentMemoryGraph,
|
|
13
13
|
agentMemory
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-23MAWVOJ.js";
|
|
15
15
|
import {
|
|
16
16
|
AgentGraph,
|
|
17
17
|
AgentLoopGraph,
|
|
@@ -20,19 +20,19 @@ import {
|
|
|
20
20
|
agent,
|
|
21
21
|
agentLoop,
|
|
22
22
|
presetRegistry
|
|
23
|
-
} from "../../chunk-
|
|
24
|
-
import "../../chunk-
|
|
25
|
-
import "../../chunk-
|
|
26
|
-
import "../../chunk-
|
|
27
|
-
import "../../chunk-
|
|
28
|
-
import "../../chunk-FMPF42Q4.js";
|
|
29
|
-
import "../../chunk-BXGZFGZ4.js";
|
|
30
|
-
import "../../chunk-A7KV5UK4.js";
|
|
31
|
-
import "../../chunk-DKNHAICT.js";
|
|
32
|
-
import "../../chunk-O3MT7DYI.js";
|
|
33
|
-
import "../../chunk-Z4YXAUDN.js";
|
|
23
|
+
} from "../../chunk-65OM4XLQ.js";
|
|
24
|
+
import "../../chunk-3REMCHSS.js";
|
|
25
|
+
import "../../chunk-K4ZYJ4EM.js";
|
|
26
|
+
import "../../chunk-DHDCOOJU.js";
|
|
27
|
+
import "../../chunk-KUFXLAEY.js";
|
|
34
28
|
import "../../chunk-TSBFTJKM.js";
|
|
35
29
|
import "../../chunk-P5LBT622.js";
|
|
30
|
+
import "../../chunk-QMBYUVRL.js";
|
|
31
|
+
import "../../chunk-FMPF42Q4.js";
|
|
32
|
+
import "../../chunk-C5QD5DQX.js";
|
|
33
|
+
import "../../chunk-G7H6PN7P.js";
|
|
34
|
+
import "../../chunk-MMHGYX44.js";
|
|
35
|
+
import "../../chunk-N6MNJNHB.js";
|
|
36
36
|
import "../../chunk-AZDQPQ3V.js";
|
|
37
37
|
export {
|
|
38
38
|
AgentGraph,
|
|
@@ -313,11 +313,13 @@ function withTimeout(source, opts, extraOpts) {
|
|
|
313
313
|
if (latestOpts != null) {
|
|
314
314
|
attachSource();
|
|
315
315
|
}
|
|
316
|
-
return
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
316
|
+
return {
|
|
317
|
+
onDeactivation: () => {
|
|
318
|
+
stopped = true;
|
|
319
|
+
timer.cancel();
|
|
320
|
+
if (srcUnsub) srcUnsub();
|
|
321
|
+
if (optsUnsub) optsUnsub();
|
|
322
|
+
}
|
|
321
323
|
};
|
|
322
324
|
},
|
|
323
325
|
{
|
|
@@ -431,9 +433,11 @@ function _oneShotLlmCall(adapter, messages, config) {
|
|
|
431
433
|
invokeResult = adapter.invoke(messages, { ...config.invokeOpts, signal: ac.signal });
|
|
432
434
|
} catch (err) {
|
|
433
435
|
emitOnce(config.onFailure("throw", err));
|
|
434
|
-
return
|
|
435
|
-
|
|
436
|
-
|
|
436
|
+
return {
|
|
437
|
+
onDeactivation: () => {
|
|
438
|
+
unlinkParent();
|
|
439
|
+
ac.abort();
|
|
440
|
+
}
|
|
437
441
|
};
|
|
438
442
|
}
|
|
439
443
|
const callNode = (0, import_extra.fromAny)(invokeResult, { signal: ac.signal });
|
|
@@ -462,11 +466,13 @@ function _oneShotLlmCall(adapter, messages, config) {
|
|
|
462
466
|
unsub();
|
|
463
467
|
unsub = null;
|
|
464
468
|
}
|
|
465
|
-
return
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
469
|
+
return {
|
|
470
|
+
onDeactivation: () => {
|
|
471
|
+
unlinkParent();
|
|
472
|
+
ac.abort();
|
|
473
|
+
unsub?.();
|
|
474
|
+
unsub = null;
|
|
475
|
+
}
|
|
470
476
|
};
|
|
471
477
|
},
|
|
472
478
|
{ describeKind: "producer" }
|
|
@@ -676,7 +682,7 @@ function actorPool(parent, opts = {}) {
|
|
|
676
682
|
const name = opts.name ?? `actorPool-${++_actorPoolSeq}`;
|
|
677
683
|
const graph = new import_graph2.Graph(name);
|
|
678
684
|
parent.mount(name, graph);
|
|
679
|
-
const depthCap = opts.depthCap ??
|
|
685
|
+
const depthCap = opts.depthCap ?? 8;
|
|
680
686
|
let autoActor = 0;
|
|
681
687
|
const liveHandles = /* @__PURE__ */ new Set();
|
|
682
688
|
const contextPool = taggedContextPool(graph, {
|
|
@@ -808,6 +814,26 @@ function createAuditLog(opts) {
|
|
|
808
814
|
}
|
|
809
815
|
return log;
|
|
810
816
|
}
|
|
817
|
+
function readonlyAuditLog(log) {
|
|
818
|
+
return Object.freeze({
|
|
819
|
+
get entries() {
|
|
820
|
+
return log.entries;
|
|
821
|
+
},
|
|
822
|
+
get size() {
|
|
823
|
+
return log.size;
|
|
824
|
+
},
|
|
825
|
+
get lastValue() {
|
|
826
|
+
return log.lastValue;
|
|
827
|
+
},
|
|
828
|
+
get mutationLog() {
|
|
829
|
+
return log.mutationLog;
|
|
830
|
+
},
|
|
831
|
+
at: log.at.bind(log),
|
|
832
|
+
withLatest: log.withLatest.bind(log),
|
|
833
|
+
view: log.view.bind(log),
|
|
834
|
+
scan: log.scan.bind(log)
|
|
835
|
+
});
|
|
836
|
+
}
|
|
811
837
|
function deepFreeze(value) {
|
|
812
838
|
if (value === null || typeof value !== "object" || Object.isFrozen(value)) return value;
|
|
813
839
|
for (const k of Object.keys(value)) {
|
|
@@ -1394,6 +1420,16 @@ function topicBridge(name, sourceTopic, targetTopic, opts) {
|
|
|
1394
1420
|
|
|
1395
1421
|
// src/presets/harness/refine-loop.ts
|
|
1396
1422
|
var RefineLoopGraph = class extends import_graph5.Graph {
|
|
1423
|
+
/**
|
|
1424
|
+
* Best candidate so far. **SENTINEL until the first iteration settles** —
|
|
1425
|
+
* `loop.best.cache` is `undefined` (not `null`) before any iteration
|
|
1426
|
+
* produces a best, and a degenerate empty-candidate iteration leaves the
|
|
1427
|
+
* prior best in place rather than wiping it. Consumers guard with
|
|
1428
|
+
* `=== undefined` (spec §3 SENTINEL), not `== null`. (Anti-pattern sweep
|
|
1429
|
+
* 2026-05-18: dropped the `initial: null` eager-placeholder; `null` is
|
|
1430
|
+
* reserved for the per-iteration {@link Iteration.best} data field where an
|
|
1431
|
+
* empty batch is a valid domain value.)
|
|
1432
|
+
*/
|
|
1397
1433
|
best;
|
|
1398
1434
|
/**
|
|
1399
1435
|
* Best score so far. Pseudo-private (`_score`) to avoid colliding with any
|
|
@@ -1444,8 +1480,7 @@ var RefineLoopGraph = class extends import_graph5.Graph {
|
|
|
1444
1480
|
});
|
|
1445
1481
|
this.add(strategyNode, { name: "strategy" });
|
|
1446
1482
|
const lastFeedbackState = (0, import_core6.node)([], {
|
|
1447
|
-
name: "lastFeedback"
|
|
1448
|
-
initial: null
|
|
1483
|
+
name: "lastFeedback"
|
|
1449
1484
|
});
|
|
1450
1485
|
this.add(lastFeedbackState, { name: "lastFeedback" });
|
|
1451
1486
|
const prevCandidatesState = (0, import_core6.node)([], {
|
|
@@ -1464,7 +1499,7 @@ var RefineLoopGraph = class extends import_graph5.Graph {
|
|
|
1464
1499
|
// append-style; reactive consumers want every push
|
|
1465
1500
|
});
|
|
1466
1501
|
this.add(historyState, { name: "history" });
|
|
1467
|
-
const bestState = (0, import_core6.node)([], { name: "best"
|
|
1502
|
+
const bestState = (0, import_core6.node)([], { name: "best" });
|
|
1468
1503
|
this.add(bestState, { name: "best" });
|
|
1469
1504
|
const scoreState = (0, import_core6.node)([], { name: "score", initial: Number.NEGATIVE_INFINITY });
|
|
1470
1505
|
this.add(scoreState, { name: "score" });
|
|
@@ -1488,7 +1523,7 @@ var RefineLoopGraph = class extends import_graph5.Graph {
|
|
|
1488
1523
|
this.decide = hubDecideTopic;
|
|
1489
1524
|
this._pauseState = pauseState;
|
|
1490
1525
|
let latestStrategy = initialStrategy;
|
|
1491
|
-
let latestFeedback
|
|
1526
|
+
let latestFeedback;
|
|
1492
1527
|
let latestPrevCandidates = [];
|
|
1493
1528
|
this.addDisposer(
|
|
1494
1529
|
strategyNode.subscribe((msgs) => {
|
|
@@ -1509,7 +1544,7 @@ var RefineLoopGraph = class extends import_graph5.Graph {
|
|
|
1509
1544
|
iterationTrigger,
|
|
1510
1545
|
(iter) => {
|
|
1511
1546
|
const strat = latestStrategy;
|
|
1512
|
-
const isSeed = iter === 0 || latestFeedback
|
|
1547
|
+
const isSeed = iter === 0 || latestFeedback === void 0;
|
|
1513
1548
|
return (0, import_core6.node)(
|
|
1514
1549
|
[],
|
|
1515
1550
|
(_data, actions) => {
|
|
@@ -1525,8 +1560,10 @@ var RefineLoopGraph = class extends import_graph5.Graph {
|
|
|
1525
1560
|
if (!cancelled) actions.down([[import_core6.ERROR, err]]);
|
|
1526
1561
|
}
|
|
1527
1562
|
);
|
|
1528
|
-
return
|
|
1529
|
-
|
|
1563
|
+
return {
|
|
1564
|
+
onDeactivation: () => {
|
|
1565
|
+
cancelled = true;
|
|
1566
|
+
}
|
|
1530
1567
|
};
|
|
1531
1568
|
}
|
|
1532
1569
|
actions.emit({ iter, items: result });
|
|
@@ -1899,7 +1936,7 @@ var RefineLoopGraph = class extends import_graph5.Graph {
|
|
|
1899
1936
|
decision = "paused";
|
|
1900
1937
|
}
|
|
1901
1938
|
(0, import_core6.batch)(() => {
|
|
1902
|
-
bestState.emit(best);
|
|
1939
|
+
if (best !== null) bestState.emit(best);
|
|
1903
1940
|
scoreState.emit(fb.score);
|
|
1904
1941
|
historyState.emit(nextHistory);
|
|
1905
1942
|
budgetState.emit(nextBudget);
|
|
@@ -2139,7 +2176,7 @@ function errorCritique(opts) {
|
|
|
2139
2176
|
function defaultToOutput(result) {
|
|
2140
2177
|
const { best, score, status } = result;
|
|
2141
2178
|
const scoreStr = Number.isFinite(score) ? score.toFixed(3) : String(score);
|
|
2142
|
-
const artifact = best
|
|
2179
|
+
const artifact = best;
|
|
2143
2180
|
if (status === "converged") {
|
|
2144
2181
|
return {
|
|
2145
2182
|
outcome: "success",
|
|
@@ -2665,9 +2702,11 @@ function _retrySource(source, opts, emitState) {
|
|
|
2665
2702
|
const merged = makeMergedOptsMirror(opts);
|
|
2666
2703
|
const getCfg = () => resolveRetryConfig(merged.current());
|
|
2667
2704
|
const inner = _runRetryStateMachine(getCfg, () => source, a, emitState);
|
|
2668
|
-
return
|
|
2669
|
-
|
|
2670
|
-
|
|
2705
|
+
return {
|
|
2706
|
+
onDeactivation: () => {
|
|
2707
|
+
inner();
|
|
2708
|
+
merged.unsub();
|
|
2709
|
+
}
|
|
2671
2710
|
};
|
|
2672
2711
|
},
|
|
2673
2712
|
{
|
|
@@ -2691,9 +2730,11 @@ function _retryFactory(factory, opts, emitState) {
|
|
|
2691
2730
|
const merged = makeMergedOptsMirror(opts);
|
|
2692
2731
|
const getCfg = () => resolveRetryConfig(merged.current());
|
|
2693
2732
|
const inner = _runRetryStateMachine(getCfg, factory, a, emitState);
|
|
2694
|
-
return
|
|
2695
|
-
|
|
2696
|
-
|
|
2733
|
+
return {
|
|
2734
|
+
onDeactivation: () => {
|
|
2735
|
+
inner();
|
|
2736
|
+
merged.unsub();
|
|
2737
|
+
}
|
|
2697
2738
|
};
|
|
2698
2739
|
},
|
|
2699
2740
|
{
|
|
@@ -2791,8 +2832,10 @@ function promptNode(adapter, deps, prompt, opts) {
|
|
|
2791
2832
|
} catch (err) {
|
|
2792
2833
|
done = true;
|
|
2793
2834
|
actions.down([[import_core13.ERROR, err]]);
|
|
2794
|
-
return
|
|
2795
|
-
|
|
2835
|
+
return {
|
|
2836
|
+
onDeactivation: () => {
|
|
2837
|
+
abortDispose?.();
|
|
2838
|
+
}
|
|
2796
2839
|
};
|
|
2797
2840
|
}
|
|
2798
2841
|
const callNode = (0, import_extra9.fromAny)(invokeResult);
|
|
@@ -2850,11 +2893,13 @@ function promptNode(adapter, deps, prompt, opts) {
|
|
|
2850
2893
|
}
|
|
2851
2894
|
}
|
|
2852
2895
|
});
|
|
2853
|
-
return
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2896
|
+
return {
|
|
2897
|
+
onDeactivation: () => {
|
|
2898
|
+
cancelled = true;
|
|
2899
|
+
sub();
|
|
2900
|
+
abortDispose?.();
|
|
2901
|
+
abortDispose = void 0;
|
|
2902
|
+
}
|
|
2858
2903
|
};
|
|
2859
2904
|
},
|
|
2860
2905
|
{
|
|
@@ -3069,6 +3114,10 @@ var PipelineGraph = class extends import_graph7.Graph {
|
|
|
3069
3114
|
{
|
|
3070
3115
|
name,
|
|
3071
3116
|
describeKind: "derived",
|
|
3117
|
+
// Spec §2.7 R2.7.1 (DS-2.7.A). fn must fire on
|
|
3118
|
+
// upstream-COMPLETE/ERROR-only-without-DATA so the
|
|
3119
|
+
// teardown-decision record + downstream terminal forward run.
|
|
3120
|
+
terminalAsRealInput: true,
|
|
3072
3121
|
meta: meta("approval_gate", opts.meta)
|
|
3073
3122
|
}
|
|
3074
3123
|
);
|
|
@@ -3286,6 +3335,11 @@ var PipelineGraph = class extends import_graph7.Graph {
|
|
|
3286
3335
|
describeKind: "derived",
|
|
3287
3336
|
completeWhenDepsComplete: opts.completeWhenDepsComplete ?? !(mode === "completed" || mode === "terminal"),
|
|
3288
3337
|
errorWhenDepsError: !(mode === "errored" || mode === "terminal"),
|
|
3338
|
+
// Spec §2.7 R2.7.1 (DS-2.7.A). `catch` exists to fire on a
|
|
3339
|
+
// source terminal — its whole job is `recover(cause, …)` on a
|
|
3340
|
+
// terminal-only wave. Without this opt-in the gate holds and
|
|
3341
|
+
// the recover branch never runs.
|
|
3342
|
+
terminalAsRealInput: true,
|
|
3289
3343
|
meta: meta("catch", opts.meta)
|
|
3290
3344
|
}
|
|
3291
3345
|
);
|
|
@@ -3531,16 +3585,20 @@ var ToolRegistryGraph = class extends import_graph9.Graph {
|
|
|
3531
3585
|
inner = handlerResultToNode(raw, ac.signal);
|
|
3532
3586
|
} catch (err) {
|
|
3533
3587
|
actions.down([[import_core17.ERROR, err]]);
|
|
3534
|
-
return
|
|
3535
|
-
|
|
3588
|
+
return {
|
|
3589
|
+
onDeactivation: () => {
|
|
3590
|
+
ac.abort();
|
|
3591
|
+
}
|
|
3536
3592
|
};
|
|
3537
3593
|
}
|
|
3538
3594
|
const unsub = inner.subscribe((batch10) => {
|
|
3539
3595
|
actions.down(batch10);
|
|
3540
3596
|
});
|
|
3541
|
-
return
|
|
3542
|
-
|
|
3543
|
-
|
|
3597
|
+
return {
|
|
3598
|
+
onDeactivation: () => {
|
|
3599
|
+
ac.abort();
|
|
3600
|
+
unsub();
|
|
3601
|
+
}
|
|
3544
3602
|
};
|
|
3545
3603
|
},
|
|
3546
3604
|
{
|
|
@@ -3750,7 +3808,10 @@ var JobQueueGraph = class extends import_graph11.Graph {
|
|
|
3750
3808
|
depth;
|
|
3751
3809
|
/** Audit log of every queue mutation (Audit 2). */
|
|
3752
3810
|
events;
|
|
3753
|
-
/**
|
|
3811
|
+
/**
|
|
3812
|
+
* Read-only view of {@link JobQueueGraph.events} — Audit 2 `.audit`
|
|
3813
|
+
* duplication; M7 (cannot mutate the canonical log via the alias).
|
|
3814
|
+
*/
|
|
3754
3815
|
audit;
|
|
3755
3816
|
// Tier 8 / COMPOSITION-GUIDE §35: mutate wrappers for the four
|
|
3756
3817
|
// single-record mutation methods. Assigned in the constructor (NOT via
|
|
@@ -3791,7 +3852,7 @@ var JobQueueGraph = class extends import_graph11.Graph {
|
|
|
3791
3852
|
retainedLimit: 1024,
|
|
3792
3853
|
graph: this
|
|
3793
3854
|
});
|
|
3794
|
-
this.audit = this.events;
|
|
3855
|
+
this.audit = readonlyAuditLog(this.events);
|
|
3795
3856
|
this._seqCursor = registerCursor(this, "seq", 0);
|
|
3796
3857
|
this._enqueueImpl = mutate(
|
|
3797
3858
|
(payload, enqueueOpts) => {
|
|
@@ -3844,7 +3905,7 @@ var JobQueueGraph = class extends import_graph11.Graph {
|
|
|
3844
3905
|
}
|
|
3845
3906
|
);
|
|
3846
3907
|
this._nackImpl = mutate(
|
|
3847
|
-
(id, job, requeue) => {
|
|
3908
|
+
(id, job, requeue, _error) => {
|
|
3848
3909
|
if (requeue) {
|
|
3849
3910
|
this._jobs.set(id, { ...job, state: "queued" });
|
|
3850
3911
|
this._pending.append(id);
|
|
@@ -3857,12 +3918,16 @@ var JobQueueGraph = class extends import_graph11.Graph {
|
|
|
3857
3918
|
log: this.events,
|
|
3858
3919
|
seq: this._seqCursor,
|
|
3859
3920
|
freeze: false,
|
|
3860
|
-
onSuccessRecord: ([id, job], _r, { t_ns, seq }) => ({
|
|
3921
|
+
onSuccessRecord: ([id, job, requeue, error], _r, { t_ns, seq }) => ({
|
|
3861
3922
|
action: "nack",
|
|
3862
3923
|
id,
|
|
3863
3924
|
attempts: job.attempts,
|
|
3864
3925
|
t_ns,
|
|
3865
|
-
seq: seq ?? 0
|
|
3926
|
+
seq: seq ?? 0,
|
|
3927
|
+
// F-CATCH D-3: surface the failure cause on the no-requeue
|
|
3928
|
+
// (terminal-failure) nack only. A requeue nack is a retry,
|
|
3929
|
+
// not a failure, so it carries no error.
|
|
3930
|
+
...!requeue && error !== void 0 ? { error } : {}
|
|
3866
3931
|
})
|
|
3867
3932
|
}
|
|
3868
3933
|
);
|
|
@@ -3934,10 +3999,20 @@ var JobQueueGraph = class extends import_graph11.Graph {
|
|
|
3934
3999
|
this._ackImpl(id, job);
|
|
3935
4000
|
return true;
|
|
3936
4001
|
}
|
|
4002
|
+
/**
|
|
4003
|
+
* Negatively-acknowledge an inflight job.
|
|
4004
|
+
*
|
|
4005
|
+
* @param opts.requeue - `true` (default) returns the job to the queue for
|
|
4006
|
+
* retry; `false` drops it permanently (terminal failure).
|
|
4007
|
+
* @param opts.error - Optional failure cause for a `requeue: false` nack.
|
|
4008
|
+
* Recorded on the emitted `"nack"` {@link JobEvent} as `error` so the
|
|
4009
|
+
* reason a job failed is recoverable from the event stream (F-CATCH
|
|
4010
|
+
* D-3). Ignored when `requeue` is `true` (a retry is not a failure).
|
|
4011
|
+
*/
|
|
3937
4012
|
nack(id, opts = {}) {
|
|
3938
4013
|
const job = this._jobs.get(id);
|
|
3939
4014
|
if (!job || job.state !== "inflight") return false;
|
|
3940
|
-
this._nackImpl(id, job, opts.requeue ?? true);
|
|
4015
|
+
this._nackImpl(id, job, opts.requeue ?? true, opts.error);
|
|
3941
4016
|
return true;
|
|
3942
4017
|
}
|
|
3943
4018
|
/**
|
|
@@ -4103,10 +4178,10 @@ var JobFlowGraph = class extends import_graph11.Graph {
|
|
|
4103
4178
|
let result;
|
|
4104
4179
|
try {
|
|
4105
4180
|
result = workFn(job, { signal: ac.signal });
|
|
4106
|
-
} catch {
|
|
4181
|
+
} catch (err) {
|
|
4107
4182
|
inflight.delete(entry);
|
|
4108
4183
|
inflightCounter?.emit(inflight.size);
|
|
4109
|
-
current.nack(job.id, { requeue: false });
|
|
4184
|
+
current.nack(job.id, { requeue: false, error: err });
|
|
4110
4185
|
processed += 1;
|
|
4111
4186
|
continue;
|
|
4112
4187
|
}
|
|
@@ -4157,7 +4232,7 @@ var JobFlowGraph = class extends import_graph11.Graph {
|
|
|
4157
4232
|
} else if (m[0] === import_core19.ERROR) {
|
|
4158
4233
|
settled = true;
|
|
4159
4234
|
cleanupSub();
|
|
4160
|
-
current.nack(job.id, { requeue: false });
|
|
4235
|
+
current.nack(job.id, { requeue: false, error: m[1] });
|
|
4161
4236
|
return;
|
|
4162
4237
|
}
|
|
4163
4238
|
}
|
|
@@ -4413,7 +4488,18 @@ var HarnessGraph = class extends import_graph12.Graph {
|
|
|
4413
4488
|
* (use {@link unrouted}), and the internal `triage-output` fan-in.
|
|
4414
4489
|
*/
|
|
4415
4490
|
queueTopics;
|
|
4416
|
-
/**
|
|
4491
|
+
/**
|
|
4492
|
+
* Strategy model — `auditedSuccessTracker` keyed by `StrategyKey`.
|
|
4493
|
+
*
|
|
4494
|
+
* **Ownership (EC10/EC15).** Owned by the harness: it is mounted as a
|
|
4495
|
+
* child subgraph (`harness.mount("strategy", strategy)`), so its disposal
|
|
4496
|
+
* cascades from `harness.destroy()` via the mount lifecycle. Do **not**
|
|
4497
|
+
* call `strategy.destroy()` independently — the harness's `triage-input`
|
|
4498
|
+
* node and (when `opts.priority` is set) `buildPriorityScores` hold
|
|
4499
|
+
* cross-graph deps on `strategy.entries`; destroying the strategy out of
|
|
4500
|
+
* band staleness those nodes while the rest of the loop keeps running.
|
|
4501
|
+
* Read/subscribe freely; let the harness own the lifecycle.
|
|
4502
|
+
*/
|
|
4417
4503
|
strategy;
|
|
4418
4504
|
/** Global retry count across all items (circuit breaker). Reactive — subscribable. */
|
|
4419
4505
|
totalRetries;
|
|
@@ -5255,6 +5341,11 @@ var AgentLoopGraph = class extends import_graph15.Graph {
|
|
|
5255
5341
|
chat.append("assistant", response.content, {
|
|
5256
5342
|
toolCalls: response.toolCalls
|
|
5257
5343
|
});
|
|
5344
|
+
if (capReached && hasToolCalls) {
|
|
5345
|
+
for (const tc of response.toolCalls) {
|
|
5346
|
+
chat.appendToolResult(tc.id, "[tool call denied: maxTurns reached]");
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5258
5349
|
});
|
|
5259
5350
|
},
|
|
5260
5351
|
{ describeKind: "effect" }
|
|
@@ -5276,6 +5367,45 @@ var AgentLoopGraph = class extends import_graph15.Graph {
|
|
|
5276
5367
|
},
|
|
5277
5368
|
{ describeKind: "effect" }
|
|
5278
5369
|
);
|
|
5370
|
+
const effFullDeny = gatedToolCallsNode !== toolCallsRaw ? (0, import_core22.node)(
|
|
5371
|
+
[toolCallsRaw, gatedToolCallsNode],
|
|
5372
|
+
(batchData) => {
|
|
5373
|
+
if (latestAborted) return;
|
|
5374
|
+
const rawBatch = batchData[0];
|
|
5375
|
+
const gatedBatch = batchData[1];
|
|
5376
|
+
const rawCalls = rawBatch != null && rawBatch.length > 0 ? rawBatch.at(-1) : null;
|
|
5377
|
+
if (rawCalls == null || rawCalls.length === 0) return;
|
|
5378
|
+
const gatedCalls = gatedBatch != null && gatedBatch.length > 0 ? gatedBatch.at(-1) : null;
|
|
5379
|
+
const allowedIds = gatedCalls === null ? null : new Set(gatedCalls.map((c) => c.id));
|
|
5380
|
+
const denied = allowedIds === null ? rawCalls : rawCalls.filter((c) => !allowedIds.has(c.id));
|
|
5381
|
+
if (denied.length === 0) return;
|
|
5382
|
+
const isFullDeny = gatedCalls === null;
|
|
5383
|
+
(0, import_core22.batch)(() => {
|
|
5384
|
+
if (isFullDeny) {
|
|
5385
|
+
statusNode.emit(latestTurn >= maxTurns ? "done" : "thinking");
|
|
5386
|
+
}
|
|
5387
|
+
for (const c of denied)
|
|
5388
|
+
chat.appendToolResult(c.id, "[tool call denied by interceptor]");
|
|
5389
|
+
});
|
|
5390
|
+
},
|
|
5391
|
+
{
|
|
5392
|
+
name: "fullDenyRecovery",
|
|
5393
|
+
describeKind: "effect",
|
|
5394
|
+
meta: aiMeta("agent_full_deny_recovery"),
|
|
5395
|
+
// MUST be explicit: the core `node()` default is
|
|
5396
|
+
// `partial: false` (node.ts `opts.partial ?? false`),
|
|
5397
|
+
// and `gatedToolCallsNode` only ever emits RESOLVED on the
|
|
5398
|
+
// full-deny path (never DATA/terminal). Spec R2.7.0
|
|
5399
|
+
// (DS-2.7.A, 2026-05-19) holds the `partial: false`
|
|
5400
|
+
// first-run gate until every dep has contributed real
|
|
5401
|
+
// DATA, so a `partial: false` effFullDeny would hold the
|
|
5402
|
+
// fn FOREVER. Spec R2.7.2 = `partial: true` disables the
|
|
5403
|
+
// gate; the fn body's `denied`-subtraction guard above
|
|
5404
|
+
// covers the SENTINEL slot per the R2.7.2 author
|
|
5405
|
+
// contract.
|
|
5406
|
+
partial: true
|
|
5407
|
+
}
|
|
5408
|
+
) : null;
|
|
5279
5409
|
let latestStatus = statusNode.cache ?? "idle";
|
|
5280
5410
|
const statusSub = statusNode.subscribe((msgs) => {
|
|
5281
5411
|
for (const m of msgs) if (m[0] === import_core22.DATA) latestStatus = m[1];
|
|
@@ -5295,6 +5425,7 @@ var AgentLoopGraph = class extends import_graph15.Graph {
|
|
|
5295
5425
|
);
|
|
5296
5426
|
const kaResponse = (0, import_extra17.keepalive)(effResponse);
|
|
5297
5427
|
const kaResults = (0, import_extra17.keepalive)(effResults);
|
|
5428
|
+
const kaFullDeny = effFullDeny ? (0, import_extra17.keepalive)(effFullDeny) : null;
|
|
5298
5429
|
const kaAbort = (0, import_extra17.keepalive)(effAbort);
|
|
5299
5430
|
this._terminalResult = (0, import_core22.node)(
|
|
5300
5431
|
[statusNode, lastResponseState],
|
|
@@ -5347,6 +5478,7 @@ var AgentLoopGraph = class extends import_graph15.Graph {
|
|
|
5347
5478
|
this.addDisposer(statusSub);
|
|
5348
5479
|
this.addDisposer(kaResponse);
|
|
5349
5480
|
this.addDisposer(kaResults);
|
|
5481
|
+
if (kaFullDeny) this.addDisposer(kaFullDeny);
|
|
5350
5482
|
this.addDisposer(kaAbort);
|
|
5351
5483
|
this._disposeRunWiring = () => {
|
|
5352
5484
|
};
|