@bruc3van/dsh-doctor 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md
CHANGED
|
@@ -29,14 +29,17 @@ Upgrade this plugin from DSH 0.1.1 to DSH 0.1.2.
|
|
|
29
29
|
Analyze compatibility first, modify the code, then complete build and runtime verification.
|
|
30
30
|
```
|
|
31
31
|
|
|
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.
|
|
33
|
+
|
|
32
34
|
The skill reminds the agent to work in this order:
|
|
33
35
|
|
|
34
36
|
1. inspect the plugin root, Harness checkout, package manager, and available DSH Doctor;
|
|
35
37
|
2. analyze source, type imports, dependencies, manifest, client graph, patches, and build output;
|
|
36
|
-
3.
|
|
37
|
-
4.
|
|
38
|
-
5.
|
|
39
|
-
6.
|
|
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.
|
|
40
43
|
|
|
41
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.
|
|
42
45
|
|
|
@@ -112,7 +115,7 @@ Node.js `^22.19.0` or `>=24.0.0` is required.
|
|
|
112
115
|
First confirm that the CLI contains the required migration:
|
|
113
116
|
|
|
114
117
|
```sh
|
|
115
|
-
npx --yes --package=@bruc3van/dsh-doctor@0.5.
|
|
118
|
+
npx --yes --package=@bruc3van/dsh-doctor@0.5.4 \
|
|
116
119
|
dsh-doctor migrations list
|
|
117
120
|
```
|
|
118
121
|
|
package/README.md
CHANGED
|
@@ -29,14 +29,17 @@ npx skills add bruc3van/dsh-doctor
|
|
|
29
29
|
先分析兼容问题,再修改代码,最后完成构建和运行时验证。
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
升级请求本身不代表可以放弃旧版。若开发者没有说明,Skill 会在任何迁移写入、依赖安装、构建或运行时命令前,显式询问升级后的同一插件版本是否还要兼容 DSH 0.1.1。选择保留兼容时,Agent 会先设计双版本适配方式,并分别验证 0.1.1 和 0.1.2;不能用一次 0.1.2 验证代替双版本结论。
|
|
33
|
+
|
|
32
34
|
Skill 会提醒 Agent 按下面的顺序工作:
|
|
33
35
|
|
|
34
36
|
1. 检查插件目录、Harness checkout、包管理器和可用的 DSH Doctor;
|
|
35
37
|
2. 分析源码、类型导入、依赖、manifest、client graph、patch 和构建产物;
|
|
36
|
-
3.
|
|
37
|
-
4.
|
|
38
|
-
5.
|
|
39
|
-
6.
|
|
38
|
+
3. 确认升级后是仅支持 0.1.2,还是同一版本继续兼容 0.1.1;
|
|
39
|
+
4. 预览并应用可以确定等价、且符合所选兼容策略的代码修改;
|
|
40
|
+
5. 根据新的 API 所有者处理需要理解业务的语义迁移;
|
|
41
|
+
6. 重新构建插件,并依次做静态、构建和隔离运行时验证;双版本模式分别验证两端;
|
|
42
|
+
7. 报告兼容目标、修改内容、剩余问题、备份和实际达到的验证等级。
|
|
40
43
|
|
|
41
44
|
`npx skills add` 只安装 Agent 指令,不会安装全局 DSH Doctor。Skill 会先检查本地 CLI 和 npm registry;本地版本不合适时,默认使用固定版本的 `npx`,不会自行修改全局 npm 安装。
|
|
42
45
|
|
|
@@ -112,7 +115,7 @@ Migration catalog 保存 source/target tag 和 Git commit,并记录 package、
|
|
|
112
115
|
先确认 CLI 包含需要的迁移:
|
|
113
116
|
|
|
114
117
|
```sh
|
|
115
|
-
npx --yes --package=@bruc3van/dsh-doctor@0.5.
|
|
118
|
+
npx --yes --package=@bruc3van/dsh-doctor@0.5.4 \
|
|
116
119
|
dsh-doctor migrations list
|
|
117
120
|
```
|
|
118
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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. 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 catalog uses dsh-v0.1.1-rc.2 and dsh-v0.1.2-alpha.2 as its reference points.
|
|
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 catalog uses dsh-v0.1.1-rc.2 and dsh-v0.1.2-alpha.2 as its reference points.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Upgrade a DSH 0.1.1 plugin to 0.1.2
|
|
@@ -16,6 +16,7 @@ Determine:
|
|
|
16
16
|
- the plugin repository root;
|
|
17
17
|
- the DSH Harness checkout when available;
|
|
18
18
|
- the plugin's actual DSH dependency and peer ranges, and the requested 0.1.2 target;
|
|
19
|
+
- whether the upgraded plugin must keep supporting DSH 0.1.1, target only DSH 0.1.2, or still needs that decision from the developer;
|
|
19
20
|
- whether the developer authorizes writes and project command execution;
|
|
20
21
|
- whether the developer authorizes a global CLI install or update;
|
|
21
22
|
- the plugin's package manager and build scripts.
|
|
@@ -25,12 +26,26 @@ Use these catalog reference points in the current CLI commands:
|
|
|
25
26
|
- source: `dsh-v0.1.1-rc.2`
|
|
26
27
|
- target: `dsh-v0.1.2-alpha.2`
|
|
27
28
|
|
|
28
|
-
Read [cli-bootstrap.md](references/cli-bootstrap.md) before running any migration command, [migration-map.md](references/migration-map.md) before making semantic changes, and [verification.md](references/verification.md) before build or runtime verification.
|
|
29
|
+
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, [migration-map.md](references/migration-map.md) before making semantic changes, and [verification.md](references/verification.md) before build or runtime verification.
|
|
29
30
|
|
|
30
31
|
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 an exact-version `npx` fallback over changing the developer's global installation. Never globally install or update the CLI without explicit authorization.
|
|
31
32
|
|
|
32
33
|
The examples below use `dsh-doctor` for readability. When bootstrap selected an npx invocation, substitute the complete pinned prefix, `npx --yes --package=@bruc3van/dsh-doctor@<selected-version> dsh-doctor`, in every phase.
|
|
33
34
|
|
|
35
|
+
## Compatibility decision gate
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
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:
|
|
40
|
+
|
|
41
|
+
1. record an explicit choice already present in the developer's request; or
|
|
42
|
+
2. ask: **"Should the same upgraded plugin release continue to support DSH 0.1.1, or may it target DSH 0.1.2 only?"**
|
|
43
|
+
|
|
44
|
+
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):
|
|
45
|
+
|
|
46
|
+
- **0.1.2-only:** the catalog's exact rewrites may be applied after their normal preview and write confirmation.
|
|
47
|
+
- **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.
|
|
48
|
+
|
|
34
49
|
## Phase 1: analyze
|
|
35
50
|
|
|
36
51
|
Run from any directory:
|
|
@@ -56,6 +71,8 @@ Do not infer compatibility from a clean bundled artifact alone. The analyzer int
|
|
|
56
71
|
|
|
57
72
|
## Phase 2: apply exact changes
|
|
58
73
|
|
|
74
|
+
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.
|
|
75
|
+
|
|
59
76
|
Preview first:
|
|
60
77
|
|
|
61
78
|
```sh
|
|
@@ -90,6 +107,8 @@ On failure, preserve and report the temporary directory. On success, the CLI rem
|
|
|
90
107
|
|
|
91
108
|
Runtime activation is not business-behavior proof. Finish with targeted manual or automated checks for visible UI, service lifecycle, event subscriptions, cleanup, configuration, and plugin-specific workflows.
|
|
92
109
|
|
|
110
|
+
For a dual-version result, verify the produced release against both the actual 0.1.1 and 0.1.2 environments. The catalog-driven `migrate verify` commands prove only the configured target side. Use the plugin's own build/test flow and an isolated 0.1.1 Harness profile for the legacy side, and name the evidence from each matrix row. A successful 0.1.2 runtime smoke must never be reported as dual-version compatibility.
|
|
111
|
+
|
|
93
112
|
## Prepare for release when requested
|
|
94
113
|
|
|
95
114
|
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.
|
|
@@ -107,3 +126,4 @@ State the highest achieved gate exactly:
|
|
|
107
126
|
Do not call the plugin compatible while errors, semantic tasks, stale artifacts, or required behavior checks remain. Include backups and retained temporary directories in the handoff.
|
|
108
127
|
Also report the selected DSH Doctor version and source (`local`, exact-version `npx`, or explicitly authorized global install), the registry version observed at bootstrap, and whether update status was current, outdated, missing, or unknown.
|
|
109
128
|
Report the plugin's actual source/target version evidence separately from the catalog reference refs. State whether the plugin is ready for its normal release process; if a release was explicitly requested and completed, include the commit, tag, registry, and release verification evidence.
|
|
129
|
+
State the compatibility intent as one of `0.1.2-only`, `dual-version`, or `pending developer decision`. For `dual-version`, report build, artifact, runtime, and behavior evidence separately for 0.1.1 and 0.1.2; only call the release dual-compatible when every required row passes.
|
|
@@ -15,9 +15,11 @@
|
|
|
15
15
|
{
|
|
16
16
|
"id": 2,
|
|
17
17
|
"prompt": "把这个前端插件升级到 DSH 0.1.2。源码里有 import type { ClientContext, ISessions } from '@deepseek-ai/dsh-client-runtime/client',可以安全改的帮我改,其他的列出来。",
|
|
18
|
-
"expected_output": "
|
|
18
|
+
"expected_output": "Recognizes that write authorization does not decide whether 0.1.1 may be dropped, asks the compatibility question, and waits before applying changes; after a 0.1.2-only answer, safely moves ClientContext while leaving ISessions as a semantic task.",
|
|
19
19
|
"expectations": [
|
|
20
20
|
"Detects type-only imports from source rather than relying on the bundle",
|
|
21
|
+
"Explicitly asks whether the same release must preserve DSH 0.1.1 compatibility",
|
|
22
|
+
"Does not preview, apply, edit, install, build, or run the plugin until that decision is answered",
|
|
21
23
|
"Uses migrate apply --safe and requires explicit confirmation for writes",
|
|
22
24
|
"Does not mechanically rewrite the semantic ISessions contract"
|
|
23
25
|
]
|
|
@@ -25,9 +27,10 @@
|
|
|
25
27
|
{
|
|
26
28
|
"id": 3,
|
|
27
29
|
"prompt": "完整升级这个混合前后端插件并验证,Harness 在 /workspace/deepseek-harness。构建失败也要把现场路径告诉我。",
|
|
28
|
-
"expected_output": "
|
|
30
|
+
"expected_output": "Analyzes first, asks whether the same release must retain 0.1.1, and waits before safe apply or executable gates; after the decision, performs the selected migration and verification matrix and reports retained failure state.",
|
|
29
31
|
"expectations": [
|
|
30
32
|
"Uses the exact Harness refs and verifies the catalog commits",
|
|
33
|
+
"Treats legacy compatibility as an explicit product decision rather than inferring it from an upgrade request",
|
|
31
34
|
"Runs static, build, then runtime verification in order",
|
|
32
35
|
"Uses a temporary DSH_HOME and reports retained failure state",
|
|
33
36
|
"Keeps business behavior verification separate from activation smoke"
|
|
@@ -36,13 +39,37 @@
|
|
|
36
39
|
{
|
|
37
40
|
"id": 4,
|
|
38
41
|
"prompt": "帮我升级这个插件,但机器上的 dsh-doctor 是旧版,而且我没有授权修改全局 npm 包。请先检查有没有新版本,再继续迁移。",
|
|
39
|
-
"expected_output": "Checks the registry read-only, selects one exact-version npx CLI with the required catalog, avoids global installation, and reports the selected version and update status.",
|
|
42
|
+
"expected_output": "Checks the registry read-only, selects one exact-version npx CLI with the required catalog, avoids global installation, asks for the unresolved compatibility intent, and reports the selected version and update status without starting writes or executable verification.",
|
|
40
43
|
"expectations": [
|
|
41
44
|
"Checks the local CLI version and exact migration catalog before use",
|
|
42
45
|
"Uses npm view as a read-only registry update check",
|
|
43
46
|
"Pins one resolved npx package version for all migration phases",
|
|
44
47
|
"Does not install or update a global CLI without explicit authorization",
|
|
45
|
-
"Reports local, registry, selected CLI, catalog, and update-status evidence"
|
|
48
|
+
"Reports local, registry, selected CLI, catalog, and update-status evidence",
|
|
49
|
+
"Stops at analyzed until the developer chooses 0.1.2-only or dual-version support"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": 5,
|
|
54
|
+
"prompt": "升级这个插件到 DSH 0.1.2,但同一个 npm 版本还必须继续支持 0.1.1。可以修改代码并执行测试;如果单一产物做不到,先告诉我冲突和可选方案,不要自行放弃旧版。",
|
|
55
|
+
"expected_output": "Records an explicit dual-version requirement, assesses whether imports, manifests, graph declarations, and artifacts can coexist, selects or proposes an adapter/conditional-build/separate-release strategy, and verifies both version rows before claiming compatibility.",
|
|
56
|
+
"expectations": [
|
|
57
|
+
"Records the compatibility intent as dual-version without asking a redundant question",
|
|
58
|
+
"Treats 0.1.2 safe codemods as candidates that still require 0.1.1 review",
|
|
59
|
+
"Does not widen peer ranges or claim one-artifact support without installation and runtime evidence",
|
|
60
|
+
"Separately verifies build, artifact, runtime, and behavior evidence for DSH 0.1.1 and 0.1.2",
|
|
61
|
+
"Reports an exact incompatibility and asks before switching to separate releases or dropping 0.1.1"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": 6,
|
|
66
|
+
"prompt": "这是一次 breaking release,只需要支持 DSH 0.1.2,不再兼容 0.1.1。先分析再按安全流程修改和验证。",
|
|
67
|
+
"expected_output": "Records the explicit 0.1.2-only intent without asking a redundant compatibility question, then follows analyze, safe preview/apply, semantic migration, and target verification gates.",
|
|
68
|
+
"expectations": [
|
|
69
|
+
"Records the compatibility intent as 0.1.2-only",
|
|
70
|
+
"Does not ask again whether 0.1.1 compatibility must be retained",
|
|
71
|
+
"Still separates write authorization from compatibility intent and follows preview and confirmation safeguards",
|
|
72
|
+
"Reports only the 0.1.2 verification evidence actually achieved"
|
|
46
73
|
]
|
|
47
74
|
}
|
|
48
75
|
]
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Compatibility strategy
|
|
2
|
+
|
|
3
|
+
## Decide before changing the plugin
|
|
4
|
+
|
|
5
|
+
Moving a plugin to 0.1.2 and preserving 0.1.1 are different deliverables. The 0.1.2 catalog describes target migrations; it does not prove that the resulting source, dependency graph, artifact, or manifest still works on 0.1.1.
|
|
6
|
+
|
|
7
|
+
Record one explicit intent:
|
|
8
|
+
|
|
9
|
+
| Intent | Meaning | Write policy |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `0.1.2-only` | The next plugin release may drop 0.1.1 | Follow the catalog migration after preview and authorization |
|
|
12
|
+
| `dual-version` | The same release must support both 0.1.1 and 0.1.2 | Design the compatibility mechanism and two-version verification matrix before editing |
|
|
13
|
+
| `pending developer decision` | The developer has not chosen | Read-only analysis only; stop before apply, edits, installs, build, or runtime execution |
|
|
14
|
+
|
|
15
|
+
Do not treat general write authorization as permission to drop an older runtime. If the request does not settle the choice, ask the developer directly.
|
|
16
|
+
|
|
17
|
+
## Assess whether one release can support both
|
|
18
|
+
|
|
19
|
+
For `dual-version`, inventory each migration finding and determine whether the old and new owners coexist:
|
|
20
|
+
|
|
21
|
+
- static imports of packages that exist in only one DSH version;
|
|
22
|
+
- changed Service names, snapshot shapes, lifecycle, or event behavior;
|
|
23
|
+
- client graph `inject`, `external`, platform modules, and client exports;
|
|
24
|
+
- peer, optional peer, development, and bundled dependency ranges;
|
|
25
|
+
- patch targets and profile entries that differ between Harness versions;
|
|
26
|
+
- generated output that may capture version-specific imports.
|
|
27
|
+
|
|
28
|
+
Choose a repository-appropriate same-release mechanism based on evidence, such as a shared compatibility adapter with runtime feature detection or conditional version-specific entry points/builds inside the same package. Do not invent dynamic loading when the bundler or Harness activation model cannot support it. Do not publish a peer range that claims both versions until installation and runtime evidence supports that range.
|
|
29
|
+
|
|
30
|
+
The safe codemod is intentionally target-oriented. In dual-version mode, preview its changes only after the decision is recorded and review each proposed import and dependency edit against 0.1.1 before applying it. Semantic migrations always require the same cross-version review.
|
|
31
|
+
|
|
32
|
+
If the same release cannot load because required packages or static graph declarations are mutually exclusive, report the exact conflict. Ask the developer whether to change scope to separate plugin releases or accept a 0.1.2-only release. Neither alternative satisfies the original same-release `dual-version` intent.
|
|
33
|
+
|
|
34
|
+
## Verify a two-version matrix
|
|
35
|
+
|
|
36
|
+
Use exact Harness versions or checkouts and keep evidence separate:
|
|
37
|
+
|
|
38
|
+
| Gate | DSH 0.1.1 | DSH 0.1.2 |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| dependency installation and peer resolution | required | required |
|
|
41
|
+
| typecheck/build/test and packed artifact inspection | required | required |
|
|
42
|
+
| isolated profile install and activation smoke | required | required |
|
|
43
|
+
| plugin-specific UI, Service lifecycle, commands, settings, and cleanup | required where applicable | required where applicable |
|
|
44
|
+
|
|
45
|
+
The current migration catalog and `migrate verify` target 0.1.2. They do not independently certify the legacy row. Verify 0.1.1 with the plugin repository's supported scripts and an isolated profile using the actual 0.1.1 Harness CLI. Preserve failure workspaces and report the exact commands, versions, artifacts, logs, or screenshots for each row.
|
|
46
|
+
|
|
47
|
+
Use precise conclusions:
|
|
48
|
+
|
|
49
|
+
- `0.1.2 runtime-verified; 0.1.1 not tested` is not dual-compatible.
|
|
50
|
+
- Passing builds on both versions is not runtime or behavior proof.
|
|
51
|
+
- Claim `dual-version` compatibility only after all required matrix rows pass for the same release artifact or for the explicitly documented version-specific artifact strategy.
|