dsh-model-switch 0.4.66 → 0.4.67

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
@@ -1,106 +1,104 @@
1
1
  # Model Switch
2
2
 
3
- English | [中文](README.zh.md)
3
+ 中文 | [English](README.en.md)
4
4
 
5
- Choose one explicit route for the active session, Subagents, Web Search, image generation, Plan execution, and automatic session naming in DeepSeek Harness. Model Switch uses public DSH services and provider-owned adapters; it does not patch DSH Core or manage provider credentials.
5
+ 在 DeepSeek Harness 中为当前会话、Subagent、Web Search、图像生成、Plan 执行、自动会话命名与记忆蒸馏配置明确路由。Model Switch 只使用 DSH 公开服务和 Provider 自有 Adapter;不修改 DSH Core,也不管理 Provider 登录凭证。
6
6
 
7
- <p align="center"><img src="docs/screenshots/composer-picker.png" alt="Composer Picker with Model, Effort, Context, and Fast controls" width="314"></p>
7
+ <p align="center"><img src="docs/screenshots/composer-picker.png" alt="包含模型与推理等级的 Composer Picker" width="304"></p>
8
8
 
9
- The picker retains keyboard focus when changing panes or closing search, without overriding search autofocus. Escape from the summary closes the picker and returns focus to its trigger.
9
+ Picker 在切换页面或关闭搜索时保留键盘焦点,不覆盖搜索框的自动聚焦。从摘要页按 Escape 会关闭 Picker,并将焦点还给触发按钮。
10
10
 
11
- ## Routes
11
+ ## 路由
12
12
 
13
- | Route | Behavior |
13
+ | 路由 | 行为 |
14
14
  | --- | --- |
15
- | Session model | The active conversation's provider/model/effort, changed by the Composer Picker or Plan Review only. The deployment default (new sessions) is DSH's own; the picker never writes it. |
16
- | Subagent | When a spawn names no provider, model, or effort: the delegating session's derived route — its provider group's subagent pair, else the fixed card's pair; with neither, official inherit (parent live request, then creation snapshot). A spawn that names a route is never overridden; workflow overrides remain authoritative. |
17
- | Composer Picker | Changes only the active session and submits the exact catalog model id. |
18
- | Plan Review | Chooses the execution model before the Plan approval response is sent. |
19
- | Web Search | Keeps official `web_search`; after deployment opt-in, routes through the selected, dynamically declared provider search adapter. |
20
- | Image generation | Provides one stable `generate_image` tool routed through a selected Codex or Grok adapter. |
15
+ | 会话模型 | 当前对话的 provider/model/effort,只由 Composer Picker 或 Plan Review 修改。部署默认模型(新建会话)归 DSH 自己管理;选择器从不写它。 |
16
+ | Subagent | 子代理 spawn 未指定 provider/model/effort 时:使用委派会话自身推导出的路由——其供应商组的子代理对,其次是固定卡片的对;两者都没有则为官方继承(先父请求实时路由,再创建时快照)。显式指定路由的 spawn 永远不会被覆盖;Workflow 显式覆盖始终优先。 |
17
+ | Composer Picker | 只修改当前会话,并提交 catalog 中的原始 model id。 |
18
+ | Plan Review | 在发送 Plan 审核确认前,先提交执行模型。 |
19
+ | Web Search | 保留官方 `web_search`;部署显式启用后,通过 Provider 动态声明的独立搜索适配器路由。 |
20
+ | 图像生成 | 提供一个稳定的 `generate_image` 工具,通过选定的 Codex 或 Grok Adapter 路由。 |
21
21
 
22
- Invalid, unavailable, or unsupported routes fail explicitly. Model Switch never silently falls back to another provider or model. Composer icons identify the execution runtime: DSH-owned LLM routes use the theme-adaptive DSH whale; providers declaring the Agent role use their own mark. Sidebar quota icons remain provider-specific.
22
+ 无效、不可用或不受支持的路由会明确失败。Model Switch 不会静默换到另一个 provider 或模型。
23
23
 
24
- Idle blank sessions may pick an External Agent. Submission, pending-first-turn, and running state reserve the selected execution runtime even before a token or native binding exists: native Antigravity keeps its model/effort choices; DSH keeps LLM-provider choices but disables Agent providers. After the first accepted user message, Composer and Plan Review keep Agent-role rows visible but disabled unless the session is already native-bound. After the active session successfully opens a native Antigravity session, the pickers read its plugin-owned binding and disable other providers while keeping available Antigravity model and effort controls. The DSH global picker lock remains authoritative. Binding reads refresh on mount, input-phase, request-activity or catalog changes, and before selection; failed reads show a localized alert and preserve a known native lock. These reads do not start the native runtime or gate conversation history. Antigravity owns the separate execution-time guard; Model Switch does not create custom Core history events.
24
+ 空闲的空白会话可以选择 External Agent。提交中、等待首个 turn 以及运行期间,从请求开始就锁定所选执行运行时,不等待首 token 或原生绑定:Antigravity 保留其模型和 effort 选择;DSH 保留 LLM provider 选择,但禁用 Agent provider。会话一旦有过用户消息,Composer 和 Plan Review 仍显示 Agent 角色行但将其禁用,除非该会话已经绑定原生运行时。当前会话成功打开 Antigravity 原生会话后,Picker 会在该会话内禁用其他 provider,同时保留 Antigravity 模型与 effort 控件。DSH 全局 Picker 锁仍拥有最高优先级。
25
25
 
26
- The existing 3082 lab replay probe is `node scripts/check-lab-runtime-lock.mjs [native|runtime-absent|plugin-absent]`. It checks the dedicated QA conversation under the already-established condition; it does not disable plugins, select a model, or send a turn. `node scripts/check-lab-native-execution.mjs` verifies the saved guard rejection, restored native continuation, DeepSeek-parent/Antigravity-child completion, and restoration of temporary subagent preferences through public history streams.
26
+ ## 配置 Subagent 与能力路由
27
27
 
28
- ## Configure Subagents and capability routes
28
+ 打开 **设置 → Model Switch**。设置页的能力路由卡片覆盖 Subagent、Web 搜索、图像生成、自动审查、压缩、会话命名与记忆蒸馏,外加「审查豁免」(纯读工具免审查名单)与「供应商配置组」卡片。子代理可以使用委派会话推导出的路由,也可以使用固定的 provider、model 和 effort。「审查超时」卡片已于 0.4.67 移除并冻结(见下文兼容性一节)。
29
29
 
30
- Open **Settings → Model Switch**. The page hosts six route cards — Subagent, Web search, Image generation, Auto review, Compaction, and Session naming — plus the Provider groups card. Subagents may follow the delegating session's derived route or a fixed provider, model, and effort.
30
+ 自 0.4.23 起本插件不再配置、也不再保护部署默认模型(原「主模型」卡片)。默认模型归 DSH 自己:Host 会把最后一次会话切换写成默认值(包括经本插件选择器或 TUI 的切换),与原生切换行为一致——新会话从"上次用过的模型"开始。需要固定默认值时,请使用 DSH 自带的 **设置 → 模型** 页面。官方 DSH 在非本机浏览器将 ConfigForms 设为仅内存模式,设置页会明确显示不可用;请在 Host 的 127.0.0.1 页面打开设置。移除主卡片的附带收益:模型切换从此不再依赖设置可写状态(此前选择器要等 Main 表单可写才允许切换)。
31
31
 
32
- Since 0.4.23 this plugin no longer configures or protects the deployment default ("Main model"). That default is DSH's own: the Host persists the last session switch as the default (including switches made through this plugin's picker or the TUI), exactly like native switching — so a new session starts on whatever was last used. To pin a fixed default, use DSH's own **Settings → Models** page. Official DSH makes ConfigForms memory-only in non-loopback browsers, so the Settings page shows an unavailable message there; open Settings on the Host loopback URL instead. As a side effect of the removal, model switching is never blocked by settings state (previously the picker waited for a writable Main ConfigForm).
32
+ 切换固定 Subagent 的 provider/model 时,会用目标模型的默认 effort 替换旧模型的 effort;目标模型不支持推理时不传 effort。
33
33
 
34
- Changing the fixed Subagent provider/model replaces the previous model's effort with the target model's default. Models without reasoning support receive no effort.
34
+ ![Model Switch 设置页:对话路由、能力路由、审查豁免与供应商配置组](docs/screenshots/settings-subagent.png)
35
35
 
36
- ![Model Switch settings with a fixed Subagent route](docs/screenshots/settings-subagent.png)
36
+ 官方继承先读取当前父请求,再读取 Host 自身的会话默认模型。推导或固定的路由会在官方 Subagent descriptor 创建前注入,且仅当 spawn 未指定 provider、model 或 effort——显式指定路由的 spawn 永远不会被覆盖,能力不是 `agentOptions` 的 provider(例如一次性进程适配器)也不会被重新解释为可路由的 Agent。DSH 0.1.2-alpha.4 会在该 descriptor 中携带 provider、model 和固定 reasoning effort。
37
37
 
38
- Official inherit resolves the active parent request first, then the Host's own session default. A derived or fixed route is injected before the official Subagent descriptor is created, and only when the spawn names no provider, model, or effort — a caller that names a route is never overridden, and a provider whose capability is not `agentOptions` (for example a one-shot process adapter) is never reinterpreted as an Agent-capable route. DSH 0.1.2-alpha.4 carries provider, model, and fixed reasoning effort in that descriptor.
38
+ ### 保存设置
39
39
 
40
- ### Saving settings
40
+ 每一行的保存都是**一次**原子的、带版本围栏的官方 ConfigForm `mutate`:写入被拒绝时要么整行生效、要么什么都不写,不会再留下只写了一半的 provider/model 对。你编辑中的草稿不会被外部快照更新(另一标签页的保存、能力轮询)覆盖;版本冲突会明确报告并提供重新加载路径,而不是悄悄丢掉任何一方;30 秒内始终没有落定的写入会明确报错,而不是让页面卡在「保存中…」。值旁边的 ⚠ 标记现在只有一个含义:该值不在当前 Provider 目录中。
41
41
 
42
- Every row save is one atomic, revision-fenced mutation through the official ConfigForm `mutate`: a refused write either commits the whole row or nothing, so it can no longer leave a half-written provider/model pair. A draft you edited survives external snapshot updates (another tab's save, the capability poll); a revision conflict is reported with a reload path instead of silently losing either side; and a write that never settles is reported after 30 seconds rather than freezing the page on "Saving…". The ⚠ marker next to a value means exactly one thing: this value is not in the current provider catalog.
42
+ ## 自定义模型如何出现在 Picker
43
43
 
44
- ## How custom models appear in the Picker
45
-
46
- Model Switch does not turn an arbitrary string in its own settings into a model. A provider plugin must publish the model to the official DSH model catalog first:
44
+ Model Switch 不会把自身设置中任意填写的字符串变成模型。Provider 插件必须先把模型发布到 DSH 官方 Model Catalog:
47
45
 
48
46
  ```text
49
- Provider configuration
50
- → provider publishes model rows to the DSH catalog
51
- → the active session Model Directory exposes provider/model metadata
52
- → Model Switch groups those catalog rows
53
- → the Picker submits the original provider id and model id
47
+ Provider 配置
48
+ → Provider 将模型行发布到 DSH Catalog
49
+ → 当前会话 Model Directory 提供 provider/model 元数据
50
+ → Model Switch 对 Catalog 行分组
51
+ → Picker 提交原始 provider id 和 model id
54
52
  ```
55
53
 
56
- The catalog supplies the provider name, model id/name, reasoning efforts, and default effort. A saved route that is no longer present remains visible as unavailable in Settings; the Picker does not pretend it is routable.
54
+ Catalog 提供 provider 名称、model id/name、reasoning efforts 和 default effort。已经保存但不再出现在 Catalog 中的路由,会在 Settings 中显示为 unavailable;Picker 不会假装它仍可路由。
57
55
 
58
- ### Variant id grammar
56
+ ### 变体 id 规则
59
57
 
60
- Model Switch groups catalog rows by provider and by the model id after peeling these suffixes:
58
+ Model Switch 按 provider,以及剥离以下后缀后的 model id 对 Catalog 行分组:
61
59
 
62
- | Catalog model id | Picker variant |
60
+ | Catalog model id | Picker 变体 |
63
61
  | --- | --- |
64
- | `acme-v1` | Standard row |
62
+ | `acme-v1` | 标准模型 |
65
63
  | `acme-v1-fast` | Fast |
66
64
  | `acme-v1-128k` | Context 128K |
67
65
  | `acme-v1-1m` | Context 1M |
68
66
  | `acme-v1-1m-fast` | Context 1M + Fast |
69
67
 
70
- Rules:
68
+ 规则:
71
69
 
72
- - `-fast` creates the Fast axis.
73
- - `-<n>k` and `-<n>m` create Context tiers; suffixes may be combined with `-fast` in either order.
74
- - `reasoning.efforts` creates the Effort choices; `reasoning.defaultEffort` selects the initial value.
75
- - Switching Fast, Context, or Thinking variants keeps the current effort only when the target catalog row supports it; otherwise the target row's default effort (or no effort) is used.
76
- - Reasoning metadata marks a catalog row as Thinking-capable.
77
- - Unrecognized ids remain independent model families; Model Switch never drops them.
70
+ - `-fast` 生成 Fast 轴。
71
+ - `-<n>k` 和 `-<n>m` 生成 Context 档位;可以与 `-fast` 按任意顺序组合。
72
+ - `reasoning.efforts` 生成 Effort 选项;`reasoning.defaultEffort` 是初始值。
73
+ - 切换 Fast、Context 或 Thinking 变体时,只有目标 Catalog 行支持当前 effort 才会保留;否则改用目标行的默认 effort,目标没有默认值时不传 effort。
74
+ - Catalog 中存在 reasoning 元数据时,该模型行具备 Thinking 能力。
75
+ - 无法识别的 id 不会被丢弃,而是作为独立 model family 显示。
78
76
 
79
- To support a combined selection, the provider must publish the combined row. Publishing only `acme-v1-fast` and `acme-v1-1m` cannot represent Fast + 1M; publish `acme-v1-1m-fast` as well. The Picker never synthesizes a model id that the provider did not publish.
77
+ 组合选择必须由 Provider 发布组合行。只有 `acme-v1-fast` 和 `acme-v1-1m` 不能表示 Fast + 1M;还必须发布 `acme-v1-1m-fast`。Picker 永远不会合成 Provider 没有发布的 model id。
80
78
 
81
79
  ## Plan Review
82
80
 
83
- Plan Review owns an execution-model draft separate from the session's current route. **Confirm** first commits that model to the active session, then answers the pending Plan review. A refused commit leaves the review pending and retryable. **Reject** and **Discuss in chat** do not execute the Plan.
81
+ Plan Review 拥有独立于会话当前路由的执行模型草稿。**确认执行**会先把该模型提交到当前会话,再回答待处理的 Plan 审核。提交被拒绝时,审核保持待处理并允许重试。**拒绝**和**去聊天里说**不会执行 Plan。
84
82
 
85
- **Reject** sends the option the asker offered, and any text typed in the card's feedback field as the answer's own `custom` text — plan mode reports that text back to the model as the reason to keep planning, so a rejection can carry what to change. **Discuss in chat** withdraws the takeover so the composer returns and the human speaks in their own words; it uses the Host's `dismiss()` where published and the older generation's `cancel()` otherwise, and names the Host when neither exists. Answering a settled review closes Confirm and Reject, while Discuss and the reload affordance stay reachable so the card always has a way back. Failures keep their wire code (`session/writer-held: …`) visible instead of a bare localized sentence.
83
+ **拒绝**会发送提问方给出的选项,并把卡片反馈框里的文字作为答复自身的 `custom` 文本一并提交 —— plan 模式会把它作为"继续规划"的理由回报给模型,所以打回时可以带上要改什么。**去聊天里说**会撤下这张卡、把输入框还给你,用你自己的话说明;它在 Host 提供 `dismiss()` 时用它,在旧代际用 `cancel()`,两者都没有时明确指出这一点。审核一旦落定,**确认执行**与**拒绝**关闭,而**去聊天里说**与"重新加载"始终可达,卡片不会变成死路。失败会保留线上错误码(如 `session/writer-held: …`),而不是只给一句本地化文案。
86
84
 
87
- **Set as goal and run** arms this Plan as the session's goal and only then answers it, so `dsh-goal-round-driver` keeps the Plan moving after plan mode exits. It calls the released `remote.goals.create`; when a non-complete goal already exists it clears that one first so the new Plan starts with a fresh round cap, and says so in the card. A refusal keeps the review pending with its wire code (`GOAL_AGENT_NOT_LIVE: …`), and a deployment that mounts no goal service disables the button with an explicit reason while the other three actions keep working. The objective is the Plan's full markdown, trimmed — the goal domain imposes no length limit, and the objective rides along as model-visible context every round, so a long Plan costs tokens on each continuation.
85
+ **设置为目标并执行** 会先把这份 Plan 设为当前会话的 goal、再答复,于是 `dsh-goal-round-driver` 能在退出计划模式后继续推进。它调用已发布的 `remote.goals.create`;若已存在一个未完成的 goal,会先 `clear` 再 `create`,让新 Plan 拿到完整轮次预算,并在替换后提示。目标设置被拒时审核保持待处理、错误带真实错误码(如 `GOAL_AGENT_NOT_LIVE: …`);部署未挂 goal 服务时该按钮禁用并给出原因,其余三个动作照常可用。objective 取计划全文(trim 后):goal 域不设长度上限,但它会作为模型可见上下文出现在每一轮续跑里,所以计划很长时每轮都花 token。
88
86
 
89
- The card body shows only the Plan's first-line title and first-paragraph summary; the **full plan** opens automatically in the right sidebar through official ui-plan (the header's "View full plan" reopens it any time). The takeover entry cannot render the official `conversation.plan-review.actions` slot (a child slot allows exactly one declarer), so the card drives ui-plan's registered opener instead — the preview document's address and params stay ui-plan's own construction (see `docs/seam-gap.md`).
87
+ 卡片正文只显示计划的首行标题与首段摘要,**完整计划**会由官方 ui-plan 自动开到右侧侧边栏(头部的"查看完整计划"可随时再开)。接管的 composer 条目无权渲染官方的 `conversation.plan-review.actions` 槽位(每个子槽只允许一个声明者),因此卡片直接驱动 ui-plan 已注册的 opener——计划文档的地址与参数始终由 ui-plan 自己构造(见 `docs/seam-gap.md`)。
90
88
 
91
- ![Plan Review with an execution-model picker](docs/screenshots/plan-review.png)
89
+ ![带执行模型 Picker 的 Plan Review](docs/screenshots/plan-review.png)
92
90
 
93
- ## Auto review model
91
+ ## 自动审查模型(Auto review)
94
92
 
95
- The official `@deepseek-ai/dsh-experimental-auto-review` (the per-call reviewer for the Auto permission preset) hardwires its review requests onto the session's own route. This plugin takes that row over through a `cordis.patch.yml` row replacement: the official row is disabled and `dsh-model-switch/auto-review` mounts the **same official `apply`** under a scoped child context whose `llm.stream` `provider/model` are rewritten to the reviewer route resolved for that session (provider group → flat card → session model). Session correlation rides a `{ prepend: true }` `tools/pre-execute` listener registered on the review scope immediately after `official.apply(scope)`, binding `exec.agent.session` in an `AsyncLocalStorage` scope around `next()` so parallel sessions on different providers never interfere and mid-session provider switches take effect on the very next review. The "Auto review model" card defaults to off = reviews follow the session model; turning it on pins the catalog head as an editable starting point, and saved changes apply to the very next review. When the optional auto-review bundle never started with the profile the row stays unmounted and the Auto preset keeps its official off state.
93
+ 官方 `@deepseek-ai/dsh-experimental-auto-review`(Auto 权限预设的逐调用审查)把审查请求固定在会话自身的路由上。本插件通过 `cordis.patch.yml` 的行替换接管这一行:官方行被禁用,改挂 `dsh-model-switch/auto-review`,它在作用域子上下文里运行**同一份官方 `apply`**,把 `llm.stream` 的 `provider/model` 改写为该会话解析出的审查模型(供应商配置组 → 全局审查卡片 → 会话自身模型)。在 `official.apply(scope)` 之后,本行立即在同一作用域注册 `{ prepend: true }` 的 `tools/pre-execute` 监听器(在 Cordis 瀑布流中排在官方监听器之前),用 `AsyncLocalStorage` 将 `exec.agent.session` 绑定到审查调用链上,因此不同供应商的多个会话并行时互不干扰,会话中途切换供应商也会在下一次审查立即生效。设置页「自动审查模型」默认关闭 = 审查跟随当前会话模型;打开时以目录首位模型作为可再改的固定起点,保存后对下一次审查立即生效。审查未配置官方能力包(`@deepseek-ai/dsh-experimental-auto-review` 未随 profile 启动)时本行不挂载,Auto 预设保持官方的关闭状态。
96
94
 
97
- Since 0.4.31 the row also owns the seam at runtime, not just in the patch file. The plugin manager writes its component toggles into a layer that applies after every bundle layer, so a manual re-enable of the official「自动审查」component used to bring the official, unguarded gate back — and, because `permissionPresets.registerAuto` is single-registration, two live rows on that seam eventually killed every tool call. The row now takes the seam over the way the session-title slot is taken over: when the official row is about to apply it releases the Auto registration **synchronously first** (so the official row applies cleanly instead of colliding), disables the official row through the public `Entry.update`, and re-claims the registration with a bounded retry — preserving live sessions' Auto selection across the displacement. Toggling the official component back on is therefore a logged, self-healing no-op; the settings card's「自动审查」section says so too.
95
+ 0.4.31 起本行还在运行时接管这条缝,而不仅靠补丁文件:插件管理器会把组件开关写进"在所有 bundle 层之后生效"的层,手动把官方「自动审查」组件重新打开曾会让无防护的官方 gate 回来——而 `permissionPresets.registerAuto` 是单注册的,同一条缝上的两行最终杀掉每个工具调用。现在本行按接管会话命名槽位的同一手法接管:官方行将要 apply 时**先同步交出** Auto 注册(让官方行干净应用而不是撞车),再通过公开的 `Entry.update` 停用官方行,并以有界重试收回注册——整个位移过程保留会话的 Auto 选择。因此在插件管理器里把官方组件再打开只是一次会记日志、自愈的空操作;设置页「自动审查」卡片里也写明了这一点。
98
96
 
99
- ## Compaction model
97
+ ## 压缩模型(Compaction model)
100
98
 
101
- Official compaction — `/compact` and DSH's automatic compaction — summarizes history with the conversation's target model by default. The "Compaction model" card (default off) pins that summarization route instead: turning it on pins the catalog head as an editable starting point, and saved changes apply to the very next compaction. Leaving both fields empty returns to the official default. Saving while a compaction is running may interrupt it; it retries next time.
99
+ 官方压缩——`/compact` 与 DSH 的自动压缩——默认使用会话当前的目标模型做摘要。「压缩模型」卡片(默认关闭)改为固定摘要路由:打开时以目录首位模型作为可再改的固定起点,保存后对下一次压缩立即生效。两个字段都留空即回到官方默认。保存时若恰有压缩进行中,可能被打断并在下次重试。
102
100
 
103
- Each summarization call (`options.purpose === 'compaction'`) also resolves its route per session through `compactionScope`: the session's provider group's compaction pair → the flat card pair → the official row's `modelPolicies` / conversation-target default. When a route applies, the child context's `llm` wrapper updates `options.provider` and `options.model` in place before `ctx.llm.stream(options)`, so `summarizeWithLlm` returns and durably records the exact provider/model that wrote the summary in `compaction/summary`. Exact-target `modelPolicies` on the profile's `compaction-basic` row config are still forwarded verbatim:
101
+ 每次摘要调用(`options.purpose === 'compaction'`)同样通过 `compactionScope` 按会话实时解析路由:该会话供应商组的压缩对 → 全局压缩卡片对 → 官方行的 `modelPolicies` / 会话目标模型默认。当解析出按会话路由时,子上下文的 `llm` 包装器在调用 `ctx.llm.stream(options)` 前原地更新 `options.provider` 与 `options.model`,从而让官方 `summarizeWithLlm` 返回并持久记录到 `compaction/summary` 的模型对与实际写摘要的模型完全一致。同时,profile 的 `compaction-basic` 行配置里的精确目标 `modelPolicies` 数组仍原样转发:
104
102
 
105
103
  ```yaml
106
104
  - id: compaction-basic
@@ -113,52 +111,52 @@ Each summarization call (`options.purpose === 'compaction'`) also resolves its r
113
111
  summarizationModel: deepseek-reasoner
114
112
  ```
115
113
 
116
- How the route reaches the engine depends on where the deployment runs its agent plane. The Web surface moves compaction into each agent preset's isolated `compaction` group, and profile patches cannot address rows inside a preset's `plugins` list — so the Host bridges that nested row at startup (`src/preset-sync.ts`): it disables the group's official `compaction-basic` and inserts `model-switch-compaction` directly after it, which mounts the **same official `BasicCompactionEngine`** under `compactionScope`. Every other preset row is left exactly as the installed DSH (or a deployment's own Web-editor save) wrote it; the plugin ships no preset copies, so a DSH preset change needs no re-sync and a deployment's preset edits are preserved. Surfaces that compose the agent process-wide (the TUI) use the top-level row replacement instead.
114
+ 路由如何到达压缩引擎取决于部署在哪一层组合 agent。Web 面把压缩放进每个 Agent 预设的隔离 `compaction` 组里,而 profile patch 无法寻址 preset `plugins` 列表内部的行——因此 Host 在启动时桥接那一行(`src/preset-sync.ts`):禁用该组的官方 `compaction-basic`,并在其后插入 `model-switch-compaction`,由它在 `compactionScope` 下挂载**同一份官方 `BasicCompactionEngine`**。其余预设行一律保持安装版 DSH(或部署在 Web 编辑器里保存的版本)的原样;插件不再随包携带预设副本,所以 DSH 改预设无需再同步副本,部署自己的预设修改也不会被覆盖。进程级组合 agent 的面(如 TUI)则走顶层行替换。
117
115
 
118
- Known issue (upstream; recorded in `docs/seam-gap.md`): while the working set stays above the official engine's pressure threshold, automatic compaction can fire on every step and keep re-attempting ranges whose summaries fail the engine's own "summary must be smaller" guard — a visible loop of automatic compactions that this plugin does not control (verified in a session A/B with the plugin enabled and disabled). Mitigations on the forwarded row config: `auto: false` (keeps `/compact`), a higher `thresholdRatio`, a smaller mounted tool schema, or a pinned compaction model whose summaries are leaner.
116
+ 已知问题(上游侧,见 `docs/seam-gap.md`):当工作集持续超过官方引擎的压力阈值时,自动压缩可能每步触发,并反复重试摘要过不了官方「摘要必须更小」守卫的小片段——表现为"不停自动压缩",本插件不控制该行为(已在同一会话做过插件开/关 A/B 对照)。可用的缓解(都在转发行配置上):`auto: false`(保留 `/compact`)、调高 `thresholdRatio`、减少挂载的工具 schema,或固定一个摘要更精炼的压缩模型。
119
117
 
120
- ## Session naming model
118
+ ## 会话命名模型(Session naming model)
121
119
 
122
- DSH names new sessions automatically; the profile's official naming row decides the cadence (right after the first prompt, or on every prompt). The "Session naming model" card picks the model those naming requests use. **Off — both fields empty — is the official behavior: naming follows the session's own model.** On pins a provider/model as an editable starting point.
120
+ DSH 会自动为新会话起名;命名的触发节奏由 profile 的官方命名行决定(首条提示后一次,或每条提示一次)。「会话命名模型」卡片选择这些命名请求使用的模型。**关闭——两个字段都留空——即官方行为:命名跟随会话自身的模型。** 打开时以目录首位模型作为可再改的固定起点。
123
121
 
124
- The route is read through on every naming request: a saved change applies to the very next title with no restart, and a naming request already in flight is never interrupted by a save. Each request resolves its route in order — the session's provider group's naming pair, then the card's flat pair, then the session's own model. The request runs through the official naming implementation, which records the exact provider/model in the session's own `session/title-llm-request` event, so the durable record and the real request always agree. The plugin replaces the official `session-title-llm` row instead of forking the naming logic (the seam allows one registered naming provider per context) and mirrors the cadence that row declared; a profile with no official naming row keeps DSH's deterministic fallback title.
122
+ 路由在**每次命名请求时现读**:保存后对下一次起名立即生效、无需重启,且进行中的命名请求不会被保存打断。每次请求按顺序解析路由:该会话供应商组里的命名对,其次卡片的部署级对,其次会话自身的模型。请求经由官方命名实现发出,它会把实际使用的 provider/model 记录到该会话自己的 `session/title-llm-request` 事件里,因此持久记录与真实请求永远一致。本插件替换官方的 `session-title-llm` 行而不分叉命名逻辑(该接缝每个上下文只允许注册一个命名 provider),并镜像该行声明的节奏;profile 没有官方命名行时保持 DSH 的确定性兜底标题。
125
123
 
126
- Since 0.4.29 the row also coexists with the experimental "titles that update with the conversation" bundle (`dsh-experimental-session-titles-bundle`, which inserts an all-prompts naming row): enabling that bundle keeps this plugin owning the single naming-provider slot, mirrors the all-prompts cadence so titles refresh with every prompt, and keeps the naming-model and provider-group routes in force (the provider id recorded per title is `session-title-all-prompts-llm`, exactly what the official row would record). Disabling the bundle restores the first-prompt cadence with the same route override. The takeover only uses released loader seams — the `loader/patch-context` waterfall, `Entry.update`, and `sessionTitle.register` plus its disposer — letting the official row register successfully first and then disabling it, so enabling the bundle no longer raises the `already registered` activation-failure toast.
124
+ 0.4.29 起与实验包「随对话更新的标题」(`dsh-experimental-session-titles-bundle`,插入 all-prompts 命名行)兼容:启用该实验包时,本插件接管同一个命名 provider 槽位并镜像 all-prompts 节奏,标题随对话更新,同时命名模型路由与供应商组路由继续生效(`session/title` 记录中的 provider id 为 `session-title-all-prompts-llm`,与官方行一致);禁用实验包即回到首条提示节奏与同样的路由覆写。实现只使用 loader 已发布的缝(`loader/patch-context` 瀑布、`Entry.update`、`sessionTitle.register` 及其 disposer),让官方行先成功注册、再被停用并由本行重占槽位,因此启用时不再出现 `already registered` 激活失败弹窗。
127
125
 
128
- Since 0.4.30 the Auto review row also survives a degraded permission service. DSH's Auto gate reads `permissionPresets.current(session)` before every tool call, and when that service has gone inactive the read throws `cannot get required service "sessionProjections" in inactive context` outside the gate's own reviewer-error handling — so every tool call died before its body ran. The row shadows that service inside its review scope: a failed probe reports "not on Auto", the tool call runs normally, and one log line states that review was skipped. Since 0.4.31 the shadow is **always on** and resolves the service lazily per call (so it protects even while the service is still activating), and its one degradation line carries the exact fiber chain (`uid/state/name/inject` per fiber) that failed resolution — because the upstream cause is a loader lifecycle window: `internal/get` walks the whole caller fiber chain and twenty-four released rows declare `sessionProjections`, so any one of them mid-reload can break an unguarded probe (recorded in `docs/seam-gap.md` with the upstream proposal). The Auto registration itself is brokered — handed over and reclaimed around displacements without unmounting the gate, since unmounting is what flips live `auto` sessions to `danger-full-access` — and a gate re-mounted after a profile reload unloads its previous registration first, so the `auto` preset cannot disappear from the permission picker.
126
+ 0.4.30 起 Auto 审查行还能在许可服务降级时保住工具调用:DSH 的 Auto gate 在每次工具调用前读取 `permissionPresets.current(session)`,一旦该服务失活,这次读取会在 gate 自己的审查错误包装之外抛出 `cannot get required service "sessionProjections" in inactive context`,导致每个工具调用都在执行前失败。本行在审查作用域内遮蔽该服务:探测失败即按「不在 Auto」处理,工具调用照常执行,并只记一行日志说明审查被跳过。0.4.31 起该遮蔽**常开**且按调用惰性解析服务(服务尚未激活时也受保护),并把失败的解析链(每级 fiber 的 `uid/state/name/inject`)记进唯一那行降级日志——因为上游成因是 loader 生命周期窗口:`internal/get` 会沿调用方 fiber 链整链查找,而有 24 个已发布行在 `inject` 里声明了 `sessionProjections`,其中任何一行处于重载中都可能打断无防护的探测(连同上游建议一并记录在 `docs/seam-gap.md`)。Auto 注册本身改为**托管**:位移时同步交出、事后收回而不卸载 gate(卸载会把在用 `auto` 的会话翻成 `danger-full-access`);配置重载后重新挂载的 gate 会先卸载上一个注册,因此 `auto` 预设不会再从许可选择器里消失。
129
127
 
130
128
 
131
- ## Provider groups
129
+ ## 供应商配置组(Provider groups)
132
130
 
133
- The "Provider groups" card stores one route group per provider — the compaction, auto-review, session-naming, and subagent routes saved together — and a group saved for provider X applies to the sessions whose own provider is X. Groups are **derived, not written**: switching a session's provider writes nothing, so two sessions on different providers can never overwrite or redirect each other's auxiliary routes.
131
+ 「供应商配置组」卡片为每个供应商保存一组路由——压缩、自动审查、会话命名与子代理四条路由一起存;为供应商 X 保存的组,作用于自身供应商就是 X 的会话。组是**推导出来的,而不是写进去的**:切换某个会话的供应商不写任何东西,因此不同供应商上的多个会话并行时再也不会互相覆盖、互相改写对方的辅助路由。
134
132
 
135
- Every request derives its own route from durable state: the session's provider (its model selection — a just-made pending selection counts — else its latest logged request route), then the group pair for that provider, then the flat deployment-wide pair, then the official default (the conversation target for compaction; the session's own model for auto review and naming; official inherit for subagents, where the fixed card applies only in `fixed` mode). Because nothing is written, this works for sessions this browser never opened and for switches made from the TUI or another client, with no watcher and no residual boundary; a session with no observable provider simply resolves to the deployment default. Mid-session provider switches take effect on the very next compaction, review, title, or subagent call. In the editor, a provider's draft seeds from the currently active routes the first time you configure it, each row's off state means "no pin — fall through to the card, then the official default", and **Delete group** removes the provider's entry entirely (clearing the stored field when the last group goes).
133
+ 每次请求都从持久状态推导自己的路由:先取该会话的供应商(它的模型选择——刚做出、尚未被请求消费的 pending 选择优先——其次最近一次已记录的请求路由),再取该供应商的组对,再取部署级的平铺对,最后是官方默认(压缩用会话目标模型;自动审查与命名用会话自身模型;子代理用官方继承,且平铺卡片仅在 `fixed` 模式下生效)。因为什么都不写,本浏览器从未打开过的会话、以及来自 TUI 或其他客户端的切换同样生效——没有 watcher,也没有剩余边界;观察不到供应商的会话直接落到部署默认。会话中途切换供应商后,下一次压缩、自动审查、命名或子代理调用都会立即跟随新供应商的配置组。编辑器里首次配置某供应商时,草稿从当前生效的路由种子化;每行的关闭态表示"不固定——先落到卡片、再落到官方默认";「删除该组」彻底移除该供应商的条目(删掉最后一组时同时清掉存储字段)。
136
134
 
137
- ## What Model Switch does not change
135
+ ## Model Switch 不会改变什么
138
136
 
139
- - `web_fetch` and its configured provider
140
- - Vision routing, `read_image`, and ordinary chat attachments
141
- - Provider login, credentials, or provider settings cards
142
- - Official Agent Presets
143
- - Existing provider-specific image tools
144
- - The deployment default model (DSH persists the last session switch itself, same as native TUI switching)
145
- - Global compaction policy, naming cadence (only the naming model is configurable), or DSH Core
137
+ - `web_fetch` 及其配置的 provider
138
+ - Vision 路由、`read_image` 和普通聊天附件
139
+ - Provider 登录、凭证或 Provider 设置卡
140
+ - 官方 Agent Presets
141
+ - 已有的 Provider 专属图像工具
142
+ - 部署默认模型本身(DSH 自己把最后一次会话切换写成默认值,与原生 TUI 切换一致)
143
+ - 全局压缩策略、命名节奏(只可配置命名模型)或 DSH Core
146
144
 
147
- ## Installation
145
+ ## 安装
148
146
 
149
- Model Switch ships prebuilt code, so an install needs no build authorization. Install it from the npm registry:
147
+ Model Switch 交付的是预构建代码,安装不需要任何构建授权。从 npm 注册表安装:
150
148
 
151
149
  ```sh
152
150
  dsh plugin --profile web add --force dsh-model-switch
153
151
  ```
154
152
 
155
- A packed tarball installs the same build without a registry:
153
+ 打包好的 tarball 可以在不走注册表的情况下安装同一份构建:
156
154
 
157
155
  ```sh
158
- dsh plugin --profile web add --force ./dsh-model-switch-0.4.26.tgz
156
+ dsh plugin --profile web add --force ./dsh-model-switch-0.4.67.tgz
159
157
  ```
160
158
 
161
- Then install only the provider adapters you use. This release was checked against official DeepSeek Harness `0.1.7-rc.2` and verified on `0.2.0-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.3` (rc.3 currently ships on the `next` dist-tag):
159
+ 然后只安装实际使用的 Provider Adapter。此版本已在官方 DeepSeek Harness `0.1.7-rc.2` 上检查,并在 `0.2.0-rc.2` 至 `0.2.2-rc.5`(含 0.2.1-rc.2/rc.3 与 0.2.2-rc.1/rc.2/rc.3/rc.5;rc 线走 `next` 通道)上验证:
162
160
 
163
161
  ```sh
164
162
  dsh plugin --profile web add --force \
@@ -169,81 +167,83 @@ dsh plugin --profile web add --force \
169
167
  https://github.com/NOirBRight/dsh-llm-grok/releases/latest/download/dsh-llm-grok-0.3.19.tgz
170
168
  ```
171
169
 
172
- ### Search routing (0.4.7)
170
+ ### 搜索供应商统一接入(0.4.7)
171
+
172
+ 搜索列表来自 Host 上已有的 `ModelSwitchAdapterRegistry`,Provider 自声明名称和独立搜索模型;浏览器只收到普通元数据,不收到凭据或可执行函数。注册、卸载会通知订阅者;原地修改模型声明最迟由 20 秒心跳更新。`ProviderDirectory` 继续负责客户端 role/usage,不另造注册表。 已发布 0.2.8 的 `sortCatalogGroups` 只排序硬编码 LLM 路由;Model Switch 自行按实时 `catalogRoutes` 排序,因此 Owner 公布 Agent catalog id 时会跟随已保存的卡片顺序。原生 `catalogId` / `unknown` 账户样式仍需要比已发布 0.2.8 更新的 Owner。模型原生联网不等于独立 `web_search` 适配器。
173
173
 
174
- Providers declare independent search adapters and model metadata on the existing Host `ModelSwitchAdapterRegistry`. The browser receives only id/name/model metadata over authenticated Connection RPC, not adapters or credentials. Registration/unload updates subscribers; in-place catalog changes are picked up by the bounded 20-second heartbeat. `ProviderDirectory` remains the client role/usage owner, not a second Host execution registry. Published 0.2.8 `sortCatalogGroups` only ranks hardcoded LLM routes; Model Switch ranks live `catalogRoutes` itself so Agent catalog ids follow saved card order when the Owner publishes them. Native `catalogId` / `unknown` account styling still need a newer Owner than published 0.2.8.
174
+ DeepSeek 薄适配器调用官方公开 `DeepSeekSearchProvider`,复用用户的 `web-search-deepseek` 设置和公开凭据服务;Codex 复用 ChatGPT 登录,Grok 复用已有订阅凭据。缺凭据、配置错误、模型不支持均明确失败,不静默切换。
175
175
 
176
- DeepSeek uses the official public `DeepSeekSearchProvider`, the existing `web-search-deepseek` settings and credential service. Codex uses its existing ChatGPT credentials; Grok uses its existing subscription token and provider-owned Responses search. Native conversational networking alone does not create a search option. Missing credentials, invalid settings, unsupported models and unavailable adapters fail explicitly, without fallback.
176
+ **注册不等于选中全局路由。** 安装插件不再覆盖 Web 配置。部署时先用 `dsh --profile web --dump-config` 查看完整 Web 配置,只把 `searchProvider` 改为 `model-switch`,其余字段原样保留。注意 id 定位的 patch 会整体替换 `config`,不会深度合并;不能只写 searchProvider,也不能把自定义 fetchProvider 写死成 http。
177
177
 
178
- **Registering an adapter does not select the global Web route.** Installation leaves the deployment's existing Web configuration untouched. To opt in, set the existing Web entry's `searchProvider` to `model-switch` while retaining **every other existing config field**, especially `fetchProvider`. DSH id-targeted patches replace the entire config rather than deep-merging it: copy the complete effective config from `dsh --profile web --dump-config`, then change only searchProvider in the deployment/user patch. Do not copy an assumed `fetchProvider: http` over a custom pin.
178
+ 然后在 Model Switch 设置中选择请求的供应商/模型。全局已选 Model Switch、但没有完整且受支持的搜索配置时,官方选择层返回 `WEB_PROVIDER_CONFIGURED_UNAVAILABLE`,不会回退 DeepSeek。全局未选 Model Switch 时,下拉框不控制官方搜索;未固定全局供应商且有多个可用 provider 时会明确报歧义。卸载前应恢复部署原来的搜索路由。官方 `web_search`、`web_fetch` 均不替换。
179
179
 
180
- After opting in, configure the requested search provider/model in Model Switch Settings. No complete supported route means `WEB_PROVIDER_CONFIGURED_UNAVAILABLE` through the official selector; there is no automatic DeepSeek fallback. Without the global pin, the dropdown does not control `web_search`. An unpinned Web service can become ambiguous when multiple search providers are usable. Before uninstalling Model Switch, restore the deployment's prior search pin; otherwise the official selector correctly reports a missing configured provider. The official `web_search` and `web_fetch` tools are never replaced.
180
+ 本轮分支、测试命令及 3082 live 证据见 [搜索接入审计](docs/search-provider-audit.md)。经授权复用生产 DeepSeek 凭据后,Flash/Pro 的 3082 真实搜索均通过,三家均已有成功证据。Picker 测试夹具及审查发现的元数据恢复问题已修正,保留 v0.4.6 兼容性后全量 172 个测试通过。生产推广仍须先在 lab 安装验收同一组不可变发布产物。
181
181
 
182
- Release-aligned search regression: `DSH_RELEASE_ANCHOR=/path/to/official/install/package.json pnpm exec vitest run --config tests/vitest.release.config.ts`. See [search audit and acceptance](docs/search-provider-audit.md) for exact baselines, dependencies and live status.
182
+ 如果 profile 已安装 `dsh-composer-picker`,请先移除它。Model Switch 已经拥有 Composer Picker 和 Plan Review 席位;同时安装会产生重复或竞争 UI。
183
183
 
184
- If `dsh-composer-picker` is installed, remove it from the profile before enabling Model Switch. Model Switch already owns the Composer Picker and Plan Review seat; two owners produce duplicate or competing UI.
184
+ 生产 profile 必须使用已发布的注册表版本或 GitHub tag,不能使用工作区本地依赖。安装或修改路由后重启对应的 DSH profile。**安装、更新、启用或禁用本插件后都要重启一次**:它持有 Host 侧的行,并在运行时接管官方的自动审查行(`permissionPresets.registerAuto` 只有一个注册位);不重启直接热启用时,官方行可能仍在服务,接管只能先把审查路径屏蔽掉——工具照常运行、本次审查跳过并留一条日志——重启后才会真正收敛。
185
185
 
186
- Production profiles must use a released registry version or GitHub tag rather than workspace-local dependencies. Restart the selected DSH profile after installation or route changes. **Restart once after installing, updating, enabling or disabling this plugin**: it owns Host rows and takes the official Auto-review row over at runtime (`permissionPresets.registerAuto` is a single registration slot); when a hot enable skips the restart, the official row may still be serving, so the takeover only shields the reviewer path — tools keep running, that call's review is skipped with one log line — and the seam converges on the next start.
186
+ ## 兼容性
187
187
 
188
- ## Compatibility
188
+ DSH Host peer 和开发依赖接受 `>=0.1.7-alpha.2`,包括 rc.1 和后续版本。开发锁文件解析到 rc.2。Cordis 接受 `>=4.0.4 <5.0.0`。
189
189
 
190
- DSH Host peers and development dependencies accept `>=0.1.7-alpha.2`, including rc.1 and later releases. The development lockfile resolves to rc.2. Cordis accepts `>=4.0.4 <5.0.0`.
190
+ 已验证版本:`0.1.7-alpha.2`、`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.2-rc.1`、`0.2.2-rc.2`、`0.2.2-rc.3`、`0.2.2-rc.5`。0.2.0 的声明覆盖三处差异:Host 改名的提问撤下动词(`cancel()` → `dismiss()`)、`session.selectModel` 不 await 的部署默认值写入、以返回值报出的 `ModelDirectory.select` 拒绝;三者均已在 lab(3082/3085)与真实桌面会话中逐一验证。0.2.1 的声明覆盖两处被替换的 seam:共享命名调用改为 provider 自备提示词与解析的 `executeSessionTitleLlm`(本插件按安装行在运行时适配,并镜像官方 0.2.1 的提示词、取最低 reasoning effort 与 `currentTitle` 锚定);Subagent 运行时以 `startActivation` 取代 `start()`/`startContinuable()`,本插件同时识别两条已发布线,并为激活入口覆写 `spec.request.agentOptions`(显式路由仍优先、非 agentOptions 能力的外部适配器不改写),路由语义与旧线一致(0.4.28,记录于 `docs/seam-gap.md`);0.2.1 还新增了自动审查门禁对 `ctx.workingDirectory` 的读取,旧实现因在自己的 fiber 里直调 `official.apply` 而需要手工镜像门禁的 `inject`,于是每个工具调用都被拒(`cannot get property "workingDirectory" without inject`),0.4.28 改为把官方门禁以插件方式挂载、由官方 `inject` 解析依赖,本行只声明自身需要的服务。0.4.28 的真实包证据:0.2.1 上旧形态精确复现该注入错误、新形态到达 `workingDirectory.ensure` 且成功注册门禁、激活入口的路由改写与 spec 透传通过;0.2.0 上无需 `workingDirectory` 服务即可注册门禁,`start()` 路由改写与父身份保持不变。0.2.1 的 lab 证据为:npm 安装的 0.2.1 运行时 + 打包后的 0.4.26 组合 `exit 0`、命名/压缩/自动审查/子代理四行均来自本插件、Web Host 在 3082 启动并服务需要鉴权的页面;该次未经浏览器调用 3082 能力 RPC,真实桌面的 0.2.1 命名差分在应用升级后复验。0.2.1 还暴露出一处预设层面的差异(0.2.1 校验提示词变量、只有 `provider`/`model`,且把 `time-context`/`tool-schedule` 移进预设):0.4.26 的静态预设副本因此让每一轮都报 `unknown prompt variable "{{cwd}}"`,0.4.27 删除副本改为启动期运行时桥接,并在 lab 的 0.2.1 headless 真实回合中验证通过(展开见 CHANGELOG 0.4.27)。0.2.1-rc.3 是纯客户端改动:本品读到的三个包都是加法——`ui-conversation` 新增 `conversation.session.header.views.actions` 槽位与 header 的 `entryPins`/`entryActions`/`setPinned`(`conversation.composer` 链与 `ComposerChainProps` 一字未改)、`ui-primitives` 新增 `IconAppsAddOutline*` 图标、`ui-user-questions` 只有版本号;`experimental-auto-review`、`dsh-tools`、`dsh-session`、`dsh-subagent` 与 `api/*` 在 rc.3 中源码未变(后者只有版本号)。插件本体零改动,在 rc.3 lab(3083,`@deepseek-ai/dsh@0.2.1-rc.3`)复验:挂载无 unverified 告警、58 条默认名单、纯读跳过计数、写操作仍审查、计划卡「去聊天里说」回合以 `aborted` 结束、草稿跨会话保留;再用同一产物在 rc.2 lab(3082)回归通过(展开见 CHANGELOG 0.4.41)。0.2.2 线(rc.1 至 rc.5)已逐版本验证并声明兼容:rc.2 把 SubagentActivationSpec 扁平化,由 0.4.64 的双形状兼容承接;rc.4 未单独发布,其变化并入 rc.5 验证;npm `latest` 仍是 `0.2.2-rc.1`,rc 线走 `next` 通道,桌面 runtime 已实际更新(详见 CHANGELOG 0.4.63–0.4.66)。
191
191
 
192
- Verified releases: `0.1.7-alpha.2`, `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.2`. The 0.2.0 claim covers the Host's renamed question verbs, its unawaited `session.selectModel` default write, and its returned `ModelDirectory.select` refusal, each verified in the lab and on a live desktop session.
192
+ DSH 兼容按「下界 + 区间」声明(`dsh.compatibility.dshRuntime: ">=0.2.0-rc.2"`):≥ 该下界一律挂载且不再告警,`blocklist` 仍最优先,加载保持 fail-open。`package.json#dsh.compatibility.dshReleases` 里的逐版本记录是证据,不是允许列表。新增验证声明前要审查公开 API 变化并测试新 Host 版本。
193
193
 
194
- DSH compatibility is declared as an open-ended floor (`dsh.compatibility.dshRuntime: ">=0.2.0-rc.2"`): every runtime at or above it mounts without an unverified warning, a `blocklist` still wins, and loading stays fail-open. The releases in `package.json#dsh.compatibility.dshReleases` are evidence, not an allowlist. Review public API changes and test new Host releases before adding a verification claim.
194
+ **第三方自动模式(0.4.59 起不再支持)。** 本插件曾把自动审查路由与纯读名单注入 [`@log.li/dsh-automode`](https://github.com/log-li/dsh-automode) 的内存配置;该适配已冻结并从 `cordis.patch.yml` 移除,源码标注 `@deprecated`,下个大版本删除。该插件被禁用或卸载均属预期,profile 里也不应再出现 `auto-mode` 预设;`auto` 档位由 `@deepseek-ai/dsh-experimental-auto-review` 提供,与本插件无关。
195
195
 
196
- **Third-party auto modes (dropped in 0.4.59).** This plugin used to inject its Auto-review route and pure-read list into the in-memory config of [`@log.li/dsh-automode`](https://github.com/log-li/dsh-automode). That adapter is frozen and removed from `cordis.patch.yml`; the source is marked `@deprecated` and will be deleted next major. Disabling or uninstalling that plugin is expected, and no `auto-mode` preset should be written in the profile. The `auto` preset comes from `@deepseek-ai/dsh-experimental-auto-review`, not from this plugin.
196
+ **审查超时(0.4.67 起移除)。** 本插件曾把自动审查的流式空闲超时写入审查模型所在 Provider 的 `streamIdleTimeoutMs`;该适配已冻结并从 `cordis.patch.yml` 移除,源码标注 `@deprecated`,下个大版本删除。设置页的「审查超时」卡片已撤下,Provider 的空闲超时回归上游默认(300 秒);此前写入过该键的 profile 不会被自动清理,需要时可自行删除该行。
197
197
 
198
- ## Development
198
+ ## 开发
199
199
 
200
- Requires Node 22.19+ and pnpm.
200
+ 需要 Node 22.19+ 和 pnpm。
201
201
 
202
202
  ```sh
203
203
  pnpm install
204
204
  pnpm run check
205
205
  ```
206
206
 
207
- `check` builds Host and Client artifacts, runs unit and Cordis/Settings composition tests, validates the extracted package, and verifies reproducible bundles. Product scope is defined in [PRODUCT.md](PRODUCT.md); implementation constraints live in [IMPLEMENTATION_PLAN.md](IMPLEMENTATION_PLAN.md).
207
+ `check` 会构建 Host/Client artifacts,运行单元测试和 Cordis/Settings 组合测试,检查提取后的发布包,并验证 bundle 可复现。产品范围见 [PRODUCT.md](PRODUCT.md),实现约束见 [IMPLEMENTATION_PLAN.md](IMPLEMENTATION_PLAN.md)。
208
208
 
209
- ## Release installation (Latest)
209
+ ## 正式版安装(Latest)
210
210
 
211
- Explicit model routing for Main, Subagent, Composer, Plan Review, and capability tools, checked on official DeepSeek Harness `0.1.7-rc.2` and `0.2.0-rc.2`. The release artifact contains built Host/Client files, not sibling source or local paths.
211
+ 本版在官方 DeepSeek Harness `0.1.7-rc.2` 至 `0.2.2-rc.5` 上验证了子代理、Composer、Plan Review 与能力路由;发布包只包含构建后的 Host/Client 产物,不包含兄弟仓库源码或本机路径。
212
212
 
213
- Latest installation (the asset filename must match the current latest release):
213
+ Latest 安装命令(资产文件名必须与当前 latest Release 一致):
214
214
 
215
215
  ~~~sh
216
216
  dsh plugin --profile web add --force \
217
217
  https://github.com/NOirBRight/dsh-llm-providers-ui/releases/latest/download/dsh-llm-providers-ui-0.2.14.tgz
218
218
  dsh plugin --profile web add --force \
219
- https://github.com/NOirBRight/dsh-model-switch/releases/latest/download/dsh-model-switch-0.4.16.tgz
219
+ https://github.com/vandoor7-droid/dsh-model-switch/releases/latest/download/dsh-model-switch-0.4.67.tgz
220
220
  ~~~
221
221
 
222
- Fixed-version installation:
222
+ 固定版本安装命令:
223
223
 
224
224
  ~~~sh
225
225
  dsh plugin --profile web add --force \
226
226
  https://github.com/NOirBRight/dsh-llm-providers-ui/releases/download/v0.2.14/dsh-llm-providers-ui-0.2.14.tgz
227
227
  dsh plugin --profile web add --force \
228
- https://github.com/NOirBRight/dsh-model-switch/releases/download/v0.4.16/dsh-model-switch-0.4.16.tgz
228
+ https://github.com/vandoor7-droid/dsh-model-switch/releases/download/v0.4.67/dsh-model-switch-0.4.67.tgz
229
229
  ~~~
230
230
 
231
- Update, uninstall, and verify:
231
+ 更新、卸载与验证:
232
232
 
233
233
  ~~~sh
234
- # Update to the latest Release
234
+ # 更新到最新 Release
235
235
  dsh plugin --profile web add --force \
236
236
  https://github.com/NOirBRight/dsh-llm-providers-ui/releases/latest/download/dsh-llm-providers-ui-0.2.14.tgz
237
237
  dsh plugin --profile web add --force \
238
- https://github.com/NOirBRight/dsh-model-switch/releases/latest/download/dsh-model-switch-0.4.16.tgz
239
- # Verify the loaded version
238
+ https://github.com/vandoor7-droid/dsh-model-switch/releases/latest/download/dsh-model-switch-0.4.67.tgz
239
+ # 验证加载与版本
240
240
  dsh plugin --profile web list
241
- # Uninstall only this plugin
241
+ # 只卸载本插件
242
242
  dsh plugin --profile web remove dsh-model-switch
243
243
  ~~~
244
244
 
245
- Configuration: use the plugin section in Settings for Web UI plugins, or the profile dsh.profile.bundles entry for Host-only plugins. Start with this README's minimal YAML/JSON example and provide credentials/backend addresses explicitly.
245
+ 配置入口:Web 使用「设置」中的本插件页面;Host-only 插件使用 profile 的 dsh.profile.bundles 配置。
246
246
 
247
- Rollback: reinstall the immutable v0.4.15 archive and restore the recorded profile; no Host downgrade is required. Inspect journalctl --user -u dsh-web.service; never link a checkout into production.
247
+ 回滚:重新安装上一版(v0.4.66)的不可变归档并恢复已记录的 profile;不需要降级 Host。失败时查看 DSH Host 日志,不要将源码 checkout 链入生产 profile。
248
248
 
249
- Release and integrity: [v0.4.16](https://github.com/NOirBRight/dsh-model-switch/releases/tag/v0.4.16) · [SHA256](https://github.com/NOirBRight/dsh-model-switch/releases/download/v0.4.16/dsh-model-switch-0.4.16.tgz.sha256).
249
+ Release 与完整性:[v0.4.67](https://github.com/vandoor7-droid/dsh-model-switch/releases/tag/v0.4.67) · [SHA256](https://github.com/vandoor7-droid/dsh-model-switch/releases/download/v0.4.67/dsh-model-switch-0.4.67.tgz.sha256)。
package/cordis.patch.yml CHANGED
@@ -81,9 +81,6 @@
81
81
  - id: model-switch-prime-memory-compat
82
82
  name: 'dsh-model-switch/prime-memory-compat'
83
83
 
84
- # Write the configured reviewer stream idle timeout into the reviewer
85
- # routes' pi-ai provider profiles (the only place the upstream watchdog
86
- # reads it). The write lands in the profile document, so it takes effect on
87
- # the next start — same channel as the memory static pin.
88
- - id: model-switch-review-timeout
89
- name: 'dsh-model-switch/review-timeout'
84
+ # 2026-11-19 冻结:审查超时适配行已移除,本插件不再写 reviewer provider 的
85
+ # streamIdleTimeoutMs。源码保留一个版本(src/review-timeout.ts 标注
86
+ # deprecated),下个大版本删除。
Binary file