@bruc3van/dsh-doctor 0.5.6 → 0.5.8
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 +77 -181
- package/README.md +77 -181
- package/package.json +1 -1
- package/skills/dsh-plugin-upgrade/SKILL.md +47 -24
- package/skills/dsh-plugin-upgrade/evals/evals.json +55 -0
- package/skills/dsh-plugin-upgrade/evals/files/import-move-plugin/README.md +5 -0
- package/skills/dsh-plugin-upgrade/evals/files/import-move-plugin/package.json +31 -0
- package/skills/dsh-plugin-upgrade/evals/files/import-move-plugin/src/index.ts +20 -0
- package/skills/dsh-plugin-upgrade/evals/files/import-move-plugin/src/stores.ts +15 -0
- package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/README.md +7 -0
- package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/package.json +20 -0
- package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/src/index.ts +2 -0
- package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/src/namespace-read.ts +6 -0
- package/skills/dsh-plugin-upgrade/evals/files/settings-plugin/src/settings.ts +21 -0
- package/skills/dsh-plugin-upgrade/evals/trigger-evals.json +22 -0
- package/skills/dsh-plugin-upgrade/references/cli-bootstrap.md +1 -1
- package/skills/dsh-plugin-upgrade/references/migration-map.md +1 -1
- package/skills/dsh-plugin-upgrade/references/source-investigation.md +1 -1
- package/skills/dsh-plugin-upgrade/references/verification.md +1 -1
package/README.en.md
CHANGED
|
@@ -2,19 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
[中文](README.md) | English
|
|
4
4
|
|
|
5
|
-
DSH Doctor
|
|
5
|
+
DSH Doctor is an upgrade and troubleshooting tool for DSH plugin developers and agents. It finds what needs to change during an upgrade, handles changes that are known to be safe, and then checks dependencies, build output, installation, and activation.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
When a change depends on the plugin's business logic, Doctor calls it out for the agent or developer instead of guessing. Every edit is previewed and backed up first, and runtime checks use a temporary DSH environment rather than the developer's everyday profile.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
DSH 0.1.1 → DSH 0.1.2
|
|
11
|
-
```
|
|
9
|
+
> This is a community-maintained third-party project, not an official DeepSeek project. The current migration scope is DSH 0.1.1 → 0.1.2. The catalog exactly covers `dsh-v0.1.1-rc.2` → `dsh-v0.1.2-alpha.3` and retains the alpha.2 historical rules. Differences outside those catalogs still require a separate investigation and are not proven compatible by the catalog.
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
## What it helps with
|
|
12
|
+
|
|
13
|
+
| Scenario | What DSH Doctor provides |
|
|
14
|
+
|---|---|
|
|
15
|
+
| Upgrade a plugin | Scans source, dependencies, manifest, client graph, patches, and build output; applies exact catalog-confirmed migrations and leaves semantic work to the agent |
|
|
16
|
+
| Verify a migration | Runs static reanalysis, dependency synchronization, build/test scripts, real tarball packaging, and temporary-profile installation and activation checks |
|
|
17
|
+
| Diagnose a DSH environment | Checks profile layers, plugin versions and peers, lockfile, bundles, patches, client contracts, duplicate mounts, and DSH CLI/Harness version drift |
|
|
18
|
+
| Recover safely | Compares before/after baselines, checks compatible updates, generates and verifies quarantine overlays, and records dependency and configuration impact before removal |
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
Agents can orchestrate these capabilities through the skill, while other tools can integrate the same structured CLI workflows.
|
|
16
21
|
|
|
17
|
-
##
|
|
22
|
+
## Recommended: use the skill with an agent
|
|
18
23
|
|
|
19
24
|
Install the repository's [`dsh-plugin-upgrade`](skills/dsh-plugin-upgrade/SKILL.md) skill:
|
|
20
25
|
|
|
@@ -29,219 +34,110 @@ Upgrade this plugin from DSH 0.1.1 to DSH 0.1.2.
|
|
|
29
34
|
Analyze compatibility first, modify the code, then complete build and runtime verification.
|
|
30
35
|
```
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
The skill guides the agent to:
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
1. establish the plugin, actual DSH installation, Harness checkout, package manager, and usable DSH Doctor;
|
|
40
|
+
2. analyze source, dependencies, configuration, patches, and existing artifacts;
|
|
41
|
+
3. confirm whether the upgraded plugin release targets only 0.1.2 or must remain compatible with 0.1.1;
|
|
42
|
+
4. preview and apply exact changes allowed by that compatibility strategy, then handle semantic migrations that require business context;
|
|
43
|
+
5. rebuild and report static, artifact, isolated-runtime, and business-behavior evidence separately;
|
|
44
|
+
6. commit or publish through the plugin repository's own process only when the developer explicitly requests it.
|
|
35
45
|
|
|
36
|
-
|
|
37
|
-
2. analyze source, type imports, dependencies, manifest, client graph, patches, and build output;
|
|
38
|
-
3. confirm whether the upgraded release targets only 0.1.2 or must remain compatible with 0.1.1;
|
|
39
|
-
4. preview and apply code changes that are known to be equivalent under the selected compatibility strategy;
|
|
40
|
-
5. use the new API owners to handle semantic changes that require understanding the plugin;
|
|
41
|
-
6. rebuild the plugin and run static, build, and isolated runtime verification, covering both versions in dual-version mode;
|
|
42
|
-
7. report the compatibility intent, changed files, remaining work, backups, and the verification level actually reached.
|
|
46
|
+
`npx skills add` installs agent instructions only; it does not install DSH Doctor globally. The skill checks the local CLI and npm registry first. If the local version is unsuitable, it runs a pinned version through `npm exec` without changing the global installation.
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
After verification, the agent can follow the plugin repository's existing versioning and release process if requested. The skill itself does not commit or publish anything automatically.
|
|
48
|
+
An upgrade request does not itself authorize dropping the old runtime. When compatibility intent is missing, the skill may perform read-only analysis but asks before migration writes, dependency installation, build, or runtime commands. Dual-version mode requires separate 0.1.1 and 0.1.2 evidence; one 0.1.2 smoke test is not dual-version proof.
|
|
47
49
|
|
|
48
50
|
## How it works
|
|
49
51
|
|
|
50
|
-
DSH Doctor has three parts:
|
|
52
|
+
DSH Doctor has three parts that constrain one another:
|
|
51
53
|
|
|
52
|
-
- **Skill**:
|
|
53
|
-
- **CLI**:
|
|
54
|
-
- **Migration catalog**:
|
|
54
|
+
- **Skill**: defines investigation steps, the compatibility decision, confirmation gates, and reporting standards for the agent;
|
|
55
|
+
- **CLI**: provides read-only analysis, safe edits, diagnosis, baselines, recovery, and staged verification;
|
|
56
|
+
- **Migration catalog**: stores exact DSH tags/commits and known package, symbol, Service, configuration, and behavior changes.
|
|
55
57
|
|
|
56
|
-
The workflow is:
|
|
58
|
+
The plugin migration workflow is:
|
|
57
59
|
|
|
58
60
|
```text
|
|
59
|
-
|
|
60
|
-
→
|
|
61
|
+
investigate the actual environment
|
|
62
|
+
→ catalog-driven analysis
|
|
63
|
+
→ reviewed-plan exact changes
|
|
61
64
|
→ agent handles semantic changes
|
|
62
|
-
→
|
|
63
|
-
→ static verification
|
|
65
|
+
→ build and artifact verification
|
|
64
66
|
→ temporary-profile installation and activation
|
|
65
|
-
→
|
|
67
|
+
→ plugin business-behavior verification
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## Why versioned rules are needed
|
|
71
|
-
|
|
72
|
-
DSH 0.1.2 changes more than package versions:
|
|
70
|
+
DSH 0.1.2 changes more than package versions. Legacy owners such as `dsh-client-runtime` and `dsh-host-apiproxy` were split, while Session, Workspace, Conversation, pending interaction, and Settings capabilities moved to new controllers, UI packages, or Services. The CLI only auto-edits relationships marked `exact`; ownership, lifecycle, and business-call changes are reported as `MIG_SEMANTIC_API_CHANGE`.
|
|
73
71
|
|
|
74
|
-
|
|
75
|
-
- store features moved to `dsh-client-store`;
|
|
76
|
-
- Session, Workspace, Conversation, and pending interactions moved to separate controllers or UI packages;
|
|
77
|
-
- `@deepseek-ai/dsh-host-apiproxy` was removed, so browser calls move to the appropriate business Remote;
|
|
78
|
-
- client graph, platform externals, exports, and some profile patch targets also changed.
|
|
72
|
+
With an exact Harness checkout, Doctor also verifies the commits behind the two catalog tags and compares entry ids in the target web profile. After the additional source interval has been investigated, `--target-version` can bind dependencies and runtime checks to a newer 0.1.2 target, but it does not extend the catalog's API claims.
|
|
79
73
|
|
|
80
|
-
|
|
74
|
+
## Core capabilities
|
|
81
75
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
| Area | How Doctor and the agent handle it |
|
|
76
|
+
| Area | How it is handled |
|
|
85
77
|
|---|---|
|
|
86
|
-
| JS/TS imports
|
|
87
|
-
| Removed
|
|
88
|
-
| DSH/Cordis version ranges | Checks dependencies, devDependencies, and
|
|
89
|
-
| Session, Workspace, Conversation, and other semantic changes | Reports the new owner and reason; the agent modifies the business code |
|
|
78
|
+
| JS/TS imports and named re-exports | Uses the TypeScript AST for type-only, aliased, and mixed imports; rewrites only known equivalent symbols |
|
|
79
|
+
| Removed packages and retained-package API changes | Checks source and manifest, preserves exports that still exist, and reports symbols that need semantic migration |
|
|
80
|
+
| DSH/Cordis version ranges | Checks dependencies, devDependencies, peerDependencies, and resolved versions; existing peer ranges are not widened automatically |
|
|
90
81
|
| `dsh.client` and client exports | Checks inject, external, platform, immediately, and `exports["./client"]` |
|
|
91
|
-
| Harness patch targets | Compares old and new entries when an exact Harness checkout is available |
|
|
92
|
-
| Build output | Scans `lib`, `dist`, `build`, and `out` for
|
|
93
|
-
| Plugin build | Runs existing typecheck, build, test, and pack:check scripts;
|
|
82
|
+
| Harness patch targets | Compares old and new bundle entries when an exact Harness checkout is available |
|
|
83
|
+
| Build output | Scans `lib`, `dist`, `build`, and `out` for source/artifact drift |
|
|
84
|
+
| Plugin build | Runs existing typecheck, build, test, and pack:check scripts; test/typecheck alone cannot establish artifact verification |
|
|
94
85
|
| Installation and activation | Packs the real tarball and installs it into a fresh web profile under a temporary `DSH_HOME` |
|
|
95
|
-
|
|
|
86
|
+
| Profile diagnosis | Composes bundle, profile, home, and CLI overlays in DSH order while preserving field provenance |
|
|
87
|
+
| Update, quarantine, and removal | Verifies versions, dependencies, configuration layers, and dependents before producing an explicit operation plan; updates, persistent quarantine, and removal need explicit confirmation |
|
|
96
88
|
|
|
97
|
-
|
|
89
|
+
No legacy string in source, a successful compile, an installable tarball, and correct business behavior are different evidence levels. Doctor does not present one as proof of another.
|
|
98
90
|
|
|
99
|
-
## Safety
|
|
91
|
+
## Safety and evidence
|
|
100
92
|
|
|
101
93
|
- `diagnose`, `migrate analyze`, and static verification are read-only and do not load or execute the inspected plugin;
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
- SHA-256 is
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
- global CLI installation, persistent quarantine, plugin removal, and publishing are never performed automatically by the skill.
|
|
110
|
-
|
|
111
|
-
## Use the migration CLI manually
|
|
94
|
+
- only migrations marked `exact` by the catalog can be changed automatically; semantic changes are not guessed mechanically;
|
|
95
|
+
- `migrate apply` uses a reviewed plan outside the plugin root and binds the full analysis, actual target version, and every input-file hash;
|
|
96
|
+
- SHA-256 is rechecked before writes, input drift rejects the apply, and existing files receive timestamped backups;
|
|
97
|
+
- build/runtime commands require explicit confirmation and synchronize dependencies with lifecycle scripts disabled;
|
|
98
|
+
- runtime verification uses a temporary `DSH_HOME` instead of installing into the developer's normal `~/.dsh`;
|
|
99
|
+
- JSON, baselines, and recovery snapshots redact common secret, token, password, and key fields;
|
|
100
|
+
- global CLI installation, persistent quarantine, plugin removal, commits, and publication are never implicit actions.
|
|
112
101
|
|
|
113
|
-
|
|
102
|
+
## Boundaries
|
|
114
103
|
|
|
115
|
-
|
|
104
|
+
- Doctor can report a new API owner and migration reason, but it cannot replace understanding the plugin's business logic;
|
|
105
|
+
- named imports and named re-exports from retained packages are recognized, while property access through namespace imports still needs manual investigation;
|
|
106
|
+
- `runtime-verified` proves packaging, installation, and basic activation, not UI, Service lifecycle, or business-flow correctness;
|
|
107
|
+
- DSH patches or prereleases outside the catalog require investigation of the additional source interval;
|
|
108
|
+
- static diagnosis cannot establish dynamic Service dependencies or whether plugin-owned external data is safe to delete.
|
|
116
109
|
|
|
117
|
-
|
|
118
|
-
npm exec --yes --package=@bruc3van/dsh-doctor@<selected-version> -- \
|
|
119
|
-
dsh-doctor migrations list
|
|
120
|
-
```
|
|
110
|
+
## CLI quick reference
|
|
121
111
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
```sh
|
|
125
|
-
dsh-doctor migrate analyze /path/to/plugin \
|
|
126
|
-
--from dsh-v0.1.1-rc.2 \
|
|
127
|
-
--to dsh-v0.1.2-alpha.3 \
|
|
128
|
-
--harness-root /path/to/deepseek-harness \
|
|
129
|
-
--json
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Analysis checks source, dependencies, manifest, client graph, patch targets, and existing build output without executing plugin code. `--from`/`--to` select the exact catalog that supplies API rules. Alpha.3 is the current default, so it needs no separate `--target-version`. If a newer 0.1.2 build is explicitly targeted before the catalog is updated, inspect the source delta from alpha.3 first, then use `--target-version` to control dependency ranges, safe-plan pins, and the runtime version check. The report keeps the catalog and actual targets separate.
|
|
133
|
-
|
|
134
|
-
### 2. Apply
|
|
135
|
-
|
|
136
|
-
```sh
|
|
137
|
-
# Preview
|
|
138
|
-
dsh-doctor migrate apply /path/to/plugin --safe \
|
|
139
|
-
--plan-file /temporary/path/reviewed-migration-plan.json \
|
|
140
|
-
--harness-root /path/to/deepseek-harness --json
|
|
141
|
-
|
|
142
|
-
# Write after confirmation
|
|
143
|
-
dsh-doctor migrate apply /path/to/plugin --safe --yes \
|
|
144
|
-
--plan-file /temporary/path/reviewed-migration-plan.json \
|
|
145
|
-
--harness-root /path/to/deepseek-harness --json
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
The plan must stay outside the plugin root so it is not analyzed as plugin input. Apply checks the plan digest, every analyzed input, and each edit's before/after hashes; source, manifest, or other analyzed-input changes require a new reviewed plan. Deterministic dependency edits use catalog-owned Client/Host and peer/dev policies instead of inheriting the removed package's dependency section. Every changed file receives a backup.
|
|
149
|
-
|
|
150
|
-
### 3. Verify
|
|
151
|
-
|
|
152
|
-
```sh
|
|
153
|
-
dsh-doctor migrate verify /path/to/plugin --level static \
|
|
154
|
-
--harness-root /path/to/deepseek-harness --json
|
|
155
|
-
dsh-doctor migrate verify /path/to/plugin --level build --yes --install \
|
|
156
|
-
--harness-root /path/to/deepseek-harness --json
|
|
157
|
-
dsh-doctor migrate verify /path/to/plugin --level runtime --yes --install \
|
|
158
|
-
--dsh-command /path/to/dsh --json
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
| Level | What it checks |
|
|
162
|
-
|---|---|
|
|
163
|
-
| `static` | Rechecks source, manifest, client graph, patches, and artifacts |
|
|
164
|
-
| `build` | Synchronizes and verifies target dependencies and the lockfile, then runs build/test scripts and scans output again |
|
|
165
|
-
| `runtime` | After dependency and build gates, packs the real tarball and checks target DSH, installed package, bundle, and effective configuration in a temporary profile |
|
|
166
|
-
|
|
167
|
-
Verification states are:
|
|
168
|
-
|
|
169
|
-
```text
|
|
170
|
-
analyzed → source-migrated → artifact-verified → runtime-verified
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
`runtime-verified` means that packing, installation, and basic activation passed. It does not replace real UI, Service lifecycle, and business-flow testing.
|
|
174
|
-
|
|
175
|
-
## Diagnose DSH and installed plugins
|
|
176
|
-
|
|
177
|
-
Global installation:
|
|
112
|
+
Requires Node.js `^22.19.0` or `>=24.0.0`.
|
|
178
113
|
|
|
179
114
|
```sh
|
|
115
|
+
# Global installation
|
|
180
116
|
npm install --global @bruc3van/dsh-doctor
|
|
181
|
-
dsh-doctor diagnose
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
Temporary use:
|
|
185
|
-
|
|
186
|
-
```sh
|
|
187
|
-
npx @bruc3van/dsh-doctor diagnose
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
The default target is `$DSH_HOME/profiles/web`, falling back to `~/.dsh`.
|
|
191
|
-
|
|
192
|
-
```sh
|
|
193
|
-
dsh-doctor diagnose
|
|
194
|
-
dsh-doctor diagnose --json
|
|
195
|
-
dsh-doctor diagnose --check-updates
|
|
196
|
-
```
|
|
197
117
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
```text
|
|
201
|
-
bundle layers → profile cordis.patch.yml → home cordis.patch.yml → CLI overlays
|
|
118
|
+
# Or run one pinned version without changing the global installation
|
|
119
|
+
npm exec --yes --package=@bruc3van/dsh-doctor@<version> -- dsh-doctor --help
|
|
202
120
|
```
|
|
203
121
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
dsh-doctor recover
|
|
211
|
-
dsh-doctor recover @scope/plugin --action update
|
|
212
|
-
dsh-doctor recover @scope/plugin --action update --yes
|
|
213
|
-
|
|
214
|
-
# Create a temporary quarantine overlay
|
|
215
|
-
dsh-doctor recover @scope/plugin --action quarantine \
|
|
216
|
-
--output ./plugin-quarantine.yml
|
|
217
|
-
|
|
218
|
-
# Persist it only after testing the temporary overlay
|
|
219
|
-
dsh-doctor recover @scope/plugin --action persist-quarantine --verified
|
|
220
|
-
dsh-doctor recover @scope/plugin --action persist-quarantine --verified --yes
|
|
221
|
-
|
|
222
|
-
# Removal is always separate
|
|
223
|
-
dsh-doctor recover @scope/plugin --action remove
|
|
224
|
-
dsh-doctor recover @scope/plugin --action remove --yes
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
Before quarantine or removal, Doctor checks entry ownership, configuration layers, direct dependencies, core bundles, lockfile state, manual mounts, and known client dependents. Static checks cannot prove dynamic Service dependencies or external data safety, so restart the profile and test its main features afterwards.
|
|
228
|
-
|
|
229
|
-
You can also save and compare a baseline around an upgrade:
|
|
122
|
+
| Command | Purpose |
|
|
123
|
+
|---|---|
|
|
124
|
+
| `dsh-doctor diagnose [--json] [--check-updates]` | Diagnose the current profile and installed plugins; normal diagnosis does not use the network |
|
|
125
|
+
| `dsh-doctor migrations list` | List the exact migration catalogs bundled with the current CLI |
|
|
126
|
+
| `dsh-doctor migrate analyze` / `apply` / `verify` | Analyze a migration, apply a reviewed plan, or run static/build/runtime verification |
|
|
127
|
+
| `dsh-doctor baseline create` / `compare` | Save or compare a redacted before/after diagnostic baseline |
|
|
128
|
+
| `dsh-doctor recover <package> --action <action>` | Check updates, generate/persist/roll back quarantine, or enter the separate removal workflow |
|
|
230
129
|
|
|
231
|
-
|
|
232
|
-
dsh-doctor baseline create
|
|
233
|
-
dsh-doctor baseline compare
|
|
234
|
-
```
|
|
130
|
+
Use `dsh-doctor --help` for full options and confirmation requirements. Migration orchestration and semantic-investigation rules live in [`dsh-plugin-upgrade`](skills/dsh-plugin-upgrade/SKILL.md) and its references.
|
|
235
131
|
|
|
236
132
|
## Output and exit codes
|
|
237
133
|
|
|
238
|
-
Text output supports Chinese and English. `--json` uses stable English codes and
|
|
134
|
+
Text output supports Chinese and English. `--json` uses stable English codes and preserves redacted structured evidence.
|
|
239
135
|
|
|
240
136
|
| Exit code | Meaning |
|
|
241
137
|
|---|---|
|
|
242
|
-
| `0` | No
|
|
243
|
-
| `1` | Compatibility issues, semantic migration, or verification
|
|
244
|
-
| `2` | Argument, environment, or
|
|
138
|
+
| `0` | No blocking error, or the operation completed and passed its verification level |
|
|
139
|
+
| `1` | Compatibility issues, semantic migration work, or incomplete verification remains |
|
|
140
|
+
| `2` | Argument, environment, or operation failure |
|
|
245
141
|
|
|
246
142
|
## Development
|
|
247
143
|
|
|
@@ -251,6 +147,6 @@ npm run check
|
|
|
251
147
|
npm pack --dry-run
|
|
252
148
|
```
|
|
253
149
|
|
|
254
|
-
Tests cover the CLI, configuration composition, diagnosis, redaction, backups and write protection, AST migration, build gates, isolated runtime verification, and recovery
|
|
150
|
+
Tests cover the CLI, configuration composition, diagnosis, redaction, backups and write protection, AST migration, build gates, isolated runtime verification, and recovery. CI runs on macOS, Ubuntu, and Windows with Node.js `22.19` and `24`.
|
|
255
151
|
|
|
256
152
|
Local development, the skill, and the CLI never commit, tag, or publish automatically.
|
package/README.md
CHANGED
|
@@ -2,19 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
中文 | [English](README.en.md)
|
|
4
4
|
|
|
5
|
-
DSH Doctor
|
|
5
|
+
DSH Doctor 是给 DSH 插件开发者和 Agent 使用的升级、排障工具。它能找出插件升级时需要修改的地方,自动处理可以确定的改动,并继续检查依赖、构建产物和实际安装运行情况。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
遇到需要理解业务逻辑的改动,它会明确列出来交给 Agent 或开发者处理,不会直接猜。所有修改都会先生成预览并保留备份,运行验证也会放在临时 DSH 环境中,不影响日常使用的 profile。
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
DSH 0.1.1 → DSH 0.1.2
|
|
11
|
-
```
|
|
9
|
+
> 这是社区维护的第三方工具,不属于 DeepSeek 官方项目。当前迁移范围是 DSH 0.1.1 → 0.1.2;catalog 精确覆盖 `dsh-v0.1.1-rc.2` → `dsh-v0.1.2-alpha.3`,并保留 alpha.2 历史规则。未收录的版本差异仍需单独调查,不能视为 catalog 已证明兼容。
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
## 它能解决什么问题
|
|
12
|
+
|
|
13
|
+
| 场景 | DSH Doctor 提供的能力 |
|
|
14
|
+
|---|---|
|
|
15
|
+
| 升级插件 | 扫描源码、依赖、manifest、client graph、patch 和构建产物;自动处理 catalog 确认的精确迁移,并把语义变化交给 Agent |
|
|
16
|
+
| 验证迁移结果 | 依次完成静态复核、依赖同步、构建/测试、真实 tarball 打包,以及临时 profile 安装与激活验证 |
|
|
17
|
+
| 诊断 DSH 环境 | 检查 profile 配置层、插件版本与 peer、lockfile、bundle、patch、client contract、重复 mount 和 DSH CLI/Harness 版本漂移 |
|
|
18
|
+
| 安全恢复 | 比较升级前后 baseline,检查兼容更新,生成和验证隔离 overlay,并在删除前给出依赖与配置影响证据 |
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
这些能力既可以由 Agent 通过 Skill 编排,也可以作为结构化 CLI 能力集成到其他工具中。
|
|
16
21
|
|
|
17
|
-
## 使用 Skill
|
|
22
|
+
## 推荐方式:让 Agent 使用 Skill
|
|
18
23
|
|
|
19
24
|
安装仓库中的 [`dsh-plugin-upgrade`](skills/dsh-plugin-upgrade/SKILL.md) Skill:
|
|
20
25
|
|
|
@@ -29,213 +34,104 @@ npx skills add bruc3van/dsh-doctor
|
|
|
29
34
|
先分析兼容问题,再修改代码,最后完成构建和运行时验证。
|
|
30
35
|
```
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
Skill 会引导 Agent:
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
1. 核实插件、实际 DSH、Harness checkout、包管理器和可用的 DSH Doctor;
|
|
40
|
+
2. 分析源码、依赖、配置、patch 和已有产物;
|
|
41
|
+
3. 确认升级后的同一插件版本是仅支持 0.1.2,还是继续兼容 0.1.1;
|
|
42
|
+
4. 预览并应用符合兼容策略的精确修改,再处理需要理解业务的语义迁移;
|
|
43
|
+
5. 重新构建,并分别报告静态、产物、隔离运行时和业务行为证据;
|
|
44
|
+
6. 仅在开发者明确要求后,按插件仓库自己的流程提交和发布。
|
|
35
45
|
|
|
36
|
-
|
|
37
|
-
2. 分析源码、类型导入、依赖、manifest、client graph、patch 和构建产物;
|
|
38
|
-
3. 确认升级后是仅支持 0.1.2,还是同一版本继续兼容 0.1.1;
|
|
39
|
-
4. 预览并应用可以确定等价、且符合所选兼容策略的代码修改;
|
|
40
|
-
5. 根据新的 API 所有者处理需要理解业务的语义迁移;
|
|
41
|
-
6. 重新构建插件,并依次做静态、构建和隔离运行时验证;双版本模式分别验证两端;
|
|
42
|
-
7. 报告兼容目标、修改内容、剩余问题、备份和实际达到的验证等级。
|
|
46
|
+
`npx skills add` 只安装 Agent 指令,不会全局安装 DSH Doctor。Skill 会先检查本地 CLI 和 npm registry;本地版本不合适时,默认通过固定版本的 `npm exec` 运行,不会自行修改全局安装。
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
升级请求本身不代表可以放弃旧版。兼容目标未明确时,Skill 可以先做只读分析,但会在迁移写入、依赖安装、构建或运行时命令前要求确认。双版本模式必须分别验证 0.1.1 和 0.1.2,不能用一次 0.1.2 smoke 代替双版本结论。
|
|
45
49
|
|
|
46
|
-
|
|
50
|
+
## 工作原理
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
DSH Doctor 由三个相互约束的部分组成:
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
- **Skill**:为 Agent 定义调查步骤、兼容决策、确认门和报告标准;
|
|
55
|
+
- **CLI**:提供只读分析、安全修改、诊断、基线、恢复和分级验证能力;
|
|
56
|
+
- **Migration catalog**:保存精确 DSH tag/commit 以及已确认的 package、symbol、Service、配置和行为变化。
|
|
51
57
|
|
|
52
|
-
|
|
53
|
-
- **CLI**:扫描插件、生成问题清单、修改确定性代码,并执行分级验证;
|
|
54
|
-
- **Migration catalog**:记录两个 DSH 版本之间已确认的包、API、Service、配置和行为变化。
|
|
55
|
-
|
|
56
|
-
完整流程是:
|
|
58
|
+
插件迁移流程是:
|
|
57
59
|
|
|
58
60
|
```text
|
|
59
|
-
|
|
60
|
-
→
|
|
61
|
+
调查实际环境
|
|
62
|
+
→ catalog 驱动分析
|
|
63
|
+
→ reviewed plan 精确修改
|
|
61
64
|
→ Agent 处理语义变化
|
|
62
|
-
→
|
|
63
|
-
→
|
|
64
|
-
→
|
|
65
|
-
→ 按插件自己的流程发布
|
|
65
|
+
→ 构建与产物验证
|
|
66
|
+
→ 临时 profile 安装和激活
|
|
67
|
+
→ 插件业务行为验证
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## 为什么需要版本化规则
|
|
71
|
-
|
|
72
|
-
DSH 0.1.2 不只是包版本变化,一些能力被拆分到了新的所有者:
|
|
70
|
+
DSH 0.1.2 不只是包版本变化。`dsh-client-runtime` 和 `dsh-host-apiproxy` 等旧 owner 被拆分,Session、Workspace、Conversation、pending interaction、Settings 等能力迁移到新的 controller、UI 包或 Service。CLI 只自动修改 catalog 标记为 `exact` 的关系;所有权、生命周期和业务调用变化会作为 `MIG_SEMANTIC_API_CHANGE` 报告。
|
|
73
71
|
|
|
74
|
-
|
|
75
|
-
- store 能力迁移到 `dsh-client-store`;
|
|
76
|
-
- Session、Workspace、Conversation 和 pending interaction 分别由新的 controller 或 UI 包负责;
|
|
77
|
-
- `@deepseek-ai/dsh-host-apiproxy` 已移除,浏览器调用需要迁移到对应业务 Remote;
|
|
78
|
-
- client graph、platform external、exports 和部分 profile patch target 也发生了变化。
|
|
72
|
+
如果提供精确 Harness checkout,Doctor 还会确认 catalog 中两个 tag 的 commit,并比较目标 web profile 的 entry id。`--target-version` 可以在完成额外源码调查后绑定更新的 0.1.2 依赖与 runtime 目标,但不会扩大 catalog 的 API 结论。
|
|
79
73
|
|
|
80
|
-
|
|
74
|
+
## 核心能力
|
|
81
75
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
| 检查内容 | Doctor/Agent 如何处理 |
|
|
76
|
+
| 检查内容 | 处理方式 |
|
|
85
77
|
|---|---|
|
|
86
|
-
| JS/TS import
|
|
87
|
-
|
|
|
88
|
-
| DSH/Cordis 版本范围 | 检查 dependencies、devDependencies
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
78
|
+
| JS/TS import 与 named re-export | 使用 TypeScript AST 分析 type-only、别名和混合 import;仅改写已知等价 symbol |
|
|
79
|
+
| 移除或保留包中的 API 变化 | 检查源码和 manifest;保留仍存在的导出,并报告需要语义迁移的 symbol |
|
|
80
|
+
| DSH/Cordis 版本范围 | 检查 dependencies、devDependencies、peerDependencies 和实际解析版本;不自动扩大已有 peer 范围 |
|
|
81
|
+
| `dsh.client` 与 client export | 检查 inject、external、platform、immediately 和 `exports["./client"]` |
|
|
82
|
+
| Harness patch target | 在精确 Harness checkout 下比较新旧 bundle entry |
|
|
83
|
+
| 构建产物 | 扫描 `lib`、`dist`、`build`、`out`,识别源码与发布产物漂移 |
|
|
84
|
+
| 插件构建 | 运行已有 typecheck、build、test、pack:check;只有 test/typecheck 不足以证明产物已验证 |
|
|
85
|
+
| 安装和激活 | 打包真实 tarball,在临时 `DSH_HOME` 的新 web profile 中安装并检查生效配置 |
|
|
86
|
+
| Profile 诊断 | 按 DSH 顺序组合 bundle、profile、home 和 CLI overlay,保留字段来源证据 |
|
|
87
|
+
| 更新、隔离与删除 | 先验证版本、依赖、配置层和 dependents,再生成显式操作计划;更新、持久化隔离和删除需要明确确认 |
|
|
96
88
|
|
|
97
|
-
|
|
89
|
+
源码没有旧字符串、编译成功、tarball 可安装和业务行为正常是不同证据等级,Doctor 不会把其中一个冒充另一个。
|
|
98
90
|
|
|
99
|
-
##
|
|
91
|
+
## 安全与证据
|
|
100
92
|
|
|
101
93
|
- `diagnose`、`migrate analyze` 和静态验证只读,不加载或执行待检查插件;
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
- 全局 CLI 安装、持久隔离、删除插件和发布都不会由 Skill 自动执行。
|
|
110
|
-
|
|
111
|
-
## 手动使用迁移 CLI
|
|
112
|
-
|
|
113
|
-
需要 Node.js `^22.19.0` 或 `>=24.0.0`。
|
|
114
|
-
|
|
115
|
-
先确认 CLI 包含需要的迁移:
|
|
116
|
-
|
|
117
|
-
```sh
|
|
118
|
-
npm exec --yes --package=@bruc3van/dsh-doctor@<selected-version> -- \
|
|
119
|
-
dsh-doctor migrations list
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### 1. 分析
|
|
123
|
-
|
|
124
|
-
```sh
|
|
125
|
-
dsh-doctor migrate analyze /path/to/plugin \
|
|
126
|
-
--from dsh-v0.1.1-rc.2 \
|
|
127
|
-
--to dsh-v0.1.2-alpha.3 \
|
|
128
|
-
--harness-root /path/to/deepseek-harness \
|
|
129
|
-
--json
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
分析会检查源码、依赖、manifest、client graph、patch target 和已有构建产物,不执行插件代码。`--from`/`--to` 选择提供 API 规则的精确 catalog。当前默认目标就是 alpha.3,无需额外指定 `--target-version`;如果在 catalog 更新前明确迁移到更新的 0.1.2 版本,必须先调查 alpha.3 到该版本的源码差异,再用 `--target-version` 单独控制依赖范围、safe plan pin 和 runtime 版本核验。报告会保留 catalog 与实际目标两个值。
|
|
133
|
-
|
|
134
|
-
### 2. 修改
|
|
94
|
+
- 只有 catalog 标记为 `exact` 的迁移可以自动修改,语义变化不会机械猜测;
|
|
95
|
+
- `migrate apply` 使用插件目录外的 reviewed plan,绑定完整分析、实际目标版本和所有输入文件哈希;
|
|
96
|
+
- 写入前复核 SHA-256,输入漂移时拒绝应用,并为已有文件创建时间戳备份;
|
|
97
|
+
- build/runtime 必须显式确认,并在禁用 lifecycle scripts 的情况下同步和核验依赖;
|
|
98
|
+
- runtime 使用临时 `DSH_HOME`,不会把待验证插件安装到正常的 `~/.dsh`;
|
|
99
|
+
- JSON、baseline 和恢复快照会脱敏常见 secret、token、password 和 key 字段;
|
|
100
|
+
- 全局 CLI 安装、持久隔离、插件删除、提交和发布都不是隐式动作。
|
|
135
101
|
|
|
136
|
-
|
|
137
|
-
# 预览
|
|
138
|
-
dsh-doctor migrate apply /path/to/plugin --safe \
|
|
139
|
-
--plan-file /temporary/path/reviewed-migration-plan.json \
|
|
140
|
-
--harness-root /path/to/deepseek-harness --json
|
|
141
|
-
|
|
142
|
-
# 确认后写入
|
|
143
|
-
dsh-doctor migrate apply /path/to/plugin --safe --yes \
|
|
144
|
-
--plan-file /temporary/path/reviewed-migration-plan.json \
|
|
145
|
-
--harness-root /path/to/deepseek-harness --json
|
|
146
|
-
```
|
|
102
|
+
## 能力边界
|
|
147
103
|
|
|
148
|
-
|
|
104
|
+
- Doctor 可以指出新 API owner 和迁移原因,但不能替代对插件业务逻辑的理解;
|
|
105
|
+
- 保留包中的 named import 和 named re-export 可以被识别,namespace import 的属性访问仍需人工调查;
|
|
106
|
+
- `runtime-verified` 只证明打包、安装和基本激活,不能证明 UI、Service 生命周期和业务流程正确;
|
|
107
|
+
- catalog 之外的 DSH patch 或 prerelease 必须检查额外源码差异;
|
|
108
|
+
- 静态诊断无法确认动态 Service 依赖和插件外部数据是否可安全删除。
|
|
149
109
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
```sh
|
|
153
|
-
dsh-doctor migrate verify /path/to/plugin --level static \
|
|
154
|
-
--harness-root /path/to/deepseek-harness --json
|
|
155
|
-
dsh-doctor migrate verify /path/to/plugin --level build --yes --install \
|
|
156
|
-
--harness-root /path/to/deepseek-harness --json
|
|
157
|
-
dsh-doctor migrate verify /path/to/plugin --level runtime --yes --install \
|
|
158
|
-
--dsh-command /path/to/dsh --json
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
| 级别 | 验证内容 |
|
|
162
|
-
|---|---|
|
|
163
|
-
| `static` | 再次检查源码、manifest、client graph、patch 和产物 |
|
|
164
|
-
| `build` | 先同步并核验目标依赖和 lockfile,再运行已有构建/测试脚本并重新扫描产物 |
|
|
165
|
-
| `runtime` | 完成依赖与构建门后,打真实 tarball,在临时 profile 中验证目标 DSH、安装包、bundle 和生效配置 |
|
|
110
|
+
## CLI 快速参考
|
|
166
111
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
```text
|
|
170
|
-
analyzed → source-migrated → artifact-verified → runtime-verified
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
`runtime-verified` 只表示插件能够完成打包、安装和基本激活,仍不能代替真实 UI、Service 生命周期和业务流程验证。
|
|
174
|
-
|
|
175
|
-
## DSH 和已安装插件诊断
|
|
176
|
-
|
|
177
|
-
全局安装:
|
|
112
|
+
需要 Node.js `^22.19.0` 或 `>=24.0.0`。
|
|
178
113
|
|
|
179
114
|
```sh
|
|
115
|
+
# 全局安装
|
|
180
116
|
npm install --global @bruc3van/dsh-doctor
|
|
181
|
-
dsh-doctor diagnose
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
临时运行:
|
|
185
117
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
默认检查 `$DSH_HOME/profiles/web`;未设置 `DSH_HOME` 时使用 `~/.dsh`。
|
|
191
|
-
|
|
192
|
-
```sh
|
|
193
|
-
dsh-doctor diagnose
|
|
194
|
-
dsh-doctor diagnose --json
|
|
195
|
-
dsh-doctor diagnose --check-updates
|
|
118
|
+
# 或运行一个固定版本,不修改全局安装
|
|
119
|
+
npm exec --yes --package=@bruc3van/dsh-doctor@<version> -- dsh-doctor --help
|
|
196
120
|
```
|
|
197
121
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
## 恢复操作
|
|
207
|
-
|
|
208
|
-
```sh
|
|
209
|
-
# 检查和安装 manifest 声明兼容的最高版本
|
|
210
|
-
dsh-doctor recover @scope/plugin --action check-update
|
|
211
|
-
dsh-doctor recover @scope/plugin --action update
|
|
212
|
-
dsh-doctor recover @scope/plugin --action update --yes
|
|
213
|
-
|
|
214
|
-
# 生成临时隔离 overlay
|
|
215
|
-
dsh-doctor recover @scope/plugin --action quarantine \
|
|
216
|
-
--output ./plugin-quarantine.yml
|
|
217
|
-
|
|
218
|
-
# 验证临时 overlay 后持久化
|
|
219
|
-
dsh-doctor recover @scope/plugin --action persist-quarantine --verified
|
|
220
|
-
dsh-doctor recover @scope/plugin --action persist-quarantine --verified --yes
|
|
221
|
-
|
|
222
|
-
# 删除始终需要单独执行
|
|
223
|
-
dsh-doctor recover @scope/plugin --action remove
|
|
224
|
-
dsh-doctor recover @scope/plugin --action remove --yes
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
Doctor 会在隔离和删除前检查 entry、配置层、直接依赖、核心 bundle、lockfile、手工 mount 和已知 client dependents。静态检查无法确认动态 Service 依赖和外部数据,操作后仍需重启 profile 并验证主要功能。
|
|
228
|
-
|
|
229
|
-
升级前后也可以保存和比较基线:
|
|
122
|
+
| 命令 | 用途 |
|
|
123
|
+
|---|---|
|
|
124
|
+
| `dsh-doctor diagnose [--json] [--check-updates]` | 诊断当前 profile 和已安装插件;普通诊断不访问网络 |
|
|
125
|
+
| `dsh-doctor migrations list` | 查看当前 CLI 内置的精确 migration catalog |
|
|
126
|
+
| `dsh-doctor migrate analyze` / `apply` / `verify` | 分析迁移、应用 reviewed plan、执行静态/构建/runtime 验证 |
|
|
127
|
+
| `dsh-doctor baseline create` / `compare` | 保存或比较升级前后的脱敏诊断基线 |
|
|
128
|
+
| `dsh-doctor recover <package> --action <action>` | 检查更新、生成/持久化/回滚隔离或执行独立删除流程 |
|
|
230
129
|
|
|
231
|
-
|
|
232
|
-
dsh-doctor baseline create
|
|
233
|
-
dsh-doctor baseline compare
|
|
234
|
-
```
|
|
130
|
+
完整参数和确认要求请使用 `dsh-doctor --help`。迁移编排与语义调查规则位于 [`dsh-plugin-upgrade`](skills/dsh-plugin-upgrade/SKILL.md) 及其 references 中。
|
|
235
131
|
|
|
236
132
|
## 输出与退出码
|
|
237
133
|
|
|
238
|
-
|
|
134
|
+
文本支持中文和英文;`--json` 使用稳定英文 code,并保留脱敏后的结构化证据。
|
|
239
135
|
|
|
240
136
|
| 退出码 | 含义 |
|
|
241
137
|
|---|---|
|
package/package.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dsh-plugin-upgrade
|
|
3
|
-
description: Help
|
|
3
|
+
description: "Help migrate a DeepSeek Harness (DSH) plugin from DSH 0.1.1 to 0.1.2 with the dsh-doctor CLI, deciding explicitly up front whether the upgraded release must stay compatible with DSH 0.1.1. Use when a plugin developer plans a migration or compatibility assessment: checking what changed between DSH versions, replacing imports of packages 0.1.2 removed (such as dsh-client-runtime or dsh-host-apiproxy), migrating settingsNamespace to the settings Service, updating DSH dependency ranges, or verifying and preparing a plugin release for 0.1.2. Applies only catalog-confirmed exact rewrites automatically and guides the semantic changes that need developer judgment. Not for debugging a plugin that already targets 0.1.2, general DSH usage or configuration questions, or developing the Harness itself."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Upgrade a DSH 0.1.1 plugin to 0.1.2
|
|
7
7
|
|
|
8
8
|
Help the developer diagnose and modify one plugin at a time. Treat source migration, artifact verification, runtime activation, and business behavior as separate gates.
|
|
9
9
|
|
|
10
|
-
The migration knowledge covers the DSH 0.1.1 to 0.1.2 transition
|
|
10
|
+
The migration knowledge covers the DSH 0.1.1 to 0.1.2 transition, derived and verified from one exact catalog version pair (declared below). Keep the skill's product scope at the release-line level (`0.1.1` to `0.1.2`), while keeping the catalog target exact. First record the plugin's actual DSH ranges and requested target. When a newer patch or prerelease appears, use the catalog for known changes only, inspect the additional interval, and report that it is not catalog-confirmed until the catalog and this skill are deliberately updated — a pass for the catalog pair never proves an unlisted version combination.
|
|
11
|
+
|
|
12
|
+
## Current catalog version pair
|
|
13
|
+
|
|
14
|
+
This block is the single source of truth for the exact refs. Every command below and every reference file defers to it; the references avoid repeating the literals on purpose. When the catalog advances, update this block, the `migrate analyze` example, and the shipped catalog together.
|
|
15
|
+
|
|
16
|
+
- source ref: `dsh-v0.1.1-rc.2`
|
|
17
|
+
- target ref: `dsh-v0.1.2-alpha.3`
|
|
18
|
+
|
|
19
|
+
Standard commands target this pair and need no `--target-version`. If the developer explicitly targets a newer 0.1.2 build before the catalog is updated, inspect that additional interval first (see [source-investigation.md](references/source-investigation.md)), then pass its exact version to every migration phase as `--target-version <actual-0.1.2-version>`. That changes dependency pins and runtime expectations only; the catalog's API claims still end at the declared pair.
|
|
11
20
|
|
|
12
21
|
## Inputs
|
|
13
22
|
|
|
@@ -21,32 +30,24 @@ Determine:
|
|
|
21
30
|
- whether the developer authorizes a global CLI install or update;
|
|
22
31
|
- the plugin's package manager and build scripts.
|
|
23
32
|
|
|
24
|
-
Use these catalog reference points in the current CLI commands:
|
|
25
|
-
|
|
26
|
-
- source: `dsh-v0.1.1-rc.2`
|
|
27
|
-
- target: `dsh-v0.1.2-alpha.3`
|
|
28
|
-
|
|
29
|
-
The standard commands target the current known alpha.3 catalog and do not need `--target-version`. If the developer explicitly targets a newer 0.1.2 build before the catalog is updated, inspect the interval first, then pass its exact version to every migration phase as `--target-version <actual-0.1.2-version>`. This changes dependency pins and runtime expectations only; it does not extend the catalog's API claims.
|
|
30
|
-
|
|
31
33
|
Read [cli-bootstrap.md](references/cli-bootstrap.md) before running any migration command, [compatibility-strategy.md](references/compatibility-strategy.md) before proposing or writing changes, [source-investigation.md](references/source-investigation.md) before investigating an unlisted version or semantic task, [migration-map.md](references/migration-map.md) before making semantic changes, and [verification.md](references/verification.md) before dependency, build, or runtime verification.
|
|
32
34
|
|
|
33
|
-
Before touching the plugin, inspect the local CLI and perform the read-only registry update check described in `cli-bootstrap.md`. Select one exact DSH Doctor version, verify it exposes this migration catalog, and keep the same invocation for analyze, apply, and verify. Prefer the exact-version `npm exec` fallback over changing the developer's global installation
|
|
35
|
+
Before touching the plugin, inspect the local CLI and perform the read-only registry update check described in `cli-bootstrap.md`. Select one exact DSH Doctor version, verify it exposes this migration catalog, and keep the same invocation for analyze, apply, and verify. Prefer the exact-version `npm exec` fallback over changing the developer's global installation; a global install or update always needs explicit authorization.
|
|
34
36
|
|
|
35
|
-
The examples below use `dsh-doctor` for readability. When bootstrap selected a package-runner invocation, substitute the complete pinned prefix, `npm exec --yes --package=@bruc3van/dsh-doctor@<selected-version> -- dsh-doctor`, in every phase.
|
|
37
|
+
The examples below use `dsh-doctor` for readability. When bootstrap selected a package-runner invocation, substitute the complete pinned prefix, `npm exec --yes --package=@bruc3van/dsh-doctor@<selected-version> -- dsh-doctor`, in every phase. Command examples use POSIX shell syntax (bash, zsh, Git Bash); in PowerShell or cmd, join lines continued with `\` into a single line before running them.
|
|
36
38
|
|
|
37
39
|
## Compatibility decision gate
|
|
38
40
|
|
|
39
|
-
An upgrade request does not say whether the developer accepts dropping DSH 0.1.1
|
|
41
|
+
An upgrade request does not say whether the developer accepts dropping DSH 0.1.1, and write authorization does not answer that product decision. The current peer range, the word "upgrade," and the fact that a 0.1.2-only rewrite is simpler are all weak evidence — only the developer's explicit choice settles it.
|
|
40
42
|
|
|
41
|
-
You may inspect files, bootstrap the CLI, and run read-only analysis
|
|
43
|
+
You may inspect files, bootstrap the CLI, and run read-only analysis first. Before any `migrate apply` preview, source or manifest edit, dependency install, build, or runtime command, the compatibility intent must come from one of:
|
|
42
44
|
|
|
43
|
-
1.
|
|
44
|
-
2.
|
|
45
|
+
1. an explicit choice already present in the developer's request; or
|
|
46
|
+
2. the developer's own reply to: **"Should the same upgraded plugin release continue to support DSH 0.1.1, or may it target DSH 0.1.2 only?"**
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
No other resolution counts. Do not simulate, assume, or fabricate a reply the developer did not give — a question the developer has not genuinely answered means the gate is still pending. The plugin may be migrated only after the developer has actually made the choice.
|
|
47
49
|
|
|
48
|
-
-
|
|
49
|
-
- **dual-version:** treat every 0.1.2 rewrite as a candidate, not an automatically compatible change. Design and review an adapter or conditional entry/build approach before writing. If the same release cannot honestly support both versions, explain the conflict and ask whether separate releases are acceptable; that changes the compatibility intent and must not be presented as same-release dual compatibility.
|
|
50
|
+
If the answer is unavailable or ambiguous, stop at `analyzed`, report the compatibility decision as pending, and leave the plugin unmodified. Follow the selected path in [compatibility-strategy.md](references/compatibility-strategy.md): it defines the three intents (`0.1.2-only`, `dual-version`, `pending developer decision`) and the write policy for each. In particular, `dual-version` treats every 0.1.2 catalog rewrite as a candidate needing cross-version design and review before any write, never an automatically compatible change.
|
|
50
51
|
|
|
51
52
|
## Phase 1: analyze
|
|
52
53
|
|
|
@@ -59,11 +60,11 @@ dsh-doctor migrate analyze <plugin-root> \
|
|
|
59
60
|
--json
|
|
60
61
|
```
|
|
61
62
|
|
|
62
|
-
Append `--harness-root <deepseek-harness-root>` when the checkout is available. Prefer an exact Harness checkout so the CLI verifies both tag commits. Both tags must exist and resolve to the commits recorded by the catalog; fetch the repository tags first when a shallow checkout lacks them. Without `--harness-root`, analysis is catalog-only
|
|
63
|
+
Append `--harness-root <deepseek-harness-root>` when the checkout is available. Prefer an exact Harness checkout so the CLI verifies both tag commits. Both tags must exist and resolve to the commits recorded by the catalog; fetch the repository tags first when a shallow checkout lacks them. Without `--harness-root`, analysis is catalog-only — report it as such.
|
|
63
64
|
|
|
64
|
-
Follow `source-investigation.md` to record the actual PATH or explicit DSH command, installed package, profile, plugin manifest and resolved dependency versions. When the actual source or target differs from the catalog
|
|
65
|
+
Follow `source-investigation.md` to record the actual PATH or explicit DSH command, installed package, profile, plugin manifest and resolved dependency versions. When the actual source or target differs from the catalog pair declared above, inspect that additional interval separately with read-only Git commands. For each semantic finding, use its target module and the catalog reference paths to inspect the exact exported API and the plugin's callers — naming a likely new owner is not enough to plan the rewrite.
|
|
65
66
|
|
|
66
|
-
The catalog reports the retained-package removal of `@deepseek-ai/dsh-settings.settingsNamespace` as semantic work. Remove only that named import, inject the `settings` Service, register through `ctx.settings.register(name, schema)`, and migrate any reads to the provider's current API.
|
|
67
|
+
The catalog reports the retained-package removal of `@deepseek-ai/dsh-settings.settingsNamespace` as semantic work. Remove only that named import, inject the `settings` Service, register through `ctx.settings.register(name, schema)`, and migrate any reads to the provider's current API. Symbols 0.1.2 still exports (such as `SettingsConflictError`) must survive the edit even though they share the same import declaration.
|
|
67
68
|
|
|
68
69
|
The static analyzer recognizes named imports and re-exports for retained-package symbol removals, but it does not resolve property access through namespace imports such as `import * as settings from '@deepseek-ai/dsh-settings'`. Search for and inspect those namespace bindings manually before declaring the semantic migration complete.
|
|
69
70
|
|
|
@@ -75,11 +76,11 @@ Group the result by:
|
|
|
75
76
|
4. stale build artifacts;
|
|
76
77
|
5. required verification gates.
|
|
77
78
|
|
|
78
|
-
|
|
79
|
+
A clean bundled artifact alone does not establish compatibility, which is why the analyzer deliberately scans TypeScript type imports, source files, package metadata, client graph declarations, and built output.
|
|
79
80
|
|
|
80
81
|
## Phase 2: apply exact changes
|
|
81
82
|
|
|
82
|
-
Enter this phase only after the compatibility decision gate is resolved. The commands below are the 0.1.2-target migration path. For dual-version work, first apply the additional constraints in `compatibility-strategy.md
|
|
83
|
+
Enter this phase only after the compatibility decision gate is resolved. The commands below are the 0.1.2-target migration path. For dual-version work, first apply the additional constraints in `compatibility-strategy.md`: a catalog-safe codemod proves nothing about 0.1.1.
|
|
83
84
|
|
|
84
85
|
Preview first:
|
|
85
86
|
|
|
@@ -101,6 +102,16 @@ The CLI binds the apply to the persisted report and edit hashes, creates timesta
|
|
|
101
102
|
|
|
102
103
|
After apply, inspect every `MIG_SEMANTIC_API_CHANGE`. Rewrite behavior using the new domain owner and its current snapshot/lifecycle contract. Keep these edits separate enough to review and test.
|
|
103
104
|
|
|
105
|
+
### If apply fails partway or you want to undo it
|
|
106
|
+
|
|
107
|
+
Every file `migrate apply` overwrites is first copied to `<file>.dsh-doctor-<timestamp>.bak` next to the original; the apply output's `writes[]` records each file's `backup`, `beforeHash`, and `afterHash`. There is no `migrate rollback` subcommand — recover manually:
|
|
108
|
+
|
|
109
|
+
1. Restore each modified file from its `.bak` for the apply run being undone (`cp <file>.dsh-doctor-<timestamp>.bak <file>`, or `Copy-Item -Force` in PowerShell), taking the backups of that exact run when several exist.
|
|
110
|
+
2. Delete files apply created: they are the `writes[]` entries without a `backup` field.
|
|
111
|
+
3. Re-run `migrate analyze` and compare with the pre-apply report to confirm the plugin is back to its prior state before continuing.
|
|
112
|
+
|
|
113
|
+
Later analysis runs ignore leftover `.dsh-doctor-*` files, so backups can stay in place until the rollback is confirmed, then be deleted.
|
|
114
|
+
|
|
104
115
|
## Phase 3: verify
|
|
105
116
|
|
|
106
117
|
Run the gates in order:
|
|
@@ -123,10 +134,22 @@ For a dual-version result, verify the produced release against both the actual 0
|
|
|
123
134
|
|
|
124
135
|
## Prepare for release when requested
|
|
125
136
|
|
|
126
|
-
Verification prepares the plugin for release but does not publish it.
|
|
137
|
+
Verification prepares the plugin for release but does not publish it. Release only when the developer explicitly asks: first follow the repository's own release instructions and confirm that required semantic and behavior checks are complete. Then update the plugin version and changelog, inspect the packed artifact, and use the repository's existing commit, tag, publish, and registry-verification workflow — the migration skill being installed or run is not, by itself, release authorization.
|
|
127
138
|
|
|
128
139
|
For a `0.1.2-only` release, update the README or compatibility documentation to state the minimum actual 0.1.2 version, that the new release does not support 0.1.1, and which prior plugin release 0.1.1 users should retain when known. After changing the release version or any other packed metadata, rebuild, inspect the final-version tarball, and repeat the isolated runtime gate against that artifact before committing or tagging; evidence from a tarball carrying the previous plugin version is not final release evidence.
|
|
129
140
|
|
|
141
|
+
## Pass criteria before reporting
|
|
142
|
+
|
|
143
|
+
Call the migration complete only when every item holds:
|
|
144
|
+
|
|
145
|
+
- compatibility intent recorded as `0.1.2-only` or `dual-version` (not pending);
|
|
146
|
+
- every semantic finding resolved and reviewed, including namespace-import usages;
|
|
147
|
+
- static verification passes with no blocking finding;
|
|
148
|
+
- build and packed artifacts pass (`build` or `pack:check`, not `typecheck`/`test` alone);
|
|
149
|
+
- runtime smoke passed against the exact target version in the isolated profile;
|
|
150
|
+
- behavior checks executed with named evidence, or explicitly listed as remaining;
|
|
151
|
+
- for `dual-version`: every required matrix row passed on both the 0.1.1 and 0.1.2 sides.
|
|
152
|
+
|
|
130
153
|
## Report the outcome
|
|
131
154
|
|
|
132
155
|
State the highest achieved gate exactly:
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill_name": "dsh-plugin-upgrade",
|
|
3
|
+
"evals": [
|
|
4
|
+
{
|
|
5
|
+
"id": 1,
|
|
6
|
+
"prompt": "I maintain a DSH plugin (repo at <PLUGIN_ROOT>). DSH 0.1.2 dropped @deepseek-ai/dsh-client-runtime and my plugin imports it in src/. The next release only needs to support 0.1.2 - nobody on my team still runs 0.1.1, so it's fine to drop it. Work out what has to change and do the source migration. You can run commands in the plugin folder, but don't publish anything.",
|
|
7
|
+
"expected_output": "The agent records the 0.1.2-only intent from the request itself, bootstraps dsh-doctor, analyzes with the exact catalog refs, applies only the catalog-confirmed exact import moves to their new owners, and reports remaining verification gates without publishing or claiming release readiness.",
|
|
8
|
+
"files": ["evals/files/import-move-plugin"],
|
|
9
|
+
"expectations": [
|
|
10
|
+
"Records the compatibility intent as 0.1.2-only, treating the developer's own statement in the prompt as the explicit decision instead of re-asking or blocking",
|
|
11
|
+
"Maps the removed dsh-client-runtime symbols to their real 0.1.2 owners (createSnapshotStore/defineStore/shallowEqual/SnapshotStore to @deepseek-ai/dsh-client-store, ClientContext to @deepseek-ai/cordis Context) and never proposes an aggregate replacement package for dsh-client-runtime",
|
|
12
|
+
"Uses or constructs the dsh-doctor CLI flow (migrate analyze, then preview/apply via a plan file) with the catalog refs dsh-v0.1.1-rc.2 and dsh-v0.1.2-alpha.3, or clearly reports why the CLI could not run and proceeds from catalog knowledge with that limitation stated",
|
|
13
|
+
"Keeps the migration plan file outside the plugin root",
|
|
14
|
+
"Does not commit, tag, publish, or declare the plugin release-ready; reports the highest achieved gate and remaining verification steps"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": 2,
|
|
19
|
+
"prompt": "My plugin at <PLUGIN_ROOT> needs to move to DSH 0.1.2 (0.1.2-only, we're dropping 0.1.1 in this release). The tricky part: I use settingsNamespace from @deepseek-ai/dsh-settings in src/settings.ts and I heard it was removed. I also import SettingsConflictError in the same statement, and src/namespace-read.ts uses the settings module through `import * as settings`. Tell me what happens to these and make the changes.",
|
|
20
|
+
"expected_output": "The agent treats settingsNamespace removal as a semantic Service migration (inject the settings Service, register via ctx.settings.register), keeps SettingsConflictError, flags the namespace import for manual inspection, and rewrites reads against the provider's current API.",
|
|
21
|
+
"files": ["evals/files/settings-plugin"],
|
|
22
|
+
"expectations": [
|
|
23
|
+
"Treats the settingsNamespace removal as semantic work requiring a Service migration (inject the settings Service and register through ctx.settings.register(name, schema)), not as an automatic import move",
|
|
24
|
+
"Keeps SettingsConflictError (still exported in 0.1.2) instead of removing it together with settingsNamespace",
|
|
25
|
+
"Explicitly flags the `import * as settings` namespace usage in src/namespace-read.ts as something the static analyzer cannot resolve and inspects it manually",
|
|
26
|
+
"Migrates namespace reads (e.g. namespace.get) to the settings provider's current API (e.g. describe/get on the provider) instead of assuming the old factory object's methods still exist"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": 3,
|
|
31
|
+
"prompt": "My plugin at <PLUGIN_ROOT> still imports from @deepseek-ai/dsh-client-runtime/client. DSH 0.1.2 removed that package. Here's the constraint: my users are split between DSH 0.1.1 and 0.1.2 and I want ONE release that works on both - I don't want to maintain two plugin versions. Figure out how to handle this and start the work. Full write access granted.",
|
|
32
|
+
"expected_output": "The agent records the dual-version intent, treats every 0.1.2 catalog rewrite as a candidate needing cross-version review, proposes an evidence-grounded same-release mechanism, and defines the two-version verification matrix instead of applying the 0.1.2 codemod as automatically safe.",
|
|
33
|
+
"files": ["evals/files/import-move-plugin"],
|
|
34
|
+
"expectations": [
|
|
35
|
+
"Records the compatibility intent as dual-version (one release supporting both 0.1.1 and 0.1.2) from the prompt",
|
|
36
|
+
"Does not apply or recommend applying the 0.1.2 catalog codemod as automatically safe for 0.1.1; treats each rewrite as a candidate for cross-version review first",
|
|
37
|
+
"Proposes a concrete same-release compatibility mechanism grounded in plugin evidence (e.g. shared adapter with runtime feature detection or conditional version-specific entry/build) rather than guessing at dynamic loading",
|
|
38
|
+
"Defines a two-version verification matrix with evidence kept separate for 0.1.1 and 0.1.2 (dependency/peer resolution, build and packed artifact, isolated profile activation smoke, plugin behavior)",
|
|
39
|
+
"Never claims dual-version compatibility from 0.1.2-only evidence; states what remains unproven"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": 4,
|
|
44
|
+
"prompt": "Migrate the plugin at <PLUGIN_ROOT> to DSH 0.1.2. You have full permission to change whatever is needed - just do it end to end and tell me when it's done.",
|
|
45
|
+
"expected_output": "The agent notices the request never says whether 0.1.1 support may be dropped, asks the explicit compatibility question, and then either proceeds only on a genuine developer reply or records the decision as pending and stays read-only until a genuine decision is made.",
|
|
46
|
+
"files": ["evals/files/import-move-plugin"],
|
|
47
|
+
"expectations": [
|
|
48
|
+
"Asks the explicit compatibility question (should the same upgraded release continue to support DSH 0.1.1, or may it target 0.1.2 only) or otherwise records the compatibility decision as pending developer decision",
|
|
49
|
+
"Distinguishes a genuine developer reply from a self-assumed one: only a real answer delivered by the developer (e.g. an answered question the harness returns) resolves the gate and lets the migration proceed; when no genuine answer is delivered, the agent must NOT assume, simulate, or fabricate a decision and must NOT treat the decision as resolved",
|
|
50
|
+
"Makes no source edits, dependency installs, builds, or migrate apply writes while the decision is pending; read-only analysis is acceptable",
|
|
51
|
+
"Reports the achieved gate as analyzed or lower with the pending compatibility decision called out, rather than declaring the migration done"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-plugin-session-notes",
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "Session notes panel for DeepSeek Harness, built against DSH 0.1.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"types": "./lib/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"typecheck": "tsc -p .",
|
|
10
|
+
"build": "tsc -p . --emitDeclarationOnly false"
|
|
11
|
+
},
|
|
12
|
+
"peerDependencies": {
|
|
13
|
+
"@deepseek-ai/dsh": "~0.1.1"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@deepseek-ai/dsh": "0.1.1-rc.2",
|
|
17
|
+
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
|
18
|
+
"typescript": "^5.6.0"
|
|
19
|
+
},
|
|
20
|
+
"dsh": {
|
|
21
|
+
"client": {
|
|
22
|
+
"entry": "./src/index.ts",
|
|
23
|
+
"external": [
|
|
24
|
+
"@deepseek-ai/dsh-client-ui-conversation"
|
|
25
|
+
],
|
|
26
|
+
"inject": [
|
|
27
|
+
"@deepseek-ai/dsh-api-session-controller"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ClientContext, createSnapshotStore } from '@deepseek-ai/dsh-client-runtime/client'
|
|
2
|
+
import { SessionId } from '@deepseek-ai/dsh-client-runtime/client'
|
|
3
|
+
|
|
4
|
+
export interface Note {
|
|
5
|
+
sessionId: SessionId
|
|
6
|
+
text: string
|
|
7
|
+
updatedAt: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function activate(ctx: ClientContext) {
|
|
11
|
+
const notes = createSnapshotStore<Record<string, Note[]>>({ })
|
|
12
|
+
|
|
13
|
+
ctx.on('session:selected', (sessionId: SessionId) => {
|
|
14
|
+
const current = notes.get() ?? { }
|
|
15
|
+
current[sessionId] = current[sessionId] ?? []
|
|
16
|
+
notes.set(current)
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
return { notes }
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineStore, shallowEqual } from '@deepseek-ai/dsh-client-runtime/client'
|
|
2
|
+
|
|
3
|
+
export interface DraftState {
|
|
4
|
+
text: string
|
|
5
|
+
saving: boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function equalDraft(left: DraftState, right: DraftState) {
|
|
9
|
+
return shallowEqual(left, right)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const draftStore = defineStore<DraftState>(() => ({
|
|
13
|
+
text: '',
|
|
14
|
+
saving: false,
|
|
15
|
+
}))
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# dsh-plugin-focus-timer
|
|
2
|
+
|
|
3
|
+
Test-fixture plugin that mimics a real DSH 0.1.1 plugin using the
|
|
4
|
+
`settingsNamespace` factory from `@deepseek-ai/dsh-settings` (removed in DSH
|
|
5
|
+
0.1.2-alpha.2), a still-exported symbol from the same declaration
|
|
6
|
+
(`SettingsConflictError`), and a namespace import the static analyzer cannot
|
|
7
|
+
resolve. Used by the dsh-plugin-upgrade skill evals.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-plugin-focus-timer",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Pomodoro-style focus timer for DeepSeek Harness, built against DSH 0.1.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"types": "./lib/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"typecheck": "tsc -p .",
|
|
10
|
+
"build": "tsc -p . --emitDeclarationOnly false"
|
|
11
|
+
},
|
|
12
|
+
"peerDependencies": {
|
|
13
|
+
"@deepseek-ai/dsh": "~0.1.1"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@deepseek-ai/dsh": "0.1.1-rc.2",
|
|
17
|
+
"@deepseek-ai/dsh-settings": "0.1.1-rc.2",
|
|
18
|
+
"typescript": "^5.6.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { settingsNamespace, SettingsConflictError } from '@deepseek-ai/dsh-settings'
|
|
2
|
+
|
|
3
|
+
export const namespace = settingsNamespace('focus-timer', {
|
|
4
|
+
type: 'object',
|
|
5
|
+
properties: {
|
|
6
|
+
focusMinutes: { type: 'number', default: 25 },
|
|
7
|
+
breakMinutes: { type: 'number', default: 5 },
|
|
8
|
+
},
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
export function readFocusMinutes(): number {
|
|
12
|
+
const value = namespace.get('focusMinutes')
|
|
13
|
+
return typeof value === 'number' ? value : 25
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function describeConflict(error: unknown): string | null {
|
|
17
|
+
if (error instanceof SettingsConflictError) {
|
|
18
|
+
return `settings conflict: ${String(error)}`
|
|
19
|
+
}
|
|
20
|
+
return null
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{"query": "My plugin still imports from @deepseek-ai/dsh-client-runtime and I saw DSH 0.1.2 removed it. What do I need to change to get my plugin building against 0.1.2? The repo is at ~/code/dsh-plugin-quicknotes", "should_trigger": true},
|
|
3
|
+
{"query": "We're preparing our DSH plugin release for the 0.1.2 harness. Can you check whether anything in our dependency ranges or client graph declaration needs updating before we cut the release?", "should_trigger": true},
|
|
4
|
+
{"query": "升级 DSH 到 0.1.2 之后我的插件加载不出来了,报 settingsNamespace is not a function。帮我把插件迁到 0.1.2。", "should_trigger": true},
|
|
5
|
+
{"query": "dsh-host-apiproxy was deleted in the new harness version and my browser automation plugin depends on it. Plan the migration to 0.1.2 for me.", "should_trigger": true},
|
|
6
|
+
{"query": "I want ONE plugin release that works on both DSH 0.1.1 and 0.1.2 - how do I restructure the imports from dsh-client-runtime so both harness versions can load it?", "should_trigger": true},
|
|
7
|
+
{"query": "Before I publish v2 of my plugin, verify it against DSH 0.1.2: dependency peers, built artifact, and a runtime activation smoke. Is the dsh-doctor tool the right way?", "should_trigger": true},
|
|
8
|
+
{"query": "我们的插件 peerDependencies 里写着 ~0.1.1,现在要支持 0.1.2,需要改哪些依赖范围?插件在 D:\\work\\dsh-plugin-kanban", "should_trigger": true},
|
|
9
|
+
{"query": "The migration analysis says MIG_SEMANTIC_API_CHANGE for every session import in my plugin. What does that mean and how do I finish the 0.1.2 migration properly?", "should_trigger": true},
|
|
10
|
+
{"query": "help me assess whether my dsh plugin is compatible with harness 0.1.2 or whether the session controller changes break my list view", "should_trigger": true},
|
|
11
|
+
{"query": "I checked out the harness at tag dsh-v0.1.2-alpha.3 and my plugin's typecheck now fails on dsh-client-runtime types. Migrate the plugin source to 0.1.2.", "should_trigger": true},
|
|
12
|
+
{"query": "My plugin already targets DSH 0.1.2 and worked fine yesterday, but today activation fails with 'service not found' after I updated my graphics driver. Debug it.", "should_trigger": false},
|
|
13
|
+
{"query": "How do I write my first DSH plugin? Walk me through the plugin manifest and a hello-world client entry for 0.1.2.", "should_trigger": false},
|
|
14
|
+
{"query": "dsh-doctor diagnose says my web profile has a corrupted cordis.patch.yml - how do I use dsh-doctor recover to fix my installation?", "should_trigger": false},
|
|
15
|
+
{"query": "我在 DSH 里配置代理一直不生效,帮我看看 ~/.dsh 下面的配置文件哪里写错了", "should_trigger": false},
|
|
16
|
+
{"query": "Review my DSH plugin's PR: it adds a new settings panel UI. Focus on React rendering correctness and Cordis lifecycle cleanup.", "should_trigger": false},
|
|
17
|
+
{"query": "What's the difference between the DSH profile bundles and patch layers? Explaining for a blog post I'm writing about the DeepSeek Harness architecture.", "should_trigger": false},
|
|
18
|
+
{"query": "My plugin build passes on 0.1.1 but eslint crashes with OOM on large files - help me fix the lint config.", "should_trigger": false},
|
|
19
|
+
{"query": "Write a GitHub Actions workflow to publish my DSH plugin to npm whenever I push a tag.", "should_trigger": false},
|
|
20
|
+
{"query": "dsh keeps using 100% CPU when my plugin's background timer runs. Find the performance bug in my plugin code.", "should_trigger": false},
|
|
21
|
+
{"query": "Can you update the dsh-doctor CLI itself from 0.5.3 to the latest version and check its changelog for breaking changes?", "should_trigger": false}
|
|
22
|
+
]
|
|
@@ -11,7 +11,7 @@ dsh-doctor --version
|
|
|
11
11
|
dsh-doctor migrations list --json
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Record the local version and whether the exact current
|
|
14
|
+
Record the local version and whether it exposes the exact current catalog version pair declared in SKILL.md. A command that exists but lacks this catalog is not usable for the current known target.
|
|
15
15
|
|
|
16
16
|
## 2. Check the registry without changing the machine
|
|
17
17
|
|
|
@@ -43,4 +43,4 @@ Do not copy a replacement package into every dependency section that contained `
|
|
|
43
43
|
|
|
44
44
|
For `MIG_PATCH_TARGET_CHANGED`, first confirm the Harness checkout is exact and its tag scan succeeded. Then compare the old and target web profile bundle patches: remove an obsolete override only when the old row disappeared without a replacement, or update the id when upstream deliberately renamed/moved the row. Do not guess a replacement id from a similar name.
|
|
45
45
|
|
|
46
|
-
The machine-readable source of truth ships with DSH Doctor. Confirm the installed CLI exposes the current
|
|
46
|
+
The machine-readable source of truth ships with DSH Doctor. Confirm the installed CLI exposes the current catalog version pair declared in SKILL.md with `dsh-doctor migrations list`; the canonical catalog source is also available in the [DSH Doctor repository](https://github.com/bruc3van/dsh-doctor/tree/master/migrations), under the directory named after that pair. Catalogs older than the current pair remain historical evidence, not the current default.
|
|
@@ -70,7 +70,7 @@ Classify every additional difference as:
|
|
|
70
70
|
|
|
71
71
|
Only the catalog-confirmed pair is eligible for the built-in safe codemod. Treat additional exact-looking changes as proposed manual edits until independently reviewed and tested.
|
|
72
72
|
|
|
73
|
-
After the additional interval is reviewed, pass that exact version as `--target-version` in analyze, apply preview/apply, and verify. This is an explicit fallback for a newer 0.1.2 build that the current
|
|
73
|
+
After the additional interval is reviewed, pass that exact version as `--target-version` in analyze, apply preview/apply, and verify. This is an explicit fallback for a newer 0.1.2 build that the current catalog version pair declared in SKILL.md does not yet cover. It changes DSH dependency-range validation, deterministic DSH development pins, and the runtime version expectation; it does not turn the unlisted interval into catalog-confirmed API knowledge. Use `--dsh-command` to name the executable that actually reports and runs that version, and update the catalog and skill deliberately when that build becomes the new known target.
|
|
74
74
|
|
|
75
75
|
## 4. Investigate each semantic task in the plugin
|
|
76
76
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Static analysis covers source/type imports, dependency ranges, client graph declarations, and generated artifacts. A pass means no known blocking finding; it does not execute project code.
|
|
6
6
|
|
|
7
|
-
The current known static target is
|
|
7
|
+
The current known static target is the catalog target declared in SKILL.md. When the actual target is later than that catalog ref on the same 0.1.2 release line, first inspect the additional interval, then use `--target-version <version>` at every phase. The report keeps `migration.to` as the catalog ref and records `migration.actualTarget` separately, so a successful dependency or runtime check cannot be mistaken for catalog coverage of the additional API delta.
|
|
8
8
|
|
|
9
9
|
## Build
|
|
10
10
|
|