@namzu/cli 25.0.0 → 25.1.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 (63) hide show
  1. package/CHANGELOG.md +282 -0
  2. package/dist/context/doctrine.d.ts +4 -2
  3. package/dist/context/doctrine.d.ts.map +1 -1
  4. package/dist/context/doctrine.js +4 -2
  5. package/dist/context/doctrine.js.map +1 -1
  6. package/dist/context/runtime-message.d.ts.map +1 -1
  7. package/dist/context/runtime-message.js +4 -0
  8. package/dist/context/runtime-message.js.map +1 -1
  9. package/dist/integrations/mcp/servers.d.ts +30 -0
  10. package/dist/integrations/mcp/servers.d.ts.map +1 -1
  11. package/dist/integrations/mcp/servers.js +32 -1
  12. package/dist/integrations/mcp/servers.js.map +1 -1
  13. package/dist/integrations/subagents/activity.d.ts +285 -11
  14. package/dist/integrations/subagents/activity.d.ts.map +1 -1
  15. package/dist/integrations/subagents/activity.js +334 -31
  16. package/dist/integrations/subagents/activity.js.map +1 -1
  17. package/dist/integrations/subagents/replay.d.ts +46 -0
  18. package/dist/integrations/subagents/replay.d.ts.map +1 -0
  19. package/dist/integrations/subagents/replay.js +193 -0
  20. package/dist/integrations/subagents/replay.js.map +1 -0
  21. package/dist/integrations/subagents/runs.d.ts +72 -0
  22. package/dist/integrations/subagents/runs.d.ts.map +1 -0
  23. package/dist/integrations/subagents/runs.js +155 -0
  24. package/dist/integrations/subagents/runs.js.map +1 -0
  25. package/dist/integrations/subagents/runtime.d.ts +21 -0
  26. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  27. package/dist/integrations/subagents/runtime.js +121 -2
  28. package/dist/integrations/subagents/runtime.js.map +1 -1
  29. package/dist/tui/AgentExplorer.d.ts +46 -2
  30. package/dist/tui/AgentExplorer.d.ts.map +1 -1
  31. package/dist/tui/AgentExplorer.js +261 -22
  32. package/dist/tui/AgentExplorer.js.map +1 -1
  33. package/dist/tui/App.d.ts.map +1 -1
  34. package/dist/tui/App.js +458 -32
  35. package/dist/tui/App.js.map +1 -1
  36. package/dist/tui/ChoicePicker.d.ts +2 -0
  37. package/dist/tui/ChoicePicker.d.ts.map +1 -1
  38. package/dist/tui/ChoicePicker.js +3 -1
  39. package/dist/tui/ChoicePicker.js.map +1 -1
  40. package/dist/tui/Composer.d.ts +10 -7
  41. package/dist/tui/Composer.d.ts.map +1 -1
  42. package/dist/tui/Composer.js +2 -7
  43. package/dist/tui/Composer.js.map +1 -1
  44. package/dist/tui/StatusBar.d.ts +56 -10
  45. package/dist/tui/StatusBar.d.ts.map +1 -1
  46. package/dist/tui/StatusBar.js +106 -35
  47. package/dist/tui/StatusBar.js.map +1 -1
  48. package/dist/tui/agent.d.ts +38 -1
  49. package/dist/tui/agent.d.ts.map +1 -1
  50. package/dist/tui/agent.js +78 -10
  51. package/dist/tui/agent.js.map +1 -1
  52. package/dist/tui/choice-selection.d.ts +3 -1
  53. package/dist/tui/choice-selection.d.ts.map +1 -1
  54. package/dist/tui/choice-selection.js +2 -2
  55. package/dist/tui/choice-selection.js.map +1 -1
  56. package/dist/tui/permission-review.d.ts.map +1 -1
  57. package/dist/tui/permission-review.js +14 -2
  58. package/dist/tui/permission-review.js.map +1 -1
  59. package/dist/tui/slashCommands.d.ts +40 -0
  60. package/dist/tui/slashCommands.d.ts.map +1 -1
  61. package/dist/tui/slashCommands.js +62 -3
  62. package/dist/tui/slashCommands.js.map +1 -1
  63. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,287 @@
1
1
  # @namzu/cli
2
2
 
3
+ ## 25.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3ff9027: Agent rows in the delegated-work rail, the agent cockpit and a child's transcript header now show the resolved child model and live token/tool-call counters when a host reported them: cumulative spend compacted to `42.1k`/`1.38M` and a `· N tools` count. Spend is the child's cumulative `token_usage_updated` usage, never its current context size — a different, shrinking number that would otherwise make a long-running child look like it was spending far more than it was. A child that has not yet reported usage shows an em dash rather than `0`, since "unknown" and "spent nothing" are different facts. On a narrow terminal the counters are dropped first, then the model name; the description is never truncated to make room for either, and a resolved model id long enough to threaten that (a self-hosted or gateway-style id can run well past a typical short name) is itself capped to a short label with an ellipsis rather than left to crowd the description out.
8
+
9
+ Minor, not patch: this is new operator-visible capability, not a fix. `SubagentActivity` (the type these fields were added to) is internal to `@namzu/cli`'s own TUI and is not exported from the package's public entry, so no published type changed shape for a consumer.
10
+
11
+ - ea82bd8: List past and running orchestration runs with `/agents runs`, a third
12
+ subcommand beside `/agents running` and `/agents available`.
13
+
14
+ Each row is one parent turn that delegated at least one child: its name, when
15
+ it started, the phases its children reported, agents done/total, tokens spent
16
+ and elapsed time — the same shape `/jobs` prints, newest run first. A run still
17
+ going is read straight from the live monitor; a finished one is read cheaply
18
+ from disk, one `run.json` per child, without opening any child's transcript.
19
+ A finished run has no `workflow` label to show — that annotation never
20
+ survives a restart — so its name is the opening words of the parent turn
21
+ instead; a live run still shows its `workflow` label when one was set. The
22
+ listing is capped at 20 rows, newest first, with an omitted count beyond that,
23
+ matching the delegation-history archive's own bound. An empty history says so
24
+ in words rather than opening an empty picker, and `/agents` with an
25
+ unrecognised subcommand still shows usage.
26
+
27
+ Enter opens the selected run in the same cockpit `Ctrl+T` opens, landing
28
+ directly on the first agent's transcript — so a finished run's `Replayed from
29
+ saved evidence. This child cannot be continued.` banner is the first thing on
30
+ screen, and nothing on it offers to message or cancel work that already ended
31
+ in another process.
32
+
33
+ Additive: a new subcommand and a new optional `listOrchestrationRuns()` on the
34
+ session object the TUI already builds. Nothing existing changed.
35
+
36
+ - ea130bc: New optional `eraProbeTimeoutMs` on an `mcpServers` entry, letting one server override how long its era probe (`server/discover`, sent before the legacy `initialize` handshake) waits before falling back — validated like `connectTimeoutMs` and refused rather than silently defaulted when given but not a positive number of milliseconds. Useful for a stdio server known to be old and slow to connect: shortening the probe leaves more of `connectTimeoutMs` for the handshake that will actually answer. Unconfigured servers are unaffected — the SDK's own default and clamp apply exactly as before.
37
+
38
+ [Tool servers](../docs/cli/mcp-servers.md#the-era-probe) also documents the era probe's operator-visible cost for the first time: one extra round trip on first contact per origin or resolved command, cached afterward, and the probe's own timeout once against a legacy server old enough to stay silent on it.
39
+
40
+ - 380691e: The composer footer now sits directly under the message frame in every case, and the automatic agent rail — the panel that used to be titled "Delegated work" — no longer uses that literal title.
41
+
42
+ Before: the render order below the message frame was frame → delegated-work rail (when agents were live) → footer, so the footer's row depended on whether a rail was drawn between it and the frame. The rail's title, and the agent cockpit's per-workflow header, fell back to the literal string `Delegated work` whenever no single explicit `workflow` label covered every agent shown — including the ordinary case of agents that never set one.
43
+
44
+ Now: the order below the frame is frame → footer → the rail (or, in its place, the agent cockpit, a child transcript, or the tool-output viewer). The footer is always the row immediately after the message frame's bottom border, whether or not anything follows it. The rail's title is the workflow label every one of its agents shares; when they carry none, or carry more than one, the title is a neutral count instead — `2 agents · 1 running` — never the generic "Delegated work" name. The agent cockpit's header follows the same rule. Each row of the cockpit's own workflow picker (`ctrl+t` with two or more groups live or retained) follows it too: an unlabelled group is named after its own lead agent instead, so two unlabelled groups no longer render as identical "Delegated work" rows. The right-hand side of the rail is unchanged (`N active · M total · ↓ / ctrl+t`).
45
+
46
+ Nothing about permission-mode behavior, the footer's own content rules, or agent scheduling changed — only where the rail draws relative to the footer, and what its title says when no workflow was named. Minor, not patch: an operator with agents running sees a different screen layout, and any workflow that never sets an explicit label now reads a different title in the rail and the cockpit — a terminal-automation script or screenshot keyed to either no longer matches.
47
+
48
+ - d0227e2: The CLI's MCP client connections now negotiate against a broader set of legacy MCP protocol revisions (via `@namzu/sdk`'s `MCPClient`), so an MCP server that had negotiated to `2025-03-26`, `2025-06-18` or `2025-11-25` — refused outright before this release — now connects normally. No CLI-owned config key, flag or default changes; this is an operator-visible improvement (more MCP servers connect) delivered through the SDK dependency bump, not a change to anything the CLI itself declares as its own surface. Minor rather than major on that basis.
49
+ - 5663108: Every MCP server the CLI connects to is now asked `server/discover` at MCP `2026-07-28` before the legacy `initialize` handshake is offered (via `@namzu/sdk`'s `MCPClient`), so a server that only speaks the 2026-07-28 revision — which has no `initialize` at all — connects for the first time.
50
+
51
+ **What an operator observes.** One extra round trip on first contact per HTTP origin or per stdio command, then nothing: the resolved era is cached for the process. Against a server that answers an unknown method with an error, that is a round trip's latency. Against one that ignores unknown methods entirely it is the SDK's `eraProbeTimeoutMs`, 2 seconds by default; measured against a real child process of that kind, `mcp add`-style connects finish in about 2s, well inside the CLI's unchanged 10s `connectTimeoutMs`. No CLI-owned flag, config key or default changes — as with the legacy-era broadening two releases ago, this is an operator-visible improvement delivered through the SDK dependency rather than a change to anything the CLI declares as its own surface, which is what makes it minor rather than major.
52
+
53
+ - c0aeab2: The permission mode and the model/effort identity now share a single dim line directly below the message frame, instead of two separately-positioned indicators.
54
+
55
+ Before: the active permission mode (when it differed from `prompt`) was drawn as its own row _inside_ the message frame, above the `›` input, growing the frame from three rows to four; the model, reasoning effort and working directory sat on a wholly separate status line, one blank row further down, with the interaction hint or durable goal on its right.
56
+
57
+ Now: one footer line, always present, immediately below the frame (the frame is a constant three rows). Left to right: the permission-mode badge, colored by mode, with its `(shift+tab to cycle)` reminder when the mode differs from `prompt` — or, in `prompt` mode, a quiet `shift+tab to cycle` in its place; a reasoning-effort override beside it as `· effort <level>`, only when the operator has set one (the previous line's unconditional `<model> default` is gone — an unset effort is no longer named); the working directory. On the right: the interaction hint or durable goal exactly as before, or — when neither is active — the model identity, which moved here from the left. The footer stays exactly one row at every width: on narrow screens the working directory shrinks and drops first (a path is recoverable, the mode is not), then the effort label, then the cycle-key reminder, then the model on the right, and only as a last resort does the mode badge itself truncate.
58
+
59
+ Nothing about what a mode does, or its name, changed — only where and how it is drawn. `PermissionMode`, `permissionModeLabel` and the Shift+Tab cycle order (`prompt` → `accept-edits` → `plan` → `prompt`) are untouched, and neither `Composer` nor `StatusBar` is part of this package's public entry point (`packages/cli/src/index.ts`) — a consumer importing `@namzu/cli` as a library sees no type or export change at all.
60
+
61
+ Minor, not patch: an operator running `namzu` sees a different screen on every launch — the mode fact and the identity fact move to a line neither used to share, an unset reasoning effort is no longer implied to be `default`, and a screenshot, recording or terminal-automation script keyed to the old two-indicator layout no longer matches. That is a behavior change worth a changelog entry even though no importable type moved.
62
+
63
+ - 449642e: Add `/orchestrate`, a session mode layered above reasoning effort rather than inside it.
64
+
65
+ `@namzu/cli`: `/orchestrate [on|off]` (no argument toggles) turns the mode on or off for the current session. It is deliberately not a `ReasoningEffort` value — typing `/effort orchestrate` still reports "unavailable for this model", exactly as `ultracode` does today. When the `/effort` picker can open, the mode also appears there as its own row below a rule, apart from the model's own levels. Turning the mode on pins reasoning effort to the model's highest published level and strengthens delegation guidance for future turns toward delegating by default; when the model publishes no exact effort menu the mode still turns on and still strengthens guidance, but pins nothing and says so. Like effort, the mode is in-memory and per-session — nothing is written to preferences. A model switch still resets an explicit effort override to the new model's default, but while the mode is on it re-pins to the new model's highest level instead. The status line shows the level and the mode together (`effort high · orchestrate`), or the mode alone when nothing is pinned — never a fabricated effort value.
66
+
67
+ `@namzu/sdk`: `codingAgentDoctrineContribution` gains an optional `orchestrate` field on `CodingAgentDoctrineOptions`, and a new exported `CODING_AGENT_ORCHESTRATE_DOCTRINE` constant. Passing `orchestrate: true` (and leaving `delegation` at its default) appends that text after the existing delegation doctrine. Leaving the new field unset — the only behavior any existing caller can observe — renders byte-identical output to before this field existed. No default changed and no export was renamed or removed, so this is additive for every current consumer.
68
+
69
+ - b58b8ae: The parent can now write a line of commentary above the agent rail, through a
70
+ new `narrate_work` tool.
71
+
72
+ While several agents are running, the rail says what each one is doing but
73
+ nothing says why — which phase just came back, what disagreed, what happens
74
+ next. `narrate_work` takes one `line` and shows it directly above the rail,
75
+ outside its border, in the run's own voice. It changes nothing: no task is
76
+ started, corrected, stopped or re-ordered, and no surface reads the line back.
77
+
78
+ Bounded on purpose, because the rows it spends are the most valuable on the
79
+ screen: the three most recent lines stay, a further line drops the oldest, each
80
+ line is one row clipped at 200 characters with a marker saying so, a blank line
81
+ is refused, and the whole band is cleared when the conversation is reset. Text
82
+ longer than twice a row is not a line and is refused rather than reduced to its
83
+ opening clause. A session that never calls it renders exactly as it did before
84
+ — no heading, no separator, no reserved row — and the band never costs the
85
+ agent rail a row: the rail's height budget is computed from the terminal's own
86
+ rows, and on a full screen the band's rows are paid for by the conversation
87
+ scrolling at the top, the way every row this interface adds is paid for.
88
+
89
+ The call is not reviewed: it declares itself read-only because it starts,
90
+ changes and stops nothing — no file of its own, no request, no task — and a
91
+ consent dialog per line of commentary, shown to the operator being asked, is a
92
+ tool nobody would call. `send_message` and `cancel_agent`, which do reach into a
93
+ running child, are reviewed exactly as before. A successful call adds no
94
+ transcript row either — the line is already on screen — while a refused one
95
+ keeps its row, since nothing was shown.
96
+
97
+ The tool is mounted only in the interactive terminal, where somebody is there
98
+ to read the line — the same condition `ask_user_question` is mounted under.
99
+ `namzu run`, `namzu run --stream`, `namzu drain` and the resident step have no
100
+ rail for a line to appear above and are not offered it, so their tool rosters
101
+ are unchanged by this release.
102
+
103
+ The tool is the parent's alone. It is registered on the parent conversation's
104
+ registry beside `send_message` and `cancel_agent`, and a delegated child's
105
+ roster carries none of them, so nothing a child writes can be rendered as the
106
+ run's own narration. A child's output stays wrapped as untrusted, which is the
107
+ whole reason the boundary is where it is.
108
+
109
+ The band is in-memory only: it is cleared on reset and nothing replays it onto
110
+ the screen after a resume. The call is not. It is recorded in the run's
111
+ transcript and in the conversation's checkpoints like every other tool call,
112
+ and it returns to the model's own history on `/resume` — so treat a narrated
113
+ line as durable text about the work, not as a caption that disappears with the
114
+ screen.
115
+
116
+ Additive: a new tool on the roster the parent already carries, and an optional
117
+ narration reader on the session's activity source. Nothing existing changed.
118
+
119
+ - 8463b54: The `Agent` tool accepts an optional `phase_detail` string alongside `workflow`, `phase` and `phase_order` — display-only text for a phase, exactly like its neighbours: it creates no dependencies, barriers or serial execution. The first agent to declare a phase's detail sets it; a later sibling in the same phase cannot change it, so concurrent children with slightly different wording never make the pane flicker.
120
+
121
+ In the agent cockpit (Ctrl+T / `/agents`), a phase's detail is revealed beneath the phase list only while that phase carries the cursor — the other phases show none, and a phase with no detail renders exactly as it did before this change, with no reserved blank space. The text wraps to the pane width and is clipped to a fixed line budget, so the pane's height never depends on how long the detail is. The compact approval plan and its detailed pager (`permission-review.ts`) now surface the same text, so the plan an operator approves and the cockpit they inspect afterward agree.
122
+
123
+ Minor, not patch: this is new operator-visible capability. `SubagentActivity` and `AgentPhase` (the internal types that gained `phaseDetail`/`detail`) are not exported from `@namzu/cli`'s public entry, so no published type changed shape for a consumer.
124
+
125
+ - 3e6980d: Open a finished delegated child from the evidence it already writes to disk.
126
+
127
+ **`@namzu/sdk`** gains one static method and the type it returns:
128
+ `RunDiskStore.listChildren(baseDir, parentRunId)` and `DelegatedChildRun`. It
129
+ walks `<baseDir>/<parentRunId>/children/`, reads each child's `run.json`, and
130
+ reports the run id, its directory, and whatever the file recorded of the agent,
131
+ the model, the status, the timings and the token total. Every field from the
132
+ file is optional: `run.json` is written on a run's terminal path, so a child
133
+ killed before it got there leaves a transcript worth reading and no recorded
134
+ ending, and absent means "the file did not say" rather than zero.
135
+
136
+ Additive. Nothing existing changed, and in particular **`listRuns` is
137
+ unchanged** — do not read this as a fix to the index. `addToIndex` still
138
+ returns early for any run with a `parentRunId`, so a delegated child still
139
+ never appears in the browsable catalogue, which is what keeps it out of a
140
+ host's conversation listing. `listChildren` is the separate read for a caller
141
+ that wants the evidence anyway. It performs no writes: binding a `RunDiskStore`
142
+ to a run creates that run's directory, which is why discovery is a static walk
143
+ and not a bound method.
144
+
145
+ **`@namzu/cli`** can now open a delegated child that is no longer live — evicted
146
+ by the activity monitor's eighty-agent bound, or left behind by a process that
147
+ has since exited. The agent cockpit lists it from disk and drills into its saved
148
+ transcript, rebuilt through the same projection a live child renders through, so
149
+ the past and the present look alike.
150
+
151
+ It cannot be continued, and the screen says so: a replayed row is marked `saved`,
152
+ its transcript is headed `Replayed from saved evidence. This child cannot be
153
+ continued.`, it never appears in the live panel above the composer, and there is
154
+ no message or cancel affordance on it. Resume has never restarted delegated
155
+ tasks or reconnected their processes, and opening one does not either. Replay is
156
+ read-only — no file is written, moved or pruned by looking at a past run — and a
157
+ torn transcript opens with the records that could be read plus a row saying it is
158
+ partial; one that cannot be read at all opens with that row alone, beside what
159
+ `run.json` recorded, rather than dropping the child from the list.
160
+
161
+ Two limits worth knowing before relying on it. Streaming deltas never enter a
162
+ run's durable log, so a replayed transcript carries tool calls, their results and
163
+ any failure text but not the assistant prose that streamed between them; the
164
+ child's `report.md` holds its answer. Delegation lifecycle events enter no log
165
+ either, so a replayed child's `workflow` and `phase` labels are not recovered:
166
+ saved children are grouped by the parent run they belonged to and carry the
167
+ unlabelled default workflow, as a live child launched without labels does.
168
+
169
+ Child run directories accumulate and nothing prunes them. That predates this
170
+ change — the directories were always written — but this is what makes the growth
171
+ visible. Reclaiming the space today means deleting `children/` directories by
172
+ hand; a prune command is follow-up work.
173
+
174
+ - 35cbc02: A correction queued with `send_message` was previously invisible: the child's transcript jumped straight from one tool call to a visibly redirected next turn, and the parent saw only a one-line "queued" acknowledgement that scrolled away. Once delivery is confirmed (never for a refused or unowned send), it now appears on both sides: the child's transcript gets a `← from parent: …` row using the existing system-row kind, and the main conversation gets a matching `<description> · correction sent` row with the message text beneath it. Each side shows the message exactly once, however many times the surface re-renders.
175
+
176
+ Minor, not patch: this is new operator-visible capability. `SubagentActivityMonitor.recordMessage()` and the `direction` field it adds to a transcript row are internal to the CLI, not exported from `@namzu/cli`'s public entry, so no published type changed shape for a consumer.
177
+
178
+ ### Patch Changes
179
+
180
+ - bd32216: Delegation display labels now ride the `agent_pending` event. `RunEvent`'s `agent_pending` variant, `CreateTaskOptions` and `SendMessageOptions` each gain optional `workflow`, `phase`, `phaseDetail` and `phaseOrder`, and the SSE bridge carries them on `agent.pending` as `workflow`, `phase`, `phase_detail` and `phase_order`.
181
+
182
+ **These are display annotations only; they do not create dependencies, barriers, or serial execution.** Nothing in the kernel reads them back: admission, capacity, ordering and concurrency are decided by the scheduler, and two children naming the same phase are not thereby sequenced, synchronised or joined. `planId`/`planStepId` remain the delegation fields that carry correlation a host may act on. A reader who infers execution structure from a label here has inferred it from a caption.
183
+
184
+ What they buy is reach. A label that stays in the delegating process's memory is visible to that process and to nothing else; on the event it reaches every listener the delegation was given, and through `mapRunToStreamEvent` the SSE wire, so a consumer watching from elsewhere rebuilds the same grouping instead of seeing an undifferentiated list of children.
185
+
186
+ **Reach is not durability, and this does not add persistence.** Delegation lifecycle events are handed straight to a host's listener without passing through the run's event translator, so `agent_pending` enters no run's log — which is what the absent `seq` on these variants has always meant. A label supplied here is written nowhere by the kernel and does not survive a restart; a host that wants the grouping to outlive its process records it from the listener, into whatever store it already keeps.
187
+
188
+ Minor, and nothing to do on the upgrade: every field is optional and absent unless a host supplies one, no export was removed or renamed, no union narrowed, no default changed. A host that supplies none sees byte-identical events and wire payloads. The A2A bridge continues to emit nothing for delegation events — deliberately, and now said so in its comment: a peer models one task lifecycle and has no screen of ours to caption.
189
+
190
+ The CLI change is behaviour-preserving (`patch`): the `Agent` tool sends the labels it already collected down onto the delegation, and its activity monitor reads them off the event with the launch-time values kept as the seed, so a child that fails before `agent_pending` still groups where it was launched. For a run supplying the same labels on both paths — which is every CLI run — the grouping is byte-identical to before.
191
+
192
+ - 1391ab8: The composer footer's `· orchestrate` marker no longer disappears at narrow terminal widths while orchestrate mode stays silently on.
193
+
194
+ Before: `orchestrate` was appended to the reasoning-effort label as one droppable unit (`effort <level> · orchestrate`, or `orchestrate` alone with no effort pinned) inside `StatusBar.tsx`'s `fitStatusLine`. That unit was dropped for room right after the working directory, well before the model — so at 40 columns, a real PTY run with orchestrate mode on and no effort menu open showed only `shift+tab to cycle gpt-5.6-terra`: no `orchestrate` anywhere on screen, with the permission-mode badge (or its quiet reminder) and the model both still shown. Orchestrate is a persistent, behavior-changing session setting — it pins effort to the model's highest level and strengthens delegation guidance for every later turn — with no other on-screen indicator, so an operator working in a narrow pane had no way to tell it was on.
195
+
196
+ Now: `orchestrate` is its own segment, no longer bundled with `effort`, and it holds the same survival priority as the permission-mode badge. It is dropped only after the working directory, the effort label, the cycle-key reminder and the model are already gone, and only as a last resort — never truncated to a fragment of the word, and never at the cost of shrinking the badge itself to make room for it. At 100 columns the line is unaffected. At 40 columns with orchestrate on, the footer now reads `shift+tab to cycle · orchestrate` (or the equivalent with an active permission badge) instead of naming neither.
197
+
198
+ Patch, not minor: no prop, export or default changed shape — `StatusBar`'s existing `orchestrate` prop behaves exactly as documented, just fitted with a different priority under width pressure.
199
+
200
+ - Updated dependencies [bd32216]
201
+ - Updated dependencies [c272993]
202
+ - Updated dependencies [c99f088]
203
+ - Updated dependencies [d0227e2]
204
+ - Updated dependencies [359b27f]
205
+ - Updated dependencies [5663108]
206
+ - Updated dependencies [165fd64]
207
+ - Updated dependencies [93f8d1e]
208
+ - Updated dependencies [7694a82]
209
+ - Updated dependencies [6283f8d]
210
+ - Updated dependencies [449642e]
211
+ - Updated dependencies [3e6980d]
212
+ - Updated dependencies [feaeaba]
213
+ - @namzu/sdk@41.0.0
214
+ - @namzu/computer-use@1.4.2
215
+ - @namzu/anthropic@5.1.1
216
+ - @namzu/ollama@2.2.2
217
+ - @namzu/openai@3.1.1
218
+ - @namzu/openrouter@2.4.0
219
+
220
+ ## 25.0.1
221
+
222
+ ### Patch Changes
223
+
224
+ - f33c62b: A run now suspends for a background job the model said it was waiting on, instead of settling over it. When the model stops calling tools and a job named by `wait_for_job` is still running, the run waits — no provider request, no tokens — for the job's exit, an operator message, or the settle grace, whichever comes first. On an exit the model gets one more turn with the `[Background job update]` line in front of it; on neither, the run settles and names the job.
225
+
226
+ This is the same bounded, zero-token wait `CompletionInbox` already gave a delegated task, and it shares the delegated task's grace — half of what the run has left before it must start finishing — under a ceiling of its own: two minutes, or `NAMZU_JOB_HOLD_MAX_MS`. On a run with a `timeoutMs` the grace comes out of what is left rather than being added to it, so time a `wait_for_job` call already spent shortens the hold by the same amount. On a run WITHOUT one — no run deadline, which is what the CLI ships — there is no remainder to take a share of, and the task ceiling would be a flat hour; that hour is sound for a task, which cannot outlive it, and wrong for a job, which can run forever. The two-minute job ceiling is what bounds that case, so a `wait_for_job` that ran its own bound out is followed by two more minutes at most, not by a second hour. The iteration limit still bounds all of it, and the wait starts nothing and stops nothing.
227
+
228
+ **Wait-intent is explicit.** Only a job `wait_for_job` named is awaited, and only for the rest of the run that named it. A job nobody waited on — a dev server, a watcher — never holds a run open, and there is no opt-in flag on `bash run_in_background` that changes that.
229
+
230
+ **Why this is `minor` and not `major`.** The signal is new: no run that exists today can have an awaited job, because nothing before this could mark one. A host that never calls `wait_for_job` sees the loop it saw before, so no default changes and no existing behaviour is withdrawn.
231
+
232
+ Additive API:
233
+
234
+ - `Run.abandonedJobIds` — awaited jobs still running when the run ended, the job-side counterpart to `abandonedTaskIds`. Naming them is not stopping them: a run-owned job is still stopped by the run's own teardown, and one bound to the host's session keeps running.
235
+ - `RUNTIME_CONTEXT_MESSAGE_KINDS` gains `'job-exit'`, the provenance on the message that carries an exit delivered by the wait. Consumers that exhaustively switch on `RuntimeContextMessageKind` need a case for it.
236
+ - `BackgroundJobRegistryRef` gains an optional `markAwaited(id)`, and `bindOwner`'s options take an `onAwaited(id)` callback that backs it. Both are optional; a host that wires neither gets the previous behaviour, which is no hold.
237
+ - `NAMZU_JOB_HOLD_MAX_MS` sets the job ceiling above, in milliseconds, beside the `NAMZU_JOB_WAIT_*` knobs `wait_for_job` already reads. Unset is two minutes.
238
+
239
+ - 6ae4072: The repeat-call advisory (notices, then escalates, when a tool is called with identical arguments over and over) now reaches the model even when the repeated tool's result is structured content — an image, a document, an MCP resource block — rather than plain text. `attachRepeatNotice` previously required the trailing tool result to be a string and silently dropped the notice otherwise; it now falls back to delivering the advisory as its own runtime-context message immediately after the tool-result batch. No thresholds changed, and a repeat that keeps succeeding is still only ever noticed, never refused.
240
+
241
+ `RuntimeContextMessageKind` gains a `'repeat-call'` member for this fallback message. A consumer that exhaustively switches over the union (the CLI's transcript labeling did) needs a case for it; `@namzu/cli` adds one in this release.
242
+
243
+ - 92ab1d9: A resumed conversation keeps the file witnesses it earned. The observation ledger is process memory, and every resume path handed the run an empty one: the derived work context could admit nothing, and the first thing a resumed agent did was read back a file whose whole body was in the transcript it had just been given.
244
+
245
+ The new export `seedObservationLedger(messages, tracker, { workingDirectory, additionalDirectories, sandboxed })` rebuilds a ledger from a conversation's own history. `resumeRun` and `query`'s checkpoint resume call it for you, from the history as repaired rather than as checkpointed, so the ledger describes exactly what the model is about to be shown; the CLI calls it the first time a turn asks for a conversation's tracker, which covers `/resume`, `namzu run --resume`/`--continue`, and a forked conversation — each seeded from its own messages, once. Call it directly if you keep a tracker per conversation and restore one yourself. Nothing is persisted and no session-store schema changes; a host that does nothing sees exactly today's behaviour.
246
+
247
+ What a replay may conclude is what the projection would admit, by the same predicates and the same bounded replay. A `write` whose call and successful receipt are both intact restores its body and its witness; the `edit` calls above it are replayed hop by hop and restore the chain. A `read` never supplies a body — the line numbering is never undone to recover one — and can only confirm one already reconstructed, by rendering it forward through the read tool's own renderer and comparing the whole rendering with the receipt. A windowed read, a read that shows something else, a cleared receipt, a hop that no longer applies, a body past the bounds and a call whose arguments run past what a replay reads as evidence each withdraw whatever the pass held for that path. So do the two cases where the transcript settles no outcome: a call it never answered — the unknown-outcome result the kernel's own repair writes for one included — may have landed with the file half written, and a mutation it refused is a tool's own report about that path, a drift refusal above all, made after reading the disk. Each of those costs the path it names and no other. A path whose walk ends holding no body is entered in the ledger nowhere, and a path this conversation only ever read establishes nothing.
248
+
249
+ No file's content is read. The one thing the seed does touch the filesystem for is the key each entry is filed under: a ledger entry identifies a file rather than a spelling, so `read`, `write` and `edit` all key on the path canonicalized through its symlinks, and entries filed any other way would be entries no mutation ever checks and no drift refusal can ever withdraw. The paths named in the history are therefore resolved exactly as the tools resolve them — `additionalDirectories` included — before the walk begins. Under a sandbox the keys are the paths as written and no host path is consulted.
250
+
251
+ Only content-backed observations are restored, so a seeded ledger is never weaker than the empty one a resume starts from. A path whose body could not be reconstructed is left OUT of the ledger rather than entered without a fingerprint: `hasRead` is the read-before-overwrite refusal, and granting it with no body to compare would let a full overwrite of a file that changed while the session was closed through with nothing checked. Every path the replay does not restore therefore behaves exactly as it does today. A fingerprint it does restore is a claim derived from history and is still compared with the real file at mutation time, so a file changed while the session was closed is refused there and the refusal withdraws the path from the projection.
252
+
253
+ Three things seed nothing at all, each leaving today's empty ledger: a history naming more than 1,024 distinct path spellings — the ones only `read` names included, and two spellings of one file counting twice — which is resolved whole or not at all rather than in a prefix that cannot say what a mutation replaced; a tool call id claimed by two calls or answered by two receipts, `read` included, since the receipt that was hidden could be the observation that withdrew a claim; and a mutation no path can be recovered from, whatever came back to it — one declaring no `path`, one whose path no longer resolves inside the directories the run may reach (a refused write to a path outside them is one of these: a key is what withdrawing one path rather than the whole pass takes), or one the provider stream cut off mid-JSON, whose arguments are recorded as `{}`. A merely large call is none of these: the argument bound governs what may be believed, not what may be attributed, so an oversize `write` withdraws its own path's body and leaves every other witness standing.
254
+
255
+ `read`'s numbering and windowing move to `tools/builtins/read-render.ts` as pure functions, which is what lets the forward-render comparison run the tool's own renderer rather than a copy of it. The tool's output is unchanged, byte for byte.
256
+
257
+ - 7ca8c7d: Add a `wait_for_job` builtin tool: it blocks on a background job's exit under a run-length bound and an idle bound that resets on new output, and returns the job's accumulated output in one call — the shell-job counterpart to the existing `wait_for_task`. Neither bound stops the job; a timeout reports which clock ran out and the output read so far, with a `next_offset` to resume from. Ships by default alongside `job` and `bash`, and refuses cleanly on a host with no background job registry.
258
+
259
+ `job`'s own description no longer instructs polling with `action: "read"` in a loop; it now points at `wait_for_job` instead. `read` and `list` are unchanged.
260
+
261
+ `BackgroundJobRegistry` gains a public `waitForExit(id, { signal })`, resolving immediately for a job that has already exited and honouring an abort signal. `BackgroundJobRegistryRef` (the tool-context surface) gains an optional `waitForExit` of the same shape — additive, so an existing host implementing this interface directly keeps working without it; `wait_for_job` refuses cleanly when it is absent.
262
+
263
+ - Updated dependencies [68e535b]
264
+ - Updated dependencies [a9e4b19]
265
+ - Updated dependencies [a54dc71]
266
+ - Updated dependencies [86a3818]
267
+ - Updated dependencies [03630cd]
268
+ - Updated dependencies [f33c62b]
269
+ - Updated dependencies [a8df193]
270
+ - Updated dependencies [8bfe291]
271
+ - Updated dependencies [6ae4072]
272
+ - Updated dependencies [dd8702d]
273
+ - Updated dependencies [92ab1d9]
274
+ - Updated dependencies [e6d6d1e]
275
+ - Updated dependencies [7ca8c7d]
276
+ - Updated dependencies [6551d15]
277
+ - @namzu/sdk@40.0.0
278
+ - @namzu/zen@1.0.2
279
+ - @namzu/computer-use@1.4.2
280
+ - @namzu/anthropic@5.1.1
281
+ - @namzu/ollama@2.2.2
282
+ - @namzu/openai@3.1.1
283
+ - @namzu/openrouter@2.4.0
284
+
3
285
  ## 25.0.0
4
286
 
5
287
  ### Major Changes
@@ -11,12 +11,14 @@
11
11
  * reaches which reader: the working doctrine goes to the parent and to every
12
12
  * delegated sub-agent; the delegation doctrine, which names `task_create` and
13
13
  * `Agent`, goes to the parent only; the plan-mode text only while the session
14
- * is in `plan` mode.
14
+ * is in `plan` mode; the orchestrate text only for a turn sent while the
15
+ * session's orchestrate mode (`/orchestrate`) is on, and never without the
16
+ * delegation doctrine it strengthens.
15
17
  *
16
18
  * These are joined as raw strings into the system prompt rather than
17
19
  * registered as the kernel's contribution, because the CLI's prompt is one
18
20
  * string in a fixed order — identity, doctrine, environment, memory — and the
19
21
  * contribution would land after the environment and memory blocks.
20
22
  */
21
- export { CODING_AGENT_DELEGATION_DOCTRINE as NAMZU_DELEGATION_DOCTRINE, CODING_AGENT_WORKING_DOCTRINE as NAMZU_WORKING_DOCTRINE, PLAN_MODE_DOCTRINE as NAMZU_PLAN_MODE_DOCTRINE, } from '@namzu/sdk';
23
+ export { CODING_AGENT_DELEGATION_DOCTRINE as NAMZU_DELEGATION_DOCTRINE, CODING_AGENT_ORCHESTRATE_DOCTRINE as NAMZU_ORCHESTRATE_DOCTRINE, CODING_AGENT_WORKING_DOCTRINE as NAMZU_WORKING_DOCTRINE, PLAN_MODE_DOCTRINE as NAMZU_PLAN_MODE_DOCTRINE, } from '@namzu/sdk';
22
24
  //# sourceMappingURL=doctrine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctrine.d.ts","sourceRoot":"","sources":["../../src/context/doctrine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACN,gCAAgC,IAAI,yBAAyB,EAC7D,6BAA6B,IAAI,sBAAsB,EACvD,kBAAkB,IAAI,wBAAwB,GAC9C,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"doctrine.d.ts","sourceRoot":"","sources":["../../src/context/doctrine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACN,gCAAgC,IAAI,yBAAyB,EAC7D,iCAAiC,IAAI,0BAA0B,EAC/D,6BAA6B,IAAI,sBAAsB,EACvD,kBAAkB,IAAI,wBAAwB,GAC9C,MAAM,YAAY,CAAA"}
@@ -11,12 +11,14 @@
11
11
  * reaches which reader: the working doctrine goes to the parent and to every
12
12
  * delegated sub-agent; the delegation doctrine, which names `task_create` and
13
13
  * `Agent`, goes to the parent only; the plan-mode text only while the session
14
- * is in `plan` mode.
14
+ * is in `plan` mode; the orchestrate text only for a turn sent while the
15
+ * session's orchestrate mode (`/orchestrate`) is on, and never without the
16
+ * delegation doctrine it strengthens.
15
17
  *
16
18
  * These are joined as raw strings into the system prompt rather than
17
19
  * registered as the kernel's contribution, because the CLI's prompt is one
18
20
  * string in a fixed order — identity, doctrine, environment, memory — and the
19
21
  * contribution would land after the environment and memory blocks.
20
22
  */
21
- export { CODING_AGENT_DELEGATION_DOCTRINE as NAMZU_DELEGATION_DOCTRINE, CODING_AGENT_WORKING_DOCTRINE as NAMZU_WORKING_DOCTRINE, PLAN_MODE_DOCTRINE as NAMZU_PLAN_MODE_DOCTRINE, } from '@namzu/sdk';
23
+ export { CODING_AGENT_DELEGATION_DOCTRINE as NAMZU_DELEGATION_DOCTRINE, CODING_AGENT_ORCHESTRATE_DOCTRINE as NAMZU_ORCHESTRATE_DOCTRINE, CODING_AGENT_WORKING_DOCTRINE as NAMZU_WORKING_DOCTRINE, PLAN_MODE_DOCTRINE as NAMZU_PLAN_MODE_DOCTRINE, } from '@namzu/sdk';
22
24
  //# sourceMappingURL=doctrine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctrine.js","sourceRoot":"","sources":["../../src/context/doctrine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACN,gCAAgC,IAAI,yBAAyB,EAC7D,6BAA6B,IAAI,sBAAsB,EACvD,kBAAkB,IAAI,wBAAwB,GAC9C,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"doctrine.js","sourceRoot":"","sources":["../../src/context/doctrine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACN,gCAAgC,IAAI,yBAAyB,EAC7D,iCAAiC,IAAI,0BAA0B,EAC/D,6BAA6B,IAAI,sBAAsB,EACvD,kBAAkB,IAAI,wBAAwB,GAC9C,MAAM,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-message.d.ts","sourceRoot":"","sources":["../../src/context/runtime-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAE3D,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,yBAAyB,GAAG,MAAM,CAmB3E"}
1
+ {"version":3,"file":"runtime-message.d.ts","sourceRoot":"","sources":["../../src/context/runtime-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAE3D,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,yBAAyB,GAAG,MAAM,CAuB3E"}
@@ -9,8 +9,12 @@ export function runtimeContextLabel(kind) {
9
9
  return 'Answer review feedback';
10
10
  case 'auto-continuation':
11
11
  return 'Automatic continuation';
12
+ case 'job-exit':
13
+ return 'Background job exit';
12
14
  case 'limit-finalization':
13
15
  return 'Limit finalization request';
16
+ case 'repeat-call':
17
+ return 'Repeat-call advisory';
14
18
  case 'steering':
15
19
  return 'Runtime steering';
16
20
  case 'structured-output':
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-message.js","sourceRoot":"","sources":["../../src/context/runtime-message.ts"],"names":[],"mappings":"AAEA,0EAA0E;AAC1E,MAAM,UAAU,mBAAmB,CAAC,IAA+B;IAClE,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,cAAc;YAClB,OAAO,cAAc,CAAA;QACtB,KAAK,UAAU;YACd,OAAO,iBAAiB,CAAA;QACzB,KAAK,eAAe;YACnB,OAAO,wBAAwB,CAAA;QAChC,KAAK,mBAAmB;YACvB,OAAO,wBAAwB,CAAA;QAChC,KAAK,oBAAoB;YACxB,OAAO,4BAA4B,CAAA;QACpC,KAAK,UAAU;YACd,OAAO,kBAAkB,CAAA;QAC1B,KAAK,mBAAmB;YACvB,OAAO,yBAAyB,CAAA;QACjC,KAAK,iBAAiB;YACrB,OAAO,yBAAyB,CAAA;IAClC,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"runtime-message.js","sourceRoot":"","sources":["../../src/context/runtime-message.ts"],"names":[],"mappings":"AAEA,0EAA0E;AAC1E,MAAM,UAAU,mBAAmB,CAAC,IAA+B;IAClE,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,cAAc;YAClB,OAAO,cAAc,CAAA;QACtB,KAAK,UAAU;YACd,OAAO,iBAAiB,CAAA;QACzB,KAAK,eAAe;YACnB,OAAO,wBAAwB,CAAA;QAChC,KAAK,mBAAmB;YACvB,OAAO,wBAAwB,CAAA;QAChC,KAAK,UAAU;YACd,OAAO,qBAAqB,CAAA;QAC7B,KAAK,oBAAoB;YACxB,OAAO,4BAA4B,CAAA;QACpC,KAAK,aAAa;YACjB,OAAO,sBAAsB,CAAA;QAC9B,KAAK,UAAU;YACd,OAAO,kBAAkB,CAAA;QAC1B,KAAK,mBAAmB;YACvB,OAAO,yBAAyB,CAAA;QACjC,KAAK,iBAAiB;YACrB,OAAO,yBAAyB,CAAA;IAClC,CAAC;AACF,CAAC"}
@@ -84,6 +84,22 @@ export interface McpServerSpec {
84
84
  * that server alone; the others keep the bound that protects the session.
85
85
  */
86
86
  readonly connectTimeoutMs?: number;
87
+ /**
88
+ * How long THIS server's era probe — `connect()`'s `server/discover`
89
+ * check for a modern peer, sent before the legacy handshake — waits for
90
+ * an answer, in milliseconds. Defaults to the SDK's own
91
+ * `MCPClientConfig.eraProbeTimeoutMs` (`2000`, clamped to whichever
92
+ * `connectTimeoutMs` this server ends up with).
93
+ *
94
+ * The probe costs nothing against a server that answers — modern or
95
+ * legacy — because either answer settles it immediately. It costs THIS
96
+ * long against a legacy server old enough to stay silent on a method it
97
+ * has never heard of, once per origin or per resolved command, not once
98
+ * per run. Lower it for a stdio server known to be that old and slow to
99
+ * connect, so the probe gives up sooner and leaves more of
100
+ * `connectTimeoutMs` for the handshake that will actually answer.
101
+ */
102
+ readonly eraProbeTimeoutMs?: number;
87
103
  }
88
104
  export type McpServersConfig = Readonly<Record<string, McpServerSpec>>;
89
105
  export interface ConnectedMcpServer {
@@ -142,6 +158,20 @@ export declare function transportFor(spec: McpServerSpec, defaultCwd: string): M
142
158
  * with 10s would produce the very failure they were configuring away.
143
159
  */
144
160
  export declare function connectDeadlineFor(spec: McpServerSpec): number | string;
161
+ /**
162
+ * The era probe deadline a spec asks for, or why it cannot have it.
163
+ *
164
+ * `undefined` when the spec names none — unlike {@link connectDeadlineFor},
165
+ * which defaults to a CLI-owned constant, an unset `eraProbeTimeoutMs` is
166
+ * passed through unset so `MCPClient` applies ITS OWN default and clamp
167
+ * (`DEFAULT_MCP_ERA_PROBE_TIMEOUT_MS`, never longer than whatever
168
+ * `connectTimeoutMs` this server ends up with). Refused rather than
169
+ * defaulted when given but invalid, for the same reason
170
+ * `connectDeadlineFor` refuses one: an operator who mistyped this key
171
+ * wanted the probe to give up sooner, and silently running with the SDK's
172
+ * default would produce the very wait they were configuring away.
173
+ */
174
+ export declare function eraProbeTimeoutFor(spec: McpServerSpec): number | undefined | string;
145
175
  export declare function connectMcpServers(config: McpServersConfig | undefined, options: {
146
176
  readonly cwd: string;
147
177
  }): Promise<McpConnection>;
@@ -1 +1 @@
1
- {"version":3,"file":"servers.d.ts","sourceRoot":"","sources":["../../../src/integrations/mcp/servers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAEN,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEnB,MAAM,YAAY,CAAA;AAEnB;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,QAAS,CAAA;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,OAAQ,CAAA;AAErC,gFAAgF;AAChF,MAAM,WAAW,aAAa;IAC7B,oCAAoC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC/C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,gEAAgE;IAChE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,mCAAmC;IACnC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC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AE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC/B,OAAO,CAAC,aAAa,CAAC,CAyHxB"}
@@ -114,6 +114,28 @@ export function connectDeadlineFor(spec) {
114
114
  }
115
115
  return ms;
116
116
  }
117
+ /**
118
+ * The era probe deadline a spec asks for, or why it cannot have it.
119
+ *
120
+ * `undefined` when the spec names none — unlike {@link connectDeadlineFor},
121
+ * which defaults to a CLI-owned constant, an unset `eraProbeTimeoutMs` is
122
+ * passed through unset so `MCPClient` applies ITS OWN default and clamp
123
+ * (`DEFAULT_MCP_ERA_PROBE_TIMEOUT_MS`, never longer than whatever
124
+ * `connectTimeoutMs` this server ends up with). Refused rather than
125
+ * defaulted when given but invalid, for the same reason
126
+ * `connectDeadlineFor` refuses one: an operator who mistyped this key
127
+ * wanted the probe to give up sooner, and silently running with the SDK's
128
+ * default would produce the very wait they were configuring away.
129
+ */
130
+ export function eraProbeTimeoutFor(spec) {
131
+ const ms = spec.eraProbeTimeoutMs;
132
+ if (ms === undefined)
133
+ return undefined;
134
+ if (typeof ms !== 'number' || !Number.isFinite(ms) || ms <= 0) {
135
+ return `eraProbeTimeoutMs must be a positive number of milliseconds, got ${JSON.stringify(ms)}`;
136
+ }
137
+ return ms;
138
+ }
117
139
  export async function connectMcpServers(config, options) {
118
140
  const entries = Object.entries(config ?? {});
119
141
  const tools = [];
@@ -135,7 +157,16 @@ export async function connectMcpServers(config, options) {
135
157
  startupFailed.push({ name, reason: deadline });
136
158
  continue;
137
159
  }
138
- const client = new MCPClient({ serverName: name, transport });
160
+ const eraProbeTimeoutMs = eraProbeTimeoutFor(spec);
161
+ if (typeof eraProbeTimeoutMs === 'string') {
162
+ startupFailed.push({ name, reason: eraProbeTimeoutMs });
163
+ continue;
164
+ }
165
+ const client = new MCPClient({
166
+ serverName: name,
167
+ transport,
168
+ ...(eraProbeTimeoutMs !== undefined ? { eraProbeTimeoutMs } : {}),
169
+ });
139
170
  try {
140
171
  await withDeadline(client.connect(), deadline, `server "${name}"`);
141
172
  const listed = await withDeadline(client.listTools(), deadline, `server "${name}" listing its tools`);
@@ -1 +1 @@
1
- {"version":3,"file":"servers.js","sourceRoot":"","sources":["../../../src/integrations/mcp/servers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EACN,SAAS,EAGT,uBAAuB,GACvB,MAAM,YAAY,CAAA;AAEnB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAA;AAExC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAA;AAmFrC;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,IAAmB,EAAE,UAAkB;IACnE,MAAM,UAAU,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAA;IACrF,MAAM,MAAM,GAAG,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAA;IACzE,IAAI,UAAU,IAAI,MAAM,EAAE,CAAC;QAC1B,OAAO,iDAAiD,CAAA;IACzD,CAAC;IACD,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO;YACN,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,IAAI,CAAC,OAAiB;YAC/B,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9C,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7C,GAAG,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