maestro-agent-sdk 0.1.35 → 0.1.36
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/dist/core/loop.d.ts.map +1 -1
- package/dist/core/loop.js +34 -23
- package/dist/core/loop.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/memory/aux-model-map.d.ts.map +1 -1
- package/dist/memory/aux-model-map.js +2 -1
- package/dist/memory/aux-model-map.js.map +1 -1
- package/dist/memory/state.d.ts.map +1 -1
- package/dist/memory/state.js +1 -1
- package/dist/memory/state.js.map +1 -1
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +8 -6
- package/dist/provider.js.map +1 -1
- package/dist/providers/codex-translators.d.ts.map +1 -1
- package/dist/providers/codex-translators.js.map +1 -1
- package/dist/session-store.js +1 -1
- package/dist/session-store.js.map +1 -1
- package/dist/sub-agent/capabilities.d.ts +34 -0
- package/dist/sub-agent/capabilities.d.ts.map +1 -0
- package/dist/sub-agent/capabilities.js +24 -0
- package/dist/sub-agent/capabilities.js.map +1 -0
- package/dist/sub-agent/runner.d.ts +34 -5
- package/dist/sub-agent/runner.d.ts.map +1 -1
- package/dist/sub-agent/runner.js +57 -19
- package/dist/sub-agent/runner.js.map +1 -1
- package/dist/tools/builtin/agent.d.ts +5 -6
- package/dist/tools/builtin/agent.d.ts.map +1 -1
- package/dist/tools/builtin/agent.js +12 -5
- package/dist/tools/builtin/agent.js.map +1 -1
- package/dist/tools/builtin/ask_user_question.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/registry.d.ts +53 -4
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +98 -22
- package/dist/tools/registry.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { SUBAGENT_CAPABILITIES, type SubagentType } from "../sub-agent/capabilities.js";
|
|
2
|
+
import { type ToolHandler, ToolRegistry } from "../tools/registry.js";
|
|
2
3
|
import type { EffortLevel, TokenUsage } from "../types.js";
|
|
3
4
|
/**
|
|
4
5
|
* Sub-agent runner — spawns a fresh maestro loop for a delegated task.
|
|
5
6
|
*
|
|
6
7
|
* Architecture decisions (advisor-reviewed):
|
|
7
|
-
* - **
|
|
8
|
-
* MCP
|
|
8
|
+
* - **Scoped MCP forwarding.** Only `general` receives parent-forwarded
|
|
9
|
+
* MCP tools. `explore` / `plan` stay builtin-only read scopes so their
|
|
10
|
+
* Agent calls remain safe to parallelize.
|
|
9
11
|
* - **Inherit parent model + effort.** Uses `providerForModel()` to
|
|
10
12
|
* select the correct provider (Anthropic / DeepSeek) based on parent
|
|
11
13
|
* model. No override knob — keeps the model from picking a smaller
|
|
@@ -24,7 +26,7 @@ import type { EffortLevel, TokenUsage } from "../types.js";
|
|
|
24
26
|
* because runSubAgent doesn't register one in the child registry.
|
|
25
27
|
* No recursion. Grandchildren require the parent to re-delegate.
|
|
26
28
|
*/
|
|
27
|
-
export type SubagentType
|
|
29
|
+
export { SUBAGENT_CAPABILITIES, type SubagentType };
|
|
28
30
|
export interface RunSubAgentOptions {
|
|
29
31
|
subagentType: SubagentType;
|
|
30
32
|
/** Self-contained task brief. The sub-agent sees only this as the user
|
|
@@ -45,7 +47,10 @@ export interface RunSubAgentOptions {
|
|
|
45
47
|
* in-flight provider call cancels too. */
|
|
46
48
|
parentAbortSignal?: AbortSignal;
|
|
47
49
|
/**
|
|
48
|
-
* Additional tool handlers to inject into
|
|
50
|
+
* Additional tool handlers to inject into a `general` sub-agent's registry.
|
|
51
|
+
* `explore` and `plan` intentionally ignore these so read-only sub-agent
|
|
52
|
+
* roles cannot accidentally receive write-capable MCP tools.
|
|
53
|
+
*
|
|
49
54
|
* Use this to forward MCP tools from the parent session:
|
|
50
55
|
*
|
|
51
56
|
* extraTools: parentTools.allHandlers().filter(h =>
|
|
@@ -70,6 +75,30 @@ export interface RunSubAgentResult {
|
|
|
70
75
|
/** True when the parent's abort signal fired mid-execution. */
|
|
71
76
|
aborted: boolean;
|
|
72
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Build the per-subagent-type tool registry.
|
|
80
|
+
*
|
|
81
|
+
* `general` — bash + Read + Write + Edit + Glob + Grep + WebFetch,
|
|
82
|
+
* plus any parent-forwarded extra tools.
|
|
83
|
+
* `explore` — Read + Glob + Grep + WebFetch only. NO bash, write, edit —
|
|
84
|
+
* no MCP/extra tools; the role is read-only by construction.
|
|
85
|
+
* `plan` — Read + Glob + Grep + WebFetch. NO bash, write, edit —
|
|
86
|
+
* no MCP/extra tools; same tool set as explore, but outputs a
|
|
87
|
+
* structured plan document.
|
|
88
|
+
*
|
|
89
|
+
* Neither registers `Agent` (recursion cap) or the Task* family
|
|
90
|
+
* (sub-agents don't plan iteratively — the plan is handed back to the parent).
|
|
91
|
+
*
|
|
92
|
+
* Glob and Grep are registered for ALL types: they are read-only filesystem
|
|
93
|
+
* tools that carry no mutation risk.
|
|
94
|
+
*
|
|
95
|
+
* Keep the overlay prompts in `src/prompts/sub-agents/<kind>.md` in sync —
|
|
96
|
+
* each one hard-codes its kind's tool list for the model. A test in
|
|
97
|
+
* `tests/maestro-sub-agent.test.ts` fails if a registered tool is missing
|
|
98
|
+
* from its kind's overlay.
|
|
99
|
+
*/
|
|
100
|
+
declare function buildToolRegistry(kind: SubagentType, subSessionId: string, extraTools?: ToolHandler[], abortSignal?: AbortSignal): ToolRegistry;
|
|
101
|
+
export { buildToolRegistry as __buildToolRegistryForTest };
|
|
73
102
|
/**
|
|
74
103
|
* Run a sub-agent to completion. Returns its final text + accumulated
|
|
75
104
|
* usage; the caller (Agent tool) decides how to surface that to the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/sub-agent/runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/sub-agent/runner.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,qBAAqB,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASpF,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,qBAAqB,EAAE,KAAK,YAAY,EAAE,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,YAAY,CAAC;IAC3B;mBACe;IACf,MAAM,EAAE,MAAM,CAAC;IACf;2DACuD;IACvD,eAAe,EAAE,MAAM,CAAC;IACxB;4DACwD;IACxD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iEAAiE;IACjE,WAAW,EAAE,MAAM,CAAC;IACpB;yDACqD;IACrD,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B;+CAC2C;IAC3C,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC;4CACwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,KAAK,EAAE,UAAU,CAAC;IAClB;yEACqE;IACrE,YAAY,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,OAAO,EAAE,OAAO,CAAC;CAClB;AA0DD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAS,iBAAiB,CACxB,IAAI,EAAE,YAAY,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,WAAW,EAAE,EAC1B,WAAW,CAAC,EAAE,WAAW,GACxB,YAAY,CAsCd;AAED,OAAO,EAAE,iBAAiB,IAAI,0BAA0B,EAAE,CAAC;AAE3D;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA+GtF"}
|
package/dist/sub-agent/runner.js
CHANGED
|
@@ -11,6 +11,7 @@ import { providerForModel } from "../provider.js";
|
|
|
11
11
|
import { effortToThinkingBudget } from "../providers/anthropic.js";
|
|
12
12
|
import { getNativeMaxOutputTokens } from "../registry.js";
|
|
13
13
|
import { deleteMaestroSession } from "../session-store.js";
|
|
14
|
+
import { SUBAGENT_CAPABILITIES } from "../sub-agent/capabilities.js";
|
|
14
15
|
import { createBashTool } from "../tools/builtin/bash.js";
|
|
15
16
|
import { createEditTool } from "../tools/builtin/edit.js";
|
|
16
17
|
import { globTool } from "../tools/builtin/glob.js";
|
|
@@ -20,6 +21,33 @@ import { webFetchTool } from "../tools/builtin/web_fetch.js";
|
|
|
20
21
|
import { createWriteTool } from "../tools/builtin/write.js";
|
|
21
22
|
import { getFileStateTracker } from "../tools/file-state.js";
|
|
22
23
|
import { ToolRegistry } from "../tools/registry.js";
|
|
24
|
+
/**
|
|
25
|
+
* Sub-agent runner — spawns a fresh maestro loop for a delegated task.
|
|
26
|
+
*
|
|
27
|
+
* Architecture decisions (advisor-reviewed):
|
|
28
|
+
* - **Scoped MCP forwarding.** Only `general` receives parent-forwarded
|
|
29
|
+
* MCP tools. `explore` / `plan` stay builtin-only read scopes so their
|
|
30
|
+
* Agent calls remain safe to parallelize.
|
|
31
|
+
* - **Inherit parent model + effort.** Uses `providerForModel()` to
|
|
32
|
+
* select the correct provider (Anthropic / DeepSeek) based on parent
|
|
33
|
+
* model. No override knob — keeps the model from picking a smaller
|
|
34
|
+
* model "to save cost" and missing things.
|
|
35
|
+
* - **Separate file-state tracker per sub-session.** Sharing the parent's
|
|
36
|
+
* would break the Read-before-Edit invariant in both directions.
|
|
37
|
+
* - **Inherit parent's systemPrompt + overlay.** Parent persona is the
|
|
38
|
+
* base; the sub-agent prompt adds the "you are a sub-agent" role.
|
|
39
|
+
* - **Hard JSONL cleanup on RETURN (success/failure).** NOT on abort —
|
|
40
|
+
* a parent abort mid-sub-call leaves the JSONL for postmortem and
|
|
41
|
+
* the 30-day TTL sweep eventually clears it.
|
|
42
|
+
* - **Silent by default.** Parent's event stream only carries the Agent
|
|
43
|
+
* tool's `tool_use` + final text. The sub-agent's text_deltas /
|
|
44
|
+
* tool_uses are NOT forwarded to telegram.
|
|
45
|
+
* - **depth=1 cap.** Sub-agents do NOT get the Agent tool — implicit
|
|
46
|
+
* because runSubAgent doesn't register one in the child registry.
|
|
47
|
+
* No recursion. Grandchildren require the parent to re-delegate.
|
|
48
|
+
*/
|
|
49
|
+
// Re-exported so existing importers (`agent.ts`, tests) keep one import site.
|
|
50
|
+
export { SUBAGENT_CAPABILITIES };
|
|
23
51
|
/**
|
|
24
52
|
* Hard cap on the sub-agent's per-API-call max output tokens.
|
|
25
53
|
*
|
|
@@ -52,10 +80,21 @@ function resolveMaxTokens(parentModel) {
|
|
|
52
80
|
* for Node compatibility — `import.meta.dir` is Bun-only. */
|
|
53
81
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
54
82
|
const OVERLAY_DIR = join(__dirname, "..", "prompts", "sub-agents");
|
|
83
|
+
// Overlay contents are static for the process lifetime; cache per kind so
|
|
84
|
+
// parallel explore/plan spawns don't each re-read the same file with
|
|
85
|
+
// event-loop-blocking sync I/O. Failed reads are NOT cached — a file
|
|
86
|
+
// restored at runtime is picked up, and the warn below keeps firing as the
|
|
87
|
+
// signal that something is wrong.
|
|
88
|
+
const overlayCache = new Map();
|
|
55
89
|
function loadOverlay(kind) {
|
|
90
|
+
const cached = overlayCache.get(kind);
|
|
91
|
+
if (cached !== undefined)
|
|
92
|
+
return cached;
|
|
56
93
|
const path = join(OVERLAY_DIR, `${kind}.md`);
|
|
57
94
|
try {
|
|
58
|
-
|
|
95
|
+
const overlay = readFileSync(path, "utf8");
|
|
96
|
+
overlayCache.set(kind, overlay);
|
|
97
|
+
return overlay;
|
|
59
98
|
}
|
|
60
99
|
catch (e) {
|
|
61
100
|
// Fall back to a tiny inline reminder so a missing prompt file doesn't
|
|
@@ -67,12 +106,13 @@ function loadOverlay(kind) {
|
|
|
67
106
|
/**
|
|
68
107
|
* Build the per-subagent-type tool registry.
|
|
69
108
|
*
|
|
70
|
-
* `general` — bash + Read + Write + Edit + Glob + Grep + WebFetch
|
|
109
|
+
* `general` — bash + Read + Write + Edit + Glob + Grep + WebFetch,
|
|
110
|
+
* plus any parent-forwarded extra tools.
|
|
71
111
|
* `explore` — Read + Glob + Grep + WebFetch only. NO bash, write, edit —
|
|
72
|
-
* the role is read-only by construction.
|
|
73
|
-
* `plan` —
|
|
74
|
-
*
|
|
75
|
-
*
|
|
112
|
+
* no MCP/extra tools; the role is read-only by construction.
|
|
113
|
+
* `plan` — Read + Glob + Grep + WebFetch. NO bash, write, edit —
|
|
114
|
+
* no MCP/extra tools; same tool set as explore, but outputs a
|
|
115
|
+
* structured plan document.
|
|
76
116
|
*
|
|
77
117
|
* Neither registers `Agent` (recursion cap) or the Task* family
|
|
78
118
|
* (sub-agents don't plan iteratively — the plan is handed back to the parent).
|
|
@@ -80,7 +120,10 @@ function loadOverlay(kind) {
|
|
|
80
120
|
* Glob and Grep are registered for ALL types: they are read-only filesystem
|
|
81
121
|
* tools that carry no mutation risk.
|
|
82
122
|
*
|
|
83
|
-
*
|
|
123
|
+
* Keep the overlay prompts in `src/prompts/sub-agents/<kind>.md` in sync —
|
|
124
|
+
* each one hard-codes its kind's tool list for the model. A test in
|
|
125
|
+
* `tests/maestro-sub-agent.test.ts` fails if a registered tool is missing
|
|
126
|
+
* from its kind's overlay.
|
|
84
127
|
*/
|
|
85
128
|
function buildToolRegistry(kind, subSessionId, extraTools, abortSignal) {
|
|
86
129
|
const tools = new ToolRegistry();
|
|
@@ -100,19 +143,13 @@ function buildToolRegistry(kind, subSessionId, extraTools, abortSignal) {
|
|
|
100
143
|
tools.register(createWriteTool({ tracker: fileTracker }));
|
|
101
144
|
tools.register(createEditTool({ tracker: fileTracker }));
|
|
102
145
|
}
|
|
103
|
-
if (kind === "plan") {
|
|
104
|
-
// bash is useful for read-only structural queries (ls, tree, git log,
|
|
105
|
-
// cargo tree, npm ls, …) that help the planner understand the codebase.
|
|
106
|
-
// Write/Edit are intentionally excluded — the plan sub-agent
|
|
107
|
-
// produces a plan document, not implementation code.
|
|
108
|
-
tools.register(createBashTool({ signal: abortSignal }));
|
|
109
|
-
}
|
|
110
146
|
// `explore` and `plan` stop here — no write/edit tools.
|
|
111
|
-
// Extra tools (e.g. MCP handlers forwarded from the parent) are
|
|
112
|
-
//
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
|
|
147
|
+
// Extra tools (e.g. MCP handlers forwarded from the parent) are gated by
|
|
148
|
+
// the capability table: only kinds with `acceptsExtraTools` (currently
|
|
149
|
+
// `general`) receive them — otherwise write-capable MCP tools would
|
|
150
|
+
// invalidate the parallelSafe contract. Extra tools are registered last so
|
|
151
|
+
// builtins always take precedence on a name collision.
|
|
152
|
+
if (SUBAGENT_CAPABILITIES[kind].acceptsExtraTools && extraTools) {
|
|
116
153
|
for (const t of extraTools) {
|
|
117
154
|
if (!tools.has(t.schema.name)) {
|
|
118
155
|
tools.register(t);
|
|
@@ -121,6 +158,7 @@ function buildToolRegistry(kind, subSessionId, extraTools, abortSignal) {
|
|
|
121
158
|
}
|
|
122
159
|
return tools;
|
|
123
160
|
}
|
|
161
|
+
export { buildToolRegistry as __buildToolRegistryForTest };
|
|
124
162
|
/**
|
|
125
163
|
* Run a sub-agent to completion. Returns its final text + accumulated
|
|
126
164
|
* usage; the caller (Agent tool) decides how to surface that to the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/sub-agent/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,C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,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,6BAA6B,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;QACD,MAAM,CAAC,IAAI,CACT;YACE,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,YAAY;YACZ,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO;YACP,OAAO;YACP,OAAO,EAAE,SAAS,CAAC,MAAM;YACzB,KAAK;SACN,EACD,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -14,14 +14,13 @@ export type { ToolHandler };
|
|
|
14
14
|
* - `explore` — read-only (Read + Glob + Grep + WebFetch). Use for
|
|
15
15
|
* finding / surveying / reporting tasks where you don't want the
|
|
16
16
|
* sub-agent mutating files by accident.
|
|
17
|
-
* - `plan` — architect mode (
|
|
17
|
+
* - `plan` — architect mode (Read + Glob + Grep + WebFetch). No bash, no write/edit.
|
|
18
18
|
* Use BEFORE implementing: produces a structured plan document
|
|
19
|
-
* (goal / affected files / step-by-step / trade-offs / risks).
|
|
19
|
+
* (goal / affected files / step-by-step / trade-offs / risks).
|
|
20
20
|
*
|
|
21
|
-
* `parallelSafe
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* shared file-state tracker registry.
|
|
21
|
+
* `parallelSafe` — input-dependent: `explore` and `plan` are read-only and run
|
|
22
|
+
* concurrently when the model calls multiple in one turn. `general` is serial
|
|
23
|
+
* (may write/edit files, filesystem race risk).
|
|
25
24
|
*
|
|
26
25
|
* Schema parity (v0.1.9):
|
|
27
26
|
* - `description` is accepted (3-5 word label). Surfaces to logs / UI;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/tools/builtin/agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/tools/builtin/agent.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,MAAM,WAAW,uBAAuB;IACtC;;qDAEiD;IACjD,MAAM,EAAE,IAAI,CACV,kBAAkB,EAChB,iBAAiB,GACjB,oBAAoB,GACpB,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,YAAY,CACf,CAAC;CACH;AAQD,wBAAgB,eAAe,CAAC,IAAI,EAAE,uBAAuB,GAAG,WAAW,CA2F1E"}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
|
+
// SUBAGENT_CAPABILITIES comes from its own module (not runner.ts) because it
|
|
2
|
+
// is read at module-eval time — importing it through runner.ts would hit the
|
|
3
|
+
// provider → agent → runner → provider cycle before runner finishes evaluating.
|
|
4
|
+
import { SUBAGENT_CAPABILITIES } from "../../sub-agent/capabilities.js";
|
|
1
5
|
import { runSubAgent } from "../../sub-agent/runner.js";
|
|
2
|
-
|
|
6
|
+
// Both derived from SUBAGENT_CAPABILITIES — the runner's capability table is
|
|
7
|
+
// the single source of truth for which kinds exist and which are
|
|
8
|
+
// parallel-safe (read-only, no extra/MCP tools).
|
|
9
|
+
const ALL_SUBAGENT_TYPES = Object.keys(SUBAGENT_CAPABILITIES);
|
|
3
10
|
const VALID_TYPES = new Set(ALL_SUBAGENT_TYPES);
|
|
4
11
|
export function createAgentTool(opts) {
|
|
5
12
|
return {
|
|
6
|
-
parallelSafe: false,
|
|
13
|
+
parallelSafe: (input) => SUBAGENT_CAPABILITIES[input.subagent_type]?.parallelSafe ?? false,
|
|
7
14
|
schema: {
|
|
8
15
|
name: "Agent",
|
|
9
16
|
description: "Spawn a focused sub-agent to do ONE delegated task and return its final text. " +
|
|
10
17
|
"The sub-agent has its own context — your tool calls, files-Read state, and todo list " +
|
|
11
18
|
"are NOT shared with it. Use `general` for self-contained work that may need bash/Write/Edit, " +
|
|
12
19
|
"and `explore` for read-only surveys (Read/Glob/Grep/WebFetch only), " +
|
|
13
|
-
"and `plan` for pre-implementation architecture planning (
|
|
20
|
+
"and `plan` for pre-implementation architecture planning (Read/Glob/Grep/WebFetch — no bash, no write/edit). " +
|
|
14
21
|
"The sub-agent cannot spawn its own sub-agents (no recursion). Pass a self-contained " +
|
|
15
22
|
"prompt — the sub-agent sees ONLY that prompt and the inherited system context.",
|
|
16
23
|
input_schema: {
|
|
@@ -25,8 +32,8 @@ export function createAgentTool(opts) {
|
|
|
25
32
|
subagent_type: {
|
|
26
33
|
type: "string",
|
|
27
34
|
description: "Sub-agent role. 'general' = full builtin toolkit (bash/Read/Write/Edit/Glob/Grep/WebFetch). " +
|
|
28
|
-
"'explore' = read-only (Read/Glob/Grep/WebFetch — no bash, no write, no edit). " +
|
|
29
|
-
"'plan' = architect mode (
|
|
35
|
+
"'explore' = read-only (Read/Glob/Grep/WebFetch — no bash, no write, no edit); parallel-safe — multiple explore calls in one turn run concurrently. " +
|
|
36
|
+
"'plan' = architect mode (Read/Glob/Grep/WebFetch — no bash, no write, no edit); outputs a structured plan document; parallel-safe — multiple plan calls in one turn run concurrently.",
|
|
30
37
|
},
|
|
31
38
|
prompt: {
|
|
32
39
|
type: "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/tools/builtin/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,WAAW,
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/tools/builtin/agent.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,6EAA6E;AAC7E,gFAAgF;A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;gBAC/D,uDAAuD;gBACvD,OAAO,IAAI,CAAC,SAAS,CAAC;oBACpB,KAAK,EAAE,0DAA0D;oBACjE,YAAY,EAAE,MAAM,CAAC,YAAY;iBAClC,CAAC,CAAC;YACL,CAAC;YAED,iEAAiE;YACjE,iEAAiE;YACjE,kEAAkE;YAClE,gEAAgE;YAChE,MAAM,MAAM,GACV,gBAAgB,YAAY,eAAe,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM;gBAChF,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,SAAS,MAAM,CAAC,KAAK,CAAC,YAAY,MAAM,CAAC;YACtE,OAAO,GAAG,MAAM,CAAC,IAAI,GAAG,MAAM,EAAE,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask_user_question.js","sourceRoot":"","sources":["../../../src/tools/builtin/ask_user_question.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAaH,MAAM,CAAC,MAAM,mBAAmB,GAAgB;IAC9C,YAAY,EAAE,KAAK,EAAE,uCAAuC;IAC5D,MAAM,EAAE;QACN,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,4EAA4E;YAC5E,kFAAkF;YAClF,yFAAyF;YACzF,sFAAsF;YACtF,yDAAyD;QAC3D,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,mGAAmG;iBACtG;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,WAAW,EACT,mFAAmF;wBACnF,oDAAoD;oBACtD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,wDAAwD;6BACtE;4BACD,WAAW,EAAE;gCACX,IAAI,EAAE,QAAQ;gCACd,WAAW,
|
|
1
|
+
{"version":3,"file":"ask_user_question.js","sourceRoot":"","sources":["../../../src/tools/builtin/ask_user_question.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAaH,MAAM,CAAC,MAAM,mBAAmB,GAAgB;IAC9C,YAAY,EAAE,KAAK,EAAE,uCAAuC;IAC5D,MAAM,EAAE;QACN,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,4EAA4E;YAC5E,kFAAkF;YAClF,yFAAyF;YACzF,sFAAsF;YACtF,yDAAyD;QAC3D,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,mGAAmG;iBACtG;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,WAAW,EACT,mFAAmF;wBACnF,oDAAoD;oBACtD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,wDAAwD;6BACtE;4BACD,WAAW,EAAE;gCACX,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,yEAAyE;6BAC5E;yBACF;wBACD,QAAQ,EAAE,CAAC,OAAO,CAAC;qBACpB;iBACF;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,qEAAqE;iBACnF;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;IACD,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAwC,CAAC;QACpF,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK,EAAE,IAAI;YACX,QAAQ;YACR,OAAO,EAAE,OAAO,IAAI,IAAI;YACxB,WAAW,EAAE,WAAW,IAAI,KAAK;SAClC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -25,10 +25,10 @@ export { createEditTool, editTool } from "../tools/builtin/edit.js";
|
|
|
25
25
|
export { compileGlob, globTool } from "../tools/builtin/glob.js";
|
|
26
26
|
export { grepTool } from "../tools/builtin/grep.js";
|
|
27
27
|
export { createReadTool, readTool } from "../tools/builtin/read.js";
|
|
28
|
-
export { createTaskCreateTool, createTaskGetTool, createTaskListTool,
|
|
28
|
+
export { createTaskCreateTool, createTaskGetTool, createTaskListTool, createTaskOutputTool, createTaskStopTool, createTaskUpdateTool, } from "../tools/builtin/tasks.js";
|
|
29
29
|
export { htmlToMarkdown, htmlToText, webFetchTool, } from "../tools/builtin/web_fetch.js";
|
|
30
30
|
export { createWriteTool, writeTool } from "../tools/builtin/write.js";
|
|
31
31
|
export { dropFileStateTracker, type FileStateEntry, FileStateTracker, getFileStateTracker, } from "../tools/file-state.js";
|
|
32
32
|
export { checkBlockedPath } from "../tools/path-guard.js";
|
|
33
|
-
export { type HookRegistration, type PostToolUseContext, type PostToolUseHook, type PostToolUseResult, type PreToolUseContext, type PreToolUseDecision, type PreToolUseHook, type ToolHandler, ToolRegistry, } from "../tools/registry.js";
|
|
33
|
+
export { type HookRegistration, type PostToolUseContext, type PostToolUseHook, type PostToolUseResult, type PreparedToolDispatch, type PreToolUseContext, type PreToolUseDecision, type PreToolUseHook, type ToolHandler, ToolRegistry, } from "../tools/registry.js";
|
|
34
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EACL,KAAK,s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AEnE,OAAO,EACL,oBAAoB,EACpB,KAAK,cAAc,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,YAAY,GACb,MAAM,kBAAkB,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -26,7 +26,7 @@ export { createEditTool, editTool } from "../tools/builtin/edit.js";
|
|
|
26
26
|
export { compileGlob, globTool } from "../tools/builtin/glob.js";
|
|
27
27
|
export { grepTool } from "../tools/builtin/grep.js";
|
|
28
28
|
export { createReadTool, readTool } from "../tools/builtin/read.js";
|
|
29
|
-
export { createTaskCreateTool, createTaskGetTool, createTaskListTool,
|
|
29
|
+
export { createTaskCreateTool, createTaskGetTool, createTaskListTool, createTaskOutputTool, createTaskStopTool, createTaskUpdateTool, } from "../tools/builtin/tasks.js";
|
|
30
30
|
export { htmlToMarkdown, htmlToText, webFetchTool, } from "../tools/builtin/web_fetch.js";
|
|
31
31
|
export { createWriteTool, writeTool } from "../tools/builtin/write.js";
|
|
32
32
|
// ─── File-state tracker (Read-before-Edit invariant) ───────────────────────
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,8EAA8E;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAEL,4BAA4B,EAC5B,oBAAo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B,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,8EAA8E;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,8EAA8E;AAC9E,OAAO,EAUL,YAAY,GACb,MAAM,kBAAkB,CAAC"}
|
package/dist/tools/registry.d.ts
CHANGED
|
@@ -83,10 +83,32 @@ export interface ToolHandler {
|
|
|
83
83
|
* blocks in one assistant response; running independent reads in parallel
|
|
84
84
|
* cuts latency dramatically. Default false (safer). Mark true on tools
|
|
85
85
|
* with no observable side effects (pure reads, idempotent fetches).
|
|
86
|
+
*
|
|
87
|
+
* Function form: called with the actual tool input so a tool can decide
|
|
88
|
+
* per-call (e.g. Agent: explore/plan → parallel-safe, general → serial).
|
|
89
|
+
*
|
|
90
|
+
* v0.1.36 breaking-ish change: this was `boolean` before the function form
|
|
91
|
+
* existed. Never truthiness-check this field directly — a function is
|
|
92
|
+
* always truthy even when it would return false for every input. Ask
|
|
93
|
+
* `ToolRegistry.isParallelSafe(name, input)` instead; it handles both
|
|
94
|
+
* forms and fails safe (serial) when the function throws.
|
|
86
95
|
*/
|
|
87
|
-
parallelSafe?: boolean;
|
|
96
|
+
parallelSafe?: boolean | ((input: Record<string, unknown>) => boolean);
|
|
88
97
|
execute(input: Record<string, unknown>): Promise<ToolExecuteResult>;
|
|
89
98
|
}
|
|
99
|
+
export type PreparedToolDispatch = {
|
|
100
|
+
state: "done";
|
|
101
|
+
toolName: string;
|
|
102
|
+
input: Record<string, unknown>;
|
|
103
|
+
parallelSafe: false;
|
|
104
|
+
result: ToolExecuteResult;
|
|
105
|
+
} | {
|
|
106
|
+
state: "ready";
|
|
107
|
+
toolName: string;
|
|
108
|
+
input: Record<string, unknown>;
|
|
109
|
+
parallelSafe: boolean;
|
|
110
|
+
handler: ToolHandler;
|
|
111
|
+
};
|
|
90
112
|
/**
|
|
91
113
|
* v0.1.22+: per-registration options. Currently the only knob is `deferred`
|
|
92
114
|
* but the shape is open so future extensions (per-tool max-iter cost,
|
|
@@ -226,16 +248,43 @@ export declare class ToolRegistry {
|
|
|
226
248
|
* binary content needs policy review.
|
|
227
249
|
*/
|
|
228
250
|
dispatch(name: string, input: Record<string, unknown>): Promise<ToolExecuteResult>;
|
|
251
|
+
/**
|
|
252
|
+
* Apply PreToolUse hooks and compute the parallel-safety decision from the
|
|
253
|
+
* effective input the tool will actually see. Used by the agent loop so
|
|
254
|
+
* input-mutating hooks cannot make a write-capable call run in parallel.
|
|
255
|
+
*/
|
|
256
|
+
prepareDispatch(name: string, input: Record<string, unknown>): Promise<PreparedToolDispatch>;
|
|
257
|
+
/**
|
|
258
|
+
* Execute a prepared dispatch. The prepared value must come from this
|
|
259
|
+
* registry; it carries the handler selected before scheduling so Pre hooks
|
|
260
|
+
* are not re-run after the loop has made its serial/parallel decision.
|
|
261
|
+
*/
|
|
262
|
+
dispatchPrepared(prepared: PreparedToolDispatch): Promise<ToolExecuteResult>;
|
|
263
|
+
private prepareDispatchInternal;
|
|
229
264
|
/**
|
|
230
265
|
* True when `name` is registered AND its handler is flagged parallelSafe.
|
|
231
266
|
* Unknown tools and unflagged tools default to false — the loop falls
|
|
232
267
|
* through to sequential dispatch, which is the safe default for any tool
|
|
233
268
|
* with side effects (write/edit/bash/most MCP).
|
|
269
|
+
*
|
|
270
|
+
* When `parallelSafe` is a function, it is called with the tool's actual
|
|
271
|
+
* input so per-call decisions are possible (e.g. Agent tool: explore/plan
|
|
272
|
+
* → parallel-safe, general → serial).
|
|
273
|
+
*/
|
|
274
|
+
isParallelSafe(name: string, input?: Record<string, unknown>): boolean;
|
|
275
|
+
/**
|
|
276
|
+
* True when a tool is definitely serial before PreToolUse hooks run.
|
|
277
|
+
*
|
|
278
|
+
* Function-valued `parallelSafe` depends on the post-hook effective input,
|
|
279
|
+
* so evaluating it here would either duplicate side effects or classify
|
|
280
|
+
* against the wrong input. Treat those dynamic tools as prepare-safe; the
|
|
281
|
+
* actual scheduling decision still happens exactly once in prepareDispatch.
|
|
234
282
|
*/
|
|
235
|
-
|
|
283
|
+
requiresSequentialPreparation(name: string): boolean;
|
|
284
|
+
private handlerParallelSafe;
|
|
236
285
|
/**
|
|
237
|
-
* Return every registered handler. Useful for forwarding a selected
|
|
238
|
-
*
|
|
286
|
+
* Return every registered handler. Useful for forwarding a selected subset
|
|
287
|
+
* of the parent registry (e.g. MCP tools) to a `general` sub-agent via
|
|
239
288
|
* `RunSubAgentOptions.extraTools`.
|
|
240
289
|
*
|
|
241
290
|
* Ordering matches insertion order. Deferred / active state is NOT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,sBAAsB,EAAE,CAAC;AAElE;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,GACrB;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GACtD;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC,MAAM,EAA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