Skip to main content
Y

dsh-plugins-reload

yuwang/dsh-plugins-reload

One-click plugin reload: a Plugin reload tab in the Plugins page, plus a reload_plugins tool the model can call, re-applies changed plugin code and settings without restarting dsh, so running sessions and jobs keep going. Only the plugins whose files really changed restart, code mounted inside an agent preset is swapped too and open sessions follow the new revision, and the report lists the elapsed time, the plugins it reloaded and any change a reload could not apply.

Install

dsh plugin --profile web add github:yuwang/dsh-plugins-reload

README

dsh-plugins-reload

主页:https://github.com/yuwang/dsh-plugins-reload

npm version downloads GitHub issues license

One-click reload for DeepSeek Harness plugins. Changed plugin code and configuration take effect without restarting the app or interrupting tasks that are still running.

改完插件代码,点一下就能生效:不重启 DSH,也不打断你正在运行的任务。

如果它帮到你,欢迎到 GitHub 点个 Star、到 Issues 提问题,也欢迎直接提交 PR。


它提供什么

一个插件,两个入口:

入口作用
插件页标签「插件重载」一个「立即重载」按钮,点完就地显示这次重载做了什么。
工具 reload_plugins会话里让 agent 调用,效果相同;适合把重载写进脚本或流程。

重载本身做这几件事:

  • 重新读一遍磁盘上的插件代码和插件配置,只重启文件真的改过的插件——其它正在跑的任务照常继续。
  • 插件的界面部分随文件更新自行重新加载,不需要额外操作。
  • 挂在 agent preset 里的插件代码同样能换掉:打开着的会话会跟到新版本上,而不是把重载卡住。
  • 报告里给出耗时、被重载的插件、DSH 的警告原文,以及是否还有东西需要重启。
  • 只接受本机发起的请求。

安装

从 npm 装(推荐,预构建,装得快):

dsh plugin add dsh-plugins-reload

从 GitHub 装(拿到的是仓库最新代码):

dsh plugin add git+https://github.com/yuwang/dsh-plugins-reload

也可以在 DSH 的 Plugins 页面里装:

  • 插件 → 发现 → 搜索 dsh-plugins-reload → 安装
  • 插件 → 添加插件 → 输入准确包名 dsh-plugins-reload → 安装

命令行 / agent 也可以直接:

install_bundle  dsh-plugins-reload@latest

本地开发时用目录安装:

dsh plugin --profile desktop add /path/to/dsh-plugins-reload

或 插件 → 添加插件 → 选择插件目录。本地目录方式读的是磁盘文件,改完直接点一次「立即重载」就生效——这正是它自己干的事。

需要 DSH 开启运行中替换,出厂配置默认开启。

用起来是什么样

点 插件 → 插件重载 → 立即重载。按钮下方会列出这次发生了什么:

报告项含义
耗时这次重载花了多久
已重载真正被重启的插件
警告DSH 原样给出的提示,不做改写
需要重启只有在有组件没就绪时才会出现

没点过之前这块是空的,只有一句「还没有重载记录,结果会显示在这里」。

已知边界

  • 插件加载失败时,报告里会给出报错,这个插件停止运行,旧代码不会自动恢复。修好文件再点一次即可。
  • 结构性变化(包在磁盘上被移动或替换)仍然需要重启 DSH,报告会直接写出来,不做隐瞒。
  • 有组件未就绪时,会出现「有组件未就绪,需要重启 DSH」这一行;这是按 Loader 的实际状态判断的,不是猜的。
  • 一个会话正跑在某个 preset 上时,重载会把它的代码换掉;如果那一步失败,报告里会点名是哪个会话没跟上。

更新日志

见 CHANGELOG.md。

许可证

MIT,见 LICENSE。

Related plugins