dsh-archived-chats 1.4.6 → 1.5.1
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 +32 -0
- package/README.md +12 -11
- package/README.zh-CN.md +11 -10
- package/assets/screenshots/preview-01.png +0 -0
- package/assets/screenshots/preview-02.png +0 -0
- package/assets/screenshots/preview-03.png +0 -0
- package/assets/screenshots/preview-04.png +0 -0
- package/assets/screenshots/preview-05.png +0 -0
- package/assets/screenshots/preview-06.png +0 -0
- package/assets/screenshots/preview-07.png +0 -0
- package/assets/screenshots/preview-08.png +0 -0
- package/docs/ARCHITECTURE.en.md +37 -11
- package/docs/ARCHITECTURE.md +36 -10
- package/docs/USER_GUIDE.md +25 -12
- package/docs/USER_GUIDE.zh-CN.md +26 -13
- package/lib/client.js +762 -111
- package/lib/export.js +20 -4
- package/lib/index.js +347 -54
- package/lib/recycle.js +115 -27
- package/lib/session-graph.js +194 -0
- package/lib/trash.js +24 -1
- package/lib/types/index.d.ts +17 -2
- package/lib/workspace-bulk-archive.js +44 -3
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,38 @@
|
|
|
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
|
+
## 1.5.1 — 2026-10-08
|
|
8
|
+
|
|
9
|
+
- 残留会话整合为顶部最后一张统计卡片,进入空间与策略自动检查,点击「查看明细」后管理明细;离开取消请求,迟到结果不覆盖新检查。目录及恢复快照异常归入对应卡片提示;空间统计加载或失败不再隐藏独立的残留检查入口。
|
|
10
|
+
- Move residual chats into the final summary card and scan automatically on entry to Storage & Retention. View details opens the management dialog; cancelled late responses cannot replace newer results. Show measurement and recovery-snapshot issues in their respective cards. Keep residual access available while storage statistics load or fail.
|
|
11
|
+
|
|
12
|
+
- 全部八张市场功能截图更新至最新界面,移除预览页顶部的英文及本地会话管理说明,并展示最新选择操作。
|
|
13
|
+
- Refresh all eight marketplace screenshots from the latest UI, remove the extra preview header, and show the current selected actions.
|
|
14
|
+
|
|
15
|
+
- 顶部更多新增「全部移入回收站」,确认并处理所有工作区的已归档聊天,筛选不会缩小范围。
|
|
16
|
+
- Add header More → Move all to Recycle Bin, confirming the complete archive scope across workspaces regardless of filters.
|
|
17
|
+
|
|
18
|
+
- 已归档新增选择模式,支持当前结果全选、半选、隐藏已选项计数及取消清空。直接提供取消归档和永久删除;更多提供导出选中和移入回收站。选择模式行内保留预览,操作先确认精确选中范围。
|
|
19
|
+
- Add Archived selection mode with filtered Select all, indeterminate state, hidden-selection counts, and Cancel. Expose Unarchive and Delete permanently; More contains Export selected and Move to Recycle Bin. Rows retain Preview and actions confirm the exact selected scope.
|
|
20
|
+
|
|
21
|
+
## 1.5.0 — 2026-10-08
|
|
22
|
+
|
|
23
|
+
### 中文
|
|
24
|
+
|
|
25
|
+
- 永久删除、清空回收站及重启重试一并清理子代理后代,保留独立分叉;删除目标持久化,活动代理先停止,失败可重试(#57)。
|
|
26
|
+
- 新增「未归档」视图,复用已归档的工作区分组排版;搜索在顶部,筛选行右侧提供刷新图标。会话行提供只读预览图标,支持单条归档、工作区全部归档及全局全部归档,归档均先确认;搜索和筛选不缩小批量范围。
|
|
27
|
+
- 修复弹窗、对话预览顶栏、菜单及成功提示的背景穿透,使用随明暗主题变化的不透明宿主层。
|
|
28
|
+
- 修复下载中断后的导出流释放,以及部分删除后的回收站和侧栏刷新。
|
|
29
|
+
- 在「空间与策略」新增按需残留会话检查:仅处理明确缺父的子代理,提供完整 ID、搜索多选、只读预览、备份及确认删除。超限先询问,删除与重启重试只处理选中项(#58)。
|
|
30
|
+
|
|
31
|
+
### English
|
|
32
|
+
|
|
33
|
+
- Cascade permanent deletion and recovery through subagent descendants while preserving forks and independent recycle records. Persist targets before removal and quiesce live agents (#57).
|
|
34
|
+
- Add Unarchived using Archived’s workspace-group layout, with search above filters and a refresh icon at the right. Offer read-only chat previews and confirmed individual, workspace-wide, and global archiving; search and filters do not narrow bulk scope.
|
|
35
|
+
- Fix transparent dialog, preview-header, menu, and success-toast backgrounds with opaque Host surfaces that follow light and dark themes.
|
|
36
|
+
- Release interrupted export streams and refresh the sidebar and recycle list after partial deletion.
|
|
37
|
+
- Add an on-demand residual check in Storage & Retention for subagents with confirmed missing parents: full IDs, search, selection, read-only previews, backups and confirmed deletion. Ask before excluding oversized backups; delete and retry only selected records (#58).
|
|
38
|
+
|
|
7
39
|
## 1.4.6 — 2026-10-02
|
|
8
40
|
|
|
9
41
|
### 中文
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Archive Management gives DeepSeek Harness a place to find chats hidden from the
|
|
|
32
32
|
|
|
33
33
|
> The English name is **Archive Management**, and the Chinese name is **归档管理**. The installation package remains `dsh-archived-chats`.
|
|
34
34
|
>
|
|
35
|
-
> This document follows the `main` branch and targets 1.
|
|
35
|
+
> This document follows the `main` branch and targets 1.5.1. This release streamlines selected actions, adds global recycling, and checks residual chats automatically from the final storage summary card. See the [changelog](CHANGELOG.md) for release history.
|
|
36
36
|
|
|
37
37
|
## Quick start
|
|
38
38
|
|
|
@@ -57,29 +57,30 @@ dsh plugin --profile web update dsh-archived-chats
|
|
|
57
57
|
| Area | Current behavior |
|
|
58
58
|
| --- | --- |
|
|
59
59
|
| Browse and search | Workspace-grouped archived chats, full-text search, filters, sorting, tags, and notes. |
|
|
60
|
-
| Workspace archiving |
|
|
60
|
+
| Workspace archiving | Unarchived offers individual, workspace-wide, and global archiving with aggregate confirmation; blank, active, or unreadable chats are skipped. |
|
|
61
61
|
| Read-only preview | Conversations, reasoning, tool activity, Markdown, JSON, code, and readable stored images without unarchiving. |
|
|
62
62
|
| Backup | Export one workspace or the entire archive as JSON + Markdown ZIP; preview imports and skip conflicting IDs. |
|
|
63
|
-
| Recycle Bin | Move archived chats by workspace; restore one chat, a workspace, or the entire Recycle Bin back to Archived. |
|
|
63
|
+
| Recycle Bin | Move archived chats by workspace or selection; restore one chat, a workspace, or the entire Recycle Bin back to Archived. |
|
|
64
64
|
| Permanent deletion | Delete one archived chat, a workspace's archive, or all archived chats after confirmation. Recycle Bin deletion is separate. |
|
|
65
|
+
| Residual chat check | Entering Storage & Retention automatically checks for subagents whose parent no longer exists; search, select, preview, back up and confirm permanent deletion of selected records only. Empty chats are excluded. |
|
|
65
66
|
| Storage and relationships | Storage accounting, optional automatic Recycle Bin cleanup, and read-only Origins & Branches. |
|
|
66
67
|
|
|
67
|
-
The
|
|
68
|
+
The six views are **Archived**, **Unarchived**, **Recycle Bin**, **Storage & Retention**, **Origins & Branches**, and **About**. Unarchived shares Archived’s search, filters, and workspace-group layout, offering read-only chat previews and individual, workspace-wide, and global archiving. Archiving does not create historical versions; Recycle Bin protection snapshots support recovery, not a browsable version-history library.
|
|
68
69
|
|
|
69
70
|
## Screenshots
|
|
70
71
|
|
|
71
72
|
These screenshots show the current interface with synthetic example chats; they contain no private conversations. The [marketplace screenshot list](screenshots.json) uses the same files in the same order.
|
|
72
73
|
|
|
73
74
|
1. [Archived chats](assets/screenshots/preview-01.png)
|
|
74
|
-
2. [Full-text search](assets/screenshots/preview-02.png)
|
|
75
|
-
3. [
|
|
75
|
+
2. [Full-text search and selected actions](assets/screenshots/preview-02.png)
|
|
76
|
+
3. [Unarchived and workspace archiving](assets/screenshots/preview-03.png)
|
|
76
77
|
4. [Read-only preview](assets/screenshots/preview-04.png)
|
|
77
78
|
5. [Recycle Bin](assets/screenshots/preview-05.png)
|
|
78
79
|
6. [Restore confirmation](assets/screenshots/preview-06.png)
|
|
79
80
|
7. [Storage & Retention](assets/screenshots/preview-07.png)
|
|
80
81
|
8. [Origins & Branches](assets/screenshots/preview-08.png)
|
|
81
82
|
|
|
82
|
-
The Archived header has **
|
|
83
|
+
The Archived header has **Select** and **More**. More contains Import backup, Export all, Unarchive all, Move all to Recycle Bin, then Delete all after a separator. The Recycle Bin header directly shows **Restore all** and **Empty Recycle Bin** without a More menu. Recycle rows retain the preview icon and use compact **Restore** and **Delete** text buttons. Workspace and global restoration separately confirm scope, counts, and the Archived destination, skipping pending deletions. Empty Recycle Bin still requires irreversible-action confirmation. The header keeps consistent dimensions across tabs. Workspace actions and global export, unarchive, and deletion ask you to confirm the complete archive scope and chat count.
|
|
83
84
|
|
|
84
85
|
**About** shows the running version, author, license, guides, project and feedback links, and Check for updates. Opening the page checks public npm version metadata in the background, at most once every 12 hours during a running backend session; failures never block archive management. A newer version adds a **Get update** link beside the title, opening the plugin market without installing or restarting anything. Follow the host's restart guidance when convenient; a browser refresh alone may not load an updated backend. No chat or backup content is sent during update checks.
|
|
85
86
|
|
|
@@ -88,11 +89,11 @@ Preview keeps real user messages on the right and the assistant's work on the le
|
|
|
88
89
|
## Archive, recycle, or delete?
|
|
89
90
|
|
|
90
91
|
- **Archive:** retain a chat outside the main chat area. Unarchive returns it there.
|
|
91
|
-
- **Move to Recycle Bin:** available
|
|
92
|
+
- **Move to Recycle Bin:** available through workspace menus, header More → Move all to Recycle Bin, or More in selection mode. Recovery returns the chat to Archived; Unarchive then returns it to the main chat area.
|
|
92
93
|
- **Delete all on Archived:** permanently delete archived chats across all workspaces, not existing Recycle Bin entries.
|
|
93
94
|
- **Empty Recycle Bin:** permanently delete recycled chats and their associated protection data.
|
|
94
95
|
|
|
95
|
-
|
|
96
|
+
Choose Select to check one or more chats, then Unarchive or Delete permanently. More contains Export selected and Move to Recycle Bin. Select all checks only current search/filter results; hidden selections remain selected with a visible count. Cancel exits and clears the selection. Ordinary rows have no export or recycle buttons. Workspace and global actions include chats hidden by filters. Workspace actions do not delete workspace/project directories. See the [action scope table](docs/USER_GUIDE.md#actions-and-their-scope) before bulk operations.
|
|
96
97
|
|
|
97
98
|
Empty Recycle Bin acts only on the exact recycle-record incarnations shown at confirmation. Records added afterward are excluded; a changed target fails instead of widening the confirmed scope. A chat without a working directory remains in Archived because this Host cannot make it reachable from the main chat list; a missing workspace alone can still restore as ungrouped.
|
|
98
99
|
|
|
@@ -134,7 +135,7 @@ The package declares DSH `>=0.1.0-rc.7`; individual features depend on public Ho
|
|
|
134
135
|
|
|
135
136
|
Recycle Bin preview still depends on the original session; a missing original may prevent preview even when a protection snapshot can restore it. See [compatibility and limits](docs/USER_GUIDE.md#compatibility-and-limits).
|
|
136
137
|
|
|
137
|
-
The declared 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 the official `@deepseek-ai/dsh-session@0.1.7-rc.2` Host backend integration (
|
|
138
|
+
The declared 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 the official `@deepseek-ai/dsh-session@0.1.7-rc.2` Host backend integration (7/7) and package checks, including the v4 session format.
|
|
138
139
|
|
|
139
140
|
## Documentation
|
|
140
141
|
|
|
@@ -159,7 +160,7 @@ node scripts/run-native-integration.mjs
|
|
|
159
160
|
npm pack --dry-run --json
|
|
160
161
|
```
|
|
161
162
|
|
|
162
|
-
The suite covers Host and browser behavior, export/import, snapshot fallback recovery, Recycle Bin, retention, search, responsive layout, public types, package contents, and repository hygiene. The native commands install the locked `@deepseek-ai/dsh-session@0.1.7-rc.2` fixture and require all
|
|
163
|
+
The suite covers Host and browser behavior, export/import, snapshot fallback recovery, Recycle Bin, retention, search, responsive layout, public types, package contents, and repository hygiene. The native commands install the locked `@deepseek-ai/dsh-session@0.1.7-rc.2` fixture and require all seven native integration cases to run without skips. All checks use isolated temporary data and never read real sessions.
|
|
163
164
|
|
|
164
165
|
## Uninstall
|
|
165
166
|
|
package/README.zh-CN.md
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
> 中文名称为「归档管理」,英文名称为 Archive Management;安装包名始终为 `dsh-archived-chats`。
|
|
32
32
|
>
|
|
33
|
-
> 本文跟随 `main` 分支维护,适用于 1.
|
|
33
|
+
> 本文跟随 `main` 分支维护,适用于 1.5.1。本版精简选择操作,补充全局回收入口,并将残留会话整合到空间统计卡片自动检查。版本变更见[更新日志](CHANGELOG.md)。
|
|
34
34
|
|
|
35
35
|
## 快速开始
|
|
36
36
|
|
|
@@ -55,29 +55,30 @@ dsh plugin --profile web update dsh-archived-chats
|
|
|
55
55
|
| 范围 | 当前行为 |
|
|
56
56
|
| --- | --- |
|
|
57
57
|
| 浏览与搜索 | 按工作区浏览归档聊天,支持全文搜索、筛选、排序、标签与备注。 |
|
|
58
|
-
| 工作区批量归档 |
|
|
58
|
+
| 工作区批量归档 | 未归档视图支持单条、工作区和全局归档,汇总确认后执行;跳过空白、正在使用或无法确认内容的聊天。 |
|
|
59
59
|
| 只读预览 | 无需取消归档即可查看对话、思考、工具活动、Markdown、JSON、代码及可读取的已存储图片。 |
|
|
60
60
|
| 备份 | 支持按工作区或全部归档导出 JSON + Markdown ZIP;导入先预览,跳过冲突 ID。 |
|
|
61
|
-
| 回收站 |
|
|
61
|
+
| 回收站 | 按工作区或勾选聊天移入回收站;支持单条、工作区和整个回收站恢复到已归档。 |
|
|
62
62
|
| 永久删除 | 确认后删除单条归档、工作区归档或全部归档;回收站删除独立操作。 |
|
|
63
|
+
| 残留会话检查 | 进入空间与策略时自动检查父会话已不存在的子代理,支持明细搜索、多选、预览、备份及确认后永久删除;只删除选中项,不清理空会话。 |
|
|
63
64
|
| 空间与关系 | 空间分账、可选的回收站自动清理,以及只读「来源与分支」。 |
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
六个视图为 **已归档**、**未归档**、**回收站**、**空间与策略**、**来源与分支** 和 **关于**。未归档复用已归档的搜索、筛选和工作区分组排版,提供只读预览、单条归档、工作区全部归档和全局全部归档。归档不会创建历史版本;回收站保护快照仅用于恢复,不是可浏览的历史版本库。
|
|
66
67
|
|
|
67
68
|
## 界面截图
|
|
68
69
|
|
|
69
70
|
以下截图使用虚构示例聊天展示当前界面,不含私人会话。[插件市场截图清单](screenshots.json)使用相同文件及顺序。
|
|
70
71
|
|
|
71
72
|
1. [已归档聊天](assets/screenshots/preview-01.png)
|
|
72
|
-
2. [
|
|
73
|
-
3. [
|
|
73
|
+
2. [全文搜索与选择操作](assets/screenshots/preview-02.png)
|
|
74
|
+
3. [未归档与工作区归档](assets/screenshots/preview-03.png)
|
|
74
75
|
4. [只读预览](assets/screenshots/preview-04.png)
|
|
75
76
|
5. [回收站](assets/screenshots/preview-05.png)
|
|
76
77
|
6. [恢复确认](assets/screenshots/preview-06.png)
|
|
77
78
|
7. [空间与策略](assets/screenshots/preview-07.png)
|
|
78
79
|
8. [来源与分支](assets/screenshots/preview-08.png)
|
|
79
80
|
|
|
80
|
-
|
|
81
|
+
已归档页顶部提供 **选择** 和 **更多**;未归档页顶部提供 **全部归档**,筛选行最右侧提供刷新图标;「更多」依次提供导入备份、全部导出、全部取消归档、全部移入回收站,分隔线后为全部删除。回收站顶部直接并列显示 **全部恢复** 和 **清空回收站**,不再设更多菜单;聊天行保留预览图标,使用紧凑的 **恢复** 和 **删除** 文字按钮。工作区恢复和全局恢复分别确认范围、数量及已归档去向,跳过正在永久删除的条目;清空仍须确认不可恢复的后果。各 Tab 顶部保持一致尺寸。工作区操作及全局导出、取消归档、删除均先确认完整归档范围和聊天数量。
|
|
81
82
|
|
|
82
83
|
「关于」展示当前运行版本、作者、许可证、指南、项目与反馈链接,提供「检查更新」。打开页面时后台查询公开 npm 版本信息,运行期间自动检查间隔至少 12 小时;失败不会阻断归档功能。有新版时标题旁显示「去更新」,打开插件市场,不自动安装或重启。更新后按宿主提示自行安排重启 DSH,仅刷新网页不一定能加载新版后端。
|
|
83
84
|
|
|
@@ -86,11 +87,11 @@ dsh plugin --profile web update dsh-archived-chats
|
|
|
86
87
|
## 归档、回收与删除的区别
|
|
87
88
|
|
|
88
89
|
- **归档:** 保留聊天,但从主页面会话区隐藏;取消归档后返回主页面。
|
|
89
|
-
- **移入回收站:**
|
|
90
|
+
- **移入回收站:** 通过工作区菜单、顶部「更多 → 全部移入回收站」或选择模式的「更多」操作。恢复先回到已归档,再取消归档返回主页面。
|
|
90
91
|
- **归档页「全部删除」:** 永久删除所有工作区的已归档聊天,不影响已经在回收站中的聊天。
|
|
91
92
|
- **「清空回收站」:** 永久删除回收聊天及其关联保护数据。
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
点击「选择」进入选择模式,可勾选一条或多条聊天后取消归档或永久删除;「更多」提供导出选中和移入回收站。「全选」只勾选当前搜索/筛选结果,隐藏的已选项保留并显示数量;「取消」退出并清空选择。普通列表不增加单条导出或移入回收站按钮。工作区和全部操作包含被筛选隐藏的聊天;工作区操作不会删除工作区或项目目录。批量操作前可查看[操作范围表](docs/USER_GUIDE.zh-CN.md#操作入口与范围)。
|
|
94
95
|
|
|
95
96
|
清空回收站只作用于确认时展示的精确回收记录实例。之后新增的记录不纳入本次操作;目标已变更时会失败,不会扩大已确认范围。没有工作目录的聊天会留在已归档,因为当前 Host 无法让它在主聊天列表中可达;仅缺少工作区不等同于没有工作目录,仍可以未分组方式恢复。
|
|
96
97
|
|
|
@@ -132,7 +133,7 @@ dsh plugin --profile web update dsh-archived-chats
|
|
|
132
133
|
|
|
133
134
|
回收站预览目前仍依赖原会话;原件丢失时,即使保护快照可恢复,也可能无法预览。详见[兼容性与限制](docs/USER_GUIDE.zh-CN.md#兼容性与限制)。
|
|
134
135
|
|
|
135
|
-
声明的版本范围仍以 Host 公开能力为准。发布自动化在 Ubuntu 上测试 Node.js 18,并在 Ubuntu、macOS 和 Windows 上测试 Node.js 24;Node.js 24 矩阵强制运行基于官方 `@deepseek-ai/dsh-session@0.1.7-rc.2` 的 Host 后端集成(
|
|
136
|
+
声明的版本范围仍以 Host 公开能力为准。发布自动化在 Ubuntu 上测试 Node.js 18,并在 Ubuntu、macOS 和 Windows 上测试 Node.js 24;Node.js 24 矩阵强制运行基于官方 `@deepseek-ai/dsh-session@0.1.7-rc.2` 的 Host 后端集成(7/7)与打包检查,覆盖 v4 会话格式。
|
|
136
137
|
|
|
137
138
|
## 文档
|
|
138
139
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/ARCHITECTURE.en.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English · [中文](ARCHITECTURE.md) · [User guide](USER_GUIDE.md)
|
|
4
4
|
|
|
5
|
-
This document follows `main` and covers 1.
|
|
5
|
+
This document follows `main` and covers 1.5.1 behavior. This release streamlines selected actions, adds global recycling, and checks residual chats automatically from the final storage summary card. 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
|
## Product boundary and modules
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ The plugin supplements archive management; it does not replace DSH's main chat a
|
|
|
11
11
|
| Module (under `lib/`) | Responsibility |
|
|
12
12
|
| --- | --- |
|
|
13
13
|
| `index.js` | Host capability resolution, routes, archive visibility, lifecycle queue, physical deletion |
|
|
14
|
-
| `client.js` | Settings page,
|
|
14
|
+
| `client.js` | Settings page, six views, dialogs, native archive notice, request state |
|
|
15
15
|
| `about.js` | Local plugin identity, bounded public version checks, in-memory cache |
|
|
16
16
|
| `persistence-compat.js` | Legacy inspect and modern read-handle adaptation; separate title reads |
|
|
17
17
|
| `workspace-bulk-archive.js` | Eligible workspace chats, short-lived confirmation, apply-time checks |
|
|
@@ -21,8 +21,9 @@ The plugin supplements archive management; it does not replace DSH's main chat a
|
|
|
21
21
|
| `search.js`, `stats.js`, `insights.js` | Message projection/search, directory measurements, storage accounting |
|
|
22
22
|
| `retention.js`, `retention-service.js`, `auto-retention.js` | Policy, confirmation/revalidation, startup recovery and scheduling |
|
|
23
23
|
| `lineage.js` | Read-only source, fork, and subagent projection |
|
|
24
|
+
| `session-graph.js` | Session-id normalization, subagent descendant resolution, orphan classification |
|
|
24
25
|
|
|
25
|
-
The UI moves chats to the Recycle Bin
|
|
26
|
+
The UI moves chats to the Recycle Bin through workspace actions, the global header menu, or selection mode. Rows can permanently delete or unarchive. Workspace export and export-all remain. A compatibility backend endpoint accepting one ID does not imply a row-level recycle action.
|
|
26
27
|
|
|
27
28
|
Standalone History, legacy-snapshot recovery copies, and cleanup-preview UI are retired. `history.js`, `history-restore.js`, and `legacy-recycle.js` are not current modules.
|
|
28
29
|
|
|
@@ -57,6 +58,11 @@ POST /plugins/dsh-archived-chats/unarchive
|
|
|
57
58
|
POST /plugins/dsh-archived-chats/unarchive-all
|
|
58
59
|
POST /plugins/dsh-archived-chats/delete
|
|
59
60
|
POST /plugins/dsh-archived-chats/delete-all
|
|
61
|
+
GET /plugins/dsh-archived-chats/unarchived
|
|
62
|
+
POST /plugins/dsh-archived-chats/unarchived/export
|
|
63
|
+
GET /plugins/dsh-archived-chats/orphans
|
|
64
|
+
POST /plugins/dsh-archived-chats/orphans/delete
|
|
65
|
+
POST /plugins/dsh-archived-chats/orphans/export
|
|
60
66
|
```
|
|
61
67
|
|
|
62
68
|
Except for export, these POST routes require `x-dsh-archived-chats: 1`. Content preview, images, and search also use guarded POST. Export separately accepts a bounded native form without this header guard and checks current archive visibility for the requested sessions. Other routes parse their respective bounded payloads.
|
|
@@ -67,6 +73,12 @@ All `/history` and `/history/*` routes are removed; their former 410 response is
|
|
|
67
73
|
|
|
68
74
|
Recycle endpoints call `restore`, `purge`, and `empty`. Empty requires the exact `trashed`/`degraded` record incarnations captured by the confirmation, including recycle and snapshot identity. The service purges only those targets: later records are excluded, and changed targets fail instead of expanding or recomputing the scope. Existing `purge-pending` tasks continue only through their independent retry flow. Canonical exclusive-directory checks authorize session-owned deletion; they do not claim broad filesystem deletion guarantees, and uncertain outcomes retain their durable records.
|
|
69
75
|
|
|
76
|
+
The orphan routes are the only place this plugin destroys a session that was never archived. `GET /orphans` lists the residue: subagent sessions whose parent no longer exists, plus top-level sessions that never recorded a turn. A subagent whose parent is still stored is reachable through that parent and is not listed, and neither is a branched chat, which is an independent conversation. Blankness cannot be read from a header, so it is decided by reading the log, and the scan yields cooperatively and supports cancellation instead of silently truncating a fixed prefix. Operation checks inspect only selected blank candidates and preserve unreadable logs.
|
|
77
|
+
|
|
78
|
+
`POST /orphans/delete` and `POST /orphans/export` never trust the id list they are handed: both recompute the orphan set and refuse the entire request with `orphan-set-changed` when any id is invalid at the start of the operation. Each item is checked again before its deletion; later external Host changes can produce partial results. Being an orphan is what replaces the archive precondition, so without that check the route would delete any session by id. Delete reuses the whole permanent-delete path — exclusive-directory verification, snapshot sweeping, live disposal, the durable `purge-pending` intent, and the registry index purge — with the archive precondition as the single step lifted. Export reuses the archive export writer and its budgets, and like `/export` it accepts a bounded native form with no guard header. Preview and preview-image accept `scope: "orphan"`, whose visibility authority is the same recomputed orphan set.
|
|
79
|
+
|
|
80
|
+
The product entry uses `kind=subagent` for scan, export and delete, with `scope: "orphan-subagent"` for strict previews. Requests without kind retain legacy compatibility. Strict deletion persists `purgeSelectedOnly: true` on pending records and removes selected IDs only; restart recovery does not expand the descendant tree.
|
|
81
|
+
|
|
70
82
|
## State, ownership, and durability
|
|
71
83
|
|
|
72
84
|
Plugin state lives under `$DSH_HOME/plugin-data/archived-chats/`:
|
|
@@ -86,12 +98,12 @@ Metadata and recycle writes are serialized and published through temporary files
|
|
|
86
98
|
|
|
87
99
|
## Workspace bulk archive
|
|
88
100
|
|
|
89
|
-
The client registers `settings.section` and `shell.overlay`. Its
|
|
101
|
+
The client registers `settings.section` and `shell.overlay`. Its Unarchived conversation list lives in **Settings → Archive Management / 设置 → 归档管理**, without depending on a workspace-menu extension or shared client store.
|
|
90
102
|
|
|
91
|
-
1. List
|
|
92
|
-
2.
|
|
93
|
-
3.
|
|
94
|
-
4. Apply
|
|
103
|
+
1. List workspace conversations in Unarchived, excluding archived, recycled, pending deletion, and subagent rows. Use `readSession` for cold forks and preserve metadata.
|
|
104
|
+
2. Individual archiving binds `sessionIds`; workspace and global actions cover complete workspaces regardless of search or filters. A stale individual target fails rather than expanding scope.
|
|
105
|
+
3. Show one aggregate confirmation. Empty preparations return to the refreshed list.
|
|
106
|
+
4. Apply token/nonce confirmations, rechecking membership and running status after asynchronous inspection. Refresh archive, Unarchived, sidebar, and storage consumers after success.
|
|
95
107
|
|
|
96
108
|
Apply accepts credentials, not caller-added session IDs. Under the lifecycle queue, each chat is rechecked for workspace membership, archive state, agent state, and a real `turn/start`. Blank chats yield `session-empty`; unverifiable content yields `session-unavailable`. Older Hosts without agent status conservatively skip loaded chats. Candidate inspection concurrency is eight.
|
|
97
109
|
|
|
@@ -125,7 +137,11 @@ Turn projection retains recorded boundaries and process/final-response positions
|
|
|
125
137
|
|
|
126
138
|
Export download uses a guarded fetch, validates status, ZIP content type, and attachment disposition, then buffers the complete response before creating a Blob URL. It has a five-minute end-to-end timeout and a 320 MiB response-byte cap for declared and streamed bodies. The cap is not a peak-heap guarantee because chunks, the contiguous buffer, and Blob can coexist; the non-stream WebView fallback has no stronger universal memory ceiling. Completion says the download started, not that the browser saved it to disk.
|
|
127
139
|
|
|
128
|
-
|
|
140
|
+
Selection mode stores checked IDs on the client. Select all uses filtered `group.items`; workspace actions keep complete `group.sessionIds`. Hidden selections have a visible count. Cancel or navigation clears the set, and list updates prune missing IDs. Confirmation captures the exact ID snapshot and reuses existing export, unarchive, and deletion APIs. Selection mode hides row mutations and global/workspace menus, retaining preview; More contains Export selected and Move to Recycle Bin.
|
|
141
|
+
|
|
142
|
+
Archive row actions are preview, edit tags/note, Unarchive, and Delete. The header exposes More; Unarchived reuses `GroupSection`, with search above filters and a refresh icon at the right; rows offer a read-only preview icon and Archive, while workspace menus and the header offer Archive all; More contains Import backup, Export all, Unarchive all, Move all to Recycle Bin, a separator, and Delete all. Header geometry stays consistent across tabs. Workspace menus contain Unarchive all, Move all to Recycle Bin, Export all, a separator, and Delete all; every action confirms the full workspace name and complete archive count. Global export/unarchive/delete confirms all archived chats across workspaces, excluding trash. Filters do not narrow these scopes. Delete/Delete all labels lead to concise irreversible-action confirmation naming the chat, workspace, or global scope. Recycle rows retain the preview icon and use compact Restore/Delete text buttons matching archive rows. Recycle workspace actions are Restore all and Delete all; its header directly offers text-only Restore all and Empty Recycle Bin, without a More menu. Empty still requires irreversible-action confirmation. Primary buttons and selected tabs use neutral theme colors that invert in dark mode, while destructive actions remain red. Workspace/global restoration separately confirms the workspace name or global workspace count, eligible chat counts, and Archived destination, skipping purge-pending. A synchronous submission lock prevents duplicates; results retain actual success/failure counts and View Archived navigation. Both deleted and pending IDs leave actionable archive rows while failures remain explained and related state refreshes.
|
|
143
|
+
|
|
144
|
+
Plugin confirmation, preview, import, metadata, storage, and retention dialogs share the opaque `--dsw-alias-bg-layer-2` surface and Host prominent elevation, with a legacy shadow fallback. Menus and toasts use opaque theme layers. Masks and hover states retain their intentional transparency; frosted menu tokens are not used as dialog backgrounds.
|
|
129
145
|
|
|
130
146
|
## About and version discovery
|
|
131
147
|
|
|
@@ -163,6 +179,10 @@ Snapshot sweeping uses manifest ownership and the record's named snapshotId to c
|
|
|
163
179
|
|
|
164
180
|
Failures retain purge-pending. Startup and runtime retries continue these tasks, never restore them to ordinary chats. Archive deletion rejects existing recycle records, protecting the Recycle Bin from archive-wide Delete all. Purging snapshot copies does not promise global attachment cleanup or Host session_projcache eviction; no corresponding safe public eviction API is used.
|
|
165
181
|
|
|
182
|
+
Destroying a session also destroys its subagent descendants, transitively, so a deletion cannot strand sessions that no workspace owns and no view lists. Session ids are stored in two dialects — a bare UUID and the same UUID behind `session-` — and one edge may mix them, so every parent/child comparison normalizes first; without that, each parent looks absent and the cascade silently finds nothing. Only `origin: "subagent"` edges are followed. A branched chat keeps a pointer to the chat it came from but is an independent conversation, so neither it nor its own subagents are cascade targets. Descendants are resolved *before* the parent is destroyed, because a child edge is only visible while its parent is still listed; resolving afterwards would strand exactly the sessions the cascade exists to remove.
|
|
183
|
+
|
|
184
|
+
Cascade runs on the permanent paths only: direct archive deletion, recycle purge, Empty Recycle Bin, and automatic retention. A move to the Recycle Bin leaves the original log on disk, so its subagents are not orphans yet — they become orphans exactly when the parent's log is destroyed, which is where the cascade runs. Descendants are never archived, so they take the direct permanent-delete path with only the archive precondition lifted; exclusive-directory verification, snapshot sweeping, live disposal, and registry index cleanup are all shared with an archived session. A descendant that already owns a recycle record keeps its own lifecycle, and a parent whose own deletion failed still exists, so its subagents are kept.
|
|
185
|
+
|
|
166
186
|
## Startup recovery and old-data cleanup
|
|
167
187
|
|
|
168
188
|
recoverStartup performs:
|
|
@@ -214,6 +234,12 @@ npm pack --dry-run --json
|
|
|
214
234
|
git diff --check
|
|
215
235
|
```
|
|
216
236
|
|
|
217
|
-
The native commands install the locked `@deepseek-ai/dsh-session@0.1.7-rc.2` fixture and require all
|
|
237
|
+
The native commands install the locked `@deepseek-ai/dsh-session@0.1.7-rc.2` fixture and require all seven native integration cases to run without skips. This is the local equivalent of the mandatory native Host integration gate in CI.
|
|
238
|
+
|
|
239
|
+
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 the official `@deepseek-ai/dsh-session@0.1.7-rc.2` Host backend integration (7/7) and package checks, including the v4 session format. The [screenshots](../screenshots.json) show the current interface with synthetic example chats.
|
|
240
|
+
|
|
241
|
+
Permanent deletion quiesces live agents before the final descendant inventory. Optional `cascadeSessionIds` in the parent purge-pending record persist the complete targets until every descendant finishes, so startup can recover after the parent directory disappears. Forks and subtrees with independent recycle records remain outside the cascade. Do not downgrade to a version that does not understand this field while these records are pending.
|
|
242
|
+
|
|
243
|
+
`GET /unarchived` is read-only; `/unarchived/export` and preview `scope: "unarchived"` validate current workspace visibility. Normal conversations gain no direct permanent-delete route. Cleanup UI retains `/orphans` authority checks.
|
|
218
244
|
|
|
219
|
-
|
|
245
|
+
Storage & Retention combines four storage cards and one residual chat card. Entry triggers a subagent residual scan; navigation cancels it, and late responses cannot replace newer results. View details opens the management dialog explicitly. Measurement and recovery-snapshot issues appear only in their respective cards. Residual bytes are excluded from the archive/recycle measured total.
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](ARCHITECTURE.en.md) · 中文 · [用户指南](USER_GUIDE.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
本文跟随 `main` 分支,功能对应 1.
|
|
5
|
+
本文跟随 `main` 分支,功能对应 1.5.1。本版精简选择操作,补充全局回收入口,并将残留会话整合到空间统计卡片自动检查。版本变更见[更新日志](../CHANGELOG.md)。运行时代码是接口与行为的依据;用户操作说明与本文应保持一致。
|
|
6
6
|
|
|
7
7
|
## 产品边界与模块
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| 模块(均位于 `lib/`) | 职责 |
|
|
12
12
|
| --- | --- |
|
|
13
13
|
| `index.js` | Host 能力解析、路由、归档可见性、生命周期队列及物理删除 |
|
|
14
|
-
| `client.js` |
|
|
14
|
+
| `client.js` | 设置页、六个主视图、弹窗、原生归档提示与请求状态 |
|
|
15
15
|
| `about.js` | 本地插件信息、受限的公开版本查询与运行期缓存 |
|
|
16
16
|
| `persistence-compat.js` | 旧版 inspect 与新版只读句柄适配,独立标题读取 |
|
|
17
17
|
| `workspace-bulk-archive.js` | 工作区归档候选、短效确认、执行重检 |
|
|
@@ -21,8 +21,9 @@
|
|
|
21
21
|
| `search.js`、`stats.js`、`insights.js` | 消息投影与搜索、会话目录测量、空间分账 |
|
|
22
22
|
| `retention.js`、`retention-service.js`、`auto-retention.js` | 策略、确认与重检、启动恢复及定时任务 |
|
|
23
23
|
| `lineage.js` | 只读来源、分叉与子代理关系投影 |
|
|
24
|
+
| `session-graph.js` | 会话 ID 归一化、子代理后代解析与孤儿分类 |
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
界面通过工作区操作、全局顶部菜单或选择模式移入回收站;选择一条或多条后可导出、取消归档及永久删除。普通行保留原有操作,不增加单条回收和导出按钮。保留完整工作区与全局批量操作。
|
|
26
27
|
|
|
27
28
|
独立 History、旧快照恢复副本和预览清理界面已移除。`history.js`、`history-restore.js`、`legacy-recycle.js` 不是当前模块。
|
|
28
29
|
|
|
@@ -57,6 +58,11 @@ POST /plugins/dsh-archived-chats/unarchive
|
|
|
57
58
|
POST /plugins/dsh-archived-chats/unarchive-all
|
|
58
59
|
POST /plugins/dsh-archived-chats/delete
|
|
59
60
|
POST /plugins/dsh-archived-chats/delete-all
|
|
61
|
+
GET /plugins/dsh-archived-chats/unarchived
|
|
62
|
+
POST /plugins/dsh-archived-chats/unarchived/export
|
|
63
|
+
GET /plugins/dsh-archived-chats/orphans
|
|
64
|
+
POST /plugins/dsh-archived-chats/orphans/delete
|
|
65
|
+
POST /plugins/dsh-archived-chats/orphans/export
|
|
60
66
|
```
|
|
61
67
|
|
|
62
68
|
除导出外,上述 POST 路由要求 `x-dsh-archived-chats: 1`。读取对话内容的预览、图片、搜索也使用受保护 POST。导出单独接受有界原生表单,不使用此 header 守卫,并检查所请求会话的当前归档可见性;其余路由按各自限定解析载荷。
|
|
@@ -67,6 +73,12 @@ POST /plugins/dsh-archived-chats/delete-all
|
|
|
67
73
|
|
|
68
74
|
回收接口分别调用 `restore`、`purge`、`empty`。empty 要求确认时捕获的精确 `trashed`/`degraded` 记录实例,包括回收与快照身份。服务只清理这些目标:之后新增的记录被排除,已变更目标失败,不扩大或重算范围。已有 `purge-pending` 任务只由独立重试流程续作。规范的独占目录检查只授权删除会话所有的目标,不是广义文件系统删除保证;结果不确定时保留持久记录。
|
|
69
75
|
|
|
76
|
+
孤儿路由是本插件唯一销毁从未归档会话的地方。`GET /orphans` 列出残留:父会话已不存在的子代理会话,以及从未记录任何轮次的顶层会话。父会话仍在存储中的子代理可经由该父访问,因此不列出;分叉会话是独立会话,同样不列出。空白无法从 header 判断,只能读取日志决定,扫描定期让出事件循环并支持请求取消,不按固定前缀静默截断;操作校验只检查请求中选定的空会话。无法读取日志时保留会话。
|
|
77
|
+
|
|
78
|
+
`POST /orphans/delete` 与 `POST /orphans/export` 绝不信任收到的 ID 列表:两者都重新计算孤儿集合,开始操作时只要有一个 ID 已不再是孤儿,就整体拒绝并返回 `orphan-set-changed`。孤儿身份正是替代归档前置校验的东西;没有这项检查,该路由就能按 ID 删除任意会话。删除完整复用永久删除路径——独占目录校验、快照清扫、活动会话处置、持久 `purge-pending` 意图与注册表索引清理——仅解除归档前置校验这一步。导出复用归档导出写入器及其预算,并且与 `/export` 一样接受有界原生表单、不使用 guard header。预览与图片预览接受 `scope: "orphan"`,其可见性依据是同一个重新计算的孤儿集合。
|
|
79
|
+
|
|
80
|
+
产品入口使用 `kind=subagent` 查询参数限定扫描、导出和删除范围;严格预览使用 `scope: "orphan-subagent"`。无 kind 的旧接口保留兼容。严格删除将 `purgeSelectedOnly: true` 持久保存到待删除记录,只删除选中项,重启续作不会重新展开子代理树。
|
|
81
|
+
|
|
70
82
|
## 状态、所有权与持久化
|
|
71
83
|
|
|
72
84
|
插件状态根目录是 `$DSH_HOME/plugin-data/archived-chats/`:
|
|
@@ -86,12 +98,12 @@ Host 的归档注册表决定归档归属;正常可见归档列表排除回收
|
|
|
86
98
|
|
|
87
99
|
## 工作区批量归档
|
|
88
100
|
|
|
89
|
-
客户端注册 `settings.section` 和 `shell.overlay`,在 **Settings → Archive Management / 设置 → 归档管理**
|
|
101
|
+
客户端注册 `settings.section` 和 `shell.overlay`,在 **Settings → Archive Management / 设置 → 归档管理** 内维护未归档会话列表,不依赖工作区菜单扩展或共享客户端 store。
|
|
90
102
|
|
|
91
|
-
1.
|
|
92
|
-
2.
|
|
93
|
-
3.
|
|
94
|
-
4.
|
|
103
|
+
1. 未归档列表读取工作区会话,排除已归档、回收、待删除及子代理行;冷分叉通过 `readSession` 读取,保留标签备注。
|
|
104
|
+
2. 单条归档用 `sessionIds` 限定 ID;工作区与全局操作覆盖完整工作区,范围不随搜索或筛选改变。失效的单条目标整体拒绝,不扩大范围。
|
|
105
|
+
3. 显示一次汇总确认;空准备返回刷新后的列表。
|
|
106
|
+
4. 执行 token/nonce 确认,在异步读取后重检工作区及运行状态。成功后刷新归档、未归档、侧栏及空间状态。
|
|
95
107
|
|
|
96
108
|
apply 只接受凭据,不接受调用方增补会话 ID。每条执行前在生命周期队列内检查工作区归属、归档状态、agent 状态及真实 `turn/start`。空白为 `session-empty`,内容无法确认则 `session-unavailable`;没有 agent 状态的旧 Host 会保守跳过已加载会话。候选内容检查最多并发 8 条。
|
|
97
109
|
|
|
@@ -125,7 +137,11 @@ apply 只接受凭据,不接受调用方增补会话 ID。每条执行前在
|
|
|
125
137
|
|
|
126
138
|
导出下载使用受保护 fetch,验证状态、ZIP 内容类型和附件 disposition,缓冲完整响应后才创建 Blob URL。端到端超时为五分钟,已声明及流式响应上限为 320 MiB 字节。该上限不是峰值堆内存保证,因为分块、连续缓冲区和 Blob 可能同时存在;非流式 WebView 回退也没有更强的通用内存上限。完成文案表示已开始下载,不表示浏览器已保存到磁盘。
|
|
127
139
|
|
|
128
|
-
|
|
140
|
+
归档行操作为预览、编辑标签备注、取消归档、删除。顶部提供更多;未归档复用 `GroupSection`,搜索在筛选行上方,刷新图标靠右;会话行提供只读预览图标和归档,工作区菜单和顶部提供全部归档;更多菜单依次为导入备份、全部导出、全部取消归档、全部移入回收站、分隔线、全部删除,各 Tab 顶部保持一致尺寸。工作区菜单依次为全部取消归档、全部移入回收站、全部导出、分隔线、全部删除,每项均确认完整工作区名称和全部归档聊天数。全局导出/取消归档/删除确认所有工作区归档数量,排除回收站;筛选不缩小这些范围。「删除/全部删除」进入简短的不可恢复确认,点明聊天、工作区或全局范围。回收站聊天行保留预览图标,恢复/删除使用与归档行一致的紧凑文字按钮。工作区操作为全部恢复和全部删除;顶部直接并列显示纯文字的全部恢复和清空回收站,不再设置更多菜单;清空仍须不可恢复确认。主按钮和选中 Tab 使用随深色模式反转的黑白主题色,危险操作保留红色。两级恢复确认分别说明工作区名称或全局工作区数、可恢复聊天数及已归档去向,跳过 purge-pending。同步提交锁避免重复请求;反馈保留实际成功/失败数量及查看已归档入口。永久删除响应中的 deleted 和 pending 都从可操作归档列表移除,同时保留失败说明并刷新相关状态。
|
|
141
|
+
|
|
142
|
+
选择模式在客户端保存已选 ID 集合。全选从筛选后的 `group.items` 获取范围;工作区批量操作仍使用完整 `group.sessionIds`。隐藏选择显示数量,切换页面或取消清空集合,列表更新后剔除已不存在的 ID。操作确认捕获 ID 快照并复用现有导出、取消归档和删除接口。选择模式隐藏行内修改及全局/工作区菜单,保留预览,更多提供导出选中和移入回收站。
|
|
143
|
+
|
|
144
|
+
所有插件确认、预览、导入、元数据、空间和保留策略弹窗共用不透明的 `--dsw-alias-bg-layer-2` 背景及宿主 prominent elevation,兼容旧版阴影。菜单和提示使用不透明主题层;遮罩与悬停状态保留各自的半透明用途,避免将磨砂菜单 token 直接用于弹窗主体。
|
|
129
145
|
|
|
130
146
|
## 关于与版本查询
|
|
131
147
|
|
|
@@ -163,6 +179,10 @@ apply 只接受凭据,不接受调用方增补会话 ID。每条执行前在
|
|
|
163
179
|
|
|
164
180
|
失败保留 `purge-pending`。启动恢复和运行中的重试继续处理这些任务,不将其恢复为普通聊天。归档删除拒绝已有回收记录,所以归档页全部删除不会波及回收站。删除快照副本不承诺清除 Host 全局附件或 `session_projcache`;插件没有对应的安全公开 eviction API。
|
|
165
181
|
|
|
182
|
+
删除会话会连带递归删除其全部子代理后代,因此一次删除不会遗留任何工作区都不拥有、任何视图都不列出的会话。会话 ID 以两种方言存储——裸 UUID 与带 `session-` 前缀的同一 UUID——且同一条边可能混用,因此每次父子比较都先归一化;不做归一化时每个父都判为缺失,级联会静默地什么都找不到。只沿 `origin: "subagent"` 的边遍历。分叉会话保留指向来源会话的指针,但它是独立会话,因此它本身及其子代理都不是级联目标。后代在父会话被销毁**之前**解析:子边只在父仍在清单中时可见,之后再解析只会遗留那些级联本应删除的会话。
|
|
183
|
+
|
|
184
|
+
级联只在永久路径上执行:归档直接永久删除、回收站永久删除、清空回收站、自动保留清理。移入回收站不删除原日志,其子代理此时还不是孤儿——它们恰好在父日志被销毁时成为孤儿,而级联正运行在那里。后代从未归档,因此走直接永久删除路径,仅解除归档前置校验;独占目录校验、快照清扫、活动会话处置与注册表索引清理都与归档会话共用。已有回收记录的后代保留自己的生命周期;自身删除失败的父会话仍然存在,因此其子代理被保留。
|
|
185
|
+
|
|
166
186
|
## 启动恢复与旧数据清理
|
|
167
187
|
|
|
168
188
|
`recoverStartup` 依次:
|
|
@@ -216,4 +236,10 @@ git diff --check
|
|
|
216
236
|
|
|
217
237
|
原生集成命令会安装锁定的 `@deepseek-ai/dsh-session@0.1.7-rc.2` fixture,并要求六个原生集成用例全部执行且不能跳过;这是 CI 强制原生 Host 集成门禁的本地等价检查。
|
|
218
238
|
|
|
219
|
-
声明的 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` 的 Host 后端集成(
|
|
239
|
+
声明的 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` 的 Host 后端集成(7/7)与打包检查,覆盖 v4 会话格式。[截图](../screenshots.json)使用虚构示例聊天展示当前界面。
|
|
240
|
+
|
|
241
|
+
永久删除在最终读取子代理关系前先取消并释放活动代理。完整后代集合以可选 `cascadeSessionIds` 保存到父会话的 `purge-pending` 记录;父目录消失后也保留该记录,直到所有子代理清理完成。启动重试据此恢复级联,不跨越分叉或已有独立回收记录的子树。待重试记录清空前不要降级到不支持此字段的版本。
|
|
242
|
+
|
|
243
|
+
`GET /unarchived` 为只读列表;`/unarchived/export` 和预览的 `scope: "unarchived"` 校验当前工作区可见性。普通会话没有新增直接永久删除路由;清理筛选继续使用 `/orphans` 的严格授权校验。
|
|
244
|
+
|
|
245
|
+
空间与策略顶部由四张空间统计卡片和一张残留会话卡片组成。进入该页时发起一次子代理残留检查,离开时取消请求,迟到响应不覆盖后续结果;查看后才打开明细。目录统计异常与恢复快照异常仅在对应卡片中提示,不再单列零值诊断卡。残留会话空间不并入归档/回收空间总量。
|
package/docs/USER_GUIDE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English · [简体中文](USER_GUIDE.zh-CN.md) · [Back to README](../README.md)
|
|
4
4
|
|
|
5
|
-
Archive Management provides a place to browse and manage DSH's archived chats, plus workspace bulk archiving. This document follows the `main` branch and targets 1.
|
|
5
|
+
Archive Management provides a place to browse and manage DSH's archived chats, plus workspace bulk archiving. This document follows the `main` branch and targets 1.5.1. This release streamlines selected actions, adds global recycling, and checks residual chats automatically from the final storage summary card. See the [changelog](../CHANGELOG.md) for release history. For interfaces and data formats, see the [architecture](ARCHITECTURE.en.md).
|
|
6
6
|
|
|
7
7
|
## Understand the three locations
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ Alternatively, run this command on the computer running DSH:
|
|
|
24
24
|
dsh plugin --profile web add dsh-archived-chats@latest
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Restart DSH and open **Settings → Archive Management** (Chinese: **设置 → 归档管理**). The views are **Archived**, **Recycle Bin**, **Storage & Retention**, **Origins & Branches**, and **About**.
|
|
27
|
+
Restart DSH and open **Settings → Archive Management** (Chinese: **设置 → 归档管理**). The views are **Archived**, **Unarchived**, **Recycle Bin**, **Storage & Retention**, **Origins & Branches**, and **About**.
|
|
28
28
|
|
|
29
29
|
Before updating an older installation, read “Upgrades, old data, and downgrades” below, especially the snapshot-cleanup warning.
|
|
30
30
|
|
|
@@ -32,14 +32,13 @@ Before updating an older installation, read “Upgrades, old data, and downgrade
|
|
|
32
32
|
|
|
33
33
|
Use DSH's normal session menu to archive one chat. The success notice offers View and Undo and closes after about three seconds. The plugin groups archived chats by workspace.
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
In **Unarchived**, search titles or IDs at the top. The next row provides time/title sorting, workspace filtering, and a refresh icon at the far right. Workspace groups and chat rows use the same layout as Archived.
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
4. Confirm archiving; review the retained itemized results if anything was skipped or failed.
|
|
37
|
+
- Click the eye icon for a read-only preview, or **Archive** on an individual chat.
|
|
38
|
+
- The workspace three-dot menu offers **Archive all** for that workspace.
|
|
39
|
+
- The header **Archive all** covers every workspace in the list.
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
Search and workspace filters only change display; they do not narrow workspace or global archiving. Review the eligible chat and workspace counts before confirming. Running chats remain visible with individual archiving disabled. Bulk actions skip running, blank, or unverifiable chats. New chats after preparation are excluded; chats that start running or change workspace before apply are skipped. Unarchived offers read-only previews and archiving, without selection, export, deletion, or a cleanup entry. Archiving preserves workspace directories and prior tags and notes.
|
|
43
42
|
|
|
44
43
|
Search Archived by title, workspace, tags, notes, messages, and tool results. Filter by type, workspace, and tag; sort by time or title. Content matches show excerpts. Long workspace titles wrap to remain fully visible. Click a workspace folder or title to expand or collapse its chats; the open or closed folder reflects the current state. Group collapse state is saved in the browser.
|
|
45
44
|
|
|
@@ -65,14 +64,18 @@ Tags and notes remain local. Unarchiving preserves them; completed permanent del
|
|
|
65
64
|
| --- | --- | --- |
|
|
66
65
|
| Archived: chat row | Preview, edit tags and note, Unarchive, Delete | One chat |
|
|
67
66
|
| Archived: workspace More menu | Unarchive all, Move all to Recycle Bin, Export all; separator; Delete all | All archived chats in that workspace |
|
|
68
|
-
|
|
|
69
|
-
|
|
|
67
|
+
| Unarchived: chat row | Preview icon, Archive | One chat; archiving requires confirmation |
|
|
68
|
+
| Unarchived: workspace three-dot menu | Archive all | Every eligible chat in that workspace |
|
|
69
|
+
| Unarchived: header | Archive all | Eligible chats across all workspaces |
|
|
70
|
+
| Archived: header | Select, More | Enter selection mode or open the global action menu |
|
|
71
|
+
| Archived: selection mode | Select all, Unarchive, Delete permanently, More → Export selected / Move to Recycle Bin, Cancel | Checked chats only; Select all covers current results |
|
|
72
|
+
| Archived: header More menu | Import backup, Export all, Unarchive all, Move all to Recycle Bin; separator; Delete all | Export, unarchive, recycle, and delete cover archived chats across all workspaces; Import uses the selected ZIP |
|
|
70
73
|
| Recycle Bin: chat row | Preview icon, Restore and Delete text buttons | One recycle record; Delete is permanent after confirmation |
|
|
71
74
|
| Recycle Bin: workspace More menu | Restore all, Delete all | Recycle records in that workspace |
|
|
72
75
|
| Recycle Bin: header | Restore all | Restore eligible entries across all workspaces after confirmation |
|
|
73
76
|
| Recycle Bin: header | Empty Recycle Bin | Permanently delete recycle records across all workspaces after confirmation |
|
|
74
77
|
|
|
75
|
-
**
|
|
78
|
+
**Selection mode supports one or many chats.** Select shows checkboxes and an action bar; rows keep Preview only. Unarchive and Delete permanently are visible; More contains Export selected and Move to Recycle Bin. Select all checks current search/filter results and shows an indeterminate state for partial selection. Hidden selections remain checked with a visible count; clearing current results preserves them. Cancel or leaving Archived clears the selection and exits. Actions confirm the selected count, and failed items stay checked. Ordinary rows have no export or recycle buttons; Unarchived provides read-only previews and archiving. Search and filters do not narrow workspace or global bulk actions.
|
|
76
79
|
|
|
77
80
|
Every archive workspace action asks for confirmation with the full workspace name and its complete archive count. Global Export all, Unarchive all, and Delete all confirmations count archived chats across every workspace, excluding the Recycle Bin. Check these counts even when the list is filtered. The header keeps consistent dimensions when switching tabs.
|
|
78
81
|
|
|
@@ -102,6 +105,16 @@ Once deletion starts, the plugin saves a non-restorable deletion task, removes a
|
|
|
102
105
|
|
|
103
106
|
Missing required Host capabilities cause refusal before a deletion task is committed. Removing snapshot attachment copies does not guarantee immediate reclamation of matching bytes in Harness's global attachment store; other references and Host caching or garbage collection may retain them.
|
|
104
107
|
|
|
108
|
+
Permanent deletion also cleans up the chat's subagent descendants while preserving independent forks. Unarchived lists ordinary workspace chats. Storage & Retention offers an automatic residual check, described below.
|
|
109
|
+
|
|
110
|
+
## Residual chat check
|
|
111
|
+
|
|
112
|
+
Every entry to **Storage & Retention** automatically runs a check. The final summary card, Residual chats, shows the count and measured storage. Choose View details to manage the listed chats; failed checks offer Retry. Checking never opens a dialog or deletes records. Only subagents with an explicit parent ID whose parent no longer exists are listed. Workspace, archived, recycled and pending-deletion records, empty chats, invalid parent relationships and independent forks are excluded.
|
|
113
|
+
|
|
114
|
+
Details include full IDs, parent IDs, working directories, dates, sizes and read-only preview icons. Search and select current results without clearing hidden selections. Backups include selected records. When records exceed the backup limit, they are marked and you are asked whether to deselect them and export the rest. Cancelling keeps the original selection.
|
|
115
|
+
|
|
116
|
+
Permanent deletion requires confirmation and removes selected records and their directories only, preserving unselected descendants. Retries and restart recovery retain that scope. Descendants may become new residual records after their parent is deleted; check, review and back them up separately before cleanup. Changed membership is refused with a visible prompt to select again. Unavailable sizes display “—”; measured bytes include only measured records.
|
|
117
|
+
|
|
105
118
|
## Export and import
|
|
106
119
|
|
|
107
120
|
Choose Export all from the header's More menu to export every archived chat, or from a workspace menu to export only that workspace's archive. Both ask you to confirm the full scope and chat count and exclude Recycle Bin contents. Restore recycled chats to Archived first if you need to export them. Import backup is also in the header's More menu.
|
|
@@ -198,7 +211,7 @@ Features depend on public Host capabilities, not just a version number:
|
|
|
198
211
|
- Version 2 protection records require this or a newer plugin. Before downgrading, restore recycled chats you need to retain and back up plugin data.
|
|
199
212
|
- If `trash.json` cannot be read, Archived is marked unverified, the Recycle Bin is unavailable, and archive mutations such as unarchive, tag/note editing, and deletion are refused instead of guessing.
|
|
200
213
|
|
|
201
|
-
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 the official `@deepseek-ai/dsh-session@0.1.7-rc.2` Host backend integration (
|
|
214
|
+
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 the official `@deepseek-ai/dsh-session@0.1.7-rc.2` Host backend integration (7/7) and package checks, including the v4 session format.
|
|
202
215
|
|
|
203
216
|
## Local data and uninstall
|
|
204
217
|
|