dsh-session-manager 0.6.3 → 0.7.0

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # dsh-session-manager — session manager for DeepSeek Harness
1
+ # dsh-session-manager — session and workspace manager for DeepSeek Harness
2
2
 
3
3
  English | [中文](README.zh.md)
4
4
 
@@ -9,9 +9,9 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## 0 Overview
11
11
 
12
- DeepSeek Harness session manager: delete, archive, move sessions across workspaces, migrate presets, favorites, review-later, search, filter, sort, prioritize, add tags and notes, and batch-manage sessions.
12
+ DeepSeek Harness session and workspace manager —— Workspaces: archive and visibility. Sessions: move, migrate presets, delete, favorite, review later, prioritize, tag, and annotate. Batch operations.
13
13
 
14
- Verified with the official DSH Desktop client; see [5 Compatibility](#5-compatibility) for the current verification scope. Both environments use the same plugin Host/client functionality; environment-specific installation notes are documented below.
14
+ Verified with the official DSH Desktop client; see [5 Compatibility](#5-compatibility) for the current verification scope. Both environments share the same plugin Host/client functionality; environment-specific installation notes are documented below.
15
15
 
16
16
  ## 1 Features
17
17
 
@@ -47,8 +47,19 @@ Verified with the official DSH Desktop client; see [5 Compatibility](#5-compatib
47
47
  - **Self-update check**: A 🐋 (Whale) icon button in the session manager panel header checks for updates and displays a notification dot when a new version is available. Click to open the update dialog with current and latest versions, and one-click update via the DSH Plugin Manager.
48
48
  - **Settings Card**: Registered under DSH Settings (`settings.plugin.item`). Displays current version, latest version, inline check/update buttons, an auto-check toggle, and GitHub repository link.
49
49
  - **Install Source (Registry)**: Select between **npm official registry** (`registry.npmjs.org`, default) and **China mainland mirror** (`registry.npmmirror.com`) in the Settings Card. Check for updates and download packages directly from the selected registry.
50
- - **Dialog opacity**: A 50%–100% slider (5% steps, default 100%) in the Settings Card's preferences section, with a "Reset to default" button. It tunes the plugin dialog **background fill only** — text, buttons, inputs, tags, badges, borders, hover and danger colours stay fully opaque and keep following the active DSH theme. Implemented with the plugin's own `--sm-dialog-opacity` variable mixed into DSH's raised-surface token via `color-mix()`, so any theme that publishes `--dsw-alias-*` tokens is honoured without the plugin detecting, naming or reading private variables of a theme plugin. Persisted in `localStorage` (`dsh-session-manager-dialog-opacity`) and applied live.
51
- - **Theme**: The whole UI (dialogs, settings card, title-bar buttons, dropdown menus, inputs, selects, badges, tooltips, row hover/selected states) reads DSH's own `--dsw-alias-*` tokens directly. The plugin never redefines a DSH token and keeps no private light/dark palette, so any theme — including a theme plugin — that modifies or republishes those tokens is picked up automatically. The only light/dark branches left are the token-less fallback colour for the dialog-opacity fill and the plugin-specific priority colours. Every `--dsw-*` reference is locked to the token set DSH actually declares, because a non-existent token would silently degrade to its hard-coded fallback and block theming.
50
+ - **Dialog opacity**: A 50%–100% slider (5% steps, default 100%) with a "Reset to default" button in the Settings Card's preferences section. Adjusts the background fill opacity of plugin dialogs in real time while keeping text, buttons, inputs, tags, and borders fully opaque.
51
+ - **Theme**: Automatically follows the active DSH theme (including third-party theme plugins). Dialogs, settings cards, title-bar buttons, menus, inputs, and all other UI elements seamlessly adapt to light and dark themes.
52
+ - **Unified dropdown styling**: All select dropdowns (sort, filter, priority) use unified shadow-free rounded custom floating menus matching active themes, strictly aligned with trigger widths, eliminating Chromium duplicate native popups.
53
+
54
+ ### 1.5 Workspace Archiving and Management (new in v0.7.0)
55
+
56
+ - **Two-page tab switching**: Seamlessly switch between "Session Management" and "Workspace Management" in the dialog header, preserving each page's distinct search, filter, and sort states.
57
+ - **Workspace list**: Displays all registered workspaces with title/name, physical path, session count, latest activity timestamp computed from member sessions, and right-side toggle switch.
58
+ - **Search, filter, and sort**: Case-insensitive search across name and path; filter by All / Active / Archived; sort by Recently Updated, Earliest Updated, Name A-Z, or Name Z-A; counter display and adaptive toolbar wrapping.
59
+ - **Toggle switch and archiving**:
60
+ - **Turn OFF (Archive)**: Pre-checks session activity (rejects safely if any session is running), cascades archiving to all unarchived member sessions, hides workspace from DSH native sidebar, and automatically rolls back if partial failure occurs.
61
+ - **Turn ON (Restore)**: Removes archive mark, restores workspace in native sidebar, unarchives member sessions previously archived by the workspace operation while keeping individually archived sessions intact. Creating an identical-path workspace restores visibility automatically.
62
+ - **Native sidebar hiding without ungrouped spill**: Employs derived snapshot interception with session ID unioning into `archivedSessionIds` so hidden workspace sessions never spill into "Ungrouped", supporting dark/light themes and persistent recovery across DSH restarts.
52
63
 
53
64
  ## 2 UI entry points
54
65
 
@@ -123,6 +134,7 @@ After changing plugin dependencies, `package.json`, bundle configuration, or oth
123
134
  - The management list hides subagent sessions and the move API rejects them. Blank sessions without a persisted artifact cannot be moved.
124
135
  - Cold rewrites preserve the artifact's stored format (V1 / V2 / V3 / V4 are all readable; the plugin never forces an upgrade). Moves and rewrites refuse corrupt / truncated Zstd logs or JSONL logs with incomplete final lines instead of publishing partial history.
125
136
  - Preset migration separates backup, publication and rollback. If rollback fails, recovery files are retained and their paths are included in the error; do not remove them.
137
+ - **Workspace archiving rollback protection**: archiving is refused if active sessions are present, and batch session archiving automatically rolls back on partial failures to preserve state consistency.
126
138
  - Incomplete startup scans skip workspace reconciliation. Complete scans preserve live sessions and any membership added during the scan.
127
139
  - Plugin mutations are serialized per session and request bodies are limited to 64 KiB. This queue supplements, rather than replaces, DSH's own persistence coordination.
128
140
 
@@ -134,7 +146,7 @@ DSH versions are shown above plugin versions; each column represents a tested ve
134
146
 
135
147
  | v0.2.0-rc.2 | v0.1.7-rc.2 | v0.1.7-rc.1 |
136
148
  | --- | --- | --- |
137
- | 0.6.3, 0.6.2, 0.5.4 | 0.5.3 | 0.5.2 |
149
+ | 0.7.0, 0.6.4, 0.6.3, 0.6.2, 0.5.4 | 0.5.3 | 0.5.2 |
138
150
 
139
151
  | v0.1.6-alpha.2 | v0.1.5-rc.2 | v0.1.5-rc.1 |
140
152
  | --- | --- | --- |
package/README.zh.md CHANGED
@@ -1,4 +1,4 @@
1
- # dsh-session-manager — DeepSeek Harness 会话管理器
1
+ # dsh-session-manager — DeepSeek Harness 会话与工作区管理器
2
2
 
3
3
  [English](README.md) | 中文
4
4
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## 0 简介
11
11
 
12
- DeepSeek Harness 会话管理插件:支持删除、归档、跨工作区移动、预设迁移、收藏、待回看、搜索、筛选、排序、优先级、标签、备注及批量操作。
12
+ DSH 会话与工作区管理——工作区:归档与显示。会话:跨工作区移动、预设迁移、删除;收藏、待回看、优先级、标签、备注。批量操作。
13
13
 
14
14
  已在官方 DSH Desktop 客户端完成实际测试,当前验证范围见「5 兼容性」;两种环境共用本插件的 Host 与客户端功能,具体安装方式见下文。
15
15
 
@@ -34,7 +34,7 @@ DeepSeek Harness 会话管理插件:支持删除、归档、跨工作区移动
34
34
 
35
35
  ### 1.3 批量处理
36
36
 
37
- - **批量模式入口**:在会话管理窗口顶部点击 **批量处理** 切换按钮,行左侧出现复选框,工具栏出现 **全选当前筛选 / 清空选择** 和 **批量按钮区**;退出批量模式会清空当前选中。
37
+ - **批量模式入口**:在会话管理窗口顶部点击 **批量处理** 切换按钮,行左侧出现复选框,工具栏出现 **全选筛选 / 清空选择** 和 **批量按钮区**;退出批量模式会清空当前选中。
38
38
  - **批量按钮区** 列出所有批量动作:
39
39
  - **标记切换**:**归档 / 取消归档 / 收藏 / 取消收藏 / 待回看 / 取消待看**。
40
40
  - **变更操作**:**添加标签 / 清空标签 / 设置优先级 / 移动至工作区 / 迁移预设 / 删除会话**。
@@ -45,8 +45,19 @@ DeepSeek Harness 会话管理插件:支持删除、归档、跨工作区移动
45
45
  - **检查更新**:会话管理窗口顶部增加 🐋(鲸鱼)图标按钮,点击可检查新版本并在有更新时展示小红点提示;点击弹出更新窗口,展示当前版本与最新版本,支持一键调用插件管理器安装更新。
46
46
  - **设置卡片**:注册在 DSH 设置的插件配置页(`settings.plugin.item`)。展示当前安装版本、最新版本状态、卡片内检查更新与更新按钮、自动检查偏好开关以及 GitHub 仓库链接。
47
47
  - **安装源选择**:在设置卡片中可随时切换安装源,可选 **npm 官方源**(`registry.npmjs.org`,默认)与 **中国大陆镜像源**(`registry.npmmirror.com`);检查更新与版本下载将直接请求所选源。
48
- - **弹窗透明度**:设置卡片「偏好设置」区域提供 50%–100% 滑块(步长 5%,默认 100%),并提供「恢复默认」按钮。该设置只调整插件弹窗的**背景填充**:文字、按钮、输入框、标签、badge、边框、hover 与危险按钮颜色保持完全不透明,并继续跟随 DSH 当前主题。实现方式为插件自有变量 `--sm-dialog-opacity` 通过 `color-mix()` 作用于 DSH 的抬升表面 token,因此任何发布 `--dsw-alias-*` token 的主题都能被继承——插件不会检测主题插件、枚举主题名称,也不会读取第三方插件的私有变量。设置保存在 `localStorage`(`dsh-session-manager-dialog-opacity`)并即时生效。
49
- - **主题**:整个界面(弹窗、设置卡片、标题栏按钮、下拉菜单、输入框、下拉选择、badge、tooltip、行 hover / 选中态)直接读取 DSH 自己的 `--dsw-alias-*` token。插件从不重新定义 DSH token,也不再维护私有的浅色/深色配色,因此任何修改或重新发布这些 token 的主题(含第三方主题插件)都会自动生效。仅剩的浅/深色分支只有两处:透明度设置在 token 缺失时的回退底色,以及插件自有的优先级颜色。所有 `--dsw-*` 引用都被锁定在 DSH 实际声明的 token 集合内——引用不存在的 token 会静默回退到硬编码颜色,从而阻断主题。
48
+ - **弹窗透明度**:设置卡片「偏好设置」区域提供 50%–100% 滑块(步长 5%,默认 100%)与「恢复默认」按钮,支持调节插件弹窗的背景填充透明度,文字、按钮、输入框、标签与边框等内容保持不透明并即时生效。
49
+ - **主题**:全面跟随 DSH 当前主题(包含第三方主题插件),弹窗、设置卡片、标题栏按钮、下拉菜单、输入框等界面元素自动适配浅色与深色主题。
50
+ - **统一下拉样式**:所有下拉选择框(排序、筛选、优先级等)采用无四周阴影的统一圆角自定义浮层,严格对齐触发框宽度,并解决 Chromium 原生系统弹层与自定义浮层重叠的双层问题。
51
+
52
+ ### 1.5 工作区归档与管理(v0.7.0 新增)
53
+
54
+ - **双页面切换**:在管理弹窗顶部可在「会话管理」与「工作区管理」之间无缝切换,保留各自的搜索与筛选状态。
55
+ - **工作区列表**:完整展示全部已注册工作区,包含工作区名称、物理路径、所属会话数、基于所属会话计算的最近更新时间及状态开关。
56
+ - **工作区搜索与筛选**:支持按名称和路径不区分大小写搜索;支持全部 / 未归档 / 已归档筛选;支持按最近更新 / 最早更新 / 名称升序 / 名称降序排序;支持批量归档与取消归档;工具栏按钮自适应折行。
57
+ - **显示开关与归档**:
58
+ - **关闭开关(归档)**:执行安全检查(运行中会话拒绝归档),直接将工作区及其所有未归档会话一并归档,并从 DSH 原生侧边栏隐藏。若发生局部失败,自动执行完整回滚以确保状态一致。
59
+ - **开启开关(恢复)**:解除工作区归档标记并恢复在原生侧边栏显示,自动恢复此前归档工作区时归档的会话;用户单独归档的会话继续保持归档。新建路径相同的工作区自动恢复显示。
60
+ - **原生侧边栏无缝隐藏**:采用派生快照拦截与会话 ID 归属处理,隐藏工作区不会导致其会话错误流入「未分组」,支持深浅主题、持久化存储与 DSH 重启保持。
50
61
 
51
62
  ## 2 UI入口
52
63
 
@@ -54,13 +65,13 @@ DeepSeek Harness 会话管理插件:支持删除、归档、跨工作区移动
54
65
 
55
66
  标题栏右侧对**当前会话**提供:**归档 / 移出归档**、**标签 / 备注**、**移动至工作区**、**删除会话**。
56
67
 
57
- ### 2.2 会话管理入口与界面
68
+ ### 2.2 会话与工作区管理入口与界面
58
69
 
59
- 从 DSH 侧边栏底部进入 **会话管理**,可浏览全部会话、切换工作区、按标题 / ID / 备注 / 标签搜索、应用筛选与排序,并对每条会话执行 **打开 / 归档 / 移出归档 / 标签 / 备注 / 移动 / 迁移预设 / 删除** 操作。窗口顶部承载工作区选择、归档筛选、收藏 / 待回看、标签、优先级筛选与排序控件,以及匹配 / 总数计数和"重置筛选"。
70
+ 从 DSH 侧边栏底部进入 **会话与工作区**,可浏览全部会话与工作区:会话管理页支持切换工作区、按标题 / ID / 备注 / 标签搜索、应用筛选与排序,并对每条会话执行 **打开 / 归档 / 移出归档 / 标签 / 备注 / 移动 / 迁移预设 / 删除** 操作;工作区管理页支持搜索、排序、批量处理与显示开关切换。
60
71
 
61
72
  ### 2.3 批量管理入口
62
73
 
63
- 会话管理窗口顶部的 **批量处理** 按钮即是入口:点一下进入批量模式,行左侧出现复选框,工具栏出现 **全选当前筛选 / 清空选择** 和 **批量按钮区**;再点一次退出批量模式。
74
+ 管理窗口顶部的 **批量处理** 按钮即是入口:点一下进入批量模式,行左侧出现复选框,工具栏出现 **全选筛选 / 清空选择** 和 **批量操作** 按钮;再点一次退出批量模式。
64
75
 
65
76
  ### 2.4 设置卡片入口
66
77
 
@@ -121,6 +132,7 @@ dsh plugin --profile web add <本仓库路径>
121
132
  - 会话管理列表隐藏 subagent 会话,移动接口也拒绝 subagent;尚未落盘的空白会话不能跨工作区移动。
122
133
  - 冷会话重写保留原工件格式(V1 / V2 / V3 / V4 都可读,绝不强制升级)。损坏或截断的 Zstd 日志、缺少完整尾行的 JSONL 会拒绝移动 / 重写,不会把部分历史当作完整日志保存。
123
134
  - 迁移预设按"备份 → 发布 → 回滚"分阶段处理。如果回滚失败,会保留恢复文件并在错误中报告路径;不要删除这些文件。
135
+ - **工作区归档事务保护**:若工作区内存在运行中会话则拒绝归档;批量归档会话若中途遇到异常会自动回滚已变更状态,避免部分成功导致状态不一致。
124
136
  - 启动扫描不完整时跳过工作区归属修复;完整扫描也不会清除仍在内存中或扫描期间新加入的会话。
125
137
  - 同一会话的插件写操作按顺序执行;请求体限制为 64 KiB。该队列不替代 DSH 自身的持久化写入协调。
126
138
 
@@ -132,7 +144,7 @@ DSH 版本在上,插件版本在下;每列表示一组已测试的版本组
132
144
 
133
145
  | v0.2.0-rc.2 | v0.1.7-rc.2 | v0.1.7-rc.1 |
134
146
  | --- | --- | --- |
135
- | 0.6.3, 0.6.2, 0.5.4 | 0.5.3 | 0.5.2 |
147
+ | 0.7.0, 0.6.4, 0.6.3, 0.6.2, 0.5.4 | 0.5.3 | 0.5.2 |
136
148
 
137
149
  | v0.1.6-alpha.2 | v0.1.5-rc.2 | v0.1.5-rc.1 |
138
150
  | --- | --- | --- |