dsh-archived-chats 1.6.2 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/docs/ARCHITECTURE.en.md +18 -18
- package/docs/ARCHITECTURE.md +12 -12
- package/docs/USER_GUIDE.md +3 -2
- package/docs/USER_GUIDE.zh-CN.md +3 -2
- package/lib/client.js +24 -494
- package/lib/import.js +4 -0
- package/lib/index.js +6 -58
- package/lib/persistence-compat.js +17 -1
- package/lib/recycle.js +2 -169
- package/lib/restore.js +13 -0
- package/lib/trash.js +0 -52
- package/lib/types/client/index.d.ts +2 -72
- package/lib/types/index.d.ts +8 -83
- package/package.json +1 -5
- package/lib/auto-retention.js +0 -135
- package/lib/insights.js +0 -193
- package/lib/retention-service.js +0 -215
- package/lib/retention.js +0 -214
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,32 @@
|
|
|
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.6.4 — 2026-11-06
|
|
8
|
+
|
|
9
|
+
### 中文
|
|
10
|
+
|
|
11
|
+
- 移除已停用的自动清理、保留策略、空间统计页面及新建回收的运行时代码;保留旧回收记录的恢复/导出、当前永久删除的持久任务与快照清理。旧 `retention.json` 不读取或改写,过时策略请求继续返回 410。
|
|
12
|
+
- 导入备份时,在预览和写入前拒绝与当前系统不兼容或无效的工作目录;保留原 ZIP 与目录值,不自动映射目录。
|
|
13
|
+
|
|
14
|
+
### English
|
|
15
|
+
|
|
16
|
+
- Remove retired automatic cleanup, retention-policy and storage-page code, plus the unused new-recycle path. Keep legacy recovery/export and the durable permanent-deletion and snapshot-cleanup paths. Saved policies remain untouched; stale policy writes still return 410.
|
|
17
|
+
- Reject incompatible or invalid backup working directories during import preview and before restore writes. Preserve the original ZIP and directory value without automatic mapping.
|
|
18
|
+
|
|
19
|
+
## 1.6.3 — 2026-11-05
|
|
20
|
+
|
|
21
|
+
### 中文
|
|
22
|
+
|
|
23
|
+
- 将开发依赖及四套官方 Host 测试环境中的 Zod 统一更新至 `4.6.7`,消除高危依赖告警 [GHSA-mrhx-c7xc-m3w5](https://github.com/advisories/GHSA-mrhx-c7xc-m3w5)。
|
|
24
|
+
- 对精确依赖旧版 Zod 的 Host 测试夹具添加局部 `overrides`,保留官方 Host 版本;同步锁文件,避免独立安装测试夹具时重新引入受影响版本。
|
|
25
|
+
- 本次为开发与测试依赖维护,不改动插件运行时代码、数据格式或 Host 兼容范围;插件发布包不包含 Zod。
|
|
26
|
+
|
|
27
|
+
### English
|
|
28
|
+
|
|
29
|
+
- Update Zod to `4.6.7` in development dependencies and all four official Host test environments to resolve high-severity advisory [GHSA-mrhx-c7xc-m3w5](https://github.com/advisories/GHSA-mrhx-c7xc-m3w5).
|
|
30
|
+
- Add fixture-local overrides where official Host packages pin older Zod versions, retaining the Host versions and updating lockfiles so independent fixture installations use the patched dependency.
|
|
31
|
+
- This is a development and test dependency maintenance release. Plugin runtime code, data formats and Host compatibility ranges are unchanged; Zod is not included in the published plugin package.
|
|
32
|
+
|
|
7
33
|
## 1.6.2 — 2026-11-05
|
|
8
34
|
|
|
9
35
|
### 中文
|
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ Archive Management adds conversation search, organization and backups to DeepSee
|
|
|
34
34
|
- **Organize chats:** manage Archived and Unarchived, including workspace groups, ungrouped chats, bulk actions, tags and notes.
|
|
35
35
|
- **Keep a backup:** export JSON + Markdown ZIPs; preview imports and skip existing IDs instead of overwriting them.
|
|
36
36
|
|
|
37
|
-
> This document describes 1.6.
|
|
37
|
+
> This document describes 1.6.4. New recycle operations and automatic cleanup are retired; see [upgrading](#upgrading-from-older-releases) for existing data.
|
|
38
38
|
|
|
39
39
|
## Install and open
|
|
40
40
|
|
|
@@ -146,7 +146,7 @@ node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host
|
|
|
146
146
|
npm pack --dry-run --json
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
Native checks use isolated temporary data; all
|
|
149
|
+
Native checks use isolated temporary data; all nine tests in each fixture must run without skips. Read the [contribution guide](CONTRIBUTING.md) in full before contributing.
|
|
150
150
|
|
|
151
151
|
## Uninstall
|
|
152
152
|
|
package/README.zh-CN.md
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
- **整理会话:** 管理已归档和未归档聊天,支持工作区分组、未分组、批量操作及标签备注。
|
|
33
33
|
- **保存备份:** 导出 JSON + Markdown ZIP,导入前预览并跳过已有会话,避免覆盖。
|
|
34
34
|
|
|
35
|
-
> 本文对应 1.6.
|
|
35
|
+
> 本文对应 1.6.4。此版本停止新增回收和自动清理,旧数据的处理方式见[从旧版升级](#从旧版升级)。
|
|
36
36
|
|
|
37
37
|
## 安装与打开
|
|
38
38
|
|
|
@@ -144,7 +144,7 @@ node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host
|
|
|
144
144
|
npm pack --dry-run --json
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
原生测试使用隔离临时数据,每套
|
|
147
|
+
原生测试使用隔离临时数据,每套 9 项均要求执行且不能跳过。提交贡献前请完整阅读[贡献指南](CONTRIBUTING.md)。
|
|
148
148
|
|
|
149
149
|
## 卸载
|
|
150
150
|
|
package/docs/ARCHITECTURE.en.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
English · [中文](ARCHITECTURE.md) · [User guide](USER_GUIDE.md)
|
|
6
6
|
|
|
7
|
-
This document describes the interfaces and behavior of
|
|
7
|
+
This document describes the interfaces and behavior of the unreleased source tree. Native integration tests cover DSH `0.1.7-rc.2`, `0.2.1-rc.2`, `0.2.1-rc.5` and `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. Runtime code is the authority for interfaces and behavior; user-facing documentation should agree with it.
|
|
8
8
|
|
|
9
9
|
## Product boundary and modules
|
|
10
10
|
|
|
@@ -17,11 +17,10 @@ The plugin supplements archive management; it does not replace DSH's main chat a
|
|
|
17
17
|
| `about.js` | Local plugin identity, bounded public version checks, in-memory cache |
|
|
18
18
|
| `persistence-compat.js` | Legacy inspect and modern read-handle adaptation; separate title reads |
|
|
19
19
|
| `workspace-bulk-archive.js` | Eligible workspace chats, short-lived confirmation, apply-time checks |
|
|
20
|
-
| `trash.js`, `snapshot.js`, `recycle.js` |
|
|
20
|
+
| `trash.js`, `snapshot.js`, `recycle.js` | Legacy recycle catalog and snapshot validation, restore, explicit purge, durable direct deletion |
|
|
21
21
|
| `export.js`, `import.js`, `restore.js` | ZIP export, bounded import validation, transactional restoration |
|
|
22
22
|
| `metadata.js`, `durable.js` | Tags/notes, serialized atomic writes, durability primitives |
|
|
23
|
-
| `search.js`, `stats.js
|
|
24
|
-
| `retention.js`, `retention-service.js`, `auto-retention.js` | Legacy policy and scheduler modules; no scheduler is mounted |
|
|
23
|
+
| `search.js`, `stats.js` | Message projection/search and directory measurements |
|
|
25
24
|
| `lineage.js` | Read-only source, fork, and subagent projection |
|
|
26
25
|
| `session-graph.js` | Session-id normalization, subagent descendant resolution, orphan classification |
|
|
27
26
|
|
|
@@ -37,7 +36,6 @@ POST /plugins/dsh-archived-chats/about/check-updates
|
|
|
37
36
|
POST /plugins/dsh-archived-chats/about/install-update
|
|
38
37
|
GET /plugins/dsh-archived-chats/state
|
|
39
38
|
GET /plugins/dsh-archived-chats/stats
|
|
40
|
-
GET /plugins/dsh-archived-chats/insights
|
|
41
39
|
GET /plugins/dsh-archived-chats/lineage
|
|
42
40
|
GET /plugins/dsh-archived-chats/workspace-archive/workspaces
|
|
43
41
|
POST /plugins/dsh-archived-chats/workspace-archive/preview
|
|
@@ -71,9 +69,9 @@ POST /plugins/dsh-archived-chats/orphans/export
|
|
|
71
69
|
|
|
72
70
|
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.
|
|
73
71
|
|
|
74
|
-
All `/history` and `/history/*` routes are removed; their former 410 response is no longer promised.
|
|
72
|
+
All `/history` and `/history/*` routes are removed; their former 410 response is no longer promised. All four `/retention/*` mutation routes return HTTP 410 `retention-retired`; saved policy files are not read or changed.
|
|
75
73
|
|
|
76
|
-
`/delete` accepts `sessionId`; `/delete-all` accepts `sessionIds`.
|
|
74
|
+
`/delete` accepts `sessionId`; `/delete-all` accepts `sessionIds`. Without `permanent: true`, they return 410. Explicit permanent deletion invokes `deleteArchived` and returns `{ deleted, pending, failed }`. With failures and no successful deletions it returns HTTP 409; partial success can return 200. Consumers must inspect the result arrays rather than the status alone.
|
|
77
75
|
|
|
78
76
|
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.
|
|
79
77
|
|
|
@@ -91,7 +89,7 @@ Plugin state lives under `$DSH_HOME/plugin-data/archived-chats/`:
|
|
|
91
89
|
| --- | --- |
|
|
92
90
|
| `metadata.json` | Versioned tags and notes |
|
|
93
91
|
| `trash.json` | Authoritative recycle and permanent-deletion intent catalog |
|
|
94
|
-
| `retention.json` |
|
|
92
|
+
| `retention.json` | Preserved legacy policy; not read or executed |
|
|
95
93
|
| `snapshots/` | Protection snapshots, staging, and recovery files |
|
|
96
94
|
| `pending-deletions.json` | Legacy deletion markers; reading the bin records missing `purge-pending` entries without deleting sessions or sweeping snapshots |
|
|
97
95
|
| `legacy-recycle.json` | Legacy file, no longer read or projected |
|
|
@@ -149,7 +147,7 @@ Selection mode stores checked IDs on the client. Select all uses filtered `group
|
|
|
149
147
|
|
|
150
148
|
Archive row actions are preview, edit tags/note, Unarchive, and Delete. The header exposes More; Unarchived reuses `GroupSection`, with full-width search above filters, matching Archived; Sources & Branches uses full-width search above a shared workspace, count and fold-control row and a Refresh text button at the top 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, a separator, and Delete all. Header geometry stays consistent across tabs. Workspace menus contain Unarchive all, Export all, a separator, and Delete all; every action confirms the full workspace name. Archive/unarchive confirmations omit counts; an explicit scope distinguishes global archive from a workspace action even when only one workspace exists. Successful unarchive only updates the lists, matching the official behavior. Global export/delete still confirms counts 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/Export snapshot/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.
|
|
151
149
|
|
|
152
|
-
Plugin confirmation, preview, import,
|
|
150
|
+
Plugin confirmation, preview, import, and metadata 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.
|
|
153
151
|
|
|
154
152
|
## About and version discovery
|
|
155
153
|
|
|
@@ -164,7 +162,7 @@ Opening Archive Management loads local metadata, then automatically checks publi
|
|
|
164
162
|
|
|
165
163
|
## Recycle and restore
|
|
166
164
|
|
|
167
|
-
|
|
165
|
+
Current routes do not create new recycle records. Legacy records remain readable for recovery, export, and explicit purge; the old internal move path has been removed.
|
|
168
166
|
|
|
169
167
|
Snapshot manifests use `dsh-archived-chats/snapshot` v1; `dsh-archived-chats/snapshot-session` payloads use v2 when inherited metadata is available, otherwise legacy v1. Limits: 4 MiB manifest, 64 MiB session JSON, 1,000 attachments, 32 MiB per attachment, 512 MiB total. Attachments are SHA-256-validated as streams and reread individually before restoration, not all retained in memory.
|
|
170
168
|
|
|
@@ -194,17 +192,17 @@ Failures retain purge-pending. Explicit user retries continue these tasks, never
|
|
|
194
192
|
|
|
195
193
|
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.
|
|
196
194
|
|
|
197
|
-
Cascade runs on the permanent paths only: direct archive deletion, recycle purge, Empty Recycle Bin.
|
|
195
|
+
Cascade runs on the permanent paths only: direct archive deletion, legacy recycle purge, and Empty Recycle Bin. An existing recycled original remains on disk until permanently deleted, so its subagents are not orphans before that point. 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.
|
|
198
196
|
|
|
199
197
|
## Startup recovery and old-data cleanup
|
|
200
198
|
|
|
201
199
|
The transition mounts no startup recovery or cleanup scheduler. Legacy records, snapshots and policy files remain untouched. Pending deletion is retried explicitly from the Recycle Bin.
|
|
202
200
|
|
|
203
|
-
## Storage
|
|
201
|
+
## Storage and lineage
|
|
204
202
|
|
|
205
|
-
Stats measures directories with concurrency four, skips symlinks, and caches for 30 seconds; failure affects only the relevant item.
|
|
203
|
+
Stats measures directories with concurrency four, skips symlinks, and caches for 30 seconds; failure affects only the relevant item.
|
|
206
204
|
|
|
207
|
-
|
|
205
|
+
Policy modules have been removed. All four `/retention/*` POST routes return HTTP 410 `retention-retired` without reading or changing the saved policy.
|
|
208
206
|
|
|
209
207
|
|
|
210
208
|
Lineage uses durable parentSession only, focusing officially archived chats and their ancestors and descendants, excluding unrelated branches and empty workspaces. At most 100 missing titles are read on demand; the 5,000-node limit applies to the displayed graph. Unknown fields degrade individual nodes. Search/filtering preserve ancestors and never modify relationships.
|
|
@@ -221,13 +219,15 @@ The shared limits are 2,000 sessions, 4,001 entries, 4 MiB manifest, 4 MiB per s
|
|
|
221
219
|
|
|
222
220
|
restore.js adapts verified modern create handles first, then dedicated restore or an explicitly exclusive legacy create/append/locate contract. Plain legacy create/append is unsupported: inventory absence does not prove exclusive ownership. Modern import preserves the exact cut, appends in batches, flushes (including empty logs), validates a full read, and closes handles after registry/metadata commit. Rollback authority starts only after successful creation. A safely located session-owned destination is required; an uncertain first-write artifact is preserved and reported as `restore-rollback-failed`, never blindly deleted. Legacy writers refuse inherited v2 records. Workspace attachment requires paired attach/detach. Conflicts include Recycle Bin entries and pending deletion tasks and are rechecked inside the lifecycle queue. This adapter serves ZIP import; recycle snapshot fallback has separate checks in recycle.js.
|
|
223
221
|
|
|
222
|
+
Import preview marks incompatible, ambiguous or invalid `cwd` values as non-restorable. Selection and the restore adapter recheck the complete batch before staging or persistence writes. No path is translated, discarded, or replaced with the process directory; native persistence and deletion-location validation remain unchanged. Windows drive/UNC paths not valid on POSIX and single-slash roots on Windows are refused. A single-slash root might originally have been a Windows current-drive path; the backup lacks a source-platform field, so the check is deliberately conservative. Ambiguous double-slash paths retain native UNC/POSIX semantics.
|
|
223
|
+
|
|
224
224
|
After raw import commits, optional public cold-title publication verifies the exact title and final event watermark under a shared bounded deadline. Cache absence, failure, timeout, or legacy Host seeded-cold-list limitations return stable degraded warnings without rolling back durable restored data. Unarchive separately requires an authoritative readable persisted header with `cwd`; missing `cwd` is not the same as missing workspace and leaves the archived copy available for preview/export.
|
|
225
225
|
|
|
226
226
|
## Validation and release boundaries
|
|
227
227
|
|
|
228
228
|
`test/backup-roundtrip.test.mjs` uses an installed official backend with temporary storage when `DSH_NATIVE_MODULE_ROOT` points to its node_modules directory. It covers v1 recovery, fork v2 round-trips, preview/unarchive/reopen, first-publication failures, foreign-create races, and pending-deletion conflicts. Without that opt-in these native tests are explicitly skipped; modern adapter unit tests still run.
|
|
229
229
|
|
|
230
|
-
Tests cover retained modules: export/import rollback, snapshots/recycle states, interrupted deletion and
|
|
230
|
+
Tests cover retained modules: export/import rollback, snapshots/recycle states, interrupted deletion and explicit retry, fork titles, complete reads and strict ZIP reads, statistics, lineage, Host routes, client behavior, types, and package contents. test/archive-lifecycle.test.mjs covers fork preview, recycle/restore, inherited-cut preservation, and direct purge. Tests use isolated data, not real chats.
|
|
231
231
|
|
|
232
232
|
```sh
|
|
233
233
|
npm test
|
|
@@ -241,12 +241,12 @@ npm pack --dry-run --json
|
|
|
241
241
|
git diff --check
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
The native commands install the locked `@deepseek-ai/dsh-session@0.1.7-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5` fixtures and require all
|
|
244
|
+
The native commands install the locked `@deepseek-ai/dsh-session@0.1.7-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5` fixtures and require all nine native integration cases to run without skips for each fixture. This is the local equivalent of the mandatory native Host integration gate in CI.
|
|
245
245
|
|
|
246
|
-
The declared DSH `>=0.1.0-rc.7` range remains capability-based. Release automation tests Node.js 18 on Ubuntu and Node.js 24 on Ubuntu, macOS, and Windows; the Node.js 24 matrix requires all three official Host backend fixtures, `@deepseek-ai/dsh-session@0.1.7-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5`, on all three platforms (
|
|
246
|
+
The declared DSH `>=0.1.0-rc.7` range remains capability-based. Release automation tests Node.js 18 on Ubuntu and Node.js 24 on Ubuntu, macOS, and Windows; the Node.js 24 matrix requires all three official Host backend fixtures, `@deepseek-ai/dsh-session@0.1.7-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5`, on all three platforms (9/9 each), along with package checks, including the v4 session format. The [screenshots](../screenshots.json) show the current interface with synthetic example chats.
|
|
247
247
|
|
|
248
248
|
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 explicit retries can continue 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.
|
|
249
249
|
|
|
250
250
|
`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.
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
The About page offers a manual residual-subagent check. Opening About does not start a scan; the user explicitly requests it, and closing the result dialog cancels the request. The retired Storage & Retention page remains unmounted.
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[English](ARCHITECTURE.en.md) · 中文 · [用户指南](USER_GUIDE.zh-CN.md)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
本文描述当前未发布代码的接口与行为;原生集成测试覆盖 DSH `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.5` 和 `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md)。运行时代码是接口与行为的依据;用户操作说明与本文应保持一致。
|
|
8
8
|
|
|
9
9
|
## 产品边界与模块
|
|
10
10
|
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
| `trash.js`、`snapshot.js`、`recycle.js` | 回收目录、可验证保护快照、旧记录恢复/永久删除 |
|
|
21
21
|
| `export.js`、`import.js`、`restore.js` | ZIP 导出、有界导入验证、事务恢复 |
|
|
22
22
|
| `metadata.js`、`durable.js` | 标签备注、串行原子写入与持久化操作 |
|
|
23
|
-
| `search.js`、`stats.js
|
|
24
|
-
| `retention.js`、`retention-service.js`、`auto-retention.js` | 旧策略与调度模块;当前不挂载自动任务 |
|
|
23
|
+
| `search.js`、`stats.js` | 消息投影与搜索、会话目录测量 |
|
|
25
24
|
| `lineage.js` | 只读来源、分叉与子代理关系投影 |
|
|
26
25
|
| `session-graph.js` | 会话 ID 归一化、子代理后代解析与孤儿分类 |
|
|
27
26
|
|
|
@@ -37,7 +36,6 @@ POST /plugins/dsh-archived-chats/about/check-updates
|
|
|
37
36
|
POST /plugins/dsh-archived-chats/about/install-update
|
|
38
37
|
GET /plugins/dsh-archived-chats/state
|
|
39
38
|
GET /plugins/dsh-archived-chats/stats
|
|
40
|
-
GET /plugins/dsh-archived-chats/insights
|
|
41
39
|
GET /plugins/dsh-archived-chats/lineage
|
|
42
40
|
GET /plugins/dsh-archived-chats/workspace-archive/workspaces
|
|
43
41
|
POST /plugins/dsh-archived-chats/workspace-archive/preview
|
|
@@ -73,7 +71,7 @@ POST /plugins/dsh-archived-chats/orphans/export
|
|
|
73
71
|
|
|
74
72
|
所有 `/history` 和 `/history/*` 路由已移除,不再承诺返回旧的 410 响应。全部 retention 操作路由返回 410 `retention-retired`;不执行策略写入或清理。
|
|
75
73
|
|
|
76
|
-
`/delete` 接收 `sessionId`,`/delete-all` 接收 `sessionIds
|
|
74
|
+
`/delete` 接收 `sessionId`,`/delete-all` 接收 `sessionIds`。缺少 `permanent: true` 时返回 410;明确永久删除才调用 `deleteArchived`。结果为 `{ deleted, pending, failed }`;全部失败且没有删除成功项时为 HTTP 409,部分成功仍可返回 200,调用方必须检查结果数组,不能只看状态码。
|
|
77
75
|
|
|
78
76
|
回收接口分别调用 `restore`、`purge`、`empty`。empty 要求确认时捕获的精确 `trashed`/`degraded` 记录实例,包括回收与快照身份。服务只清理这些目标:之后新增的记录被排除,已变更目标失败,不扩大或重算范围。已有 `purge-pending` 任务只由独立重试流程续作。规范的独占目录检查只授权删除会话所有的目标,不是广义文件系统删除保证;结果不确定时保留持久记录。
|
|
79
77
|
|
|
@@ -91,7 +89,7 @@ POST /plugins/dsh-archived-chats/orphans/export
|
|
|
91
89
|
| --- | --- |
|
|
92
90
|
| `metadata.json` | 版本化标签备注 |
|
|
93
91
|
| `trash.json` | 回收和永久删除意图的权威目录 |
|
|
94
|
-
| `retention.json` |
|
|
92
|
+
| `retention.json` | 保留的旧策略;当前不读取或执行 |
|
|
95
93
|
| `snapshots/` | 保护快照、暂存和恢复所需文件 |
|
|
96
94
|
| `pending-deletions.json` | 旧删除标记;读取回收站时为缺少回收记录的标记补齐 `purge-pending` 入口,不执行删除或快照清扫 |
|
|
97
95
|
| `legacy-recycle.json` | 旧版遗留,新版不再读取或投影 |
|
|
@@ -149,7 +147,7 @@ apply 只接受凭据,不接受调用方增补会话 ID。每条执行前在
|
|
|
149
147
|
|
|
150
148
|
选择模式在客户端保存已选 ID 集合。全选从筛选后的 `group.items` 获取范围;工作区批量操作仍使用完整 `group.sessionIds`。隐藏选择显示数量,切换页面或取消清空集合,列表更新后剔除已不存在的 ID。操作确认捕获 ID 快照并复用现有导出、取消归档和删除接口。选择模式隐藏行内修改及全局/工作区菜单,保留预览,更多提供导出选中。
|
|
151
149
|
|
|
152
|
-
|
|
150
|
+
所有插件确认、预览、导入和元数据弹窗共用不透明的 `--dsw-alias-bg-layer-2` 背景及宿主 prominent elevation,兼容旧版阴影。菜单和提示使用不透明主题层;遮罩与悬停状态保留各自的半透明用途,避免将磨砂菜单 token 直接用于弹窗主体。
|
|
153
151
|
|
|
154
152
|
## 关于与版本查询
|
|
155
153
|
|
|
@@ -164,7 +162,7 @@ apply 只接受凭据,不接受调用方增补会话 ID。每条执行前在
|
|
|
164
162
|
|
|
165
163
|
## 回收与恢复
|
|
166
164
|
|
|
167
|
-
|
|
165
|
+
当前路由不创建新的回收记录。旧记录仍可用于恢复、导出与显式清除;旧内部移入路径已移除。
|
|
168
166
|
|
|
169
167
|
快照 manifest 格式为 `dsh-archived-chats/snapshot` v1;`dsh-archived-chats/snapshot-session` 载荷在有继承元数据时使用 v2,否则保留旧 v1。上限:manifest 4 MiB、session JSON 64 MiB、1,000 个附件、单附件 32 MiB、总计 512 MiB。附件流式校验 SHA-256,恢复写入前逐件复读,不同时驻留全部附件字节。
|
|
170
168
|
|
|
@@ -202,9 +200,9 @@ apply 只接受凭据,不接受调用方增补会话 ID。每条执行前在
|
|
|
202
200
|
|
|
203
201
|
## 空间、策略与来源关系
|
|
204
202
|
|
|
205
|
-
`stats` 并发 4 测量会话目录、跳过符号链接,缓存 30
|
|
203
|
+
`stats` 并发 4 测量会话目录、跳过符号链接,缓存 30 秒;失败只影响对应项。
|
|
206
204
|
|
|
207
|
-
|
|
205
|
+
策略模块已移除。四个 `/retention/*` POST 路由统一返回 HTTP 410 `retention-retired`,不读取或修改保存的策略。
|
|
208
206
|
|
|
209
207
|
|
|
210
208
|
`lineage` 仅使用持久化 `parentSession` 建树,聚焦官方已归档聊天及其祖先和后代,排除无关分支和空工作区。最多按需读 100 个缺失标题,5,000 节点上限针对实际展示图;不认识的字段仅使相关节点降级。搜索和筛选保留必要祖先,不修改关系。
|
|
@@ -221,6 +219,8 @@ apply 只接受凭据,不接受调用方增补会话 ID。每条执行前在
|
|
|
221
219
|
|
|
222
220
|
`restore.js` 优先已验证的现代 create 句柄,其次专用恢复入口或明确独占的旧 create/append/locate 合约。普通旧 create/append 不受支持:目录中不存在记录不能证明独占所有权。现代导入保留继承边界、分批追加、flush(包括空日志)、完整回读校验,并在注册表和元数据提交后关闭句柄。仅在创建成功后获得回滚权限,要求安全定位的会话独占目录;首次写入失败留下归属不确定的文件时保留并报告 `restore-rollback-failed`,不盲删。旧 writer 拒绝带继承的 v2 记录。工作区关联需 attach/detach 成对支持。冲突集包含回收记录和待删除任务,并在生命周期队列内重检。此适配器用于 ZIP 导入;回收快照回退在 `recycle.js` 中有独立检查。
|
|
223
221
|
|
|
222
|
+
导入预览把不兼容、有歧义或无效的 `cwd` 标记为不可恢复;选择与恢复适配器在暂存和持久化写入前重新检查整批记录。不转换、丢弃目录或改用进程目录,持久化和删除位置校验保持不变。POSIX 上不合法的 Windows 盘符/UNC 路径及 Windows 上的单斜杠根路径被拒绝。单斜杠根路径也可能原本是 Windows 当前盘符路径,备份缺少来源系统字段,因此此处有意保守拦截。有歧义的双斜杠路径保留本机 UNC/POSIX 路径语义。
|
|
223
|
+
|
|
224
224
|
原始导入提交后,可选公开冷标题发布会在共享有界截止时间内验证精确标题和最终事件水位。缓存缺失、失败、超时或旧版 Host 的 seeded 冷列表限制只返回稳定降级警告,不回滚持久化恢复数据。取消归档另外要求权威可读的持久化 header 包含 `cwd`;缺少 `cwd` 不等于缺少工作区,并会把已归档副本保留为可预览/导出。
|
|
225
225
|
|
|
226
226
|
## 验证与发布边界
|
|
@@ -241,9 +241,9 @@ npm pack --dry-run --json
|
|
|
241
241
|
git diff --check
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
原生集成命令会分别安装锁定的 `@deepseek-ai/dsh-session@0.1.7-rc.2`、`0.2.1-rc.2` 和 `0.2.1-rc.5` fixtures
|
|
244
|
+
原生集成命令会分别安装锁定的 `@deepseek-ai/dsh-session@0.1.7-rc.2`、`0.2.1-rc.2` 和 `0.2.1-rc.5` fixtures,每套都要求九个原生集成用例全部执行且不能跳过;这是 CI 强制原生 Host 集成门禁的本地等价检查。
|
|
245
245
|
|
|
246
|
-
声明的 DSH `>=0.1.0-rc.7` 范围仍以 Host 公开能力为准。发布自动化在 Ubuntu 上测试 Node.js 18,并在 Ubuntu、macOS 和 Windows 上测试 Node.js 24;Node.js 24 矩阵在三个平台上分别强制运行基于官方 `@deepseek-ai/dsh-session@0.1.7-rc.2`、`0.2.1-rc.2` 和 `0.2.1-rc.5` 的三套 Host 后端集成(每套
|
|
246
|
+
声明的 DSH `>=0.1.0-rc.7` 范围仍以 Host 公开能力为准。发布自动化在 Ubuntu 上测试 Node.js 18,并在 Ubuntu、macOS 和 Windows 上测试 Node.js 24;Node.js 24 矩阵在三个平台上分别强制运行基于官方 `@deepseek-ai/dsh-session@0.1.7-rc.2`、`0.2.1-rc.2` 和 `0.2.1-rc.5` 的三套 Host 后端集成(每套 9/9)与打包检查,覆盖 v4 会话格式。[截图](../screenshots.json)使用虚构示例聊天展示当前界面。
|
|
247
247
|
|
|
248
248
|
永久删除在最终读取子代理关系前先取消并释放活动代理。完整后代集合以可选 `cascadeSessionIds` 保存到父会话的 `purge-pending` 记录;父目录消失后也保留该记录,直到所有子代理清理完成。用户明确重试时据此恢复级联,不跨越分叉或已有独立回收记录的子树。待重试记录清空前不要降级到不支持此字段的版本。
|
|
249
249
|
|
package/docs/USER_GUIDE.md
CHANGED
|
@@ -4,7 +4,7 @@ Version 1.6.0 disables new recycle operations and automatic cleanup while retain
|
|
|
4
4
|
|
|
5
5
|
English · [简体中文](USER_GUIDE.zh-CN.md) · [Back to README](../README.md)
|
|
6
6
|
|
|
7
|
-
Archive Management provides a place to browse and manage DSH's archived chats, plus workspace bulk archiving. This document describes 1.6.
|
|
7
|
+
Archive Management provides a place to browse and manage DSH's archived chats, plus workspace bulk archiving. This document describes 1.6.4, with native integration coverage for DSH `0.1.7-rc.2`, `0.2.1-rc.2`, `0.2.1-rc.5` and `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. For interfaces and data formats, see the [architecture](ARCHITECTURE.en.md).
|
|
8
8
|
|
|
9
9
|
## Chat states and legacy data
|
|
10
10
|
|
|
@@ -179,6 +179,7 @@ Import accepts this plugin's v1 and v2 ZIP formats and previews before writing:
|
|
|
179
179
|
|
|
180
180
|
- Existing IDs, Recycle Bin entries, and unfinished deletion tasks are marked as conflicts, disabled, and skipped; existing sessions are never overwritten.
|
|
181
181
|
- Missing workspaces produce warnings and ungrouped archived chats.
|
|
182
|
+
- Incompatible or ambiguous working directories are disabled in preview and refused again before restore writes, without translating or discarding them. Examples include Windows drive paths on macOS/Linux and `/project`-style roots on Windows. The latter could be a POSIX path or a Windows current-drive root; the backup cannot distinguish these, so restoration is conservatively refused. Invalid and drive-relative paths are also refused. Keep the original ZIP. Directory mapping is not yet provided; this is a safety check, not full cross-platform migration support.
|
|
182
183
|
- Tags and notes follow the same length limits.
|
|
183
184
|
- Expired confirmation requires another preview; unsupported restore writes are refused.
|
|
184
185
|
|
|
@@ -247,7 +248,7 @@ Features depend on public Host capabilities, not just a version number:
|
|
|
247
248
|
- Version 2 protection records require this or a newer plugin. Before downgrading, restore recycled chats you need to retain and back up plugin data.
|
|
248
249
|
- 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.
|
|
249
250
|
|
|
250
|
-
The declared DSH `>=0.1.0-rc.7` range remains capability-based. Release automation tests Node.js 18 on Ubuntu and Node.js 24 on Ubuntu, macOS, and Windows; the Node.js 24 matrix requires all three pinned official Host backends, `@deepseek-ai/dsh-session@0.1.7-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5` (
|
|
251
|
+
The declared DSH `>=0.1.0-rc.7` range remains capability-based. Release automation tests Node.js 18 on Ubuntu and Node.js 24 on Ubuntu, macOS, and Windows; the Node.js 24 matrix requires all three pinned official Host backends, `@deepseek-ai/dsh-session@0.1.7-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5` (nine integration cases each) and package checks, including the v4 session format.
|
|
251
252
|
|
|
252
253
|
## Local data and uninstall
|
|
253
254
|
|
package/docs/USER_GUIDE.zh-CN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[English](USER_GUIDE.md) · 简体中文 · [返回 README](../README.zh-CN.md)
|
|
6
6
|
|
|
7
|
-
归档管理为 DSH 已归档聊天提供查看和管理页面,并扩展按工作区批量归档。本文描述 1.6.
|
|
7
|
+
归档管理为 DSH 已归档聊天提供查看和管理页面,并扩展按工作区批量归档。本文描述 1.6.4 的行为,原生集成测试覆盖 DSH `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.5` 和 `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md),接口和数据格式见[架构说明](ARCHITECTURE.md)。
|
|
8
8
|
|
|
9
9
|
## 会话状态与旧数据
|
|
10
10
|
|
|
@@ -179,6 +179,7 @@ JSON 是机器可读记录,Markdown 是可读副本。新版 Host 导出 ZIP v
|
|
|
179
179
|
|
|
180
180
|
- 已存在的会话 ID、回收记录和未完成删除任务均标为冲突、禁用并跳过,不覆盖原会话。
|
|
181
181
|
- 缺少对应工作区时,带警告导入为未分组归档聊天。
|
|
182
|
+
- 与当前系统不兼容或有歧义的工作目录会在预览中禁选,写入前再次拒绝,不自动转换或丢弃。例如 macOS/Linux 上的 Windows 盘符路径,以及 Windows 上的 `/project` 一类根路径。后者可能来自 POSIX,也可能是 Windows 当前盘符根路径,现有备份无法区分,因此保守拒绝。无效和盘符相对路径也会被拒绝。请保留原 ZIP;当前版本不提供本地目录映射,这不是完整的跨平台迁移功能。
|
|
182
183
|
- 标签和备注遵守相同长度限制。
|
|
183
184
|
- 确认过期后需要重新预览;缺少恢复写入能力时拒绝执行。
|
|
184
185
|
|
|
@@ -245,7 +246,7 @@ ZIP 导入和回收站恢复是两套不同流程,不要把 ZIP 当作回收
|
|
|
245
246
|
- v2 保护快照需要此版或更新的插件读取;回退旧插件前先恢复需要保留的回收聊天,并备份插件数据。
|
|
246
247
|
- 如果 `trash.json` 无法读取,归档列表会标为未经核对,回收站不可用,并拒绝取消归档、编辑标签备注及删除等归档修改,避免猜测状态。
|
|
247
248
|
|
|
248
|
-
声明的 DSH `>=0.1.0-rc.7` 范围仍表达基于 Host 公开能力的兼容性。发布自动化在 Ubuntu 上测试 Node.js 18,并在 Ubuntu、macOS 和 Windows 上测试 Node.js 24;Node.js 24 矩阵强制运行官方 `@deepseek-ai/dsh-session@0.1.7-rc.2`、`0.2.1-rc.2` 和 `0.2.1-rc.5` 三套锁定 Host 后端集成(各
|
|
249
|
+
声明的 DSH `>=0.1.0-rc.7` 范围仍表达基于 Host 公开能力的兼容性。发布自动化在 Ubuntu 上测试 Node.js 18,并在 Ubuntu、macOS 和 Windows 上测试 Node.js 24;Node.js 24 矩阵强制运行官方 `@deepseek-ai/dsh-session@0.1.7-rc.2`、`0.2.1-rc.2` 和 `0.2.1-rc.5` 三套锁定 Host 后端集成(各 9 项)与打包检查,覆盖 v4 会话格式。
|
|
249
250
|
|
|
250
251
|
## 本地数据与卸载
|
|
251
252
|
|