dsh-agent-team-presets 0.0.0-stage → 0.1.4

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 (76) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +386 -2
  3. package/README.zh.md +387 -0
  4. package/cordis.patch.yml +12 -0
  5. package/lib/THIRD-PARTY-NOTICES.txt +23 -0
  6. package/lib/client.js +7918 -0
  7. package/lib/index.js +7809 -0
  8. package/lib/typert.host.d.ts +3 -0
  9. package/lib/typert.host.js +4113 -0
  10. package/lib/typert.remote-client.d.ts +25 -0
  11. package/lib/typert.remote-client.js +4106 -0
  12. package/lib/types/application.d.ts +119 -0
  13. package/lib/types/application.js +414 -0
  14. package/lib/types/builtin-teams.d.ts +101 -0
  15. package/lib/types/builtin-teams.js +331 -0
  16. package/lib/types/client/ComposerTeamSelect.d.ts +14 -0
  17. package/lib/types/client/ComposerTeamSelect.js +43 -0
  18. package/lib/types/client/FieldPicker.d.ts +23 -0
  19. package/lib/types/client/FieldPicker.js +19 -0
  20. package/lib/types/client/TeamAgentView.d.ts +40 -0
  21. package/lib/types/client/TeamAgentView.js +135 -0
  22. package/lib/types/client/TeamEditorView.d.ts +31 -0
  23. package/lib/types/client/TeamEditorView.js +24 -0
  24. package/lib/types/client/TeamImportDialog.d.ts +26 -0
  25. package/lib/types/client/TeamImportDialog.js +59 -0
  26. package/lib/types/client/TeamListView.d.ts +33 -0
  27. package/lib/types/client/TeamListView.js +28 -0
  28. package/lib/types/client/TeamPresetsSection.d.ts +14 -0
  29. package/lib/types/client/TeamPresetsSection.js +198 -0
  30. package/lib/types/client/appearance.d.ts +40 -0
  31. package/lib/types/client/appearance.js +32 -0
  32. package/lib/types/client/index.d.ts +39 -0
  33. package/lib/types/client/index.js +103 -0
  34. package/lib/types/client/locales.d.ts +56 -0
  35. package/lib/types/client/locales.js +351 -0
  36. package/lib/types/client/preset-file.d.ts +24 -0
  37. package/lib/types/client/preset-file.js +46 -0
  38. package/lib/types/client/team-presets-controller.d.ts +614 -0
  39. package/lib/types/client/team-presets-controller.js +1129 -0
  40. package/lib/types/config.d.ts +212 -0
  41. package/lib/types/config.js +86 -0
  42. package/lib/types/delegation.d.ts +71 -0
  43. package/lib/types/delegation.js +177 -0
  44. package/lib/types/execution.d.ts +91 -0
  45. package/lib/types/execution.js +225 -0
  46. package/lib/types/index.d.ts +39 -0
  47. package/lib/types/index.js +705 -0
  48. package/lib/types/member-identity.d.ts +97 -0
  49. package/lib/types/member-identity.js +180 -0
  50. package/lib/types/member-runtime.d.ts +255 -0
  51. package/lib/types/member-runtime.js +458 -0
  52. package/lib/types/member-store.d.ts +160 -0
  53. package/lib/types/member-store.js +198 -0
  54. package/lib/types/presentation.d.ts +128 -0
  55. package/lib/types/presentation.js +119 -0
  56. package/lib/types/preset-editor.d.ts +75 -0
  57. package/lib/types/preset-editor.js +135 -0
  58. package/lib/types/preset-tools.d.ts +40 -0
  59. package/lib/types/preset-tools.js +475 -0
  60. package/lib/types/preset-transfer.d.ts +167 -0
  61. package/lib/types/preset-transfer.js +362 -0
  62. package/lib/types/presets.d.ts +125 -0
  63. package/lib/types/presets.js +250 -0
  64. package/lib/types/settings-reconcile.d.ts +24 -0
  65. package/lib/types/settings-reconcile.js +101 -0
  66. package/lib/types/tool-catalog.d.ts +57 -0
  67. package/lib/types/tool-catalog.js +212 -0
  68. package/lib/types/tool-descriptions.d.ts +21 -0
  69. package/lib/types/tool-descriptions.js +21 -0
  70. package/lib/types/tool-policy.d.ts +66 -0
  71. package/lib/types/tool-policy.js +138 -0
  72. package/lib/types/types.d.ts +153 -0
  73. package/lib/types/types.js +9 -0
  74. package/locale/en.json +6 -0
  75. package/locale/zh.json +6 -0
  76. package/package.json +141 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 bloodarea
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.
package/README.md CHANGED
@@ -1,3 +1,387 @@
1
- # Temporary Holding Version
1
+ # dsh-agent-team-presets
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <img src="banner.png" alt="Reusable Agent Team presets for DeepSeek Harness" width="100%">
4
+
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.4** · [Release](https://github.com/bloodarea/dsh-agent-team-presets/releases/tag/v0.1.4)
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.
12
+
13
+ <a id="project-introduction"></a>
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**:
19
+
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.
23
+
24
+ This is a community plugin, not the Harness's bundled `@deepseek-ai/dsh-experimental-agent-team-presets` development package.
25
+
26
+ <a id="why-this-plugin"></a>
27
+ ## Why this plugin?
28
+
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:
30
+
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.
36
+
37
+ **Design principle:** native Agent Teams owns collaboration at runtime; this plugin owns configuring, managing, and reusing teams.
38
+
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)
66
+
67
+ <a id="screenshots"></a>
68
+ ## Screenshots
69
+
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.4. The permission rules below describe the current version.
71
+
72
+ **Choose a Team in the composer**
73
+
74
+ ![The Team control in the composer](<docs/images/01-composer-team-control.png>)
75
+
76
+ **Manage saved Teams**
77
+
78
+ ![The Team list in Settings](<docs/images/02-team-list.png>)
79
+
80
+ **Configure member models and reasoning effort**
81
+
82
+ ![A member's model settings](<docs/images/04-member-route.png>)
83
+
84
+ <details>
85
+ <summary>More settings screenshots</summary>
86
+
87
+ **Team editor**
88
+
89
+ ![One Team's editor](<docs/images/03-team-editor.png>)
90
+
91
+ **Model picker**
92
+
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**
102
+
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.4`) and the Harness version (`0.2.0-rc.2`, for example) are separate version lines.
118
+
119
+ <a id="use-this-package"></a>
120
+ ## Install and upgrade
121
+
122
+ ### Install from GitHub
123
+
124
+ For an installation that can receive repository-version update notifications:
125
+
126
+ ```sh
127
+ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets
128
+ ```
129
+
130
+ Replace `<profile>` with the profile your GUI runs. For example:
131
+
132
+ ```sh
133
+ dsh plugin --profile web add github:bloodarea/dsh-agent-team-presets
134
+ ```
135
+
136
+ To select the v0.1.4 release tag instead:
137
+
138
+ ```sh
139
+ dsh plugin --profile <profile> add github:bloodarea/dsh-agent-team-presets#v0.1.4
140
+ ```
141
+
142
+ 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.
143
+
144
+ ### npm release channel
145
+
146
+ 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:
147
+
148
+ ```sh
149
+ npm view dsh-agent-team-presets version
150
+ ```
151
+
152
+ If that version meets your requirements, install it with:
153
+
154
+ ```sh
155
+ dsh plugin --profile <profile> add dsh-agent-team-presets
156
+ ```
157
+
158
+ 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).
159
+
160
+ ### Verify and upgrade safely
161
+
162
+ 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.
163
+
164
+ - Back up the profile, Team definitions, and Session selections before upgrading or changing installation sources.
165
+ - 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.
166
+ - 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.
167
+ - Restart Harness after changing package identities, then refresh the GUI. A page refresh alone may leave the old client module registered in the Host.
168
+
169
+ > **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.
170
+
171
+ <a id="configure-a-team"></a>
172
+ ## Configure and use a Team
173
+
174
+ 1. Open **Settings → Agent team presets**.
175
+ 2. Choose a built-in Team, duplicate one, or create a new Team.
176
+ 3. Set its purpose, captain, and member roles. Configure member routes and tool permissions for your deployment.
177
+ 4. Press **Save** in the shared footer. Edits remain a draft until saved.
178
+ 5. Select the Team from the conversation composer's Team control, then ask the captain to carry out a task with the relevant roles.
179
+
180
+ For a Team with implementation and review roles, a request could be:
181
+
182
+ > 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.
183
+
184
+ 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.
185
+
186
+ 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.
187
+
188
+ ### Fields
189
+
190
+ | Field | Purpose |
191
+ |---|---|
192
+ | Team name and purpose | Identify the preset and explain what work it should handle. |
193
+ | Captain | The conversation's lead agent. A nonempty captain prompt replaces its persona prefix; the captain keeps the conversation's selected model. |
194
+ | Members | Reusable role templates the captain can summon. A role may have multiple runtime instances, subject to Harness limits. |
195
+ | 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. |
196
+ | 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. |
197
+ | Color | Accent used to distinguish the role in Settings and the roster. |
198
+ | 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. |
199
+ | Reasoning effort | Members only. Options depend on the selected model; empty uses that route's default. |
200
+ | Allowed tools | Independent all-tools or custom policy for each slot; see [Tool permissions](#tool-permissions). |
201
+ | System prompt | Standing role instructions. Complete `{{variable}}` groups are prompt-template variables; an unresolved variable can fail a request. |
202
+
203
+ 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.
204
+
205
+ ### Built-in presets
206
+
207
+ A fresh installation seeds three editable Teams:
208
+
209
+ | Preset | Intended use |
210
+ |---|---|
211
+ | 轻量研发团队 | Small features and module iterations, with an implementation member and an on-demand technical advisor. |
212
+ | 标准研发团队 | Medium features and significant refactoring, adding an independent reviewer. |
213
+ | 全栈软件研发团队 | Work across Web, desktop, and Android, with implementation, architecture, UI/UX, and review roles. |
214
+
215
+ Their prompts are in Chinese. The same portable documents are available in [contrib/default-presets](<contrib/default-presets>) for manual import.
216
+
217
+ 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.
218
+
219
+ ### When saved changes take effect
220
+
221
+ A Team preset is shared across Sessions in the profile, but each Session adopts updates independently:
222
+
223
+ | Change | Effect |
224
+ |---|---|
225
+ | 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. |
226
+ | Team selection, including No team | Takes effect once that Session's captain and teammates are idle. |
227
+ | 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. |
228
+ | Color | Updates when the UI redraws. |
229
+
230
+ 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.
231
+
232
+ <a id="share-presets"></a>
233
+ ## Share presets
234
+
235
+ **Export** saves one Team as JSON. **Import preset** reads that document and stages it in the editor.
236
+
237
+ - Shared fields: Team name and purpose; captain/member names, descriptions, prompts, and colors.
238
+ - Local fields: model routes and tool permissions. These are not exported; an import containing them is rejected.
239
+ - 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.
240
+ - 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.
241
+
242
+ 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.
243
+
244
+ <a id="edit-presets-with-tools"></a>
245
+ ## Let the captain edit a preset
246
+
247
+ 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:
248
+
249
+ - **`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.
250
+ - **`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.
251
+
252
+ 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.
253
+
254
+ 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.
255
+
256
+ <a id="tool-permissions"></a>
257
+ ## Tool permissions and security
258
+
259
+ ### Policy modes
260
+
261
+ - **Default: all tools** adds no allow-list restriction beyond the deployment's permissions and Team role rules.
262
+ - **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.
263
+ - 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.
264
+
265
+ 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.
266
+
267
+ 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.
268
+
269
+ ### Security boundaries
270
+
271
+ - 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.
272
+ - 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.
273
+ - 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.
274
+ - 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.
275
+ - 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.
276
+
277
+ <a id="known-limitations-and-deferred-work"></a>
278
+ ## Troubleshooting and limitations
279
+
280
+ <a id="configuration-overridden"></a>
281
+ ### Configuration writes are overridden
282
+
283
+ If saving or selecting a Team reports:
284
+
285
+ ```text
286
+ Configuration for "agent-team-presets" is overridden by a home patch or command-line overlay
287
+ ```
288
+
289
+ 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.
290
+
291
+ 1. Back up the profile, Team definitions, and Session selections.
292
+ 2. Check the profile patch, `$DSH_HOME/cordis.patch.yml`, and any `--patch` overlays for conflicting hand-written `agent-team-presets` declarations.
293
+ 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.
294
+ 4. Keep the installed bundle in `dsh.profile.bundles` and edit Teams through Settings.
295
+
296
+ The composer and Settings page show the Host's error text when a write fails.
297
+
298
+ <a id="verify-member-model-route"></a>
299
+ ### A member's displayed model differs from its route
300
+
301
+ 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.
302
+
303
+ - **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.
304
+ - **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.
305
+ - **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.
306
+
307
+ ### Other common issues
308
+
309
+ | Symptom | What to check |
310
+ |---|---|
311
+ | Settings page is absent or the plugin is pending | Confirm the target profile, peer compatibility, Agent Teams, and required client services. |
312
+ | 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. |
313
+ | 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. |
314
+ | A prompt fails with an unknown variable | Correct the `{{variable}}` group or provide the variable through the deployment. |
315
+ | 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. |
316
+ | 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. |
317
+
318
+ ### Persistence and compatibility
319
+
320
+ - 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.
321
+ - 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.
322
+ - Legacy captain route fields are removed during settings reconciliation because captains use the conversation's model. Back up configuration before migrating older profiles.
323
+ - The bundled schema runtime in v0.1.4 fixes missing-`zod` startup imports from earlier package builds. It does not repair unrelated Harness installation, encoding, lock, or third-party plugin failures.
324
+
325
+ <a id="understand-the-implementation"></a>
326
+ ## How it works
327
+
328
+ The plugin uses Cordis and Harness extension points without patching the Host:
329
+
330
+ 1. **Profile configuration** stores Team definitions and Session selections. The browser uses revision-checked settings writes and an event-driven execution stream.
331
+ 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.
332
+ 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.
333
+ 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.
334
+
335
+ ### Source navigation
336
+
337
+ | Area | Source |
338
+ |---|---|
339
+ | Plugin lifecycle and settings reconciliation | [index.ts](<src/index.ts>), [settings-reconcile.ts](<src/settings-reconcile.ts>) |
340
+ | Team application and member tool | [application.ts](<src/application.ts>) |
341
+ | 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>) |
342
+ | Tool policies and presentation | [tool-policy.ts](<src/tool-policy.ts>), [presentation.ts](<src/presentation.ts>) |
343
+ | Preset editing and portable documents | [preset-tools.ts](<src/preset-tools.ts>), [preset-transfer.ts](<src/preset-transfer.ts>) |
344
+ | Execution state and catalog | [execution.ts](<src/execution.ts>), [tool-catalog.ts](<src/tool-catalog.ts>) |
345
+ | Browser UI | [src/client](<src/client>) |
346
+
347
+ <a id="model-experience"></a>
348
+ ### Prompt and context behavior
349
+
350
+ 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.
351
+
352
+ 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.
353
+
354
+ <a id="dev-note"></a>
355
+ <a id="development"></a>
356
+ ## Development and contributing
357
+
358
+ Source development requires a compatible, dependency-installed [Harness checkout](https://github.com/deepseek-ai/deepseek-harness). From this repository:
359
+
360
+ ```sh
361
+ export DSH_CHECKOUT=/absolute/path/to/deepseek-harness
362
+ npm test
363
+ npm run typecheck
364
+ npm run bundle
365
+ ```
366
+
367
+ 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.
368
+
369
+ 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:
370
+
371
+ - Harness and plugin versions, OS, profile type, and installation source/ref.
372
+ - Reproduction steps, expected behavior, actual behavior, and relevant error text.
373
+ - A minimal, redacted preset or screenshot when helpful.
374
+
375
+ 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.
376
+
377
+ <a id="further-exploration"></a>
378
+ ## Related resources
379
+
380
+ - [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) — the Host and its plugin system.
381
+ - [Built-in preset documents](<contrib/default-presets>) — portable starting points for your own Teams.
382
+ - [GitHub Releases](https://github.com/bloodarea/dsh-agent-team-presets/releases) — published versions.
383
+
384
+ <a id="license"></a>
385
+ ## License
386
+
387
+ [MIT](<LICENSE>). Bundled third-party notices are in [THIRD-PARTY-NOTICES.txt](<lib/THIRD-PARTY-NOTICES.txt>).