dsh-subagent-profile 0.3.1 → 0.3.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.md CHANGED
@@ -4,9 +4,8 @@
4
4
  <div align="center">
5
5
  <b style="font-size: 1.15em;">Subagent dispatch, profiled — the right agent for the right task (preset / model / reasoning effort)</b><br /><br />
6
6
  <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
7
- <img alt="Version: v0.3.1" src="https://img.shields.io/badge/Version-v0.3.1-blue.svg" />
8
7
  <img alt="npm" src="https://img.shields.io/npm/v/dsh-subagent-profile.svg" />
9
- <img alt="DSH" src="https://img.shields.io/badge/DSH-0.1.0--rc.6%20~%200.1.1--rc.2-blue.svg" />
8
+ <img alt="DSH" src="https://img.shields.io/badge/DSH-0.1.0--rc.6%20~%200.2.0-blue.svg" />
10
9
  </div>
11
10
 
12
11
  <div align="center">English · <a href="README.zh.md">中文</a></div>
@@ -15,7 +14,7 @@ For [DeepSeek Harness](https://github.com/deepseek-ai/dsh) (DSH).
15
14
 
16
15
  > *Thinking, Fast and Slow*: System 1 is fast and cheap, System 2 is slow and careful. The built-in `subagent` gives every subtask the same brain as its parent — no way to tell them apart. `dsh-subagent-profile` lets you pick per subtask: research with a fast brain, deep work with a careful one, saved as named **profiles**.
17
16
 
18
- ## Why the built-in `subagent` isn't enough
17
+ ## Why this plugin
19
18
 
20
19
  | | Built-in `subagent` | `dsh-subagent-profile` |
21
20
  |---|---|---|
@@ -25,13 +24,11 @@ For [DeepSeek Harness](https://github.com/deepseek-ai/dsh) (DSH).
25
24
  | Cost guardrails | ❌ | ✅ model / effort / tokens / depth capped |
26
25
  | GUI management | ❌ | ✅ settings page |
27
26
 
28
- ## What it solves
29
-
30
27
  - **Per-subtask control over the child's brain.** `dispatch` sets, per subtask: which preset (composition), which model, which reasoning effort, which tools, and the token cap. A research subtask and a coding subtask can run with completely different setups — something the plain `subagent` tool can't do (it only inherits the parent).
31
28
  - **Named, reusable profiles.** A profile is one bundle of preset + model + reasoning effort + tool scope + persona. Save "research" as `researcher` (reasoning off, search-only tools) and dispatch with `dispatch(profile="researcher")`; two built-ins ship (`swap-standard` = full standard coding toolkit, `researcher`), and you can add/edit/remove your own in the settings page.
32
29
  - **Fully observable.** Every result reports the effective profile / preset / model / reasoning effort; logs are tagged `[dsh-subagent-profile]`.
33
30
 
34
- ## Quick start
31
+ ## Installation
35
32
 
36
33
  ```bash
37
34
  dsh plugin --profile web add dsh-subagent-profile # published package
@@ -44,7 +41,14 @@ Restart `dsh web`. This is a standard **bundle plugin**: it provides the `dispat
44
41
 
45
42
  ### 1. Configure sub-agent profiles
46
43
 
47
- Profiles are managed in the settings page — each one bundles preset + model + reasoning effort + tool scope (and optionally a persona), and can be enabled, disabled, edited, or reset individually.
44
+ Profiles are managed in the settings page — each one bundles preset + model + reasoning effort + tool scope (and optionally a persona), and can be enabled, disabled, edited, or reset individually. Two built-ins ship:
45
+
46
+ | Profile | Purpose |
47
+ |---|---|
48
+ | `swap-standard` | switch the child to the full standard coding toolkit |
49
+ | `researcher` | deep reasoning off, search-only tools |
50
+
51
+ Profiles live in `~/.dsh/subagent-profiles.json` and take effect immediately (edits are made from the settings page).
48
52
 
49
53
  ![Built-in profile list — editable, deletable, individually toggleable](docs/screenshots/settings-page1.png)
50
54
 
@@ -62,15 +66,6 @@ dispatch(
62
66
 
63
67
  ![dispatch tool-call card — every result shows what actually ran](docs/screenshots/dispatch-card.png)
64
68
 
65
- ## Profiles
66
-
67
- Profiles live in `~/.dsh/subagent-profiles.json` and take effect immediately (edits are made from the settings page).
68
-
69
- | Profile | Purpose |
70
- |---|---|
71
- | `swap-standard` | switch the child to the full standard coding toolkit |
72
- | `researcher` | deep reasoning off, search-only tools |
73
-
74
69
  ## Safety model
75
70
 
76
71
  Delegation never lets a subagent gain more power than you already have — this is the default, with no configuration:
@@ -83,13 +78,14 @@ Delegation never lets a subagent gain more power than you already have — this
83
78
 
84
79
  - `~/.dsh/subagent-profiles.json` — the profile registry (edited from the settings page).
85
80
  - `~/.dsh/subagent-profiles.state.json` — the plugin's enable/disable switch (default enabled).
81
+ - `~/.dsh/subagent-profiles.failed-traces.json` — the failure ledger (dispatch failure traces).
86
82
  - `~/.dsh/.agent-presets/orchestrator/` — the self-installed `orchestrator` agent preset (synced from the bundled `presets/orchestrator/` on every startup).
87
83
 
88
- `DSH_HOME` is respected and defaults to `~/.dsh`.
84
+ `DSH_HOME` is respected and defaults to `~/.dsh`. Uninstalling the plugin removes the three data files above and the self-installed `orchestrator` preset directory (other plugins' presets are left untouched); re-installing or re-launching re-syncs the preset and regenerates the data files.
89
85
 
90
86
  ## Known limitations
91
87
 
92
- - **Background** one-shot dispatch requires `@deepseek-ai/dsh-jobs` and `@deepseek-ai/dsh-tool-jobs` to be loaded; otherwise it fails with "background jobs unavailable".
88
+ - **Background** one-shot dispatch requires `@deepseek-ai/dsh-jobs` and `@deepseek-ai/dsh-tool-jobs` to be loaded; otherwise it fails with "dispatch: 后台派发不可用:缺少 jobs 服务".
93
89
  - **Continuable** mode goes through the DSH standard composition path, so the `preset` swap and `reasoningEffort` are ignored (the child inherits the parent preset at the default reasoning effort).
94
90
  - **Continuable** tool gate is a plugin-side mitigation: the child's `allow` is pre-computed as a closed set — parent tool set − `run_code` − `deny`, then intersected with `allow`. **Assumption:** continuable inherits the parent preset, so the child's tool set ≈ the parent's. **Failure condition:** any host behavior change that makes the child's tool set differ from the parent's (not only preset swap — e.g. a future preset swap, composing a different tool set) means the parent set can contain tools the child does not have, so `tools.restrict` throws "unknown tool" and this mitigation automatically degrades to fail-loud (conservatively safe); it must then be replaced with a true parent ∩ child intersection once the upstream provides a provider guard seam.
95
91
 
@@ -103,22 +99,40 @@ dsh-subagent-profile/
103
99
  │ └── core/ # host-side modules (lightweight layering)
104
100
  │ ├── pure.mjs # dependency-free pure functions (sanitize / prune / guard math — unit-tested)
105
101
  │ ├── shims.mjs # the single @deepseek-ai import facade (guards fail loud, helpers degrade softly)
106
- └── *.mjs # catalog / whitelist / intersection / cost-guard / delegation / profiles-store /
107
- # presets-sync / http-routes / profile-provider / dispatch-tool
102
+ ├── catalog.mjs # tool-name zh / category tables (zero-dep)
103
+ ├── catalog-cache.mjs # process-shared catalog snapshot (models / presets / tools, TTL cache)
104
+ │ ├── cost-guard.mjs # runtime capability checks (provider / model / reasoning effort)
105
+ │ ├── decision-trace.mjs # decision trace (gates / effective / settled) + failure ledger
106
+ │ ├── delegation.mjs # background one-shot settling + child usage collection
107
+ │ ├── dispatch-gates.mjs # pre-dispatch gates (whitelist / cost / intersection / budget)
108
+ │ ├── dispatch-guard.mjs # concurrency + per-parent token budget guard
109
+ │ ├── dispatch-schema.mjs # dispatch tool input/output schema declarations
110
+ │ ├── dispatch-tool.mjs # dispatch tool factory (defineTool + execute + syncTool)
111
+ │ ├── escape.mjs # escape-hatch allow store
112
+ │ ├── evolution-ledger.mjs # dispatch ledger (jsonl) + governance audit
113
+ │ ├── evolution-summary.mjs # T1 aggregate summaries + advice text
114
+ │ ├── http-routes.mjs # settings loopback HTTP routes
115
+ │ ├── intersection.mjs # tool-intersection pure core
116
+ │ ├── presets-sync.mjs # bundled preset self-install (hash-gated sync)
117
+ │ ├── profile-provider.mjs # the `profile` subagent provider
118
+ │ ├── profiles-store.mjs # profile registry store + switch persistence
119
+ │ └── whitelist.mjs # system-trust preset whitelist
108
120
  ├── presets/orchestrator/ # bundled "orchestrator" agent preset (self-installed, synced on every startup)
109
121
  ├── cordis.patch.yml # bundle patch: inserts the plugin row into the host composition
110
122
  ├── .gitea/workflows/ci.yml # bare-CI (Gitea Actions; needs an Act runner on the server)
111
123
  ├── package.json # metadata, files whitelist, exports (test / test:bare / preflight scripts)
112
124
  ├── scripts/
113
- │ ├── release.mjs # release helper (version bump / tag checks)
114
- │ └── preflight.mjs # preflight: preset-tree reconciliation + README badge == version (zero-dep)
125
+ │ ├── preflight.mjs # preflight: preset-tree reconciliation + no hardcoded version badge (zero-dep)
126
+ │ └── leak-scan.mjs # public-release gate: scans all history + worktree for sensitive patterns
115
127
  ├── docs/
116
128
  │ └── screenshots/ # README screenshots
117
- ├── test/ # host-side tests (node:test, zero extra deps; 101 cases = 26 bare + 75 junction)
129
+ ├── test/ # host-side tests (node:test, zero extra deps; 352 cases bare subset in CI, junction local)
118
130
  │ ├── README.md / README.zh.md # test directory guide (EN/ZH) — two-tier split explained
119
131
  │ ├── harness/ctx.mjs # fake Cordis ctx + ~/.dsh isolation
120
132
  │ ├── pure / input-schema / catalog-integrity.test.mjs # bare tier (import-free, runs in bare CI)
121
- │ └── characterization / facade / gating / persist / recycle / cost-guard / continuable-guard.test.mjs # junction tier (local only)
133
+ │ └── *.test.mjs # junction tier (local only): characterization / facade / gating / persist / recycle /
134
+ │ # cost-guard / continuable-guard / decision-trace / dispatch-guard / escape-hatch /
135
+ │ # evolution-* / csrf / label-preset-sync / percall-spec / trust-label / audit-meta / …
122
136
  ├── README.md / README.zh.md # this document (EN/ZH)
123
137
  └── LICENSE
124
138
  ```
@@ -127,11 +141,6 @@ dsh-subagent-profile/
127
141
 
128
142
  Found a bug or have an idea? [Open an issue](https://github.com/muzyLink/dsh-subagent-profile/issues) or submit a pull request — all contributions are welcome.
129
143
 
130
- ### CI (bare) & preflight
131
-
132
- - **Gitea Actions** (`.gitea/workflows/ci.yml`): on `push` / `pull_request` to `v2-midterm` / `main`, runs the **bare-CI** subset — the tests that never load `@deepseek-ai` (`npm run test:bare`: pure / input-schema / catalog-integrity), `node --check` syntax checks, eslint (installed in isolation, since the bare environment cannot install the `@deepseek-ai` devDependencies), and `npm run preflight`. **Enabling Gitea Actions requires installing an Act runner on the server** (register it with the `ubuntu-latest` label); the workflow takes effect automatically once the runner is ready. Junction-dependent tests (characterization / facade / gating / persist / recycle / cost-guard / continuable-guard) run locally only — see `test/README.md` for the two-tier split and its rationale.
133
- - **Preflight** (`npm run preflight`): zero-dependency self-check — ① reconciles the bundled `presets/` tree against a fresh `$DSH_HOME/.agent-presets` derived tree (byte-identical set, both directions; never touches the real `~/.dsh`), ② asserts the README version badge (`v<version>` in the hero) matches `package.json` `version`. Non-zero exit means drift — fix and re-run before release.
134
-
135
144
  If this plugin has been useful to you, please give it a ⭐ on GitHub — it helps others find it.
136
145
 
137
146
  ## Credits
package/README.zh.md CHANGED
@@ -4,9 +4,8 @@
4
4
  <div align="center">
5
5
  <b style="font-size: 1.15em;">子 Agent 派发方案化插件 —— 用对的人(预设 / 模型 / 推理强度)干对的事</b><br /><br />
6
6
  <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
7
- <img alt="Version: v0.3.1" src="https://img.shields.io/badge/Version-v0.3.1-blue.svg" />
8
7
  <img alt="npm" src="https://img.shields.io/npm/v/dsh-subagent-profile.svg" />
9
- <img alt="DSH" src="https://img.shields.io/badge/DSH-0.1.0--rc.6%20~%200.1.1--rc.2-blue.svg" />
8
+ <img alt="DSH" src="https://img.shields.io/badge/DSH-0.1.0--rc.6%20~%200.2.0-blue.svg" />
10
9
  </div>
11
10
 
12
11
  <div align="center"><a href="README.md">English</a> · 中文</div>
@@ -15,7 +14,7 @@
15
14
 
16
15
  > 《思考,快与慢》:系统 1 快而省,系统 2 慢而稳。内置的 `subagent` 给所有子任务同一个「大脑」,分不出快慢;`dsh-subagent-profile` 让你按任务指定——调研用快思考,攻坚用慢思考,常用搭配存成命名**方案**。
17
16
 
18
- ## 为什么内置 `subagent` 不够用
17
+ ## 为什么选这个插件
19
18
 
20
19
  | | 内置 `subagent` | `dsh-subagent-profile` |
21
20
  |---|---|---|
@@ -25,13 +24,11 @@
25
24
  | 成本护栏 | ❌ | ✅ 模型/推理强度/token/深度上限 |
26
25
  | GUI 管理 | ❌ | ✅ 设置页 |
27
26
 
28
- ## 解决什么问题
29
-
30
27
  - **按子任务指定子 Agent 的「大脑」。** `dispatch` 给每个子任务单独指定:用哪个预设(composition)、哪个模型、哪种推理强度、只开哪些工具、给多少 token 上限。查资料和写代码两个子任务可以用完全不同的配置——这是内置 `subagent` 做不到的(它只能让子任务继承父 Agent 的同一套配置)。
31
28
  - **把常用搭配存成命名方案,按名调用。** 「方案」= 预设 + 模型 + 推理强度 + 工具范围 + 人设的一揽子配置。把「调研」存成 `researcher`(关深度推理、只留检索工具),以后 `dispatch(profile="researcher")` 即可;内置 `swap-standard`(切到 standard 全套编码工具)和 `researcher` 两个现成方案,也能在设置页自己增删改。
32
29
  - **每次派发都看得见实际用了什么。** 结果里标注实际生效的方案/预设/模型/推理强度,日志带 `[dsh-subagent-profile]` 标记,方便排查。
33
30
 
34
- ## 快速开始
31
+ ## 安装
35
32
 
36
33
  ```bash
37
34
  dsh plugin --profile web add dsh-subagent-profile # 发布包
@@ -44,7 +41,14 @@ dsh plugin --profile web add ./dsh-subagent-profile # 本地检出
44
41
 
45
42
  ### 1. 配置子 Agent 方案
46
43
 
47
- 在设置页管理命名方案——每个方案打包预设 + 模型 + 推理强度 + 工具范围(可选人设),可单独启用、禁用、编辑或批量重置。
44
+ 在设置页管理命名方案——每个方案打包预设 + 模型 + 推理强度 + 工具范围(可选人设),可单独启用、禁用、编辑或批量重置。内置两个现成方案:
45
+
46
+ | 方案 | 用途 |
47
+ |---|---|
48
+ | `swap-standard` | 子 Agent 切换为 standard 全套编码工具 |
49
+ | `researcher` | 关深度推理、只留检索工具 |
50
+
51
+ 方案保存在 `~/.dsh/subagent-profiles.json`,改完立即生效(在设置页编辑)。
48
52
 
49
53
  ![内置方案列表:可编辑、删除、单独启用/禁用](docs/screenshots/settings-page1.png)
50
54
 
@@ -62,15 +66,6 @@ dispatch(
62
66
 
63
67
  ![dispatch 工具调用卡片:每次派发都显示实际生效的配置](docs/screenshots/dispatch-card.png)
64
68
 
65
- ## 方案(Profiles)
66
-
67
- 方案保存在 `~/.dsh/subagent-profiles.json`,改完立即生效(在设置页编辑)。
68
-
69
- | 方案 | 用途 |
70
- |---|---|
71
- | `swap-standard` | 子 Agent 切换为 standard 全套编码工具 |
72
- | `researcher` | 关深度推理、只留检索工具 |
73
-
74
69
  ## 安全模型
75
70
 
76
71
  委派绝不会让子 Agent 拿到比你更多的权限,默认生效、无需配置:
@@ -83,13 +78,14 @@ dispatch(
83
78
 
84
79
  - `~/.dsh/subagent-profiles.json` —— 方案注册表(由设置页编辑)。
85
80
  - `~/.dsh/subagent-profiles.state.json` —— 插件的启用/禁用开关(默认启用)。
81
+ - `~/.dsh/subagent-profiles.failed-traces.json` —— 失败台账(派发失败轨迹)。
86
82
  - `~/.dsh/.agent-presets/orchestrator/` —— 自动安装的 `orchestrator` 编排者预设(每次启动由打包的 `presets/orchestrator/` 同步)。
87
83
 
88
- 尊重 `DSH_HOME`,默认 `~/.dsh`。
84
+ 尊重 `DSH_HOME`,默认 `~/.dsh`。卸载插件会删除上述三个数据文件与自动安装的 `orchestrator` 预设目录(其它插件的预设不受影响);重新安装或重新启动会重新同步预设并重新生成数据文件。
89
85
 
90
86
  ## 已知限制
91
87
 
92
- - **后台**一次性派发需要加载 `@deepseek-ai/dsh-jobs` 与 `@deepseek-ai/dsh-tool-jobs`,否则报「background jobs unavailable」。
88
+ - **后台**一次性派发需要加载 `@deepseek-ai/dsh-jobs` 与 `@deepseek-ai/dsh-tool-jobs`,否则报「后台派发不可用:缺少 jobs 服务」。
93
89
  - **可续跑**模式走 DSH 标准组合路径,因此 `preset` 换用与 `reasoningEffort` 会被忽略(继承父预设、使用默认推理强度)。
94
90
  - **可续跑**工具门为插件侧缓解:子 Agent 的 `allow` 预加工为闭集 —— 父工具集 − `run_code` − `deny`,再与 `allow` 取交集。**假设:** 可续跑继承父预设 ⇒ 子工具集 ≈ 父工具集。**失效条件:** 任何导致子工具集与父工具集不一致的宿主行为变化(非仅换用预设——例如未来允许换用预设、组合不同工具集等),父集都可能含子集没有的工具,`tools.restrict` 会抛「未知工具」→ 本缓解自动降级为 fail-loud(保守安全);待上游提供 provider 守卫接缝后替换为真交集。
95
91
 
@@ -103,22 +99,40 @@ dsh-subagent-profile/
103
99
  │ └── core/ # 宿主侧模块(轻量分层)
104
100
  │ ├── pure.mjs # 无依赖纯函数(净化 / 剪枝 / 护栏计算——可单测)
105
101
  │ ├── shims.mjs # @deepseek-ai 依赖唯一入口(facade:守卫型 fail-loud、功能映射型软降级)
106
- └── *.mjs # catalog / whitelist / intersection / cost-guard / delegation / profiles-store /
107
- # presets-sync / http-routes / profile-provider / dispatch-tool
102
+ ├── catalog.mjs # 工具名 中文/分类数据表(零依赖)
103
+ ├── catalog-cache.mjs # 进程级共享 catalog 快照(模型/预设/工具,TTL 缓存)
104
+ │ ├── cost-guard.mjs # 运行时能力校验(provider / model / reasoningEffort)
105
+ │ ├── decision-trace.mjs # 决策轨迹(gates/effective/settled)+ 失败台账
106
+ │ ├── delegation.mjs # 后台 one-shot 结算 + 子会话 usage 收集
107
+ │ ├── dispatch-gates.mjs # 派发预检闸(白名单/成本/交集/预算)
108
+ │ ├── dispatch-guard.mjs # 并发 + 每父累计 token 预算守卫
109
+ │ ├── dispatch-schema.mjs # dispatch 工具输入/输出 schema 声明
110
+ │ ├── dispatch-tool.mjs # dispatch 工具工厂(defineTool + execute + syncTool)
111
+ │ ├── escape.mjs # 逃生舱放行集 store
112
+ │ ├── evolution-ledger.mjs # 派发台账(jsonl)+ 治理审计
113
+ │ ├── evolution-summary.mjs # T1 聚合 summaries + 建议文案
114
+ │ ├── http-routes.mjs # 设置页 loopback HTTP 路由
115
+ │ ├── intersection.mjs # 工具交集纯函数核心
116
+ │ ├── presets-sync.mjs # bundled 预设自安装(哈希门控同步)
117
+ │ ├── profile-provider.mjs # `profile` 子 Agent provider
118
+ │ ├── profiles-store.mjs # profile 注册表 store + 开关持久化
119
+ │ └── whitelist.mjs # system-trust 预设白名单
108
120
  ├── presets/orchestrator/ # 内置「编排者模式」agent 预设(自安装,每次启动同步)
109
121
  ├── cordis.patch.yml # bundle 补丁:把插件行插入宿主组成
110
122
  ├── .gitea/workflows/ci.yml # bare-CI(Gitea Actions;需服务器装 Act runner)
111
123
  ├── package.json # 元数据、files 发布白名单、exports(test / test:bare / preflight scripts)
112
124
  ├── scripts/
113
- │ ├── release.mjs # 发布脚本(版本 bump / tag 校验)
114
- │ └── preflight.mjs # preflight:preset 树对账 + README 徽章 == version(零依赖)
125
+ │ ├── preflight.mjs # preflight:preset 树对账 + 无硬编码版本徽章(零依赖)
126
+ │ └── leak-scan.mjs # 公开发布门禁:全历史 + 工作区敏感模式扫描
115
127
  ├── docs/
116
128
  │ └── screenshots/ # README 截图
117
- ├── test/ # 宿主侧自动化测试(node:test,零新增依赖;101 用例 = 26 bare + 75 junction
129
+ ├── test/ # 宿主侧自动化测试(node:test,零新增依赖;352 用例——bare 子集 CI 跑、junction 档本机跑)
118
130
  │ ├── README.md / README.zh.md # 测试目录说明(中英双语)——两档测试划分
119
131
  │ ├── harness/ctx.mjs # 假宿主环境(fake ctx + ~/.dsh 隔离)
120
132
  │ ├── pure / input-schema / catalog-integrity.test.mjs # bare 档(import-free,bare CI 可跑)
121
- │ └── characterization / facade / gating / persist / recycle / cost-guard / continuable-guard.test.mjs # junction 档(仅本机)
133
+ │ └── *.test.mjs # junction 档(仅本机):characterization / facade / gating / persist / recycle /
134
+ │ # cost-guard / continuable-guard / decision-trace / dispatch-guard / escape-hatch /
135
+ │ # evolution-* / csrf / label-preset-sync / percall-spec / trust-label / audit-meta / …
122
136
  ├── README.md / README.zh.md # 本文档(中英双语)
123
137
  └── LICENSE
124
138
  ```
@@ -127,11 +141,6 @@ dsh-subagent-profile/
127
141
 
128
142
  发现 Bug 或有新想法?欢迎[提 Issue](https://github.com/muzyLink/dsh-subagent-profile/issues)或提交 Pull Request,任何形式的贡献都欢迎。
129
143
 
130
- ### CI(bare)与 preflight
131
-
132
- - **Gitea Actions**(`.gitea/workflows/ci.yml`):`push` / `pull_request` 到 `v2-midterm` / `main` 时运行 **bare-CI** 子集——从不加载 `@deepseek-ai` 的测试(`npm run test:bare`:pure / input-schema / catalog-integrity)、`node --check` 全仓库语法检查、eslint 行门(eslint 在仓库外隔离安装,因裸环境装不到 `@deepseek-ai` devDependencies)、以及 `npm run preflight`。**启用 Gitea Actions 需服务器装 Act runner**(注册时带上 `ubuntu-latest` 标签),runner 就绪后本工作流自动生效。依赖 junction 的测试(characterization / facade / gating / persist / recycle / cost-guard / continuable-guard)仅本机跑——两档测试的划分与理由见 `test/README.zh.md`。
133
- - **Preflight**(`npm run preflight`):零依赖自检——① `presets/` 与全新 `$DSH_HOME/.agent-presets` 派生树做 byte 一致集合对账(双向;绝不写真实 `~/.dsh`);② 断言 README 版本徽章(Hero 区 `v<version>`)与 `package.json` 的 `version` 一致。非零退出即漂移,发布前修复后重跑。
134
-
135
144
  如果这个插件帮到了你,欢迎在 GitHub 上点个 ⭐,让更多人看到它。
136
145
 
137
146
  ## 致谢