@namzu/sdk 6.2.0 → 8.0.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/CHANGELOG.md +677 -0
- package/dist/agents/ReactiveAgent.d.ts.map +1 -1
- package/dist/agents/ReactiveAgent.js +5 -0
- package/dist/agents/ReactiveAgent.js.map +1 -1
- package/dist/agents/SupervisorAgent.d.ts.map +1 -1
- package/dist/agents/SupervisorAgent.js +172 -158
- package/dist/agents/SupervisorAgent.js.map +1 -1
- package/dist/agents/__tests__/supervisor-inbox-scope.test.d.ts +2 -0
- package/dist/agents/__tests__/supervisor-inbox-scope.test.d.ts.map +1 -0
- package/dist/agents/__tests__/supervisor-inbox-scope.test.js +125 -0
- package/dist/agents/__tests__/supervisor-inbox-scope.test.js.map +1 -0
- package/dist/agents/runAgent.d.ts +19 -1
- package/dist/agents/runAgent.d.ts.map +1 -1
- package/dist/agents/runAgent.js +2 -0
- package/dist/agents/runAgent.js.map +1 -1
- package/dist/bridge/a2a/mapper.d.ts.map +1 -1
- package/dist/bridge/a2a/mapper.js +4 -0
- package/dist/bridge/a2a/mapper.js.map +1 -1
- package/dist/bridge/sse/mapper.d.ts.map +1 -1
- package/dist/bridge/sse/mapper.js +24 -0
- package/dist/bridge/sse/mapper.js.map +1 -1
- package/dist/connector/mcp/__tests__/positional-arrays.test.d.ts +2 -0
- package/dist/connector/mcp/__tests__/positional-arrays.test.d.ts.map +1 -0
- package/dist/connector/mcp/__tests__/positional-arrays.test.js +142 -0
- package/dist/connector/mcp/__tests__/positional-arrays.test.js.map +1 -0
- package/dist/connector/mcp/adapter.d.ts.map +1 -1
- package/dist/connector/mcp/adapter.js +123 -8
- package/dist/connector/mcp/adapter.js.map +1 -1
- package/dist/constants/agent/index.d.ts +5 -0
- package/dist/constants/agent/index.d.ts.map +1 -1
- package/dist/constants/agent/index.js +5 -0
- package/dist/constants/agent/index.js.map +1 -1
- package/dist/constants/plugin/index.d.ts +15 -0
- package/dist/constants/plugin/index.d.ts.map +1 -1
- package/dist/constants/plugin/index.js +15 -0
- package/dist/constants/plugin/index.js.map +1 -1
- package/dist/contracts/api.d.ts +1 -1
- package/dist/contracts/api.d.ts.map +1 -1
- package/dist/gateway/__tests__/completion-inbox.test.js +292 -2
- package/dist/gateway/__tests__/completion-inbox.test.js.map +1 -1
- package/dist/gateway/completion-inbox.d.ts +94 -6
- package/dist/gateway/completion-inbox.d.ts.map +1 -1
- package/dist/gateway/completion-inbox.js +235 -15
- package/dist/gateway/completion-inbox.js.map +1 -1
- package/dist/gateway/local.d.ts +11 -0
- package/dist/gateway/local.d.ts.map +1 -1
- package/dist/gateway/local.js +27 -1
- package/dist/gateway/local.js.map +1 -1
- package/dist/manager/agent/lifecycle.d.ts.map +1 -1
- package/dist/manager/agent/lifecycle.js +6 -0
- package/dist/manager/agent/lifecycle.js.map +1 -1
- package/dist/manager/run/persistence.d.ts +8 -0
- package/dist/manager/run/persistence.d.ts.map +1 -1
- package/dist/manager/run/persistence.js +12 -0
- package/dist/manager/run/persistence.js.map +1 -1
- package/dist/provider/thinking-support.d.ts +2 -1
- package/dist/provider/thinking-support.d.ts.map +1 -1
- package/dist/provider/thinking-support.js +14 -0
- package/dist/provider/thinking-support.js.map +1 -1
- package/dist/public-runtime.d.ts +1 -1
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +9 -1
- package/dist/public-runtime.js.map +1 -1
- package/dist/run/reporter.d.ts.map +1 -1
- package/dist/run/reporter.js +11 -0
- package/dist/run/reporter.js.map +1 -1
- package/dist/runtime/query/__tests__/completion-does-not-erase-the-answer.test.d.ts +2 -0
- package/dist/runtime/query/__tests__/completion-does-not-erase-the-answer.test.d.ts.map +1 -0
- package/dist/runtime/query/__tests__/completion-does-not-erase-the-answer.test.js +142 -0
- package/dist/runtime/query/__tests__/completion-does-not-erase-the-answer.test.js.map +1 -0
- package/dist/runtime/query/__tests__/completion-notification.test.js +414 -32
- package/dist/runtime/query/__tests__/completion-notification.test.js.map +1 -1
- package/dist/runtime/query/__tests__/context-size-on-the-wire.test.d.ts +2 -0
- package/dist/runtime/query/__tests__/context-size-on-the-wire.test.d.ts.map +1 -0
- package/dist/runtime/query/__tests__/context-size-on-the-wire.test.js +100 -0
- package/dist/runtime/query/__tests__/context-size-on-the-wire.test.js.map +1 -0
- package/dist/runtime/query/__tests__/context.test.js +18 -0
- package/dist/runtime/query/__tests__/context.test.js.map +1 -1
- package/dist/runtime/query/__tests__/effort-reaches-the-wire.test.d.ts +2 -0
- package/dist/runtime/query/__tests__/effort-reaches-the-wire.test.d.ts.map +1 -0
- package/dist/runtime/query/__tests__/effort-reaches-the-wire.test.js +118 -0
- package/dist/runtime/query/__tests__/effort-reaches-the-wire.test.js.map +1 -0
- package/dist/runtime/query/__tests__/tool-timeout.test.js +34 -0
- package/dist/runtime/query/__tests__/tool-timeout.test.js.map +1 -1
- package/dist/runtime/query/context.d.ts.map +1 -1
- package/dist/runtime/query/context.js +16 -1
- package/dist/runtime/query/context.js.map +1 -1
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +11 -1
- package/dist/runtime/query/executor.js.map +1 -1
- package/dist/runtime/query/guard.d.ts +28 -0
- package/dist/runtime/query/guard.d.ts.map +1 -1
- package/dist/runtime/query/guard.js +31 -0
- package/dist/runtime/query/guard.js.map +1 -1
- package/dist/runtime/query/iteration/__tests__/settle-grace.test.d.ts +2 -0
- package/dist/runtime/query/iteration/__tests__/settle-grace.test.d.ts.map +1 -0
- package/dist/runtime/query/iteration/__tests__/settle-grace.test.js +226 -0
- package/dist/runtime/query/iteration/__tests__/settle-grace.test.js.map +1 -0
- package/dist/runtime/query/iteration/index.d.ts +92 -0
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +818 -565
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/__tests__/compaction-declined.test.d.ts +2 -0
- package/dist/runtime/query/iteration/phases/__tests__/compaction-declined.test.d.ts.map +1 -0
- package/dist/runtime/query/iteration/phases/__tests__/compaction-declined.test.js +95 -0
- package/dist/runtime/query/iteration/phases/__tests__/compaction-declined.test.js.map +1 -0
- package/dist/runtime/query/iteration/phases/compaction.d.ts +34 -0
- package/dist/runtime/query/iteration/phases/compaction.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.js +61 -4
- package/dist/runtime/query/iteration/phases/compaction.js.map +1 -1
- package/dist/telemetry/__tests__/model-call-span.test.js +22 -4
- package/dist/telemetry/__tests__/model-call-span.test.js.map +1 -1
- package/dist/telemetry/__tests__/span-closure.test.js +12 -5
- package/dist/telemetry/__tests__/span-closure.test.js.map +1 -1
- package/dist/tools/__tests__/untrusted-envelope.test.js +16 -0
- package/dist/tools/__tests__/untrusted-envelope.test.js.map +1 -1
- package/dist/tools/coordinator/__tests__/completion-delivery.test.js +117 -0
- package/dist/tools/coordinator/__tests__/completion-delivery.test.js.map +1 -1
- package/dist/tools/coordinator/__tests__/task-list.test.js +57 -0
- package/dist/tools/coordinator/__tests__/task-list.test.js.map +1 -1
- package/dist/tools/coordinator/__tests__/wait-with-idle-bound.test.d.ts +2 -0
- package/dist/tools/coordinator/__tests__/wait-with-idle-bound.test.d.ts.map +1 -0
- package/dist/tools/coordinator/__tests__/wait-with-idle-bound.test.js +193 -0
- package/dist/tools/coordinator/__tests__/wait-with-idle-bound.test.js.map +1 -0
- package/dist/tools/coordinator/index.d.ts +19 -0
- package/dist/tools/coordinator/index.d.ts.map +1 -1
- package/dist/tools/coordinator/index.js +191 -71
- package/dist/tools/coordinator/index.js.map +1 -1
- package/dist/tools/coordinator/wait-with-idle-bound.d.ts +66 -0
- package/dist/tools/coordinator/wait-with-idle-bound.d.ts.map +1 -0
- package/dist/tools/coordinator/wait-with-idle-bound.js +78 -0
- package/dist/tools/coordinator/wait-with-idle-bound.js.map +1 -0
- package/dist/tools/untrusted-envelope.d.ts.map +1 -1
- package/dist/tools/untrusted-envelope.js +9 -1
- package/dist/tools/untrusted-envelope.js.map +1 -1
- package/dist/types/agent/base.d.ts +16 -0
- package/dist/types/agent/base.d.ts.map +1 -1
- package/dist/types/agent/gateway.d.ts +41 -0
- package/dist/types/agent/gateway.d.ts.map +1 -1
- package/dist/types/agent/lifecycle-event.d.ts +9 -1
- package/dist/types/agent/lifecycle-event.d.ts.map +1 -1
- package/dist/types/agent/task.d.ts +5 -0
- package/dist/types/agent/task.d.ts.map +1 -1
- package/dist/types/hitl/index.d.ts +10 -0
- package/dist/types/hitl/index.d.ts.map +1 -1
- package/dist/types/hitl/index.js.map +1 -1
- package/dist/types/probe/registry.d.ts +6 -0
- package/dist/types/probe/registry.d.ts.map +1 -1
- package/dist/types/provider/interface.d.ts +35 -0
- package/dist/types/provider/interface.d.ts.map +1 -1
- package/dist/types/run/config.d.ts +25 -0
- package/dist/types/run/config.d.ts.map +1 -1
- package/dist/types/run/entity.d.ts +16 -0
- package/dist/types/run/entity.d.ts.map +1 -1
- package/dist/types/run/events.d.ts +75 -0
- package/dist/types/run/events.d.ts.map +1 -1
- package/dist/types/run/events.js.map +1 -1
- package/dist/types/run/prepare-step.d.ts +17 -2
- package/dist/types/run/prepare-step.d.ts.map +1 -1
- package/dist/types/verification/index.d.ts +98 -0
- package/dist/types/verification/index.d.ts.map +1 -1
- package/dist/types/verification/index.js +10 -0
- package/dist/types/verification/index.js.map +1 -1
- package/dist/utils/__tests__/abort-reason.test.d.ts +2 -0
- package/dist/utils/__tests__/abort-reason.test.d.ts.map +1 -0
- package/dist/utils/__tests__/abort-reason.test.js +48 -0
- package/dist/utils/__tests__/abort-reason.test.js.map +1 -0
- package/dist/utils/abort.d.ts +26 -0
- package/dist/utils/abort.d.ts.map +1 -1
- package/dist/utils/abort.js +34 -0
- package/dist/utils/abort.js.map +1 -1
- package/dist/verification/__tests__/argument-pattern.test.d.ts +2 -0
- package/dist/verification/__tests__/argument-pattern.test.d.ts.map +1 -0
- package/dist/verification/__tests__/argument-pattern.test.js +122 -0
- package/dist/verification/__tests__/argument-pattern.test.js.map +1 -0
- package/dist/verification/__tests__/rule-order-and-reason.test.d.ts +2 -0
- package/dist/verification/__tests__/rule-order-and-reason.test.d.ts.map +1 -0
- package/dist/verification/__tests__/rule-order-and-reason.test.js +126 -0
- package/dist/verification/__tests__/rule-order-and-reason.test.js.map +1 -0
- package/dist/verification/gate.d.ts +17 -1
- package/dist/verification/gate.d.ts.map +1 -1
- package/dist/verification/gate.js +102 -2
- package/dist/verification/gate.js.map +1 -1
- package/dist/verification/index.d.ts +1 -1
- package/dist/verification/index.d.ts.map +1 -1
- package/dist/verification/index.js +1 -1
- package/dist/verification/index.js.map +1 -1
- package/dist/verification/rules.d.ts.map +1 -1
- package/dist/verification/rules.js +27 -0
- package/dist/verification/rules.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/ReactiveAgent.ts +5 -0
- package/src/agents/SupervisorAgent.ts +175 -162
- package/src/agents/__tests__/supervisor-inbox-scope.test.ts +149 -0
- package/src/agents/runAgent.ts +22 -1
- package/src/bridge/a2a/mapper.ts +4 -0
- package/src/bridge/sse/mapper.ts +25 -0
- package/src/connector/mcp/__tests__/positional-arrays.test.ts +183 -0
- package/src/connector/mcp/adapter.ts +131 -7
- package/src/constants/agent/index.ts +5 -0
- package/src/constants/plugin/index.ts +15 -0
- package/src/contracts/api.ts +1 -0
- package/src/gateway/__tests__/completion-inbox.test.ts +348 -2
- package/src/gateway/completion-inbox.ts +248 -16
- package/src/gateway/local.ts +26 -1
- package/src/manager/agent/lifecycle.ts +6 -0
- package/src/manager/run/persistence.ts +12 -0
- package/src/provider/thinking-support.ts +19 -2
- package/src/public-runtime.ts +9 -0
- package/src/run/reporter.ts +12 -0
- package/src/runtime/query/__tests__/completion-does-not-erase-the-answer.test.ts +163 -0
- package/src/runtime/query/__tests__/completion-notification.test.ts +486 -34
- package/src/runtime/query/__tests__/context-size-on-the-wire.test.ts +122 -0
- package/src/runtime/query/__tests__/context.test.ts +24 -0
- package/src/runtime/query/__tests__/effort-reaches-the-wire.test.ts +135 -0
- package/src/runtime/query/__tests__/tool-timeout.test.ts +38 -0
- package/src/runtime/query/context.ts +16 -1
- package/src/runtime/query/executor.ts +11 -1
- package/src/runtime/query/guard.ts +32 -0
- package/src/runtime/query/iteration/__tests__/settle-grace.test.ts +265 -0
- package/src/runtime/query/iteration/index.ts +906 -635
- package/src/runtime/query/iteration/phases/__tests__/compaction-declined.test.ts +124 -0
- package/src/runtime/query/iteration/phases/compaction.ts +83 -10
- package/src/telemetry/__tests__/model-call-span.test.ts +22 -5
- package/src/telemetry/__tests__/span-closure.test.ts +12 -5
- package/src/tools/__tests__/untrusted-envelope.test.ts +23 -0
- package/src/tools/coordinator/__tests__/completion-delivery.test.ts +147 -0
- package/src/tools/coordinator/__tests__/task-list.test.ts +72 -0
- package/src/tools/coordinator/__tests__/wait-with-idle-bound.test.ts +247 -0
- package/src/tools/coordinator/index.ts +205 -78
- package/src/tools/coordinator/wait-with-idle-bound.ts +142 -0
- package/src/tools/untrusted-envelope.ts +9 -1
- package/src/types/agent/base.ts +17 -0
- package/src/types/agent/gateway.ts +42 -0
- package/src/types/agent/lifecycle-event.ts +7 -0
- package/src/types/agent/task.ts +5 -0
- package/src/types/hitl/index.ts +10 -0
- package/src/types/probe/registry.ts +6 -0
- package/src/types/provider/interface.ts +39 -0
- package/src/types/run/config.ts +26 -0
- package/src/types/run/entity.ts +17 -0
- package/src/types/run/events.ts +75 -0
- package/src/types/run/prepare-step.ts +17 -2
- package/src/types/verification/index.ts +61 -0
- package/src/utils/__tests__/abort-reason.test.ts +56 -0
- package/src/utils/abort.ts +34 -0
- package/src/verification/__tests__/argument-pattern.test.ts +158 -0
- package/src/verification/__tests__/rule-order-and-reason.test.ts +149 -0
- package/src/verification/gate.ts +106 -3
- package/src/verification/index.ts +1 -1
- package/src/verification/rules.ts +28 -0
|
@@ -36,8 +36,42 @@ export declare class CompletionInbox {
|
|
|
36
36
|
private readonly claimed;
|
|
37
37
|
/** Launched with nothing waiting on it, and not settled yet. */
|
|
38
38
|
private readonly outstanding;
|
|
39
|
+
/**
|
|
40
|
+
* Tasks THIS run launched.
|
|
41
|
+
*
|
|
42
|
+
* `onTaskCompleted` is a broadcast and `TaskHandle` carries no run id, so
|
|
43
|
+
* a gateway shared between two supervisors hands every completion to both
|
|
44
|
+
* of their inboxes. Measured: with two inboxes on one gateway, the run
|
|
45
|
+
* that launched nothing drained the other run's task and would have been
|
|
46
|
+
* told "a task you launched has finished" — a claim that was false, over
|
|
47
|
+
* another run's worker output, in a transcript whose model then has to
|
|
48
|
+
* account for it.
|
|
49
|
+
*
|
|
50
|
+
* A shared gateway is not an abuse of the API: `SupervisorAgentConfig`
|
|
51
|
+
* takes one, and a host that owns a gateway naturally reuses it.
|
|
52
|
+
*/
|
|
53
|
+
private readonly ours;
|
|
54
|
+
/**
|
|
55
|
+
* Announcements that arrived before anyone said whose task it was.
|
|
56
|
+
*
|
|
57
|
+
* `gateway.createTask` resolves one microtask before its caller can name
|
|
58
|
+
* the task, and a worker that finishes inside that window is announced
|
|
59
|
+
* first — `LocalTaskGateway` attaches its completion continuation before
|
|
60
|
+
* it returns the handle, so the ordering is guaranteed to be reachable
|
|
61
|
+
* rather than merely possible. Dropping an unowned announcement outright
|
|
62
|
+
* would therefore turn the leak fix into a LOST RESULT for exactly the
|
|
63
|
+
* fast completions the inbox exists to catch.
|
|
64
|
+
*
|
|
65
|
+
* So they wait here, and ownership may be claimed retroactively. What
|
|
66
|
+
* makes that safe rather than a second leak is the bound: on a gateway
|
|
67
|
+
* shared with other runs this fills with completions that will never be
|
|
68
|
+
* claimed, each holding a whole worker result.
|
|
69
|
+
*/
|
|
70
|
+
private readonly unowned;
|
|
39
71
|
private readonly arrivals;
|
|
40
72
|
private detach?;
|
|
73
|
+
/** Kept for {@link launched}: the source of truth about a task's state. */
|
|
74
|
+
private gateway?;
|
|
41
75
|
/**
|
|
42
76
|
* Start listening.
|
|
43
77
|
*
|
|
@@ -47,14 +81,51 @@ export declare class CompletionInbox {
|
|
|
47
81
|
* class exists to prevent.
|
|
48
82
|
*/
|
|
49
83
|
attach(gateway: TaskGateway): () => void;
|
|
84
|
+
/**
|
|
85
|
+
* Park an announcement nobody has claimed yet, evicting the oldest if the
|
|
86
|
+
* buffer is full.
|
|
87
|
+
*
|
|
88
|
+
* An eviction is logged at WARN, and that is not decoration. If the entry
|
|
89
|
+
* turned out to be ours, its completion has just been dropped — the
|
|
90
|
+
* original defect, wearing the cap as a disguise — and the only evidence
|
|
91
|
+
* would otherwise be an absence, which is precisely the shape of failure
|
|
92
|
+
* this whole session has been closing. A reader who sees this line knows
|
|
93
|
+
* where to look.
|
|
94
|
+
*/
|
|
95
|
+
private hold;
|
|
96
|
+
/**
|
|
97
|
+
* Say that this run launched the task.
|
|
98
|
+
*
|
|
99
|
+
* Required before anything about the task can reach this inbox — see
|
|
100
|
+
* {@link ours}. Every launch says it, whether or not something is waiting
|
|
101
|
+
* on the result, because the case the inbox exists for is precisely the
|
|
102
|
+
* one where the waiter gave up.
|
|
103
|
+
*
|
|
104
|
+
* **The late-announcement branches are not defensive.**
|
|
105
|
+
* `gateway.createTask` resolves one microtask before its caller can say
|
|
106
|
+
* who owns the task, and a worker that finishes inside that window is
|
|
107
|
+
* announced first — the same ordering that used to leave a permanent
|
|
108
|
+
* pending flag. Without recovery the ownership check would turn that race
|
|
109
|
+
* from a stale flag into a lost result.
|
|
110
|
+
*
|
|
111
|
+
* There are two, and the second is the safety net for the first. The
|
|
112
|
+
* buffer ({@link unowned}) needs nothing from the gateway beyond the
|
|
113
|
+
* announcement it already made. Asking `getTask` covers the case the
|
|
114
|
+
* buffer cannot — an announcement evicted under load — but it rests on a
|
|
115
|
+
* gateway still knowing about a task it has just settled, which is a
|
|
116
|
+
* property of the implementations here rather than of the `TaskGateway`
|
|
117
|
+
* contract, and `getTask`'s own docs now say so.
|
|
118
|
+
*/
|
|
119
|
+
launched(taskId: TaskId): void;
|
|
50
120
|
/**
|
|
51
121
|
* Say that a task was launched with nothing waiting on it.
|
|
52
122
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
123
|
+
* {@link launched} plus the statement that no call will deliver the
|
|
124
|
+
* result. Without the second half the inbox can only see completions that
|
|
125
|
+
* have already happened, and a run whose supervisor launched a background
|
|
126
|
+
* worker and then answered would settle while the worker was still going —
|
|
127
|
+
* throwing away the very result the launch existed to produce. Knowing a
|
|
128
|
+
* task is outstanding is what lets the loop hold the run open for it.
|
|
58
129
|
*/
|
|
59
130
|
expect(taskId: TaskId): void;
|
|
60
131
|
/** Whether anything is either waiting to be told or still running. */
|
|
@@ -76,6 +147,14 @@ export declare class CompletionInbox {
|
|
|
76
147
|
claim(taskId: TaskId): void;
|
|
77
148
|
/** Whether anything is waiting to be told. */
|
|
78
149
|
get hasUnheard(): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Tasks this run launched that are still running.
|
|
152
|
+
*
|
|
153
|
+
* Read when a run ends, so it can say which work it walked away from.
|
|
154
|
+
* Nothing here is cancelled by being read — the ids are a statement, and
|
|
155
|
+
* what to do about them is the host's call.
|
|
156
|
+
*/
|
|
157
|
+
get outstandingTaskIds(): readonly TaskId[];
|
|
79
158
|
/**
|
|
80
159
|
* Take every unheard completion, leaving the inbox empty.
|
|
81
160
|
*
|
|
@@ -93,7 +172,16 @@ export declare class CompletionInbox {
|
|
|
93
172
|
* that had been called off.
|
|
94
173
|
*/
|
|
95
174
|
forget(taskId: TaskId): void;
|
|
96
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* Stop listening. Safe to call more than once.
|
|
177
|
+
*
|
|
178
|
+
* A run that ends without this leaves its listener on the gateway
|
|
179
|
+
* forever. On a gateway the host reuses that is measurable — three
|
|
180
|
+
* sequential runs left three live subscriptions, each still holding its
|
|
181
|
+
* run's handles — and the listener set only grows. Ownership stops a
|
|
182
|
+
* retained listener from DELIVERING another run's work; closing is what
|
|
183
|
+
* stops it existing.
|
|
184
|
+
*/
|
|
97
185
|
close(): void;
|
|
98
186
|
}
|
|
99
187
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-inbox.d.ts","sourceRoot":"","sources":["../../src/gateway/completion-inbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"completion-inbox.d.ts","sourceRoot":"","sources":["../../src/gateway/completion-inbox.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAExE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAwBnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,eAAe;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgC;IACxD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,gEAAgE;IAChE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAChD;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAoB;IACzC;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgC;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;IACjD,OAAO,CAAC,MAAM,CAAC,CAAY;IAC3B,2EAA2E;IAC3E,OAAO,CAAC,OAAO,CAAC,CAAa;IAE7B;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,IAAI;IAuBxC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,IAAI;IAgBZ;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAoB9B;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAM5B,sEAAsE;IACtE,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED;;;;;;OAMG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BhD;;;;;OAKG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAM3B,8CAA8C;IAC9C,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;;;;;OAMG;IACH,IAAI,kBAAkB,IAAI,SAAS,MAAM,EAAE,CAE1C;IAED;;;;;OAKG;IACH,KAAK,IAAI,UAAU,EAAE;IAuBrB;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAsB5B;;;;;;;;;OASG;IACH,KAAK,IAAI,IAAI;CAcb;AA6BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CA4DnF"}
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
import { wrapUntrusted } from '../tools/untrusted-envelope.js';
|
|
2
|
+
import { isTerminalAgentTaskState } from '../types/agent/task.js';
|
|
3
|
+
import { getRootLogger } from '../utils/logger.js';
|
|
4
|
+
/**
|
|
5
|
+
* How many unclaimed announcements may wait for an owner at once.
|
|
6
|
+
*
|
|
7
|
+
* Derived from what it has to survive rather than picked. An entry lives here
|
|
8
|
+
* only between a gateway announcing a task and this run saying whether the
|
|
9
|
+
* task is its own — one microtask, for a launch made through `create_task`.
|
|
10
|
+
* The number that has to fit is therefore the largest batch of launches that
|
|
11
|
+
* can be in flight together before any of them is claimed: one assistant turn
|
|
12
|
+
* of `create_task` blocks, which this codebase's own tool description
|
|
13
|
+
* illustrates as "fan out 8 specialists" and which a provider bounds at a few
|
|
14
|
+
* dozen tool_use blocks per response. 32 clears that with room, and a batch
|
|
15
|
+
* bigger than it is announced rather than silently truncated.
|
|
16
|
+
*
|
|
17
|
+
* The ceiling is what stops this being the retention half of the leak it
|
|
18
|
+
* exists beside: on a gateway shared with other runs, every foreign completion
|
|
19
|
+
* lands here and is never claimed, and each one holds a whole worker result —
|
|
20
|
+
* kilobytes at least. Bounded, the cost is 32 handles; unbounded, it is every
|
|
21
|
+
* result every other run on that gateway ever produced.
|
|
22
|
+
*/
|
|
23
|
+
const UNOWNED_BUFFER_LIMIT = 32;
|
|
1
24
|
/**
|
|
2
25
|
* Completions that finished with nobody left to hear them.
|
|
3
26
|
*
|
|
@@ -34,8 +57,42 @@ export class CompletionInbox {
|
|
|
34
57
|
claimed = new Set();
|
|
35
58
|
/** Launched with nothing waiting on it, and not settled yet. */
|
|
36
59
|
outstanding = new Set();
|
|
60
|
+
/**
|
|
61
|
+
* Tasks THIS run launched.
|
|
62
|
+
*
|
|
63
|
+
* `onTaskCompleted` is a broadcast and `TaskHandle` carries no run id, so
|
|
64
|
+
* a gateway shared between two supervisors hands every completion to both
|
|
65
|
+
* of their inboxes. Measured: with two inboxes on one gateway, the run
|
|
66
|
+
* that launched nothing drained the other run's task and would have been
|
|
67
|
+
* told "a task you launched has finished" — a claim that was false, over
|
|
68
|
+
* another run's worker output, in a transcript whose model then has to
|
|
69
|
+
* account for it.
|
|
70
|
+
*
|
|
71
|
+
* A shared gateway is not an abuse of the API: `SupervisorAgentConfig`
|
|
72
|
+
* takes one, and a host that owns a gateway naturally reuses it.
|
|
73
|
+
*/
|
|
74
|
+
ours = new Set();
|
|
75
|
+
/**
|
|
76
|
+
* Announcements that arrived before anyone said whose task it was.
|
|
77
|
+
*
|
|
78
|
+
* `gateway.createTask` resolves one microtask before its caller can name
|
|
79
|
+
* the task, and a worker that finishes inside that window is announced
|
|
80
|
+
* first — `LocalTaskGateway` attaches its completion continuation before
|
|
81
|
+
* it returns the handle, so the ordering is guaranteed to be reachable
|
|
82
|
+
* rather than merely possible. Dropping an unowned announcement outright
|
|
83
|
+
* would therefore turn the leak fix into a LOST RESULT for exactly the
|
|
84
|
+
* fast completions the inbox exists to catch.
|
|
85
|
+
*
|
|
86
|
+
* So they wait here, and ownership may be claimed retroactively. What
|
|
87
|
+
* makes that safe rather than a second leak is the bound: on a gateway
|
|
88
|
+
* shared with other runs this fills with completions that will never be
|
|
89
|
+
* claimed, each holding a whole worker result.
|
|
90
|
+
*/
|
|
91
|
+
unowned = new Map();
|
|
37
92
|
arrivals = new Set();
|
|
38
93
|
detach;
|
|
94
|
+
/** Kept for {@link launched}: the source of truth about a task's state. */
|
|
95
|
+
gateway;
|
|
39
96
|
/**
|
|
40
97
|
* Start listening.
|
|
41
98
|
*
|
|
@@ -47,7 +104,16 @@ export class CompletionInbox {
|
|
|
47
104
|
attach(gateway) {
|
|
48
105
|
if (this.detach)
|
|
49
106
|
return this.detach;
|
|
107
|
+
this.gateway = gateway;
|
|
50
108
|
this.detach = gateway.onTaskCompleted((handle) => {
|
|
109
|
+
// Not known to be ours — either another run's worker on a shared
|
|
110
|
+
// gateway, or ours announced before the launch could be recorded.
|
|
111
|
+
// The two are indistinguishable here, so it waits rather than
|
|
112
|
+
// being delivered or dropped. See {@link unowned}.
|
|
113
|
+
if (!this.ours.has(handle.taskId)) {
|
|
114
|
+
this.hold(handle);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
51
117
|
// A completion claimed before it was announced — a tool that
|
|
52
118
|
// finished its wait faster than the listener ran — is already
|
|
53
119
|
// delivered. Nothing to queue.
|
|
@@ -60,16 +126,85 @@ export class CompletionInbox {
|
|
|
60
126
|
});
|
|
61
127
|
return this.detach;
|
|
62
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Park an announcement nobody has claimed yet, evicting the oldest if the
|
|
131
|
+
* buffer is full.
|
|
132
|
+
*
|
|
133
|
+
* An eviction is logged at WARN, and that is not decoration. If the entry
|
|
134
|
+
* turned out to be ours, its completion has just been dropped — the
|
|
135
|
+
* original defect, wearing the cap as a disguise — and the only evidence
|
|
136
|
+
* would otherwise be an absence, which is precisely the shape of failure
|
|
137
|
+
* this whole session has been closing. A reader who sees this line knows
|
|
138
|
+
* where to look.
|
|
139
|
+
*/
|
|
140
|
+
hold(handle) {
|
|
141
|
+
if (this.unowned.size >= UNOWNED_BUFFER_LIMIT && !this.unowned.has(handle.taskId)) {
|
|
142
|
+
const oldest = this.unowned.keys().next();
|
|
143
|
+
if (!oldest.done) {
|
|
144
|
+
this.unowned.delete(oldest.value);
|
|
145
|
+
getRootLogger()
|
|
146
|
+
.child({ component: 'CompletionInbox' })
|
|
147
|
+
.warn("Unclaimed completion buffer is full — dropped the oldest. If that task was this run's, its result is now unreachable; raise UNOWNED_BUFFER_LIMIT or launch fewer tasks per turn.", { dropped: oldest.value, limit: UNOWNED_BUFFER_LIMIT });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
this.unowned.set(handle.taskId, handle);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Say that this run launched the task.
|
|
154
|
+
*
|
|
155
|
+
* Required before anything about the task can reach this inbox — see
|
|
156
|
+
* {@link ours}. Every launch says it, whether or not something is waiting
|
|
157
|
+
* on the result, because the case the inbox exists for is precisely the
|
|
158
|
+
* one where the waiter gave up.
|
|
159
|
+
*
|
|
160
|
+
* **The late-announcement branches are not defensive.**
|
|
161
|
+
* `gateway.createTask` resolves one microtask before its caller can say
|
|
162
|
+
* who owns the task, and a worker that finishes inside that window is
|
|
163
|
+
* announced first — the same ordering that used to leave a permanent
|
|
164
|
+
* pending flag. Without recovery the ownership check would turn that race
|
|
165
|
+
* from a stale flag into a lost result.
|
|
166
|
+
*
|
|
167
|
+
* There are two, and the second is the safety net for the first. The
|
|
168
|
+
* buffer ({@link unowned}) needs nothing from the gateway beyond the
|
|
169
|
+
* announcement it already made. Asking `getTask` covers the case the
|
|
170
|
+
* buffer cannot — an announcement evicted under load — but it rests on a
|
|
171
|
+
* gateway still knowing about a task it has just settled, which is a
|
|
172
|
+
* property of the implementations here rather than of the `TaskGateway`
|
|
173
|
+
* contract, and `getTask`'s own docs now say so.
|
|
174
|
+
*/
|
|
175
|
+
launched(taskId) {
|
|
176
|
+
if (this.ours.has(taskId))
|
|
177
|
+
return;
|
|
178
|
+
this.ours.add(taskId);
|
|
179
|
+
if (this.claimed.has(taskId) || this.unheard.has(taskId))
|
|
180
|
+
return;
|
|
181
|
+
const parked = this.unowned.get(taskId);
|
|
182
|
+
if (parked) {
|
|
183
|
+
this.unowned.delete(taskId);
|
|
184
|
+
this.unheard.set(taskId, parked);
|
|
185
|
+
for (const wake of [...this.arrivals])
|
|
186
|
+
wake();
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const settled = this.gateway?.getTask(taskId);
|
|
190
|
+
if (!settled || !isTerminalAgentTaskState(settled.state))
|
|
191
|
+
return;
|
|
192
|
+
this.unheard.set(taskId, settled);
|
|
193
|
+
for (const wake of [...this.arrivals])
|
|
194
|
+
wake();
|
|
195
|
+
}
|
|
63
196
|
/**
|
|
64
197
|
* Say that a task was launched with nothing waiting on it.
|
|
65
198
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
199
|
+
* {@link launched} plus the statement that no call will deliver the
|
|
200
|
+
* result. Without the second half the inbox can only see completions that
|
|
201
|
+
* have already happened, and a run whose supervisor launched a background
|
|
202
|
+
* worker and then answered would settle while the worker was still going —
|
|
203
|
+
* throwing away the very result the launch existed to produce. Knowing a
|
|
204
|
+
* task is outstanding is what lets the loop hold the run open for it.
|
|
71
205
|
*/
|
|
72
206
|
expect(taskId) {
|
|
207
|
+
this.launched(taskId);
|
|
73
208
|
if (this.claimed.has(taskId))
|
|
74
209
|
return;
|
|
75
210
|
this.outstanding.add(taskId);
|
|
@@ -122,6 +257,16 @@ export class CompletionInbox {
|
|
|
122
257
|
get hasUnheard() {
|
|
123
258
|
return this.unheard.size > 0;
|
|
124
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Tasks this run launched that are still running.
|
|
262
|
+
*
|
|
263
|
+
* Read when a run ends, so it can say which work it walked away from.
|
|
264
|
+
* Nothing here is cancelled by being read — the ids are a statement, and
|
|
265
|
+
* what to do about them is the host's call.
|
|
266
|
+
*/
|
|
267
|
+
get outstandingTaskIds() {
|
|
268
|
+
return [...this.outstanding];
|
|
269
|
+
}
|
|
125
270
|
/**
|
|
126
271
|
* Take every unheard completion, leaving the inbox empty.
|
|
127
272
|
*
|
|
@@ -133,8 +278,22 @@ export class CompletionInbox {
|
|
|
133
278
|
return [];
|
|
134
279
|
const handles = [...this.unheard.values()];
|
|
135
280
|
this.unheard.clear();
|
|
136
|
-
for (const handle of handles)
|
|
281
|
+
for (const handle of handles) {
|
|
137
282
|
this.claimed.add(handle.taskId);
|
|
283
|
+
// A delivered result is not pending WORK, and `outstanding` can
|
|
284
|
+
// still be holding this id — the listener clears it, but only if
|
|
285
|
+
// the announcement came AFTER the launching tool said `expect`.
|
|
286
|
+
// The other order is reachable: `expect` runs one microtask after
|
|
287
|
+
// `gateway.createTask` resolves, and the gateway's own completion
|
|
288
|
+
// callback can win that race for a task that finished fast. Then
|
|
289
|
+
// `expect` re-adds an id the listener had nothing to remove, and
|
|
290
|
+
// nothing else ever takes it off — so `hasPendingWork` stayed true
|
|
291
|
+
// for the rest of the run and every attempt to settle paid the
|
|
292
|
+
// full grace period waiting for a result already in the transcript.
|
|
293
|
+
//
|
|
294
|
+
// Symmetric with `claim`, which clears it for the same reason.
|
|
295
|
+
this.outstanding.delete(handle.taskId);
|
|
296
|
+
}
|
|
138
297
|
return handles;
|
|
139
298
|
}
|
|
140
299
|
/**
|
|
@@ -168,12 +327,25 @@ export class CompletionInbox {
|
|
|
168
327
|
for (const wake of [...this.arrivals])
|
|
169
328
|
wake();
|
|
170
329
|
}
|
|
171
|
-
/**
|
|
330
|
+
/**
|
|
331
|
+
* Stop listening. Safe to call more than once.
|
|
332
|
+
*
|
|
333
|
+
* A run that ends without this leaves its listener on the gateway
|
|
334
|
+
* forever. On a gateway the host reuses that is measurable — three
|
|
335
|
+
* sequential runs left three live subscriptions, each still holding its
|
|
336
|
+
* run's handles — and the listener set only grows. Ownership stops a
|
|
337
|
+
* retained listener from DELIVERING another run's work; closing is what
|
|
338
|
+
* stops it existing.
|
|
339
|
+
*/
|
|
172
340
|
close() {
|
|
173
341
|
this.detach?.();
|
|
174
342
|
this.detach = undefined;
|
|
343
|
+
this.gateway = undefined;
|
|
175
344
|
this.unheard.clear();
|
|
176
345
|
this.outstanding.clear();
|
|
346
|
+
this.ours.clear();
|
|
347
|
+
this.claimed.clear();
|
|
348
|
+
this.unowned.clear();
|
|
177
349
|
// Release anyone still waiting. A closed inbox would otherwise hold
|
|
178
350
|
// them to their own deadline for a completion that can no longer come.
|
|
179
351
|
for (const wake of [...this.arrivals])
|
|
@@ -183,6 +355,28 @@ export class CompletionInbox {
|
|
|
183
355
|
}
|
|
184
356
|
/** How much of a worker's output rides in the notification itself. */
|
|
185
357
|
const NOTIFICATION_OUTPUT_LIMIT = 4_000;
|
|
358
|
+
const NOTIFICATION_DELIMITER = /task-notification/gi;
|
|
359
|
+
/**
|
|
360
|
+
* Defang this file's own delimiter inside a worker's text.
|
|
361
|
+
*
|
|
362
|
+
* Without it a worker whose output contains `</task-notification>` closes the
|
|
363
|
+
* block early, and everything it wrote after that sits OUTSIDE the boundary —
|
|
364
|
+
* reading as ordinary transcript rather than as a delegate's material.
|
|
365
|
+
* Measured before the fix: two closing tags in one notification, with
|
|
366
|
+
* attacker-controlled text between them.
|
|
367
|
+
*
|
|
368
|
+
* The replacement swaps the hyphen for an underscore rather than appending a
|
|
369
|
+
* suffix, for the reason `neutralizeEnvelopeDelimiter` records: a replacement
|
|
370
|
+
* that still CONTAINS the token is found again by a second pass or by any
|
|
371
|
+
* looser matcher downstream. `task_notification` shares no substring with the
|
|
372
|
+
* real delimiter while staying legible.
|
|
373
|
+
*
|
|
374
|
+
* The nested `<namzu-untrusted>` block defangs its own delimiter; these two
|
|
375
|
+
* patterns are disjoint, so the order they run in does not matter.
|
|
376
|
+
*/
|
|
377
|
+
function neutralizeNotificationDelimiter(content) {
|
|
378
|
+
return content.replace(NOTIFICATION_DELIMITER, 'task_notification');
|
|
379
|
+
}
|
|
186
380
|
/**
|
|
187
381
|
* The message a supervisor reads when a worker it stopped waiting for
|
|
188
382
|
* finishes.
|
|
@@ -200,20 +394,46 @@ export function formatCompletionNotification(handles) {
|
|
|
200
394
|
const blocks = handles.map((handle) => {
|
|
201
395
|
const durationMs = handle.completedAt ? handle.completedAt - handle.createdAt : undefined;
|
|
202
396
|
const output = handle.result?.result ?? handle.result?.lastError ?? '';
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
397
|
+
const overLimit = output.length > NOTIFICATION_OUTPUT_LIMIT;
|
|
398
|
+
const shown = overLimit ? output.slice(0, NOTIFICATION_OUTPUT_LIMIT) : output;
|
|
399
|
+
// Framed for the same reason the blocking `create_task` frames its
|
|
400
|
+
// return value, and this path is the one that had nothing. A delegated
|
|
401
|
+
// worker is the component most likely to have consumed material nobody
|
|
402
|
+
// in this run authored — it was told to read and report, and it ran
|
|
403
|
+
// `read`, `grep`, `fetch` over whatever it found — and its text lands
|
|
404
|
+
// in a parent that typically holds the broader tool grant. The same
|
|
405
|
+
// bytes were being wrapped on one path and pasted bare on this one.
|
|
406
|
+
//
|
|
407
|
+
// The metadata above stays OUTSIDE the envelope: the task id, the agent
|
|
408
|
+
// and the state are this kernel's own statements, and framing them as
|
|
409
|
+
// untrusted material would tell the model to discount the only part of
|
|
410
|
+
// the message it can rely on.
|
|
411
|
+
const body = shown.length > 0
|
|
412
|
+
? wrapUntrusted({
|
|
413
|
+
kind: 'agent-result',
|
|
414
|
+
attributes: { agent: handle.agentId, task: handle.taskId },
|
|
415
|
+
provenance: `This is the output of the delegated agent "${handle.agentId}", not this agent's own work.`,
|
|
416
|
+
}, neutralizeNotificationDelimiter(shown))
|
|
417
|
+
: '(the task produced no output)';
|
|
210
418
|
const lines = [
|
|
211
419
|
`task_id: ${handle.taskId}`,
|
|
212
420
|
`agent: ${handle.agentId}`,
|
|
213
421
|
`state: ${handle.state}`,
|
|
214
422
|
...(durationMs !== undefined ? [`duration_ms: ${durationMs}`] : []),
|
|
215
423
|
'',
|
|
216
|
-
|
|
424
|
+
body,
|
|
425
|
+
// Outside the envelope, deliberately: this sentence is an
|
|
426
|
+
// instruction from the kernel about how to get the rest, and inside
|
|
427
|
+
// the envelope the model has just been told not to treat the
|
|
428
|
+
// contents as instructions.
|
|
429
|
+
//
|
|
430
|
+
// `wait_for_task`, not `agent_task_list` — the listing takes only a
|
|
431
|
+
// state filter, so an instruction to call it "with task_id" named a
|
|
432
|
+
// parameter that does not exist and could not be followed. On an
|
|
433
|
+
// already-finished task the wait returns immediately.
|
|
434
|
+
...(overLimit
|
|
435
|
+
? [`… truncated. Call wait_for_task with task_id "${handle.taskId}" for the full output.`]
|
|
436
|
+
: []),
|
|
217
437
|
];
|
|
218
438
|
return `<task-notification>\n${lines.join('\n')}\n</task-notification>`;
|
|
219
439
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-inbox.js","sourceRoot":"","sources":["../../src/gateway/completion-inbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"completion-inbox.js","sourceRoot":"","sources":["../../src/gateway/completion-inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAE9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,oBAAoB,GAAG,EAAE,CAAA;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,OAAO,eAAe;IACV,OAAO,GAAG,IAAI,GAAG,EAAsB,CAAA;IACvC,OAAO,GAAG,IAAI,GAAG,EAAU,CAAA;IAC5C,gEAAgE;IAC/C,WAAW,GAAG,IAAI,GAAG,EAAU,CAAA;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,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;gBAC1D,UAAU,EAAE,8CAA8C,MAAM,CAAC,OAAO,+BAA+B;aACvG,EACD,+BAA+B,CAAC,KAAK,CAAC,CACtC;YACF,CAAC,CAAC,+BAA+B,CAAA;QAEnC,MAAM,KAAK,GAAG;YACb,YAAY,MAAM,CAAC,MAAM,EAAE;YAC3B,UAAU,MAAM,CAAC,OAAO,EAAE;YAC1B,UAAU,MAAM,CAAC,KAAK,EAAE;YACxB,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,gBAAgB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACnE,EAAE;YACF,IAAI;YACJ,0DAA0D;YAC1D,oEAAoE;YACpE,6DAA6D;YAC7D,4BAA4B;YAC5B,EAAE;YACF,oEAAoE;YACpE,oEAAoE;YACpE,iEAAiE;YACjE,sDAAsD;YACtD,GAAG,CAAC,SAAS;gBACZ,CAAC,CAAC,CAAC,iDAAiD,MAAM,CAAC,MAAM,wBAAwB,CAAC;gBAC1F,CAAC,CAAC,EAAE,CAAC;SACN,CAAA;QACD,OAAO,wBAAwB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAA;IACxE,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GACb,OAAO,CAAC,MAAM,KAAK,CAAC;QACnB,CAAC,CAAC,qIAAqI;QACvI,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,6IAA6I,CAAA;IAElK,OAAO,GAAG,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;AAC/C,CAAC"}
|
package/dist/gateway/local.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export declare class LocalTaskGateway implements TaskGateway {
|
|
|
26
26
|
*/
|
|
27
27
|
private settledHandles;
|
|
28
28
|
private siblingFailurePolicy;
|
|
29
|
+
/** See {@link onTaskProgress}. */
|
|
30
|
+
private readonly progressListeners;
|
|
29
31
|
constructor(agentManager: AgentManagerContract, taskContext: AgentTaskContext, listener?: RunEventListener, parentInput?: Pick<AgentInput, 'taskStore' | 'runtimeToolOverrides' | 'runtimeContext'>, options?: {
|
|
30
32
|
siblingFailurePolicy?: SiblingFailurePolicy;
|
|
31
33
|
});
|
|
@@ -58,6 +60,15 @@ export declare class LocalTaskGateway implements TaskGateway {
|
|
|
58
60
|
*/
|
|
59
61
|
rememberSettled(taskId: TaskId): void;
|
|
60
62
|
listTasks(): TaskHandle[];
|
|
63
|
+
/**
|
|
64
|
+
* Every event a child emits, reduced to "this one is still alive".
|
|
65
|
+
*
|
|
66
|
+
* Deliberately just the id. A caller that wanted the event itself has
|
|
67
|
+
* the run listener; what an idle clock needs is the fact, and passing
|
|
68
|
+
* the payload here would make this a second way to read a worker's
|
|
69
|
+
* output — one nobody documented and nothing frames as untrusted.
|
|
70
|
+
*/
|
|
71
|
+
onTaskProgress(callback: (taskId: TaskId) => void): () => void;
|
|
61
72
|
onTaskCompleted(callback: (handle: TaskHandle) => void): () => void;
|
|
62
73
|
}
|
|
63
74
|
//# sourceMappingURL=local.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../src/gateway/local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EACX,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,UAAU,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAI9D,qBAAa,gBAAiB,YAAW,WAAW;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gBAAgB,EAC3B,WAAW,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,sBAAsB,GAAG,gBAAgB,CAAC,EACvF,OAAO,CAAC,EAAE;QAAE,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;KAAE;IAWpD,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC;IAsEjE;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,kBAAkB;IA0BpB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAShD,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlE,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIhC,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAK/C;;;;OAIG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAKrC,SAAS,IAAI,UAAU,EAAE;IAgBzB;;;;;;;OAOG;IACH,cAAc,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;IAO9D,eAAe,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GAAG,MAAM,IAAI;CAMnE"}
|
package/dist/gateway/local.js
CHANGED
|
@@ -23,6 +23,8 @@ export class LocalTaskGateway {
|
|
|
23
23
|
*/
|
|
24
24
|
settledHandles = new Map();
|
|
25
25
|
siblingFailurePolicy = 'continue';
|
|
26
|
+
/** See {@link onTaskProgress}. */
|
|
27
|
+
progressListeners = new Set();
|
|
26
28
|
constructor(agentManager, taskContext, listener, parentInput, options) {
|
|
27
29
|
this.agentManager = agentManager;
|
|
28
30
|
this.taskContext = taskContext;
|
|
@@ -60,7 +62,17 @@ export class LocalTaskGateway {
|
|
|
60
62
|
// the parent's untouched `remaining` and N children were each
|
|
61
63
|
// allocated `maxBudgetFraction` of the SAME number — N x 50% of a
|
|
62
64
|
// budget that only had 100% in it.
|
|
63
|
-
this.taskContext,
|
|
65
|
+
this.taskContext,
|
|
66
|
+
// The host's listener still sees everything it always did; this
|
|
67
|
+
// only tees off the fact that SOMETHING happened, which is what an
|
|
68
|
+
// idle bound measures. The event itself is not forwarded — a
|
|
69
|
+
// progress signal that carried the child's output would be a
|
|
70
|
+
// second, undocumented way to read a worker's work.
|
|
71
|
+
(event) => {
|
|
72
|
+
this.listener?.(event);
|
|
73
|
+
for (const notify of this.progressListeners)
|
|
74
|
+
notify(task.taskId);
|
|
75
|
+
});
|
|
64
76
|
this.trackedTaskIds.add(task.taskId);
|
|
65
77
|
this.agentManager
|
|
66
78
|
.waitForCompletion(task.taskId)
|
|
@@ -174,6 +186,20 @@ export class LocalTaskGateway {
|
|
|
174
186
|
}
|
|
175
187
|
return handles;
|
|
176
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Every event a child emits, reduced to "this one is still alive".
|
|
191
|
+
*
|
|
192
|
+
* Deliberately just the id. A caller that wanted the event itself has
|
|
193
|
+
* the run listener; what an idle clock needs is the fact, and passing
|
|
194
|
+
* the payload here would make this a second way to read a worker's
|
|
195
|
+
* output — one nobody documented and nothing frames as untrusted.
|
|
196
|
+
*/
|
|
197
|
+
onTaskProgress(callback) {
|
|
198
|
+
this.progressListeners.add(callback);
|
|
199
|
+
return () => {
|
|
200
|
+
this.progressListeners.delete(callback);
|
|
201
|
+
};
|
|
202
|
+
}
|
|
177
203
|
onTaskCompleted(callback) {
|
|
178
204
|
this.completionListeners.add(callback);
|
|
179
205
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../src/gateway/local.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AA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;YA8CJ,cAAc;IAsB5B,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,0BAA0B;IAQlC,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,IAAI;IAaZ,OAAO,CAAC,YAAY;CAYpB;AA+CD,OAAO,EAAE,0BAA0B,EAAE,CAAA"}
|
|
@@ -189,6 +189,12 @@ export class AgentManager {
|
|
|
189
189
|
parentSpan: options.configOverrides?.parentSpan,
|
|
190
190
|
maxIterations: options.configOverrides?.maxIterations,
|
|
191
191
|
maxResponseTokens: options.configOverrides?.maxResponseTokens,
|
|
192
|
+
// A delegate spawned without a configBuilder lands here, and this
|
|
193
|
+
// list is the only thing it inherits. Omitting these meant a child
|
|
194
|
+
// silently ran at the default depth and effort its parent had
|
|
195
|
+
// deliberately moved off.
|
|
196
|
+
thinking: options.configOverrides?.thinking,
|
|
197
|
+
effort: options.configOverrides?.effort,
|
|
192
198
|
env: options.configOverrides?.env,
|
|
193
199
|
sessionId: spawnRecord.childSessionId,
|
|
194
200
|
threadId: context.threadId,
|