Introduction

The extensibility of DSH relies mainly on plugins. For developers who frequently modify plugins, upgrade plugin packages, or debug plugin behavior, restarting dsh web every time is cumbersome. dsh-plugin-reloader addresses this issue with hot reload: changes to the code of installed plugins can be remounted in the current process; if the changes involve the dependency tree, the process exits and is handed over to an external supervisor for restart.

The community directory mentioned here is an independent site, not equivalent to the official app stores of DeepSeek or Hypersphere.

What is it

dsh-plugin-reloader is a DSH plugin maintained by deepforce, licensed under MIT, with a package.json version of 0.2.0.

Its positioning is clear: to hot reload installed DeepSeek Harness plugins without restarting dsh web. It monitors plugin package-related files and reloads in place upon detecting code changes; when dependencies or peerDependencies changes are detected, it ends the process with a configurable exit code to let the supervisor restart.

Core Features

Automatic Hot Reload

It detects changes by polling the entry files and package.json files of installed plugins. The default pollIntervalMs is 2000, meaning it checks every 2 seconds. Upon detecting a change in plugin code, it reloads the plugin in the current process.

Manual Reload and Status Check

You can enter in the session:

/reload @deepforce/dsh-balance

To manually reload an installed plugin.

If entered without arguments:

/reload

It lists loaded plugins and marks plugins that cannot be hot reloaded. The markers include [official], [service], and [self].

You can also use:

/watch-status

To view the current watch status, including watched scopes, event counts, recently observed changes, reload counts, skipped reloads, and startup errors.

Restart Process on Dependency Changes

If dependencies or peerDependencies in the plugin’s package.json change, the process will exit with exit code 42. This exit code is configurable. The reason will be logged before exiting, and the external supervisor can restart dsh web based on the exit code.

Protection Rules and Failure Rollback

Official @deepseek-ai plugins, and other plugins that depend on their services, are not hot reloaded by default. This prevents bringing other plugins that depend on that service into a restart after reloading the service provider.

If a single re-import or mount fails, the plugin will restore the module cache and the previous plugin version, and the session continues to run, rather than leaving it in a half-mounted state.

Installation and Activation

Installation command:

dsh plugin --profile web add github:deepforce/dsh-plugin-reloader

After installation, the plugin needs to take effect in dsh web. If you intend to rely on the “auto-restart on dependency change” capability later, you need to run dsh web under an external supervisor rather than starting it directly.

Typical Usage

Upgrading an installed plugin:

dsh plugin --profile web add github:deepforce/dsh-balance   # upgrade

The watcher will notice the changed lib/ files and hot reload the plugin in the current process.

If you want to manually force reload:

/reload @deepforce/dsh-balance

You can also view candidates without arguments:

/reload

If this upgrade also changes the plugin dependency tree, the process will exit with 42, and the supervisor will automatically restart dsh web.

On Windows, you can start via supervisor scripts:

scripts\dsh-restart.cmd web

Or use PowerShell:

powershell -File scripts\dsh-restart.ps1 web

If you need to adjust reload parameters, you can write an overlay configuration, for example:

# reloader.cordis.yml
- patch:
    - id: plugin-reloader
      config:
        debounceMs: 600
        restartExitCode: 50

Use Cases and Notes

Suitable for developers who frequently modify, debug, or upgrade DSH plugins and wish to reduce the number of dsh web restarts.

Notes before use:

  • Plugins run with the permissions of the current dsh process; check the source code and license before installing. This plugin is licensed under MIT.
  • It relies on the loader’s internal module cache loader.internal, which is exposed by the vendored loader by default. If dsh removes this interface in the future, the plugin will fall back to /reload reporting loader internal is unavailable.
  • The watcher only reads files and does not execute any code itself.
  • Process exits caused by dependency changes are intentional behavior, and the reason will be logged before exiting.
  • Tested version information: DeepSeek Harness 0.1.0-rc.6, web profile, Windows 11, Node 24.

Conclusion

dsh-plugin-reloader splits the handling of plugin upgrades into two paths: hot reloading normal code changes in place, and letting the supervisor restart for dependency tree changes. For DSH plugin development and debugging, this keeps the session continuous and reduces the cost of repeatedly restarting dsh web.

GitHub:https://github.com/deepforce/dsh-plugin-reloader
Directory page link:https://www.skillhub.cn/plugins/deepforce/dsh-plugin-reloader