dsh-archived-chats 0.12.0 → 1.0.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.
Files changed (37) hide show
  1. package/README.en.md +85 -48
  2. package/README.md +85 -48
  3. package/assets/screenshots/preview-01.png +0 -0
  4. package/assets/screenshots/preview-02.png +0 -0
  5. package/assets/screenshots/preview-03.png +0 -0
  6. package/assets/screenshots/preview-04.png +0 -0
  7. package/assets/screenshots/preview-05.png +0 -0
  8. package/assets/screenshots/preview-06.png +0 -0
  9. package/assets/screenshots/preview-07.png +0 -0
  10. package/assets/screenshots/preview-08.png +0 -0
  11. package/docs/ARCHITECTURE.en.md +28 -8
  12. package/docs/ARCHITECTURE.md +28 -8
  13. package/lib/client.js +538 -43
  14. package/lib/history-restore.js +286 -0
  15. package/lib/history.js +326 -0
  16. package/lib/index.js +176 -0
  17. package/lib/recycle.js +32 -7
  18. package/lib/snapshot.js +122 -4
  19. package/lib/types/client/index.d.ts +43 -3
  20. package/lib/types/index.d.ts +43 -1
  21. package/package.json +8 -2
  22. package/screenshots.json +10 -0
  23. package/assets/screenshots/01-archive-entry.png +0 -0
  24. package/assets/screenshots/01b-archive-success.png +0 -0
  25. package/assets/screenshots/02-archived-overview.png +0 -0
  26. package/assets/screenshots/03-full-text-search.png +0 -0
  27. package/assets/screenshots/04-conversation-preview.png +0 -0
  28. package/assets/screenshots/05-metadata-editor.png +0 -0
  29. package/assets/screenshots/06-bulk-selection.png +0 -0
  30. package/assets/screenshots/07-import-preview.png +0 -0
  31. package/assets/screenshots/08-move-undo.png +0 -0
  32. package/assets/screenshots/09-recycle-restore.png +0 -0
  33. package/assets/screenshots/10-permanent-delete.png +0 -0
  34. package/assets/screenshots/11-storage-retention.png +0 -0
  35. package/assets/screenshots/12-storage-details.png +0 -0
  36. package/assets/screenshots/13-retention-preview.png +0 -0
  37. package/assets/screenshots/14-origins-branches.png +0 -0
package/README.en.md CHANGED
@@ -1,25 +1,42 @@
1
- # dsh-archived-chats
1
+ <div align="center">
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/dsh-archived-chats)](https://www.npmjs.com/package/dsh-archived-chats)
4
- [![npm downloads](https://img.shields.io/npm/dm/dsh-archived-chats)](https://www.npmjs.com/package/dsh-archived-chats)
5
- [![CI](https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml/badge.svg)](https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml)
6
- [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com/p/Ultronen/dsh-archived-chats/)
3
+ <h1>Session Archive</h1>
7
4
 
8
- [English](README.en.md) | [中文](README.md)
5
+ <p><strong>A local archived-chat center for DeepSeek Harness</strong></p>
6
+ <p><code>dsh-archived-chats</code></p>
9
7
 
10
- > 🔎 **Archived no longer means lost.** Search conversation content, read complete messages and tool calls, then back up, restore, or delete safely.
8
+ <p>
9
+ <a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-archived-chats?style=flat-square"></a>
10
+ <a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm downloads" src="https://img.shields.io/npm/dm/dsh-archived-chats?style=flat-square"></a>
11
+ <a href="https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/Ultronen/dsh-archived-chats/ci.yml?branch=main&amp;style=flat-square&amp;label=CI"></a>
12
+ <a href="https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml"><img alt="Node.js 18 and 24" src="https://img.shields.io/badge/Node.js-18%20%7C%2024-339933?style=flat-square&amp;logo=nodedotjs&amp;logoColor=white"></a>
13
+ </p>
14
+ <p>
15
+ <a href="https://github.com/Ultronen/dsh-archived-chats/blob/main/LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/License-MIT-2ea44f?style=flat-square"></a>
16
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness Web plugin" src="https://img.shields.io/badge/DeepSeek_Harness-Web_Plugin-0b7285?style=flat-square"></a>
17
+ <a href="https://awesome-dsh-plugin.com/p/Ultronen/dsh-archived-chats/"><img alt="Awesome DSH Plugin" src="https://awesome-dsh-plugin.com/badge.svg"></a>
18
+ <a href="https://github.com/Ultronen/dsh-archived-chats/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/Ultronen/dsh-archived-chats?style=flat-square"></a>
19
+ </p>
20
+
21
+ <p>English · <a href="README.md">中文</a></p>
22
+
23
+ </div>
24
+
25
+ > 🔎 **Archived no longer means lost.** Search and read complete conversations, inspect local history versions, then back up, restore as a copy, or delete safely.
11
26
 
12
27
  > ♻️ **Removing an archived chat from this plugin is undoable.** The plugin first creates a local recovery snapshot containing the session and attachments, then moves it to the Recycle Bin. Physical removal happens only after an explicit **Delete permanently** action in the Recycle Bin.
13
28
 
14
- A local archived-chat manager for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): search and preview complete conversations, back up and restore sessions, and safely manage history with an undoable Recycle Bin, recovery snapshots, retention policies, and Origins & Branches.
29
+ A local archived-chat manager for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): search and preview complete conversations, retain a validated local version after archive, restore any healthy version as a new archived copy, and manage old chats through backups, an undoable Recycle Bin, retention policies, and Origins & Branches.
30
+
31
+ Once a conversation is archived in DeepSeek Harness it disappears from the sidebar, and there is no built-in way to browse it again — only the workspace store (`~/.dsh/storages/workspace.json`) still remembers it. This plugin adds a **Session Archive** page under Settings where every archived session is visible, searchable, and manageable.
15
32
 
16
- Once a conversation is archived in DeepSeek Harness it disappears from the sidebar, and there is no built-in way to browse it again — only the workspace store (`~/.dsh/storages/workspace.json`) still remembers it. This plugin adds an **Archived Chats** page under Settings where every archived session is visible, searchable, and manageable.
33
+ > ℹ️ **The entry has been formally renamed.** The former **Archived Chats** entry is now **Session Archive** (中文:**会话档案**). The npm package `dsh-archived-chats`, GitHub repository, install command, and local data location are unchanged. Existing users do not need a data migration; after updating, open **Settings → Session Archive**.
17
34
 
18
- [Plugin market](https://awesome-dsh-plugin.com/p/Ultronen/dsh-archived-chats/) · [npm](https://www.npmjs.com/package/dsh-archived-chats) · [Releases](https://github.com/Ultronen/dsh-archived-chats/releases) · [Questions and feedback](https://github.com/Ultronen/dsh-archived-chats/discussions) · [Private vulnerability reporting](https://github.com/Ultronen/dsh-archived-chats/security/advisories/new)
35
+ <p align="center"><a href="https://awesome-dsh-plugin.com/p/Ultronen/dsh-archived-chats/">Plugin market</a> · <a href="https://www.npmjs.com/package/dsh-archived-chats">npm</a> · <a href="https://github.com/Ultronen/dsh-archived-chats/releases">Releases</a> · <a href="https://github.com/Ultronen/dsh-archived-chats/discussions">Questions and feedback</a> · <a href="https://github.com/Ultronen/dsh-archived-chats/security/advisories/new">Private vulnerability reporting</a></p>
19
36
 
20
37
  <p align="center">
21
- <a href="assets/screenshots/04-conversation-preview.png"><img src="assets/screenshots/04-conversation-preview.png" width="49%" alt="Full-text search and read-only preview for archived chats"></a>
22
- <a href="assets/screenshots/11-storage-retention.png"><img src="assets/screenshots/11-storage-retention.png" width="49%" alt="Storage and Retention with session directories, recovery snapshots, and policy controls"></a>
38
+ <a href="assets/screenshots/preview-03.png"><img src="assets/screenshots/preview-03.png" width="49%" alt="Native read-only History preview with snapshot time and a synthetic stored image"></a>
39
+ <a href="assets/screenshots/preview-07.png"><img src="assets/screenshots/preview-07.png" width="49%" alt="Storage and Retention with session directories, protection snapshots, and policy controls"></a>
23
40
  </p>
24
41
 
25
42
  <p align="center"><sub>Search and read without unarchiving first; removing an archived chat here moves it through a recovery-snapshot Recycle Bin.</sub></p>
@@ -32,7 +49,7 @@ If this plugin helps you recover or protect an important conversation, consider
32
49
  dsh plugin --profile web add dsh-archived-chats@latest
33
50
  ```
34
51
 
35
- Restart DSH once after installing, then open **Settings → Archived Chats**.
52
+ Restart DSH once after installing, then open **Settings → Session Archive**.
36
53
 
37
54
  To update an existing installation:
38
55
 
@@ -42,41 +59,37 @@ dsh plugin --profile web update dsh-archived-chats
42
59
 
43
60
  ## Compatibility
44
61
 
45
- The full 0.12.0 feature target is DeepSeek Harness `0.1.1-rc.2`. Older hosts can still expose the archive list, but missing persistence, attachment, or live-session lifecycle capabilities produce explicit errors for recycle, storage, or lineage features instead of guessed internal writes.
62
+ The plugin enables features from the public capabilities exposed by the DeepSeek Harness Host instead of binding to one Host version. Archived browsing, full-text search, native read-only preview, History, Recycle Bin, storage policies, and session lineage work when their corresponding services are available. ZIP import, History **Restore as copy**, and snapshot fallback when an original is missing require a public persistence writer. Without it, the operation returns `restore-unsupported` without writing or overwriting data. If the attachment service is unavailable, only image reads degrade; the rest of the conversation remains readable. Back up `$DSH_HOME/plugin-data/archived-chats/` before downgrading to an older release that does not display History or understand recycle snapshots.
46
63
 
47
- ## Preview
64
+ ## Demo Preview
48
65
 
49
- These screenshots cover the current `0.12.0` feature set. They were captured in an isolated real DeepSeek Harness `0.1.1-rc.2` Chinese light-theme web profile with synthetic demo conversations and no real user data. The order follows the complete release path from archive entry, search, and preview through recycle recovery, storage governance, and Origins & Branches.
66
+ These images use an isolated Chinese light-theme Web demo environment with synthetic conversations to show the real current release UI. They contain no real user data, paths, notes, or credentials. The README and plugin market use the same fixed demo image set.
50
67
 
51
- ![Archive a conversation from its session menu](assets/screenshots/01-archive-entry.png)
52
- ![Three-second archive success notice](assets/screenshots/01b-archive-success.png)
53
- ![Archived Chats overview](assets/screenshots/02-archived-overview.png)
54
- ![Full-text conversation and tool-result search](assets/screenshots/03-full-text-search.png)
55
- ![Read-only archived conversation preview](assets/screenshots/04-conversation-preview.png)
56
- ![Tags and notes editor](assets/screenshots/05-metadata-editor.png)
57
- ![On-demand bulk selection](assets/screenshots/06-bulk-selection.png)
58
- ![Import backup preview](assets/screenshots/07-import-preview.png)
59
- ![Undo notice after moving a chat to Recycle Bin](assets/screenshots/08-move-undo.png)
60
- ![Recycle Bin with recovery snapshots and restore actions](assets/screenshots/09-recycle-restore.png)
61
- ![Permanent deletion confirmation for the chat and protection snapshot](assets/screenshots/10-permanent-delete.png)
62
- ![Storage and Retention overview](assets/screenshots/11-storage-retention.png)
63
- ![Protection snapshot details](assets/screenshots/12-storage-details.png)
64
- ![Retention cleanup preview](assets/screenshots/13-retention-preview.png)
65
- ![Origins & Branches relationship view](assets/screenshots/14-origins-branches.png)
68
+ ![Session Archive overview with the new title and five management views](assets/screenshots/preview-01.png)
69
+ ![Full-text search, filters, tags, and readable hit excerpts](assets/screenshots/preview-02.png)
70
+ ![Native read-only History preview with snapshot time and a synthetic stored image](assets/screenshots/preview-03.png)
71
+ ![History timeline with restore-as-copy and deletion actions](assets/screenshots/preview-04.png)
72
+ ![Irreversible confirmation before clearing ordinary History](assets/screenshots/preview-05.png)
73
+ ![Recycle Bin protection snapshot, restore, and permanent deletion](assets/screenshots/preview-06.png)
74
+ ![Storage accounting, retention policy, and cleanup preview entry](assets/screenshots/preview-07.png)
75
+ ![Origins & Branches with forks, subagents, and recycled state](assets/screenshots/preview-08.png)
66
76
 
67
77
  ## Usage
68
78
 
69
- 1. Archive a conversation from the normal DSH session menu. After the Host confirms success, a **Chat archived** notice appears at the top for three seconds with direct **View** and **Undo** actions; hovering or focusing it pauses the timer. Archiving removes the chat from the sidebar but keeps its session data in the workspace store.
70
- 2. Open **Settings → Archived Chats**. The page groups archived conversations by workspace and remembers collapsed groups in this browser.
71
- 3. Search titles, tags, notes, conversation text, or tool output. Open the row preview to read an archived conversation without unarchiving it. Click **Select multiple** only when you need bulk actions.
72
- 4. Click **Import backup** to choose a ZIP produced by this plugin and confirm non-conflicting sessions after the preview. Click **Export backup** to export the current selection, or every archived chat when nothing is selected. Individual rows also have an export action.
73
- 5. Choose **Unarchive** to return a conversation to the sidebar. **Move to Recycle Bin** creates a protection snapshot and offers immediate **Undo**; the session can also be restored later from the **Recycle Bin** tab. Only **Delete permanently / Empty Recycle Bin** removes originals and snapshots irreversibly.
74
- 6. Open **Storage & Retention** to measure archived/recycled session directories and recovery snapshots this plugin created and retained for them. Restoring a chat may retain its snapshot, so storage can remain when the archive list is empty. Counts apply separately to each original chat; saving performs no cleanup until exact candidates are previewed and applied. **Origins & Branches** uses a collapsible connector tree to show where archived/recycled chats came from and which sessions branched from them, with project filtering and search.
79
+ 1. Archive a conversation from the normal DSH session menu. After Host success, the notice first reports **saving history version** and starts its three-second dismissal only after save. Snapshot failure never rolls back archive success; the notice retains **Retry save**, **View**, **Undo**, and close actions.
80
+ 2. Open **Settings → Session Archive → History**. Groups can be searched by safe title/workspace and expanded to preview any healthy version read-only or choose **Restore as copy**. The Host generates a new session ID and registers the result as archived; it never overwrites, unarchives, or deletes the source.
81
+ 3. Delete one ordinary History version after confirmation, or use **Clear history versions** to remove all ordinary history at once. The source chat remains unchanged, while Recycle Bin protection and unreadable degraded versions are skipped.
82
+ 4. Use **Archived** to manage chats by workspace and search titles, tags, notes, message text, or tool output. Row preview does not require unarchive.
83
+ 5. Use **Import backup / Export backup** for ZIP backups. ZIP import and history restore are separate flows.
84
+ 6. **Move to Recycle Bin** reuses a healthy snapshot for the same revision when possible and otherwise publishes a new protection snapshot. Only **Delete permanently / Empty Recycle Bin** irreversibly removes the original and every validated snapshot for that source.
85
+ 7. Use **Storage & Retention** to preview and explicitly apply history-count, age, quota, and recycle-age policy. **Origins & Branches** remains a read-only tree of necessary relationship context.
75
86
 
76
87
  ## Features
77
88
 
78
89
  - **Complete archived-session list**, grouped by workspace (project) with a per-group count. Every group can be collapsed or expanded, and the state is remembered per browser.
79
90
  - **Archive success notice**: after a chat is archived, a compact frame-wide notice remains for three seconds with **View**, **Undo**, and close actions. Pointer hover or keyboard focus pauses the timer, active View/Undo work cannot time out, and failures retain a retry action.
91
+ - **Local history after archive**: only a successful browser-originated archive captures a validated version, deduplicated by the same non-null source revision. The plugin never scans unrelated active chats and performs no startup, scheduled, or background capture.
92
+ - **History timeline, restore, and deletion**: the fifth History tab shows timestamp, size, attachment count, recycle-protection state, and opaque degraded items by original chat. Preview is read-only and restore always creates a new archived ID. Ordinary history can be deleted individually or cleared globally after confirmation and cannot then be recovered. Original chats remain unchanged; recycle-protection and degraded snapshots are skipped.
80
93
  - **Full-text conversation search**: one search field matches titles, workspaces, tags, notes, user messages, assistant answers, and tool results, with a readable hit excerpt on each matching row.
81
94
  - **Native archived conversation preview and turn navigation**: follow the Harness conversation layout with user messages on the right and assistant messages on the left; present Markdown, reasoning, tool activity, JSON, code, and available stored images read-only, while retaining a responsive turn rail for quick jumps. If the host lacks attachment capability, only images degrade and the rest of the preview remains readable.
82
95
  - **Filter and sort** by type (all / regular / subagent), project, and tag; then order results by newest, oldest, or title.
@@ -87,10 +100,10 @@ These screenshots cover the current `0.12.0` feature set. They were captured in
87
100
  - **Compact top-level actions**: common **Import backup** / **Export backup** actions are direct, while the low-frequency destructive action lives under **More**. The page stays focused on DSH archive management without a persistent source selector or redundant menus.
88
101
  - **On-demand multi-select**: checkboxes stay hidden by default and appear only after clicking **Select multiple**. Select individual chats, every visible result, or an entire project; the selection bar can export, unarchive, or move the chosen chats to the Recycle Bin, while selections hidden by another filter remain intact.
89
102
  - **Unarchive** a single chat or a whole project group from the group's `⋯` menu — restored chats reappear in the sidebar immediately.
90
- - **Four archive-management views**: Archived, Recycle Bin, Storage & Retention, and Origins & Branches. Recycled rows stay grouped by their original workspace, each group can collapse independently, and rows show trash time, snapshot size, attachment count, and `trashed` / `degraded` / `purge-pending` state. Checkboxes stay hidden until **Select multiple** is activated.
103
+ - **Five archive-management views**: Archived, History, Recycle Bin, Storage & Retention, and Origins & Branches. History loads only on first activation; Recycle Bin stays grouped by original workspace with independent disclosure state.
91
104
  - **Storage analysis**: separately measures archived/recycled session directories and plugin-owned snapshots, with unavailable/degraded diagnostics and repeated snapshot-attachment bytes. Searchable detail dialogs open from the summary cards, so long inventories never push retention controls down the page. It does not label these numbers as globally reclaimable Harness attachment storage.
92
105
  - **Preview-first retention policies**: plan by retained recovery snapshots per original chat, snapshot age, snapshot quota, and recycle age. The default keeps one recovery snapshot per original chat. Saving never runs cleanup; snapshots in use by Recycle Bin or unavailable snapshots are excluded and permanent recycle purges start unselected.
93
- - **Read-only Origins & Branches**: uses durable Harness `parentSession` fields to show the sources, forks, and subagent trees of archived/recycled chats, retaining only the parent/child context needed to explain them. Unrelated active chats are not sent to the browser. Managed cards keep source copy inside the card and put a centered disclosure arrow on its own bottom row; users can click the whole card or arrow to fold, copy the full ID, use project/status filters, and expand or collapse all. Searching titles, projects, or IDs automatically reveals matching paths; an independently scrolling tree keeps large datasets from extending the page, and root branches default to collapsed above 50 nodes. Missing parents, cycles, and delegation-depth mismatches are diagnosed without rewriting relationships.
106
+ - **Read-only Origins & Branches**: uses durable Harness `parentSession` fields to show the sources, forks, and subagent trees of archived/recycled chats, retaining only the parent/child context needed to explain them. Unrelated active chats are not sent to the browser. Managed cards keep source copy inside the card and put a centered disclosure arrow on its own bottom row; users can click the whole card or arrow to fold, copy the full ID, use project/status filters, and expand or collapse all. Searching titles, projects, or IDs automatically reveals matching paths; an independently scrolling tree keeps large datasets from extending the page, and root branches default to collapsed above 50 nodes. Missing parents, cycles, and delegation-depth mismatches render in full inside the affected managed card without rewriting relationships.
94
107
  - **Automatic recovery snapshots and retained history**: moving an archived chat to Recycle Bin captures all events plus verified image bytes. Restore removes the recycle record but deliberately retains the validated snapshot, so retained recovery storage can exist with an empty archive list. Repeated restore/recycle cycles retain older valid snapshots until the user explicitly applies retention or permanently purges the chat.
95
108
  - **Two-level restore**: when the original session is intact, restore only removes the recycle marker and does not rewrite persistence. If the original is missing, the plugin falls back to the validated session-and-attachment snapshot through public writer capabilities, never overwriting an existing ID.
96
109
  - **Explicit permanent purge**: only the Recycle Bin exposes permanent delete and empty. The plugin records durable `purge-pending` crash intent before deleting the original and snapshot; interrupted purges retry at startup.
@@ -98,11 +111,11 @@ These screenshots cover the current `0.12.0` feature set. They were captured in
98
111
 
99
112
  ## Recycle Bin, privacy, and attachment limits
100
113
 
101
- The recycle catalog (`trash.json`) and protection snapshots live under `$DSH_HOME/plugin-data/archived-chats/` and stay on this machine. Attachment bytes are read one at a time, digest-verified, and atomically published; neither conversations nor attachments are uploaded. Recycle previews use a separate authorized scope.
114
+ The recycle catalog (`trash.json`) plus history/protection snapshots live under `$DSH_HOME/plugin-data/archived-chats/` and stay on this machine. Attachment bytes are read one at a time, digest-verified, and atomically published. Conversations and attachments are never uploaded, cloud-synced, background-scanned, or scheduled for capture.
102
115
 
103
116
  Retention policy lives in `retention.json` under the same directory. Policies never run in the background, at startup, or on a timer; every cleanup requires a single-use five-minute preview followed by explicit selection and confirmation.
104
117
 
105
- Permanent purge removes the snapshot's attachment copies, but Harness's global attachment store may retain identical bytes because another session still references them or because the host applies its own garbage-collection policy. This plugin does not claim immediate global attachment GC.
118
+ Permanent Recycle Bin purge removes every validated snapshot attachment copy for that source, but Harness's global attachment store may retain identical bytes because another session still references them or because the host applies its own garbage-collection policy. This plugin does not claim immediate global attachment GC.
106
119
 
107
120
  ## Tags, notes, and statistics
108
121
 
@@ -135,6 +148,13 @@ No. DSH hides the conversation from the sidebar and keeps its archived session r
135
148
 
136
149
  </details>
137
150
 
151
+ <details>
152
+ <summary><b>Are history versions screenshots, and can restore overwrite the source?</b></summary>
153
+
154
+ No. They are locally stored, validated copies of session records and attachments, and preview is read-only. **Restore as copy** asks the Host for a new ID and creates a new archived chat. It never overwrites, deletes, or unarchives the source or mutates the selected snapshot.
155
+
156
+ </details>
157
+
138
158
  <details>
139
159
  <summary><b>What happens when an imported backup contains an existing session ID?</b></summary>
140
160
 
@@ -159,13 +179,13 @@ Yes. The success notice includes **Undo**, and the Recycle Bin keeps a Restore a
159
179
  <details>
160
180
  <summary><b>Why are recovery snapshots shown when there are no archived chats?</b></summary>
161
181
 
162
- A recovery snapshot is created before an archived chat moves to the Recycle Bin. Restoring removes the recycle record but deliberately keeps the validated snapshot as recovery history, so it may still use storage after the archive list becomes empty. The default keeps one snapshot per original chat. To remove them, set the count to `0`, save, then run **Preview cleanup → Apply selected cleanup**. Saving alone never deletes data.
182
+ A recovery snapshot is created before an archived chat moves to the Recycle Bin. Restoring removes the recycle record but deliberately keeps the validated snapshot as recovery history, so it may still use storage after the archive list becomes empty. Delete one ordinary version or use **Clear history versions** from History; a snapshot still protecting Recycle Bin recovery is skipped. Alternatively, set retention count to `0` and run **Preview cleanup → Apply selected cleanup**.
163
183
 
164
184
  </details>
165
185
 
166
186
  ## Implementation overview
167
187
 
168
- The plugin has two halves: the Host service manages archives, snapshots, the recycle catalog, and restore/purge transactions, while the browser page provides search, preview, backup, restore, and explicit confirmations. Mutations go through guarded local routes. Ordinary removal commits only a recycle record; physical removal is reachable only through the Recycle Bin's crash-safe purge flow.
188
+ The plugin has two halves: the Host service manages archives, version snapshots, the recycle catalog, and restore/purge transactions, while the browser page provides search, history timelines, read-only preview, backup, restore-as-copy, and explicit confirmations. Mutations go through guarded local routes. Ordinary removal commits only a recycle record; physical removal is reachable only through the Recycle Bin's crash-safe purge flow.
169
189
 
170
190
  User-facing storage, backup limits, deletion outcomes, and compatibility notes stay in this README. Maintainer details such as route contracts, data flow, restore transactions, live-deletion lifecycle, and failure fallbacks are documented in [ARCHITECTURE.md](docs/ARCHITECTURE.en.md).
171
191
 
@@ -175,10 +195,27 @@ User-facing storage, backup limits, deletion outcomes, and compatibility notes s
175
195
  npm test
176
196
  ```
177
197
 
178
- The suite (`test/*.test.mjs`) covers export records and real ZIP decoding, bounded import validation, restore transactions, metadata and statistics, full-text search, conversation preview, and host-and-browser smoke tests. It uses an isolated temporary DSH home plus mocked host and browser runtimes; it never reads or changes real sessions.
198
+ The suite (`test/*.test.mjs`) covers export/import, history capture/inventory/preview/image authorization, single-use restore-as-copy transactions and rollback, retention, full-text search, and Host/browser smoke and responsive behavior. It uses an isolated temporary DSH home plus mocked host and browser runtimes; it never reads or changes real sessions.
179
199
 
180
200
  ## Version history
181
201
 
202
+ ### 1.0.1
203
+
204
+ - Formally document the settings-entry rename from **Archived Chats** to **Session Archive**; package name, repository, install command, and local data location remain unchanged.
205
+ - Recapture eight fixed demo images from the current release UI and make the README and plugin market reference the same set.
206
+ - Describe compatibility through public Host capabilities rather than repeated RC versions and internal route counts.
207
+ - Add the missing user flow for deleting one History version or clearing ordinary History; remove internal plans, QA evidence, and machine paths from the public tree, with an automated hygiene gate preventing recurrence.
208
+
209
+ ### 1.0.0
210
+
211
+ - Added the fifth **History** tab for validated local versions, recycle-protection state, safe search, and opaque degraded entries grouped by source chat.
212
+ - Browser archive success now captures by stable revision; capture failure never rolls back archive and the notice retains safe retry.
213
+ - Reused the conversation preview for snapshot timestamps and verified images. Restore always creates a new archived ID and never overwrites the source.
214
+ - Added confirmed single-version deletion and global History clearing without selection checkboxes; recycle-protection and degraded snapshots are not removed by these actions.
215
+ - Recycle moves may reuse the same healthy non-null revision. Retention continues to govern history, and permanent purge removes every validated snapshot for the source.
216
+ - A real Web Host verified plugin loading, safe inventory, and capability degradation; without a writer, restore fails without mutation as `restore-unsupported`.
217
+ - **Downgrade reminder:** 0.12 does not show History, but it can validate, retain, and purge version-one snapshots. Back up `$DSH_HOME/plugin-data/archived-chats/` before downgrading.
218
+
182
219
  ### 0.12.0
183
220
 
184
221
  - Added a three-second top notice after archive success, with direct View and Undo, hover/focus pause, and retryable failures.
@@ -208,7 +245,7 @@ The suite (`test/*.test.mjs`) covers export records and real ZIP decoding, bound
208
245
  - Added an on-demand multi-select mode: list checkboxes stay hidden until requested, then disappear automatically after a completed bulk action.
209
246
  - Made common ZIP backup actions direct **Import backup / Export backup** controls and moved the destructive action under **More** for a cleaner header.
210
247
  - Removed the cross-tool JSONL migration surface that could not provide native resume, keeping the plugin focused on DSH archived-chat management.
211
- - Verified the new controls, backup preview, and single-line page title in a real DeepSeek Harness `0.1.0-rc.8` host.
248
+ - Verified the new controls, backup preview, and single-line page title in a real Host.
212
249
 
213
250
  ### 0.8.1
214
251
 
@@ -234,8 +271,8 @@ The suite (`test/*.test.mjs`) covers export records and real ZIP decoding, bound
234
271
 
235
272
  ### 0.5.1
236
273
 
237
- - Published a compatibility-focused patch release for DeepSeek Harness `0.1.0-rc.7`.
238
- - Updated the browser settings section to use the rc.7 overlay and state design tokens.
274
+ - Published a compatibility-focused patch release.
275
+ - Updated the browser settings section to use the overlay and state design tokens exposed by the Host.
239
276
 
240
277
  ### 0.5.0
241
278
 
@@ -249,7 +286,7 @@ The suite (`test/*.test.mjs`) covers export records and real ZIP decoding, bound
249
286
 
250
287
  ### 0.3.0
251
288
 
252
- - First published release of the Archived Chats settings page.
289
+ - First published release of the Session Archive settings page.
253
290
  - Added workspace-grouped browsing, title search, type/project filters, unarchive, and confirmed single/group/all deletion.
254
291
  - Added host routes, the browser settings section, and the pending-deletion sweep for live sessions.
255
292
 
package/README.md CHANGED
@@ -1,25 +1,42 @@
1
- # dsh-archived-chats
1
+ <div align="center">
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/dsh-archived-chats)](https://www.npmjs.com/package/dsh-archived-chats)
4
- [![npm downloads](https://img.shields.io/npm/dm/dsh-archived-chats)](https://www.npmjs.com/package/dsh-archived-chats)
5
- [![CI](https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml/badge.svg)](https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml)
6
- [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com/p/Ultronen/dsh-archived-chats/)
3
+ <h1>会话档案</h1>
7
4
 
8
- [English](README.en.md) | 中文
5
+ <p><strong>面向 DeepSeek Harness 的本地归档聊天中心</strong></p>
6
+ <p><code>dsh-archived-chats</code></p>
9
7
 
10
- > 🔎 **归档不再等于消失。** 直接搜索聊天正文、阅读完整对话和工具调用,然后安全备份、恢复或删除。
8
+ <p>
9
+ <a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-archived-chats?style=flat-square"></a>
10
+ <a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm downloads" src="https://img.shields.io/npm/dm/dsh-archived-chats?style=flat-square"></a>
11
+ <a href="https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/Ultronen/dsh-archived-chats/ci.yml?branch=main&amp;style=flat-square&amp;label=CI"></a>
12
+ <a href="https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml"><img alt="Node.js 18 and 24" src="https://img.shields.io/badge/Node.js-18%20%7C%2024-339933?style=flat-square&amp;logo=nodedotjs&amp;logoColor=white"></a>
13
+ </p>
14
+ <p>
15
+ <a href="https://github.com/Ultronen/dsh-archived-chats/blob/main/LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/License-MIT-2ea44f?style=flat-square"></a>
16
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness Web plugin" src="https://img.shields.io/badge/DeepSeek_Harness-Web_Plugin-0b7285?style=flat-square"></a>
17
+ <a href="https://awesome-dsh-plugin.com/p/Ultronen/dsh-archived-chats/"><img alt="Awesome DSH Plugin" src="https://awesome-dsh-plugin.com/badge.svg"></a>
18
+ <a href="https://github.com/Ultronen/dsh-archived-chats/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/Ultronen/dsh-archived-chats?style=flat-square"></a>
19
+ </p>
20
+
21
+ <p>中文 · <a href="README.en.md">English</a></p>
22
+
23
+ </div>
24
+
25
+ > 🔎 **归档不再等于消失。** 直接搜索和阅读完整对话,查看本地历史版本,再安全备份、恢复为副本或删除。
11
26
 
12
27
  > ♻️ **在本插件中移除归档聊天可以撤销。** 插件会先创建包含会话与附件的本地恢复快照,再移入回收站;只有在回收站中明确选择「永久删除」才会物理清除。
13
28
 
14
- 为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 新增一个本地归档聊天中心:搜索和预览完整对话,备份与恢复会话,并通过可撤销回收站、恢复快照、保留策略及来源与分支安全管理历史聊天。
29
+ 为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 新增一个本地归档聊天中心:搜索和预览完整对话,在每次成功归档后保留已验证的历史版本,把任意健康版本恢复为新的已归档副本,并通过备份、可撤销回收站、保留策略及来源与分支管理历史聊天。
30
+
31
+ 在 DeepSeek Harness 里,聊天一旦归档就会从侧边栏消失,界面中没有任何入口可以再看到它,只有工作区存档(`~/.dsh/storages/workspace.json`)还记得它。这个插件在「设置」中补上一个「会话档案」页面,让所有归档会话都可见、可搜索、可管理。
15
32
 
16
- 在 DeepSeek Harness 里,聊天一旦归档就会从侧边栏消失,界面中没有任何入口可以再看到它,只有工作区存档(`~/.dsh/storages/workspace.json`)还记得它。这个插件在「设置」中补上一个「已归档的聊天」页面,让所有归档会话都可见、可搜索、可管理。
33
+ > ℹ️ **入口已正式更名。** 原「已归档的聊天」现为「会话档案」(English: **Session Archive**)。npm 包名 `dsh-archived-chats`、GitHub 仓库名、安装方式和本地数据位置均未改变;现有用户无需迁移数据,更新后从 **设置 → 会话档案** 进入。
17
34
 
18
- [插件市场](https://awesome-dsh-plugin.com/p/Ultronen/dsh-archived-chats/) · [npm](https://www.npmjs.com/package/dsh-archived-chats) · [版本发布](https://github.com/Ultronen/dsh-archived-chats/releases) · [问题交流](https://github.com/Ultronen/dsh-archived-chats/discussions) · [私密报告漏洞](https://github.com/Ultronen/dsh-archived-chats/security/advisories/new)
35
+ <p align="center"><a href="https://awesome-dsh-plugin.com/p/Ultronen/dsh-archived-chats/">插件市场</a> · <a href="https://www.npmjs.com/package/dsh-archived-chats">npm</a> · <a href="https://github.com/Ultronen/dsh-archived-chats/releases">版本发布</a> · <a href="https://github.com/Ultronen/dsh-archived-chats/discussions">问题交流</a> · <a href="https://github.com/Ultronen/dsh-archived-chats/security/advisories/new">私密报告漏洞</a></p>
19
36
 
20
37
  <p align="center">
21
- <a href="assets/screenshots/04-conversation-preview.png"><img src="assets/screenshots/04-conversation-preview.png" width="49%" alt="归档聊天正文搜索与只读对话预览"></a>
22
- <a href="assets/screenshots/11-storage-retention.png"><img src="assets/screenshots/11-storage-retention.png" width="49%" alt="空间与策略中的会话目录、恢复快照和保留策略"></a>
38
+ <a href="assets/screenshots/preview-03.png"><img src="assets/screenshots/preview-03.png" width="49%" alt="带历史快照时间和合成图片的原生只读预览"></a>
39
+ <a href="assets/screenshots/preview-07.png"><img src="assets/screenshots/preview-07.png" width="49%" alt="空间与策略中的会话目录、保护快照和保留策略"></a>
23
40
  </p>
24
41
 
25
42
  <p align="center"><sub>无需先取消归档即可搜索和阅读;从本插件移除归档聊天时会先进入带恢复快照的回收站。</sub></p>
@@ -32,7 +49,7 @@
32
49
  dsh plugin --profile web add dsh-archived-chats@latest
33
50
  ```
34
51
 
35
- 安装后重启一次 DSH,然后打开 **设置 → 已归档的聊天**。
52
+ 安装后重启一次 DSH,然后打开 **设置 → 会话档案**。
36
53
 
37
54
  更新已有安装:
38
55
 
@@ -42,41 +59,37 @@ dsh plugin --profile web update dsh-archived-chats
42
59
 
43
60
  ## 兼容性
44
61
 
45
- 0.12.0 的完整功能目标是 DeepSeek Harness `0.1.1-rc.2`。较旧宿主仍可使用归档列表,但缺少持久层、附件或运行中会话生命周期能力时,回收、空间分析或血缘功能会返回明确的能力错误,不会猜测宿主内部结构或写入不完整数据。
62
+ 插件按 DeepSeek Harness 公开能力逐项启用功能,不绑定某个具体 Host 版本。归档浏览、全文搜索、原生只读预览、历史版本、回收站、空间策略和会话血缘在相应服务可用时正常工作。ZIP 导入、历史版本的 **恢复为副本**,以及原件丢失时的快照回退恢复,需要 Host 提供持久层 writer;缺少该能力时会明确返回 `restore-unsupported`,且不会写入或覆盖数据。附件服务不可用时只影响图片读取,其余对话内容仍可预览。降级到不显示历史版本或不识别回收快照的旧版前,请先备份 `$DSH_HOME/plugin-data/archived-chats/`。
46
63
 
47
- ## 预览
64
+ ## 演示预览
48
65
 
49
- 以下截图均来自当前 `0.12.0` 功能,在隔离的真实 DeepSeek Harness `0.1.1-rc.2` 中文浅色 Web profile 中捕获,只使用合成演示会话,不包含真实用户数据。截图顺序对应从归档入口、搜索与预览,到回收、空间治理和来源分支的完整发布路径。
66
+ 以下图片使用隔离的中文浅色 Web 演示环境和合成会话,展示当前正式版本的真实界面,不包含真实用户数据、路径、备注或凭据。README 与插件市场使用同一套固定演示图片。
50
67
 
51
- ![从会话菜单点击归档](assets/screenshots/01-archive-entry.png)
52
- ![归档成功后的三秒提示](assets/screenshots/01b-archive-success.png)
53
- ![已归档的聊天总览](assets/screenshots/02-archived-overview.png)
54
- ![聊天正文与工具结果全文搜索](assets/screenshots/03-full-text-search.png)
55
- ![归档对话只读预览](assets/screenshots/04-conversation-preview.png)
56
- ![标签与备注编辑](assets/screenshots/05-metadata-editor.png)
57
- ![按需批量选择](assets/screenshots/06-bulk-selection.png)
58
- ![导入归档备份预览](assets/screenshots/07-import-preview.png)
59
- ![移至回收站后的撤销提示](assets/screenshots/08-move-undo.png)
60
- ![回收站中的恢复快照与恢复操作](assets/screenshots/09-recycle-restore.png)
61
- ![永久删除会话与保护快照确认](assets/screenshots/10-permanent-delete.png)
62
- ![空间与策略概览](assets/screenshots/11-storage-retention.png)
63
- ![保护快照明细](assets/screenshots/12-storage-details.png)
64
- ![保留策略清理预览](assets/screenshots/13-retention-preview.png)
65
- ![来源与分支关系视图](assets/screenshots/14-origins-branches.png)
68
+ ![会话档案总览、新标题与五个管理视图](assets/screenshots/preview-01.png)
69
+ ![全文搜索、筛选、标签与命中摘要](assets/screenshots/preview-02.png)
70
+ ![带历史快照时间和合成图片的原生只读预览](assets/screenshots/preview-03.png)
71
+ ![历史版本时间线、恢复为副本与删除操作](assets/screenshots/preview-04.png)
72
+ ![清空普通历史版本的不可恢复确认](assets/screenshots/preview-05.png)
73
+ ![回收站中的保护快照、恢复与永久删除](assets/screenshots/preview-06.png)
74
+ ![空间分账、保留策略与清理预览入口](assets/screenshots/preview-07.png)
75
+ ![来源与分支中的分叉、子代理和回收状态](assets/screenshots/preview-08.png)
66
76
 
67
77
  ## 使用流程
68
78
 
69
- 1. 在 DSH 正常聊天的会话菜单中点击归档。宿主确认成功后,页面顶部会显示 3 秒的 **已归档的聊天** 提示,可立即 **查看** 归档中心或 **撤销**;悬停或键盘聚焦时计时暂停。归档只会把会话从侧边栏隐藏,工作区存档仍会保留会话数据。
70
- 2. 打开 **设置 → 已归档的聊天**。页面按工作区分组,并在当前浏览器中记住分组的折叠状态。
71
- 3. 搜索标题、标签、备注、聊天正文或工具结果;点击行内预览按钮可直接阅读归档对话,无需先取消归档。需要多选时点击 **批量选择** 显示复选框。
72
- 4. 点击顶部 **导入备份** 选择本插件导出的 ZIP,预览后确认无冲突会话;点击 **导出备份** 导出当前选中项,未选择时导出全部归档会话。单条会话也可以从行内操作导出。
73
- 5. 点击 **取消归档** 将会话放回侧边栏;点击 **移至回收站** 会创建保护快照,可立即点击 **撤销**,也可稍后在 **回收站** 标签恢复。只有回收站中的 **永久删除 / 清空回收站** 会不可撤销地移除原会话和快照。
74
- 6. 打开 **空间与策略** 查看归档/回收站会话目录,以及本插件为它们创建并保留的恢复快照。恢复聊天后快照仍可保留,所以归档列表为空时这里仍可能有数据。保留数量按每个原会话分别计算;保存策略不会执行清理,必须再预览并确认具体候选。**来源与分支** 用可折叠的连接线分支树只读展示已归档/回收站会话从哪里产生、又分出了哪些会话,并可按项目筛选或搜索。
79
+ 1. 在 DSH 正常聊天的会话菜单中点击归档。宿主确认成功后,顶部提示会先显示「正在保存历史版本」,保存完成后才开始 3 秒关闭计时。快照失败不会回滚已成功的归档,提示会保留「重试保存」、**查看**、**撤销** 和关闭操作。
80
+ 2. 打开 **设置 → 会话档案 → 历史版本**。这里按原会话分组,可搜索安全标题/项目,展开后可只读预览任意健康版本,或选择 **恢复为副本**。恢复由 Host 生成新会话 ID,始终作为已归档副本,不覆盖、取消归档或删除来源。
81
+ 3. 普通历史版本可经确认后单条删除,也可使用 **清空历史版本** 一次删除全部普通历史;原聊天不会被删除,回收站正在使用的保护版本和无法读取的降级版本会自动跳过。
82
+ 4. 在 **归档** 页签按工作区管理会话,搜索标题、标签、备注、聊天正文或工具结果;行内预览无需先取消归档。
83
+ 5. 使用顶部 **导入备份 / 导出备份** 管理 ZIP 备份;ZIP 导入与历史恢复是两条独立流程。
84
+ 6. 点击 **取消归档** 将会话放回侧边栏;点击 **移至回收站** 会在同一修订已有健康快照时复用它,否则创建新的保护快照。只有回收站中的 **永久删除 / 清空回收站** 会不可撤销地移除原会话与该来源的全部已验证历史快照。
85
+ 7. 打开 **空间与策略** 预览并明确应用历史数量、年龄、容量和回收站年龄策略。**来源与分支** 仍以只读分支树展示必要关系上下文。
75
86
 
76
87
  ## 功能
77
88
 
78
89
  - **完整归档列表**:按工作区(项目)分组并显示每组数量;每个分组都可折叠/展开,状态按浏览器记忆。
79
90
  - **归档成功提示**:会话归档成功后,在 DSH 全局浮层显示 3 秒的紧凑提示,提供 **查看**、**撤销** 和关闭操作;鼠标悬停或键盘聚焦会暂停计时,查看/撤销进行中不会自动消失,失败时保留重试入口。
91
+ - **归档后本地历史**:浏览器触发的普通归档成功后才抓取一个已验证版本;相同非空修订去重。不扫描无关活动会话,不在后台、定时器或启动时自动抓取。
92
+ - **历史时间线、恢复与删除**:第五个「历史版本」页签按原会话展示时间、大小、附件数和回收保护状态;预览只读,恢复始终生成新的已归档 ID。普通历史可经确认后单条删除或全局清空,删除后无法恢复;原聊天不受影响,回收站保护和降级快照会跳过。
80
93
  - **聊天正文全文搜索**:同一个搜索框同时匹配标题、项目、标签、备注、用户消息、助手回答与工具结果,并在结果行显示命中摘要。
81
94
  - **原生归档对话预览与轮次导航**:沿用 Harness 会话布局,用户消息靠右、助手消息靠左;以只读方式展示 Markdown、思考过程、工具活动、JSON、代码和可用的已存储图片,并保留可快速跳转的响应式轮次轨道。宿主缺少附件能力时只影响图片,其他预览内容仍可阅读。
82
95
  - **筛选与排序**:用类型(全部 / 普通会话 / 子代理会话)、项目和标签筛选,并按最新、最早或标题排序。
@@ -87,10 +100,10 @@ dsh plugin --profile web update dsh-archived-chats
87
100
  - **紧凑顶部操作**:常用的 **导入备份** / **导出备份** 直接可用,低频危险操作收纳在 **更多**;页面专注于 DSH 归档管理,不常驻来源选择器或冗余菜单。
88
101
  - **按需多选**:复选框默认隐藏,点击 **批量选择** 后才显示;可逐条选择、选择当前筛选结果或整个项目。选中后可一次导出、取消归档或移至回收站,隐藏在其他筛选结果中的选择不会丢失。
89
102
  - **取消归档**单个聊天,或从分组的 `⋯` 菜单整组取消——恢复的聊天会立刻回到侧边栏。
90
- - **四个归档管理视图**:归档、回收站、空间与策略、来源与分支。回收站按原工作区分组并可独立折叠,显示移入时间、快照大小、附件数和 `trashed` / `degraded` / `purge-pending` 状态;复选框默认隐藏,点击 **批量选择** 后才显示。
103
+ - **五个归档管理视图**:归档、历史版本、回收站、空间与策略、来源与分支。历史页首次激活时才加载;回收站按原工作区分组并可独立折叠。
91
104
  - **空间分析**:分别统计归档/回收会话目录与插件保护快照,标出无法统计项、降级快照和重复快照附件字节;会话目录与快照明细从摘要卡片进入可搜索弹窗,不会把保留策略持续向下推,也不会把这些数字描述为 Harness 全局附件可回收空间。
92
105
  - **预览优先的保留策略**:可按每个原会话的保留快照数、快照年龄、快照容量和回收站年龄生成候选;默认每个原会话保留一份恢复快照。保存策略绝不自动执行,回收站正在使用或不可用的快照不会被选中,回收站永久删除默认不勾选。
93
- - **只读来源与分支**:使用 Harness 持久化 `parentSession` 展示已归档/回收站会话的来源、分叉和子代理树,并保留解释关系所需的父子上下文;无关活动会话不会发送到浏览器。管理卡片把来源说明放在卡片内容中,底部独立一排居中显示折叠箭头;可复制完整 ID、点击整张卡片或箭头折叠,使用项目/状态筛选和全局展开/折叠。搜索标题、项目或 ID 时会自动展开命中路径,独立滚动区域避免大树持续推长页面,超过 50 个节点时根分支默认折叠。本版只诊断缺失父节点、循环与委派深度不一致,不修改关系。
106
+ - **只读来源与分支**:使用 Harness 持久化 `parentSession` 展示已归档/回收站会话的来源、分叉和子代理树,并保留解释关系所需的父子上下文;无关活动会话不会发送到浏览器。管理卡片把来源说明放在卡片内容中,底部独立一排居中显示折叠箭头;可复制完整 ID、点击整张卡片或箭头折叠,使用项目/状态筛选和全局展开/折叠。搜索标题、项目或 ID 时会自动展开命中路径,独立滚动区域避免大树持续推长页面,超过 50 个节点时根分支默认折叠。本版只诊断缺失父节点、循环与委派深度不一致,诊断在对应管理卡片内完整换行显示,不修改关系。
94
107
  - **自动恢复快照与保留历史**:已归档聊天移入回收站前保存完整会话事件和经校验的图片附件字节。恢复只移除回收记录,不自动删除快照;它会显示为“已保留的恢复快照”,即使当前没有归档聊天。重复恢复/回收会继续保留旧的有效快照,直到用户明确应用保留策略或永久删除该会话。
95
108
  - **两级恢复**:原会话仍完好时只移除回收标记,不重写持久层;原件丢失时才使用已验证快照和官方写入能力回退恢复,且绝不覆盖同 ID 会话。
96
109
  - **明确的永久删除**:仅回收站提供永久删除与清空。插件先写入 `purge-pending` 崩溃恢复意图,再删除原会话和保护快照;中途失败会在下次启动重试。
@@ -98,11 +111,11 @@ dsh plugin --profile web update dsh-archived-chats
98
111
 
99
112
  ## 回收站、隐私与附件限制
100
113
 
101
- 回收目录 `trash.json` 与保护快照位于 `$DSH_HOME/plugin-data/archived-chats/`,全部只保存在本机。快照会逐个读取附件、校验摘要并使用原子发布;不会上传会话或附件。回收站中的预览也使用单独授权范围。
114
+ 回收目录 `trash.json` 与历史/保护快照位于 `$DSH_HOME/plugin-data/archived-chats/`,全部只保存在本机。快照会逐个读取附件、校验摘要并使用原子发布;不会上传、云同步或定时扫描会话与附件。
102
115
 
103
116
  保留策略保存在同目录的 `retention.json`。插件不会在后台、启动时或定时自动应用策略;每次清理都要先生成五分钟有效的单次预览,再由用户选择并确认。
104
117
 
105
- 永久删除会删掉该会话的快照附件副本,但 Harness 全局附件存储可能仍因其他会话引用或宿主垃圾回收策略保留相同字节;本插件不声称会立即清理宿主的全局附件库。
118
+ 回收站永久删除会删掉该来源的全部已验证快照附件副本,但 Harness 全局附件存储可能仍因其他会话引用或宿主垃圾回收策略保留相同字节;本插件不声称会立即清理宿主的全局附件库。
106
119
 
107
120
  ## 标签、备注与统计
108
121
 
@@ -135,6 +148,13 @@ JSON 会保留附件引用,但**本版不复制附件二进制,也不包含
135
148
 
136
149
  </details>
137
150
 
151
+ <details>
152
+ <summary><b>历史版本是界面截图吗?恢复会覆盖原聊天吗?</b></summary>
153
+
154
+ 不是。它们是插件在本机保存并校验的会话记录与附件副本,预览只读。**恢复为副本** 会请 Host 生成新 ID,创建新的已归档聊天;来源会话和所选快照均不会被覆盖、删除或取消归档。
155
+
156
+ </details>
157
+
138
158
  <details>
139
159
  <summary><b>导入备份包含已存在的会话 ID 时会怎样?</b></summary>
140
160
 
@@ -159,13 +179,13 @@ JSON 会保留附件引用,但**本版不复制附件二进制,也不包含
159
179
  <details>
160
180
  <summary><b>为什么没有已归档聊天,空间页仍显示恢复快照?</b></summary>
161
181
 
162
- 恢复快照是在已归档聊天移入回收站前创建的。恢复聊天时插件会移除回收记录,但故意保留已经验证的快照作为恢复历史,因此当前归档列表为空时仍可能占用空间。默认策略按每个原会话保留一份;如需删除,请把数量改为 `0`,保存后再执行 **预览清理 → 应用所选清理**。仅保存策略不会删除数据。
182
+ 恢复快照是在已归档聊天移入回收站前创建的。恢复聊天时插件会移除回收记录,但故意保留已经验证的快照作为恢复历史,因此当前归档列表为空时仍可能占用空间。可在「历史版本」中单条删除或使用「清空历史版本」;回收站正在使用的保护版本会跳过。也可将保留数量改为 `0`,再执行 **预览清理 → 应用所选清理**。
163
183
 
164
184
  </details>
165
185
 
166
186
  ## 实现概览
167
187
 
168
- 插件由两部分组成:Host 服务层负责读取本地归档、快照、回收目录和恢复/清除事务,浏览器设置页负责搜索、预览、备份、恢复与明确确认。所有修改都通过受保护的本地路由完成;普通移除只提交回收记录,物理清除仅由回收站的崩溃安全 purge 流程触发。
188
+ 插件由两部分组成:Host 服务层负责读取本地归档、版本快照、回收目录和恢复/清除事务,浏览器设置页负责搜索、历史时间线、只读预览、备份、恢复为副本与明确确认。所有修改都通过受保护的本地路由完成;普通移除只提交回收记录,物理清除仅由回收站的崩溃安全 purge 流程触发。
169
189
 
170
190
  普通用户需要了解的数据保存、备份限制、删除结果和兼容性说明已列在本 README 中。路由清单、数据流、恢复事务、实时删除生命周期和失败回退等维护者细节请参阅 [架构文档](docs/ARCHITECTURE.md)。
171
191
 
@@ -175,10 +195,27 @@ JSON 会保留附件引用,但**本版不复制附件二进制,也不包含
175
195
  npm test
176
196
  ```
177
197
 
178
- 测试套件(`test/*.test.mjs`)覆盖导出记录与真实 ZIP 解包、有界导入校验、恢复事务、元数据存储、统计服务、全文搜索、对话预览,以及宿主+浏览器冒烟测试。测试使用隔离的临时 DSH 主目录和模拟运行时,不会读取或修改真实会话。
198
+ 测试套件(`test/*.test.mjs`)覆盖导出与导入、历史抓取/清单/预览/图片授权、单次确认的恢复为副本事务、回滚、保留策略、全文搜索,以及 Host+浏览器冒烟/响应式行为。测试使用隔离的临时 DSH 主目录和模拟运行时,不会读取或修改真实会话。
179
199
 
180
200
  ## 版本更新记录
181
201
 
202
+ ### 1.0.1
203
+
204
+ - 正式说明设置入口由「已归档的聊天」更名为「会话档案」;包名、仓库名、安装方式和本地数据位置保持不变。
205
+ - 用当前版本真实界面重新拍摄固定的 8 张演示图,并让 README 与插件市场引用同一套图片。
206
+ - 兼容性改为按 Host 公开能力说明,移除重复的具体 RC 版本和内部路由数量描述。
207
+ - 补齐历史版本单条删除与清空历史的用户流程说明;清理公共仓库中的内部计划、QA 和机器临时路径,并增加自动卫生门禁。
208
+
209
+ ### 1.0.0
210
+
211
+ - 新增第五个 **历史版本** 页签:按原会话查看本地已验证版本、回收保护状态和不透明降级项。
212
+ - 浏览器归档成功后按稳定修订去重抓取;失败不回滚归档,通知保留安全重试。
213
+ - 复用原有对话预览显示快照时间与已验证图片;恢复始终生成新的已归档 ID,不覆盖来源。
214
+ - 新增经过危险确认的单条历史删除和全局清空;不使用复选框,回收站保护/降级快照不会被该操作删除。
215
+ - 回收移动可复用相同非空修订快照;保留策略继续治理历史,永久删除会清掉该来源的全部已验证快照。
216
+ - 在真实 Web Host 中验证了插件加载、安全清单与能力降级;Host 缺少 writer 时恢复以 `restore-unsupported` 无写入失败。
217
+ - **降级提醒:** 0.12 不显示「历史版本」页签,但仍能校验、保留和清理 version 1 快照。降级前仍应备份 `$DSH_HOME/plugin-data/archived-chats/`。
218
+
182
219
  ### 0.12.0
183
220
 
184
221
  - 归档成功后新增 3 秒顶部提示,可立即查看归档中心或撤销;悬停/聚焦暂停,操作失败保留重试。
@@ -208,7 +245,7 @@ npm test
208
245
  - 新增按需显示的批量选择模式:列表默认不展示复选框,点击入口后才显示,完成批量操作后自动退出。
209
246
  - 将常用 ZIP 备份操作改为直接的 **导入备份 / 导出备份**,危险操作收纳到 **更多**,精简页头布局。
210
247
  - 移除未提供原生继续能力的跨工具 JSONL 迁移入口,让插件专注于 DSH 已归档聊天管理。
211
- - 在 DeepSeek Harness `0.1.0-rc.8` 真实宿主中复核新控件、备份预览和标题单行布局。
248
+ - 在真实宿主中复核新控件、备份预览和标题单行布局。
212
249
 
213
250
  ### 0.8.1
214
251
 
@@ -234,8 +271,8 @@ npm test
234
271
 
235
272
  ### 0.5.1
236
273
 
237
- - 发布面向 DeepSeek Harness `0.1.0-rc.7` 的兼容性修订版本。
238
- - 更新浏览器设置区块,使用 rc.7 的浮层和状态设计令牌。
274
+ - 发布兼容性修订版本。
275
+ - 更新浏览器设置区块,使用宿主提供的浮层和状态设计令牌。
239
276
 
240
277
  ### 0.5.0
241
278
 
@@ -249,7 +286,7 @@ npm test
249
286
 
250
287
  ### 0.3.0
251
288
 
252
- - 首个公开发布版本,提供「已归档的聊天」设置页。
289
+ - 首个公开发布版本,提供「会话档案」设置页。
253
290
  - 新增按工作区分组浏览、标题搜索、类型/项目筛选、取消归档,以及带确认的单条/分组/全部删除。
254
291
  - 新增 Host 路由、浏览器设置区块,以及用于处理运行中会话的待删队列清扫。
255
292