@mars-sea/dsh-commandcode-provider 0.8.3 → 0.9.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 +38 -0
- package/README.md +3 -0
- package/README.zh-CN.md +3 -0
- package/lib/client.js +563 -91
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +44 -4
- package/lib/index.js +146 -42
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,44 @@ 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
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.9.1] - 2026-08-28
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **New model: Tencent Hy4 Preview (`tencent/hy4-preview`, command-code@1.37.0).** A Go-tier 1M-context reasoning model routed through OpenRouter: it appears in the picker under the Go tier with `1M` markers, is tracked as an auto-thinking model (reasons automatically with no selectable effort levels), and lives outside the Vision whitelist — text input only.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **Synced with the official command-code@1.37.0 CLI** (upstream's only change was the new model above). `COMMAND_CODE_CLI_VERSION` is now `1.37.0`. Plan tiers now read 40/44/57/62 (Go / cumulative-through-Goat / cumulative-through-Pro / cumulative-through-Provider): the new model enters Go. Re-verified against the official sources with no other changes: wire protocol, endpoints, auth flow, reasoning-effort map, subscription plan maps (`individual-*`), image registry, deals, and peak/off-peak windows are all identical; Tencent Hy4 Preview is not hourly-priced.
|
|
18
|
+
|
|
19
|
+
## [0.9.0] - 2026-08-28
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **Bilingual (`zh` / `en`) copy for the Host-side `/commandcode` command and the friendly image-gate error rewrite.** All user-facing strings the command prints (title, blocked-state headline, plan/usage/credit/window sections, mark labels, account badges, partial-failure footer, error text) and the model's `does not accept image input` message rewrite are now resolved through a shared `commandcodeCommand` dictionary. The Host command's locale comes from the new `Config.lang` setting (explicit override, with `LC_ALL`/`LANG` fallback, defaulting to `'zh'` to match the existing single-language behavior); the image-gate wrapper reads the client's active locale at call time (`ctx.locale.getLocale().active`), so a language switch in the settings UI applies to the next selectModel failure immediately. The two surfaces are independent by design — they live on different processes and have no shared locale seam, so each follows the most natural signal for its own runtime.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **`withFriendlyImageError(sessions, getLocale)` now takes a `getLocale` thunk** (previously had no locale parameter). Existing call sites are updated; programmatic consumers can pass `() => 'zh'` (the prior hardcoded language) for unchanged behavior. The `installFriendlyImageError(connection, getLocale)` helper mirrors the new signature.
|
|
28
|
+
- **`commandDefinition(deps)` and `applyCommands(ctx, deps)` accept an optional `getLocale?: () => LocaleId` dep.** The plugin entry wires it from `Config.lang` and the shell's `LC_ALL`/`LANG`; programmatic setups that don't supply it keep rendering with the default `'zh'` (the prior hardcoded language).
|
|
29
|
+
|
|
30
|
+
## [0.8.4] - 2026-08-27
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- **New model: Qwen 3.8 Flash (`Qwen/Qwen3.8-Flash`, command-code@1.36.0).** A Go-tier 1M-context Vision reasoning model with `low`/`medium`/`xhigh` effort levels, rounding out the Qwen 3.8 family alongside the existing Max and 27B variants.
|
|
35
|
+
- **New model: GLM-5.3 Flash (`z-ai/glm-5.3-flash`, command-code@1.35.0).** A Go-tier 1M-context Vision reasoning model with `low`/`high`/`max` effort levels, added to the catalog as the official replacement when the Ox Alpha preview ended.
|
|
36
|
+
|
|
37
|
+
### Removed
|
|
38
|
+
|
|
39
|
+
- **The Ox Alpha preview is over (`stealth/ox-alpha`, command-code@1.34.0).** The model is gone from the catalog, the picker, and the FREE deal list; accounts that were using it should switch to GLM-5.3 Flash (same effort set, Vision-capable, free on every plan).
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- **Synced with the official command-code@1.36.0 CLI.** `COMMAND_CODE_CLI_VERSION` is now `1.36.0`. Plan tiers now read 39/43/56/61 (Go / cumulative-through-Goat / cumulative-through-Pro / cumulative-through-Provider): the two new Go models enter Go, and `stealth/ox-alpha` leaves every tier. Re-verified against the official sources with no other changes: wire protocol, endpoints, auth flow, `KNOWN_SUBSCRIPTION_PLANS` (the `individual-*` plan map and its monthly-credit totals are identical to 1.33.0), `KNOWN_PEAK_PRICING` (DeepSeek V4 Pro/Flash/Vision, 01–04 and 06–10 UTC), and every other deal on the pricing page.
|
|
44
|
+
|
|
7
45
|
## [0.8.3] - 2026-08-26
|
|
8
46
|
|
|
9
47
|
### Fixed
|
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** — API key, connection options, a live account-usage card, and a "Hide out-of-plan models" toggle.
|
|
21
|
+
- **Models-page key card** — on dsh 0.1.2-alpha.1 and later, the **Settings → Models → Command Code** card carries the key status, a paste field, and the sign-in button inline; on older dsh builds it is simply absent and the dedicated page remains the surface.
|
|
21
22
|
- **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.
|
|
22
23
|
- **Multi-account rotation** — when one account hits its usage limit, requests switch to the next account automatically. See [Account rotation](#account-rotation).
|
|
23
24
|
- **Flexible API key setup** — via the settings page, an environment variable, or the official CLI login file.
|
|
@@ -67,6 +68,8 @@ The plugin registers a `/commandcode` slash command showing per-account usage:
|
|
|
67
68
|
/commandcode (or /commandcode status)
|
|
68
69
|
```
|
|
69
70
|
|
|
71
|
+
The command's user-facing copy follows the shell's locale: explicit `lang: 'en' | 'zh'` in the `llm-commandcode` plugin config wins, otherwise `LC_ALL`/`LANG` is read, otherwise it falls back to `zh`. The web settings page is independent — it follows the browser's language preference on its own.
|
|
72
|
+
|
|
70
73
|
## Account rotation
|
|
71
74
|
|
|
72
75
|
With several Command Code subscriptions, the plugin **switches to the next account automatically** when one hits its usage limit:
|
package/README.zh-CN.md
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
- **插件包**:一条 `dsh plugin add` 命令安装到任意 dsh 配置,注册 `commandcode` provider 路由,带实时模型目录。
|
|
20
20
|
- **专属设置页**:API key 输入、连接参数、实时「账户用量」卡片和「隐藏套餐外模型」开关。
|
|
21
|
+
- **Models 页快捷卡片**:在 dsh 0.1.2-alpha.1 及以上版本,**设置 → Models → Command Code** 卡片内直接显示 key 状态、粘贴输入框和登录按钮;旧版 dsh 上该卡片不出现,一切照旧走专属设置页。
|
|
21
22
|
- **浏览器内登录获取 key**:设置页一键发起官方授权(与 `cmd login` 同一流程),完成后密钥自动写入本机凭据服务,无需手动创建或粘贴;不可用时随时退回手动粘贴。
|
|
22
23
|
- **多账户轮换**:一个账户用量打满后,请求自动切换到下一个账户。详见[多账户轮换](#多账户轮换)。
|
|
23
24
|
- **key 配置灵活**:设置页填写、环境变量或官方 CLI 登录文件均可。
|
|
@@ -65,6 +66,8 @@ cmd login # macOS/Linux;Windows 原生版:cmdc login
|
|
|
65
66
|
/commandcode (或 /commandcode status)
|
|
66
67
|
```
|
|
67
68
|
|
|
69
|
+
命令的文案跟随 shell 的语言设置:在 `llm-commandcode` 插件配置里显式写 `lang: 'en' | 'zh'` 优先;否则读 `LC_ALL`/`LANG`;再否则回退到 `zh`。web 设置页是独立表面,跟随浏览器自身的语言偏好。
|
|
70
|
+
|
|
68
71
|
## 多账户轮换
|
|
69
72
|
|
|
70
73
|
有多个 Command Code 订阅时,插件可以在一个账户达到用量限额后**自动切换到下一个账户**:
|