@mars-sea/dsh-commandcode-provider 0.11.11 → 0.11.12

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,14 @@ 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.11.12] - 2026-09-24
8
+
9
+ ### Changed
10
+
11
+ - **This release supports dsh 0.1.7-rc.1 alone, and the two-generation compatibility code is gone.** The plugin has carried a bridge between two Harness generations — the 0.1.2-0.1.6 line (settings.yaml document, `LegacySettingsSchema`, the pre-0.1.7 ApiProxy credential path, `legacy-credentials.ts`) and the 0.1.7 settings world (schema-derived Config forms, volatile fields, the `remote.settings` client scope) — and every release since 0.11.9 has paid for it twice: two schema registrations, two credential paths, a peer range that admitted nine engines and could pair with none of them exactly. This release drops the older line: every `@deepseek-ai/*` peer, `dsh.compatibility.dsh`, `engines.dsh` and the single `dshReleases` record now name `^0.1.7-rc.1` — a range semver resolves to that one release and nothing else — and `@deepseek-ai/schemastery` is tightened from `^3.18.2` to `~3.18.4`, because the unconditional `.volatile()` marking needs schemastery 3.18.3+ and a profile resolving 3.18.2 would mark nothing and render a blank settings form. The bridge itself is deleted, not disabled: `LegacySettingsSchema` and the duplicated config-fields factory (one schema now — every field volatile except the `apiKey` secret), `src/client/legacy-credentials.ts` and its tests, the deprecated `selectCommandCodeSearchProvider()` export (removed in command-code upstream and long superseded by `applyCommandCodeSearchSelection()`), and the legacy branches of the engine-load and install smoke scripts. **If you run dsh 0.1.2–0.1.6, stay on 0.11.11** (the 0.5.0-era Harness line's last release is 0.9.1); both are installed by exact version and unmaintained. On 0.1.7-rc.1 nothing changes behaviorally — same surfaces, same wire — the bundle is simply smaller and the pairing exact. `npm run test:engine` passes against 0.1.7-rc.1 (the published surface links and evaluates there — the durable request-image policy included — and the adapter is driven with the engine's own message constructors), and `npm run test:install` passes the pnpm 10 marketplace-generation smoke against the new peer metadata.
12
+
13
+ - **Synced with the official command-code@1.65.0 CLI** (2026-09-24 check of the npm `latest`; the official changelog page and RSS still top out at 1.64.0, so the evidence is the bundle diff, the live catalog and the pricing/docs pages). `COMMAND_CODE_CLI_VERSION` is now `1.65.0`. The release is additive with exactly one change: the CLI registry gains `stealth/space-bunny-alpha` (Space Bunny Alpha) — OpenRouter-served (`chatComplete`), text+image, 1M context, reasoning with the selectable `low`/`medium`/`high` set, available on every plan from Go up, and **free while the stealth preview lasts**. The public catalog serves it too (81 models, 80 + this one), so the picker shows it as `Go · FREE · Image` at $0 rates through the price table's free-model branch — no vendored price row, exactly like the other free models. It is also the **first change to the ZDR exception set since the 1.62.0 check**: the CLI's `modelSupportsZdr`/`knownModelSupportsZdr` negation sets both carry it and the pricing page says it plainly ("Not routed under ZDR"), so `KNOWN_NON_ZDR_MODELS` grows 20 → 21 and `tests/zdr.test.ts` pins the new membership deliberately. Everything else re-verified unchanged: the effort map (one key added, none edited), the Vision set, the plan tiers (no tier moves; the map is 51/58/71/81), the subscription-plan maps, every deal and price, the peak membership and schedule, and the whole wire protocol — every `/alpha/*` and `/provider/v1/*` call site, the `x-command-code-version` / `x-cmd-zdr` header table, the stream vocabulary and the browser-login flow are identical between the 1.64.0 and 1.65.0 bundles apart from minifier renames. The bundle does add a `/alpha/sandbox/*` route family, which belongs to the CLI's own remote-sandbox feature and is never called by this adapter.
14
+
7
15
  ## [0.11.11] - 2026-09-23
8
16
 
9
17
  ### Fixed
package/README.md CHANGED
@@ -27,7 +27,7 @@ Unofficial [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harnes
27
27
  - **Plan-aware picker** — models above your subscription tier are hidden by default (toggleable); an optional **Model allowlist** keeps only your favorites in the picker.
28
28
  - **Reasoning-effort support** — models with selectable reasoning effort levels expose them in the picker.
29
29
  - **Image input** — Vision-capable models accept images.
30
- - **Plans & quota panel** — an optional Command Code card at the bottom of the sidebar (directly above Settings) shows the serving account's plan and its 5-hour and weekly windows; clicking it opens a dashboard with the billing period, both windows as progress bars with reset times, monthly credit consumption, and the purchased/free balances. The dashboard's **×** button hands the center column back to your conversation (the current session is untouched). **Off by default** — turn on *"Show the quota card in the sidebar"* under **Settings → Command Code → Advanced** to show it, and the same switch hides it again (a hidden card draws nothing at all and runs no background usage poll); the change lands as soon as you save. The panel follows your harness language (中文 / English) and needs dsh 0.1.5 (rc.1) or newer.
30
+ - **Plans & quota panel** — an optional Command Code card at the bottom of the sidebar (directly above Settings) shows the serving account's plan and its 5-hour and weekly windows; clicking it opens a dashboard with the billing period, both windows as progress bars with reset times, monthly credit consumption, and the purchased/free balances. The dashboard's **×** button hands the center column back to your conversation (the current session is untouched). **Off by default** — turn on *"Show the quota card in the sidebar"* under **Settings → Command Code → Advanced** to show it, and the same switch hides it again (a hidden card draws nothing at all and runs no background usage poll); the change lands as soon as you save. The panel follows your harness language (中文 / English).
31
31
  - **Session cost estimate** — published-rate estimates (`≈`) beside the composer token counter and in its usage dialog, using each request's model, request time and context tier from durable session history. Model switches and viewing the session later do not reprice earlier requests. Mixed-provider or unpriced usage shows a labeled subtotal (`≥`); missing history or wholly unpriceable usage stays hidden. These are estimates from the installed price snapshot, not provider invoices. Also English on every harness language.
32
32
  - **Web search** — the dsh `web_search` tool is backed by the Command Code Provider API (`/alpha/web-search`) with the same key/endpoint as chat, so no separate search key or base URL is needed. See [Web search](#web-search).
33
33
 
@@ -35,26 +35,29 @@ See [Screenshots](#screenshots) below for what the UI looks like.
35
35
 
36
36
  ## Install
37
37
 
38
- Pick the release line that matches your DeepSeek Harness version:
38
+ This release supports **dsh 0.1.7-rc.1 and nothing else** — the plugin's peer
39
+ range is that one version, and its compatibility record names it alone:
39
40
 
40
- - **dsh 0.1.2-rc.1 or later** (the current 0.1.2 line — what `@latest` installs today):
41
-
42
- ```sh
43
- dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
44
- ```
41
+ ```sh
42
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
43
+ ```
45
44
 
46
- - **Older dsh releases** (the 0.5.0 line and earlier, which use the rc-era Host/browser APIs) — the last plugin version supporting them is 0.9.1, installed by exact version. That line is no longer under active maintenance:
45
+ - **Older dsh releases.** The 0.1.2–0.1.6 line is no longer supported: those
46
+ engines predate the 0.1.7 settings rewrite, the `RequestMessage` envelope, and
47
+ the durable image-offload contract, and the compatibility code that bridged
48
+ the two was removed. The last plugin release covering them is 0.11.11; the
49
+ 0.5.0-era Harness line's last release is 0.9.1. Both are installed by exact
50
+ version and neither is maintained:
47
51
 
48
52
  ```sh
49
- dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.9.1
53
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.11 # dsh 0.1.2–0.1.6
54
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.9.1 # dsh 0.5.0 line
50
55
  ```
51
56
 
52
- > The `latest` tag points at the current 0.1.2-line plugin release. Users on the old 0.5.0-era Harness line must pin `@0.9.1` explicitly.
53
-
54
57
  **pnpm 11 holds back new releases.** Its `minimumReleaseAge` defaults to 1440 minutes, so a version published less than a day ago is skipped and `@latest` resolves to the *previous* release — silently, with a success exit code. To install a release from the last 24 hours, name it exactly:
55
58
 
56
59
  ```sh
57
- dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.11
60
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.12
58
61
  ```
59
62
 
60
63
  The same applies to every profile you install into, including the terminal UI below.
@@ -66,14 +69,14 @@ Fresh pnpm 10 marketplace generations are supported directly. Do not add a separ
66
69
  Update with the same tag you installed with:
67
70
 
68
71
  ```sh
69
- dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.1.2-rc.1+
72
+ dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.1.7-rc.1
70
73
  dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@0.9.1 # older dsh (0.5.0 line, unmaintained)
71
74
  ```
72
75
 
73
76
  Each profile updates separately — the terminal UI owns its own plugin list (see below):
74
77
 
75
78
  ```sh
76
- dsh plugin --profile dsh-tui update @mars-sea/dsh-commandcode-provider@0.11.11
79
+ dsh plugin --profile dsh-tui update @mars-sea/dsh-commandcode-provider@0.11.12
77
80
  ```
78
81
 
79
82
  To move to a version published less than 24 hours ago, name it exactly as in Install above; pnpm 11's age gate resolves `@latest` to the previous release instead.
@@ -102,7 +105,7 @@ After restart, enter your API key in **Settings → Command Code** and save; **S
102
105
  The plugin also works under a terminal front door. **Each dsh profile owns its own plugin list**, so the web install above does not reach the terminal — add the plugin to the `dsh-tui` profile as well:
103
106
 
104
107
  ```sh
105
- dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@0.11.11
108
+ dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@0.11.12
106
109
  ```
107
110
 
108
111
  Pin the exact version here. For the first 24 hours after a release, a bare package name (or `@latest`) is silently resolved to the previous one: the install succeeds, but the profile gets the older build — which is how a fresh terminal install ends up with no **`/settings` → Command Code** page and no `commandcode` models at all.
@@ -140,7 +143,7 @@ cmd login # writes ~/.commandcode/auth.json
140
143
  cwd: !!js process.cwd()
141
144
  ```
142
145
 
143
- **Engine version.** The plugin needs a dsh engine that exports `ToolCallId` from `@deepseek-ai/dsh-llm` — **dsh 0.1.2-alpha.3 or later**. That includes the engine dsh-TUI recommends (0.1.2-rc.1) and every later release, but *not* the oldest engines its peer range nominally allows: on dsh 0.1.0-rc.6 or 0.1.1-rc.2 the plugin's module import fails and the TUI will not start. Upgrade the engine, or use the web profile.
146
+ **Engine version.** The plugin is maintained against exactly one engine: **dsh 0.1.7-rc.1**. Its `@deepseek-ai/dsh-*` peer range is `^0.1.7-rc.1` (semver resolves that to 0.1.7-rc.1 alone), and `dsh.compatibility.dshReleases` records that single release. 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.
144
147
 
145
148
  ## Usage dashboard
146
149
 
package/README.zh-CN.md CHANGED
@@ -27,32 +27,29 @@
27
27
  - **按套餐过滤**:默认隐藏超出订阅套餐的模型,可一键关闭;「模型白名单」可进一步只保留常用模型。
28
28
  - **推理强度支持**:支持推理强度的模型可在选择器中选择档位。
29
29
  - **图片输入**:Vision 模型支持发送图片。
30
- - **套餐与配额面板**:可选的 Command Code 卡片位于侧边栏底部(Settings 正上方),显示当前服务账号的套餐与 5 小时 / 每周两个配额窗口;点击后在中间栏打开面板,包含计费周期、两个窗口的进度条与重置时间、月度额度消耗,以及已购买 / 赠送余额。面板右上角的 **×** 按钮可随时把中间栏交还给会话(不会切换当前会话)。**默认关闭**——在 **设置 → Command Code → 高级设置** 中打开「在侧边栏显示额度卡片」即可显示,同一开关也能随时隐藏(隐藏时左侧不渲染任何内容,也不会为其后台刷新用量)。面板文案跟随 Harness 显示语言(中文 / English),需要 dsh 0.1.5(rc.1)或更高版本。
30
+ - **套餐与配额面板**:可选的 Command Code 卡片位于侧边栏底部(Settings 正上方),显示当前服务账号的套餐与 5 小时 / 每周两个配额窗口;点击后在中间栏打开面板,包含计费周期、两个窗口的进度条与重置时间、月度额度消耗,以及已购买 / 赠送余额。面板右上角的 **×** 按钮可随时把中间栏交还给会话(不会切换当前会话)。**默认关闭**——在 **设置 → Command Code → 高级设置** 中打开「在侧边栏显示额度卡片」即可显示,同一开关也能随时隐藏(隐藏时左侧不渲染任何内容,也不会为其后台刷新用量)。面板文案跟随 Harness 显示语言(中文 / English)。
31
31
  - **会话费用估算**:在输入框下方的 token 计数旁及用量对话框中显示估算金额(`≈`),根据持久化历史中每次请求的模型、请求时间和上下文阶梯分别计价。切换模型或稍后查看不会重新定价之前的请求。混合供应商或缺少费率时显示已定价部分的小计(`≥`);缺少历史事实或完全无法定价时不显示金额。结果基于插件内的价格快照,不等同于供应商账单。同样固定为英文。
32
32
  - **联网搜索**:dsh 的 `web_search` 工具由 Command Code Provider API(`/alpha/web-search`)承载,复用聊天同一个 key 与端点,无需单独配置搜索 key 或地址。详见[联网搜索](#联网搜索)。
33
33
 
34
34
  ## 安装
35
35
 
36
- 按你的 DeepSeek Harness 版本选择对应的发布线:
36
+ 本版本**只支持 dsh 0.1.7-rc.1**:插件的 peer 范围就是这一个版本,兼容性记录里也只列它。
37
37
 
38
- - **dsh 0.1.2-rc.1 或更高版本**(当前 0.1.2 线,即 `@latest` 现在安装的版本):
39
-
40
- ```sh
41
- dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
42
- ```
38
+ ```sh
39
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
40
+ ```
43
41
 
44
- - **更早的 dsh 版本**(0.5.0 线及更早,使用 rc 时代的 Host/浏览器 API)——支持它们的最后一个插件版本是 0.9.1,按精确版本安装。该线不再积极维护:
42
+ - **更早的 dsh 版本。** 0.1.2–0.1.6 线已不再支持:那些引擎早于 0.1.7 的设置重写、`RequestMessage` 消息封装和持久化图片卸载契约,用来桥接两代引擎的兼容代码已经删除。覆盖它们的最后一个插件版本是 0.11.11;0.5.0 时代 Harness 线的最后一个版本是 0.9.1。两者都按精确版本安装,且都不再维护:
45
43
 
46
44
  ```sh
47
- dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.9.1
45
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.11 # dsh 0.1.2–0.1.6
46
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.9.1 # dsh 0.5.0 线
48
47
  ```
49
48
 
50
- > `latest` tag 指向当前 0.1.2 线的插件版本。旧 0.5.0 时代的 Harness 用户必须显式钉住 `@0.9.1`。
51
-
52
49
  **pnpm 11 会拦下刚发布的新版本。** 它的 `minimumReleaseAge` 默认为 1440 分钟,发布不足一天的版本会被跳过,`@latest` 解析到**上一个**版本 —— 而且是静默的,命令照样以成功退出。想装 24 小时内发布的版本,必须写精确版本号:
53
50
 
54
51
  ```sh
55
- dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.11
52
+ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.12
56
53
  ```
57
54
 
58
55
  这一点对每个 profile 都成立,包括下面的终端界面。
@@ -64,14 +61,14 @@ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.11
64
61
  用与安装时相同的 tag 更新:
65
62
 
66
63
  ```sh
67
- dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.1.2-rc.1 及以上
64
+ dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.1.7-rc.1
68
65
  dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@0.9.1 # 更早的 dsh(0.5.0 线,不再维护)
69
66
  ```
70
67
 
71
68
  每个 profile 各自更新 —— 终端界面有独立的插件列表(见下文):
72
69
 
73
70
  ```sh
74
- dsh plugin --profile dsh-tui update @mars-sea/dsh-commandcode-provider@0.11.11
71
+ dsh plugin --profile dsh-tui update @mars-sea/dsh-commandcode-provider@0.11.12
75
72
  ```
76
73
 
77
74
  要更新到发布不足 24 小时的版本,和上面的安装一样写精确版本号;pnpm 11 的年龄门禁会把 `@latest` 解析成上一个版本。
@@ -100,7 +97,7 @@ cmd login # macOS/Linux;Windows 原生版:cmdc login
100
97
  插件同样支持终端前端。**每个 dsh profile 有独立的插件列表**,所以上面那条 Web 安装命令不会装到终端里 —— 还要把插件装进 `dsh-tui` profile:
101
98
 
102
99
  ```sh
103
- dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@0.11.11
100
+ dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@0.11.12
104
101
  ```
105
102
 
106
103
  这里请写精确版本号。新版本发布后的 24 小时内,只写包名(或 `@latest`)会被静默解析到上一个版本 —— 安装命令照样成功,但 profile 里拿到的是旧版本,结果就是全新的终端安装里既没有 **`/settings` → Command Code** 页面,也看不到任何 `commandcode` 模型。
@@ -138,7 +135,7 @@ cmd login # 写入 ~/.commandcode/auth.json
138
135
  cwd: !!js process.cwd()
139
136
  ```
140
137
 
141
- **引擎版本要求。** 插件需要导出了 `ToolCallId` 的 dsh 引擎,即 **dsh 0.1.2-alpha.3 或更高**。这覆盖了 dsh-TUI 推荐的引擎(0.1.2-rc.1)以及之后的所有版本,但不包含它 peer 范围里名义上允许的最老引擎:在 dsh 0.1.0-rc.6 / 0.1.1-rc.2 上,插件的模块导入会失败,TUI 无法启动。请升级引擎,或改用 web profile。
138
+ **引擎版本要求。** 插件只针对一个引擎维护:**dsh 0.1.7-rc.1**。它的 `@deepseek-ai/dsh-*` peer 范围是 `^0.1.7-rc.1`(按 semver,这只会解析到 0.1.7-rc.1),`dsh.compatibility.dshReleases` 也只记录这一个版本。在更早的引擎上,设置页、消息封装或请求图片预算总有一处对不上——请改装支持你所用引擎的最后一个版本,而不是硬装这一个。
142
139
 
143
140
  ## 用量面板
144
141
 
package/lib/client.js CHANGED
@@ -625,7 +625,6 @@ window.__ModuleLoader__.load({
625
625
  listeners = /* @__PURE__ */ new Set();
626
626
  disposers = [];
627
627
  disposed = false;
628
- defaultWorkingDir;
629
628
  /** The credential reference the default account resolves. */
630
629
  credentialRef = DEFAULT_API_KEY_REF;
631
630
  /** Host-reported configured/writable state per credential reference. */
@@ -669,10 +668,8 @@ window.__ModuleLoader__.load({
669
668
  /**
670
669
  * @param scope - bound scope for the `llm-commandcode` namespace.
671
670
  * @param api - credentials wire face.
672
- * @param hostDescription - the Host-description observable whose `cwd` is
673
- * shown as the placeholder a blank `workingDir` field resolves to.
674
671
  */
675
- constructor(scope, api, hostDescription) {
672
+ constructor(scope, api) {
676
673
  this.scope = scope;
677
674
  this.api = api;
678
675
  this.disposers.push(scope.subscribe(() => {
@@ -680,17 +677,6 @@ window.__ModuleLoader__.load({
680
677
  this.describeAll();
681
678
  this.publish();
682
679
  }));
683
- if (hostDescription !== void 0) {
684
- this.defaultWorkingDir = hostDescription.getSnapshot()?.cwd;
685
- this.disposers.push(hostDescription.subscribe(() => {
686
- if (this.disposed) return;
687
- const cwd = hostDescription.getSnapshot()?.cwd;
688
- if (cwd !== this.defaultWorkingDir) {
689
- this.defaultWorkingDir = cwd;
690
- this.publish();
691
- }
692
- }));
693
- }
694
680
  this.recomputeCredentialRef();
695
681
  this.describeAll();
696
682
  this.refreshCatalog();
@@ -743,7 +729,6 @@ window.__ModuleLoader__.load({
743
729
  apiKeyClearStaged: this.keyClears.has(this.credentialRef),
744
730
  apiBase: this.field("apiBase"),
745
731
  workingDir: this.field("workingDir"),
746
- defaultWorkingDir: this.defaultWorkingDir,
747
732
  requestTimeoutMs: this.field("requestTimeoutMs"),
748
733
  streamIdleTimeoutMs: this.field("streamIdleTimeoutMs"),
749
734
  transportMaxRetries: this.field("transportMaxRetries"),
@@ -1483,47 +1468,6 @@ window.__ModuleLoader__.load({
1483
1468
  }
1484
1469
  };
1485
1470
  //#endregion
1486
- //#region src/client/legacy-credentials.ts
1487
- /** Convert a legacy credentials ApiProxy into the current settings-page face. */
1488
- function adaptLegacyCredentials(legacy) {
1489
- if (legacy === void 0) return void 0;
1490
- return { credentials: {
1491
- describe: async (refs) => {
1492
- const response = await legacy.describe({ refs });
1493
- return response.result.ok ? {
1494
- ok: true,
1495
- value: response.result.value.credentials
1496
- } : {
1497
- ok: false,
1498
- error: response.result.error
1499
- };
1500
- },
1501
- set: async (ref, value) => {
1502
- const response = await legacy.set({
1503
- ref,
1504
- value
1505
- });
1506
- return response.result.ok ? {
1507
- ok: true,
1508
- value: void 0
1509
- } : {
1510
- ok: false,
1511
- error: response.result.error
1512
- };
1513
- },
1514
- unset: async (ref) => {
1515
- const response = await legacy.unset({ ref });
1516
- return response.result.ok ? {
1517
- ok: true,
1518
- value: void 0
1519
- } : {
1520
- ok: false,
1521
- error: response.result.error
1522
- };
1523
- }
1524
- } };
1525
- }
1526
- //#endregion
1527
1471
  //#region src/client/usage.ts
1528
1472
  const IDLE$1 = {
1529
1473
  status: "idle",
@@ -2129,7 +2073,6 @@ window.__ModuleLoader__.load({
2129
2073
  return {
2130
2074
  mode: "strict",
2131
2075
  typeSymbol,
2132
- schema,
2133
2076
  create: () => schema
2134
2077
  };
2135
2078
  }
@@ -2141,7 +2084,6 @@ window.__ModuleLoader__.load({
2141
2084
  * only its own facts.
2142
2085
  */
2143
2086
  function makeRemoteDescriptor(endpoint, method, typeSymbol, schema) {
2144
- const result = makeStrictCodec(typeSymbol, schema);
2145
2087
  return {
2146
2088
  id: `${REMOTE_PACKAGE}#${endpoint}`,
2147
2089
  service: REMOTE_SERVICE,
@@ -2149,7 +2091,7 @@ window.__ModuleLoader__.load({
2149
2091
  method,
2150
2092
  invocation: { kind: "direct" },
2151
2093
  parameters: [],
2152
- result
2094
+ result: makeStrictCodec(typeSymbol, schema)
2153
2095
  };
2154
2096
  }
2155
2097
  //#endregion
@@ -2631,7 +2573,7 @@ window.__ModuleLoader__.load({
2631
2573
  }
2632
2574
  //#endregion
2633
2575
  //#region package.json
2634
- var version = "0.11.11";
2576
+ var version = "0.11.12";
2635
2577
  var repository = {
2636
2578
  "type": "git",
2637
2579
  "url": "git+https://github.com/Mars-Sea/dsh-commandcode-provider.git"
@@ -2953,7 +2895,6 @@ window.__ModuleLoader__.load({
2953
2895
  hint: t("workingDirHint"),
2954
2896
  state: state.workingDir,
2955
2897
  disabled,
2956
- placeholder: state.defaultWorkingDir,
2957
2898
  onEdit: (text) => onEdit("workingDir", text),
2958
2899
  onReset: () => onReset("workingDir"),
2959
2900
  t
@@ -5790,15 +5731,15 @@ window.__ModuleLoader__.load({
5790
5731
  /**
5791
5732
  * The shipped composer stats row (dsh-client-ui-chat `StatsPills`).
5792
5733
  *
5793
- * A PREFERENCE, not a requirement: 0.1.6-alpha.2 dropped this attribute from the
5794
- * row's root while leaving the rest of the markup identical, so a lookup that
5795
- * insisted on it would silently stop finding the row on that engine. When it is
5796
- * absent the search falls back to the dock OUTLET — deliberately the outlet and
5797
- * never the outlet's parent, because from 0.1.6-alpha.2 the parent is the new
5798
- * composer footer, which holds the `ContextMeter` as well, and that meter's
5799
- * trigger is itself a `button[aria-haspopup="dialog"]` rendered AFTER the dock.
5800
- * A parent-scoped "last trigger wins" would therefore append the cost to the
5801
- * context ring instead of the token pill.
5734
+ * A PREFERENCE, not a requirement: the attribute has already been dropped once
5735
+ * upstream (0.1.6-alpha.2) while the rest of the row's markup stayed identical,
5736
+ * so a lookup that insisted on it would silently stop finding the row. When it
5737
+ * is absent the search falls back to the dock OUTLET — deliberately the outlet
5738
+ * and never the outlet's parent, because the parent is the composer footer,
5739
+ * which holds the `ContextMeter` as well, and that meter's trigger is itself a
5740
+ * `button[aria-haspopup="dialog"]` rendered AFTER the dock. A parent-scoped
5741
+ * "last trigger wins" would therefore append the cost to the context ring
5742
+ * instead of the token pill.
5802
5743
  */
5803
5744
  const STATS_ROOT = "[data-composer-stats]";
5804
5745
  /**
@@ -5935,14 +5876,14 @@ window.__ModuleLoader__.load({
5935
5876
  *
5936
5877
  * The scope is the dock OUTLET (`display: contents`, one per slot), which holds
5937
5878
  * exactly that slot's entries — the shipped `stats` cell and ours, in their
5938
- * registration order. {@link STATS_ROOT} narrows that to the stats row on the
5939
- * engines that still mark it; on the engines that do not, the outlet is
5940
- * already the narrowest correct container, because the composer footer's
5941
- * `ContextMeter` sits BESIDE the outlet rather than inside it.
5879
+ * registration order. {@link STATS_ROOT} narrows that to the stats row where
5880
+ * the markup marks it; where it does not, the outlet is already the narrowest
5881
+ * correct container, because the composer footer's `ContextMeter` sits BESIDE
5882
+ * the outlet rather than inside it.
5942
5883
  *
5943
5884
  * A missing scope is "no pill", never a document-wide search: the outlet is
5944
5885
  * what makes this lookup per-composer, and a second composer can be live at
5945
- * once (0.1.6-alpha.2 mounts an embedded Conversation in the sidebar).
5886
+ * once (the sidebar can mount an embedded Conversation).
5946
5887
  */
5947
5888
  resolvePillButton() {
5948
5889
  const scope = this.scope();
@@ -6292,9 +6233,18 @@ window.__ModuleLoader__.load({
6292
6233
  .cc-ruleCaret{flex-shrink:0;border-right:1.5px solid var(--dsw-alias-label-tertiary);border-bottom:1.5px solid var(--dsw-alias-label-tertiary);width:6px;height:6px;margin-right:4px;margin-bottom:2px;transform:rotate(45deg)}
6293
6234
  .cc-checkRow{align-items:center;gap:8px;display:inline-flex;min-width:0}
6294
6235
  .cc-checkRow:hover{cursor:pointer}
6295
- .cc-check{appearance:none;flex-shrink:0;width:15px;height:15px;margin:0;border:1px solid var(--dsw-alias-border-l2);border-radius:4px;background:var(--dsw-alias-bg-layer-1);position:relative}
6236
+ /* A hand-drawn box rather than the platform's accent-color checkbox: the
6237
+ * native control's colours come from color-scheme, which the theme sets once
6238
+ * at BOOT (it is not re-applied when the theme is switched in-session), so a
6239
+ * native box can paint light-chrome white on a dark page. Drawn from tokens it
6240
+ * cannot. The mark rides a brand-primary fill, so it takes the theme's brand
6241
+ * foreground — the platform's pairing for anything painted on that fill, and
6242
+ * the only one that survives the dark mode's near-white brand. The box
6243
+ * outline is a border-l3 hairline: border-l2 (#ffffff1f in dark) leaves an
6244
+ * unchecked box all but invisible against the menu surface. */
6245
+ .cc-check{box-sizing:border-box;appearance:none;flex-shrink:0;width:16px;height:16px;margin:0;border:1px solid var(--dsw-alias-border-l3);border-radius:4px;background:0 0;position:relative}
6296
6246
  .cc-check:checked{background:var(--dsw-alias-brand-primary);border-color:var(--dsw-alias-brand-primary)}
6297
- .cc-check:checked::after{content:'';position:absolute;top:2px;left:5px;width:3px;height:7px;border:solid #fff;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
6247
+ .cc-check:checked::after{content:'';position:absolute;top:3px;left:5px;width:3px;height:7px;border:solid var(--dsw-alias-label-primary-foreground,#fff);border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
6298
6248
  .cc-checkName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
6299
6249
  /* The model multi-select search box: stacked under the trigger while the
6300
6250
  * dropdown is open, same input sizing so the pair reads as one control. The
@@ -6333,10 +6283,29 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
6333
6283
  .cc-accountLoginHint{padding:0 0 12px}
6334
6284
  .cc-toggleRow{align-items:center;gap:8px;cursor:pointer;display:flex}
6335
6285
  .cc-toggleRow:has(.cc-toggle:disabled){cursor:default}
6336
- .cc-toggle{appearance:none;flex-shrink:0;background:var(--dsw-alias-border-l2);border-radius:999px;width:30px;height:18px;margin:0;cursor:pointer;position:relative;transition:background .15s ease}
6286
+ /* Modelled on the platform's own Switch primitive (ui-primitives
6287
+ * Switch.module.css, dsh 0.1.6+): a 36x20 capsule that pads its track by 2px
6288
+ * and slides a 16px thumb across the 32px content box, so the control is the
6289
+ * same shape, size and motion as every other switch in the app.
6290
+ *
6291
+ * Three things are load-bearing. (1) corner-shape:round on BOTH the track and
6292
+ * the thumb: the theme sets a global superellipse corner shape on every
6293
+ * element, and a superellipse capsule squares its ends off around a round
6294
+ * thumb (the primitive's own comment is about exactly this).
6295
+ * (2) No literal colours. --dsw-alias-brand-primary INVERTS between the two
6296
+ * modes (near-black in light, near-white in dark, on every engine generation
6297
+ * this plugin supports), so the old hardcoded white thumb vanished on the
6298
+ * checked track in dark mode; the brand foreground is the token the platform
6299
+ * paints on that fill, so it contrasts in both modes and in any brand pack.
6300
+ * (3) --dsw-alias-border-l3 as the off track: --dsw-alias-border-l2
6301
+ * (#ffffff1f in dark) left the unchecked track indistinguishable from the card
6302
+ * — the dark-mode half of the same report. */
6303
+ .cc-toggle{box-sizing:border-box;appearance:none;flex-shrink:0;width:36px;height:20px;margin:0;padding:2px;border:0;border-radius:10px;corner-shape:round;background:var(--dsw-alias-border-l3);cursor:pointer;position:relative}
6337
6304
  .cc-toggle:checked{background:var(--dsw-alias-brand-primary)}
6338
- .cc-toggle::after{content:'';background:#fff;border-radius:50%;width:14px;height:14px;position:absolute;top:2px;left:2px;transition:left .15s ease}
6339
- .cc-toggle:checked::after{left:14px}
6305
+ .cc-toggle::after{content:'';display:block;width:16px;height:16px;border-radius:50%;corner-shape:round;background:var(--dsw-alias-label-primary-foreground);box-shadow:0 0 0 .5px var(--dsw-alias-border-l2);transition:transform .12s ease}
6306
+ /* 32px content box minus the 16px thumb. */
6307
+ .cc-toggle:checked::after{transform:translateX(16px)}
6308
+ .cc-toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
6340
6309
  .cc-toggle:disabled{cursor:default;opacity:.5}
6341
6310
  .cc-failed{min-width:0;color:var(--dsw-alias-label-error);flex:1;margin:0;font-size:12px;line-height:1.5}
6342
6311
  .cc-usageCard{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;padding:14px 16px;flex-direction:column;gap:12px;display:flex}
@@ -6364,7 +6333,7 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
6364
6333
  .cc-usageBar{overflow:hidden;background:var(--dsw-alias-bg-layer-1);border-radius:999px;height:6px}
6365
6334
  .cc-usageBarFill{background:var(--dsw-alias-brand-primary);border-radius:999px;height:100%;transition:width .3s ease}
6366
6335
  .cc-usageBarFillWarn{background:var(--dsw-alias-label-error)}
6367
- @media (prefers-reduced-motion:reduce){.cc-chevron,.cc-toggle,.cc-toggle::after,.cc-usageBarFill{transition:none}}.cc-usageWindowReset{color:var(--dsw-alias-label-tertiary);margin:0;font-size:11px;line-height:1.5}
6336
+ @media (prefers-reduced-motion:reduce){.cc-chevron,.cc-toggle::after,.cc-usageBarFill{transition:none}}.cc-usageWindowReset{color:var(--dsw-alias-label-tertiary);margin:0;font-size:11px;line-height:1.5}
6368
6337
  .cc-usageMeta{align-items:center;gap:8px;display:flex}
6369
6338
  .cc-accountReport{flex-direction:column;gap:12px;display:flex}
6370
6339
  .cc-tabs{flex-wrap:wrap;gap:6px;display:flex}
@@ -6723,7 +6692,7 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
6723
6692
  cardTitle: "Command Code",
6724
6693
  cardRouteActive: "已启用",
6725
6694
  cardLoadingHint: "正在读取 Command Code 配置…",
6726
- cardRegistrationHint: "此卡片随 Command Code 插件注册,需要较新版本的 DeepSeek Harness 才会显示完整内容。"
6695
+ cardRegistrationHint: "此卡片由 Command Code 插件提供,正在等待设置页装配,稍后即可显示完整内容。"
6727
6696
  };
6728
6697
  const en = {
6729
6698
  nav: "Command Code",
@@ -6871,7 +6840,7 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
6871
6840
  cardTitle: "Command Code",
6872
6841
  cardRouteActive: "Active",
6873
6842
  cardLoadingHint: "Loading the Command Code configuration…",
6874
- cardRegistrationHint: "This card is contributed by the Command Code plugin; a newer DeepSeek Harness is needed to show the full controls."
6843
+ cardRegistrationHint: "This card is contributed by the Command Code plugin and is waiting for the settings page to finish assembling."
6875
6844
  };
6876
6845
  //#endregion
6877
6846
  //#region src/client/index.ts
@@ -6911,15 +6880,6 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
6911
6880
  */
6912
6881
  const PANEL_ID = "commandcode-panel";
6913
6882
  /**
6914
- * ui-conversation's reserved `main` key, used only as the exit fallback for a
6915
- * layout whose `selectPanel` predates the `null` "show the Conversation"
6916
- * selection (see `close` in {@link applyClientSurfaces}). Declared locally for
6917
- * the same reason as {@link PANEL_ID}: ui-conversation is not a dependency of
6918
- * this bundle, and the key is a published contract of the layout (its README
6919
- * names `conversation` as reserved for the Conversation).
6920
- */
6921
- const CONVERSATION_PANEL_ID = "conversation";
6922
- /**
6923
6883
  * The composer figure's entry id in `conversation.composer.dock`. Its own id,
6924
6884
  * not the shipped `stats` cell's: reusing `stats` would REPLACE the tokens /
6925
6885
  * cache-hit / throughput readout rather than inject into it, and that readout
@@ -6927,12 +6887,10 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
6927
6887
  */
6928
6888
  const SESSION_COST_ID = "commandcode-session-cost";
6929
6889
  /**
6930
- * Client plugin body. Gates on the services shared by both client generations
6931
- * (`slots`, `locale`, `connection`, `remote`) — never on `settingsScope`,
6932
- * which 0.1.7 removed and which the settings scope here replaces for every
6933
- * generation. Current clients mount the page after `remote.credentials`
6934
- * appears; legacy clients mount it from the connection ApiProxy credential
6935
- * face.
6890
+ * Client plugin body. Gates on `slots`, `locale` and `remote` — never on
6891
+ * `settingsScope`, whose wrapper service the 0.1.7 settings rewrite removed
6892
+ * (the settings scope here speaks the `remote.settings` wire directly). The
6893
+ * page mounts once `remote.credentials` appears.
6936
6894
  */
6937
6895
  function apply(ctx) {
6938
6896
  injectPageCss();
@@ -6944,19 +6902,13 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
6944
6902
  zh: PANEL_COPY_ZH,
6945
6903
  en: PANEL_COPY_EN
6946
6904
  }), "dsh-commandcode-provider: panel copy");
6947
- const connection = ctx.get("connection");
6948
- const legacyApi = adaptLegacyCredentials(connection?.api?.credentials);
6949
- if (legacyApi !== void 0) {
6950
- applyClientSurfaces(ctx, legacyApi, connection?.hostDescription);
6951
- return;
6952
- }
6953
6905
  ctx.inject(["remote.credentials"], (remoteCtx) => {
6954
6906
  const credentials = remoteCtx.remote.credentials;
6955
6907
  applyClientSurfaces(remoteCtx, { credentials });
6956
6908
  });
6957
6909
  }
6958
- /** Mount the one shared UI implementation over either credential transport. */
6959
- function applyClientSurfaces(ctx, api, hostDescription) {
6910
+ /** Mount the one shared UI implementation. */
6911
+ function applyClientSurfaces(ctx, api) {
6960
6912
  let settingsNamespace;
6961
6913
  const scope = createSettingsScope(ctx, COMMANDCODE_NS, () => settingsNamespace);
6962
6914
  ctx.effect(() => () => {
@@ -6976,7 +6928,7 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
6976
6928
  ok: false,
6977
6929
  error: { message: "commandcode/models remote is not mounted" }
6978
6930
  })
6979
- }, hostDescription);
6931
+ });
6980
6932
  ctx.effect(() => () => controller.dispose(), "dsh-commandcode-provider: settings controller");
6981
6933
  const store = createSnapshotStore(controller.state());
6982
6934
  controller.subscribe(() => store.set(controller.state()));
@@ -7169,21 +7121,10 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
7169
7121
  },
7170
7122
  startAutoRefresh: () => startPanelAutoRefresh(usageController, () => true),
7171
7123
  open: () => {
7172
- const layout = ctx.get("layout");
7173
- if (typeof layout?.selectPanel === "function") layout.selectPanel(PANEL_ID);
7124
+ ctx.get("layout")?.selectPanel(PANEL_ID);
7174
7125
  },
7175
7126
  close: () => {
7176
- const layout = ctx.get("layout");
7177
- if (typeof layout?.selectPanel !== "function") return;
7178
- try {
7179
- layout.selectPanel(null);
7180
- } catch {
7181
- try {
7182
- layout.selectPanel(CONVERSATION_PANEL_ID);
7183
- } catch (error) {
7184
- console.error("[dsh-commandcode-provider] could not close the plans & quota panel:", error);
7185
- }
7186
- }
7127
+ ctx.get("layout")?.selectPanel(null);
7187
7128
  }
7188
7129
  });
7189
7130
  ctx.effect(() => injectPanelCss(), "dsh-commandcode-provider: panel styles");
@@ -7198,7 +7139,6 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
7198
7139
  console.error("[dsh-commandcode-provider] could not register the plans & quota panel:", error);
7199
7140
  }
7200
7141
  ctx.inject(["layout"], (layoutCtx) => {
7201
- if (typeof layoutCtx.get("layout")?.selectPanel !== "function") return;
7202
7142
  try {
7203
7143
  layoutCtx.slots.inject("sidebar.footer.action", () => layoutCtx.slots.register({
7204
7144
  name: "sidebar.footer.action",
@@ -7225,7 +7165,6 @@ select.cc-input{appearance:none;-webkit-appearance:none;-moz-appearance:none;box
7225
7165
  const inject = [
7226
7166
  "slots",
7227
7167
  "locale",
7228
- "connection",
7229
7168
  "remote"
7230
7169
  ];
7231
7170
  //#endregion