@michengai/dsh-archive-manager 1.4.0 → 1.4.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 +6 -0
- package/CHANGELOG.zh-CN.md +6 -0
- package/README.de.md +1 -1
- package/README.en.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.ja.md +1 -1
- package/README.md +1 -1
- package/README.pt.md +1 -1
- package/README.ru.md +1 -1
- package/README.zh-CN.md +1 -1
- package/lib/session-move.js +7 -56
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.4.1] - 2026-11-20
|
|
4
|
+
|
|
5
|
+
### Bug Fixes & Improvements
|
|
6
|
+
|
|
7
|
+
- **Safe Handling for Active Session Moves Across Workspaces**: Fixed an issue where moving an actively opened or running session across workspaces could lead to unstable sidebar states or failures when creating new sessions (#122). The plugin now safely guides users to close the active session first before performing cross-workspace moves, keeping ongoing sessions stable and preventing unexpected desktop errors.
|
|
8
|
+
|
|
3
9
|
## [1.4.0] - 2026-11-19
|
|
4
10
|
|
|
5
11
|
### Enhancements & Resilience
|
package/CHANGELOG.zh-CN.md
CHANGED
package/README.de.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> DSH Archive Manager ist ein von der Community gepflegtes Plugin für DeepSeek Harness (DSH) und kein offizielles Produkt von DeepSeek AI.
|
|
23
23
|
|
|
24
|
-
Dieses Dokument beschreibt Version **1.4.
|
|
24
|
+
Dieses Dokument beschreibt Version **1.4.1**. Frühere Änderungen finden Sie im [Changelog](CHANGELOG.md).
|
|
25
25
|
|
|
26
26
|
## Funktionsübersicht
|
|
27
27
|
|
package/README.en.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> DSH Archive Manager is a community-maintained DeepSeek Harness (DSH) plugin, not an official DeepSeek AI product.
|
|
23
23
|
|
|
24
|
-
This document describes **1.4.
|
|
24
|
+
This document describes **1.4.1**. See [Changelog](CHANGELOG.md) for published releases.
|
|
25
25
|
|
|
26
26
|
## Overview
|
|
27
27
|
|
package/README.es.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> DSH Archive Manager es un complemento mantenido por la comunidad para DeepSeek Harness (DSH), no un producto oficial de DeepSeek AI.
|
|
23
23
|
|
|
24
|
-
Este documento corresponde a la versión **1.4.
|
|
24
|
+
Este documento corresponde a la versión **1.4.1**. Consulte el [historial de cambios](CHANGELOG.md) para versiones publicadas.
|
|
25
25
|
|
|
26
26
|
## Resumen de características
|
|
27
27
|
|
package/README.fr.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> DSH Archive Manager est un plugin maintenu par la communauté pour DeepSeek Harness (DSH), et n'est pas un produit officiel de DeepSeek AI.
|
|
23
23
|
|
|
24
|
-
Ce document décrit la version **1.4.
|
|
24
|
+
Ce document décrit la version **1.4.1**. Consultez le [journal des modifications](CHANGELOG.md) pour les versions publiées.
|
|
25
25
|
|
|
26
26
|
## Vue d'ensemble
|
|
27
27
|
|
package/README.ja.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> DSH Archive Manager はコミュニティによって保守されている DeepSeek Harness(DSH)向けプラグインであり、DeepSeek AI 公式の製品ではありません。
|
|
23
23
|
|
|
24
|
-
本文書は **1.4.
|
|
24
|
+
本文書は **1.4.1** を対象としています。過去の変更履歴は [CHANGELOG.md](CHANGELOG.md) をご覧ください。
|
|
25
25
|
|
|
26
26
|
## 機能概要
|
|
27
27
|
|
package/README.md
CHANGED
package/README.pt.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> DSH Archive Manager é um plugin mantido pela comunidade para o DeepSeek Harness (DSH), não sendo um produto oficial da DeepSeek AI.
|
|
23
23
|
|
|
24
|
-
Este documento refere-se à versão **1.4.
|
|
24
|
+
Este documento refere-se à versão **1.4.1**. Consulte o [registro de alterações](CHANGELOG.md) para versões publicadas.
|
|
25
25
|
|
|
26
26
|
## Visão geral
|
|
27
27
|
|
package/README.ru.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
> DSH Archive Manager — это поддерживаемый сообществом плагин для DeepSeek Harness (DSH), а не официальный продукт DeepSeek AI.
|
|
23
23
|
|
|
24
|
-
Этот документ описывает выпуск **1.4.
|
|
24
|
+
Этот документ описывает выпуск **1.4.1**. Историю изменений смотрите в [CHANGELOG.md](CHANGELOG.md).
|
|
25
25
|
|
|
26
26
|
## Что умеет плагин
|
|
27
27
|
|
package/README.zh-CN.md
CHANGED
package/lib/session-move.js
CHANGED
|
@@ -111,40 +111,6 @@ async function moveSessionToWorkspace(ctx, sessionId, targetWorkspaceId) {
|
|
|
111
111
|
if (isExecuting) {
|
|
112
112
|
throw new Error("\u8BE5\u4F1A\u8BDD\u6B63\u5904\u4E8E\u6267\u884C\u6216\u8FD0\u884C\u72B6\u6001\uFF0C\u8BF7\u7B49\u5F85\u5B8C\u6210\u540E\u518D\u79FB\u52A8\u3002");
|
|
113
113
|
}
|
|
114
|
-
let originalEntry;
|
|
115
|
-
if (liveSession !== void 0) {
|
|
116
|
-
if (typeof agent?.cancel === "function") {
|
|
117
|
-
try {
|
|
118
|
-
agent.cancel({ kind: "disposed" });
|
|
119
|
-
await agent.whenIdle?.();
|
|
120
|
-
} catch {
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
if (typeof ctx.sessions?.flush === "function") {
|
|
124
|
-
try {
|
|
125
|
-
await ctx.sessions.flush(liveSession);
|
|
126
|
-
} catch {
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
try {
|
|
130
|
-
await agent?.scope?.dispose?.();
|
|
131
|
-
ctx.agents?.store?.delete(cleanSessionId);
|
|
132
|
-
} catch {
|
|
133
|
-
}
|
|
134
|
-
originalEntry = ctx.sessions?.store?.get?.(cleanSessionId) ?? (typeof ctx.sessions?.liveEntryFor === "function" ? (() => {
|
|
135
|
-
try {
|
|
136
|
-
return ctx.sessions.liveEntryFor(liveSession);
|
|
137
|
-
} catch {
|
|
138
|
-
return void 0;
|
|
139
|
-
}
|
|
140
|
-
})() : void 0);
|
|
141
|
-
if (typeof originalEntry?.detach === "function") {
|
|
142
|
-
try {
|
|
143
|
-
originalEntry.detach();
|
|
144
|
-
} catch {
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
114
|
const persistence = ctx.sessionPersistence;
|
|
149
115
|
let header;
|
|
150
116
|
if (typeof registry.readSessionHeader === "function") {
|
|
@@ -254,6 +220,12 @@ async function moveSessionToWorkspace(ctx, sessionId, targetWorkspaceId) {
|
|
|
254
220
|
toWorkspacePath: targetPath
|
|
255
221
|
};
|
|
256
222
|
}
|
|
223
|
+
const requireReleasedSession = () => {
|
|
224
|
+
if (ctx.sessions?.get?.(cleanSessionId) || ctx.agents?.get?.(cleanSessionId)) {
|
|
225
|
+
throw new Error("\u8BE5\u4F1A\u8BDD\u4ECD\u88AB\u5BBF\u4E3B\u6301\u6709\uFF0C\u65E0\u6CD5\u8DE8\u76EE\u5F55\u79FB\u52A8\u3002\u8BF7\u5148\u5173\u95ED\u8BE5\u4F1A\u8BDD\u518D\u91CD\u8BD5\u3002");
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
requireReleasedSession();
|
|
257
229
|
if (!persistence || typeof persistence.locate !== "function") {
|
|
258
230
|
throw new Error("\u5F53\u524D\u6301\u4E45\u5316\u540E\u7AEF\u4E0D\u652F\u6301\u7269\u7406\u5B9A\u4F4D\uFF0C\u65E0\u6CD5\u8DE8\u5DE5\u4F5C\u533A\u79FB\u52A8\u4F1A\u8BDD\u3002");
|
|
259
231
|
}
|
|
@@ -290,6 +262,7 @@ async function moveSessionToWorkspace(ctx, sessionId, targetWorkspaceId) {
|
|
|
290
262
|
throw new Error("\u8FC1\u79FB\u524D\u6821\u9A8C\u5931\u8D25\uFF1A\u6570\u636E\u6539\u5199\u9A8C\u8BC1\u672A\u901A\u8FC7\u3002");
|
|
291
263
|
}
|
|
292
264
|
}
|
|
265
|
+
requireReleasedSession();
|
|
293
266
|
const targetHadSession = rawWorkspaceSessionIds(targetWorkspace).includes(cleanSessionId);
|
|
294
267
|
const previousPath = registry.sessionPaths?.get(cleanSessionId);
|
|
295
268
|
const previousInvalidPath = getInvalidSessionState(registry.invalidSessionPaths, cleanSessionId);
|
|
@@ -312,17 +285,6 @@ async function moveSessionToWorkspace(ctx, sessionId, targetWorkspaceId) {
|
|
|
312
285
|
registry.sessionPaths?.set(cleanSessionId, targetPath);
|
|
313
286
|
registry.headers?.set(cleanSessionId, targetHeader);
|
|
314
287
|
registry.invalidSessionPaths?.delete(cleanSessionId);
|
|
315
|
-
if (liveSession !== void 0) {
|
|
316
|
-
try {
|
|
317
|
-
if ("header" in liveSession && liveSession.header) {
|
|
318
|
-
liveSession.header.cwd = targetPath;
|
|
319
|
-
}
|
|
320
|
-
if ("cwd" in liveSession) {
|
|
321
|
-
liveSession.cwd = targetPath;
|
|
322
|
-
}
|
|
323
|
-
} catch {
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
288
|
await targetWorkspace.attachSession(cleanSessionId);
|
|
327
289
|
if (!rawWorkspaceSessionIds(targetWorkspace).includes(cleanSessionId)) {
|
|
328
290
|
throw new Error("\u76EE\u6807\u5DE5\u4F5C\u533A\u672A\u4FDD\u7559\u4F1A\u8BDD\u5173\u8054\uFF0C\u5DF2\u53D6\u6D88\u79FB\u52A8\u3002");
|
|
@@ -377,17 +339,6 @@ async function moveSessionToWorkspace(ctx, sessionId, targetWorkspaceId) {
|
|
|
377
339
|
restoreInvalidSessionState(registry.invalidSessionPaths, cleanSessionId, previousInvalidPath);
|
|
378
340
|
if (!wasMissing) registry.missingSessionPaths?.delete(cleanSessionId);
|
|
379
341
|
else registry.missingSessionPaths?.add(cleanSessionId);
|
|
380
|
-
if (liveSession !== void 0 && header) {
|
|
381
|
-
try {
|
|
382
|
-
if ("header" in liveSession && liveSession.header) {
|
|
383
|
-
liveSession.header.cwd = header.cwd;
|
|
384
|
-
}
|
|
385
|
-
if ("cwd" in liveSession && header.cwd) {
|
|
386
|
-
liveSession.cwd = header.cwd;
|
|
387
|
-
}
|
|
388
|
-
} catch {
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
342
|
for (const ws of attemptedSources) {
|
|
392
343
|
if (rawWorkspaceSessionIds(ws).includes(cleanSessionId)) continue;
|
|
393
344
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-archive-manager",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "归档、恢复、收藏和永久删除会话,并诊断损坏的会话日志。 · Archive, restore, favorite, and permanently delete sessions, and diagnose damaged session logs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.22.0",
|