@ai-agent-forge/plugin-subagent-delegate 0.88.16 → 0.88.18
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/agent-forge.json +1 -1
- package/dist/delegate.d.ts.map +1 -1
- package/dist/delegate.js +31 -8
- package/dist/delegate.js.map +1 -1
- package/package.json +2 -2
- package/plugin.json +1 -1
package/dist/delegate.js
CHANGED
|
@@ -1078,7 +1078,7 @@ export function createCapability(api, options) {
|
|
|
1078
1078
|
"data and intermediate artifacts only — assignment and acceptance stay with the parent, which can audit " +
|
|
1079
1079
|
"this traffic.",
|
|
1080
1080
|
parameters: Type.Object({
|
|
1081
|
-
limit: Type.Optional(Type.
|
|
1081
|
+
limit: Type.Optional(Type.Integer({ description: "Max messages to take (1..20, default 10)", minimum: 1, maximum: 20 })),
|
|
1082
1082
|
}),
|
|
1083
1083
|
execute: async (first, second) => {
|
|
1084
1084
|
const input = objectInput(first, second, 'subagent_message type "inbox"');
|
|
@@ -1114,7 +1114,12 @@ export function createCapability(api, options) {
|
|
|
1114
1114
|
].join("; ") +
|
|
1115
1115
|
"; task assignment and result acceptance stay with the parent agent, which can audit sibling traffic.",
|
|
1116
1116
|
parameters: Type.Object({
|
|
1117
|
-
type: Type.Union(messageOps.map((op) => Type.Literal(op)), {
|
|
1117
|
+
type: Type.Union(messageOps.map((op) => Type.Literal(op)), {
|
|
1118
|
+
description: `Operation: ${messageOps.join(" | ")}. Per-operation contract: ` +
|
|
1119
|
+
'"escalate" needs non-empty text; "send" needs to and non-empty text; ' +
|
|
1120
|
+
'"inbox" takes only limit; "refuse" needs non-empty text. ' +
|
|
1121
|
+
"Parameters belonging to another operation are rejected",
|
|
1122
|
+
}),
|
|
1118
1123
|
...optionalParams(escalateSpec?.parameters.properties, sendSpec?.parameters.properties, inboxSpec?.parameters.properties,
|
|
1119
1124
|
// refuse 无条件创建,属性总是合入:type 进了 messageOps 而 schema 漏合
|
|
1120
1125
|
// = 模型被 schema 约束永远发不出该 type 的合法参数(教形状也救不回)。
|
|
@@ -1449,6 +1454,10 @@ export function createCapability(api, options) {
|
|
|
1449
1454
|
// 死线兜底(设计 §5.7):后台任务缺省 60 分钟死线,挂死任务到点被强制 timed_out。
|
|
1450
1455
|
" Background tasks carry a watchdog deadline by default (60 minutes; override per call with `deadlineMs`): " +
|
|
1451
1456
|
"a task still running when its deadline passes is force-settled timed_out." +
|
|
1457
|
+
// 前台 drain 预算与嵌套深度上限:两者都在长任务里会被真实撞到。
|
|
1458
|
+
" Foreground calls wait at most 10 minutes per task; a task still running then settles timed_out with reasonCode " +
|
|
1459
|
+
"subagent_drain_timeout — use background: true for longer work. Nested delegation is capped at depth 2: a subagent " +
|
|
1460
|
+
"already two levels deep cannot delegate further." +
|
|
1452
1461
|
(roles.size === 0
|
|
1453
1462
|
? ""
|
|
1454
1463
|
: ` Configured subagent roles (pass \`role\`): ${renderRoleMenu()}. A role's instructions frame every task in the call; ` +
|
|
@@ -2043,8 +2052,8 @@ export function createCapability(api, options) {
|
|
|
2043
2052
|
sessionId: Type.Optional(Type.String({
|
|
2044
2053
|
description: "Child session id (persisted transcript read; requires a host session reader)",
|
|
2045
2054
|
})),
|
|
2046
|
-
maxMessages: Type.Optional(Type.
|
|
2047
|
-
waitMs: Type.Optional(Type.
|
|
2055
|
+
maxMessages: Type.Optional(Type.Integer({ description: "Trailing entries to return (1..50, default 20)", minimum: 1, maximum: 50 })),
|
|
2056
|
+
waitMs: Type.Optional(Type.Integer({
|
|
2048
2057
|
description: "Bounded wait for a background task to settle, in ms (0..120000, default 0 = check once; " +
|
|
2049
2058
|
"unsettled tasks come back with knownTask/taskStatus instead of the transcript)",
|
|
2050
2059
|
minimum: 0,
|
|
@@ -2270,7 +2279,11 @@ export function createCapability(api, options) {
|
|
|
2270
2279
|
"size; tasks still in flight are marked active, settled ones carry their terminal status. Read-only. " +
|
|
2271
2280
|
'Use a listed sessionId with subagent_task type "result" or "resume".',
|
|
2272
2281
|
parameters: Type.Object({
|
|
2273
|
-
limit: Type.Optional(Type.
|
|
2282
|
+
limit: Type.Optional(Type.Integer({
|
|
2283
|
+
description: "Max entries to return (1..50, default 20)",
|
|
2284
|
+
minimum: 1,
|
|
2285
|
+
maximum: 50,
|
|
2286
|
+
})),
|
|
2274
2287
|
}),
|
|
2275
2288
|
execute: async (first, second) => {
|
|
2276
2289
|
const input = objectInput(first, second, 'subagent_task type "list"');
|
|
@@ -2324,12 +2337,22 @@ export function createCapability(api, options) {
|
|
|
2324
2337
|
].join("; ") +
|
|
2325
2338
|
". Task creation stays in subagent_run.",
|
|
2326
2339
|
parameters: Type.Object({
|
|
2327
|
-
type: Type.Union(taskOps.map((op) => Type.Literal(op)), {
|
|
2340
|
+
type: Type.Union(taskOps.map((op) => Type.Literal(op)), {
|
|
2341
|
+
description: `Operation: ${taskOps.join(" | ")}. Per-operation contract: ` +
|
|
2342
|
+
'"result" needs taskId or sessionId (optional maxMessages, waitMs); ' +
|
|
2343
|
+
'"cancel" needs taskId (optional reason); ' +
|
|
2344
|
+
'"steer" needs taskId and non-empty text; ' +
|
|
2345
|
+
'"resume" needs sessionId and prompt; ' +
|
|
2346
|
+
'"list" takes only limit. ' +
|
|
2347
|
+
"Parameters belonging to another operation are rejected, and a missing required parameter is an error",
|
|
2348
|
+
}),
|
|
2328
2349
|
...optionalParams(resultSpec.parameters.properties, cancelSpec.parameters.properties, steerSpec.parameters.properties, resumeSpec.parameters.properties, listSpec?.parameters.properties),
|
|
2329
2350
|
// Shared keys across operations: neutral descriptions instead of the
|
|
2330
2351
|
// last merged spec's operation-specific wording.
|
|
2331
|
-
taskId: Type.Optional(Type.String({
|
|
2332
|
-
|
|
2352
|
+
taskId: Type.Optional(Type.String({
|
|
2353
|
+
description: "Task id from subagent_run (required for result without sessionId, cancel, steer)",
|
|
2354
|
+
})),
|
|
2355
|
+
sessionId: Type.Optional(Type.String({ description: "Child session id (required for resume; alternative to taskId for result)" })),
|
|
2333
2356
|
}),
|
|
2334
2357
|
execute: async (first, second) => {
|
|
2335
2358
|
const input = objectInput(first, second, "subagent_task");
|