@mars-sea/dsh-commandcode-provider 0.12.10 → 0.13.1
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 +28 -0
- package/README.md +10 -10
- package/README.zh-CN.md +5 -4
- package/lib/client.js +1354 -86
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +81 -8
- package/lib/index.js +690 -110
- package/lib/index.js.map +1 -1
- package/package.json +37 -38
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@ 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.13.1] - 2026-10-14
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- 模型分析第二版沿用宿主字体、语义主题、按钮与分段控件,统一筛选控件高度、卡片和明细布局。历史与价格试算分别呈现,可在窄面板中恢复逐指标标签和两列分组,保留键盘页签、展开及缺失提示;不改变统计口径、后端契约或历史读取时机。
|
|
12
|
+
- 历史模型显示名称与已知成本占比,名称复用同一报告的试算目录,比例为模型已知成本除以全部已知成本小计;没有计价样本或零小计时显示“无占比”,已知零成本仍显示零金额。价格试算单独展示计价覆盖、超上下文与未知数量,明确不同覆盖的金额不能直接比较。新增占比边界回归用例,生成客户端产物与实现说明同步。
|
|
13
|
+
- npm 发布改用 GitHub Actions(自动化工作流)手动触发的 Trusted Publishing(可信发布),通过 OIDC(开放身份连接)认证,不保存长期发布令牌。工作流默认仅检查,实际发布须显式开启;校验版本标签、仓库、构建产物及重复版本,并执行全部发布检查后上传同一发布包。
|
|
14
|
+
|
|
15
|
+
## [0.13.0] - 2026-10-14
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- 问题 #79:设置页可打开模型分析,按最近会话或本地日期查看历史词元、按当前价重算的成本、响应/首词元耗时、输出速度、失败/重试/取消及样本覆盖;读取持久化历史并去除分支继承用量。提供固定工作量的模型价格试算与客观能力,不自动推荐或打质量分。 页面以核心指标总览、历史用量/价格试算两个页签及可展开明细呈现,支持明暗主题与窄屏,避免同屏宽表和无标签数字串。缺失用量和计时保持未知,读取上限和部分结果明确展示,完整时间范围才折算 30 天成本;统计口径见 [实现说明](docs/模型成本与性能分析.md)。
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- 引擎兼容收敛为 `0.2.0-rc.2 || 0.2.1-alpha.2`:只维护官方最新已验证的 RC(候选发布版)与 alpha(早期测试版),每条通道一版;移除 `0.2.1-alpha.1`。兼容声明、锁文件、两版本验证矩阵与升级说明同步,配套 Cordis、Schemastery 范围不变。旧 alpha 配置需先升级引擎。
|
|
24
|
+
- 同步 Command Code CLI `1.81.0` → `1.82.1`:请求版本标识(`x-command-code-version`)随之上调。上游 `1.82.0` 的公开变更是新增 Gemini Argon、模型拒绝(refusal)后不再自动重发同一提示,以及 `!` bash 模式(bash mode)的命令与输出能到达 agent;`1.82.1` **没有官方日志条目**,结论来自产物级静态比对——逐字符比对两版 `dist/cli.mjs`,扣除死代码后只有版本字符串与语言引导界面(`LanguageOnboarding`/`needsLanguageOnboarding`/`isLocale` 及「Choose a language / 选择语言」整块)被删除两处差异。两处都在 CLI 交互层,**不改变 Provider API 的 wire 协议**,因此适配器运行时代码零改动。
|
|
25
|
+
- 新增模型 `google/gemini-4-argon`(Gemini 4 Argon,Google):1M 上下文,支持图像输入,三档推理强度(`low`/`medium`/`high`),最低套餐 **Pro**(Go/Go v1/GOAT 均为 false),定价 $2/$10/$0.1(输入/输出/缓存读,每百万词元)。它**不在** ZDR 排除集内,也不属于峰谷计价或 thinking-only 模型。能力快照(推理档位、图像能力、套餐分层)与价格表同步收录;`KNOWN_PLANS` 累计分层由 54/64/78/86/88 变为 54/64/79/87/89。
|
|
26
|
+
- 重新生成模型价格表:补入 `google/gemini-4-argon` 一行(额度 Go $6/GOAT $20/Pro $20),并修正 `deepseek-v4.1-flash` 的每月额度 `$10/$60/$70` → `$10/$100/$100`(官网已上调,与单价无关)。同时重新生成输出上限表,补入 `google/gemini-4-argon`(32768,取自 models.dev 的 google 官方行),写入数由 76 变为 77。
|
|
27
|
+
- 同步 Command Code CLI `1.79.2` → `1.81.0`:请求版本标识(`x-command-code-version`)随之上调。上游 `1.80.0` 的公开变更是 Mods Hub/ModApi、新增 Muse Wonder 与两处修复;`1.81.0` 新增脚本优先工具调用(codemode,含 QuickJS 沙箱),属 CLI 自身工具层,**不改变 Provider API 的 wire 协议**。逐字段比对两版产物(模型注册表、effort 映射、ZDR 例外集、订阅表、端点、请求头、环境变量、流式事件类型)确认数据面零差异,因此本轮不改动适配器运行时代码。
|
|
28
|
+
- 新增模型 `meta/muse-wonder-1.0`(Muse Wonder,Meta):1M 上下文,支持图像与文件输入,四档推理强度(`low`/`medium`/`high`/`xhigh`),最低套餐 **Max**,定价 $4/$20/$0.2(输入/输出/缓存读,每百万词元)。该模型被上游 CLI 列入零数据保留(ZDR)排除集,因此开启 ZDR 时对其请求会以 422 `cmd_zdr_no_providers` 被拒。能力快照(推理档位、图像能力、套餐分层、ZDR 例外)与价格表同步收录。
|
|
29
|
+
- 重新生成模型输出上限表:补入 `claude-haiku-5-5`(128000)与 `meta/muse-wonder-1.0`(131072)。生成器同时删除了三行,其中 `inclusionai/ling-3.0-flash-sante:free`(32768)仍在官方目录、仍为 Go 档免费模型,因此改用 `MANUAL_CEILINGS` 固定,避免重新生成时把活跃模型的上限退回默认 131072;两个已退役的 stealth 预览(Pixel Canary、Space Bunny Alpha)保持删除——它们已不在 `KNOWN_PLANS`,任何表都不再命名。
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- 问题 #76:账号接口收到 HTTP 200 后的正文读取超时或中断不再被混同为 JSON 格式异常。错误详情分别显示读取、解析与顶层结构问题,并仅保留经过筛选的异常标识和内容类型/编码;不回显响应正文或原异常消息。设置页、用量面板和命令提示同步调整,报告协议与账号轮换行为不变。此修复解决已复现的诊断缺陷,反馈者实际链路的根因仍待验证。
|
|
34
|
+
|
|
7
35
|
## [0.12.10] - 2026-10-10
|
|
8
36
|
|
|
9
37
|
### Changed
|
package/README.md
CHANGED
|
@@ -18,6 +18,7 @@ Unofficial [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harnes
|
|
|
18
18
|
|
|
19
19
|
- **Plugin bundle** — install into any dsh profile with `dsh plugin add`; registers a `commandcode` provider route with a live model catalog.
|
|
20
20
|
- **Dedicated settings page** — one account list (keys, sign-in, live quota, dedicated models), model visibility, privacy switches, and connection options.
|
|
21
|
+
- **Model analysis** — open from Settings to inspect tokens, estimated cost, response timing and failures/retries by recent sessions or date range, including closed sessions with inherited fork usage excluded. Compare fixed-workload prices and objective capabilities without automatic recommendations or quality scores. Missing data and scan limits remain visible; complete date ranges can be extrapolated to 30 days. Estimates use current prices and are not invoices. See [scope and limitations](docs/模型成本与性能分析.md).
|
|
21
22
|
- **Works in the terminal too** — the same install serves a [dsh-TUI](#terminal-ui-dsh-tui) profile, with its own **`/settings` → Command Code** page for the API key and the model controls.
|
|
22
23
|
- **Models-page key card** — the **Settings → Models → Command Code** card carries the key status, a paste field, and the sign-in button inline.
|
|
23
24
|
- **In-browser sign-in for keys** — start the official authorization flow (the same one `cmd login` runs) from the settings page; the approved key lands in the local credential service automatically. Manual paste remains the fallback.
|
|
@@ -35,13 +36,12 @@ See [Screenshots](#screenshots) below for what the UI looks like.
|
|
|
35
36
|
|
|
36
37
|
## Install
|
|
37
38
|
|
|
38
|
-
This release supports **dsh 0.2.0-rc.2
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
a profile pinned to it keeps working:
|
|
39
|
+
This release supports **dsh 0.2.0-rc.2 (RC) and dsh 0.2.1-alpha.2 (alpha)**.
|
|
40
|
+
The compatibility policy keeps the latest verified official release candidate
|
|
41
|
+
and alpha release, one per channel. These match npm's `latest` and `alpha` tags
|
|
42
|
+
as checked on 2026-10-11. The peer range and compatibility records name only
|
|
43
|
+
these two exact versions. A profile on `0.2.1-alpha.1` must upgrade its engine
|
|
44
|
+
before installing this build:
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
47
|
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
@@ -75,7 +75,7 @@ Fresh pnpm 10 marketplace generations are supported directly. Every Harness pack
|
|
|
75
75
|
Update with the same tag you installed with:
|
|
76
76
|
|
|
77
77
|
```sh
|
|
78
|
-
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.2.0-rc.2
|
|
78
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.2.0-rc.2 or 0.2.1-alpha.2
|
|
79
79
|
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@0.9.1 # older dsh (0.5.0 line, unmaintained)
|
|
80
80
|
```
|
|
81
81
|
|
|
@@ -149,7 +149,7 @@ cmd login # writes ~/.commandcode/auth.json
|
|
|
149
149
|
cwd: !!js process.cwd()
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
**Engine version.** The plugin is maintained against
|
|
152
|
+
**Engine version.** The plugin is maintained against two engines: **dsh 0.2.0-rc.2** and **dsh 0.2.1-alpha.2**. Its `@deepseek-ai/dsh-*` peers use `0.2.0-rc.2 || 0.2.1-alpha.2`, while `@deepseek-ai/cordis` and `@deepseek-ai/schemastery` retain their engine-paired ranges `~4.0.4 || ~4.0.5-alpha.1` and `~3.18.4 || ~3.18.5-alpha.1`. Compatibility records contain exactly these two engines. Each channel upgrade replaces its previous version after verification; it does not accumulate supported releases or admit unverified neighbours. Both `npm run test:engine` and `npm run test:install` check each retained version. See [Install](#install) for older engines.
|
|
153
153
|
|
|
154
154
|
## Usage dashboard
|
|
155
155
|
|
|
@@ -236,7 +236,7 @@ Command Code can serve a request only through upstreams that retain no prompts o
|
|
|
236
236
|
|
|
237
237
|
**Off by default.** Turn it on with the *"Zero data retention (ZDR)"* toggle (`zdr`) in the Privacy & security card, or in your profile config. How this plugin implements it:
|
|
238
238
|
|
|
239
|
-
- The header is sent on **every chat request** while ZDR is on. The plugin maintains an informational exception list (`KNOWN_NON_ZDR_MODELS`, synced from the official CLI —
|
|
239
|
+
- The header is sent on **every chat request** while ZDR is on. The plugin maintains an informational exception list (`KNOWN_NON_ZDR_MODELS`, synced from the official CLI — 22 models as of 2026-10-14, e.g. `xai/grok-4.5`, `stealth/glyph-cluster:free`, `stepfun/Step-3.7-Flash`, `meta/muse-wonder-1.0`). A model without an available ZDR upstream fails with `422 cmd_zdr_no_providers`; the request is never retried without the header.
|
|
240
240
|
- If a refusal still happens (coverage churn, or no ZDR upstream with spare capacity at that moment), the error names the cause and how to turn ZDR off, instead of surfacing as a bare HTTP 422.
|
|
241
241
|
- **ZDR usually costs more**: capacity is limited and billed at each upstream's pass-through rates, and which upstream serves a request can change per request. The session-cost readout keeps quoting the ordinary catalog rates; the real per-request price shows in Command Code's Studio usage page.
|
|
242
242
|
- Works on every plan; plan credits meter ZDR requests at the plan's default allowance.
|
package/README.zh-CN.md
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
- **插件包**:一条 `dsh plugin add` 命令安装到任意 dsh 配置,注册 `commandcode` provider 路由,带实时模型目录。
|
|
20
20
|
- **专属设置页**:统一的账户列表(密钥、网页登录、实时额度、专用模型)、模型显示、隐私开关与连接参数。
|
|
21
|
+
- **模型分析**:从设置页打开,按最近会话或日期查看历史词元、估算成本、响应速度与失败/重试,比较固定工作量在其他可见模型上的价格和客观能力。包含已关闭会话、去除分支继承用量,显示缺失数据和读取覆盖;完整时间范围可折算 30 天成本。不自动推荐、不评价任务质量。金额按当前价重算,不是账单;[统计口径与限制](docs/模型成本与性能分析.md)。
|
|
21
22
|
- **终端界面同样可用**:同一次安装即可服务 [dsh-TUI](#终端界面dsh-tui) 配置,终端里有自己的 **`/settings` → Command Code** 页面来填 key 和调模型。
|
|
22
23
|
- **Models 页快捷卡片**:**设置 → Models → Command Code** 卡片内直接显示 key 状态、粘贴输入框和登录按钮。
|
|
23
24
|
- **浏览器内登录获取 key**:设置页一键发起官方授权(与 `cmd login` 同一流程),完成后密钥自动写入本机凭据服务,无需手动创建或粘贴;不可用时随时退回手动粘贴。
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
|
|
34
35
|
## 安装
|
|
35
36
|
|
|
36
|
-
本版本**只支持 dsh 0.2.0-rc.2
|
|
37
|
+
本版本**只支持 dsh 0.2.0-rc.2(RC,候选发布版)与 dsh 0.2.1-alpha.2(alpha,早期测试版)**。维护策略为每条通道只保留官方最新且经过验证的一个版本;2026-10-11 核对时分别对应 npm 的 `latest` 与 `alpha` 发布标签。对等依赖范围和兼容记录只列这两个精确版本。使用 `0.2.1-alpha.1` 的配置需先升级引擎,再安装本构建:
|
|
37
38
|
|
|
38
39
|
```sh
|
|
39
40
|
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
@@ -62,7 +63,7 @@ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.15
|
|
|
62
63
|
用与安装时相同的 tag 更新:
|
|
63
64
|
|
|
64
65
|
```sh
|
|
65
|
-
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.2.0-rc.2
|
|
66
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.2.0-rc.2 或 0.2.1-alpha.2
|
|
66
67
|
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@0.9.1 # 更早的 dsh(0.5.0 线,不再维护)
|
|
67
68
|
```
|
|
68
69
|
|
|
@@ -136,7 +137,7 @@ cmd login # 写入 ~/.commandcode/auth.json
|
|
|
136
137
|
cwd: !!js process.cwd()
|
|
137
138
|
```
|
|
138
139
|
|
|
139
|
-
**引擎版本要求。**
|
|
140
|
+
**引擎版本要求。** 插件维护两个引擎:**dsh 0.2.0-rc.2** 与 **dsh 0.2.1-alpha.2**。`@deepseek-ai/dsh-*` 对等依赖为 `0.2.0-rc.2 || 0.2.1-alpha.2`;`@deepseek-ai/cordis` 与 `@deepseek-ai/schemastery` 仍使用随引擎配对的范围 `~4.0.4 || ~4.0.5-alpha.1` 与 `~3.18.4 || ~3.18.5-alpha.1`。兼容记录恰好包含两个版本,同通道升级验证后替换旧版,不累加已支持版本、不放行未验证的邻近版本。`npm run test:engine` 与 `npm run test:install` 均逐版本验证。旧引擎安装说明见[安装](#安装)。
|
|
140
141
|
|
|
141
142
|
## 用量面板
|
|
142
143
|
|
|
@@ -223,7 +224,7 @@ Command Code 可以让请求只经由「不留存提示词与回复、也不用
|
|
|
223
224
|
|
|
224
225
|
**默认关闭。** 在「隐私与安全」卡片里打开「零数据保留(ZDR)」(`zdr`),或写进 profile 配置。本插件的实现方式:
|
|
225
226
|
|
|
226
|
-
- 开启后,**每次聊天请求**都会带上 ZDR 请求头。插件仍维护官方 CLI 的例外名单(`KNOWN_NON_ZDR_MODELS`,截至 2026-10-
|
|
227
|
+
- 开启后,**每次聊天请求**都会带上 ZDR 请求头。插件仍维护官方 CLI 的例外名单(`KNOWN_NON_ZDR_MODELS`,截至 2026-10-14 共 22 个模型,例如 `xai/grok-4.5`、`stealth/glyph-cluster:free`、`stepfun/Step-3.7-Flash`、`meta/muse-wonder-1.0`)供查询。没有可用 ZDR 上游时,服务端返回 `422 cmd_zdr_no_providers`;插件不会去掉请求头重试。
|
|
227
228
|
- 万一仍被拒绝(名单过期,或那一刻没有空闲的 ZDR 上游容量),错误信息会说明原因并给出关闭 ZDR 的办法,而不是抛出一个光秃秃的 HTTP 422。
|
|
228
229
|
- **ZDR 通常更贵**:容量有限,按各上游实价透传计费,且每次请求落在哪个上游可能不同。会话费用读数仍按常规目录价估算;真实单价见 Command Code Studio 的用量页。
|
|
229
230
|
- 各套餐均可使用;ZDR 请求按套餐的默认额度(而非提升额度)计量。
|