@deepseek-ai/dsh-experimental-tool-agent-team 0.1.5-rc.2 → 0.1.6-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 +2 -2
- package/README.md +7 -6
- package/README.zh.md +16 -15
- package/lib/index.js +4 -4
- package/package.json +24 -22
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: 225b9cb90173803ba7c777c5d643e04e47c6c602
|
|
6
|
+
README.zh.md: 382c60ee0c92c26919d52ae24137913800fb5fa7
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ This package lets the model create named teammates, send them messages, inspect
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
-
Add this package on top of `@deepseek-ai/dsh-experimental-agent-team` when the model should run a team through tools. Once mounted, every team member — the Lead and each teammate — gets the same nine tools plus
|
|
28
|
+
Add this package on top of `@deepseek-ai/dsh-experimental-agent-team` when the model should run a team through tools. Once mounted, every team member — the Lead and each teammate — gets the same nine tools plus the same coordination policy. `spawn_teammate` prefixes the initial task with the teammate’s role and name.
|
|
29
29
|
|
|
30
30
|
### When to choose it
|
|
31
31
|
|
|
@@ -81,7 +81,7 @@ This section explains the design decisions behind the adapter and points at the
|
|
|
81
81
|
|
|
82
82
|
The adapter is built on three commitments:
|
|
83
83
|
|
|
84
|
-
- **Scoped, not global.** Every registration lives on the member Agent's own `ctx`;
|
|
84
|
+
- **Scoped, not global.** Every registration lives on the member Agent's own `ctx`; installation uses the member identity available when the Agent is published.
|
|
85
85
|
- **Declared results, compact JSON.** Every tool declares its complete result schema and renders that value as compact JSON, so the compiler checks `execute` against what the model is promised and no result spends tokens on indentation.
|
|
86
86
|
- **The domain owns authority.** Tools delegate to `ctx.agentTeams`, which enforces Lead authority and revision checks; the adapter adds no weaker path.
|
|
87
87
|
|
|
@@ -96,7 +96,7 @@ The [Agent Teams Agent Note](../../../.agents/notes/implemented/feature/2026-08-
|
|
|
96
96
|
|
|
97
97
|
### Policy and tools
|
|
98
98
|
|
|
99
|
-
One `team:policy` section on the member scope
|
|
99
|
+
One `team:policy` section on the member scope states the shared coordination rules; the fixed text and the nine tool registrations are declared in [`src/index.ts`](src/index.ts). The nine tool schemas are registered in scopes recognized as Team members at publication. Scoped registrations with the same names as the legacy global continuable-subagent controls shadow those globals for team members only.
|
|
100
100
|
|
|
101
101
|
### Scoped registration and teardown
|
|
102
102
|
|
|
@@ -125,20 +125,21 @@ 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
|
|
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.
|
|
129
129
|
|
|
130
130
|
#### Token effect
|
|
131
131
|
|
|
132
|
-
Fixed policy and schema cost on every Team member request. Tool calls add compact JSON roster, task, wait, or receipt results. Peer content is retained by the Team domain in the target's history.
|
|
132
|
+
Fixed policy and schema cost on every Team member request. The initial identity text follows ordinary history through later steps, cold recovery, and compaction; the plugin neither scans for it nor reinserts it. Tool calls add compact JSON roster, task, wait, or receipt results. Peer content is retained by the Team domain in the target's history.
|
|
133
133
|
|
|
134
134
|
#### KV Cache effect
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
With the same provider/model, shared system policy, and tool schemas, a fork retains the parent request prefix and appends the initial task with its identity prefix. Tool results and peer messages append after the reusable request prefix. Sessions recorded with identity inside the system prompt can change that prefix on their first request under this layout; actual provider cache hits remain best-effort.
|
|
137
137
|
|
|
138
138
|
## Known Limitations and Deferred Work
|
|
139
139
|
|
|
140
140
|
<a id="known-limitations-and-deferred-work"></a>
|
|
141
141
|
|
|
142
|
+
- **One-shot child tool visibility** — in-process one-shot children receive their subagent descriptor after publication. Team installation can therefore mistake them for Leads and expose Team policy and tools. Calls are rejected once the descriptor identifies them as non-members. Correcting installation timing is deferred.
|
|
142
143
|
|
|
143
144
|
These limits describe what the policy and tools cannot guarantee for a team. They are current package constraints, not a comparison with other collaboration surfaces.
|
|
144
145
|
|
package/README.zh.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "九个让模型创建、发消息与协调 teammate
|
|
2
|
+
description: "九个让模型创建、发消息与协调 teammate 的工具,供挂载实验性 Team 插件的组合使用。"
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -25,7 +25,7 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
-
当模型应该通过工具运行一支团队时,在 `@deepseek-ai/dsh-experimental-agent-team` 之上挂载本包。挂载后,每个团队成员——Lead 与每个 teammate
|
|
28
|
+
当模型应该通过工具运行一支团队时,在 `@deepseek-ai/dsh-experimental-agent-team` 之上挂载本包。挂载后,每个团队成员——Lead 与每个 teammate——都会获得相同的九个工具,以及相同的协作策略。`spawn_teammate` 在初始任务前加上 teammate 的角色和名字。
|
|
29
29
|
|
|
30
30
|
### 何时选择
|
|
31
31
|
|
|
@@ -45,8 +45,8 @@ kind: "package-reference"
|
|
|
45
45
|
|
|
46
46
|
| 字段 | 默认值 | 含义 |
|
|
47
47
|
|---|---|---|
|
|
48
|
-
| `freshProvider` | `spawn` | 启动 fresh teammate
|
|
49
|
-
| `forkProvider` | `fork` | 启动 fork teammate
|
|
48
|
+
| `freshProvider` | `spawn` | 启动 fresh teammate 的提供方 |
|
|
49
|
+
| `forkProvider` | `fork` | 启动 fork teammate 的提供方 |
|
|
50
50
|
|
|
51
51
|
生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-experimental-tool-agent-team)是每个受支持字段及其 JSDoc 的穷尽式真源。
|
|
52
52
|
|
|
@@ -57,7 +57,7 @@ kind: "package-reference"
|
|
|
57
57
|
九个工具分为四类能力:
|
|
58
58
|
|
|
59
59
|
- **创建 teammate**——`spawn_teammate` 接收名字、描述与初始任务;只有 Lead 可以调用它。
|
|
60
|
-
- **发送消息**——`send_message`
|
|
60
|
+
- **发送消息**——`send_message` 在最近的步骤边界对运行中的成员进行 steering(中途引导)、启动空闲成员,并冷恢复非活动 teammate。
|
|
61
61
|
- **查看与等待**——`list_agents` 显示带实时状态的 roster;`wait_agent` 等待下一次团队变化;`interrupt_agent` 停止 teammate 的当前轮次(仅限 Lead)。
|
|
62
62
|
- **管理任务板**——`team_task_create`、`team_task_list`、`team_task_get` 与 `team_task_update` 添加、浏览、读取与更新共享任务。
|
|
63
63
|
|
|
@@ -65,7 +65,7 @@ kind: "package-reference"
|
|
|
65
65
|
|
|
66
66
|
### 成功与失败的表现
|
|
67
67
|
|
|
68
|
-
发送消息在安全存储后即成功:结果为 `accepted
|
|
68
|
+
发送消息在安全存储后即成功:结果为 `accepted`(已立即送达)或 `queued`(等待中),排队的消息绝不能重发。当没有其他成员 running 或 provisioning 时,`wait_agent` 会立即返回 `noProgress`,提示调用方先唤醒 teammate;否则它会等待下一次变化,调用方随后重新读取状态。基于过期 revision 的任务编辑会被拒绝,而不是覆盖更新的成果。
|
|
69
69
|
|
|
70
70
|
-----
|
|
71
71
|
|
|
@@ -81,9 +81,9 @@ kind: "package-reference"
|
|
|
81
81
|
|
|
82
82
|
适配器建立在三项承诺之上:
|
|
83
83
|
|
|
84
|
-
- **按作用域,而非全局。** 每个注册都位于成员 Agent
|
|
85
|
-
- **声明式结果,紧凑 JSON。** 每个工具都声明完整结果 schema,并把该值渲染为紧凑 JSON
|
|
86
|
-
-
|
|
84
|
+
- **按作用域,而非全局。** 每个注册都位于成员 Agent(智能体)自己的 `ctx` 上;安装依据 Agent 发布时可用的成员身份。
|
|
85
|
+
- **声明式结果,紧凑 JSON。** 每个工具都声明完整结果 schema,并把该值渲染为紧凑 JSON,因此编译器会对照向模型承诺的结果检查 `execute`,任何结果都不会在缩进上消耗 token。
|
|
86
|
+
- **领域掌握裁决权。** 工具委托给 `ctx.agentTeams`,后者强制执行 Lead 权限与 revision 校验;适配器不添加更弱的路径。
|
|
87
87
|
|
|
88
88
|
[Agent Teams Agent Note](../../../.agents/notes/implemented/feature/2026-08-05-agent-teams.zh.md)负责模型侧与 scoping 决策。
|
|
89
89
|
|
|
@@ -96,11 +96,11 @@ kind: "package-reference"
|
|
|
96
96
|
|
|
97
97
|
### 策略与工具
|
|
98
98
|
|
|
99
|
-
member scope 上的一个 `team:policy`
|
|
99
|
+
member scope 上的一个 `team:policy` 段落说明共享的协作规则;固定文本与九个工具注册都声明在 [`src/index.ts`](src/index.ts)。九个工具 schema 注册在发布时被识别为 Team member 的 scope 中。与旧全局 continuable-subagent 控件同名的 scoped 注册只会为团队成员覆盖这些全局控件。
|
|
100
100
|
|
|
101
101
|
### 按作用域注册与拆除
|
|
102
102
|
|
|
103
|
-
`maybeInstall` 对每个 live Agent 运行,并订阅 `agent/created`;它跳过没有 Team 成员关系的 Agent。Agent dispose
|
|
103
|
+
`maybeInstall` 对每个 live Agent 运行,并订阅 `agent/created`;它跳过没有 Team 成员关系的 Agent。Agent 的 dispose(资源释放)会运行已安装的 disposer,插件 HMR(热模块替换)会在重新安装前对每个已安装的 scope 执行 dispose。每个 disposer 按逆序撤销注册,因此失败的安装不会留下残缺 scope。
|
|
104
104
|
|
|
105
105
|
</details>
|
|
106
106
|
|
|
@@ -125,22 +125,23 @@ member scope 上的一个 `team:policy` 段落教每个成员自己的角色与
|
|
|
125
125
|
|
|
126
126
|
#### 模型看到什么
|
|
127
127
|
|
|
128
|
-
|
|
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 身份消息。
|
|
129
129
|
|
|
130
130
|
#### Token 影响
|
|
131
131
|
|
|
132
|
-
每次 Team member 请求都有固定策略与 schema
|
|
132
|
+
每次 Team member 请求都有固定策略与 schema 成本。初始身份文本随普通历史经历后续步骤、冷恢复和压缩;插件不扫描或重新插入它。工具调用会增加紧凑 JSON roster、task、wait 或 receipt 结果。Peer 内容由 Team 领域保留在 target 历史中。
|
|
133
133
|
|
|
134
134
|
#### KV Cache 影响
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
provider/model、共享 system 策略和工具 schema 相同时,fork 保留父请求前缀并追加带身份前缀的初始任务。工具结果与 peer 消息追加在可复用请求前缀之后。原先在 system prompt 中记录身份的 Session,首次使用此布局请求时可能改变该前缀;提供方实际缓存命中仍为尽力而为。
|
|
137
137
|
|
|
138
138
|
## 已知限制与延期工作
|
|
139
139
|
|
|
140
140
|
<a id="known-limitations-and-deferred-work"></a>
|
|
141
141
|
|
|
142
|
+
- **一次性子代理工具可见性**——进程内一次性子代理在发布后才获得 subagent descriptor。Team 安装因此可能将它们误认作 Lead 并暴露 Team 策略和工具。descriptor 将它们识别为非成员后,调用会被拒绝。安装时序修复留待以后处理。
|
|
142
143
|
|
|
143
|
-
|
|
144
|
+
这些限制说明策略与工具无法为一支团队保证什么。它们是当前包约束,不是与其他协作方式的对比。
|
|
144
145
|
|
|
145
146
|
- **提示词策略只负责协调,不负责 confinement**——它无法阻止 Bash 或外部进程写入重叠文件。
|
|
146
147
|
- **不会自主创建 Team**——除非用户明确要求,普通任务不会触发 delegation。
|
package/lib/index.js
CHANGED
|
@@ -238,10 +238,7 @@ function install(agent, ctx, config) {
|
|
|
238
238
|
register(scoped.systemPrompt.section({
|
|
239
239
|
name: "team:policy",
|
|
240
240
|
order: scoped.systemPrompt.getSectionOrder("TEAM_POLICY"),
|
|
241
|
-
text:
|
|
242
|
-
const membership = ctx.agentTeams.membership(agent);
|
|
243
|
-
return `${POLICY}\n\nYour Team role is ${membership.role}; your Team name is ${membership.name}; Team id is ${membership.id}.`;
|
|
244
|
-
}
|
|
241
|
+
text: POLICY
|
|
245
242
|
}));
|
|
246
243
|
register(scoped.tools.register(defineTool({
|
|
247
244
|
name: "spawn_teammate",
|
|
@@ -276,6 +273,9 @@ function install(agent, ctx, config) {
|
|
|
276
273
|
name: args.name,
|
|
277
274
|
description: args.description,
|
|
278
275
|
prompt: [{
|
|
276
|
+
type: "text",
|
|
277
|
+
text: `<system-reminder>\nYou are teammate "${args.name.trim()}".\n</system-reminder>\n\n`
|
|
278
|
+
}, {
|
|
279
279
|
type: "text",
|
|
280
280
|
text: args.prompt
|
|
281
281
|
}],
|
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.6-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -30,29 +30,31 @@
|
|
|
30
30
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
31
31
|
},
|
|
32
32
|
"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.
|
|
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
38
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
42
|
-
"@deepseek-ai/dsh-agent-loop
|
|
43
|
-
"@deepseek-ai/dsh-agent-loop": "^0.1.
|
|
44
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
46
|
-
"@deepseek-ai/dsh-session-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-subagent": "^0.1.
|
|
50
|
-
"@deepseek-ai/dsh-subagent-
|
|
51
|
-
"@deepseek-ai/dsh-subagent-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/
|
|
56
|
-
"@deepseek-ai/
|
|
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"
|
|
57
59
|
}
|
|
58
60
|
}
|