@mars-sea/dsh-commandcode-provider 0.11.13 → 0.11.16
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 +24 -0
- package/README.md +6 -6
- package/README.zh-CN.md +6 -6
- package/lib/client.js +42 -44
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.js +23 -14
- package/lib/index.js.map +1 -1
- package/package.json +37 -39
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,30 @@ 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.16] - 2026-09-25
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Synced with the official command-code@1.65.2 CLI.** `COMMAND_CODE_CLI_VERSION` and the `x-command-code-version` header now report `1.65.2`. The public catalog already exposed Step 3.5 Flash's corrected 262,144-token context, so no picker or price row moves; the full effort, Vision, automatic-reasoning, plan, subscription, deal, peak-pricing and ZDR snapshots remain unchanged.
|
|
12
|
+
|
|
13
|
+
- **Updated the exact DeepSeek Harness pairing from `0.1.7-rc.1` to `0.1.7-rc.2`.** Every Harness peer and development range, `dsh.compatibility.dsh`, `engines.dsh`, and the single `dshReleases` record now name rc.2 together. The rc.2 client graph no longer carries the obsolete `dsh-client-connection` edge or peer; the browser bundle still exports only the live `slots`, `locale`, and `remote` service face. `npm run test:engine` is the compatibility proof for this exact pairing.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **Command Code models can receive newly enabled tools during an existing conversation.** The adapter advertises rc.2's `toolUpdate: 'addition-only'` capability. Both Command Code transports already send the complete active tool declaration list, so the harness can project a tool addition into the current request without a new conversation; tool removals are represented by omission from that active list. This is deliberately not advertised as `in-history`, because the provider wire has no native tool-removal event.
|
|
18
|
+
|
|
19
|
+
- **The browser follows rc.2 credential updates and safer API-key autofill.** The client now refreshes key state for both `credentials/reference-updated` and rc.2's `credentials/record-updated`, and both Command Code API-key inputs use `autocomplete="new-password"` so browsers are less likely to fill a saved login password into a secret field.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **CLI-stream cache writes are no longer under-reported.** command-code@1.65.2 added a standalone `cache-write-tokens` JSONL event for requests whose finish usage reports zero or omits `cacheWriteTokens`. The adapter now retains the last finite non-negative reading and uses it under the same zero/missing fallback as the official CLI, including when the finish event carries no `totalUsage`. Positive finish usage still wins, so the event cannot double-count cache writes.
|
|
24
|
+
|
|
25
|
+
## [0.11.14] - 2026-09-24
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- The settings page now delegates remote settings persistence to the DSH Host/gateway instead of silently switching non-loopback pages to a process-local read-only scope. The client always reads `settings.describe` and submits `settings.mutate`; the Host's `writable` fact and the gateway's authenticated write policy remain the authority. This allows an authenticated reverse-proxy deployment to edit settings while keeping unauthorized or Host-locked deployments read-only.
|
|
30
|
+
|
|
7
31
|
## [0.11.13] - 2026-09-24
|
|
8
32
|
|
|
9
33
|
### Changed
|
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.1.7-rc.
|
|
38
|
+
This release supports **dsh 0.1.7-rc.2 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
|
|
@@ -57,7 +57,7 @@ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
|
57
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:
|
|
58
58
|
|
|
59
59
|
```sh
|
|
60
|
-
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.
|
|
60
|
+
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.15
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
The same applies to every profile you install into, including the terminal UI below.
|
|
@@ -69,14 +69,14 @@ Fresh pnpm 10 marketplace generations are supported directly. Do not add a separ
|
|
|
69
69
|
Update with the same tag you installed with:
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
|
-
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.1.7-rc.
|
|
72
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.1.7-rc.2
|
|
73
73
|
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@0.9.1 # older dsh (0.5.0 line, unmaintained)
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
Each profile updates separately — the terminal UI owns its own plugin list (see below):
|
|
77
77
|
|
|
78
78
|
```sh
|
|
79
|
-
dsh plugin --profile dsh-tui update @mars-sea/dsh-commandcode-provider@0.11.
|
|
79
|
+
dsh plugin --profile dsh-tui update @mars-sea/dsh-commandcode-provider@0.11.15
|
|
80
80
|
```
|
|
81
81
|
|
|
82
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.
|
|
@@ -105,7 +105,7 @@ After restart, enter your API key in **Settings → Command Code** and save; **S
|
|
|
105
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:
|
|
106
106
|
|
|
107
107
|
```sh
|
|
108
|
-
dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@0.11.
|
|
108
|
+
dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@0.11.15
|
|
109
109
|
```
|
|
110
110
|
|
|
111
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.
|
|
@@ -143,7 +143,7 @@ cmd login # writes ~/.commandcode/auth.json
|
|
|
143
143
|
cwd: !!js process.cwd()
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
**Engine version.** The plugin is maintained against exactly one engine: **dsh 0.1.7-rc.
|
|
146
|
+
**Engine version.** The plugin is maintained against exactly one engine: **dsh 0.1.7-rc.2**. Its `@deepseek-ai/dsh-*` peer range is `^0.1.7-rc.2` (semver resolves that to 0.1.7-rc.2 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.
|
|
147
147
|
|
|
148
148
|
## Usage dashboard
|
|
149
149
|
|
package/README.zh-CN.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
## 安装
|
|
35
35
|
|
|
36
|
-
本版本**只支持 dsh 0.1.7-rc.
|
|
36
|
+
本版本**只支持 dsh 0.1.7-rc.2**:插件的 peer 范围就是这一个版本,兼容性记录里也只列它。
|
|
37
37
|
|
|
38
38
|
```sh
|
|
39
39
|
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
@@ -49,7 +49,7 @@ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest
|
|
|
49
49
|
**pnpm 11 会拦下刚发布的新版本。** 它的 `minimumReleaseAge` 默认为 1440 分钟,发布不足一天的版本会被跳过,`@latest` 解析到**上一个**版本 —— 而且是静默的,命令照样以成功退出。想装 24 小时内发布的版本,必须写精确版本号:
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
|
-
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.
|
|
52
|
+
dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.15
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
这一点对每个 profile 都成立,包括下面的终端界面。
|
|
@@ -61,14 +61,14 @@ dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.11.13
|
|
|
61
61
|
用与安装时相同的 tag 更新:
|
|
62
62
|
|
|
63
63
|
```sh
|
|
64
|
-
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.1.7-rc.
|
|
64
|
+
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@latest # dsh 0.1.7-rc.2
|
|
65
65
|
dsh plugin --profile web update @mars-sea/dsh-commandcode-provider@0.9.1 # 更早的 dsh(0.5.0 线,不再维护)
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
每个 profile 各自更新 —— 终端界面有独立的插件列表(见下文):
|
|
69
69
|
|
|
70
70
|
```sh
|
|
71
|
-
dsh plugin --profile dsh-tui update @mars-sea/dsh-commandcode-provider@0.11.
|
|
71
|
+
dsh plugin --profile dsh-tui update @mars-sea/dsh-commandcode-provider@0.11.15
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
要更新到发布不足 24 小时的版本,和上面的安装一样写精确版本号;pnpm 11 的年龄门禁会把 `@latest` 解析成上一个版本。
|
|
@@ -97,7 +97,7 @@ cmd login # macOS/Linux;Windows 原生版:cmdc login
|
|
|
97
97
|
插件同样支持终端前端。**每个 dsh profile 有独立的插件列表**,所以上面那条 Web 安装命令不会装到终端里 —— 还要把插件装进 `dsh-tui` profile:
|
|
98
98
|
|
|
99
99
|
```sh
|
|
100
|
-
dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@0.11.
|
|
100
|
+
dsh plugin --profile dsh-tui add @mars-sea/dsh-commandcode-provider@0.11.15
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
这里请写精确版本号。新版本发布后的 24 小时内,只写包名(或 `@latest`)会被静默解析到上一个版本 —— 安装命令照样成功,但 profile 里拿到的是旧版本,结果就是全新的终端安装里既没有 **`/settings` → Command Code** 页面,也看不到任何 `commandcode` 模型。
|
|
@@ -135,7 +135,7 @@ cmd login # 写入 ~/.commandcode/auth.json
|
|
|
135
135
|
cwd: !!js process.cwd()
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
**引擎版本要求。** 插件只针对一个引擎维护:**dsh 0.1.7-rc.
|
|
138
|
+
**引擎版本要求。** 插件只针对一个引擎维护:**dsh 0.1.7-rc.2**。它的 `@deepseek-ai/dsh-*` peer 范围是 `^0.1.7-rc.2`(按 semver,这只会解析到 0.1.7-rc.2),`dsh.compatibility.dshReleases` 也只记录这一个版本。在更早的引擎上,设置页、消息封装或请求图片预算总有一处对不上——请改装支持你所用引擎的最后一个版本,而不是硬装这一个。
|
|
139
139
|
|
|
140
140
|
## 用量面板
|
|
141
141
|
|
package/lib/client.js
CHANGED
|
@@ -37,7 +37,6 @@ window.__ModuleLoader__.load({
|
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/client/settings-scope.ts
|
|
40
|
-
const MEMORY_STATUS = "unavailable";
|
|
41
40
|
/**
|
|
42
41
|
* Backoff before re-reading a directory whose FIRST read failed, in millis.
|
|
43
42
|
*
|
|
@@ -89,7 +88,6 @@ window.__ModuleLoader__.load({
|
|
|
89
88
|
resolveRemote;
|
|
90
89
|
timer;
|
|
91
90
|
store;
|
|
92
|
-
persistence;
|
|
93
91
|
inFlight;
|
|
94
92
|
rerun = false;
|
|
95
93
|
generation = 0;
|
|
@@ -99,15 +97,13 @@ window.__ModuleLoader__.load({
|
|
|
99
97
|
disposed = false;
|
|
100
98
|
/**
|
|
101
99
|
* @param resolveRemote - Reads the inject-captured `remote.settings` namespace.
|
|
102
|
-
* @param persistence - Client-selected Host persistence; non-loopback pages may stay process-local.
|
|
103
100
|
* @param timer - Retry timer seam (see {@link SETTINGS_DESCRIBE_RETRY_MS}).
|
|
104
101
|
*/
|
|
105
|
-
constructor(resolveRemote,
|
|
102
|
+
constructor(resolveRemote, timer = REAL_SETTINGS_TIMER) {
|
|
106
103
|
this.resolveRemote = resolveRemote;
|
|
107
104
|
this.timer = timer;
|
|
108
|
-
this.persistence = persistence;
|
|
109
105
|
this.store = createSnapshotStore({
|
|
110
|
-
status:
|
|
106
|
+
status: "idle",
|
|
111
107
|
view: null,
|
|
112
108
|
error: null
|
|
113
109
|
});
|
|
@@ -118,7 +114,7 @@ window.__ModuleLoader__.load({
|
|
|
118
114
|
subscribe(listener) {
|
|
119
115
|
return this.store.subscribe(listener);
|
|
120
116
|
}
|
|
121
|
-
/** The cheap idempotent entry: kick a first read
|
|
117
|
+
/** The cheap idempotent entry: kick a first read. */
|
|
122
118
|
ensure() {
|
|
123
119
|
this.load();
|
|
124
120
|
}
|
|
@@ -128,7 +124,7 @@ window.__ModuleLoader__.load({
|
|
|
128
124
|
* @returns settlement after this call's freshness is reflected.
|
|
129
125
|
*/
|
|
130
126
|
load() {
|
|
131
|
-
if (this.disposed
|
|
127
|
+
if (this.disposed) return Promise.resolve();
|
|
132
128
|
this.clearRetry();
|
|
133
129
|
if (this.inFlight !== void 0) {
|
|
134
130
|
this.rerun = true;
|
|
@@ -242,33 +238,29 @@ window.__ModuleLoader__.load({
|
|
|
242
238
|
store;
|
|
243
239
|
mirror;
|
|
244
240
|
namespace;
|
|
245
|
-
persistence;
|
|
246
241
|
tail = Promise.resolve();
|
|
247
242
|
writeGeneration = 0;
|
|
248
243
|
disposed = false;
|
|
249
244
|
unsubscribe;
|
|
250
245
|
/** Revision answered by a superseded write still ahead of the mirror. */
|
|
251
246
|
pendingRevision;
|
|
252
|
-
constructor(resolveRemote, mirror, namespace
|
|
247
|
+
constructor(resolveRemote, mirror, namespace) {
|
|
253
248
|
this.resolveRemote = resolveRemote;
|
|
254
249
|
this.mirror = mirror;
|
|
255
250
|
this.namespace = namespace;
|
|
256
|
-
this.persistence = persistence;
|
|
257
251
|
this.store = createSnapshotStore({
|
|
258
|
-
status:
|
|
252
|
+
status: "loading",
|
|
259
253
|
value: void 0,
|
|
260
254
|
base: void 0,
|
|
261
255
|
user: void 0,
|
|
262
256
|
revision: void 0,
|
|
263
257
|
writable: false,
|
|
264
|
-
mode:
|
|
258
|
+
mode: "host"
|
|
265
259
|
});
|
|
266
|
-
|
|
267
|
-
this.unsubscribe = mirror.subscribe(() => {
|
|
268
|
-
this.derive();
|
|
269
|
-
});
|
|
260
|
+
this.unsubscribe = mirror.subscribe(() => {
|
|
270
261
|
this.derive();
|
|
271
|
-
}
|
|
262
|
+
});
|
|
263
|
+
this.derive();
|
|
272
264
|
}
|
|
273
265
|
getSnapshot() {
|
|
274
266
|
return this.store.getSnapshot();
|
|
@@ -377,9 +369,9 @@ window.__ModuleLoader__.load({
|
|
|
377
369
|
if (sameSnapshot(candidate, current)) return;
|
|
378
370
|
this.store.set(candidate);
|
|
379
371
|
}
|
|
380
|
-
/** Queue operations one at a time;
|
|
372
|
+
/** Queue operations one at a time; disposal makes the queue inert. */
|
|
381
373
|
enqueue(operation) {
|
|
382
|
-
if (this.
|
|
374
|
+
if (this.disposed) return Promise.resolve();
|
|
383
375
|
const task = this.tail.then(async () => {
|
|
384
376
|
if (this.disposed) return;
|
|
385
377
|
await operation();
|
|
@@ -418,26 +410,22 @@ window.__ModuleLoader__.load({
|
|
|
418
410
|
* @returns The scope plus the refresh/dispose handles the entry wires into its fiber.
|
|
419
411
|
*/
|
|
420
412
|
function createSettingsScope(context, namespace, resolveRemote, timer = REAL_SETTINGS_TIMER) {
|
|
421
|
-
const
|
|
422
|
-
const
|
|
423
|
-
const mirror = new SettingsDescribeMirror(resolveRemote, persistence, timer);
|
|
424
|
-
const scope = new RemoteSettingsScope(resolveRemote, mirror, namespace, persistence);
|
|
413
|
+
const mirror = new SettingsDescribeMirror(resolveRemote, timer);
|
|
414
|
+
const scope = new RemoteSettingsScope(resolveRemote, mirror, namespace);
|
|
425
415
|
const disposers = [];
|
|
426
|
-
if (
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
if (typeof off === "function") disposers.push(off);
|
|
432
|
-
}
|
|
433
|
-
if (typeof context.on === "function") {
|
|
434
|
-
const off = context.on("connection/reset", () => {
|
|
435
|
-
mirror.load();
|
|
436
|
-
});
|
|
437
|
-
if (typeof off === "function") disposers.push(off);
|
|
438
|
-
}
|
|
439
|
-
mirror.ensure();
|
|
416
|
+
if (typeof context.remote.$on === "function") {
|
|
417
|
+
const off = context.remote.$on("settings/document-updated", () => {
|
|
418
|
+
mirror.ensure();
|
|
419
|
+
});
|
|
420
|
+
if (typeof off === "function") disposers.push(off);
|
|
440
421
|
}
|
|
422
|
+
if (typeof context.on === "function") {
|
|
423
|
+
const off = context.on("connection/reset", () => {
|
|
424
|
+
mirror.load();
|
|
425
|
+
});
|
|
426
|
+
if (typeof off === "function") disposers.push(off);
|
|
427
|
+
}
|
|
428
|
+
mirror.ensure();
|
|
441
429
|
return {
|
|
442
430
|
getSnapshot: () => scope.getSnapshot(),
|
|
443
431
|
subscribe: (listener) => scope.subscribe(listener),
|
|
@@ -2325,7 +2313,7 @@ window.__ModuleLoader__.load({
|
|
|
2325
2313
|
}
|
|
2326
2314
|
//#endregion
|
|
2327
2315
|
//#region package.json
|
|
2328
|
-
var version = "0.11.
|
|
2316
|
+
var version = "0.11.16";
|
|
2329
2317
|
var repository = {
|
|
2330
2318
|
"type": "git",
|
|
2331
2319
|
"url": "git+https://github.com/Mars-Sea/dsh-commandcode-provider.git"
|
|
@@ -3436,7 +3424,7 @@ window.__ModuleLoader__.load({
|
|
|
3436
3424
|
className: "cc-input",
|
|
3437
3425
|
type: secret && !visible ? "password" : "text",
|
|
3438
3426
|
"aria-label": label,
|
|
3439
|
-
autoComplete: "
|
|
3427
|
+
autoComplete: "new-password",
|
|
3440
3428
|
spellCheck: false,
|
|
3441
3429
|
autoFocus: true,
|
|
3442
3430
|
placeholder,
|
|
@@ -4404,7 +4392,7 @@ window.__ModuleLoader__.load({
|
|
|
4404
4392
|
id: "cc-card-api-key",
|
|
4405
4393
|
className: "cc-input",
|
|
4406
4394
|
type: visible ? "text" : "password",
|
|
4407
|
-
autoComplete: "
|
|
4395
|
+
autoComplete: "new-password",
|
|
4408
4396
|
spellCheck: false,
|
|
4409
4397
|
value: state.text,
|
|
4410
4398
|
disabled,
|
|
@@ -7224,9 +7212,19 @@ window.__ModuleLoader__.load({
|
|
|
7224
7212
|
ctx.effect(() => () => controller.dispose(), "dsh-commandcode-provider: settings controller");
|
|
7225
7213
|
const store = createSnapshotStore(controller.state());
|
|
7226
7214
|
controller.subscribe(() => store.set(controller.state()));
|
|
7227
|
-
ctx.effect(() =>
|
|
7228
|
-
|
|
7229
|
-
|
|
7215
|
+
ctx.effect(() => {
|
|
7216
|
+
const remote = ctx.remote;
|
|
7217
|
+
const unregisterReference = remote.$on("credentials/reference-updated", () => {
|
|
7218
|
+
controller.refreshCredentials();
|
|
7219
|
+
});
|
|
7220
|
+
const unregisterRecord = remote.$on("credentials/record-updated", () => {
|
|
7221
|
+
controller.refreshCredentials();
|
|
7222
|
+
});
|
|
7223
|
+
return () => {
|
|
7224
|
+
unregisterReference();
|
|
7225
|
+
unregisterRecord();
|
|
7226
|
+
};
|
|
7227
|
+
}, "dsh-commandcode-provider: credential invalidations");
|
|
7230
7228
|
let usageNamespace;
|
|
7231
7229
|
let usageMountError;
|
|
7232
7230
|
let pricesController;
|