@deepseek-ai/dsh-experimental-tool-agent-team 0.1.6-alpha.1 → 0.1.7-alpha.1
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 +2 -2
- package/README.md +3 -3
- package/README.zh.md +3 -3
- package/lib/index.js +23 -24
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +28 -26
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/experimental/tool-agent-team/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: bfa3fc7f466d4b7f405231de3de4cf648fc690de
|
|
6
|
+
README.zh.md: 990e786fd69877af17cef339a696bb5e93d5925c
|
package/README.md
CHANGED
|
@@ -57,11 +57,11 @@ Try it by asking the Lead model: "create a teammate named reviewer to check the
|
|
|
57
57
|
The nine tools group into four capabilities:
|
|
58
58
|
|
|
59
59
|
- **Create a teammate** — `spawn_teammate` takes a name, a description, and the initial task; only the Lead can call it.
|
|
60
|
-
- **Send messages** — `send_message` steers a running member at its nearest step boundary, starts
|
|
61
|
-
- **See and wait** — `list_agents`
|
|
60
|
+
- **Send messages** — `send_message` steers a running member at its nearest step boundary, starts or resumes an inactive member.
|
|
61
|
+
- **See and wait** — `list_agents` returns each member’s `target` and availability; `wait_agent` waits for the next team change; `interrupt_agent` stops a teammate's current turn (Lead only).
|
|
62
62
|
- **Manage the task board** — `team_task_create`, `team_task_list`, `team_task_get`, and `team_task_update` add, browse, read, and update shared tasks.
|
|
63
63
|
|
|
64
|
-
Any member can message any other member and use the task board; only the Lead creates and interrupts teammates. Task updates keep the domain's owner and revision checks, so an outdated edit is rejected instead of overwriting newer work.
|
|
64
|
+
Creation and listing results identify members by `target`, with no member Session ID. Use that value in message and interrupt calls or the task tools’ `owner` parameter; task `ownerName` uses the same value. `inactive` means no turn is executing, whether the member is loaded or must be resumed; it does not describe task completion or outcome. `provisioning` and `failed` describe member creation. Any member can message any other member and use the task board; only the Lead creates and interrupts teammates. Task updates keep the domain's owner and revision checks, so an outdated edit is rejected instead of overwriting newer work.
|
|
65
65
|
|
|
66
66
|
### What success and failure look like
|
|
67
67
|
|
package/README.zh.md
CHANGED
|
@@ -57,11 +57,11 @@ kind: "package-reference"
|
|
|
57
57
|
九个工具分为四类能力:
|
|
58
58
|
|
|
59
59
|
- **创建 teammate**——`spawn_teammate` 接收名字、描述与初始任务;只有 Lead 可以调用它。
|
|
60
|
-
- **发送消息**——`send_message` 在最近的步骤边界对运行中的成员进行 steering
|
|
61
|
-
- **查看与等待**——`list_agents`
|
|
60
|
+
- **发送消息**——`send_message` 在最近的步骤边界对运行中的成员进行 steering(中途引导)、启动或恢复非活动成员。
|
|
61
|
+
- **查看与等待**——`list_agents` 返回各成员的 `target` 与可用状态;`wait_agent` 等待下一次团队变化;`interrupt_agent` 停止 teammate 的当前轮次(仅限 Lead)。
|
|
62
62
|
- **管理任务板**——`team_task_create`、`team_task_list`、`team_task_get` 与 `team_task_update` 添加、浏览、读取与更新共享任务。
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
创建和列表结果使用 `target` 标识成员,不包含成员 Session ID。可将该值用于消息和中断调用,或任务工具的 `owner` 参数;任务的 `ownerName` 使用相同值。`inactive` 表示没有轮次在执行,包括已加载和需要恢复的成员;它不表示任务完成或结果。`provisioning` 与 `failed` 描述成员创建状态。任何成员都可以给任何其他成员发消息并使用任务板;只有 Lead 可以创建与中断 teammate。任务更新保留领域的 owner 与 revision 校验,因此过期的编辑会被拒绝,而不是覆盖更新的成果。
|
|
65
65
|
|
|
66
66
|
### 成功与失败的表现
|
|
67
67
|
|
package/lib/index.js
CHANGED
|
@@ -24,11 +24,11 @@ The Team Lead and all teammates share the same working directory and filesystem.
|
|
|
24
24
|
|
|
25
25
|
Prefer read/edit/write for file changes. If a file operation returns FS_STALE_VERSION, read the current file, rebase your intended change onto the new content, and retry. Bash, formatters, code generators, and scripts are not fully protected by the filesystem version guard; coordinate them explicitly and have the Lead review the final diff and run tests.
|
|
26
26
|
|
|
27
|
-
send_message steers a running target at its nearest step boundary
|
|
27
|
+
Use the target returned by spawn_teammate or list_agents for send_message and interrupt_agent, or as owner when assigning or filtering shared tasks. send_message steers a running target at its nearest step boundary and starts or resumes an inactive target. inactive means no turn is executing; it does not describe task completion, success, failure, or waiting for other agents. provisioning means member creation is in progress; failed means member creation failed. A delivered peer item starts with its stable message id and sender name. A successful send is already durable even when its result says queued; do not resend it. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. Before wait_agent, use list_agents and make sure another required member is running or provisioning; use send_message first when the required member is inactive. wait_agent observes only changes after that call starts, never wakes a member, and returns noProgress immediately when no other member can produce a change. Re-list after wakeup or timeout. The Lead must wait for required teammates before giving the final answer.`;
|
|
28
28
|
const ACTIVE_WAIT_STATUSES = new Set(["running", "provisioning"]);
|
|
29
29
|
const NO_ACTIVE_PEER_MESSAGE = "No other Team member is running or provisioning. wait_agent cannot make progress or wake inactive teammates. Re-list with list_agents and team_task_list, then use send_message to wake each required inactive teammate before waiting again.";
|
|
30
30
|
/**
|
|
31
|
-
* One roster row
|
|
31
|
+
* One model-facing roster row. The Lead pseudo-row omits the
|
|
32
32
|
* teammate-only provisioning fields, so only identity, role, status, and
|
|
33
33
|
* diagnostics are required.
|
|
34
34
|
*/
|
|
@@ -36,11 +36,7 @@ const MEMBER_VIEW_SCHEMA = {
|
|
|
36
36
|
type: "object",
|
|
37
37
|
additionalProperties: false,
|
|
38
38
|
properties: {
|
|
39
|
-
|
|
40
|
-
type: "string",
|
|
41
|
-
required: true
|
|
42
|
-
},
|
|
43
|
-
name: {
|
|
39
|
+
target: {
|
|
44
40
|
type: "string",
|
|
45
41
|
required: true
|
|
46
42
|
},
|
|
@@ -54,7 +50,6 @@ const MEMBER_VIEW_SCHEMA = {
|
|
|
54
50
|
required: true,
|
|
55
51
|
enum: [
|
|
56
52
|
"running",
|
|
57
|
-
"idle",
|
|
58
53
|
"inactive",
|
|
59
54
|
"provisioning",
|
|
60
55
|
"failed"
|
|
@@ -74,6 +69,14 @@ const MEMBER_VIEW_SCHEMA = {
|
|
|
74
69
|
}
|
|
75
70
|
}
|
|
76
71
|
};
|
|
72
|
+
/** Expose the member name as its model-facing target. */
|
|
73
|
+
function modelMember(member) {
|
|
74
|
+
const { id: _id, name, ...details } = member;
|
|
75
|
+
return {
|
|
76
|
+
target: name,
|
|
77
|
+
...details
|
|
78
|
+
};
|
|
79
|
+
}
|
|
77
80
|
/** One shared task, matching the public `TeamTaskView`. */
|
|
78
81
|
const TASK_VIEW_SCHEMA = {
|
|
79
82
|
type: "object",
|
|
@@ -186,11 +189,7 @@ const INTERRUPT_VALUE_SCHEMA = {
|
|
|
186
189
|
properties: { previousStatus: {
|
|
187
190
|
type: "string",
|
|
188
191
|
required: true,
|
|
189
|
-
enum: [
|
|
190
|
-
"running",
|
|
191
|
-
"idle",
|
|
192
|
-
"inactive"
|
|
193
|
-
]
|
|
192
|
+
enum: ["running", "inactive"]
|
|
194
193
|
} }
|
|
195
194
|
};
|
|
196
195
|
const TASK_LIST_VALUE_SCHEMA = {
|
|
@@ -269,7 +268,7 @@ function install(agent, ctx, config) {
|
|
|
269
268
|
async execute(args, exec) {
|
|
270
269
|
const agent = callingAgent(exec.agent, "spawn_teammate");
|
|
271
270
|
const context = args.context ?? "fresh";
|
|
272
|
-
return await ctx.agentTeams.spawnTeammate(agent, {
|
|
271
|
+
return { member: modelMember((await ctx.agentTeams.spawnTeammate(agent, {
|
|
273
272
|
name: args.name,
|
|
274
273
|
description: args.description,
|
|
275
274
|
prompt: [{
|
|
@@ -282,17 +281,17 @@ function install(agent, ctx, config) {
|
|
|
282
281
|
context,
|
|
283
282
|
provider: context === "fork" ? config.forkProvider : config.freshProvider,
|
|
284
283
|
signal: exec.signal
|
|
285
|
-
});
|
|
284
|
+
})).member) };
|
|
286
285
|
}
|
|
287
286
|
})));
|
|
288
287
|
register(scoped.tools.register(defineTool({
|
|
289
288
|
name: "send_message",
|
|
290
|
-
description: "Send one durable message to another Team member. A running target receives it at the nearest step boundary; an
|
|
289
|
+
description: "Send one durable message to another Team member. A running target receives it at the nearest step boundary; an inactive target starts or resumes a turn.",
|
|
291
290
|
parameters: {
|
|
292
291
|
target: {
|
|
293
292
|
type: "string",
|
|
294
293
|
required: true,
|
|
295
|
-
description: "
|
|
294
|
+
description: "Member target returned by spawn_teammate or list_agents, including lead."
|
|
296
295
|
},
|
|
297
296
|
message: {
|
|
298
297
|
type: "string",
|
|
@@ -314,11 +313,11 @@ function install(agent, ctx, config) {
|
|
|
314
313
|
})));
|
|
315
314
|
register(scoped.tools.register(defineTool({
|
|
316
315
|
name: "list_agents",
|
|
317
|
-
description: "List the Lead and every durable teammate with current
|
|
316
|
+
description: "List the Lead and every durable teammate with an addressable target and current availability. inactive means no turn is executing, not a task result. provisioning and failed describe member creation.",
|
|
318
317
|
parameters: {},
|
|
319
318
|
output: jsonOutput(MEMBER_LIST_VALUE_SCHEMA),
|
|
320
|
-
|
|
321
|
-
return Promise.resolve(ctx.agentTeams.listMembers(callingAgent(exec.agent, "list_agents")));
|
|
319
|
+
execute(_args, exec) {
|
|
320
|
+
return Promise.resolve(ctx.agentTeams.listMembers(callingAgent(exec.agent, "list_agents")).map(modelMember));
|
|
322
321
|
}
|
|
323
322
|
})));
|
|
324
323
|
register(scoped.tools.register(defineTool({
|
|
@@ -349,10 +348,10 @@ function install(agent, ctx, config) {
|
|
|
349
348
|
parameters: { target: {
|
|
350
349
|
type: "string",
|
|
351
350
|
required: true,
|
|
352
|
-
description: "Teammate
|
|
351
|
+
description: "Teammate target returned by spawn_teammate or list_agents."
|
|
353
352
|
} },
|
|
354
353
|
output: jsonOutput(INTERRUPT_VALUE_SCHEMA),
|
|
355
|
-
|
|
354
|
+
execute(args, exec) {
|
|
356
355
|
return Promise.resolve(ctx.agentTeams.interrupt(callingAgent(exec.agent, "interrupt_agent"), args.target));
|
|
357
356
|
}
|
|
358
357
|
})));
|
|
@@ -406,7 +405,7 @@ function install(agent, ctx, config) {
|
|
|
406
405
|
},
|
|
407
406
|
owner: {
|
|
408
407
|
type: "string",
|
|
409
|
-
description: "Optional member
|
|
408
|
+
description: "Optional member target from spawn_teammate or list_agents, matching ownerName; use unowned for tasks without an owner."
|
|
410
409
|
},
|
|
411
410
|
ready: {
|
|
412
411
|
type: "boolean",
|
|
@@ -497,7 +496,7 @@ function install(agent, ctx, config) {
|
|
|
497
496
|
},
|
|
498
497
|
owner: {
|
|
499
498
|
type: "string",
|
|
500
|
-
description: "Member
|
|
499
|
+
description: "Member target from spawn_teammate or list_agents for Lead-only reassign; omit to unassign."
|
|
501
500
|
}
|
|
502
501
|
},
|
|
503
502
|
output: jsonOutput(TASK_VIEW_SCHEMA),
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-experimental-tool-agent-team",
|
|
3
3
|
"description": "Scoped model-facing Agent Teams tools over ctx.agentTeams",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,43 +18,45 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
+
"./locale/*.json": "./locale/*.json",
|
|
21
22
|
"./src/*": "./src/*",
|
|
22
23
|
"./package.json": "./package.json"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
26
|
+
"locale/*.json",
|
|
25
27
|
"lib/index.js",
|
|
26
28
|
"lib/types/**/*.d.ts"
|
|
27
29
|
],
|
|
28
30
|
"license": "MIT",
|
|
29
31
|
"dependencies": {
|
|
30
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
32
|
+
"@deepseek-ai/schemastery": "^3.18.3"
|
|
31
33
|
},
|
|
32
34
|
"peerDependencies": {
|
|
33
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
34
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
35
|
-
"@deepseek-ai/dsh-system-prompt": "^0.1.
|
|
36
|
-
"@deepseek-ai/dsh-experimental-agent-team": "^0.1.
|
|
37
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
38
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
35
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
|
|
36
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
37
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.7-alpha.1",
|
|
38
|
+
"@deepseek-ai/dsh-experimental-agent-team": "^0.1.7-alpha.1",
|
|
39
|
+
"@deepseek-ai/dsh-tools": "^0.1.7-alpha.1",
|
|
40
|
+
"@deepseek-ai/cordis": "^4.0.3"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
42
|
-
"@deepseek-ai/dsh-agent-loop": "^0.1.
|
|
43
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.
|
|
44
|
-
"@deepseek-ai/dsh-session
|
|
45
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
46
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.
|
|
47
|
-
"@deepseek-ai/dsh-session-query": "^0.1.
|
|
48
|
-
"@deepseek-ai/dsh-scope": "^0.1.
|
|
49
|
-
"@deepseek-ai/dsh-subagent": "^0.1.
|
|
50
|
-
"@deepseek-ai/dsh-subagent-fork-in-process": "^0.1.
|
|
51
|
-
"@deepseek-ai/dsh-subagent-spawn-in-process": "^0.1.
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
56
|
-
"@deepseek-ai/
|
|
57
|
-
"@deepseek-ai/dsh-llm
|
|
58
|
-
"@deepseek-ai/
|
|
43
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
|
|
44
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.7-alpha.1",
|
|
45
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.7-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
47
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.7-alpha.1",
|
|
48
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.7-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-session-query": "^0.1.7-alpha.1",
|
|
50
|
+
"@deepseek-ai/dsh-scope": "^0.1.7-alpha.1",
|
|
51
|
+
"@deepseek-ai/dsh-subagent": "^0.1.7-alpha.1",
|
|
52
|
+
"@deepseek-ai/dsh-subagent-fork-in-process": "^0.1.7-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "^0.1.7-alpha.1",
|
|
54
|
+
"@deepseek-ai/dsh-tool-subagent-control": "^0.1.7-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.7-alpha.1",
|
|
56
|
+
"@deepseek-ai/dsh-experimental-agent-team": "^0.1.7-alpha.1",
|
|
57
|
+
"@deepseek-ai/dsh-tools": "^0.1.7-alpha.1",
|
|
58
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
59
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-alpha.1",
|
|
60
|
+
"@deepseek-ai/dsh-llm-deepseek": "^0.1.7-alpha.1"
|
|
59
61
|
}
|
|
60
62
|
}
|