@omdp/dsh-archived-sessions 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/lib/client.js +5 -1
- package/lib/index.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @omdp/dsh-archived-sessions
|
|
2
2
|
|
|
3
|
-
> Archived-sessions manager for the DeepSeek Harness web UI — fork of [`@muwinds/dsh-archived-sessions`](https://github.com/MuWinds/dsh-archived-sessions) (0.2.0), adapted for DSH **0.1.5-rc.1**.
|
|
3
|
+
> Archived-sessions manager for the DeepSeek Harness web UI — fork of [`@muwinds/dsh-archived-sessions`](https://github.com/MuWinds/dsh-archived-sessions) (0.2.0), adapted for DSH **0.1.5-rc.1** and DSH **0.1.6-alpha.1**.
|
|
4
4
|
|
|
5
|
-
DSH 归档会话管理:在 设置 →
|
|
5
|
+
DSH 归档会话管理:在 设置 → 归档会话管理 中查看、释放、删除已归档会话(支持按树删除子会话、清理孤儿会话)。自 0.3.4 起与 DSH 0.1.6 内置的「已归档会话」设置页共存、互不冲突。
|
|
6
6
|
|
|
7
7
|
[English](#english) · [中文](#中文)
|
|
8
8
|
|
|
@@ -48,7 +48,7 @@ pnpm add @omdp/dsh-archived-sessions -w
|
|
|
48
48
|
|
|
49
49
|
### 要求 / Requirements
|
|
50
50
|
|
|
51
|
-
- DeepSeek Harness **0.1.5-rc.1
|
|
51
|
+
- DeepSeek Harness **0.1.5-rc.1**、**0.1.5-rc.2**、**0.1.6-alpha.1**(实测版本;0.3.4 起三者全兼容,0.3.3 及更早与 0.1.6-alpha.1 **冲突**、与 0.1.5 系列兼容,见变更记录)
|
|
52
52
|
- `@deepseek-ai/cordis` ^4.0.1(peer)
|
|
53
53
|
- `@deepseek-ai/dsh-session-persistence-jsonl`(可选,随 DSH 自带;缺失时回退到内置路径编码)
|
|
54
54
|
|
|
@@ -65,6 +65,8 @@ pnpm add @omdp/dsh-archived-sessions -w
|
|
|
65
65
|
|
|
66
66
|
### 变更记录
|
|
67
67
|
|
|
68
|
+
- **0.3.4**(2026-09-15):**适配 DSH 0.1.6-alpha.1**——DSH 0.1.6 起在 web-app 内置了原生「已归档会话」设置页(`@deepseek-ai/dsh-client-ui-settings-unarchive-sessions`),它在 `settings.section` 槽位注册的 id 恰为 `archived-sessions`,与本插件旧 id 相同 → slot 冲突,**整个 Web UI 启动报「Failed to load plugins」被拦截**(运行时二分实测:去掉本插件即恢复)。修复:本插件 slot id 改为唯一的 `omdp-archived-sessions`、导航标签改为「归档会话管理」,与原生项共存(原生只有查看+恢复,删除/按树删除/孤儿清理仍是本插件能力)。其余 API 面(`sessionPersistence.list`/`workspaceRegistry`/`sessionQuery`/`shell.run`/`fs`/jsonl 路径编码)对 0.1.6-alpha.1 源码核查零差异。
|
|
69
|
+
- **0.3.3**(2026-09-10):**修复 0.3.2 的删除回归**——0.3.2 把会话根目录改为 `DSH_HOME` 推导时拼出了**混合分隔符**路径(`C:\Users\xj\.dsh/sessions/...`),而删除前校验 `assertSessionDirName` 的 basename 提取对混合分隔符失效(先按 `/` 切再按 `\` 切,把名字切成残缺片段),导致所有删除被"拒绝删除非会话目录"拦截。修复:① basename 提取改为按分隔符整体切分;② 根目录统一为 `/`。删除/孤儿清理恢复正常。
|
|
68
70
|
- **0.3.2**(2026-09-10):修两处 fork 遗留——① client 半区的模块 id 仍是 `@muwinds/dsh-archived-sessions`(未随包名改),浏览器端按 `@omdp/...` 找不到模块、设置页不显示;② 会话根目录改为从 `DSH_HOME` 环境变量推导(`<DSH_HOME>/sessions`,缺省 `~/.dsh/sessions`),不再硬编码本机路径。
|
|
69
71
|
- **0.3.1**(2026-09-10):**修复 0.3.0 的发布事故**——0.3.0 的 tarball 里没有 `lib/`(仓库 `.gitignore` 的 `**/lib/` 规则把源码吞了,npm 只打包到 4 个文件),安装后插件加载失败会拖垮 DSH;0.3.1 补回 `lib/index.js` + `lib/client.js`(发布前已核对 tarball 内容)。
|
|
70
72
|
- **0.3.0**(2026-09-10):fork 自 0.2.0;适配 DSH 0.1.5-rc.1(list 快照形状 + 路径自解析);按树删除子会话;孤儿清理;删除路径安全校验。
|
|
@@ -75,7 +77,7 @@ pnpm add @omdp/dsh-archived-sessions -w
|
|
|
75
77
|
|
|
76
78
|
### What is this
|
|
77
79
|
|
|
78
|
-
DSH sessions can be archived; this plugin adds an archived-session manager under **Settings →
|
|
80
|
+
DSH sessions can be archived; this plugin adds an archived-session manager under **Settings → 归档会话管理 (Archived Sessions Manager)**:
|
|
79
81
|
|
|
80
82
|
- **List**: title, session ID, workspace, disk usage, created time, running state;
|
|
81
83
|
- **Release** (释放): move a session out of the archive set back to active (no data deleted);
|
|
@@ -111,7 +113,7 @@ pnpm add @omdp/dsh-archived-sessions -w
|
|
|
111
113
|
|
|
112
114
|
### Requirements
|
|
113
115
|
|
|
114
|
-
- DeepSeek Harness **0.1.5-rc.1** (tested
|
|
116
|
+
- DeepSeek Harness **0.1.5-rc.1**, **0.1.5-rc.2**, **0.1.6-alpha.1** (tested; 0.3.4+ works on all three — 0.3.3 and earlier *collide* with 0.1.6-alpha.1 but are fine on 0.1.5, see changelog)
|
|
115
117
|
- `@deepseek-ai/cordis` ^4.0.1 (peer)
|
|
116
118
|
- `@deepseek-ai/dsh-session-persistence-jsonl` (optional, ships with DSH; falls back to the built-in path encoding when absent)
|
|
117
119
|
|
|
@@ -128,6 +130,8 @@ pnpm add @omdp/dsh-archived-sessions -w
|
|
|
128
130
|
|
|
129
131
|
### Changelog
|
|
130
132
|
|
|
133
|
+
- **0.3.4** (2026-09-15): **adapted to DSH 0.1.6-alpha.1** — since DSH 0.1.6 the web-app ships a native archived-sessions settings page (`@deepseek-ai/dsh-client-ui-settings-unarchive-sessions`) that registers the `settings.section` slot with id `archived-sessions` — exactly the id this plugin used → slot collision, and the whole Web UI boot failed with a "Failed to load plugins" screen (verified at runtime by bisecting plugin subsets: removing this plugin restores boot). Fix: this plugin's slot id is now the unique `omdp-archived-sessions` and its nav label is "归档会话管理", coexisting with the native entry (the native page only lists/restores; delete, tree-delete and orphan sweep remain this plugin's features). All other DSH surfaces used by the plugin (`sessionPersistence.list`/`workspaceRegistry`/`sessionQuery`/`shell.run`/`fs`/jsonl path encoding) verified byte- or removal-free against 0.1.6-alpha.1.
|
|
134
|
+
- **0.3.3** (2026-09-10): **fixes a 0.3.2 delete regression** — 0.3.2 derived the session root from `DSH_HOME` with a **mixed-separator** path (`C:\Users\xj\.dsh/sessions/...`), and the pre-delete guard `assertSessionDirName`'s basename extraction broke on mixed separators (it sliced by `/` then by `\`, producing a truncated fragment), so every delete was rejected with "拒绝删除非会话目录". Fixed: ① basename extraction now splits on either separator; ② roots are normalized to `/`. Delete and orphan sweep work again.
|
|
131
135
|
- **0.3.2** (2026-09-10): fixes two fork leftovers — ① the client half's module id was still `@muwinds/dsh-archived-sessions` (not renamed with the package), so the browser could not find the module and the settings page never rendered; ② the session root is now derived from the `DSH_HOME` environment variable (`<DSH_HOME>/sessions`, falling back to `~/.dsh/sessions`) instead of a hard-coded local path.
|
|
132
136
|
- **0.3.1** (2026-09-10): **fixes a 0.3.0 release accident** — the 0.3.0 tarball contained no `lib/` (the repo's `**/lib/` gitignore rule swallowed the source, so npm packed only 4 files); installing it broke the plugin load and could take DSH down. 0.3.1 restores `lib/index.js` + `lib/client.js` (tarball contents verified before publishing).
|
|
133
137
|
- **0.3.0** (2026-09-10): forked from 0.2.0; DSH 0.1.5-rc.1 support (snapshot list shape + self path resolution); tree delete; orphan sweep; deletion path safety check.
|
package/lib/client.js
CHANGED
|
@@ -570,7 +570,11 @@ window.__ModuleLoader__.load({
|
|
|
570
570
|
|
|
571
571
|
ctx.slots.inject("settings.section", function () {
|
|
572
572
|
return ctx.slots.register(
|
|
573
|
-
|
|
573
|
+
// id 必须全局唯一:DSH 0.1.6-alpha.1 起 web-app 自带原生客户端
|
|
574
|
+
// @deepseek-ai/dsh-client-ui-settings-unarchive-sessions,它在同一槽位注册
|
|
575
|
+
// id "archived-sessions"(order 25)。同名注册会撞 slot 冲突、整页 Web boot
|
|
576
|
+
// 报「Failed to load plugins」,故本插件用带前缀的 omdp- id 与原生项共存。
|
|
577
|
+
{ name: "settings.section", id: "omdp-archived-sessions", order: 30, label: function () { return "归档会话管理"; } },
|
|
574
578
|
function () { return react.createElement(ArchivedSessionsPage); }
|
|
575
579
|
);
|
|
576
580
|
});
|
package/lib/index.js
CHANGED
|
@@ -118,7 +118,8 @@ function dangerPolicy(ctx) {
|
|
|
118
118
|
*/
|
|
119
119
|
function assertSessionDirName(dirPath) {
|
|
120
120
|
const last = dirPath.replace(/[\\/]+$/, "");
|
|
121
|
-
const
|
|
121
|
+
const parts = last.split(/[\\/]/);
|
|
122
|
+
const name = parts[parts.length - 1];
|
|
122
123
|
const ok = /^session-[0-9a-fA-F-]{36}$/.test(name) || /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(name);
|
|
123
124
|
if (!ok) throw new Error("拒绝删除非会话目录: " + dirPath);
|
|
124
125
|
}
|
|
@@ -277,7 +278,7 @@ function candidateRoots() {
|
|
|
277
278
|
const out = [];
|
|
278
279
|
const push = (p) => {
|
|
279
280
|
if (typeof p !== "string" || p.length === 0) return;
|
|
280
|
-
const trimmed = p.replace(/[\\/]+$/, "");
|
|
281
|
+
const trimmed = p.replace(/[\\/]+$/, "").replace(/\\/g, "/");
|
|
281
282
|
if (trimmed.length > 0 && !out.includes(trimmed)) out.push(trimmed);
|
|
282
283
|
};
|
|
283
284
|
const home = env("DSH_HOME");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omdp/dsh-archived-sessions",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Archived-sessions manager for the DeepSeek Harness web UI: list / unarchive / delete / detail from Settings. · DSH 归档会话管理:设置页查看、释放、删除已归档会话(含按树删除子会话与孤儿清理)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|