Introduction¶
DeepSeek Harness (DSH) adopts a “everything is a plugin” organizational approach, but adding, removing, and version updating plugins usually requires restarting dsh to take effect. For developers using long-lived surfaces, restarting interrupts the current session. dsh-hot-installer solves this: after installing and restarting once, subsequent dsh plugin add / remove / update no longer require a restart.
What is it¶
dsh-hot-installer is a DSH plugin maintained by KYinCode, licensed under MIT. It stays resident in the profile, listening for changes in the plugin manifest and applying add, remove, and upgrade operations to the running plugin tree. The entire process does not write any configuration files or modify the patch layer.
Core Features¶
Below is an introduction to its existing capabilities:
- Hot Install: Listens for changes in the profile’s plugin manifest, mounts new packages on the spot, and reads the
cordis.patch.ymlfile declared by the package to inject it into the running plugin tree. - Hot Uninstall: Removes the package on the spot, and removes the corresponding plugin line based on the “package -> line” mapping.
- Hot Update: Upgrades the package and reloads it on the spot.
- Patch Layer Protection: Automatically restores lines overwritten by manual edits to
cordis.patch.yml; if the patch line explicitly statesdisabled: true, it will not be restored. - Failure Protection: Performs a pre-check when upgrading or hot reloading fails, and rolls back to the old version and remounts if necessary.
- Self Hot Update: Starting from
0.4.4, the update ofdsh-hot-installeritself is also restart-free. - Logging: Records the hot install, hot uninstall, and hot reload process.
Installation and Activation¶
First install the plugin, then restart dsh once. The example below uses the web profile:
dsh plugin --profile web add dsh-hot-installer
After restarting, subsequent plugin operations take effect immediately within the current dsh process. This plugin requires Node >= 20 and is suitable for running on long-lived surfaces with HMR (e.g., dsh web); one-off CLI interfaces without HMR will start normally but will never activate listening.
Typical Usage¶
Install a new plugin:
dsh plugin --profile web add some-plugin
Uninstall a plugin:
dsh plugin --profile web remove some-plugin
Upgrade a plugin:
dsh plugin --profile web add some-plugin@latest
View hot install, hot uninstall, and hot reload logs:
~/.dsh/logs/dsh-hot-installer/dsh-hot-installer.log
Local verification tests within the repository:
npm install && node --test test/
Applicable Scenarios and Notes¶
Suitable for developers who need to frequently install, remove, or upgrade plugins in long-lived DSH surfaces such as dsh web. The plugin runs with the permissions of the current dsh process; you should check the source code and the MIT license before installing.
Pay attention to the following boundaries:
- A restart is only required if the upgrade fails and the rollback fails; if the rollback succeeds, continue using the old version.
- If the corresponding line is not in the live configuration during uninstallation, it is directly considered uninstalled successfully, and a false report of
restart requiredwill not occur. - On Windows, the
link:local installation has a junction path cache issue: switching the link target to another directory during the samedshrun and then hot upgrading may result in false success; you need to restart once or switch to using an official npm package. - The plugin does not write any configuration files or modify the patch layer.
Conclusion¶
dsh-hot-installer changes the add, remove, and update of DSH profile plugins from taking effect after a restart to taking effect immediately within the current process, while retaining failure rollback and patch layer protection. Project repository: