@cuylabs/agent-core 5.6.1 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-NICU5N2S.js → chunk-2W7IUHNV.js} +2 -2
- package/dist/{chunk-GHVW7L4P.js → chunk-3LSEB7W6.js} +1 -1
- package/dist/{chunk-T33MQXUP.js → chunk-FFSB7RFD.js} +2 -1
- package/dist/{chunk-SJCAIWLZ.js → chunk-K5WUYL2H.js} +341 -34
- package/dist/{chunk-3ABZ5MIT.js → chunk-KE7A7V7F.js} +2 -2
- package/dist/{chunk-JUIL2NJC.js → chunk-S2L4AJ72.js} +1 -1
- package/dist/execution/index.js +4 -4
- package/dist/execution/turn/index.js +4 -4
- package/dist/index.js +71 -69
- package/dist/inference/index.js +3 -3
- package/dist/middleware/index.js +2 -2
- package/dist/safety/index.js +1 -1
- package/dist/safety/risk.d.ts.map +1 -1
- package/dist/subagents/index.d.ts +2 -2
- package/dist/subagents/index.d.ts.map +1 -1
- package/dist/subagents/index.js +11 -9
- package/dist/subagents/inspection.d.ts +11 -0
- package/dist/subagents/inspection.d.ts.map +1 -0
- package/dist/subagents/results.d.ts +29 -3
- package/dist/subagents/results.d.ts.map +1 -1
- package/dist/subagents/tool-factories.d.ts +3 -2
- package/dist/subagents/tool-factories.d.ts.map +1 -1
- package/dist/subagents/tools.d.ts +2 -2
- package/dist/subagents/tools.d.ts.map +1 -1
- package/dist/tool/index.js +2 -2
- package/package.json +1 -1
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
Inference,
|
|
11
11
|
buildModelCallContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KE7A7V7F.js";
|
|
13
13
|
import {
|
|
14
14
|
LLMError
|
|
15
15
|
} from "./chunk-STDJYXYK.js";
|
|
16
16
|
import {
|
|
17
17
|
executeAgentToolCall
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-S2L4AJ72.js";
|
|
19
19
|
import {
|
|
20
20
|
streamWithinScope
|
|
21
21
|
} from "./chunk-AHDCR7SX.js";
|
|
@@ -25,6 +25,24 @@ function formatToolCallsLine(result) {
|
|
|
25
25
|
return result.toolCalls.length > 0 ? `
|
|
26
26
|
Tool calls: ${result.toolCalls.map((tool) => tool.name).join(", ")}` : "";
|
|
27
27
|
}
|
|
28
|
+
function formatCounter(counter) {
|
|
29
|
+
const entries = Object.entries(counter).sort(
|
|
30
|
+
([a], [b]) => a.localeCompare(b)
|
|
31
|
+
);
|
|
32
|
+
if (entries.length === 0) {
|
|
33
|
+
return "none";
|
|
34
|
+
}
|
|
35
|
+
return entries.map(([name, count]) => `${name} ${count}`).join(", ");
|
|
36
|
+
}
|
|
37
|
+
function formatActiveTools(tools) {
|
|
38
|
+
if (tools.length === 0) {
|
|
39
|
+
return "none";
|
|
40
|
+
}
|
|
41
|
+
return tools.slice(0, 3).map((tool) => {
|
|
42
|
+
const details = tool.inputSummary ? ` (${tool.inputSummary})` : "";
|
|
43
|
+
return `${tool.toolName} since ${tool.startedAt}${details}`;
|
|
44
|
+
}).join("; ");
|
|
45
|
+
}
|
|
28
46
|
function formatInvalidAgentTypeResult(roleName, validNames) {
|
|
29
47
|
return {
|
|
30
48
|
title: "Invalid role",
|
|
@@ -73,11 +91,11 @@ ID: ${agentId}
|
|
|
73
91
|
Role: ${roleName}
|
|
74
92
|
` + (sessionId ? `Session: ${sessionId}
|
|
75
93
|
|
|
76
|
-
` : "\n") + `Use
|
|
94
|
+
` : "\n") + `Use get_agent_results with this ID to collect the result later.`,
|
|
77
95
|
metadata: { agentId, role: roleName, sessionId }
|
|
78
96
|
};
|
|
79
97
|
}
|
|
80
|
-
function
|
|
98
|
+
function formatGetAgentResultsResult(agentId, roleName, result) {
|
|
81
99
|
return {
|
|
82
100
|
title: `${roleName} finished`,
|
|
83
101
|
output: `<agent_result id="${agentId}" role="${roleName}" session="${result.sessionId}">
|
|
@@ -91,20 +109,69 @@ function formatWaitResult(agentId, roleName, result) {
|
|
|
91
109
|
}
|
|
92
110
|
};
|
|
93
111
|
}
|
|
94
|
-
function
|
|
112
|
+
function formatInspectMissingAgentResult(id) {
|
|
113
|
+
return {
|
|
114
|
+
title: "Unknown subagent ID",
|
|
115
|
+
output: `No tracked subagent or durable progress events were found for "${id}".`,
|
|
116
|
+
metadata: { id, missing: true }
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function formatInspectAgentResult(result) {
|
|
120
|
+
const lines = [
|
|
121
|
+
`Subagent "${result.id}" is ${result.status}.`,
|
|
122
|
+
"",
|
|
123
|
+
`Title: ${result.title ?? "unknown"}`,
|
|
124
|
+
`Role: ${result.role ?? "unknown"}`,
|
|
125
|
+
...result.sessionId ? [`Session: ${result.sessionId}`] : [],
|
|
126
|
+
...result.createdAt ? [`Started: ${result.createdAt}`] : [],
|
|
127
|
+
...result.updatedAt ? [`Last update: ${result.updatedAt}`] : [],
|
|
128
|
+
...result.latestStatus ? [`Latest status: ${result.latestStatus}`] : [],
|
|
129
|
+
`Progress events: ${result.eventCount}`,
|
|
130
|
+
"",
|
|
131
|
+
"Tool progress:",
|
|
132
|
+
`- Started: ${formatCounter(result.startedToolCounts)}`,
|
|
133
|
+
`- Completed: ${formatCounter(result.completedToolCounts)}`,
|
|
134
|
+
`- Active: ${formatActiveTools(result.activeTools)}`,
|
|
135
|
+
...result.error ? ["", `Error: ${result.error}`] : [],
|
|
136
|
+
...result.hasResult ? [
|
|
137
|
+
"",
|
|
138
|
+
`Result: available via get_agent_results (${result.resultLength ?? 0} chars).`,
|
|
139
|
+
...result.resultPreview ? ["", "Result preview:", result.resultPreview] : []
|
|
140
|
+
] : result.status === "completed" ? ["", "Result: completed, but full result metadata is unavailable."] : ["", "Result: not available yet."],
|
|
141
|
+
...result.recentActivity.length > 0 ? [
|
|
142
|
+
"",
|
|
143
|
+
"Recent activity:",
|
|
144
|
+
...result.recentActivity.map((line) => `- ${line}`)
|
|
145
|
+
] : []
|
|
146
|
+
];
|
|
147
|
+
return {
|
|
148
|
+
title: "Subagent progress",
|
|
149
|
+
output: lines.join("\n"),
|
|
150
|
+
metadata: {
|
|
151
|
+
id: result.id,
|
|
152
|
+
status: result.status,
|
|
153
|
+
role: result.role,
|
|
154
|
+
sessionId: result.sessionId,
|
|
155
|
+
eventCount: result.eventCount,
|
|
156
|
+
hasResult: result.hasResult,
|
|
157
|
+
resultLength: result.resultLength
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function formatGetAgentResultsTimeoutResult(timeoutMs, runningIds) {
|
|
95
162
|
return {
|
|
96
|
-
title: "
|
|
97
|
-
output: `
|
|
163
|
+
title: "Result retrieval timed out",
|
|
164
|
+
output: `No requested subagent result became available within ${timeoutMs}ms.
|
|
98
165
|
|
|
99
166
|
` + (runningIds.length > 0 ? `Still running: ${runningIds.join(", ")}
|
|
100
167
|
|
|
101
|
-
Use
|
|
168
|
+
Use get_agent_results again to check later, close_agent if the result is no longer needed, or continue with any completed results you already have.` : "No requested subagents are still running. Check their status again or continue with any completed results you already have."),
|
|
102
169
|
metadata: { timeoutMs, runningIds }
|
|
103
170
|
};
|
|
104
171
|
}
|
|
105
|
-
function
|
|
172
|
+
function formatGetAgentResultsErrorResult(error) {
|
|
106
173
|
return {
|
|
107
|
-
title: "
|
|
174
|
+
title: "Result retrieval failed",
|
|
108
175
|
output: error instanceof Error ? error.message : String(error),
|
|
109
176
|
metadata: { error: true }
|
|
110
177
|
};
|
|
@@ -138,14 +205,221 @@ function formatCancelledAgentResult(id, roleName) {
|
|
|
138
205
|
};
|
|
139
206
|
}
|
|
140
207
|
|
|
208
|
+
// src/subagents/inspection.ts
|
|
209
|
+
var DEFAULT_INSPECT_AGENT_RECENT_EVENTS = 5;
|
|
210
|
+
var MAX_INSPECT_AGENT_RECENT_EVENTS = 20;
|
|
211
|
+
var MAX_INSPECT_AGENT_PREVIEW_CHARS = 1200;
|
|
212
|
+
var MAX_INSPECT_AGENT_INPUT_FIELDS = 4;
|
|
213
|
+
var MAX_INSPECT_AGENT_INPUT_VALUE_CHARS = 140;
|
|
214
|
+
var SENSITIVE_INPUT_KEY = /authorization|api[_-]?key|client[_-]?secret|password|secret|token/i;
|
|
215
|
+
function normalizeInspectRecentEvents(value) {
|
|
216
|
+
if (value === void 0 || !Number.isFinite(value) || value <= 0) {
|
|
217
|
+
return DEFAULT_INSPECT_AGENT_RECENT_EVENTS;
|
|
218
|
+
}
|
|
219
|
+
return Math.min(Math.floor(value), MAX_INSPECT_AGENT_RECENT_EVENTS);
|
|
220
|
+
}
|
|
221
|
+
function innerDispatchEvent(record) {
|
|
222
|
+
return record.event.type === "subagent-event" ? record.event.event : record.event;
|
|
223
|
+
}
|
|
224
|
+
function incrementCounter(counter, key) {
|
|
225
|
+
counter[key] = (counter[key] ?? 0) + 1;
|
|
226
|
+
}
|
|
227
|
+
function truncateInline(value, max = MAX_INSPECT_AGENT_INPUT_VALUE_CHARS) {
|
|
228
|
+
const normalized = value.replace(/\s+/g, " ").trim();
|
|
229
|
+
return normalized.length <= max ? normalized : `${normalized.slice(0, Math.max(0, max - 3)).trimEnd()}...`;
|
|
230
|
+
}
|
|
231
|
+
function formatInputValue(key, value) {
|
|
232
|
+
if (SENSITIVE_INPUT_KEY.test(key)) {
|
|
233
|
+
return "[redacted]";
|
|
234
|
+
}
|
|
235
|
+
if (typeof value === "string") {
|
|
236
|
+
return truncateInline(value);
|
|
237
|
+
}
|
|
238
|
+
if (typeof value === "number" || typeof value === "boolean" || value === null) {
|
|
239
|
+
return String(value);
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
return truncateInline(JSON.stringify(redactInput(value)));
|
|
243
|
+
} catch {
|
|
244
|
+
return "[unserializable]";
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function redactInput(value) {
|
|
248
|
+
if (Array.isArray(value)) {
|
|
249
|
+
return value.slice(0, 10).map((item) => redactInput(item));
|
|
250
|
+
}
|
|
251
|
+
if (!value || typeof value !== "object") {
|
|
252
|
+
return value;
|
|
253
|
+
}
|
|
254
|
+
return Object.fromEntries(
|
|
255
|
+
Object.entries(value).map(([key, nested]) => [
|
|
256
|
+
key,
|
|
257
|
+
SENSITIVE_INPUT_KEY.test(key) ? "[redacted]" : redactInput(nested)
|
|
258
|
+
])
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
function formatInputSummary(input) {
|
|
262
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) {
|
|
263
|
+
return void 0;
|
|
264
|
+
}
|
|
265
|
+
const parts = Object.entries(input).filter(([, value]) => value !== void 0).slice(0, MAX_INSPECT_AGENT_INPUT_FIELDS).map(([key, value]) => `${key}: ${formatInputValue(key, value)}`);
|
|
266
|
+
return parts.length > 0 ? parts.join(", ") : void 0;
|
|
267
|
+
}
|
|
268
|
+
function formatTimestamp(value) {
|
|
269
|
+
const date = new Date(value);
|
|
270
|
+
if (Number.isNaN(date.getTime())) {
|
|
271
|
+
return value;
|
|
272
|
+
}
|
|
273
|
+
return date.toISOString().slice(11, 19);
|
|
274
|
+
}
|
|
275
|
+
function formatUnknownError(error) {
|
|
276
|
+
if (error instanceof Error) {
|
|
277
|
+
return truncateInline(error.message);
|
|
278
|
+
}
|
|
279
|
+
if (error && typeof error === "object" && "message" in error) {
|
|
280
|
+
const message = error.message;
|
|
281
|
+
if (typeof message === "string") {
|
|
282
|
+
return truncateInline(message);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return truncateInline(String(error));
|
|
286
|
+
}
|
|
287
|
+
function activityLine(record) {
|
|
288
|
+
const event = innerDispatchEvent(record);
|
|
289
|
+
const timestamp = formatTimestamp(record.createdAt);
|
|
290
|
+
switch (event.type) {
|
|
291
|
+
case "subagent-start":
|
|
292
|
+
return `${timestamp} subagent started`;
|
|
293
|
+
case "status":
|
|
294
|
+
return `${timestamp} status: ${event.status}`;
|
|
295
|
+
case "tool-start": {
|
|
296
|
+
const inputSummary = formatInputSummary(event.input);
|
|
297
|
+
return `${timestamp} started ${event.toolName}${inputSummary ? ` (${inputSummary})` : ""}`;
|
|
298
|
+
}
|
|
299
|
+
case "tool-result":
|
|
300
|
+
return `${timestamp} completed ${event.toolName}`;
|
|
301
|
+
case "tool-error":
|
|
302
|
+
return `${timestamp} ${event.toolName} failed: ${truncateInline(
|
|
303
|
+
event.error
|
|
304
|
+
)}`;
|
|
305
|
+
case "approval-request":
|
|
306
|
+
return `${timestamp} waiting for approval`;
|
|
307
|
+
case "approval-resolved":
|
|
308
|
+
return `${timestamp} approval ${event.action}`;
|
|
309
|
+
case "human-input-request":
|
|
310
|
+
return `${timestamp} waiting for input`;
|
|
311
|
+
case "human-input-resolved":
|
|
312
|
+
return `${timestamp} input received`;
|
|
313
|
+
case "subagent-complete":
|
|
314
|
+
return `${timestamp} subagent completed`;
|
|
315
|
+
case "subagent-error":
|
|
316
|
+
return `${timestamp} subagent ${event.status}: ${truncateInline(
|
|
317
|
+
event.error
|
|
318
|
+
)}`;
|
|
319
|
+
case "error":
|
|
320
|
+
return `${timestamp} error: ${formatUnknownError(event.error)}`;
|
|
321
|
+
default:
|
|
322
|
+
return void 0;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
function selectRecentActivity(records, recentLimit) {
|
|
326
|
+
const activity = [];
|
|
327
|
+
let previousStatus;
|
|
328
|
+
for (const record of records) {
|
|
329
|
+
const event = innerDispatchEvent(record);
|
|
330
|
+
if (event.type === "status") {
|
|
331
|
+
if (event.status === previousStatus) {
|
|
332
|
+
continue;
|
|
333
|
+
}
|
|
334
|
+
previousStatus = event.status;
|
|
335
|
+
}
|
|
336
|
+
const line = activityLine(record);
|
|
337
|
+
if (line) {
|
|
338
|
+
activity.push(line);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return activity.slice(-recentLimit);
|
|
342
|
+
}
|
|
343
|
+
function summarizeEvents(records, recentLimit) {
|
|
344
|
+
const activeTools = /* @__PURE__ */ new Map();
|
|
345
|
+
const startedToolCounts = {};
|
|
346
|
+
const completedToolCounts = {};
|
|
347
|
+
let latestStatus;
|
|
348
|
+
for (const record of records) {
|
|
349
|
+
const event = innerDispatchEvent(record);
|
|
350
|
+
if (event.type === "status") {
|
|
351
|
+
latestStatus = event.status;
|
|
352
|
+
}
|
|
353
|
+
if (event.type === "tool-start") {
|
|
354
|
+
incrementCounter(startedToolCounts, event.toolName);
|
|
355
|
+
activeTools.set(event.toolCallId, {
|
|
356
|
+
inputSummary: formatInputSummary(event.input),
|
|
357
|
+
sequence: record.sequence,
|
|
358
|
+
startedAt: record.createdAt,
|
|
359
|
+
toolCallId: event.toolCallId,
|
|
360
|
+
toolName: event.toolName
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
if (event.type === "tool-result") {
|
|
364
|
+
incrementCounter(completedToolCounts, event.toolName);
|
|
365
|
+
activeTools.delete(event.toolCallId);
|
|
366
|
+
}
|
|
367
|
+
if (event.type === "tool-error") {
|
|
368
|
+
activeTools.delete(event.toolCallId);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return {
|
|
372
|
+
activeTools: [...activeTools.values()].sort((a, b) => b.sequence - a.sequence).map(({ sequence: _sequence, ...tool }) => tool),
|
|
373
|
+
completedToolCounts,
|
|
374
|
+
...latestStatus ? { latestStatus } : {},
|
|
375
|
+
recentActivity: selectRecentActivity(records, recentLimit),
|
|
376
|
+
startedToolCounts
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
function resultPreview(record) {
|
|
380
|
+
const response = record?.result?.response;
|
|
381
|
+
if (!response) {
|
|
382
|
+
return {};
|
|
383
|
+
}
|
|
384
|
+
return {
|
|
385
|
+
resultLength: response.length,
|
|
386
|
+
resultPreview: response.length <= MAX_INSPECT_AGENT_PREVIEW_CHARS ? response : `${response.slice(0, MAX_INSPECT_AGENT_PREVIEW_CHARS - 3).trimEnd()}...`
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
async function inspectDispatch(options) {
|
|
390
|
+
const [record, events] = await Promise.all([
|
|
391
|
+
options.runtime.check(options.id),
|
|
392
|
+
options.runtime.listEvents?.({ dispatchId: options.id }) ?? []
|
|
393
|
+
]);
|
|
394
|
+
if (!record && events.length === 0) {
|
|
395
|
+
return formatInspectMissingAgentResult(options.id);
|
|
396
|
+
}
|
|
397
|
+
const sortedEvents = [...events].sort((a, b) => a.sequence - b.sequence);
|
|
398
|
+
return formatInspectAgentResult({
|
|
399
|
+
id: options.id,
|
|
400
|
+
status: record?.status ?? "unknown",
|
|
401
|
+
role: record?.targetType ?? sortedEvents[0]?.targetType,
|
|
402
|
+
title: record?.title ?? sortedEvents[0]?.title,
|
|
403
|
+
sessionId: record?.sessionId ?? sortedEvents[0]?.childSessionId,
|
|
404
|
+
createdAt: record?.createdAt ?? sortedEvents[0]?.createdAt,
|
|
405
|
+
updatedAt: record?.updatedAt ?? sortedEvents.at(-1)?.createdAt,
|
|
406
|
+
error: record?.error,
|
|
407
|
+
eventCount: sortedEvents.length,
|
|
408
|
+
...summarizeEvents(sortedEvents, options.recentEvents),
|
|
409
|
+
...resultPreview(record),
|
|
410
|
+
hasResult: Boolean(record?.result)
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
|
|
141
414
|
// src/subagents/tool-factories.ts
|
|
142
415
|
var SUBAGENT_TOOL_IDS = [
|
|
143
416
|
"invoke_agent",
|
|
144
|
-
"
|
|
417
|
+
"get_agent_results",
|
|
418
|
+
"inspect_agent",
|
|
145
419
|
"close_agent"
|
|
146
420
|
];
|
|
147
|
-
var
|
|
148
|
-
var
|
|
421
|
+
var DEFAULT_GET_AGENT_RESULTS_TIMEOUT_MS = 6e4;
|
|
422
|
+
var MAX_GET_AGENT_RESULTS_TIMEOUT_MS = 6e5;
|
|
149
423
|
function getRoleNames(roles) {
|
|
150
424
|
return roles.map((role) => role.name);
|
|
151
425
|
}
|
|
@@ -154,7 +428,7 @@ function findRole(roles, roleName) {
|
|
|
154
428
|
}
|
|
155
429
|
function buildInvokeDescription(roles, isAsync) {
|
|
156
430
|
const roleList = roles.map((role) => ` - "${role.name}": ${role.description}`).join("\n");
|
|
157
|
-
const modeNote = isAsync ? "Returns an agent ID immediately. For parallel work, launch all needed subagents first, then use `
|
|
431
|
+
const modeNote = isAsync ? "Returns an agent ID immediately. For parallel work, launch all needed subagents first, then use `get_agent_results` to collect the results." : "Blocks until the subagent completes and returns the result directly.";
|
|
158
432
|
return `Delegate a focused task to a specialized subagent.
|
|
159
433
|
|
|
160
434
|
Available roles:
|
|
@@ -167,7 +441,7 @@ Guidelines:
|
|
|
167
441
|
- Provide clear, self-contained instructions \u2014 the subagent has a fresh context
|
|
168
442
|
- Include any relevant file paths, function names, or context the subagent needs
|
|
169
443
|
- Mention the working directory structure if known (for example, "code is in packages/agent-core/src")
|
|
170
|
-
- For parallel work, invoke multiple subagents before
|
|
444
|
+
- For parallel work, invoke multiple subagents before retrieving results
|
|
171
445
|
- Subagents will retry on errors and explore alternatives`;
|
|
172
446
|
}
|
|
173
447
|
function toCompletedResult(record) {
|
|
@@ -183,14 +457,14 @@ function toCompletedResult(record) {
|
|
|
183
457
|
toolCalls: record.result.toolCalls
|
|
184
458
|
};
|
|
185
459
|
}
|
|
186
|
-
function
|
|
460
|
+
function normalizeGetAgentResultsTimeoutMs(timeoutMs) {
|
|
187
461
|
if (timeoutMs === void 0) {
|
|
188
|
-
return
|
|
462
|
+
return DEFAULT_GET_AGENT_RESULTS_TIMEOUT_MS;
|
|
189
463
|
}
|
|
190
464
|
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
191
|
-
return
|
|
465
|
+
return DEFAULT_GET_AGENT_RESULTS_TIMEOUT_MS;
|
|
192
466
|
}
|
|
193
|
-
return Math.min(Math.floor(timeoutMs),
|
|
467
|
+
return Math.min(Math.floor(timeoutMs), MAX_GET_AGENT_RESULTS_TIMEOUT_MS);
|
|
194
468
|
}
|
|
195
469
|
async function waitForTerminalDispatch(runtime, id) {
|
|
196
470
|
for (; ; ) {
|
|
@@ -205,16 +479,16 @@ async function waitForTerminalDispatch(runtime, id) {
|
|
|
205
479
|
}
|
|
206
480
|
function formatTerminalFailure(record) {
|
|
207
481
|
if (record.status === "failed") {
|
|
208
|
-
return
|
|
482
|
+
return formatGetAgentResultsErrorResult(
|
|
209
483
|
new Error(record.error ?? `Subagent "${record.id}" failed.`)
|
|
210
484
|
);
|
|
211
485
|
}
|
|
212
486
|
if (record.status === "cancelled") {
|
|
213
|
-
return
|
|
487
|
+
return formatGetAgentResultsErrorResult(
|
|
214
488
|
new Error(record.error ?? `Subagent "${record.id}" was cancelled.`)
|
|
215
489
|
);
|
|
216
490
|
}
|
|
217
|
-
return
|
|
491
|
+
return formatGetAgentResultsErrorResult(
|
|
218
492
|
new Error(
|
|
219
493
|
`Subagent "${record.id}" is in unexpected state "${record.status}".`
|
|
220
494
|
)
|
|
@@ -281,15 +555,15 @@ function createInvokeAgentTool(runtime, roles, options) {
|
|
|
281
555
|
}
|
|
282
556
|
}));
|
|
283
557
|
}
|
|
284
|
-
function
|
|
285
|
-
return Tool.define("
|
|
286
|
-
description: "
|
|
558
|
+
function createGetAgentResultsTool(runtime) {
|
|
559
|
+
return Tool.define("get_agent_results", {
|
|
560
|
+
description: "Retrieve completed results from one or more subagents. When no requested subagent is complete yet, waits up to the timeout and reports which IDs are still running.",
|
|
287
561
|
parameters: z.object({
|
|
288
|
-
ids: z.array(z.string()).min(1).describe("Subagent IDs to
|
|
562
|
+
ids: z.array(z.string()).min(1).describe("Subagent IDs to retrieve results for (from invoke_agent)"),
|
|
289
563
|
timeout_ms: z.number().optional().describe("Timeout in milliseconds (default: 60000, max: 600000)")
|
|
290
564
|
}),
|
|
291
565
|
execute: async (params) => {
|
|
292
|
-
const timeoutMs =
|
|
566
|
+
const timeoutMs = normalizeGetAgentResultsTimeoutMs(params.timeout_ms);
|
|
293
567
|
const existing = await Promise.all(
|
|
294
568
|
params.ids.map(async (id) => [id, await runtime.check(id)])
|
|
295
569
|
);
|
|
@@ -305,10 +579,10 @@ function createWaitAgentTool(runtime) {
|
|
|
305
579
|
const [id, record] = await Promise.race(checks);
|
|
306
580
|
if (record.status === "running") {
|
|
307
581
|
const runningIds = existing.filter(([, current]) => current?.status === "running").map(([currentId]) => currentId);
|
|
308
|
-
return
|
|
582
|
+
return formatGetAgentResultsTimeoutResult(timeoutMs, runningIds);
|
|
309
583
|
}
|
|
310
584
|
if (record.status === "completed") {
|
|
311
|
-
return
|
|
585
|
+
return formatGetAgentResultsResult(
|
|
312
586
|
id,
|
|
313
587
|
record.targetType,
|
|
314
588
|
toCompletedResult(record)
|
|
@@ -316,7 +590,34 @@ function createWaitAgentTool(runtime) {
|
|
|
316
590
|
}
|
|
317
591
|
return formatTerminalFailure(record);
|
|
318
592
|
} catch (error) {
|
|
319
|
-
return
|
|
593
|
+
return formatGetAgentResultsErrorResult(error);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
function createInspectAgentTool(runtime) {
|
|
599
|
+
return Tool.define("inspect_agent", {
|
|
600
|
+
description: "Inspect a running or completed subagent without blocking for the full result. Use this for progress checks, current status, recent activity, and tool progress. If the subagent is complete and you need the full result, call get_agent_results.",
|
|
601
|
+
capabilities: {
|
|
602
|
+
parallelSafe: true,
|
|
603
|
+
readOnly: true,
|
|
604
|
+
riskLevel: "safe"
|
|
605
|
+
},
|
|
606
|
+
parameters: z.object({
|
|
607
|
+
id: z.string().describe("Subagent ID returned by invoke_agent."),
|
|
608
|
+
recent_events: z.number().optional().describe(
|
|
609
|
+
`Recent activity rows to include (default ${DEFAULT_INSPECT_AGENT_RECENT_EVENTS}, max ${MAX_INSPECT_AGENT_RECENT_EVENTS}).`
|
|
610
|
+
)
|
|
611
|
+
}),
|
|
612
|
+
execute: async (params) => {
|
|
613
|
+
try {
|
|
614
|
+
return await inspectDispatch({
|
|
615
|
+
runtime,
|
|
616
|
+
id: params.id,
|
|
617
|
+
recentEvents: normalizeInspectRecentEvents(params.recent_events)
|
|
618
|
+
});
|
|
619
|
+
} catch (error) {
|
|
620
|
+
return formatGetAgentResultsErrorResult(error);
|
|
320
621
|
}
|
|
321
622
|
}
|
|
322
623
|
});
|
|
@@ -362,7 +663,8 @@ function createSubAgentTools(parent, options) {
|
|
|
362
663
|
];
|
|
363
664
|
if (options.async) {
|
|
364
665
|
tools2.push(
|
|
365
|
-
|
|
666
|
+
createGetAgentResultsTool(childRuntime),
|
|
667
|
+
createInspectAgentTool(childRuntime),
|
|
366
668
|
createCloseAgentTool(childRuntime)
|
|
367
669
|
);
|
|
368
670
|
}
|
|
@@ -373,7 +675,11 @@ function createSubAgentTools(parent, options) {
|
|
|
373
675
|
createInvokeAgentTool(runtime, options.roles, options)
|
|
374
676
|
];
|
|
375
677
|
if (options.async) {
|
|
376
|
-
tools.push(
|
|
678
|
+
tools.push(
|
|
679
|
+
createGetAgentResultsTool(runtime),
|
|
680
|
+
createInspectAgentTool(runtime),
|
|
681
|
+
createCloseAgentTool(runtime)
|
|
682
|
+
);
|
|
377
683
|
}
|
|
378
684
|
return tools;
|
|
379
685
|
}
|
|
@@ -869,16 +1175,17 @@ export {
|
|
|
869
1175
|
formatSyncSubAgentResult,
|
|
870
1176
|
formatSyncSubAgentErrorResult,
|
|
871
1177
|
formatAsyncSpawnedResult,
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
1178
|
+
formatGetAgentResultsResult,
|
|
1179
|
+
formatGetAgentResultsTimeoutResult,
|
|
1180
|
+
formatGetAgentResultsErrorResult,
|
|
875
1181
|
formatMissingAgentsResult,
|
|
876
1182
|
formatCloseMissingAgentResult,
|
|
877
1183
|
formatCloseAlreadyResolvedResult,
|
|
878
1184
|
formatCancelledAgentResult,
|
|
879
1185
|
SUBAGENT_TOOL_IDS,
|
|
880
1186
|
createInvokeAgentTool,
|
|
881
|
-
|
|
1187
|
+
createGetAgentResultsTool,
|
|
1188
|
+
createInspectAgentTool,
|
|
882
1189
|
createCloseAgentTool,
|
|
883
1190
|
createSubAgentTools,
|
|
884
1191
|
LOCAL_SUBAGENT_BACKEND,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-STDJYXYK.js";
|
|
5
5
|
import {
|
|
6
6
|
executeAgentToolCall
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-S2L4AJ72.js";
|
|
8
8
|
import {
|
|
9
9
|
snapshotScope
|
|
10
10
|
} from "./chunk-AHDCR7SX.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-CNM6OROH.js";
|
|
18
18
|
import {
|
|
19
19
|
formatApprovalDeniedReason
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FFSB7RFD.js";
|
|
21
21
|
|
|
22
22
|
// src/inference/toolset.ts
|
|
23
23
|
import {
|
package/dist/execution/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
processStepStream,
|
|
15
15
|
runModelStep,
|
|
16
16
|
runToolBatch
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-2W7IUHNV.js";
|
|
18
18
|
import {
|
|
19
19
|
applyAgentWorkflowCommitResult,
|
|
20
20
|
applyAgentWorkflowContextCompactionResult,
|
|
@@ -46,9 +46,9 @@ import "../chunk-DYZGHHDB.js";
|
|
|
46
46
|
import "../chunk-CGP6UNCQ.js";
|
|
47
47
|
import {
|
|
48
48
|
convertAgentMessagesToModelMessages
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-KE7A7V7F.js";
|
|
50
50
|
import "../chunk-STDJYXYK.js";
|
|
51
|
-
import "../chunk-
|
|
51
|
+
import "../chunk-S2L4AJ72.js";
|
|
52
52
|
import {
|
|
53
53
|
currentScope,
|
|
54
54
|
restoreScope,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
import "../chunk-W6LWIMIX.js";
|
|
59
59
|
import "../chunk-CNM6OROH.js";
|
|
60
60
|
import "../chunk-I6PKJ7XQ.js";
|
|
61
|
-
import "../chunk-
|
|
61
|
+
import "../chunk-FFSB7RFD.js";
|
|
62
62
|
import "../chunk-FII65CN7.js";
|
|
63
63
|
import "../chunk-S6AKEPAX.js";
|
|
64
64
|
export {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
processStepStream,
|
|
12
12
|
runModelStep,
|
|
13
13
|
runToolBatch
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-2W7IUHNV.js";
|
|
15
15
|
import {
|
|
16
16
|
AgentTurnStateConflictError,
|
|
17
17
|
advanceAgentTurnState,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
} from "../../chunk-E66PKKDL.js";
|
|
23
23
|
import "../../chunk-DYZGHHDB.js";
|
|
24
24
|
import "../../chunk-CGP6UNCQ.js";
|
|
25
|
-
import "../../chunk-
|
|
25
|
+
import "../../chunk-KE7A7V7F.js";
|
|
26
26
|
import "../../chunk-STDJYXYK.js";
|
|
27
|
-
import "../../chunk-
|
|
27
|
+
import "../../chunk-S2L4AJ72.js";
|
|
28
28
|
import "../../chunk-AHDCR7SX.js";
|
|
29
29
|
import "../../chunk-W6LWIMIX.js";
|
|
30
30
|
import "../../chunk-CNM6OROH.js";
|
|
31
31
|
import "../../chunk-I6PKJ7XQ.js";
|
|
32
|
-
import "../../chunk-
|
|
32
|
+
import "../../chunk-FFSB7RFD.js";
|
|
33
33
|
import "../../chunk-FII65CN7.js";
|
|
34
34
|
import "../../chunk-S6AKEPAX.js";
|
|
35
35
|
export {
|
package/dist/index.js
CHANGED
|
@@ -12,22 +12,23 @@ import {
|
|
|
12
12
|
clearInstalledSubAgents,
|
|
13
13
|
configureSubAgents,
|
|
14
14
|
createCloseAgentTool,
|
|
15
|
+
createGetAgentResultsTool,
|
|
16
|
+
createInspectAgentTool,
|
|
15
17
|
createInvokeAgentTool,
|
|
16
18
|
createSubAgentTools,
|
|
17
|
-
createWaitAgentTool,
|
|
18
19
|
discoverSubAgentRoles,
|
|
19
20
|
formatAsyncSpawnedResult,
|
|
20
21
|
formatCancelledAgentResult,
|
|
21
22
|
formatCloseAlreadyResolvedResult,
|
|
22
23
|
formatCloseMissingAgentResult,
|
|
24
|
+
formatGetAgentResultsErrorResult,
|
|
25
|
+
formatGetAgentResultsResult,
|
|
26
|
+
formatGetAgentResultsTimeoutResult,
|
|
23
27
|
formatInvalidAgentTypeResult,
|
|
24
28
|
formatMissingAgentsResult,
|
|
25
29
|
formatSpawnBlockedResult,
|
|
26
30
|
formatSyncSubAgentErrorResult,
|
|
27
31
|
formatSyncSubAgentResult,
|
|
28
|
-
formatWaitErrorResult,
|
|
29
|
-
formatWaitResult,
|
|
30
|
-
formatWaitTimeoutResult,
|
|
31
32
|
getConfiguredSubAgents,
|
|
32
33
|
getInstalledSubAgentBackend,
|
|
33
34
|
getProjectSubAgentRolesDir,
|
|
@@ -39,7 +40,7 @@ import {
|
|
|
39
40
|
parseSubAgentRoleFrontmatter,
|
|
40
41
|
parseSubAgentToolSpec,
|
|
41
42
|
toSubAgentRole
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-K5WUYL2H.js";
|
|
43
44
|
import {
|
|
44
45
|
InMemoryMailboxStore,
|
|
45
46
|
InMemoryTaskBoardStore,
|
|
@@ -83,7 +84,7 @@ import {
|
|
|
83
84
|
isApprovalMiddleware,
|
|
84
85
|
otelMiddleware,
|
|
85
86
|
promptCacheMiddleware
|
|
86
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-3LSEB7W6.js";
|
|
87
88
|
import {
|
|
88
89
|
LayeredSettings,
|
|
89
90
|
NullSettings,
|
|
@@ -164,6 +165,61 @@ import "./chunk-VOUEJSW6.js";
|
|
|
164
165
|
import {
|
|
165
166
|
assembleModelContext
|
|
166
167
|
} from "./chunk-TYQWH6XH.js";
|
|
168
|
+
import {
|
|
169
|
+
InMemoryDispatchEventStore,
|
|
170
|
+
createCompositeDispatchTaskExecutor,
|
|
171
|
+
createDispatchExternalTaskControl,
|
|
172
|
+
createDispatchTaskExecutor,
|
|
173
|
+
createRuntimeDispatchExecutor,
|
|
174
|
+
createRuntimeDispatchTargets,
|
|
175
|
+
ensureNonEmpty,
|
|
176
|
+
mergeInspection
|
|
177
|
+
} from "./chunk-2BRLPF3Z.js";
|
|
178
|
+
import {
|
|
179
|
+
DEFAULT_DISPATCH_TOOL_IDS,
|
|
180
|
+
DEFAULT_LOCAL_DISPATCH_CONCURRENCY,
|
|
181
|
+
DEFAULT_LOCAL_DISPATCH_DEPTH,
|
|
182
|
+
DEFAULT_LOCAL_DISPATCH_TITLE_PREFIX,
|
|
183
|
+
DISPATCH_STATES,
|
|
184
|
+
createDispatchTools,
|
|
185
|
+
createLocalDispatchRuntime,
|
|
186
|
+
createSubAgentRunSession,
|
|
187
|
+
ensureSessionLoaded,
|
|
188
|
+
getVisibleSessionMessages,
|
|
189
|
+
repairOrphanedToolCalls
|
|
190
|
+
} from "./chunk-ZETYNQ35.js";
|
|
191
|
+
import {
|
|
192
|
+
InMemorySessionStore,
|
|
193
|
+
LocalSessionTurnLock,
|
|
194
|
+
SESSION_FORMAT_VERSION,
|
|
195
|
+
SessionManager,
|
|
196
|
+
buildEntryPath,
|
|
197
|
+
buildMessagesFromEntries,
|
|
198
|
+
buildRecentMessagesFromEntries,
|
|
199
|
+
buildRecentMessagesFromEntryMap,
|
|
200
|
+
configureDefaultSessionManager,
|
|
201
|
+
createMessageEntry,
|
|
202
|
+
createMetadataEntry,
|
|
203
|
+
deserializeMessage,
|
|
204
|
+
extractSessionInfo,
|
|
205
|
+
generateEntryId,
|
|
206
|
+
getDefaultSessionManager,
|
|
207
|
+
getLeafId,
|
|
208
|
+
parseJSONL,
|
|
209
|
+
serializeMessage,
|
|
210
|
+
toJSONL,
|
|
211
|
+
toJSONLBatch
|
|
212
|
+
} from "./chunk-EDKZOPUV.js";
|
|
213
|
+
import {
|
|
214
|
+
sleep
|
|
215
|
+
} from "./chunk-SZ2XBPTW.js";
|
|
216
|
+
import {
|
|
217
|
+
MAX_BYTES,
|
|
218
|
+
MAX_LINES,
|
|
219
|
+
Tool,
|
|
220
|
+
normalizeToolReplayPolicy,
|
|
221
|
+
truncateOutput
|
|
222
|
+
} from "./chunk-MJML3A2F.js";
|
|
167
223
|
import "./chunk-3NBTQHVV.js";
|
|
168
224
|
import {
|
|
169
225
|
createEventBus
|
|
@@ -188,7 +244,7 @@ import {
|
|
|
188
244
|
processStepStream,
|
|
189
245
|
runModelStep,
|
|
190
246
|
runToolBatch
|
|
191
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-2W7IUHNV.js";
|
|
192
248
|
import {
|
|
193
249
|
applyAgentWorkflowCommitResult,
|
|
194
250
|
applyAgentWorkflowContextCompactionResult,
|
|
@@ -248,61 +304,6 @@ import {
|
|
|
248
304
|
shouldFallbackOnSummaryFailure,
|
|
249
305
|
shouldPruneContext
|
|
250
306
|
} from "./chunk-DYZGHHDB.js";
|
|
251
|
-
import {
|
|
252
|
-
InMemoryDispatchEventStore,
|
|
253
|
-
createCompositeDispatchTaskExecutor,
|
|
254
|
-
createDispatchExternalTaskControl,
|
|
255
|
-
createDispatchTaskExecutor,
|
|
256
|
-
createRuntimeDispatchExecutor,
|
|
257
|
-
createRuntimeDispatchTargets,
|
|
258
|
-
ensureNonEmpty,
|
|
259
|
-
mergeInspection
|
|
260
|
-
} from "./chunk-2BRLPF3Z.js";
|
|
261
|
-
import {
|
|
262
|
-
DEFAULT_DISPATCH_TOOL_IDS,
|
|
263
|
-
DEFAULT_LOCAL_DISPATCH_CONCURRENCY,
|
|
264
|
-
DEFAULT_LOCAL_DISPATCH_DEPTH,
|
|
265
|
-
DEFAULT_LOCAL_DISPATCH_TITLE_PREFIX,
|
|
266
|
-
DISPATCH_STATES,
|
|
267
|
-
createDispatchTools,
|
|
268
|
-
createLocalDispatchRuntime,
|
|
269
|
-
createSubAgentRunSession,
|
|
270
|
-
ensureSessionLoaded,
|
|
271
|
-
getVisibleSessionMessages,
|
|
272
|
-
repairOrphanedToolCalls
|
|
273
|
-
} from "./chunk-ZETYNQ35.js";
|
|
274
|
-
import {
|
|
275
|
-
InMemorySessionStore,
|
|
276
|
-
LocalSessionTurnLock,
|
|
277
|
-
SESSION_FORMAT_VERSION,
|
|
278
|
-
SessionManager,
|
|
279
|
-
buildEntryPath,
|
|
280
|
-
buildMessagesFromEntries,
|
|
281
|
-
buildRecentMessagesFromEntries,
|
|
282
|
-
buildRecentMessagesFromEntryMap,
|
|
283
|
-
configureDefaultSessionManager,
|
|
284
|
-
createMessageEntry,
|
|
285
|
-
createMetadataEntry,
|
|
286
|
-
deserializeMessage,
|
|
287
|
-
extractSessionInfo,
|
|
288
|
-
generateEntryId,
|
|
289
|
-
getDefaultSessionManager,
|
|
290
|
-
getLeafId,
|
|
291
|
-
parseJSONL,
|
|
292
|
-
serializeMessage,
|
|
293
|
-
toJSONL,
|
|
294
|
-
toJSONLBatch
|
|
295
|
-
} from "./chunk-EDKZOPUV.js";
|
|
296
|
-
import {
|
|
297
|
-
sleep
|
|
298
|
-
} from "./chunk-SZ2XBPTW.js";
|
|
299
|
-
import {
|
|
300
|
-
MAX_BYTES,
|
|
301
|
-
MAX_LINES,
|
|
302
|
-
Tool,
|
|
303
|
-
normalizeToolReplayPolicy,
|
|
304
|
-
truncateOutput
|
|
305
|
-
} from "./chunk-MJML3A2F.js";
|
|
306
307
|
import {
|
|
307
308
|
AGENT_CONTEXT_FRAGMENT_CLOSE,
|
|
308
309
|
AGENT_CONTEXT_FRAGMENT_OPEN,
|
|
@@ -336,7 +337,7 @@ import {
|
|
|
336
337
|
streamOnce,
|
|
337
338
|
streamStep,
|
|
338
339
|
withRetry
|
|
339
|
-
} from "./chunk-
|
|
340
|
+
} from "./chunk-KE7A7V7F.js";
|
|
340
341
|
import {
|
|
341
342
|
LLMError,
|
|
342
343
|
getErrorCategory,
|
|
@@ -349,7 +350,7 @@ import {
|
|
|
349
350
|
executeAgentToolCall,
|
|
350
351
|
extractFilePathsFromArgs,
|
|
351
352
|
shouldCaptureBaseline
|
|
352
|
-
} from "./chunk-
|
|
353
|
+
} from "./chunk-S2L4AJ72.js";
|
|
353
354
|
import {
|
|
354
355
|
currentScope,
|
|
355
356
|
restoreScope,
|
|
@@ -433,7 +434,7 @@ import {
|
|
|
433
434
|
normalizeRememberScopes,
|
|
434
435
|
selectRememberScope,
|
|
435
436
|
shouldCascadeApprovalDecision
|
|
436
|
-
} from "./chunk-
|
|
437
|
+
} from "./chunk-FFSB7RFD.js";
|
|
437
438
|
import {
|
|
438
439
|
describeApprovalOperation,
|
|
439
440
|
extractApprovalPatterns,
|
|
@@ -4420,12 +4421,14 @@ export {
|
|
|
4420
4421
|
createEventBus,
|
|
4421
4422
|
createEventPrinter,
|
|
4422
4423
|
createFileLogger,
|
|
4424
|
+
createGetAgentResultsTool,
|
|
4423
4425
|
createHeadlessDenyApprovalPolicy,
|
|
4424
4426
|
createHumanInputController,
|
|
4425
4427
|
createHumanInputHandler,
|
|
4426
4428
|
createHumanInputTool,
|
|
4427
4429
|
createHumanInputToolWithController,
|
|
4428
4430
|
createHumanInputToolWithHandler,
|
|
4431
|
+
createInspectAgentTool,
|
|
4429
4432
|
createInteractiveApprovalPolicy,
|
|
4430
4433
|
createInvokeAgentTool,
|
|
4431
4434
|
createLocalDispatchRuntime,
|
|
@@ -4455,7 +4458,6 @@ export {
|
|
|
4455
4458
|
createToolVisibilityMatcher,
|
|
4456
4459
|
createTrustedSessionApprovalPolicy,
|
|
4457
4460
|
createTurnTracker,
|
|
4458
|
-
createWaitAgentTool,
|
|
4459
4461
|
currentScope,
|
|
4460
4462
|
decideContextCompaction,
|
|
4461
4463
|
defaultAgentTaskCheckpointStrategy,
|
|
@@ -4500,6 +4502,9 @@ export {
|
|
|
4500
4502
|
formatCoordinatorTaskNotifications,
|
|
4501
4503
|
formatCoordinatorWorkerReports,
|
|
4502
4504
|
formatEnvironment,
|
|
4505
|
+
formatGetAgentResultsErrorResult,
|
|
4506
|
+
formatGetAgentResultsResult,
|
|
4507
|
+
formatGetAgentResultsTimeoutResult,
|
|
4503
4508
|
formatInstructions,
|
|
4504
4509
|
formatInvalidAgentTypeResult,
|
|
4505
4510
|
formatMemoryContextFragment,
|
|
@@ -4507,9 +4512,6 @@ export {
|
|
|
4507
4512
|
formatSpawnBlockedResult,
|
|
4508
4513
|
formatSyncSubAgentErrorResult,
|
|
4509
4514
|
formatSyncSubAgentResult,
|
|
4510
|
-
formatWaitErrorResult,
|
|
4511
|
-
formatWaitResult,
|
|
4512
|
-
formatWaitTimeoutResult,
|
|
4513
4515
|
gatherEnvironment,
|
|
4514
4516
|
generateEntryId,
|
|
4515
4517
|
generateSplitTurnSummary,
|
package/dist/inference/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
streamOnce,
|
|
15
15
|
streamStep,
|
|
16
16
|
withRetry
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-KE7A7V7F.js";
|
|
18
18
|
import {
|
|
19
19
|
LLMError,
|
|
20
20
|
getErrorCategory,
|
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
isRetryableCategory,
|
|
24
24
|
parseRetryDelay
|
|
25
25
|
} from "../chunk-STDJYXYK.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-S2L4AJ72.js";
|
|
27
27
|
import "../chunk-AHDCR7SX.js";
|
|
28
28
|
import "../chunk-W6LWIMIX.js";
|
|
29
29
|
import "../chunk-CNM6OROH.js";
|
|
30
30
|
import "../chunk-I6PKJ7XQ.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-FFSB7RFD.js";
|
|
32
32
|
import "../chunk-FII65CN7.js";
|
|
33
33
|
import "../chunk-S6AKEPAX.js";
|
|
34
34
|
export {
|
package/dist/middleware/index.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
isApprovalMiddleware,
|
|
6
6
|
otelMiddleware,
|
|
7
7
|
promptCacheMiddleware
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-3LSEB7W6.js";
|
|
9
9
|
import {
|
|
10
10
|
isBlockedModelCall
|
|
11
11
|
} from "../chunk-W6LWIMIX.js";
|
|
12
12
|
import "../chunk-I6PKJ7XQ.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-FFSB7RFD.js";
|
|
14
14
|
import "../chunk-FII65CN7.js";
|
|
15
15
|
import "../chunk-S6AKEPAX.js";
|
|
16
16
|
export {
|
package/dist/safety/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"risk.d.ts","sourceRoot":"","sources":["../../src/safety/risk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"risk.d.ts","sourceRoot":"","sources":["../../src/safety/risk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA2B5C;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;AACvC,0DAA0D;AAC1D,YAAY,CAAC,EAAE,SAAS,GACvB,SAAS,CAWX"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type { SubAgentCompletedResult, SubAgentConfig, SubAgentRole, SubAgentToolsOptions, } from "./types.js";
|
|
2
2
|
export { DEFAULT_SUBAGENT_CONCURRENCY, DEFAULT_SUBAGENT_DEPTH, DEFAULT_SUBAGENT_SESSION_PREFIX, } from "./types.js";
|
|
3
3
|
export { createSubAgentTools } from "./tools.js";
|
|
4
|
-
export { createCloseAgentTool, createInvokeAgentTool,
|
|
5
|
-
export { formatAsyncSpawnedResult, formatCancelledAgentResult, formatCloseAlreadyResolvedResult, formatCloseMissingAgentResult, formatInvalidAgentTypeResult, formatMissingAgentsResult, formatSpawnBlockedResult, formatSyncSubAgentErrorResult, formatSyncSubAgentResult,
|
|
4
|
+
export { createCloseAgentTool, createInspectAgentTool, createInvokeAgentTool, createGetAgentResultsTool, SUBAGENT_TOOL_IDS, } from "./tool-factories.js";
|
|
5
|
+
export { formatAsyncSpawnedResult, formatCancelledAgentResult, formatCloseAlreadyResolvedResult, formatCloseMissingAgentResult, formatInvalidAgentTypeResult, formatMissingAgentsResult, formatSpawnBlockedResult, formatSyncSubAgentErrorResult, formatSyncSubAgentResult, formatGetAgentResultsErrorResult, formatGetAgentResultsResult, formatGetAgentResultsTimeoutResult, } from "./results.js";
|
|
6
6
|
export { clearInstalledSubAgents, configureSubAgents, getConfiguredSubAgents, getInstalledSubAgentBackend, installLocalSubAgents, installSubAgentTools, LOCAL_SUBAGENT_BACKEND, } from "./installation.js";
|
|
7
7
|
export * from "./roles/index.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/subagents/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,+BAA+B,GAChC,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/subagents/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,+BAA+B,GAChC,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gCAAgC,EAChC,6BAA6B,EAC7B,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,gCAAgC,EAChC,2BAA2B,EAC3B,kCAAkC,GACnC,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
package/dist/subagents/index.js
CHANGED
|
@@ -7,22 +7,23 @@ import {
|
|
|
7
7
|
clearInstalledSubAgents,
|
|
8
8
|
configureSubAgents,
|
|
9
9
|
createCloseAgentTool,
|
|
10
|
+
createGetAgentResultsTool,
|
|
11
|
+
createInspectAgentTool,
|
|
10
12
|
createInvokeAgentTool,
|
|
11
13
|
createSubAgentTools,
|
|
12
|
-
createWaitAgentTool,
|
|
13
14
|
discoverSubAgentRoles,
|
|
14
15
|
formatAsyncSpawnedResult,
|
|
15
16
|
formatCancelledAgentResult,
|
|
16
17
|
formatCloseAlreadyResolvedResult,
|
|
17
18
|
formatCloseMissingAgentResult,
|
|
19
|
+
formatGetAgentResultsErrorResult,
|
|
20
|
+
formatGetAgentResultsResult,
|
|
21
|
+
formatGetAgentResultsTimeoutResult,
|
|
18
22
|
formatInvalidAgentTypeResult,
|
|
19
23
|
formatMissingAgentsResult,
|
|
20
24
|
formatSpawnBlockedResult,
|
|
21
25
|
formatSyncSubAgentErrorResult,
|
|
22
26
|
formatSyncSubAgentResult,
|
|
23
|
-
formatWaitErrorResult,
|
|
24
|
-
formatWaitResult,
|
|
25
|
-
formatWaitTimeoutResult,
|
|
26
27
|
getConfiguredSubAgents,
|
|
27
28
|
getInstalledSubAgentBackend,
|
|
28
29
|
getProjectSubAgentRolesDir,
|
|
@@ -34,7 +35,7 @@ import {
|
|
|
34
35
|
parseSubAgentRoleFrontmatter,
|
|
35
36
|
parseSubAgentToolSpec,
|
|
36
37
|
toSubAgentRole
|
|
37
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-K5WUYL2H.js";
|
|
38
39
|
import "../chunk-TPZ37IWI.js";
|
|
39
40
|
import "../chunk-ZETYNQ35.js";
|
|
40
41
|
import "../chunk-EDKZOPUV.js";
|
|
@@ -49,22 +50,23 @@ export {
|
|
|
49
50
|
clearInstalledSubAgents,
|
|
50
51
|
configureSubAgents,
|
|
51
52
|
createCloseAgentTool,
|
|
53
|
+
createGetAgentResultsTool,
|
|
54
|
+
createInspectAgentTool,
|
|
52
55
|
createInvokeAgentTool,
|
|
53
56
|
createSubAgentTools,
|
|
54
|
-
createWaitAgentTool,
|
|
55
57
|
discoverSubAgentRoles,
|
|
56
58
|
formatAsyncSpawnedResult,
|
|
57
59
|
formatCancelledAgentResult,
|
|
58
60
|
formatCloseAlreadyResolvedResult,
|
|
59
61
|
formatCloseMissingAgentResult,
|
|
62
|
+
formatGetAgentResultsErrorResult,
|
|
63
|
+
formatGetAgentResultsResult,
|
|
64
|
+
formatGetAgentResultsTimeoutResult,
|
|
60
65
|
formatInvalidAgentTypeResult,
|
|
61
66
|
formatMissingAgentsResult,
|
|
62
67
|
formatSpawnBlockedResult,
|
|
63
68
|
formatSyncSubAgentErrorResult,
|
|
64
69
|
formatSyncSubAgentResult,
|
|
65
|
-
formatWaitErrorResult,
|
|
66
|
-
formatWaitResult,
|
|
67
|
-
formatWaitTimeoutResult,
|
|
68
70
|
getConfiguredSubAgents,
|
|
69
71
|
getInstalledSubAgentBackend,
|
|
70
72
|
getProjectSubAgentRolesDir,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DispatchRuntime } from "../dispatch/types.js";
|
|
2
|
+
import type { Tool } from "../tool/tool.js";
|
|
3
|
+
export declare const DEFAULT_INSPECT_AGENT_RECENT_EVENTS = 5;
|
|
4
|
+
export declare const MAX_INSPECT_AGENT_RECENT_EVENTS = 20;
|
|
5
|
+
export declare function normalizeInspectRecentEvents(value: number | undefined): number;
|
|
6
|
+
export declare function inspectDispatch(options: {
|
|
7
|
+
runtime: DispatchRuntime;
|
|
8
|
+
id: string;
|
|
9
|
+
recentEvents: number;
|
|
10
|
+
}): Promise<Tool.ExecuteResult>;
|
|
11
|
+
//# sourceMappingURL=inspection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../src/subagents/inspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAM5C,eAAO,MAAM,mCAAmC,IAAI,CAAC;AACrD,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAQlD,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,CAMR;AAuPD,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAC7C,OAAO,EAAE,eAAe,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAyB9B"}
|
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
import type { Tool } from "../tool/tool.js";
|
|
2
2
|
import type { SubAgentCompletedResult } from "./types.js";
|
|
3
|
+
export interface SubAgentInspectionResult {
|
|
4
|
+
id: string;
|
|
5
|
+
status: string;
|
|
6
|
+
role?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
sessionId?: string;
|
|
9
|
+
createdAt?: string;
|
|
10
|
+
updatedAt?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
latestStatus?: string;
|
|
13
|
+
eventCount: number;
|
|
14
|
+
startedToolCounts: Record<string, number>;
|
|
15
|
+
completedToolCounts: Record<string, number>;
|
|
16
|
+
activeTools: Array<{
|
|
17
|
+
inputSummary?: string;
|
|
18
|
+
startedAt: string;
|
|
19
|
+
toolCallId: string;
|
|
20
|
+
toolName: string;
|
|
21
|
+
}>;
|
|
22
|
+
recentActivity: string[];
|
|
23
|
+
hasResult: boolean;
|
|
24
|
+
resultLength?: number;
|
|
25
|
+
resultPreview?: string;
|
|
26
|
+
}
|
|
3
27
|
export declare function formatInvalidAgentTypeResult(roleName: string, validNames: string[]): Tool.ExecuteResult;
|
|
4
28
|
export declare function formatSpawnBlockedResult(message: string): Tool.ExecuteResult;
|
|
5
29
|
export declare function formatSyncSubAgentResult(roleName: string, result: SubAgentCompletedResult): Tool.ExecuteResult;
|
|
6
30
|
export declare function formatSyncSubAgentErrorResult(roleName: string, error: unknown): Tool.ExecuteResult;
|
|
7
31
|
export declare function formatAsyncSpawnedResult(agentId: string, roleName: string, sessionId?: string): Tool.ExecuteResult;
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
32
|
+
export declare function formatGetAgentResultsResult(agentId: string, roleName: string, result: SubAgentCompletedResult): Tool.ExecuteResult;
|
|
33
|
+
export declare function formatInspectMissingAgentResult(id: string): Tool.ExecuteResult;
|
|
34
|
+
export declare function formatInspectAgentResult(result: SubAgentInspectionResult): Tool.ExecuteResult;
|
|
35
|
+
export declare function formatGetAgentResultsTimeoutResult(timeoutMs: number, runningIds: string[]): Tool.ExecuteResult;
|
|
36
|
+
export declare function formatGetAgentResultsErrorResult(error: unknown): Tool.ExecuteResult;
|
|
11
37
|
export declare function formatMissingAgentsResult(ids: string[]): Tool.ExecuteResult;
|
|
12
38
|
export declare function formatCloseMissingAgentResult(id: string): Tool.ExecuteResult;
|
|
13
39
|
export declare function formatCloseAlreadyResolvedResult(id: string, state: string): Tool.ExecuteResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../src/subagents/results.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../src/subagents/results.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,WAAW,EAAE,KAAK,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAwCD,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAAE,GACnB,IAAI,CAAC,aAAa,CAQpB;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC,aAAa,CAM5E;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,uBAAuB,GAC9B,IAAI,CAAC,aAAa,CAepB;AAED,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,GACb,IAAI,CAAC,aAAa,CASpB;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CAAC,aAAa,CAWpB;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,uBAAuB,GAC9B,IAAI,CAAC,aAAa,CAgBpB;AAED,wBAAgB,+BAA+B,CAC7C,EAAE,EAAE,MAAM,GACT,IAAI,CAAC,aAAa,CAMpB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,IAAI,CAAC,aAAa,CAkDpB;AAED,wBAAgB,kCAAkC,CAChD,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAAE,GACnB,IAAI,CAAC,aAAa,CAWpB;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,OAAO,GACb,IAAI,CAAC,aAAa,CAMpB;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAM3E;AAED,wBAAgB,6BAA6B,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC,aAAa,CAM5E;AAED,wBAAgB,gCAAgC,CAC9C,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,GACZ,IAAI,CAAC,aAAa,CAMpB;AAED,wBAAgB,0BAA0B,CACxC,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,GACf,IAAI,CAAC,aAAa,CAMpB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { DispatchRuntime } from "../dispatch/types.js";
|
|
2
2
|
import { Tool } from "../tool/tool.js";
|
|
3
3
|
import type { SubAgentRole } from "./types.js";
|
|
4
|
-
export declare const SUBAGENT_TOOL_IDS: readonly ["invoke_agent", "
|
|
4
|
+
export declare const SUBAGENT_TOOL_IDS: readonly ["invoke_agent", "get_agent_results", "inspect_agent", "close_agent"];
|
|
5
5
|
export declare function createInvokeAgentTool(runtime: DispatchRuntime, roles: readonly SubAgentRole[], options?: {
|
|
6
6
|
async?: boolean;
|
|
7
7
|
sessionTitlePrefix?: string;
|
|
8
8
|
}): Tool.AnyInfo;
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function createGetAgentResultsTool(runtime: DispatchRuntime): Tool.AnyInfo;
|
|
10
|
+
export declare function createInspectAgentTool(runtime: DispatchRuntime): Tool.AnyInfo;
|
|
10
11
|
export declare function createCloseAgentTool(runtime: DispatchRuntime): Tool.AnyInfo;
|
|
11
12
|
//# sourceMappingURL=tool-factories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-factories.d.ts","sourceRoot":"","sources":["../../src/subagents/tool-factories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,EAA2B,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-factories.d.ts","sourceRoot":"","sources":["../../src/subagents/tool-factories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,EAA2B,YAAY,EAAE,MAAM,YAAY,CAAC;AAuBxE,eAAO,MAAM,iBAAiB,gFAKpB,CAAC;AAyGX,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,OAAO,CAAC,EAAE;IACR,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,GACA,IAAI,CAAC,OAAO,CAyEd;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,eAAe,GACvB,IAAI,CAAC,OAAO,CAsDd;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC,OAAO,CAgC7E;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC,OAAO,CAuB3E"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Subagent tools.
|
|
3
3
|
*
|
|
4
|
-
* Provides `invoke_agent`, `
|
|
5
|
-
* local in-process dispatch runtime.
|
|
4
|
+
* Provides `invoke_agent`, `get_agent_results`, `inspect_agent`, and `close_agent`
|
|
5
|
+
* backed by the local in-process dispatch runtime.
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/subagents/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/subagents/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAUvD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,KAAK,EACb,OAAO,EAAE,oBAAoB,GAC5B,IAAI,CAAC,OAAO,EAAE,CA0ChB"}
|
package/dist/tool/index.js
CHANGED
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
} from "../chunk-MJML3A2F.js";
|
|
18
18
|
import {
|
|
19
19
|
executeAgentToolCall
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-S2L4AJ72.js";
|
|
21
21
|
import "../chunk-AHDCR7SX.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-FFSB7RFD.js";
|
|
23
23
|
import {
|
|
24
24
|
getRequiredToolHost,
|
|
25
25
|
resolveCapability
|