@ljwei-stak/dsh-model-router 0.19.0 → 0.20.0

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.zh.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # Model Router · DeepSeek Harness 模型路由插件
2
2
 
3
- 版本:**0.19.0**。选模求解器概览见[路由研究说明](docs/ROUTING_RESEARCH.zh.md);公式、条件证明与实验见[数学推导与实验记录](docs/ROUTING_DERIVATION_EXPERIMENTS.zh.md)。[LiveBench 最新证据与验证协议](docs/ROUTING_LIVEBENCH_VALIDATION.zh.md)已核查 2026-06-25 聚合评分/费用;最新逐题质量—费用矩阵尚未取得,不声称真实路由收益。
3
+ 当前版本:**0.20.0**。选模求解器概览见[路由研究说明](docs/ROUTING_RESEARCH.zh.md);公式、条件证明与实验见[数学推导与实验记录](docs/ROUTING_DERIVATION_EXPERIMENTS.zh.md)。[LiveBench 最新证据与验证协议](docs/ROUTING_LIVEBENCH_VALIDATION.zh.md)已核查 2026-06-25 聚合评分/费用;最新逐题质量—费用矩阵尚未取得,不声称真实路由收益。
4
4
 
5
5
  为 **DeepSeek Harness Desktop** 提供任务规划、成本感知的模型分配和官方工具执行工作台。输入任务,比较已配置模型,审阅计划,再明确选择是否执行。
6
6
 
7
+ **0.20.0**:工作台新增**官方工具协作**,按依赖执行官方 CLI 工作包,不自动回退 API。编辑任务可明确选择 **Harness 受限环境**或**厂商 CLI 正常环境**;后者以当前用户权限保留原登录、配置、技能和 MCP,单独确认后才启动,Git 工作树用于改动回收,不构成操作系统读写边界。CLI 默认使用自身模型,仅显式映射才切换。Windows Claude 实际执行、Claude → MiniMax 依赖交接与补丁整合已通过,见[验收与限制](docs/releases/0.20.0-validation.md)。
8
+
7
9
  **0.19.0**:官方工具终端同步完整注册表与保存的安装目录,补齐 OpenCode、Step 和 ZCode 内置 TUI。ZCode 可单独保存桌面目录、检查更新和重新安装;内置 CLI 随桌面版更新。终端刷新重新发现工具并丢弃迟到结果。
8
10
 
9
11
  **0.18.2**:厂商脚本使用统一根目录下的工具专属子目录,修复 Step 安装替换其他 npm 工具包的问题。Gemini/OpenCode 安装成功与受限执行能力分别显示;Windows Gemini 使用核验后的包入口通过 Node 启动。先升级并重启 Harness,再更新 Step。
@@ -22,7 +24,7 @@
22
24
 
23
25
  **0.16.0 新增**:[动态数据与持续反馈](docs/ROUTING_ADAPTIVE_LEARNING.zh.md):可选公开价格/LiveBench快照刷新;按任务类型、时间衰减和低样本收缩调整个人偏好,质量门槛独立保留。设置在“预算与安全”,公开源默认关闭;价格源需提供按官方文档核对的固定USD单价JSON,不是通用官网抓价器。本地DSH_HOME共享、最近200运行窗口,暂无真实收益证明。
24
26
 
25
- 当前版本为 **0.19.0**,包名为 `@ljwei-stak/dsh-model-router`;声明兼容的宿主为 **DeepSeek Harness Desktop 0.2.0-rc.1 / 0.2.0-rc.2**。自 0.12.0 起,路由与 [GAL](https://github.com/Alice-Marx/deepseek-harness-galgame) 已拆成两个独立插件。
27
+ 当前版本为 **0.20.0**,包名为 `@ljwei-stak/dsh-model-router`;声明兼容的宿主为 **DeepSeek Harness Desktop 0.2.0-rc.1 / 0.2.0-rc.2**。自 0.12.0 起,路由与 [GAL](https://github.com/Alice-Marx/deepseek-harness-galgame) 已拆成两个独立插件。
26
28
 
27
29
  **0.15.0 更新**:工作台分为四页,路由建议紧接任务规划展示;执行输入变化时丢弃旧预览;裁剪历史或重试后仍保留费用累计;源码开发新增独立模拟 UI 预览。
28
30
 
@@ -38,7 +40,7 @@
38
40
  | 模型配置 | 读取 Harness 官方目录中的准确 `provider/model`;可填写自报质量、美元单价、专长、CLI 模型名、执行与计费偏好。 |
39
41
  | 路由方案 | 省钱优先、均衡、效果优先;按质量门槛、预估 token 成本与有限组合搜索分配模型。未知价格保持未知。 |
40
42
  | 只读执行 | 工作台先预览、再确认执行;也可在官方会话调用工具。支持的无界面 CLI 或模型目录 API 返回结果并留存记录。 |
41
- | 可编辑执行 | 通过官方会话启动单个 CLI 或顺序 CLI 团队,经审批在独立 Git 工作树修改,满足条件后整合补丁。 |
43
+ | 可编辑执行 | 工作台启动顺序 CLI 团队,或官方会话启动单个支持的 CLI;经审批在独立 Git 工作树修改,满足条件后整合补丁。 |
42
44
  | 官方工具 | 十个固定注册表工具的检测、安装/更新、可信入口与登录体检;安装有日志和取消操作。 |
43
45
  | 交互终端 | 系统终端/PowerShell 与十个注册表 CLI(ZCode TUI 使用已核验的 Windows 桌面安装),含固定登录命令、多会话和实时输出。 |
44
46
  | 成本与订阅 | 每日/月度预算检查、自动尝试省钱方案或暂停、订阅优先、额度冷却,以及其他订阅失败的确认流程。 |
@@ -54,7 +56,7 @@
54
56
  打开 **插件 → 添加插件**,填写:
55
57
 
56
58
  ```text
57
- @ljwei-stak/dsh-model-router@0.19.0
59
+ @ljwei-stak/dsh-model-router@0.20.0
58
60
  ```
59
61
 
60
62
  镜像缺少该精确版本时使用官方 HTTPS npm 源 `https://registry.npmjs.org/`。安装并启用后,完全退出 Harness(包括托盘进程)再启动。插件详情应显示 **0.18.2**,侧栏出现**模型路由**。仅运行全局 `npm install -g` 不会把插件注册到桌面版 profile。
@@ -63,7 +65,7 @@
63
65
 
64
66
  ### 从旧包名升级
65
67
 
66
- `@ljwei-stak/model-router-galgame` 的最后版本为 0.13.0。保留 profile 与应用数据,移除旧插件条目,再添加 `@ljwei-stak/dsh-model-router@0.19.0`。不要同时安装两个包:它们共用内部插件 id `model-router-galgame` 与工具名;id 保留使已有路由设置和执行历史能够延续。
68
+ `@ljwei-stak/model-router-galgame` 的最后版本为 0.13.0。保留 profile 与应用数据,移除旧插件条目,再添加 `@ljwei-stak/dsh-model-router@0.20.0`。不要同时安装两个包:它们共用内部插件 id `model-router-galgame` 与工具名;id 保留使已有路由设置和执行历史能够延续。
67
69
 
68
70
  从 0.11.x 合并版迁移时,先备份 profile 并导出希望保留的 GAL 进度。剧情、立绘、音乐、自由模式和存档属于独立 `@ljwei-stak/dsh-galgame` 插件。导出范围及同 profile 迁移的限制见 [MIGRATION.md](docs/archive/MIGRATION.md)。
69
71
 
@@ -73,7 +75,7 @@
73
75
 
74
76
  | 页面 | 操作内容 |
75
77
  | --- | --- |
76
- | **任务与执行** | 写任务、选规划模式、生成建议、预览只读执行、查看逐步骤历史。 |
78
+ | **任务与执行** | 写任务、生成建议,选择模型路由只读执行或官方工具协作,预览确认后查看逐步骤历史。 |
77
79
  | **模型配置** | 刷新/搜索官方模型目录,编辑每条准确路线的能力与价格档案。 |
78
80
  | **官方工具** | 完成首次体检,检测/安装工具,使用交互终端。 |
79
81
  | **预算与安全** | 设置路由、预算、复核策略,查看订阅状态和执行范围。 |
@@ -88,8 +90,8 @@
88
90
  2. 为参与比较的路线填写可选档案。质量分为你提供的 **0–100** 估值;输入/输出单价单位是 **USD / 百万 token**。不知道价格就留空,不要把未知填成零。
89
91
  3. 在**任务与执行**写清交付物、约束与验收标准。**单任务**推荐一条路线;**团队分工**为足够复杂的任务拆依赖工作包;**指定模型**直接选一个准确路线,跳过其他模型比较。选团队模式不会自动启动团队。
90
92
  4. 设置本次估算目标;`0` 表示不限制本次规划。点**生成路由建议**,结果直接出现在任务规划后方。核对路线、复杂度、费用、执行渠道,以及每包依赖和验收清单。
91
- 5. 需要实际只读执行时,使用**在工作台执行**,填写存在的工作区绝对路径(留空沿用上次运行)。先点**预览执行计划**,审阅当前路线和所有确认项,再明确确认执行。宿主启动前会再次检查;状态变化时可能要求重新确认。
92
- 6. 在**执行记录与子任务**查看实际通道、回答、错误、费用与评价。需要 CLI 修改文件时,在 Harness 官方会话中调用下方可编辑工具。
93
+ 5. 在**在工作台执行**选择**模型路由(只读)**,或先在上方选择**团队分工**,再选**官方工具协作**。官方协作可选**只读检查**或**编辑文件**。填写存在的工作区绝对路径(留空沿用上次运行),点**预览执行计划**,核对每包路线、权限和全部确认项,再明确确认执行。宿主启动前会再次检查;状态变化时可能要求重新确认。
94
+ 6. 在**执行记录与子任务**查看真实渠道、回答、失败、费用和评价。官方协作按所选权限下已安装、入口就绪的 CLI 重新规划;编辑要求审批和干净 Git 仓库,成功后满足条件才整合补丁。该模式下 CLI 不可用或失败均不自动转为 API 调用。
93
95
 
94
96
  更改任务、模式、模型档案、目录或相关设置后,需要重新生成建议。更改执行输入会丢弃正在请求或已经返回的旧预览,必须重新预览当前请求才能确认执行。执行预览采用宿主当前状态,因此可能与早先的本地建议不同。
95
97
 
@@ -136,7 +138,7 @@
136
138
  {"tool":"codex","task":"检查仓库 UI 排版并列出问题;不要修改文件","mode":"read-only"}
137
139
  ```
138
140
 
139
- 指定目录路线时,`provider` 与 `model` 必须成对填写。厂商 CLI 模型名可能与 Harness ID 不同;只有在对应 CLI 验证后才设置 `cliModel` 或团队 `cliModelsJson`。ZCode 使用自身默认模型,不能逐次切换。多数 CLI 不回报可核验的实际模型 ID,需对照厂商运行记录。
141
+ 指定目录路线时,`provider` 与 `model` 必须成对填写。所有 CLI 默认保留自身配置模型,目录推荐 ID 不会自动作为 CLI 模型参数。需要显式切换时,在档案保存已验证的**官方 CLI 模型名**,单工具传 `cliModel`,或团队传 `cliModelsJson`;团队优先采用工作包 ID 映射,其次工具 ID,最后已保存的路线映射。ZCode 使用自身默认模型,不能逐次切换。历史分别记录推荐模型、请求 CLI 名和回报实际模型;请求参数不是实际模型证明,未回报时需对照厂商运行记录。
140
142
 
141
143
  CLI 团队是插件自有的顺序依赖执行器。Harness 内建 Agent Teams 的成员模型与生命周期仍由宿主管理。
142
144
 
@@ -146,7 +148,7 @@ CLI 团队是插件自有的顺序依赖执行器。Harness 内建 Agent Teams
146
148
  | --- | --- | --- |
147
149
  | `kimi-code` | Kimi Code | 经审批的 `workspace-write` |
148
150
  | `claude-code` | Claude Code | `read-only`、经审批的 `workspace-write` |
149
- | `codex` | Codex CLI | `read-only`、经审批的 `workspace-write` |
151
+ | `codex` | Codex CLI | Windows 托管只读 `read-only`;暂不支持可编辑执行 |
150
152
  | `minimax-code` | MiniMax Code | 经审批的 `workspace-write` |
151
153
  | `mimo-code` | MiMo Code | `read-only`、经审批的 `workspace-write` |
152
154
  | `grok-build` | Grok Build | `read-only`、经审批的 `workspace-write` |
@@ -172,15 +174,19 @@ CLI 团队是插件自有的顺序依赖执行器。Harness 内建 Agent Teams
172
174
 
173
175
  **已安装、可信入口就绪、账号已登录、模型有权限是不同状态。** 登录未知不代表已退出。在 Windows,托管入口按发布者签名或官方 npm tarball 校验;ZCode 另对签名构建中的脚本记录首次信任摘要。平台细则见[注册表](.dsh-plugin/shared/official-tool-registry.mjs)和[执行器](.dsh-plugin/shared/official-tool-executor.mjs)。
174
176
 
177
+ 版本和 CLI 登录状态命令使用所选安装副本的实际入口。该副本缺失时不改用 PATH 中另一份命令;无法检查对应入口时,登录状态保持未知。
178
+
175
179
  会话内可用 `/tools install|uninstall|repair|method <工具id> [安装方式]`;Agent 可调用 `model_router_tool_install`、`model_router_tool_repair` 和 `model_router_tool_uninstall`。安装目录与下载源始终来自用户自己的插件设置,不会由客户端或 Agent 传入,因此任何一条调用都无法把安装指向自定义包名或任意地址。
176
180
 
177
181
  `model_router_execute` 的固定无界面适配器为 Claude、Codex 和 Gemini;其他供应商经模型目录 API 或适用的订阅路线执行。CLI 缺失/不可用时可回退 API;真正尝试后的订阅失败按下方策略处理。
178
182
 
179
183
  可编辑执行要求干净 Git 仓库、Harness 审批与进程沙箱。修改先在独立工作树进行,执行成功且原仓库仍干净并匹配时才整合源码补丁;执行或整合失败会明确报告。Git 忽略的输出另行检查。只读参数不一定把可读文件限制在工作区,尤其需在**安全边界**核对 Codex 的较大可读范围。
180
184
 
185
+ Windows Codex 在 Harness 环境仅支持只读:外层 ACL 为原 `CODEX_HOME` 状态与私有临时目录授予写权限,Codex 内层保持 `--sandbox read-only`。明确选择并确认厂商正常环境后,可在可编辑团队中使用 Codex 自身 workspace-write 策略。本批 Codex 真实连接检查仍失败,账号与网络可用性须在本机另行确认。
186
+
181
187
  ### 官方工具终端
182
188
 
183
- 在**官方工具 → 官方工具终端**选择系统终端或已安装 CLI、交互/登录方式和存在的工作区绝对路径,核对启动确认后运行。ZCode 是桌面应用,不属于终端目标。
189
+ 在**官方工具 → 官方工具终端**选择系统终端或已安装 CLI、交互/登录方式和存在的工作区绝对路径,核对启动确认后运行。核验成功的 Windows ZCode 桌面安装提供内置 TUI 终端目标。
184
190
 
185
191
  终端**不经过 Harness 沙箱**,继承 Host 用户的登录环境、代理及 API Key 环境变量。输入的命令可以按该用户权限读取/修改文件。终端与路由执行的审批和计费流程分别处理。
186
192
 
@@ -193,7 +199,7 @@ CLI 团队是插件自有的顺序依赖执行器。Harness 内建 Agent Teams
193
199
  - **预算**:本次规划目标与每日/月度执行检查分别生效。超预算可尝试省钱方案或暂停确认;缺少价格保持费用未知。它们是本机估算与核算机制,不是厂商账单的硬上限。
194
200
  - **订阅优先**:默认先使用检测到的 CLI 订阅账号或配置的编程套餐路线。尝试 CLI 订阅时去掉 API Key 环境变量。`billing` 可设 `subscription-first`、`api-only`、`subscription-only`;`subscription` 可设 `cli-login`、`plan-key`、`none`。
195
201
  - **回退**:识别到额度用尽/限流后,将订阅标记为冷却,并可按策略及可用性用已配置 API 路线重试该路由步骤。其他已尝试的订阅失败默认暂停(`onSubscriptionFailure: "ask"`),在历史中选择 API 重试、重试订阅或取消。单工具/团队托管执行不会自动转 API 重试。
196
- - **核算**:API 费用计入预算;订阅单独展示按 API 单价折算的参考费用。实际用量可来自 CLI 自报金额,或 token 用量乘你提供的单价;真实消费以厂商账单为准。0.15.0 保留被裁剪历史和被重试结果替换的费用累计,避免重跑或清理详细历史抹掉此前消费;旧版本已经丢弃的费用无法反推恢复。
202
+ - **核算**:API 费用计入预算;订阅单独展示参考费用。优先保留有效的 CLI 自报金额,包括零;按 token 折算 CLI 费用须有完整用量,且回报实际模型与已配置模型或其显式 CLI 映射匹配。实际模型未知或不匹配时,费用保持未知,不套用推荐路线的单价。真实消费以厂商账单为准。0.15.0 保留被裁剪历史和被重试结果替换的费用累计,避免重跑或清理详细历史抹掉此前消费;旧版本已经丢弃的费用无法反推恢复。
197
203
  - **质量与偏好**:强模型复核可设 `off`、`sample`、`always`,会增加真实调用,但不作为人工反馈。明确评价按准确路线和任务类型,以时间衰减及低样本收缩调整独立主观效用(默认上限 ±0.04,可配置至 ±0.1);不修改客观质量分或质量硬门槛。可停用学习、撤回评价或重置学习起点。
198
204
 
199
205
  编程套餐 Key 与端点留在 Harness 官方供应商设置里。`plan-key` 档案可指定一个准确、已登记的 `apiRoute` 作为回退;模型档案不接收凭据或任意命令。套餐资格及使用条款须向厂商核对。
@@ -1,6 +1,8 @@
1
1
  # 模型路由工作台:配置、规划与实际执行
2
2
 
3
- 适用版本:正式版 `@ljwei-stak/dsh-model-router@0.18.2`;声明兼容 DeepSeek Harness Desktop `0.2.0-rc.1 / 0.2.0-rc.2`。安装与开发见[中文 README](../README.zh.md),旧包迁移见[迁移说明](archive/MIGRATION.md)。
3
+ 适用版本:`@ljwei-stak/dsh-model-router@0.20.0`。声明兼容 DeepSeek Harness Desktop `0.2.0-rc.1 / 0.2.0-rc.2`。安装与开发见[中文 README](../README.zh.md),旧包迁移见[迁移说明](archive/MIGRATION.md)。
4
+
5
+ 0.20.0 在工作台增加**官方工具协作**和明确的执行环境选择。默认保留 CLI 自身配置的模型,分别记录推荐、请求和实际回报模型。Windows Claude 单包执行及 Claude → MiniMax 依赖交接、实际文件整合已通过;具体入口、费用和未验证范围见[验收记录](releases/0.20.0-validation.md)。
4
6
 
5
7
  0.15.0 新增四页布局、规划后直接展示路由建议、执行输入变化时丢弃旧预览,以及历史裁剪和重试后的费用累计保留。源码中的独立 UI 预览使用模拟数据,用于组件检查,不代表真实账号调用或桌面端到端验收。
6
8
 
@@ -28,7 +30,7 @@
28
30
  | 输入/输出单价 | 两项同时填写,单位 **USD / 百万 token**;未知留空,零表示确实按零价估算。 |
29
31
  | 缓存价 | 可选缓存读取/写入单价;应与相应供应商计费口径一致。 |
30
32
  | 擅长方向 | 英文小写标签,逗号分隔,例如 `code, reasoning`。 |
31
- | 官方 CLI 模型名 | 仅填厂商 CLI 已验证接受的名称;不等同于 Harness 模型 ID。ZCode 不支持逐次换模型。 |
33
+ | 官方 CLI 模型名 | 留空保留 CLI 自身配置的模型;仅显式填写厂商 CLI 已验证接受的名称才切换,不自动传 Harness 模型 ID。ZCode 不支持逐次换模型。 |
32
34
  | LiveBench 准确模型名称 | 可选的显式基准映射,须确认模型版本与推理档位一致;不自动猜测别名,也不证明实际执行参数。 |
33
35
  | 执行方式 | `auto`、`official` 优先适用的官方工具;`api` 只走模型目录 API。 |
34
36
  | 计费方式 | 默认 `subscription-first`;也可指定 `api-only` 或 `subscription-only`。 |
@@ -68,15 +70,26 @@
68
70
 
69
71
  ## 在工作台执行:预览后确认
70
72
 
71
- **在工作台执行**沿用任务文本和规划模式,允许选择路由方案并填写工作区。它仅发起只读执行;需要 CLI 修改文件时使用官方会话。
73
+ **在工作台执行**沿用任务文本和规划模式,允许选择执行方式、路由方案并填写工作区。
74
+
75
+ | 执行方式 | 适用范围 |
76
+ | --- | --- |
77
+ | **模型路由(只读)** | 支持单任务、团队分工和指定模型;沿用路由 CLI/API 及订阅失败策略,保持只读。 |
78
+ | **官方工具协作** | 先在上方选择**团队分工**;仅用当前模式已就绪的官方 CLI 顺序执行工作包,不自动回退 API。可选**只读检查**或**编辑文件**。 |
72
79
 
73
80
  1. 输入已经存在的工作区绝对路径,例如 `F:\projects\demo`;留空沿用上次运行的路径。
74
- 2. 点击**预览执行计划**。宿主根据当前目录、登录、额度、预算和方案给出与 `model_router_execute` 相同的决策,包括适用的省钱降级。
75
- 3. 核对预估费用、路线、工作包及全部确认项。超预算和直接启动无沙箱 CLI 的原因会合并展示。
81
+ 2. 选择执行方式;官方协作还需选择任务权限。点击**预览执行计划**。模型路由沿用 `model_router_execute` 的决策;官方协作与 `model_router_team_execute` 共用团队规划和执行逻辑,按所选权限筛选已配置路线、已安装且就绪的 CLI,因此可能与本地建议不同。
82
+ 3. 核对预估费用、每包路线、读写权限和全部确认项。**编辑文件**要求干净 Git 仓库与审批,先在独立工作树执行;全部步骤成功后,原仓库仍干净且基线匹配时才整合源码补丁。Git 忽略产物另行核查;整合失败会保留工作树供检查。
83
+
84
+ Windows 独立工作树保存在用户私有临时目录中,按原仓库路径分别存储;避免原工程所在盘只有普通修改权限、无法初始化 Harness ACL 的情况。源工程权限不因该操作改变。失败后可从运行记录查看独立路径;系统清理临时目录后可能无法续跑,重要成果应及时审阅和归档。
85
+
86
+ 编辑权限下还需选择**执行环境**。默认 **Harness 受限环境**保留进程沙箱,但 Windows 后端会限制状态写入及部分子进程管道;登录成功不能消除这些限制。**厂商 CLI 正常环境**保留原登录、配置、技能和 MCP,以当前用户权限运行,启动与续跑均须额外确认;工具可访问工作树外当前用户有权访问的资源,Git 工作树只负责改动回收。失败不会自动切换环境。运行记录会标明实际环境。
87
+
88
+ **只读检查**使用各 CLI 的受限工具集。Claude 此模式禁用 shell、技能和既有 MCP,并忽略用户设置;需要正常工具协作时选择**编辑文件**,在隔离工作树执行。
76
89
  4. 明确确认执行后才调用模型/CLI。期间状态变化可能导致宿主拒绝旧确认,需重新审阅。
77
90
  5. 在下方**执行记录与子任务**看结果、状态、实际渠道、原始失败原因和费用。实际运行可能计费。
78
91
 
79
- 修改任务、模式、路由方案或工作区等执行输入后,正在请求或已经返回的旧预览会被丢弃。重新预览并核对当前请求后才能确认执行。
92
+ 修改任务、规划模式、执行方式、任务权限、路由方案或工作区等输入后,正在请求或已经返回的旧预览会被丢弃。重新预览并核对当前请求后才能确认执行。官方协作不代替缺失的 CLI,不支持当前权限的工具也不会进入该模式的计划。
80
93
 
81
94
  **预览不会启动模型,确认会启动。** 模型 API 将任务文本发给供应商;CLI 可能读取工作区或其他其权限允许的文件。只读不等于所有 CLI 只能读取工作区,先看**预算与安全 → 安全边界**。
82
95
 
@@ -86,6 +99,8 @@
86
99
 
87
100
  记录展示分配模型、执行渠道、费用、步骤依赖和错误。任务/回答摘录会本地保存,因此分享日志或截图前先脱敏。
88
101
 
102
+ CLI 记录分别保留 Harness 推荐模型、显式请求 CLI 模型和 CLI 回报的实际模型,同时保留可用的入口、沙箱、用量及金额证据。无显式 CLI 映射时使用厂商自身配置;参数中的请求名称不等于实际模型证明。单工具 `cliModel` 可覆盖档案映射;团队 `cliModelsJson` 优先按工作包 ID,其次工具 ID,最后采用档案映射。没有实际回报时请核对厂商运行记录。
103
+
89
104
  - **只读路由/团队失败**:重跑失败步骤及依赖它的未完成步骤;已完成结果作为上下文保留。允许时可改派另一条已配置路线。
90
105
  - **可编辑团队失败**:符合条件时在新独立工作树中套用此前改动后续跑;要求原仓库干净且仍在原基线。已经整合或等待人工整合的运行不能任意单步重跑。
91
106
  - **单工具调用失败**:重新执行原调用,生成关联的新运行;可编辑模式仍需审批。
@@ -95,10 +110,14 @@
95
110
 
96
111
  保存的任务文本最多 20,000 字符,单个回答最多 4,000 字符;历史不是完整交付文件的替代,重跑可能使用截断后的上下文。
97
112
 
113
+ 重跑完成后以新的步骤状态、回答和时间为准;已成功的步骤不应继续显示上次失败原因。记录中的只读/可编辑模式对应实际执行权限,不能从“官方 CLI”渠道名称单独推断。
114
+
98
115
  ## 官方工具:体检、安装与登录
99
116
 
100
117
  当前注册表包括 Kimi、Claude、Codex、MiniMax、MiMo、Grok、Gemini、OpenCode、Step Code 和 ZCode。点**重新体检**查看实际安装、版本、入口及账号状态;最新版查询失败时保持未知,不表示已无更新。
101
118
 
119
+ 版本检测与 CLI 登录状态命令绑定所选安装副本的实际入口。该副本缺失或入口不可用时,不使用 PATH 中另一份同名工具代替;对应登录状态保持未知。已安装、入口就绪、已登录和模型权限仍是四项独立检查。
120
+
102
121
  1. 未安装时可从卡片固定官方来源安装;npm 工具安装厂商 `@latest`。新厂商版本没有自动通过本项目测试。
103
122
  2. 安装中可查看日志或取消;取消后重新体检确认状态。
104
123
  3. 有更新时可更新;已安装版本比查询结果更高时不会降级。
@@ -147,7 +166,7 @@ MiniMax 官方 Windows 脚本的 `<# ... #>` 是 PowerShell 帮助注释。0.18.
147
166
 
148
167
  “—”表示当前厂商未提供相应渠道。每个工具的安装方式下拉框保留所有声明方式,并说明本机不适用的原因。MiniMax 官方脚本只接受官方 npm 源或 npmmirror;其他 npm 镜像请选 npm/pnpm 方式。
149
168
 
150
- 安装成功只表示所选目录的命令入口和版本已确认,不代表工具支持受限执行。Gemini 使用核验后的 npm/pnpm 包入口无界面执行;OpenCode、Step 当前可安装和在终端中使用,尚不支持受限任务。缺少这类能力不再报安装失败。Kimi、MiMo、Grok 的独立原生脚本安装目前没有插件需要的 npm 文件摘要证明,自动任务会显示执行入口未就绪并回退到 API;npm/pnpm 安装保留可核验的执行路径。Windows Codex 脚本使用目录联接,插件不提供通用文件删除卸载;请按官方方式移除原生安装。
169
+ 安装成功只表示所选目录的命令入口和版本已确认,不代表工具支持受限执行。Gemini 使用核验后的 npm/pnpm 包入口无界面执行;OpenCode、Step 当前可安装和在终端中使用,尚不支持受限任务。缺少这类能力不再报安装失败。Kimi、MiMo、Grok 的独立原生脚本安装目前没有插件需要的 npm 文件摘要证明,会显示执行入口未就绪;模型路由可按策略使用 API,官方工具协作则不选用该入口且不自动回退。npm/pnpm 安装保留可核验的执行路径。Windows Codex 脚本使用目录联接,插件不提供通用文件删除卸载;请按官方方式移除原生安装。
151
170
 
152
171
  ### 安装方式的会话与 Agent 等价物
153
172
 
@@ -164,7 +183,8 @@ MiniMax 官方 Windows 脚本的 `<# ... #>` 是 PowerShell 帮助注释。0.18.
164
183
 
165
184
  | 工具 ID | 单工具/团队执行支持 |
166
185
  | --- | --- |
167
- | `claude-code`、`codex`、`mimo-code`、`grok-build` | 只读,以及经审批的可编辑执行。 |
186
+ | `claude-code`、`mimo-code`、`grok-build` | 只读,以及经审批的可编辑执行。 |
187
+ | `codex` | Windows 托管只读;暂不支持可编辑执行,也不进入可编辑团队计划。 |
168
188
  | `kimi-code`、`minimax-code`、`zcode` | 经审批的可编辑执行。 |
169
189
  | `gemini` | 路由无界面适配器,不进入单工具/团队托管执行器。 |
170
190
  | `opencode`、`stepcode` | 尚未核验受限执行入口;插件负责安装、检测与登录体检,执行请在终端中直接进行。 |
@@ -189,6 +209,8 @@ PTY 加载失败时卡片显示**管道模式**:全屏界面、箭头键、尺
189
209
 
190
210
  API 花费计入预算;订阅显示按 API 价折算的参考费用,不计入预算。预算和费用是本地估算/核算,不代替厂商账单;无法确定费用时显示未知。
191
211
 
212
+ 有效的 CLI 自报金额优先,包括 `0`。只有完整 token 用量与回报实际模型可核对到已配置模型或其显式 CLI 映射时,才按相应单价折算。缺失或不匹配的实际模型、不完整用量都保留未知费用;Harness 推荐模型的价格不能证明该 CLI 实际成本。预览仍可使用推荐路线作规划估算,须与实际核算区分。
213
+
192
214
  0.15.0 会保留裁剪详细历史及重试前的费用累计,避免超过 200 条历史或重跑步骤后预算漏算。此前旧版本已丢弃的消费记录无法恢复。
193
215
 
194
216
  ### 持续反馈与本地偏好
@@ -209,6 +231,8 @@ API 花费计入预算;订阅显示按 API 价折算的参考费用,不计
209
231
 
210
232
  **安全边界**显示各路线可读/写范围与沙箱。模型 API 没有本地进程文件访问;可编辑 CLI 要求 Harness 沙箱和独立 Git 工作树。缺少沙箱时可编辑托管执行被拒绝。交互终端始终在沙箱外运行。
211
233
 
234
+ Windows Codex 在 Harness 环境仅支持只读:其原 `CODEX_HOME` 状态仍可更新,内层保持 `--sandbox read-only`。在明确确认的厂商 CLI 正常环境中支持可编辑工作包,使用 Codex 自身 workspace-write 策略。本批真实 Codex 连接未通过,不能以安装或登录状态推断网络调用成功。
235
+
212
236
  ## 从官方会话启动任务
213
237
 
214
238
  在 Harness 选择正确工作区,使用自然语言明确要求调用插件工具。以下 JSON 是核对工具调用详情的示例,不需要粘贴到工作台任务框。
@@ -0,0 +1,26 @@
1
+ # 0.20.0 validation — 2026-10-15
2
+
3
+ This release was developed against DeepSeek Harness Desktop 0.2.0-rc.2 on Windows. Declared rc.1 compatibility is not a claim of a second real host run.
4
+
5
+ ## Real executions
6
+
7
+ - **Workbench execution:** the real desktop profile's authenticated preview/start RPC selected `official-team`, `workspace-write`, and explicitly confirmed `cli-native`. Claude read a small repository fixture, created a JSON file, ran a Python validation command and completed. The source repository received the Git patch; independent file readback matched the expected values. This was one work package, not a multi-agent team result.
8
+ - **Cross-vendor dependency:** the installed production team runtime ran a predeclared Claude analysis package followed by a MiniMax delivery package consuming its result. No mock CLI adapters were injected. Both used their existing vendor configuration. MiniMax read the fixture, wrote the handoff JSON and reported a successful PowerShell JSON check. The patch was integrated and independently read back. This second check directly invoked the installed runtime; it was not a workbench UI automation or an automatic-routing comparison. Ledger recording used the same checkout function with its development peers, since standalone import of the Desktop entry lacks host-provided peers.
9
+ - Both successful checks retained CLI defaults. The MiniMax result reported `minimax/MiniMax-M3`; Claude's actual model remained unknown in the saved records. Recommendation IDs are not proof of backend identity.
10
+ - The successful calls reported API amounts of $0.1381192 and $0.1157288. MiniMax supplied token usage under a subscription login, with no verified reference price. Earlier attempts with missing usage/prices remain unknown; $0.253848 is a known subtotal, not the batch's reconciled supplier bill.
11
+
12
+ ## Failures that shaped the fix
13
+
14
+ - Original terminal execution and managed execution differed in model arguments, environment, writable state and tool restrictions. Catalog IDs are now passed only through explicit CLI model mappings.
15
+ - The Windows ACL backend rejected worktree initialization on a source drive lacking WRITE_OWNER, before any CLI started. A no-model SDK probe reproduced that failure and succeeded in private user temporary storage. A real confined-write and cross-drive patch integration probe passed after relocating Windows worktrees.
16
+ - MiniMax then reached its CLI but could not write its original state directory. The SDK also limits libuv pipe creation by confined descendant processes, affecting some shell and MCP paths. Additional filesystem grants alone do not restore normal vendor behavior.
17
+ - The explicit `cli-native` option uses current user permissions outside Harness's process sandbox, retains Git worktree integration checks, and always requires its own confirmation. It is never an automatic response to a failed restricted run. Existing restricted records keep their environment when retried.
18
+ - A Claude restricted-environment attempt reported gateway 529 errors with a complete zero-usage/zero-cost terminal result. Codex attempts failed connection checks. These failures remain recorded rather than being silently replaced by API calls.
19
+
20
+ ## Scope and limits
21
+
22
+ Default execution remains Harness-restricted. Claude read-only disables shell, skills and existing MCP, and ignores user settings. Editable native execution offers normal vendor tools under user permissions; the worktree collects changes and is not an OS security boundary. Configured external MCP services may have their own effects.
23
+
24
+ The successful experiments exercised file and shell tools, dependency context, and patch integration. They do not establish that every vendor, model, skill or MCP service works. Codex network execution, remote MCP effects, and statistical quality–cost improvements remain unverified. Raw experiments, credentials, machine paths and screenshots stay in the private local archive.
25
+
26
+ Automated validation covers confirmation gates, stale previews, selected installation entries, native package trust, default-model behavior, partial/failed accounting, exceptions, retries, and Git isolation/integration. Final test totals are recorded in the release notes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ljwei-stak/dsh-model-router",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "description": "Model Router for official DeepSeek Harness Desktop: cost-aware task routing, dependent work packages and official vendor CLI discovery, installation and execution. GAL is available separately as @ljwei-stak/dsh-galgame.",
6
6
  "repository": {
@@ -91,7 +91,8 @@
91
91
  "docs/archive/MIGRATION.md",
92
92
  "LICENSE",
93
93
  "CHANGELOG.md",
94
- "docs/assets/router-only-0.12.0.png"
94
+ "docs/assets/router-only-0.12.0.png",
95
+ "docs/releases/0.20.0-validation.md"
95
96
  ],
96
97
  "scripts": {
97
98
  "build:client": "node scripts/build-client.mjs",
@@ -103,7 +104,7 @@
103
104
  "experiment:routing-summary": "node scripts/summarize-routing-search.mjs",
104
105
  "experiment:routing-adaptive": "node scripts/adaptive-routing-study.mjs",
105
106
  "audit:livebench": "node scripts/livebench-aggregate-audit.mjs",
106
- "test": "node --test tests/adaptive-*.test.mjs tests/dynamic-data.test.mjs tests/router.test.mjs tests/routing-optimizer.test.mjs tests/routing-evaluation.test.mjs tests/routing-paired-statistics.test.mjs tests/routing-selftest-tools.test.mjs tests/livebench-aggregate-audit.test.mjs tests/livebench-prior-study.test.mjs tests/routing-search-experiment.test.mjs tests/routing-regression-study.test.mjs tests/routing-search-summary.test.mjs tests/harness-*.test.mjs tests/official-tools.test.mjs tests/official-team-runtime.test.mjs tests/model-profiles.test.mjs tests/model-profile-editor.test.mjs tests/tool-install-state.test.mjs tests/tool-install-sdk-ui.test.mjs tests/vendor-adapters.test.mjs tests/desktop-compat.test.mjs tests/plugin-split.test.mjs tests/install-settings-host.test.mjs tests/task-executors.test.mjs tests/tool-install-preferences.test.mjs tests/roadmap.test.mjs tests/insights-state.test.mjs tests/billing-team-ledger.test.mjs tests/subscription-billing.test.mjs tests/subscription-host.test.mjs tests/test-pass-regressions.test.mjs tests/roadmap-gaps.test.mjs tests/cordis-inject.test.mjs tests/cli-terminal.test.mjs tests/cli-terminal-gateway.test.mjs tests/latest-versions.test.mjs tests/vendor-installer-validation.test.mjs tests/install-entry-selection.test.mjs tests/script-directory-safety.test.mjs tests/zcode-config.test.mjs tests/zcode-runtime.test.mjs",
107
+ "test": "node --test tests/adaptive-*.test.mjs tests/dynamic-data.test.mjs tests/router.test.mjs tests/routing-optimizer.test.mjs tests/routing-evaluation.test.mjs tests/routing-paired-statistics.test.mjs tests/routing-selftest-tools.test.mjs tests/livebench-aggregate-audit.test.mjs tests/livebench-prior-study.test.mjs tests/routing-search-experiment.test.mjs tests/routing-regression-study.test.mjs tests/routing-search-summary.test.mjs tests/harness-*.test.mjs tests/official-tools.test.mjs tests/official-tool-result.test.mjs tests/native-environment.test.mjs tests/native-entry-trust.test.mjs tests/tool-failure-ledger.test.mjs tests/official-team-runtime.test.mjs tests/model-profiles.test.mjs tests/model-profile-editor.test.mjs tests/tool-install-state.test.mjs tests/tool-install-sdk-ui.test.mjs tests/vendor-adapters.test.mjs tests/desktop-compat.test.mjs tests/plugin-split.test.mjs tests/install-settings-host.test.mjs tests/task-executors.test.mjs tests/tool-install-preferences.test.mjs tests/roadmap.test.mjs tests/insights-state.test.mjs tests/billing-team-ledger.test.mjs tests/subscription-billing.test.mjs tests/subscription-host.test.mjs tests/test-pass-regressions.test.mjs tests/roadmap-gaps.test.mjs tests/cordis-inject.test.mjs tests/cli-terminal.test.mjs tests/cli-terminal-gateway.test.mjs tests/latest-versions.test.mjs tests/vendor-installer-validation.test.mjs tests/install-entry-selection.test.mjs tests/script-directory-safety.test.mjs tests/zcode-config.test.mjs tests/zcode-runtime.test.mjs",
107
108
  "prepack": "node scripts/prepack.mjs",
108
109
  "pack:local": "npm pack --pack-destination dist"
109
110
  },