dsh-composition-doctor 0.2.0 → 0.2.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/CHANGELOG.md +11 -0
- package/LICENSE +21 -21
- package/README.md +2 -1
- package/README.zh.md +2 -1
- package/cordis.patch.yml +3 -3
- package/dist/cli/main.js +20 -2
- package/dist/core/snapshot.js +11 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
- Fixed the packaged `dsh-doctor` CLI entrypoint when pnpm's Windows shim supplies a non-canonical path.
|
|
6
|
+
- Added a built-entrypoint regression test covering `--version` and `--help`.
|
|
7
|
+
|
|
8
|
+
## 0.2.1
|
|
9
|
+
|
|
10
|
+
- Fixed clean-checkout CI coverage by tracking the report schema and committed fixture packages that were previously hidden by broad ignore rules.
|
|
11
|
+
- Fixed cross-platform Snapshot v2 path normalization for Windows-style paths on Linux CI.
|
|
12
|
+
- Added the dsh-plugin.org listing badge to the bilingual README files.
|
|
13
|
+
|
|
3
14
|
## 0.2.0
|
|
4
15
|
|
|
5
16
|
- Release the verified 0.2.0 package without changing the established diagnostic architecture or evidence boundaries.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 DSH Composition Doctor contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DSH Composition Doctor contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/dsh-composition-doctor)
|
|
4
4
|
[](https://github.com/lemonxiny55/dsh-composition-doctor/actions/workflows/ci.yml)
|
|
5
|
+
[](https://dsh-plugin.org/plugins/lemonxiny55/dsh-composition-doctor)
|
|
5
6
|
|
|
6
7
|
English | [中文](README.zh.md)
|
|
7
8
|
|
|
8
9
|
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.
|
|
9
10
|
|
|
10
|
-
Current package release: `0.2.
|
|
11
|
+
Current package release: `0.2.2`.
|
|
11
12
|
|
|
12
13
|
## What the model gets
|
|
13
14
|
|
package/README.zh.md
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/dsh-composition-doctor)
|
|
4
4
|
[](https://github.com/lemonxiny55/dsh-composition-doctor/actions/workflows/ci.yml)
|
|
5
|
+
[](https://dsh-plugin.org/plugins/lemonxiny55/dsh-composition-doctor)
|
|
5
6
|
|
|
6
7
|
[English](README.md) | 中文
|
|
7
8
|
|
|
8
9
|
面向 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(`dsh`)的组合与升级预检工具。它读取明确指定的 profile,用可追溯证据说明可观察到的 Cordis/plugin 组合风险;不会编辑真实 profile,也不会静默扩大权限。
|
|
9
10
|
|
|
10
|
-
当前 package release:`0.2.
|
|
11
|
+
当前 package release:`0.2.2`。
|
|
11
12
|
|
|
12
13
|
## 模型可用能力
|
|
13
14
|
|
package/cordis.patch.yml
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
- insert:
|
|
2
|
-
- id: dsh-composition-doctor
|
|
3
|
-
name: dsh-composition-doctor
|
|
1
|
+
- insert:
|
|
2
|
+
- id: dsh-composition-doctor
|
|
3
|
+
name: dsh-composition-doctor
|
package/dist/cli/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { readFileSync, realpathSync } from 'node:fs';
|
|
3
3
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
4
4
|
import { dirname, resolve } from 'node:path';
|
|
5
5
|
import { resolveComposition } from '../core/composition-adapter.js';
|
|
@@ -174,7 +174,25 @@ export async function runCli(argv, io = { write: (line) => console.log(line) })
|
|
|
174
174
|
return 1;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
function canonicalPath(value) {
|
|
178
|
+
try {
|
|
179
|
+
return realpathSync(value);
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
return resolve(value);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
function isMainModule() {
|
|
186
|
+
const entrypoint = process.argv[1];
|
|
187
|
+
if (entrypoint === undefined)
|
|
188
|
+
return false;
|
|
189
|
+
const modulePath = canonicalPath(fileURLToPath(import.meta.url));
|
|
190
|
+
const entrypointPath = canonicalPath(entrypoint);
|
|
191
|
+
return process.platform === 'win32'
|
|
192
|
+
? modulePath.toLowerCase() === entrypointPath.toLowerCase()
|
|
193
|
+
: modulePath === entrypointPath;
|
|
194
|
+
}
|
|
195
|
+
if (isMainModule()) {
|
|
178
196
|
runCli(process.argv.slice(2)).then((exitCode) => {
|
|
179
197
|
process.exitCode = exitCode;
|
|
180
198
|
});
|
package/dist/core/snapshot.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { basename, isAbsolute
|
|
1
|
+
import { basename, isAbsolute } from 'node:path';
|
|
2
2
|
import { analyseComposition } from './rules.js';
|
|
3
3
|
import { resolveComposition } from './composition-adapter.js';
|
|
4
4
|
function isRecord(value) { return value !== null && typeof value === 'object' && !Array.isArray(value); }
|
|
5
|
+
function slashPath(value) { return value.replaceAll('\\', '/'); }
|
|
6
|
+
function isWindowsAbsolute(value) { return /^[A-Za-z]:\//.test(value); }
|
|
5
7
|
function normalizedSource(source, profileDir) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const normalized = slashPath(source);
|
|
9
|
+
const root = slashPath(profileDir).replace(/\/+$/, '');
|
|
10
|
+
if (!isAbsolute(source) && !isWindowsAbsolute(normalized))
|
|
11
|
+
return normalized;
|
|
12
|
+
if (normalized === root)
|
|
13
|
+
return '<PROFILE>';
|
|
14
|
+
const prefix = `${root}/`;
|
|
15
|
+
return normalized.startsWith(prefix) ? `<PROFILE>/${normalized.slice(prefix.length)}` : `<EXTERNAL>/${basename(normalized)}`;
|
|
10
16
|
}
|
|
11
17
|
function sortJson(values) { return [...values].sort((left, right) => JSON.stringify(left).localeCompare(JSON.stringify(right))); }
|
|
12
18
|
function packageSnapshot(fact) {
|