dsh-plugin-tool-management 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +323 -245
- package/README.md +212 -201
- package/README_EN.md +206 -199
- package/docs/images/1-EN.png +0 -0
- package/docs/images/1.png +0 -0
- package/docs/images/2-EN.png +0 -0
- package/docs/images/2.png +0 -0
- package/docs/images/3-EN.png +0 -0
- package/docs/images/3.png +0 -0
- package/docs/images/4-EN.png +0 -0
- package/docs/images/4.png +0 -0
- package/docs/images/5-EN.png +0 -0
- package/docs/images/5.png +0 -0
- package/docs/images/6-EN.png +0 -0
- package/docs/images/6.png +0 -0
- package/docs/images/7-EN.png +0 -0
- package/docs/images/7.png +0 -0
- package/docs/images/8-EN.png +0 -0
- package/docs/images/8.png +0 -0
- package/docs/update.md +171 -111
- package/lib/client.js +6220 -5451
- package/lib/compat/probe.js +0 -5
- package/lib/context-inject.js +468 -39
- package/lib/history/bridge.js +7 -0
- package/lib/history/tombstone.js +1 -2
- package/lib/hub.js +3 -1
- package/lib/index.js +735 -95
- package/lib/mcp/override-blocks.js +10 -6
- package/lib/mcp/state-section.js +64 -21
- package/lib/rules/archive-engine.js +93 -18
- package/lib/rules/archive.js +12 -7
- package/lib/rules/service.js +195 -44
- package/lib/scene-prompt-sync.js +4 -12
- package/lib/skills/catalog.js +6 -9
- package/lib/skills/core.js +5 -4
- package/lib/skills/service.js +56 -2
- package/lib/subagents/catalog.js +31 -15
- package/lib/subagents/service.js +307 -34
- package/lib/subagents/tools.js +29 -4
- package/package.json +105 -102
- package/lib/history/projcache.js +0 -335
package/README_EN.md
CHANGED
|
@@ -1,199 +1,206 @@
|
|
|
1
|
-
# dsh-plugin-tool-management
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/dsh-plugin-tool-management)
|
|
4
|
-
[](LICENSE)
|
|
5
|
-
[](package.json)
|
|
6
|
-
[](https://github.com/ouli-1242/dsh-plugin-tool-management)
|
|
7
|
-
|
|
8
|
-
[](https://dsh.market/)
|
|
9
|
-
[](https://awesome-dsh-plugin.com)
|
|
10
|
-
[](https://dshfind.com/zh/plugins/ouli-1242/dsh-plugin-tool-management)
|
|
11
|
-
|
|
12
|
-
[简体中文](README.md) · **English** · [Changelog](CHANGELOG.md) · [Release overview](docs/update.md)
|
|
13
|
-
|
|
14
|
-
- An **MCP, skills, scenes, memories, subagents, prompts & archived sessions** manager for DeepSeek Harness.
|
|
15
|
-
- Eight tabs: **Scenes**, **MCP**, **Skills**, **Subagents**, **Prompts**, **Memories**, **Sessions**, **Host**.
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Hard-refresh the browser (Cmd/Ctrl+Shift-R) afterwards — a **Tools** panel in Settings means it worked. No hand-editing of `cordis.patch.yml`, no skill source files touched, configuration survives restarts and upgrades.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Screenshots
|
|
26
|
-
|
|
27
|
-
|
|
|
28
|
-
|
|
29
|
-
| 
|
|
30
|
-
| **Scenes**
|
|
31
|
-
| 
|
|
32
|
-
| **Skills**
|
|
33
|
-
| 
|
|
34
|
-
| **Prompts**
|
|
35
|
-
|  | 
|
|
36
|
-
| **Sessions**
|
|
37
|
-
|
|
38
|
-
## Highlights
|
|
39
|
-
|
|
40
|
-
In one line: **set up a scene for each kind of work — "day job / writing / coding" — and switch the whole stack with one click. Everything the plugin manages, the model can actually see.**
|
|
41
|
-
|
|
42
|
-
| Highlight
|
|
43
|
-
|
|
44
|
-
| One-click scene switch
|
|
45
|
-
| Memories reach the model on their own | Write a few `.md` files under a scene and they become its knowledge base — injected automatically, no copy-pasting every session
|
|
46
|
-
| Notes for MCP servers
|
|
47
|
-
| Disable a single tool
|
|
48
|
-
| Skills at a glance
|
|
49
|
-
| Subagent = one file, one role
|
|
50
|
-
| Several prompt presets
|
|
51
|
-
| Sessions no longer lost
|
|
52
|
-
| The model always sees it
|
|
53
|
-
| Lock it and relax
|
|
54
|
-
| Deleted is not gone
|
|
55
|
-
| Safe by default
|
|
56
|
-
|
|
57
|
-
## Quick start
|
|
58
|
-
|
|
59
|
-
Prerequisites: DSH installed (`dsh web` runs), Node.js ≥ 18.
|
|
60
|
-
|
|
61
|
-
```sh
|
|
62
|
-
dsh plugin --profile web add dsh-plugin-tool-management@latest # install / update
|
|
63
|
-
dsh plugin --profile web remove dsh-plugin-tool-management # uninstall
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Hard-refresh the browser — a **Tools** panel with eight tabs means it worked. Client changes hot-reload; host-side changes need `dsh web` restarted.
|
|
67
|
-
|
|
68
|
-
You can also ask the model:
|
|
69
|
-
|
|
70
|
-
```text
|
|
71
|
-
Install the dsh-plugin-tool-management plugin:
|
|
72
|
-
dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
73
|
-
Then remind me to hard-refresh the browser.
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
The model can manage everything above via 14 tools (`mcp_manager_*` / `skill_manager_*` / `prompt_manager_*` / `memory_manager_*` / `
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Features
|
|
81
|
-
|
|
82
|
-
### Scenes & memories
|
|
83
|
-
|
|
84
|
-
- **A scene = a group, a memory = a `.md` file**. `memories/<scene>/<name>.md`, the whole body is injected, file names can be non-ASCII.
|
|
85
|
-
- **Single-choice toggle**: only one scene at a time (others greyed out); turning all off = only `global` and `_shared` inject. New scenes start off.
|
|
86
|
-
- **Scene-bound prompt**: switching scenes rewrites `~/.dsh/AGENTS.md` (5-gen backup, auto-restore on exit).
|
|
87
|
-
- **Scene profile**: every scene combines MCP tools / skills / subagents / memories (any mix); opening a scene applies and narrows injection, closing restores verbatim (the toggle is the only entry). Checked means on, unchecked means off, and **a missing section means nothing is checked — so that whole domain is off** (a scene with no MCP section therefore stops every MCP server, and exit starts them again). While a scene is active those switches (MCP, skills, subagents
|
|
88
|
-
- **Import**: `.md` / `.zip` (dir name = scene, bundles carry attachments), same names skipped never overwritten, over-limit items reported.
|
|
89
|
-
- **Export**: pick memories and zip them, keeping the `scene/name` layout; bundle memories bring their attachments along. Sources are read-only.
|
|
90
|
-
- **Injection budget**: default 64 KiB, oversized memories skipped with a list. Deletes go to recycle bin.
|
|
91
|
-
- **
|
|
92
|
-
- **
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- **
|
|
98
|
-
- **
|
|
99
|
-
- **
|
|
100
|
-
- **
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
- **
|
|
105
|
-
- **
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- **
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
- **
|
|
114
|
-
- **
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
-
|
|
122
|
-
- **
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
| MCP
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
|
181
|
-
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
1
|
+
# dsh-plugin-tool-management
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-plugin-tool-management)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](package.json)
|
|
6
|
+
[](https://github.com/ouli-1242/dsh-plugin-tool-management)
|
|
7
|
+
|
|
8
|
+
[](https://dsh.market/)
|
|
9
|
+
[](https://awesome-dsh-plugin.com)
|
|
10
|
+
[](https://dshfind.com/zh/plugins/ouli-1242/dsh-plugin-tool-management)
|
|
11
|
+
|
|
12
|
+
[简体中文](README.md) · **English** · [Changelog](CHANGELOG.md) · [Release overview](docs/update.md)
|
|
13
|
+
|
|
14
|
+
- An **MCP, skills, scenes, memories, subagents, prompts & archived sessions** manager for DeepSeek Harness.
|
|
15
|
+
- Eight tabs: **Scenes**, **MCP**, **Skills**, **Subagents**, **Prompts**, **Memories**, **Sessions**, **Host**.
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Hard-refresh the browser (Cmd/Ctrl+Shift-R) afterwards — a **Tools** panel in Settings means it worked. No hand-editing of `cordis.patch.yml`, no skill source files touched, configuration survives restarts and upgrades.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Screenshots
|
|
26
|
+
|
|
27
|
+
| | |
|
|
28
|
+
|:---------------------------------:|:----------------------------------:|
|
|
29
|
+
|  |  |
|
|
30
|
+
| **Scenes** | **MCP** |
|
|
31
|
+
|  |  |
|
|
32
|
+
| **Skills** | **Subagents** |
|
|
33
|
+
|  |  |
|
|
34
|
+
| **Prompts** | **Memories** |
|
|
35
|
+
|  |  |
|
|
36
|
+
| **Sessions** | **Host** |
|
|
37
|
+
|
|
38
|
+
## Highlights
|
|
39
|
+
|
|
40
|
+
In one line: **set up a scene for each kind of work — "day job / writing / coding" — and switch the whole stack with one click. Everything the plugin manages, the model can actually see.**
|
|
41
|
+
|
|
42
|
+
| Highlight | What it means |
|
|
43
|
+
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| One-click scene switch | Each scene carries its own set: which MCP servers, which skills, which personas, which memories; flip it on and the whole stack follows, turn it off and everything comes back |
|
|
45
|
+
| Memories reach the model on their own | Write a few `.md` files under a scene and they become its knowledge base — injected automatically, no copy-pasting every session |
|
|
46
|
+
| Notes for MCP servers | Write "if A is down, fall back to B" as a note — the model sees it and acts on it |
|
|
47
|
+
| Disable a single tool | Keep a server but mute one tool: invisible and uncallable; "Restart" only reconnects and never flips switches |
|
|
48
|
+
| Skills at a glance | Which copy is in effect, which is shadowed by a same-name skill, which is preferred — all marked in the list |
|
|
49
|
+
| Subagent = one file, one role | Write a role file and delegate; only the result comes back and it never clutters your History; which roles are available can follow the scene |
|
|
50
|
+
| Several prompt presets | Keep multiple AGENTS.md baselines (terse mode, teaching tone, …), switch with one click; a scene can bind its own |
|
|
51
|
+
| Sessions no longer lost | Archive grouped by project, searchable, batch-restorable; import transcripts from Claude Code / Cursor / Codex |
|
|
52
|
+
| The model always sees it | Everything the plugin manages (memories / MCP / skills / subagents / prompts) is announced to the model — one message per domain, republished only on change; under Minimal nothing is injected by default (follows the preset), force any domain on in the Host tab |
|
|
53
|
+
| Lock it and relax | Lock a scene to make all five domains read-only; unlock first to change anything |
|
|
54
|
+
| Deleted is not gone | Deletes land in a recycle bin and can be restored; skills / memories / personas / presets zip out and back in |
|
|
55
|
+
| Safe by default | Secrets masked, plaintext needs a token; only the plugin's own files are written, skill sources stay untouched, and your config survives restarts and upgrades |
|
|
56
|
+
|
|
57
|
+
## Quick start
|
|
58
|
+
|
|
59
|
+
Prerequisites: DSH installed (`dsh web` runs), Node.js ≥ 18.
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
dsh plugin --profile web add dsh-plugin-tool-management@latest # install / update
|
|
63
|
+
dsh plugin --profile web remove dsh-plugin-tool-management # uninstall
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Hard-refresh the browser — a **Tools** panel with eight tabs means it worked. Client changes hot-reload; host-side changes need `dsh web` restarted.
|
|
67
|
+
|
|
68
|
+
You can also ask the model:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
Install the dsh-plugin-tool-management plugin:
|
|
72
|
+
dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
73
|
+
Then remind me to hard-refresh the browser.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The model can manage everything above via 14 tools (`mcp_manager_*` / `skill_manager_*` / `prompt_manager_*` / `memory_manager_*` / `subagent_manager_*`); scripts use `POST /dsh-plugin-tool-management/api` (`{op, args}` protocol).
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Features
|
|
81
|
+
|
|
82
|
+
### Scenes & memories
|
|
83
|
+
|
|
84
|
+
- **A scene = a group, a memory = a `.md` file**. `memories/<scene>/<name>.md`, the whole body is injected, file names can be non-ASCII.
|
|
85
|
+
- **Single-choice toggle**: only one scene at a time (others greyed out); turning all off = only `global` and `_shared` inject. New scenes start off.
|
|
86
|
+
- **Scene-bound prompt**: switching scenes rewrites `~/.dsh/AGENTS.md` (5-gen backup, auto-restore on exit).
|
|
87
|
+
- **Scene profile**: every scene combines MCP tools / skills / subagents / memories (any mix); opening a scene applies and narrows injection, closing restores verbatim (the toggle is the only entry). Checked means on, unchecked means off, and **a missing section means nothing is checked — so that whole domain is off** (a scene with no MCP section therefore stops every MCP server, and exit starts them again). While a scene is active those switches (MCP, skills, subagents) still work — changes are written into that scene's profile too (they take effect immediately and are kept for the next visit); only locking freezes them. The memory domain has a single source of truth and never goes through the profile.
|
|
88
|
+
- **Import**: `.md` / `.zip` (dir name = scene, bundles carry attachments), same names skipped never overwritten, over-limit items reported.
|
|
89
|
+
- **Export**: pick memories and zip them, keeping the `scene/name` layout; bundle memories bring their attachments along. Sources are read-only.
|
|
90
|
+
- **Injection budget**: default 64 KiB, oversized memories skipped with a list. Deletes go to recycle bin.
|
|
91
|
+
- **Subagent sessions do not receive memories**: memories are injected into the **top-level session only** — they are the parent's situation, not the facts a child needs; a child's context stays "persona + task", it can read memories on demand with `memory_manager_list/read`, and relevant facts belong in the `task`. Other domains are unaffected (MCP / skills / prompts still inject; the persona catalog follows each persona's `catalogDepth`).
|
|
92
|
+
- **Scene lock**: once locked, MCP / skills / subagents / memories / prompts are read-only — UI disabled plus a server-side guard; a scene must be running to lock, and a locked scene can't be closed until unlocked.
|
|
93
|
+
- **Deleting a scene deletes its memories too**: the scene record, profile and every memory go into one recycle-bin entry, restored as a whole; a running scene refuses deletion. Scene names are renameable (dir and profile follow, memory bodies untouched).
|
|
94
|
+
|
|
95
|
+
### Subagents
|
|
96
|
+
|
|
97
|
+
- **One file per persona**: `agents/<persona>.md`, frontmatter entirely optional.
|
|
98
|
+
- **A persona reaches the subagent's system prompt inside a role frame**: the body is used verbatim, wrapped in a `# Persona: <name>` heading, one authorizing line ("specified by the caller; where it conflicts with your default inclinations, it wins; the task states what to achieve, and this persona governs how") and one boundary line (it governs *how* you work, not *what* you may do), with the body fenced under `## Persona`. The frame follows the body's language. This makes the model read it as "I have been assigned a role" rather than as two stray sentences following the identity line — **the persona file itself needs no change**. The frame does not include `description`: that field exists so the *caller* can pick a persona; an introduction meant for the child belongs in the body.
|
|
99
|
+
- **Tool limits per Agent preset**: each preset gets its own allow/deny list (mutually exclusive), effective at runtime by the current preset — fixes the old "union of all presets" list that broke subagents after a preset switch.
|
|
100
|
+
- **`output:` hard output contract**: frontmatter may carry multiple `output:` lines (**one requirement per line**); the role frame renders them as a separate `## Output requirements (hard)` section after the persona definition. Use the prompt for how the role thinks (prose) and `output:` for what the deliverable must look like (format, severities, required markers, bans) — a persona with only an abstract requirement produces output nobody can check, and only checkable requirements actually get followed. The editor has an "Output requirements (hard)" box, and you can write the lines into the file directly.
|
|
101
|
+
- **Run and discard**: `subagent_manager_run` runs with the persona, returns only the result, never enters History. A child's context is **persona + task** only: memories are not injected (the child can read them with `memory_manager_*`, and relevant facts belong in the `task`). Scenes can bind which personas are available.
|
|
102
|
+
- **Two context modes**: by default the child starts fresh (it cannot see this conversation, so the task must be complete); with `inherit` the child is seeded with this conversation's **finished** turns (the same mechanism as the host's `subagent_fork`) and the task only states what is new. Only finished turns are inherited — a delegation made during the current turn cannot pass that turn's content (measured: a parent that delegated while still reading left the child to start from scratch), so treat `task` as self-contained in that case. The boundary against the host's two delegation tools (`subagent` / `subagent_fork`) is written into the context by this plugin: **work that matches a persona goes here**, and the host tools are for when no persona fits or a background job is needed.
|
|
103
|
+
- **On/off toggles**: a disabled persona is not injected and invisible to the model (file untouched); newly created / imported / restored personas start **disabled** (since v0.8.5, the same rule as skills / MCP) — switch them on before delegating. Entering a scene applies the profile's persona list exactly (checked on, everything else off; no section = all off) and exit restores the pre-scene switches. Inside a scene these toggles still work and are synced into the scene profile (only locking freezes them); leaving the scene restores the pre-scene state.
|
|
104
|
+
- **Persona catalog enters the system prompt**: names + descriptions only, so the model knows what it can delegate to; personas are renameable, scene bindings follow.
|
|
105
|
+
- **Catalog injection (`catalogDepth`)**: which sessions the standing persona catalog is injected into — default `1` = top level only; `2` also reaches subagent sessions; `3` goes two levels down; the UI's “No nesting limit” writes `99`, which reaches every session depth. **It does not limit nesting**: subagents can always delegate further, which the host decides (`dsh-tool-subagent` defaults to `maxDepth: 3`), and this plugin no longer passes `maxDepth` at all. When the standing catalog is not injected, `subagent_manager_list` still returns every persona. One rule drives all three places (catalog filter, domain declaration, live panel), so the UI and the actual injection cannot disagree.
|
|
106
|
+
|
|
107
|
+
### MCP servers
|
|
108
|
+
|
|
109
|
+
- **CRUD + immediate effect**: writes to `cordis.patch.yml`, HMR picks it up.
|
|
110
|
+
- **Per-tool switches**: disable individual tools (invisible to the model, blocked at call), whole-server batch.
|
|
111
|
+
- **Stopped servers still show their tools**: a server that is not running keeps the tool names and descriptions last seen (marked "as of last run"); one that has never run can be probed with "start server to read tools".
|
|
112
|
+
- **Secret masking**: keeps the first 4 characters and masks the rest as `****` (values of 4 chars or fewer become all `****`); "Reveal" needs a token.
|
|
113
|
+
- **Migrate & back up**: cross-project/global migration rolls back on failure; JSON export/import.
|
|
114
|
+
- **Status & notes enter the system prompt**: currently usable servers are listed; **one that has connected before but cannot right now is also listed and labelled** (`(当前未连上;上次连上时 N 个工具)`) — so the model says "it is not connected, check it" instead of reading "configured but unreachable" as "not configured here" and suggesting you install one. Servers that have never connected are omitted. Your notes travel along as decision hints; levels are "global / app", new servers default to global. Note: a persona-complete preset such as minimal suppresses that section — there the model reads server names, enablement, tool counts and notes with `mcp_manager_list`.
|
|
115
|
+
|
|
116
|
+
### Skills
|
|
117
|
+
|
|
118
|
+
- **Sources at a glance**: project / DSH / Agents / Codex / Claude / custom dirs, grouped by source.
|
|
119
|
+
- **Opposite permissions**: default sources must be read but skills can be deleted; external dirs can be disabled/removed but skills are read-only.
|
|
120
|
+
- **Remove ≠ disable**: remove = directory not scanned at all (files untouched, restorable); disable = still listed but not callable.
|
|
121
|
+
- **Same-name skills: see which copy is in effect**: the winning copy is marked "preferred", shadowed ones name the source that wins, and enabling a shadowed copy says so instead of pretending it worked.
|
|
122
|
+
- **Custom dirs / ZIP import & export / recycle bin**.
|
|
123
|
+
|
|
124
|
+
### Prompt presets
|
|
125
|
+
|
|
126
|
+
- Multiple `~/.dsh/AGENTS.md` baselines, one-click apply (the host re-reads that file every turn, so it takes effect on the next turn), 5-gen backup.
|
|
127
|
+
- **Remembers the preset applied last**: even after you hand-edit `AGENTS.md`, the model can still answer "which preset is this from" (flagged "changed since").
|
|
128
|
+
- **Description**: one line saying what a preset is for — shown in this panel only. It lives in a sibling `meta.json`, never in AGENTS.md, so it is never injected into prompts.
|
|
129
|
+
- Create with body inline, edit can change id (= dir rename, scene bindings follow). A referenced preset cannot be deleted (bound by a scene, currently in AGENTS.md, or the baseline to restore on scene exit); deletes go to recycle bin.
|
|
130
|
+
- **While a scene drives the baseline, Apply rebinds the scene to that preset** (written into the scene profile, and the binding realigns immediately; allowed while unlocked — v0.9 reversed the old "other presets are refused" behavior); **only locking refuses**. The global baseline is restored from the snapshot on scene exit.
|
|
131
|
+
|
|
132
|
+
### Archived sessions
|
|
133
|
+
|
|
134
|
+
- Grouped by project, search, batch restore / delete, retention auto-cleanup.
|
|
135
|
+
- Workspace registration deleted → group rebuilt from session dirs, one-click re-register.
|
|
136
|
+
- Import Claude Code / Cursor / Codex / any text; export Markdown / JSONL.
|
|
137
|
+
|
|
138
|
+
### Host compatibility
|
|
139
|
+
|
|
140
|
+
The plugin uses the host's own `@deepseek-ai/*` libraries at runtime — they must be the same physical modules, or every "adapt to host" decision degrades into guesswork.
|
|
141
|
+
|
|
142
|
+
- **Host tab**: host version, usable capability count, per-action routing (native/adapter/unavailable), degradations & reasons. Read-only.
|
|
143
|
+
- **Command line**: `node scripts/doctor.mjs` (check), `node scripts/host-deps.mjs --fix` (align deps), `npm run sync:profile` (mirror the build into the profile's local install — a `file:` install is a hard-linked copy, so files ADDED by a build never show up there on their own).
|
|
144
|
+
- Under a **suppressing preset** such as `minimal` (persona `complete` / runtime context off) this plugin's injection is **off by default** (following the preset's intent), and the prompt and the skills are missing because their official rows are not mounted — the Host tab marks this per column, and its "Injection" block can force any domain back on.
|
|
145
|
+
- **Unchecking "Skills" or "Prompt" really stops them**: under standard presets the host delivers those two itself (the plugin steps aside), so unchecking now also stops the host's copy — the `skill-catalog` / `agent-instructions` messages are no longer let through on that step. The other three domains (memory / MCP / subagents) are only ever sent by this plugin, so their toggles were already complete.
|
|
146
|
+
- **What an injection looks like**: one `<system-reminder>` per domain — a `##` title, a **bold one-line action** (the decision point at which to recall it), the tool name / trigger, then the body; any `</system-reminder>` inside the body is escaped (your own text cannot close the frame early). Each message ends with "this copy replaces the earlier one in this session" — injections are only re-sent when the content changes, so the older copy is still in context and the model must know which to trust. The wording follows Claude Code's and Codex CLI's official injections item by item.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Where data lives
|
|
151
|
+
|
|
152
|
+
| Content | Location |
|
|
153
|
+
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
154
|
+
| MCP definitions | `~/.dsh/cordis.patch.yml` (written by the plugin; pre-write copies land in the hub's `backups/`) |
|
|
155
|
+
| Skill policy / custom dirs | `~/.dsh/tool-management/skills-state.json` |
|
|
156
|
+
| Skills / memories / personas / presets | `~/.dsh/tool-management/{skills,memories,subagents,prompts}/` |
|
|
157
|
+
| Subagent toggles | `~/.dsh/tool-management/subagents-index.json` |
|
|
158
|
+
| Recycle bin | `~/.dsh/tool-management/trash/{skills,subagents,prompts,scenes}-trash/` |
|
|
159
|
+
| Archive ledger / retention | `~/.dsh/tool-management/history-*.json` |
|
|
160
|
+
| Memory index / scenes / profiles | `~/.dsh/tool-management/memories-index.json` |
|
|
161
|
+
| MCP sidecars (disabled tools / known tools / notes / settings) | `~/.dsh/tool-management/mcp-*.json` |
|
|
162
|
+
| Injection settings (five domain switches / suppressing-preset policy) | `~/.dsh/tool-management/inject-settings.json` |
|
|
163
|
+
| Runtime log / patch backups | `~/.dsh/tool-management/tool-management.log` · `backups/` |
|
|
164
|
+
|
|
165
|
+
**No user data is stored inside the plugin's install directory** (`dsh plugin update` replaces it wholesale).
|
|
166
|
+
|
|
167
|
+
## Configuration & security
|
|
168
|
+
|
|
169
|
+
| Field | Description |
|
|
170
|
+
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
171
|
+
| `token` | Access token. When set, **all writes + plaintext secrets** require `x-dsh-token`; **unset = plaintext endpoints closed**. Also the escape hatch for curl / LAN. |
|
|
172
|
+
| `maxBodyBytes` | Request body cap, default 88 MiB. |
|
|
173
|
+
|
|
174
|
+
- **Browser**: reads/writes via cookie, no token needed; but **plaintext secrets** (Reveal / export) need a token.
|
|
175
|
+
- **curl / scripts**: send `x-dsh-token`, or carry the browser cookie.
|
|
176
|
+
- **Port forwarded to public**: configure a token — prevents strangers injecting MCP commands (≈ remote code execution) and stealing secrets.
|
|
177
|
+
|
|
178
|
+
## FAQ
|
|
179
|
+
|
|
180
|
+
| Symptom | Fix |
|
|
181
|
+
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
182
|
+
| Pages missing after install | Hard refresh; restart DSH if that fails. |
|
|
183
|
+
| Duplicate MCP tabs | Remove the stale loader row from `cordis.patch.yml`, restart. |
|
|
184
|
+
| Broken config, DSH won't boot | Restore the newest `.bak-<timestamp>`. |
|
|
185
|
+
| Action stopped after DSH upgrade | Settings → Tools → **Host** for the reason; `doctor.mjs` → `host-deps.mjs --fix`. |
|
|
186
|
+
| Still asked to confirm in `approval=never`? | No card appears — straight through with a log line; switch back to "workspace write" to get asked again. |
|
|
187
|
+
| `subagent_manager_run` reports provider unavailable | The provider isn't registered: `spawn` (default) / `fork` (`inherit`) come from `@deepseek-ai/dsh-subagent-spawn-in-process` / `-fork-in-process` — mount and restart. |
|
|
188
|
+
| Scene binds persona A, but official `subagent` ran something else | Those two are host tools and this plugin cannot hide them; it writes the boundary into the context instead (work matching a persona goes to `subagent_manager_run`; host tools only when no persona fits or a background job is needed), and `inherit` now matches fork's context inheritance. |
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Development
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
npm install
|
|
196
|
+
npm run build # tsc + sync client
|
|
197
|
+
npm test # build + i18n + smoke tests (mount & render)
|
|
198
|
+
npm run check:i18n # dictionary self-check
|
|
199
|
+
npm run doctor # host compatibility check
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
`lib/` is not tracked — run `npm run build` after cloning. Changes need `dsh web` restarted. Runtime dep is only `fflate`; `@deepseek-ai/*` all come from the host.
|
|
203
|
+
|
|
204
|
+
## License
|
|
205
|
+
|
|
206
|
+
MIT
|
package/docs/images/1-EN.png
CHANGED
|
Binary file
|
package/docs/images/1.png
CHANGED
|
Binary file
|
package/docs/images/2-EN.png
CHANGED
|
Binary file
|
package/docs/images/2.png
CHANGED
|
Binary file
|
package/docs/images/3-EN.png
CHANGED
|
Binary file
|
package/docs/images/3.png
CHANGED
|
Binary file
|
package/docs/images/4-EN.png
CHANGED
|
Binary file
|
package/docs/images/4.png
CHANGED
|
Binary file
|
package/docs/images/5-EN.png
CHANGED
|
Binary file
|
package/docs/images/5.png
CHANGED
|
Binary file
|
package/docs/images/6-EN.png
CHANGED
|
Binary file
|
package/docs/images/6.png
CHANGED
|
Binary file
|
package/docs/images/7-EN.png
CHANGED
|
Binary file
|
package/docs/images/7.png
CHANGED
|
Binary file
|
package/docs/images/8-EN.png
CHANGED
|
Binary file
|
package/docs/images/8.png
CHANGED
|
Binary file
|