stuarthu/dsh-hot-reload

stuarthu★ 0JavaScriptLast synced: 2026-08-16

Open on GitHub

Live-reload upgraded DeepSeek Harness (dsh) plugins without restarting dsh — safe reloads in place, failed ones roll back and flag a restart.

README excerpt

dsh-hot-reload English 中文 Live-reload upgraded DeepSeek Harness (dsh) plugins without restarting dsh . dsh's built-in hot-reload ( cordis-plugin-hmr ) deliberately ignores node modules , so upgrading an installed plugin ( dsh plugin add pkg@x ) normally requires a full dsh restart to take effect. This plugin closes that gap: it watches your profile's pnpm-lock.yaml , and when an already-loaded plugin package's version changes, it swaps the running plugin in place. Behavior On a plugin package upgrade, for each affected plugin: - Reload it live — invalidate the module caches, re-import the new code, and re-instantiate the plugin fiber in place. dsh, your sessions, and every other plugin keep running. - If the reload fails — you're left with the working old version , never a dead plugin, plus a logged note that a manual dsh restart is needed to pick up the new code. Two cases, both handled: - a failure while loading the new code (bad import, syntax error) is caught before the running plugin is touched — the old plugin is never disturbed; - a failure while initializing it (the new apply throws, sync or async) is rolled back — the old version is re-instantiated in place. A version that…

View full README on GitHub →
Fun / Adscordisdeepseek-harnessdshdsh-pluginhmrhot-reload

Category