Introduction¶
The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” The current official CLI does not have a built-in self-update capability. Existing community update-checking plugins usually can only complete the “detection” step, after which users still need to act manually. The dsh-auto-update plugin fills this gap: it automatically compares versions when the host starts and decides, based on the configuration, whether to only notify or directly execute the installation.
What Is It¶
This is a host-side plugin maintained by frostming under the MIT open-source license.
Core Features¶
- One check on startup: Registers
setTimeoutusingctx.effect, automatically performs one check a few seconds after startup, and does not check repeatedly afterwards. - Correct semver comparison: Properly handles prerelease versions, for example comparing
0.1.0-rc.5with0.1.0-rc.6. - Two modes:
notify(default): Only prints a prominent banner to the console; does not install.install: Automatically runs the installation command.
- State persistence: Check results are written to
~/.dsh/dsh-auto-update-state.json, keeping the most recent 10 history entries. - Profile-agnostic: Does not depend on
webServerand works with all profiles (such asweb,headless, andtui). - Graceful uninstallation: Managed through
ctx.effect; the timer is automatically cleaned up on uninstall. - Zero runtime dependencies: Uses only built-in Node modules.
Installation¶
Use the following command to add the plugin to the current profile:
dsh plugin --profile web add github:frostming/dsh-auto-update
After installation, restart dsh web for it to take effect. By default, the plugin only notifies and does not install. The console prints a banner similar to the following:
════════════════════════════════════════════════════════
dsh-auto-update: update available
installed: 0.1.0-rc.5
available: 0.1.0-rc.6 (latest)
action: notify only — run npm install -g @deepseek-ai/dsh@0.1.0-rc.6
════════════════════════════════════════════════════════
Enable Automatic Installation¶
To enable automatic installation, edit the profile’s cordis.patch.yml file (the path is usually $DSH_HOME/profiles/<name>/cordis.patch.yml) and override mode to install:
- insert:
- id: dsh-auto-update
name: 'dsh-auto-update'
config:
mode: install
# 可选:自定义安装命令,{version} / {package} 会被替换
installCommand: 'npm install -g {package}@{version}'
Configuration Options¶
| Key | Default Value | Description |
|---|---|---|
channels |
["latest", "next"] |
Dist-tags consulted by priority |
startupDelayMs |
5000 |
Delay before checking after startup, in milliseconds |
mode |
"notify" |
"notify" or "install" |
installCommand |
npm install -g {package}@{version} |
Installation command template |
stateFile |
~/.dsh/dsh-auto-update-state.json |
State file path |
verbose |
true |
Whether to print check logs |
Notes¶
- DeepSeek Harness is currently in the developer preview stage, and the official documentation explicitly states that breaking compatibility changes will occur.
- Enabling automatic installation is equivalent to accepting this risk, so enable it with caution.
- The plugin runs with the permissions of the current dsh process. Before installation, you should review the source code and license.