Preface¶
The philosophy of DSH is “everything is a plugin.” After modifying profile cordis combinations, settings, and other configurations, it’s typically necessary to restart the entire DSH process for changes to take effect. Simply stopping and restarting the process manually lacks a unified entry point on the agent side, and the page also requires manual refreshing.
dsh-restart makes restarting a plugin: providing model tools, slash commands, settings cards, and a “Restart Now” button. It also supports prompts for automatic continuation after restart, as well as an optional watchdog for automatic restart.
What is This¶
dsh-restart is a DSH restart plugin designed to restart the entire DeepSeek Harness process to reload plugins and configurations. It consists of both host and client halves: the host side provides the restart interface, while the client side offers a settings card and button in the settings page.
Current verified information includes:
- Repository path:
https://github.com/anweat/dsh-restart package.jsonversion:0.1.2- License:
MIT - Node version requirement:
^22.19.0 || >=24.0.0 - Client platform:
web - Bundle patch:
./cordis.patch.yml
Core Features¶
Model Tool restart_harness¶
restart_harness is a model tool that allows the agent to directly schedule a process restart. The optional parameter delayMs can be used to delay the restart.
/restart Slash Command¶
/restart is a slash command in the UI for manually triggering a DSH restart.
Settings Card¶
The settings card is located at:
Settings → Plugins → Plugin Settings → "DSH Restart"
Edits made in the card are immediately written to settings.yaml. Editable items include:
legacyRestart: Legacy PowerShell/WMI/taskkill restart method, disabled by default. The default uses Node’s native method.continuePrompt: Prompt injected into the agent for automatic continuation after restart.watchdogEnabled: Automatically restarts DSH on crash/close, disabled by default. Use with caution.watchdogCooldownMs/watchdogPollMs: Watchdog cooldown and polling intervals.
“Restart Now” Button¶
The “Restart Now” button first reads the current process identity, schedules a restart, waits for the new process to recover, and automatically refreshes the page.
The related interface behaviors are as follows:
- Read-only
GETreturns{ pid, startedAt }. - Restart
POSTonly accepts same-origin requests from loopback addresses (127.0.0.1/localhost). - Requests via reverse proxy or remote access will be rejected, returning
403.
Installation and Enabling¶
Verified materials do not provide a one-line installation command that can be copied directly. Instead, they provide a profile configuration method: adding the package to profile dependencies and mounting it into the bundle.
First, ensure the current environment meets the Node version requirement:
"engines": {
"node": "^22.19.0 || >=24.0.0"
}
In profiles/<profile>/package.json, add dependencies and bundles:
// profiles/<profile>/package.json
{
"dependencies": {
"dsh-restart": "0.1.2"
},
"dsh": {
"profile": {
"bundles": [
"dsh-restart"
]
}
}
}
If the profile already has other bundles, simply append "dsh-restart" to the bundles array.
Then restart DSH, which can be triggered via /restart or restart_harness. After refreshing the page, you will see the settings card; subsequent restarts via the card will automatically wait and recover the page.
Typical Usage¶
- Initial Enablement
Add dsh-restart to profile dependencies and mount it into the bundle, then restart DSH. After refreshing the page, go to “Settings → Plugins → Plugin Settings → DSH Restart” to see the settings card.
- Let the Agent Schedule a Restart
The agent can call restart_harness. If a delayed restart is needed, pass delayMs.
- Manual Restart
Execute in the UI:
/restart
- Configure Post-Restart Continuation
Set continuePrompt in the card. After restart, this prompt will be injected into the agent for automatic continuation.
- Adapt to Legacy Restart Method
Enable legacyRestart in the card to use the legacy PowerShell/WMI/taskkill restart method. This item is disabled by default, and the default uses Node’s native method.
- Enable Optional Watchdog
Carefully enable watchdogEnabled in the card and configure as needed:
watchdogCooldownMswatchdogPollMs
The watchdog is disabled by default.
Local Build¶
If local build is needed, the verified commands are as follows:
pnpm install
node scripts/link-dsh-workspace.mjs --source <path-to-deepseek-harness>
pnpm run build
During the build, the host half is output by tsc to lib/index.js, with @deepseek-ai/* kept as external dependencies; the client half is bundled by tsdown into a single file lib/client.js.
Use Cases and Notes¶
Suitable for the following situations:
- Frequent modifications to profile cordis combinations and settings require restarting DSH.
- Need the agent to schedule a process restart during tasks.
- Desire automatic continuation after restart based on
continuePrompt. - Need to adapt to the legacy PowerShell/WMI/taskkill restart method.
- Require an optional watchdog to automatically restart DSH.
Before use, note:
- dsh-restart runs with the current DSH process permissions and will restart the process. Before installation, review the source code and
MITlicense. legacyRestartis disabled by default.watchdogEnabledis disabled by default; enable with caution.- Restart
POSTonly accepts same-origin requests from loopback addresses; requests via reverse proxy or remote access will return403. peerDependenciesinpackage.jsonincludes@deepseek-ai/*; the full version of@deepseek-ai/dsh-llmis truncated in the verified materials. Verify against the current DSH environment before deployment.
Links¶
- GitHub: https://github.com/anweat/dsh-restart
- Community directory page: https://www.skillhub.cn/plugins/anweat/dsh-restart