dsh-plugin-upgrader 1.6.1 → 1.6.3

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
@@ -1,5 +1,62 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.6.3 — 2026-11-02
4
+
5
+ - **"Restart DSH" is now a thing the page can walk you through, instead of advice it
6
+ cannot follow up on.** A step the manager answers with `restart-required` used to leave a
7
+ banner saying a restart was needed and nothing else. The banner now grows a button that
8
+ opens a dialog naming the one action that actually finishes the restart for *this* host:
9
+ quit and reopen the desktop app, or paste back the command line a terminal start used
10
+ (read from the process itself, quoted so it is safe to paste). The dialog says plainly
11
+ that the page cannot restart the host — the desktop shell keeps relaunch in its main
12
+ process, and a terminal-started host has nobody to bring it back — rather than offering
13
+ a button that would reload the page and leave the change unapplied.
14
+ - **It watches the pid, so you never have to guess whether the restart took.** After you
15
+ confirm, the dialog polls a new `GET /api/plugin-upgrader/host` route once a second until
16
+ a *different* pid answers, then reloads through the boot-document guard (the same one
17
+ 1.3.0 added), so the reload lands on a document the new host can actually serve. Two
18
+ limits are deliberate: the pid is computed per request rather than cached, because a
19
+ cached value would make a real restart look like a hang, and the whole wait is capped at
20
+ two minutes before the dialog says the host has not come back.
21
+ - **The button is tied to the result, not to the colour of the banner.** `warn` also
22
+ carries "this page has no install entry" and "a reload was stopped", and only one of the
23
+ three is finished by restarting — so `restart-required` sets the flag and starting a new
24
+ batch clears it.
25
+ - **A raster icon ships with the package.** `assets/icon.svg` stays the npm `./icon`
26
+ export and the source of truth; `assets/icon-180.png` is a 180 px render of that same
27
+ artwork produced by `scripts/render-icon.py` (Pillow, 4× supersampling), for the
28
+ marketplaces that list plugins and only accept bitmap icons. Both files are in `files`,
29
+ and the pack check now fails if the PNG goes missing.
30
+ - **`screenshots.json` lists the source-manager screenshot too.** It had been left at the
31
+ two original images when 1.6.0 added the dialog, so every market that reads the list
32
+ showed three features and two pictures.
33
+
34
+ ## 1.6.2 — 2026-11-02
35
+
36
+ - **A DSH Store notice was re-checked against the current code, not taken at face value.**
37
+ Issue #1550 listed eight reasons, but they were a scan of v1.0.1: four of them (the three
38
+ missing runtime artifacts and the incomplete scan) and `prepare`/`engines.dsh` were all
39
+ fixed in 1.5.0. Re-running the store's own review code against the current tree leaves
40
+ one catalog reason this release could act on — the runtime dependency — and three
41
+ capability signals (`files`, `network`, `credentials`) that are the plugin's actual job.
42
+ Those three sit on the store's review list rather than its reject list, so they need a
43
+ maintainer admission record, not a code change; rewriting the plugin to stop touching
44
+ files, the network or the environment would be removing the feature.
45
+ - **`@deepseek-ai/schemastery` is a peer dependency, not a bundled one.** 1.6.0 declared it
46
+ as a dependency so the `Config` schema would be built by the same library the loader
47
+ validates with — but that argument points at a peer, not at a copy: a peer guarantees one
48
+ instance, while a bundled copy can produce two. The host already ships it (`DSH desktop`
49
+ depends on it directly and `dsh-plugin-manager` does too), so the package no longer pulls
50
+ its own. It stays in `devDependencies` for building and testing.
51
+ - **The package now declares per-release DSH compatibility.** `dsh.compatibility.dshReleases`
52
+ records `0.2.1-rc.5` as `compatible` — the release this plugin actually runs on. The two
53
+ other releases in the rolling window (`0.2.1-rc.4`, `0.2.2-alpha.2`) are inside the
54
+ `engines.dsh` range but were never exercised here, so they are deliberately left
55
+ undeclared and read as `unknown`. `dshOperations` is left out for the same reason rather
56
+ than filled with `passed`. This is Catalog metadata only; the host does not read it.
57
+ - **README gains a permissions / dependencies / external services / failure-bounds section**
58
+ in both languages, so a review does not have to infer the blast radius from the source.
59
+
3
60
  ## 1.6.1 — 2026-10-30
4
61
 
5
62
  - **The source test no longer calls a working mirror unreachable.** The probe tried
package/README.en.md CHANGED
@@ -12,7 +12,7 @@ plugin adds a **Versions** tab to that page and fills both gaps.
12
12
 
13
13
  English · [中文](./README.md)
14
14
 
15
- ![Versions tab](./screenshots/history.png)
15
+ ![Versions tab](https://raw.githubusercontent.com/zuwenyin/dsh-plugin-upgrader/main/screenshots/history.png)
16
16
 
17
17
  ## Features
18
18
 
@@ -38,6 +38,14 @@ English · [中文](./README.md)
38
38
  built-in sources, the ones `pluginManager` is configured with, and the ones you added.
39
39
  Built-ins cannot be edited or deleted; your own can. Every row can be tested on its
40
40
  own, and so can the source currently in use.
41
+ - **It tells you how to restart when a restart is needed** — when a result comes back
42
+ `restart-required`, the banner grows a "Restart DSH" button. It explains why this
43
+ particular change has to wait and gives the one action that actually finishes the
44
+ restart for the way you started the host: quit and reopen the desktop app, or paste
45
+ back the command a terminal start used. After you confirm, it watches the host's pid
46
+ and reloads only once a different process answers, instead of leaving you guessing.
47
+
48
+ ![Source manager](https://raw.githubusercontent.com/zuwenyin/dsh-plugin-upgrader/main/screenshots/sources.png)
41
49
 
42
50
  > **Changing this repo? Read [AGENTS.md](./AGENTS.md) first.** It lists the behaviour
43
51
  > that already works and must keep working, with the code location and the test that
@@ -46,7 +54,9 @@ English · [中文](./README.md)
46
54
 
47
55
  ## Where it shows up
48
56
 
49
- A **Versions** tab appears next to *Installed* and *Discover* on the Plugins page:
57
+ A **Versions** tab appears next to *Installed* and the market tab on the Plugins
58
+ page (that tab is **Market** with `dshmarket` installed, and **Discover** in DSH's
59
+ own market page):
50
60
 
51
61
  - Header counts: upgradable / installed / version count
52
62
  - The header **Registry** control opens the source dialog:
@@ -72,11 +82,12 @@ A **Versions** tab appears next to *Installed* and *Discover* on the Plugins pag
72
82
  - the version was not tagged, or the GitHub list is unreadable (rate limit,
73
83
  offline) → the repository's `releases` feed
74
84
 
75
- ![Expanded history](./screenshots/selection.png)
85
+ ![Expanded history](https://raw.githubusercontent.com/zuwenyin/dsh-plugin-upgrader/main/screenshots/selection.png)
76
86
 
77
87
  ## Install
78
88
 
79
- Search `dsh-plugin-upgrader` on the Plugins page's **Discover** tab and hit install.
89
+ Search `dsh-plugin-upgrader` on the Plugins page's market tab (**Discover** in DSH
90
+ itself, **Market** with `dshmarket` installed) and hit install.
80
91
  On the desktop app use its own plugin manager — the CLI cannot change the profile
81
92
  an app has open.
82
93
 
@@ -108,6 +119,7 @@ host half:
108
119
  | `POST /api/plugin-upgrader/job` | queue a batch of upgrade / switch steps, return a job id immediately |
109
120
  | `GET /api/plugin-upgrader/job?id=…` | poll progress, current phase, elapsed time, per-plugin results and the live log |
110
121
  | `POST /api/plugin-upgrader/cancel` | abort the step in flight, whichever install is running |
122
+ | `GET /api/plugin-upgrader/host` | this process's pid and how it was started, for the "restart DSH" dialog |
111
123
 
112
124
  Every route is loopback-only: a batch installs packages, so a paired remote device
113
125
  or a cross-site page must never reach it.
@@ -215,6 +227,88 @@ error:
215
227
  A restart interrupts the job in flight; the UI reports that as a failure rather than
216
228
  spinning forever.
217
229
 
230
+ ## Permissions, dependencies and external services
231
+
232
+ This section states the capabilities the plugin actually uses, so a review or a bug
233
+ report does not have to read the source to find out.
234
+
235
+ ### What it touches
236
+
237
+ | Capability | Scope | Notes |
238
+ | --- | --- | --- |
239
+ | Files | **the profile directory only** | Reads and writes `package.json`, writes `package.json.upgrader-journal.json`, reads `package.json.lock`. No filesystem walking, nothing outside the profile |
240
+ | Network (outbound) | the configured npm registry, the GitHub API | `GET` only, see below |
241
+ | Commands | **none** | No `child_process`, no spawned processes; installs go through the host's `pluginManager` |
242
+ | Credentials | **none** | No tokens, no `.npmrc` reads, no authentication. Private registries rely on pnpm's own configuration |
243
+
244
+ The registry choice (`registry` / `customRegistries`) is written into the profile's
245
+ `cordis.patch.yml` by the **host's settings service**, not by the plugin editing files:
246
+ the plugin only calls `configForms.set()`.
247
+
248
+ Three environment variables are read, all to *locate the profile directory*:
249
+ `DSH_PROFILE_DIR`, `DSH_HOME` and `DSH_PROFILE`. When the desktop shell exports none of
250
+ them, a working directory that parses as a profile is used instead. They are not
251
+ secrets, but a bare `process.env` counts as one "credentials" signal in a static scan,
252
+ so the real purpose is spelled out here.
253
+
254
+ ### External services
255
+
256
+ | Target | Purpose | On failure |
257
+ | --- | --- | --- |
258
+ | `{configured npm registry}/{package}` | packument fetch, to list published versions (5 minute cache, 20 second timeout, at most 4 concurrent) | that row shows `versionError` and a retry entry; other rows are unaffected |
259
+ | `https://registry.npmjs.org/{package}` | only when the configured registry is not the official one: an extra upstream check that reports a lagging mirror | an unreadable upstream means "no gap", never "everything is missing" |
260
+ | `https://api.github.com/repos/{owner}/{repo}/tags?per_page=100` | tag list, to decide whether a version can link to `releases/tag/v…` (30 minute cache, 8 second timeout) | falls back to the `releases` list; never guesses a tag that 404s |
261
+ | `{the address being tested}/-/ping` and its root | *Test* in the Registry dialog probes both **concurrently**, first 2xx wins (5 s budget for the whole probe) | reports the most specific reason: status code first, then timeout, then the raw network error |
262
+ | the local DSH web server | the plugin's own five `/api/plugin-upgrader/*` routes | — |
263
+
264
+ The default registry is whatever pnpm is configured with (usually `.npmrc`); the
265
+ **Registry** button on the Versions tab switches to the official registry, mainland
266
+ mirror, or a source you add yourself. **No telemetry** of any kind is sent.
267
+
268
+ ### Dependencies
269
+
270
+ There are **no bundled runtime dependencies**. The single external module,
271
+ `@deepseek-ai/schemastery` (used for the Config schema, `~3.18.5`), is declared in
272
+ `peerDependencies` and supplied by the host: DSH desktop ships it as its own dependency
273
+ and first-party packages such as `dsh-plugin-manager` depend on it too, so it always
274
+ resolves inside a profile. The copy needed for building and testing lives in
275
+ `devDependencies`.
276
+
277
+ The remaining `devDependencies` (TypeScript, esbuild, `@types/*`, `@deepseek-ai/dsh-*`)
278
+ are development-time only and are not part of the published tarball's runtime.
279
+
280
+ ### Failure bounds
281
+
282
+ - **One batch at a time**: a second submission gets `409 busy`; the UI adopts the batch
283
+ that is running instead of reporting an error.
284
+ - **A job heartbeats every 2 seconds** and is declared abandoned after 15 minutes of
285
+ no progress, so it cannot occupy the slot forever. A host restart interrupts the job
286
+ in flight and the UI reports that as a failure.
287
+ - **Writer lock**: the manager's own budget is 120 seconds; a timeout is translated
288
+ into who holds the lock and whether a restart clears it.
289
+ - **A failed upgrade**: the in-place path journals the dropped dependency before
290
+ removing it and restores it on failure; a killed process is repaired on the next
291
+ load. The plugin stays installed and keeps its enabled state.
292
+ - **Unreachable registry, rate-limited GitHub, offline**: every one of them degrades to
293
+ "this one thing could not be read, here is why, retry", never to a silent "no new
294
+ version" or "no version history".
295
+
296
+ ### DSH compatibility
297
+
298
+ Node.js `>=20` and DSH `>=0.2.1-rc.3 <0.3.0-0` (the `engines` field).
299
+ `dsh.compatibility.dshReleases` records **only the releases actually exercised**:
300
+
301
+ | DSH release | Status |
302
+ | --- | --- |
303
+ | `0.2.1-rc.5` | compatible |
304
+
305
+ `0.2.1-rc.4` and `0.2.2-alpha.2` fall inside the `engines` range but were not each
306
+ exercised, so they are **not** listed (an undeclared release reads as `unknown`). These
307
+ are **source-side compatibility declarations**, not a substitute for per-operation
308
+ acceptance. `dshOperations` (install / start / uninstall / rollback) follows the same
309
+ rule: left out rather than filled with `passed` before there is a per-release run behind
310
+ it.
311
+
218
312
  ## Project layout
219
313
 
220
314
  ```
package/README.md CHANGED
@@ -10,7 +10,7 @@ DSH 自带的插件页能装、能卸、能看已安装列表,但缺两件事
10
10
 
11
11
  [English](./README.en.md) · 中文
12
12
 
13
- ![版本标签](./screenshots/history.png)
13
+ ![版本标签](https://raw.githubusercontent.com/zuwenyin/dsh-plugin-upgrader/main/screenshots/history.png)
14
14
 
15
15
  ## 功能
16
16
 
@@ -28,6 +28,12 @@ DSH 自带的插件页能装、能卸、能看已安装列表,但缺两件事
28
28
  - **安装源管理** —— 「注册表」按钮打开一个对话框,里面列出自带源、`pluginManager` 配的源
29
29
  和用户自己加的源;自带源不能改也不能删,自己加的可以随时改/删。每一行都能单独
30
30
  「测试」能不能连上,当前在用的那个也能一键测。
31
+ - **要重启时告诉你怎么重启** —— 升级结果里带 `restart-required` 时,提示条上多出一个
32
+ 「重启 DSH」按钮,点开说明为什么这次改动要等,并按你的启动方式给出那一条能完成重启的
33
+ 操作:桌面版是「退出应用再打开」,命令行启动的是可复制的原命令。确认重启后它会盯着
34
+ 宿主的 pid,换了进程才刷新页面,而不是让你对着一个不确定的页面猜。
35
+
36
+ ![安装源管理](https://raw.githubusercontent.com/zuwenyin/dsh-plugin-upgrader/main/screenshots/sources.png)
31
37
 
32
38
  > **要改这个仓库?先读 [AGENTS.md](./AGENTS.md)。** 那里逐条写了「已经实现并且必须继续成立」
33
39
  > 的行为、对应代码位置和守护它的测试。上面这些功能里,`GH` 链接和 in-place 升级都曾经
@@ -35,7 +41,8 @@ DSH 自带的插件页能装、能卸、能看已安装列表,但缺两件事
35
41
 
36
42
  ## 界面位置
37
43
 
38
- 插件页顶部标签栏多出一个「版本」标签,与「已安装」「发现」并列:
44
+ 插件页顶部标签栏多出一个「版本」标签,与「已安装」以及市场标签并列
45
+ (市场标签在装了 `dshmarket` 的界面里叫「插件市场」,DSH 自带的那个叫「发现」):
39
46
 
40
47
  - 顶部统计:可升级数量 / 已安装数量 / 每个插件的版本数
41
48
  - 顶部「注册表」按钮打开安装源对话框:
@@ -57,11 +64,12 @@ DSH 自带的插件页能装、能卸、能看已安装列表,但缺两件事
57
64
  - 该版本没打 tag,或 GitHub 列表读不到(限流 / 离线)→ 退回仓库的发布列表 `releases`,
58
65
  不在页面上放一个点进去是 404 的版本号
59
66
 
60
- ![展开历史版本](./screenshots/selection.png)
67
+ ![展开历史版本](https://raw.githubusercontent.com/zuwenyin/dsh-plugin-upgrader/main/screenshots/selection.png)
61
68
 
62
69
  ## 安装
63
70
 
64
- 在「插件」页的**发现**标签里搜索 `dsh-plugin-upgrader`,点安装即可。
71
+ 在「插件」页的市场标签里搜索 `dsh-plugin-upgrader`(自带的是「发现」,
72
+ 装了 `dshmarket` 的界面里叫「插件市场」),点安装即可。
65
73
  桌面版请用它自带的插件管理界面安装,命令行改动不了正在运行的桌面 profile。
66
74
 
67
75
  用 `dsh` 命令行(把 `web` 换成你自己的 profile 名):
@@ -91,6 +99,7 @@ dsh plugin --profile web add "$PWD"
91
99
  | `POST /api/plugin-upgrader/job` | 提交一批升级 / 切换步骤,立即返回 job id |
92
100
  | `GET /api/plugin-upgrader/job?id=…` | 轮询进度、当前阶段、已用时、逐项结果与实时日志 |
93
101
  | `POST /api/plugin-upgrader/cancel` | 中断当前步骤(任何一次安装,包括退回老路径后的重试) |
102
+ | `GET /api/plugin-upgrader/host` | 本进程的 pid 与启动方式,供「重启 DSH」对话框说明怎么重启 |
94
103
 
95
104
  所有路由仅限本机回环访问:批量操作会安装软件包,配对设备或跨站页面一律拒绝。
96
105
 
@@ -181,6 +190,74 @@ atomic-write: timed out waiting for the writer lock at …/package.json.lock
181
190
 
182
191
  主进程重启会让正在跑的 job 中断,界面会把这种情况显示为失败而不是永远转圈。
183
192
 
193
+ ## 权限、依赖与外部服务
194
+
195
+ 这一节把插件实际用到的能力写清楚,方便审核和排障时对照,而不是让人去读源码猜。
196
+
197
+ ### 读写什么
198
+
199
+ | 能力 | 范围 | 说明 |
200
+ | --- | --- | --- |
201
+ | 文件 | **仅 profile 目录** | 读写 `package.json`、写 `package.json.upgrader-journal.json`、读 `package.json.lock`。不遍历文件系统,不碰 profile 以外的路径 |
202
+ | 网络(出站) | 配置的 npm 源、GitHub API | 只发 `GET`,见下 |
203
+ | 命令 | **无** | 不调用 `child_process`,不 spawn 任何进程;安装动作交给宿主的 `pluginManager` |
204
+ | 凭据 | **无** | 不读 token,不读 `.npmrc`,不做任何认证。私有源依赖 pnpm 自己的配置 |
205
+
206
+ 安装源的选择(`registry` / `customRegistries`)由**宿主的设置服务**写进 profile 的
207
+ `cordis.patch.yml`,不是插件自己改文件——插件只调 `configForms` 的 `set()`。
208
+
209
+ 宿主进程的环境变量只用了 `DSH_PROFILE_DIR` / `DSH_HOME` / `DSH_PROFILE` 三个来**定位 profile
210
+ 目录**(桌面壳不导出它们时,退回「当前工作目录看起来像不像一个 profile」)。它们不是密钥,但
211
+ 静态扫描器会把裸 `process.env` 记成一次「凭据」信号,这里说明清楚它的真实用途。
212
+
213
+ ### 外部服务
214
+
215
+ | 目标 | 用途 | 失败时 |
216
+ | --- | --- | --- |
217
+ | `{配置的 npm 源}/{包名}` | 拉 packument,列出已发布版本(5 分钟缓存,20 秒超时,最多 4 个并发) | 该行显示 `versionError` 和「重试」,其它行不受影响 |
218
+ | `https://registry.npmjs.org/{包名}` | 只当配置的不是官方源时,额外查一次上游,报告「镜像落后」 | 读不到就当作没有缺口 |
219
+ | `https://api.github.com/repos/{owner}/{repo}/tags?per_page=100` | 取 tag 列表,判断某个版本号能不能链到 `releases/tag/v…`(30 分钟缓存,8 秒超时) | 退到 `releases` 列表页,绝不猜一个 404 的 tag |
220
+ | `{被测试的地址}/-/ping` 与根地址 | 「注册表」对话框里点「测试」时,**并发**探测这两条,谁先 2xx 用谁(整次探测 5 秒预算) | 报最具体的原因:状态码优先,其次超时,最后网络错误原文 |
221
+ | 本机 DSH Web 服务 | `/api/plugin-upgrader/*` 自己的五个路由 | — |
222
+
223
+ 默认源是 pnpm 自己配置的那个(通常是 `.npmrc` 里的),也可以在「版本」页的「注册表」按钮里
224
+ 换成官方源、大陆镜像或自己加的源。**没有任何遥测**,不向第三方发送使用数据。
225
+
226
+ ### 依赖
227
+
228
+ 运行时**没有自带依赖**。唯一的外部模块 `@deepseek-ai/schemastery`(Config schema 用,要求
229
+ `~3.18.5`)声明在 `peerDependencies` 里,由宿主提供——DSH 桌面端把它作为自身依赖发布,
230
+ `dsh-plugin-manager` 等第一方包也依赖它,所以 profile 里一定解析得到。构建和测试需要的那一份
231
+ 放在 `devDependencies`。
232
+
233
+ `devDependencies` 其余各项(TypeScript、esbuild、`@types/*`、`@deepseek-ai/dsh-*`)只在开发和
234
+ 构建时使用,不会进入发布的 tarball 运行时。
235
+
236
+ ### 失败边界
237
+
238
+ - **一次只跑一批**:第二个提交拿 `409 busy`,界面接管正在跑的那一批,不报错。
239
+ - **job 心跳 2 秒**,15 分钟没进展判废,不会永久占位;主进程重启会中断正在跑的 job,
240
+ 界面显示为失败而不是永远转圈。
241
+ - **写入锁**:manager 自己的预算是 120 秒,超时会把锁的状态翻成人话(谁持有、要不要重启)。
242
+ - **升级失败**:in-place 替换会先把被摘掉的依赖记进 journal,失败就还原;进程被杀掉时,
243
+ 下次加载会把依赖补回去。失败了插件仍在、启用状态仍在。
244
+ - **registry 读不到 / GitHub 限流 / 离线**:都降级成「这一项读不到 + 原因 + 重试入口」,
245
+ 不会伪装成「没有新版本」「没有历史版本」。
246
+
247
+ ### DSH 兼容性
248
+
249
+ 要求 Node.js `>=20`,DSH `>=0.2.1-rc.3 <0.3.0-0`(`package.json` 的 `engines`)。
250
+ `dsh.compatibility.dshReleases` 只记录**真的跑过**的版本:
251
+
252
+ | DSH 版本 | 状态 |
253
+ | --- | --- |
254
+ | `0.2.1-rc.5` | compatible |
255
+
256
+ `0.2.1-rc.4` 和 `0.2.2-alpha.2` 虽然落在 `engines` 范围内,但没有逐一实测过,所以**不写进去**
257
+ (未声明的版本按 `unknown` 处理)。这是**来源侧的兼容声明**,不代替逐项的操作验收;
258
+ `dshOperations`(install / start / uninstall / rollback)同理,没有逐版本的实测记录就留空,
259
+ 不写 `passed`。
260
+
184
261
  ## 项目结构
185
262
 
186
263
  ```
Binary file
package/lib/client.js CHANGED
@@ -105,6 +105,20 @@ window.__ModuleLoader__.load({
105
105
  cancelling: "\u6B63\u5728\u53D6\u6D88\u2026",
106
106
  restart: "\u9700\u8981\u91CD\u542F DSH \u624D\u4F1A\u751F\u6548\u3002",
107
107
  restartHint: "\u5DF2\u4FDD\u5B58\u7684\u6539\u52A8\u5728\u4E0B\u6B21\u542F\u52A8\u65F6\u751F\u6548\u3002",
108
+ restartOpen: "\u91CD\u542F DSH",
109
+ restartTitle: "\u91CD\u542F DSH",
110
+ restartBody: "\u5DF2\u4FDD\u5B58\u7684\u6539\u52A8\u8981\u7B49 DSH \u91CD\u65B0\u542F\u52A8\u624D\u4F1A\u751F\u6548\u3002\u8FD9\u4E00\u9875\u4E0D\u80FD\u66FF\u4F60\u91CD\u542F\u5B83\u2014\u2014\u684C\u9762\u7248\u7531\u5E94\u7528\u5916\u58F3\u638C\u63E1\u91CD\u542F\uFF0C\u4ECE\u7EC8\u7AEF\u542F\u52A8\u7684\u5BBF\u4E3B\u4E5F\u6CA1\u4EBA\u66FF\u5B83\u62C9\u8D77\u3002",
111
+ restartDesktopHint: "\u5B8C\u5168\u9000\u51FA DeepSeek Harness\uFF08\u4E0D\u662F\u5173\u7A97\u53E3\uFF0C\u800C\u662F\u9000\u51FA\u5E94\u7528\uFF09\uFF0C\u518D\u91CD\u65B0\u6253\u5F00\u5B83\u3002",
112
+ restartCommandHint: "\u5728\u539F\u6765\u7684\u7EC8\u7AEF\u91CC\u505C\u6389\u5B83\uFF0C\u518D\u8FD0\u884C\u540C\u4E00\u6761\u547D\u4EE4\uFF1A",
113
+ restartCopy: "\u590D\u5236\u547D\u4EE4",
114
+ restartCopied: "\u5DF2\u590D\u5236",
115
+ restartPid: (pid, profile) => `\u5F53\u524D\u5BBF\u4E3B\u8FDB\u7A0B ${pid}\uFF0Cprofile\uFF1A${profile}`,
116
+ restartRefresh: "\u91CD\u542F\u597D\u4E86\uFF0C\u5237\u65B0\u9875\u9762",
117
+ restartWaiting: "\u6B63\u5728\u7B49\u5BBF\u4E3B\u56DE\u6765\u2026",
118
+ restartStillOld: "\u5BBF\u4E3B\u8FD8\u6CA1\u6362\u65B0\u8FDB\u7A0B\u3002\u786E\u8BA4\u65E7\u8FDB\u7A0B\u5DF2\u7ECF\u9000\u51FA\uFF0C\u518D\u8BD5\u4E00\u6B21\u3002",
119
+ restartReloadBlocked: "\u5BBF\u4E3B\u5DF2\u7ECF\u91CD\u542F\uFF0C\u4F46\u8FD9\u4E00\u9875\u7684\u63D2\u4EF6\u6E05\u5355\u8FC7\u671F\u4E86\uFF0C\u76F4\u63A5\u5237\u65B0\u4F1A\u542F\u52A8\u5931\u8D25\u3002\u8BF7\u518D\u91CD\u542F\u4E00\u6B21 DSH\u3002",
120
+ restartLoading: "\u6B63\u5728\u8BFB\u53D6\u5BBF\u4E3B\u4FE1\u606F\u2026",
121
+ restartLoadFailed: (detail) => `\u8BFB\u4E0D\u5230\u5BBF\u4E3B\u4FE1\u606F\uFF1A${detail}`,
108
122
  reloadForAppearance: "\u4E3B\u9898\u63D2\u4EF6\u5DF2\u66F4\u65B0\uFF0C\u6B63\u5728\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u4EE5\u6062\u590D\u4E3B\u9898\u5916\u89C2\uFF08\u4E3B\u9898\u914D\u7F6E\u4FDD\u5B58\u5728\u78C1\u76D8\u4E0A\uFF0C\u4E0D\u4F1A\u4E22\u5931\uFF09\u3002",
109
123
  reloadBlocked: "\u5916\u89C2\u5DF2\u6062\u590D\uFF0C\u4F46\u8FD9\u4E00\u9875\u7684\u63D2\u4EF6\u6E05\u5355\u5DF2\u7ECF\u8FC7\u671F\uFF0C\u91CD\u65B0\u52A0\u8F7D\u4F1A\u542F\u52A8\u5931\u8D25\u3002\u8BF7\u91CD\u542F DSH \u5B8C\u6210\u8FD9\u6B21\u5347\u7EA7\u3002",
110
124
  done: "\u5B8C\u6210",
@@ -224,6 +238,20 @@ window.__ModuleLoader__.load({
224
238
  cancelling: "Cancelling\u2026",
225
239
  restart: "Restart DSH to finish.",
226
240
  restartHint: "Saved changes take effect on the next start.",
241
+ restartOpen: "Restart DSH",
242
+ restartTitle: "Restart DSH",
243
+ restartBody: "The saved change only takes effect once DSH starts again. This page cannot do that for you \u2014 the desktop app keeps the restart in its own shell, and a host started from a terminal has nobody to start it again.",
244
+ restartDesktopHint: "Quit DeepSeek Harness completely (quit the app, not just the window), then open it again.",
245
+ restartCommandHint: "Stop it in the terminal it was started from, then run the same command:",
246
+ restartCopy: "Copy command",
247
+ restartCopied: "Copied",
248
+ restartPid: (pid, profile) => `Host process ${pid}, profile ${profile}`,
249
+ restartRefresh: "Restarted \u2014 reload the page",
250
+ restartWaiting: "Waiting for the host to come back\u2026",
251
+ restartStillOld: "The host has not been replaced yet. Check that the old process exited, then try again.",
252
+ restartReloadBlocked: "The host restarted, but this page's plugin list is out of date and reloading it would fail to start. Restart DSH once more.",
253
+ restartLoading: "Reading host information\u2026",
254
+ restartLoadFailed: (detail) => `Could not read host information: ${detail}`,
227
255
  reloadForAppearance: "The theme plugin was updated; reloading the page to restore its look (its settings are on disk and are not lost).",
228
256
  reloadBlocked: "The look is restored, but this page's plugin list is out of date and reloading it would fail to start. Restart DSH to finish this upgrade.",
229
257
  done: "done",
@@ -430,6 +458,10 @@ window.__ModuleLoader__.load({
430
458
  });
431
459
  return readJson(response);
432
460
  }
461
+ async function readHostInfo() {
462
+ const response = await fetch(`${API}/host`, { credentials: "same-origin" });
463
+ return readJson(response);
464
+ }
433
465
 
434
466
  // src/client/boot.ts
435
467
  function bootBatches(wire) {
@@ -774,6 +806,8 @@ window.__ModuleLoader__.load({
774
806
  .dsh-pu-banner.is-warn { border-color: var(--dsw-alias-state-warn-primary); color: var(--dsw-alias-state-warn-primary); }
775
807
  .dsh-pu-banner.is-err { border-color: var(--dsw-alias-state-error-primary); color: var(--dsw-alias-state-error-primary); }
776
808
  .dsh-pu-foot { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--dsw-alias-label-tertiary); flex-wrap: wrap; }
809
+ .dsh-pu-cmdbox { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
810
+ .dsh-pu-cmd { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--dsw-alias-border-l1); background: var(--dsw-alias-bg-layer-2); color: var(--dsw-alias-label-primary); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; user-select: all; }
777
811
  .dsh-pu-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--dsw-alias-border-l2); border-top-color: var(--dsw-alias-brand-primary); animation: dsh-pu-spin .8s linear infinite; flex: none; }
778
812
  @keyframes dsh-pu-spin { to { transform: rotate(360deg); } }
779
813
  @media (prefers-reduced-motion: reduce) { .dsh-pu-spin { animation-duration: 2.4s; } .dsh-pu-bar-inner.is-busy { animation-duration: 3s; } }
@@ -1102,6 +1136,151 @@ window.__ModuleLoader__.load({
1102
1136
  );
1103
1137
  }
1104
1138
 
1139
+ // src/client/components/RestartDialog.ts
1140
+ var PROBE_MS = 1e3;
1141
+ var WAIT_LIMIT_MS = 12e4;
1142
+ function RestartDialog(props) {
1143
+ const { t, onClose } = props;
1144
+ const h = getH();
1145
+ const React = getReact();
1146
+ const [host, setHost] = React.useState(void 0);
1147
+ const [phase, setPhase] = React.useState("loading");
1148
+ const [problem, setProblem] = React.useState("");
1149
+ const [copied, setCopied] = React.useState(false);
1150
+ const timerRef = React.useRef(void 0);
1151
+ React.useEffect(() => {
1152
+ let live = true;
1153
+ void readHostInfo().then((info) => {
1154
+ if (!live) return;
1155
+ setHost(info);
1156
+ setPhase("ready");
1157
+ }).catch((error) => {
1158
+ if (!live) return;
1159
+ setProblem(error instanceof Error ? error.message : String(error));
1160
+ setPhase("failed");
1161
+ });
1162
+ return () => {
1163
+ live = false;
1164
+ };
1165
+ }, []);
1166
+ const stop = React.useCallback(() => {
1167
+ const timer = timerRef.current;
1168
+ if (timer === void 0) return;
1169
+ timerRef.current = void 0;
1170
+ window.clearInterval(timer);
1171
+ }, []);
1172
+ React.useEffect(() => stop, [stop]);
1173
+ const waitForRestart = React.useCallback(() => {
1174
+ const before = host?.pid;
1175
+ if (before === void 0) return;
1176
+ setPhase("waiting");
1177
+ const startedAt = Date.now();
1178
+ const timer = window.setInterval(() => {
1179
+ void readHostInfo().then((info) => {
1180
+ if (info.pid === before) {
1181
+ if (Date.now() - startedAt > WAIT_LIMIT_MS) {
1182
+ stop();
1183
+ setPhase("stalled");
1184
+ }
1185
+ return;
1186
+ }
1187
+ stop();
1188
+ let blocked = false;
1189
+ void reloadWhenBootDocumentFresh({
1190
+ onBlocked: () => {
1191
+ blocked = true;
1192
+ setProblem(t("restartReloadBlocked"));
1193
+ setPhase("stalled");
1194
+ }
1195
+ }).then((done) => {
1196
+ if (!done && !blocked) setPhase("stalled");
1197
+ });
1198
+ }).catch(() => {
1199
+ });
1200
+ }, PROBE_MS);
1201
+ timerRef.current = timer;
1202
+ }, [host?.pid, stop, t]);
1203
+ const copy = React.useCallback(() => {
1204
+ const command = host?.command ?? "";
1205
+ if (command === "") return;
1206
+ void navigator.clipboard?.writeText(command).then(() => {
1207
+ setCopied(true);
1208
+ }).catch(() => {
1209
+ });
1210
+ }, [host?.command]);
1211
+ React.useEffect(() => {
1212
+ const onKey = (event) => {
1213
+ if (event.key === "Escape") onClose();
1214
+ };
1215
+ document.addEventListener("keydown", onKey);
1216
+ return () => {
1217
+ document.removeEventListener("keydown", onKey);
1218
+ };
1219
+ }, [onClose]);
1220
+ const desktop = host?.kind === "desktop";
1221
+ return h(
1222
+ "div",
1223
+ { className: "dsh-pu-modal" },
1224
+ h("div", { className: "dsh-pu-modal-backdrop", onClick: onClose, "aria-hidden": "true" }),
1225
+ h(
1226
+ "div",
1227
+ {
1228
+ className: "dsh-pu-modal-body",
1229
+ role: "dialog",
1230
+ "aria-modal": "true",
1231
+ "aria-label": t("restartTitle")
1232
+ },
1233
+ h(
1234
+ "div",
1235
+ { className: "dsh-pu-modal-head" },
1236
+ h("span", { className: "dsh-pu-modal-title" }, t("restartTitle")),
1237
+ h("button", { type: "button", className: "dsh-pu-btn is-ghost is-tiny", onClick: onClose }, "\u2715")
1238
+ ),
1239
+ h("p", { className: "dsh-pu-modal-sub" }, t("restartBody")),
1240
+ phase === "loading" ? h("p", { className: "dsh-pu-hint" }, t("restartLoading")) : null,
1241
+ phase === "failed" ? h("p", { className: "dsh-pu-hint" }, t("restartLoadFailed", problem)) : null,
1242
+ desktop ? h("p", { className: "dsh-pu-hint" }, t("restartDesktopHint")) : host === void 0 ? null : h(
1243
+ "div",
1244
+ { className: "dsh-pu-cmdbox" },
1245
+ h("p", { className: "dsh-pu-hint" }, t("restartCommandHint")),
1246
+ h("code", { className: "dsh-pu-cmd" }, host.command),
1247
+ h(
1248
+ "button",
1249
+ {
1250
+ type: "button",
1251
+ className: "dsh-pu-btn is-tiny",
1252
+ onClick: copy,
1253
+ disabled: host.command === ""
1254
+ },
1255
+ copied ? t("restartCopied") : t("restartCopy")
1256
+ )
1257
+ ),
1258
+ host === void 0 ? null : h("p", { className: "dsh-pu-hint" }, t("restartPid", host.pid, host.profileName ?? "\u2014")),
1259
+ phase === "waiting" ? h("p", { className: "dsh-pu-hint" }, t("restartWaiting")) : null,
1260
+ phase === "stalled" ? h("p", { className: "dsh-pu-hint" }, t("restartStillOld")) : null,
1261
+ h(
1262
+ "div",
1263
+ { className: "dsh-pu-src-foot" },
1264
+ h(
1265
+ "button",
1266
+ {
1267
+ type: "button",
1268
+ className: "dsh-pu-btn is-primary is-tiny",
1269
+ onClick: waitForRestart,
1270
+ disabled: host === void 0 || phase === "waiting"
1271
+ },
1272
+ phase === "waiting" ? t("restartWaiting") : t("restartRefresh")
1273
+ ),
1274
+ h(
1275
+ "button",
1276
+ { type: "button", className: "dsh-pu-btn is-ghost is-tiny", onClick: onClose },
1277
+ t("sourcesClose")
1278
+ )
1279
+ )
1280
+ )
1281
+ );
1282
+ }
1283
+
1105
1284
  // src/client/components/SourceDialog.ts
1106
1285
  function RegistrySourceButton(props) {
1107
1286
  const h = getH();
@@ -1578,6 +1757,8 @@ window.__ModuleLoader__.load({
1578
1757
  const [busyName, setBusyName] = React.useState(void 0);
1579
1758
  const [cancelling, setCancelling] = React.useState(false);
1580
1759
  const [banner, setBanner] = React.useState(void 0);
1760
+ const [restartOpen, setRestartOpen] = React.useState(false);
1761
+ const [restartPending, setRestartPending] = React.useState(false);
1581
1762
  const alive = useAlive();
1582
1763
  const watch = React.useCallback(
1583
1764
  async (id) => {
@@ -1585,6 +1766,7 @@ window.__ModuleLoader__.load({
1585
1766
  if (!alive.current) return settled;
1586
1767
  setBusyName(void 0);
1587
1768
  setCancelling(false);
1769
+ setRestartPending(false);
1588
1770
  reload(false);
1589
1771
  if (settled === void 0) {
1590
1772
  setJob(void 0);
@@ -1602,12 +1784,15 @@ window.__ModuleLoader__.load({
1602
1784
  });
1603
1785
  } else if (settled?.results?.some((result) => result.application === "restart-required") === true) {
1604
1786
  setBanner({ tone: "warn", text: t("restart") });
1787
+ setRestartPending(true);
1605
1788
  } else if (replacedAppearance(settled?.results)) {
1606
1789
  setBanner({ tone: "info", text: t("reloadForAppearance") });
1607
1790
  window.setTimeout(() => {
1608
1791
  void reloadWhenBootDocumentFresh({
1609
1792
  onBlocked: () => {
1610
- if (alive.current) setBanner({ tone: "warn", text: t("reloadBlocked") });
1793
+ if (!alive.current) return;
1794
+ setBanner({ tone: "warn", text: t("reloadBlocked") });
1795
+ setRestartPending(true);
1611
1796
  }
1612
1797
  });
1613
1798
  }, APPEARANCE_RELOAD_DELAY_MS);
@@ -1630,6 +1815,7 @@ window.__ModuleLoader__.load({
1630
1815
  async (steps, label) => {
1631
1816
  if (steps.length === 0) return;
1632
1817
  setBanner(void 0);
1818
+ setRestartPending(false);
1633
1819
  setBusyName(label);
1634
1820
  setJob({ id: "", status: "queued", total: steps.length, done: 0, failed: 0, log: [] });
1635
1821
  const outcome = await submitJob(steps, watch);
@@ -1685,6 +1871,7 @@ window.__ModuleLoader__.load({
1685
1871
  return;
1686
1872
  }
1687
1873
  setBanner(void 0);
1874
+ setRestartPending(false);
1688
1875
  install({ spec: `${row.name}@${version}`, title: row.title, version });
1689
1876
  },
1690
1877
  [props.install, t]
@@ -1788,12 +1975,29 @@ window.__ModuleLoader__.load({
1788
1975
  },
1789
1976
  h("span", null, banner.text),
1790
1977
  banner.tone === "warn" ? h("span", null, t("restartHint")) : null,
1978
+ /**
1979
+ * The restart button belongs to the restart banner only. A `warn`
1980
+ * banner is also raised for "the reload was stopped" and for "this
1981
+ * page has no install entry", and offering a restart for those would
1982
+ * be advice that does not apply — so the flag set by the result
1983
+ * decides, not the tone.
1984
+ */
1985
+ restartPending ? h(
1986
+ "button",
1987
+ {
1988
+ type: "button",
1989
+ className: "dsh-pu-btn is-tiny",
1990
+ onClick: () => setRestartOpen(true)
1991
+ },
1992
+ t("restartOpen")
1993
+ ) : null,
1791
1994
  h(
1792
1995
  "button",
1793
1996
  { type: "button", className: "dsh-pu-btn is-ghost is-tiny", onClick: () => setBanner(void 0) },
1794
1997
  "\u2715"
1795
1998
  )
1796
1999
  ),
2000
+ restartOpen ? h(RestartDialog, { t, onClose: () => setRestartOpen(false) }) : null,
1797
2001
  job === void 0 ? null : h(JobPanel, { job, t, onCancel: cancel, cancelling }),
1798
2002
  rows.length === 0 ? null : h(
1799
2003
  "div",
@@ -0,0 +1,82 @@
1
+ /**
2
+ * How this host was started, in terms a person can act on.
3
+ *
4
+ * A change the manager reports as `restart-required` can only be finished by
5
+ * restarting the process that refused it, and nothing here can do that to
6
+ * itself: the desktop shell exposes no relaunch channel to a page, and a host
7
+ * started from a terminal has nobody to start it again. What the page *can* do
8
+ * is name the one action that finishes the job, and for that it needs two
9
+ * facts that only the host process has — whether it was started by the desktop
10
+ * app or by a command line, and what that command line was.
11
+ *
12
+ * `pid` is the load-bearing half of the answer. Every other field describes the
13
+ * profile, which survives a restart untouched; the pid is the only value that
14
+ * tells a polling page whether the host answering it is still the old one.
15
+ *
16
+ * @module dsh-plugin-upgrader/host/hostinfo
17
+ */
18
+ /**
19
+ * Who started this process.
20
+ *
21
+ * `desktop` means the Electron shell owns the lifecycle and the user finishes
22
+ * the restart by quitting and reopening the app; `cli` means the host *is* the
23
+ * terminal command and the user finishes it by running that command again.
24
+ */
25
+ export type HostKind = 'desktop' | 'cli';
26
+ /** What `/api/plugin-upgrader/host` answers with. */
27
+ export interface HostInfo {
28
+ /** The process id; a restart is the only thing that changes it. */
29
+ pid: number;
30
+ /** When this process started, in the same clock as `Date.now()`. */
31
+ startedAt: number;
32
+ kind: HostKind;
33
+ /** The profile directory's last path segment, for display only. */
34
+ profileName: string | null;
35
+ /** The profile directory this host opened, when it could be resolved. */
36
+ profileDir: string | null;
37
+ /** A command line that starts this same host again; empty for `desktop`. */
38
+ command: string;
39
+ }
40
+ /**
41
+ * Decide who owns this process's lifecycle from its entry point.
42
+ *
43
+ * The check is on the entry script rather than on an environment variable
44
+ * because the entry script is what the shell actually executes: the desktop
45
+ * shell runs `dsh-desktop-host/lib/index.js` and nothing else in this install
46
+ * runs from that path.
47
+ *
48
+ * @param entry - `process.argv[1]`, possibly absent.
49
+ * @returns which kind of start this was.
50
+ */
51
+ export declare function hostKindOf(entry: string): HostKind;
52
+ /**
53
+ * Rebuild the command that started this process.
54
+ *
55
+ * The desktop shell is deliberately answered with an empty string: its host is
56
+ * a child of the app, and replaying the child's own command line would start a
57
+ * second host holding the same profile. The instruction that actually works
58
+ * there is "quit the app and open it again", which the page writes itself.
59
+ *
60
+ * @param execPath - `process.execPath`.
61
+ * @param argv - `process.argv`.
62
+ * @param kind - who owns the lifecycle.
63
+ * @returns the command line, or an empty string when there is none to give.
64
+ */
65
+ export declare function relaunchCommand(execPath: string, argv: readonly string[], kind: HostKind): string;
66
+ /**
67
+ * Assemble the answer for one host process.
68
+ *
69
+ * Pure on purpose: the pid, the start time and the profile directory are all
70
+ * inputs, so the shape can be tested without a host.
71
+ *
72
+ * @param input - the facts the process has about itself.
73
+ * @returns what the page may show.
74
+ */
75
+ export declare function buildHostInfo(input: {
76
+ pid: number;
77
+ startedAt: number;
78
+ execPath: string;
79
+ argv: readonly string[];
80
+ profileDir: string | null;
81
+ }): HostInfo;
82
+ //# sourceMappingURL=hostinfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hostinfo.d.ts","sourceRoot":"","sources":["../../src/host/hostinfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAA;AAExC,qDAAqD;AACrD,MAAM,WAAW,QAAQ;IACvB,mEAAmE;IACnE,GAAG,EAAE,MAAM,CAAA;IACX,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mEAAmE;IACnE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,yEAAyE;IACzE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAA;CAChB;AAKD;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAElD;AAeD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,CAIjG;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,GAAG,QAAQ,CAkBX"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * How this host was started, in terms a person can act on.
3
+ *
4
+ * A change the manager reports as `restart-required` can only be finished by
5
+ * restarting the process that refused it, and nothing here can do that to
6
+ * itself: the desktop shell exposes no relaunch channel to a page, and a host
7
+ * started from a terminal has nobody to start it again. What the page *can* do
8
+ * is name the one action that finishes the job, and for that it needs two
9
+ * facts that only the host process has — whether it was started by the desktop
10
+ * app or by a command line, and what that command line was.
11
+ *
12
+ * `pid` is the load-bearing half of the answer. Every other field describes the
13
+ * profile, which survives a restart untouched; the pid is the only value that
14
+ * tells a polling page whether the host answering it is still the old one.
15
+ *
16
+ * @module dsh-plugin-upgrader/host/hostinfo
17
+ */
18
+ /** The entry point the desktop shell spawns for its host child process. */
19
+ const DESKTOP_ENTRY = /[\\/]dsh-desktop-host[\\/]lib[\\/]index\.js$/i;
20
+ /**
21
+ * Decide who owns this process's lifecycle from its entry point.
22
+ *
23
+ * The check is on the entry script rather than on an environment variable
24
+ * because the entry script is what the shell actually executes: the desktop
25
+ * shell runs `dsh-desktop-host/lib/index.js` and nothing else in this install
26
+ * runs from that path.
27
+ *
28
+ * @param entry - `process.argv[1]`, possibly absent.
29
+ * @returns which kind of start this was.
30
+ */
31
+ export function hostKindOf(entry) {
32
+ return DESKTOP_ENTRY.test(entry) ? 'desktop' : 'cli';
33
+ }
34
+ /**
35
+ * Quote one argument for the platform's shell.
36
+ *
37
+ * Only the case a person can paste is handled: an argument with whitespace is
38
+ * wrapped in double quotes, which both `cmd.exe` and POSIX shells accept.
39
+ *
40
+ * @param argument - one raw argv entry.
41
+ * @returns the entry as it would be typed.
42
+ */
43
+ function quoted(argument) {
44
+ return /\s/.test(argument) ? `"${argument}"` : argument;
45
+ }
46
+ /**
47
+ * Rebuild the command that started this process.
48
+ *
49
+ * The desktop shell is deliberately answered with an empty string: its host is
50
+ * a child of the app, and replaying the child's own command line would start a
51
+ * second host holding the same profile. The instruction that actually works
52
+ * there is "quit the app and open it again", which the page writes itself.
53
+ *
54
+ * @param execPath - `process.execPath`.
55
+ * @param argv - `process.argv`.
56
+ * @param kind - who owns the lifecycle.
57
+ * @returns the command line, or an empty string when there is none to give.
58
+ */
59
+ export function relaunchCommand(execPath, argv, kind) {
60
+ if (kind === 'desktop')
61
+ return '';
62
+ const rest = argv.slice(1).map(quoted).join(' ');
63
+ return rest === '' ? quoted(execPath) : `${quoted(execPath)} ${rest}`;
64
+ }
65
+ /**
66
+ * Assemble the answer for one host process.
67
+ *
68
+ * Pure on purpose: the pid, the start time and the profile directory are all
69
+ * inputs, so the shape can be tested without a host.
70
+ *
71
+ * @param input - the facts the process has about itself.
72
+ * @returns what the page may show.
73
+ */
74
+ export function buildHostInfo(input) {
75
+ const kind = hostKindOf(input.argv[1] ?? '');
76
+ const profileDir = input.profileDir;
77
+ const profileName = profileDir === null
78
+ ? null
79
+ : (profileDir
80
+ .split(/[\\/]/)
81
+ .filter((segment) => segment !== '')
82
+ .at(-1) ?? null);
83
+ return {
84
+ pid: input.pid,
85
+ startedAt: input.startedAt,
86
+ kind,
87
+ profileName,
88
+ profileDir,
89
+ command: relaunchCommand(input.execPath, input.argv, kind),
90
+ };
91
+ }
92
+ //# sourceMappingURL=hostinfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hostinfo.js","sourceRoot":"","sources":["../../src/host/hostinfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA0BH,2EAA2E;AAC3E,MAAM,aAAa,GAAG,+CAA+C,CAAA;AAErE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAA;AACtD,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,MAAM,CAAC,QAAgB;IAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAA;AACzD,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,IAAuB,EAAE,IAAc;IACvF,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,EAAE,CAAA;IACjC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAChD,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAA;AACvE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,KAM7B;IACC,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;IACnC,MAAM,WAAW,GACf,UAAU,KAAK,IAAI;QACjB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,UAAU;aACR,KAAK,CAAC,OAAO,CAAC;aACd,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC;aACnC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAA;IACxB,OAAO;QACL,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,IAAI;QACJ,WAAW;QACX,UAAU;QACV,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;KAC3D,CAAA;AACH,CAAC"}
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * The overview payload the Versions tab renders.
3
3
  *
4
- * One request answers everything the tab needs 鈥?installed bundles, their
5
- * published versions, which of them are upgradable 鈥?because a per-bundle
4
+ * One request answers everything the tab needs — installed bundles, their
5
+ * published versions, which of them are upgradable — because a per-bundle
6
6
  * request would turn one page open into a dozen round trips.
7
7
  *
8
8
  * @module dsh-plugin-upgrader/lib/overview
@@ -19,7 +19,7 @@ const INLINE_ICON_LIMIT = 2048;
19
19
  * The first version of this used `Promise.all`, which fired every package
20
20
  * lookup at the mirror simultaneously. Eleven concurrent connections to
21
21
  * `registry.npmmirror.com` timed out, while the same eleven asked one at a time
22
- * answered in under 1.2 s 鈥?and each timeout rendered as a plugin with no
22
+ * answered in under 1.2 s — and each timeout rendered as a plugin with no
23
23
  * version history. The cap is what keeps one page load from becoming a burst.
24
24
  *
25
25
  * @param items - the work items.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAOrE,OAAO,EAEL,KAAK,WAAW,EAMjB,MAAM,mBAAmB,CAAA;AAE1B;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,kEAAkE;AAClE,eAAO,MAAM,IAAI,oBAAoB,CAAA;AAErC,gFAAgF;AAChF,eAAO,MAAM,MAAM,UAAgB,CAAA;AAgGnC;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAscrE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAQrE,OAAO,EAEL,KAAK,WAAW,EAMjB,MAAM,mBAAmB,CAAA;AAE1B;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,kEAAkE;AAClE,eAAO,MAAM,IAAI,oBAAoB,CAAA;AAErC,gFAAgF;AAChF,eAAO,MAAM,MAAM,UAAgB,CAAA;AAgGnC;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CA2drE"}
package/lib/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { savedRegistry } from './host/config.js';
2
2
  import { writeJson, isLoopbackRequest, readJsonBody } from './host/http.js';
3
+ import { buildHostInfo } from './host/hostinfo.js';
3
4
  import { buildOverview } from './host/overview.js';
4
5
  import { runStep, validateStep } from './host/install.js';
5
6
  import { profileDirFrom, recoverPendingDrop } from './host/manifest.js';
@@ -356,6 +357,23 @@ export function apply(ctx, config) {
356
357
  writeJson(res, 200, { status: 'cancelling' });
357
358
  return;
358
359
  }
360
+ if (req.method === 'GET' && route === 'host') {
361
+ /*
362
+ * The pid is answered fresh on every call, never cached: a page that
363
+ * polls this after telling the user to restart is comparing the pid it
364
+ * saw before against the one answering now, and a cached value would
365
+ * make a real restart look like a hang.
366
+ */
367
+ const startedAt = Date.now() - Math.round(process.uptime() * 1000);
368
+ writeJson(res, 200, buildHostInfo({
369
+ pid: process.pid,
370
+ startedAt,
371
+ execPath: process.execPath,
372
+ argv: process.argv,
373
+ profileDir: profileDirFrom() ?? null,
374
+ }));
375
+ return;
376
+ }
359
377
  if (req.method === 'POST' && route === 'registry/test') {
360
378
  const body = await readJsonBody(req);
361
379
  const address = typeof body?.registry === 'string' ? body.registry.trim() : '';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,aAAa,EAAuB,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAoB,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvE,OAAO,EAAE,SAAS,EAAc,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EACL,eAAe,GAOhB,MAAM,mBAAmB,CAAA;AAE1B;;;;;;GAMG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,kEAAkE;AAClE,MAAM,CAAC,MAAM,IAAI,GAAG,iBAAiB,CAAA;AAErC,gFAAgF;AAChF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,WAAW,CAAC,CAAA;AAEnC;;;;GAIG;AACH,MAAM,UA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EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,EAC3E,yBAAyB,CAC1B,CAAA;IAED;;;;;;;;;OASG;IACH,MAAM,GAAG,GAAG,cAAc,EAAE,CAAA;IAC5B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAA;YACxC,IAAI,QAAQ,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;gBACjC,OAAO,CAAC,IAAI,CACV,iDAAiD,QAAQ,CAAC,IAAI,gCAAgC;oBAC5F,kBAAkB,QAAQ,CAAC,IAAI,+BAA+B,CACjE,CAAA;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,uEAAuE;YACvE,qEAAqE;YACrE,OAAO,CAAC,IAAI,CACV,8DAA8D,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACvH,CAAA;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-upgrader",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "One-click upgrades, version history and rollback for plugins on the DeepSeek Harness Plugins page",
5
5
  "keywords": [
6
6
  "dsh",
@@ -38,6 +38,7 @@
38
38
  "lib/**/*.map",
39
39
  "locale/*.json",
40
40
  "assets/icon.svg",
41
+ "assets/icon-180.png",
41
42
  "cordis.patch.yml",
42
43
  "README.md",
43
44
  "README.en.md",
@@ -62,6 +63,11 @@
62
63
  "@deepseek-ai/dsh-client-locale",
63
64
  "@deepseek-ai/dsh-client-ui-settings"
64
65
  ]
66
+ },
67
+ "compatibility": {
68
+ "dshReleases": {
69
+ "0.2.1-rc.5": "compatible"
70
+ }
65
71
  }
66
72
  },
67
73
  "devDependencies": {
@@ -70,12 +76,13 @@
70
76
  "@deepseek-ai/dsh-client-ui-slots": "^0.2.1-rc.2",
71
77
  "@deepseek-ai/dsh-host-webserver": "^0.2.1-rc.2",
72
78
  "@deepseek-ai/dsh-plugin-manager": "^0.2.1-rc.2",
79
+ "@deepseek-ai/schemastery": "~3.18.5",
73
80
  "@types/node": "^26.6.5",
74
81
  "@types/react": "^19.3.0",
75
82
  "esbuild": "^0.28.2",
76
83
  "typescript": "^7.0.2"
77
84
  },
78
- "dependencies": {
85
+ "peerDependencies": {
79
86
  "@deepseek-ai/schemastery": "~3.18.5"
80
87
  },
81
88
  "scripts": {