@michengai/dsh-archive-manager 0.1.44 → 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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,69 @@ Published release notes are retained below; new versions are added without remov
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.0.1 - 2026-09-21
10
+
11
+ - Migrate source code to strict TypeScript. Generated `lib` files are no longer tracked by Git and are rebuilt by `prepack`; published JavaScript entry points and runtime modules remain unchanged.
12
+ - Restore callable snapshot guards at the host navigation boundary and preserve previous turn-count semantics for malformed log payloads, skipping non-object events.
13
+ - Crop the personal filename strip from both screenshots, ship smaller WebP assets and DSH support badges, and remove the unused menu screenshot.
14
+ - Check all 11 runtime modules before packaging and build before standalone compatibility tests. Release notes are generated from the bilingual changelogs for GitHub Releases; the stale standalone notes file is no longer included in npm packages.
15
+
16
+ ## 1.0.0 - 2026-09-21
17
+
18
+ The first 1.0 release expands session organization, search, previews, and targeted repair since 0.1.44. The package name and existing data remain unchanged; no session migration is required. Existing archive, restore, permanent deletion, and native conversation navigation remain available.
19
+
20
+ ### Lists and shared filters
21
+
22
+ - Archived and Unarchived share title/content search, project, favorites, and updated-date filters. Titles-only remains the default; switch scope on the left of the search box and open dates on the right. The end date includes the entire local day; dates can be cleared independently and the popover closes on outside clicks.
23
+ - Compact collapsible project groups provide clickable titles, right-side stars and archive/restore icons, and applicable More actions for restore-and-open, preview, copying, and deletion.
24
+ - Sort by update time, creation time, title, or most/fewest turns. Group counts follow filters and empty states match the active tab.
25
+ - Select all covers filtered results, including collapsed groups. Switching tabs clears selection; filtering preserves it and reports hidden selections. Project-wide actions remain independent of filters.
26
+ - Remove redundant page-wide Restore all / Delete all buttons while retaining selection-based and project actions. Operation results remain scoped to their tab.
27
+
28
+ ### Favorites, idle cleanup, and batch actions
29
+
30
+ - Star or unstar on either tab and filter to favorites. Host-persisted favorites survive archive, restore, and browser changes. Unknown indexes and read failures do not remove favorites; cleanup requires confirmed artifact absence.
31
+ - On Unarchived, preview idle candidates using 1–36,500 whole days and the current filters; deselect individual candidates before confirmation. Exclude favorites, the current conversation, running sessions, pending interactions, and sessions with active subagents or no valid activity time.
32
+ - Recheck favorites and activity before archiving. Batch archive, restore, and delete show progress and successful/skipped/failed/remaining results. Stop at the first failure and retry only remaining items; delete retries still require confirmation.
33
+ - Undo the most recent successful archive batch, including successful retries, while the management page remains open. Permanent deletion cannot be undone.
34
+
35
+ ### Content search and quick preview
36
+
37
+ - Search persisted user and assistant text with snippets and highlights. Read failures remain visible and retryable; obsolete responses cannot replace results after filters change.
38
+ - Preview archived sessions without restoring them, showing context around the first match or up to eight recent messages. Unarchived snippets open the full conversation.
39
+ - Render Markdown tables, quotes, code blocks, and role labels, with a source/highlight mode, a wider dialog, and action icons.
40
+ - Fix Unicode offsets after case folding, split surrogate pairs on truncation, Escape closing Settings as well as preview, and previews reopening after tab switches.
41
+
42
+ ### Turn counts and session location
43
+
44
+ - Show user submission counts on both tabs, including image submissions and inherited branch messages; exclude assistant replies, tool calls, and injected messages.
45
+ - Sort by most/fewest turns with unknown counts always last; inspect and retry detail failures.
46
+ - Copy session IDs and paths separately from More. Official JSONL storage exposes the session directory; other backends use a valid host-provided path. Missing paths and clipboard failures are reported explicitly.
47
+
48
+ ### Diagnosis and targeted repair
49
+
50
+ - Collect archived read failures, including IDs without summaries, in collapsible diagnostic cards with classified advice and technical details.
51
+ - Prefer stable error codes for missing files, permissions, and corruption, with message-based compatibility fallbacks. Unavailable repair preserves the original classification and appends its limitation.
52
+ - Diagnose and explicitly confirm repair for supported legacy automation message sources. Eligibility depends on artifacts, host format validation, and a write lease, not just error wording. Sessions must be archived and closed in every DSH process.
53
+ - Retain original logs, text, automation attribution, and inheritance data. Publish a new generation only after host re-encoding and validation; create private repair files. Publication never overwrites existing logs and fails safely if hard links are unavailable.
54
+
55
+ ### UI, localization, and compatibility
56
+
57
+ - Align selection, checkboxes, focus, warnings, updates, and highlights with official theme tokens; refine date controls, diagnostic cards, stars, and action icons.
58
+ - Complete Chinese/English diagnosis, preview, update, and error messages. Language changes no longer cause extra detail reads; fix copy-error and empty-state text.
59
+ - Refresh Archived/Unarchived screenshots and both READMEs, including filter, undo, repair, and search boundaries.
60
+ - Retain support for 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, 0.1.6-alpha.1, and 0.1.6-alpha.2. Coexist with Codex UI; no new sidebar pinning or favorites features are introduced.
61
+ - searchSessionContent is the canonical API for both archive states. Keep searchArchivedContent as the archived-only compatibility entry for older hosts/clients; do not dispatch duplicate searches.
62
+
63
+ ### Limits and validation
64
+
65
+ - Content search and turn counts have no persistent index. Read at most 20 sessions per batch, sequentially. Narrow filters for large or long logs; no scale or latency guarantee is established. In-flight batches cannot be interrupted; cancellation prevents subsequent batches and stale results.
66
+ - Queries accept up to 200 characters. Search excludes tools, attachments, reasoning, system messages, and plugin injections. Preview limits each message to 2,000 UTF-16 code units without splitting Unicode characters; open the native conversation for full content.
67
+ - No scheduled background archiving. Favorite protection applies only to idle cleanup. Reopen management to see favorites changed elsewhere; closing or refreshing clears undo history.
68
+ - Repair is not a general recovery tool: missing files, permissions, and unsupported corruption receive advice, never forced deletion or truncation. Permanent deletion is irreversible. Task summaries and Markdown export are not added.
69
+ - The functional candidate passed local regressions, isolated supported-host matrices, and real DSH 0.1.6-alpha.2 browser smoke tests covering search, preview, favorites, batches, diagnosis, and repair. Real model submission, streaming, tool approvals, and unknown host versions are outside this validation claim.
70
+ - The host Settings shell still has an extremely narrow-screen obstruction; full mobile layout support is not claimed.
71
+
9
72
  ## 0.1.44 - 2026-09-18
10
73
 
11
74
  - Opening an archived session from Settings no longer falsely reports that the host did not keep the conversation.
@@ -6,6 +6,69 @@
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.0.1 - 2026-09-21
10
+
11
+ - 源码迁移为严格 TypeScript;生成的 `lib` 不再进入 Git,由 `prepack` 自动重建。npm 包的 JavaScript 入口和运行模块保持不变。
12
+ - 恢复宿主导航边界的快照可调用判断;轮次统计保留旧版畸形载荷语义,跳过非对象事件,避免整行详情读取失败。
13
+ - 裁掉两张截图底部的个人文件名条,发布体积更小的 WebP 图片和 DSH 支持徽章,移除未使用的菜单截图。
14
+ - 打包前检查全部 11 个运行模块,独立兼容测试先构建。GitHub 发行说明由双语更新日志生成;npm 包不再包含容易过期的独立发行说明文件。
15
+
16
+ ## 1.0.0 - 2026-09-21
17
+
18
+ 从 0.1.44 升级到首个 1.0 正式版本,集中完善会话整理、检索、预览与异常修复。沿用原有安装包名和数据,不要求迁移会话;现有归档、恢复、永久删除及原生会话导航继续保留。
19
+
20
+ ### 会话列表与统一筛选
21
+
22
+ - 已归档、未归档两页统一支持标题/正文搜索、项目、收藏和更新时间范围筛选;默认只搜索标题,搜索框左侧切换范围,右侧打开日期选择器。结束日期包含本地当天,支持独立清除日期及点击外部关闭。
23
+ - 使用紧凑项目分组列表,项目可折叠;标题点击打开原生会话,星标、恢复/归档使用右侧图标,更多菜单提供恢复打开、预览、复制与删除等适用操作。
24
+ - 支持更新时间、创建时间、标题和轮次升降序排序;分组计数跟随筛选,空态区分当前页签。
25
+ - 全选只覆盖当前筛选结果,包含折叠组中的匹配项;切页签清空选择,改变筛选保留选择并提示隐藏选中项。项目菜单仍操作整个项目,不受筛选影响。
26
+ - 移除重复的页面级「全部恢复/全部删除」按钮;保留勾选批量操作及项目菜单,操作结果按页签隔离。
27
+
28
+ ### 收藏、闲置整理与批量操作
29
+
30
+ - 两页均可收藏/取消收藏,通过下拉菜单只看收藏;收藏保存于宿主,归档、恢复和更换浏览器后保留。索引暂时未知或读取失败不会清除收藏,只有确证工件缺失时才清理。
31
+ - 未归档页支持设置 1~36500 个整数闲置天数,结合当前筛选预览候选;确认清单可逐条取消。排除收藏、当前打开、正在执行及等待交互的会话,并考虑子代理活动;无有效活动时间不参与。
32
+ - 归档前再次检查收藏和活动状态。批量归档、恢复、删除显示进度及成功/跳过/失败/未处理明细;遇到首个失败停止,允许只重试剩余项,删除重试仍需确认。
33
+ - 支持「撤回本次归档」,恢复最近一批实际成功归档及重试成功的会话;仅当前管理页打开期间有效,不撤回永久删除。
34
+
35
+ ### 正文检索与快速预览
36
+
37
+ - 在用户与助手的持久化正文中查找关键词,显示命中片段和高亮;读取失败显示明细并支持重试,更改筛选后旧响应不会覆盖新结果。
38
+ - 已归档会话可不恢复直接预览,展示首个命中附近上下文或最近八条消息;未归档命中片段打开完整会话。
39
+ - 预览支持 Markdown 表格、引用、代码块和角色区分,可切换原文高亮;加宽弹窗并补齐操作图标。
40
+ - 修复大小写折叠引起的 Unicode 偏移错误、截断切开代理对、Esc 连带关闭设置,以及切换页签后预览自行重开。
41
+
42
+ ### 轮次统计与会话定位
43
+
44
+ - 两页显示用户提交轮次,包括图片消息及分支继承的用户消息,不把助手回复、工具调用或插件注入算作轮次。
45
+ - 提供轮次最多/最少排序,未知轮次始终置后;详情读取失败可查看并重试。
46
+ - 更多菜单支持分别复制会话 ID 和路径。官方 JSONL 后端复制会话目录,其他后端使用宿主返回的有效路径;路径缺失和剪贴板失败均明确提示。
47
+
48
+ ### 异常诊断与定向修复
49
+
50
+ - 已归档页汇总异常会话,包括缺少摘要的归档 ID;诊断区使用可折叠状态卡片,提供分类建议及技术详情。
51
+ - 缺文件、权限、损坏等分类优先使用稳定错误码、兼容文案兜底;诊断发现不能自动修复时仍保留原分类,追加受限原因。
52
+ - 对支持的旧自动化消息来源提供「诊断 → 确认修复」流程。以实际工件、宿主格式校验和写锁判断资格,不仅依赖错误措辞;要求已归档且未被任何 DSH 进程打开。
53
+ - 保留原始日志、正文、任务归属和继承信息,经宿主重新编码与校验后发布新代际;修复文件使用私有权限。发布采用禁止覆盖策略,硬链接不可用时安全失败,不覆盖现有日志。
54
+
55
+ ### 界面、国际化与兼容性
56
+
57
+ - 对齐官方主题的选中、复选框、焦点、警告、更新按钮及高亮配色;完善日期下拉、诊断卡片、星标和操作图标。
58
+ - 补齐诊断、预览、更新入口和错误提示的中英文;切换语言不再额外触发详情读取,修复复制错误和空态文案。
59
+ - 更新已归档/未归档截图及双语 README,完整说明筛选、撤回、修复与检索边界。
60
+ - 保持既有 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、0.1.6-alpha.1、0.1.6-alpha.2;与 Codex UI 共存,不新增侧栏置顶或收藏功能。
61
+ - 正式检索接口为 searchSessionContent,支持两种归档状态;searchArchivedContent 保留为旧宿主/客户端的归档专用兼容入口,不重复调用。
62
+
63
+ ### 使用边界与验证
64
+
65
+ - 正文检索和轮次没有持久化索引;每批最多 20 条会话、批内逐条读取。大量或超长日志建议先缩小范围,尚无规模或时延承诺;在途批次不能中止,取消只阻止后续批次及旧结果回写。
66
+ - 检索关键词最多 200 字符;不搜索工具输出、附件、推理、系统和插件注入。预览每条最多 2000 个 UTF-16 码元,保留完整 Unicode 字符;完整内容通过原生会话查看。
67
+ - 没有后台定时归档;收藏保护仅适用于闲置整理。其他页面的收藏变更需重开管理页读取;撤回记录在关闭或刷新后消失。
68
+ - 自动修复不是通用日志恢复工具:缺失、权限及不支持的损坏只提供建议,不删除或截断消息。永久删除不可撤销;本轮不新增任务摘要和 Markdown 导出。
69
+ - 功能候选已通过本地回归、支持宿主隔离矩阵及真实 DSH 0.1.6-alpha.2 浏览器冒烟,覆盖检索、预览、收藏、批量操作、诊断与修复。真实模型发送、流式回复、工具审批和未知宿主版本不在本次验收承诺内。
70
+ - 宿主设置窗口在极窄屏下的遮挡仍需宿主侧修复;未承诺所有移动端布局均可用。
71
+
9
72
  ## 0.1.44 - 2026-09-18
10
73
 
11
74
  - 设置里点「打开会话」不再误报「宿主未保留」。
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="assets/branding/dsh-banner.png" alt="DSH Archive Manager" width="100%">
2
+ <img src="assets/branding/dsh-banner-en.webp" alt="DSH Archive Manager" width="100%">
3
3
  </p>
4
4
 
5
5
  <div align="center">
@@ -14,6 +14,7 @@
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
+ [![DSH supported through 0.1.6-alpha.2](https://img.shields.io/badge/DSH-up%20to%200.1.6--alpha.2-2563eb.svg)](#prerequisites)
17
18
  </div>
18
19
 
19
20
  > DSH Archive Manager is a community-maintained DeepSeek Harness (DSH) plugin, not an official DeepSeek AI product.
@@ -23,19 +24,45 @@
23
24
  Put inactive conversations away and find them again when needed, keeping everyday task lists tidy.
24
25
 
25
26
  - **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.
27
+ - **Find past work**: search titles and content, combine project/favorites/date filters, and sort by time, title, or turns.
28
+ - **Restore tasks**: restore one chat, selected chats, or a project group; select all filtered results for bulk actions.
29
+ - **Clean up records**: permanently delete unwanted archives after confirmation, track batch progress, and retry remaining items.
30
+ - **Organize important chats**: save favorites and preview idle cleanup while protecting favorites and active work.
31
+ - **Inspect and troubleshoot**: preview without restoring, copy IDs/paths, diagnose errors, and repair supported legacy logs.
32
+
33
+ > This README describes 1.0.0. See the [changelog](CHANGELOG.md) for the complete feature list and upgrade boundaries.
34
+
35
+ ## Session diagnosis and repair
36
+
37
+ The archive page collects read failures, including archived IDs with missing summaries. Expand **Diagnosis and repair**, choose **Diagnose session**, then **Confirm repair** only when eligible. Repair converts supported legacy automation message sources while retaining the original log, conversation text, and automation attribution. Sessions must be archived and closed in every DSH process. Missing files, permission failures, and unsupported corruption are reported; messages are never truncated or deleted to force recovery. Eligibility is verified from artifacts and the host format, not solely from error wording.
38
+
39
+ ## Search and preview
40
+
41
+ - Archived and Unarchived share title/content search, project, favorites, updated-date filters, and creation-time sorting. Star or unstar conversations on either tab.
42
+ - Choose **Titles and content** to search user and assistant text; the default remains titles only. Date filters include the entire local end date and combine with project and favorites.
43
+ - Matches show snippets and highlights. On Archived, click a snippet or **More → Quick preview** to inspect context without restoring. On Unarchived, a snippet opens the full conversation.
44
+ - Preview renders Markdown tables, quotes, and code blocks with role labels; switch to source text for highlights. It shows up to eight recent messages, or context around the first match. Each message is limited to 2,000 UTF-16 code units without splitting Unicode characters.
45
+ - Search accepts up to 200 query characters and reads batches of at most 20 sessions, sequentially within each batch. Tools, attachments, reasoning, system messages, and plugin injections are excluded. Read failures remain visible and can be retried. Stored text is not the model's current context.
46
+ - There is no persistent full-text index. Large or long conversations can be slow; narrow project, dates, or favorites first. No session-count or latency guarantee has been established. Changing filters prevents later batches and stale results, but cannot interrupt the batch already reading.
47
+
48
+ ## Turn counts and location
49
+
50
+ - Both tabs show user submission counts, including image submissions; assistant replies, tool calls, and injected messages do not count as turns.
51
+ - Sort by most or fewest turns; unknown counts remain last. Failed details can be retried.
52
+ - **More** provides separate ID/path copying. Official JSONL storage returns the session directory; other backends use a valid host-provided path. Clipboard operations require browser permission and HTTPS or localhost; failures are reported.
53
+ - Details are read in batches of up to 20 without activating or restoring sessions. Counts include inherited user messages, have no persistent index, and may take time for long logs.
29
54
 
30
55
  ## Screenshots
31
56
 
32
- Archive a chat from the sidebar session menu:
57
+ Search, favorite, preview, restore, and clean up in **Settings → Archived sessions → Archived**:
33
58
 
34
- ![Archive a session from the session menu](assets/screenshots/archive-session-menu.png)
59
+ ![Archived: shared search filters, favorites, and restore](assets/screenshots/archived-sessions.webp)
35
60
 
36
- Find, restore, and clean up chats in **Settings → Archived sessions**:
61
+ Switch to **Unarchived** for the same filters, idle cleanup previews, and project-wide archiving:
37
62
 
38
- ![Archived sessions settings page](assets/screenshots/archived-sessions.png)
63
+ ![Unarchived: idle cleanup and project archiving](assets/screenshots/unarchived-sessions.webp)
64
+
65
+ > Screenshots show the pre-release development build labeled 0.1.44; this release is 1.0.0. The sidebar belongs to the installed UI plugin and does not represent new sidebar features in this release.
39
66
 
40
67
  ## Prerequisites
41
68
 
@@ -74,25 +101,46 @@ Restart DSH Web, then hard-refresh your browser with `Ctrl+Shift+R`. Open **Sett
74
101
  | --- | --- |
75
102
  | Archive one chat | Open its sidebar menu and choose **Archive session** |
76
103
  | 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 **Restore** beside the session |
104
+ | Find an archive | Open **Settings → Archived sessions**, then choose title/content search or filter by project, favorites, and dates |
105
+ | Change the order | Sort by update time, creation time, title, or most/fewest turns |
106
+ | Restore one chat | Click the restore icon, or choose **More → Restore and open** |
80
107
  | Archive a project or ungrouped chats | On **Unarchived**, open the group’s **…** menu and confirm archiving all chats in that group, regardless of search filters |
108
+ | Favorite a chat | Click its right-side star; use the favorites dropdown to filter |
109
+ | Preview archived content | Click a match snippet or **More → Quick preview** |
110
+ | Clean up idle chats | On Unarchived, set idle days, preview candidates, and confirm |
111
+ | Locate a session | Copy its ID or path from More |
112
+ | Handle read errors | Expand diagnosis, diagnose first, and confirm repair when eligible |
81
113
  | Archive across projects | Switch to **Unarchived**, select sessions across projects, then click **Archive** and confirm |
82
- | Restore or delete in bulk | Select chats and use the bulk actions, or use the project menu or page-wide actions |
114
+ | Restore or delete in bulk | Select chats and use the bulk actions, or use the project menu; there are no separate Restore all / Delete all buttons |
83
115
 
84
116
  The page opens on **Archived**, with **Unarchived** on the right. Switching tabs clears selections; changing search or project filters preserves them. Check the hidden selection count before applying bulk actions, or clear your selection first.
85
117
 
86
- **Restore all / Delete all** remain on the Archived tab and apply to archived sessions across all projects, regardless of filters. Unarchived excludes subagents and blank placeholders and supports sorting by update time or title.
118
+ **Select all filtered results** selects matching sessions, including collapsed groups. Project-wide actions still apply to the whole project regardless of search filters. Unarchived excludes subagents and blank placeholders.
87
119
 
88
120
  Settings and sidebar batch archive/restore call the single-session APIs serially: official `ctx.workspaces.archiveSession` on every supported host, official `ctx.workspaces.unarchiveSession` on DSH 0.1.6+, and this plugin's `workspaceRegistry.unarchiveSession` on older hosts.
89
121
 
122
+ ### Favorites and idle cleanup
123
+
124
+ Compact project groups can be collapsed. Stars and restore/archive icons appear on the right; archived session menus include restore-and-open and deletion.
125
+
126
+ - Use the star on either tab and the **Favorites only** dropdown to find important chats. Favorites persist on the host across archive, restore, and browser changes. Reopen management to see changes made in other pages. Unknown or unreadable sessions retain their stored favorite IDs; cleanup requires confirmed artifact absence.
127
+ - On Unarchived, enter 1–36,500 whole idle days and preview candidates under the current filters. Deselect individual candidates before confirmation. Favorites, the current chat, running sessions (including subagents), and pending interactions are protected; sessions without a valid activity time are excluded.
128
+ - Archive rechecks favorites and activity. Batch archive, restore, and delete report successful, skipped, failed, and remaining items; the first failure stops the batch. Retry only the remainder. Delete retries still require confirmation.
129
+ - **Undo this archive** restores sessions archived by the current batch, including successful retries. It is available only while the current management page remains open; refreshing or closing clears it. Permanent deletion cannot be undone.
130
+ - Favorites can still be archived manually. Protection applies to idle cleanup only. There is no scheduled or automatic background cleanup.
131
+
90
132
  ### View and continue archived conversations
91
133
 
92
- Available starting with `0.1.40`:
134
+ Native conversation navigation has been available since `0.1.40`; 1.0.0 uses these entry points:
135
+
136
+ - **Click the session title**: open the native DSH session to view messages, attachments, and tool details. Continue chatting while keeping the session archived.
137
+ - **More → Restore and open**: unarchive the session and open it to resume work.
138
+
139
+ ## Search API compatibility (integrators)
140
+
141
+ The canonical API is `workspaceRegistry.searchSessionContent({ sessionIds, query })`, covering archived and unarchived sessions. Supply 1–20 session IDs and a nonempty query of 1–200 characters; IDs are deduplicated. Results have the shape `{ items: [{ sessionId, seq, snippet }], failures: [{ sessionId, message }] }`. Individual read failures appear in `failures`; invalid input rejects the call.
93
142
 
94
- - **Open session**: open the native DSH session to view messages, attachments, and tool details. Continue chatting while keeping the session archived.
95
- - **Restore and open**: unarchive the session and open it to resume work.
143
+ `searchArchivedContent` remains the legacy, archived-only entry point. Both use the existing host Typert connection and authorization boundary; no HTTP endpoint or authentication setting is added. Keep the legacy descriptor throughout the currently supported host range, including patch releases. Removal requires an explicit compatibility-range change, client migration, and deprecation notice. New clients prefer the canonical API and use the old one only as a version fallback, never dispatching the same search to both.
96
144
 
97
145
  ## Updates
98
146
 
@@ -141,7 +189,7 @@ pnpm build
141
189
  dsh plugin --profile web add .
142
190
  ```
143
191
 
144
- 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.
192
+ Restart DSH Web and hard-refresh your browser afterward. Source code in [src](src) uses strict TypeScript. Generated `lib` files are excluded from Git; `prepack` rebuilds them automatically. Published JavaScript entry points and runtime modules remain unchanged; installing the npm package does not require TypeScript. Run `pnpm typecheck` for type checking, `pnpm test` to validate changes, or `pnpm verify` for the full checks.
145
193
 
146
194
  </details>
147
195
 
package/README.zh-CN.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="assets/branding/dsh-banner.png" alt="DSH Archive Manager" width="100%">
2
+ <img src="assets/branding/dsh-banner.webp" alt="DSH Archive Manager" width="100%">
3
3
  </p>
4
4
 
5
5
  <div align="center">
@@ -14,6 +14,7 @@
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
+ [![DSH 支持至 0.1.6-alpha.2](https://img.shields.io/badge/DSH-%E6%94%AF%E6%8C%81%E8%87%B3%200.1.6--alpha.2-2563eb.svg)](#前置条件)
17
18
  </div>
18
19
 
19
20
  > DSH Archive Manager 是社区维护的 DeepSeek Harness(DSH)插件,并非 DeepSeek AI 官方产品。
@@ -23,19 +24,49 @@
23
24
  把暂时不用的会话收起来,需要时再找回,让日常任务列表更清爽。
24
25
 
25
26
  - **归档会话**:收起单条聊天,或整个工作区的未归档聊天。
26
- - **找回历史**:搜索会话标题,按项目筛选,按时间或标题排序。
27
- - **恢复任务**:恢复单条、选中的会话、整个项目或全部归档会话。
28
- - **清理记录**:确认后永久删除不再需要的归档会话。
27
+ - **找回历史**:搜索标题与正文,组合项目、收藏和日期筛选,按时间、标题或轮次排序。
28
+ - **恢复任务**:恢复单条、选中的会话或整个项目;可全选当前筛选结果后批量操作。
29
+ - **清理记录**:确认后永久删除不再需要的归档会话,查看批量进度并重试剩余项。
30
+ - **整理重要会话**:收藏常用聊天,预览闲置归档候选,保护收藏与活跃任务。
31
+ - **查看与排障**:不恢复即可快速预览,复制会话 ID/路径,诊断异常并定向修复支持的旧日志。
32
+
33
+ > 本文对应 1.0.0 版本,完整功能清单与升级边界见[更新日志](CHANGELOG.zh-CN.md)。
34
+
35
+ ## 异常会话诊断与修复
36
+
37
+ 归档页自动汇总读取异常,展开「诊断与修复」可查看原因和处理建议。点击「诊断会话」,符合规则时再点击「确认修复」。当前支持旧自动化消息来源的定向转换,保留原日志、正文及任务归属。修复要求会话已归档且未在任何 DSH 进程中打开;文件缺失、权限问题与未知损坏只给出处理建议,不删除或截断日志。
38
+
39
+ ## 检索与预览
40
+
41
+ - 已归档与未归档统一支持标题/正文搜索、日期、项目、收藏及创建时间排序;两边均可通过星标收藏和取消收藏。未归档的正文命中点击打开完整会话。
42
+
43
+ - 快速预览默认以 Markdown 排版展示,支持表格、引用与代码块,区分用户和助手;可切换为原文与关键词高亮。
44
+
45
+ - 在搜索框左侧选择「标题与正文」,可搜索当前页签会话中的用户和助手文本;默认仍只搜索标题。
46
+ - 搜索框右侧「日期」可选择或清除更新时间范围;项目、收藏和更新时间范围可组合使用;结束日期包含本地当天。已归档和未归档页均支持正文搜索与这些筛选条件。
47
+ - 正文命中显示片段和关键词高亮;已归档页点击片段或「更多 → 快速预览」查看上下文,不恢复会话;未归档页点击片段打开完整会话。没有关键词时预览最近八条消息,有关键词时定位首个命中附近。
48
+ - 检索逐批读取,每批最多 20 条会话,批内逐条读取;关键词最多 200 字符。预览每条最多 2000 个 UTF-16 码元,截断保留完整 Unicode 字符,较长内容请打开完整会话。
49
+ - 搜索与预览不包含工具输出、附件、推理、系统或插件注入消息;读取失败会显示详情并支持重试。检索的是持久化原始文本,不等同于模型当前上下文。
50
+ - 未建立持久化全文索引,大量或超长会话可能需要较久,建议先缩小项目、日期或收藏范围;尚无可承诺的会话数量上限或响应时延;更改条件会停止后续批次,正在读取的单批仍会完成,但旧结果不会覆盖新筛选。
51
+ ## 轮次与定位
52
+
53
+ - 已归档和未归档列表均在时间旁显示轮次。每条用户提交消息算一轮,包括图片消息;助手回复、工具调用和插件注入不计入。
54
+ - 排序菜单新增「轮次最多/轮次最少」,轮次相同按更新时间及标题排序。读取失败显示「轮次未知」,放在已知轮次之后,并提供失败明细和重试。
55
+ - 每行「更多」菜单提供「复制会话 ID/复制会话路径」。官方 JSONL 存储复制会话目录,其他后端复制宿主提供且存在的文件路径;路径缺失会提示,不猜测路径。
56
+ - 详情每批读取最多 20 条,不激活或恢复会话。统计来自原始日志;分支中继承的用户消息也计入。较多长日志可能需要等待,未建立持久化轮次索引。
57
+ - 剪贴板需要 HTTPS 或本机地址及浏览器权限;复制失败会明确提示,不显示成功。
29
58
 
30
59
  ## 界面预览
31
60
 
32
- 从侧栏会话菜单归档聊天:
61
+ 在「设置 → 归档会话 → 已归档」检索、收藏、预览、恢复和清理:
33
62
 
34
- ![从会话菜单归档会话](assets/screenshots/archive-session-menu.png)
63
+ ![已归档会话:统一检索筛选、收藏与恢复](assets/screenshots/archived-sessions.webp)
35
64
 
36
- 在「设置 → 归档会话」集中查找、恢复和清理:
65
+ 切换到「未归档」,使用相同筛选条件整理会话,预览闲置归档或按项目批量归档:
37
66
 
38
- ![归档会话管理页](assets/screenshots/archived-sessions.png)
67
+ ![未归档会话:闲置整理与项目归档](assets/screenshots/unarchived-sessions.webp)
68
+
69
+ > 截图来自发布前开发版,界面中版本标识为 0.1.44;本次发行版本为 1.0.0。侧栏由当前安装的 UI 插件提供,不代表本插件新增的侧栏功能。
39
70
 
40
71
  ## 前置条件
41
72
 
@@ -74,25 +105,46 @@ dsh plugin --profile web add @michengai/dsh-archive-manager@latest --registry=ht
74
105
  | --- | --- |
75
106
  | 归档一条会话 | 打开侧栏会话菜单,选择「归档会话」 |
76
107
  | 归档整个工作区 | 打开工作区菜单,选择归档该工作区的会话 |
77
- | 查找归档 | 打开「设置 → 归档会话」,搜索标题或按项目筛选 |
78
- | 调整排列顺序 | 按更新时间、创建时间或标题排序 |
79
- | 恢复一条会话 | 点击会话右侧的「恢复」 |
108
+ | 查找归档 | 打开「设置 → 归档会话」,选择标题/正文搜索,组合项目、收藏和日期筛选 |
109
+ | 调整排列顺序 | 按更新时间、创建时间、标题、轮次最多/最少排序 |
110
+ | 恢复一条会话 | 点击会话右侧的恢复图标;更多菜单可「恢复打开」 |
80
111
  | 归档某个项目或未分组 | 在「未归档」页点击分组右侧“…”菜单,确认归档该组全部聊天;不受搜索筛选影响 |
112
+ | 收藏会话 | 点击行右侧星标,使用收藏下拉菜单筛选 |
113
+ | 快速查看归档内容 | 点击命中片段或「更多 → 快速预览」 |
114
+ | 整理闲置会话 | 在未归档页设置天数,预览、检查候选后确认归档 |
115
+ | 定位会话文件 | 在更多菜单复制会话 ID 或路径 |
116
+ | 处理读取异常 | 展开诊断与修复,先诊断,再按资格确认修复 |
81
117
  | 跨项目批量归档 | 切换到「未归档」,跨项目勾选会话后点击「归档」并确认 |
82
- | 批量恢复或删除 | 勾选会话后使用批量操作;也可使用项目菜单或页面顶部的全部操作 |
118
+ | 批量恢复或删除 | 勾选会话后使用批量操作;也可使用项目菜单;页面不再提供独立的全部恢复/全部删除按钮 |
83
119
 
84
120
  页面默认打开「已归档」,右侧「未归档」用于批量归档。切换 TAB 会清空选择;切换搜索或项目筛选会保留已选会话。批量操作前留意隐藏的已选数量,或先清空选择。
85
121
 
86
- 「全部恢复 / 全部删除」仅在已归档页显示,作用于所有项目的归档会话,不受筛选影响。未归档页排除子代理和空白占位会话,支持按更新时间或标题排序。
122
+ ### 收藏与闲置整理
123
+
124
+ 会话使用紧凑分组列表,点击项目标题可以折叠;右侧提供星标和恢复/归档图标,已归档会话的「更多」菜单提供恢复打开和删除。折叠只影响展示,「全选当前筛选结果」仍包含折叠组内符合筛选的会话。
125
+
126
+ - 在已归档或未归档会话行右侧点击星标,通过收藏下拉菜单中的「只看收藏」找回重要会话。收藏保存在宿主数据中,归档、恢复或更换浏览器不会清除;其他页面修改的收藏可在重新打开管理页后读取。
127
+ - 在「未归档」设置 1~36500 的整数闲置天数,结合当前项目、搜索、日期和收藏筛选,点击「预览闲置归档」。确认清单允许逐条取消,默认排除收藏、当前打开、正在执行(含子代理)以及等待交互的会话;缺少有效最后活动时间的会话不参与。
128
+ - 归档前再次检查收藏和活动状态。批量归档、恢复、删除显示进度与成功/跳过/失败/未处理数量;首个失败后停止,支持只重试剩余项。删除重试仍需确认。
129
+ - 「撤回本次归档」只恢复最近一批实际归档成功的会话,包括该批重试成功的部分。仅在本次打开管理页期间有效,关闭页面或刷新会清除记录;不会撤回原有归档,也不能恢复永久删除的会话。
130
+ - 收藏会话仍可手动归档;收藏保护只针对闲置整理。没有定时自动归档,不会在后台自行整理。
131
+
132
+ 「全选当前筛选结果」只选择符合当前条件的会话。项目菜单的整体操作仍作用于该项目全部会话,不受搜索筛选影响。未归档页排除子代理和空白占位会话。
87
133
 
88
134
  设置页与侧栏的批量归档、批量恢复均串行调用单条接口:归档在所有支持的宿主走官方 `ctx.workspaces.archiveSession`;恢复在 DSH 0.1.6+ 走官方 `ctx.workspaces.unarchiveSession`,更早宿主回退到本插件的 `workspaceRegistry.unarchiveSession`。
89
135
 
90
136
  ### 查看并继续归档对话
91
137
 
92
- 从 `0.1.40` 起支持以下操作:
138
+ 原生会话导航自 `0.1.40` 起提供,1.0.0 的操作入口如下:
139
+
140
+ - **点击会话标题**:打开 DSH 原生会话页,查看消息、附件和工具详情;可直接继续聊天,保持归档状态。
141
+ - **更多菜单 → 恢复打开**:取消归档后进入原会话,继续工作。
142
+
143
+ ## 检索接口兼容约定(集成开发者)
144
+
145
+ 正式入口为 `workspaceRegistry.searchSessionContent({ sessionIds, query })`,支持已归档与未归档会话。输入为 1~20 个会话 ID 和 1~200 字符非空关键词,ID 去重后处理。成功返回 `{ items: [{ sessionId, seq, snippet }], failures: [{ sessionId, message }] }`;单条读取失败进入 `failures`,参数不合法则拒绝整个调用。
93
146
 
94
- - **打开会话**:打开 DSH 原生会话页,查看消息、附件和工具详情;可直接继续聊天,保持归档状态。
95
- - **恢复并打开**:取消归档后进入原会话,继续工作。
147
+ `searchArchivedContent` 是旧客户端兼容入口,仅接受归档范围,保持原有语义。两者通过宿主 Typert 的既有连接与权限边界调用,无新增 HTTP 端点或鉴权配置。当前受支持版本范围内保留旧描述符,不在补丁版本移除;只有未来明确收窄兼容范围、完成客户端迁移并发布弃用说明后才删除。新客户端优先使用正式入口,旧入口仅用于旧版本回退;不应向两个入口重复发送同一检索。
96
148
 
97
149
  ## 更新
98
150
 
@@ -141,7 +193,7 @@ pnpm build
141
193
  dsh plugin --profile web add .
142
194
  ```
143
195
 
144
- 完成后重启 DSH Web 并硬刷新浏览器。修改 [src](src) 中的源码,不直接编辑生成目录 `lib`;使用 `pnpm test` 验证修改,使用 `pnpm verify` 执行完整检查。
196
+ 完成后重启 DSH Web 并硬刷新浏览器。业务源码统一在 [src](src) 中使用 TypeScript 严格模式;共享协议在 `contracts.ts`,宿主版本适配在 `host-compat.ts`、`client-compat.ts`,客户端组件与状态类型在 `client-types.ts`。`lib` 是本地构建目录,不纳入 Git,也不直接编辑;`prepack` 会在打包前自动构建,npm 包仍包含 `lib`。`pnpm typecheck` 检查业务源码和类型负例,`pnpm test` 先检查类型、构建再执行回归,`pnpm verify` 还执行兼容矩阵、打包和生成物不被 Git 跟踪的检查。测试与构建脚本继续使用 `.mjs`;对外发布仍为 JavaScript,不要求宿主加载 TypeScript。
145
197
 
146
198
  </details>
147
199
 
@@ -1,2 +1,4 @@
1
- README 顶部使用 assets/branding/dsh-banner.png 全宽展示。
2
- 仓库标识仍保留 assets/icon.png,供插件图标和其它入口复用。
1
+ 中文 README 使用 dsh-banner.webp,英文 README 使用 dsh-banner-en.webp,全宽展示。
2
+ 两张横幅均为 1.0.0 版本,尺寸 2172×724,通过 custom API 生成并经用户确认。
3
+ 仓库标识仍保留 assets/icon.png,供插件图标和其他入口复用。
4
+ 横幅采用 WebP quality=90、method=6,截图采用无损 WebP;均保留原始分辨率。
Binary file