@michengai/dsh-archive-manager 1.0.9 → 1.0.10

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,10 @@
4
4
 
5
5
  Published release notes are retained below; new versions are added without removing earlier entries.
6
6
 
7
+ ## 1.0.10 - 2026-09-30
8
+
9
+ - Official desktop can hot-reload this plugin without leaving sessionController unavailable. Web behavior is unchanged.
10
+
7
11
  ## 1.0.9 - 2026-09-30
8
12
 
9
13
  - The copied sidebar row styles no longer cover the official workspace-tree indent. Current DSH keeps the official sidebar styles. Older hosts that still replace the sidebar use a private class prefix.
@@ -4,6 +4,10 @@
4
4
 
5
5
  以下发布说明会持续保留;新增版本时不再删除较早记录。
6
6
 
7
+ ## 1.0.10 - 2026-09-30
8
+
9
+ - 官方桌面端热重载本插件后,sessionController 不再停在不可用。Web 行为不变。
10
+
7
11
  ## 1.0.9 - 2026-09-30
8
12
 
9
13
  - 插件复制的侧栏行样式不再盖住官方「按工作区树」缩进。当前 DSH 继续使用官方侧栏样式;仍整份替换侧栏的旧宿主改用插件自己的类名前缀。
package/lib/workspace.js CHANGED
@@ -273,6 +273,24 @@ function hostEvent(ctx, name) {
273
273
  const caller = ctx[name];
274
274
  return typeof caller === "function" ? caller : void 0;
275
275
  }
276
+ const fileUploadResolverRestart = Symbol.for("dsh-archive-manager.file-upload-resolver-restart");
277
+ const staleFileUploadResolver = "file-upload: Agent resolver is already registered";
278
+ function tolerateStaleFileUploadResolver(ctx) {
279
+ const uploads = ctx.get?.("fileUploads");
280
+ const original = uploads?.registerAgentResolver;
281
+ if (uploads === void 0 || typeof original !== "function" || original[fileUploadResolverRestart] === true) return;
282
+ const registerAgentResolver = function(resolve2) {
283
+ try {
284
+ return original.call(this, resolve2);
285
+ } catch (error) {
286
+ if (!(error instanceof Error) || error.message !== staleFileUploadResolver || !Object.hasOwn(this, "agentResolver")) throw error;
287
+ this.agentResolver = void 0;
288
+ return original.call(this, resolve2);
289
+ }
290
+ };
291
+ registerAgentResolver[fileUploadResolverRestart] = true;
292
+ uploads.registerAgentResolver = registerAgentResolver;
293
+ }
276
294
  var ArchiveWorkspaceRegistry = class extends WorkspaceRegistry {
277
295
  static inject = [
278
296
  "storageDomain",
@@ -292,6 +310,7 @@ var ArchiveWorkspaceRegistry = class extends WorkspaceRegistry {
292
310
  archivedSessionPathIndexKey;
293
311
  constructor(ctx) {
294
312
  super(ctx);
313
+ tolerateStaleFileUploadResolver(ctx);
295
314
  const indexedPath = this.host.sessionPath;
296
315
  this.host.sessionPath = (id) => {
297
316
  const path = indexedPath(id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-archive-manager",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "NPM-installable DSH Web plugin for managing archived sessions.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.22.0",