dsh-subagent-library 0.3.6 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -8,32 +8,39 @@
8
8
 
9
9
  <p align="center">
10
10
  <img src="https://img.shields.io/github/actions/workflow/status/MaRi23333/dsh-subagent-library/ci.yml?style=flat-square&label=CI" alt="CI" />
11
- <img src="https://img.shields.io/github/license/MaRi23333/dsh-subagent-library?style=flat-square" alt="License: MIT" />
12
- <img src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.1--rc.2-4d6bfe?style=flat-square" alt="DeepSeek Harness 0.2.1-rc.2" />
11
+ <img src="https://img.shields.io/github/license/MaRi23333/dsh-subagent-library?style=flat-square" alt="License: Apache-2.0" />
12
+ <img src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.2--rc.5-4d6bfe?style=flat-square" alt="DeepSeek Harness 0.2.2-rc.5" />
13
13
  </p>
14
14
 
15
- ## Overview
15
+ ## Subagent Library
16
16
 
17
- A named subagent roster plugin for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) desktop and Web interfaces: turn your recurring roles (code review, red team, multimodal understanding…) into a persistent named roster with model, role prompt, depth and background-mode settings. Then **just tell the main agent "do this with xxx"** — the model picks and dispatches through two tools by itself:
17
+ Keep the assistants you use regularly in a named roster for DeepSeek Harness. Give each role a name, a description, and a prompt. Choose its usual model and reasoning effort, or let it follow the main conversation. Once a role is saved, you can ask for it by name in Desktop or Web.
18
18
 
19
- - `list_subagents` — lists roster entries (id / role description / model) so the model can pick a suitable one;
20
- - `delegate` — dispatches work by `library_id`: foreground wait, background one-shot, or a continuable (resumable) subagent, per the entry's configuration.
19
+ For example, the roster below has an enabled role named `glm-adversary`. In the main conversation, you could ask:
21
20
 
22
- Available in every conversation (any agent preset), **no slash command needed**; the `/subagent` command is only for humans to peek at the roster in the command palette.
21
+ > Ask `glm-adversary` to review this launch plan and flag the two assumptions we should check first.
23
22
 
24
- Adding entries needs no hand-written config either: ask the main agent to do it, or edit visually in the settings page. Since 0.3 the roster is stored as **one YAML file per named subagent** (default directory `~/.dsh/subagents/`), hot-reloaded, comment-friendly and versionable per file.
23
+ The main agent uses `list_subagents` to find a saved role and `delegate` to give it the task. The role starts as a native DSH subagent. It reports back when it finishes, and you can send it follow-up questions.
25
24
 
26
- > Distinction from the official capabilities: the official `subagent` tool dispatches ad-hoc tasks (you describe the task each time), and the official `list_agents` lists *running* child instances; this plugin maintains a **persistent named roster** (edited visually in a settings page, hot-reloaded). The model picks an entry with `list_subagents` and dispatches by id with `delegate`.
25
+ ![The role roster in DSH Desktop. Each card shows the role’s name, assignment, model, and enabled state.](./assets/readme/screenshot-settings.png)
27
26
 
28
- > **Upgrading from 0.2.x?** Since 0.3 the roster is directory-backed (one YAML file per subagent). Your legacy config **migrates automatically**; after verifying it, clear the old `entries` section for your host generation. [MIGRATION.md](./MIGRATION.md) documents the config locations, failure/retry behavior, and rollback limits; [CHANGELOG.md](./CHANGELOG.md) lists all changes.
27
+ [Install](#install) · [Your first delegation](#your-first-delegation) · [Switch models for one task](#switch-models-for-one-task) · [Optional groups](#groups-and-slots) · [Configuration and migration](#configuration-and-migration)
29
28
 
30
- [Install](#install) · [Your first delegation](#your-first-delegation) · [Configuration reference](#configuration)
29
+ ## Manage your roster
31
30
 
32
- ## Host and desktop compatibility
31
+ In **Settings → Subagent Library → Role roster**, filter by role ID, description, or model. Expand a card to edit its prompt, default model, and reasoning effort. Disable a role to set it aside and enable it again when you need it.
33
32
 
34
- **0.3.5 targets DSH `0.2.1-rc.2`:** fixes startup failures for continuable and one-shot subagents, and cancellation that failed to stop background children. Foreground one-shot, continuable, background startup and cancellation of running jobs have been checked on that desktop host. See [Configuration](#configuration) for role-prompt and tool-filter limitations, and [CHANGELOG.md](./CHANGELOG.md) for the full update.
33
+ Each role has its own YAML file under `~/.dsh/subagents/` by default. Create roles in Settings, edit the files yourself, or ask a main agent with write access to that directory to configure one for you. Saved changes take effect on the next lookup or dispatch. Desktop and Web profiles can use different models for the same role.
35
34
 
36
- The desktop client uses the Web plugin UI, so no separate desktop-specific package is needed. The legacy start paths remain, but this release's live checks target `0.2.1-rc.2`; model calls still depend on each provider's configuration and service. Roster directories, profile routes and migration rules are unchanged, so no new migration is needed.
35
+ Version 0.4.1 targets DSH `0.2.2-rc.5` and requires native subagents that can be addressed by name for follow-up messages. To upgrade from an earlier version, see the [migration guide](./MIGRATION.md) and [changelog](./CHANGELOG.md).
36
+
37
+ ## See each subagent’s model and reasoning effort
38
+
39
+ The DSH subagent list omits the model and reasoning effort by default. When you dispatch a role through Subagent Library, open the member list at the top of the conversation to see the model it started with. The reasoning effort appears alongside it when the host provides one.
40
+
41
+ In the screenshot, the same `glm-adversary` role used `deepseek-flash · high` to rewrite a meeting announcement and `glm-5.4 · max` to double-check the meeting time.
42
+
43
+ ![The DSH member list shows three dispatches with grok-4.7 · high, deepseek-flash · high, and glm-5.4 · max.](./assets/readme/member-model-effort.png)
37
44
 
38
45
  ## Install
39
46
 
@@ -46,7 +53,7 @@ Desktop and Web have separate plugin installations and activation states; instal
46
53
  3. Click **Enable now** when installation finishes. Closing the completed-install dialog leaves the plugin disabled.
47
54
  4. Restart only if the UI asks you to: fully exit with **Quit** in the application menu, then reopen the app. Closing a window may only hide it.
48
55
 
49
- Once enabled, find **子代理库 (Subagent Library)** in Settings; the top of the page shows entry counts and the roster directory.
56
+ Once enabled, open **子代理库 (Subagent Library)** in Settings and choose the role roster or groups tab. The storage and backup section shows the roster directory.
50
57
 
51
58
  <details>
52
59
  <summary>Alternative: use the desktop-bundled CLI (Windows / macOS)</summary>
@@ -95,192 +102,103 @@ dsh plugin --profile web add /absolute/path/to/dsh-subagent-library
95
102
 
96
103
  ## Your first delegation
97
104
 
98
- Start with a main conversation whose model already replies normally. This example uses that session's model to reorganize supplied text; it needs no separate provider setup or file/web tools. The settings UI currently uses Chinese labels; their English meanings are given below.
99
-
100
- ### 1. Create a minimal role
101
-
102
- Without existing roster files or legacy configuration, the roster starts empty. The plugin does not add sample roles automatically.
103
-
104
- 1. Open **Settings → 子代理库 (Subagent Library)**. An empty roster shows the creation form immediately; otherwise click **+ 新增子代理 (Add subagent)**.
105
- 2. Set **ID** to `text-helper` and **描述(模型可见) (Description, visible to the model)** to `Organize short text supplied by the main conversation.` If that ID already exists, choose an unused one and replace it in the example below too.
106
- 3. Leave **模型 (Model), Provider, 角色提示词 (Role prompt), 禁用工具 (Denied tools), and the other optional fields blank**. Keep **后台模式 (Background mode)** at `one-shot`, then click **创建子代理 (Create subagent)**. This button saves immediately and enables the new entry; no second save is needed.
107
-
108
- ### 2. Ask the main agent to list and delegate
109
-
110
- Back in the main conversation, send:
111
-
112
- ```text
113
- Call list_subagents first and confirm that text-helper is available. Then use delegate to give it this task in the foreground:
114
- Turn "apple, banana, pear" into a numbered list, keeping that order. Use only this text and do not call other tools.
115
- Pass the subagent's result back to me.
116
- ```
117
-
118
- Look for `text-helper` in the `list_subagents` result, followed by a `delegate` call returning the child's numbered list. A direct answer from the main agent without a delegation call does not confirm that this flow worked. `/subagent` can display the roster, but does not perform the delegation.
105
+ 1. Open **Settings → Subagent Library → Role roster → New role**. Enter `text-helper` as the ID and “Organize short passages from the main conversation” as the description. Leave the model empty to follow the main conversation, then save.
106
+ 2. In the conversation, ask: “Have `text-helper` turn apple, banana, and pear into a numbered list, in that order. Send me its result.”
107
+ 3. The start receipt from `delegate` gives you the member’s name. Once it reports back, you can ask the same member to put the list on one line.
119
108
 
120
- Delegation still calls the model service. "Do not call other tools" is a task instruction; the host controls tool permissions. Per-entry `toolFilter` is unavailable on DSH 0.2.1, and a role name or prompt does not guarantee read-only access. See the [configuration limitations](#configuration).
121
-
122
- ### 3. If it does not work
123
-
124
- - **Entry missing:** confirm you clicked **创建子代理 (Create subagent)**, then use **刷新 (Refresh)** in Settings and check diagnostics. If the entry is disabled, switch it to **已启用 (Enabled)** and save.
125
- - **Tools missing:** confirm the plugin is enabled in the desktop or Web instance you are using, then check tool availability for the current conversation.
126
- - **Model startup fails:** first check that the main conversation can reply; leave both Provider and Model blank on the entry. Gray placeholder examples are not your configured routes. Follow the actual error for service authentication or quota issues.
109
+ Type `/subagent` in the command palette to browse your saved roles. The host’s `list_agents` tool shows members that have already been started.
127
110
 
128
111
  <details>
129
- <summary>Optional: create the same minimal role with YAML</summary>
112
+ <summary>Create a role with YAML or troubleshoot your first dispatch</summary>
130
113
 
131
- Use either this file method or the UI steps above. Create `text-helper.yaml` in the roster directory shown in Settings (create the directory if needed; do not overwrite an existing entry):
114
+ To create the same role from a file, save `text-helper.yaml` in the roster directory. The filename sets the ID, the main agent sees the description, and the child receives the persona with its assignment.
132
115
 
133
116
  ```yaml
134
- description: Organize short text supplied by the main conversation.
117
+ description: Organize short passages from the main conversation.
118
+ persona: Preserve proper names from the source.
135
119
  ```
136
120
 
137
- The filename supplies the ID. Omitting the other fields keeps the entry enabled and uses the session's model. Changes take effect without a restart. See [Configuration](#configuration) for more fields.
121
+ If a role is missing, refresh the roster and check that the role is enabled. If the main agent cannot see `list_subagents` or `delegate`, check that the plugin is enabled for the Desktop or Web instance you are using and that the session can access both tools. For a first test, leave the role model empty and use the working model from the main conversation.
138
122
 
139
123
  </details>
140
124
 
141
- ## Screenshots
142
-
143
- <p align="center">
144
- <img src="./assets/readme/screenshot-settings.png" width="75%" alt="Subagent Library settings: layered, collapsible cards and roster filtering" /><br>
145
- <em>Cards start collapsed for a quick view of roles, models and execution settings. Filter and expand to edit; enable-state changes take effect after saving.</em>
146
- </p>
147
-
148
- <p align="center">
149
- <img src="./assets/readme/screenshot-command-palette.png" alt="The /subagent command in the command palette" /><br>
150
- <em>The <code>/subagent</code> command (quick roster viewer)</em>
151
- </p>
152
-
153
- <p align="center">
154
- <img src="./assets/readme/screenshot-roster.png" width="75%" alt="/subagent output: the named subagent roster" /><br>
155
- <em>Roster output example: one-line role description + model route + continuable marker per entry</em>
156
- </p>
157
-
158
- ## Settings page
159
-
160
- A **子代理库 (Subagent Library)** page appears under Settings. **Each entry is a card, closed by
161
- default**; click its name to open the editor.
162
-
163
- - **Layered cards** separate the name and enable switch, a description of up to two lines,
164
- the model and provider, and a wrapping group of execution settings. Long names and model
165
- routes wrap without squeezing the description or hiding the switch.
166
- - A **summary band** stays at the top of the page: entry / enabled / disabled / unsaved counts
167
- plus the roster directory.
168
- - A **filter box** matches id, description, model and more; Expand/collapse all helps in a long
169
- roster.
170
- - **Expanded**, fields are grouped as Overview (description) / Routing & execution (provider,
171
- model, transport, background mode, reasoning effort, depth, output cap) / Tools & prompt
172
- (denied tools, persona), with Revert / Delete / Save at the bottom. Fields use two columns
173
- in wider panels and one in narrow panels, with host light/dark themes and keyboard support.
174
- - Toggling enable state creates a draft. The collapsed card exposes an unsaved badge and
175
- Revert / Save changes; the setting takes effect only after saving. Saving one entry does
176
- not submit other drafts, and Revert restores the entire saved entry.
177
- - Disabled entries appear last; entries marked as legacy are promoted to files on save.
178
- Storage and backup details are available in a disclosure at the bottom of the page.
125
+ ## Switch models for one task
179
126
 
180
- Saved changes are written back to `<id>.yaml` in the roster directory and hot-reloaded.
127
+ Suppose `text-helper` usually follows the main model, but you want a second take today. Ask: “Have `text-helper` use DeepSeek Flash to edit this paragraph.” You can choose a model authorized in the current session for a single role or a group member. The next ordinary dispatch uses the saved role settings.
181
128
 
182
- > **Security note:** the roster settings endpoint (`/subagent-library/api`) follows the
183
- > DSH Web Host's local trust boundary — the plugin itself adds no separate authentication
184
- > layer. If you bind DSH Web to a LAN, the public internet, or a reverse proxy, put proper
185
- > authentication and access control in front of it; do not expose this endpoint to
186
- > untrusted clients — subagent personas and configuration may contain internal working rules.
129
+ In the DSH sidebar, open **Plugins → built-in Subagent configuration → Model selection**. Enable agent model selection, select the allowed models, save, and start a new session. The main agent can call `list_subagent_models` to see the choices, pass `provider` and `model` to `delegate`, and optionally set `reasoning_effort`.
187
130
 
188
- ## Configuration
131
+ In a session without a recorded allowlist, an explicit selection is limited to the current parent provider and model. On a host that cannot read authorization, dispatch with the saved role settings remains available. Agent Teams is optional.
189
132
 
190
- Since 0.3 the roster is a directory with **one file per named subagent** (hot-reloaded, no restart needed):
191
-
192
- ```
193
- ~/.dsh/subagents/
194
- k3-reviewer.yaml # id = file name
195
- glm-reader.yaml
196
- _backups/ # backup area: copy the original here before editing (ignored by the plugin)
197
- README.md # optional: conventions for agents operating in this directory
198
- ...
199
- ```
133
+ ## Groups and slots
200
134
 
201
- > **Backup convention** — the plugin never auto-backs up. By convention, agents (or humans) copy the original file into `_backups/` before editing (suggested name `<id>.<yyyymmdd-hhmm>.yaml`). Anything `_`-prefixed is treated as non-roster content and silently ignored.
135
+ Some tasks call for the same people each time. To review an announcement, you might want one person to flag missing information and another to suggest a rewrite. Open **Settings → Subagent Library → Groups → New group**, select existing roles, and save their individual assignments and any shared instructions. Next time, ask for the group by name.
202
136
 
203
- Where the plugin-level options live **depends on the host version**. Use one of these two shapes:
137
+ ![An enabled two-member review group in Settings.](./assets/readme/group-settings.png)
204
138
 
205
- **DSH ≤0.1.6:** edit `~/.dsh/settings.yaml`.
139
+ In the conversation below, the main agent dispatches two members in the same turn. `grok-reviewer` uses its usual model to spot the missing start time. For this task, `glm-adversary` uses DeepSeek Flash to suggest a rewrite.
206
140
 
207
- ```yaml
208
- subagent-library:
209
- entriesDir: ~/.dsh/subagents
210
- subagentProvider: spawn
211
- # entries: (optional, legacy) the 0.2.x inline roster remains a read-only
212
- # fallback throughout 0.3.x — files win; removal planned for 0.4
213
- ```
141
+ ![Two review assignments in the same turn, with the first role on its default model and the second on DeepSeek Flash.](./assets/readme/group-dispatch.png)
214
142
 
215
- **DSH ≥0.1.7:** edit the **current profile's** (`web` or `desktop`) `cordis.patch.yml`, under `config` on its `- id: subagent-library` entry. Desktop and web do not call each other's model routes: a shared-roster `provider` that is not registered in the current profile is not used, and the child inherits this session's model. Provider/model saved on the settings page is stored for the current profile only.
143
+ Each `delegate` call starts one member. Independent assignments can start in the same turn. If an assignment depends on an earlier finding, the main agent can wait for that member to report back. Groups work with Agent Teams off. Turning it on also enables the host’s shared task board.
216
144
 
217
- ```yaml
218
- - id: subagent-library
219
- config:
220
- entriesDir: ~/.dsh/subagents
221
- subagentProvider: spawn
222
- # entries: (optional, legacy) the 0.2.x inline roster remains a read-only
223
- # fallback throughout 0.3.x — files win; removal planned for 0.4
224
- ```
145
+ <details>
146
+ <summary>Group YAML example and tool calls</summary>
225
147
 
226
- One entry file (`k3-reviewer.yaml`):
148
+ This `text-review` example reuses the `text-helper` role created above. The `facts` and `questions` slots give that role different assignments. Save it as `_groups/text-review.yaml` under the roster directory.
227
149
 
228
150
  ```yaml
229
- description: Code review on Kimi K3-256K, with image walkthroughs
230
- provider: kimi-coding
231
- model: k3-256k
232
- persona: |
233
- You are an independent review agent running on Kimi K3-256K…
234
- maxDepth: 1
235
- backgroundMode: continuable
151
+ description: Extract facts and open questions from supplied material.
152
+ instructions: Include the source for each finding.
153
+ members:
154
+ - slot: facts
155
+ role: text-helper
156
+ assignment: Extract facts supported by the source.
157
+ - slot: questions
158
+ role: text-helper
159
+ assignment: Identify missing information.
236
160
  ```
237
161
 
238
- > **DSH 0.2.1-series limitations:** the role prompt is sent in the first task message, not enforced as a system-level permission boundary. Per-entry `toolFilter` is unavailable, and entries containing it are refused. The example above therefore omits tool filtering and **does not guarantee read-only access**. Configure the required permissions in the host for read-only or tool-isolated work; a role name or prompt alone is not enough. The field table below also covers older hosts.
162
+ | Action | Tool call |
163
+ | --- | --- |
164
+ | Browse groups | `list_subagents({kind:"groups"})` |
165
+ | Inspect member keys, model settings and assignments | `list_subagents({group_id:"text-review"})` |
166
+ | Dispatch one member | `delegate({group_id:"text-review", slot:"facts", prompt:"Check the paragraph above."})` |
239
167
 
240
- Entry fields:
168
+ Browsing starts zero agents. The `questions` slot starts only on a separate call selecting it. A direct dispatch sends the role persona and task. A group dispatch also includes group instructions and the selected slot's assignment in the child's first message. Each start resolves the current role and profile route. Existing children keep their own sessions. Use `/subagent` to inspect the roster and groups from the command palette.
241
169
 
242
- | Field | Required | Notes |
243
- |---|---|---|
244
- | `id` (= file name) | yes | `<id>.yaml`; the id must match `[a-z0-9][a-z0-9-]*`, length ≤ 64 (Windows reserved device names con/nul/aux… are rejected) |
245
- | `description` | yes | Role description, shown to the model by `list_subagents` |
246
- | `provider` | no | **LLM route** (e.g. `deepseek-official`, `kimi-coding`); defaults to the caller's default |
247
- | `model` | no | LLM model id; defaults to the caller's session model |
248
- | `reasoningEffort` | no | Thinking effort: adapter-owned id (e.g. `max` / `high` / `medium` / `low`); empty follows the parent session default. Rides the official `agentOptions.reasoningEffort` override; when the child model route differs, the harness auto-drops the inherited effort, so unset values never leak across models. Only id-shaped values (alphanumerics and `._-`) are accepted; anything else is rejected on save |
249
- | `subagentProvider` | no | **Subagent transport** (a `ctx.subagents` provider such as `spawn`); defaults to the plugin-level default `spawn` |
250
- | `maxTokens` | no | Subagent output cap |
251
- | `persona` | no | Subagent role prompt. **DSH ≤0.2.0 hosts**: deployed as a system persona with strict `{{…}}` template interpolation (same semantics as deployment personas) — an unregistered variable (e.g. `{{user}}`) fails child activation. **DSH ≥0.2.1 hosts**: the start request has no persona field; the role is folded into the first task message under a `Role persona:` prefix — effective for the first turn, does NOT shadow a deployment persona, is not guaranteed to survive continuation turns or context compaction, and `{{…}}` is no longer interpolated (raw concatenation). A standalone `agentPreset` is deliberately not used to carry the role: an independent preset replaces the parent preset composition and drops the parent session's tools |
252
- | `toolFilter` | no | `allow`/`deny` tool-name lists (deny write-class tools for read-only roles). **Read-only/restricted roles should also deny `list_subagents`/`delegate`** so children are not taught by the global prompt to re-delegate in a chain. Names are resolved against the **calling session's restrictable set** at delegation (not "visibility"): names that session cannot apply are ignored and annotated with the reason (`本会话不存在` / `本会话专属工具`) in the delegate result and the `list_subagents` catalog — one shared entry never fails a whole delegation because a session lacks a tool. **An `allow` list that no name applies to refuses the delegation** (otherwise "keep only these" would silently become "keep nothing"). Registries without `view()` fall back to visibility, where scope-local names still make delegation fail loudly. Saves are not pre-validated. **DSH ≥0.2.1 hosts cannot enforce per-entry tool filters**: entries carrying `toolFilter` are refused at delegate time (marked undelegable in the catalog, warned at save time); such entries only work on ≤0.2.0 hosts |
253
- | `maxDepth` | no | Delegation depth cap; **when unset, defaults to 3 when the transport supports depthLimit** (aligned with the official subagent tool to prevent chained recursive delegation; the harness itself has no global depth cap). Transports without depthLimit stay uncapped |
254
- | `backgroundMode` | no | `one-shot` (default, omitted in files) / `continuable` (resumable) |
255
- | `enabled` | no | Write `enabled: false` to disable an entry (it stays visible in the directory and the settings page; `delegate` refuses it); omit or set `true` to enable |
170
+ Use `/subagent groups text-review` to see which members have a configured model and which inherit the parent model. A role can inherit the model and set its own reasoning effort. After dispatch, the native subagent menu and `list_agents` show the launch model and known effort in the member description, for example `text-review/facts [model-a · high]`. Expand the `delegate` receipt for the full `provider`, `model` and `reasoningEffort` values when available.
256
171
 
257
- **Broken files never brick the roster**: files that fail to parse or validate are skipped, and the reason is surfaced as diagnostics in `list_subagents`, the `/subagent` command, and the settings page; `.yaml`/`.yml` duplicate ids and wrongly-cased file names are reported the same way.
258
-
259
- **Migrating from 0.2.x**: on first roster use, the old `entries` section is exported **entry by entry** to `<id>.yaml` (ids with an existing file are skipped — hand-written files are never overwritten); legacy copies are KEPT as a rollback, and files take precedence. When saving through the settings page, an unchanged canonical `.yaml` row is skipped so its hand-written comments stay intact; an unchanged `.yml` row is still rewritten as generated `.yaml` and loses its comments. A write/convergence failure returns HTTP 500 and may leave a partial result. If the canonical `.yaml` skip path cannot sweep a same-id `.yml`, the save returns 200 with a warning and the duplicate diagnostic remains until a retry succeeds. Once confirmed, clear only the legacy `entries` key and keep the other keys on that same config row (reading is removed in 0.4).
172
+ </details>
260
173
 
261
- The 0.2.8 legacy `entries` fallback is for DSH ≤0.1.6 only; on DSH ≥0.1.7 the plugin cannot be downgraded by itself. Host downgrade and restoration of `settings.yaml.imported` data are unverified, so no downgrade sequence is prescribed. To restore roster content, use your own `_backups/` copies and verify them manually.
174
+ ## Configuration and migration
262
175
 
263
- > Mind the two provider concepts: `provider` is the LLM route (`agentOptions.provider`),
264
- > while `subagentProvider` is the subagent transport (`ctx.subagents` registration name, e.g. `spawn`/`fork`/`acp`).
176
+ | Location or field | Behavior |
177
+ | --- | --- |
178
+ | `<entriesDir>/<role-id>.yaml` | Shared role with required `description`. Optional fields include `persona`, `enabled`, model route, `maxTokens`, `maxDepth` and `subagentProvider`. |
179
+ | `_profiles/<profile>/<role-id>.yaml` | Profile route with `provider`, `model`, `reasoningEffort` or explicit inheritance. A shared provider missing from the current profile falls back to the session model. An invalid explicit profile route blocks the affected role. |
180
+ | `_groups/<group-id>.yaml` | Required description and ordered nonempty `members`. Optional `name`, `enabled` and `instructions`. A member has a `slot`, a `role` and an optional `assignment`. |
181
+ | `maxDepth` | Defaults to the host limit. An explicit value can tighten it. Zero blocks delegation. |
182
+ | `subagentProvider` | Defaults to the `spawn` transport. `fork` can inherit completed turns from the parent. The LLM provider is configured separately. |
183
+ | Legacy `backgroundMode` and `toolFilter` | Both former execution modes now start a resumable child asynchronously. Roles carrying a tool filter remain blocked until its removal is explicit. Set any required permission boundaries in the host. |
265
184
 
266
- ## Design notes
185
+ On hosts with profiles, Settings saves model edits in the current profile. On hosts without profiles, the same editor changes the shared default route. Clear it to follow the session model. Profile overrides bound to the old shared route need to be set again after the default changes.
267
186
 
268
- - Tools register on the **host plane**: no dependency on any agent preset, and switching presets never loses them;
269
- - Dispatch goes through the standard `ctx.subagents` seam (providers such as `spawn`), so subagents keep harness semantics: approval pinned to never, sandbox inherited from the parent session, depth caps, continuable support;
270
- - Entries are re-resolved from the roster directory on every operation (no cache, no watcher) — file edits take effect immediately; single-entry writes are atomic (temp file + rename with retries), concurrent writers are last-write-wins.
187
+ IDs and slot keys use lowercase letters, digits and hyphens, start with a letter or digit, and are at most 64 characters. Windows reserved device names are excluded. Disabling a group leaves its enabled roles available for direct use. Remove all group references before deleting a role. Settings detect stale writes. Hand-edited YAML is read on the next operation.
271
188
 
272
- ## Development
189
+ Configure the base directory and default transport on the plugin row of the current profile's `cordis.patch.yml`:
273
190
 
274
- ```sh
275
- pnpm install
276
- pnpm run typecheck
277
- pnpm run build # host: lib/index.js; client: lib/client.js
191
+ ```yaml
192
+ - id: subagent-library
193
+ config:
194
+ entriesDir: ~/.dsh/subagents
195
+ subagentProvider: spawn
278
196
  ```
279
197
 
280
- - Dev dependencies remain pinned to DSH `0.1.0-rc.6` (see package.json devDependencies); this is not the current runtime host version. See "Host and desktop compatibility" above for current support and usage feedback. If the interfaces drift on other versions, adjust against the corresponding tag of the [deepseek-harness repo](https://github.com/deepseek-ai/deepseek-harness).
198
+ Include the role files, `_profiles/` and `_groups/` in backups. The Settings endpoint `/subagent-library/api` shares the DSH Web Host access boundary. Configure host or reverse-proxy authentication when exposing it to other devices.
281
199
 
282
200
  ## License
283
201
 
284
- [MIT](./LICENSE). Third-party license notices for code inlined into the build artifacts are in [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md).
202
+ [Apache-2.0](./LICENSE). Third-party license notices for code inlined into the build artifacts are in [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md).
285
203
 
286
204
  This is an independent community project, not affiliated with or endorsed by DeepSeek; the `DeepSeek Harness` name is used only to identify the compatible platform.