@mars-sea/dsh-commandcode-provider 0.12.2 → 0.12.4
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 +51 -1
- package/README.md +4 -4
- package/README.zh-CN.md +4 -4
- package/lib/client.js +5753 -5100
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +305 -165
- package/lib/index.js +4414 -3693
- package/lib/index.js.map +1 -1
- package/package.json +42 -44
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,56 @@ 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.12.4] - 2026-10-04
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **引擎配对从 `0.2.0-rc.2` 升到 `0.2.1-alpha.1`,业务代码零改动。** 所有 `@deepseek-ai/dsh-*` peer 与开发依赖、`dsh.compatibility.dsh`、`engines.dsh` 和那唯一一条 `dshReleases` 记录现在一起指向 `0.2.1-alpha.1`。本次审计覆盖官方全量公开源码增量(4760 个变更路径、341 个包清单):本插件导入的每个包**都没有破坏性变更**——`dsh-llm` 的 `GenerateOptions`/`RequestMessage`/`ContentBlock`/`LlmError` 线格式类型零改动(`src` 下三处差异全是删除 invariant 重抛逻辑与注释链接更新),`dsh-settings` 与 `dsh-credentials` 只在内部通知路径上做同样删除、公开 API 不变,`dsh-commands`、`dsh-web`、`dsh-typert-protocol`、`dsh-timeout`、`dsh-launch-environment` 入口全部存活。本插件注册的五个 slot id(`settings.section`、`settings.models.provider-card`、`settings.models.footer`、`sidebar.footer.action`、`conversation.composer.dock`)全部健在,`conversation.composer.dock` 的 `{ kind: 'list'; scope: 'session' }` 契约未变,`packages/client/web/src/boot.ts` 零变更因而 Web 端 `staticModules` 种子表不变、`react` / `ui-primitives` / `ui-slots` 的 optional 策略继续成立。`npm run test:engine` 在真实 `@deepseek-ai/dsh@0.2.1-alpha.1` 上通过(ESM 链接、静态具名导入审计、客户端 `require()` 种子审计、22 个流终态场景、网关事实隔离、持久化图片卸载契约、Config 易变契约)。
|
|
12
|
+
|
|
13
|
+
⚠️ **`0.2.1-alpha.1` 是 alpha 早期测试版,稳定性低于它取代的 `0.2.0-rc.2` 候选发布**,这是维护者在本轮明确权衡后接受的配对,不是疏漏。
|
|
14
|
+
|
|
15
|
+
- **`@deepseek-ai/cordis` 与 `@deepseek-ai/schemastery` 随引擎同批迁移。** 上游每个 Harness 包都以 `workspace:~` 声明这两个包,发布引擎时会被改写成同批的 `~<version>`:`0.2.1-alpha.1` 配 `cordis ~4.0.5-alpha.1` 与 `schemastery ~3.18.5-alpha.1`(npm 上两者都有 `dsh-0-2-1-alpha-1` dist-tag)。原有的 `^4.0.2` 与 `~3.18.4` 不是静默不匹配而是直接 `ERESOLVE`:`dsh-agent@0.2.1-alpha.1` 要求 `cordis ~4.0.5-alpha.1`,`dsh-settings@0.2.1-alpha.1` 要求 `schemastery ~3.18.5-alpha.1`。`react ^18.2.0` 不受本次迁移影响,保持原样。
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
18
|
+
|
|
19
|
+
- **不再声明 `@deepseek-ai/dsh-invariants`。** 上游在 `0.2.1-alpha.1` 删除了运行时 invariant 插件及所有包的 `./invariant` 子路径导出,`packages/runtime-diagnostics/invariants` 整棵目录从源码树消失,且 npm 上从未发布过该包的 `0.2.1-alpha.1`(照抄引擎版本号会 404)。本插件源码从未 import 它,所以这条声明是直接移除而非替换。`scripts/verify-isolated-install.mjs` 的隔离安装断言改为从 `package.json` 读取声明的 `@deepseek-ai/dsh-llm` peer 再比对锁文件,不再硬编码包名——上游删掉某个 peer 时这条检查会失败,而不是靠陈旧预期蒙混过关。
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **输入框下方费用读数不再依赖一个已被上游第二次删除的 DOM 锚点。** `data-composer-stats` 在 `0.2.1-alpha.1` 第二次消失:官方把单一的 `StatsPills` 组件拆成 `activity`(order 0)与 `usage`(order 1)两个独立的 dock 入口,每个 pill 自带标记,不再有共同的外层容器。插件的 `STATS_ROOT` 一直是「有则用、无则退回 dock outlet」的偏好而非硬要求——这正是它为 `0.1.6-alpha.2` 第一次删除该属性时设计的退路,本次无需改行为。已逐项核实退路在新结构下依然正确:两个 pill 都保留 `aria-haspopup="dialog"`,`activity` 在前、`usage` 在后,因此「最后一个触发器胜出」仍选中用量 pill;`data-session-stats-usage` 仍唯一属于 token 对话框。源码与测试注释已更新为记录第二次删除的事实。
|
|
24
|
+
|
|
25
|
+
### 刻意未采纳
|
|
26
|
+
|
|
27
|
+
Claude Code Mods 兼容层、插件管理页的「让 Agent 创建插件」入口、开发者工具组合包、Web 的 `--public-url`、子路径插件不再读取独立 `package.json`(对本插件 `./client` 与 `./locale/*.json` 导出**未观察到影响,但并非已证明无影响**),以及 `bindDraftMirror` → `bindDraftPersistence` 的会话契约改名——均不属于本插件拥有的界面所需。
|
|
28
|
+
|
|
29
|
+
## [0.12.3] - 2026-10-03
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- DeepSeek V4 系列新增 `off` 思考档,与官方 command-code@1.73.3 对齐:`deepseek-v4-pro`、`deepseek-v4-flash`、`deepseek-v4-flash-vision-exp`、`deepseek-v4.1-flash`、`deepseek-v4.1-flash-fast` 的可选档位里现在有 `off`,可以真正关闭思考。判定依据是快照本身——官方 CLI 的请求体只要 effort 非空字符串就原样下发,所以 `off` 是靠 `reasoning_effort:"off"` 这个字段本身生效的,省略字段反而做不到;因此仅当模型快照列出 `off` 时透传,未列出的模型(Claude 全系,以及始终三档的 `deepseek-v4-flash-fast`)继续保持原有行为:把 `off` 当作"未请求思考强度"而丢弃。
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- 同步官方 command-code@1.74.1:请求头 `x-command-code-version` 升至 `1.74.1`;Space Bunny Alpha 增加 `max` 档(官方 1.73.4),成为四档模型;零数据保留例外名单移除 `meituan/LongCat-2.0`(官方已不再把它列入任何 ZDR 排除集合,名单由 23 项减为 22 项)。
|
|
38
|
+
|
|
39
|
+
### Removed
|
|
40
|
+
|
|
41
|
+
- 移除 `stealth/pixel-canary` 的全部快照条目(思考档、Vision、最低套餐、免费促销)。官方已于 2026-10-01 结束该隐身预览:CLI 用 `hidden` 标记把它从模型选择器隐藏,模型也已从 `/provider/v1/models` 与定价页撤下,继续展示只会给出一个调不通的选项。它仍保留在零数据保留例外名单里——官方 CLI 的 ZDR 集合至今仍列着它,`supportsZeroDataRetention()` 对老会话里残留的 id 依然要说实话。
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- 固定单次调用的连接、账号定义和目录路由,避免设置切换期间混用网关事实;隔离各网关账号状态与探测,统一目录刷新发布权,保留失败前有效事实,并发已有更低上限时仍可完成本次唯一降档重试。用量展示使用同一来源及恢复后的健康事实。
|
|
46
|
+
|
|
47
|
+
- 统一设置保存与即时账号操作的写入顺序,普通字段和模型选择整批提交;默认密钥引用变化时停止或提示核对,避免迟到保存恢复已清密钥或写入错误引用。区分配置、密钥和状态刷新结果,保留新草稿并提供只刷新状态的重试;插件销毁停止未发操作,取消继承固定账号真正恢复自动轮换。
|
|
48
|
+
|
|
49
|
+
- 集中单次流响应收束:取消后停止缓冲正文、工具和成功结束,保留已解析用量;协议最终标记后忽略多余内容,底层取消不返回也能释放本地读取。保留正文截断行为及 OpenAI 尾部失败规则,并增加真实宿主终止装配验证。
|
|
50
|
+
|
|
51
|
+
- 网页登录在收到授权地址后自动打开新页面,每次尝试只打开一次;保留手动链接,避免浏览器拦截自动打开后无法继续授权。
|
|
52
|
+
|
|
53
|
+
- 将两种新增账号方式收进宿主开通过程:设置页离开或观察流断开后取消,已开始的凭据写入结束后再补偿;命名失败保留已登录账号,清理失败持久显示并由用户重试。
|
|
54
|
+
|
|
55
|
+
- 修复持续集成里"隔离安装"检查在 npm 10 下必然失败:`npm pack --json` 在 npm 10 仍会触发本项目的 `prepare`(`tsdown`),其彩色横幅打在 stdout 上、排在 JSON 之前,脚本直接 `JSON.parse(stdout)` 就抛 `Unexpected token 'ℹ'` 并中断该步骤。改为跳过 JSON 之前的噪声再解析,并接受数组与键值对象两种形状;两个打包校验脚本共用同一套解析,新增 6 条用例(含噪声中的方括号、无 JSON 时报错、噪声超上限停止扫描)。本地 npm 11 不触发 `prepare`,所以只在持续集成暴露。
|
|
56
|
+
|
|
7
57
|
## [0.12.2] - 2026-10-01
|
|
8
58
|
|
|
9
59
|
### Added
|
|
@@ -86,7 +136,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
86
136
|
checked against their registry-published sha512 digests (`pi-ai` 0.87.1, `command-code` 1.68.0, both
|
|
87
137
|
matching) rather than taken on trust, and `command-code` 1.68.0 separately shows the CLI marks only its own
|
|
88
138
|
system section and never touches this endpoint — which is why the CLI-route cache regressions in
|
|
89
|
-
[docs/issue-64-cache-review.md](
|
|
139
|
+
[docs/issue-64-cache-review.md](docs/issue-64-cache-review.md) say nothing about this one. **This could
|
|
90
140
|
not be confirmed against a live Command Code response** — the account had no remaining quota — so the
|
|
91
141
|
claim that the gateway honours the field rests on the official provider depending on it for its own cost
|
|
92
142
|
display, not on a measured `cache_read_input_tokens`. The downside is bounded either way: a gateway that
|
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ See [Screenshots](#screenshots) below for what the UI looks like.
|
|
|
35
35
|
|
|
36
36
|
## Install
|
|
37
37
|
|
|
38
|
-
This release supports **dsh 0.2.
|
|
38
|
+
This release supports **dsh 0.2.1-alpha.1 and nothing else** — the plugin's peer
|
|
39
39
|
range is that one version, and its compatibility record names it alone:
|
|
40
40
|
|
|
41
41
|
```sh
|
|
@@ -63,14 +63,14 @@ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.15
|
|
|
63
63
|
|
|
64
64
|
The same applies to every profile you install into, including the terminal UI below.
|
|
65
65
|
|
|
66
|
-
Fresh pnpm 10 marketplace generations are supported directly.
|
|
66
|
+
Fresh pnpm 10 marketplace generations are supported directly. Every Harness package — including `@deepseek-ai/cordis` and `@deepseek-ai/schemastery` — is declared by the plugin at an exact version as a Host peer, so the active dsh profile remains their owner; do not add a separate dependency for any of them. Upstream removed the `@deepseek-ai/dsh-invariants` package in `0.2.1-alpha.1`, so the plugin no longer declares it.
|
|
67
67
|
|
|
68
68
|
## Updating
|
|
69
69
|
|
|
70
70
|
Update with the same tag you installed with:
|
|
71
71
|
|
|
72
72
|
```sh
|
|
73
|
-
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.2.
|
|
73
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.2.1-alpha.1
|
|
74
74
|
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@0.9.1 # older dsh (0.5.0 line, unmaintained)
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -144,7 +144,7 @@ cmd login # writes ~/.commandcode/auth.json
|
|
|
144
144
|
cwd: !!js process.cwd()
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
**Engine version.** The plugin is maintained against exactly one engine: **dsh 0.2.
|
|
147
|
+
**Engine version.** The plugin is maintained against exactly one engine: **dsh 0.2.1-alpha.1**. Its `@deepseek-ai/dsh-*` peers use the exact version `0.2.1-alpha.1`, `@deepseek-ai/cordis` is pinned to `~4.0.5-alpha.1` and `@deepseek-ai/schemastery` to `~3.18.5-alpha.1` (all three released with that engine), and `dsh.compatibility.dshReleases` records that single release. Adjacent prereleases and stable patch versions have not been verified. Note that `0.2.1-alpha.1` is an early alpha, so it is less stable than the `0.2.0-rc.2` release candidate it replaces. On an older engine the settings page, the message envelope, or the request-image budget will not line up — install the last release that supported your engine (see [Install](#install)) instead of forcing this one.
|
|
148
148
|
|
|
149
149
|
## Usage dashboard
|
|
150
150
|
|
package/README.zh-CN.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
## 安装
|
|
35
35
|
|
|
36
|
-
本版本**只支持 dsh 0.2.
|
|
36
|
+
本版本**只支持 dsh 0.2.1-alpha.1**:插件的 peer 范围就是这一个版本,兼容性记录里也只列它。
|
|
37
37
|
|
|
38
38
|
```sh
|
|
39
39
|
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
@@ -55,14 +55,14 @@ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.15
|
|
|
55
55
|
|
|
56
56
|
这一点对每个 profile 都成立,包括下面的终端界面。
|
|
57
57
|
|
|
58
|
-
插件可直接在 pnpm 10 的全新插件市场 generation
|
|
58
|
+
插件可直接在 pnpm 10 的全新插件市场 generation 中安装。所有 Harness 包(含 `@deepseek-ai/cordis`、`@deepseek-ai/schemastery`)都由插件按精确版本声明为 Host peer,由当前 dsh profile 统一管理,不要另行添加 dependency。上游曾在 `0.2.1-alpha.1` 删除 `@deepseek-ai/dsh-invariants` 这个包,因此插件不再声明它。
|
|
59
59
|
|
|
60
60
|
## 更新
|
|
61
61
|
|
|
62
62
|
用与安装时相同的 tag 更新:
|
|
63
63
|
|
|
64
64
|
```sh
|
|
65
|
-
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.2.
|
|
65
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.2.1-alpha.1
|
|
66
66
|
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@0.9.1 # 更早的 dsh(0.5.0 线,不再维护)
|
|
67
67
|
```
|
|
68
68
|
|
|
@@ -136,7 +136,7 @@ cmd login # 写入 ~/.commandcode/auth.json
|
|
|
136
136
|
cwd: !!js process.cwd()
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
**引擎版本要求。** 插件只针对一个引擎维护:**dsh 0.2.
|
|
139
|
+
**引擎版本要求。** 插件只针对一个引擎维护:**dsh 0.2.1-alpha.1**。它的 `@deepseek-ai/dsh-*` 对等依赖使用精确版本 `0.2.1-alpha.1`,`@deepseek-ai/cordis` 固定 `~4.0.5-alpha.1`、`@deepseek-ai/schemastery` 固定 `~3.18.5-alpha.1`(三者都与该引擎同批发布),`dsh.compatibility.dshReleases` 也只记录这一个版本。相邻预发布版与稳定补丁版尚未验证。注意 `0.2.1-alpha.1` 是 alpha 早期测试版,稳定性低于上一版的 `0.2.0-rc.2` 候选发布。在更早的引擎上,设置页、消息封装或请求图片预算总有一处对不上——请改装支持你所用引擎的最后一个版本,而不是硬装这一个。
|
|
140
140
|
|
|
141
141
|
## 用量面板
|
|
142
142
|
|