dsh-agent-team-presets 0.2.0 → 0.3.0

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 (52) hide show
  1. package/NOTICE +29 -0
  2. package/README.md +61 -12
  3. package/README.zh.md +60 -11
  4. package/assets/card-patches/dsh-better-sidebar-0.32.0.client.js.gz +0 -0
  5. package/assets/card-patches/dsh-context-0.84.0.client.js.gz +0 -0
  6. package/assets/card-patches/licenses/dsh-better-sidebar-LICENSE +21 -0
  7. package/assets/card-patches/licenses/dsh-context-LICENSE +201 -0
  8. package/lib/client.js +9068 -2097
  9. package/lib/index.js +3084 -1212
  10. package/lib/typert.host.js +7454 -1720
  11. package/lib/typert.remote-client.d.ts +16 -1
  12. package/lib/typert.remote-client.d.ts.map +1 -0
  13. package/lib/typert.remote-client.js +7383 -1649
  14. package/lib/types/application.d.ts +24 -1
  15. package/lib/types/application.js +77 -34
  16. package/lib/types/builtin-skill.js +7 -13
  17. package/lib/types/card-patches.d.ts +104 -0
  18. package/lib/types/card-patches.js +275 -0
  19. package/lib/types/client/CardPatchView.d.ts +27 -0
  20. package/lib/types/client/CardPatchView.js +80 -0
  21. package/lib/types/client/ComposerTeamSelect.d.ts +1 -1
  22. package/lib/types/client/ComposerTeamSelect.js +100 -7
  23. package/lib/types/client/TeamImportDialog.js +1 -1
  24. package/lib/types/client/TeamListView.js +8 -7
  25. package/lib/types/client/TeamPresetsSection.js +13 -5
  26. package/lib/types/client/TeamRosterAction.d.ts +15 -0
  27. package/lib/types/client/TeamRosterAction.js +205 -0
  28. package/lib/types/client/agent-card-badges.d.ts +47 -0
  29. package/lib/types/client/agent-card-badges.js +61 -0
  30. package/lib/types/client/card-patches-controller.d.ts +152 -0
  31. package/lib/types/client/card-patches-controller.js +211 -0
  32. package/lib/types/client/index.js +42 -5
  33. package/lib/types/client/locales.d.ts +1 -1
  34. package/lib/types/client/locales.js +118 -12
  35. package/lib/types/client/team-presets-controller.d.ts +20 -0
  36. package/lib/types/client/team-presets-controller.js +15 -0
  37. package/lib/types/execution.d.ts +2 -2
  38. package/lib/types/execution.js +13 -11
  39. package/lib/types/index.js +90 -22
  40. package/lib/types/member-runtime.d.ts +40 -2
  41. package/lib/types/member-runtime.js +70 -2
  42. package/lib/types/member-store.d.ts +9 -0
  43. package/lib/types/member-store.js +13 -1
  44. package/lib/types/presentation.d.ts +12 -5
  45. package/lib/types/presentation.js +63 -10
  46. package/lib/types/preset-tools.js +3 -9
  47. package/lib/types/team-runtime.d.ts +25 -0
  48. package/lib/types/team-runtime.js +50 -0
  49. package/lib/types/tool-catalog.d.ts +64 -1
  50. package/lib/types/tool-catalog.js +103 -0
  51. package/lib/types/types.d.ts +69 -0
  52. package/package.json +52 -49
package/NOTICE CHANGED
@@ -36,3 +36,32 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
36
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
37
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38
38
  SOFTWARE.
39
+
40
+ Third-party browser bundles (optional card-patch assets)
41
+ =======================================================
42
+
43
+ `assets/card-patches/*.client.js.gz` are MODIFIED builds of two third-party
44
+ plugins, produced by this project from their published sources plus a small
45
+ registration service that lets a card render content contributed by another
46
+ plugin. They are never installed automatically: the settings page's
47
+ "Integrations" tab replaces a target's installed bundle only when the user
48
+ confirms it, keeps the original as a backup, and can restore it. Upstream
49
+ license texts are shipped beside them under `assets/card-patches/licenses/`.
50
+
51
+ 1. dsh-context 0.84.0
52
+ https://github.com/bowenliang123/dsh-context
53
+ revision aa98b1231d5f0f8e833391f198e65e14e73b3323
54
+ Licensed under the Apache License, Version 2.0 (see
55
+ assets/card-patches/licenses/dsh-context-LICENSE).
56
+ Changes: a new client module registers an optional `contextAgentCardBadges`
57
+ registry, and the shared Agent card renders components registered with it.
58
+ No other behaviour was changed.
59
+
60
+ 2. dsh-better-sidebar 0.32.0
61
+ https://github.com/omdsh-dev/DSH-better-sidebar
62
+ tag v0.32.0
63
+ Licensed under the MIT License (see
64
+ assets/card-patches/licenses/dsh-better-sidebar-LICENSE).
65
+ Changes: a new client module registers an optional
66
+ `betterSidebarAgentCardBadges` registry, and the tasks graph and tasks tree
67
+ render components registered with it. No other behaviour was changed.
package/README.md CHANGED
@@ -6,11 +6,28 @@
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.3.0** · [Tag](https://github.com/bloodarea/dsh-agent-team-presets/tree/v0.3.0)
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 adds optional **Preset** tags on other plugins' subagent cards, installed from the new **Integrations** settings page. It still requires **DeepSeek Harness 0.2.2-rc.2** and keeps the member runtime and header roster from 0.2.1. Prebuilt artifacts are included.
12
12
 
13
- ### What's new in 0.2.0
13
+ ### What's new in 0.3.0
14
+
15
+ - **Preset tags on subagent cards.** Members this plugin created are marked on dsh-context's Fleet cards and on dsh-better-sidebar's task cards. The integration is an adapter: it activates only for a target that exposes the optional card service and stays dormant otherwise, so neither package becomes a dependency.
16
+ - **A new Integrations settings page.** *Settings → Agent Team presets → Integrations* lists every supported target with the version this build patches, the installed version, the upstream revision the replacement was built from, and its current state, and offers install and remove behind a confirmation dialog.
17
+ - **The replacements ship with the plugin.** Both bundles are built from the pinned upstream sources plus a small registration service, and each is recorded with the sha256 of the published bundle and of the replacement, so a swap never overwrites bytes this plugin did not produce.
18
+ - **Install takes effect immediately.** After the swap the Host republishes that browser bundle and the running page reloads the plugin in place, so the tag appears within about a second — no `dsh web` restart and no page reload.
19
+ - **The source patches are published too.** `contrib/agent-card-badges` carries the same change as patches for the matching target versions, for building them yourself or sending them upstream.
20
+ - **Nothing irreversible.** The published bundle is backed up before it is replaced, remove restores it and deletes the backup, and a target whose bundle matches neither build is refused with the reason instead of being overwritten.
21
+
22
+ ### What changed in 0.2.1
23
+
24
+ - **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.
25
+ - **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.
26
+ - **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.
27
+ - **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.
28
+ - **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.
29
+
30
+ ### What changed in 0.2.0
14
31
 
15
32
  - **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
33
  - **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 +43,7 @@ A Team contains a **captain** and any number of **member roles**:
26
43
 
27
44
  - The captain uses the conversation's selected model, with its own role description, system prompt, and tool policy.
28
45
  - 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.
46
+ - The captain summons members through `spawn_team_member`; the Harness subagent runtime provides messaging, execution, and lifecycle.
30
47
 
31
48
  This is a community plugin, not the Harness's bundled `@deepseek-ai/dsh-experimental-agent-team-presets` development package.
32
49
 
@@ -42,7 +59,7 @@ DeepSeek Harness already ships Agent Teams with multi-agent collaboration. In th
42
59
  - **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
60
  - **Switching teams is inconvenient.** Pick a preset Team directly from the composer instead of rebuilding roles by hand.
44
61
 
45
- **Design principle:** native Agent Teams owns collaboration at runtime; this plugin owns configuring, managing, isolating, and reusing teams and their skills.
62
+ **Design principle:** the Harness subagent runtime owns collaboration at runtime; this plugin owns configuring, managing, isolating, and reusing teams and their skills.
46
63
 
47
64
  <a id="features"></a>
48
65
  ## Features
@@ -63,6 +80,7 @@ DeepSeek Harness already ships Agent Teams with multi-agent collaboration. In th
63
80
  - **Agent-facing tools:** root sessions provide `list_team_skills`, `assign_team_skill`, `unassign_team_skill`, and `remove_team_skill` alongside `get_team_preset` and `update_team_preset`.
64
81
  - **Live settings feedback:** see whether a Team is idle, busy, or awaiting an update in an online Session.
65
82
  - **Theme integration:** robust light and dark mode adaptation across all cards, dialogs, inputs, and dropdowns.
83
+ - **Subagent card badges:** tag the subagents a Team created on the Fleet and Tasks cards, through an optional card service each target plugin may expose.
66
84
 
67
85
  ## Contents
68
86
 
@@ -76,6 +94,7 @@ DeepSeek Harness already ships Agent Teams with multi-agent collaboration. In th
76
94
  - [Display metadata, categories, and search](#metadata-categories-search)
77
95
  - [Private Team Skills and per-agent isolation](#team-skills)
78
96
  - [Share presets](#share-presets)
97
+ - [Subagent card badges](#agent-card-badges)
79
98
  - [Agent-facing tools](#agent-facing-tools)
80
99
  - [Tool permissions and security](#tool-permissions)
81
100
  - [Troubleshooting and limitations](#known-limitations-and-deferred-work)
@@ -175,13 +194,13 @@ The captain always follows the Session, so selecting it changes the Team and the
175
194
  <a id="requirements"></a>
176
195
  ## Requirements
177
196
 
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>).
197
+ - **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
198
  - **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.
199
+ - **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
200
  - **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
201
  - **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
202
 
184
- The plugin version (`0.2.0`) and the Harness version (`0.2.2-rc.1`, for example) are separate version lines.
203
+ The plugin version (`0.3.0`) and the Harness version (`0.2.2-rc.2`, for example) are separate version lines.
185
204
 
186
205
  <a id="use-this-package"></a>
187
206
  ## Install and upgrade
@@ -223,8 +242,8 @@ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets
223
242
  #### Option 3 — reproducible pin (no update prompts)
224
243
 
225
244
  ```text
226
- dsh-agent-team-presets@0.2.0
227
- dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.2.0
245
+ dsh-agent-team-presets@0.3.0
246
+ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.3.0
228
247
  ```
229
248
 
230
249
  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 +264,7 @@ npm view dsh-agent-team-presets version
245
264
 
246
265
  ### Verify and upgrade safely
247
266
 
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.
267
+ 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.3.0`, and a running component.
249
268
 
250
269
  - Back up profile settings, Team definitions, and Session selections before upgrading.
251
270
  - When migrating from a development link, remove `@deepseek-ai/dsh-experimental-agent-team-presets` first before enabling the community package.
@@ -382,6 +401,36 @@ Traditional skills in Harness are typically registered into the global environme
382
401
  - **Name collisions:** Choose between replacing the existing preset or creating a renamed copy. Replacement preserves local routes and tool policies on matched roles.
383
402
  - Review imported prompts before executing tasks, especially when using documents from third parties.
384
403
 
404
+ <a id="agent-card-badges"></a>
405
+ ## Subagent card badges
406
+
407
+ Cards in **dsh-context** (Fleet view, top bar) and **dsh-better-sidebar** (Tasks page, right sidebar) can mark the subagents this plugin created with a small `Preset` tag. The integration is an adapter:
408
+
409
+ - **Opt-in by target.** Each target must expose its optional card-badge service (`contextAgentCardBadges` / `betterSidebarAgentCardBadges`, protocol version 1). This plugin registers into a service only when it appears, does not require either package, and keeps working unchanged when neither is installed.
410
+ - **Exact identity.** A tag appears only for a card whose real child Session id matches a durable member snapshot written before creation, so ordinary subagents and workflow placeholder nodes stay unmarked. The lookup reads stored records and never resumes or reads a card's Agent.
411
+ - **Layout neutral.** The tag is one inline, theme-token chip with fixed height; it adds no card row and clips inside the existing badge area.
412
+
413
+ ### Install it from Settings
414
+
415
+ Neither target published such a service at the time of writing, so this plugin ships **prebuilt replacement bundles** for the exact versions listed below and offers them in **Settings → Agent Team presets → Integrations**:
416
+
417
+ | Target | Version this build patches | What the row offers |
418
+ | --- | --- | --- |
419
+ | `dsh-context` | 0.84.0 | Install patch / Remove patch |
420
+ | `dsh-better-sidebar` | 0.32.0 | Install patch / Remove patch |
421
+
422
+ Each row reports its own state, and the page never guesses: `not installed`, `version not supported`, `not patched`, `patched`, `modified by something else`. "Install patch" asks for confirmation, backs up the target's `lib/client.js`, then writes this plugin's build of the same source. "Remove patch" restores that backup and deletes it.
423
+
424
+ **No restart and no page reload.** The running server's `client-hmr` transport stat-polls every client bundle, republishes the changed one (`clientModules.rebuilt`), and the page reloads that plugin in place — the row turns `active` within about a second, and the badge appears on the cards. If a row stays `patched` without going `active`, reload the page once.
425
+
426
+ Safety rules worth knowing:
427
+
428
+ - A target whose bundle matches neither the published build nor this plugin's replacement is refused, because overwriting it would destroy an edit this plugin cannot reproduce.
429
+ - Only the one pinned version per target is patchable; installing a newer target version makes the row report `version not supported` until a build for it ships here.
430
+ - Upgrading a patched target replaces its bundle, which silently removes the patch — the row then reports `not patched` again.
431
+
432
+ If you would rather not use the bundled builds, the same change is available as source patches in [`contrib/agent-card-badges`](contrib/agent-card-badges/README.md) for applying to the matching target and rebuilding it yourself, and as upstream-ready changes for the target maintainers.
433
+
385
434
  <a id="agent-facing-tools"></a>
386
435
  ## Agent-facing tools
387
436
 
@@ -449,7 +498,7 @@ The plugin registers `agent-team-presets-troubleshooting` on the global skill la
449
498
 
450
499
  | Symptom | What to check |
451
500
  |---|---|
452
- | Settings page is absent or plugin pending | Confirm profile type, peer dependencies, Agent Teams enablement, and client services. |
501
+ | Settings page is absent or plugin pending | Confirm profile type, peer dependencies, subagent backends (default `spawn`/`fork`), and client services. |
453
502
  | 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
503
  | 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
504
  | 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,33 @@
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.3.0** · [标签](https://github.com/bloodarea/dsh-agent-team-presets/tree/v0.3.0)
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**,成员运行时与会话头部名册沿用 0.2.1。仓库包含预构建产物,安装时无需构建。
12
+
13
+ ### 0.3.0 更新内容
14
+
15
+ - **子代理卡片上的「预设」标签。** 由本插件创建的成员会在 dsh-context 的编队卡片与 dsh-better-sidebar 的任务卡片上被标出。接入方式是适配器:只有目标插件提供了可选卡片服务时才激活,否则保持待命,因此两个包都不会变成依赖。
16
+ - **新增「插件联动」设置页。** *设置 → 智能体团队预设 → 插件联动* 逐条列出目标插件、本补丁适配的版本、已安装版本、替换包的构建来源与当前状态,并在确认框后提供安装与卸载。
17
+ - **替换包随插件分发。** 两份浏览器包都由固定上游源码加一个很小的注册服务构建,并记录「发布版」与「替换包」两侧的 sha256,所以替换永远不会覆盖本插件没有产出的字节。
18
+ - **安装即时生效。** 写入后宿主立即重新发布该浏览器包,运行中的页面就地重新加载该插件,标签约一秒内出现 —— 不需要重启 `dsh web`,也不需要刷新页面。
19
+ - **源码补丁同样公开。** `contrib/agent-card-badges` 提供同一改动的源码补丁,可自行应用到匹配版本并重新构建,或提交给上游。
20
+ - **没有不可逆操作。** 替换前先备份发布版,卸载时还原并删除备份;如果目标插件的浏览器包既不是发布版也不是本插件的替换包,操作会被拒绝并说明原因,而不是强行覆盖。
21
+
22
+ ### 0.2.1 更新内容
23
+
24
+ - **成员就是标准 subagent。** `spawn_team_member` 改用 `ctx.subagents.startActivation` 创建成员,并在成员快照里预写子会话身份,因此成员自己的模型路由、角色提示词、团队上下文与严格工具策略仍然对它**第一次**模型请求生效。
25
+ - **不再需要 Agent Teams bundle。** 树归属与执行状态改从 subagent 运行时的 catalog、在线 Agent 与创建准入记录读取,不再依赖已移除的 Team 名册、消息与成员接口。
26
+ - **卸载只停止本插件启动的那些实例。** 每次创建的回执都会保留并在卸载时释放;rc.2 没有针对单个冷恢复成员的选择性释放能力,因此这类成员只中断当前工作,其 Agent 作用域内的策略一直保留到 Agent 销毁。
27
+ - **会话头部重新显示团队。** 按官方 `agent-team` 客户端源码复刻 rc.1 的头部动作:队长与本次会话已召唤成员的名册,每行带实时状态与所用模型。队长行只读,成员行可跳到该成员会话;下方是共享任务区,逐条给状态、依赖、写入范围与可展开描述。仅当部署的团队开关打开、且本会话已选预设时渲染。
28
+ - **对 0.2.2-rc.2 宿主的适配。** 名册改按本会话的成员快照与团队选择读取(不再依赖被移除的 Team 投影);样式里的阴影 token 改为 `--dsw-elevation-stroke-color`;远端契约测试同时接受惰性 `spec` 与内联 schema 两种产物形态。
12
29
 
13
30
  ### 0.2.0 更新内容
14
31
 
15
32
  - **PTC 会话可以用自定义工具策略了。** 在 PTC 预设下应用自定义白名单时,插件把宿主自带的 native 工具执行器注册到该会话的 Agent 作用域并从不释放:部署级执行器与其他会话仍走 PTC,注册归该 Agent 所有并随其销毁。代价是明确的 —— 该会话此后不再使用 `run_code`,直到它结束。挂载失败、或挂载后工具面仍暴露 PTC 传输时会拒绝应用,且因为从未释放,会话保留原有工具面。
16
33
  - **名额耗尽时能看出是谁占的。** 召唤被拒时现在会报 `N/M` 个 roster 槽位被占用、按名字列出创建从未成功的占位,并说明宿主 roster 只追加、无移除 API —— 让"永远不能再召唤"的团队与"暂时忙"的团队可区分。
17
34
 
18
- 沿用 0.1.9:输入区与单个成员单独对话、Harness 0.2.2-rc.1 适配(`agent.model.select()` 路由、按步工具激活)、内置排障 Skill。
35
+ 沿用 0.1.9:输入区与单个成员单独对话、`agent.model.select()` 成员路由、按步工具激活、内置排障 Skill。
19
36
 
20
37
  <a id="project-introduction"></a>
21
38
  ## 项目介绍
@@ -26,7 +43,7 @@
26
43
 
27
44
  - 队长使用当前会话选择的模型,并拥有独立的角色描述、系统提示词和工具策略。
28
45
  - 每个成员可分别配置提供商、模型、推理强度、系统提示词、工具策略与专属 Team Skill。
29
- - 队长通过 `spawn_team_member` 召唤成员;消息、共享任务板和运行时协作由原生 Agent Teams 提供。
46
+ - 队长通过 `spawn_team_member` 召唤成员;消息投递、执行与生命周期由 Harness 的 subagent 运行时提供。
30
47
 
31
48
  本项目是社区插件,不是 Harness 随附的 `@deepseek-ai/dsh-experimental-agent-team-presets` 开发包。
32
49
 
@@ -63,6 +80,7 @@ DeepSeek Harness 原生 Agent Teams 已经具备多智能体协作能力。在
63
80
  - **面向智能体的会话工具:** 根会话提供 `list_team_skills`、`assign_team_skill`、`unassign_team_skill`、`remove_team_skill`,以及 `get_team_preset`、`update_team_preset`。
64
81
  - **实时状态反馈:** 查看在线会话中的团队是空闲、忙碌,还是有修改等待采用。
65
82
  - **深浅色主题适配:** 完整适配深色(Dark)与浅色(Light)模式,卡片、弹窗与九宫格均有良好对比度,无白底白字。
83
+ - **子代理卡片预设标签:** 目标插件提供可选卡片服务时,在编队与任务管理卡片上标出本团队创建的子代理。
66
84
 
67
85
  ## 目录
68
86
 
@@ -76,6 +94,7 @@ DeepSeek Harness 原生 Agent Teams 已经具备多智能体协作能力。在
76
94
  - [展示元数据、本地分类与搜索](#metadata-categories-search)
77
95
  - [私有团队技能与角色作用域隔离](#team-skills)
78
96
  - [分享预设](#share-presets)
97
+ - [子代理卡片预设标签](#agent-card-badges)
79
98
  - [面向智能体的工具](#agent-facing-tools)
80
99
  - [工具权限与安全边界](#tool-permissions)
81
100
  - [排障与使用限制](#known-limitations-and-deferred-work)
@@ -175,13 +194,13 @@ DeepSeek Harness 原生 Agent Teams 已经具备多智能体协作能力。在
175
194
  <a id="requirements"></a>
176
195
  ## 环境要求
177
196
 
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` 判定兼容性。
197
+ - **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
198
  - **自定义工具白名单在 PTC 下通过给该会话一个自己的 native 面来工作。** 宿主无法在释放执行器后恢复继承,所以插件从不主动释放:在 PTC 预设下它把宿主自带的 native 工具执行器挂到该会话的 Agent 作用域,部署级执行器保持原样。代价是明确的:该会话此后不再使用 `run_code`,而其他会话与「所有工具」模式继续走 PTC。若挂载失败、或挂载后工具面仍暴露 PTC 传输,则应用被拒绝且不留残留 —— 因为从未释放过任何执行器。
180
- - **目标 profile 已启用 Agent Teams。** 标准集成是 `@deepseek-ai/dsh-experimental-agent-team-profile`,提供团队服务、工具和 Web 名册。本插件负责配置与管理团队,不替代该子系统。
199
+ - **无需 Agent Teams bundle。** 成员通过部署自带的可继续执行 subagent 后端创建;原生消息、任务工具与 Web 名册不受本插件影响。
181
200
  - **具备 Settings 与所需客户端服务的 Web 或 Desktop profile。** 安装到实际使用的 profile:Web GUI 通常为 `web`,Desktop 通常为 `desktop`。
182
201
  - **成员执行所需的持久存储与支持恢复执行的子智能体后端。** 缺少 storage domain 或所选执行后端时,插件会拒绝创建成员。默认后端名为 `spawn` 和 `fork`。
183
202
 
184
- 插件版本(`0.2.0`)和 Harness 版本(如 `0.2.2-rc.1`)是不同的版本线。
203
+ 插件版本(`0.3.0`)和 Harness 版本(如 `0.2.2-rc.2`)是不同的版本线。
185
204
 
186
205
  <a id="use-this-package"></a>
187
206
  ## 安装与升级
@@ -223,8 +242,8 @@ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets
223
242
  #### 方式三 —— 可复现的固定版本(收不到更新提示)
224
243
 
225
244
  ```text
226
- dsh-agent-team-presets@0.2.0
227
- dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.2.0
245
+ dsh-agent-team-presets@0.3.0
246
+ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.3.0
228
247
  ```
229
248
 
230
249
  固定版本号或固定标签只能复现一个确定的发布。**带 `#标签` 的 GitHub 规格只会与同一个标签比对,市场永远不会提示更新——升级只能手动改规格。** 只在确实需要冻结安装时使用这种形式。
@@ -245,7 +264,7 @@ npm view dsh-agent-team-presets version
245
264
 
246
265
  ### 确认安装并安全升级
247
266
 
248
- 安装成功后,按插件管理器的提示重新加载或重启,打开 **设置 → 智能体团队预设**。确认插件详情显示 `dsh-agent-team-presets`、版本 `0.2.0`,且组件处于运行中状态。
267
+ 安装成功后,按插件管理器的提示重新加载或重启,打开 **设置 → 智能体团队预设**。确认插件详情显示 `dsh-agent-team-presets`、版本 `0.3.0`,且组件处于运行中状态。
249
268
 
250
269
  - 升级前备份 profile 设置、团队定义与会话选择记录。
251
270
  - 从开发链接迁移时,先通过插件管理器移除 `@deepseek-ai/dsh-experimental-agent-team-presets`,再启用社区包。
@@ -382,6 +401,36 @@ npm view dsh-agent-team-presets version
382
401
  - **名称冲突:** 自由选择覆盖替换已有预设或改名新建。覆盖替换会保留原有角色的本地模型路由与工具策略。
383
402
  - 导入来自第三方的预设前,请仔细核对其提示词与权限。
384
403
 
404
+ <a id="agent-card-badges"></a>
405
+ ## 子代理卡片预设标签
406
+
407
+ **dsh-context**(顶部编队)与 **dsh-better-sidebar**(右侧任务管理)里的子代理卡片,可以给本插件创建的子代理加上一个 `预设` 小标签。接入方式是适配器:
408
+
409
+ - **按目标启用。** 目标插件必须提供自己的可选卡片标签服务(`contextAgentCardBadges` / `betterSidebarAgentCardBadges`,协议版本 1)。只有该服务出现时本插件才注册进去;本插件不依赖这两个包,两者都没装时行为完全不变。
410
+ - **精确身份。** 只有卡片对应的真实子会话 ID 与创建前写入的成员快照一致时才显示标签,普通子代理与工作流占位节点不会被误标。查询只读持久记录,不会唤醒或读取卡片对应的 Agent。
411
+ - **不改变布局。** 标签是一个行内主题色小块,高度固定,不新增卡片行,并在既有标签区内裁剪。
412
+
413
+ ### 在设置页里安装
414
+
415
+ 到目前为止两个目标都还没有发布该服务,因此本插件随包提供**预构建的替换包**,并在 **设置 → 团队预设 → 插件联动** 中提供:
416
+
417
+ | 目标插件 | 本版补丁适配的版本 | 该行可执行的操作 |
418
+ | --- | --- | --- |
419
+ | `dsh-context` | 0.84.0 | 安装补丁 / 卸载补丁 |
420
+ | `dsh-better-sidebar` | 0.32.0 | 安装补丁 / 卸载补丁 |
421
+
422
+ 每一行都会报告自己的真实状态,页面不做猜测:`未安装`、`版本不支持`、`未打补丁`、`已打补丁`、`已被其他改动修改`。「安装补丁」会先弹出确认框,备份目标插件的 `lib/client.js`,再写入本插件用同一份源码构建的替换包;「卸载补丁」从该备份还原并删除备份。
423
+
424
+ **不需要重启,也不需要刷新页面。** 运行中的服务器由 `client-hmr` 每 500ms 轮询每个插件的浏览器包,发现变化就重新发布(`clientModules.rebuilt`),页面随之就地重新加载该插件——约一秒后该行变为「已生效」,卡片上的标签同时出现。若某行长时间停在「已打补丁」而没有「已生效」,刷新一次页面即可。
425
+
426
+ 几条安全规则:
427
+
428
+ - 如果目标插件的浏览器包既不是发布版、也不是本插件的替换版,操作会被拒绝:覆盖它等于毁掉一份本插件无法重现的改动。
429
+ - 每个目标只支持一个固定版本;目标升级到新版本后,该行会显示 `版本不支持`,直到本插件发布对应构建。
430
+ - 升级已打补丁的目标插件会覆盖其浏览器包,补丁随之消失,该行会重新显示 `未打补丁`。
431
+
432
+ 如果不希望使用随包构建,同样的改动也以源码补丁形式放在 [`contrib/agent-card-badges`](contrib/agent-card-badges/README.md),可自行应用到匹配版本并重新构建。
433
+
385
434
  <a id="agent-facing-tools"></a>
386
435
  ## 面向智能体的工具
387
436
 
@@ -449,7 +498,7 @@ Configuration for "agent-team-presets" is overridden by a home patch or command-
449
498
 
450
499
  | 现象 | 排查方向 |
451
500
  |---|---|
452
- | 看不到设置页或插件处于 pending | 检查 profile 类型、peer 依赖兼容性、Agent Teams 是否启用及客户端服务。 |
501
+ | 看不到设置页或插件处于 pending | 检查 profile 类型、peer 依赖兼容性、subagent 后端(默认 `spawn`/`fork`)是否可用及客户端服务。 |
453
502
  | 技能删除按钮置灰不可点击 | 技能受保护:查看弹窗中的阻断列表,需先在对应团队角色中取消分配。 |
454
503
  | 技能分配被拒绝 (`dependency-missing`) | 技能声明的某个必需命令行程序在宿主 `PATH` 上未找到。注意声明的 MCP 服务仅供展示参考,不阻断分配;如需使用请确认 profile 中已正确配置并连接对应 MCP。 |
455
504
  | 成员创建被拒绝 | 检查持久存储、执行后端(`spawn`/`fork`)、模型配额及并发限额。 |
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-external
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2025 bowenliang123
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.