dsh-paoding 0.4.4 → 0.4.5

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.
@@ -58,6 +58,7 @@ dsh-paoding(中文品牌「庖丁」,取庖丁解牛之意)是 DSH(DeepS
58
58
  │ │ │ │
59
59
  ▼ ▼ ▼ ▼
60
60
  web_search read/read_image read/read_image glob/grep/read/
61
+ web_fetch
61
62
  mcp__tavily__* glob/grep/bash/ write/edit/ read_image/bash/
62
63
  (5 个) skill/ glob/grep/bash/ ask_user_question/
63
64
  glob/grep/read web_search skill/web_search todo_write/
@@ -78,7 +79,7 @@ dsh-paoding(中文品牌「庖丁」,取庖丁解牛之意)是 DSH(DeepS
78
79
  |---|---|---|---|
79
80
  | 单体(现状,未裁剪) | 60 工具全量 | **~16.2k** | 每请求固定注入 |
80
81
  | 编排主 agent | 21 项白名单(∩ 注册面) | **~5.5k** | ↓66%;内部搜索零委派延迟 |
81
- | search_external 子 agent | 10 项 allow | ~3.0k | 仅实际联网调研时才产生 |
82
+ | search_external 子 agent | 11 项 allow | ~3.0k | 仅实际联网调研时才产生 |
82
83
  | design 子 agent | 12 项 allow | ~3.3k | 仅实际委派设计时才产生 |
83
84
  | implement 子 agent | 17 项 allow | ~3.8k | 仅实际委派实现时才产生 |
84
85
  | search_internal_deep 子 agent | 10 项 allow | 未单独估算 | 仅实际委派全仓深搜时才产生 |
@@ -123,7 +124,7 @@ dsh-paoding(中文品牌「庖丁」,取庖丁解牛之意)是 DSH(DeepS
123
124
  **host 工具不在白名单常量内硬编码**:`mcp__*` 与插件工具(codegraph / memory_search / mnemon_* 等)
124
125
  是"检测期事实"——主 agent 需要时经配置文件 `$DSH_HOME/dsh-paoding.config.yml` 的 `main_agent_extra`
125
126
  勾选,生成层按运行时检测把仍启用的注入 restrict 的 `config.allow`,停用即自动清除(详见
126
- [docs/configuration.md](configuration.md))。因此主 agent 的默认面**不包含** `web_search`、全部
127
+ [docs/configuration.md](configuration.md))。因此主 agent 的默认面**不包含** `web_search` / `web_fetch`、全部
127
128
  `mcp__tavily__*`、`write` / `edit` / `str_replace_editor`、`skill`、`workflow`、`ralph` 及未过滤的
128
129
  `subagent` / `subagent_fork`——这些要么属于角色子 agent,要么成本被刻意清零。
129
130
 
@@ -142,7 +143,7 @@ dsh-paoding(中文品牌「庖丁」,取庖丁解牛之意)是 DSH(DeepS
142
143
 
143
144
  | 委派工具 | 实例 ID | persona 一句话职责 | 加载成本 |
144
145
  |---|---|---|---|
145
- | `search_external` | `delegation-search-external` | 只做联网调研(web_search + tavily),绝不改文件;返回结构化研究摘要(发现、来源、待答问题) | ~3.0k,仅委派时 |
146
+ | `search_external` | `delegation-search-external` | 只做联网调研(web_search + web_fetch + tavily),绝不改文件;返回结构化研究摘要(发现、来源、待答问题) | ~3.0k,仅委派时 |
146
147
  | `design` | `delegation-design` | 产出 UI/UX 设计、线框与前端 spec,可用 skill 工具加载设计技能(frontend-design、html-ppt);先读参考再交付 spec,不写最终代码 | ~3.3k,仅委派时 |
147
148
  | `implement` | `delegation-implement` | 写与改代码:先读上下文 → 精准修改 → 验证(build/test/grep);不改架构 | ~3.8k,仅委派时 |
148
149
  | `search_internal_deep` | `delegation-search-internal-deep` | 只做仓库探索:不改文件、不联网;处理主 agent 上下文装不下的任务(全仓 grep dump、超页大文件通读、跨目录符号/定义追踪),只回浓缩摘要 | 未单独估算,仅委派时 |
@@ -157,12 +158,12 @@ dsh-paoding(中文品牌「庖丁」,取庖丁解牛之意)是 DSH(DeepS
157
158
  **不做**库存对账:手写进去、两头都不占的名字不会被剔除,会静默落盘、运行时以 unknown tools 拒创建
158
159
  (与下方该角色的 codegraph 注同一口径),见 [docs/configuration.md](configuration.md))。
159
160
 
160
- **`search_external`(外部调研,10 项)**
161
+ **`search_external`(外部调研,11 项)**
161
162
 
162
163
  | 字段 | 值 |
163
164
  |---|---|
164
165
  | persona 职责 | 只做联网调研并返回结构化研究摘要(发现、来源、待答问题);绝不修改文件 |
165
- | toolFilter.allow | `web_search`、`mcp__tavily__tavily_search`、`mcp__tavily__tavily_crawl`、`mcp__tavily__tavily_extract`、`mcp__tavily__tavily_map`、`mcp__tavily__tavily_research`、`glob`、`grep`、`read`、`ask_user_question` |
166
+ | toolFilter.allow | `web_search`、`web_fetch`、`mcp__tavily__tavily_search`、`mcp__tavily__tavily_crawl`、`mcp__tavily__tavily_extract`、`mcp__tavily__tavily_map`、`mcp__tavily__tavily_research`、`glob`、`grep`、`read`、`ask_user_question` |
166
167
  | 加载成本 | ~3.0k tokens,仅实际联网调研时发生 |
167
168
 
168
169
  **`design`(设计,12 项)**
@@ -70,6 +70,7 @@ allow lists are in the "Roles & tool surfaces" section below):
70
70
  │ │ │ │
71
71
  ▼ ▼ ▼ ▼
72
72
  web_search read/read_image read/read_image glob/grep/read
73
+ web_fetch
73
74
  mcp__tavily__* glob/grep/bash write/edit read_image/bash
74
75
  (5 tools) skill/web_search glob/grep/bash ask_user_question
75
76
  glob/grep/read ask_user_question skill/web_search todo_write
@@ -90,8 +91,8 @@ In the diagram:
90
91
  ask_user_question / get_goal / create_goal / update_goal / exit_plan_mode / job_output / job_list /
91
92
  job_kill);
92
93
  - Four arrows fan out to the **role sub-agents**, each created on demand (cold path). search_external
93
- carries web_search, the five `mcp__tavily__*` tools, plus glob/grep/read and ask_user_question, with no
94
- write/edit; design carries read/read_image/glob/grep/bash/skill/web_search plus coordination tools;
94
+ carries web_search, web_fetch, the five `mcp__tavily__*` tools, plus glob/grep/read and ask_user_question,
95
+ with no write/edit; design carries read/read_image/glob/grep/bash/skill/web_search plus coordination tools;
95
96
  implement carries read/read_image/write/edit/glob/grep/bash/skill/web_search plus coordination and
96
97
  goal tools;
97
98
  search_internal_deep carries the full read-only internal-search surface (glob/grep/read/read_image/bash
@@ -107,7 +108,7 @@ measured calibration; figures are order-of-magnitude estimates):
107
108
  |---|---|---|---|
108
109
  | Monolithic (status quo, untrimmed) | All 60 tools | **~16.2k** | Paid in full on every request |
109
110
  | Orchestrator main agent | 21-entry whitelist (∩ registry) | **~5.5k** | ↓66%; zero delegation latency for internal search |
110
- | search_external sub-agent | 10 allowed entries | ~3.0k | Paid only when web research actually runs |
111
+ | search_external sub-agent | 11 allowed entries | ~3.0k | Paid only when web research actually runs |
111
112
  | design sub-agent | 12 allowed entries | ~3.3k | Paid only when a design task is delegated |
112
113
  | implement sub-agent | 17 allowed entries | ~3.8k | Paid only when an implementation task is delegated |
113
114
  | search_internal_deep sub-agent | 10 allowed entries | not separately estimated | Paid only when a deep repo search is delegated |
@@ -160,7 +161,7 @@ memory_search / mnemon_* etc.) are "install-time facts" — when the main agent
160
161
  `main_agent_extra` in the configuration file `$DSH_HOME/dsh-paoding.config.yml`, the generator injects the
161
162
  still-enabled ones into the restrict `config.allow` based on runtime detection, and disabled ones are
162
163
  dropped automatically (see [docs/configuration_en.md](configuration_en.md)). The main agent's default surface
163
- therefore excludes `web_search`, every `mcp__tavily__*`, `write` / `edit` / `str_replace_editor`, `skill`,
164
+ therefore excludes `web_search` / `web_fetch`, every `mcp__tavily__*`, `write` / `edit` / `str_replace_editor`, `skill`,
164
165
  `workflow`, `ralph`, and the unfiltered `subagent` / `subagent_fork` — either because they belong to role
165
166
  sub-agents or because their cost is deliberately zeroed out.
166
167
 
@@ -184,7 +185,7 @@ For example, a `ppt` agent carrying the `html-ppt` skill gives slide-making its
184
185
 
185
186
  | Delegation tool | Instance ID | Persona in one sentence | Load cost |
186
187
  |---|---|---|---|
187
- | `search_external` | `delegation-search-external` | Web research only (web_search + tavily), never modifies files; returns a structured research summary (findings, sources, open questions) | ~3.0k, only when delegated |
188
+ | `search_external` | `delegation-search-external` | Web research only (web_search + web_fetch + tavily), never modifies files; returns a structured research summary (findings, sources, open questions) | ~3.0k, only when delegated |
188
189
  | `design` | `delegation-design` | Produces UI/UX designs, wireframes and frontend specs; may load design skills (frontend-design, html-ppt) via the skill tool; reads reference material first, delivers a spec, does not implement final code | ~3.3k, only when delegated |
189
190
  | `implement` | `delegation-implement` | Writes and edits code: read surrounding context → surgical change → verify (build/test/grep); does not redesign architecture | ~3.8k, only when delegated |
190
191
  | `search_internal_deep` | `delegation-search-internal-deep` | Repository exploration only: never modifies files, never uses the network; handles tasks too heavy for the main agent's context (whole-repo grep dumps, full-file reads beyond a page, cross-directory symbol/definition tracking); returns condensed summaries only | not separately estimated, only when delegated |
@@ -213,12 +214,12 @@ on disk silently, and fail at runtime with unknown tools at child creation — s
213
214
  note for that role below; see
214
215
  [docs/configuration_en.md](configuration_en.md)).
215
216
 
216
- **`search_external` (external research, 10 entries)**
217
+ **`search_external` (external research, 11 entries)**
217
218
 
218
219
  | Field | Value |
219
220
  |---|---|
220
221
  | Persona job | Web research only, returning a structured research summary (findings, sources, open questions); never modifies files |
221
- | toolFilter.allow | `web_search`, `mcp__tavily__tavily_search`, `mcp__tavily__tavily_crawl`, `mcp__tavily__tavily_extract`, `mcp__tavily__tavily_map`, `mcp__tavily__tavily_research`, `glob`, `grep`, `read`, `ask_user_question` |
222
+ | toolFilter.allow | `web_search`, `web_fetch`, `mcp__tavily__tavily_search`, `mcp__tavily__tavily_crawl`, `mcp__tavily__tavily_extract`, `mcp__tavily__tavily_map`, `mcp__tavily__tavily_research`, `glob`, `grep`, `read`, `ask_user_question` |
222
223
  | Load cost | ~3.0k tokens, incurred only when web research actually runs |
223
224
 
224
225
  **`design` (design, 12 entries)**
@@ -73,6 +73,7 @@ roles: # toolName -> { persona?, tools[] }
73
73
  You are the external-research agent. Web research only — never modify files.
74
74
  tools:
75
75
  - web_search
76
+ - web_fetch
76
77
  - mcp__tavily__tavily_search
77
78
  - mcp__tavily__tavily_crawl
78
79
  - mcp__tavily__tavily_extract
@@ -138,11 +139,14 @@ skills: # skill -> 分配给的角色(写进角色 persona 的
138
139
  search_external:
139
140
  tools:
140
141
  - web_search
142
+ - web_fetch
141
143
  - mcp__tavily__tavily_* # 生成时展开为 search/crawl/extract/map/research(以实际检测为准)
142
144
  ```
143
145
 
144
146
  `main_agent_extra` 与自定义角色的 `tools` 同样支持。配置文件里模式条目原样存取(配置面板回显不受影响),只有生成的 preset 里落的是展开后的具体名。
145
147
 
148
+ > 宿主 0.2.1-rc.2 起可在 **设置 → 网页搜索** 开启 DeepSeek Search / Fetch API:`web_search` / `web_fetch` 的名字不变,后方 provider 自动切换到官方新后端——无需改动庖丁配置,角色 allow 里的这两个名字照常生效。
149
+
146
150
  示例(替换 `implement` 的 persona 与 tools):下方 tools 与静态默认一致——注意它不含 `str_replace_editor`(原因见 8.2)。显式写出 tools 等于固定意图:将来静态源怎么改都不再影响本角色:
147
151
 
148
152
  ```yaml
@@ -350,7 +354,7 @@ fork 的语义(如实说明):
350
354
  | 内部搜索(热路径) | `glob` `grep` `read` `read_image` `bash` |
351
355
  | 协调 | `todo_write` `ask_user_question` `get_goal` `create_goal` `update_goal` `exit_plan_mode` `job_output` `job_list` `job_kill` |
352
356
 
353
- 对照说明:`web_search`、全部 `mcp__tavily__*`、`write` / `edit` / `str_replace_editor`、`skill`、`workflow`、`ralph`、未过滤的 `subagent` 委派等**刻意不在**主 agent 面上(host 工具如 codegraph / `memory_search` / mnemon 同理不硬编码进源码,需要时用 `main_agent_extra` 勾选,见 3.2)。另外 `restrict.mjs` 在注册层对主 agent deny 了 `skill`(目录注入守卫查的是注册面而非模型可见面),主 agent 的技能目录注入随之归零。
357
+ 对照说明:`web_search` / `web_fetch`、全部 `mcp__tavily__*`、`write` / `edit` / `str_replace_editor`、`skill`、`workflow`、`ralph`、未过滤的 `subagent` 委派等**刻意不在**主 agent 面上(host 工具如 codegraph / `memory_search` / mnemon 同理不硬编码进源码,需要时用 `main_agent_extra` 勾选,见 3.2)。另外 `restrict.mjs` 在注册层对主 agent deny 了 `skill`(目录注入守卫查的是注册面而非模型可见面),主 agent 的技能目录注入随之归零。
354
358
 
355
359
  ### 3.2 追加工具:main_agent_extra
356
360
 
@@ -73,6 +73,7 @@ roles: # toolName -> { persona?, tools[] }
73
73
  You are the external-research agent. Web research only — never modify files.
74
74
  tools:
75
75
  - web_search
76
+ - web_fetch
76
77
  - mcp__tavily__tavily_search
77
78
  - mcp__tavily__tavily_crawl
78
79
  - mcp__tavily__tavily_extract
@@ -138,11 +139,14 @@ Of the four built-in delegation roles, the installer (the `ROLES` constant) mana
138
139
  search_external:
139
140
  tools:
140
141
  - web_search
142
+ - web_fetch
141
143
  - mcp__tavily__tavily_* # expanded at generation to search/crawl/extract/map/research (per actual detection)
142
144
  ```
143
145
 
144
146
  `main_agent_extra` and custom-role `tools` support them too. Pattern entries are stored and read back verbatim in the config file (the config panel renders them fine); only the generated preset contains the expanded concrete names.
145
147
 
148
+ > Host 0.2.1-rc.2 and later can enable the DeepSeek Search / Fetch API under **Settings → Web Search**: `web_search` / `web_fetch` keep their names while the provider behind them switches to the official new backend — no 庖丁 (Paoding) config change needed, and both names in a role's allow list keep working as-is.
149
+
146
150
  Example — replacing `implement`'s persona and tools. The `tools` below match the static default — note that it does **not** contain `str_replace_editor` (why: see 8.2). Writing `tools` out explicitly freezes the intent: later changes to the static source no longer affect this role:
147
151
 
148
152
  ```yaml
@@ -350,7 +354,7 @@ The `MAIN_AGENT_ALLOW` constant in `restrict.mjs` is the **base** (21 names) tha
350
354
  | Internal search (hot path) | `glob` `grep` `read` `read_image` `bash` |
351
355
  | Coordination | `todo_write` `ask_user_question` `get_goal` `create_goal` `update_goal` `exit_plan_mode` `job_output` `job_list` `job_kill` |
352
356
 
353
- For orientation: `web_search`, every `mcp__tavily__*`, `write` / `edit` / `str_replace_editor`, `skill`, `workflow`, `ralph`, and the unfiltered `subagent` delegation are **deliberately absent** from the main-agent surface (host tools such as codegraph / `memory_search` / mnemon are likewise not hard-coded into the source — opt them in via `main_agent_extra`, see 3.2). `restrict.mjs` also denies `skill` at the registry level for the main agent (the catalog-injection guard checks registry visibility, not the model-facing list), which brings the main agent's skill-catalog token tax to zero.
357
+ For orientation: `web_search` / `web_fetch`, every `mcp__tavily__*`, `write` / `edit` / `str_replace_editor`, `skill`, `workflow`, `ralph`, and the unfiltered `subagent` delegation are **deliberately absent** from the main-agent surface (host tools such as codegraph / `memory_search` / mnemon are likewise not hard-coded into the source — opt them in via `main_agent_extra`, see 3.2). `restrict.mjs` also denies `skill` at the registry level for the main agent (the catalog-injection guard checks registry visibility, not the model-facing list), which brings the main agent's skill-catalog token tax to zero.
354
358
 
355
359
  ### 3.2 Appending tools: main_agent_extra
356
360
 
@@ -10,7 +10,7 @@
10
10
  dsh-paoding 把 DSH 从「单体 agent 全量加载工具」改造成「主 agent 编排 + 角色子 agent 分工」。分工遵循任务纹理:
11
11
 
12
12
  - **热路径——内部文件问题不委派。** 找代码、查引用、读文件这类问题由主 agent 自己用只读工具解决:`glob` / `grep` / `read` / `read_image` / `bash` 全部在主 agent 白名单内,零委派往返延迟。persona 文案里的 `codegraph` 是 host MCP 工具,仅在安装期检测到 codegraph 服务器并经 `main_agent_extra` 注入后才真正可用(详见[配置](configuration.md)与[安装](installation.md))。
13
- - **冷路径——只干自己那活的角色子 agent。** 外部调研委派 `search_external`(只带 `web_search` + tavily 五工具 + 本地只读)、UI/前端设计委派 `design`(读参考 + 设计技能 + 出 spec,不写最终代码)、代码实现委派 `implement`(读上下文 → 精准修改 → 验证)、超大仓库全量探索委派 `search_internal_deep`(第四角色,2026-09 加入,见下节与[架构](architecture.md))。每个子 agent 只在真正被委派的那一次才加载工具面(按需加载)。
13
+ - **冷路径——只干自己那活的角色子 agent。** 外部调研委派 `search_external`(只带 `web_search` / `web_fetch` + tavily 五工具 + 本地只读)、UI/前端设计委派 `design`(读参考 + 设计技能 + 出 spec,不写最终代码)、代码实现委派 `implement`(读上下文 → 精准修改 → 验证)、超大仓库全量探索委派 `search_internal_deep`(第四角色,2026-09 加入,见下节与[架构](architecture.md))。每个子 agent 只在真正被委派的那一次才加载工具面(按需加载)。
14
14
  - **运行中指挥。** 子 agent 运行期间,主 agent 可用 `send_message` 追加指示、`list_agents` 查看状态、`interrupt_agent` 叫停(三者由 `dsh-tool-subagent-control` 注册,属「子 agent 管理」工具面)。
15
15
  - **完成后只集成摘要。** 主 agent 从不把子 agent 的完整上下文倒进自己的上下文——它只收一份摘要(见第 5 节「上下文隔离」)。
16
16
 
@@ -22,7 +22,7 @@ dsh-paoding 把 DSH 从「单体 agent 全量加载工具」改造成「主 agen
22
22
  | 子 agent 管理 | `send_message` / `list_agents` / `interrupt_agent` |
23
23
  | 内部搜索(热路径) | `glob` / `grep` / `read` / `read_image` / `bash` |
24
24
  | 协调 | `todo_write` / `ask_user_question` / `get_goal` / `create_goal` / `update_goal` / `exit_plan_mode` / `job_output` / `job_list` / `job_kill` |
25
- | 主 agent 刻意看不到(节选,全文见 `restrict.mjs` 头注释) | `web_search`、`mcp__tavily__*`、`write` / `edit` / `str_replace_editor`、`skill`、`workflow`、`ralph`、`ssh_*`、`mcp__tablepro__*`、`describe_image`、裸 `subagent` / `subagent_fork` |
25
+ | 主 agent 刻意看不到(节选,全文见 `restrict.mjs` 头注释) | `web_search` / `web_fetch`、`mcp__tavily__*`、`write` / `edit` / `str_replace_editor`、`skill`、`workflow`、`ralph`、`ssh_*`、`mcp__tablepro__*`、`describe_image`、裸 `subagent` / `subagent_fork` |
26
26
 
27
27
  每请求工具开销(估算,随注册面浮动):主 agent 全量 ~16.2k tokens → 白名单后 ~5.5k;`search_external` ~3.0k / `design` ~3.3k / `implement` ~3.8k,仅在真正委派时发生(数值来源:`agent.cordis.yml` 头部注释)。
28
28
 
@@ -10,7 +10,7 @@ Orchestration is the core of dsh-paoding: the main agent (the orchestrator) deco
10
10
  dsh-paoding turns DSH from "a single agent that loads every tool" into "a main agent that orchestrates plus role agents that specialize". The split follows the texture of the task:
11
11
 
12
12
  - **Hot path — internal file questions are never delegated.** Finding code, chasing references, and reading files are solved by the main agent itself with its read-only tools: `glob` / `grep` / `read` / `read_image` / `bash` are all on the main-agent allow list, so there is zero delegation round-trip latency. `codegraph` in the persona copy is a host MCP tool: it is only actually available when the install-time detection finds the codegraph server and it is injected through `main_agent_extra` (see [Configuration](configuration_en.md) and [Installation](installation_en.md)).
13
- - **Cold path — role agents that carry only their own tools.** External research goes to `search_external` (only `web_search` + the five tavily tools + local reads); UI/frontend design goes to `design` (reads references, loads design skills, produces specs, never writes final code); code implementation goes to `implement` (read context → surgical change → verify); whole-repo deep exploration goes to `search_internal_deep` (a fourth role added 2026-09, see next section and [Architecture](architecture_en.md)). Each subagent is paid for only the run in which it is actually used (pay-per-use).
13
+ - **Cold path — role agents that carry only their own tools.** External research goes to `search_external` (only `web_search` / `web_fetch` + the five tavily tools + local reads); UI/frontend design goes to `design` (reads references, loads design skills, produces specs, never writes final code); code implementation goes to `implement` (read context → surgical change → verify); whole-repo deep exploration goes to `search_internal_deep` (a fourth role added 2026-09, see next section and [Architecture](architecture_en.md)). Each subagent is paid for only the run in which it is actually used (pay-per-use).
14
14
  - **Directing a running child.** While a subagent runs, the main agent can append instructions with `send_message`, inspect status with `list_agents`, and stop it with `interrupt_agent` (all three are registered by `dsh-tool-subagent-control` and belong to the "child management" surface).
15
15
  - **Integrate summaries only.** The main agent never dumps a child's full context into its own — it receives one summary (see section 5, Context isolation).
16
16
 
@@ -22,7 +22,7 @@ The main agent's model-facing surface is narrowed by `restrict.mjs` on the `syst
22
22
  | Child management | `send_message` / `list_agents` / `interrupt_agent` |
23
23
  | Internal search (hot path) | `glob` / `grep` / `read` / `read_image` / `bash` |
24
24
  | Coordination | `todo_write` / `ask_user_question` / `get_goal` / `create_goal` / `update_goal` / `exit_plan_mode` / `job_output` / `job_list` / `job_kill` |
25
- | Deliberately hidden from the main agent (excerpt; full list in the `restrict.mjs` header comment) | `web_search`, `mcp__tavily__*`, `write` / `edit` / `str_replace_editor`, `skill`, `workflow`, `ralph`, `ssh_*`, `mcp__tablepro__*`, `describe_image`, bare `subagent` / `subagent_fork` |
25
+ | Deliberately hidden from the main agent (excerpt; full list in the `restrict.mjs` header comment) | `web_search` / `web_fetch`, `mcp__tavily__*`, `write` / `edit` / `str_replace_editor`, `skill`, `workflow`, `ralph`, `ssh_*`, `mcp__tablepro__*`, `describe_image`, bare `subagent` / `subagent_fork` |
26
26
 
27
27
  Per-request tool tax (estimates; they float with the registered surface): full monolithic main agent ~16.2k tokens → ~5.5k after the allow list; `search_external` ~3.0k / `design` ~3.3k / `implement` ~3.8k, incurred only when actually delegated (figures from the header comment of `agent.cordis.yml`).
28
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-paoding",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "庖丁 — DSH (DeepSeek Harness) 编排模式安装器:host 感知的角色工具过滤 + Web 设置页可视化配置器",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -20,7 +20,8 @@
20
20
  "cordis.patch.yml"
21
21
  ],
22
22
  "engines": {
23
- "node": ">=18"
23
+ "node": ">=18",
24
+ "dsh": ">=0.1.5 <0.3"
24
25
  },
25
26
  "peerDependencies": {
26
27
  "@deepseek-ai/dsh": ">=0.1.5"
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <rect width="64" height="64" rx="14" fill="#4D6BFE"/>
3
+ <g transform="rotate(-45 32 32)">
4
+ <rect x="14" y="11" width="32" height="22" rx="3" fill="#FFFFFF"/>
5
+ <circle cx="41" cy="16.5" r="2" fill="#4D6BFE"/>
6
+ <rect x="44" y="17" width="13" height="10" rx="4" fill="#FFFFFF" opacity="0.85"/>
7
+ </g>
8
+ </svg>
@@ -42,7 +42,7 @@ import { fileURLToPath } from 'node:url'
42
42
  import { getState, refreshState, isStateCacheStale, serializeState, installAssignments, resolveDshHome, discoverWorkspaceCandidates, ensurePresetInstalled, pluginVersion, exportConfigPayload, importConfigContent, listPresets, resolveWorkspacePathByPresetId, deleteWorkspacePreset } from './api-core.mjs'
43
43
  import { collectModelRefs } from '../../tools/lib/health.mjs'
44
44
  import { detectSkills } from '../../tools/lib/skills.mjs'
45
- import { collectRuntimeFacts } from './runtime-inventory.mjs'
45
+ import { collectRuntimeFacts, detectHmrOf } from './runtime-inventory.mjs'
46
46
  import { getVersionInfo } from '../../tools/lib/version.mjs'
47
47
  import { runUpgrade } from '../../tools/lib/upgrade.mjs'
48
48
 
@@ -694,7 +694,15 @@ export async function apply(ctx) {
694
694
  // 200 + error 字段,面板据此静默降级(不打扰使用)。timeoutMs 3000:
695
695
  // 检测只是锦上添花,不值得让面板等更久。layout 告知客户端挂载形态
696
696
  //(升级确认框按此分流警示文案),见 MOUNT_LAYOUT 注释。
697
- json(res, 200, { ...(await getVersionInfo({ timeoutMs: 3000 })), layout: MOUNT_LAYOUT })
697
+ // hotReloadable:宿主插件清单里有启用的 dsh-hmr 插件行(0.2.1+ web/
698
+ // desktop 默认)→ 升级后刷新页面即生效,确认框 / 成功 note 换
699
+ // 「刷新即生效」文案;探测失败 / 非 web 部署拿不到运行时 → false,
700
+ // 回落「需重启 DSH」文案。永不抛出(detectHmrOf 自捕)。
701
+ json(res, 200, {
702
+ ...(await getVersionInfo({ timeoutMs: 3000 })),
703
+ layout: MOUNT_LAYOUT,
704
+ hotReloadable: detectHmrOf(ctx),
705
+ })
698
706
  return
699
707
  }
700
708
 
@@ -449,8 +449,10 @@ window.__ModuleLoader__.load({
449
449
  "menu.upgradeConfirm": { zh: "升级", en: "Upgrade" },
450
450
  "menu.upgradeDevBody": { zh: "当前为开发 link 直连形态:无法就地升级,请手动执行 dsh plugin add dsh-paoding@latest 切换到 registry 版本。仍要继续尝试吗?", en: "This is a dev link checkout: it cannot be upgraded in place. Run dsh plugin add dsh-paoding@latest manually to switch to the registry version. Continue anyway?" },
451
451
  "menu.upgradeBody": { zh: "确定升级到 {v}?升级将通过插件通道原地换版本,完成后需重启 DSH 生效。", en: "Upgrade to {v}? The upgrade swaps the version in place through the plugin channel; restart DSH afterwards to apply it." },
452
+ "menu.upgradeBodyHot": { zh: "确定升级到 {v}?升级将通过插件通道原地换版本,完成后刷新页面即生效(编排预设自动按新版重生成)。", en: "Upgrade to {v}? The upgrade swaps the version in place through the plugin channel; refresh the page afterwards — orchestration presets regenerate automatically." },
452
453
  "menu.upToDate": { zh: "已是最新版本", en: "Already up to date" },
453
454
  "menu.upgraded": { zh: "✅ 已升级到 {v},重启 DSH 后新版本生效(preset 会自动按新版重生成)", en: "✅ Upgraded to {v} — restart DSH to apply the new version (the preset regenerates itself against it)" },
455
+ "menu.upgradedHot": { zh: "✅ 已升级到 {v},刷新页面即生效(preset 会自动按新版重生成)", en: "✅ Upgraded to {v} — refresh the page to apply (the preset regenerates itself against it)" },
454
456
  "menu.errTail": { zh: ":{tail}", en: ": {tail}" },
455
457
  "menu.langTip": { zh: "切换界面语言", en: "Switch UI language" },
456
458
  };
@@ -3679,15 +3681,22 @@ window.__ModuleLoader__.load({
3679
3681
  // 改通用确认弹窗,confirmCtrl 单例见 70 片段)文案按挂载形态分流:
3680
3682
  // dev link 直连形态(layout 由服务端 version 路由按包根 .git 判定)无法
3681
3683
  // 就地升级,把手动切换命令说在前头;installed(registry 版)原地换版本,
3682
- // 从简。反馈(成功 note / 失败 err,含子进程输出尾部)都收在卡内,不与
3684
+ // 按宿主热重载能力(version 路由 hotReloadable:插件清单里有启用的
3685
+ // dsh-hmr 行)再分两级——有则「刷新页面即生效」,无则「重启 DSH 生效」。
3686
+ // 反馈(成功 note / 失败 err,含子进程输出尾部)都收在卡内,不与
3683
3687
  // 面板的 toast 反馈混流。升级非破坏性操作,danger 不置位;弹窗本体由
3684
3688
  // PageShell 末尾的 ConfirmLayer 渲染(页头与面板发起的确认共用一层)。
3685
3689
  function runUpgradeFlow(verInfo, setVerInfo, setUpgBusy, setUpgNote, setUpgErr) {
3686
3690
  if (!verInfo || !verInfo.latest) return;
3687
3691
  var isDev = verInfo.layout === "dev";
3692
+ // 二级分流:宿主插件清单里有启用的 dsh-hmr 插件行(0.2.1+ web/desktop
3693
+ // 发布 profile 默认带上,version 路由的 hotReloadable 字段)时,插件
3694
+ // 通道原地换版本后刷新页面即生效,无需重启 DSH——确认框与成功 note
3695
+ // 都换「刷新即生效」文案;字段缺失 / 探测失败回落「需重启」文案。
3696
+ var hot = verInfo.hotReloadable === true;
3688
3697
  var msg = isDev
3689
3698
  ? t("menu.upgradeDevBody")
3690
- : t("menu.upgradeBody", { v: versionTagOf(verInfo.latest) });
3699
+ : t(hot ? "menu.upgradeBodyHot" : "menu.upgradeBody", { v: versionTagOf(verInfo.latest) });
3691
3700
  confirmCtrl.ask({
3692
3701
  title: t("menu.upgradeTitle"),
3693
3702
  body: msg,
@@ -3702,7 +3711,7 @@ window.__ModuleLoader__.load({
3702
3711
  var done = versionTagOf((r && r.version) || verInfo.latest);
3703
3712
  // 服务端返回了 message 就原文透传(服务端消息不做客户端翻译),
3704
3713
  // 没有才落本地化兜底文案。
3705
- setUpgNote((r && r.message) || t("menu.upgraded", { v: done }));
3714
+ setUpgNote((r && r.message) || t(hot ? "menu.upgradedHot" : "menu.upgraded", { v: done }));
3706
3715
  // 重拉版本信息:服务端有 1 小时缓存且本进程挂的还是旧代码,重启前
3707
3716
  // 更新卡可能仍在(重启后自然消失),以此处的生效提示为准。
3708
3717
  paodingApi("version").then(function (d) {
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "paoding-config-ui",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "main": "index.mjs",
7
- "description": "庖丁 (dsh-paoding) 可视化配置器 — DSH Web 左侧栏全页配置插件(侧栏入口 + /api/paoding 路由)",
7
+ "icon": "./icon.svg",
8
+ "description": "庖丁 (dsh-paoding) 可视化配置器 — DSH Web 左侧栏全页配置插件(侧栏入口 + /api/paoding 路由)· Visual config panel for dsh-paoding in the DSH Web sidebar",
9
+ "engines": {
10
+ "node": ">=18",
11
+ "dsh": ">=0.1.5 <0.3"
12
+ },
8
13
  "dsh": {
9
14
  "client": {
10
15
  "platform": "web",
@@ -206,6 +206,28 @@ function detectPresetSystemOf(ctx) {
206
206
  }
207
207
  }
208
208
 
209
+ /**
210
+ * 宿主热重载能力探测:插件清单里存在 @deepseek-ai/dsh-hmr 插件行(dsh
211
+ * 0.2.1+ 的 web / desktop 发布 profile 默认带上)且已启用,即认为宿主支持
212
+ * 插件热重载——面板升级(插件通道原地换版本)完成后刷新页面即生效,无需
213
+ * 重启 DSH。取数复用 collectPluginEntries 的路径(getService
214
+ * ('pluginInventory') → list() → entries);服务缺席 / 形状异常 / 任何异常
215
+ * 一律 false(安全侧:回落「需重启」文案),永不抛出。
216
+ */
217
+ export function detectHmrOf(ctx) {
218
+ try {
219
+ const { entries, ok } = collectPluginEntries(ctx, [])
220
+ if (!ok) return false
221
+ // collectPluginEntries 已剔除 enabled===false 的条目,此处再判一次仅为
222
+ // 兑现判定语义(enabled!==false);moduleName / entryId 任一含 'dsh-hmr'
223
+ // 即命中(不同宿主版本两字段的命名习惯有差异,取并集)。
224
+ return entries.some((e) => e.enabled !== false
225
+ && (e.moduleName?.includes('dsh-hmr') || e.entryId?.includes('dsh-hmr')))
226
+ } catch {
227
+ return false
228
+ }
229
+ }
230
+
209
231
  /**
210
232
  * 采集运行时事实(供 collectState 合并 / UI 展示)。
211
233
  * 永不抛出:任何异常都会落到 error 里,返回部分结果。
@@ -243,11 +243,12 @@
243
243
  toolName: search_external
244
244
  backgroundMode: one-shot
245
245
  persona: |-
246
- You are the external-research agent. Your job is web research only — use web_search and the tavily tools; you never modify files. Search the web, extract key facts, and return a concise structured research summary (findings, sources, open questions).
246
+ You are the external-research agent. Your job is web research only — use web_search, web_fetch and the tavily tools; you never modify files. Search the web, extract key facts, and return a concise structured research summary (findings, sources, open questions).
247
247
  On tool failure, do not retry a denied operation: report the failure compactly — what you completed, the exact error, which tool/permission you lack, and your suggested next step — so the orchestrator can re-delegate or adjust.
248
248
  toolFilter:
249
249
  allow:
250
250
  - web_search
251
+ - web_fetch
251
252
  - mcp__tavily__tavily_search
252
253
  - mcp__tavily__tavily_crawl
253
254
  - mcp__tavily__tavily_extract
@@ -24,7 +24,7 @@
24
24
  * 停用即自动清除。本文件只保留 dsh 核心工具。
25
25
  *
26
26
  * What the main agent deliberately does NOT see (all costs drop to zero for
27
- * its requests): web_search, every mcp__tavily__*, write / edit /
27
+ * its requests): web_search, web_fetch, every mcp__tavily__*, write / edit /
28
28
  * str_replace_editor, skill (+ its ~1.3k-token catalog), workflow, ralph,
29
29
  * ssh_*, mcp__tablepro__*, describe_image, and the unfiltered subagent /
30
30
  * subagent_fork delegations.