dsh-agent-team-presets 0.2.0 → 0.2.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.
Files changed (36) hide show
  1. package/README.md +20 -12
  2. package/README.zh.md +19 -11
  3. package/lib/client.js +7998 -2007
  4. package/lib/index.js +2626 -1214
  5. package/lib/typert.host.js +7090 -1648
  6. package/lib/typert.remote-client.d.ts +4 -1
  7. package/lib/typert.remote-client.d.ts.map +1 -0
  8. package/lib/typert.remote-client.js +7171 -1729
  9. package/lib/types/application.d.ts +24 -1
  10. package/lib/types/application.js +77 -34
  11. package/lib/types/builtin-skill.js +7 -13
  12. package/lib/types/client/ComposerTeamSelect.d.ts +1 -1
  13. package/lib/types/client/ComposerTeamSelect.js +100 -7
  14. package/lib/types/client/TeamImportDialog.js +1 -1
  15. package/lib/types/client/TeamListView.js +8 -7
  16. package/lib/types/client/TeamRosterAction.d.ts +15 -0
  17. package/lib/types/client/TeamRosterAction.js +205 -0
  18. package/lib/types/client/index.js +33 -2
  19. package/lib/types/client/locales.d.ts +1 -1
  20. package/lib/types/client/locales.js +60 -12
  21. package/lib/types/client/team-presets-controller.d.ts +18 -0
  22. package/lib/types/client/team-presets-controller.js +15 -0
  23. package/lib/types/execution.d.ts +2 -2
  24. package/lib/types/execution.js +13 -11
  25. package/lib/types/index.js +89 -22
  26. package/lib/types/member-runtime.d.ts +32 -2
  27. package/lib/types/member-runtime.js +55 -2
  28. package/lib/types/presentation.d.ts +12 -5
  29. package/lib/types/presentation.js +63 -10
  30. package/lib/types/preset-tools.js +3 -9
  31. package/lib/types/team-runtime.d.ts +25 -0
  32. package/lib/types/team-runtime.js +50 -0
  33. package/lib/types/tool-catalog.d.ts +17 -1
  34. package/lib/types/tool-catalog.js +16 -0
  35. package/lib/types/types.d.ts +29 -0
  36. package/package.json +51 -49
package/README.md CHANGED
@@ -6,11 +6,19 @@
6
6
 
7
7
  English | [中文](<README.zh.md>)
8
8
 
9
- > **Community plugin v0.2.0** · [Tag](https://github.com/bloodarea/dsh-agent-team-presets/tree/v0.2.0)
9
+ > **Community plugin v0.2.1** · [Tag](https://github.com/bloodarea/dsh-agent-team-presets/tree/v0.2.1)
10
10
  >
11
- > This release targets **DeepSeek Harness 0.2.2-rc.1** and adds **individual member chat**: hover a Team in the composer, then select one member to run the Session as that member with its own role card, tools, Team Skills, and model route. It also moves member routing to `agent.model.select()` and per-step tool admission. Requires Agent Teams; keep 0.1.8 on older hosts. Prebuilt artifacts are included.
11
+ > This release adapts the plugin to **DeepSeek Harness 0.2.2-rc.2**, whose Team subsystem no longer creates teammates. Members are now created through the standard subagent runtime, and no Agent Teams bundle is required. This is a breaking host requirement: keep 0.2.0 on 0.2.2-rc.1. Prebuilt artifacts are included.
12
12
 
13
- ### What's new in 0.2.0
13
+ ### What's new in 0.2.1
14
+
15
+ - **Members are ordinary subagents.** `spawn_team_member` creates a member with `ctx.subagents.startActivation` under a reserved child identity recorded with its frozen snapshot, so the member's own route, persona, team context, and strict tool policy still reach its very first request.
16
+ - **No Agent Teams bundle is required.** Tree membership and execution state are read from the subagent runtime — its catalog, live Agents, and admission records — instead of the removed Team roster, messaging, and member APIs.
17
+ - **Teardown stops the epochs this plugin started.** Each creation receipt is retained and released on unload; a cold-restored member, which rc.2 offers no selective disposal for, is interrupted and keeps its Agent-owned policy until the Agent is disposed.
18
+ - **The conversation header shows the Team again.** The rc.1 header action is reproduced from the official `agent-team` client source: a roster of the captain and the members this Session summoned, each row carrying live status and the model it runs on. The captain row is read-only, a member row opens that member's conversation, and the shared-task section lists each task with its status, dependency, write scope and an expandable description. It renders only when the deployment's Team switch is on and this Session selected a preset.
19
+ - **Adaptation to the 0.2.2-rc.2 host.** The roster reads this Session's member snapshots and Team selection instead of the removed Team projection, the shipped stylesheet's elevation token was renamed to `--dsw-elevation-stroke-color`, and the remote-contract tests accept both the lazy `spec` and the inlined schema form the generator emits.
20
+
21
+ ### What changed in 0.2.0
14
22
 
15
23
  - **Custom tool policies work on a PTC Session.** Applying a custom allow-list on a PTC preset registers the Harness native tool executor on that Session's Agent scope and never releases it; the deployment executor and every other Session keep PTC, and the Agent owns the registration for its whole life. The trade-off is explicit: that Session stops using `run_code` until it ends. A mount that fails, or a surface that still exposes the PTC transport, is refused without releasing anything, so a refused Session keeps its previous surface.
16
24
  - **A spent member allowance is diagnosable.** The creation refusal now reports `N of M` roster slots occupied, names the occupants whose creation never became usable, and states that the Host roster is append-only with no removal API — so a Team that will never summon again is distinguishable from a busy one.
@@ -26,7 +34,7 @@ A Team contains a **captain** and any number of **member roles**:
26
34
 
27
35
  - The captain uses the conversation's selected model, with its own role description, system prompt, and tool policy.
28
36
  - Each member can have an independent provider, model, reasoning effort, system prompt, tool policy, and assigned Team Skills.
29
- - The captain summons members through `spawn_team_member`; native Agent Teams provides messaging, the shared task board, and runtime coordination.
37
+ - The captain summons members through `spawn_team_member`; the Harness subagent runtime provides messaging, execution, and lifecycle.
30
38
 
31
39
  This is a community plugin, not the Harness's bundled `@deepseek-ai/dsh-experimental-agent-team-presets` development package.
32
40
 
@@ -42,7 +50,7 @@ DeepSeek Harness already ships Agent Teams with multi-agent collaboration. In th
42
50
  - **Skills lack per-agent scope isolation.** Shipped or user skills are typically registered globally, making all skills visible to every agent; this plugin provides a private Team Skill library where skills are discovered **only** by the specific Agent they are assigned to.
43
51
  - **Switching teams is inconvenient.** Pick a preset Team directly from the composer instead of rebuilding roles by hand.
44
52
 
45
- **Design principle:** native Agent Teams owns collaboration at runtime; this plugin owns configuring, managing, isolating, and reusing teams and their skills.
53
+ **Design principle:** the Harness subagent runtime owns collaboration at runtime; this plugin owns configuring, managing, isolating, and reusing teams and their skills.
46
54
 
47
55
  <a id="features"></a>
48
56
  ## Features
@@ -175,13 +183,13 @@ The captain always follows the Session, so selecting it changes the Team and the
175
183
  <a id="requirements"></a>
176
184
  ## Requirements
177
185
 
178
- - **DeepSeek Harness `>=0.2.2-rc.1 <0.3.0`.** Verified against **`0.2.2-rc.1`**. Each member's route is recorded through `agent.model.select()` for fresh, forked, and cold-resumed execution; the captain keeps the conversation's model selection. The plugin manager enforces `engines.dsh` from [package.json](<package.json>).
186
+ - **DeepSeek Harness `>=0.2.2-rc.2 <0.3.0`.** Verified against **`0.2.2-rc.2`**; 0.2.2-rc.1 and older are refused. Each member's route is recorded through `agent.model.select()` for fresh, forked, and cold-resumed execution; the captain keeps the conversation's model selection. The plugin manager enforces `engines.dsh` from [package.json](<package.json>).
179
187
  - **Custom tool allow-lists work on PTC by giving that Session its own native surface.** The Host cannot restore an inherited executor after a release, so the plugin never releases one: on a PTC preset it mounts the Harness native tool executor on the Session's Agent scope and leaves the deployment executor alone. The trade-off is deliberate — that Session stops using `run_code` for the rest of its life, while other Sessions and the all-tools mode keep PTC. If mounting fails, or the surface still exposes the PTC transport afterwards, the application is refused and nothing is left behind, because no executor was ever released.
180
- - **Agent Teams enabled in the target profile.** The standard integration is `@deepseek-ai/dsh-experimental-agent-team-profile`, which supplies the Team service, tools, and Web roster. This plugin configures and manages Teams; it does not replace that subsystem.
188
+ - **No Agent Teams bundle is required.** Members are created through the deployment's continuable subagent providers, and native messaging, task tools, and the Web roster are unaffected by this plugin.
181
189
  - **A Web or Desktop profile with Settings and the required client services.** Install into the profile you actually use, typically `web` for the Web GUI or `desktop` for Desktop.
182
190
  - **Durable storage and a continuable subagent backend for member execution.** Member creation is refused if the storage domain or selected execution backend is unavailable. The default backend names are `spawn` and `fork`.
183
191
 
184
- The plugin version (`0.2.0`) and the Harness version (`0.2.2-rc.1`, for example) are separate version lines.
192
+ The plugin version (`0.2.1`) and the Harness version (`0.2.2-rc.2`, for example) are separate version lines.
185
193
 
186
194
  <a id="use-this-package"></a>
187
195
  ## Install and upgrade
@@ -223,8 +231,8 @@ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets
223
231
  #### Option 3 — reproducible pin (no update prompts)
224
232
 
225
233
  ```text
226
- dsh-agent-team-presets@0.2.0
227
- dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.2.0
234
+ dsh-agent-team-presets@0.2.1
235
+ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.2.1
228
236
  ```
229
237
 
230
238
  A fixed version or tag reproduces exactly one release. **A `#tag` GitHub spec is only ever compared against that same tag, so the market never reports an update for it — upgrading means editing the spec by hand.** Use this form only when you need a frozen install.
@@ -245,7 +253,7 @@ npm view dsh-agent-team-presets version
245
253
 
246
254
  ### Verify and upgrade safely
247
255
 
248
- After installation, follow the plugin manager's reload/restart prompts and navigate to **Settings → Agent team presets**. Verify that details display `dsh-agent-team-presets`, version `0.2.0`, and a running component.
256
+ After installation, follow the plugin manager's reload/restart prompts and navigate to **Settings → Agent team presets**. Verify that details display `dsh-agent-team-presets`, version `0.2.1`, and a running component.
249
257
 
250
258
  - Back up profile settings, Team definitions, and Session selections before upgrading.
251
259
  - When migrating from a development link, remove `@deepseek-ai/dsh-experimental-agent-team-presets` first before enabling the community package.
@@ -449,7 +457,7 @@ The plugin registers `agent-team-presets-troubleshooting` on the global skill la
449
457
 
450
458
  | Symptom | What to check |
451
459
  |---|---|
452
- | Settings page is absent or plugin pending | Confirm profile type, peer dependencies, Agent Teams enablement, and client services. |
460
+ | Settings page is absent or plugin pending | Confirm profile type, peer dependencies, subagent backends (default `spawn`/`fork`), and client services. |
453
461
  | Skill deletion button is disabled | The skill is protected: inspect the blocker list in the modal (bound roles or dependencies must be unassigned first). |
454
462
  | Skill assignment refused (`dependency-missing`) | A required executable declared by the skill is absent from host `PATH`. Note that declared MCP servers are reported for visibility and do not block assignment; ensure MCP servers are configured in your profile. |
455
463
  | Member creation refused | Check storage domain availability, subagent execution backend (`spawn`/`fork`), model quota, and concurrency limits. |
package/README.zh.md CHANGED
@@ -6,16 +6,24 @@
6
6
 
7
7
  [English](<README.md>) | 中文
8
8
 
9
- > **社区插件 v0.2.0** · [标签](https://github.com/bloodarea/dsh-agent-team-presets/tree/v0.2.0)
9
+ > **社区插件 v0.2.1** · [标签](https://github.com/bloodarea/dsh-agent-team-presets/tree/v0.2.1)
10
10
  >
11
- > 本版适配 **DeepSeek Harness 0.2.2-rc.1**,新增**与单个成员单独对话**:在输入区悬浮团队后点选成员,即可让当前会话以该成员的角色卡、工具权限、Team Skill 与模型路由运行。成员路由改用 `agent.model.select()`,工具激活按步评估。需要启用 Agent Teams;旧宿主请保留 0.1.8。仓库包含预构建产物,安装时无需构建。
11
+ > 本版适配 **DeepSeek Harness 0.2.2-rc.2**:该版本的 Team 子系统不再创建队友,成员改由标准 subagent 运行时创建,不再需要安装 Agent Teams bundle。这是破坏性的宿主要求:0.2.2-rc.1 请保留 0.2.0。仓库包含预构建产物,安装时无需构建。
12
+
13
+ ### 0.2.1 更新内容
14
+
15
+ - **成员就是标准 subagent。** `spawn_team_member` 改用 `ctx.subagents.startActivation` 创建成员,并在成员快照里预写子会话身份,因此成员自己的模型路由、角色提示词、团队上下文与严格工具策略仍然对它**第一次**模型请求生效。
16
+ - **不再需要 Agent Teams bundle。** 树归属与执行状态改从 subagent 运行时的 catalog、在线 Agent 与创建准入记录读取,不再依赖已移除的 Team 名册、消息与成员接口。
17
+ - **卸载只停止本插件启动的那些实例。** 每次创建的回执都会保留并在卸载时释放;rc.2 没有针对单个冷恢复成员的选择性释放能力,因此这类成员只中断当前工作,其 Agent 作用域内的策略一直保留到 Agent 销毁。
18
+ - **会话头部重新显示团队。** 按官方 `agent-team` 客户端源码复刻 rc.1 的头部动作:队长与本次会话已召唤成员的名册,每行带实时状态与所用模型。队长行只读,成员行可跳到该成员会话;下方是共享任务区,逐条给状态、依赖、写入范围与可展开描述。仅当部署的团队开关打开、且本会话已选预设时渲染。
19
+ - **对 0.2.2-rc.2 宿主的适配。** 名册改按本会话的成员快照与团队选择读取(不再依赖被移除的 Team 投影);样式里的阴影 token 改为 `--dsw-elevation-stroke-color`;远端契约测试同时接受惰性 `spec` 与内联 schema 两种产物形态。
12
20
 
13
21
  ### 0.2.0 更新内容
14
22
 
15
23
  - **PTC 会话可以用自定义工具策略了。** 在 PTC 预设下应用自定义白名单时,插件把宿主自带的 native 工具执行器注册到该会话的 Agent 作用域并从不释放:部署级执行器与其他会话仍走 PTC,注册归该 Agent 所有并随其销毁。代价是明确的 —— 该会话此后不再使用 `run_code`,直到它结束。挂载失败、或挂载后工具面仍暴露 PTC 传输时会拒绝应用,且因为从未释放,会话保留原有工具面。
16
24
  - **名额耗尽时能看出是谁占的。** 召唤被拒时现在会报 `N/M` 个 roster 槽位被占用、按名字列出创建从未成功的占位,并说明宿主 roster 只追加、无移除 API —— 让"永远不能再召唤"的团队与"暂时忙"的团队可区分。
17
25
 
18
- 沿用 0.1.9:输入区与单个成员单独对话、Harness 0.2.2-rc.1 适配(`agent.model.select()` 路由、按步工具激活)、内置排障 Skill。
26
+ 沿用 0.1.9:输入区与单个成员单独对话、`agent.model.select()` 成员路由、按步工具激活、内置排障 Skill。
19
27
 
20
28
  <a id="project-introduction"></a>
21
29
  ## 项目介绍
@@ -26,7 +34,7 @@
26
34
 
27
35
  - 队长使用当前会话选择的模型,并拥有独立的角色描述、系统提示词和工具策略。
28
36
  - 每个成员可分别配置提供商、模型、推理强度、系统提示词、工具策略与专属 Team Skill。
29
- - 队长通过 `spawn_team_member` 召唤成员;消息、共享任务板和运行时协作由原生 Agent Teams 提供。
37
+ - 队长通过 `spawn_team_member` 召唤成员;消息投递、执行与生命周期由 Harness 的 subagent 运行时提供。
30
38
 
31
39
  本项目是社区插件,不是 Harness 随附的 `@deepseek-ai/dsh-experimental-agent-team-presets` 开发包。
32
40
 
@@ -175,13 +183,13 @@ DeepSeek Harness 原生 Agent Teams 已经具备多智能体协作能力。在
175
183
  <a id="requirements"></a>
176
184
  ## 环境要求
177
185
 
178
- - **DeepSeek Harness `>=0.2.2-rc.1 <0.3.0`。** 本次实测版本为 **`0.2.2-rc.1`**。成员路由通过 `agent.model.select()` 写入各自会话,fresh、fork 与冷恢复均使用成员自己的配置;队长使用当前会话选择。插件管理器按 [package.json](<package.json>) 的 `engines.dsh` 判定兼容性。
186
+ - **DeepSeek Harness `>=0.2.2-rc.2 <0.3.0`。** 本次实测版本为 **`0.2.2-rc.2`**;0.2.2-rc.1 及更旧版本会被拒绝。成员路由通过 `agent.model.select()` 写入各自会话,fresh、fork 与冷恢复均使用成员自己的配置;队长使用当前会话选择。插件管理器按 [package.json](<package.json>) 的 `engines.dsh` 判定兼容性。
179
187
  - **自定义工具白名单在 PTC 下通过给该会话一个自己的 native 面来工作。** 宿主无法在释放执行器后恢复继承,所以插件从不主动释放:在 PTC 预设下它把宿主自带的 native 工具执行器挂到该会话的 Agent 作用域,部署级执行器保持原样。代价是明确的:该会话此后不再使用 `run_code`,而其他会话与「所有工具」模式继续走 PTC。若挂载失败、或挂载后工具面仍暴露 PTC 传输,则应用被拒绝且不留残留 —— 因为从未释放过任何执行器。
180
- - **目标 profile 已启用 Agent Teams。** 标准集成是 `@deepseek-ai/dsh-experimental-agent-team-profile`,提供团队服务、工具和 Web 名册。本插件负责配置与管理团队,不替代该子系统。
188
+ - **无需 Agent Teams bundle。** 成员通过部署自带的可继续执行 subagent 后端创建;原生消息、任务工具与 Web 名册不受本插件影响。
181
189
  - **具备 Settings 与所需客户端服务的 Web 或 Desktop profile。** 安装到实际使用的 profile:Web GUI 通常为 `web`,Desktop 通常为 `desktop`。
182
190
  - **成员执行所需的持久存储与支持恢复执行的子智能体后端。** 缺少 storage domain 或所选执行后端时,插件会拒绝创建成员。默认后端名为 `spawn` 和 `fork`。
183
191
 
184
- 插件版本(`0.2.0`)和 Harness 版本(如 `0.2.2-rc.1`)是不同的版本线。
192
+ 插件版本(`0.2.1`)和 Harness 版本(如 `0.2.2-rc.2`)是不同的版本线。
185
193
 
186
194
  <a id="use-this-package"></a>
187
195
  ## 安装与升级
@@ -223,8 +231,8 @@ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets
223
231
  #### 方式三 —— 可复现的固定版本(收不到更新提示)
224
232
 
225
233
  ```text
226
- dsh-agent-team-presets@0.2.0
227
- dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.2.0
234
+ dsh-agent-team-presets@0.2.1
235
+ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.2.1
228
236
  ```
229
237
 
230
238
  固定版本号或固定标签只能复现一个确定的发布。**带 `#标签` 的 GitHub 规格只会与同一个标签比对,市场永远不会提示更新——升级只能手动改规格。** 只在确实需要冻结安装时使用这种形式。
@@ -245,7 +253,7 @@ npm view dsh-agent-team-presets version
245
253
 
246
254
  ### 确认安装并安全升级
247
255
 
248
- 安装成功后,按插件管理器的提示重新加载或重启,打开 **设置 → 智能体团队预设**。确认插件详情显示 `dsh-agent-team-presets`、版本 `0.2.0`,且组件处于运行中状态。
256
+ 安装成功后,按插件管理器的提示重新加载或重启,打开 **设置 → 智能体团队预设**。确认插件详情显示 `dsh-agent-team-presets`、版本 `0.2.1`,且组件处于运行中状态。
249
257
 
250
258
  - 升级前备份 profile 设置、团队定义与会话选择记录。
251
259
  - 从开发链接迁移时,先通过插件管理器移除 `@deepseek-ai/dsh-experimental-agent-team-presets`,再启用社区包。
@@ -449,7 +457,7 @@ Configuration for "agent-team-presets" is overridden by a home patch or command-
449
457
 
450
458
  | 现象 | 排查方向 |
451
459
  |---|---|
452
- | 看不到设置页或插件处于 pending | 检查 profile 类型、peer 依赖兼容性、Agent Teams 是否启用及客户端服务。 |
460
+ | 看不到设置页或插件处于 pending | 检查 profile 类型、peer 依赖兼容性、subagent 后端(默认 `spawn`/`fork`)是否可用及客户端服务。 |
453
461
  | 技能删除按钮置灰不可点击 | 技能受保护:查看弹窗中的阻断列表,需先在对应团队角色中取消分配。 |
454
462
  | 技能分配被拒绝 (`dependency-missing`) | 技能声明的某个必需命令行程序在宿主 `PATH` 上未找到。注意声明的 MCP 服务仅供展示参考,不阻断分配;如需使用请确认 profile 中已正确配置并连接对应 MCP。 |
455
463
  | 成员创建被拒绝 | 检查持久存储、执行后端(`spawn`/`fork`)、模型配额及并发限额。 |