概览
dsh-bundle-manager
源码级技术说明DSH web plugin: runtime mount manager for optional third-party plugin bundles — mount/unmount bundle rows in-process through the Loader API (instant, no restart, never touches the profile manifest), with named presets and self-healing failure fallback. v0.5 adds official coexistence (import/export between the official static layer and the bm runtime layer, reversible) and the uninstall half (bm de-registry → official remove + reactive GC). (renamed from dsh-plugin-manager)收起技术说明
README / ZH
插件文档
目录摘要
dsh.pub 核对固定版本的组合包契约、运行时事实与分发语义;完整 README 请查看源仓库。
在 GitHub 阅读完整 READMELIMITATIONS
已知限制
1. **「保存并刷新」的硬刷新是唯一的 client 同步手段**:dsh 客户端 `loader.unload` 是 stub、共享 HMR 关闭,所以本插件用「应用 + 刷新页面」统一装载与取消装载,而不是运行时卸载 client 模块。 2. **带精确路由的 host 插件,卸载后立即重挂可能报「duplicate exact route」**(如 `dsh-wechat-bridge` 用 `disposers.push(webServer.register({kind:'exact'}))` 注册路由,卸载时路由未即时释放)。会进 Failed 组、其余照常,重启可恢复;走 `ctx.effect(() => webServer.register(...))` 的插件无此问题。预设切换已用「diff」避免对共有插件做无谓 remove+recreate。 3. **环境变量**:`DSH_PROFILE`(读 profile 目录用,桌面壳 main.js 注入,缺失从包路径推导再回退 `'web'`);`DSH_BUNDLE_MANAGER_HOME`(v0.3,桌面壳注入,挂载表落壳仓库、零写 `.dsh`;缺失/非法回退 generic 双写)。 4. **config 编辑未实现**:挂载表里的 `config` 预留(默认 `null`)。带 config 的插件后续 UI 再补。 5. **写盘失败会明示**(v0.3):registry 写失败时,操作响应返回 `storage-error`、设置页顶部出现黄色警示条(「本次更改重启后可能失效」);挂载本身在内存已生效。 6. **兼容性**:开发/实测基准为 deepseek-harness **0.1.0-rc.5**(`@deepseek-ai/cordis` 4.x rc、`dsh-host-webserver`/`dsh-client-runtime`/`dsh-client-ui-slots` 0.1.x rc)。**rc.6 实测通过(2026-08-17)**:rc5 与 rc6 源码同 commit(`47f9438`,仅 npm bump),rc6 内核下运行时挂载/卸载、framework 白名单、坏插件隔离(Failed 组 + kind/attempts)、预设切换、registry 落盘、client 半全部通过,**零代码适配**。已知差异:`link:` 挂载因 ESM 解析失败,须用 `file:` tgz;dsh-bundle-manager 用自有 fenced 路由,不依赖 rc5 的 `WEB_SETTINGS_NAMESPACES` 本地补丁。**rc.7(2026-08-19)**:bm 消费的唯一 kit 表面 `settings.section` 未变;kit 钉 npm 发行版 `dsh-settings-ui@0.2.22`(bm **不依赖** kit 0.3.0 的 `pluginCard`/`settingsScope` 新表面,与之解耦并行);v0.5 双轨 import/export 与官方静态层共存。壳验证走 `rc7-bm` 测试 profile(runbook 由主控串行执行)。升级 dsh 版本后请重跑 `npm test` 与 dev 壳两阶验证。
