dsh-autorestart 0.8.3 → 0.8.4

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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.4 — 2026-10-29
4
+
5
+ **只改文档与版本号,行为没有变化。**
6
+
7
+ ### 文档
8
+
9
+ - **README(英)/ docs/README.zh.md 补齐 0.8.3 的真实界面行为**(npm 页面上原来还是 0.8.2 时代的旧描述):
10
+ - 重启阶段显示在**主界面居中浮层**(centered overlay card),**只排队等空闲时不出现**,只在真的备份 / 重启时出现,回来显示 1.5 秒后消失;
11
+ - 胶囊只有**一句短话**(≤12 字),长句降级为 tooltip,详情在点开的面板里;
12
+ - 备份进度是**真进度**(MB + 百分比),单位自适应(`92 KB` / `156 MB`),**备份快就一闪而过、不人为拉长**;
13
+ - 设置改动有回执:保存成功后**设置在面板内部顶部**(面板自己的 sticky 条)显示绿色「已生效 / Saved」+ 时间,3 秒淡出;失败红色「没保存成功 / Not saved」并保留宿主给的原因;
14
+ - 备份列表改成两行:`备份时间 / Backup time 2026-10-29 22:08`、`备份大小 / Backup size 156 MB(含已装插件 / plugins included)`,**不显示时区偏移**。
15
+ - 槽位表补上 `shell.overlay` 里的重启阶段浮层,并说明保存回执渲染在设置面板内部(不占窗口级浮层)。
16
+
17
+ ### 版本号
18
+
19
+ - `package.json` 与 `index.js` 的 `PLUGIN_VERSION_FALLBACK` 同步到 **0.8.4**,两份 README 的「当前版本」同步。
20
+
3
21
  ## 0.8.3 — 2026-10-29
4
22
 
5
23
  **重启阶段搬到界面正中:不再挤在输入框那一行被截断,靠数字说话,也不是常驻。**
package/README.md CHANGED
@@ -36,11 +36,13 @@ round starts, so the session goes idle and the restart can proceed. The goal is
36
36
  restart and continues.
37
37
 
38
38
  The browser shows the state: a compact "pending restart" pill on the left side of the input toolbar
39
- and a small dot next to the session title in the sidebar. The pill's text reports how many
40
- **conversations** are still in the way (`待重启 · 等待 2 个会话` / `pending restart · waiting for 2
41
- session(s)`) — a conversation and its own subagents count as one, and the tooltip explains that
42
- queued-but-not-started work counts too; it does not open a details panel. The
43
- dot breathes when the restart is about to fire.
39
+ and a small dot next to the session title in the sidebar. The pill carries ONE short line (12
40
+ characters at most: `待重启 · 等待 2 个会话` / `pending restart · waiting for 2 session(s)`) — a
41
+ conversation and its own subagents count as one. Everything else lives one layer deeper: the long
42
+ sentence is the tooltip, the count and the way out are in the floating panel the pill opens, and the
43
+ **stage** of a real restart (backing up / restarting / back) is shown on a **centered overlay card in
44
+ the middle of the shell** — never in the composer row, where a longer sentence used to be cut off.
45
+ The dot breathes when the restart is about to fire.
44
46
 
45
47
  Every blocker says **what it is**: a conversation is named by its own title, and a **subagent** is
46
48
  named after the conversation that created it ("Subagent of *that* conversation"). A raw session id is
@@ -183,7 +185,7 @@ what it adds before you install it.
183
185
  | --- | --- |
184
186
  | Agent tools (6) | `continuum_restart`, `continuum_status`, `continuum_cancel_restart`, `continuum_park_goal`, `continuum_recover_now`, `continuum_handoff` |
185
187
  | HTTP routes (7) | Under `<healthPath>` (default `/__dsh_autorestart`): `GET /health` (also `?state=1`, `?gate=1`, `?probeIndex=1`), `POST /park`, `POST /recover`, `POST /handoff`, `GET /sleep` and `POST /sleep` (the graceful shutdown — the desktop client and the hosted web client drive the very same route), `GET /announcements` and `POST /announcements` (the one-time new-feature announcement). Loopback or an authenticated browser only |
186
- | Client slots (6) | `conversation.input.left` — the pending-restart pill (`autorestart-restart-pill`); `sidebar.session.row.leading` — the session status dot (`autorestart-restart-dot`); `conversation.input.dock` — the one-time install question (`autorestart-backup-choice`) and the one-time new-feature announcement (`autorestart-feature-announcement`); `sidebar.footer.action` — the moon button of the graceful shutdown (`autorestart-sleep-button`); `shell.overlay` — its countdown card; `settings.section` — the section "Auto-restart & shut down" in the settings page (`dsh-autorestart`) |
188
+ | Client slots (6) | `conversation.input.left` — the pending-restart pill (`autorestart-restart-pill`); `sidebar.session.row.leading` — the session status dot (`autorestart-restart-dot`); `conversation.input.dock` — the one-time install question (`autorestart-backup-choice`) and the one-time new-feature announcement (`autorestart-feature-announcement`); `sidebar.footer.action` — the moon button of the graceful shutdown (`autorestart-sleep-button`); `shell.overlay` — the shutdown countdown card and the **centered restart-stage overlay** (`autorestart-sleep-overlay`, `autorestart-restart-overlay`); `settings.section` — the section "Auto-restart & shut down" in the settings page (`dsh-autorestart`), which also carries the save receipt inside the panel itself (no overlay slot of its own) |
187
189
  | System prompt | One "Restart policy" section that tells the agent how to ask for a restart and what the plugin will do |
188
190
  | Harness hooks | `agent/status` (tracks which conversations are busy), `tools/pre-execute` (blocks a shell command that would kill or relaunch DSH by hand), and the boot pass that resumes interrupted sessions |
189
191
  | Profile row | One bundle row, `dsh-autorestart` |
@@ -199,7 +201,7 @@ what it adds before you install it.
199
201
 
200
202
  ## Install
201
203
 
202
- Current version: **0.8.3**.
204
+ Current version: **0.8.4**.
203
205
 
204
206
  From npm — the package is published under the name `dsh-autorestart`:
205
207
 
@@ -268,9 +270,12 @@ The tool reports what happened: `cancelled` (whether the restart request itself
268
270
 
269
271
  ### The capsule: click it for the details and for the way out
270
272
 
271
- The capsule in the composer row is 22px high and ONE line wide, so it carries numbers only
272
- (`待重启 · 已等 16 分钟 · 3 项任务在跑`) — never a name and never a hint. Clicking it (or pressing
273
- Enter/Space on it) opens a small panel above it:
273
+ The capsule in the composer row is 22px high and ONE line wide, so it carries ONE short line and
274
+ nothing else (`待重启 · 空闲后自动重启` / `待重启 · 等待 2 个会话`, 12 characters at most — never a
275
+ name and never a long sentence, because that is exactly what got cut off before). The details live
276
+ one layer down: the long sentence is the tooltip, the **stage** (backing up / restarting / back) is on
277
+ the **centered overlay card in the middle of the shell**, and the count with the way out is in the
278
+ panel below. Clicking it (or pressing Enter/Space on it) opens a small panel above it:
274
279
 
275
280
  - how many conversations the restart is waiting for (the same number the capsule shows);
276
281
  - how many OTHER sessions wait for the same restart;
@@ -292,9 +297,28 @@ Two blocks of the settings page are worth a word, because they show facts instea
292
297
 
293
298
  - **What is backed up right now** (right under the two backup switches): the HOST reads
294
299
  `<DSH_HOME>/storages/dsh-autorestart/backups/`, so the number of copies, the **local time** of each
295
- one, its size (MB), whether the installed plugins are in it and where it lives are all real. Only
300
+ one, its size, whether the installed plugins are in it and where it lives are all real. Only
296
301
  the directory metadata is read — the contents are never walked (one copy can be 150 MB). With no
297
302
  backup at all it says: "No backup yet; one is written before every restart."
303
+ Every copy is **two labelled rows**, so nothing runs into anything else:
304
+
305
+ ```
306
+ Backup time 2026-10-29 22:08
307
+ Backup size 156 MB (plugins included)
308
+ ```
309
+
310
+ The time is the local clock of the machine that took the copy, **to the minute and with no
311
+ timezone offset** (a `+08:00` only adds noise — the reader is looking at their own clock). The
312
+ size picks its own unit (`92 KB` / `156 MB`), keeps the tenth only when it says something
313
+ (`117.7 MB`, never `156.0 MB`), and the plugin scope sits in brackets right after it, because it
314
+ is the reason the copy is that big. Two copies are two groups with air between them.
315
+ - **A setting that was saved says so.** Every control writes itself the moment it is changed, so the
316
+ panel has to say whether the write landed: once the HOST answers `ok: true`, a green strip at the
317
+ **top of the settings panel itself** (inside the panel — a `sticky` row, so it stays visible while
318
+ the page scrolls) says **`已生效` / `Saved`** with the time (`Saved 21:40:12`) and fades after 3
319
+ seconds. A refused write says **`没保存成功` / `Not saved`** in red, with the reason the Host gave,
320
+ and it stays until the next change works or you close it. Nothing is ever announced before the
321
+ Host's answer arrived — rendering the page, polling it and clicking a control stay silent.
298
322
  - **How this host was started** (hosted web only): one plain line ("How I remember you were started:
299
323
  by your own script (the restart is its job — I stay out of it)") plus two small actions (detect
300
324
  again / undo); the command itself is folded away under **"Technical details"** and stays closed
@@ -416,10 +440,10 @@ with its plugins is ~150 MB). The button looked dead. It is not — and now it s
416
440
 
417
441
  | Stage | What the interface shows | Where the data comes from |
418
442
  |---|---|---|
419
- | `waiting` | "Waiting for every conversation to be idle…" (+ how many are busy) | the idle gate's blockers |
420
- | `snapshotting` | The centred card: "Backing up before DSH restart" + a real progress bar, "12.3 MB / 40 MB" and a percentage; the settings page and the tooltip keep the long line, in the same words ("Backing up before DSH restart (about 12s, 78 MB done)…"). The card has NO minimum shown time: it lives exactly as long as the Host reports the stage (a 92 KB copy is gone in about 5 ms, a slow one stays as long as it runs); the size picks its own unit (KB or MB) so a small backup never reads "0 MB" | the REAL copy loop: files and bytes written, measured total |
443
+ | `waiting` | Nothing on the overlay — the **centered overlay card does not appear at all** while the gate only waits (no backup is running, nothing happens but waiting). The capsule says it in one short line ("pending restart · waiting for N sessions"). | the idle gate's blockers |
444
+ | `snapshotting` | The **centered overlay card in the middle of the shell**: "Backing up before DSH restart" + a real progress bar, "12.3 MB / 40 MB" and a percentage; the settings page and the tooltip keep the long line, in the same words ("Backing up before DSH restart (about 12s, 78 MB done)…"). The card has NO minimum shown time: it lives exactly as long as the Host reports the stage (a 92 KB copy is gone in about 5 ms, a slow one stays as long as it runs); the size picks its own unit (`92 KB` / `156 MB`) so a small backup never reads "0 MB" | the REAL copy loop: files and bytes written, measured total |
421
445
  | `restarting` | "Restarting; the work continues by itself in a moment…" | the host is on its way out |
422
- | `back` | "Back — carrying on where we left off" | the new host, once it boots |
446
+ | `back` | "Back — carrying on where we left off", for **1.5 seconds**, then the card is gone | the new host, once it boots |
423
447
 
424
448
  Three things make this honest rather than decorative:
425
449
 
package/docs/README.zh.md CHANGED
@@ -133,7 +133,7 @@ session resume on boot, durable-goal re-arm, and an agent-callable idle-aware gr
133
133
  | --- | --- |
134
134
  | Agent 工具(6 个) | `continuum_restart`、`continuum_status`、`continuum_cancel_restart`、`continuum_park_goal`、`continuum_recover_now`、`continuum_handoff` |
135
135
  | HTTP 路由(7 条) | `<healthPath>`(默认 `/__dsh_autorestart`)下的 `GET /health`(另有 `?state=1`、`?gate=1`、`?probeIndex=1`)、`POST /park`、`POST /recover`、`POST /handoff`、`GET /sleep`、`POST /sleep`(收工关机——桌面端和 web 端走的是同一条路由)、`GET /announcements`、`POST /announcements`(一次性新功能公告);只接受本机回环或已认证的浏览器 |
136
- | 前端槽位(6 个) | `conversation.input.left`(待重启小胶囊,id `autorestart-restart-pill`)、`sidebar.session.row.leading`(侧栏状态圆点,id `autorestart-restart-dot`)、`conversation.input.dock`(一次性安装提问,id `autorestart-backup-choice`;一次性新功能公告,id `autorestart-feature-announcement`)、`sidebar.footer.action`(收工关机的月亮按钮,id `autorestart-sleep-button`)、`shell.overlay`(倒数浮动卡片)、`settings.section`(设置页里的「自动重启与关机」分区,id `dsh-autorestart`) |
136
+ | 前端槽位(6 个) | `conversation.input.left`(待重启小胶囊,id `autorestart-restart-pill`)、`sidebar.session.row.leading`(侧栏状态圆点,id `autorestart-restart-dot`)、`conversation.input.dock`(一次性安装提问,id `autorestart-backup-choice`;一次性新功能公告,id `autorestart-feature-announcement`)、`sidebar.footer.action`(收工关机的月亮按钮,id `autorestart-sleep-button`)、`shell.overlay`(倒数浮动卡片,以及**主界面居中的重启阶段浮层**:`autorestart-sleep-overlay`、`autorestart-restart-overlay`)、`settings.section`(设置页里的「自动重启与关机」分区,id `dsh-autorestart`;保存回执也渲染在这个面板**内部**,不占窗口级浮层) |
137
137
  | 系统提示词 | 一段「重启政策」说明,告诉 agent 怎么请求重启、插件会做什么 |
138
138
  | 宿主事件 | `agent/status`(跟踪哪些会话在忙)、`tools/pre-execute`(拦下"手动杀/重启 DSH"的 shell 命令)、启动时的恢复流程 |
139
139
  | profile 行 | 一条 bundle 行:`dsh-autorestart` |
@@ -330,7 +330,7 @@ agent/status(running) ──► 写 checkpoint(<DSH_HOME>\storages\dsh-autores
330
330
 
331
331
  ## 安装
332
332
 
333
- 当前版本:**0.8.3**。
333
+ 当前版本:**0.8.4**。
334
334
 
335
335
  ```powershell
336
336
  # 在 dsh 里(或对 Agent 说):把工作区里的这个包安装为 profile bundle
@@ -364,9 +364,17 @@ dsh plugin --profile desktop add C:\path\to\dsh-autorestart
364
364
 
365
365
  ## 配置
366
366
 
367
- 设置页里关于「备份」和「启动方式」的两块,先说清楚它们看的是什么:
367
+ 设置页里关于「备份」「回执」和「启动方式」的几块,先说清楚它们看的是什么:
368
368
 
369
- - **现在备份了什么**(在两个备份勾选的下面):宿主真的去读 `<DSH_HOME>/storages/dsh-autorestart/backups/`,所以份数、每份的**本地时间**、大小(MB)、有没有含已装插件、以及存放路径都是真的。只有目录元信息被读,备份里的内容**不遍历**(一份就可能 150 MB)。没有备份时写的是「还没有备份;每次重启前会自动生成一份」。
369
+ - **现在备份了什么**(在两个备份勾选的下面):宿主真的去读 `<DSH_HOME>/storages/dsh-autorestart/backups/`,所以份数、每份的**本地时间**、大小、有没有含已装插件、以及存放路径都是真的。只有目录元信息被读,备份里的内容**不遍历**(一份就可能 150 MB)。没有备份时写的是「还没有备份;每次重启前会自动生成一份」。每份备份是**两行带标签的写法**,不再挤成一句:
370
+
371
+ ```
372
+ 备份时间 2026-10-29 22:08
373
+ 备份大小 156 MB(含已装插件)
374
+ ```
375
+
376
+ 时间就是拍快照那台机器的本地时间,**精确到分、不带时区偏移**(`+08:00` 只会添乱——看的人本来就看自己的钟)。大小自动选单位(`92 KB` / `156 MB`),只在有意义时保留一位小数(`117.7 MB`,永远不写 `156.0 MB`);「(含已装插件)」紧跟在大小后面,因为它正是这份备份为什么这么大。两份备份就是两组,组与组之间留空隙。
377
+ - **设置改动有回执**:每个开关/下拉都是改了就写,所以面板必须说清写没写进去——宿主回 `ok: true` 之后,**设置面板内部顶部**(面板自己的 `sticky` 条,往下滚动也一直可见)出现绿色**「已生效」** + 小字时间(`已生效 21:40:12`),3 秒后淡出;被拒绝时是红色**「没保存成功」** + 宿主给的原因,不自动消失,直到下一次改动成功或你自己点 × 关掉。**宿主没回话之前一律不显示**:首次渲染、轮询刷新、点控件都不会亮。
370
378
  - **启动方式**(Web 托管端才有):默认只给**一行大白话**(例如「我记下的启动方式:由你的脚本拉起(重启交给它,我不插手)」)加两个小动作(重新检测 / 撤销);命令原文收在**「技术细节」**折叠里,默认收起,展开才出现。**桌面客户端这一整块不渲染** —— 它自己拉起自己,也不该写 `restartCommand`。宿主说不清是哪一端时,宁可整块不显示。
371
379
 
372
380
  所有键都有默认值,写在 `cordis.patch.yml` 的 insert 行里;要覆盖就在 profile 的
@@ -529,8 +537,7 @@ restart gate: action=wait reason=agents-busy-within-soft-window busyCount=1 quie
529
537
 
530
538
  ### 小胶囊:点它看详情,也从这儿自己撤掉
531
539
 
532
- 输入框那排的小胶囊只有 22px 高、一行宽,所以它**只放数字**(`待重启 · 已等 16 分钟 · 3 项任务在跑`)——
533
- 不放名字,也不放任何"双击可以取消"之类的提示(没地方放)。**单击**它(或聚焦后按 Enter / 空格)会在上方
540
+ 输入框那排的小胶囊只有 22px 高、一行宽,所以它**只放一句短话**(`待重启 · 空闲后自动重启` / `待重启 · 等待 2 个会话`,≤12 字)——不放名字,也不放「双击可以取消」之类的提示(没地方放)。细节都下沉一层:长句只做 tooltip,**阶段**(备份中 / 重启中 / 已回来)显示在**主界面居中的浮层卡片**上,数量和「怎么撤」在点开的小面板里。**单击**它(或聚焦后按 Enter / 空格)会在上方
534
541
  弹出一个小面板:
535
542
 
536
543
  - 这次重启还在等几个会话;
package/index.js CHANGED
@@ -387,7 +387,7 @@ function snapGraceChoice(value, fallback = DEFAULT_RESTART_GRACE_MS) {
387
387
  * `pluginVersion()`), but a bundled installation may not ship that file — so
388
388
  * the constant below is the last resort. A test keeps the two in sync.
389
389
  */
390
- const PLUGIN_VERSION_FALLBACK = '0.8.3'
390
+ const PLUGIN_VERSION_FALLBACK = '0.8.4'
391
391
 
392
392
  /**
393
393
  * The version of the graceful-shutdown FEATURE, not the version of the package.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-autorestart",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "type": "module",
5
5
  "description": "DeepSeek Harness plugin: restart without losing work. Waits until every conversation is idle, restarts the host, then automatically resumes the interrupted sessions. AI-generated, not human-reviewed: use with caution.",
6
6
  "license": "MIT",