dsh-composition-doctor 0.1.0 → 0.1.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.md +28 -41
- package/README.zh.md +28 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,63 +1,50 @@
|
|
|
1
1
|
# dsh-composition-doctor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-composition-doctor)
|
|
4
|
+
[](https://github.com/lemonxiny55/dsh-composition-doctor/actions)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
English | [中文](README.zh.md)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Composition and upgrade preflight doctor for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`). It reads an explicitly selected profile and explains observable Cordis/plugin composition risks with concrete evidence. It never edits a real profile or silently changes permissions.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
- `snapshot`:生成脱敏、可比较的 profile 快照和 lockfile 哈希。
|
|
11
|
-
- `diff`:比较两个快照,识别插件升降级、rows、hooks、UI、peer/platform 变化。
|
|
12
|
-
- `preflight`:在 OS 临时目录中进行离线解析和最小 smoke test;没有 `--allow-build` 时只输出构建计划。
|
|
13
|
-
- DSH Settings 页面:只读显示最近报告、冲突关系和本地导出按钮。
|
|
10
|
+
## What the model gets
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
| Command | Purpose |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `dsh-doctor scan` | Detect duplicate Cordis rows, hook-order risks, UI slot/route ownership conflicts, bundle overrides, peer/platform mismatches, and profile drift. |
|
|
15
|
+
| `dsh-doctor snapshot` | Create a redacted, comparable profile snapshot with lockfile hashes. |
|
|
16
|
+
| `dsh-doctor diff` | Summarize added/removed/upgraded plugins, rows, hooks, UI claims, peers, and platforms. |
|
|
17
|
+
| `dsh-doctor preflight` | Rehearse a target DSH upgrade in an isolated temporary profile. |
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
pnpm install
|
|
19
|
-
pnpm build
|
|
20
|
-
dsh plugin --profile <profile> add C:\path\to\dsh-composition-doctor
|
|
21
|
-
dsh plugin --profile <profile> remove dsh-composition-doctor
|
|
22
|
-
```
|
|
19
|
+
The Web Settings page is display/export only: it reads the latest local report, shows a conflict graph, and exports JSON/Markdown. It has no repair, install, or uninstall action.
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### 使用
|
|
21
|
+
## Install
|
|
27
22
|
|
|
28
23
|
```powershell
|
|
29
|
-
dsh-doctor
|
|
30
|
-
dsh
|
|
31
|
-
dsh-doctor diff --before .\reports\before.json --after .\reports\after.json --format both
|
|
32
|
-
dsh-doctor preflight --profile .\test\fixtures\preflight-real-profile --target-dsh 0.1.0-rc.6 --candidate example-plugin@2.0.0
|
|
24
|
+
npm install -g dsh-composition-doctor
|
|
25
|
+
npx @deepseek-ai/dsh plugin --profile web add dsh-composition-doctor
|
|
33
26
|
```
|
|
34
27
|
|
|
35
|
-
|
|
28
|
+
Restart the Web UI (`npx @deepseek-ai/dsh web`) after changing a profile. The CLI can also run from a checkout with `node dist/cli/main.js`.
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
## Example
|
|
38
31
|
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
```powershell
|
|
33
|
+
dsh-doctor scan --profile C:\path\to\profile --format both --output .\reports\profile
|
|
34
|
+
dsh-doctor snapshot --profile C:\path\to\profile --output .\reports\before.json
|
|
35
|
+
dsh-doctor diff --before .\reports\before.json --after .\reports\after.json --format both
|
|
36
|
+
dsh-doctor preflight --profile C:\path\to\profile --target-dsh 0.1.0-rc.6
|
|
44
37
|
```
|
|
45
38
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### 权限与隐私边界
|
|
49
|
-
|
|
50
|
-
默认只读,只读取显式 profile 根目录的 `cordis.yml`、`cordis.patch.yml`、`package.json` 和 lockfile 元数据,并拒绝符号链接。不会读取 `.env`、密钥、token、环境变量值、会话正文或工作区文件内容,不联网,不安装/卸载/迁移,不切换权限模式。快照递归脱敏敏感字段并只保留结构摘要与 SHA-256。工具不提供“安全评分”,也不声称插件本身安全。
|
|
51
|
-
|
|
52
|
-
### 支持范围与限制
|
|
39
|
+
Each finding is `info`, `warning`, or `error` and includes evidence, explanation, and the smallest remediation. Missing runtime evidence is reported as a warning, never as a confirmed failure.
|
|
53
40
|
|
|
54
|
-
|
|
41
|
+
## Safety and privacy
|
|
55
42
|
|
|
56
|
-
|
|
43
|
+
Default operations are read-only or isolated under the OS temporary directory. The plugin does not modify profiles, install/remove plugins, migrate configuration, escalate permissions, or perform network I/O by default. It never reads `.env`, keys, tokens, environment values, session bodies, or workspace file contents.
|
|
57
44
|
|
|
58
|
-
|
|
45
|
+
## Support and limitations
|
|
59
46
|
|
|
60
|
-
|
|
47
|
+
Verified preview range: DSH `>=0.1.0-rc.5 <0.2.0`, Cordis `>=4 <5`, Node.js `>=20`; Windows is first-class and macOS/Linux are supported. DSH has not yet exposed a stable resolved-composition introspection API, so static findings are explicitly labelled when no public provider is available.
|
|
61
48
|
|
|
62
49
|
## Development
|
|
63
50
|
|
|
@@ -67,4 +54,4 @@ pnpm typecheck
|
|
|
67
54
|
pnpm build
|
|
68
55
|
```
|
|
69
56
|
|
|
70
|
-
|
|
57
|
+
See [`README.zh.md`](README.zh.md), [`docs/compatibility.md`](docs/compatibility.md), and [`docs/examples/scan-report.md`](docs/examples/scan-report.md). MIT licensed.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# dsh-composition-doctor(中文)
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
面向 DeepSeek Harness(DSH)的本地只读组合与升级预检插件。它读取明确指定的 profile,分析 Cordis/plugin 组合风险,生成脱敏快照,比较升级差异,并在独立临时目录中演练升级。
|
|
6
|
+
|
|
7
|
+
## 功能
|
|
8
|
+
|
|
9
|
+
| 命令 | 作用 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `dsh-doctor scan` | 检测重复 row、hook 顺序风险、UI slot/route 冲突、bundle 覆盖、peer/platform 不匹配和 profile 漂移。 |
|
|
12
|
+
| `dsh-doctor snapshot` | 生成脱敏、可比较的 profile 快照和 lockfile 哈希。 |
|
|
13
|
+
| `dsh-doctor diff` | 比较插件、rows、hooks、UI、peer 和平台变化。 |
|
|
14
|
+
| `dsh-doctor preflight` | 在独立临时目录预演目标 DSH 升级。 |
|
|
15
|
+
|
|
16
|
+
Web Settings 只读显示最近报告、冲突图并导出 JSON/Markdown,不提供修复、安装或卸载操作。
|
|
17
|
+
|
|
18
|
+
## 安装与使用
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
npm install -g dsh-composition-doctor
|
|
22
|
+
npx @deepseek-ai/dsh plugin --profile web add dsh-composition-doctor
|
|
23
|
+
dsh-doctor scan --profile C:\path\to\profile --format both --output .\reports\profile
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
默认操作只读或写入操作系统临时目录,不修改真实 profile,不扩大权限,不默认联网,不读取 `.env`、密钥、token、环境变量值、会话正文或工作区文件内容。证据不足时只报告 warning。
|
|
27
|
+
|
|
28
|
+
已验证范围:DSH `>=0.1.0-rc.5 <0.2.0`、Cordis `>=4 <5`、Node.js `>=20`;Windows 优先,同时支持 macOS/Linux。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-composition-doctor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Read-only DSH and Cordis composition diagnostics, snapshots, diffs, and isolated preflight.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"dist",
|
|
15
15
|
"cordis.patch.yml",
|
|
16
16
|
"README.md",
|
|
17
|
+
"README.zh.md",
|
|
17
18
|
"LICENSE"
|
|
18
19
|
],
|
|
19
20
|
"dsh": {
|