deepforce/dsh-plugin-reloader
deepforce★ 1TypeScript最后同步: 2026-08-15
Hot-reload DeepSeek Harness plugins without restarting dsh web — auto-watch, /reload command, dependency-change restart
README 摘要
dsh-plugin-reloader English 中文 Hot-reload installed DeepSeek Harness plugins without restarting dsh web . After you upgrade a plugin (e.g. dsh plugin add github:... ), the new code takes effect in place; only a dependency-tree change restarts the process (through an external supervisor script). It reuses the same reload pipeline dsh's built-in HMR uses for user code — clear the module caches, re-import the plugin entry, dispose the old fibers, mount fresh ones, roll back on failure — minus the node modules exclusion that keeps the built-in HMR away from installed plugins. The loader's internal module cache is reachable through dsh's vendored loader without any special flag. Features - Auto hot-reload — polls the installed plugins' entry and package.json files (every pollIntervalMs , default 2s) and hot-reloads a plugin in place when its code changes. Polling ( stat mtime+size) is used instead of a file-watcher library: chokidar's fs-watch never reached ready inside the long-lived dsh web process on Windows, and polling is immune to pnpm's whole-directory replacements (the stat simply sees the new files on the next tick). Plugin upgrades are low-frequency, so a 2-second stat of a ha…
在 GitHub 查看完整 README →