@michengai/dsh-archive-manager 0.1.28 → 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 CHANGED
@@ -4,6 +4,15 @@
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
+
12
+ ## 0.1.29 — 2026-09-03
13
+
14
+ - Added compatibility with DeepSeek Harness `0.1.2-rc.1`.
15
+
7
16
  ## 0.1.28 — 2026-09-03
8
17
 
9
18
  - Enforced LF for JavaScript source, build scripts, and generated `lib` output, fixing Windows CI incorrectly reporting esbuild output as out of sync after a build.
@@ -4,6 +4,15 @@
4
4
 
5
5
  以下发布说明会持续保留;新增版本时不再删除较早记录。
6
6
 
7
+ ## 0.1.30 — 2026-09-04
8
+
9
+ - 归档会话物理删除失败时保留可重试状态,直至转录工件删除成功。
10
+ - 转录清理限制为后端拥有的工件路径,并在删除后刷新客户端会话列表。
11
+
12
+ ## 0.1.29 — 2026-09-03
13
+
14
+ - 支持 DeepSeek Harness `0.1.2-rc.1`。
15
+
7
16
  ## 0.1.28 — 2026-09-03
8
17
 
9
18
  - 固定 JavaScript 源码、构建脚本和 `lib` 产物使用 LF,修复 Windows CI 在 esbuild 构建后将生成物误判为未同步的问题。
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 directory`);
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 directory`);
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(transcriptDir, { recursive: true, force: true });
592
+ await rm(location.path, { recursive: true, force: true });
595
593
  } catch (error) {
596
- const message = `cannot delete session "${sessionId}": transcript directory "${transcriptDir}" remains after bookkeeping cleanup`;
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 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-archive-manager",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "NPM-installable DSH Web plugin for managing archived sessions.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.21.0",
@@ -61,28 +61,28 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@deepseek-ai/cordis": "4.0.2",
64
- "@deepseek-ai/dsh-api-gateway": "0.1.2-alpha.5",
65
- "@deepseek-ai/dsh-client-connection": "0.1.2-alpha.5",
66
- "@deepseek-ai/dsh-client-locale": "0.1.2-alpha.5",
67
- "@deepseek-ai/dsh-client-store": "0.1.2-alpha.5",
68
- "@deepseek-ai/dsh-client-ui-conversation": "0.1.2-alpha.5",
69
- "@deepseek-ai/dsh-client-ui-primitives": "0.1.2-alpha.5",
70
- "@deepseek-ai/dsh-client-ui-sidebar": "0.1.2-alpha.5",
71
- "@deepseek-ai/dsh-client-ui-slots": "0.1.2-alpha.5",
72
- "@deepseek-ai/dsh-client-ui-workspace": "0.1.2-alpha.5",
73
- "@deepseek-ai/dsh-invariants": "0.1.2-alpha.5",
74
- "@deepseek-ai/dsh-scope": "0.1.2-alpha.5",
75
- "@deepseek-ai/dsh-session": "0.1.2-alpha.5",
76
- "@deepseek-ai/dsh-session-persistence": "0.1.2-alpha.5",
77
- "@deepseek-ai/dsh-session-projection": "0.1.2-alpha.5",
78
- "@deepseek-ai/dsh-session-projection-cache": "0.1.2-alpha.5",
79
- "@deepseek-ai/dsh-spill": "0.1.2-alpha.5",
80
- "@deepseek-ai/dsh-spill-local": "0.1.2-alpha.5",
81
- "@deepseek-ai/dsh-storage": "0.1.2-alpha.5",
82
- "@deepseek-ai/dsh-storage-domain": "0.1.2-alpha.5",
83
- "@deepseek-ai/dsh-typert-protocol": "0.1.2-alpha.5",
84
- "@deepseek-ai/dsh-typert-registry": "0.1.2-alpha.5",
85
- "@deepseek-ai/dsh-workspace": "0.1.2-alpha.5",
64
+ "@deepseek-ai/dsh-api-gateway": "0.1.2-rc.1",
65
+ "@deepseek-ai/dsh-client-connection": "0.1.2-rc.1",
66
+ "@deepseek-ai/dsh-client-locale": "0.1.2-rc.1",
67
+ "@deepseek-ai/dsh-client-store": "0.1.2-rc.1",
68
+ "@deepseek-ai/dsh-client-ui-conversation": "0.1.2-rc.1",
69
+ "@deepseek-ai/dsh-client-ui-primitives": "0.1.2-rc.1",
70
+ "@deepseek-ai/dsh-client-ui-sidebar": "0.1.2-rc.1",
71
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.2-rc.1",
72
+ "@deepseek-ai/dsh-client-ui-workspace": "0.1.2-rc.1",
73
+ "@deepseek-ai/dsh-invariants": "0.1.2-rc.1",
74
+ "@deepseek-ai/dsh-scope": "0.1.2-rc.1",
75
+ "@deepseek-ai/dsh-session": "0.1.2-rc.1",
76
+ "@deepseek-ai/dsh-session-persistence": "0.1.2-rc.1",
77
+ "@deepseek-ai/dsh-session-projection": "0.1.2-rc.1",
78
+ "@deepseek-ai/dsh-session-projection-cache": "0.1.2-rc.1",
79
+ "@deepseek-ai/dsh-spill": "0.1.2-rc.1",
80
+ "@deepseek-ai/dsh-spill-local": "0.1.2-rc.1",
81
+ "@deepseek-ai/dsh-storage": "0.1.2-rc.1",
82
+ "@deepseek-ai/dsh-storage-domain": "0.1.2-rc.1",
83
+ "@deepseek-ai/dsh-typert-protocol": "0.1.2-rc.1",
84
+ "@deepseek-ai/dsh-typert-registry": "0.1.2-rc.1",
85
+ "@deepseek-ai/dsh-workspace": "0.1.2-rc.1",
86
86
  "react": "18.3.1",
87
87
  "react-dom": "18.3.1",
88
88
  "esbuild": "0.25.0"