AI Agent Hub
Back to plugins
⚙️

dsh-plugin-reloader

Workflow Updated 2026.08.15

Run the following command in DeepSeek Harness:

dsh plugin install deepforce/dsh-plugin-reloader

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install deepforce/dsh-plugin-reloader in your terminal to install; source code at https://github.com/deepforce/dsh-plugin-reloader

About this plugin

Upgrading a plugin used to mean killing a running dsh web, losing every active session, and starting from scratch. dsh-plugin-reloader removes that friction. It reuses the exact reload pipeline dsh built-in HMR uses for user code — clear module caches, re-import the plugin entry, dispose old fibers, mount fresh ones, roll back on failure — minus the node_modules exclusion that kept built-in HMR away from installed plugins. The result: new code takes effect in place, sessions stay alive.

The core loop is safe, in-place hot-reload. A lightweight poll (stat mtime + size) checks plugin entry files and package.json every two seconds by default. Polling instead of a file-watcher library sidesteps two real-world pitfalls: chokidar never reaching ready inside a long-lived dsh web process on Windows, and pnpm replacing entire directories so a watcher loses track. For manual control, /reload targets a specific plugin or lists all loaded ones with their reloadability status, and /watch-status exposes live diagnostics — watched scopes, event counts, last observed change, reload and skip tallies, startup errors — so you can confirm an auto-reload actually fired after an upgrade. When a change touches the dependency or peerDependency tree, the process exits with a configurable code (default 42) so an external supervisor can relaunch it cleanly.

Two safety guards keep the system honest by default. Official @deepseek-ai plugins are excluded from hot-reload because patching them mid-session is equivalent to mutating dsh itself. Plugins that provide services other plugins inject are also excluded, since reloading a provider would cascade restarts through every dependent. Both categories can be opted back in via allowOfficial and allowServiceProviders if you understand the risk. And if a re-import or mount fails, module caches and the previous plugin are restored; the session simply keeps running.

This is built for developers who run dsh web as a long-lived server and iterate on custom or vendored plugins frequently. If your loop is edit → restart → re-authenticate → re-paste context, this plugin collapses the middle steps into a two-second wait.

Use Cases

  • Upgrade a plugin without restarting dsh web or losing sessions
  • Iterate on custom plugin code with a two-second hot-reload cycle
  • Safely exit on dependency changes and let a supervisor relaunch

Best For

  • Developers running long-lived dsh web sessions
  • Engineers iterating on custom or vendored plugins
  • Ops engineers managing dsh processes via supervisors