dsh-agent-team-presets 0.1.3 → 0.1.5

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 (65) hide show
  1. package/README.md +289 -186
  2. package/README.zh.md +286 -172
  3. package/lib/THIRD-PARTY-NOTICES.txt +23 -0
  4. package/lib/client.js +1965 -1065
  5. package/lib/index.js +6423 -142
  6. package/lib/typert.host.js +4112 -65
  7. package/lib/typert.remote-client.js +4106 -60
  8. package/lib/types/application.d.ts +51 -4
  9. package/lib/types/application.js +239 -34
  10. package/lib/types/builtin-teams.d.ts +101 -0
  11. package/lib/types/builtin-teams.js +331 -0
  12. package/lib/types/client/ComposerTeamSelect.d.ts +1 -2
  13. package/lib/types/client/ComposerTeamSelect.js +20 -8
  14. package/lib/types/client/FieldPicker.d.ts +0 -1
  15. package/lib/types/client/TeamAgentView.d.ts +2 -1
  16. package/lib/types/client/TeamAgentView.js +79 -6
  17. package/lib/types/client/TeamEditorView.d.ts +0 -1
  18. package/lib/types/client/TeamEditorView.js +1 -1
  19. package/lib/types/client/TeamImportDialog.d.ts +0 -1
  20. package/lib/types/client/TeamListView.d.ts +2 -1
  21. package/lib/types/client/TeamListView.js +2 -2
  22. package/lib/types/client/TeamPresetsSection.d.ts +0 -1
  23. package/lib/types/client/TeamPresetsSection.js +26 -7
  24. package/lib/types/client/appearance.d.ts +22 -2
  25. package/lib/types/client/appearance.js +6 -0
  26. package/lib/types/client/index.d.ts +13 -2
  27. package/lib/types/client/index.js +23 -4
  28. package/lib/types/client/locales.d.ts +42 -2
  29. package/lib/types/client/locales.js +100 -2
  30. package/lib/types/client/preset-file.d.ts +0 -1
  31. package/lib/types/client/team-presets-controller.d.ts +193 -3
  32. package/lib/types/client/team-presets-controller.js +332 -18
  33. package/lib/types/config.d.ts +17 -1
  34. package/lib/types/config.js +9 -9
  35. package/lib/types/delegation.d.ts +71 -0
  36. package/lib/types/delegation.js +177 -0
  37. package/lib/types/execution.d.ts +5 -1
  38. package/lib/types/execution.js +8 -2
  39. package/lib/types/index.d.ts +0 -1
  40. package/lib/types/index.js +526 -62
  41. package/lib/types/member-identity.d.ts +142 -0
  42. package/lib/types/member-identity.js +343 -0
  43. package/lib/types/member-runtime.d.ts +255 -0
  44. package/lib/types/member-runtime.js +458 -0
  45. package/lib/types/member-store.d.ts +160 -0
  46. package/lib/types/member-store.js +198 -0
  47. package/lib/types/presentation.d.ts +128 -0
  48. package/lib/types/presentation.js +119 -0
  49. package/lib/types/preset-editor.d.ts +0 -1
  50. package/lib/types/preset-tools.d.ts +0 -1
  51. package/lib/types/preset-tools.js +27 -5
  52. package/lib/types/preset-transfer.d.ts +0 -1
  53. package/lib/types/preset-transfer.js +1 -0
  54. package/lib/types/presets.d.ts +15 -1
  55. package/lib/types/presets.js +38 -1
  56. package/lib/types/settings-reconcile.d.ts +24 -0
  57. package/lib/types/settings-reconcile.js +101 -0
  58. package/lib/types/tool-catalog.d.ts +6 -7
  59. package/lib/types/tool-catalog.js +99 -11
  60. package/lib/types/tool-descriptions.d.ts +21 -0
  61. package/lib/types/tool-descriptions.js +21 -0
  62. package/lib/types/tool-policy.d.ts +66 -0
  63. package/lib/types/tool-policy.js +138 -0
  64. package/lib/types/types.d.ts +45 -5
  65. package/package.json +37 -8
package/README.md CHANGED
@@ -2,300 +2,403 @@
2
2
 
3
3
  <img src="banner.png" alt="Reusable Agent Team presets for DeepSeek Harness" width="100%">
4
4
 
5
- English | [中文](README.zh.md)
6
-
7
- > **Status: community plugin v0.1.3.** Install it with
8
- > `dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets`.
9
- > That floating form is the one the plugin market can offer updates for; to
10
- > reproduce one exact release, pin the ref with `#v0.1.3` instead — a pinned
11
- > install is compared only against that same ref, so the market never offers an
12
- > update for it, by design.
13
- > The supported Harness peer range is `>=0.2.0-rc.1 <0.3.0`, checked by the plugin
14
- > manager; the Harness version is not this plugin's version. Plugin details for
15
- > `dsh-agent-team-presets` should show `v0.1.3`. A card naming
16
- > `@deepseek-ai/dsh-experimental-agent-team-presets` instead is the monorepo
17
- > development package, whose version follows the Harness (for example,
18
- > `0.2.0-rc.2`), not this community release. `lib/` ships prebuilt; rebuilding
19
- > source needs a Harness checkout — see [DEVELOPMENT.md](DEVELOPMENT.md) and
20
- > [CHANGELOG.md](CHANGELOG.md).
21
-
22
- ## Summary
23
-
24
- `dsh-agent-team-presets` adds a Settings page that configures named Agent Teams and a composer control that applies one Team to a Session. A Team has a captain and any number of members: the captain carries its own prompt and tool policy, while each member also carries its own provider/model route and reasoning effort, read from the stored Team each time that member is summoned. Applying a Team installs the captain's prompt, restricts its tools, and registers `spawn_team_member`, which summons a member with that member's own persona, route, effort, and tools. A captain leads on the model the Session already selected.
5
+ *Concept illustration. See [Screenshots](#screenshots) for the plugin interface; the captain uses the conversation's selected model.*
6
+
7
+ English | [中文](<README.zh.md>)
8
+
9
+ > **Community plugin v0.1.5** · [Release](https://github.com/bloodarea/dsh-agent-team-presets/releases/tag/v0.1.5)
10
+ >
11
+ > Requires a compatible DeepSeek Harness deployment with Agent Teams enabled. This version uses rc.2 APIs; see [Requirements](#requirements). Prebuilt artifacts are included, so installation does not require a source build.
25
12
 
26
13
  <a id="project-introduction"></a>
27
- ## Project introduction
14
+ ## Overview
15
+
16
+ **dsh-agent-team-presets** is a visual Team preset manager for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness). Configure a Team once, then select it from the conversation composer whenever you need it.
17
+
18
+ A Team contains a **captain** and any number of **member roles**:
28
19
 
29
- > Turn DeepSeek Harness Agent Teams from ad-hoc lineups into configurable, reusable professional AI teams.
20
+ - The captain uses the conversation's selected model, with its own role description, system prompt, and tool policy.
21
+ - Each member can have a different provider, model, reasoning effort, system prompt, and tool policy.
22
+ - The captain summons members through `spawn_team_member`; native Agent Teams provides messaging, the shared task board, and runtime coordination.
30
23
 
31
- **dsh-agent-team-presets** is a visual Agent Team preset manager for DeepSeek Harness. It configures roles, per-member models, reasoning effort, system prompts, and tool permissions, so a professional AI team is configured once and reused on demand.
24
+ This is a community plugin, not the Harness's bundled `@deepseek-ai/dsh-experimental-agent-team-presets` development package.
32
25
 
33
26
  <a id="why-this-plugin"></a>
34
27
  ## Why this plugin?
35
28
 
36
- DeepSeek Harness already ships Agent Teams with multi-agent collaboration, but it leaves room in per-team configuration and reuse.
29
+ DeepSeek Harness already ships Agent Teams with multi-agent collaboration. In the Harness versions this plugin supports, per-Team configuration and reuse are still left to the user, which is what this plugin addresses:
37
30
 
38
- This plugin addresses five gaps:
31
+ - **Teams are hard to reuse.** In those versions, native teams focus on runtime creation and collaboration, with no visual preset management; this plugin saves, duplicates, and reuses named presets.
32
+ - **Role setup is repetitive.** Each role's name, description, and system prompt are configured once instead of re-described every time.
33
+ - **Splitting work across models is awkward.** Every member picks its own model and reasoning effort, so one Team combines models by task, while the captain keeps leading on the Session's model.
34
+ - **Tool permissions have no fine-grained entry point.** In those versions the native tool surface offers no per-role allow-list; here the captain and each member carry their own, so roles differ in what they may use.
35
+ - **Switching teams is inconvenient.** Pick a preset Team from the composer instead of rebuilding roles by hand.
39
36
 
40
- - **Teams are hard to reuse.** Native teams focus on runtime creation and collaboration and offer no visual preset management; this plugin saves, duplicates, and reuses team configurations.
41
- - **Role setup is repetitive.** Member responsibilities no longer have to be re-described every time: each role's name, description, and system prompt are configured in advance.
42
- - **Splitting work across models is awkward.** Every member picks its own model and reasoning effort, so one team combines models by task; the captain keeps leading on the model the session already selected.
43
- - **Tool permissions have no fine-grained entry point.** The captain and each member carry their own global tool allow-list, so roles differ in what they may use.
44
- - **Switching teams is inconvenient.** Pick a preset team from the composer, with no repeated manual role setup.
37
+ **Design principle:** native Agent Teams owns collaboration at runtime; this plugin owns configuring, managing, and reusing teams.
45
38
 
46
- **Design principle:** native Agent Teams owns collaboration at runtime; dsh-agent-team-presets owns configuring, managing, and reusing teams.
39
+ <a id="features"></a>
40
+ ## Features
41
+
42
+ - **Reusable Teams:** create, duplicate, edit, select, and delete named presets.
43
+ - **Per-member model routes:** assign models and reasoning effort to individual roles without changing the captain's model.
44
+ - **Independent tool policies:** choose all available tools or a custom allow-list for the captain and each member.
45
+ - **Portable presets:** import and export role definitions while keeping deployment-specific routes and tool permissions local.
46
+ - **Built-in starting points:** lightweight, standard, and full-stack software development Teams.
47
+ - **Live settings feedback:** see whether a Team is idle, busy, or awaiting an update in an online Session.
48
+
49
+ ## Contents
50
+
51
+ - [Overview](#project-introduction)
52
+ - [Why this plugin?](#why-this-plugin)
53
+ - [Features](#features)
54
+ - [Screenshots](#screenshots)
55
+ - [Requirements](#requirements)
56
+ - [Install and upgrade](#use-this-package)
57
+ - [Configure and use a Team](#configure-a-team)
58
+ - [Share presets](#share-presets)
59
+ - [Let the captain edit a preset](#edit-presets-with-tools)
60
+ - [Tool permissions and security](#tool-permissions)
61
+ - [Troubleshooting and limitations](#known-limitations-and-deferred-work)
62
+ - [How it works](#understand-the-implementation)
63
+ - [Development and contributing](#development)
64
+ - [Related resources](#further-exploration)
65
+ - [License](#license)
47
66
 
48
67
  <a id="screenshots"></a>
49
68
  ## Screenshots
50
69
 
51
- **The Team control in the composer** — apply one preset Team to this Session, or clear it.
70
+ The screenshots illustrate the composer control and settings workflow. Example Team and provider names are illustrative; available models and tools depend on your deployment. Some screenshots show an earlier UI revision, so controls and helper text may differ from v0.1.5. The permission rules below describe the current version.
52
71
 
53
- ![The Team control in the composer](docs/images/01-composer-team-control.png)
72
+ **Choose a Team in the composer**
54
73
 
55
- **Settings → Agent team presets** — every configured Team, with create, duplicate, and delete.
74
+ ![The Team control in the composer](<docs/images/01-composer-team-control.png>)
56
75
 
57
- ![The Team list in Settings](docs/images/02-team-list.png)
76
+ **Manage saved Teams**
58
77
 
59
- **One Team** — its name and description, the captain, and the member roster.
78
+ ![The Team list in Settings](<docs/images/02-team-list.png>)
60
79
 
61
- ![One Team's editor](docs/images/03-team-editor.png)
80
+ **Configure member models and reasoning effort**
62
81
 
63
- **One member** — its own provider, model, and reasoning effort. The captain leads on the Session model, so only a member carries a route.
82
+ ![A member's model settings](<docs/images/04-member-route.png>)
64
83
 
65
- ![One member's route pickers](docs/images/04-member-route.png)
84
+ <details>
85
+ <summary>More settings screenshots</summary>
66
86
 
67
- **The model picker** — every provider and model the deployment currently advertises.
87
+ **Team editor**
68
88
 
69
- ![The model picker](docs/images/05-model-picker.png)
89
+ ![One Team's editor](<docs/images/03-team-editor.png>)
70
90
 
71
- ## Table of Contents
91
+ **Model picker**
72
92
 
73
- - [Project introduction](#project-introduction)
74
- - [Why this plugin?](#why-this-plugin)
75
- - [Screenshots](#screenshots)
76
- - [Use this package](#use-this-package)
77
- - [Understand the implementation](#understand-the-implementation)
78
- - [Further Exploration](#further-exploration)
79
- - [Model Experience](#model-experience)
80
- - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
81
- - [Dev Note](#dev-note)
93
+ ![The model picker](<docs/images/05-model-picker.png>)
94
+
95
+ **Captain and member system prompts**
96
+
97
+ ![The captain's system prompt](<docs/images/06-captain-system-prompt.png>)
98
+
99
+ ![A member's system prompt](<docs/images/07-member-system-prompt.png>)
100
+
101
+ **Tool policy controls**
82
102
 
83
- -----
103
+ ![Default tool policy](<docs/images/08-tools-default.png>)
104
+
105
+ ![Custom tool policy](<docs/images/09-tools-custom.png>)
106
+
107
+ </details>
108
+
109
+ <a id="requirements"></a>
110
+ ## Requirements
111
+
112
+ - **DeepSeek Harness with the required rc.2 APIs.** Several dependencies require `>=0.2.0-rc.2 <0.3.0`, while others have broader peer ranges. The plugin manager checks every declared dependency; the exact requirements are in [package.json](<package.json>). Do not treat rc.1 as sufficient for this release.
113
+ - **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 Teams; it does not replace that subsystem.
114
+ - **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.
115
+ - **Durable storage and a continuable subagent backend for member execution.** Member creation is refused if the storage domain or the selected execution backend is unavailable. The default backend names are `spawn` and `fork`; custom deployments must configure compatible backends.
116
+
117
+ The plugin version (`0.1.5`) and the Harness version (`0.2.0-rc.2`, for example) are separate version lines.
84
118
 
85
119
  <a id="use-this-package"></a>
86
- ## Use this package
120
+ ## Install and upgrade
121
+
122
+ ### One-click install in the GUI (Add plugin)
123
+
124
+ No command line required: open **Global panels → Plugins → Add plugin**, paste the line below into **Package name or address**, and click **Install**.
87
125
 
88
- Install the bundle into a profile that already composes `@deepseek-ai/dsh-experimental-agent-team-profile` (the Team service, the Team tools, and the Web roster), then open Settings → Agent team presets.
126
+ ```text
127
+ dsh-agent-team-presets@0.1.5
128
+ ```
129
+
130
+ <!-- release-version: keep in sync with package.json version -->
131
+
132
+ - **Registry** selects which npm source the download comes from. **Default registry** means whatever pnpm's own configuration names: on a machine whose `~/.npmrc` already points at `registry.npmmirror.com`, that *is* the mainland mirror, so the dialog lists no separate **Mainland China mirror** entry. Pick **Official npm registry** to bypass a mirror, or **Custom address** for a third source — an internal registry, or another mirror such as `https://mirrors.cloud.tencent.com/npm/` or `https://repo.huaweicloud.com/repository/npm/`.
133
+ - `@0.1.5` names the version; drop it and enter `dsh-agent-team-presets` to take whatever npm currently publishes.
134
+ - The field takes the same specs as `dsh plugin add`: a package name, `name@version`, `github:owner/repo`, a tarball URL, or an absolute path. The check before installing queries the package, so a version that does not exist or a package without `dsh.bundle` is refused before anything is written.
135
+ - This package declares its own `dsh.bundle`, so the plugin manager registers it as a profile bundle layer; do not add a loader entry by hand.
136
+ - Once the package is installed the field cannot install it again: the manager matches on package name and reports that it is already installed. To change installation source (for example from `github:…#v0.1.4` to the npm form), uninstall it in the plugin list first, then paste the spec above.
137
+ - The plugin manager only installs and enables; reload or restart as it instructs afterwards. Use the npm form when you want later releases to be offered; a pinned-ref source install is compared only with that ref and never advertises a newer one (see below).
138
+
139
+ ### Install from GitHub
89
140
 
90
- ### Install, upgrade, and verify the version
141
+ For an installation that can receive repository-version update notifications:
91
142
 
92
143
  ```sh
93
144
  dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets
94
145
  ```
95
146
 
96
- Replace `<profile>` with the profile the GUI actually runs (for example, `web`).
97
- This floating form is the one the plugin market can offer updates for: the market
98
- compares the repository's `package.json` version against the installed one, so a
99
- release is advertised when that version moves — a commit that does not bump it is
100
- not offered. To reproduce one exact release instead, pin the ref:
147
+ Replace `<profile>` with the profile your GUI runs. For example:
101
148
 
102
149
  ```sh
103
- dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.1.3
150
+ dsh plugin --profile web add github:bloodarea/dsh-agent-team-presets
104
151
  ```
105
152
 
106
- A pinned install is compared only against that same ref, so the market never offers
107
- an update for it, by design. To move a profile from the development link to this
108
- release by hand, back up the profile and its Team configuration, remove the
109
- installed package, then install this one into the same profile. If the old package
110
- is the development link, remove `@deepseek-ai/dsh-experimental-agent-team-presets`,
111
- not `dsh-agent-team-presets`.
112
- Do not enable both packages: they own the same `agent-team-presets` settings and
113
- client registrations. When migrating a development profile, keep the Team
114
- configuration and selections under that entry id, but replace its module name
115
- and the selected bundle with `dsh-agent-team-presets`.
153
+ To select the v0.1.4 release tag instead:
116
154
 
117
- After switching package identities, restart the running Harness and refresh the
118
- GUI; a page refresh alone can leave the old client entry in the Host's module
119
- table and produce duplicate-plugin boot failures. Verify the plugin details show
120
- both `dsh-agent-team-presets` and `v0.1.3`, with its component running. The
121
- Harness's own `0.2.0-rc.*` version is a separate compatibility requirement.
122
-
123
- ### Configure a Team
155
+ ```sh
156
+ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.1.4
157
+ ```
124
158
 
125
- Settings → Agent team presets is three stacked pages, so a narrow Settings panel never crowds:
159
+ An unpinned GitHub install follows the repository's package version for market update checks; commits without a version increase do not produce a new-version notification. A pinned ref is compared only with that ref, so later releases are not offered automatically. Use a commit SHA rather than a tag if you need an immutable source reference.
126
160
 
127
- 1. **Teams** — every configured Team as one row (name, member count, session model). Create, duplicate, or delete from here.
128
- 2. **One Team** — its name and description, the captain row, and the member roster. Adding a member opens that member's page.
129
- 3. **One agent** (captain or member) — identity, tools, and system prompt, each in its own card; a member page adds the model card and deletes that member.
161
+ ### npm release channel
130
162
 
131
- Every edit is staged and written by the **Save** control in the shared footer; the stored value lives in the profile's user settings document. Settings accepts saves during a Team task without interrupting it. A Session is busy while its captain is `running` or any teammate is `running` or `provisioning`; its captain persona, briefing, member preset prompts and role descriptions, member tool description and roster, and tool permissions keep the applied definition, and members summoned during that task use that definition. A member's **model route** and each slot's **color** are deliberately outside the frozen definition, because both are read from the stored Team when they are needed: saving a corrected provider, model, or reasoning effort reaches the next member the running task summons without restarting it, and a color change redraws right away. Once the Session is fully idle, it adopts the latest saved definition before its next Team task; successive saves converge to the latest value. Sessions sharing a preset adopt it independently.
163
+ GitHub and [npm](https://www.npmjs.com/package/dsh-agent-team-presets) are separate release channels and may not carry the same version. Check npm before installing from it:
132
164
 
133
- The footer reports the selected Team's execution state across online Sessions:
165
+ ```sh
166
+ npm view dsh-agent-team-presets version
167
+ ```
134
168
 
135
- - **`idle`** — no Session is executing that Team's task; a save takes effect immediately.
136
- - **`busy`** — at least one Session is executing; idle Sessions adopt a definition change immediately, while busy Sessions adopt it before their next task. A member's route saved meanwhile applies to the next member summoned, in a task already running as well. A teammate finishing does not release the definition while the captain is still running.
137
- - **`unknown`** — execution cannot be confirmed, including before the stream is ready, after it ends or fails, during a connection loss, or when the Host lacks the method or a Team's state. The page does not treat a previous idle frame as current fact. A definition change still cannot affect a task already in progress, while a member's route saved meanwhile applies to the next member summoned.
169
+ If that version meets your requirements, install it with:
138
170
 
139
- | Field | Meaning |
140
- |---|---|
141
- | Team name | Display name shown in Settings and in the composer control. |
142
- | Captain | The agent that leads the Session: its system prompt becomes the Session prompt and its tool scope scopes the session tools. It leads on the model the Session already selected, so it has no route of its own. |
143
- | Members | Role templates the captain summons by name. |
144
- | Name | Display name; the teammate target is derived from it (lower-kebab-case, falling back to `member-<n>`). |
145
- | Color | Accent mark shown in Settings. |
146
- | Description | The role hint the models act on: the captain reads its own description, the Team description, and every member's description, so it can pick the member whose description fits the work; a summoned member reads the Team description and its own description as its role. |
147
- | Provider / Model | **Members only.** Route chosen from every provider and model the deployment currently advertises. Empty runs the member on the Session route. |
148
- | Reasoning effort | **Members only.** Adapter-owned effort for the selected route; empty uses the model default. |
149
- | Allowed tools | Choose **Default: all tools** or **Custom allowed tools** separately for the captain and each member. Custom mode displays the deployment's global tools as an expanded checkbox grid, with select-all and clear controls. No checks in custom mode denies all configurable tools; default mode adds no restriction and preserves the saved checks. Captain and member policies apply independently, so a member can have tools the captain cannot use. Unavailable saved names remain removable; invalid names reject application instead of granting unrestricted access. Scoped coordination tools remain available. |
150
- | System prompt | Registered as a prompt section template; complete `{{variable}}` groups interpolate against registered prompt variables. A summoned member reads it after its Team briefing. |
171
+ ```sh
172
+ dsh plugin --profile <profile> add dsh-agent-team-presets
173
+ ```
151
174
 
152
- ### Select a Team
175
+ If the registry version is older than the release you need, use the GitHub command instead. Installing this package uses the prebuilt artifacts; rebuilding them is a separate [development task](#development).
153
176
 
154
- The composer's team control sits in the tool row after the permission control. Picking a Team writes this Session's selection; an idle Session applies its captain prompt and tool scope immediately, while a busy Session keeps its current application until it is fully idle. Picking "No team" removes the Team application at the same boundary, restoring the Session's other prompt and tool contributions. The model stays the one the composer already shows, because no Team writes a model selection.
177
+ ### Verify and upgrade safely
155
178
 
156
- ### Share one Team
179
+ After a successful installation, follow the plugin manager's reload or restart instructions and open **Settings → Agent team presets**. Check that plugin details show `dsh-agent-team-presets`, the expected version, and a running component.
157
180
 
158
- **Export** on a Team row writes that Team as one fixed JSON document, and **Import preset** reads such a document. A shared document carries only what keeps working across deployments: the Team's name and purpose, and the name, description, system prompt, and color of its captain and each member. Model routes and tool permissions stay local, because they name this deployment's providers and tools; a document that carries them is refused instead of being silently trimmed.
181
+ - Back up the profile, Team definitions, and Session selections before upgrading or changing installation sources.
182
+ - A failed command, compatibility rejection, or failed component is not a successful installation. Inspect the error before retrying; repeated restarts do not repair a failed install.
183
+ - When switching from a development link, remove `@deepseek-ai/dsh-experimental-agent-team-presets` through the plugin manager before enabling the community package. Do not enable both: they use the same settings namespace and client registrations. Preserve existing Team settings and selections during migration.
184
+ - Restart Harness after changing package identities, then refresh the GUI. A page refresh alone may leave the old client module registered in the Host.
159
185
 
160
- An import matches by name. When the document's Team name is already configured, the dialog asks whether to **replace that team** or **add it under a new name**. When the captain name or a member name is already used by the Team being replaced, the same dialog asks, per name, whether to **replace that agent** or **add the imported one renamed**. A replacement writes only the fields the document carries, so the target Team keeps its model routes and tool permissions and keeps every member the document does not mention.
186
+ > **Install the bundle; do not add a second loader declaration.** The package already supplies its own [bundle patch](<cordis.patch.yml>). Hand-written copies of the `agent-team-presets` entry in profile, home, or command-line patches can prevent Team settings from being saved. See [Configuration writes are overridden](#configuration-overridden) if this happens.
161
187
 
162
- An import lands in the draft first, so it reaches the settings document only when you press **Save**; an export writes what the page currently shows, including an unsaved draft.
188
+ <a id="configure-a-team"></a>
189
+ ## Configure and use a Team
163
190
 
164
- ### Let the captain adjust a Team preset
191
+ 1. Open **Settings → Agent team presets**.
192
+ 2. Choose a built-in Team, duplicate one, or create a new Team.
193
+ 3. Set its purpose, captain, and member roles. Configure member routes and tool permissions for your deployment.
194
+ 4. Press **Save** in the shared footer. Edits remain a draft until saved.
195
+ 5. Select the Team from the conversation composer's Team control, then ask the captain to carry out a task with the relevant roles.
165
196
 
166
- The captain of a Session also holds two tools for the case this plugin exists for: a Team ran once, and the descriptions or prompts it ran with do not yet match the work.
197
+ For a Team with implementation and review roles, a request could be:
167
198
 
168
- - **`get_team_preset`** reads every editable field of this Session's Team (or of the Team a `team_id` names) with the current settings revision. When the Session selected no Team it reports `no-selection` and lists the configured Teams, so the captain asks the user which one to change instead of guessing.
169
- - **`update_team_preset`** replaces `team_description`, `captain_description`, `captain_system_prompt`, and per-member `description` / `system_prompt`, fenced by the revision `get_team_preset` returned.
199
+ > Use the selected Team. Have the implementation member make the agreed change, then ask the reviewer to check it independently. Summarize the changes, test results, and remaining risks.
170
200
 
171
- A successful tool write saves to the same settings document as the Settings page and follows the same per-Session adoption timing described above. A captain still running its current task keeps the old definition through its subsequent model steps. **An existing teammate keeps its creation-time description, persona, and tool filter**, including when resumed by a message; the updated preset supplies future new members after that Session adopts it. Send an existing teammate a new requirement to adjust its work without replacing its stored composition.
201
+ A preset role is not an already-running member. Each call creates a new instance with a unique target such as `reviewer` or `reviewer-2`. Use the returned target with `send_message` to continue an existing member instead of creating another one.
172
202
 
173
- Both tools register in the Session-root Agent scope only, so a teammate never sees them, and the write additionally requires a turn the user started: an automatic continuation or a teammate's report cannot rewrite the shared preset. Names, member routes, and tool permissions are outside their reach — renaming changes a teammate target and collides with Agent Teams' permanent-name rule, so the Settings page owns it.
203
+ Selecting **No team** removes the Team application once the captain and its teammates are idle. It restores the conversation's other prompt and tool contributions, without changing the selected model.
174
204
 
175
- The tool's write policy differs from the Settings page: if any online Session that selected or still has that Team applied has a teammate `running` or `provisioning`, `update_team_preset` returns `team-busy` without saving. This conservative model-initiated write check counts teammates only, not the captain executing the tool; counting that captain would block every call. Wait for those teammates to finish, or interrupt them with `interrupt_agent`, then call `get_team_preset` again and retry with its revision. The running task keeps its original definition; the Settings page can still save changes for later adoption, and a member route saved there applies to the next member that task summons. `get_team_preset` reports the executing teammate count.
205
+ ### Fields
176
206
 
177
- The tool also refuses a revision another writer advanced (re-read, retry) and a supplied standing prompt whose `{{variable}}` group cannot resolve. An unknown variable fails the request when the template is used rather than degrading it. Only prompts supplied by the call are checked, so an unrelated edit still succeeds on top of text the Settings page wrote.
207
+ | Field | Purpose |
208
+ |---|---|
209
+ | Team name and purpose | Identify the preset and explain what work it should handle. |
210
+ | Captain | The conversation's lead agent. A nonempty captain prompt replaces its persona prefix; the captain keeps the conversation's selected model. |
211
+ | Members | Reusable role templates the captain can summon. A role may have multiple runtime instances, subject to Harness limits. |
212
+ | Name | Display name. After trimming and lowercasing, ASCII letters/digits separated by single hyphens form a role target if it is at most 64 characters and not `lead`. Other names, including empty or non-Latin names, use a target such as `member-1`; collisions receive suffixes. Runtime messages use the returned instance target. |
213
+ | Description | Explain the role's responsibilities so the captain can choose an appropriate member. Keep member descriptions within 200 characters, as required by the Team service. |
214
+ | Color | Accent used to distinguish the role in Settings and the roster. |
215
+ | Provider / Model | Members only. Select a route from the deployment's model catalog; without a complete provider/model selection, no member-specific route is installed. |
216
+ | Reasoning effort | Members only. Options depend on the selected model; empty uses that route's default. |
217
+ | Allowed tools | Independent all-tools or custom policy for each slot; see [Tool permissions](#tool-permissions). |
218
+ | System prompt | Standing role instructions. Complete `{{variable}}` groups are prompt-template variables; an unresolved variable can fail a request. |
178
219
 
179
- <a id="understand-the-implementation"></a>
180
- ## Understand the implementation
220
+ The editor has three levels: the Team list, one Team, and one captain or member. You can return to the list without losing a staged edit, but **Save** is required to persist it.
181
221
 
182
- ### Host composition
222
+ ### Built-in presets
183
223
 
184
- The Host half owns the live configuration and the per-Session applications:
224
+ A fresh installation seeds three editable Teams:
185
225
 
186
- | File | Role |
226
+ | Preset | Intended use |
187
227
  |---|---|
188
- | [`src/index.ts`](src/index.ts) | Plugin entry: live Config, per-Session definition freezing and adoption on Agent lifecycle, settings commits, and `team/member` settlements. |
189
- | [`src/execution.ts`](src/execution.ts) | Event-driven execution monitor: captain and teammate status, applied-versus-stored definitions, and aggregate whole-set frames. |
190
- | [`src/config.ts`](src/config.ts) | Volatile `teams` and `selections` fields, the continuable-provider names, and the captain-route cleanup of stored Teams. |
191
- | [`src/application.ts`](src/application.ts) | Applies one Team to one live Agent: prompt sections, tool scope, and the `spawn_team_member` tool. |
192
- | [`src/preset-editor.ts`](src/preset-editor.ts) | Pure preset edits behind the preset tools: the editable-field whitelist, member resolution, and the roster's description limit. |
193
- | [`src/preset-tools.ts`](src/preset-tools.ts) | The captain's `get_team_preset` and `update_team_preset`, their authority checks, and the settings write. |
194
- | [`src/presets.ts`](src/presets.ts) | Pure helpers shared with the browser half: teammate targets, member lookup, selection rewriting, roster text. |
195
- | [`src/tool-catalog.ts`](src/tool-catalog.ts) | Host Remote service `teamPresetsToolCatalog`: restrictable global tools and the `teamPresets.execution` stream for the Settings page. |
196
- | [`src/client/*`](src/client) | Browser half: the Settings page, the composer control, and the shared form controller. |
228
+ | 轻量研发团队 | Small features and module iterations, with an implementation member and an on-demand technical advisor. |
229
+ | 标准研发团队 | Medium features and significant refactoring, adding an independent reviewer. |
230
+ | 全栈软件研发团队 | Work across Web, desktop, and Android, with implementation, architecture, UI/UX, and review roles. |
197
231
 
198
- Applying a Team installs the captain's prompt as `deployment:persona-prefix` on the Agent's scope, so it shadows the deployment persona for that Session alone. The captain and each member resolve their own tool mode. A custom captain allow-list filters its global tools; a summoned member receives its own custom allow-list, independent of the captain's selection. A captain leads on the model the Session already selected, so this plugin writes no model selection at all: the composer's model control stays the only owner of that reference, and the rendered captain prompt is recorded as a `system/message` surface event before the request, so the model-visible input stays reconstructable from the Session log. The Host half also provides the `teamPresetsToolCatalog` Remote service, which lists exactly the global tools `ctx.tools.restrict()` validates against, so the Settings page cannot offer a name the summon path would refuse.
232
+ Their prompts are in Chinese. The same portable documents are available in [contrib/default-presets](<contrib/default-presets>) for manual import.
199
233
 
200
- `teamPresets.execution` is a Remote stream of full snapshots: `{ teams: [{ teamId, state, busySessions, executingMembers, pendingSessions }] }`. Counts cover online Sessions that selected or still have the preset applied; `pendingSessions` counts Sessions with no application or an application that differs from the stored selection or frozen definition, leaving out a member route or a color the Session reads live. Frames carry Team identities and aggregate counts, not personas, Session names, or Session content. Lifecycle and settings events refresh the stream without polling; an unreadable roster reports `unknown` unless known activity already establishes `busy`.
234
+ Defaults are offered once per profile configuration: deleted presets stay deleted across restarts and upgrades, and edited presets are not overwritten. **Restore defaults** restores the shipped fields while preserving routes and tool policies on matched roles, and leaves user-created Teams alone. It also restores each built-in Team's shipped roster, removing roles you added to that Team; duplicate a customized Team first if you want to keep it. Restored presets are staged until you press **Save**. A deleted preset added back has no previous local route or tool policy to preserve.
201
235
 
202
- ### Selecting and storing
236
+ ### When saved changes take effect
203
237
 
204
- Teams and per-Session selections live in the plugin's volatile Config fields, which the settings service projects into the profile's user settings document and commits back into the running references with a `loader/volatile-update`. The browser half edits them through `ctx.configForms.get('agent-team-presets')`, so the Settings page and the composer control share one revision-fenced write queue. Each agent stores `toolMode` independently of `tools`. Records without `toolMode` retain their list-only behavior: an empty list means default-all and a nonempty list means custom. A stored captain that still carries `provider`, `model`, or `reasoningEffort` from a document written before captains stopped owning a route is rewritten once without them when the plugin loads.
238
+ A Team preset is shared across Sessions in the profile, but each Session adopts updates independently:
205
239
 
206
- ### Per-teammate settings
240
+ | Change | Effect |
241
+ |---|---|
242
+ | Purpose, role descriptions, prompts, roster, or tool policies | An idle Session adopts the change immediately. A busy Session keeps its applied definition until the task ends. |
243
+ | Team selection, including No team | Takes effect once that Session's captain and teammates are idle. |
244
+ | Member provider, model, or reasoning effort | Read when a **new member instance** is summoned, even during a running task. Existing instances retain their creation-time route. |
245
+ | Color | Updates when the UI redraws. |
207
246
 
208
- `@deepseek-ai/dsh-experimental-agent-team` gained three optional `SpawnTeammateRequest` fields — `agentOptions` (provider, model, reasoning effort), `persona`, and `toolFilter` — and now records the requested member model in the durable member snapshot so a roster row names the model of a teammate that is not live. `spawn_team_member` passes them to `ctx.agentTeams.spawnTeammate`, so members stay inside the Team roster, mailbox, and shared task board.
247
+ The footer summarizes online Sessions as **idle**, **busy**, or **unknown**. Busy includes a running captain or a running/provisioning teammate. Unknown means execution state could not be confirmed, not that the Team is idle.
209
248
 
210
- ### Runtime invariant
249
+ <a id="share-presets"></a>
250
+ ## Share presets
211
251
 
212
- **Runtime invariant:** No companion is published. Every contribution is an ordinary Cordis registration on the Agent's scope, so disposing that scope already removes the prompt sections, the tool restriction, and the member tool; the assembled captain and member policies are covered by the production Loader composition test instead.
252
+ **Export** saves one Team as JSON. **Import preset** reads that document and stages it in the editor.
213
253
 
214
- -----
254
+ - Shared fields: Team name and purpose; captain/member names, descriptions, prompts, and colors.
255
+ - Local fields: model routes and tool permissions. These are not exported; an import containing them is rejected.
256
+ - Name collisions: choose replacement or a renamed addition for the Team and conflicting roles. Replacement preserves matched roles' local routes and tool policies, and keeps members not mentioned in the import.
257
+ - New Teams and roles start without a fixed member route and with the default all-tools policy. Review their prompts and permissions before use, especially for documents from others.
215
258
 
216
- <a id="further-exploration"></a>
217
- ## Further Exploration
259
+ Exports include the currently displayed draft, including unsaved edits. Imports do not reach stored settings until you press **Save**. Review prompts for private information before publishing an exported document.
218
260
 
219
- - [Agent Teams subsystem](../../../docs/subsystems/agent-team.md) — the `ctx.agentTeams` service, roster, mailbox, and shared task board this package composes.
220
- - [agent-team package](../agent-team/README.md) — the service, its durable types, and the `agentOptions`, `persona`, and `toolFilter` delegation fields.
221
- - [tool-agent-team package](../tool-agent-team/README.md) — the tools the model uses to create, message, and coordinate teammates.
261
+ <a id="edit-presets-with-tools"></a>
262
+ ## Let the captain edit a preset
222
263
 
223
- -----
264
+ You can ask the conversation's lead agent to adjust a Team's purpose or role instructions. Two tools are registered on root Sessions, including Sessions with no Team selected, subject to the active tool policy:
224
265
 
225
- <a id="model-experience"></a>
226
- ## Model Experience
266
+ - **`get_team_preset`** reads the selected Team, or the Team named by `team_id`, and returns its editable fields and settings revision. Without a selection, it lists configured Teams so you can choose one.
267
+ - **`update_team_preset`** changes Team/captain descriptions and captain/member system prompts or member descriptions, using that revision. Names, model routes, colors, and tool permissions must be edited in Settings.
227
268
 
228
- ### Captain and member prompts
269
+ A write requires a direct user-started turn and Host approval of the exact target and changes. If approval is disabled, denied, or unavailable, nothing is saved. Another writer advancing the revision also requires a fresh read before retrying.
229
270
 
230
- #### What the model sees
271
+ The update tool returns **`team-busy`** while any affected online Session has a running or provisioning teammate. Wait for those teammates to finish, then read the revision again. The Settings page can still save changes for later adoption. A successful tool write uses the same adoption timing as a Settings save; it does not rewrite an existing teammate's stored persona or policy.
231
272
 
232
- The captain's system prompt replaces the deployment persona prefix for the Session, and one `agent-team-presets:briefing` section states the Team's purpose, the captain's own role, and one line per summonable member target with that member's description, so the captain can pick the member whose description fits the work. A summoned member receives its own persona prefix instead: the Team it joined, its own role, and its configured system prompt. All of it renders into the Session's `system/message`, so a resumed Session rebuilds it from the log.
273
+ <a id="tool-permissions"></a>
274
+ ## Tool permissions and security
233
275
 
234
- ##### Briefing section for a Team with one member
276
+ ### Policy modes
235
277
 
236
- ```markdown
237
- Team preset "Review team" is active for this Session: Reviews changes before they land
278
+ - **Default: all tools** adds no allow-list restriction beyond the deployment's permissions and Team role rules.
279
+ - **Custom allowed tools** permits only selected tool names, including scoped Team coordination tools such as `send_message`, `list_agents`, and `team_task_*`. An empty custom list denies all configurable tool calls. Switching modes preserves the saved custom selections.
280
+ - Captain and member policies are independent. To coordinate a Team under a custom policy, explicitly allow the tools each role needs; allowing them for the captain does not grant them to members.
238
281
 
239
- You are its captain "team-lead": Keeps the review queue moving
282
+ The catalog groups tools by this plugin, MCP server, and other tools. Groups offer selection controls and show selected/total counts. Descriptions use the registry's model-facing text and may remain English even when the interface is localized. The catalog combines tools from different Agent presets; a listed tool is not necessarily available to the current Session. Choose an Agent preset that provides it or remove it from the allow-list if application is refused.
240
283
 
241
- Summon a member with spawn_team_member(member, task). The targets below are fixed; use them verbatim.
284
+ Captain-only tools are disabled on member pages. Native `spawn_teammate` is blocked while a Team preset is active; use `spawn_team_member` so member configuration is applied consistently.
242
285
 
243
- - member-1 (审查者): checks diffs
244
- ```
286
+ ### Security boundaries
245
287
 
246
- ##### Persona prefix of the summoned member
288
+ - The allow-list is **not a filesystem, process, or network sandbox**. An allowed shell, code-capable tool, or third-party plugin may have broad indirect capabilities. Keep Harness's own sandbox and approval settings appropriate for the work.
289
+ - Custom mode denies general-purpose `run_code` and ordinary `subagent`, `subagent_fork`, and `workflow` delegation, because those paths do not provide this plugin's durable strict-policy contract. Use preset-managed Team members for delegation.
290
+ - Custom policies use native tool calling. If an inherited programmatic tool-calling (PTC) presentation is replaced, Settings discloses the change. If a conflicting presentation is declared on the exact Session scope and cannot be replaced, Team application is refused rather than silently weakening the policy.
291
+ - Invalid updates retain the last valid application. If a safe initial application or recovery cannot be established, affected tool execution is blocked until the configuration is corrected or a valid Team/No team selection can take effect.
292
+ - Managed members require their durable configuration on resume. Missing or corrupt records are refused rather than replaced by unrestricted defaults. The plugin must remain installed for this protection; it cannot enforce policies after it has been removed.
293
+
294
+ <a id="known-limitations-and-deferred-work"></a>
295
+ ## Troubleshooting and limitations
247
296
 
248
- ```markdown
249
- You are "member-1" (审查者) on the Agent Team "Review team": Reviews changes before they land
297
+ <a id="configuration-overridden"></a>
298
+ ### Configuration writes are overridden
250
299
 
251
- Your role: checks diffs
300
+ If saving or selecting a Team reports:
252
301
 
253
- You review one diff at a time and report findings.
302
+ ```text
303
+ Configuration for "agent-team-presets" is overridden by a home patch or command-line overlay
254
304
  ```
255
305
 
256
- #### Token effect
306
+ a patch layer conflicts with the settings write. The installed bundle already inserts the plugin entry; a duplicate hand-written declaration or an overriding configuration can prevent the Host's editor from committing changes.
257
307
 
258
- Both sections add their own text to every request's system prompt for the Session. A Team whose captain states no name or description and which has no members adds nothing.
308
+ 1. Back up the profile, Team definitions, and Session selections.
309
+ 2. Check the profile patch, `$DSH_HOME/cordis.patch.yml`, and any `--patch` overlays for conflicting hand-written `agent-team-presets` declarations.
310
+ 3. Remove the conflicting declaration or override. **Do not simply move it into another patch.** Preserve the Host-managed settings row and saved Teams; do not delete every occurrence of the entry indiscriminately.
311
+ 4. Keep the installed bundle in `dsh.profile.bundles` and edit Teams through Settings.
259
312
 
260
- #### KV Cache effect
313
+ The composer and Settings page show the Host's error text when a write fails.
261
314
 
262
- The applied Team's section templates stay unchanged during a running task, even when a newer preset is saved. Adopting a changed Team between tasks can rewrite the captain's prompt and briefing; actual cache reuse also depends on prompt variables and provider capabilities.
315
+ <a id="verify-member-model-route"></a>
316
+ ### A member's displayed model differs from its route
263
317
 
264
- ### `spawn_team_member`
318
+ In Harness `0.2.0-rc.2`, the Team roster and `list_agents.model` read creation-time options or fallback metadata, not this plugin's member-scoped request selection. `list_agents.provider` identifies the subagent execution backend, not the LLM provider, and the tool does not report `reasoningEffort`. A display mismatch alone does not establish a routing failure.
265
319
 
266
- #### What the model sees
320
+ - **Check configuration:** `configuredRoute` in the `spawn_team_member` result reports the route captured for that instance. It is omitted when no member-specific route is configured. Advanced diagnostics can also inspect `route` in the durable `agent_team_presets_members` unit.
321
+ - **Check request records:** inspect the corresponding member Session's `request/header` or `modelSelection.lastUsed` projection. Before the first request header, `lastUsed` is empty; afterwards it describes the last recorded request, not the next selection.
322
+ - **Understand the scope:** a configured value does not prove that a request executed. Request records identify the route used by Harness, not a third-party service's internal model implementation. Self-reported names and throughput are not independent model-identity verification.
267
323
 
268
- One tool with `member`, `task`, `description`, and `context` parameters. The result is a compact JSON record naming the teammate target, its status, and its model.
324
+ ### Other common issues
269
325
 
270
- #### Token effect
326
+ | Symptom | What to check |
327
+ |---|---|
328
+ | Settings page is absent or the plugin is pending | Confirm the target profile, peer compatibility, Agent Teams, and required client services. |
329
+ | Model or tool catalog fails to load | Read the displayed error and check the deployment's provider/tool services. Saving a preset cannot add a missing capability. |
330
+ | Member creation is refused | Check durable storage, the configured execution backend, route/effort availability, and Harness depth/concurrency/member limits. A finished member frees an activity slot, not its permanent Team roster slot. |
331
+ | A prompt fails with an unknown variable | Correct the `{{variable}}` group or provide the variable through the deployment. |
332
+ | Windows configuration cannot be parsed | Preserve valid UTF-8 JSON without a BOM when editing profile manifests. Do not disable schema validation or delete active Host/credential locks to work around an error. |
333
+ | The selected Team was deleted | Select a valid Team or No team. A missing Team is an error, not an implicit switch to unrestricted mode. |
334
+
335
+ ### Persistence and compatibility
271
336
 
272
- The tool schema and description join the Session's tool surface while a Team is applied.
337
+ - Team definitions and Session selections live in profile settings, not a structured selection history in the Session event log. Rendered prompts may contain the Team name, but they do not make the selection portable: a fork or a move to another deployment needs an explicit Team selection and matching settings.
338
+ - Already-created members retain their creation-time persona, description, route, and tool policy, including when resumed with `send_message`. Saved preset changes apply to future instances; send an existing member a message to adjust its immediate task.
339
+ - Legacy captain route fields are removed during settings reconciliation because captains use the conversation's model. Back up configuration before migrating older profiles.
340
+ - The bundled schema runtime fixes missing-`zod` startup imports from earlier package builds. It does not repair unrelated Harness installation, encoding, lock, or third-party plugin failures.
273
341
 
274
- #### KV Cache effect
342
+ <a id="understand-the-implementation"></a>
343
+ ## How it works
275
344
 
276
- The applied member roster and tool schema stay unchanged during a running task. Adopting a changed roster or tool policy between tasks can change the request's tools and affect cache reuse.
345
+ The plugin uses Cordis and Harness extension points without patching the Host:
277
346
 
278
- ## Known Limitations and Deferred Work
347
+ 1. **Profile configuration** stores Team definitions and Session selections. The browser uses revision-checked settings writes and an event-driven execution stream.
348
+ 2. **Session application** installs the captain's persona/briefing, tool policy, and `spawn_team_member` at the Agent scope. It does not change the root conversation's model selection.
349
+ 3. **Member creation** validates the route and delegation limits, stores an instance snapshot, and creates the child through a plugin-owned execution-backend alias. The serial `agent/created` lifecycle installs its model route, persona, Team context, and strict tool policy before its first request.
350
+ 4. **Resume and cleanup** restore a managed member's snapshot and dispose scoped registrations when their owning application ends. Existing members keep their captured configuration rather than adopting later preset edits.
279
351
 
280
- <a id="known-limitations-and-deferred-work"></a>
352
+ ### Source navigation
281
353
 
282
- - **Profile-global Team definitions with a per-Session selection record.** The selection is stored in the user settings document rather than in the Session log, so a forked or copied Session does not inherit it, and a Session re-applied on another machine needs the same settings document.
283
- - **No Session-log record of the selection itself.** The captain's rendered prompt is logged; the Team identity is not, so a reader cannot tell which Team a Session used without the settings document.
284
- - **Member system prompts are persona templates.** A member prompt containing an unknown `{{variable}}` fails that member's first request; the field warns before saving.
285
- - **The allow-list masks global tools only.** A scoped registration such as the Team coordination tools (`send_message`, `team_task_*`) stays visible to a restricted agent, because `ctx.tools.restrict()` intersects global names and leaves scoped registrations in place. A member therefore keeps the tools it needs to answer its Lead.
286
- - **The Session model is no part of a Team.** The captain leads on whatever model the composer selected, and only members carry a route, so editing a Team never changes your model.
287
- - **Captains stored before this version lose their route once.** The plugin rewrites such a Team on load through the ordinary settings write, so the profile patch stops naming `provider`, `model`, and `reasoningEffort` on a captain.
288
- - **Existing teammates retain their creation-time composition.** Applying a saved preset updates the captain and future new members, not existing teammates' description, persona, or tool filter; sending a new requirement adjusts work without replacing that composition.
289
- - **Shared presets adopt per Session, and a route does not wait for that.** Settings saves do not change a running task's definition; the captain adopts the latest one when fully idle, before the next task. A member's route is read when that member is summoned, so a route corrected in Settings reaches the next member a running task summons without a restart. The captain's tool additionally refuses saves while any affected Session has a running or provisioning teammate, and requires a user-started turn.
354
+ | Area | Source |
355
+ |---|---|
356
+ | Plugin lifecycle and settings reconciliation | [index.ts](<src/index.ts>), [settings-reconcile.ts](<src/settings-reconcile.ts>) |
357
+ | Team application and member tool | [application.ts](<src/application.ts>) |
358
+ | Member snapshots, identity, and resume | [member-store.ts](<src/member-store.ts>), [member-identity.ts](<src/member-identity.ts>), [member-runtime.ts](<src/member-runtime.ts>) |
359
+ | Tool policies and presentation | [tool-policy.ts](<src/tool-policy.ts>), [presentation.ts](<src/presentation.ts>) |
360
+ | Preset editing and portable documents | [preset-tools.ts](<src/preset-tools.ts>), [preset-transfer.ts](<src/preset-transfer.ts>) |
361
+ | Execution state and catalog | [execution.ts](<src/execution.ts>), [tool-catalog.ts](<src/tool-catalog.ts>) |
362
+ | Browser UI | [src/client](<src/client>) |
363
+
364
+ <a id="model-experience"></a>
365
+ ### Prompt and context behavior
366
+
367
+ The captain sees its configured persona, the Team purpose, and a roster of member role targets and descriptions. A member sees its own role instructions and the Team's division of labour; that role list is not a live runtime roster. Use `list_agents` for current targets and status.
290
368
 
291
- -----
369
+ These prompt sections and the `spawn_team_member` schema add to the model's context. Larger rosters and longer prompts therefore use more tokens. Definitions remain stable during a task, but actual prompt-cache reuse depends on prompt variables and the provider; the plugin makes no cache-hit guarantee. Rendered system prompts are recorded in the Session's `system/message` events.
292
370
 
293
371
  <a id="dev-note"></a>
294
- ### Dev Note
372
+ <a id="development"></a>
373
+ ## Development and contributing
295
374
 
296
- <details>
297
- <summary>Maintainer details — click to expand</summary>
375
+ Source development requires a compatible, dependency-installed [Harness checkout](https://github.com/deepseek-ai/deepseek-harness). From this repository:
298
376
 
299
- None.
377
+ ```sh
378
+ export DSH_CHECKOUT=/absolute/path/to/deepseek-harness
379
+ npm test
380
+ npm run typecheck
381
+ npm run bundle
382
+ ```
300
383
 
301
- </details>
384
+ The scripts use the checkout's tooling and source aliases. Tests use mock model adapters; `npm run typecheck` reports this plugin's diagnostics, not a clean typecheck of the entire Harness. `npm run bundle` rebuilds the committed artifacts in an isolated staging workspace. These checks do not replace visual or real-provider testing. See the scripts in [tools](<tools>) and the [test suite](<tests>) for the current verification scope.
385
+
386
+ Bug reports and pull requests are welcome in [GitHub Issues](https://github.com/bloodarea/dsh-agent-team-presets/issues) and [Pull requests](https://github.com/bloodarea/dsh-agent-team-presets/pulls). For a report, include:
387
+
388
+ - Harness and plugin versions, OS, profile type, and installation source/ref.
389
+ - Reproduction steps, expected behavior, actual behavior, and relevant error text.
390
+ - A minimal, redacted preset or screenshot when helpful.
391
+
392
+ Do not publish credentials, private endpoints, full Session logs, or proprietary prompt content. Review the affected behavior and add focused tests when changing runtime code. Keep the two README versions and prebuilt artifacts consistent with a release.
393
+
394
+ <a id="further-exploration"></a>
395
+ ## Related resources
396
+
397
+ - [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) — the Host and its plugin system.
398
+ - [Built-in preset documents](<contrib/default-presets>) — portable starting points for your own Teams.
399
+ - [GitHub Releases](https://github.com/bloodarea/dsh-agent-team-presets/releases) — published versions.
400
+
401
+ <a id="license"></a>
402
+ ## License
403
+
404
+ [MIT](<LICENSE>). Bundled third-party notices are in [THIRD-PARTY-NOTICES.txt](<lib/THIRD-PARTY-NOTICES.txt>).