@namzu/sdk 6.0.0 → 6.2.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +254 -0
  2. package/dist/agents/SupervisorAgent.d.ts.map +1 -1
  3. package/dist/agents/SupervisorAgent.js +18 -0
  4. package/dist/agents/SupervisorAgent.js.map +1 -1
  5. package/dist/agents/__tests__/supervisor-coordinator-registration.test.js +31 -0
  6. package/dist/agents/__tests__/supervisor-coordinator-registration.test.js.map +1 -1
  7. package/dist/gateway/__tests__/completion-inbox.test.d.ts +2 -0
  8. package/dist/gateway/__tests__/completion-inbox.test.d.ts.map +1 -0
  9. package/dist/gateway/__tests__/completion-inbox.test.js +275 -0
  10. package/dist/gateway/__tests__/completion-inbox.test.js.map +1 -0
  11. package/dist/gateway/completion-inbox.d.ts +113 -0
  12. package/dist/gateway/completion-inbox.d.ts.map +1 -0
  13. package/dist/gateway/completion-inbox.js +225 -0
  14. package/dist/gateway/completion-inbox.js.map +1 -0
  15. package/dist/public-runtime.d.ts +1 -0
  16. package/dist/public-runtime.d.ts.map +1 -1
  17. package/dist/public-runtime.js +4 -0
  18. package/dist/public-runtime.js.map +1 -1
  19. package/dist/registry/tool/__tests__/dialect.test.js +8 -5
  20. package/dist/registry/tool/__tests__/dialect.test.js.map +1 -1
  21. package/dist/registry/tool/dialect.js +11 -4
  22. package/dist/registry/tool/dialect.js.map +1 -1
  23. package/dist/registry/tool/execute.d.ts.map +1 -1
  24. package/dist/registry/tool/execute.js +34 -0
  25. package/dist/registry/tool/execute.js.map +1 -1
  26. package/dist/runtime/query/__tests__/completion-notification.test.d.ts +2 -0
  27. package/dist/runtime/query/__tests__/completion-notification.test.d.ts.map +1 -0
  28. package/dist/runtime/query/__tests__/completion-notification.test.js +168 -0
  29. package/dist/runtime/query/__tests__/completion-notification.test.js.map +1 -0
  30. package/dist/runtime/query/__tests__/run-survives-its-own-park.proc-test.d.ts +2 -0
  31. package/dist/runtime/query/__tests__/run-survives-its-own-park.proc-test.d.ts.map +1 -0
  32. package/dist/runtime/query/__tests__/run-survives-its-own-park.proc-test.js +122 -0
  33. package/dist/runtime/query/__tests__/run-survives-its-own-park.proc-test.js.map +1 -0
  34. package/dist/runtime/query/__tests__/step-allow-list.test.d.ts +2 -0
  35. package/dist/runtime/query/__tests__/step-allow-list.test.d.ts.map +1 -0
  36. package/dist/runtime/query/__tests__/step-allow-list.test.js +171 -0
  37. package/dist/runtime/query/__tests__/step-allow-list.test.js.map +1 -0
  38. package/dist/runtime/query/executor.d.ts +14 -0
  39. package/dist/runtime/query/executor.d.ts.map +1 -1
  40. package/dist/runtime/query/executor.js +20 -1
  41. package/dist/runtime/query/executor.js.map +1 -1
  42. package/dist/runtime/query/index.d.ts +9 -0
  43. package/dist/runtime/query/index.d.ts.map +1 -1
  44. package/dist/runtime/query/index.js +1 -0
  45. package/dist/runtime/query/index.js.map +1 -1
  46. package/dist/runtime/query/iteration/index.d.ts.map +1 -1
  47. package/dist/runtime/query/iteration/index.js +74 -1
  48. package/dist/runtime/query/iteration/index.js.map +1 -1
  49. package/dist/runtime/query/iteration/phases/context.d.ts +9 -0
  50. package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
  51. package/dist/runtime/query/iteration/phases/context.js +43 -13
  52. package/dist/runtime/query/iteration/phases/context.js.map +1 -1
  53. package/dist/tools/builtins/__tests__/bash.proc-test.d.ts +2 -0
  54. package/dist/tools/builtins/__tests__/bash.proc-test.d.ts.map +1 -0
  55. package/dist/tools/builtins/__tests__/bash.proc-test.js +115 -0
  56. package/dist/tools/builtins/__tests__/bash.proc-test.js.map +1 -0
  57. package/dist/tools/builtins/__tests__/bash.test.d.ts +2 -0
  58. package/dist/tools/builtins/__tests__/bash.test.d.ts.map +1 -0
  59. package/dist/tools/builtins/__tests__/bash.test.js +65 -0
  60. package/dist/tools/builtins/__tests__/bash.test.js.map +1 -0
  61. package/dist/tools/builtins/bash.d.ts.map +1 -1
  62. package/dist/tools/builtins/bash.js +89 -17
  63. package/dist/tools/builtins/bash.js.map +1 -1
  64. package/dist/tools/coordinator/__tests__/allow-delegation.test.d.ts +2 -0
  65. package/dist/tools/coordinator/__tests__/allow-delegation.test.d.ts.map +1 -0
  66. package/dist/tools/coordinator/__tests__/allow-delegation.test.js +94 -0
  67. package/dist/tools/coordinator/__tests__/allow-delegation.test.js.map +1 -0
  68. package/dist/tools/coordinator/__tests__/completion-delivery.test.d.ts +2 -0
  69. package/dist/tools/coordinator/__tests__/completion-delivery.test.d.ts.map +1 -0
  70. package/dist/tools/coordinator/__tests__/completion-delivery.test.js +255 -0
  71. package/dist/tools/coordinator/__tests__/completion-delivery.test.js.map +1 -0
  72. package/dist/tools/coordinator/__tests__/task-list.test.js +13 -7
  73. package/dist/tools/coordinator/__tests__/task-list.test.js.map +1 -1
  74. package/dist/tools/coordinator/index.d.ts +44 -0
  75. package/dist/tools/coordinator/index.d.ts.map +1 -1
  76. package/dist/tools/coordinator/index.js +239 -16
  77. package/dist/tools/coordinator/index.js.map +1 -1
  78. package/dist/types/agent/supervisor.d.ts +27 -0
  79. package/dist/types/agent/supervisor.d.ts.map +1 -1
  80. package/dist/types/tool/index.d.ts +13 -0
  81. package/dist/types/tool/index.d.ts.map +1 -1
  82. package/dist/types/tool/index.js.map +1 -1
  83. package/package.json +3 -2
  84. package/src/agents/SupervisorAgent.ts +19 -0
  85. package/src/agents/__tests__/supervisor-coordinator-registration.test.ts +37 -0
  86. package/src/gateway/__tests__/completion-inbox.test.ts +343 -0
  87. package/src/gateway/completion-inbox.ts +241 -0
  88. package/src/public-runtime.ts +4 -0
  89. package/src/registry/tool/__tests__/dialect.test.ts +8 -5
  90. package/src/registry/tool/dialect.ts +11 -4
  91. package/src/registry/tool/execute.ts +35 -0
  92. package/src/runtime/query/__tests__/completion-notification.test.ts +196 -0
  93. package/src/runtime/query/__tests__/run-survives-its-own-park.proc-test.ts +127 -0
  94. package/src/runtime/query/__tests__/step-allow-list.test.ts +205 -0
  95. package/src/runtime/query/executor.ts +21 -1
  96. package/src/runtime/query/index.ts +11 -0
  97. package/src/runtime/query/iteration/index.ts +77 -1
  98. package/src/runtime/query/iteration/phases/context.ts +51 -15
  99. package/src/tools/builtins/__tests__/bash.proc-test.ts +142 -0
  100. package/src/tools/builtins/__tests__/bash.test.ts +79 -0
  101. package/src/tools/builtins/bash.ts +100 -18
  102. package/src/tools/coordinator/__tests__/allow-delegation.test.ts +120 -0
  103. package/src/tools/coordinator/__tests__/completion-delivery.test.ts +347 -0
  104. package/src/tools/coordinator/__tests__/task-list.test.ts +13 -7
  105. package/src/tools/coordinator/index.ts +278 -21
  106. package/src/types/agent/supervisor.ts +28 -0
  107. package/src/types/tool/index.ts +13 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,259 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9d4cf61: a supervisor can decline to delegate without lying about its roster
8
+
9
+ `SupervisorAgentConfig` gains `allowDelegation?: boolean`, default `true`.
10
+
11
+ The roster answered WHO a run may call. Nothing answered WHETHER it may call
12
+ anyone, and the two are different questions. A host that runs one specialist by
13
+ putting its persona into the supervisor shell and its id into the roster has a
14
+ non-empty roster and must still delegate to nobody — and got the full
15
+ delegation surface, discovering the refusal only by spending a turn on it.
16
+
17
+ It cannot be derived. Comparing the roster against the executing agent fails in
18
+ exactly that arrangement, because the ids differ. And no predicate over the
19
+ roster could work: a supervisor whose roster holds one specialist and a run
20
+ that IS that specialist are indistinguishable in it. So the caller states the
21
+ fact and the SDK decides what it implies for its own tool surface — which also
22
+ means the implied list cannot go stale, the way a caller-held list of tool
23
+ names silently did when this surface went from two tools to four.
24
+
25
+ Details worth knowing:
26
+
27
+ - **`agent_task_list` stays.** A run that may not launch anything may still want
28
+ to see what is running.
29
+ - **`approve_plan` and `ask_user_question` are untouched.** They are the
30
+ human-in-the-loop surface, not delegation.
31
+ - **`allowDelegation: false` is absolute.** `runtimeToolOverrides` cannot put
32
+ the tools back: the override pass runs over the tools this flag declined to
33
+ build, and both values come from the same caller in the same call, so
34
+ "must not delegate" plus "give it `create_task`" is a contradiction rather
35
+ than extra knowledge. `agentIds: []` has always worked this way.
36
+ - **Absent and `true` are identical**, so adopting the flag cannot change a
37
+ caller that opts in explicitly.
38
+
39
+ ### Patch Changes
40
+
41
+ - 9d4cf61: cancelling a task no longer deletes a result it had already produced
42
+
43
+ `CompletionInbox.forget` cleared both the outstanding-work set and the queue of
44
+ completions waiting to be announced. The second was wrong.
45
+
46
+ A background worker finishes, its completion is queued for the next drain, and
47
+ the model — told nothing yet, and reading a tool that says it cancels a
48
+ _running_ task — cancels it. The run then reported `cancelled` over work that
49
+ had been done, and the output existed nowhere else: not announced, not
50
+ claimable, not readable through the listing.
51
+
52
+ `forget` is about pending work, and a finished result is not pending work. It
53
+ now narrows to the outstanding set. The asymmetry with `claim`, which does clear
54
+ the queue, is deliberate: there a tool has just handed the model the same
55
+ result.
56
+
57
+ - 6961d3b: a failing shell command now says what happened, and its own deadline is the one that fires
58
+
59
+ **The failure path threw away everything useful.** The host branch of `bash`
60
+ called `exec` with no `catch`, and `exec` rejects on a non-zero exit. So the two
61
+ things an agent runs a shell for most — a test run and a build — both threw, the
62
+ registry turned the throw into "the tool failed", and the stdout, stderr and
63
+ exit code that explain why were discarded. The rejection carries all three.
64
+
65
+ The sandbox branch a few lines above already reported them, so the same command
66
+ told the model two different amounts depending on where it happened to run. It
67
+ now reports the exit code, both streams, and — separately — whether the command
68
+ ran out of time, because "timed out" and "exited 1" lead to different next moves
69
+ and the model acts on the message.
70
+
71
+ A caller-owned abort still propagates as an abort rather than being reported as
72
+ a command failure.
73
+
74
+ **Two clocks, one of them undeclared.** `bash` enforces the `timeout` it is
75
+ given; the executor enforces a separate per-tool deadline, and with none
76
+ declared here it fell back to its generic default — also two minutes. The two
77
+ agreed by coincidence and diverged the moment a model asked for longer because
78
+ it knew a build was slow: it got two minutes, from a clock it had not been told
79
+ about, reported as an abandoned tool rather than as a command that ran out of
80
+ time.
81
+
82
+ The tool now declares a deadline above the ceiling its input accepts, so its own
83
+ clock is the one that fires. A request past the ceiling is **refused** rather
84
+ than silently clamped — a number the model was not told had changed is how it
85
+ learns to distrust its own arguments. The ceiling is ten minutes, overridable
86
+ with `NAMZU_BASH_MAX_TIMEOUT_MS`.
87
+
88
+ **And it now has tests.** The only builtin that runs a shell had none, which is
89
+ how the swallowed failure shipped. Thirteen cases, mutation-checked: neutralising
90
+ the failure path fails four of them.
91
+
92
+ - 06fb51b: a run no longer kills its own process while waiting, mid-turn, and report success
93
+
94
+ `namzu run` and `namzu run-stream` could not finish a turn. The first tool call
95
+ completed and the process ended: no second turn, nothing written, no terminal
96
+ event, **exit code 0**. A user asking for a two-step task was told nothing had
97
+ gone wrong while nothing had been done.
98
+
99
+ Every human-in-the-loop park went through a timer that was deliberately
100
+ `unref`'d, so a pending park-recorder could never hold a process open after the
101
+ run settled. The hazard is real and the intent was right; the scope was wrong.
102
+ That promise is **awaited during the run**, on every park, including the
103
+ automatic ones a headless run resolves instantly. An `unref`'d timer does not
104
+ keep Node's event loop alive — so once the decision resolved and the run sat out
105
+ the rest of the delay, the loop had nothing left in it that counted, and the
106
+ process exited from under the run.
107
+
108
+ The timer is cancelled now instead of unref'd. It stays ref'd while the run is
109
+ genuinely waiting on it, and is cleared the moment the decision arrives, so
110
+ nothing dangles past the run either. A park that had already begun recording is
111
+ still awaited, so the unpark cannot race it.
112
+
113
+ Measured before and after on the same command: before, three events and an
114
+ unchanged file; after, the edit applied and a terminal event.
115
+
116
+ **Why no test caught it.** A test runner holds the event loop open for the whole
117
+ file, which is exactly the prop this bug hides behind — the entire suite passed
118
+ throughout, including tests that drive real runs against a live provider. The
119
+ regression test therefore spawns a real `node` process with nothing else in it,
120
+ and lives in its own suite (`pnpm --filter @namzu/sdk test:proc`, run as its own
121
+ CI step) because the spawn competes for CPU hard enough to flake the
122
+ timing-sensitive tests beside it.
123
+
124
+ ## 6.1.0
125
+
126
+ ### Minor Changes
127
+
128
+ - ab0bb30: a worker that finishes now reaches the supervisor, without polling for it
129
+
130
+ A delegated worker's output reaches the supervisor as the `tool_result` of
131
+ the `create_task` that launched it. That works while the launching call is
132
+ still the live path — and there are two situations where it is not:
133
+
134
+ - the call hit the executor's deadline. The model was told _"timed out… it
135
+ may still be running"_, with no task id, and the worker then finished
136
+ normally holding a result nothing would ever read.
137
+ - there was never a call waiting, because the launch was meant to run
138
+ alongside the turn.
139
+
140
+ In both cases the completion existed, the gateway remembered it, and the
141
+ supervisor was never told. The one tool left to it, `agent_task_list`,
142
+ reported id, state and duration — and dropped the worker's output, reading
143
+ `result.status` and `result.lastError` off the handle while stepping over
144
+ `result.result` between them. So a supervisor could learn that a task had
145
+ definitely finished and still have no way to read what it said.
146
+ `agent_task_list` in a sleep loop was not the model misbehaving; it was the
147
+ only move on the board.
148
+
149
+ **Completions are now delivered rather than polled for.** A run subscribes
150
+ once through `onTaskCompleted` — which every `TaskGateway` already has, so
151
+ no gateway changes — and anything a tool did not hand over inline arrives in
152
+ the transcript as a task notification carrying the id, the agent, the state
153
+ and the output.
154
+
155
+ The distinction is the whole design. An earlier version of this channel was
156
+ removed because it fired for completions the blocking tool had _already_
157
+ delivered, so the supervisor saw each result twice. Tools now claim what they
158
+ deliver, and only unclaimed completions are announced. A blocking
159
+ `create_task` behaves exactly as it did.
160
+
161
+ Three additions come with it:
162
+
163
+ - `create_task` takes `background: true`, returning a `task_id` immediately
164
+ so the supervisor can keep working.
165
+ - `wait_for_task` joins a running task and returns its output. `continue_task`
166
+ blocked, but only as a side effect of sending a message, so a supervisor
167
+ that merely wanted to wait had to invent something to say.
168
+ - `cancel_task` is mounted again. It was dropped on the reasoning that a
169
+ blocking launch leaves every worker terminal before its id is known — true
170
+ then, and untrue now that a background launch hands back a live one.
171
+
172
+ `agent_task_list` also carries the worker's output, in the rendered text
173
+ rather than only in `data`: the executor builds the model-facing tool result
174
+ from `output` alone, so a field added to `data` would have been added
175
+ somewhere the model cannot see.
176
+
177
+ A run no longer settles while a background worker it launched is still
178
+ running — it would have discarded the very result the launch existed to
179
+ produce. The wait is bounded, so a worker that never finishes cannot hold a
180
+ run open.
181
+
182
+ `CompletionInbox` and `formatCompletionNotification` are exported for hosts
183
+ that build the coordinator surface themselves.
184
+
185
+ - 529d10f: a narrowed step now narrows what can RUN, not only what the model is shown
186
+
187
+ `prepareStep.activeTools` documents itself as _"restrict which tools the model
188
+ may call this step, by name"_, and run-level `allowedTools` makes the same
189
+ promise for a whole run. Neither restricted anything.
190
+
191
+ The list decided which schemas went into the request. It was then copied into
192
+ the tool context and read by nothing on the execution path — the registry gated
193
+ on availability and plan mode, and never on the allow-list. So the narrowing was
194
+ a statement about the menu rather than about the kitchen: a model that named a
195
+ withheld tool had it run.
196
+
197
+ That is not a hypothetical. A model names a tool it was not offered whenever it
198
+ repeats a call from earlier in the context, whenever a gateway carries its own
199
+ tool list, and whenever a cached prompt prefix is replayed. A host using this to
200
+ fence a step — the obvious use, and the one the type invites — was fenced by
201
+ nothing.
202
+
203
+ The check now sits where the call is made. A tool outside the list is answered
204
+ with a refusal that names what IS available, so the model can route around it
205
+ rather than guessing.
206
+
207
+ Two details worth stating:
208
+
209
+ - **Absent is not empty.** No list means no restriction; an empty list means the
210
+ step may call nothing. Reading an empty allow-list as "unrestricted" is the
211
+ fail-open this repository has already been bitten by once, in the delegate
212
+ roster.
213
+ - **A step's list beats the run's,** matching the precedence the request already
214
+ used, so the two can no longer disagree.
215
+
216
+ **If you pass `allowedTools` or `activeTools` today, calls that previously ran
217
+ may now be refused.** That is the point of the change, but it is a real
218
+ behavioural difference: a run that quietly depended on the leak will start
219
+ seeing refusals. The refusal is a normal `tool_result`, so the turn continues.
220
+
221
+ ### Patch Changes
222
+
223
+ - 529d10f: a delegated child is no longer strangled by a file-read deadline, and a closed tuple stays closed
224
+
225
+ **The deadline.** `create_task` runs an entire agent and inherited the tool
226
+ executor's generic two-minute default — the one whose own docstring says _"a
227
+ tool that legitimately runs longer declares its own `timeoutMs`"_. It did not.
228
+
229
+ Measured on real traffic: three delegated children finished in 4m21s, 5m58s and
230
+ 8m04s while all three parents timed out at 120s. The children were never killed
231
+ — only the parent's wait was — so the blocking path was not occasionally missed,
232
+ it was structurally unreachable, and the supervisor was left calling
233
+ `agent_task_list` in a sleep loop because nothing else was available to it.
234
+
235
+ `DELEGATION_TIMEOUT_MS` is now one hour, exported so it is greppable, and
236
+ applied to `create_task`, `wait_for_task` and `continue_task`. An hour rather
237
+ than "a bit more than eight minutes" because a generic stopwatch is the wrong
238
+ instrument for a child that is making progress: a failure should come from what
239
+ the child is doing. A wedged child is still caught, and the run budget and
240
+ iteration ceiling both still apply above this.
241
+
242
+ **The instruction to poll was ours.** `agent_task_list` described itself as the
243
+ way to _"confirm every launched task reached `completed`"_ and as _"safe to call
244
+ repeatedly"_ — an order to burn a turn on a listing whose answer a blocking
245
+ `create_task` had already delivered. It now says the opposite, and points at the
246
+ cases the listing is actually for. `create_task` gained the matching clause in
247
+ the other direction: until a worker's result arrives, do not fabricate,
248
+ summarise or predict it.
249
+
250
+ **The tuple.** `toSchemaDialect` translated draft-07's `additionalItems: false`
251
+ by dropping it, on the reasoning that 2020-12 closes a tuple by default. It does
252
+ not — with `prefixItems` set and no `items`, elements past the tuple are
253
+ unconstrained — so every closed tuple was silently widened into an open one. A
254
+ schema written to forbid a third element began to allow any number. It now
255
+ emits `items: false`, which the wire accepts.
256
+
3
257
  ## 6.0.0
4
258
 
5
259
  ### Major Changes
@@ -1 +1 @@
1
- {"version":3,"file":"SupervisorAgent.d.ts","sourceRoot":"","sources":["../../src/agents/SupervisorAgent.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,KAAK,EACX,UAAU,EACV,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAA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C,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,KAAK,EAAE,KAAK,EACZ,GAAG,GAAE,MAAmB,GACtB,eAAe,EAAE,CAcnB;AAED,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAEnF;AAED,qBAAa,eAAgB,SAAQ,aAAa,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IAC/F,QAAQ,CAAC,IAAI,EAAG,YAAY,CAAS;gBAEzB,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,cAAc,CAAC;IAalE;;;;;;;;OAQG;IACG,GAAG,CACR,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,qBAAqB,CAAC;YAMnB,YAAY;CAoQ1B"}
@@ -1,4 +1,5 @@
1
1
  import { EMPTY_TOKEN_USAGE } from '../constants/limits.js';
2
+ import { CompletionInbox } from '../gateway/completion-inbox.js';
2
3
  import { LocalTaskGateway } from '../gateway/local.js';
3
4
  import { ToolNameCollisionError, ToolRegistry } from '../registry/tool/execute.js';
4
5
  import { drainQuery } from '../runtime/query/index.js';
@@ -132,11 +133,27 @@ export class SupervisorAgent extends AbstractAgent {
132
133
  // it does not exist yet. `query` binds them once it does.
133
134
  const questionParks = new QuestionParkBinding();
134
135
  const pendingAnswers = new PendingAnswers();
136
+ // Created here for the same reason: both ends are here. The tools claim
137
+ // a completion when they deliver it as a `tool_result`, and the loop
138
+ // drains whatever is left over into the transcript — so the inbox has
139
+ // to be the same object on both sides, and this is the only place that
140
+ // sees both.
141
+ //
142
+ // It attaches through `onTaskCompleted`, which every gateway already
143
+ // implements, so a host gateway needs no change to take part.
144
+ const completionInbox = new CompletionInbox();
145
+ completionInbox.attach(gateway);
135
146
  const coordinatorToolDefs = buildCoordinatorTools({
136
147
  gateway,
148
+ completionInbox,
137
149
  workingDirectory: input.workingDirectory,
138
150
  runtimeContext: input.runtimeContext,
139
151
  allowedAgentIds: config.agentIds,
152
+ // The only hop between the config and the decision. Omit it and
153
+ // everything still compiles: the field is settable, documented, and
154
+ // read by nothing — which is the shape of a declaration this repo
155
+ // has had to go and delete before.
156
+ allowDelegation: config.allowDelegation,
140
157
  taskStore: input.taskStore,
141
158
  runId,
142
159
  getPlanManager: () => planManagerRef,
@@ -245,6 +262,7 @@ export class SupervisorAgent extends AbstractAgent {
245
262
  runtimeToolOverrides: input.runtimeToolOverrides,
246
263
  runtimeContext: input.runtimeContext,
247
264
  taskGateway: gateway,
265
+ completionInbox,
248
266
  launchedTasks,
249
267
  advisory: config.advisory,
250
268
  invocationState: childInvocationState,
@@ -1 +1 @@
1
- {"version":3,"file":"SupervisorAgent.js","sourceRoot":"","sources":["../../src/agents/SupervisorAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAWrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAG/D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,qBAAqB,CACpC,WAAkC,EAClC,KAAY,EACZ,MAAc,IAAI,CAAC,GAAG,EAAE;IAExB,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAA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MAAM,EAAE,GAAG,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;YAC3D,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,KAAK,EAAE,GAAG,CAAC,UAAU;YACrB,IAAI,EAAE,GAAG,CAAC,QAAQ;YAClB,UAAU,EAAE,GAAG,CAAC,gBAAgB;YAChC,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;YAClC,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,WAAW;YACX,cAAc;YACd,UAAU,EAAE,WAAW,CAAC,MAAM;SAC9B,CAAA;IACF,CAAC;CACD"}
@@ -66,6 +66,9 @@ async function runWith(options) {
66
66
  }, {
67
67
  provider,
68
68
  agentIds: ['worker'],
69
+ ...(options.allowDelegation !== undefined
70
+ ? { allowDelegation: options.allowDelegation }
71
+ : {}),
69
72
  agentManager: stubManager(),
70
73
  tools,
71
74
  systemPrompt: 'You coordinate.',
@@ -119,4 +122,32 @@ describe('supervisor coordinator-tool registration', () => {
119
122
  expect(describedAs('create_task')).toBe(HOST_TOOL_DESCRIPTION);
120
123
  });
121
124
  });
125
+ /**
126
+ * The one hop between `SupervisorAgentConfig.allowDelegation` and the builder
127
+ * that acts on it.
128
+ *
129
+ * These go through `SupervisorAgent` rather than calling the builder directly,
130
+ * and that is the entire point. The builder has its own unit tests, and they
131
+ * pass whether or not the supervisor actually forwards the flag — measured:
132
+ * deleting the forward left the type-check clean and all 143 coordinator and
133
+ * agent tests green, with the field settable, documented, and read by nobody.
134
+ * That is the shape of a declaration this repository has had to go and delete
135
+ * before, so it gets a test that fails when the road is cut.
136
+ */
137
+ describe('allowDelegation reaches the tool surface', () => {
138
+ it('withholds the delegation tools when the run declines to delegate', async () => {
139
+ const { names } = await runWith({ allowDelegation: false });
140
+ expect(names, 'the flag never reached buildCoordinatorTools').not.toContain('create_task');
141
+ expect(names).not.toContain('wait_for_task');
142
+ expect(names).not.toContain('cancel_task');
143
+ });
144
+ it('keeps the listing, so a non-delegating run can still see what is running', async () => {
145
+ expect((await runWith({ allowDelegation: false })).names).toContain('agent_task_list');
146
+ });
147
+ it('leaves an opting-in run exactly as it was', async () => {
148
+ const { names } = await runWith({ allowDelegation: true });
149
+ expect(names).toContain('create_task');
150
+ expect(names).toContain('agent_task_list');
151
+ });
152
+ });
122
153
  //# sourceMappingURL=supervisor-coordinator-registration.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"supervisor-coordinator-registration.test.js","sourceRoot":"","sources":["../../../src/agents/__tests__/supervisor-coordinator-registration.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD;;;;;;;;;;;;;GAaG;AAEH,MAAM,qBAAqB,GAAG,0CAA0C,CAAA;AAExE,SAAS,WAAW;IACnB,OAAO;QACN,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QAC3E,KAAK,EAAE,EAAE,CAAC,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M,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM,OAAO,CAAC;YAC5C,SAAS,EAAE,CAAC,aAAa,CAAC;YAC1B,oBAAoB,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE;SACjD,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;QACtC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAA;QAC1C,oEAAoE;QACpE,kEAAkE;QAClE,yDAAyD;QACzD,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IAC/D,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"supervisor-coordinator-registration.test.js","sourceRoot":"","sources":["../../../src/agents/__tests__/supervisor-coordinator-registration.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD;;;;;;;;;;;;;GAaG;AAEH,MAAM,qBAAqB,GAAG,0CAA0C,CAAA;AAExE,SAAS,WAAW;IACnB,OAAO;QACN,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,I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EF,EAAE,CAAC,0EAA0E,EAAE,KAAK,IAAI,EAAE;QACzF,MAAM,CAAC,CAAC,MAAM,OAAO,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAA;IACvF,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,2CAA2C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAA;QAE1D,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;QACtC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAA;IAC3C,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=completion-inbox.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion-inbox.test.d.ts","sourceRoot":"","sources":["../../../src/gateway/__tests__/completion-inbox.test.ts"],"names":[],"mappings":""}