@deepseek-ai/dsh-experimental-tool-agent-team 0.1.6-alpha.2 → 0.1.7-alpha.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 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: 225b9cb90173803ba7c777c5d643e04e47c6c602
6
- README.zh.md: 382c60ee0c92c26919d52ae24137913800fb5fa7
5
+ README.md: 0918686d28f7212558aafa988a4b968c18aa8664
6
+ README.zh.md: 8243f8471a67fe55d5a5d368d98e20c5519f42f3
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 an idle member, and cold-resumes an inactive teammate.
61
- - **See and wait** — `list_agents` shows the roster with live status; `wait_agent` waits for the next team change; `interrupt_agent` stops a teammate's current turn (Lead only).
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
 
@@ -125,7 +125,7 @@ Read these pages when the package-level contract is not enough. They move from t
125
125
 
126
126
  #### What the model sees
127
127
 
128
- One shared system policy states the explicit-delegation requirement, shared-cwd behavior, filesystem stale-version recovery, Bash/formatter/codegen risk, task and write-scope coordination, Steer delivery, the no-retry mailbox rule, and the Lead's duty to wait before answering. All nine Team schemas are identical for Leads and teammates; execution enforces Lead-only operations. `spawn_teammate` prefixes its initial user message with `<system-reminder>\nYou are teammate "<name>".\n</system-reminder>`, followed by a blank line and the task. The prefix contains no Team id and works when runtime context is disabled. Forks inherit history without an additional Lead identity message.
128
+ One shared system policy states the explicit-delegation requirement, shared-cwd behavior, filesystem stale-version recovery, Bash/formatter/codegen risk, task and write-scope coordination, Steer delivery, the no-retry mailbox rule, and the Lead's duty to wait before answering. All nine Team schemas are identical for Leads and teammates; execution enforces Lead-only operations. `spawn_teammate` prefixes its initial user message with `<system-reminder>\nYou are teammate "<name>".\nYour Team Lead is named "lead".\nUse list_agents({}) to find your teammates and their names.\nTo message your Team Lead, use send_message({ target: "lead", message: "..." }).\nTo message another teammate, use send_message({ target: "<teammate name>", message: "..." }).\n</system-reminder>`, followed by a blank line and the task. The prefix contains no Team id and works when runtime context is disabled. Forks inherit history without an additional Lead identity message.
129
129
 
130
130
  #### Token effect
131
131
 
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(中途引导)、启动空闲成员,并冷恢复非活动 teammate。
61
- - **查看与等待**——`list_agents` 显示带实时状态的 roster;`wait_agent` 等待下一次团队变化;`interrupt_agent` 停止 teammate 的当前轮次(仅限 Lead)。
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
- 任何成员都可以给任何其他成员发消息并使用任务板;只有 Lead 可以创建与中断 teammate。任务更新保留领域的 owner 与 revision 校验,因此过期的编辑会被拒绝,而不是覆盖更新的成果。
64
+ 创建和列表结果使用 `target` 标识成员,不包含成员 Session ID。可将该值用于消息和中断调用,或任务工具的 `owner` 参数;任务的 `ownerName` 使用相同值。`inactive` 表示没有轮次在执行,包括已加载和需要恢复的成员;它不表示任务完成或结果。`provisioning` 与 `failed` 描述成员创建状态。任何成员都可以给任何其他成员发消息并使用任务板;只有 Lead 可以创建与中断 teammate。任务更新保留领域的 owner 与 revision 校验,因此过期的编辑会被拒绝,而不是覆盖更新的成果。
65
65
 
66
66
  ### 成功与失败的表现
67
67
 
@@ -125,7 +125,7 @@ member scope 上的一个 `team:policy` 段落说明共享的协作规则;固
125
125
 
126
126
  #### 模型看到什么
127
127
 
128
- 一段共享 system 策略会说明显式 delegation 要求、共享 cwd 行为、文件陈旧版本恢复、Bash/formatter/codegen 风险、task/write-scope 协调、Steer 投递、mailbox 不重试规则,以及 Lead 必须在回答前等待。Lead 与 teammate 的全部九个 Team schema 相同;执行时检查仅限 Lead 的操作权限。`spawn_teammate` 在初始 user 消息前加上 `<system-reminder>\nYou are teammate "<name>".\n</system-reminder>`,接着是一个空行和任务。该前缀不含 Team id,禁用运行时上下文时也能生效。fork 继承历史,不额外添加 Lead 身份消息。
128
+ 一段共享 system 策略会说明显式 delegation 要求、共享 cwd 行为、文件陈旧版本恢复、Bash/formatter/codegen 风险、task/write-scope 协调、Steer 投递、mailbox 不重试规则,以及 Lead 必须在回答前等待。Lead 与 teammate 的全部九个 Team schema 相同;执行时检查仅限 Lead 的操作权限。`spawn_teammate` 在初始 user 消息前加上 `<system-reminder>\nYou are teammate "<name>".\nYour Team Lead is named "lead".\nUse list_agents({}) to find your teammates and their names.\nTo message your Team Lead, use send_message({ target: "lead", message: "..." }).\nTo message another teammate, use send_message({ target: "<teammate name>", message: "..." }).\n</system-reminder>`,接着是一个空行和任务。该前缀不含 Team id,禁用运行时上下文时也能生效。fork 继承历史,不额外添加 Lead 身份消息。
129
129
 
130
130
  #### Token 影响
131
131
 
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, starts an idle target, and cold-resumes an inactive teammate. 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.`;
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, matching `TeamMemberView`. The Lead pseudo-row omits the
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
- id: {
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,12 +268,20 @@ 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: [{
276
275
  type: "text",
277
- text: `<system-reminder>\nYou are teammate "${args.name.trim()}".\n</system-reminder>\n\n`
276
+ text: `<system-reminder>
277
+ You are teammate "${args.name.trim()}".
278
+ Your Team Lead is named "lead".
279
+ Use list_agents({}) to find your teammates and their names.
280
+ To message your Team Lead, use send_message({ target: "lead", message: "..." }).
281
+ To message another teammate, use send_message({ target: "<teammate name>", message: "..." }).
282
+ </system-reminder>
283
+
284
+ `
278
285
  }, {
279
286
  type: "text",
280
287
  text: args.prompt
@@ -282,17 +289,17 @@ function install(agent, ctx, config) {
282
289
  context,
283
290
  provider: context === "fork" ? config.forkProvider : config.freshProvider,
284
291
  signal: exec.signal
285
- });
292
+ })).member) };
286
293
  }
287
294
  })));
288
295
  register(scoped.tools.register(defineTool({
289
296
  name: "send_message",
290
- description: "Send one durable message to another Team member. A running target receives it at the nearest step boundary; an idle target starts a turn; an inactive teammate cold-resumes.",
297
+ 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
298
  parameters: {
292
299
  target: {
293
300
  type: "string",
294
301
  required: true,
295
- description: "Team member name, or lead."
302
+ description: "Member target returned by spawn_teammate or list_agents, including lead."
296
303
  },
297
304
  message: {
298
305
  type: "string",
@@ -314,11 +321,11 @@ function install(agent, ctx, config) {
314
321
  })));
315
322
  register(scoped.tools.register(defineTool({
316
323
  name: "list_agents",
317
- description: "List the Lead and every durable teammate with current runtime status.",
324
+ 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
325
  parameters: {},
319
326
  output: jsonOutput(MEMBER_LIST_VALUE_SCHEMA),
320
- async execute(_args, exec) {
321
- return Promise.resolve(ctx.agentTeams.listMembers(callingAgent(exec.agent, "list_agents")));
327
+ execute(_args, exec) {
328
+ return Promise.resolve(ctx.agentTeams.listMembers(callingAgent(exec.agent, "list_agents")).map(modelMember));
322
329
  }
323
330
  })));
324
331
  register(scoped.tools.register(defineTool({
@@ -349,10 +356,10 @@ function install(agent, ctx, config) {
349
356
  parameters: { target: {
350
357
  type: "string",
351
358
  required: true,
352
- description: "Teammate name."
359
+ description: "Teammate target returned by spawn_teammate or list_agents."
353
360
  } },
354
361
  output: jsonOutput(INTERRUPT_VALUE_SCHEMA),
355
- async execute(args, exec) {
362
+ execute(args, exec) {
356
363
  return Promise.resolve(ctx.agentTeams.interrupt(callingAgent(exec.agent, "interrupt_agent"), args.target));
357
364
  }
358
365
  })));
@@ -406,7 +413,7 @@ function install(agent, ctx, config) {
406
413
  },
407
414
  owner: {
408
415
  type: "string",
409
- description: "Optional member-name filter; use unowned for tasks without an owner."
416
+ description: "Optional member target from spawn_teammate or list_agents, matching ownerName; use unowned for tasks without an owner."
410
417
  },
411
418
  ready: {
412
419
  type: "boolean",
@@ -497,7 +504,7 @@ function install(agent, ctx, config) {
497
504
  },
498
505
  owner: {
499
506
  type: "string",
500
- description: "Member name for Lead-only reassign; omit to unassign."
507
+ description: "Member target from spawn_teammate or list_agents for Lead-only reassign; omit to unassign."
501
508
  }
502
509
  },
503
510
  output: jsonOutput(TASK_VIEW_SCHEMA),
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Team Tools",
4
+ "description": "Give agents tools to coordinate members, exchange messages, and manage shared tasks."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "团队工具",
4
+ "description": "为智能体提供成员协调、消息通信和共享任务管理工具。"
5
+ }
6
+ }
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.6-alpha.2",
4
+ "version": "0.1.7-alpha.2",
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.2"
32
+ "@deepseek-ai/schemastery": "~3.18.4"
31
33
  },
32
34
  "peerDependencies": {
33
- "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
34
- "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
35
- "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2",
36
- "@deepseek-ai/dsh-experimental-agent-team": "^0.1.6-alpha.2",
37
- "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2",
38
- "@deepseek-ai/cordis": "^4.0.2"
35
+ "@deepseek-ai/dsh-session": "0.1.7-alpha.2",
36
+ "@deepseek-ai/dsh-system-prompt": "0.1.7-alpha.2",
37
+ "@deepseek-ai/dsh-agent": "0.1.7-alpha.2",
38
+ "@deepseek-ai/dsh-experimental-agent-team": "0.1.7-alpha.2",
39
+ "@deepseek-ai/dsh-tools": "0.1.7-alpha.2",
40
+ "@deepseek-ai/cordis": "~4.0.4"
39
41
  },
40
42
  "devDependencies": {
41
- "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
42
- "@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.2",
43
- "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.2",
44
- "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
45
- "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.2",
46
- "@deepseek-ai/dsh-session-query": "^0.1.6-alpha.2",
47
- "@deepseek-ai/dsh-scope": "^0.1.6-alpha.2",
48
- "@deepseek-ai/dsh-subagent": "^0.1.6-alpha.2",
49
- "@deepseek-ai/dsh-subagent-fork-in-process": "^0.1.6-alpha.2",
50
- "@deepseek-ai/dsh-subagent-spawn-in-process": "^0.1.6-alpha.2",
51
- "@deepseek-ai/dsh-tool-subagent-control": "^0.1.6-alpha.2",
52
- "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2",
53
- "@deepseek-ai/dsh-experimental-agent-team": "^0.1.6-alpha.2",
54
- "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2",
55
- "@deepseek-ai/cordis": "^4.0.2",
56
- "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
57
- "@deepseek-ai/dsh-llm-deepseek": "^0.1.6-alpha.2",
58
- "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.6-alpha.2"
43
+ "@deepseek-ai/dsh-agent": "0.1.7-alpha.2",
44
+ "@deepseek-ai/dsh-agent-loop": "0.1.7-alpha.2",
45
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-alpha.2",
46
+ "@deepseek-ai/dsh-session-projection": "0.1.7-alpha.2",
47
+ "@deepseek-ai/dsh-session": "0.1.7-alpha.2",
48
+ "@deepseek-ai/dsh-session-query": "0.1.7-alpha.2",
49
+ "@deepseek-ai/dsh-scope": "0.1.7-alpha.2",
50
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-alpha.2",
51
+ "@deepseek-ai/dsh-subagent": "0.1.7-alpha.2",
52
+ "@deepseek-ai/dsh-subagent-fork-in-process": "0.1.7-alpha.2",
53
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-alpha.2",
54
+ "@deepseek-ai/dsh-system-prompt": "0.1.7-alpha.2",
55
+ "@deepseek-ai/dsh-tools": "0.1.7-alpha.2",
56
+ "@deepseek-ai/dsh-experimental-agent-team": "0.1.7-alpha.2",
57
+ "@deepseek-ai/cordis": "~4.0.4",
58
+ "@deepseek-ai/dsh-llm-deepseek": "0.1.7-alpha.2",
59
+ "@deepseek-ai/dsh-llm": "0.1.7-alpha.2",
60
+ "@deepseek-ai/dsh-tool-subagent-control": "0.1.7-alpha.2"
59
61
  }
60
62
  }