dsh-session-manager 0.7.4 → 0.7.6
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 +20 -0
- package/README.md +11 -12
- package/README.zh.md +10 -11
- package/lib/client.js +268 -38
- package/lib/compat/projection-cache-delete.js +110 -0
- package/lib/compat/zstd-frames.js +78 -1
- package/lib/index.js +260 -10
- package/lib/session-files.js +6 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.7.6 — 2026-11-13
|
|
6
|
+
|
|
7
|
+
- Fix conditional React hooks in the session header and move dialog (#49).
|
|
8
|
+
- Open sessions from their titles in the management panel and remove the redundant Open button (#54).
|
|
9
|
+
- Display Migrate preset as an icon button with a hover description, accessible label, and active state, matching the other row actions.
|
|
10
|
+
- Use the shared DSH tooltip for session row priority badges instead of the browser's native title tooltip.
|
|
11
|
+
- Stream session headers from first Zstd frames larger than 1 MiB, whether compressed or decompressed, without buffering the entire frame output. Preserve the header-line size limit and validate the complete first frame and its checksum before accepting the header (#53).
|
|
12
|
+
- Delete projection checkpoints through the host storage queue for single, batch, and cascaded subagent deletion. Prevent delayed writes from recreating deleted lifecycle records, and remove matching entries from the retained legacy cache with locking and atomic replacement. Report cleanup failures without hiding successful session deletion (#50, #55).
|
|
13
|
+
- Add regression tests and an optional integration test using the exact DSH `0.2.2-rc.1` cache and storage packages.
|
|
14
|
+
- Manually verified with the official DSH Desktop `0.2.2-rc.1`.
|
|
15
|
+
|
|
16
|
+
## 0.7.5 — 2026-10-22
|
|
17
|
+
|
|
18
|
+
- **fix(security)**: Enforce centralized API authentication on all `/session-manager/api/*` routes using DSH official `ctx.connection.admit(req)`. Enforce strict Owner-only authorization (`peer.principal.kind === "owner"`), reject untrusted, unauthenticated, empty, or non-owner requests before body reading and database queries, and fail closed with HTTP 503 (`auth-unavailable`) if connection service is missing or unready, preventing unauthorized access across public tunnels, reverse proxies, and local networks (#43).
|
|
19
|
+
- **fix(move)**: Synchronize the effective `workingDirectory` projection upon moving sessions across workspaces. For active sessions, call official `workingDirectory.set(agent, path)` when active or fall back to appending `working-directory/change` events to fold the projection in real time, and flush to disk via projection cache; for cold sessions, rewrite headers when un-diverged or append change events for sequential logs. For unmigrated packed rows with conflicting historical working-directory events, safely refuse moves with HTTP 409 (`working-directory-sync-unsafe`) before any file write to prevent destination directory drift upon restart (#42).
|
|
20
|
+
- **fix(ui)**: Align session header action buttons with native DSH session title bar style: unify height to 28px, remove idle border and background (transparent ghost buttons), add standard 6px border-radius, use official hover and active tokens, style danger buttons cleanly, and replace raw Unicode emojis with crisp 14×14 SVG vector icons (#44).
|
|
21
|
+
- **fix(ui)**: Optimize session header and manager panel layout: set header slot order to 0 to sit immediately after static session preset and team entries and before dynamic subagent and task status indicators; switch header action buttons to a fixed-width (flex-shrink: 0, 28px square) icon-only layout with corner priority badge; in session manager panel row actions, convert buttons matching header (archive, favorite, review, edit, move, delete) to clean icon-only buttons with hover tooltips while keeping non-header ("Open", "Migrate") and bulk action buttons with visible text labels (#46).
|
|
22
|
+
- **test**: Add comprehensive test suites for API authentication gating (`issue-43-api-auth.test.mjs`), cross-workspace working directory synchronization (`issue-42-working-directory-after-move.test.mjs`), header action button styling with SVG vector icons (`issue-44-header-styles.test.mjs`), and header/panel row layout optimization (`issue-46-header-layout.test.mjs`).
|
|
23
|
+
- **compat**: Compatible with DSH Desktop v0.2.1-rc.2 (and v0.2.0-rc.2).
|
|
24
|
+
|
|
5
25
|
## 0.7.4 — 2026-10-20
|
|
6
26
|
|
|
7
27
|
- **fix(workspace)**: Repair workspace session membership on DSH 0.2.x. New and forked sessions are now attributed to the workspace owning their `cwd` as soon as the session is announced (runtime repair, no restart needed), and historical sessions whose `cwd` matches a registered workspace are re-registered on startup — all through the official DSH workspace entity API (#41).
|
package/README.md
CHANGED
|
@@ -12,15 +12,16 @@ English | [中文](README.zh.md)
|
|
|
12
12
|
|
|
13
13
|
DeepSeek Harness session and workspace manager —— Workspaces: archive and visibility. Sessions: move, migrate presets, delete, favorite, review later, prioritize, tag, and annotate. Batch operations.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
The Web UI and Desktop app share the same plugin Host/client functionality; environment-specific installation notes are documented below.
|
|
16
16
|
|
|
17
17
|
## 1 Features
|
|
18
18
|
|
|
19
19
|
### 1.1 Session lifecycle management
|
|
20
20
|
|
|
21
21
|
- **Delete** is irreversible and always asks for confirmation. Subagent sessions and transient blank placeholders (no persisted artifact) cannot be deleted.
|
|
22
|
+
- **Projection cache cleanup (DSH 0.2.2-rc.1)**: session deletion also removes its checkpoint and retained legacy cache entry, including cascaded subagents and batch deletion. Delayed writes from the deleted lifecycle are blocked. Cleanup failures are reported as warnings; they do not undo session deletion.
|
|
22
23
|
- **Archive / Unarchive** moves a session in and out of the active list without touching its disk content.
|
|
23
|
-
- **Move to workspace** keeps history, title, archive state and derived-session relationships intact, rewrites the session's `cwd` to the target workspace, and updates the live writer's header in place so any pending tool calls keep landing on the new path. When the session's `cwd` already equals the target workspace path but its membership was never recorded, only the missing membership is repaired: no `cwd` rewrite, no artifact rewrite or move, and no session restart.
|
|
24
|
+
- **Move to workspace** keeps history, title, archive state and derived-session relationships intact, rewrites the session's `cwd` to the target workspace, synchronizes the runtime `workingDirectory` projection for active agents, and updates the live writer's header in place so any pending tool calls keep landing on the new path. When the session's `cwd` already equals the target workspace path but its membership was never recorded, only the missing membership is repaired: no `cwd` rewrite, no artifact rewrite or move, and no session restart.
|
|
24
25
|
- **Migrate Agent preset** rewrites the latest `agent-preset/selected` event (or the session header if no such event exists) so a session whose preset was renamed or removed can resume. Message history is never altered.
|
|
25
26
|
|
|
26
27
|
### 1.2 Session shortcuts
|
|
@@ -66,11 +67,11 @@ Verified with the official DSH Desktop client; see [5 Compatibility](#5-compatib
|
|
|
66
67
|
|
|
67
68
|
### 2.1 Title bar
|
|
68
69
|
|
|
69
|
-
The right side of the title area exposes actions for the **current session**: **Archive / Unarchive**, **Tags / Notes**, **Move to workspace**, **Delete session
|
|
70
|
+
The right side of the title area exposes actions for the **current session**: **Archive / Unarchive**, **Favorites**, **Review-later**, **Tags / Notes**, **Move to workspace**, **Delete session**, and **More actions** (`⋯`), matching native DSH title-bar button sizing (28px height, transparent ghost style) and vector SVG icon design.
|
|
70
71
|
|
|
71
72
|
### 2.2 Sessions and workspaces management entry and interface
|
|
72
73
|
|
|
73
|
-
Open **Sessions & Workspaces** from the bottom of DSH's sidebar to browse all sessions and workspaces
|
|
74
|
+
Open **Sessions & Workspaces** from the bottom of DSH's sidebar to browse all sessions and workspaces. Click a session title to open it; there is no separate Open button. Row actions, including **Migrate preset**, use icons with hover descriptions and accessible labels. The session tab supports switching workspaces, searching by title / ID / notes / tags, filtering, and sorting; the workspace tab supports searching, sorting, bulk actions, and visibility toggling.
|
|
74
75
|
|
|
75
76
|
### 2.3 Bulk management
|
|
76
77
|
|
|
@@ -137,17 +138,17 @@ After changing plugin dependencies, `package.json`, bundle configuration, or oth
|
|
|
137
138
|
- 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.
|
|
138
139
|
- **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.
|
|
139
140
|
- On startup, sessions whose `cwd` names a registered workspace but whose membership record is missing are re-registered through the official DSH API (idempotent). Incomplete scans skip pruning only: existing membership is never dropped, and live sessions or memberships added during the scan are always preserved.
|
|
140
|
-
- 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.
|
|
141
|
+
- 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.
|
|
142
|
+
- **Centralized API authentication**: All `/session-manager/api/*` routes are protected by DSH official `connection.admit()` and `requestRejection()` gates, strictly enforcing Owner-only privileges (`peer.principal.kind === "owner"`) and failing closed (HTTP 503) if connection services are absent, ensuring that exposed network tunnels or local proxies cannot bypass access control.
|
|
141
143
|
|
|
142
144
|
## 5 Compatibility
|
|
143
145
|
|
|
144
|
-
The table below lists
|
|
146
|
+
The table below lists compatible version combinations between DeepSeek Harness (DSH) and `dsh-session-manager`.
|
|
145
147
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
| DeepSeek Harness (DSH) | dsh-session-manager | Verified Environment |
|
|
148
|
+
| DeepSeek Harness (DSH) | dsh-session-manager | Environment |
|
|
149
149
|
| :--- | :--- | :--- |
|
|
150
|
-
| **v0.2.
|
|
150
|
+
| **v0.2.2-rc.1** | `0.7.6` | Desktop |
|
|
151
|
+
| **v0.2.1-rc.2** | `0.7.5`, `0.7.4`, `0.7.3`, `0.7.2` | Desktop |
|
|
151
152
|
| **v0.2.0-rc.2** | `0.7.1`, `0.7.0`, `0.6.4`, `0.6.3`, `0.6.2`, `0.5.4` | Desktop |
|
|
152
153
|
| **v0.1.7-rc.2** | `0.5.3` | Desktop / Web UI |
|
|
153
154
|
| **v0.1.7-rc.1** | `0.5.2` | Desktop / Web UI |
|
|
@@ -158,8 +159,6 @@ The table below lists verified version combinations between DeepSeek Harness (DS
|
|
|
158
159
|
| **v0.1.2-rc.1** | `0.4.0` | Web UI |
|
|
159
160
|
| **v0.1.0-rc.7** | `0.1.2`, `0.1.1`, `0.1.0` | Web UI |
|
|
160
161
|
|
|
161
|
-
The version combinations above have been tested with either the official Web UI or Desktop app. Other version combinations may also work but have not been individually verified.
|
|
162
|
-
|
|
163
162
|
When using a standalone DSH CLI/runtime, Node.js 22.15+ (22.x) or 24+ is required for built-in Zstd support. The official Desktop app ships and manages its matching runtime separately.
|
|
164
163
|
|
|
165
164
|
This is a Cordis plugin and declares `cordis: ">=4.0.0-rc <5"` as its peer dependency.
|
package/README.zh.md
CHANGED
|
@@ -12,15 +12,16 @@
|
|
|
12
12
|
|
|
13
13
|
DSH 会话与工作区管理——工作区:归档与显示。会话:跨工作区移动、预设迁移、删除;收藏、待回看、优先级、标签、备注。批量操作。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Web UI 与 Desktop 共用本插件的 Host 与客户端功能,具体安装方式见下文。
|
|
16
16
|
|
|
17
17
|
## 1 功能
|
|
18
18
|
|
|
19
19
|
### 1.1 会话生命周期管理
|
|
20
20
|
|
|
21
21
|
- **删除**:不可逆操作,UI 始终要求二次确认。subagent 会话和尚未落盘的空白会话占位不能删除。
|
|
22
|
+
- **投影缓存清理(DSH 0.2.2-rc.1)**:删除会话时同时清理其 checkpoint 与旧版聚合缓存条目,覆盖批量删除和级联子智能体删除,并阻止已删生命周期的延迟写回。清理失败会返回警告,不会撤销已完成的会话删除。
|
|
22
23
|
- **归档 / 移出归档**:把会话移出或移回主列表,不删除磁盘内容。
|
|
23
|
-
- **移动至工作区**:跨工作区移动时保留历史、标题、归档状态和派生会话关系,同时把 `cwd`
|
|
24
|
+
- **移动至工作区**:跨工作区移动时保留历史、标题、归档状态和派生会话关系,同时把 `cwd` 重写为目标工作区,实时同步活动 Agent 的运行时 `workingDirectory` 投影,并就地更新 live writer 的 header,使挂起的工具调用继续落到新路径。若会话的 `cwd` 本来就等于目标工作区、只是归属未登记,则只补全归属记录,不改写 `cwd`、不重写或移动工件、不重启会话。
|
|
24
25
|
- **迁移 Agent 预设**:原预设被改名或删除导致会话无法恢复时,可修复该会话。迁移会就地重写最后一条 `agent-preset/selected` 事件(若从未记录则修改会话 header),不改动历史消息。
|
|
25
26
|
|
|
26
27
|
### 1.2 会话快捷管理
|
|
@@ -64,11 +65,11 @@ DSH 会话与工作区管理——工作区:归档与显示。会话:跨工
|
|
|
64
65
|
|
|
65
66
|
### 2.1 标题栏入口
|
|
66
67
|
|
|
67
|
-
标题栏右侧对**当前会话**提供:**归档 /
|
|
68
|
+
标题栏右侧对**当前会话**提供:**归档 / 移出归档**、**收藏**、**待回看**、**标签 / 备注**、**移动至工作区**、**删除会话**以及**更多操作**(`⋯`),与 DSH 原生顶栏按钮规范完全对齐(28px 高度、无边框幽灵透明样式、SVG 矢量描边图标)。
|
|
68
69
|
|
|
69
70
|
### 2.2 会话与工作区管理入口与界面
|
|
70
71
|
|
|
71
|
-
从 DSH 侧边栏底部进入
|
|
72
|
+
从 DSH 侧边栏底部进入 **会话与工作区**,可浏览全部会话与工作区。点击会话名称即可打开会话,不再提供独立的「打开」按钮。行操作(含 **迁移预设**)统一使用图标,并提供悬停提示与无障碍名称。会话管理页支持切换工作区、按标题 / ID / 备注 / 标签搜索、筛选与排序;工作区管理页支持搜索、排序、批量处理与显示开关切换。
|
|
72
73
|
|
|
73
74
|
### 2.3 批量管理入口
|
|
74
75
|
|
|
@@ -136,16 +137,16 @@ dsh plugin --profile web add <本仓库路径>
|
|
|
136
137
|
- **工作区归档事务保护**:若工作区内存在运行中会话则拒绝归档;批量归档会话若中途遇到异常会自动回滚已变更状态,避免部分成功导致状态不一致。
|
|
137
138
|
- 启动时若发现 `cwd` 对应已注册工作区但归属记录遗漏的会话,会通过 DSH 官方接口补全登记(幂等);扫描不完整时只跳过清理,不会误删现有归属,也不会清除仍在内存中或扫描期间新加入的会话。
|
|
138
139
|
- 同一会话的插件写操作按顺序执行;请求体限制为 64 KiB。该队列不替代 DSH 自身的持久化写入协调。
|
|
140
|
+
- **集中 API 鉴权与安全门禁**:所有 `/session-manager/api/*` 接口统一接入 DSH 官方 `connection.admit()` / `requestRejection()` 校验,严格限制仅 Owner 权限主体可调用,服务未就绪时默认拒绝(HTTP 503 Fail-Closed),有效阻断公网隧道或反向代理暴露下的未授权访问。
|
|
139
141
|
|
|
140
142
|
## 5 兼容性
|
|
141
143
|
|
|
142
|
-
下表列出 DeepSeek Harness(DSH)与 `dsh-session-manager`
|
|
144
|
+
下表列出 DeepSeek Harness(DSH)与 `dsh-session-manager` 的兼容版本组合。
|
|
143
145
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
| DeepSeek Harness (DSH) | dsh-session-manager | 验证环境 |
|
|
146
|
+
| DeepSeek Harness (DSH) | dsh-session-manager | 环境 |
|
|
147
147
|
| :--- | :--- | :--- |
|
|
148
|
-
| **v0.2.
|
|
148
|
+
| **v0.2.2-rc.1** | `0.7.6` | Desktop |
|
|
149
|
+
| **v0.2.1-rc.2** | `0.7.5`, `0.7.4`, `0.7.3`, `0.7.2` | Desktop |
|
|
149
150
|
| **v0.2.0-rc.2** | `0.7.1`, `0.7.0`, `0.6.4`, `0.6.3`, `0.6.2`, `0.5.4` | Desktop |
|
|
150
151
|
| **v0.1.7-rc.2** | `0.5.3` | Desktop / Web UI |
|
|
151
152
|
| **v0.1.7-rc.1** | `0.5.2` | Desktop / Web UI |
|
|
@@ -156,8 +157,6 @@ dsh plugin --profile web add <本仓库路径>
|
|
|
156
157
|
| **v0.1.2-rc.1** | `0.4.0` | Web UI |
|
|
157
158
|
| **v0.1.0-rc.7** | `0.1.2`, `0.1.1`, `0.1.0` | Web UI |
|
|
158
159
|
|
|
159
|
-
以上版本组合已在官方 Web UI 或 Desktop 客户端中完成测试。其他版本组合可能同样兼容,但未逐一验证。
|
|
160
|
-
|
|
161
160
|
使用独立 DSH CLI / runtime 时,需要 Node.js 22.15+(22.x)或 24+,以提供内置 Zstd 支持。官方 Desktop 客户端单独携带并管理与其版本匹配的 runtime。
|
|
162
161
|
|
|
163
162
|
本插件是 Cordis 插件,peer dependency 为 `cordis: ">=4.0.0-rc <5"`。
|