dsh-lean-router 1.0.2 → 1.0.3
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 +2 -2
- package/README.md +2 -2
- package/cordis.patch.yml +0 -3
- package/docs/changelog.en.md +7 -1
- package/docs/changelog.md +7 -1
- package/docs/quickstart.en.md +1 -1
- package/docs/quickstart.md +1 -1
- package/package.json +1 -1
- package/presets/base/frag-preset.patch.yml +0 -3
- package/scripts/integrate-preset.mjs +6 -8
- package/test/integration-preset.test.mjs +3 -2
- package/test/patch-yaml.test.mjs +2 -3
package/README.en.md
CHANGED
|
@@ -6,7 +6,7 @@ A DeepSeek Harness (DSH) cordis plugin tuned for DeepSeek V4.1 Flash: **one plug
|
|
|
6
6
|
|
|
7
7
|
> This package documents bilingually with the **"Chinese default + English `.en.md` files"** scheme: Chinese is the first language (README.md and docs/*.md), English lives in same-directory `.en.md` files (this file ↔ [README.md](./README.md)). All three upstream projects follow the same "Chinese README + README.en.md" convention.
|
|
8
8
|
|
|
9
|
-
> Status: **v1.0.
|
|
9
|
+
> Status: **v1.0.3 published** (npm: [dsh-lean-router](https://www.npmjs.com/package/dsh-lean-router) · GitHub Release [v1.0.2](https://github.com/ShawnSun-debug/dsh-lean-router/releases/tag/v1.0.3) · CI green; real-machine DSH profile install smoke record: [docs/release-checklist.md](docs/release-checklist.md)).
|
|
10
10
|
|
|
11
11
|
## Layers at a glance
|
|
12
12
|
|
|
@@ -29,7 +29,7 @@ Not published yet; start with a local link (both paths in [docs/quickstart.en.md
|
|
|
29
29
|
|
|
30
30
|
~~~powershell
|
|
31
31
|
dsh plugin --profile desktop add "link:D:\path\to\dsh-lean-router"
|
|
32
|
-
# once published: dsh plugin --profile desktop add npm:dsh-lean-router@1.0.
|
|
32
|
+
# once published: dsh plugin --profile desktop add npm:dsh-lean-router@1.0.3
|
|
33
33
|
~~~
|
|
34
34
|
|
|
35
35
|
The package depends on `@deepseek-ai/dsh-tool-executor-native`; if missing, the masking layer fails loudly — the executor stub throws an error with install guidance on the first `describe` (lib/toolface/executor.js L57-63). Follow it with `npm install` or re-add via `dsh plugin add`.
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> 本包双语文档采用 **「中文默认 + 英文 `.en.md` 独立文件」** 方案:中文是第一语言(README.md 与 docs/*.md),英文版同目录 `.en.md`(本文件 ↔ [README.en.md](./README.en.md))。三个上游项目也遵循「中文 README + README.en.md」惯例。
|
|
8
8
|
|
|
9
|
-
> 状态:**v1.0.
|
|
9
|
+
> 状态:**v1.0.3 已发布**(npm:[dsh-lean-router](https://www.npmjs.com/package/dsh-lean-router) · GitHub Release [v1.0.2](https://github.com/ShawnSun-debug/dsh-lean-router/releases/tag/v1.0.3) · CI 绿;真机安装冒烟记录见 [docs/release-checklist.md](docs/release-checklist.md))。
|
|
10
10
|
|
|
11
11
|
## 功能一图
|
|
12
12
|
|
|
@@ -29,7 +29,7 @@ engines:`>=0.2.1-rc.5 <0.2.3-0`(实测基线 0.2.2-rc.5)。DSH 处于 deve
|
|
|
29
29
|
|
|
30
30
|
~~~powershell
|
|
31
31
|
dsh plugin --profile desktop add "link:D:\path\to\dsh-lean-router"
|
|
32
|
-
# 发布后:dsh plugin --profile desktop add npm:dsh-lean-router@1.0.
|
|
32
|
+
# 发布后:dsh plugin --profile desktop add npm:dsh-lean-router@1.0.3
|
|
33
33
|
~~~
|
|
34
34
|
|
|
35
35
|
依赖 `@deepseek-ai/dsh-tool-executor-native`;缺失时工具遮蔽层不静默——executor stub 首次 `describe` 抛出含安装指引的错误(lib/toolface/executor.js L57-63),按提示 `npm install` 或用 `dsh plugin add` 重装即可。
|
package/cordis.patch.yml
CHANGED
|
@@ -818,9 +818,6 @@
|
|
|
818
818
|
|
|
819
819
|
# ============ 新增行:preset-lean-router-balance(balance 档 3 条;上游双预设形态,flash-lean-ptc-v3-balance 同构)============
|
|
820
820
|
|
|
821
|
-
- id: ptc-runtime
|
|
822
|
-
name: '@deepseek-ai/dsh-ptc-runtime-node'
|
|
823
|
-
|
|
824
821
|
- id: toolface
|
|
825
822
|
name: 'dsh-lean-router/toolface'
|
|
826
823
|
config:
|
package/docs/changelog.en.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
> English version of [changelog.md](./changelog.md). Versions follow package.json (currently 1.0.
|
|
3
|
+
> English version of [changelog.md](./changelog.md). Versions follow package.json (currently 1.0.3).
|
|
4
|
+
|
|
5
|
+
## 1.0.3 (2026-11-22)
|
|
6
|
+
|
|
7
|
+
- Fix (fatal on a real host): the preset's plugins list wrongly carried the **host-level service plugin** `ptc-runtime` (`@deepseek-ai/dsh-ptc-runtime-node`). A preset activates in its own scope, so mounting that service twice fails → `agentPresets.register` throws → the whole `preset-lean-router` is never registered (observed: only balance was listed). The host already mounts the row in `dsh-base/cordis.patch.yml` L407-408, and `code_run`'s `ctx.get('ptcRuntime')` resolves upward, so the preset must not declare it.
|
|
8
|
+
- Change: the `frag-preset` union drops from 22 to 21 rows (overrides 20 + toolface); `cordis.patch.yml` rebuilt.
|
|
9
|
+
- Add: `integration-preset` and `patch-yaml` now assert `ptc-runtime` never appears inside a preset.
|
|
4
10
|
|
|
5
11
|
## 1.0.2 (2026-11-22)
|
|
6
12
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# 变更记录(changelog)
|
|
2
2
|
|
|
3
|
-
> 中文为主,英文版:[changelog.en.md](./changelog.en.md)。版本号遵循 package.json(当前 1.0.
|
|
3
|
+
> 中文为主,英文版:[changelog.en.md](./changelog.en.md)。版本号遵循 package.json(当前 1.0.3)。
|
|
4
|
+
|
|
5
|
+
## 1.0.3 (2026-11-22)
|
|
6
|
+
|
|
7
|
+
- 修复(真机致命):preset 的 plugins 列表里误挂了**宿主层服务插件** `ptc-runtime`(`@deepseek-ai/dsh-ptc-runtime-node`)。dsh 的 preset 在独立 scope 里激活,重复挂载该服务会失败 → `agentPresets.register` 抛错 → 整条 `preset-lean-router` 不注册(真机现象:预设列表只剩 balance)。该行本就由宿主 `dsh-base/cordis.patch.yml` L407-408 挂载,`code_run` 依赖的 `ctx.get('ptcRuntime')` 会向宿主层查找,preset 内无需重复声明。
|
|
8
|
+
- 变更:`frag-preset` 并集行 22 → 21(覆写块 20 + toolface),`cordis.patch.yml` 同步重建。
|
|
9
|
+
- 新增回归:`integration-preset` 与 `patch-yaml` 两处断言 preset 内不得出现 `ptc-runtime`。
|
|
4
10
|
|
|
5
11
|
## 1.0.2 (2026-11-22)
|
|
6
12
|
|
package/docs/quickstart.en.md
CHANGED
|
@@ -20,7 +20,7 @@ After restarting DSH, pick the **Lean router** preset (lean tier) or **Lean rout
|
|
|
20
20
|
### Path B: npm install (once published)
|
|
21
21
|
|
|
22
22
|
~~~powershell
|
|
23
|
-
dsh plugin --profile desktop add npm:dsh-lean-router@1.0.
|
|
23
|
+
dsh plugin --profile desktop add npm:dsh-lean-router@1.0.3
|
|
24
24
|
~~~
|
|
25
25
|
|
|
26
26
|
(Both paths match the output of scripts/install.mjs; the real installer, claim boundaries and `--uninstall` rollback belong to ticket 09.)
|
package/docs/quickstart.md
CHANGED
|
@@ -20,7 +20,7 @@ dsh plugin --profile desktop add "link:D:\path\to\dsh-lean-router"
|
|
|
20
20
|
### 路径 B:npm 安装(发布后可用)
|
|
21
21
|
|
|
22
22
|
~~~powershell
|
|
23
|
-
dsh plugin --profile desktop add npm:dsh-lean-router@1.0.
|
|
23
|
+
dsh plugin --profile desktop add npm:dsh-lean-router@1.0.3
|
|
24
24
|
~~~
|
|
25
25
|
|
|
26
26
|
(两条路径与 scripts/install.mjs 输出的说明一致;真安装器、认领边界与 `--uninstall` 回滚归票 09。)
|
package/package.json
CHANGED
|
@@ -233,9 +233,6 @@
|
|
|
233
233
|
|
|
234
234
|
# ============ 新增行:preset-lean-router-balance(balance 档 3 条;上游双预设形态,flash-lean-ptc-v3-balance 同构)============
|
|
235
235
|
|
|
236
|
-
- id: ptc-runtime
|
|
237
|
-
name: '@deepseek-ai/dsh-ptc-runtime-node'
|
|
238
|
-
|
|
239
236
|
- id: toolface
|
|
240
237
|
name: 'dsh-lean-router/toolface'
|
|
241
238
|
config:
|
|
@@ -67,14 +67,12 @@ for (let i = sufIdx + 1; i < pr.length; i++) {
|
|
|
67
67
|
}
|
|
68
68
|
const newPersona = pr.slice(0, sufIdx + 1).concat(composed.split('\n').map(l => (l.length ? contentIndent + l : '')));
|
|
69
69
|
|
|
70
|
-
// 5) 并集 = 覆写块全部行(persona 换 composed)+
|
|
71
|
-
// ptc-runtime
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
];
|
|
77
|
-
const unionRows = ovRows.map(r => (r.id === 'persona' ? { id: 'persona', text: newPersona } : r)).concat(extraRows).concat([toolfaceRow]);
|
|
70
|
+
// 5) 并集 = 覆写块全部行(persona 换 composed)+ toolface 行收尾
|
|
71
|
+
// 不挂 ptc-runtime(1.0.3 实测修正):官方已在宿主层 dsh-base/cordis.patch.yml L407-408 挂过
|
|
72
|
+
// 这个服务插件;preset 是独立 scope,再挂一次会激活失败,导致整条 preset 不注册
|
|
73
|
+
// (现象:lean-router 从预设列表整体消失,只剩 balance)。code_run 的 transport 依赖的
|
|
74
|
+
// ctx.get('ptcRuntime') 会向宿主层查找,preset 内无需重复声明。
|
|
75
|
+
const unionRows = ovRows.map(r => (r.id === 'persona' ? { id: 'persona', text: newPersona } : r)).concat([toolfaceRow]);
|
|
78
76
|
const ids = unionRows.map(r => r.id);
|
|
79
77
|
if (new Set(ids).size !== ids.length) throw new Error('并集行 id 重复: ' + ids.join(','));
|
|
80
78
|
if (ids[ids.length - 1] !== 'toolface') throw new Error('toolface 行必须收尾');
|
|
@@ -28,10 +28,11 @@ function suffixBlock(text) {
|
|
|
28
28
|
|
|
29
29
|
test('frag-preset 是 preset 行唯一生效 owner:21 行并集、无重复、toolface 收尾', () => {
|
|
30
30
|
const ids = frag.split(/\r?\n/).filter(l => /^ - id: /.test(l)).map(l => /^ - id: (.+)$/.exec(l)[1].trim());
|
|
31
|
-
assert.equal(ids.length,
|
|
31
|
+
assert.equal(ids.length, 21, '并集行数 = 覆写块 20 + toolface(ptc-runtime 属宿主层,不进 preset)');
|
|
32
32
|
assert.equal(new Set(ids).size, ids.length, '无重复 id');
|
|
33
33
|
assert.equal(ids[ids.length - 1], 'toolface', 'toolface 最后(遮蔽面与 preset 同行生效)');
|
|
34
|
-
|
|
34
|
+
assert.ok(!ids.includes('ptc-runtime'), 'ptc-runtime 由宿主 dsh-base 挂载,放进 preset 会让整条 preset 激活失败(1.0.3 事故回归)');
|
|
35
|
+
for (const id of ['persona', 'agent-instructions', 'skill-filesystem', 'skill-lean-router', 'planning', 'compaction', 'delegation', 'tool-todo', 'tool-web', 'present', 'toolface']) {
|
|
35
36
|
assert.ok(ids.includes(id), '缺行: ' + id);
|
|
36
37
|
}
|
|
37
38
|
assert.ok(!ids.includes('preset-lean-router-balance'), 'balance 是独立行,不在并集行 id 内');
|
package/test/patch-yaml.test.mjs
CHANGED
|
@@ -35,12 +35,11 @@ test("全部 presets/base 补丁片段可解析", () => {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
test("ptc-runtime
|
|
38
|
+
test("ptc-runtime 是宿主层插件,不得出现在 preset 内(1.0.3 事故回归)", () => {
|
|
39
39
|
const doc = parseFile(join(root, "presets", "base", "frag-preset.patch.yml"));
|
|
40
40
|
assert.ok(Array.isArray(doc), "frag 是裸行数组");
|
|
41
41
|
const preset = doc.find((p) => p.id === "preset-lean-router");
|
|
42
42
|
assert.ok(preset, "preset 行存在");
|
|
43
43
|
const row = preset.config.plugins.find((p) => p.id === "ptc-runtime");
|
|
44
|
-
assert.
|
|
45
|
-
assert.equal(row.name, "@deepseek-ai/dsh-ptc-runtime-node");
|
|
44
|
+
assert.equal(row, undefined, "ptc-runtime 由宿主 dsh-base/cordis.patch.yml 挂载;放进 preset 会让整条 preset 激活失败、从预设列表消失");
|
|
46
45
|
});
|