maestro-agent-sdk 0.1.25 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -264
- package/dist/core/agent.d.ts +3 -1
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +5 -1
- package/dist/core/agent.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/pool-cache.d.ts.map +1 -1
- package/dist/mcp/pool-cache.js +7 -1
- package/dist/mcp/pool-cache.js.map +1 -1
- package/dist/platform/config.d.ts +5 -0
- package/dist/platform/config.d.ts.map +1 -1
- package/dist/platform/config.js +9 -0
- package/dist/platform/config.js.map +1 -1
- package/dist/platform/version.d.ts +1 -1
- package/dist/platform/version.js +1 -1
- package/dist/provider.d.ts +44 -26
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +93 -39
- package/dist/provider.js.map +1 -1
- package/dist/providers/codex-auth.d.ts +149 -0
- package/dist/providers/codex-auth.d.ts.map +1 -0
- package/dist/providers/codex-auth.js +312 -0
- package/dist/providers/codex-auth.js.map +1 -0
- package/dist/providers/codex-stream.d.ts +42 -0
- package/dist/providers/codex-stream.d.ts.map +1 -0
- package/dist/providers/codex-stream.js +330 -0
- package/dist/providers/codex-stream.js.map +1 -0
- package/dist/providers/codex-translators.d.ts +105 -0
- package/dist/providers/codex-translators.d.ts.map +1 -0
- package/dist/providers/codex-translators.js +244 -0
- package/dist/providers/codex-translators.js.map +1 -0
- package/dist/providers/codex.d.ts +117 -0
- package/dist/providers/codex.d.ts.map +1 -0
- package/dist/providers/codex.js +334 -0
- package/dist/providers/codex.js.map +1 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +25 -1
- package/dist/registry.js.map +1 -1
- package/dist/state/tasks.d.ts +10 -0
- package/dist/state/tasks.d.ts.map +1 -1
- package/dist/state/tasks.js +6 -0
- package/dist/state/tasks.js.map +1 -1
- package/dist/sub-agent/runner.d.ts.map +1 -1
- package/dist/sub-agent/runner.js +3 -8
- package/dist/sub-agent/runner.js.map +1 -1
- package/dist/tools/builtin/agent.d.ts +1 -1
- package/dist/tools/builtin/agent.js +1 -1
- package/dist/tools/builtin/agent.js.map +1 -1
- package/dist/tools/builtin/ask_user_question.d.ts +24 -0
- package/dist/tools/builtin/ask_user_question.d.ts.map +1 -0
- package/dist/tools/builtin/ask_user_question.js +67 -0
- package/dist/tools/builtin/ask_user_question.js.map +1 -0
- package/dist/tools/builtin/tasks.d.ts +20 -4
- package/dist/tools/builtin/tasks.d.ts.map +1 -1
- package/dist/tools/builtin/tasks.js +99 -1
- package/dist/tools/builtin/tasks.js.map +1 -1
- package/dist/tools/file-state.d.ts +1 -1
- package/dist/tools/file-state.d.ts.map +1 -1
- package/dist/tools/file-state.js.map +1 -1
- package/dist/tools/index.d.ts +1 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/path-guard.d.ts +1 -1
- package/dist/tools/path-guard.js +2 -2
- package/dist/types.d.ts +19 -14
- package/dist/types.d.ts.map +1 -1
- package/package.json +17 -1
- package/dist/tools/builtin/multi_edit.d.ts +0 -16
- package/dist/tools/builtin/multi_edit.d.ts.map +0 -1
- package/dist/tools/builtin/multi_edit.js +0 -292
- package/dist/tools/builtin/multi_edit.js.map +0 -1
package/README.md
CHANGED
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
**Embeddable agent SDK — skills, memory, MCP, and host-controlled guardrails out of the box.**
|
|
8
8
|
Anthropic + DeepSeek today, BYO-provider in one file. No CLI, no gateway, no host lock-in.
|
|
9
9
|
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
> The only slot that is both a **pure library** and **multi-vendor** — harness ships inside the SDK, you `import` it into any host and pick the provider per call. ([details](#positioning--a-building-block-not-a-product))
|
|
13
|
+
|
|
10
14
|
> **Status:** Early port (v0.1.x). Active development. API surface may change before 1.0.
|
|
11
15
|
|
|
12
16
|
A generalizable agent runtime. Swap providers, inject your own logger/MCP resolver/hooks, and embed it in any host process — no framework, no lock-in.
|
|
@@ -15,8 +19,7 @@ A generalizable agent runtime. Swap providers, inject your own logger/MCP resolv
|
|
|
15
19
|
|
|
16
20
|
- **Agent loop** — provider-driven tool-calling loop with iteration cap, abort signal, LLM pre/post guardrail hooks, and event stream.
|
|
17
21
|
- **Pluggable providers** — first-class adapters for Anthropic (Claude) and DeepSeek V4; provider-neutral message schema so adding OpenAI / Gemini / Ollama is a thin file.
|
|
18
|
-
- **Built-in tools** — `bash
|
|
19
|
-
- **Multimodal Read (v0.1.18+)** — `.png/.jpg/.webp/.gif` files return a native vision content block (Anthropic `image.source`, DeepSeek `image_url` data URI) so the model sees the image directly. `.pdf` text-extracts via `pdfjs-dist` and returns line-numbered text per page.
|
|
22
|
+
- **Built-in tools** — `bash`, `Read`, `Write`, `Edit`, `MultiEdit`, `Glob`, `Grep`, `Agent` (sub-agent delegation), `TaskCreate`/`TaskUpdate`/`TaskList`/`TaskGet`, `WebFetch` (optional SSRF policy via `createWebFetchTool`), `skill_view`, `skill_write`. Bring your own via `ToolRegistry`. Grep shells out to ripgrep (`rg`) so install it if you want the tool active; the SDK surfaces a structured error pointing to the install path when missing. Tool primitives are also importable from the `maestro-agent-sdk/tools` subpath when you don't need the rest of the runtime.
|
|
20
23
|
- **MCP** — built-in client pool (stdio + SSE) so any MCP server (`@modelcontextprotocol/sdk`) shows up as tools.
|
|
21
24
|
- **Skills** — per-workspace `.skills/<skillKey>/<name>/skill.md` packages with FTS-style indexing, on-demand body load (`skill_view`), and agent-autonomous authoring (`skill_write`).
|
|
22
25
|
- **Memory** — automatic context compression (summarization + pruning) when the token budget is hit. Reuses the agent's own model for compaction — no separate model knob.
|
|
@@ -101,265 +104,17 @@ for await (const event of runConversation(agent, "Summarize today's news.")) {
|
|
|
101
104
|
}
|
|
102
105
|
```
|
|
103
106
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
import { ToolRegistry, createReadTool } from "maestro-agent-sdk";
|
|
108
|
-
|
|
109
|
-
const tools = new ToolRegistry();
|
|
110
|
-
// Read auto-detects images (PNG/JPG/WebP/GIF → native vision block) and PDFs
|
|
111
|
-
// (text-extracted via pdfjs-dist, page-paginated by offset/limit).
|
|
112
|
-
tools.register(createReadTool());
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Background bash (v0.1.18+ / v0.1.19+ one-knob)
|
|
116
|
-
|
|
117
|
-
**v0.1.19 (recommended — host uses `maestroProvider`):**
|
|
118
|
-
|
|
119
|
-
```ts
|
|
120
|
-
import { maestroProvider } from "maestro-agent-sdk";
|
|
121
|
-
|
|
122
|
-
for await (const event of maestroProvider({
|
|
123
|
-
agent: "maestro",
|
|
124
|
-
prompt: "Start the dev server and tail it for errors",
|
|
125
|
-
cwd: "/repo",
|
|
126
|
-
systemPrompt: "...",
|
|
127
|
-
abortController: new AbortController(),
|
|
128
|
-
enableBackgroundBash: true, // ← single knob
|
|
129
|
-
})) {
|
|
130
|
-
// Bash(run_in_background:true) / BashOutput / KillBash all available.
|
|
131
|
-
}
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Cascade-kill on `abortController.abort()` is wired automatically.
|
|
135
|
-
|
|
136
|
-
**v0.1.18 (host builds its own ToolRegistry):**
|
|
137
|
-
|
|
138
|
-
```ts
|
|
139
|
-
import {
|
|
140
|
-
ToolRegistry,
|
|
141
|
-
createBashTool,
|
|
142
|
-
createBackgroundBashRegistry,
|
|
143
|
-
createBashOutputTool,
|
|
144
|
-
createKillBashTool,
|
|
145
|
-
} from "maestro-agent-sdk";
|
|
146
|
-
|
|
147
|
-
const ac = new AbortController();
|
|
148
|
-
// One registry handle wires the three tools together — bash_id from
|
|
149
|
-
// one plugs directly into the others. abortSignal cascade-kills every
|
|
150
|
-
// still-running process when the loop aborts.
|
|
151
|
-
const bgRegistry = createBackgroundBashRegistry({ abortSignal: ac.signal });
|
|
152
|
-
|
|
153
|
-
const tools = new ToolRegistry();
|
|
154
|
-
tools.register(createBashTool({ signal: ac.signal, background: bgRegistry }));
|
|
155
|
-
tools.register(createBashOutputTool(bgRegistry));
|
|
156
|
-
tools.register(createKillBashTool(bgRegistry));
|
|
157
|
-
// Now the model can run `Bash(run_in_background:true, command:"npm run dev")`,
|
|
158
|
-
// poll via `BashOutput(bash_id)`, and stop via `KillBash(bash_id)`.
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Session fork at message N (v0.1.18+)
|
|
162
|
-
|
|
163
|
-
```ts
|
|
164
|
-
import { forkSessionAt } from "maestro-agent-sdk";
|
|
165
|
-
|
|
166
|
-
// "Branch session A at turn 12 and try a different question."
|
|
167
|
-
const { sessionId: forkId } = forkSessionAt({
|
|
168
|
-
parentSessionId: "a1b2c3d4-...",
|
|
169
|
-
messageIndex: 12, // copy first 12 turns
|
|
170
|
-
metadata: { reason: "exploring alt path" },
|
|
171
|
-
});
|
|
172
|
-
// forkId is a brand-new sessionId. `maestroProvider.query({ sessionId: forkId, ... })`
|
|
173
|
-
// resumes from the forked prefix as if it were a fresh resume.
|
|
174
|
-
// The parent JSONL is untouched.
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
> **What happens on the wire.** Anthropic gets `tool_result.content` as an
|
|
178
|
-
> array of `text` + `image` blocks (`source.type: "base64"`); DeepSeek gets
|
|
179
|
-
> the same image as an OpenAI-style `image_url` content part with a
|
|
180
|
-
> `data:image/<type>;base64,<bytes>` URI. Hosts don't see any of this —
|
|
181
|
-
> the tool result UnifiedEvent carries a short text preview
|
|
182
|
-
> (`<image image/png 12345B>`) so existing render code keeps working.
|
|
183
|
-
>
|
|
184
|
-
> **Web search?** Not a builtin — search backends vary too much (Tavily,
|
|
185
|
-
> Brave, Serper, Anthropic-native `web_search_20250305`, …) and each has
|
|
186
|
-
> its own auth + result shape. Hosts wire whichever they want as a
|
|
187
|
-
> `ToolHandler` (or use Claude's server-side `web_search` via provider
|
|
188
|
-
> config). Keeping it out of the SDK avoids forcing every consumer to
|
|
189
|
-
> carry a search-API dep + key.
|
|
190
|
-
|
|
191
|
-
> **Effort scale (v0.1.16+).** `effort` controls two orthogonal knobs:
|
|
192
|
-
>
|
|
193
|
-
> 1. **Reasoning depth** — thinking budget on Anthropic (`thinking.budget_tokens`),
|
|
194
|
-
> `reasoning_effort` on DeepSeek.
|
|
195
|
-
> 2. **Working-mode persona** — a `## Working mode` block injected into the
|
|
196
|
-
> system prompt with imperative verbs the model conditions on from turn 1
|
|
197
|
-
> (e.g. `low` → "answer fast, one Read max", `max` → "exhaustive,
|
|
198
|
-
> enumerate failure modes"). Pure function of `effort`, prefix-cache stable.
|
|
199
|
-
>
|
|
200
|
-
> The **tool-iteration cap is no longer derived from effort** as of v0.1.16 —
|
|
201
|
-
> it's a single host-tunable default (`DEFAULT_MAX_ITERATIONS = 90`) that you
|
|
202
|
-
> override per call via `AgentQueryOptions.maxIterations`. The default
|
|
203
|
-
> matches v0.1.15's old `xhigh` cap (the "extended exploration" baseline)
|
|
204
|
-
> so existing callers that didn't pin a value see no behavior change. This
|
|
205
|
-
> lets a host mix and match: `effort: "low"` + `maxIterations: 90` (terse,
|
|
206
|
-
> but don't trip on a surprise sub-task), or `effort: "max"` +
|
|
207
|
-
> `maxIterations: 30` (think hard, but stay snappy).
|
|
208
|
-
>
|
|
209
|
-
> | effort | thinking budget (Anthropic) | DeepSeek `reasoning_effort` |
|
|
210
|
-
> |---------|----------------------------:|:---------------------------:|
|
|
211
|
-
> | `low` | 2 048 | `low` |
|
|
212
|
-
> | `medium`| 8 192 | `medium` |
|
|
213
|
-
> | `high` | 16 384 | `high` |
|
|
214
|
-
> | `xhigh` | 16 384 | `high` |
|
|
215
|
-
> | `max` | 32 768 | `max` |
|
|
216
|
-
>
|
|
217
|
-
> **`xhigh` shares `high`'s thinking ceiling** — the difference is persona,
|
|
218
|
-
> not budget. `xhigh` tells the model to use the same allowance more broadly
|
|
219
|
-
> (hold multiple hypotheses, survey, name edge cases). On sonnet-4-6 /
|
|
220
|
-
> haiku-4-5 the answer-quality return on thinking above ~16K dropped off
|
|
221
|
-
> sharply in practice, so the lever became persona instead of more tokens.
|
|
222
|
-
>
|
|
223
|
-
> **`max` is halved from v0.1.15's 65 536** — 64K thinking is rarely fully
|
|
224
|
-
> utilized in a single turn; the latency penalty was unrecouped. 32K is the
|
|
225
|
-
> ceiling for "really chew on this" without paying for headroom the model
|
|
226
|
-
> doesn't reach.
|
|
227
|
-
>
|
|
228
|
-
> DeepSeek's API ships four tiers; maestro's `xhigh` maps to DeepSeek `high`
|
|
229
|
-
> (not `max`) so that `max` stays reserved for the explicit "deepest
|
|
230
|
-
> reasoning" opt-in.
|
|
231
|
-
>
|
|
232
|
-
> **Turn-adaptive budget (v0.1.16).** The per-turn thinking budget the loop
|
|
233
|
-
> actually sends to the API is *not* constant — it's resolved through
|
|
234
|
-
> `thinkingBudgetForTurn(base, iter, maxIter)`:
|
|
235
|
-
>
|
|
236
|
-
> - **First turn** (`iter == 0`) — full base. Planning gets the full
|
|
237
|
-
> allowance because a careful first-turn plan saves tool calls later.
|
|
238
|
-
> - **Middle turns** — full base. Interleaved thinking between tool calls
|
|
239
|
-
> is what Anthropic's interleaved-thinking beta is for; cutting it
|
|
240
|
-
> mid-flow defeats the beta.
|
|
241
|
-
> - **Last 3 turns** (wrap-up zone) — `base / 4`, floored at 1024 (the
|
|
242
|
-
> Anthropic API minimum). The iteration reminder has already flipped to
|
|
243
|
-
> "finalize NOW"; spending another 16K thinking on a turn that mostly
|
|
244
|
-
> emits final text is pure latency waste.
|
|
107
|
+
> **Effort scale.** `effort` drives both the thinking budget _and_ the
|
|
108
|
+
> tool-iteration cap. The model also sees its remaining-iteration count in a
|
|
109
|
+
> `<system-reminder>` block every turn so it can self-pace. Knobs:
|
|
245
110
|
>
|
|
246
|
-
>
|
|
247
|
-
>
|
|
248
|
-
>
|
|
249
|
-
>
|
|
250
|
-
>
|
|
251
|
-
>
|
|
252
|
-
>
|
|
253
|
-
> branch fires deterministically. The previous text-only signal ("[wrap-up
|
|
254
|
-
> zone] stop new tool calls") was ignorable — the model could still
|
|
255
|
-
> reach for a tool if it judged one worthwhile. Now the gate is real:
|
|
256
|
-
> three layers (thinking trim, tools disable, reminder overlay) all fire
|
|
257
|
-
> on the same boundary via the shared `isWrapUpZone(iter, maxIter)`
|
|
258
|
-
> helper. Tiny caps (`maxIter <= 3`) opt out — at that scale every turn
|
|
259
|
-
> is already a wrap-up turn and gating tools would defeat the cap's
|
|
260
|
-
> purpose.
|
|
261
|
-
>
|
|
262
|
-
> **Multimodal Read + stop-reason fan-out + fork + bg bash (v0.1.18).**
|
|
263
|
-
> Four additions land together:
|
|
264
|
-
>
|
|
265
|
-
> 1. **Multimodal Read.** `.png/.jpg/.webp/.gif` files return a
|
|
266
|
-
> `MaestroToolResultBlock[]` containing a text bookend + an `image`
|
|
267
|
-
> content block; PDFs text-extract via `pdfjs-dist` and return
|
|
268
|
-
> line-numbered text per page. `ToolHandler.execute` now returns
|
|
269
|
-
> `string | MaestroToolResultBlock[]` (non-breaking: every existing
|
|
270
|
-
> tool still returns a string). Each provider adapter serializes per
|
|
271
|
-
> its native wire shape — Anthropic uses `image.source: { type: "base64",
|
|
272
|
-
> media_type, data }`, DeepSeek wraps as an OpenAI `image_url` with
|
|
273
|
-
> `data:<mime>;base64,<bytes>` URI.
|
|
274
|
-
> 2. **Stop-reason fan-out.** `pause_turn` now continues the loop with
|
|
275
|
-
> the same `messages` array (no new user turn), matching Anthropic's
|
|
276
|
-
> long-output contract; `refusal` propagates through `result.stopReason`
|
|
277
|
-
> as a distinct terminal so hosts can branch on safety-policy declines
|
|
278
|
-
> without confusing them with `end_turn`. Both bump the iteration
|
|
279
|
-
> counter so pathological runs still hit the `maxIterations` ceiling.
|
|
280
|
-
> 3. **`forkSessionAt`.** Claude-Code-style message-N branching for
|
|
281
|
-
> `~/.maestro/sessions/<sessionId>.jsonl`. Given a parent session +
|
|
282
|
-
> message index, writes a new JSONL with `{parentSessionId, forkedAtMessageIndex}`
|
|
283
|
-
> in its `_meta` header. Parent JSONL is left untouched. The slice
|
|
284
|
-
> is run through `trimToSafePrefix` so an orphan `tool_use` at the
|
|
285
|
-
> cut point can't 400 the next API call. Lets a host UI render
|
|
286
|
-
> branch trees ("session B is a fork of A at turn 12") and lets the
|
|
287
|
-
> model retry an earlier turn without polluting the original history.
|
|
288
|
-
> 4. **Background bash (`run_in_background:true` + `BashOutput` + `KillBash`).**
|
|
289
|
-
> Same triad Claude Code ships: start a long-running shell with
|
|
290
|
-
> `Bash(run_in_background:true)` → returns a `bash_id`; poll
|
|
291
|
-
> incremental output via `BashOutput(bash_id)`; selectively stop via
|
|
292
|
-
> `KillBash(bash_id)` (SIGTERM with a 5s SIGKILL escalation). When
|
|
293
|
-
> the parent agent loop's `AbortController` fires, every still-
|
|
294
|
-
> running background process registered under that loop is killed —
|
|
295
|
-
> no detached children left behind.
|
|
296
|
-
>
|
|
297
|
-
> **What's NOT in v0.1.18:** WebSearch tool. Search backends vary too
|
|
298
|
-
> much (Tavily/Brave/Serper/Anthropic server-side) and forcing one keeps
|
|
299
|
-
> the SDK opinion-heavy. Hosts wire their preferred search backend as a
|
|
300
|
-
> `ToolHandler` directly — clawgram, for example, exposes the
|
|
301
|
-
> Anthropic-native `web_search_20250305` via the provider call when the
|
|
302
|
-
> active provider is Claude.
|
|
303
|
-
>
|
|
304
|
-
> **`maxTokens` wire-through + model-aware default (v0.1.21).** Prior
|
|
305
|
-
> versions exposed `maxIterations` on `AgentQueryOptions` but not
|
|
306
|
-
> `maxTokens`, and `AIAgent` silently fell back to a flat 4096 on every
|
|
307
|
-
> call. Long outputs got truncated mid-string and Write/Edit tool calls
|
|
308
|
-
> generating large file bodies failed to parse their tool_input JSON
|
|
309
|
-
> (the truncation landed inside an unclosed string). Two fixes ship
|
|
310
|
-
> together:
|
|
311
|
-
>
|
|
312
|
-
> 1. **`AgentQueryOptions.maxTokens`** — caller surface for the
|
|
313
|
-
> per-call output ceiling. Wired through `provider.ts` → `AIAgent`
|
|
314
|
-
> → provider request body for both Anthropic and DeepSeek.
|
|
315
|
-
> 2. **Model-catalog default** — when the caller omits `maxTokens`,
|
|
316
|
-
> `AIAgent` resolves the default through
|
|
317
|
-
> `getNativeMaxOutputTokens(model)`: Sonnet 4.6 → 64K, Opus 4.7 →
|
|
318
|
-
> 128K, Haiku 4.5 → 64K, DeepSeek V4-Pro → 64K, V4-Flash → 32K,
|
|
319
|
-
> unknown model → 32K. Claude entries match Anthropic's native cap
|
|
320
|
-
> (same behavior as `@anthropic-ai/claude-agent-sdk`); DeepSeek
|
|
321
|
-
> entries are conservative because the V4 native ceiling (384K)
|
|
322
|
-
> would let one runaway turn rack up cost / wall time before the
|
|
323
|
-
> iteration cap notices — Pro is pinned to 64K so it lines up with
|
|
324
|
-
> the Claude Sonnet/Haiku reference point (a topic switching
|
|
325
|
-
> providers sees the same default ceiling), Flash sits one tier
|
|
326
|
-
> lower at 32K because the latency-tier user intent is "snappy
|
|
327
|
-
> first answer, escalate to Pro if you need length". Callers
|
|
328
|
-
> wanting the full 384K still get it via the explicit `maxTokens`
|
|
329
|
-
> override.
|
|
330
|
-
>
|
|
331
|
-
> Migration: zero-config callers see a higher implicit ceiling
|
|
332
|
-
> (4096 → 16K-128K depending on model). Cost per call only goes up
|
|
333
|
-
> on responses that previously truncated at 4K — those are the cases
|
|
334
|
-
> the fix targets. Callers that want the old behavior can pin
|
|
335
|
-
> `maxTokens: 4096` explicitly.
|
|
336
|
-
>
|
|
337
|
-
> **ToolSearch + MCP auto-defer (v0.1.22).** Claude-Code-style two-tier
|
|
338
|
-
> tool surface: built-in tools (Read/Write/Edit/Bash/Glob/Grep/Task/skills)
|
|
339
|
-
> always ride the wire; MCP tools register as **deferred** when
|
|
340
|
-
> `AgentQueryOptions.enableToolSearch` is set, and their schemas stay off
|
|
341
|
-
> the wire until the model activates them. The system-reminder grows a
|
|
342
|
-
> compact `name → 80-char summary` catalog of still-deferred tools; the
|
|
343
|
-
> model promotes the ones it needs by calling
|
|
344
|
-
> `ToolSearch("select:Name1,Name2")` (exact-name) or
|
|
345
|
-
> `ToolSearch("keyword")` (fuzzy match against name + description).
|
|
346
|
-
> Activated tools become callable from the next turn, and the active set
|
|
347
|
-
> persists across resume via the rollout `_meta` header — a multi-turn
|
|
348
|
-
> conversation doesn't re-promote the same tools every resume.
|
|
349
|
-
>
|
|
350
|
-
> Token economics: a topic with 50 deferred MCP tools spends ~1.5K
|
|
351
|
-
> tokens/turn on the catalog vs ~25K tokens/turn on full schemas — order-
|
|
352
|
-
> of-magnitude savings. The trade is one extra turn the first time a
|
|
353
|
-
> deferred tool is needed (the `ToolSearch` call itself), which is
|
|
354
|
-
> usually worth it on long sessions with large MCP setups. Pre-v0.1.22
|
|
355
|
-
> callers opt out by leaving `enableToolSearch` unset (default false) —
|
|
356
|
-
> behavior is byte-identical to v0.1.21.
|
|
357
|
-
>
|
|
358
|
-
> The `ToolSearch` built-in is always-loaded when the flag is set (it has
|
|
359
|
-
> to be callable for the model to discover anything else) and itself
|
|
360
|
-
> reuses the claude-SDK `<functions>{...}</functions>` response envelope
|
|
361
|
-
> so the model's pretrained instincts for Claude-Code transcripts
|
|
362
|
-
> transfer cleanly.
|
|
111
|
+
> | effort | thinking budget | iteration cap |
|
|
112
|
+
> |---------|----------------:|--------------:|
|
|
113
|
+
> | `low` | 2 048 | 5 |
|
|
114
|
+
> | `medium`| 8 192 | 20 |
|
|
115
|
+
> | `high` | 16 384 | 50 |
|
|
116
|
+
> | `xhigh` | 32 768 | 90 |
|
|
117
|
+
> | `max` | 65 536 | 200 |
|
|
363
118
|
|
|
364
119
|
More runnable scripts live under [`examples/`](./examples) — Anthropic, DeepSeek,
|
|
365
120
|
a custom-tool walkthrough, and a `skill_write` demo.
|
|
@@ -371,10 +126,6 @@ Per-call options on `AgentQueryOptions`:
|
|
|
371
126
|
| Option | Required | Purpose |
|
|
372
127
|
|---|---|---|
|
|
373
128
|
| `cwd` | ✓ | Workspace root. Drives `.skills/` location, rollout `_meta`, and the `mkdir` invariant. |
|
|
374
|
-
| `effort` | — | Reasoning depth + working-mode persona (`low`/`medium`/`high`/`xhigh`/`max`). See the effort table above. |
|
|
375
|
-
| `maxIterations` | — | Tool-iteration cap. Omit for `DEFAULT_MAX_ITERATIONS = 90`. Decoupled from `effort` as of v0.1.16 — controls turn budget, not reasoning depth. |
|
|
376
|
-
| `maxTokens` | — | Per-call `max_tokens` ceiling on assistant output. Omit for the model-catalog default (`getNativeMaxOutputTokens`): sonnet=64K, opus=128K, deepseek-pro=64K, deepseek-flash=32K, unknown=32K. v0.1.21+. |
|
|
377
|
-
| `enableToolSearch` | — | Claude-Code-style deferred tool catalog. When `true`, every MCP tool registers as deferred — schemas stay off the wire until the model promotes them via `ToolSearch("select:Name1,Name2")` or `ToolSearch("keyword")`. Active set persists across resume. Built-ins are never deferred. v0.1.22+. |
|
|
378
129
|
| `skillKey` | — | Named skill profile within `<cwd>/.skills/`. Omit for `default`. |
|
|
379
130
|
| `allowedSkills` | — | Per-call name whitelist applied before curation. |
|
|
380
131
|
| `sessionMetadata` | — | Opaque host bag round-tripped via the rollout `_meta` header. |
|
|
@@ -470,6 +221,22 @@ session metadata without reading the full message log can call
|
|
|
470
221
|
|
|
471
222
|
maestro-agent-sdk is an agent *runtime*, not an agent *product*. You pick the UI, the provider mix, the guardrail rules, the storage layer.
|
|
472
223
|
|
|
224
|
+
### Where it sits in the stack
|
|
225
|
+
|
|
226
|
+
Refer to the architecture chart at the top of this README. Top → bottom is caller → callee. Anthropic and OpenAI ship an SDK that spawns their own CLI as a subprocess — you inherit the harness, but you also inherit the binary and the single-vendor model API. Indie coding agents (OpenClaude, OpenClaw, Hermes, Nanoclaw) keep the harness but bolt on a multi-vendor API slot. **Maestro is the only slot that is both a pure library *and* multi-vendor** — the harness lives inside the SDK, so you `import` it into any host and pick the provider per call.
|
|
227
|
+
|
|
228
|
+
| Capability | Anthropic | OpenAI | Indie | Maestro |
|
|
229
|
+
| ------------------------------------------------ | ----------------- | ----------------- | ------------- | --------------- |
|
|
230
|
+
| **Built-in harness** (tool loop · context · agent loop) | ✓ Claude Code | ✓ Codex CLI | ✓ | ✓ |
|
|
231
|
+
| **Pure library distribution** (npm/pip import only) | ✗ needs `claude` | ✗ needs `codex` | ✗ CLI only | ✓ |
|
|
232
|
+
| **Multi-vendor API** (multiple model endpoints) | ✗ Claude only | ✗ OpenAI only | ✓ | ✓ |
|
|
233
|
+
| **Library + Multi-vendor** (embed anywhere · call any vendor) | ✗ | ✗ | ✗ | ✓ |
|
|
234
|
+
| **Ships standalone CLI** (runs as its own product) | ✓ Claude Code | ✓ Codex CLI | ✓ | ✗ embedded-only |
|
|
235
|
+
|
|
236
|
+
The trade-off Maestro accepts: **no standalone CLI**. You don't get a `maestro` binary to drop on a server — you get an SDK to embed inside your own host.
|
|
237
|
+
|
|
238
|
+
### Adjacent projects
|
|
239
|
+
|
|
473
240
|
| Project | Layer | Key trade-off |
|
|
474
241
|
|---------|-------|---------------|
|
|
475
242
|
| **maestro-agent-sdk** | Embeddable SDK | Agent loop only — no CLI, no UI, no fixed product shape. Host injects logger, MCP resolver, session store, guardrails. |
|
package/dist/core/agent.d.ts
CHANGED
|
@@ -16,7 +16,9 @@ export interface AIAgentConfig {
|
|
|
16
16
|
model: string;
|
|
17
17
|
/** System prompt — usually composed by the host before each query. */
|
|
18
18
|
systemPrompt: string;
|
|
19
|
-
/** Hard cap on tool-calling iterations.
|
|
19
|
+
/** Hard cap on tool-calling iterations. Omit for unbounded (the loop
|
|
20
|
+
* runs until `end_turn` / abort). Set a finite number when the host
|
|
21
|
+
* needs to bound turn budget. */
|
|
20
22
|
maxIterations?: number;
|
|
21
23
|
/**
|
|
22
24
|
* Per-API-call max output tokens.
|
package/dist/core/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEpE;;;;;;;;;GASG;AAEH,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAC;IACrB
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEpE;;;;;;;;;GASG;AAEH,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAC;IACrB;;sCAEkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACnE,iEAAiE;IACjE,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oFAAoF;IACpF,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,qBAAa,OAAO;IAClB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CACvB,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,cAAc,GAAG,eAAe,GAAG,WAAW,CAAC,CAC9E,GAAG;QACF,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,WAAW,CAAC,EAAE,WAAW,CAAC;QAC1B,iBAAiB,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;QACnE,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,CAAC;gBAEU,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa;CAyB3E"}
|
package/dist/core/agent.js
CHANGED
|
@@ -9,7 +9,11 @@ export class AIAgent {
|
|
|
9
9
|
this.config = {
|
|
10
10
|
model: config.model,
|
|
11
11
|
systemPrompt: config.systemPrompt,
|
|
12
|
-
|
|
12
|
+
// v0.1.26+: default is unbounded so the loop runs until the model
|
|
13
|
+
// ends the turn or the host aborts. Callers that need a finite cap
|
|
14
|
+
// pin one via `AIAgentConfig.maxIterations` (mirrored to
|
|
15
|
+
// `AgentQueryOptions.maxIterations` in the provider layer).
|
|
16
|
+
maxIterations: config.maxIterations ?? Number.POSITIVE_INFINITY,
|
|
13
17
|
// v0.1.21+: model-aware default replaces the flat 4096 fallback. See
|
|
14
18
|
// `getNativeMaxOutputTokens` for the per-model catalog and the
|
|
15
19
|
// `AIAgentConfig.maxTokens` docstring for the rationale.
|
package/dist/core/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAmFtD,MAAM,OAAO,OAAO;IACT,QAAQ,CAAW;IACnB,KAAK,CAAe;IACpB,MAAM,CASb;IAEF,YAAY,QAAkB,EAAE,KAAmB,EAAE,MAAqB;QACxE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG;YACZ,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,kEAAkE;YAClE,mEAAmE;YACnE,yDAAyD;YACzD,4DAA4D;YAC5D,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,iBAAiB;YAC/D,qEAAqE;YACrE,+DAA+D;YAC/D,yDAAyD;YACzD,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,wBAAwB,CAAC,MAAM,CAAC,KAAK,CAAC;YACrE,GAAG,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,GAAG,CAAC;gBACpD,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE;gBAC3C,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnD,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClE,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACpF,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACnE,CAAC;IACJ,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ export { applySkillAllowlist, DEFAULT_MAX_ITERATIONS, isAbortError, iterationBud
|
|
|
23
23
|
export { AnthropicProvider, applyThinkingBudget, buildCacheableMessages, buildCacheableSystem, buildCacheableTools, detectThinkingKeyword, effortToPersonaPrompt, effortToThinkingBudget, isWrapUpZone, thinkingBudgetForTurn, } from "./providers/anthropic.js";
|
|
24
24
|
export type { MaestroDocumentSource, MaestroImageSource, MaestroToolResultBlock, Provider, ProviderCompleteOptions, ProviderContentBlock, ProviderMessage, ProviderResponse, ProviderStreamChunk, ProviderToolSchema, } from "./providers/base.js";
|
|
25
25
|
export { DeepseekProvider, effortForDeepseek, translateMessagesToOpenAI, translateToolsToOpenAI, } from "./providers/deepseek.js";
|
|
26
|
+
export { CodexResponsesProvider, effortForCodex, } from "./providers/codex.js";
|
|
27
|
+
export { accessTokenExpiresAt, accessTokenIsExpiring, type CodexAuthFile, CodexAuthError, cloudflareHeaders as codexCloudflareHeaders, codexAuthPath, decodeJwtClaims, extractAccountId, readCodexAuth, refreshAccessToken, resolveAccessToken, writeRefreshedTokens, } from "./providers/codex-auth.js";
|
|
28
|
+
export { parseCodexStream, } from "./providers/codex-stream.js";
|
|
29
|
+
export { type ResponsesContentPart, type ResponsesFunctionTool, type ResponsesInputItem, translateMessagesToResponses, translateMessageToResponsesItems, translateToolsToResponses, } from "./providers/codex-translators.js";
|
|
26
30
|
export { maestroRegistry } from "./registry.js";
|
|
27
31
|
export { cleanupStaleMaestroSessions, DEFAULT_MAESTRO_SESSION_TTL_MS, deleteMaestroSession, type ForkSessionAtOptions, type ForkSessionAtResult, forkSessionAt, loadMaestroSessionMeta, type MaestroSessionMeta, maestroSessionsDir, } from "./session-store.js";
|
|
28
32
|
export { curateSkills } from "./skills/curator.js";
|
|
@@ -38,7 +42,6 @@ export { type BackgroundBashRegistry, createBackgroundBashRegistry, createBashOu
|
|
|
38
42
|
export { createEditTool } from "./tools/builtin/edit.js";
|
|
39
43
|
export { compileGlob, globTool } from "./tools/builtin/glob.js";
|
|
40
44
|
export { grepTool } from "./tools/builtin/grep.js";
|
|
41
|
-
export { createMultiEditTool } from "./tools/builtin/multi_edit.js";
|
|
42
45
|
export { createReadTool } from "./tools/builtin/read.js";
|
|
43
46
|
export { createSkillViewTool } from "./tools/builtin/skill_view.js";
|
|
44
47
|
export { createSkillWriteTool } from "./tools/builtin/skill_write.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,eAAO,MAAM,yBAAyB,EAAG,sBAA+B,CAAC;AAEzE,YAAY,EACV,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE3F,OAAO,EAAE,oBAAoB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EACX,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,11 @@ export { setMcpResolver } from "./platform/mcp-config.js";
|
|
|
23
23
|
export { applySkillAllowlist, DEFAULT_MAX_ITERATIONS, isAbortError, iterationBudgetLine, MAESTRO_DEFAULT_SKILL_KEY, maestroProvider, providerForModel, resolveSkillsDir, wrapUpOverlayLine, } from "./provider.js";
|
|
24
24
|
export { AnthropicProvider, applyThinkingBudget, buildCacheableMessages, buildCacheableSystem, buildCacheableTools, detectThinkingKeyword, effortToPersonaPrompt, effortToThinkingBudget, isWrapUpZone, thinkingBudgetForTurn, } from "./providers/anthropic.js";
|
|
25
25
|
export { DeepseekProvider, effortForDeepseek, translateMessagesToOpenAI, translateToolsToOpenAI, } from "./providers/deepseek.js";
|
|
26
|
+
// ─── Codex Responses API (ChatGPT OAuth) ─────────────────────────────────────
|
|
27
|
+
export { CodexResponsesProvider, effortForCodex, } from "./providers/codex.js";
|
|
28
|
+
export { accessTokenExpiresAt, accessTokenIsExpiring, CodexAuthError, cloudflareHeaders as codexCloudflareHeaders, codexAuthPath, decodeJwtClaims, extractAccountId, readCodexAuth, refreshAccessToken, resolveAccessToken, writeRefreshedTokens, } from "./providers/codex-auth.js";
|
|
29
|
+
export { parseCodexStream, } from "./providers/codex-stream.js";
|
|
30
|
+
export { translateMessagesToResponses, translateMessageToResponsesItems, translateToolsToResponses, } from "./providers/codex-translators.js";
|
|
26
31
|
// ─── Maestro registry + top-level provider entry point ───────────────────────
|
|
27
32
|
export { maestroRegistry } from "./registry.js";
|
|
28
33
|
// ─── Session store ───────────────────────────────────────────────────────────
|
|
@@ -42,7 +47,6 @@ export { createBackgroundBashRegistry, createBashOutputTool, createKillBashTool,
|
|
|
42
47
|
export { createEditTool } from "./tools/builtin/edit.js";
|
|
43
48
|
export { compileGlob, globTool } from "./tools/builtin/glob.js";
|
|
44
49
|
export { grepTool } from "./tools/builtin/grep.js";
|
|
45
|
-
export { createMultiEditTool } from "./tools/builtin/multi_edit.js";
|
|
46
50
|
export { createReadTool } from "./tools/builtin/read.js";
|
|
47
51
|
export { createSkillViewTool } from "./tools/builtin/skill_view.js";
|
|
48
52
|
export { createSkillWriteTool } from "./tools/builtin/skill_write.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAA+B,CAAC;AAUzE,gFAAgF;AAChF,OAAO,EAAE,OAAO,EAAsB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAI9C,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC3F,gFAAgF;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC/D,gFAAgF;AAChF,OAAO,EAA2B,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAuC,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,gBAAgB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G,MAAM,CAW3D;AAaD;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,eAAe,EACpB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAkD3B;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAc/D;AA2BD,kDAAkD;AAClD,wBAAsB,SAAS,CAAC,GAAG,GAAE,MAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CASzE;AAeD,sDAAsD;AACtD,wBAAgB,WAAW,IAAI,IAAI,CAKlC;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,SAAS,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB9D;AAYD;iDACiD;AACjD,wBAAgB,eAAe,IAAI,IAAI,CAKtC;AAED;sEACsE;AACtE,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAEvE;AAED,kCAAkC;AAClC,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,0CAA0C;AAC1C,wBAAgB,UAAU,CACxB,GAAG,EAAE,eAAe,EACpB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,oBAAoB,GACzB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAG/C"}
|
package/dist/mcp/pool-cache.js
CHANGED
|
@@ -96,9 +96,15 @@ export async function getOrStartClient(ctx, serverName, spec) {
|
|
|
96
96
|
await client.start();
|
|
97
97
|
// Race check: a concurrent acquire of the same key could have raced ahead
|
|
98
98
|
// while we were in `await client.start()`. If so, drop ours and use theirs.
|
|
99
|
+
// Swallowing a `close()` failure here used to be silent, but if it fails
|
|
100
|
+
// the just-spawned MCP subprocess leaks — surface it at warn so a leak
|
|
101
|
+
// pattern is visible in logs without escalating to an error that callers
|
|
102
|
+
// would have to handle (the race winner is already returned successfully).
|
|
99
103
|
const racer = cache.get(key);
|
|
100
104
|
if (racer) {
|
|
101
|
-
await client.close().catch(() => {
|
|
105
|
+
await client.close().catch((err) => {
|
|
106
|
+
logger.warn({ err, serverName, key }, "mcp pool-cache: race-win client.close() failed — subprocess may leak");
|
|
107
|
+
});
|
|
102
108
|
racer.refcount++;
|
|
103
109
|
racer.lastUsed = Date.now();
|
|
104
110
|
return racer.client;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool-cache.js","sourceRoot":"","sources":["../../src/mcp/pool-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAA6B,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,qEAAqE;AACrE,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,QAAQ,CACzD,OAAO,CAAC,GAAG,CAAC,4BAA4B,IAAI,QAAQ,EACpD,EAAE,CACH,CAAC;AAEF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;AAwBlG,MAAM,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;AAC7C,IAAI,aAAa,GAA0C,IAAI,CAAC;AAChE,IAAI,kBAAkB,GAAG,KAAK,CAAC;AAK/B,IAAI,aAAa,GAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAEpF;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,IAA0B;IACjD,MAAM,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AQ,EAAE,CAAC,CAAC;AACxD,CAAC;AAED;iDACiD;AACjD,MAAM,UAAU,eAAe;IAC7B,KAAK,CAAC,KAAK,EAAE,CAAC;IACd,WAAW,EAAE,CAAC;IACd,kBAAkB,GAAG,KAAK,CAAC;IAC3B,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnE,CAAC;AAED;sEACsE;AACtE,MAAM,UAAU,0BAA0B,CAAC,OAAsB;IAC/D,aAAa,GAAG,OAAO,CAAC;AAC1B,CAAC;AAED,kCAAkC;AAClC,MAAM,UAAU,WAAW;IACzB,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,UAAU,CACxB,GAAoB,EACpB,UAAkB,EAClB,IAA0B;IAE1B,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACnE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACnE,CAAC"}
|
|
@@ -3,6 +3,11 @@ export declare const MODEL_SONNET: string;
|
|
|
3
3
|
export declare const MODEL_OPUS: string;
|
|
4
4
|
export declare const MODEL_DEEPSEEK_V4_PRO: string;
|
|
5
5
|
export declare const MODEL_DEEPSEEK_V4_FLASH: string;
|
|
6
|
+
export declare const MODEL_CODEX_GPT5_5: string;
|
|
7
|
+
export declare const MODEL_CODEX_GPT5_4: string;
|
|
8
|
+
export declare const MODEL_CODEX_GPT5_4_MINI: string;
|
|
9
|
+
export declare const MODEL_CODEX_GPT5_3_CODEX: string;
|
|
10
|
+
export declare const MODEL_CODEX_GPT5_2: string;
|
|
6
11
|
export declare const FILE_TAG_REGEX: RegExp;
|
|
7
12
|
/** Returns `process.env` without `CLAUDECODE` so spawned subprocesses don't
|
|
8
13
|
* inherit a nested-claude-code detection flag from a parent harness. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/platform/config.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,QAAQ,EAAE,MAEM,CAAC;AAK9B,eAAO,MAAM,YAAY,EAAE,MAA4B,CAAC;AACxD,eAAO,MAAM,UAAU,EAAE,MAA0B,CAAC;AAGpD,eAAO,MAAM,qBAAqB,EAAE,MAA0B,CAAC;AAC/D,eAAO,MAAM,uBAAuB,EAAE,MAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/platform/config.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,QAAQ,EAAE,MAEM,CAAC;AAK9B,eAAO,MAAM,YAAY,EAAE,MAA4B,CAAC;AACxD,eAAO,MAAM,UAAU,EAAE,MAA0B,CAAC;AAGpD,eAAO,MAAM,qBAAqB,EAAE,MAA0B,CAAC;AAC/D,eAAO,MAAM,uBAAuB,EAAE,MAA4B,CAAC;AAMnE,eAAO,MAAM,kBAAkB,EAAE,MAAkB,CAAC;AACpD,eAAO,MAAM,kBAAkB,EAAE,MAAkB,CAAC;AACpD,eAAO,MAAM,uBAAuB,EAAE,MAAuB,CAAC;AAC9D,eAAO,MAAM,wBAAwB,EAAE,MAAwB,CAAC;AAChE,eAAO,MAAM,kBAAkB,EAAE,MAAkB,CAAC;AAEpD,eAAO,MAAM,cAAc,EAAE,MAAgC,CAAC;AAW9D;yEACyE;AACzE,wBAAgB,WAAW,IAAI,MAAM,CAAC,UAAU,CAI/C"}
|
package/dist/platform/config.js
CHANGED
|
@@ -30,6 +30,15 @@ export const MODEL_OPUS = "claude-opus-4-7";
|
|
|
30
30
|
// DeepSeek V4 (released 2026-04-24). OpenAI-compatible chat-completions API.
|
|
31
31
|
export const MODEL_DEEPSEEK_V4_PRO = "deepseek-v4-pro";
|
|
32
32
|
export const MODEL_DEEPSEEK_V4_FLASH = "deepseek-v4-flash";
|
|
33
|
+
// Codex Responses API (ChatGPT-backed OAuth). The endpoint only accepts a
|
|
34
|
+
// codex-issued whitelist of model slugs — these are the ones surfaced by the
|
|
35
|
+
// `/codex/models` endpoint as of 2026-05-23. Adding a new one: list it here
|
|
36
|
+
// AND in `MODEL_MAX_OUTPUT_TOKENS` / `ALIAS_MAP` if it deserves a short alias.
|
|
37
|
+
export const MODEL_CODEX_GPT5_5 = "gpt-5.5";
|
|
38
|
+
export const MODEL_CODEX_GPT5_4 = "gpt-5.4";
|
|
39
|
+
export const MODEL_CODEX_GPT5_4_MINI = "gpt-5.4-mini";
|
|
40
|
+
export const MODEL_CODEX_GPT5_3_CODEX = "gpt-5.3-codex";
|
|
41
|
+
export const MODEL_CODEX_GPT5_2 = "gpt-5.2";
|
|
33
42
|
export const FILE_TAG_REGEX = /\[FILE:(\/[^\]]+)\]/gi;
|
|
34
43
|
// Make sure DATA_DIR exists before any tool/skill code tries to readdir into
|
|
35
44
|
// it. Idempotent and best-effort — hosts that point this at a read-only
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/platform/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;;;;;;;;;GAWG;AAEH,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;AAEvB,6EAA6E;AAC7E,0EAA0E;AAC1E,4EAA4E;AAC5E,uEAAuE;AACvE,4CAA4C;AAC5C,MAAM,CAAC,MAAM,QAAQ,GAAW,OAAO,CAAC,GAAG,CAAC,gBAAgB;IAC1D,CAAC,CAAC,OAAO,CAAC,OA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