@mars-sea/dsh-commandcode-provider 0.15.4 → 0.16.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/CHANGELOG.md +53 -0
- package/README.md +16 -3
- package/README.zh-CN.md +16 -3
- package/lib/client.js +409 -144
- package/lib/index.d.ts +73 -6
- package/lib/index.js +344 -78
- package/package.json +50 -43
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,59 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.16.0] - 2026-10-30
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **同步 Command Code CLI `1.88.0` → `1.88.1`(纯请求头同步)。** npm `latest` 于 `2026-10-27T23:06Z` 前进到 `1.88.1`,官方变更日志没有该版本条目(最新 CLI 条目仍是 `1.88.0`),所以结论来自产物级静态比对:请求路径、自定义请求头、环境变量与 `commandcode.ai` 地址的字符串集合(两版各 105 项)完全相同;`promptCache`(5)、`reasoning_effort`(7)、`max_tokens`(12)、`cache_control`(1)等字面量出现次数相同,`/alpha/generate` 调用点在屏蔽混淆标识符后逐字相同;订阅表与 ZDR(零数据保留)例外集(18)在审计 `cliDiff` 中为空。注册表唯一变化是新收录 `gpt-6.1-terra` 与 `moonshotai/Kimi-K3.1-Pro`——这两行快照早已按服务端目录收录,推理档位(五档/`low`、`high`、`max`)与上下文窗口(1,050,000/1,048,576)与快照一致,所以**所有快照表零变化**,`COMMAND_CODE_CLI_VERSION` 只随请求头更新,运行时行为不变。服务端目录没有再动(`?view=client` 的 `catalogVersion` 仍 `7f405e24…`,默认 94、client 106 行);审计在两条已知定价别名(`minimax/minimax-m3.1-flash`、`ornith/ornith-1.5-122b`)确认后为 `review-required`、错误 0,`candidateDiffs` 为空。官方 Desktop `0.1.58`/`0.1.59`(10-26/10-27)新增 Providers 页并把 Kimi K3.1 Pro 与 GPT-6.1 Terra 加入选择器,另有「首个回复前停滞更快切换备用 provider」「模型错误区分 provider 拒绝请求」两条说明;它们属 Desktop 行为,未验证对插件所连服务端的影响。
|
|
12
|
+
- **适配 DSH `0.2.2-alpha.2`:并行准入 `0.2.2` 通道,Node 下界抬到 `24.9`。**
|
|
13
|
+
- **准入范围**:`engines.dsh`、`dsh.compatibility.dsh` 与全部 34 个 `@deepseek-ai/dsh-*` peer/开发依赖改为 `>=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-alpha.2 <0.2.3-0`。两个分支并列是因为 `0.2.1` 的预发布序列是 `-rc.N`、`0.2.2` 的是 `-alpha.N`,一个区间表达不了;把上界推到 `0.3.0-0` 会连两代之间的空档一起放行。`dsh.compatibility.dshReleases` 补入 `0.2.2-alpha.2`(四条实测记录,`test:engine` 与 `test:install` 均 4/4)。
|
|
14
|
+
- **Node.js 要求从 22 提高到 24.9(不兼容旧 Node)**:`@deepseek-ai/dsh@0.2.2-alpha.2` 自己声明 `engines.node >=24.9.0`,插件既然准入它,整包下界就必须跟到同一水位。**在 Node 22/23 上安装或更新本插件会报 `EBADENGINE`**(警告,除非 npm 设了 `engine-strict=true`),且 `0.2.2` 引擎在那里确实起不来。`0.2.1` 的 RC 引擎仍能在 Node 22 运行,但 `engines.node` 是整包唯一的下界,对它们同样生效——这是同时准入两个通道的代价。执行 `nvm install 24 && nvm use 24` 或换用任意 Node 24.9+ 发行版即可。
|
|
15
|
+
- **配套版本**:`@deepseek-ai/cordis` 改为 `~4.0.5 || 4.0.6-alpha.1`、`@deepseek-ai/schemastery` 改为 `~3.18.5 || 3.18.6-alpha.1`。用精确版本而非 `~4.0.6-alpha.1` 分支,是因为后者会放行 `4.0.6-alpha.2` 这类没有任何引擎配对的版本。`0.2.2-alpha.2` 的 Cordis 把 Fiber 配置访问器拆成 `effectiveConfig`/`rawConfig`/`resolveConfig()`(`config`/`_config` 保留),`dsh-settings` 内部改读新访问器,因此它与 Cordis 必须成套升级。
|
|
16
|
+
- **CI**:三个 workflow 的 Node 从 22 升到 `24.9.0`。`publish.yml` 早已单独固定 `npm@11.21.0`,改 Node 不影响可信发布链。
|
|
17
|
+
- **插件代码无需改动**:rc.4 → alpha.2 共 7275 个变更路径、388 份包清单(采集错误为空),插件导入的 16 个宿主包无破坏性变化——`dsh-llm` 的 `LlmModelInfo.badge`、事件 `llm/models-updated`、`MessageSourceMap`/`PrincipalMap` 新成员,`dsh-web` 的 `WebSearchProvider.ready?()`、`searchReady()`/`fetchReady()`、`WebSource.summary`,`dsh-typert-protocol` 的 `TypertResourceDeclaration` 联合类型化,均为加性;插件用到的符号在 alpha.2 全部仍导出。
|
|
18
|
+
- **验证脚本两处适配**:分析历史夹具改用 `enter()` + `announce()`(`0.2.2-alpha.2` 在 `session/created` 通知完成前把会话保持只读,`enter()` 后立刻 `append()` 会抛错;`announce()` 在 rc.2 起就存在,旧引擎只是发出该事件,故不按引擎分支);新增费用投影探针,在真实 `sessionProjections` 注册表上验证 `commandCodeCost` 的注册与折叠——这条路径此前没有任何真实引擎覆盖,而 `0.2.2-alpha.2` 恰好重写了投影注册契约(`register()` 运行时值改为可调用的 thenable,同步 `ctx.effect` 写法保留兼容)。
|
|
19
|
+
- **复查(2026-10-28 晚)**:GitHub 补发了 `dsh-v0.2.1-rc.4` 与 `dsh-v0.2.2-alpha.2` 的 tag 与 release 说明。`0.2.2-alpha.2` 发布说明里 6 条与插件作者相关的迁移项(同步会话投影注册、Cordis Timer 返回值、`agent/request` 不再改路由、`tools.resolve`/`executable`、`tools.mode`/`DSH_TOOLS_MODE`、`app-boot` 导入)**逐条核对均未触及**;「未声明容量的自定义模型默认 1M/128K」只影响 `llm-pi-ai` provider,插件经 `resolveModel` 显式宣告容量,`compaction-basic` 的缺少 context 硬错误在 rc.4 与 alpha.2 两版相同。另补类型验证:在只装 alpha.2 宿主包的隔离树里对 `src`/`tests`/`tsdown.config.ts` 跑 `tsc --noEmit`,**退出码 0**——`import type` 的漂移 `test:engine` 查不到,此前是盲区。`dsh-v0.2.1-rc.4` 的源码 delta 也已可采(369 个变更路径、349 份包清单、错误为空),插件导入的 16 个包非测试源码零变更,与此前产物级结论一致。
|
|
20
|
+
- **未采纳**:`LlmModelInfo.badge` 与 `llm/models-updated` 尚未接入选择器标记,`WebSearchProvider.ready?()` 与 `WebSource.summary` 也未使用——三者都改变用户可见行为或需要新的产品决定,留待单独评估。决策与代价见 `docs/决策记录.md` 第八章第 17 条,对接口径见 `docs/对接说明.md`。
|
|
21
|
+
- **设置页卡片化重设计与交互手感(2026-10-29)。** 五个分组由扁平分隔改为 16px 圆角卡片,组头 52px、组标题 15px、页标题 22px,卡片内行间 .5px 细线;页头新增状态总览条(账户健康、月额度剩余、服务状态、模型范围),文案复用分组已有摘要与余额字符串,不新增词条;窄面板下状态条折为 2×2。动效统一走一条 ease-out 曲线:按钮、分段切换、图标按钮与「恢复默认」按下时轻微缩小(0.97/小图标 0.95),悬停底色与描边改为 150ms 渐变;保存条 48px,出现去掉回弹、出场快于入场;开关 40×24,底色与滑块同步过渡;额度进度条改用 `transform` 动画(满宽按比例 `translateX`,保留圆角端,不再触发重排);卡片首屏错峰淡入上移,提示块轻微下落淡入;图标按钮的键盘焦点环统一为品牌色描边。所有悬停效果只在有精确指针的设备上生效,触屏点击不再残留悬停色;顺带修正了输入框校验失败时悬停会盖掉红色描边。开启「减少动态效果」时去掉位移与缩放、保留淡入淡出。分组与账户卡片的展开收起保持瞬间切换。另外,「账户」分组说明文字与下方内容原本 0 间距贴在一起,现在留 12px,分组说明下直接接提示块或按模型覆盖表时同样适用。
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **自动模式会选回用量已满的账号(#105)。** 账号卡片显示某账号「每周 100%」时,自动模式与「当前使用」徽标仍可能选它:轮转原本只认真实请求的拒绝标记,而标记只在内存里,进程重启或冷却提前到期后就没了,下一个请求要先白撞一次拒绝才换号。现在用量报告(设置页账号卡片、`/commandcode`)读到任一窗口已超限,就按账号池探测的同一口径给该账号打冷却标记,冷却到上游公布的重置时刻;报告本来就要请求这个接口,不增加任何调用。只打标记、不清标记:窗口显示未满时不会解除限流等窗口数据看不到的拒绝。
|
|
26
|
+
|
|
27
|
+
## [0.15.5] - 2026-10-27
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- **请求路径与账户读取的一批性能优化(线上字节不变)。**
|
|
33
|
+
- `streamAttempt()` 的凭据解析与正文装配改为并发:两者互不依赖(正文从不携带密钥,健康账号池的解析只读内存),从前却是严格串行,带图请求因此把图片读取与 JSON 装配整个排在 `resolveApiKey()` 之后。与密钥无关的通道判断先算成 `provisionalProtocol`,凭据返回后目标一致即复用,不一致才重建一次(与既有协议回退、账号轮换同价)。代价是 Go 计划/已学 CLI 通道的账号每次请求会多装配一次正文(线上字节不变,纯 CPU 开销)。图片预算的**会计**仍先于任何 I/O 执行,但**抛错**推迟到凭据与真实通道落定之后:预算门与缓存门一次算全、一次抛出。
|
|
34
|
+
- `listModels()` 在**本进程联网成功过**该网关目录时不再等一次联网刷新,改用内存中的行立即返回、后台刷新留给下次打开;进程首次加载仍照旧等待。新判据 `GatewayFacts.loaded()` 以「来源」为准而不是「内存里有行」:`snapshot()` 从磁盘灌入的行、以及刷新失败后的空目录都不算热数据(磁盘副本没有年龄校验)。`resolveModel()` 与 `stream()` 不变,仍等真实刷新。
|
|
35
|
+
- `gradeHeaderTimeout()` 的指纹改用**已经序列化好的实发字符串**求摘要(`sha256Hex()`),不再对 `body` 重新 `JSON.stringify`:超时是最常重复的路径,而带图历史可达数 MB。这也更准确——实发字符串就是网关看到的字节,重新 stringify 会在 surrogate 清洗真的删掉过字符时描述到不同的字节,把一次连续超时拆成两条 streak。
|
|
36
|
+
- `toolParametersSchema()` 的根节点结果按 `parameters` 对象身份记忆化(`WeakMap`)。每个通道在每次尝试时都重建工具列表,而账号轮换、协议回退、降档重试都会让同一批 schema 再走一遍。同时纠正原注释「每条路径都返回副本」——`type: 'object'` 快路径一直返回调用方自己的对象,调用方靠它拿到同一个已冻结的 schema。
|
|
37
|
+
- 用量卡片与选择器的套餐过滤共享账户端点响应:两处读的是同一批端点、同一个账号,成功响应按 `[apiBase, key, 完整 URL]` 记入短命表(`ACCOUNT_FACTS_TTL_MS` 30 秒)。实际共享的是 `whoami` 与 `subscriptions`——`credits` 的 URL 形状带 `orgId`,两处不同,不会互相命中。只缓存成功响应(失败必须重试,否则报告的 `failures` 与 `classifyTotalFailure` 结论会描述一次没真正发出的请求);`/alpha/usage/summary` 明确不共享——那是用户正盯着、旁边写着读取时间的数字。
|
|
38
|
+
- 用量刷新区分自动与显式路径:`refresh({ auto: true })` 用于账户卡片首屏、面板首屏与面板 tick(injected 面因此分成 `refreshUsageAuto()` 与 `refreshUsage()` 两个入口),可在 `USAGE_AUTO_REFRESH_COALESCE_MS`(5 秒)内复用刚刚读到的结果;按钮、保存、换凭据等显式调用不查合并窗口(请求在途时仍按既有 `inFlight` 规则折叠),`fetchedAt` 因此仍如实反映读取时刻。
|
|
39
|
+
- 面板自动刷新在文档隐藏时跳过读取但照旧重排定时器,重新可见立即补读一次(该补读走 auto,5 秒内仍可能被合并);首屏仍无条件读取。可见性做成可注入接缝(`AutoRefreshVisibility`),非浏览器环境视为始终可见;监听句柄随循环状态放在模块层,任意卸载顺序都能解绑。
|
|
40
|
+
- **设置页账户卡片:账期与更新时间并入余额标签行。** 「月额度剩余」标签右接账期区间、同行右侧显示「更新于」;原单独一行的「官方账期用量 …」与底部重复的「账期截止」删除。账期未对齐时标签改接订阅自身的「账期截止」日期,不再显示「统计周期未确认」(额度面板不变);余额没取到时该行仍保留,区间前补「官方账期用量」。底部只在部分接口失败时显示「部分数据未取到」。
|
|
41
|
+
|
|
42
|
+
- **同步上游两处:Command Code 目录新增 `gpt-6.1-terra`,DSH `0.2.1-rc.4` 补入验证矩阵。**
|
|
43
|
+
- **Command Code(CLI 版本不变,仍 `1.88.0`)**:2026-10-27 复核 npm `latest` 与官网 changelog 均无新 CLI 版本(最新条目仍是 `1.87.3`);服务端目录 `?view=client` 的 `catalogVersion` 由 `f41a48ed…` 变为 `7f405e24…`,默认视图 93 → 94、client 视图 105 → 106,唯一新增行是 `gpt-6.1-terra`(GPT-6.1 Terra):1,050,000 上下文、文本 + 图像、推理档位 `low`/`medium`/`high`/`xhigh`/`max`、最低计划 Pro、`$1/$5`(≤272K 上下文)与 `$2/$7.5`(>272K)、缓存读取 `$0.05`/`$0.1`、缓存写入 `$1.25`/`$2.5`、月度额度 Go `$6`/GOAT `$20`/Pro `$20`,ZDR 默认覆盖,无促销、无峰值时段、无输出上限公布值。官方 models 页与 pricing 页均已上架,`1.88.0` 的 CLI 注册表尚未收录(审计 `incomplete`,能力字段以 `?view=client` 目录为准)。快照 +1:`KNOWN_PLANS` 93 → 94、`KNOWN_EFFORTS` 66 → 67、`KNOWN_IMAGE_MODELS` 72 → 73、内置价格行 93 → 94;ZDR 例外集(18)、自动思考模型表(16)、订阅表(9)、促销(4)、输出上限表(79)不变。`scripts/sync-model-prices.mjs` 重跑(页面 94 行,diff 仅新增该行)。
|
|
44
|
+
- **DSH `0.2.1-rc.4`**:npm `next` 于北京时间 2026-10-26 23:28(`2026-10-26T15:28:13Z`)从 `0.2.1-rc.3` 前进到 `0.2.1-rc.4`,`latest` 仍是 `0.2.1-rc.2`;GitHub 无对应 tag/release(均 404),`master` 停在 10-23,产物内构建哈希 `ec17a2c` 在公开仓库不可见——官方没有发布说明。产物级全量比对 235 个双版本包,实质变化仅 4 处:`dsh-mcp-client` 的资源能力探测(服务器未声明 `resources` 时直接返回空列表)、`dsh-client-ui-conversation` 的 View 标签提示框(按字符宽度估算、仅溢出时显示)与「更多会话视图」文案精简、`dsh-llm-deepseek-account` 的一条日志级别(`console.info` → `console.error`)、`dsh-mcp-resources` 的文档;另有 3 个包仅构建元数据(commit 短哈希、版本串)变化。插件导入的宿主包(`llm`/`settings`/`credentials`/`client-*`/`web`/`typert`/`api-remotes`/`attachment`/`commands`/`timeout`/`launch-environment`/`app-boot`)全部零功能变化。`dsh.compatibility.dshReleases` 补入 `0.2.1-rc.4`(三条实测记录),`test:engine`/`test:install` 矩阵随之变为 3 个引擎。
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
|
|
48
|
+
- **图片预算门不再抢在凭据之前抛错。** 预算门只做会计,凭据解析失败时先报 `MISSING_CREDENTIAL`:避免宿主对一次根本发不出去的请求先做不可逆的持久化图片卸载。预算门与缓存门在凭据与真实通道落定后一次算全(`max(预算, 缓存)`),不再退化成两步卸载,也不会把 cache 溢出报成 budget。(`src/adapter.ts`)
|
|
49
|
+
- **`loaded()` 只认联网来源。** `snapshot()` 灌入的磁盘行与刷新失败后的空目录都不再被当成选择器首屏:冷启动"先聊天再开选择器"不会画出无年龄校验的旧目录,刷新失败后也不会先闪一次空列表。(`src/gateway-facts.ts`)
|
|
50
|
+
- **可见性监听按任意卸载顺序解绑。** `unsubscribe` 句柄从函数局部提升到模块层,启动循环的 surface 先卸载时不再泄漏 `visibilitychange` 监听。(`src/client/panel.ts`)
|
|
51
|
+
- **账户卡片首屏接线补真实渲染测试。** 新增 `tests/accounts-card-render.test.ts`(`react-test-renderer`):首屏必须调 `onRefreshAuto()`、刷新按钮必须调 `onRefresh()`;把组件改回旧接线时该用例失败。此前只有"两个入口存在"的断言,回退后测试仍全绿。
|
|
52
|
+
- **非安全上下文(`http://` 局域网访问)下设置页不再整块空白(issue #102)。** 页面身份原来直接取 `crypto.randomUUID()`,而该 API 只在安全上下文存在:以 `http://<局域网 IP>:3080` 打开时它是 `undefined`,控制器又在 `AccountsCard` 的 `useState(createEnrollment)` 惰性初始化里构造,异常被设置页插槽的错误边界接住——左侧「Command Code」标签正常、右侧内容区空白且无任何提示。新增 `src/client/random-id.ts` 的 `randomId()`:`randomUUID` 可用时照旧,否则退回非安全上下文同样可用的 `crypto.getRandomValues`,按 RFC 4122 拼出同形 v4;`AccountEnrollmentController` 的默认 `newId` 改用它。页面身份只是宿主把开通过程绑到单个浏览器页面的分组键,不参与鉴权,因此不要求 HTTPS。(`src/client/random-id.ts`、`src/client/enrollment.ts`)
|
|
53
|
+
|
|
54
|
+
用例:`tests/adapter.test.ts` 新增「凭据解析与图片读取并行」「目录已在内存时不再等一次联网刷新」「超时定级复用已序列化的正文」「同一份工具 schema 只归一化一次」「用量卡片与选择器共享同一份账户事实」「凭据缺失时预算门不抢跑」「双超限一次报数」;`tests/gateway-facts.test.ts` 新增 4 条 `loaded()` 来源判据;`tests/panel.test.ts` 与 `tests/usage-client.test.ts` 新增自动/显式刷新、可见性与任意卸载顺序解绑用例;`tests/accounts-card-render.test.ts` 新增 2 条真实渲染接线用例。**验证边界**:`npm run typecheck` 退出码 0;`npm ci` 干净安装后 `npm test` **1125/1125** 通过;`npm run build` 重建 `lib/`。未在真实宿主中人工验证。
|
|
55
|
+
|
|
56
|
+
issue #102 的用例:`tests/random-id.test.ts` 3 条——安全上下文走平台 `randomUUID`(哨兵值分辨分支,不走自行拼装)、非安全上下文退回 `getRandomValues` 时 100 个身份互不相同且为 v4、非安全上下文下构造 `AccountEnrollmentController` 并把页面身份带给宿主。三处定向变异各命中一条:关闭快速路径只失败第一条,把版本位置 0 只失败后两条,把默认 `newId` 改回 `() => crypto.randomUUID()` 只失败第三条。**验证边界**:`npm run typecheck` 退出码 0;`npm ci` 干净安装后 `npm test` **1129/1129** 通过;`npm run build` 重建 `lib/`(`lib/client.js` 含 `randomId`,`lib/index.js` 与 `lib/index.d.ts` 字节不变)。未在真实 NAS/局域网环境人工验证。
|
|
57
|
+
|
|
58
|
+
**本轮(2026-10-27 上游同步)验证**:`npm run typecheck` 退出码 0;`npm test` **1126/1126** 通过、0 失败;`npm run build` 两段 `Build complete`,`lib/index.js` 已重建(含 `gpt-6.1-terra`);`npm run test:engine` **3/3**(`0.2.1-rc.2`/`0.2.1-rc.3`/`0.2.1-rc.4`,宿主准入 preflight 全部放行,末行 `engine-load smoke passed on all 3 declared-compatible engines`);`npm run test:install` **3/3**(pnpm 10.34.5);`npm run test:pack` 16 文件(版本 0.15.4)。未做真实账号登录、付费生成、服务端协议验证与浏览器渲染。
|
|
59
|
+
|
|
7
60
|
## [0.15.4] - 2026-10-24
|
|
8
61
|
|
|
9
62
|
### Changed
|
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@ Unofficial [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harnes
|
|
|
18
18
|
|
|
19
19
|
| | |
|
|
20
20
|
|---|---|
|
|
21
|
-
| Verified engines | dsh
|
|
21
|
+
| Verified engines | dsh `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.2-alpha.2` |
|
|
22
|
+
| Node.js | **`>=24.9`** — raised from 22 in this release, see [Node.js 24.9 or newer](#nodejs-249-or-newer-is-required) |
|
|
22
23
|
| Install — web | `dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest` |
|
|
23
24
|
| Install — terminal | `dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@latest` |
|
|
24
25
|
| Config file | `$DSH_HOME/settings.yaml` → `llm-commandcode:` |
|
|
@@ -61,7 +62,19 @@ Unofficial [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harnes
|
|
|
61
62
|
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
This build admits **dsh `>=0.2.1-rc.2 <0.2.2-0`** — every RC of the `0.2.1` channel from `0.2.1-rc.2` onward. `0.2.1-rc.2` is what npm `latest` runs
|
|
65
|
+
This build admits **dsh `>=0.2.1-rc.2 <0.2.2-0`** — every RC of the `0.2.1` channel from `0.2.1-rc.2` onward — **and `>=0.2.2-alpha.2 <0.2.3-0`**, the `0.2.2` channel from its current alpha. `0.2.1-rc.2` is what npm `latest` runs, `0.2.1-rc.4` ships on `next`, and `0.2.2-alpha.2` is on `alpha`. All four are covered by the full engine matrix (`npm run test:engine`, `npm run test:install`). A later release of either channel is admitted without a plugin update, but stays unverified until a record is added to `dsh.compatibility.dshReleases`. `0.2.3` and later are deliberately excluded — the upper bounds are written `<0.2.2-0` / `<0.2.3-0` for exactly that reason. A profile on `0.2.0-rc.2`, `0.2.1-alpha.5` or older must upgrade its engine first. Compatibility details — the `engines.dsh` admission rule, package pairings, evidence — live in [engine compatibility](docs/agent-reference/engine-compatibility.md).
|
|
66
|
+
|
|
67
|
+
### Node.js 24.9 or newer is required
|
|
68
|
+
|
|
69
|
+
**This release raises the Node.js floor from 22 to 24.9. On Node 22 or 23, upgrade Node before updating this plugin.**
|
|
70
|
+
|
|
71
|
+
dsh `0.2.2-alpha.2` declares `engines.node >=24.9.0` and this plugin admits that engine, so the package-wide floor had to follow: a plugin that claims to support an engine must not be installable on a Node version that engine cannot start on. What that means in practice:
|
|
72
|
+
|
|
73
|
+
- `npm` reports `EBADENGINE` when installing or updating this plugin on Node 22/23. It is a warning, not a hard failure, unless your npm sets `engine-strict=true`.
|
|
74
|
+
- The `0.2.2` engines genuinely cannot run on Node 22/23, so a profile admitted there would fail at startup — the failure this floor exists to prevent.
|
|
75
|
+
- The `0.2.1` RC engines still run on Node 22, but `engines.node` is a single floor for the whole package, so it applies to them too. That is the cost of admitting two channels in one build.
|
|
76
|
+
|
|
77
|
+
`nvm install 24 && nvm use 24` (or any Node 24.9+ distribution) resolves it. Node 24 is a current LTS line.
|
|
65
78
|
|
|
66
79
|
**Older dsh releases** are no longer supported: the last plugin release for dsh 0.1.7 is `0.11.17`, for 0.1.2–0.1.6 it is `0.11.11`, and for the 0.5.0-era line `0.9.1` — all installed by exact version, none maintained.
|
|
67
80
|
|
|
@@ -152,7 +165,7 @@ With several Command Code subscriptions, the plugin **switches to the next accou
|
|
|
152
165
|
- **Dedicated models** — expand an account and pick its **Dedicated models** from the live catalog. Those requests serve from that account while it is usable; an exhausted account falls back to the normal rotation. A model belongs to one account at a time (stored as `modelAccountRules`).
|
|
153
166
|
- **Show only favorite models** — the **Visible models** picker in the **Models & context** card keeps only the checked models in the picker; unchecked shows all (the default).
|
|
154
167
|
|
|
155
|
-
Each account row shows its plan, status and 5-hour/weekly meters; expand it for the full report, or run `/commandcode`. The equivalent YAML is in [Configure](#configure).
|
|
168
|
+
Each account row shows its plan, status and 5-hour/weekly meters; expand it for the full report, or run `/commandcode`. When a refreshed report shows a spent window, that account also leaves automatic selection until the window resets. The equivalent YAML is in [Configure](#configure).
|
|
156
169
|
|
|
157
170
|
## Configure
|
|
158
171
|
|
package/README.zh-CN.md
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
| | |
|
|
20
20
|
|---|---|
|
|
21
|
-
| 已验证引擎 | dsh
|
|
21
|
+
| 已验证引擎 | dsh `0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.1-rc.4`、`0.2.2-alpha.2` |
|
|
22
|
+
| Node.js | **`>=24.9`** —— 本版从 22 提高,见[需要 Node.js 24.9 或更高版本](#需要-nodejs-249-或更高版本) |
|
|
22
23
|
| 安装 —— 网页端 | `dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest` |
|
|
23
24
|
| 安装 —— 终端端 | `dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@latest` |
|
|
24
25
|
| 配置文件 | `$DSH_HOME/settings.yaml` → `llm-commandcode:` |
|
|
@@ -61,7 +62,19 @@
|
|
|
61
62
|
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
本构建准入 **dsh `>=0.2.1-rc.2 <0.2.2-0`** —— `0.2.1` 通道中 `0.2.1-rc.2` 及以后的每个 RC
|
|
65
|
+
本构建准入 **dsh `>=0.2.1-rc.2 <0.2.2-0`** —— `0.2.1` 通道中 `0.2.1-rc.2` 及以后的每个 RC —— **以及 `>=0.2.2-alpha.2 <0.2.3-0`**,即 `0.2.2` 通道从当前 alpha 起的每个版本。`0.2.1-rc.2` 是 npm `latest` 指向的版本,`0.2.1-rc.4` 挂在 `next`,`0.2.2-alpha.2` 挂在 `alpha`;这四个版本都跑过完整引擎矩阵(`npm run test:engine`、`npm run test:install`)。两个通道中更晚的版本无需更新插件即可准入,但在 `dsh.compatibility.dshReleases` 补上记录之前不算已验证。`0.2.3` 及以后被刻意排除 —— 两个区间上界分别写成 `<0.2.2-0` 与 `<0.2.3-0` 正是为了这一点。使用 `0.2.0-rc.2`、`0.2.1-alpha.5` 或更早版本的配置需先升级引擎,再安装本构建。兼容性细节 —— `engines.dsh` 准入规则、按引擎配对的包版本、验证证据 —— 见[引擎兼容](docs/agent-reference/engine-compatibility.md)。
|
|
66
|
+
|
|
67
|
+
### 需要 Node.js 24.9 或更高版本
|
|
68
|
+
|
|
69
|
+
**本版把 Node.js 下界从 22 提到 24.9。如果你在用 Node 22 或 23,请先升级 Node,再更新本插件。**
|
|
70
|
+
|
|
71
|
+
dsh `0.2.2-alpha.2` 自己声明 `engines.node >=24.9.0`,而本插件准入这个引擎,所以整包的 Node 下界必须跟着抬到同一水位:一个声称支持某引擎的插件,不该能被装到一个那个引擎根本起不来的 Node 上。实际影响:
|
|
72
|
+
|
|
73
|
+
- 在 Node 22/23 上安装或更新本插件时,`npm` 会报 `EBADENGINE`。这是警告而非硬失败 —— 除非你的 npm 设了 `engine-strict=true`。
|
|
74
|
+
- `0.2.2` 的引擎在 Node 22/23 上确实跑不起来,被准入却启动失败正是这条下界要挡的情况。
|
|
75
|
+
- `0.2.1` 的 RC 引擎仍能在 Node 22 上运行,但 `engines.node` 是整包唯一的下界,所以对它们同样生效。这是在一个构建里同时准入两个通道的代价。
|
|
76
|
+
|
|
77
|
+
执行 `nvm install 24 && nvm use 24`(或换用任意 Node 24.9+ 发行版)即可解决。Node 24 是当前 LTS 线。
|
|
65
78
|
|
|
66
79
|
**更早的 dsh 版本**已不再支持:覆盖 dsh 0.1.7 的最后一个插件版本是 `0.11.17`,0.1.2–0.1.6 线的最后一个版本是 `0.11.11`,0.5.0 时代 Harness 线的最后一个版本是 `0.9.1` —— 三者都按精确版本安装,且都不再维护。
|
|
67
80
|
|
|
@@ -152,7 +165,7 @@ cmd login # 写入 ~/.commandcode/auth.json
|
|
|
152
165
|
- **专用模型**:展开某个账户,从实时模型目录**多选**它的「专用模型」。请求这些模型且该账户可用时使用该账户;账户耗尽或密钥失效时自动回落到常规轮换。一个模型同一时间只属于一个账户,给另一个账户选择它会自动移过去(仍保存为 `modelAccountRules`)。
|
|
153
166
|
- **只显示常用模型**:在「模型与上下文」卡片的「可见模型」中勾选要保留的模型,模型选择器只列出这些;不勾选则显示全部(默认行为不变)。
|
|
154
167
|
|
|
155
|
-
每个账户行直接显示套餐、状态以及 5 小时 / 每周额度条,展开可查看完整报告,也可运行 `/commandcode
|
|
168
|
+
每个账户行直接显示套餐、状态以及 5 小时 / 每周额度条,展开可查看完整报告,也可运行 `/commandcode`。刷新到某个窗口已用满时,该账户同时退出自动选择,直到窗口重置。等价的 YAML 见[配置](#配置)一节。
|
|
156
169
|
|
|
157
170
|
## 配置
|
|
158
171
|
|