@bruc3van/dsh-doctor 0.5.6 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -2,19 +2,24 @@
2
2
 
3
3
  [中文](README.md) | English
4
4
 
5
- DSH Doctor helps an agent diagnose and upgrade DeepSeek Harness plugins: identify API changes between releases, modify code where the migration is known, point out semantic changes that need developer judgment, then rebuild and verify the plugin.
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
- The current focus is:
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
- ```text
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
- The project also diagnoses DSH profiles and installed plugins, checks for compatible versions, and performs safety checks before quarantine or removal.
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
- > This is a community-maintained third-party project, not an official DeepSeek project. The migration scope remains DSH 0.1.1 → 0.1.2; the current known-latest catalog exactly covers `dsh-v0.1.1-rc.2` through `dsh-v0.1.2-alpha.3`. The older alpha.2 catalog remains as historical rules. When a newer 0.1.2 prerelease appears, inspect its delta before deliberately updating the catalog and skill.
20
+ Agents can orchestrate these capabilities through the skill, while other tools can integrate the same structured CLI workflows.
16
21
 
17
- ## Upgrade a plugin with the skill
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
- An upgrade request does not itself authorize dropping the old runtime. If the developer has not said, the skill explicitly asks whether the same upgraded plugin release must still support DSH 0.1.1 before any migration write, dependency installation, build, or runtime command. When compatibility must be preserved, the agent designs a dual-version approach first and verifies 0.1.1 and 0.1.2 separately; one successful 0.1.2 run is not dual-version evidence.
37
+ The skill guides the agent to:
33
38
 
34
- The skill reminds the agent to work in this order:
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
- 1. inspect the plugin root, Harness checkout, package manager, and available DSH Doctor;
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
- `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 uses a pinned `npx` version by default and does not change the global npm installation.
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**: tells the agent which steps to follow, which actions need confirmation, and what to report;
53
- - **CLI**: scans the plugin, lists problems, changes deterministic code, and runs verification;
54
- - **Migration catalog**: records known package, API, Service, configuration, and behavior changes between the two DSH versions.
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
- analyze
60
- change deterministic code
61
+ investigate the actual environment
62
+ catalog-driven analysis
63
+ → reviewed-plan exact changes
61
64
  → agent handles semantic changes
62
- rebuild
63
- → static verification
65
+ build and artifact verification
64
66
  → temporary-profile installation and activation
65
- publish through the plugin's own release process
67
+ → plugin business-behavior verification
66
68
  ```
67
69
 
68
- The CLI only auto-edits migrations marked `exact` by the catalog. Ownership and lifecycle changes involving Session, Workspace, Conversation, and pending interactions are reported as `MIG_SEMANTIC_API_CHANGE`. The agent must handle them in the context of the plugin instead of applying a mechanical replacement.
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
- - `@deepseek-ai/dsh-client-runtime` was removed and has no single aggregate replacement;
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
- The migration catalog stores source/target tags and Git commits together with package, symbol, Service, and configuration rules. With `--harness-root`, the CLI verifies the commits behind both tags and compares entry ids in the target web profile. This gives the agent concrete version differences instead of making it guess the new API.
74
+ ## Core capabilities
81
75
 
82
- ## Coverage
83
-
84
- | Area | How Doctor and the agent handle it |
76
+ | Area | How it is handled |
85
77
  |---|---|
86
- | JS/TS imports, including type-only, aliased, and mixed imports | Analyzed with the TypeScript AST; symbols with a known equivalent can be rewritten |
87
- | Removed or added DSH packages | Checked in source and manifest; dependencies are updated only when no remaining reference blocks the change |
88
- | DSH/Cordis version ranges | Checks dependencies, devDependencies, and peerDependencies; existing peer ranges are not widened automatically |
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 old APIs |
93
- | Plugin build | Runs existing typecheck, build, test, and pack:check scripts; build or pack:check is required for artifact verification |
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
- | UI and business behavior | Not decided by Doctor; the agent or developer runs plugin-specific checks |
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
- Source analysis uses the TypeScript AST and is cross-checked against the manifest, client graph, and build output. A bundle without an old string does not prove that source code is compatible, and a successful compile does not prove that the published artifact or runtime is compatible.
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
- - `migrate apply` requires `--safe --plan-file`; preview only creates a new plan outside the plugin root, never overwrites an existing file, and persists the complete analysis plus every input-file hash; `--yes` applies only that same reviewed plan;
103
- - only `exact` migrations are auto-edited; semantic changes are not guessed;
104
- - SHA-256 is checked before writing, so a file changed after preview is rejected;
105
- - existing files receive timestamped backups and are replaced atomically through a temporary file;
106
- - build and runtime verification synchronize dependencies and execute plugin scripts, so they require explicit `--yes --install`; install lifecycle scripts are disabled and lockfile plus resolved-version evidence is recorded;
107
- - runtime verification uses a temporary `DSH_HOME`, not the normal `~/.dsh`;
108
- - JSON, baselines, and recovery snapshots redact plugin configuration and common secret/token/password/key fields;
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
- Node.js `^22.19.0` or `>=24.0.0` is required.
102
+ ## Boundaries
114
103
 
115
- First confirm that the CLI contains the required migration:
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
- ```sh
118
- npm exec --yes --package=@bruc3van/dsh-doctor@<selected-version> -- \
119
- dsh-doctor migrations list
120
- ```
110
+ ## CLI quick reference
121
111
 
122
- ### 1. Analyze
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
- Diagnosis composes configuration in DSH order:
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
- It checks plugin versions and peers, Node engines, installation and lockfile state, bundles and patches, client contracts, duplicate mounts, higher-layer overrides, and DSH CLI/Harness version drift. Normal diagnosis does not use the network. Only `--check-updates` and recovery operations contact the npm registry.
205
-
206
- ## Recovery operations
207
-
208
- ```sh
209
- # Check and install the highest manifest-declared compatible version
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
- # 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
- ```sh
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 keeps redacted structured evidence.
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 blocker remains, or the action completed and passed its verification |
243
- | `1` | Compatibility issues, semantic migration, or verification work remains |
244
- | `2` | Argument, environment, or action-execution failure |
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 operations. CI tests Node.js `22.19` and `24` on macOS, Ubuntu, and Windows.
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 帮助 Agent 诊断和升级 DeepSeek Harness 插件:识别新旧版本之间的 API 变化,修改可以确定迁移的代码,提示需要开发者判断的语义变化,重新构建并验证插件。
5
+ DSH Doctor 是给 DSH 插件开发者和 Agent 使用的升级、排障工具。它能找出插件升级时需要修改的地方,自动处理可以确定的改动,并继续检查依赖、构建产物和实际安装运行情况。
6
6
 
7
- 当前主要面向:
7
+ 遇到需要理解业务逻辑的改动,它会明确列出来交给 Agent 或开发者处理,不会直接猜。所有修改都会先生成预览并保留备份,运行验证也会放在临时 DSH 环境中,不影响日常使用的 profile。
8
8
 
9
- ```text
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
- 项目同时提供 DSH profile 和插件的诊断、兼容版本检查、隔离与删除前检查。
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
- > 这是社区维护的第三方工具,不属于 DeepSeek 官方项目。工具的迁移范围保持为 DSH 0.1.1 → 0.1.2;当前已知最新版 catalog 精确覆盖 `dsh-v0.1.1-rc.2` 到 `dsh-v0.1.2-alpha.3`。旧 alpha.2 catalog 作为历史规则保留;出现更新的 0.1.2 预发布版本时,需要先核对增量,再明确更新 catalog 和 Skill。
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
- 升级请求本身不代表可以放弃旧版。若开发者没有说明,Skill 会在任何迁移写入、依赖安装、构建或运行时命令前,显式询问升级后的同一插件版本是否还要兼容 DSH 0.1.1。选择保留兼容时,Agent 会先设计双版本适配方式,并分别验证 0.1.1 和 0.1.2;不能用一次 0.1.2 验证代替双版本结论。
37
+ Skill 会引导 Agent
33
38
 
34
- Skill 会提醒 Agent 按下面的顺序工作:
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
- 1. 检查插件目录、Harness checkout、包管理器和可用的 DSH Doctor
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
- `npx skills add` 只安装 Agent 指令,不会安装全局 DSH Doctor。Skill 会先检查本地 CLInpm registry;本地版本不合适时,默认使用固定版本的 `npx`,不会自行修改全局 npm 安装。
48
+ 升级请求本身不代表可以放弃旧版。兼容目标未明确时,Skill 可以先做只读分析,但会在迁移写入、依赖安装、构建或运行时命令前要求确认。双版本模式必须分别验证 0.1.10.1.2,不能用一次 0.1.2 smoke 代替双版本结论。
45
49
 
46
- 验证完成后,可以再让 Agent 按插件仓库原有的版本和发布流程提交、打 tag、发布。Skill 本身不会自动提交或发布。
50
+ ## 工作原理
47
51
 
48
- ## 工作方式
52
+ DSH Doctor 由三个相互约束的部分组成:
49
53
 
50
- DSH Doctor 由三部分组成:
54
+ - **Skill**:为 Agent 定义调查步骤、兼容决策、确认门和报告标准;
55
+ - **CLI**:提供只读分析、安全修改、诊断、基线、恢复和分级验证能力;
56
+ - **Migration catalog**:保存精确 DSH tag/commit 以及已确认的 package、symbol、Service、配置和行为变化。
51
57
 
52
- - **Skill**:告诉 Agent 升级步骤、哪些操作需要确认,以及最后应该报告什么;
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
- 临时 profile 安装与激活验证
65
- → 按插件自己的流程发布
65
+ 构建与产物验证
66
+ 临时 profile 安装和激活
67
+ 插件业务行为验证
66
68
  ```
67
69
 
68
- CLI 只自动修改 catalog 标记为 `exact` 的迁移。Session、Workspace、Conversation、pending interaction 等所有权和生命周期变化会标记为 `MIG_SEMANTIC_API_CHANGE`,由 Agent 结合插件代码处理,不会机械替换。
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
- - `@deepseek-ai/dsh-client-runtime` 已移除,没有一个新的聚合包可以直接替换;
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
- Migration catalog 保存 source/target tag 和 Git commit,并记录 package、symbol、Service 和配置规则。提供 `--harness-root` 时,CLI 还会确认两个 tag 对应的 commit,并比较目标 web profile 中的 entry id。这样 Agent 可以基于明确的版本差异修改代码,而不是猜测新 API。
74
+ ## 核心能力
81
75
 
82
- ## 覆盖范围
83
-
84
- | 检查内容 | Doctor/Agent 如何处理 |
76
+ | 检查内容 | 处理方式 |
85
77
  |---|---|
86
- | JS/TS import,包括 `import type`、别名和混合 import | 使用 TypeScript AST 分析;确定等价的 symbol 可自动改写 |
87
- | 移除或新增的 DSH | 检查源码和 manifest;没有残留引用时更新依赖 |
88
- | DSH/Cordis 版本范围 | 检查 dependencies、devDependencies peerDependencies;不自动扩大已有 peer 范围 |
89
- | Session、Workspace、Conversation 等语义变化 | 报告新 owner 和变化原因,由 Agent 修改业务代码 |
90
- | `dsh.client` client export | 检查 inject、external、platform、immediately `exports["./client"]` |
91
- | Harness patch target | 有精确 Harness checkout 时比较新旧 entry |
92
- | 构建产物 | 检查 `lib`、`dist`、`build`、`out` 中是否仍包含旧 API |
93
- | 插件构建 | 运行项目已有的 typecheck、build、test、pack:check;必须有 build pack:check 才算产物已验证 |
94
- | 安装和激活 | 打包真实 tarball,安装到临时 `DSH_HOME` 的新 web profile 中验证 |
95
- | UI 和业务行为 | Doctor 不自动判断;需要 Agent 或开发者执行插件自己的测试 |
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
- 源码分析使用 TypeScript AST,并同时检查 manifest、client graph 和构建产物。因此,bundle 中没有旧字符串并不代表源码已经兼容,源码编译通过也不代表发布产物和运行时已经兼容。
89
+ 源码没有旧字符串、编译成功、tarball 可安装和业务行为正常是不同证据等级,Doctor 不会把其中一个冒充另一个。
98
90
 
99
- ## 安全性
91
+ ## 安全与证据
100
92
 
101
93
  - `diagnose`、`migrate analyze` 和静态验证只读,不加载或执行待检查插件;
102
- - `migrate apply` 必须带 `--safe --plan-file`;预览只会新建插件目录外的 plan,不会覆盖已有文件,并把完整分析和所有输入文件哈希固化下来;`--yes` 只应用同一个已审阅 plan;
103
- - 只有 `exact` 迁移会自动改代码,语义变化不会自动猜测;
104
- - 写入前检查文件 SHA-256,预览后文件发生变化会拒绝写入;
105
- - 修改已有文件前创建时间戳备份,并使用临时文件原子替换;
106
- - build 和 runtime 会同步依赖并执行插件脚本,因此必须显式使用 `--yes --install`;依赖安装禁用 lifecycle scripts,并记录 lockfile 和实际解析版本证据;
107
- - runtime 使用临时 `DSH_HOME`,不会安装到正常的 `~/.dsh`;
108
- - JSON、baseline 和恢复快照会脱敏插件配置和常见 secret/token/password/key 字段;
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
- ```sh
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
- Plan 必须放在插件目录外,避免被当成插件输入。Apply 会核对 plan digest、完整分析输入和每个修改的 before/after hash;源码、manifest 或其他分析输入在预览后变化时必须重新生成并审阅 plan。确定性依赖改写使用 catalog 明确的 Client/Host 与 peer/dev 策略,不再沿用旧包所在的 dependency section。每个被修改的文件都会保留备份。
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
- ### 3. 验证
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
- ```sh
187
- npx @bruc3van/dsh-doctor diagnose
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
- 诊断按 DSH 的顺序组合配置:
199
-
200
- ```text
201
- bundle layers profile cordis.patch.yml home cordis.patch.yml CLI overlays
202
- ```
203
-
204
- 它会检查插件版本和 peer、Node engines、安装与 lockfile、bundle patch、client contract、重复 mount、高层配置覆盖,以及 DSH CLI/Harness 版本漂移。普通诊断不访问网络;只有 `--check-updates` 和 recovery 操作会访问 npm registry。
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
- ```sh
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
- 文本支持中文和英文,`--json` 使用稳定英文 code 并保留脱敏后的结构化证据。
134
+ 文本支持中文和英文;`--json` 使用稳定英文 code,并保留脱敏后的结构化证据。
239
135
 
240
136
  | 退出码 | 含义 |
241
137
  |---|---|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bruc3van/dsh-doctor",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Help agents diagnose and upgrade DeepSeek Harness plugins from DSH 0.1.1 to 0.1.2",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,13 +1,22 @@
1
1
  ---
2
2
  name: dsh-plugin-upgrade
3
- description: Help diagnose and upgrade a DeepSeek Harness plugin from DSH 0.1.1 to 0.1.2 with dsh-doctor, while deciding explicitly whether the upgraded release must remain compatible with DSH 0.1.1. Use when a plugin developer asks to assess compatibility, identify changed APIs, replace removed dsh-client-runtime or dsh-host-apiproxy usage, update DSH dependencies, modify plugin code, rebuild artifacts, or verify the plugin before releasing a new version. Apply only catalog-confirmed exact rewrites automatically, guide semantic code changes, and report what still needs developer verification. The current known target reference is dsh-v0.1.2-alpha.3.
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. The current known catalog records `dsh-v0.1.1-rc.2` and `dsh-v0.1.2-alpha.3` as the exact reference points used to derive and verify known changes. 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. Do not claim that the catalog proves an unlisted version combination.
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. Never globally install or update the CLI without explicit authorization.
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. Write authorization also does not answer that product decision. Do not infer the answer from the current peer range, the word "upgrade," or the fact that a 0.1.2-only rewrite is simpler.
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 to collect evidence. Before any `migrate apply` preview, source or manifest edit, dependency install, build, or runtime command:
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. record an explicit choice already present in the developer's request; or
44
- 2. ask: **"Should the same upgraded plugin release continue to support DSH 0.1.1, or may it target DSH 0.1.2 only?"**
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
- If the answer is unavailable or ambiguous, stop at `analyzed`, identify the compatibility decision as pending, and do not modify the plugin. Follow the selected path in [compatibility-strategy.md](references/compatibility-strategy.md):
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
- - **0.1.2-only:** the catalog's exact rewrites may be applied after their normal preview and write confirmation.
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 and must be reported as such.
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 refs, inspect that additional ref 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 plugin callers; do not stop at naming a likely new owner.
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. Do not remove still-exported symbols such as `SettingsConflictError` merely because they share the same import declaration.
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
- Do not infer compatibility from a clean bundled artifact alone. The analyzer intentionally scans TypeScript type imports, source files, package metadata, client graph declarations, and built output.
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`; do not assume a catalog-safe codemod is safe for 0.1.1.
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. If the developer explicitly asks to release the upgraded plugin, 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. Do not commit, tag, or publish merely because the migration skill was installed or run.
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,5 @@
1
+ # dsh-plugin-session-notes
2
+
3
+ Test-fixture plugin that mimics a real DSH 0.1.1 plugin: it imports
4
+ store-engine and type helpers from `@deepseek-ai/dsh-client-runtime/client`,
5
+ the package DSH 0.1.2 removed. Used by the dsh-plugin-upgrade skill evals.
@@ -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,2 @@
1
+ export { namespace, readFocusMinutes, describeConflict } from './settings'
2
+ export { legacyNamespace } from './namespace-read'
@@ -0,0 +1,6 @@
1
+ import * as settings from '@deepseek-ai/dsh-settings'
2
+
3
+ // Legacy sync path kept for the timer's "sync every launch" option.
4
+ export function legacyNamespace() {
5
+ return settings.settingsNamespace('focus-timer-sync', { type: 'object' })
6
+ }
@@ -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 `dsh-v0.1.1-rc.2` to `dsh-v0.1.2-alpha.3` catalog is present. A command that exists but lacks this catalog is not usable for the current known target.
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 exact version pair 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/dsh-v0.1.1-rc.2__dsh-v0.1.2-alpha.3). The older alpha.2 catalog remains historical evidence, not the current default.
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 alpha.3 catalog 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.
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 alpha.3. 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.
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