前言¶
在 DeepSeek Harness(DSH)里,第三方插件通常以 bundle 形式挂在某个 Profile 的 package.json 上,版本分散、来源也可能是 npm、GitHub 或本地路径。手动逐个查 npm、再跑 dsh plugin 升级,步骤重复且容易漏。下面介绍的插件把「当前 Profile 里已安装的第三方 bundle 与 npm latest 对比」和「通过官方插件管理器就地更新」收进同一套 UI,并在有可用更新时用角标提醒。
这是什么¶
@moyumole/dsh-plugin-updates(仓库 Moyumole/dsh-plugin-updates)由维护者 Moyumole 发布,npm 包名为 @moyumole/dsh-plugin-updates,当前资料中的版本为 0.3.3。它在浏览器侧注册面板与角标,在 Host 侧只读汇总本机各 Profile 的第三方插件清单,并向 npm registry 查询是否有新版本;实际安装与卸载仍走 DSH 自带的 remote.pluginManager(removeBundle → installBundle(name@latest, { enabled })),不另起后台服务或定时任务。
社区目录 skillhub.cn 将其归类为联网工具(因需只读访问 npm);README 中同时标注插件类别为 UI & Experience(plugin management)。目录站点与 DeepSeek / 幻方无官方从属关系,仅作发现与链接用途。
核心功能¶
三个入口,同一面板¶
- 右侧边栏 →「Start / Guide」→「Plugin updates」卡片(有更新时显示红点)。
- 「Settings → Plugins」页上的 Plugin updates 标签(全局,无需打开 Session)。
- 左侧边栏 Plugins 图标角标(点击仍进入 Plugins 页)。
检查策略¶
- 页面加载时检查一次;页面可见时每 30 分钟 再查(页面隐藏时暂停计时,回到前台会补查),并支持手动刷新。
- Registry 响应缓存 10 分钟。
- 仅检查第三方 bundle:
official !== true、availability === 'profile'、installed === true,且排除本插件自身。 - 非 npm 来源(git、本地 path 等)的行会标记为不支持更新。
本机其他 Profile(只读)¶
面板会列出本机其他 DSH Profile 中的第三方插件及同样的更新状态,不会从这里修改那些 Profile;需要在对应 Profile 窗口操作,或使用 dsh plugin --profile <name> ...。
更新与批量更新¶
- 单行 Update 或 Update all;大体积包(解压后超过 30 MB,例如 README 提到的
dsh-pet约 71 MB)在「Update all」中会跳过并提示,需单独更新。 - 更新过程有阶段文案(removing / installing / applying / rollback)与进度条;顶部居中 toast 报告成功、失败、回滚或批量结果。
- 失败时会尽力恢复旧版本;若回滚也失败,会保留可关闭的错误提示并重新加载磁盘状态,使 UI 与 Profile 一致。
语言¶
界面语言随 DSH:Host locale 以 zh 开头时为中文,否则为英文;切换语言后面板文案、标签与「上次检查」时间格式会随之更新。
兼容性与限制¶
README 写明在 DSH 0.2.1-rc.3(Windows Desktop) 上验证;插件线为 0.3.x;示例 Profile 为 desktop 与 web(安装命令示例使用 --profile web,可按实际 Profile 名替换)。
| DSH 版本 | 状态 |
|---|---|
0.2.1-rc.3 |
已在 Windows 上验证 |
其他 0.2.x |
预期可用,未逐项验证 |
| 其他版本 | 不支持 |
插件依赖 Host 的非公开扩展点(右侧边栏 tab 注册、plugins.tab 槽位、sidebar.panellist 影子、remote.pluginManager 等),DSH 版本变更可能导致行为变化;设计上以 UI 降级为主而非崩溃。
安装与启用¶
推荐从 npm 安装(将 web 换成你的 Profile 名):
dsh plugin --profile web add "@moyumole/dsh-plugin-updates"
也可在「Settings → Plugins → Add plugin」中填写包名 @moyumole/dsh-plugin-updates。
固定 GitHub 版本安装:
dsh plugin --profile web add "github:Moyumole/dsh-plugin-updates#v0.3.3"
仓库根目录即插件目录,已提交 lib/client.js,安装无需本地 build。
本地开发目录:
dsh plugin --profile web add "<path>/dsh-plugin-updates"
会以 link: 依赖形式写入 Profile 的 bundle 列表。
安装前请自行查看仓库源码与 LICENSE;插件以当前 DSH 进程权限运行,更新操作会改动 Profile 的 package.json、pnpm-lock.yaml 与 node_modules,属于 npm 供应链行为,更新前应确认目标版本。
典型用法¶
从上述任一入口打开 Plugin updates 面板后,常见行状态如下(摘自 README):
| 状态 | 界面表现 |
|---|---|
| 有更新 | 显示当前版本 → 最新版本,Update 可用 |
| 已最新 | 「Up to date」,无按钮 |
| 不兼容 | 最新版的 engines.dsh / @deepseek-ai/dsh-* peer 与当前 DSH 不符,默认禁用更新按钮 |
| 检查失败 | 仅该行标记失败;网络失败时保留上次结果,可重试 |
| 非 npm 来源 | 「update not supported」 |
更新流程为官方管理器的 removeBundle(name) 再 installBundle(name@latest, { enabled });插件在移除与重装间隙会短暂不可用,浏览器侧代码通常在刷新或重启 DSH 后生效。
权限与联网¶
- DSH 权限:不申请额外 DSH 权限;Host 只读
<DSH_HOME>/profiles/*/package.json与各 Profilenode_modules中的版本,并通过本地 Web 服务器的只读路由/plugin-updates/profiles暴露 Profile 名与第三方包名/版本(不含路径、凭证或 Session 数据)。Host 不会写入 Profile 或自行安装/卸载。 - 外部服务:只读请求 npm(
registry.npmjs.org,失败时回退registry.npmmirror.com)的<name>/latest,仅发送已安装第三方 bundle 的包名。 - 本地写操作:仅通过官方插件管理器执行;本插件不直接跑 shell 或写文件。
- 遥测:无。
更完整威胁模型见仓库 SECURITY.md。
适用场景与注意¶
适合在本机维护多个 DSH Profile、并主要通过 npm 安装第三方插件的开发者:需要集中看到「谁落后 npm latest」、并希望从 UI 一键或批量升级当前 Profile 时使用。若插件来自 GitHub pin 或本地 link,面板仍会列出,但不会提供 npm 式更新。
务必注意:批量更新会跳过超大包;不兼容 DSH 的版本会被禁用按钮;更新前请核对版本与兼容性。社区目录星标等元数据以站点为准(资料中 GitHub 星标为 0),功能细节以 README 与发布包为准。
结尾¶
@moyumole/dsh-plugin-updates 把第三方插件的版本对照、角标提醒与就地更新收进 DSH 界面,检查依赖联网只读 npm,变更仍由官方插件管理器完成。进一步了解可访问社区目录页 https://www.skillhub.cn/plugins/Moyumole/dsh-plugin-updates 与 GitHub 仓库 https://github.com/Moyumole/dsh-plugin-updates。