@mars-sea/dsh-commandcode-provider 0.7.0 → 0.8.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 CHANGED
@@ -4,6 +4,21 @@ 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.8.0] - 2026-08-22
8
+
9
+ ### Added
10
+
11
+ - **The settings page can now sign you in instead of asking for a pasted key.** A "Sign in to Command Code" action on the key field starts the same authorization flow the official `command-code login` CLI command performs: your browser opens the commandcode.ai approval page, and once approved the delivered API key is validated against the Provider API and stored in the local credential service under the plugin's default reference — the very next request uses it, no restart, and the key itself never crosses into the browser. The attempt is single-flight with a 2-minute window, cancellable, state-token-checked, and every failure (denied, timeout, invalid key, unreachable validation, unwritable store, remote Host without a loopback) lands in a distinct message that points back at manual paste.
12
+ - **The settings page now tells you when a plugin update is available.** Opening the "Command Code" page quietly asks npm (at most once a day, cached in the browser) for the latest published version; when it is newer than the running build, the footer version line gains a small warning-tinted "vX.Y.Z update available" link to that release's notes on GitHub. The check degrades silently — an unreachable network or registry simply shows nothing, a failed attempt never retries more than once per day, and any previously learned version keeps its hint alive.
13
+
14
+ ## [0.7.1] - 2026-08-22
15
+
16
+ ### Fixed
17
+
18
+ - **The active-account dropdown now aligns with the other settings fields.** The browser draws native `<select>` controls with its own box model and internal text metrics, so the picker under "Active account" rendered two pixels shorter than every input on the page, with its value sitting at a slightly different height. It now matches the inputs exactly (same height, same text position) and carries a custom chevron that stays legible in both themes.
19
+ - **The usage card's two timestamps share one line.** The billing period end ("Period ends …") and the fetch time ("Updated …") used to occupy two stacked rows; the fetch time now sits on the same row, pushed to the right edge, so the account card ends one line shorter.
20
+ - **README: the documented update command is now `dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest`** (the `plugin` command forwards to pnpm, whose `update` verb is what refreshes an installed plugin).
21
+
7
22
  ## [0.7.0] - 2026-08-22
8
23
 
9
24
  ### 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
+ - **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.
21
22
  - **Multi-account rotation** — when one account hits its usage limit, requests switch to the next account automatically. See [Account rotation](#account-rotation).
22
23
  - **Flexible API key setup** — via the settings page, an environment variable, or the official CLI login file.
23
24
  - **Model-picker annotations** — minimum plan, active deal or `FREE` badge, peak/off-peak state, image support, and context window; free models listed first.
@@ -36,7 +37,7 @@ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
36
37
  ## Updating
37
38
 
38
39
  ```sh
39
- dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
40
+ dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest
40
41
  ```
41
42
 
42
43
  Then restart the web app.
@@ -50,7 +51,9 @@ npm i -g command-code@latest
50
51
  cmd login # macOS/Linux; native Windows: cmdc login
51
52
  ```
52
53
 
53
- Alternatively, create a key on the [Keys settings page](https://commandcode.ai/mars-sea/settings/keys) and paste it into **Settings → Command Code**, or `export COMMANDCODE_API_KEY="user_..."`.
54
+ Or skip the CLI: click **Sign in to Command Code** under **Settings → Command Code** — your browser opens the commandcode.ai authorization page (the same flow `cmd login` uses) and the key is stored in the local credential service when you approve. You can still create a key on the [Keys settings page](https://commandcode.ai/mars-sea/settings/keys) and paste it into **Settings → Command Code**, or `export COMMANDCODE_API_KEY="user_..."`.
55
+
56
+ > The sign-in flow needs the Host and your browser on the same machine (loopback callback). With a remote Host, paste the key manually; a literal composition-level `apiKey`, if set, still takes precedence over a signed-in credential.
54
57
 
55
58
  ## Verify it works
56
59
 
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
+ - **浏览器内登录获取 key**:设置页一键发起官方授权(与 `cmd login` 同一流程),完成后密钥自动写入本机凭据服务,无需手动创建或粘贴;不可用时随时退回手动粘贴。
21
22
  - **多账户轮换**:一个账户用量打满后,请求自动切换到下一个账户。详见[多账户轮换](#多账户轮换)。
22
23
  - **key 配置灵活**:设置页填写、环境变量或官方 CLI 登录文件均可。
23
24
  - **模型选择器标注**:每个模型标注最低套餐、折扣/FREE 徽章、峰谷时段、图片支持与上下文长度,免费模型置顶。
@@ -34,7 +35,7 @@ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
34
35
  ## 更新
35
36
 
36
37
  ```sh
37
- dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
38
+ dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest
38
39
  ```
39
40
 
40
41
  然后重启 Web 应用。
@@ -48,7 +49,9 @@ npm i -g command-code@latest
48
49
  cmd login # macOS/Linux;Windows 原生版:cmdc login
49
50
  ```
50
51
 
51
- 也可以在 [Keys 设置页](https://commandcode.ai/mars-sea/settings/keys) 创建 key 后粘贴到 **设置 → Command Code**,或 `export COMMANDCODE_API_KEY="user_..."`。
52
+ 也可以不装 CLI,直接在 **设置 → Command Code** 点击「登录 Command Code」:浏览器会打开 commandcode.ai 授权页(与 `cmd login` 相同的流程),完成后密钥自动写入本机凭据服务。还可以在 [Keys 设置页](https://commandcode.ai/mars-sea/settings/keys) 创建 key 后手动粘贴,或 `export COMMANDCODE_API_KEY="user_..."`。
53
+
54
+ > 登录流程依赖 Host 与浏览器在同一台机器(回环回调)。Host 在远程机器上时请使用手动粘贴;若组合配置里写了字面量 `apiKey`,它仍优先于登录写入的凭据。
52
55
 
53
56
  ## 验证是否生效
54
57