@mars-sea/dsh-commandcode-provider 0.8.4 → 0.10.0-alpha.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 +39 -0
- package/README.md +24 -4
- package/README.zh-CN.md +24 -4
- package/lib/client.js +699 -111
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +43 -4
- package/lib/index.js +146 -40
- package/lib/index.js.map +1 -1
- package/package.json +38 -39
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,45 @@ 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.10.0-alpha.1] - 2026-09-01
|
|
10
|
+
|
|
11
|
+
> **Alpha channel for dsh 0.1.2-alpha.2.** This release requires **dsh 0.1.2-alpha.2 or later** and is published under the `alpha` npm tag, so `@latest` stays on 0.9.1 for older Harness releases. Install it explicitly with `@alpha`.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **Raised the minimum supported DeepSeek Harness version to 0.1.2-alpha.2.** Every Harness peer and development package now starts at the alpha.2 line; earlier RC/alpha builds use incompatible Host and browser APIs and are no longer advertised as supported.
|
|
16
|
+
- **Adapted the provider to the 0.1.2-alpha.2 Host and browser contracts.** Tool-call IDs use `ToolCallId`, settings register through the optional `SettingsProvider` service, credential operations use Typert Remotes, and the browser client consumes the current settings/models surfaces without the removed `dsh-client-runtime` package.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **Restored fresh plugin-marketplace installs under pnpm 10.** The package declares `@deepseek-ai/dsh-invariants` as an explicit alpha.2 Host peer instead of bundling a second Harness core package; a pnpm 10.34.5 tarball-install smoke test pins the isolated-generation path.
|
|
21
|
+
- **Kept the Web client enabled on alpha.2.** The client no longer requests the removed `dsh-client-runtime/client` module, while its React, slot, store, and primitive dependencies match the official alpha.2 platform module table; settings and Models pages therefore remain available instead of disabling the entire client bundle.
|
|
22
|
+
- **Isolated snapshot subscriber failures.** The client-local `getSnapshot`/`subscribe`/`set` store now continues notifying remaining UI consumers when one subscriber throws.
|
|
23
|
+
- **Prevented the friendly image-session error wrapper from blocking alpha.2 client startup.** Alpha.2 no longer exposes `connection.api.sessions`, so the optional copy rewrite safely skips itself when that legacy façade is absent.
|
|
24
|
+
|
|
25
|
+
## [0.9.1] - 2026-08-28
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **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.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- **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.
|
|
34
|
+
|
|
35
|
+
## [0.9.0] - 2026-08-28
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **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.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- **`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.
|
|
44
|
+
- **`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).
|
|
45
|
+
|
|
7
46
|
## [0.8.4] - 2026-08-27
|
|
8
47
|
|
|
9
48
|
### Added
|
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** — the **Settings → Models → Command Code** card carries the key status, a paste field, and the sign-in button inline.
|
|
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.
|
|
@@ -30,14 +31,31 @@ See [Screenshots](#screenshots) below for what the UI looks like.
|
|
|
30
31
|
|
|
31
32
|
## Install
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
Pick the release line that matches your DeepSeek Harness version:
|
|
35
|
+
|
|
36
|
+
- **dsh 0.1.2-alpha.2 or later** (the current alpha line) — use the matching alpha plugin release. Install explicitly with the `alpha` tag:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@alpha
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- **Older dsh releases** (the 0.5.0 line and earlier, which use the rc-era Host/browser APIs) — the 0.9.1 plugin keeps working there and stays on the `latest` tag:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
> The `alpha` tag never moves `latest`: a plain `@latest` install always gets the newest stable release for older Harness versions, and upgrading to the alpha line is always an explicit opt-in.
|
|
49
|
+
|
|
50
|
+
Fresh pnpm 10 marketplace generations are supported directly. Do not add a separate `@deepseek-ai/dsh-invariants` dependency; the plugin declares it as a Host peer so the active dsh profile remains the owner of Harness packages.
|
|
36
51
|
|
|
37
52
|
## Updating
|
|
38
53
|
|
|
54
|
+
Update with the same tag you installed with:
|
|
55
|
+
|
|
39
56
|
```sh
|
|
40
|
-
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@
|
|
57
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@alpha # dsh 0.1.2-alpha.2+
|
|
58
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # older dsh (0.5.0 line)
|
|
41
59
|
```
|
|
42
60
|
|
|
43
61
|
Then restart the web app.
|
|
@@ -67,6 +85,8 @@ The plugin registers a `/commandcode` slash command showing per-account usage:
|
|
|
67
85
|
/commandcode (or /commandcode status)
|
|
68
86
|
```
|
|
69
87
|
|
|
88
|
+
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.
|
|
89
|
+
|
|
70
90
|
## Account rotation
|
|
71
91
|
|
|
72
92
|
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 页快捷卡片**:**设置 → Models → Command Code** 卡片内直接显示 key 状态、粘贴输入框和登录按钮。
|
|
21
22
|
- **浏览器内登录获取 key**:设置页一键发起官方授权(与 `cmd login` 同一流程),完成后密钥自动写入本机凭据服务,无需手动创建或粘贴;不可用时随时退回手动粘贴。
|
|
22
23
|
- **多账户轮换**:一个账户用量打满后,请求自动切换到下一个账户。详见[多账户轮换](#多账户轮换)。
|
|
23
24
|
- **key 配置灵活**:设置页填写、环境变量或官方 CLI 登录文件均可。
|
|
@@ -28,14 +29,31 @@
|
|
|
28
29
|
|
|
29
30
|
## 安装
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
按你的 DeepSeek Harness 版本选择对应的发布线:
|
|
33
|
+
|
|
34
|
+
- **dsh 0.1.2-alpha.2 或更高版本**(当前 alpha 线)——使用配套的 alpha 插件版本,显式用 `alpha` tag 安装:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@alpha
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- **更早的 dsh 版本**(0.5.0 线及更早,使用 rc 时代的 Host/浏览器 API)——0.9.1 插件在这些版本上继续可用,并保持在 `latest` tag:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
> `alpha` tag 永远不会移动 `latest`:普通的 `@latest` 安装始终为旧版 dsh 拿到最新的稳定版,升级到 alpha 线永远是显式选择。
|
|
47
|
+
|
|
48
|
+
插件可直接在 pnpm 10 的全新插件市场 generation 中安装。不要另行添加 `@deepseek-ai/dsh-invariants` dependency;插件已将其声明为 Host peer,Harness 包仍由当前 dsh profile 统一管理。
|
|
34
49
|
|
|
35
50
|
## 更新
|
|
36
51
|
|
|
52
|
+
用与安装时相同的 tag 更新:
|
|
53
|
+
|
|
37
54
|
```sh
|
|
38
|
-
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@
|
|
55
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@alpha # dsh 0.1.2-alpha.2 及以上
|
|
56
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # 更早的 dsh(0.5.0 线)
|
|
39
57
|
```
|
|
40
58
|
|
|
41
59
|
然后重启 Web 应用。
|
|
@@ -65,6 +83,8 @@ cmd login # macOS/Linux;Windows 原生版:cmdc login
|
|
|
65
83
|
/commandcode (或 /commandcode status)
|
|
66
84
|
```
|
|
67
85
|
|
|
86
|
+
命令的文案跟随 shell 的语言设置:在 `llm-commandcode` 插件配置里显式写 `lang: 'en' | 'zh'` 优先;否则读 `LC_ALL`/`LANG`;再否则回退到 `zh`。web 设置页是独立表面,跟随浏览器自身的语言偏好。
|
|
87
|
+
|
|
68
88
|
## 多账户轮换
|
|
69
89
|
|
|
70
90
|
有多个 Command Code 订阅时,插件可以在一个账户达到用量限额后**自动切换到下一个账户**:
|