@michengai/dsh-archive-manager 0.1.38 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@
4
4
 
5
5
  Published release notes are retained below; new versions are added without removing earlier entries.
6
6
 
7
+ ## 0.1.40 - 2026-09-13
8
+
9
+ - Open archived sessions in the native DSH conversation view and continue chatting while keeping them archived, or restore and open them.
10
+ - Close the settings overlay after an archived conversation opens successfully; keep settings open and show an error on failure, with a restore-and-open alternative when host navigation adaptation is unavailable.
11
+ - Localize archive navigation errors and avoid unnecessary warnings when older hosts load or open archives successfully.
12
+
13
+ ## 0.1.39 - 2026-09-11
14
+
15
+ - Preserve the Codex UI workspace list, styling, and dedicated interactions when both plugins are installed, while keeping archive management available.
16
+ - Delegate the home workspace picker and session navigation to the official DSH plugin while retaining the custom archive sidebar, directory creation, restore, and batch management, reducing navigation API drift across host upgrades.
17
+ - Isolate sidebar directory synchronization failures so they do not interrupt other plugins registering directory components. If your Profile manually disables the official `ui-workspace`, remove that override before upgrading; otherwise the archive sidebar and settings page cannot load.
18
+
7
19
  ## 0.1.38 - 2026-09-11
8
20
 
9
21
  - Support DeepSeek Harness `0.1.5-rc.2` while retaining compatibility with the four previously supported versions.
@@ -4,6 +4,18 @@
4
4
 
5
5
  以下发布说明会持续保留;新增版本时不再删除较早记录。
6
6
 
7
+ ## 0.1.40 - 2026-09-13
8
+
9
+ - 支持直接打开归档会话,在 DSH 原生页面查看完整对话并保持归档继续聊天,也可恢复后打开。
10
+ - 修复查看归档后设置遮罩未关闭的问题:打开成功后关闭设置,失败时保留设置并显示错误;宿主导航适配不可用时可恢复后打开。
11
+ - 归档打开失败提示随界面语言显示,旧宿主正常加载和打开归档时不再产生多余警告。
12
+
13
+ ## 0.1.39 - 2026-09-11
14
+
15
+ - 修复与 Codex UI 共存时抢占其工作区列表的问题,保留 Codex UI 的列表样式和专属交互,同时提供归档管理入口。
16
+ - 首页工作区选择与会话导航改由 DSH 官方插件提供;保留自定义归档侧栏、目录添加、恢复和批量管理,减少宿主升级时导航接口不同步的问题。
17
+ - 隔离侧栏目录同步异常,避免影响其他插件注册目录组件。若 Profile 曾手工禁用官方 `ui-workspace`,升级前请移除该覆盖,否则归档侧栏与设置页无法加载。
18
+
7
19
  ## 0.1.38 - 2026-09-11
8
20
 
9
21
  - 支持 DeepSeek Harness `0.1.5-rc.2`,保留此前四个已支持版本的兼容路径。
package/README.md CHANGED
@@ -14,184 +14,135 @@
14
14
  [![npm package](https://img.shields.io/npm/v/%40michengai%2Fdsh-archive-manager.svg?label=npm%20package)](https://www.npmjs.com/package/@michengai/dsh-archive-manager)
15
15
  [![npm downloads](https://img.shields.io/npm/dt/%40michengai%2Fdsh-archive-manager.svg?label=npm%20downloads)](https://www.npmjs.com/package/@michengai/dsh-archive-manager)
16
16
  [![DSH Web Plugin](https://img.shields.io/badge/DSH%20Web-Plugin-0f766e.svg)](https://github.com/MichengAI/dsh-archive-manager)
17
- [![Node.js 22 or later](https://img.shields.io/badge/Node.js-22%20or%20later-339933.svg?logo=node.js&logoColor=white)](https://nodejs.org/)
18
17
  </div>
19
18
 
20
19
  > DSH Archive Manager is a community-maintained DeepSeek Harness (DSH) plugin, not an official DeepSeek AI product.
21
20
 
22
- ## Features
21
+ ## What you can do
23
22
 
24
- Put inactive conversations away and find them again when needed. Search, restore, and clean up archives in one place while keeping everyday task lists tidy.
23
+ Put inactive conversations away and find them again when needed, keeping everyday task lists tidy.
25
24
 
26
- - **Put finished tasks away**: archive one conversation or all active chats in a workspace.
27
- - **Find past work**: search titles, filter by project, and sort by time or title in **Settings → Archived sessions**.
28
- - **Resume your work**: restore one conversation, a project group, or all archived chats.
29
- - **Clean up records**: permanently delete individual chats or batches after confirmation. **Permanent deletion cannot be undone.**
25
+ - **Archive conversations**: put away one chat or all unarchived chats in a workspace.
26
+ - **Find past work**: search titles, filter by project, and sort by time or title.
27
+ - **Restore tasks**: restore one chat, selected chats, a project group, or all archives.
28
+ - **Clean up records**: permanently delete unwanted archived conversations after confirmation.
30
29
 
31
30
  ## Screenshots
32
31
 
33
- Open the sidebar session menu and choose **Archive session**:
32
+ Archive a chat from the sidebar session menu:
34
33
 
35
34
  ![Archive a session from the session menu](assets/screenshots/archive-session-menu.png)
36
35
 
37
- Search, sort, filter by project, unarchive, or permanently delete chats in **Settings → Archived sessions**:
36
+ Find, restore, and clean up chats in **Settings → Archived sessions**:
38
37
 
39
38
  ![Archived sessions settings page](assets/screenshots/archived-sessions.png)
40
39
 
41
- ## DSH product ecosystem
42
-
43
- For a ready-to-use workbench, download [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop/releases). If you already use [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), install any of these eight plugins individually. The desktop app includes all eight.
44
-
45
- | Plugin | What you can do |
46
- | --- | --- |
47
- | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) | Organize projects and conversations, search tasks, and navigate chat turns |
48
- | [IM Connect](https://github.com/MichengAI/dsh-im-connect) | Send tasks and receive replies through your usual messenger |
49
- | [Automation](https://github.com/MichengAI/dsh-automation) | Schedule tasks and review each run |
50
- | [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) | Find, enable, create, and import local skills |
51
- | [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) | Search, restore, or clean up archived conversations |
52
- | [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) | Choose and summon specialists for your task |
53
- | [BTW](https://github.com/MichengAI/dsh-btw) | Ask side questions without interrupting the main task |
54
- | [Simplify](https://github.com/MichengAI/dsh-simplify) | Use /simplify to improve code within your Git changes |
55
-
56
40
  ## Prerequisites
57
41
 
58
- - Plugin `0.1.38` supports DeepSeek Harness `0.1.5-rc.2` and retains the four previously supported hosts below. Later versions require separate validation.
59
-
60
- - A working DeepSeek Harness Web installation with `dsh` available in PowerShell.
61
- - Examples use the `web` profile; replace it with the target profile.
62
- - Source installation and development require Node.js 22+ and pnpm. npm installation does not require running `pnpm install` separately.
63
-
64
- DSH peer dependencies accept only `0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2`; other RCs and stable versions are not automatically accepted. Development dependencies are pinned to `0.1.5-rc.2`.
42
+ - A working [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web installation with `dsh` available in your terminal.
43
+ - Supported DSH versions: `0.1.0-rc.8`, `0.1.1-rc.2`, `0.1.2-rc.1`, `0.1.5-rc.1`, and `0.1.5-rc.2`. Other versions are not currently supported.
44
+ - Node.js matching `^22.19.0 || >=24.0.0`. Source installation also requires pnpm.
65
45
 
66
46
  ## Installation
67
47
 
68
- Run `pnpm test:compat` to test the same plugin artifacts with isolated host dependencies. The following combinations have passed; this does not claim coverage of every intermediate release:
69
-
70
- - `pnpm test`: build and run local tests, excluding `test/fixtures`; local host links may affect dependency resolution.
71
- - `pnpm test:matrix`: build, then install five isolated host versions and run the full matrix.
72
- - `pnpm test:latest`: build, then run the real storage regressions against the isolated latest baseline.
73
- - `pnpm test:compat`: validate legacy cache migration and run the full matrix.
74
-
75
- Do not run `test/fixtures/*.mjs` directly. Fixtures validate the isolated entry point, dependency versions, and resolved paths before loading the host. If local dependencies have drifted, run `pnpm install --frozen-lockfile` to restore declared development dependencies. This does not guarantee removal of undeclared packages or host links under `test/node_modules`; use the isolated commands for compatibility acceptance.
76
-
77
- | DSH | Cordis | Automated regression |
78
- | --- | --- | --- |
79
- | `0.1.0-rc.8` | `4.0.1` | 154 passed |
80
- | `0.1.1-rc.2` | `4.0.1` | 154 passed, plus legacy cache migration validation |
81
- | `0.1.2-rc.1` | `4.0.2` | 154 passed |
82
- | `0.1.5-rc.1` | `4.0.2` | 163 passed |
83
- | `0.1.5-rc.2` | `4.0.2` | 163 passed |
84
-
85
- Coverage includes workspace navigation, global-panel dismissal, cancellation of stale navigation, sidebar wiring, peer version acceptance, client Remote integration, archive/restore, real JSONL/Zstandard deletion and subagent cascades, and queries/reopened storage after deletion. Tested on Windows / Node.js 24. A real browser acceptance run also passed in an isolated DSH 0.1.5-rc.1 Web Profile: package installation, archive/restore, deletion cancellation and confirmation, subagent cascades, cross-filter batch deletion, workspace selection, returning from global panels, new sessions and forks, content search, and restart persistence. Content search requires an open host query database; it passed after changing the isolated Profile from `openAt: never` to `startup`. This release also passed an isolated rc.2 Web smoke run covering settings loading, seeded archive listing, restore, deletion cancellation and confirmation, and restart persistence with dedicated JSONL data. The full rc.1 browser flow was not repeated item by item. The other three versions have isolated automated coverage only; no external model calls were made. The latest storage fixture isolates only the upstream POSIX `fs-ext` import that cannot load on Windows; file operations and native Windows locking still use the official implementation.
86
-
87
- The installation commands below use the official npm registry.
48
+ Examples use the `web` profile. Replace it with the profile you actually use.
88
49
 
89
- ### Ask an agent to install it (recommended)
50
+ ### Ask an agent to install it
90
51
 
91
- Send the prompt below to any agent that can run terminal commands on your computer. Replace `web` with your actual profile. Once installed, use the plugin in DSH.
52
+ Send this prompt to an agent that can run terminal commands on your computer:
92
53
 
93
54
  ```text
94
- Install the DSH plugin @michengai/dsh-archive-manager into my local web profile by running: dsh plugin --profile web add @michengai/dsh-archive-manager@latest --registry=https://registry.npmjs.org/. Then run dsh --profile web --dump-config, confirm the configuration includes workspace-archive-manager, ui-workspace-archive-manager, and explain how to reload DSH and start using the plugin.
55
+ Install the latest @michengai/dsh-archive-manager into my local DSH web profile using the official npm registry. Check the plugin configuration afterward, then explain how to reload DSH and open archived session management.
95
56
  ```
96
57
 
97
- ### Install the latest package from the official npm registry
58
+ ### Install manually
98
59
 
99
- Run this from any PowerShell directory:
60
+ Run in PowerShell:
100
61
 
101
62
  ```powershell
102
63
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
103
64
  $OutputEncoding = [System.Text.Encoding]::UTF8
65
+
104
66
  dsh plugin --profile web add @michengai/dsh-archive-manager@latest --registry=https://registry.npmjs.org/
105
- dsh --profile web --dump-config
106
67
  ```
107
68
 
108
- To pin a release, replace `@latest` with a specific version such as `@x.y.z`.
69
+ Restart DSH Web, then hard-refresh your browser with `Ctrl+Shift+R`. Open **Settings → Archived sessions** to get started.
109
70
 
110
- The configuration output should contain `workspace-archive-manager` and `ui-workspace-archive-manager`. Restart DSH Web and hard-refresh the browser. Do not copy client files manually: the Settings page and archive menu need the mounted plugin.
71
+ ## Usage
111
72
 
112
- ## Updates
73
+ | Goal | Action |
74
+ | --- | --- |
75
+ | Archive one chat | Open its sidebar menu and choose **Archive session** |
76
+ | Archive a workspace | Open the workspace menu and choose the option to archive its chats |
77
+ | Find an archive | Open **Settings → Archived sessions**, then search titles or filter by project |
78
+ | Change the order | Sort by update time, creation time, or title |
79
+ | Restore one chat | Click **Unarchive** beside the session |
80
+ | Restore or delete in bulk | Select chats and use the bulk actions, or use the project menu or page-wide actions |
113
81
 
114
- The settings title shows the installed version and a **Check for updates** button. When a newer release is available, **Update automatically** runs only when the DSH CLI or Desktop update service is available; otherwise, the dialog provides a profile-specific manual command to copy and run.
82
+ Selections persist when filters change. Check the hidden selection count before applying bulk actions, or clear your selection first.
115
83
 
116
- ## Usage
84
+ ### View and continue archived conversations
117
85
 
118
- 1. Open the sidebar session menu and choose **Archive session**.
119
- 2. Open **Settings → Archived sessions** to inspect sessions by workspace.
120
- 3. Search by title, sort by update time, creation time, or title, or filter the list by project.
121
- 4. Select **Unarchive** to restore one session, or select **Restore all** in the page header.
122
- 5. Open a project heading's action menu to restore or delete all of that project's archived chats.
123
- 6. Use the delete icon to remove one session permanently, then confirm the deletion. **It cannot be undone.**
86
+ Available starting with `0.1.40`:
124
87
 
125
- If the entry is missing after installation or upgrade, restart DSH Web and hard-refresh the browser. It is located directly after **Connectors** in Settings.
88
+ - **View conversation**: open the native DSH session to view messages, attachments, and tool details. Continue chatting while keeping the session archived.
89
+ - **Restore and open**: unarchive the session and open it to resume work.
126
90
 
127
- ## Data handling limits
91
+ ## Updates
128
92
 
129
- - Deletion always requires confirmation.
130
- - It removes workspace records, archive markers, and the projection cache. For the official JSONL backend, a validated layout also allows removal of the session-owned directory and its contents, including attachments. Other backends or unknown layouts only lose the located transcript artifact, never its parent directory.
131
- - Project containers and storage roots are retained. Deletion refuses symbolic links or Windows junctions at the official layout's project/session directory levels and keeps the operation retryable.
132
- - Layout validation uses the official backend's initialized absolute root, so a relative root remains stable across host working-directory changes. If that field is unavailable, only an absolute configured root is accepted. An unverified official JSONL layout emits a warning with the session ID and artifact path before falling back to artifact-only deletion.
133
- - Directory validation is not a cross-process filesystem lock: do not concurrently move or replace storage directories or change directory links during deletion. Storage paths writable by untrusted processes are not a security isolation boundary.
134
- - A live session finishes writing before cleanup to prevent data truncation.
135
- - The plugin replaces DSH’s default workspace and projection services. Install through the DSH profile instead of manually composing the patch.
93
+ Click **Check for updates** in the archive management page header. DSH CLI or Desktop environments with automatic update support can update directly; other environments provide a manual command for the current profile. You can also rerun the installation command above.
136
94
 
137
- ## Secondary development
95
+ ## FAQ
138
96
 
139
- ### Install from source
97
+ ### Why is the entry missing after installation?
140
98
 
141
- Use this for debugging or unpublished changes. The cloned directory becomes the plugin source path:
99
+ Restart DSH Web and hard-refresh your browser. Make sure you installed into the profile you are using. If the entry is still missing, run:
142
100
 
143
101
  ```powershell
144
102
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
145
103
  $OutputEncoding = [System.Text.Encoding]::UTF8
146
- Set-Location D:\Repository\deepseek-harness-plugin
147
- git clone https://github.com/MichengAI/dsh-archive-manager.git
148
- Set-Location .\dsh-archive-manager
149
- pnpm install --frozen-lockfile
150
- pnpm build
151
- dsh plugin --profile web add .
104
+
152
105
  dsh --profile web --dump-config
153
106
  ```
154
107
 
155
- Restart DSH Web and hard-refresh the browser. `dsh plugin ... add .` reads the package metadata and `cordis.patch.yml`; do not install by copying `lib` directly.
108
+ The configuration should include `workspace-archive-manager` and `ui-workspace-archive-manager`. If you previously set the official `ui-workspace` to `disabled: true` in your profile's `cordis.patch.yml`, remove that disabling override and restart.
156
109
 
157
- `src` is the sole maintained source directory. `pnpm build` uses esbuild to compile it into publishable `lib` output. Do not edit `lib` directly because the next build overwrites it.
110
+ ### How is archiving different from deletion?
158
111
 
159
- - [src\index.js](src/index.js): host service entry point.
160
- - [src\workspace.js](src/workspace.js): archived-session and workspace service.
161
- - [src\projcache.js](src/projcache.js): session projection cache.
162
- - [src\client.js](src/client.js): Settings page and archive UI.
163
- - `test\*.test.mjs`: host, client, Remote, and styling coverage.
112
+ Archiving puts a conversation away so you can restore it later. **Permanent deletion cannot be undone** and may also remove that session's attachments. It does not delete your project working directory. Deletion requires confirmation.
164
113
 
165
- After changing `src`, run the tests, confirm that generated `lib` output is committed with the source, then install from the local directory:
114
+ ### Can I use it with Codex UI?
166
115
 
167
- ```powershell
168
- [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
169
- $OutputEncoding = [System.Text.Encoding]::UTF8
170
- pnpm test
171
- pnpm pack:check
172
- dsh plugin --profile web add .
173
- ```
116
+ Yes. [Codex UI](https://github.com/MichengAI/dsh-codex-ui) keeps its sidebar appearance and interactions. Archive management remains available in **Settings → Archived sessions**.
117
+
118
+ For other problems, open an [issue](https://github.com/MichengAI/dsh-archive-manager/issues) with your DSH and plugin versions, reproduction steps, and error details.
174
119
 
175
- `pnpm test` runs `pnpm build` first. The build generates all `lib` output from `src` in a temporary directory, then atomically replaces the previous output only after a successful build. A failed build preserves the existing `lib`.
120
+ ## Install from source
176
121
 
177
- ## Validation
122
+ <details>
123
+ <summary>Expand for development or testing unreleased changes</summary>
124
+
125
+ Run these commands in a directory of your choice. For local changes that have not been pushed, use the existing working copy.
178
126
 
179
127
  ```powershell
180
128
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
181
129
  $OutputEncoding = [System.Text.Encoding]::UTF8
182
- pnpm verify
183
- ```
184
130
 
185
- `prepublishOnly` runs the full verification suite before publishing and verifies that committed `lib` output matches the current `src` build.
131
+ git clone https://github.com/MichengAI/dsh-archive-manager.git
132
+ Set-Location .\dsh-archive-manager
133
+ pnpm install --frozen-lockfile
134
+ pnpm build
135
+ dsh plugin --profile web add .
136
+ ```
186
137
 
187
- ## License
138
+ Restart DSH Web and hard-refresh your browser afterward. Edit [src](src), not the generated `lib` directory. Run `pnpm test` to validate changes or `pnpm verify` for the full checks.
188
139
 
189
- Licensed under [Apache License 2.0](LICENSE).
140
+ </details>
190
141
 
191
- Before creating or pushing a release tag, run `pnpm release:preflight` in PowerShell 7 (`pwsh`). It installs from the official npm registry with a frozen lockfile and the same 1440-minute release-age policy as CI, then runs the full `verify` suite. Recent dependencies require committed, exact-version exclusions; manual retries never add exclusions dynamically.
142
+ ## Related projects
192
143
 
193
- Tag releases and manual retries verify the exact npm version and `gitHead` before creating or updating the bilingual GitHub Release. Network, authorization, or metadata errors stop the flow. Retrying an older tag does not take GitHub Latest away from the npm latest version. These release controls do not change the four supported host versions.
144
+ [DSH Codex UI](https://github.com/MichengAI/dsh-codex-ui) provides project and conversation management. For a desktop workbench, see [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop).
194
145
 
195
- Recovery checks the npm package name, version, and tag commit first. An exact match skips dependency installation, full builds, and republishing, and only synchronizes the Release. Unpublished old tags must still satisfy their original cooling policy. Exact-version and latest propagation each have a two-minute deadline; a lagging latest tag does not create a non-Latest Release prematurely.
146
+ ## License
196
147
 
197
- Updating main does not retrigger an existing tag. After pushing workflow changes, manually run `publish.yml` on main with the original tag (for example, `v0.1.35`); do not move or recreate the tag.
148
+ Licensed under [Apache License 2.0](LICENSE).
package/README.zh-CN.md CHANGED
@@ -14,184 +14,135 @@
14
14
  [![npm package](https://img.shields.io/npm/v/%40michengai%2Fdsh-archive-manager.svg?label=npm%20package)](https://www.npmjs.com/package/@michengai/dsh-archive-manager)
15
15
  [![npm 下载量](https://img.shields.io/npm/dt/%40michengai%2Fdsh-archive-manager.svg?label=npm%20%E4%B8%8B%E8%BD%BD%E9%87%8F)](https://www.npmjs.com/package/@michengai/dsh-archive-manager)
16
16
  [![DSH Web Plugin](https://img.shields.io/badge/DSH%20Web-Plugin-0f766e.svg)](https://github.com/MichengAI/dsh-archive-manager)
17
- [![Node.js 22 or later](https://img.shields.io/badge/Node.js-22%20or%20later-339933.svg?logo=node.js&logoColor=white)](https://nodejs.org/)
18
17
  </div>
19
18
 
20
19
  > DSH Archive Manager 是社区维护的 DeepSeek Harness(DSH)插件,并非 DeepSeek AI 官方产品。
21
20
 
22
- ## 功能概览
21
+ ## 你可以用它做什么
23
22
 
24
- 把暂时不用的会话收起来,需要时再找回。集中搜索、恢复和清理归档记录,让日常任务列表更清爽。
23
+ 把暂时不用的会话收起来,需要时再找回,让日常任务列表更清爽。
25
24
 
26
- - **收起已完成的任务**:归档单条聊天,也可归档整个工作区的未归档聊天。
27
- - **快速找回历史**:在「设置 → 归档会话」搜索标题、按项目筛选,或按时间和标题排序。
28
- - **恢复继续工作**:恢复单条会话、整个项目或全部归档会话。
29
- - **按需清理记录**:支持单条或批量永久删除,执行前会要求确认。**永久删除无法撤销。**
25
+ - **归档会话**:收起单条聊天,或整个工作区的未归档聊天。
26
+ - **找回历史**:搜索会话标题,按项目筛选,按时间或标题排序。
27
+ - **恢复任务**:恢复单条、选中的会话、整个项目或全部归档会话。
28
+ - **清理记录**:确认后永久删除不再需要的归档会话。
30
29
 
31
30
  ## 界面预览
32
31
 
33
- 在侧栏会话菜单中选择「归档会话」:
32
+ 从侧栏会话菜单归档聊天:
34
33
 
35
34
  ![从会话菜单归档会话](assets/screenshots/archive-session-menu.png)
36
35
 
37
- 在「设置 → 归档会话」中搜索、排序、按项目筛选、取消归档或永久删除:
36
+ 在「设置 → 归档会话」集中查找、恢复和清理:
38
37
 
39
- ![已归档聊天设置页面](assets/screenshots/archived-sessions.png)
40
-
41
- ## DSH 产品生态
42
-
43
- 想直接使用完整工作台,可下载 [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop/releases);已有 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 环境,可按需独立安装以下 8 个自研插件。桌面端已随附这些插件。
44
-
45
- | 插件 | 你可以用它做什么 |
46
- | --- | --- |
47
- | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) | 整理项目与会话、搜索任务、跳转对话轮次 |
48
- | [IM Connect](https://github.com/MichengAI/dsh-im-connect) | 从微信、飞书、钉钉等消息平台下任务、收回复 |
49
- | [Automation](https://github.com/MichengAI/dsh-automation) | 按计划执行任务,查看每次运行的结果 |
50
- | [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) | 统一查找、启停、创建和导入本机技能 |
51
- | [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) | 搜索、恢复或清理已归档会话 |
52
- | [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) | 按任务选择并召唤专业角色 |
53
- | [BTW](https://github.com/MichengAI/dsh-btw) | 在当前上下文中临时旁问,不打断主任务 |
54
- | [Simplify](https://github.com/MichengAI/dsh-simplify) | 用 /simplify 整理 Git 改动范围内的代码 |
38
+ ![归档会话管理页](assets/screenshots/archived-sessions.png)
55
39
 
56
40
  ## 前置条件
57
41
 
58
- - 插件 `0.1.38` 支持 DeepSeek Harness `0.1.5-rc.2`,并保留下表中此前四个宿主版本的兼容路径。后续版本需另行验证。
59
-
60
- - 已可正常运行 DeepSeek Harness Web,且可在 PowerShell 中使用 `dsh`。
61
- - 以下示例使用 `web` profile;请替换为实际目标 profile。
62
- - 从源码安装或二次开发需要 Node.js 22+ 与 pnpm;仅从 npm 安装无需另外执行 `pnpm install`。
63
-
64
- DSH peer 依赖仅接受 `0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2`;不自动接纳其他 RC 或正式版。开发依赖固定为 `0.1.5-rc.2`。
42
+ - 已能正常使用 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web,并可在终端运行 `dsh`。
43
+ - 当前支持 DSH `0.1.0-rc.8`、`0.1.1-rc.2`、`0.1.2-rc.1`、`0.1.5-rc.1`、`0.1.5-rc.2`;其他版本暂未纳入支持范围。
44
+ - Node.js 版本需满足 `^22.19.0 || >=24.0.0`;从源码安装还需要 pnpm。
65
45
 
66
46
  ## 安装
67
47
 
68
- 源码回归使用 `pnpm test:compat`,在隔离依赖环境中运行同一份插件产物,已验证以下组合(不代表覆盖所有中间版本):
69
-
70
- - `pnpm test`:构建并执行本地常规测试,不包含 `test/fixtures`;实际依赖可能受本机宿主链接影响。
71
- - `pnpm test:matrix`:先构建,再隔离安装五个宿主版本,执行完整矩阵。
72
- - `pnpm test:latest`:先构建,再隔离运行最新版的 真实存储回归。
73
- - `pnpm test:compat`:旧缓存迁移验证加完整矩阵。
74
-
75
- 不要直接执行 `test/fixtures/*.mjs`;夹具会在加载宿主前检查隔离入口、依赖版本及实际路径。若本机依赖脱节,可先执行 `pnpm install --frozen-lockfile` 恢复声明的开发依赖;它不保证清理未声明包或 `test/node_modules` 的宿主链接,兼容性验收以隔离命令为准。
76
-
77
- | DSH | Cordis | 自动回归 |
78
- | --- | --- | --- |
79
- | `0.1.0-rc.8` | `4.0.1` | 154 项通过 |
80
- | `0.1.1-rc.2` | `4.0.1` | 154 项通过,另含旧缓存迁移验证 |
81
- | `0.1.2-rc.1` | `4.0.2` | 154 项通过 |
82
- | `0.1.5-rc.1` | `4.0.2` | 163 项通过 |
83
- | `0.1.5-rc.2` | `4.0.2` | 163 项通过 |
84
-
85
- 覆盖新版工作区导航、全局面板退出、异步导航取消、侧栏接线、peer 版本接纳、客户端 Remote、归档/恢复、真实 JSONL/Zstandard 删除与子会话级联、删除后重新查询及重新打开存储。验证环境为 Windows / Node.js 24。另已在隔离 DSH 0.1.5-rc.1 Web Profile 中完成真实浏览器验收:包安装、归档恢复、取消与确认删除、子会话级联、跨筛选批量删除、工作区选择、全局面板返回会话、新建与分叉、正文搜索和重启持久性均通过。正文搜索需开启宿主查询数据库;本次将隔离 Profile 的 `openAt: never` 改为 `startup` 后验证通过。本轮另在隔离 rc.2 Web Profile 完成设置页加载、预置归档记录展示、恢复、取消与确认删除及重启持久性冒烟验收;使用独立 JSONL 测试数据,未逐项重跑 rc.1 的完整浏览器流程。其余三个版本仅完成隔离自动测试;未调用外部模型。新版存储夹具仅隔离上游无法在 Windows 加载的 POSIX `fs-ext` 导入,实际文件操作与 Windows 原生锁仍使用官方实现。
48
+ 以下示例使用 `web` profile,请替换为你实际使用的 profile。
86
49
 
87
- 以下安装命令使用官方 npm 源。
50
+ ### 让 Agent 帮你安装
88
51
 
89
- ### 让 Agent 帮你安装(推荐)
90
-
91
- 把下面这段话发给任意能够执行本机终端命令的 Agent。将 `web` 替换为实际使用的 profile;安装完成后,在 DSH 中使用本插件。
52
+ 把下面这段话发给能执行本机终端命令的 Agent:
92
53
 
93
54
  ```text
94
- 请将 DSH 插件 @michengai/dsh-archive-manager 安装到本机 web profile,执行:dsh plugin --profile web add @michengai/dsh-archive-manager@latest --registry=https://registry.npmjs.org/。安装后执行 dsh --profile web --dump-config,确认配置包含 workspace-archive-manager, ui-workspace-archive-manager,并告诉我如何重新加载 DSH 和开始使用。
55
+ 请将 @michengai/dsh-archive-manager 最新版安装到本机 DSH 的 web profile,使用官方 npm 源。安装后检查插件配置,并告诉我如何重新加载 DSH、进入归档会话管理页。
95
56
  ```
96
57
 
97
- ### 从官方 npm 安装最新版
58
+ ### 手动安装
98
59
 
99
- 在任意 PowerShell 目录执行:
60
+ 在 PowerShell 中执行:
100
61
 
101
62
  ```powershell
102
63
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
103
64
  $OutputEncoding = [System.Text.Encoding]::UTF8
65
+
104
66
  dsh plugin --profile web add @michengai/dsh-archive-manager@latest --registry=https://registry.npmjs.org/
105
- dsh --profile web --dump-config
106
67
  ```
107
68
 
108
- 需要钉死某一版时,把 `@latest` 换成具体版本,例如 `@x.y.z`。
69
+ 安装后重启 DSH Web,并按 `Ctrl+Shift+R` 硬刷新浏览器。打开「设置 → 归档会话」即可使用。
109
70
 
110
- 配置输出中应包含 `workspace-archive-manager` 与 `ui-workspace-archive-manager`。安装后重启 DSH Web 并在浏览器硬刷新;请勿手工复制客户端文件,否则设置页和归档菜单不会被挂载。
71
+ ## 使用
111
72
 
112
- ## 在线更新
73
+ | 你想做什么 | 操作 |
74
+ | --- | --- |
75
+ | 归档一条会话 | 打开侧栏会话菜单,选择「归档会话」 |
76
+ | 归档整个工作区 | 打开工作区菜单,选择归档该工作区的会话 |
77
+ | 查找归档 | 打开「设置 → 归档会话」,搜索标题或按项目筛选 |
78
+ | 调整排列顺序 | 按更新时间、创建时间或标题排序 |
79
+ | 恢复一条会话 | 点击会话右侧的「取消归档」 |
80
+ | 批量恢复或删除 | 勾选会话后使用批量操作;也可使用项目菜单或页面顶部的全部操作 |
113
81
 
114
- 设置标题会显示当前版本和“检查更新”按钮。发现新版后,只有检测到 DSH CLI 或 Desktop 更新服务时才可使用“自动更新”;其他环境会在弹窗中提供可复制、与当前 Profile 对应的手工更新命令。
82
+ 切换筛选条件会保留已选会话。批量操作前留意隐藏的已选数量,或先清空选择。
115
83
 
116
- ## 使用
84
+ ### 查看并继续归档对话
117
85
 
118
- 1. 在侧栏右键或打开会话菜单,选择「归档会话」。
119
- 2. 打开「设置 → 归档会话」,按工作区查看归档会话。
120
- 3. 按标题搜索,按更新时间、创建时间或标题排序,或按项目筛选列表。
121
- 4. 点击「取消归档」恢复单个会话,或在顶部点击「全部恢复」。
122
- 5. 打开项目标题右侧菜单,可恢复或删除该项目的全部已归档聊天。
123
- 6. 点击删除图标永久移除单个会话;删除前确认提示。**删除无法撤销。**
86
+ 从 `0.1.40` 起支持以下操作:
124
87
 
125
- 安装或升级后找不到入口时,重启 DSH Web 并硬刷新浏览器;入口位于「设置」中,连接器之后。
88
+ - **查看对话**:打开 DSH 原生会话页,查看消息、附件和工具详情;可直接继续聊天,保持归档状态。
89
+ - **恢复并打开**:取消归档后进入原会话,继续工作。
126
90
 
127
- ## 数据处理边界
91
+ ## 更新
128
92
 
129
- - 删除操作始终需要确认。
130
- - 删除会移除工作区记录、归档标记和投影缓存。官方 JSONL 后端在目录布局校验通过后,会一并删除会话专属目录及其中的附件等内容;其他后端或未知布局仅删除定位到的转录工件,不删除其父目录。
131
- - 不清理项目分组目录或存储根目录。官方布局的项目/会话目录若为符号链接或 Windows junction,会拒绝删除并保留可重试状态。
132
- - 布局校验优先使用官方后端初始化时确定的绝对根路径,相对路径配置不再受宿主工作目录变化影响;若无法取得该字段,则只接受绝对路径配置。官方 JSONL 布局校验失败时,会记录包含会话 ID 和工件路径的警告,再降级为仅删除工件。
133
- - 目录校验不是跨进程文件锁:删除期间不要由其他进程迁移、替换存储目录或改写目录链接。插件不将可被不可信进程改写的存储路径视为安全隔离边界。
134
- - 正在写入的会话会在完成写入后清理,避免截断数据。
135
- - 本插件替换 DSH 默认的工作区和会话投影服务;请仅通过 DSH profile 安装,避免手工拼接补丁配置。
93
+ 在归档管理页标题处点击「检查更新」。支持自动更新的 DSH CLI 或 Desktop 环境可直接更新;其他环境会提供适用于当前 profile 的手动命令。也可重新执行上面的安装命令。
136
94
 
137
- ## 二次开发
95
+ ## 常见问题
138
96
 
139
- ### 从源码安装
97
+ ### 安装后找不到入口?
140
98
 
141
- 适用于调试或使用未发布改动。克隆后的目录会直接作为插件安装路径:
99
+ 先重启 DSH Web 并硬刷新浏览器,确认安装到了当前使用的 profile。仍未显示时,执行:
142
100
 
143
101
  ```powershell
144
102
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
145
103
  $OutputEncoding = [System.Text.Encoding]::UTF8
146
- Set-Location D:\Repository\deepseek-harness-plugin
147
- git clone https://github.com/MichengAI/dsh-archive-manager.git
148
- Set-Location .\dsh-archive-manager
149
- pnpm install --frozen-lockfile
150
- pnpm build
151
- dsh plugin --profile web add .
104
+
152
105
  dsh --profile web --dump-config
153
106
  ```
154
107
 
155
- 完成后重启 DSH Web 并硬刷新浏览器。`dsh plugin ... add .` 会读取当前目录的包信息和 `cordis.patch.yml`;不要改为直接复制 `lib` 目录。
108
+ 配置中应包含 `workspace-archive-manager` 和 `ui-workspace-archive-manager`。若曾在 profile 的 `cordis.patch.yml` 中手动将官方 `ui-workspace` 设为 `disabled: true`,请移除该禁用覆盖,再重启。
156
109
 
157
- `src` 是唯一可维护源码目录,`pnpm build` 使用 esbuild 将其编译为可发布的 `lib`。请勿直接修改 `lib`,否则下次构建会覆盖改动:
110
+ ### 归档和删除有什么区别?
158
111
 
159
- - [src\index.js](src/index.js):客户端插件 Host 服务入口。
160
- - [src\workspace.js](src/workspace.js):归档会话和工作区服务实现。
161
- - [src\projcache.js](src/projcache.js):会话投影缓存实现。
162
- - [src\client.js](src/client.js):设置页和归档会话界面。
163
- - `test\*.test.mjs`:Host、客户端、Remote 和样式边界测试。
112
+ 归档只是收起会话,可以恢复。**永久删除无法撤销**,并可能一并清理该会话的附件;不会删除你的项目工作目录。删除前会要求确认。
164
113
 
165
- 修改 `src` 后,执行测试并确认生成的 `lib` 与 `src` 一同提交,再用本地目录重新安装:
114
+ ### 可以和 Codex UI 一起使用吗?
166
115
 
167
- ```powershell
168
- [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
169
- $OutputEncoding = [System.Text.Encoding]::UTF8
170
- pnpm test
171
- pnpm pack:check
172
- dsh plugin --profile web add .
173
- ```
116
+ 可以。保留 [Codex UI](https://github.com/MichengAI/dsh-codex-ui) 的侧栏样式和交互,归档管理仍在「设置 → 归档会话」中。
117
+
118
+ 遇到其他问题,请提交 [Issue](https://github.com/MichengAI/dsh-archive-manager/issues),附上 DSH 与插件版本、复现步骤和错误信息。
174
119
 
175
- `pnpm test` 会先执行 `pnpm build`。构建在临时目录中从 `src` 生成全部 `lib` 产物;仅在生成成功后才原子替换旧产物,构建失败时会保留旧的 `lib`。
120
+ ## 从源码安装
176
121
 
177
- ## 验证
122
+ <details>
123
+ <summary>开发或测试未发布改动时展开</summary>
124
+
125
+ 在你选择的源码目录中执行以下命令。未推送的本地改动需使用已有工作副本。
178
126
 
179
127
  ```powershell
180
128
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
181
129
  $OutputEncoding = [System.Text.Encoding]::UTF8
182
- pnpm verify
183
- ```
184
130
 
185
- `prepublishOnly` 会在发布前执行完整验证,并确认提交的 `lib` 与当前 `src` 构建结果一致。
131
+ git clone https://github.com/MichengAI/dsh-archive-manager.git
132
+ Set-Location .\dsh-archive-manager
133
+ pnpm install --frozen-lockfile
134
+ pnpm build
135
+ dsh plugin --profile web add .
136
+ ```
186
137
 
187
- ## 许可证
138
+ 完成后重启 DSH Web 并硬刷新浏览器。修改 [src](src) 中的源码,不直接编辑生成目录 `lib`;使用 `pnpm test` 验证修改,使用 `pnpm verify` 执行完整检查。
188
139
 
189
- 本项目采用 [Apache License 2.0](LICENSE)。
140
+ </details>
190
141
 
191
- 发布前在 PowerShell 7 (`pwsh`) 执行 `pnpm release:preflight`,通过后再创建、推送版本标签。该入口使用官方 npm registry、冻结锁文件及与 CI 一致的 1440 分钟依赖冷却策略,然后运行完整 `verify`。刚发布的依赖仅通过已提交的精确版本豁免接纳;手动重试不会动态修改豁免配置。
142
+ ## 相关项目
192
143
 
193
- 标签发布与手动重试统一经过 npm 精确版本和 `gitHead` 校验,确认 npm 可查询后才创建或更新双语 GitHub Release。网络、权限或元数据异常会停止流程;旧标签重试不会抢占 npm 最新版本对应的 GitHub Latest。仅新增了发布控制,不改变四个宿主版本的兼容范围。
144
+ [DSH Codex UI](https://github.com/MichengAI/dsh-codex-ui) 提供项目与会话管理界面;想使用桌面工作台,可查看 [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop)。
194
145
 
195
- 恢复已发布版本时,流程先校验 npm 包名、版本和标签提交:一致则跳过依赖安装、完整构建和再次发布,仅补同步 Release;未发布的旧标签仍需满足原标签的冷却策略,不能通过重试绕过。精确版本及 latest 传播分别最多等待两分钟,latest 落后时不提前创建非 Latest Release。
146
+ ## 许可证
196
147
 
197
- 已推送的旧标签不会因 main 更新而重新触发。推送工作流更新后,可手动运行 `publish.yml`,选择 main 并填写原标签(例如 `v0.1.35`);无需移动或重新创建标签。
148
+ 本项目采用 [Apache License 2.0](LICENSE)。
package/cordis.patch.yml CHANGED
@@ -1,12 +1,12 @@
1
- # @michengai/dsh-archive-manager 插件补丁:禁用默认服务行,
2
- # 并替换为归档会话管理实现。发布后的安装命令:
1
+ # 保留官方工作区 UI,仅替换归档需要的后端服务。
2
+ # 自定义侧栏通过优先级覆盖插槽;发布后的安装命令:
3
3
  # dsh plugin --profile web add @michengai/dsh-archive-manager
4
4
  - id: workspace
5
5
  disabled: true
6
6
  - id: session-projection-cache
7
7
  disabled: true
8
8
  - id: ui-workspace
9
- disabled: true
9
+ disabled: false
10
10
  - insert:
11
11
  - id: workspace-archive-manager
12
12
  name: '@michengai/dsh-archive-manager/workspace'