@michengai/dsh-archive-manager 0.1.29 → 0.1.30
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 -2
- package/CHANGELOG.zh-CN.md +6 -2
- package/lib/client.js +2 -0
- package/lib/workspace.js +9 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
Published release notes are retained below; new versions are added without removing earlier entries.
|
|
6
6
|
|
|
7
|
+
## 0.1.30 — 2026-09-04
|
|
8
|
+
|
|
9
|
+
- Kept failed archived-session deletions retryable until their transcript artifact is removed.
|
|
10
|
+
- Restricted transcript cleanup to the backend-owned artifact path and refreshed client session lists after deletion.
|
|
11
|
+
|
|
7
12
|
## 0.1.29 — 2026-09-03
|
|
8
13
|
|
|
9
|
-
-
|
|
10
|
-
- Extended the approved minimum-release-age entries to include the exact RC packages, keeping clean installs reproducible under the existing supply-chain policy.
|
|
14
|
+
- Added compatibility with DeepSeek Harness `0.1.2-rc.1`.
|
|
11
15
|
|
|
12
16
|
## 0.1.28 — 2026-09-03
|
|
13
17
|
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
以下发布说明会持续保留;新增版本时不再删除较早记录。
|
|
6
6
|
|
|
7
|
+
## 0.1.30 — 2026-09-04
|
|
8
|
+
|
|
9
|
+
- 归档会话物理删除失败时保留可重试状态,直至转录工件删除成功。
|
|
10
|
+
- 转录清理限制为后端拥有的工件路径,并在删除后刷新客户端会话列表。
|
|
11
|
+
|
|
7
12
|
## 0.1.29 — 2026-09-03
|
|
8
13
|
|
|
9
|
-
-
|
|
10
|
-
- 将供应链最小发布时间策略的已批准条目扩展至对应 RC 精确版本,保证干净环境可复现安装。
|
|
14
|
+
- 支持 DeepSeek Harness `0.1.2-rc.1`。
|
|
11
15
|
|
|
12
16
|
## 0.1.28 — 2026-09-03
|
|
13
17
|
|
package/lib/client.js
CHANGED
|
@@ -3626,6 +3626,7 @@
|
|
|
3626
3626
|
if (registry === void 0) throw new Error("archive-manager remote service is unavailable");
|
|
3627
3627
|
const result = await registry.deleteSession(sessionId);
|
|
3628
3628
|
if (!result.ok) throw new Error(result.error.message);
|
|
3629
|
+
await refreshSessionList();
|
|
3629
3630
|
};
|
|
3630
3631
|
const unarchiveSessions = async (target) => {
|
|
3631
3632
|
const registry = ctx.get("remote.workspaceRegistry");
|
|
@@ -3640,6 +3641,7 @@
|
|
|
3640
3641
|
if (registry === void 0) throw new Error("archive-manager remote service is unavailable");
|
|
3641
3642
|
const result = await registry.deleteArchivedSessions(target);
|
|
3642
3643
|
if (!result.ok) throw new Error(result.error.message);
|
|
3644
|
+
await refreshSessionList();
|
|
3643
3645
|
return result.value;
|
|
3644
3646
|
};
|
|
3645
3647
|
const archivedSessionMetadata = async () => {
|
package/lib/workspace.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { rm } from "node:fs/promises";
|
|
2
|
-
import { dirname } from "node:path";
|
|
3
2
|
import {
|
|
4
3
|
WorkspaceRegistry
|
|
5
4
|
} from "@deepseek-ai/dsh-workspace";
|
|
@@ -484,6 +483,10 @@ var ArchiveWorkspaceRegistry = class extends WorkspaceRegistry {
|
|
|
484
483
|
} else if (sessions !== void 0) await this.publishColdSessionRemoval(sessionId, sessions);
|
|
485
484
|
const projCache = this.ctx.get("sessionProjectionCache");
|
|
486
485
|
await projCache?.whenIdle?.();
|
|
486
|
+
if (projCache !== void 0) await projCache.delete(sessionId);
|
|
487
|
+
await this.deleteDescendants(sessionId);
|
|
488
|
+
await this.cleanSpill(sessionId);
|
|
489
|
+
await this.removeTranscriptDirectory(sessionId);
|
|
487
490
|
const state = this.requireState();
|
|
488
491
|
if (state.archivedSessionIds.includes(sessionId)) {
|
|
489
492
|
await this.setState({
|
|
@@ -492,10 +495,6 @@ var ArchiveWorkspaceRegistry = class extends WorkspaceRegistry {
|
|
|
492
495
|
});
|
|
493
496
|
}
|
|
494
497
|
await this.removeFromWorkspaceAccounts(sessionId);
|
|
495
|
-
if (projCache !== void 0) await projCache.delete(sessionId);
|
|
496
|
-
await this.deleteDescendants(sessionId);
|
|
497
|
-
await this.cleanSpill(sessionId);
|
|
498
|
-
await this.removeTranscriptDirectory(sessionId);
|
|
499
498
|
this.forgetIndexedSession(sessionId);
|
|
500
499
|
if (deletedHeader !== void 0) this.deletedIdentities.set(sessionId, headerIdentity(deletedHeader));
|
|
501
500
|
return { deleted: true };
|
|
@@ -578,22 +577,21 @@ var ArchiveWorkspaceRegistry = class extends WorkspaceRegistry {
|
|
|
578
577
|
this.ctx.logger.warn(`archive-manager: could not publish removal for stored session "${sessionId}": ${String(error)}`);
|
|
579
578
|
}
|
|
580
579
|
}
|
|
581
|
-
/**
|
|
580
|
+
/** 删除后端定位到的会话转录工件,绝不推导或删除其父目录。 */
|
|
582
581
|
async removeTranscriptDirectory(sessionId) {
|
|
583
582
|
const persistence = this.ctx.get("sessionPersistence");
|
|
584
583
|
if (persistence === void 0 || typeof persistence.locate !== "function") {
|
|
585
|
-
throw new Error(`cannot delete session "${sessionId}": the session persistence backend does not expose locate() to resolve its transcript
|
|
584
|
+
throw new Error(`cannot delete session "${sessionId}": the session persistence backend does not expose locate() to resolve its transcript artifact`);
|
|
586
585
|
}
|
|
587
586
|
const header = await this.readSessionHeader(sessionId);
|
|
588
587
|
const location = persistence.locate(header);
|
|
589
588
|
if (location === void 0 || typeof location.path !== "string") {
|
|
590
|
-
throw new Error(`cannot delete session "${sessionId}": the session persistence backend could not resolve its transcript
|
|
589
|
+
throw new Error(`cannot delete session "${sessionId}": the session persistence backend could not resolve its transcript artifact`);
|
|
591
590
|
}
|
|
592
|
-
const transcriptDir = dirname(location.path);
|
|
593
591
|
try {
|
|
594
|
-
await rm(
|
|
592
|
+
await rm(location.path, { recursive: true, force: true });
|
|
595
593
|
} catch (error) {
|
|
596
|
-
const message = `cannot delete session "${sessionId}": transcript
|
|
594
|
+
const message = `cannot delete session "${sessionId}": transcript artifact "${location.path}" remains before bookkeeping cleanup`;
|
|
597
595
|
const detail = `${message}: ${String(error)}`;
|
|
598
596
|
this.ctx.logger.warn(`archive-manager: ${detail}`);
|
|
599
597
|
throw new Error(detail, { cause: error });
|