@deepseek-ai/dsh-tool-subagent-control 0.2.2-rc.1 → 0.2.2-rc.2
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.i18n.yaml +58 -40
- package/README.md +54 -22
- package/README.zh.md +54 -22
- package/lib/index.js +197 -107
- package/lib/types/index.d.ts +12 -3
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/list-agents.d.ts +4 -7
- package/lib/types/list-agents.d.ts.map +1 -0
- package/lib/types/list-agents.js.map +1 -0
- package/lib/types/wait-agent.d.ts +8 -0
- package/lib/types/wait-agent.d.ts.map +1 -0
- package/lib/types/wait-agent.js.map +1 -0
- package/package.json +28 -23
- package/src/index.ts +158 -0
- package/src/list-agents.ts +97 -0
- package/src/wait-agent.ts +118 -0
package/lib/index.js
CHANGED
|
@@ -1,139 +1,198 @@
|
|
|
1
|
-
import
|
|
1
|
+
import z from "@deepseek-ai/schemastery";
|
|
2
2
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ROOT_AGENT_NAME } from "@deepseek-ai/dsh-subagent";
|
|
4
|
+
import { HarnessError } from "@deepseek-ai/dsh-llm";
|
|
5
5
|
//#region lib/types/list-agents.js
|
|
6
|
-
/**
|
|
7
|
-
* The globally named `list_agents` tool: a thin model-facing adapter over
|
|
8
|
-
* the continuable projection of `ctx.subagents.listChildren()` and, for the
|
|
9
|
-
* `descendants` scope, `ctx.subagents.listDescendants()`. The control plugin owns
|
|
10
|
-
* registration and disposal alongside messaging and interruption.
|
|
11
|
-
*/
|
|
12
|
-
/** Resolve the optional model request into an internal required-scope spec. */
|
|
13
|
-
function resolveListAgentsRequest(request) {
|
|
14
|
-
return { scope: request.scope ?? "children" };
|
|
15
|
-
}
|
|
6
|
+
/** Discover the caller's entire subagent tree; the control plugin owns registration. */
|
|
16
7
|
/** Report turn activity without exposing whether the child is loaded. */
|
|
17
8
|
function statusOf(agents, id) {
|
|
18
9
|
return agents.get(id)?.status === "running" ? "running" : "inactive";
|
|
19
10
|
}
|
|
20
|
-
/** Project one service row into the model-facing entry, or omit a one-shot child. */
|
|
21
|
-
function project(agents, entry
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if ("kind" in entry && entry.kind === "diagnostic") return {
|
|
27
|
-
kind: "diagnostic",
|
|
28
|
-
id: entry.id,
|
|
29
|
-
reason: entry.reason,
|
|
30
|
-
...at
|
|
11
|
+
/** Project one service row into the model-facing entry, or omit a one-shot or external child. */
|
|
12
|
+
function project(agents, entry) {
|
|
13
|
+
const name = entry.path ?? entry.id;
|
|
14
|
+
if (entry.kind === "diagnostic") return {
|
|
15
|
+
name,
|
|
16
|
+
status: entry.reason
|
|
31
17
|
};
|
|
32
18
|
if (entry.mode !== "continuable") return void 0;
|
|
33
19
|
return {
|
|
34
|
-
|
|
35
|
-
id: entry.id,
|
|
36
|
-
label: entry.label,
|
|
20
|
+
name,
|
|
37
21
|
status: statusOf(agents, entry.id),
|
|
38
|
-
|
|
22
|
+
description: entry.label
|
|
39
23
|
};
|
|
40
24
|
}
|
|
41
25
|
/**
|
|
42
26
|
* Register the `list_agents` tool.
|
|
43
27
|
* @param ctx - context carrying the tool registry, subagent service, and live Agent registry.
|
|
28
|
+
* @returns the registered definition for scoped availability checks.
|
|
44
29
|
*/
|
|
45
30
|
function registerListAgents(ctx) {
|
|
46
|
-
|
|
31
|
+
const definition = defineTool({
|
|
47
32
|
name: "list_agents",
|
|
48
|
-
description: "List
|
|
49
|
-
parameters: {
|
|
50
|
-
|
|
51
|
-
enum: ["children", "descendants"],
|
|
52
|
-
description: "children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent."
|
|
53
|
-
} },
|
|
33
|
+
description: "List your entire subagent tree: the root agent and all reachable continuable descendants, including yourself. Rows carry names, descriptions, and status. A descendant's name is its path from the root, such as reviewer/checker. You can message any other agent in the subagent tree. running means it is working; inactive means no turn is executing; it does not indicate task completion, success, or failure. corrupt, unsupported, or unavailable means this row's own descendants could not be read; the row itself is still a member you can message. While you remain active, you will be notified when a direct child finishes; there is no need to keep checking its status. Use send_message to continue the conversation.",
|
|
34
|
+
parameters: {},
|
|
35
|
+
isConcurrencySafe: () => true,
|
|
54
36
|
output: {
|
|
55
37
|
schema: {
|
|
56
38
|
type: "array",
|
|
57
|
-
items: {
|
|
39
|
+
items: {
|
|
58
40
|
type: "object",
|
|
59
41
|
additionalProperties: false,
|
|
60
42
|
properties: {
|
|
61
|
-
|
|
62
|
-
type: "string",
|
|
63
|
-
required: true,
|
|
64
|
-
enum: ["child"]
|
|
65
|
-
},
|
|
66
|
-
id: {
|
|
67
|
-
type: "string",
|
|
68
|
-
required: true
|
|
69
|
-
},
|
|
70
|
-
label: {
|
|
43
|
+
name: {
|
|
71
44
|
type: "string",
|
|
72
45
|
required: true
|
|
73
46
|
},
|
|
74
47
|
status: {
|
|
75
|
-
type: "string",
|
|
76
|
-
required: true,
|
|
77
|
-
enum: ["running", "inactive"]
|
|
78
|
-
},
|
|
79
|
-
parent: { type: "string" },
|
|
80
|
-
depth: { type: "number" }
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
type: "object",
|
|
84
|
-
additionalProperties: false,
|
|
85
|
-
properties: {
|
|
86
|
-
kind: {
|
|
87
|
-
type: "string",
|
|
88
|
-
required: true,
|
|
89
|
-
enum: ["diagnostic"]
|
|
90
|
-
},
|
|
91
|
-
id: {
|
|
92
|
-
type: "string",
|
|
93
|
-
required: true
|
|
94
|
-
},
|
|
95
|
-
reason: {
|
|
96
48
|
type: "string",
|
|
97
49
|
required: true,
|
|
98
50
|
enum: [
|
|
51
|
+
"running",
|
|
52
|
+
"inactive",
|
|
99
53
|
"corrupt",
|
|
100
54
|
"unsupported",
|
|
101
55
|
"unavailable"
|
|
102
56
|
]
|
|
103
57
|
},
|
|
104
|
-
|
|
105
|
-
depth: { type: "number" }
|
|
58
|
+
description: { type: "string" }
|
|
106
59
|
}
|
|
107
|
-
}
|
|
60
|
+
}
|
|
108
61
|
},
|
|
109
|
-
render: (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
text: entries.length === 0 ? "(no subagents)" : entries.map((entry) => {
|
|
114
|
-
const at = request.scope === "descendants" ? ` parent=${String(entry.parent)} depth=${String(entry.depth)}` : "";
|
|
115
|
-
return entry.kind === "child" ? `${entry.id} [${entry.status}]${at} — ${entry.label}` : `${entry.id} [diagnostic: ${entry.reason}]${at}`;
|
|
116
|
-
}).join("\n")
|
|
117
|
-
}];
|
|
118
|
-
}
|
|
62
|
+
render: (_args, entries) => [{
|
|
63
|
+
type: "text",
|
|
64
|
+
text: entries.map((entry) => `${entry.name} [${entry.status}]${entry.description === void 0 ? "" : ` — ${entry.description}`}`).join("\n")
|
|
65
|
+
}]
|
|
119
66
|
},
|
|
120
|
-
async execute(
|
|
67
|
+
async execute(_args, exec) {
|
|
121
68
|
const parent = exec.agent;
|
|
122
69
|
if (!parent) throw new Error("list_agents requires a calling agent (exec.agent was undefined)");
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
70
|
+
const root = ctx.subagents.rootOf(parent);
|
|
71
|
+
const entries = await ctx.subagents.listDescendants(root.id, exec.signal);
|
|
72
|
+
return [{
|
|
73
|
+
name: ROOT_AGENT_NAME,
|
|
74
|
+
status: statusOf(ctx.agents, root.id),
|
|
75
|
+
description: "root agent"
|
|
76
|
+
}, ...entries.map((entry) => project(ctx.agents, entry)).filter((entry) => entry !== void 0)];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
ctx.tools.register(definition);
|
|
80
|
+
return definition;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region lib/types/wait-agent.js
|
|
84
|
+
/** Input waiting owned by the subagent control plugin. */
|
|
85
|
+
/** Wait failures retain a stable machine-readable reason through tool execution. */
|
|
86
|
+
var AgentWaitError = class extends HarnessError {
|
|
87
|
+
constructor(message, code) {
|
|
88
|
+
super(message, code);
|
|
89
|
+
this.name = "AgentWaitError";
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Wait without consuming input; every settlement removes its live resources.
|
|
94
|
+
* Within one model tool call, such as a `run_code` program, pending input that
|
|
95
|
+
* an earlier wait already reported does not end this wait: that input reaches
|
|
96
|
+
* the model only after the call finishes, so a waiting loop cannot spin on it.
|
|
97
|
+
*/
|
|
98
|
+
function waitForInput(ctx, agent, timeoutMs, signal, lifetime, reported, rootCallId) {
|
|
99
|
+
lifetime.throwIfAborted();
|
|
100
|
+
if (ctx.agents.get(agent.id) !== agent) throw new AgentWaitError("wait_agent requires the exact live calling agent", "WAIT_UNAVAILABLE");
|
|
101
|
+
const previous = reported.get(agent);
|
|
102
|
+
const seen = previous?.rootCallId === rootCallId ? previous.ids : void 0;
|
|
103
|
+
return new Promise((resolve, reject) => {
|
|
104
|
+
const finish = (settle) => {
|
|
105
|
+
clearTimeout(timer);
|
|
106
|
+
offInbox();
|
|
107
|
+
offDisposed();
|
|
108
|
+
signal.removeEventListener("abort", onAbort);
|
|
109
|
+
lifetime.removeEventListener("abort", onUnload);
|
|
110
|
+
settle();
|
|
111
|
+
};
|
|
112
|
+
const onInput = () => {
|
|
113
|
+
const pending = agent.inbox.nextStep;
|
|
114
|
+
if (pending.some((message) => seen?.has(message.id) !== true)) {
|
|
115
|
+
reported.set(agent, {
|
|
116
|
+
rootCallId,
|
|
117
|
+
ids: new Set(pending.map((message) => message.id))
|
|
118
|
+
});
|
|
119
|
+
finish(() => {
|
|
120
|
+
resolve({ timedOut: false });
|
|
121
|
+
});
|
|
129
122
|
}
|
|
123
|
+
};
|
|
124
|
+
const onAbort = () => {
|
|
125
|
+
finish(() => {
|
|
126
|
+
reject(signal.reason);
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
const onUnload = () => {
|
|
130
|
+
finish(() => {
|
|
131
|
+
reject(lifetime.reason);
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
const offInbox = ctx.on("agent/inbox/inserted", ({ agent: recipient }) => {
|
|
135
|
+
if (recipient === agent) onInput();
|
|
136
|
+
});
|
|
137
|
+
const offDisposed = ctx.on("agent/disposed", ({ agent: disposed }) => {
|
|
138
|
+
if (disposed === agent) finish(() => {
|
|
139
|
+
reject(new AgentWaitError("wait_agent ended because the calling agent was disposed", "WAIT_UNAVAILABLE"));
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
143
|
+
lifetime.addEventListener("abort", onUnload, { once: true });
|
|
144
|
+
const timer = setTimeout(() => {
|
|
145
|
+
finish(() => {
|
|
146
|
+
resolve({ timedOut: true });
|
|
147
|
+
});
|
|
148
|
+
}, timeoutMs);
|
|
149
|
+
if (signal.aborted) onAbort();
|
|
150
|
+
else onInput();
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Register one inbox wait tool and cancel its waits when the plugin unloads.
|
|
155
|
+
* @param ctx - plugin context owning the tool, event listeners, and wait lifetime.
|
|
156
|
+
*/
|
|
157
|
+
function registerWaitAgent(ctx) {
|
|
158
|
+
const lifetime = new AbortController();
|
|
159
|
+
const reported = /* @__PURE__ */ new WeakMap();
|
|
160
|
+
ctx.effect(() => () => {
|
|
161
|
+
lifetime.abort(new AgentWaitError("wait_agent ended because its plugin was unloaded", "WAIT_UNAVAILABLE"));
|
|
162
|
+
}, "subagent-control.waits()");
|
|
163
|
+
ctx.tools.register(defineTool({
|
|
164
|
+
name: "wait_agent",
|
|
165
|
+
description: "Wait for input at your next step, including agent messages, completion notifications, and user steering. Returns immediately if new input is pending. `timedOut: false` means new input is pending. Pending input is delivered to the model after code execution finishes.",
|
|
166
|
+
parameters: { timeout_ms: {
|
|
167
|
+
type: "integer",
|
|
168
|
+
description: "Wait duration in milliseconds, from 10000 through 3600000. Defaults to 30000."
|
|
169
|
+
} },
|
|
170
|
+
output: {
|
|
171
|
+
schema: {
|
|
172
|
+
type: "object",
|
|
173
|
+
additionalProperties: false,
|
|
174
|
+
properties: { timedOut: {
|
|
175
|
+
type: "boolean",
|
|
176
|
+
required: true
|
|
177
|
+
} }
|
|
178
|
+
},
|
|
179
|
+
render: (_args, value) => [{
|
|
180
|
+
type: "text",
|
|
181
|
+
text: JSON.stringify(value)
|
|
182
|
+
}]
|
|
183
|
+
},
|
|
184
|
+
async execute(args, exec) {
|
|
185
|
+
const timeoutMs = args.timeout_ms ?? 3e4;
|
|
186
|
+
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1e4 || timeoutMs > 36e5) throw new AgentWaitError("timeout_ms must be an integer from 10000 through 3600000", "WAIT_INVALID_TIMEOUT");
|
|
187
|
+
if (exec.agent === void 0) throw new AgentWaitError("wait_agent requires a calling agent", "WAIT_UNAVAILABLE");
|
|
188
|
+
return await waitForInput(ctx, exec.agent, timeoutMs, exec.signal, lifetime.signal, reported, exec.rootCallId);
|
|
130
189
|
}
|
|
131
190
|
}));
|
|
132
191
|
}
|
|
133
192
|
//#endregion
|
|
134
193
|
//#region lib/types/index.js
|
|
135
194
|
/**
|
|
136
|
-
* Shared messaging, interruption, and child discovery tools.
|
|
195
|
+
* Shared messaging, inbox waiting, interruption, and child discovery tools.
|
|
137
196
|
* They perform no lifecycle routing of their own —
|
|
138
197
|
* residency, cold resume, and interrupt authorization belong to the subagent
|
|
139
198
|
* service — and they live apart from the provider-bound
|
|
@@ -145,22 +204,28 @@ const name = "tool-subagent-control";
|
|
|
145
204
|
const inject = [
|
|
146
205
|
"tools",
|
|
147
206
|
"subagents",
|
|
148
|
-
"agents"
|
|
207
|
+
"agents",
|
|
208
|
+
"systemPrompt"
|
|
149
209
|
];
|
|
210
|
+
/** Loader schema for optional subagent control tools. */
|
|
211
|
+
const Config = z.object({ interrupt: z.boolean().default(true) });
|
|
150
212
|
/**
|
|
151
213
|
* Register the shared subagent control and discovery tools.
|
|
152
|
-
* @param ctx - context carrying tools, subagents, and
|
|
214
|
+
* @param ctx - context carrying tools, subagents, live Agents, and prompt assembly.
|
|
215
|
+
* @param config - optional tool registration settings.
|
|
153
216
|
*/
|
|
154
|
-
function apply(ctx) {
|
|
155
|
-
|
|
156
|
-
ctx
|
|
217
|
+
function apply(ctx, config = {}) {
|
|
218
|
+
const interrupt = config.interrupt !== false;
|
|
219
|
+
const listAgents = registerListAgents(ctx);
|
|
220
|
+
registerWaitAgent(ctx);
|
|
221
|
+
const sendMessage = defineTool({
|
|
157
222
|
name: "send_message",
|
|
158
|
-
description: "Send a message to an agent. A working agent receives it at its next step; an idle agent starts a new turn with it. Returns delivery confirmation
|
|
223
|
+
description: "Send a message to an agent. A working agent receives it at its next step; an idle agent starts a new turn with it. Returns delivery confirmation.",
|
|
159
224
|
parameters: {
|
|
160
|
-
|
|
225
|
+
agent: {
|
|
161
226
|
type: "string",
|
|
162
227
|
required: true,
|
|
163
|
-
description: "The
|
|
228
|
+
description: "The name of another agent in your subagent tree, as shown by list_agents."
|
|
164
229
|
},
|
|
165
230
|
message: {
|
|
166
231
|
type: "string",
|
|
@@ -179,7 +244,7 @@ function apply(ctx) {
|
|
|
179
244
|
},
|
|
180
245
|
render: (args, _value) => [{
|
|
181
246
|
type: "text",
|
|
182
|
-
text: `message delivered to agent ${args.
|
|
247
|
+
text: `message delivered to agent ${args.agent}`
|
|
183
248
|
}]
|
|
184
249
|
},
|
|
185
250
|
async execute(args, exec) {
|
|
@@ -189,16 +254,40 @@ function apply(ctx) {
|
|
|
189
254
|
type: "text",
|
|
190
255
|
text: args.message
|
|
191
256
|
}];
|
|
192
|
-
|
|
257
|
+
const targetId = await ctx.subagents.resolveName(sender, args.agent, exec.signal);
|
|
258
|
+
return { messageId: await ctx.subagents.sendMessage(sender, targetId, message, { signal: exec.signal }) };
|
|
193
259
|
}
|
|
194
|
-
})
|
|
260
|
+
});
|
|
261
|
+
ctx.tools.register(sendMessage);
|
|
262
|
+
ctx.systemPrompt.context({
|
|
263
|
+
name: "subagent:identity",
|
|
264
|
+
order: ctx.systemPrompt.getContextOrder("SUBAGENT_DELEGATION"),
|
|
265
|
+
required: true,
|
|
266
|
+
interpolate: false,
|
|
267
|
+
text: ({ agent, scope, toolSet }) => {
|
|
268
|
+
if (agent === void 0) return "";
|
|
269
|
+
try {
|
|
270
|
+
const names = ctx.subagents.namesOf(agent);
|
|
271
|
+
let identity = names.parent === void 0 ? `You are the root agent. Your name is ${JSON.stringify(names.self)}.` : `You are a subagent delegated by agent ${JSON.stringify(names.parent)}.\nYour name is ${JSON.stringify(names.self)}.\nThe root agent of your collaboration tree is ${JSON.stringify(ROOT_AGENT_NAME)}.`;
|
|
272
|
+
const guidance = [];
|
|
273
|
+
if (ctx.tools.get(sendMessage.name, scope, toolSet) === sendMessage) guidance.push("To message other agents, use send_message({ agent: \"<agent-name>\", message: \"...\" }).");
|
|
274
|
+
if (ctx.tools.get(listAgents.name, scope, toolSet) === listAgents) guidance.push("Use list_agents({}) to find your collaborator agents and their names.");
|
|
275
|
+
if (guidance.length > 0) identity += "\n\n" + guidance.join("\n");
|
|
276
|
+
return identity;
|
|
277
|
+
} catch (error) {
|
|
278
|
+
if (!(typeof error === "object" && error !== null && "name" in error && error.name === "SubagentError" && "code" in error && error.code === "UNAUTHORIZED")) throw error;
|
|
279
|
+
return `Your agent id is ${JSON.stringify(agent.id)}. Your subagent tree root is unavailable. Continue independent work; subagent discovery and messaging require an active root.`;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
if (!interrupt) return;
|
|
195
284
|
ctx.tools.register(defineTool({
|
|
196
285
|
name: "interrupt_agent",
|
|
197
|
-
description: "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local
|
|
198
|
-
parameters: {
|
|
286
|
+
description: "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local subagent's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
|
|
287
|
+
parameters: { agent: {
|
|
199
288
|
type: "string",
|
|
200
289
|
required: true,
|
|
201
|
-
description: "The
|
|
290
|
+
description: "The name of an agent created under you: your direct child or a deeper descendant."
|
|
202
291
|
} },
|
|
203
292
|
output: {
|
|
204
293
|
schema: {
|
|
@@ -211,19 +300,20 @@ function apply(ctx) {
|
|
|
211
300
|
},
|
|
212
301
|
render: (args, _value) => [{
|
|
213
302
|
type: "text",
|
|
214
|
-
text: `interrupt requested for agent ${args.
|
|
303
|
+
text: `interrupt requested for agent ${args.agent}`
|
|
215
304
|
}]
|
|
216
305
|
},
|
|
217
|
-
execute(args, exec) {
|
|
306
|
+
async execute(args, exec) {
|
|
218
307
|
const caller = exec.agent;
|
|
219
308
|
if (!caller) throw new Error("interrupt_agent requires a calling agent (exec.agent was undefined)");
|
|
220
|
-
ctx.subagents.
|
|
309
|
+
const targetId = await ctx.subagents.resolveName(caller, args.agent, exec.signal);
|
|
310
|
+
ctx.subagents.interrupt(targetId, {
|
|
221
311
|
kind: "ancestor",
|
|
222
312
|
agent: caller
|
|
223
313
|
});
|
|
224
|
-
return
|
|
314
|
+
return { accepted: true };
|
|
225
315
|
}
|
|
226
316
|
}));
|
|
227
317
|
}
|
|
228
318
|
//#endregion
|
|
229
|
-
export { apply, inject, name };
|
|
319
|
+
export { Config, apply, inject, name };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared messaging, interruption, and child discovery tools.
|
|
2
|
+
* Shared messaging, inbox waiting, interruption, and child discovery tools.
|
|
3
3
|
* They perform no lifecycle routing of their own —
|
|
4
4
|
* residency, cold resume, and interrupt authorization belong to the subagent
|
|
5
5
|
* service — and they live apart from the provider-bound
|
|
@@ -8,11 +8,20 @@
|
|
|
8
8
|
* @module @deepseek-ai/dsh-tool-subagent-control
|
|
9
9
|
*/
|
|
10
10
|
import type { Context } from '@deepseek-ai/cordis';
|
|
11
|
+
import z from '@deepseek-ai/schemastery';
|
|
11
12
|
export declare const name = "tool-subagent-control";
|
|
12
13
|
export declare const inject: string[];
|
|
14
|
+
/** Optional subagent control tools. */
|
|
15
|
+
export interface Config {
|
|
16
|
+
/** Register `interrupt_agent`. Defaults to true; false leaves the service API available. */
|
|
17
|
+
interrupt?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Loader schema for optional subagent control tools. */
|
|
20
|
+
export declare const Config: z<Config>;
|
|
13
21
|
/**
|
|
14
22
|
* Register the shared subagent control and discovery tools.
|
|
15
|
-
* @param ctx - context carrying tools, subagents, and
|
|
23
|
+
* @param ctx - context carrying tools, subagents, live Agents, and prompt assembly.
|
|
24
|
+
* @param config - optional tool registration settings.
|
|
16
25
|
*/
|
|
17
|
-
export declare function apply(ctx: Context): void;
|
|
26
|
+
export declare function apply(ctx: Context, config?: Config): void;
|
|
18
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAQxC,eAAO,MAAM,IAAI,0BAA0B,CAAA;AAC3C,eAAO,MAAM,MAAM,UAAmD,CAAA;AAEtE,uCAAuC;AACvC,MAAM,WAAW,MAAM;IACrB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,yDAAyD;AACzD,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,MAAM,CAE3B,CAAA;AAEF;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,MAAW,GAAG,IAAI,CAuH7D"}
|
|
@@ -0,0 +1 @@
|
|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,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;YACjF,oEAAoE;YACpE,2DAA2D;YAC3D,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;YACtE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;QAC3B,CAAC;KACF,CAAC,CAAC,CAAA;AACL,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The globally named `list_agents` tool: a thin model-facing adapter over
|
|
3
|
-
* the continuable projection of `ctx.subagents.listChildren()` and, for the
|
|
4
|
-
* `descendants` scope, `ctx.subagents.listDescendants()`. The control plugin owns
|
|
5
|
-
* registration and disposal alongside messaging and interruption.
|
|
6
|
-
*/
|
|
1
|
+
/** Discover the caller's entire subagent tree; the control plugin owns registration. */
|
|
7
2
|
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import type { ToolDefinition } from '@deepseek-ai/dsh-tools';
|
|
8
4
|
/**
|
|
9
5
|
* Register the `list_agents` tool.
|
|
10
6
|
* @param ctx - context carrying the tool registry, subagent service, and live Agent registry.
|
|
7
|
+
* @returns the registered definition for scoped availability checks.
|
|
11
8
|
*/
|
|
12
|
-
export declare function registerListAgents(ctx: Context):
|
|
9
|
+
export declare function registerListAgents(ctx: Context): ToolDefinition;
|
|
13
10
|
//# sourceMappingURL=list-agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-agents.d.ts","sourceRoot":"","sources":["../../src/list-agents.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;A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,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;YACzE,OAAO;gBACL,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE;gBAC3F,GAAG,OAAO;qBACP,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;qBACxC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC;aACxC,CAAA;QACH,CAAC;KACF,CAAC,CAAA;IACF,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;IAC9B,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Input waiting owned by the subagent control plugin. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
/**
|
|
4
|
+
* Register one inbox wait tool and cancel its waits when the plugin unloads.
|
|
5
|
+
* @param ctx - plugin context owning the tool, event listeners, and wait lifetime.
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerWaitAgent(ctx: Context): void;
|
|
8
|
+
//# sourceMappingURL=wait-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-agent.d.ts","sourceRoot":"","sources":["../../src/wait-agent.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA6ElD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAkCpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-agent.js","sourceRoot":"","sources":["../../src/wait-agent.ts"],"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AAW,EAAE,+EAA+E;aAC7F;SACF;QACD,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;aAC9D;YACD,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;SAC1E;QACD,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI;YACtB,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,IAAI,MAAM,CAAA;YAC3C,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,MAAM,IAAI,SAAS,GAAG,SAAS,EAAE,CAAC;gBACpF,MAAM,IAAI,cAAc,CAAC,0DAA0D,EAAE,sBAAsB,CAAC,CAAA;YAC9G,CAAC;YACD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC7B,MAAM,IAAI,cAAc,CAAC,qCAAqC,EAAE,kBAAkB,CAAC,CAAA;YACrF,CAAC;YACD,OAAO,MAAM,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;QAChH,CAAC;KACF,CAAC,CAAC,CAAA;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-tool-subagent-control",
|
|
3
3
|
"description": "Shared messaging, interruption, and child discovery tools for subagents",
|
|
4
|
-
"version": "0.2.2-rc.
|
|
4
|
+
"version": "0.2.2-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -25,36 +25,41 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"locale/*.json",
|
|
27
27
|
"lib/index.js",
|
|
28
|
-
"lib/types/**/*.d.ts"
|
|
28
|
+
"lib/types/**/*.d.ts",
|
|
29
|
+
"lib/types/**/*.d.ts.map",
|
|
30
|
+
"lib/**/*.js.map",
|
|
31
|
+
"src"
|
|
29
32
|
],
|
|
30
33
|
"license": "MIT",
|
|
31
34
|
"peerDependencies": {
|
|
32
35
|
"@deepseek-ai/cordis": "~4.1.0",
|
|
33
|
-
"@deepseek-ai/dsh-llm": "0.2.2-rc.
|
|
34
|
-
"@deepseek-ai/dsh-session": "0.2.2-rc.
|
|
35
|
-
"@deepseek-ai/dsh-subagent": "0.2.2-rc.
|
|
36
|
-
"@deepseek-ai/dsh-tools": "0.2.2-rc.
|
|
37
|
-
"@deepseek-ai/dsh-agent": "0.2.2-rc.
|
|
36
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.2",
|
|
38
|
+
"@deepseek-ai/dsh-subagent": "0.2.2-rc.2",
|
|
39
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.2",
|
|
41
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.2"
|
|
38
42
|
},
|
|
39
43
|
"devDependencies": {
|
|
40
44
|
"@deepseek-ai/cordis": "~4.1.0",
|
|
41
|
-
"@deepseek-ai/dsh-agent": "0.2.2-rc.
|
|
42
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.2-rc.
|
|
43
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-rc.
|
|
44
|
-
"@deepseek-ai/dsh-llm": "0.2.2-rc.
|
|
45
|
-
"@deepseek-ai/dsh-session": "0.2.2-rc.
|
|
46
|
-
"@deepseek-ai/dsh-session-persistence": "0.2.2-rc.
|
|
47
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.2-rc.
|
|
48
|
-
"@deepseek-ai/dsh-session-projection": "0.2.2-rc.
|
|
49
|
-
"@deepseek-ai/dsh-session-query": "0.2.2-rc.
|
|
50
|
-
"@deepseek-ai/dsh-subagent": "0.2.2-rc.
|
|
51
|
-
"@deepseek-ai/dsh-subagent-fork-in-process": "0.2.2-rc.
|
|
52
|
-
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.2-rc.
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
45
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.2-rc.2",
|
|
47
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-rc.2",
|
|
48
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.2",
|
|
50
|
+
"@deepseek-ai/dsh-session-persistence": "0.2.2-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.2-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-session-query": "0.2.2-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-subagent": "0.2.2-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-subagent-fork-in-process": "0.2.2-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.2-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-tool-testkit": "0.2.2-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.2"
|
|
55
60
|
},
|
|
56
61
|
"dependencies": {
|
|
57
|
-
"@deepseek-ai/
|
|
58
|
-
"@deepseek-ai/dsh-util-values": "0.2.2-rc.
|
|
62
|
+
"@deepseek-ai/schemastery": "~3.19.0",
|
|
63
|
+
"@deepseek-ai/dsh-util-values": "0.2.2-rc.2"
|
|
59
64
|
}
|
|
60
65
|
}
|