dsh-archived-chats 1.7.0 → 2.0.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,30 @@
4
4
 
5
5
  Entries describe behavior at each release, not necessarily current behavior. Consult the READMEs and user guides for current usage.
6
6
 
7
+ ## 2.0.0 — 2026-11-07
8
+
9
+ ### 中文
10
+
11
+ - 最低宿主版本提高至 DeepSeek Harness `0.2.2-rc.1`。旧宿主请先升级 Harness,再安装新版插件;暂不升级宿主时可继续使用插件 `1.7.1`。
12
+ - 同步官方 Session 与 Cordis 开发基线,原生集成 CI 统一使用官方 `0.2.2-rc.1` 后端,在 macOS、Windows 和 Linux 上验证。更新兼容声明、安装指引和市场信息。
13
+
14
+ ### English
15
+
16
+ - Raise the minimum Host version to DeepSeek Harness `0.2.2-rc.1`. Upgrade Harness before installing this plugin release on older Hosts, or keep plugin `1.7.1` until the Host is upgraded.
17
+ - Align official Session and Cordis development dependencies. Run native integration CI against the official `0.2.2-rc.1` backend on macOS, Windows and Linux, with matching compatibility declarations, installation guidance and catalog information.
18
+
19
+ ## 1.7.1 — 2026-11-07
20
+
21
+ ### 中文
22
+
23
+ - 插件更新优先接入官方 `updateBundle`,支持宿主热重载环境中的版本替换,由官方管理兼容性检查、安装和失败恢复。
24
+ - 更新结果区分已应用与需要重启,并明确提示旧版恢复结果。更新指引优先引导官方插件页的版本区域,保留旧 Host 兼容和本地开发版保护。
25
+
26
+ ### English
27
+
28
+ - Prefer the official `updateBundle` API for plugin updates, including Host hot-reload environments. The Host manages compatibility checks, replacement and recovery after failure.
29
+ - Distinguish applied updates from required restarts and report verified restoration outcomes. Direct manual guidance to the official Plugins page’s Versions section, retaining older Host compatibility and local-checkout protection.
30
+
7
31
  ## 1.7.0 — 2026-11-07
8
32
 
9
33
  ### 中文
package/README.md CHANGED
@@ -35,7 +35,7 @@ Archive Management adds conversation search, organization and backups to DeepSee
35
35
  - **Portable backups:** export and import JSON + Markdown ZIPs; imports preview before writing and skip existing IDs to avoid overwrites.
36
36
  - **Conversation lineage:** read-only Origins & Branches view traces sources, forks and subagent relationships across all workspaces, including archived and unarchived chats.
37
37
 
38
- > This document describes version 1.7.0. Previous recovery features are removed, with explicit retries for permanent-deletion tasks.
38
+ > This document describes version 2.0.0. Previous recovery features are removed, with explicit retries for permanent-deletion tasks.
39
39
 
40
40
  ## Install and open
41
41
 
@@ -94,7 +94,7 @@ Installing an older release can restore its earlier cleanup rules. Before downgr
94
94
 
95
95
  ## Compatibility
96
96
 
97
- The declared range is DSH `>=0.1.0-rc.7 || 0.2.2-rc.1`; features still depend on Host capabilities. Native integration tests cover official `0.1.7-rc.2`, `0.2.1-rc.2`, `0.2.1-rc.5` and `0.2.2-rc.1` backends; CI runs the Host matrix on macOS, Windows and Linux.
97
+ Requires DeepSeek Harness `0.2.2-rc.1` or later (`>=0.2.2-rc.1`). Upgrade Harness before updating the plugin on older Hosts, or keep plugin `1.7.1`. CI runs native integration tests against the official `0.2.2-rc.1` backend on macOS, Windows and Linux.
98
98
 
99
99
  Archive, unarchive and inventory use official capabilities. Permanent deletion coordinates Host session lifecycle and storage locations rather than calling one unified public deletion API. See [compatibility and limits](docs/USER_GUIDE.md#compatibility-and-limits).
100
100
 
@@ -149,12 +149,6 @@ Use [Discussions](https://github.com/Ultroncn/dsh-archived-chats/discussions) fo
149
149
 
150
150
  ```sh
151
151
  npm test
152
- npm ci --prefix test/fixtures/native-host --ignore-scripts --include=optional
153
- node scripts/run-native-integration.mjs
154
- npm ci --prefix test/fixtures/native-host-0.2.1 --ignore-scripts --include=optional
155
- node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.1
156
- npm ci --prefix test/fixtures/native-host-0.2.1-rc.5 --ignore-scripts --include=optional
157
- node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.1-rc.5
158
152
  npm install --prefix test/fixtures/native-host-0.2.2-rc.1 --ignore-scripts --include=optional --package-lock=true
159
153
  node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.2-rc.1
160
154
  npm pack --dry-run --json
package/README.zh-CN.md CHANGED
@@ -33,7 +33,7 @@
33
33
  - **可迁移备份:** 导出和导入 JSON + Markdown ZIP;导入前预览,跳过已有 ID,不覆盖现有数据。
34
34
  - **会话溯源:** 只读的「来源与分支」视图查看所有工作区中已归档、未归档会话的来源、分叉和子代理关系。
35
35
 
36
- > 本文描述 1.7.0,旧恢复功能已移除,永久删除支持任务重试。
36
+ > 本文描述 2.0.0,旧恢复功能已移除,永久删除支持任务重试。
37
37
 
38
38
  ## 安装与打开
39
39
 
@@ -92,7 +92,7 @@ dsh plugin --profile web update dsh-archived-chats
92
92
 
93
93
  ## 兼容性
94
94
 
95
- 声明范围为 DSH `>=0.1.0-rc.7 || 0.2.2-rc.1`,具体能力仍取决于 Host。原生集成测试覆盖官方 `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.5` 与 `0.2.2-rc.1` 后端;CI 在 macOS、Windows 和 Linux 上运行 Host 测试矩阵。
95
+ 最低要求 DeepSeek Harness `0.2.2-rc.1`(声明 `>=0.2.2-rc.1`)。旧宿主请先升级 Harness,再更新插件;旧宿主可继续使用插件 `1.7.1`。CI 在 macOS、Windows 和 Linux 上运行官方 `0.2.2-rc.1` 后端集成测试。
96
96
 
97
97
  归档、取消归档、列表读取以官方能力为基础。永久删除由插件协调会话生命周期和存储位置完成,并非调用一个官方统一删除接口。详见[兼容性与限制](docs/USER_GUIDE.zh-CN.md#兼容性与限制)。
98
98
 
@@ -147,12 +147,6 @@ dsh plugin --profile web update dsh-archived-chats
147
147
 
148
148
  ```sh
149
149
  npm test
150
- npm ci --prefix test/fixtures/native-host --ignore-scripts --include=optional
151
- node scripts/run-native-integration.mjs
152
- npm ci --prefix test/fixtures/native-host-0.2.1 --ignore-scripts --include=optional
153
- node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.1
154
- npm ci --prefix test/fixtures/native-host-0.2.1-rc.5 --ignore-scripts --include=optional
155
- node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.1-rc.5
156
150
  npm install --prefix test/fixtures/native-host-0.2.2-rc.1 --ignore-scripts --include=optional --package-lock=true
157
151
  node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.2-rc.1
158
152
  npm pack --dry-run --json
@@ -2,7 +2,7 @@
2
2
 
3
3
  English · [中文](ARCHITECTURE.md) · [User guide](USER_GUIDE.md)
4
4
 
5
- This document describes the interfaces and behavior of version 1.7.0. Native integration tests cover DSH `0.1.7-rc.2`, `0.2.1-rc.2`, `0.2.1-rc.5` and `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. Runtime code is the authority for interfaces and behavior; user-facing documentation should agree with it.
5
+ This document describes the interfaces and behavior of version 2.0.0. Native integration tests cover DSH `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. Runtime code is the authority for interfaces and behavior; user-facing documentation should agree with it.
6
6
 
7
7
  The client capability-detects public UI primitives. `HostModal` uses the official headless Modal for complex business content. Ordinary `ConfirmDialog` uses its heading, description and footer. `ControlButton` and `ControlInput` forward refs, disabled state and editing events. Older Hosts retain HTML fallbacks. Native controls use separate styling classes so legacy button CSS cannot override their sizing, colors or hover states. Menus retain filter placement and scrolling constraints; preview content stays within the outer modal bounds. Native modals own focus layering, with document-level legacy traps registered only in compatibility mode. Plugin-owned portals belong to the archive interaction so clicks inside a dialog cannot prematurely release settings protection.
8
8
 
@@ -129,7 +129,7 @@ Plugin confirmation, preview, import, and metadata dialogs share the opaque `--d
129
129
 
130
130
  Opening Archive Management loads local metadata, then automatically checks public npm metadata. While the page stays open, cache-aware checks run every 15 minutes and on visibility/network recovery. Success is cached for 12 hours and failure for 15 minutes; manual checks have a 30-second cooldown and concurrent requests coalesce. No chats or backups are sent. Failure never blocks chat management or claims the plugin is current. Leaving the page removes timers and listeners.
131
131
 
132
- `POST /about/install-update` additionally requires a local request, rejects cross-origin requests and accepts only `{ version }`. `createUpdateRuntime` checks profileContext, its dependency declaration and the actual loaded path. Local, external, unknown or mismatched sources cannot install. With host HMR present, it does not invoke installBundle, which rejects an already-installed package. Otherwise it delegates only to official pluginManager.installBundle without spawning a package manager or relaxing policy. Both the host outcome and installed package version must verify before reporting restart-required. Each Host has its own service instance; installation state and running version remain separate.
132
+ `POST /about/install-update` additionally requires a local request, rejects cross-origin requests and accepts only `{ version }`. `createUpdateRuntime` verifies the profile dependency and loaded package path. Local, external, unknown and mismatched sources cannot install. It prefers official `pluginManager.updateBundle`, including under HMR. The Host owns replacement and rollback. The adapter validates the nested result and on-disk package identity, reports verified restoration separately, and returns `applied` or `restart-required`. Older Hosts may use `installBundle` only without HMR. No package-manager process is spawned. Each Host owns its service state, and the loaded version remains distinct from the installed version. HMR may dispose this settings UI and abort its request, so users can reopen the page to verify the newly loaded version.
133
133
 
134
134
  ## Permanent deletion and crash recovery
135
135
 
@@ -175,16 +175,12 @@ Tests cover retained modules: export/import rollback, deletion-task states, inte
175
175
 
176
176
  ```sh
177
177
  npm test
178
- npm ci --prefix test/fixtures/native-host --ignore-scripts --include=optional
179
- node scripts/run-native-integration.mjs
180
- npm ci --prefix test/fixtures/native-host-0.2.1 --ignore-scripts --include=optional
181
- node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.1
182
- npm ci --prefix test/fixtures/native-host-0.2.1-rc.5 --ignore-scripts --include=optional
183
- node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.1-rc.5
178
+ npm install --prefix test/fixtures/native-host-0.2.2-rc.1 --ignore-scripts --include=optional --package-lock=true
179
+ node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.2-rc.1
184
180
  npm pack --dry-run --json
185
181
  git diff --check
186
182
  ```
187
183
 
188
- The native commands install the locked `@deepseek-ai/dsh-session@0.1.7-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5` fixtures and require all nine native integration cases to run without skips for each fixture. This is the local equivalent of the mandatory native Host integration gate in CI.
184
+ The native commands install the exact official `0.2.2-rc.1` fixture and require all nine integration cases to run without skips, matching the mandatory Host integration gate in CI.
189
185
 
190
- The declared DSH `>=0.1.0-rc.7` range remains capability-based. Release automation tests Node.js 18 on Ubuntu and Node.js 24 on Ubuntu, macOS, and Windows; the Node.js 24 matrix requires all three official Host backend fixtures, `@deepseek-ai/dsh-session@0.1.7-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5`, on all three platforms (9/9 each), along with package checks, including the v4 session format. The [screenshots](../screenshots.json) show the current interface with synthetic example chats.
186
+ Requires DSH `0.2.2-rc.1` or later, declared as `>=0.2.2-rc.1`. Release automation runs unit tests on Node.js 18 on Ubuntu and requires all nine integration cases against the official `0.2.2-rc.1` backend on Node.js 24 on Ubuntu, macOS and Windows, plus package checks. The [screenshots](../screenshots.json) show the current interface with synthetic example chats.
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](ARCHITECTURE.en.md) · 中文 · [用户指南](USER_GUIDE.zh-CN.md)
4
4
 
5
- 本文描述 1.7.0 的接口与行为;原生集成测试覆盖 DSH `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.5` 和 `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md)。运行时代码是接口与行为的依据;用户操作说明与本文应保持一致。
5
+ 本文描述 2.0.0 的接口与行为;原生集成测试覆盖 DSH `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md)。运行时代码是接口与行为的依据;用户操作说明与本文应保持一致。
6
6
 
7
7
  客户端通过能力探测复用公开 UI primitives。`HostModal` 为复杂业务内容使用官方无头 Modal,普通 `ConfirmDialog` 直接使用 Modal 的标题、说明及 footer;`ControlButton` 与 `ControlInput` 透传 ref、禁用状态和编辑事件。旧 Host 保留 HTML 兼容入口。原生按钮使用独立样式类,避免旧按钮 CSS 覆盖官方尺寸、颜色和悬停。菜单保留筛选定位与滚动约束,预览内容限制在外层弹窗边界内。原生弹窗拥有焦点层,旧文档级焦点陷阱仅在兼容模式注册。带插件归属标记的 portal 计入归档交互范围,避免设置保护被弹窗内点击提前解除。
8
8
 
@@ -132,7 +132,7 @@ apply 只接受凭据,不接受调用方增补会话 ID。每条执行前在
132
132
 
133
133
  打开归档管理时先读取本地信息,再自动查询公开 npm 版本;页面保持打开时每 15 分钟进行缓存感知检查,重新显示或联网时也会补查。成功结果缓存 12 小时,失败结果缓存 15 分钟;手动检查使用 30 秒短限流,并发请求合并。只查询公开版本,不发送聊天或备份内容;失败不阻塞会话管理,也不显示「已是最新版」。关闭页面会清理定时器和事件监听。
134
134
 
135
- `POST /about/install-update` 额外限制为本机请求,拒绝跨源,只接受 `{ version }`。`createUpdateRuntime` 读取当前 `profileContext`、profile 依赖声明及实际加载路径;本地、外部、未知或不一致的来源不会开放安装。宿主 `hmr` 存在时不调用会拒绝重复包的 `installBundle`。支持时只委托官方 `pluginManager.installBundle`,不自行运行包管理器或降低安装策略;安装结果及落盘包版本都验证后才报告待重启。服务实例按当前 Host 创建,安装状态与运行版本分别记录。
135
+ `POST /about/install-update` 额外要求本机请求,拒绝跨来源写入,仅接受 `{ version }`。`createUpdateRuntime` 核对 profile 依赖与实际加载路径,本地、外部、未知或路径不一致的来源均拒绝安装。优先调用官方 `pluginManager.updateBundle`,包括 HMR 环境,替换与回滚均由宿主负责。适配器校验嵌套结果和磁盘包身份,分别报告已应用、待重启及旧版恢复结果。旧 Host 仅在无 HMR 时退回 `installBundle`,不自行启动包管理器。各 Host 独立保存操作状态,已加载版本与已安装版本分开表达。HMR 可能卸载当前设置页并中断其请求,用户可重新打开页面核对新加载的版本。
136
136
 
137
137
  ## 永久删除与崩溃恢复
138
138
 
@@ -176,18 +176,14 @@ apply 只接受凭据,不接受调用方增补会话 ID。每条执行前在
176
176
 
177
177
  ```sh
178
178
  npm test
179
- npm ci --prefix test/fixtures/native-host --ignore-scripts --include=optional
180
- node scripts/run-native-integration.mjs
181
- npm ci --prefix test/fixtures/native-host-0.2.1 --ignore-scripts --include=optional
182
- node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.1
183
- npm ci --prefix test/fixtures/native-host-0.2.1-rc.5 --ignore-scripts --include=optional
184
- node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.1-rc.5
179
+ npm install --prefix test/fixtures/native-host-0.2.2-rc.1 --ignore-scripts --include=optional --package-lock=true
180
+ node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host-0.2.2-rc.1
185
181
  npm pack --dry-run --json
186
182
  git diff --check
187
183
  ```
188
184
 
189
- 原生集成命令会分别安装锁定的 `@deepseek-ai/dsh-session@0.1.7-rc.2`、`0.2.1-rc.2` 和 `0.2.1-rc.5` fixtures,每套都要求九个原生集成用例全部执行且不能跳过;这是 CI 强制原生 Host 集成门禁的本地等价检查。
185
+ 原生集成命令安装版本固定的官方 `0.2.2-rc.1` fixture,要求九个用例全部执行且不能跳过,对应 CI 的强制 Host 集成门禁。
190
186
 
191
- 声明的 DSH `>=0.1.0-rc.7` 范围仍以 Host 公开能力为准。发布自动化在 Ubuntu 上测试 Node.js 18,并在 Ubuntu、macOS 和 Windows 上测试 Node.js 24;Node.js 24 矩阵在三个平台上分别强制运行基于官方 `@deepseek-ai/dsh-session@0.1.7-rc.2`、`0.2.1-rc.2` 和 `0.2.1-rc.5` 的三套 Host 后端集成(每套 9/9)与打包检查,覆盖 v4 会话格式。[截图](../screenshots.json)使用虚构示例聊天展示当前界面。
187
+ 最低要求 DSH `0.2.2-rc.1`,声明范围为 `>=0.2.2-rc.1`。发布自动化在 Ubuntu 上运行 Node.js 18 单元测试,并在 Ubuntu、macOS 和 Windows 上使用 Node.js 24 强制执行官方 `0.2.2-rc.1` 后端的九项集成用例与打包检查。[截图](../screenshots.json)使用虚构示例聊天展示当前界面。
192
188
 
193
189
  永久删除在最终读取子代理关系前先取消并释放活动代理。完整后代集合以可选 `cascadeSessionIds` 保存到父会话的 `purge-pending` 记录;父目录消失后也保留该记录,直到所有子代理清理完成。用户明确重试时据此恢复级联,不跨越分叉或已有独立删除任务的子树。待重试记录清空前不要降级到不支持此字段的版本。
@@ -4,7 +4,7 @@ Current source removes the previous recovery UI and keeps explicit permanent-del
4
4
 
5
5
  English · [简体中文](USER_GUIDE.zh-CN.md) · [Back to README](../README.md)
6
6
 
7
- Archive Management provides a place to browse and manage DSH's archived chats, plus workspace bulk archiving. This document describes version 1.7.0, with native integration coverage for DSH `0.1.7-rc.2`, `0.2.1-rc.2`, `0.2.1-rc.5` and `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. For interfaces and data formats, see the [architecture](ARCHITECTURE.en.md).
7
+ Archive Management provides a place to browse and manage DSH's archived chats, plus workspace bulk archiving. This document describes version 2.0.0, with native integration coverage for DSH `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. For interfaces and data formats, see the [architecture](ARCHITECTURE.en.md).
8
8
 
9
9
  Archive Management prefers the Host’s public Modal, Button, Input, menu, Tooltip, and icon components. Search fields follow the built-in plugin inventory’s 36px height, search icon, and focus styles. Ordinary text fields use the public Input. Confirmations use the official heading, description, and action areas. Complex preview and import content use the official modal frame. Older Hosts without these exports use compatible controls. Page headings, descriptions, secondary list text, and focus states follow the official settings typography and theme variables.
10
10
 
@@ -187,10 +187,12 @@ When diagnosing an unchanged version after an update, also verify that you updat
187
187
 
188
188
  Check for updates and View update beside the heading open a dialog with the running version, public release, last check and current host. Copy the package spec into Add plugin in another host. A terminal command is offered only when the current launcher and profile can be verified; official Desktop uses its own bundled command, never an unrelated dsh on PATH. This detects the current host only, not other Desktop installations.
189
189
 
190
- Local link:/file: installations are labeled Local checkout, offer Copy local path and are protected on the backend against registry replacement. Registry installations show Install update only when the host manager permits replacement; the official HMR restriction is retained, with manual guidance instead. Installation submits only the exact reviewed version through the official manager, preserving compatibility, locking and build-script checks. Failures never report completion and duplicate submissions are blocked. Success shows Restart needed; the running version changes only after the backend restarts. DSH is never restarted automatically.
190
+ Local link:/file: installations are labeled Local checkout, offer Copy local path and are protected on the backend against registry replacement. Registry installations offer Install update when supported. The official updateBundle API is preferred, letting the Host check version compatibility, replace the plugin and attempt to restore the previous version if installation fails. Settings may close during replacement. Reopen Archive Management afterward to verify its running version. Results distinguish Host-applied updates from required restarts and report whether restoration was verified. Older Hosts use the official installation API only where replacement is supported, otherwise directing users to the Versions section on the official Plugins page. Duplicate submissions are blocked. Restarting DSH remains a user action.
191
191
 
192
192
  ## Upgrades
193
193
 
194
+ Version 2.0.0 requires DeepSeek Harness `0.2.2-rc.1` or later. Upgrade Harness before updating the plugin on older Hosts, or keep plugin `1.7.1`. The official update API checks compatibility before replacing the plugin and rejects incompatible versions.
195
+
194
196
  Upgrades preserve archives, tags, notes, and pending permanent-deletion tasks. Previous recovery records and protection snapshots remain on disk without the previous recovery actions. Host compatibility follows the package declaration and native integration coverage.
195
197
 
196
198
  ## Compatibility and limits
@@ -199,7 +201,7 @@ Upgrades preserve archives, tags, notes, and pending permanent-deletion tasks. P
199
201
 
200
202
  Features depend on public Host capabilities, not just a version number:
201
203
 
202
- The declared DSH `>=0.1.0-rc.7` range remains capability-based. Release automation tests Node.js 18 on Ubuntu and Node.js 24 on Ubuntu, macOS, and Windows; the Node.js 24 matrix requires all three pinned official Host backends, `@deepseek-ai/dsh-session@0.1.7-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5` (nine integration cases each) and package checks, including the v4 session format.
204
+ Requires DSH `0.2.2-rc.1` or later, declared as `>=0.2.2-rc.1`. Release automation runs unit tests on Node.js 18 on Ubuntu and requires all nine integration cases against the official `0.2.2-rc.1` backend on Node.js 24 on Ubuntu, macOS and Windows, plus package checks.
203
205
 
204
206
  ## Local data and uninstall
205
207
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](USER_GUIDE.md) · 简体中文 · [返回 README](../README.zh-CN.md)
4
4
 
5
- 归档管理为 DSH 已归档聊天提供查看和管理页面,并扩展按工作区批量归档。本文描述 1.7.0行为(包含未归档正文搜索),原生集成测试覆盖 DSH `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.5` 和 `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md),接口和数据格式见[架构说明](ARCHITECTURE.md)。
5
+ 归档管理为 DSH 已归档聊天提供查看和管理页面,并扩展按工作区批量归档。本文描述 2.0.0 的行为(包含未归档正文搜索),原生集成测试覆盖 DSH `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md),接口和数据格式见[架构说明](ARCHITECTURE.md)。
6
6
 
7
7
  归档管理优先复用宿主公开的 Modal、Button、Input、菜单、Tooltip 和图标组件。搜索框采用内置插件页面的 36px 高度、搜索图标和焦点样式,普通文本输入使用公开 Input。确认弹窗的标题、正文和操作区使用官方组件,复杂预览和导入内容使用官方弹窗框架;缺少相应导出的旧 Host 使用兼容样式。页面标题、说明、列表次要文字和焦点状态采用官方设置页的文字层级与主题变量。
8
8
 
@@ -187,10 +187,12 @@ JSON 是机器可读记录,Markdown 是可读副本。新版 Host 导出 ZIP v
187
187
 
188
188
  「检查更新」与标题旁的「查看更新」打开更新弹窗,展示运行版本、公开版本、上次检查和当前环境。支持复制包名到另一端的「添加插件」;命令只在能验证当前启动程序和 profile 时提供,官方桌面端使用其自带命令,不依赖 PATH 中的另一套 dsh。这里只识别当前环境,不扫描或自动安装到其他桌面端。
189
189
 
190
- 本地 `link:` / `file:` 等来源标记为「本地开发版」,提供复制本地路径,后端拒绝用线上包覆盖。普通 npm 安装仅在宿主插件管理器允许原地更新时显示「安装更新」;官方 HMR 模式要求重新安装时,保留宿主限制并给出手动指引。点击安装仅提交已展示的精确版本,宿主负责兼容性、安装锁和安装脚本检查;插件不绕过这些限制。失败不宣称完成,重复提交被阻止。安装成功后显示待重启,运行版本直到后端重启才改变;不会自动重启 DSH。
190
+ 本地 `link:` / `file:` 等来源标记为「本地开发版」,提供复制本地路径,后端拒绝用线上包覆盖。npm 安装在宿主支持时提供「安装更新」,优先调用官方 `updateBundle`,由宿主检查版本与兼容性、替换旧插件,并在安装失败时尝试恢复旧版本。更新期间设置页可能关闭,完成后重新打开归档管理核对运行版本。结果区分「宿主已应用」和「需要重启」;旧版恢复成功或未能确认恢复均有明确提示。旧 Host 缺少更新接口时,仅在允许替换的环境使用官方安装接口,其余引导前往官方插件页的版本区域更新。重复提交被阻止,DSH 重启由用户操作。
191
191
 
192
192
  ## 升级
193
193
 
194
+ 从 2.0.0 起,最低宿主版本为 DeepSeek Harness `0.2.2-rc.1`。旧宿主请先升级 Harness,再更新插件;暂不升级宿主时可保留插件 `1.7.1`。官方更新接口在替换前检查兼容性,不兼容时会拒绝更新。
195
+
194
196
  升级保留已有归档、标签备注及待完成删除任务。旧恢复记录和保护快照文件留在磁盘,当前版本不再提供旧恢复操作。Host 兼容范围由包声明与原生集成测试确定。
195
197
 
196
198
  ## 兼容性与限制
@@ -199,7 +201,7 @@ JSON 是机器可读记录,Markdown 是可读副本。新版 Host 导出 ZIP v
199
201
 
200
202
  功能取决于 Host 公开能力,不仅取决于版本号:
201
203
 
202
- 声明的 DSH `>=0.1.0-rc.7` 范围仍表达基于 Host 公开能力的兼容性。发布自动化在 Ubuntu 上测试 Node.js 18,并在 Ubuntu、macOS 和 Windows 上测试 Node.js 24;Node.js 24 矩阵强制运行官方 `@deepseek-ai/dsh-session@0.1.7-rc.2`、`0.2.1-rc.2` 和 `0.2.1-rc.5` 三套锁定 Host 后端集成(各 9 项)与打包检查,覆盖 v4 会话格式。
204
+ 最低要求 DSH `0.2.2-rc.1`,声明范围为 `>=0.2.2-rc.1`。发布自动化在 Ubuntu 上运行 Node.js 18 单元测试,并在 Ubuntu、macOS 和 Windows 上使用 Node.js 24 强制执行官方 `0.2.2-rc.1` 后端的九项集成用例与打包检查。
203
205
 
204
206
  ## 本地数据与卸载
205
207
 
package/lib/about.js CHANGED
@@ -70,8 +70,8 @@ export function createUpdateRuntime(ctx, {
70
70
  if (realpathSync(installedRoot) !== realpathSync(packageRoot)) { info.reason = 'runtime-mismatch'; return { info }; }
71
71
  info.command = commandFor(context, info.packageSpec);
72
72
  const manager = service('pluginManager');
73
- // Current official HMR explicitly rejects replacing an installed package. Preserve that boundary.
74
- info.canInstall = typeof manager?.installBundle === 'function' && service('hmr') == null;
73
+ info.canInstall = typeof manager?.updateBundle === 'function'
74
+ || (typeof manager?.installBundle === 'function' && service('hmr') == null);
75
75
  info.reason = info.canInstall ? null : 'host-managed';
76
76
  return { info, manager, installedRoot };
77
77
  } catch { return { info: { ...info, canInstall: false, reason: 'unknown-runtime', command: null } }; }
@@ -83,11 +83,31 @@ export function createUpdateRuntime(ctx, {
83
83
  const { info, manager, installedRoot } = inspect(version);
84
84
  if (info.source === 'local') throw updateError('update-local-install');
85
85
  if (!info.canInstall) throw updateError('update-host-managed');
86
- const result = await manager.installBundle(`${manifest.name}@${version}`, { registry: 'https://registry.npmjs.org/', saveExact: true });
86
+ const installedMatches = expected => {
87
+ try {
88
+ const installed = readJson(join(installedRoot, 'package.json'));
89
+ return installed.name === manifest.name && installed.version === expected;
90
+ } catch { return false; }
91
+ };
92
+ let result;
93
+ if (typeof manager.updateBundle === 'function') {
94
+ const update = await manager.updateBundle(manifest.name, version, { registry: 'https://registry.npmjs.org/' });
95
+ if (update?.to !== version) throw updateError('update-install-failed', 502);
96
+ if (update.restore) {
97
+ const restored = ['applied', 'restart-required'].includes(update.restore.application)
98
+ && !update.restore.error && update.restore.bundle === manifest.name
99
+ && update.restore.version === update.from && installedMatches(update.from);
100
+ throw updateError(restored ? 'update-restored' : 'update-restore-failed', 502);
101
+ }
102
+ if (update.step !== 'install') throw updateError('update-install-failed', 502);
103
+ result = update.result;
104
+ } else {
105
+ result = await manager.installBundle(`${manifest.name}@${version}`, { registry: 'https://registry.npmjs.org/', saveExact: true });
106
+ }
87
107
  if (!['applied', 'restart-required'].includes(result?.application) || result?.error
88
108
  || result?.version !== version || result?.bundle !== manifest.name) throw updateError('update-install-failed', 502);
89
- const installed = readJson(join(installedRoot, 'package.json'));
90
- if (installed.name !== manifest.name || installed.version !== version) throw updateError('update-install-unverified', 502);
109
+ if (!installedMatches(version)) throw updateError('update-install-unverified', 502);
110
+ return { application: result.application };
91
111
  },
92
112
  };
93
113
  }
@@ -344,6 +364,7 @@ export function createAboutService({
344
364
  },
345
365
  async installUpdate({ version: targetVersion } = {}) {
346
366
  if (install.status === 'installing') throw updateError('update-busy');
367
+ if (install.status === 'applied') throw updateError('update-already-applied');
347
368
  if (install.status === 'restart-required') throw updateError('update-restart-required');
348
369
  const environment = runtime?.describe(targetVersion);
349
370
  if (environment?.source === 'local') throw updateError('update-local-install');
@@ -352,8 +373,8 @@ export function createAboutService({
352
373
  try {
353
374
  await service.checkUpdates({ force: false });
354
375
  if (update.status !== 'available' || update.latestVersion !== targetVersion || !parseSemver(targetVersion)) throw updateError('update-version-changed');
355
- await runtime.install(targetVersion);
356
- install = { status: 'restart-required', version: targetVersion };
376
+ const result = await runtime.install(targetVersion);
377
+ install = { status: result?.application === 'applied' ? 'applied' : 'restart-required', version: targetVersion };
357
378
  return about();
358
379
  } catch (error) {
359
380
  install = { status: 'failed', version: null };
package/lib/client.js CHANGED
@@ -4568,13 +4568,15 @@ window.__ModuleLoader__.load({
4568
4568
  const [copied, setCopied] = _react.useState(null);
4569
4569
  _react.useEffect(() => { setCopied(null); }, [info?.command, info?.packageSpec, info?.localPath]);
4570
4570
  const local = info?.source === "local", restart = about?.install?.status === "restart-required";
4571
- const canInstall = info?.canInstall === true && update?.status === "available" && !local && !restart;
4571
+ const applied = about?.install?.status === "applied";
4572
+ const canInstall = info?.canInstall === true && update?.status === "available" && !local && !restart && !applied;
4572
4573
  const copy = async (value, key) => {
4573
4574
  try { if (!globalThis.navigator?.clipboard?.writeText) throw new Error("clipboard unavailable");
4574
4575
  await globalThis.navigator.clipboard.writeText(value); setCopied(key);
4575
4576
  } catch { setCopied("failed"); }
4576
4577
  };
4577
4578
  const status = restart ? (zh ? `v${about.install.version} 已安装,请重启 DSH 后确认运行版本。` : `v${about.install.version} installed. Restart DSH and verify the running version.`)
4579
+ : applied ? (zh ? `宿主已应用 v${about.install.version},重新打开归档管理可确认运行版本。` : `The host applied v${about.install.version}. Reopen Archive Management to verify the running version.`)
4578
4580
  : installing ? (zh ? "正在通过宿主安装更新…" : "Installing through the host…")
4579
4581
  : checking ? (zh ? "正在检查更新…" : "Checking for updates…")
4580
4582
  : update?.status === "available" ? (zh ? `发现新版本 v${update.latestVersion}` : `Version ${update.latestVersion} is available`)
@@ -4594,14 +4596,14 @@ window.__ModuleLoader__.load({
4594
4596
  (0, jsx.jsx)("dt", { children: zh ? "上次检查" : "Last checked" }), (0, jsx.jsx)("dd", { children: update?.checkedAt ? new Date(update.checkedAt).toLocaleString(zh ? "zh-CN" : "en-US") : "—" }),
4595
4597
  ] }),
4596
4598
  (0, jsx.jsxs)("div", { className: "dac-about-links", children: [
4597
- (0, jsx.jsx)(ControlButton, { type: "button", className: "dac-action-trigger", disabled: checking || installing || restart, onClick: onCheck, children: zh ? "重新检查" : "Check again" }),
4599
+ (0, jsx.jsx)(ControlButton, { type: "button", className: "dac-action-trigger", disabled: checking || installing || restart || applied, onClick: onCheck, children: zh ? "重新检查" : "Check again" }),
4598
4600
  safeAboutLink(about?.links?.changelog) && (0, jsx.jsx)("a", { href: safeAboutLink(about.links.changelog), target: "_blank", rel: "noopener noreferrer", children: zh ? "更新日志" : "Changelog" }),
4599
4601
  ] }),
4600
4602
  local ? (0, jsx.jsxs)("section", { className: "dac-update-manual", children: [
4601
4603
  (0, jsx.jsx)("p", { children: zh ? "当前连接本地源码,不会被线上更新替换。修改后重启 DSH 即可加载;在另一端接入时,粘贴下面目录到「添加插件」。" : "This local checkout is protected from registry replacement. Restart DSH after editing. To connect it in another host, paste this directory into Add plugin." }),
4602
4604
  codeBlock(info.localPath, zh ? "复制本地路径" : "Copy local path", "path"),
4603
4605
  ] }) : (0, jsx.jsxs)("section", { className: "dac-update-manual", children: [
4604
- (0, jsx.jsx)("p", { children: info?.source === "external" ? (zh ? "当前由外部来源安装,请按原来源更新。以下信息可用于在其他环境安装公开版本。" : "This plugin uses an external source; update from that source. Use the information below to install a public release elsewhere.") : canInstall ? (zh ? "点击「安装更新」仅更新当前环境的归档插件。安装完成后手动重启 DSH。" : "Install update changes only this plugin in the current host. Restart DSH manually afterward.") : (zh ? "当前环境请通过插件管理页面更新;宿主要求重新安装时,按页面提示操作。可复制下方包名到「添加插件」。" : "Update through the host’s plugin page; follow its reinstall instructions if required. Paste the package below into Add plugin." ) }),
4606
+ (0, jsx.jsx)("p", { children: info?.source === "external" ? (zh ? "当前由外部来源安装,请按原来源更新。以下信息可用于在其他环境安装公开版本。" : "This plugin uses an external source; update from that source. Use the information below to install a public release elsewhere.") : info?.canInstall ? (zh ? "点击「安装更新」由官方插件管理器检查兼容性并替换当前插件。更新期间本页可能关闭,完成后重新打开归档管理确认版本;需要重启时会明确提示。" : "Install update lets the official plugin manager check compatibility and replace this plugin. This page may close during replacement. Reopen Archive Management to verify the version. A required restart is reported explicitly.") : (zh ? "请前往官方插件页,找到归档管理,在版本区域更新;旧宿主要求重新安装时,按页面提示操作。下方包名也可用于在其他环境添加插件。" : "Find Archive Management on the official Plugins page and update from its Versions section. Follow reinstall instructions on older hosts. The package below can also be added in another host." ) }),
4605
4607
  codeBlock(info?.packageSpec ?? "dsh-archived-chats@latest", zh ? "复制安装信息" : "Copy package", "package"),
4606
4608
  info?.command && (0, jsx.jsxs)("details", { className: "dac-update-terminal", children: [
4607
4609
  (0, jsx.jsx)("summary", { children: zh ? "终端更新命令" : "Terminal update command" }),
@@ -4887,13 +4889,13 @@ window.__ModuleLoader__.load({
4887
4889
  };
4888
4890
  const installUpdate = async () => {
4889
4891
  if (updateRequestRef.current || about?.installation?.canInstall !== true || about?.installation?.source === "local"
4890
- || about?.update?.status !== "available" || about?.install?.status === "restart-required") return;
4892
+ || about?.update?.status !== "available" || ["applied", "restart-required"].includes(about?.install?.status)) return;
4891
4893
  const request = new AbortController(); updateRequestRef.current = request;
4892
4894
  aboutRequestRef.current?.controller.abort(); aboutRequestRef.current = null;
4893
4895
  setAboutChecking(false); setUpdateBusy(true); setUpdateError(null);
4894
4896
  try {
4895
4897
  const result = await post("/about/install-update", { version: about.update.latestVersion }, request.signal);
4896
- if (!validAbout(result) || result.install?.status !== "restart-required") throw new Error("update-unverified");
4898
+ if (!validAbout(result) || !["applied", "restart-required"].includes(result.install?.status)) throw new Error("update-unverified");
4897
4899
  if (!request.signal.aborted) setAbout(result);
4898
4900
  } catch (error) {
4899
4901
  if (!request.signal.aborted) {
@@ -4901,6 +4903,9 @@ window.__ModuleLoader__.load({
4901
4903
  setUpdateError(code === "update-version-changed" ? (isZh(t) ? "版本信息已变化,请重新检查后再更新。" : "Version information changed. Check again before updating.")
4902
4904
  : code === "update-local-install" ? (isZh(t) ? "当前已切换为本地开发版,已阻止线上覆盖。" : "This is now a local checkout; registry replacement was blocked.")
4903
4905
  : code === "update-host-managed" ? (isZh(t) ? "当前宿主要求通过插件管理页面更新,请按下方指引操作。" : "Use the host’s plugin manager to update. Follow the instructions below.")
4906
+ : code === "update-already-applied" ? (isZh(t) ? "宿主已应用更新,请重新打开归档管理确认运行版本。" : "The host already applied the update. Reopen Archive Management to verify the running version.")
4907
+ : code === "update-restored" ? (isZh(t) ? "新版安装失败,官方插件管理器已恢复旧版本。请重新打开归档管理确认。" : "The update failed and the official plugin manager restored the previous version. Reopen Archive Management to verify.")
4908
+ : code === "update-restore-failed" ? (isZh(t) ? "新版安装失败,旧版本也未能确认恢复。请到官方插件页检查并重新安装。" : "The update failed and restoration could not be verified. Check the official Plugins page and reinstall.")
4904
4909
  : (isZh(t) ? "未能确认更新完成。请重新打开本页核对状态;仍未完成时,通过宿主插件页面检查错误或使用下方命令。" : "Update completion could not be confirmed. Reopen this page to check its state, then use the host’s plugin page or the command below if needed."));
4905
4910
  }
4906
4911
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-archived-chats",
3
- "version": "1.7.0",
3
+ "version": "2.0.0",
4
4
  "description": "查看、搜索和管理会话归档,支持工作区批量归档、标签备注、ZIP 备份和会话谱系。",
5
5
  "license": "MIT",
6
6
  "author": "Ultronen",
@@ -76,7 +76,7 @@
76
76
  ],
77
77
  "dsh": {
78
78
  "engines": {
79
- "dsh": ">=0.1.0-rc.7 || 0.2.2-rc.1"
79
+ "dsh": ">=0.2.2-rc.1"
80
80
  },
81
81
  "bundle": {
82
82
  "patch": "./cordis.patch.yml"
@@ -90,8 +90,8 @@
90
90
  }
91
91
  },
92
92
  "peerDependencies": {
93
- "@deepseek-ai/cordis": "^4.0.1",
94
- "@deepseek-ai/dsh-session": ">=0.1.0-rc.7 <0.1.1-0 || >=0.1.1-rc.1 <0.1.2-0 || >=0.1.2-alpha.1 <0.2.0-0 || 0.1.5-rc.2 || 0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.5 || 0.2.2-rc.1",
93
+ "@deepseek-ai/cordis": "^4.1.0",
94
+ "@deepseek-ai/dsh-session": ">=0.2.2-rc.1",
95
95
  "react": "^18.2.0"
96
96
  },
97
97
  "peerDependenciesMeta": {
@@ -103,7 +103,10 @@
103
103
  "fflate": "^0.8.3"
104
104
  },
105
105
  "devDependencies": {
106
- "@deepseek-ai/dsh-session": "0.1.7-rc.2",
106
+ "@deepseek-ai/dsh-session": "0.2.2-rc.1",
107
107
  "typescript": "^5.9.3"
108
+ },
109
+ "overrides": {
110
+ "zod": "4.6.7"
108
111
  }
109
112
  }