@alexpeng/dsh-custom-plugin 0.8.0 → 0.9.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,39 @@ All notable changes to this project are documented here. The format loosely
4
4
  follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions
5
5
  follow [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## 0.9.0 — 2026-10-25
8
+
9
+ 兼容策略改为开放式下限:宿主不再因为 dsh 更新而把插件判为“不支持”。
10
+
11
+ ### Changed
12
+
13
+ - **兼容范围改为 `>=0.1.7-rc.2`(无上界)**:`engines.dsh` 与
14
+ `@deepseek-ai/dsh-tools` peer 同步放宽。dsh 0.2.1-alpha.4+ 优先读
15
+ `engines.dsh`,旧宿主读 peer;两者都放行所有高于下限的版本,因此未来任何
16
+ dsh 发版(包括 0.2.1-rc.3、0.2.1 正式版、0.3、1.0)都不必先等插件发版才能
17
+ 加载。实测过的版本改为证据记录(README 兼容表 / 本文件),不再是闸门。宿主
18
+ 的兼容门只有“放行/拒绝”两态、没有“仅警告”,这是不再把未实测版本挡在门外
19
+ 的唯一实现方式。
20
+ - **构建与测试队列切到 dsh 0.2.1-rc.3**:九个 `@deepseek-ai/dsh-*`
21
+ devDependency 从 rc.2 升到 rc.3,锁文件同步。`pnpm smoke` 的兼容断言改为
22
+ “下限必须拒绝 0.1.7-rc.1、无上界必须放行 99.0.0、`engines.dsh` 与 peer
23
+ 判定一致”,`tests/manifest.spec.ts` 的放行/拒绝清单同步改写。
24
+ - **新增定时兼容 canary**:`scripts/compat-canary.mjs` +
25
+ `.github/workflows/compat-canary.yml`,每天取 npm `latest`/`next` 中较高的
26
+ dsh,在临时 `DSH_HOME` 里安装**已发布**插件、冷启动并跑
27
+ `scripts/live-dsh-check.sh`;失败时自动开 issue。可用 `pnpm canary` 或
28
+ `node scripts/compat-canary.mjs <版本> --plugin <tgz>` 本地跑。
29
+
30
+ ### Verified
31
+
32
+ - 0.9.0 产物在隔离的 dsh 0.2.1-rc.3 profile 中安装(无兼容豁免)并冷启动:
33
+ boot 图 71 行、五个 inject 目标齐全、客户端 bundle 200,371 字节、Mermaid
34
+ 本地引擎 3,572,661 字节、state / usage / backup 路由、UTF-8 往返与三种信任
35
+ 围栏形状全部通过;活体探针 16 通过 / 1 跳过(无会话)。
36
+ - `node scripts/compat-canary.mjs 0.2.1-rc.3 --plugin <0.9.0 tgz>` 端到端通过。
37
+ - `pnpm check:readme`、`pnpm typecheck`、`pnpm test`(205 tests)、`pnpm build`、
38
+ `pnpm smoke` 全绿。
39
+
7
40
  ## 0.8.0 — 2026-10-17
8
41
 
9
42
  dsh 0.2.1-rc.2 兼容版:`engines.dsh` 取代 peer 范围成为 0.2.1-alpha.4+ 的首要兼容门,
package/README.i18n.yaml CHANGED
@@ -3,5 +3,5 @@
3
3
  # after editing either side, bring the other along and re-record the hashes:
4
4
  # git hash-object --path README.md README.md
5
5
  # git hash-object --path README.zh.md README.zh.md
6
- README.md: f777a9215f01e3864663e616cfa4818dbb1ea148
7
- README.zh.md: 77c78e4fbd7471b6bb0dd7995863a946793f7a47
6
+ README.md: e3868e51a38c5037870f521383d4e7d86e00656d
7
+ README.zh.md: 95a04eb89536f068d2fdec0b023cfee84ac7b412
package/README.md CHANGED
@@ -113,7 +113,8 @@ The `custom_plugin_status` tool reports appearance config, today's per-model usa
113
113
 
114
114
  | plugin release | dsh it was built and verified against | status |
115
115
  | --- | --- | --- |
116
- | 0.8.x | dsh 0.1.7-rc.2, dsh 0.2.0-rc.2 and dsh 0.2.1-rc.2 (both gates name all three; see Install) | this release |
116
+ | 0.9.x | any dsh at or above 0.1.7-rc.2 (open-ended; verified on 0.1.7-rc.2, 0.2.0-rc.2, 0.2.1-rc.2 and 0.2.1-rc.3) | this release |
117
+ | 0.8.x | dsh 0.1.7-rc.2, dsh 0.2.0-rc.2 and dsh 0.2.1-rc.2 (measured window) | previous; refused on dsh 0.2.1-rc.3 and later |
117
118
  | 0.7.x | dsh 0.1.7-rc.2 and dsh 0.2.0-rc.2 | previous; refused on dsh 0.2.1-rc.2 |
118
119
  | 0.6.x | dsh 0.1.7-rc.2 and dsh 0.2.0-rc.2 | previous; refused on dsh 0.2.1-rc.2 |
119
120
  | 0.5.x | dsh 0.1.7-rc.2 (peer range `>=0.1.7-rc.2 <0.2.0-0`) | fine on 0.1.x; refused on any 0.2.x host, including dsh Desktop |
@@ -125,9 +126,13 @@ viewed session, and the message model dropped the `tool-result` content block),
125
126
  so neither release substitutes for the other. dsh 0.2.1-alpha.4 changed the
126
127
  compatibility gate itself: it reads `engines.dsh` first and falls back to the
127
128
  `@deepseek-ai/dsh-*` peer ranges only when `engines.dsh` is absent. This package
128
- declares the same range in both places; older hosts read the peers, newer hosts
129
- read `engines.dsh`, and `pnpm smoke` fails if the two ever disagree. A bundle
130
- whose range does not match is skipped at install and startup. Runtimes
129
+ declares the same **open lower bound** (`>=0.1.7-rc.2`) in both places, so every
130
+ newer dsh release is admitted without waiting for a plugin release; older hosts
131
+ read the peers, newer hosts read `engines.dsh`, and `pnpm smoke` fails if the
132
+ two ever disagree. Verified versions are evidence, not a gate: see the table and
133
+ CHANGELOG. A scheduled canary installs the published plugin into the newest dsh
134
+ from npm `latest`/`next`, boots it, and runs the live probes, so an actual API
135
+ break shows up as an issue instead of a user-visible refusal. Runtimes
131
136
  predating that gate load the bundle anyway and degrade instead: on 0.1.1-rc.2,
132
137
  7 of 8 slot registrations succeed, the turn-tail entry is rejected (that slot
133
138
  became a list slot back in 0.1.6-alpha.2), and the open-session / branch /
@@ -135,7 +140,7 @@ cross-session actions report their service as missing rather than throwing.
135
140
 
136
141
  ## Install
137
142
 
138
- Prerequisites: Node 22+, pnpm, and the `dsh` CLI (the official `@deepseek-ai/dsh` npm package; `npx @deepseek-ai/dsh` stands in for `dsh` when it is not installed globally). This release targets **dsh 0.1.7-rc.2 through the rest of 0.1.x, plus 0.2.0-rc.2 and 0.2.1-rc.2** — dsh 0.2.1-alpha.4 and later check `engines.dsh` first and fall back to the `@deepseek-ai/dsh-*` peer ranges only when it is absent, while older hosts read the peers; this package declares the same range in both places and skips nothing it was not built for. 0.8.0 moves the build and test cohort to 0.2.1-rc.2. The artifact was installed with Desktop's own CLI into an isolated 0.2.1-rc.2 profile **with no compatibility exemption**, then booted for real: a 70-row boot graph, all five `dsh.client.inject` targets, the client bundle served at about 200 KB, the local Mermaid engine (3.57 MB), the state / usage / backup routes, a UTF-8 round trip and the desktop-forward trust shape all passed (16 live probes pass, 1 skip; the skip is timeline/export/search on a profile with no session, covered by unit tests and unchanged in 0.2.1 apart from an optional `formatStatus` field). The 0.6.0 artifact ran the live host probes on 0.2.0-rc.2 (66 rows) and 0.1.7-rc.2 (65 rows), 18 of 19 each, and 0.7.0 additionally passed the desktop-shape probe **on a real Desktop install** (see "On dsh Desktop" below). What stays unverified is what was always unverified: the per-turn chips (Mermaid render, LaTeX) need a real model reply, so a credential-free scratch home cannot reach them, and slot rendering still needs a browser pass. The range deliberately excludes 0.2.0-rc.1 (a superseded prerelease), 0.2.0-rc.3 and later prereleases nobody has looked at, and 0.2.0 stable; likewise 0.2.1-alpha.x, 0.2.1-rc.3 and later, and 0.2.1 stable. Range spelling matters here: `^0.1.7-rc.2` desugars to `>=0.1.7-rc.2 <0.2.0-0`, and every `0.2.0-rc.N` sorts *above* `0.2.0-0`, so a verified prerelease has to be named in its own clause — `pnpm smoke` checks that the build target actually satisfies the declared range and that `engines.dsh` admits exactly the same versions as the peer range. On an older dsh, install the matching older plugin release (`0.5.0` targets 0.1.7-rc.2) rather than granting a compatibility exemption.
143
+ Prerequisites: Node 22+, pnpm, and the `dsh` CLI (the official `@deepseek-ai/dsh` npm package; `npx @deepseek-ai/dsh` stands in for `dsh` when it is not installed globally). This release admits **every dsh release at or above 0.1.7-rc.2**: `engines.dsh` and the `@deepseek-ai/dsh-tools` peer are both an open lower bound, so dsh 0.2.1-alpha.4 and later (which read `engines.dsh` first) and older hosts (which read the peers) agree that no newer release is refused. 0.9.0 was built and tested on 0.2.1-rc.3. Its artifact was installed with Desktop's own CLI into an isolated 0.2.1-rc.3 profile **with no compatibility exemption**, then booted for real: a 71-row boot graph, all five `dsh.client.inject` targets, the client bundle served at 200,371 bytes, the local Mermaid engine (3,572,661 bytes), the state / usage / backup routes, a UTF-8 round trip and the desktop-forward trust shape all passed (16 live probes pass, 1 skip; the skip is timeline/export/search on a profile with no session, covered by unit tests). 0.8.0 ran the same probes on 0.2.1-rc.2 (70 rows); 0.6.0 ran them on 0.2.0-rc.2 (66 rows) and 0.1.7-rc.2 (65 rows), 18 of 19 each; 0.7.0 additionally passed the desktop-shape probe **on a real Desktop install** (see "On dsh Desktop" below). What stays unverified is what was always unverified: the per-turn chips (Mermaid render, LaTeX) need a real model reply, so a credential-free scratch home cannot reach them, and slot rendering still needs a browser pass. The host gate cannot distinguish "verified" from "unverified", so an explicit upper bound would refuse users on every dsh release until this package published again; the open range plus the scheduled canary replace that waiting with automatic detection. If a host below the floor is ever needed, install the matching older plugin release (`0.5.0` targets 0.1.7-rc.2).
139
144
 
140
145
  ### From npm
141
146
 
@@ -149,14 +154,14 @@ The registry tarball ships prebuilt output — no source build on the installing
149
154
  ### On dsh Desktop
150
155
 
151
156
  dsh Desktop is an Electron shell around the same Web application, and it bundles
152
- **exactly dsh 0.2.1-rc.2** as of 2026-10-17 — the desktop release line pins the
157
+ **exactly dsh 0.2.1-rc.3** as of 2026-10-23 — the desktop release line pins the
153
158
  shell and the runtime together, so a Desktop install is always one exact 0.2.x
154
- runtime. 0.8.0 names that version in `engines.dsh` and in the peer range and
155
- installs there with no compatibility exemption; 0.7.1 and earlier are refused by
156
- the 0.2.1 gate with the same message a 0.2.x Web profile prints.
159
+ runtime. 0.9.0's open range admits rc.3 and every later Desktop build, with no
160
+ compatibility exemption; 0.8.0 and earlier used a measured window and are refused
161
+ on rc.3 by the same gate a 0.2.x Web profile prints.
157
162
 
158
- Measured against 0.2.1-rc.2: the boot graph carries our row and all five inject
159
- targets (70 module rows), our client bundle is served at about 200 KB, the
163
+ Measured against 0.2.1-rc.3: the boot graph carries our row and all five inject
164
+ targets (71 module rows), our client bundle is served at 200,371 bytes, the
160
165
  Mermaid engine loads locally, and the live host probes pass 16 / skip 1 (the
161
166
  session-path skip needs a real session). The access fence shares the platform
162
167
  fence's trust semantics: a loopback socket naming a loopback Host, a
@@ -169,8 +174,8 @@ additionally required a same-origin marker and rejected exactly this shape with
169
174
  cross-site requests are still 403. **The 0.7.0 artifact was probed route by
170
175
  route on a real Desktop install in the desktop forward shape** (state / debug /
171
176
  backup / usage scan / the Mermaid engine preload and script routes all 200;
172
- foreign-origin and cross-site probes still 403), and 0.8.0 repeats the same
173
- shape against a booted 0.2.1-rc.2 host. The visual pass inside the Desktop
177
+ foreign-origin and cross-site probes still 403), 0.8.0 repeated the same shape
178
+ against a booted 0.2.1-rc.2 host, and 0.9.0 repeats it on rc.3. The visual pass inside the Desktop
174
179
  window (liquid glass look, panel layout, pattern removal) belongs to whoever
175
180
  installs it.
176
181
 
@@ -262,6 +267,8 @@ pnpm build # build the node ESM library and the browser bundle into lib
262
267
  pnpm check:readme # bilingual README hash consistency
263
268
  pnpm smoke # post-build contract checks: loader handshake, manifest
264
269
  # fields dsh reads, patch row, local Mermaid engine
270
+ pnpm canary # published plugin against the newest dsh from npm latest/next
271
+ # (needs npm, bash and curl; --plugin <tgz> tests a local build)
265
272
  ```
266
273
 
267
274
  `scripts/live-dsh-check.sh` is a separate, manual probe against a **running**
@@ -274,8 +281,10 @@ loopback request passes, a foreign Origin and a cross-site marker are
274
281
  rejected). It refuses to run against a
275
282
  real `~/.dsh` unless you set `ALLOW_REAL_DSH_HOME=1`, reports `PASS`/`FAIL` per
276
283
  probe, counts and names anything it `SKIP`s, and exits non-zero on any failure.
277
- CI has no harness to talk to, so run it whenever a dsh release lands; slot
278
- registration and rendering still need the browser pass described above.
284
+ The main CI job has no harness to talk to; the scheduled `compat-canary`
285
+ workflow runs this probe against the newest dsh from npm `latest`/`next` and
286
+ opens an issue on failure. Run it manually when you want detail on a release;
287
+ slot registration and rendering still need the browser pass described above.
279
288
 
280
289
  `scripts/desktop-shape-probe.mjs` is a third probe, aimed at a **running dsh
281
290
  Desktop**. Desktop 0.2.1+ asks the OS for its port, so pass the port it printed
@@ -299,12 +308,11 @@ DSH_HOME=/tmp/dshnext-home node node_modules/@deepseek-ai/dsh/lib/bin.js --profi
299
308
  DSH_HOME=/tmp/dshnext-home DSH_PORT=13999 COOKIE_JAR=/tmp/dshnext/jar.txt bash scripts/live-dsh-check.sh
300
309
  ```
301
310
 
302
- If the release falls outside the declared range (`engines.dsh` on dsh
303
- 0.2.1-alpha.4 and later, the `@deepseek-ai/dsh-*` peers otherwise), the second
304
- command refuses and rolls the profile back; `dsh plugin --profile web
305
- allow-version <pkg>@<ver> --dsh-version <version> --accept-risk` grants the
306
- exact-version exemption, so the probe can tell you *what* actually breaks instead
307
- of what the gate already refused.
311
+ The range is an open lower bound, so the second command accepts any release at
312
+ or above `0.1.7-rc.2`; no compatibility exemption is needed. The scheduled canary
313
+ runs these same steps against the newest of npm `latest`/`next`; to test a local
314
+ build before releasing, run
315
+ `node scripts/compat-canary.mjs <version> --plugin <packed.tgz>`.
308
316
 
309
317
  For a **dsh Desktop** release, start one step earlier, because the repository
310
318
  cannot tell you what an installer runs: Desktop pins its shell and
package/README.zh.md CHANGED
@@ -113,7 +113,8 @@ DeepSeek Harness(DSH)Web GUI 的 Custom 便利套件:个性化外观、天
113
113
 
114
114
  | 插件版本 | 构建并实测过的 dsh | 状态 |
115
115
  | --- | --- | --- |
116
- | 0.8.x | dsh 0.1.7-rc.2、dsh 0.2.0-rc.2 与 dsh 0.2.1-rc.2(两道门都写了这三个版本,见「安装」) | 本版本 |
116
+ | 0.9.x | 任何 >= 0.1.7-rc.2 的 dsh(开放式;已在 0.1.7-rc.2、0.2.0-rc.2、0.2.1-rc.2 与 0.2.1-rc.3 实测) | 本版本 |
117
+ | 0.8.x | dsh 0.1.7-rc.2、dsh 0.2.0-rc.2 与 dsh 0.2.1-rc.2(实测窗口) | 上一版;在 dsh 0.2.1-rc.3 及以后会被拒绝 |
117
118
  | 0.7.x | dsh 0.1.7-rc.2 与 dsh 0.2.0-rc.2 | 上一版;在 dsh 0.2.1-rc.2 上会被拒绝 |
118
119
  | 0.6.x | dsh 0.1.7-rc.2 与 dsh 0.2.0-rc.2 | 上一版;在 dsh 0.2.1-rc.2 上会被拒绝 |
119
120
  | 0.5.x | dsh 0.1.7-rc.2(peer 范围 `>=0.1.7-rc.2 <0.2.0-0`) | 在 0.1.x 上没问题;任何 0.2.x 宿主都会拒绝它,dsh 桌面版也算 |
@@ -122,15 +123,18 @@ DeepSeek Harness(DSH)Web GUI 的 Custom 便利套件:个性化外观、天
122
123
  0.1.7 改掉了本套件依赖的插件侧契约(会话导航归 `ctx.uiWorkspace`、会话列表不再提供
123
124
  当前查看的会话、消息模型移除 `tool-result` 内容块),两个版本互不替代。dsh
124
125
  0.2.1-alpha.4 又改掉了兼容门本身:优先读 `engines.dsh`,只有它缺省时才回退到
125
- `@deepseek-ai/dsh-*` peer 范围。本包两处声明同一条范围;旧宿主读 peer,新宿主读
126
- `engines.dsh`,`pnpm smoke` 会在两者判定不一致时判红。范围不匹配的 bundle 会在
127
- 安装与启动时被整包跳过。没有这道闸的更早宿主仍会加载插件,但表现为功能退化:实测
126
+ `@deepseek-ai/dsh-*` peer 范围。本包两处声明同一条**开放式下限**(`>=0.1.7-rc.2`),
127
+ 因此任何更新的 dsh 版本都会被放行,不必等插件发版;旧宿主读 peer,新宿主读
128
+ `engines.dsh`,`pnpm smoke` 会在两者判定不一致时判红。实测过的版本是证据、不是闸门,
129
+ 见上表与 CHANGELOG。定时 canary 会把已发布插件装进 npm `latest`/`next` 里最新的
130
+ dsh,真实启动并跑活体探针——真的 API 断裂会变成 issue,而不是用户眼前的“不兼容”。
131
+ 没有这道闸的更早宿主仍会加载插件,但表现为功能退化:实测
128
132
  0.1.1-rc.2 上 8 个槽位注册成 7 个,turnTail 条目被拒(该槽位自 0.1.6-alpha.2 起由
129
133
  chain 改为 list),打开会话、创建分支、跨会话搜索会提示对应服务缺失,而不是抛错。
130
134
 
131
135
  ## 安装
132
136
 
133
- 前置:Node 22+、pnpm,以及 `dsh` CLI(官方 npm 包 `@deepseek-ai/dsh`;未全局安装时,可用 `npx @deepseek-ai/dsh` 代替 `dsh`)。本版本面向 **dsh 0.1.7-rc.2 及其后的 0.1.x,外加 0.2.0-rc.2 与 0.2.1-rc.2**:dsh 0.2.1-alpha.4 及更新版本优先读 `engines.dsh`,仅在它缺省时回退到 `@deepseek-ai/dsh-*` peer 范围;旧宿主仍读 peer。本包两处声明同一条范围,不为没构建过的版本开口子。0.8.0 把构建与测试队列整体切到 0.2.1-rc.2。产物用桌面版自带 CLI 装进隔离的 0.2.1-rc.2 profile,**没有使用任何兼容豁免**,随后真实冷启动:boot 图 70 行、五个 `dsh.client.inject` 目标齐全、客户端 bundle 服务约 200 KB、Mermaid 本地引擎 3.57 MB、state / 用量 / 备份路由、UTF-8 往返与桌面转发信任形状全部通过(16 项通过、1 项跳过;跳过的只是无会话 profile 上的时间线/导出/搜索,该路径由单测覆盖,且 0.2.1 只新增可选 `formatStatus` 字段)。0.6.0 的产物在 0.2.0-rc.2(66 行)与 0.1.7-rc.2(65 行)上各跑过活体探针,19 项里 18 项通过;0.7.0 的产物额外在**真实桌面安装**上过了桌面形态活体探针(见下文「在 dsh 桌面版上」)。验不到的部分和以往一样:回合内的 chips(Mermaid 渲染、LaTeX)需要一次真实的模型回复,无凭据的临时家目录跑不出来,槽位渲染也仍要在浏览器里过一遍。范围刻意不收 0.2.0-rc.1、0.2.0-rc.3 及之后、0.2.0 正式版;同理也不收 0.2.1-alpha.x、0.2.1-rc.3 及之后与 0.2.1 正式版。范围的写法在这里有讲究:`^0.1.7-rc.2` 展开成 `>=0.1.7-rc.2 <0.2.0-0`,而每一个 `0.2.0-rc.N` 都排在 `0.2.0-0` **之上**,所以实测过的预发布版本必须单独写成一段——`pnpm smoke` 会检查构建目标确实落在声明范围里,并且 `engines.dsh` 与 peer 范围放行完全相同的版本。仍在旧版 dsh 的用户请安装对应的旧版插件(0.5.0 面向 0.1.7-rc.2),而不是授予兼容性豁免。
137
+ 前置:Node 22+、pnpm,以及 `dsh` CLI(官方 npm 包 `@deepseek-ai/dsh`;未全局安装时,可用 `npx @deepseek-ai/dsh` 代替 `dsh`)。本版本放行**所有 >= 0.1.7-rc.2 的 dsh**:`engines.dsh` 与 `@deepseek-ai/dsh-tools` peer 都是开放式下限,所以 dsh 0.2.1-alpha.4 及更新版本(优先读 `engines.dsh`)与旧宿主(读 peer)都不会拒绝更新的 dsh。0.9.0 的构建与测试队列是 0.2.1-rc.3。产物用桌面版自带 CLI 装进隔离的 0.2.1-rc.3 profile,**没有使用任何兼容豁免**,随后真实冷启动:boot 图 71 行、五个 `dsh.client.inject` 目标齐全、客户端 bundle 200,371 字节、Mermaid 本地引擎 3,572,661 字节、state / 用量 / 备份路由、UTF-8 往返与桌面转发信任形状全部通过(16 项通过、1 项跳过;跳过的是无会话 profile 上的时间线/导出/搜索,该路径由单测覆盖)。0.8.0 的产物在 0.2.1-rc.2 上跑过同一套探针(70 行);0.6.0 的产物在 0.2.0-rc.2(66 行)与 0.1.7-rc.2(65 行)上各跑过 19 项里的 18 项;0.7.0 的产物额外在**真实桌面安装**上过了桌面形态活体探针(见下文「在 dsh 桌面版上」)。验不到的部分和以往一样:回合内的 chips(Mermaid 渲染、LaTeX)需要一次真实的模型回复,无凭据的临时家目录跑不出来,槽位渲染也仍要在浏览器里过一遍。宿主的兼容门分不清“实测过”与“没实测过”,所以写死上界会让每个新 dsh 版本都等到插件再次发版才可用;开放式下限加定时 canary 把这段等待换成自动发现。若确实要跑低于下限的宿主,请安装对应的旧版插件(0.5.0 面向 0.1.7-rc.2)。
134
138
 
135
139
  ### 从 npm 安装
136
140
 
@@ -143,14 +147,14 @@ registry 上是预构建产物,安装端无需从源码构建。
143
147
 
144
148
  ### 在 dsh 桌面版上
145
149
 
146
- dsh 桌面版是同一套 Web 应用外面的一层 Electron 壳,截至 2026-10-17 随包携带
147
- **正好是 dsh 0.2.1-rc.2**——桌面发布线把壳和运行时钉成同一个版本,所以桌面端拿到
148
- 的永远是某一个确定的 0.2.x 运行时。0.8.0 在 `engines.dsh` 与 peer 范围里都写入了
149
- 这个版本,因此在桌面版上安装不需要任何兼容性豁免;0.7.1 及更早版本会被 0.2.1 的
150
- 兼容门拒绝,给出的信息和 0.2.x 的 Web profile 完全一样。
150
+ dsh 桌面版是同一套 Web 应用外面的一层 Electron 壳,截至 2026-10-23 随包携带
151
+ **正好是 dsh 0.2.1-rc.3**——桌面发布线把壳和运行时钉成同一个版本,所以桌面端拿到
152
+ 的永远是某一个确定的 0.2.x 运行时。0.9.0 的开放式范围收 rc.3 及之后的每个桌面构建,
153
+ 安装不需要任何兼容性豁免;0.8.0 及更早用的是实测窗口,在 rc.3 上会被同一道门拒绝,
154
+ 给出的信息和 0.2.x 的 Web profile 完全一样。
151
155
 
152
- 对 0.2.1-rc.2 的实测:boot 图里 70 行、我们那一行与五个 inject 目标都在、客户端
153
- bundle 以约 200 KB 服务、Mermaid 引擎本地加载,活体宿主探针 16 项通过、1 项跳过
156
+ 对 0.2.1-rc.3 的实测:boot 图里 71 行、我们那一行与五个 inject 目标都在、客户端
157
+ bundle 以 200,371 字节服务、Mermaid 引擎本地加载,活体宿主探针 16 项通过、1 项跳过
154
158
  (跳过的是需要真实会话的会话路径)。访问围栏与官方 API 围栏同一套信任语义:回环
155
159
  套接字 + 回环 Host、非 `cross-site`、`origin` 缺省或与 Host 一致即放行。壳在把
156
160
  渲染进程的请求转发给它自己的 Host 之前会删掉 `host`、`origin`、`sec-fetch-site`、
@@ -158,7 +162,8 @@ bundle 以约 200 KB 服务、Mermaid 引擎本地加载,活体宿主探针 16
158
162
  还额外要求同源标记,曾把这套形状全部误拒为 forbidden,0.7.0 起修复并补了围栏级
159
163
  单测)。异源与跨站请求仍然 403。**0.7.0 的产物已在真实桌面安装上按桌面转发形状
160
164
  逐路由实测过**(state / debug / backup / 用量扫描 / Mermaid 引擎预加载与脚本路由
161
- 全部 200,异源与跨站仍 403);0.8.0 在冷启动的 0.2.1-rc.2 宿主上复跑了同一套形状。
165
+ 全部 200,异源与跨站仍 403);0.8.0 在冷启动的 0.2.1-rc.2 宿主上复跑了同一套形状,
166
+ 0.9.0 在 rc.3 上再跑一遍。
162
167
  桌面窗口内的视觉验收(液态玻璃观感、面板布局、点阵清除)归装它的人过目。
163
168
 
164
169
  管桌面 profile 要用桌面版自带的 `dsh` 命令,不是 npm 装的那个——公开 CLI 拒绝
@@ -247,6 +252,8 @@ pnpm build # 构建 node ESM 库与浏览器 bundle 到 lib/
247
252
  pnpm check:readme # 双语 README 哈希一致性
248
253
  pnpm smoke # 构建后契约自检:加载器握手、dsh 会读的清单字段、
249
254
  # patch 行、本地 Mermaid 引擎
255
+ pnpm canary # 已发布插件对 npm latest/next 里最新的 dsh(需要 npm、bash、
256
+ # curl;--plugin <tgz> 可测本地构建)
250
257
  ```
251
258
 
252
259
  `scripts/live-dsh-check.sh` 是另一条**手动**探针,对着一个正在运行的隔离 dsh profile
@@ -254,7 +261,7 @@ pnpm smoke # 构建后契约自检:加载器握手、dsh 会读的清
254
261
  时间线、三种导出、搜索扫描路径、用量扫描、备份、Mermaid 引擎路由、客户端→宿主的诊断回环、
255
262
  一次会还原并校验提示词库的 UTF-8 往返,以及访问围栏的三种形态(无标记回环放行、异源拒绝、跨站拒绝)。默认拒绝在真实的
256
263
  `~/.dsh` 上运行(需显式 `ALLOW_REAL_DSH_HOME=1`),逐项报 PASS/FAIL,被 `SKIP` 的项会计数并写进收尾行,任一失败即非零退出。
257
- CI 没有可对话的宿主,所以每次 dsh 发版都建议跑一遍;槽位注册与渲染仍需按上文用浏览器过一遍。
264
+ 主 CI 没有可对话的宿主;定时的 `compat-canary` workflow 会对 npm `latest`/`next` 里最新的 dsh 自动跑这套探针,失败时开 issue。想看某一版的细节时再手动跑;槽位注册与渲染仍需按上文用浏览器过一遍。
258
265
 
259
266
  `scripts/desktop-shape-probe.mjs` 是第三条探针,面向**正在运行的 dsh 桌面版**。
260
267
  桌面版 0.2.1+ 让系统分配监听端口,所以用 `DSH_PORT` 传入它打印的(或正在监听的)
@@ -273,10 +280,9 @@ DSH_HOME=/tmp/dshnext-home node node_modules/@deepseek-ai/dsh/lib/bin.js --profi
273
280
  DSH_HOME=/tmp/dshnext-home DSH_PORT=13999 COOKIE_JAR=/tmp/dshnext/jar.txt bash scripts/live-dsh-check.sh
274
281
  ```
275
282
 
276
- 若新版本落在声明的范围之外(dsh 0.2.1-alpha.4 及以后先看 `engines.dsh`,其余看
277
- `@deepseek-ai/dsh-*` peer),第二条会被拒并回滚 profile;这时可以用
278
- `dsh plugin --profile web allow-version <包名>@<版本> --dsh-version <版本> --accept-risk`
279
- 授予精确版本豁免——这样探针能告诉你**到底是什么坏了**,而不是只看到闸口拒绝。
283
+ 范围是开放式下限,所以第二条命令会接受任何 >= `0.1.7-rc.2` 的版本,不需要兼容豁免。
284
+ 定时 canary 对 npm `latest`/`next` 里最新的版本自动执行这四步;发版前想测本地构建,
285
+ 可跑 `node scripts/compat-canary.mjs <版本> --plugin <打包好的.tgz>`。
280
286
 
281
287
  验**桌面版**发版要往前多走一步,因为仓库回答不了"用户装的那一版里到底是哪个 dsh":
282
288
  桌面版把壳和 `@deepseek-ai/dsh` 钉成同一个精确版本,整套运行时打在
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alexpeng/dsh-custom-plugin",
3
3
  "description": "Custom convenience suite for the dsh web GUI: appearance, folders, prompts, session export/search, Mermaid, quote reply, usage analytics, local budget, key-free backups, and a Ctrl/Cmd+K command palette; dual-face plugin mounted without dsh source changes.",
4
- "version": "0.8.0",
4
+ "version": "0.9.0",
5
5
  "type": "module",
6
6
  "icon": "./icon.svg",
7
7
  "main": "lib/index.js",
@@ -45,7 +45,7 @@
45
45
  "homepage": "https://github.com/AlexPeng07/dsh-custom-plugin#readme",
46
46
  "engines": {
47
47
  "node": ">=22",
48
- "dsh": ">=0.1.7-rc.2 <0.2.0-0 || >=0.2.0-rc.2 <0.2.0-rc.3 || >=0.2.1-rc.2 <0.2.1-rc.3"
48
+ "dsh": ">=0.1.7-rc.2"
49
49
  },
50
50
  "packageManager": "pnpm@11.28.5",
51
51
  "scripts": {
@@ -57,27 +57,28 @@
57
57
  "test:watch": "vitest",
58
58
  "check:readme": "node scripts/check-readme-i18n.mjs",
59
59
  "smoke": "node scripts/smoke.mjs",
60
+ "canary": "node scripts/compat-canary.mjs",
60
61
  "prepare": "npm run build",
61
62
  "prepublishOnly": "tsc --noEmit && vitest run"
62
63
  },
63
64
  "peerDependencies": {
64
65
  "@deepseek-ai/cordis": "^4.0.4",
65
- "@deepseek-ai/dsh-tools": ">=0.1.7-rc.2 <0.2.0-0 || >=0.2.0-rc.2 <0.2.0-rc.3 || >=0.2.1-rc.2 <0.2.1-rc.3"
66
+ "@deepseek-ai/dsh-tools": ">=0.1.7-rc.2"
66
67
  },
67
68
  "dependencies": {
68
69
  "mermaid": "^11.6.0"
69
70
  },
70
71
  "devDependencies": {
71
72
  "@deepseek-ai/cordis": "^4.0.5",
72
- "@deepseek-ai/dsh-attachment": "0.2.1-rc.2",
73
- "@deepseek-ai/dsh-client-store": "0.2.1-rc.2",
74
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.2",
75
- "@deepseek-ai/dsh-client-ui-theme": "0.2.1-rc.2",
76
- "@deepseek-ai/dsh-host-webserver": "0.2.1-rc.2",
77
- "@deepseek-ai/dsh-llm": "0.2.1-rc.2",
78
- "@deepseek-ai/dsh-session": "0.2.1-rc.2",
79
- "@deepseek-ai/dsh-session-query": "0.2.1-rc.2",
80
- "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
73
+ "@deepseek-ai/dsh-attachment": "0.2.1-rc.3",
74
+ "@deepseek-ai/dsh-client-store": "0.2.1-rc.3",
75
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
76
+ "@deepseek-ai/dsh-client-ui-theme": "0.2.1-rc.3",
77
+ "@deepseek-ai/dsh-host-webserver": "0.2.1-rc.3",
78
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.3",
79
+ "@deepseek-ai/dsh-session": "0.2.1-rc.3",
80
+ "@deepseek-ai/dsh-session-query": "0.2.1-rc.3",
81
+ "@deepseek-ai/dsh-tools": "0.2.1-rc.3",
81
82
  "@types/node": "^22.20.0",
82
83
  "@types/react": "~18.3.1",
83
84
  "@types/react-dom": "^18.3.5",