@namzu/sdk 8.0.0 → 9.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.
Files changed (95) hide show
  1. package/CHANGELOG.md +215 -0
  2. package/dist/agents/SupervisorAgent.d.ts.map +1 -1
  3. package/dist/agents/SupervisorAgent.js +14 -1
  4. package/dist/agents/SupervisorAgent.js.map +1 -1
  5. package/dist/agents/__tests__/a-policy-nobody-can-select.test.d.ts +2 -0
  6. package/dist/agents/__tests__/a-policy-nobody-can-select.test.d.ts.map +1 -0
  7. package/dist/agents/__tests__/a-policy-nobody-can-select.test.js +177 -0
  8. package/dist/agents/__tests__/a-policy-nobody-can-select.test.js.map +1 -0
  9. package/dist/gateway/__tests__/a-knob-nobody-can-turn.test.d.ts +2 -0
  10. package/dist/gateway/__tests__/a-knob-nobody-can-turn.test.d.ts.map +1 -0
  11. package/dist/gateway/__tests__/a-knob-nobody-can-turn.test.js +114 -0
  12. package/dist/gateway/__tests__/a-knob-nobody-can-turn.test.js.map +1 -0
  13. package/dist/gateway/local.d.ts.map +1 -1
  14. package/dist/gateway/local.js +19 -6
  15. package/dist/gateway/local.js.map +1 -1
  16. package/dist/manager/agent/__tests__/lifecycle.test.js +56 -0
  17. package/dist/manager/agent/__tests__/lifecycle.test.js.map +1 -1
  18. package/dist/manager/agent/lifecycle.d.ts.map +1 -1
  19. package/dist/manager/agent/lifecycle.js +62 -33
  20. package/dist/manager/agent/lifecycle.js.map +1 -1
  21. package/dist/manager/plan/__tests__/a-plan-that-succeeded-is-not-failed.test.d.ts +2 -0
  22. package/dist/manager/plan/__tests__/a-plan-that-succeeded-is-not-failed.test.d.ts.map +1 -0
  23. package/dist/manager/plan/__tests__/a-plan-that-succeeded-is-not-failed.test.js +73 -0
  24. package/dist/manager/plan/__tests__/a-plan-that-succeeded-is-not-failed.test.js.map +1 -0
  25. package/dist/manager/plan/lifecycle.d.ts +48 -0
  26. package/dist/manager/plan/lifecycle.d.ts.map +1 -1
  27. package/dist/manager/plan/lifecycle.js +56 -0
  28. package/dist/manager/plan/lifecycle.js.map +1 -1
  29. package/dist/runtime/query/__tests__/the-plan-graph-reaches-a-host.test.d.ts +2 -0
  30. package/dist/runtime/query/__tests__/the-plan-graph-reaches-a-host.test.d.ts.map +1 -0
  31. package/dist/runtime/query/__tests__/the-plan-graph-reaches-a-host.test.js +62 -0
  32. package/dist/runtime/query/__tests__/the-plan-graph-reaches-a-host.test.js.map +1 -0
  33. package/dist/runtime/query/events.d.ts.map +1 -1
  34. package/dist/runtime/query/events.js +5 -0
  35. package/dist/runtime/query/events.js.map +1 -1
  36. package/dist/store/task/disk.d.ts.map +1 -1
  37. package/dist/store/task/disk.js +14 -0
  38. package/dist/store/task/disk.js.map +1 -1
  39. package/dist/store/task/memory.d.ts.map +1 -1
  40. package/dist/store/task/memory.js +14 -0
  41. package/dist/store/task/memory.js.map +1 -1
  42. package/dist/tools/coordinator/__tests__/a-failed-worker-is-not-an-answer.test.d.ts +2 -0
  43. package/dist/tools/coordinator/__tests__/a-failed-worker-is-not-an-answer.test.d.ts.map +1 -0
  44. package/dist/tools/coordinator/__tests__/a-failed-worker-is-not-an-answer.test.js +101 -0
  45. package/dist/tools/coordinator/__tests__/a-failed-worker-is-not-an-answer.test.js.map +1 -0
  46. package/dist/tools/coordinator/__tests__/the-plan-a-human-approves.test.d.ts +2 -0
  47. package/dist/tools/coordinator/__tests__/the-plan-a-human-approves.test.d.ts.map +1 -0
  48. package/dist/tools/coordinator/__tests__/the-plan-a-human-approves.test.js +99 -0
  49. package/dist/tools/coordinator/__tests__/the-plan-a-human-approves.test.js.map +1 -0
  50. package/dist/tools/coordinator/agent.d.ts.map +1 -1
  51. package/dist/tools/coordinator/agent.js +17 -23
  52. package/dist/tools/coordinator/agent.js.map +1 -1
  53. package/dist/tools/coordinator/index.d.ts.map +1 -1
  54. package/dist/tools/coordinator/index.js +33 -3
  55. package/dist/tools/coordinator/index.js.map +1 -1
  56. package/dist/tools/coordinator/outcome.d.ts +60 -0
  57. package/dist/tools/coordinator/outcome.d.ts.map +1 -0
  58. package/dist/tools/coordinator/outcome.js +68 -0
  59. package/dist/tools/coordinator/outcome.js.map +1 -0
  60. package/dist/types/agent/gateway.d.ts +19 -2
  61. package/dist/types/agent/gateway.d.ts.map +1 -1
  62. package/dist/types/agent/supervisor.d.ts +38 -1
  63. package/dist/types/agent/supervisor.d.ts.map +1 -1
  64. package/dist/types/plan/index.d.ts +26 -0
  65. package/dist/types/plan/index.d.ts.map +1 -1
  66. package/dist/types/run/events.d.ts +17 -0
  67. package/dist/types/run/events.d.ts.map +1 -1
  68. package/dist/types/run/events.js.map +1 -1
  69. package/dist/types/task/index.d.ts +19 -1
  70. package/dist/types/task/index.d.ts.map +1 -1
  71. package/dist/types/task/index.js +10 -1
  72. package/dist/types/task/index.js.map +1 -1
  73. package/package.json +1 -1
  74. package/src/agents/SupervisorAgent.ts +14 -1
  75. package/src/agents/__tests__/a-policy-nobody-can-select.test.ts +202 -0
  76. package/src/gateway/__tests__/a-knob-nobody-can-turn.test.ts +139 -0
  77. package/src/gateway/local.ts +19 -7
  78. package/src/manager/agent/__tests__/lifecycle.test.ts +74 -0
  79. package/src/manager/agent/lifecycle.ts +72 -42
  80. package/src/manager/plan/__tests__/a-plan-that-succeeded-is-not-failed.test.ts +88 -0
  81. package/src/manager/plan/lifecycle.ts +61 -0
  82. package/src/runtime/query/__tests__/the-plan-graph-reaches-a-host.test.ts +79 -0
  83. package/src/runtime/query/events.ts +5 -0
  84. package/src/store/task/disk.ts +15 -0
  85. package/src/store/task/memory.ts +15 -0
  86. package/src/tools/coordinator/__tests__/a-failed-worker-is-not-an-answer.test.ts +133 -0
  87. package/src/tools/coordinator/__tests__/the-plan-a-human-approves.test.ts +121 -0
  88. package/src/tools/coordinator/agent.ts +17 -25
  89. package/src/tools/coordinator/index.ts +33 -3
  90. package/src/tools/coordinator/outcome.ts +70 -0
  91. package/src/types/agent/gateway.ts +19 -2
  92. package/src/types/agent/supervisor.ts +40 -1
  93. package/src/types/plan/index.ts +29 -0
  94. package/src/types/run/events.ts +17 -0
  95. package/src/types/task/index.ts +22 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,220 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 16dc634: A failed worker is reported as a failure, and a plan task can say it failed.
8
+
9
+ **`create_task` reported a failed worker as a success.** Two layers can disagree
10
+ about whether a delegated run succeeded: the gateway's `TaskHandle.state`, and
11
+ the run's own `BaseAgentResult.status`. The kernel's `finalizeChild` always calls
12
+ `markCompleted`, so `state === 'completed'` holds for a child that ran and
13
+ returned `status: 'failed'` — and `create_task` asked only that layer. The model
14
+ received the failure text as an answer, the tool result carried
15
+ `isError: false`, and the plan task was written closed as though the work had
16
+ been done.
17
+
18
+ The correct two-authority predicate was already written, twenty lines away, in
19
+ the canonical `Agent` tool — put there because a review caught it on that site,
20
+ and nothing carried the answer to the other one. It now lives in one place both
21
+ reach.
22
+
23
+ **`TaskStatus` gains `failed`, and that is the breaking part.** A unit that did
24
+ not succeed had nowhere to say so, which is why a failed delegation was recorded
25
+ as `completed` with the failure encoded as prose in `description`: a reader
26
+ scanning statuses saw work that had been done, and a dependent unit had no way
27
+ to tell at all.
28
+
29
+ If you switch exhaustively over `TaskStatus`, or hold a `Record<TaskStatus, T>`,
30
+ you need a `failed` arm. `isTerminalTaskStatus` now returns `true` for it —
31
+ terminal means "will not change on its own", not "succeeded", and a unit blocked
32
+ on something that failed would otherwise wait forever for a status that will
33
+ never arrive. In the store's transition ranking `failed` sits alongside
34
+ `completed` rather than after it, so `in_progress → failed` is allowed and
35
+ `completed → failed` is not.
36
+
37
+ **Two smaller repairs ride along.** A background launch refused for want of a
38
+ completion inbox now marks its plan task failed rather than leaving it in
39
+ progress with no worker behind it — nothing later closes a task whose launch
40
+ never happened. And the `Agent` tool passes `parentSpan` when creating its
41
+ child, so a delegated run joins the turn that asked for it instead of starting
42
+ its own root trace; `create_task` has done this all along.
43
+
44
+ - a743c7e: A delegated run is built with the config its caller asked for, and a supervisor can select its sibling-failure policy.
45
+
46
+ Two capabilities were declared, documented, typed, and unreachable. Both are the
47
+ same defect: a knob wired to nothing, which reads to a caller as a knob that
48
+ works.
49
+
50
+ **`CreateTaskOptions.configOverrides` was accepted and dropped.**
51
+ `LocalTaskGateway.createTask` built its own `configOverrides` object out of
52
+ `parentSpan` alone and never read the field, so a caller pinning a delegated run
53
+ to a cheaper model, or capping its iterations, got the agent's defaults and no
54
+ indication anything had been ignored. It is forwarded now. A caller who sets
55
+ both the field and the dedicated `parentSpan` option gets the dedicated one for
56
+ the span — that is the specific field for the job — and keeps every other
57
+ override alongside it.
58
+
59
+ **`siblingFailurePolicy` could not be selected by any host.**
60
+ `LocalTaskGateway` has honoured it since it was written and the cancellation
61
+ machinery behind `'cancel-siblings'` is complete — but it was the fifth
62
+ constructor argument of a gateway `SupervisorAgent` builds itself, and the
63
+ supervisor passed four. Every host in existence ran `'continue'`, and the only
64
+ route to the other value was to construct the gateway by hand and pass it as
65
+ `config.gateway`. It is now `SupervisorAgentConfig.siblingFailurePolicy`.
66
+
67
+ `'continue'` remains the default and deliberately so: partial results are
68
+ usually worth having, and tearing down healthy siblings on any failure lets one
69
+ flaky child waste four good ones. `'cancel-siblings'` is for a fan-out whose
70
+ parts only mean something together. The choice is now expressible; the answer
71
+ has not changed. The field is ignored when the host supplies its own `gateway`,
72
+ which owns its policy.
73
+
74
+ **Breaking:** `CreateTaskOptions.configOverrides` is now typed
75
+ `Partial<BaseAgentConfig>` instead of `Record<string, unknown>`. It lands on
76
+ `SendMessageOptions.configOverrides`, which is already that shape, and the loose
77
+ type let a misspelled key type-check and then silently do nothing — the same
78
+ silence the field was already producing. If you pass a key that is not on
79
+ `BaseAgentConfig`, it will now fail to compile; that key was never being applied.
80
+
81
+ **Also:** the two-authority failure check in `LocalTaskGateway` moves to
82
+ `taskFailed` in `tools/coordinator/outcome.ts`, next to `taskSucceeded`. It is
83
+ deliberately _not_ the negation of that predicate — a task that is still running
84
+ satisfies neither, and cancelling a fan-out on `!taskSucceeded` would tear down
85
+ siblings the moment the first child had merely not finished yet. The gateway's
86
+ copy was correct; a rule each caller has to remember is one a caller eventually
87
+ forgets, which is what happened to `taskSucceeded` before it was consolidated.
88
+
89
+ - 529b343: `PlanManager.completePlan` refuses an unreported step instead of scoring it a failure.
90
+
91
+ **A plan that fully succeeded was reported as failed.** `completePlan` asked one
92
+ question — "is every step `completed` or `skipped`?" — and everything that was
93
+ not fell to the same branch. A step still `pending` therefore produced
94
+ `status: 'failed'`, indistinguishable from a step that genuinely failed. Since
95
+ `addStep` defaults every step to `pending`, a host that added steps, did the
96
+ work, and settled the plan without calling `updateStepStatus` on each one got
97
+ `failed` for a plan where nothing had gone wrong. That is the path of least
98
+ effort through this API, not an unusual one.
99
+
100
+ The two cases are different facts and deserve different answers. A step that
101
+ FAILED is an outcome: report the plan failed. A step nobody reported on is not
102
+ an outcome at all — it says the caller and the plan disagree about whether the
103
+ work is over, and answering `failed` settles that disagreement by inventing a
104
+ result.
105
+
106
+ **What changes for you.** `completePlan()` now throws when any step is still
107
+ `pending` or `running`. The message names the unfinished steps and both ways
108
+ forward, because a caller in this position either forgot to report progress or
109
+ called too early, and only they know which:
110
+
111
+ - report each step with `updateStepStatus` — `'skipped'` is a valid outcome for
112
+ work that was planned and then not needed; or
113
+ - call `failPlan` if the plan is being abandoned, which marks unfinished steps
114
+ `skipped` and settles the plan as failed.
115
+
116
+ Behaviour is unchanged once every step has reported: all `completed` or
117
+ `skipped` still yields `completed`, and any `failed` still yields `failed`.
118
+ No code in this repository called `completePlan`, so nothing inside the kernel
119
+ changes behaviour; the affected callers are hosts.
120
+
121
+ **`PlanManager` now says which half of it the kernel drives.** The kernel builds
122
+ a plan, gates it, translates its events, and settles it on failure — it never
123
+ reports a step outcome and never settles a plan that succeeded. That is a
124
+ deliberate split, since `drainQuery` hands the manager to the host through
125
+ `onContextCreated` for exactly this purpose, and a search for callers inside the
126
+ package finds none because the callers are outside it. The absence had already
127
+ been read once as a dead layer and proposed for deletion; what that would have
128
+ deleted is a working human-in-the-loop approval gate. It is written down now.
129
+
130
+ ### Minor Changes
131
+
132
+ - e355049: The plan a human approves names the agent the model chose.
133
+
134
+ `approve_plan` asks the model for an `agent_id` per step — "which agent handles
135
+ this" — and reduced the answer to a boolean. The step got
136
+ `toolName: 'create_task'` when any agent was named and nothing when not, so the
137
+ name was dropped between the model saying it and the human being shown the plan.
138
+
139
+ The approval is the one moment where that difference can still be acted on.
140
+ Approving "delegate this step" is not the same as approving "delegate this step
141
+ to the agent with shell access", and a reviewer who cannot see which agent was
142
+ chosen cannot withhold approval from the wrong one. Two delegated steps reached
143
+ the approver identical in every field.
144
+
145
+ `PlanStep` gains `agentId?: string`, populated by `approve_plan` from the
146
+ model's choice. A host rendering a plan approval can show it directly. Absent
147
+ still means the step is the orchestrator's own work, which is what omitting
148
+ `agent_id` says — so absent stays absent rather than becoming a placeholder.
149
+
150
+ Typed rather than folded into the existing `estimatedInput`, which is `unknown`:
151
+ an approval gate's whole job is being readable, and a field a host must cast
152
+ before it can render is one a host renders wrong or not at all. `estimatedInput`
153
+ is now documented as having no producer and no reader, since that is what it
154
+ has, and it is left in place because it is on the published typings.
155
+
156
+ - 16dc634: A host can see the fan-out gate, and the plan graph the model is already keeping.
157
+
158
+ **`SupervisorAgentConfig` gains `maxToolConcurrency`.** The kernel has honoured
159
+ it all along and `ReactiveAgent` forwards it — it was missing on the one agent
160
+ whose entire job is delegation. So the agent that fans out could not set the gate
161
+ that bounds a fan-out, while the agent that does not fan out could, and a host
162
+ wanting a narrower one had to reach past the supervisor to `drainQuery`.
163
+
164
+ Note what it bounds: how many delegated children run **concurrently**, not how
165
+ many a turn may launch. A model emitting twenty `create_task` blocks still
166
+ launches twenty; they queue.
167
+
168
+ **`task_created` and `task_updated` carry `blockedBy`.** The task store
169
+ maintains a full dependency graph — `blocks` and `blockedBy` mirrored on both
170
+ ends, written under a lock, deadlock-avoided — and none of it reached the wire.
171
+ A host could draw a flat list of units and nothing about their order, while the
172
+ model was already maintaining the order.
173
+
174
+ Absent rather than empty when a unit depends on nothing, so a reader can tell
175
+ "no dependencies" from an emitter that predates the field.
176
+
177
+ **And `block()` announced nothing at all.** Both stores wrote the edge and
178
+ emitted no event, so the graph was observable only by polling: a listener saw a
179
+ unit created and never learned that something now waits on it. Both stores now
180
+ announce **both ends**, because both changed — a host tracking one side would
181
+ draw half the edge. The disk store announces only when something actually
182
+ changed, so re-establishing an existing edge stays silent.
183
+
184
+ That second half is the one worth knowing about if you consume these events: the
185
+ field alone would have been useless, because the moment a dependency is created
186
+ was never on the wire in the first place.
187
+
188
+ ### Patch Changes
189
+
190
+ - 16dc634: A concurrent fan-out no longer allocates more budget than the parent has.
191
+
192
+ `sendMessage` read the parent's remaining budget at the top and debited it after
193
+ `provisionSpawn` — putting the two halves of a read-modify-write on either side
194
+ of an await, with the only critical section in between. So siblings launched
195
+ from one assistant turn all read the same undebited number and each took a
196
+ fraction of it. Measured: \*\*four concurrent children were handed 50 000 + 50 000
197
+
198
+ - 50 000 + 50 000 from a pool of 100 000.\*\*
199
+
200
+ `create_task`'s own description instructs exactly the shape that triggers it —
201
+ _"'fan out 8 specialists' is one assistant message with 8 create_task blocks"_ —
202
+ so the documented usage was the reproduction.
203
+
204
+ The read, the refusal when an allocation floors to zero, and the debit now all
205
+ happen inside the per-parent spawn lock. That keeps the property the debit's
206
+ placement was chosen for — a spawn this call rejects burns no allocation — while
207
+ closing the race that placement opened. It was introduced by a correct fix to a
208
+ different bug: moving the debit after the provisioning put it outside the lock.
209
+
210
+ **Nothing pinned it**, and the reason is worth knowing if you write tests here:
211
+ the existing concurrency test builds a fresh context per call, so each spawn got
212
+ its own tracker — it measures width, not budget. The sequential tests pass
213
+ because a refund makes the arithmetic close. The regression test holds its
214
+ children open, because a settled child refunds and the refund restores a
215
+ plausible number; a test that measures after settle sees a healthy total and
216
+ reports nothing.
217
+
3
218
  ## 8.0.0
4
219
 
5
220
  ### Major Changes
@@ -1 +1 @@
1
- {"version":3,"file":"SupervisorAgent.d.ts","sourceRoot":"","sources":["../../src/agents/SupervisorAgent.ts"],"names":[],"mappings":"AAQA,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,KAAK,EAAW,KAAK,EAAU,MAAM,uBAAuB,CAAA;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAG7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACpC,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;CAiR1B"}
1
+ {"version":3,"file":"SupervisorAgent.d.ts","sourceRoot":"","sources":["../../src/agents/SupervisorAgent.ts"],"names":[],"mappings":"AAQA,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,KAAK,EAAW,KAAK,EAAU,MAAM,uBAAuB,CAAA;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAG7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACpC,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;CA8R1B"}
@@ -121,7 +121,14 @@ export class SupervisorAgent extends AbstractAgent {
121
121
  projectId,
122
122
  parentActor,
123
123
  };
124
- gateway = new LocalTaskGateway(config.agentManager, taskContext, listener, input);
124
+ // The only hop between the config and the gateway's policy. Omit it
125
+ // and the field is settable, documented, and read by nothing —
126
+ // which is exactly the state it was in before.
127
+ gateway = new LocalTaskGateway(config.agentManager, taskContext, listener, input, {
128
+ ...(config.siblingFailurePolicy
129
+ ? { siblingFailurePolicy: config.siblingFailurePolicy }
130
+ : {}),
131
+ });
125
132
  }
126
133
  else {
127
134
  throw new Error("SupervisorAgentConfig requires either 'gateway' or 'agentManager'");
@@ -252,6 +259,12 @@ export class SupervisorAgent extends AbstractAgent {
252
259
  },
253
260
  questionParks,
254
261
  pendingAnswers,
262
+ // How wide a fan-out actually runs. Absent leaves the kernel
263
+ // default — the same forwarding ReactiveAgent has always done,
264
+ // missing from the one agent whose job is delegation.
265
+ ...(config.maxToolConcurrency !== undefined
266
+ ? { maxToolConcurrency: config.maxToolConcurrency }
267
+ : {}),
255
268
  agentId: this.metadata.id,
256
269
  agentName: this.metadata.name,
257
270
  workingDirectory: input.workingDirectory,
@@ -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,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,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,CAAC,CAAC;QAC1C,OAAO,EAAE,MAAM,C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AAC,CAAC,EAAE,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjF,GAAG,CAAC,MAAM,CAAC,qBAAqB;oBAC/B,CAAC,CAAC,EAAE,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,EAAE;oBACzD,CAAC,CAAC,EAAE,CAAC;aACN,EACD,QAAQ,CACR,CAAA;YAED,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,EAAE,CAAA;YACvC,MAAM,WAAW,GAAG,qBAAqB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAA;YAE7D,MAAM,cAAc,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAA;YAEvD,OAAO;gBACN,KAAK,EAAE,GAAG,CAAC,EAAE;gBACb,MAAM,EAAE,GAAG,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;gBAC3D,UAAU,EAAE,GAAG,CAAC,UAAU;gBAC1B,KAAK,EAAE,GAAG,CAAC,UAAU;gBACrB,IAAI,EAAE,GAAG,CAAC,QAAQ;gBAClB,UAAU,EAAE,GAAG,CAAC,gBAAgB;gBAChC,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;gBAClC,QAAQ,EAAE,GAAG,CAAC,QAAQ;gBACtB,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,SAAS,EAAE,GAAG,CAAC,SAAS;gBACxB,WAAW;gBACX,cAAc;gBACd,UAAU,EAAE,WAAW,CAAC,MAAM;aAC9B,CAAA;QACF,CAAC;gBAAS,CAAC;YACV,eAAe,CAAC,KAAK,EAAE,CAAA;QACxB,CAAC;IACF,CAAC;CACD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=a-policy-nobody-can-select.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"a-policy-nobody-can-select.test.d.ts","sourceRoot":"","sources":["../../../src/agents/__tests__/a-policy-nobody-can-select.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,177 @@
1
+ import { mkdtemp } from 'node:fs/promises';
2
+ import { tmpdir } from 'node:os';
3
+ import { join } from 'node:path';
4
+ import { describe, expect, it } from 'vitest';
5
+ import { MockLLMProvider, registerMock } from '../../provider/index.js';
6
+ import { ToolRegistry } from '../../registry/index.js';
7
+ import { SupervisorAgent } from '../SupervisorAgent.js';
8
+ /**
9
+ * `'cancel-siblings'` was unreachable from every entry point.
10
+ *
11
+ * `LocalTaskGateway` has honoured the policy since it was written and the
12
+ * cancellation machinery behind it is complete — but the policy was the fifth
13
+ * constructor argument of a gateway the supervisor builds itself, and the
14
+ * supervisor passed four. So every host in existence ran `'continue'`, and the
15
+ * only way to reach the other value was to construct the gateway by hand and
16
+ * hand it in through `config.gateway`. A policy nobody can select is not a
17
+ * policy, and the tests it had all constructed the gateway directly, so they
18
+ * passed while nothing upstream could turn it on.
19
+ *
20
+ * The assertion is deliberately the cancellation itself. Asserting that the run
21
+ * completed would pass with the forwarding deleted — a fan-out under
22
+ * `'continue'` completes too — and prove nothing.
23
+ */
24
+ registerMock();
25
+ const FAILING = 'doomed';
26
+ const SLOW = 'patient';
27
+ /**
28
+ * A manager whose slow child only settles when someone cancels it — which is
29
+ * what an abort actually does, and what lets this run terminate at all.
30
+ */
31
+ class FanOutManager {
32
+ cancelled = [];
33
+ tasks = new Map();
34
+ releaseSlow;
35
+ slowSettled = new Promise((resolve) => {
36
+ this.releaseSlow = resolve;
37
+ });
38
+ markLaunched;
39
+ /**
40
+ * The doomed child does not settle until BOTH have launched.
41
+ *
42
+ * Without this the test is a race it usually wins: the sibling policy only
43
+ * cancels tasks the gateway is already tracking, so if the failure lands
44
+ * before the slow child finishes registering, nothing is cancelled, nothing
45
+ * releases the slow child, and the run hangs until the delegation timeout.
46
+ * That happened once here. A fan-out where one leg dies while another is
47
+ * genuinely in flight is the scenario being tested, so the harness states
48
+ * it instead of hoping for it.
49
+ */
50
+ bothLaunched = new Promise((resolve) => {
51
+ this.markLaunched = resolve;
52
+ });
53
+ async sendMessage(options) {
54
+ const failing = options.agentId === FAILING;
55
+ const taskId = (failing ? 'task_doomed' : 'task_patient');
56
+ const task = {
57
+ taskId,
58
+ agentId: options.agentId,
59
+ agent: {},
60
+ childAbortController: new AbortController(),
61
+ context: {},
62
+ // The failing child is `completed` at the gateway layer and
63
+ // `failed` in its own result — the two-authority split that makes
64
+ // this worth checking at all.
65
+ state: (failing ? 'completed' : 'running'),
66
+ pendingMessages: [],
67
+ createdAt: 1,
68
+ ...(failing
69
+ ? { result: { runId: 'run_child', status: 'failed', result: 'it broke' } }
70
+ : {}),
71
+ };
72
+ this.tasks.set(taskId, task);
73
+ if (this.tasks.size === 2)
74
+ this.markLaunched?.();
75
+ return task;
76
+ }
77
+ cancel(taskId) {
78
+ this.cancelled.push(taskId);
79
+ const task = this.tasks.get(taskId);
80
+ if (task)
81
+ task.state = 'failed';
82
+ this.releaseSlow?.();
83
+ }
84
+ async waitForCompletion(taskId) {
85
+ if (taskId === 'task_patient')
86
+ await this.slowSettled;
87
+ // The doomed child fails only once its sibling is actually in flight —
88
+ // see `bothLaunched`. Registration happens inside `createTask` right
89
+ // after `sendMessage` returns, so waiting a further microtask turn is
90
+ // what puts this after it rather than racing it.
91
+ else {
92
+ await this.bothLaunched.then(() => undefined);
93
+ // Safety valve, and it is what makes a REGRESSION legible. If the
94
+ // policy never reaches the gateway, nothing cancels the slow child
95
+ // and this run hangs until the delegation timeout — so the test
96
+ // would report "timed out after 60s" instead of "the sibling was
97
+ // not cancelled". Releasing it here means the assertion below is
98
+ // what fails, and it fails in a second.
99
+ setTimeout(() => this.releaseSlow?.(), 250).unref?.();
100
+ }
101
+ }
102
+ getInstance(taskId) {
103
+ return this.tasks.get(taskId);
104
+ }
105
+ cancelAll() { }
106
+ async continueTask() { }
107
+ queueMessage() { }
108
+ drainMessages() {
109
+ return [];
110
+ }
111
+ listByParent() {
112
+ return [];
113
+ }
114
+ listActive() {
115
+ return [];
116
+ }
117
+ getState() {
118
+ return undefined;
119
+ }
120
+ on() { }
121
+ off() { }
122
+ cleanup() { }
123
+ dispose() { }
124
+ }
125
+ async function fanOut(policy) {
126
+ const agentManager = new FanOutManager();
127
+ const agent = new SupervisorAgent({
128
+ id: 'sup_policy',
129
+ name: 'Supervisor',
130
+ version: '1',
131
+ category: 'test',
132
+ description: 'coordinates workers',
133
+ });
134
+ await agent.run({
135
+ messages: [{ role: 'user', content: 'go', timestamp: 1 }],
136
+ workingDirectory: await mkdtemp(join(tmpdir(), 'namzu-sibling-policy-')),
137
+ }, {
138
+ provider: new MockLLMProvider({
139
+ turns: [
140
+ {
141
+ toolCalls: [
142
+ {
143
+ name: 'create_task',
144
+ args: { agent_id: SLOW, prompt: 'long work', description: 'the patient one' },
145
+ },
146
+ {
147
+ name: 'create_task',
148
+ args: { agent_id: FAILING, prompt: 'doomed work', description: 'the doomed one' },
149
+ },
150
+ ],
151
+ },
152
+ { text: 'done' },
153
+ ],
154
+ }),
155
+ agentIds: [SLOW, FAILING],
156
+ agentManager,
157
+ tools: new ToolRegistry(),
158
+ systemPrompt: 'You coordinate.',
159
+ model: 'mock-model',
160
+ tokenBudget: 100_000,
161
+ timeoutMs: 30_000,
162
+ maxIterations: 3,
163
+ sessionId: 'ses_policy',
164
+ threadId: 'thd_policy',
165
+ projectId: 'prj_policy',
166
+ tenantId: 'tnt_policy',
167
+ ...(policy ? { siblingFailurePolicy: policy } : {}),
168
+ });
169
+ return agentManager;
170
+ }
171
+ describe('a supervisor can say what a failed child means for its siblings', () => {
172
+ it('reaches the gateway, so cancel-siblings actually stops the rest', async () => {
173
+ const manager = await fanOut('cancel-siblings');
174
+ expect(manager.cancelled).toContain('task_patient');
175
+ }, 60_000);
176
+ });
177
+ //# sourceMappingURL=a-policy-nobody-can-select.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"a-policy-nobody-can-select.test.js","sourceRoot":"","sources":["../../../src/agents/__tests__/a-policy-nob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@
1
+ {"version":3,"file":"a-knob-nobody-can-turn.test.d.ts","sourceRoot":"","sources":["../../../src/gateway/__tests__/a-knob-nobody-can-turn.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,114 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { LocalTaskGateway } from '../local.js';
3
+ /**
4
+ * `CreateTaskOptions.configOverrides` was declared, typed, and never read.
5
+ *
6
+ * `createTask` built its OWN `configOverrides` object out of `parentSpan`
7
+ * alone, so a caller pinning a delegated run to a cheaper model, or capping
8
+ * its iterations, got the agent's defaults and nothing to say otherwise. The
9
+ * field type-checked, the call succeeded, and the run was not the run that was
10
+ * asked for.
11
+ *
12
+ * Reachability, not behaviour: what `configOverrides` DOES once it lands on
13
+ * `sendMessage` is the agent manager's business and is tested there. What was
14
+ * broken is the hop.
15
+ */
16
+ /** Records what the gateway actually asked the manager for. */
17
+ class RecordingManager {
18
+ sent = [];
19
+ async sendMessage(options) {
20
+ this.sent.push(options);
21
+ return {
22
+ taskId: `task_${this.sent.length}`,
23
+ agentId: options.agentId,
24
+ agent: {},
25
+ childAbortController: new AbortController(),
26
+ context: {},
27
+ state: 'completed',
28
+ pendingMessages: [],
29
+ createdAt: 1,
30
+ };
31
+ }
32
+ cancel() { }
33
+ cancelAll() { }
34
+ async continueTask() { }
35
+ queueMessage() { }
36
+ drainMessages() {
37
+ return [];
38
+ }
39
+ async waitForCompletion() { }
40
+ getInstance() {
41
+ return undefined;
42
+ }
43
+ listByParent() {
44
+ return [];
45
+ }
46
+ listActive() {
47
+ return [];
48
+ }
49
+ getState() {
50
+ return undefined;
51
+ }
52
+ on() { }
53
+ off() { }
54
+ cleanup() { }
55
+ dispose() { }
56
+ }
57
+ function context() {
58
+ return {
59
+ parentRunId: 'run_parent',
60
+ parentAgentId: 'supervisor',
61
+ parentAbortController: new AbortController(),
62
+ depth: 0,
63
+ budgetTracker: { total: 100_000, remaining: 100_000 },
64
+ tenantId: 'tnt_k',
65
+ threadId: 'thd_k',
66
+ sessionId: 'ses_k',
67
+ projectId: 'prj_k',
68
+ parentActor: { kind: 'agent', agentId: 'supervisor', tenantId: 'tnt_k' },
69
+ };
70
+ }
71
+ describe('a delegated run is built with the config its caller asked for', () => {
72
+ it('forwards configOverrides to the spawn', async () => {
73
+ const manager = new RecordingManager();
74
+ const gateway = new LocalTaskGateway(manager, context());
75
+ await gateway.createTask({
76
+ agentId: 'worker',
77
+ prompt: 'work',
78
+ workingDirectory: '/tmp',
79
+ configOverrides: { model: 'cheap-model', maxIterations: 3 },
80
+ });
81
+ expect(manager.sent[0]?.configOverrides).toMatchObject({
82
+ model: 'cheap-model',
83
+ maxIterations: 3,
84
+ });
85
+ });
86
+ it('keeps the dedicated parentSpan option winning when both name a span', async () => {
87
+ // A caller who sets both is saying the same thing twice, and the named
88
+ // field is the specific one for the job — so it is applied last.
89
+ const manager = new RecordingManager();
90
+ const gateway = new LocalTaskGateway(manager, context());
91
+ const named = { spanContext: () => ({ traceId: 'named' }) };
92
+ const buried = { spanContext: () => ({ traceId: 'buried' }) };
93
+ await gateway.createTask({
94
+ agentId: 'worker',
95
+ prompt: 'work',
96
+ workingDirectory: '/tmp',
97
+ parentSpan: named,
98
+ configOverrides: { parentSpan: buried, model: 'cheap-model' },
99
+ });
100
+ expect(manager.sent[0]?.configOverrides?.parentSpan).toBe(named);
101
+ // ...and the rest of the caller's overrides survive alongside it.
102
+ expect(manager.sent[0]?.configOverrides?.model).toBe('cheap-model');
103
+ });
104
+ it('still sends no configOverrides at all when the caller set neither', async () => {
105
+ // The absent case has to stay absent: an empty object here would put
106
+ // `configOverrides: {}` on every spawn and override nothing, which is
107
+ // harmless until something starts reading its presence as intent.
108
+ const manager = new RecordingManager();
109
+ const gateway = new LocalTaskGateway(manager, context());
110
+ await gateway.createTask({ agentId: 'worker', prompt: 'work', workingDirectory: '/tmp' });
111
+ expect(manager.sent[0]).not.toHaveProperty('configOverrides');
112
+ });
113
+ });
114
+ //# sourceMappingURL=a-knob-nobody-can-turn.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"a-knob-nobody-can-turn.test.js","sourceRoot":"","sources":["../../../src/gateway/__tests__/a-knob-nobody-can-turn.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAY7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE9C;;;;;;;;;;;;GAYG;AAEH,+DAA+D;AAC/D,MAAM,gBAAgB;IACZ,IAAI,GAAyB,EAAE,CAAA;IAExC,KAAK,CAAC,WAAW,CAAC,OAA2B;QAC5C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACvB,OAAO;YACN,MAAM,EAAE,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,EAAY;YAC5C,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,KAAK,EAAE,EAAyB;YAChC,oBAAoB,EAAE,IAAI,eAAe,EAAE;YAC3C,OAAO,EAAE,EAAsB;YAC/B,KAAK,EAAE,WAA6B;YACpC,eAAe,EAAE,EAAE;YACnB,SAAS,EAAE,CAAC;SACC,CAAA;IACf,CAAC;IAED,MAAM,KAAU,CAAC;IACjB,SAAS,KAAU,CAAC;IACpB,KAAK,CAAC,YAAY,KAAmB,CAAC;IACtC,YAAY,KAAU,CAAC;IACvB,aAAa;QACZ,OAAO,EAAE,CAAA;IACV,CAAC;IACD,KAAK,CAAC,iBAAiB,KAAmB,CAAC;IAC3C,WAAW;QACV,OAAO,SAAS,CAAA;IACjB,CAAC;IACD,YAAY;QACX,OAAO,EAAE,CAAA;IACV,CAAC;IACD,UAAU;QACT,OAAO,EAAE,CAAA;IACV,CAAC;IACD,QAAQ;QACP,OAAO,SAAS,CAAA;IACjB,CAAC;IACD,EAAE,KAAU,CAAC;IACb,GAAG,KAAU,CAAC;IACd,OAAO,KAAU,CAAC;IAClB,OAAO,KAAU,CAAC;CAClB;AAED,SAAS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