@bruc3van/dsh-doctor 0.5.1 → 0.5.2
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
|
@@ -96,7 +96,7 @@ Install it directly from the GitHub repository into a supported coding agent:
|
|
|
96
96
|
npx skills add bruc3van/dsh-doctor
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
The repository currently exposes one skill, so the `skills` CLI discovers and installs `dsh-plugin-upgrade`; add `--skill dsh-plugin-upgrade` to select it explicitly. This installs the agent skill, not a global DSH Doctor CLI. The skill
|
|
99
|
+
The repository currently exposes one skill, so the `skills` CLI discovers and installs `dsh-plugin-upgrade`; add `--skill dsh-plugin-upgrade` to select it explicitly. This installs the agent skill, not a global DSH Doctor CLI. The skill checks the local CLI version and target catalog, performs a read-only registry update check with `npm view`, and pins one exact npx version for all three phases when the local CLI is missing, outdated, or lacks the catalog. A global install or update always requires explicit user authorization.
|
|
100
100
|
|
|
101
101
|
---
|
|
102
102
|
|
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ dsh-doctor migrate verify /path/to/plugin --level runtime --yes \
|
|
|
96
96
|
npx skills add bruc3van/dsh-doctor
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
仓库当前只提供一个 skill,`skills` CLI 会发现并安装 `dsh-plugin-upgrade`;需要显式选择时可加 `--skill dsh-plugin-upgrade`。该命令只安装 Agent skill,不会全局安装 DSH Doctor CLI
|
|
99
|
+
仓库当前只提供一个 skill,`skills` CLI 会发现并安装 `dsh-plugin-upgrade`;需要显式选择时可加 `--skill dsh-plugin-upgrade`。该命令只安装 Agent skill,不会全局安装 DSH Doctor CLI。Skill 会检查本地 CLI 版本和目标 catalog,通过只读 `npm view` 检查 registry 更新;本地 CLI 缺失、过期或缺少 catalog 时,默认固定一个精确版本并通过 `npx` 完成三阶段。全局安装或更新始终需要用户明确授权。
|
|
100
100
|
|
|
101
101
|
---
|
|
102
102
|
|
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ Determine:
|
|
|
15
15
|
- the plugin repository root;
|
|
16
16
|
- the DSH Harness checkout when available;
|
|
17
17
|
- whether the developer authorizes writes and project command execution;
|
|
18
|
+
- whether the developer authorizes a global CLI install or update;
|
|
18
19
|
- the plugin's package manager and build scripts.
|
|
19
20
|
|
|
20
21
|
Use these fixed refs unless the user explicitly requests a supported alternative:
|
|
@@ -22,9 +23,11 @@ Use these fixed refs unless the user explicitly requests a supported alternative
|
|
|
22
23
|
- source: `dsh-v0.1.1-rc.2`
|
|
23
24
|
- target: `dsh-v0.1.2-alpha.2`
|
|
24
25
|
|
|
25
|
-
Read [migration-map.md](references/migration-map.md) before making semantic changes
|
|
26
|
+
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.
|
|
26
27
|
|
|
27
|
-
Before touching the plugin,
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
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.
|
|
28
31
|
|
|
29
32
|
## Phase 1: analyze
|
|
30
33
|
|
|
@@ -96,3 +99,4 @@ State the highest achieved gate exactly:
|
|
|
96
99
|
- behavior verified separately with named evidence
|
|
97
100
|
|
|
98
101
|
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.
|
|
102
|
+
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.
|
|
@@ -31,6 +31,18 @@
|
|
|
31
31
|
"Uses a temporary DSH_HOME and reports retained failure state",
|
|
32
32
|
"Keeps business behavior verification separate from activation smoke"
|
|
33
33
|
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": 4,
|
|
37
|
+
"prompt": "帮我升级这个插件,但机器上的 dsh-doctor 是旧版,而且我没有授权修改全局 npm 包。请先检查有没有新版本,再继续迁移。",
|
|
38
|
+
"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.",
|
|
39
|
+
"expectations": [
|
|
40
|
+
"Checks the local CLI version and exact migration catalog before use",
|
|
41
|
+
"Uses npm view as a read-only registry update check",
|
|
42
|
+
"Pins one resolved npx package version for all migration phases",
|
|
43
|
+
"Does not install or update a global CLI without explicit authorization",
|
|
44
|
+
"Reports local, registry, selected CLI, catalog, and update-status evidence"
|
|
45
|
+
]
|
|
34
46
|
}
|
|
35
47
|
]
|
|
36
48
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# DSH Doctor CLI bootstrap
|
|
2
|
+
|
|
3
|
+
Choose the CLI once before analysis so every migration phase uses the same implementation and catalog.
|
|
4
|
+
|
|
5
|
+
## 1. Inspect the environment
|
|
6
|
+
|
|
7
|
+
Confirm Node.js satisfies the package engine (`^22.19.0` or `>=24.0.0`). When `dsh-doctor` is available, run:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
dsh-doctor --version
|
|
11
|
+
dsh-doctor migrations list --json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Record the local version and whether the exact `dsh-v0.1.1-rc.2` to `dsh-v0.1.2-alpha.2` catalog is present. A command that exists but lacks this catalog is not usable for this skill.
|
|
15
|
+
|
|
16
|
+
## 2. Check the registry without changing the machine
|
|
17
|
+
|
|
18
|
+
Query the official registry:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm view @bruc3van/dsh-doctor version --registry=https://registry.npmjs.org
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This is a read-only update check. If it fails because the registry is unavailable, report update status as `unknown`; do not describe the local CLI as current. An offline local CLI may still be used when it exposes the exact required catalog.
|
|
25
|
+
|
|
26
|
+
## 3. Select and pin one invocation
|
|
27
|
+
|
|
28
|
+
- When the local version equals the registry version and exposes the catalog, use `dsh-doctor` directly.
|
|
29
|
+
- When the local CLI is missing, differs from the registry version, or lacks the catalog, prefer the registry version through exact-version npx. First verify that version exposes the required catalog:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx --yes --package=@bruc3van/dsh-doctor@<registry-version> dsh-doctor migrations list --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- When the registry is unavailable, use the local CLI only if its catalog check passed.
|
|
36
|
+
- When neither candidate exposes the catalog, stop and report the missing prerequisite instead of guessing a compatible CLI.
|
|
37
|
+
- Respect an explicit developer request to use a particular local or development CLI, but still record its version and verify the catalog.
|
|
38
|
+
|
|
39
|
+
After selecting a version, replace `<registry-version>` with the resolved exact version in every npx command. Do not use `@latest` separately in analyze, apply, and verify because the resolved package could change during the migration.
|
|
40
|
+
|
|
41
|
+
## 4. Keep global installation separately authorized
|
|
42
|
+
|
|
43
|
+
The skill installation does not authorize system-wide npm changes. Only after the developer explicitly approves a global install or update may the agent run:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npm install --global @bruc3van/dsh-doctor@<selected-version>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Afterwards, re-run `dsh-doctor --version` and `dsh-doctor migrations list --json`. If either result differs from the selected version or required catalog, stop rather than falling back silently.
|
|
50
|
+
|
|
51
|
+
## 5. Preserve evidence
|
|
52
|
+
|
|
53
|
+
Include these fields in the handoff:
|
|
54
|
+
|
|
55
|
+
- local CLI version or `missing`;
|
|
56
|
+
- registry version or `unknown`;
|
|
57
|
+
- selected exact version and invocation source (`local`, `npx`, or authorized `global-install`);
|
|
58
|
+
- required catalog present or absent;
|
|
59
|
+
- update status: `current`, `outdated`, `missing`, or `unknown`.
|