One fixed button inside the DSH window that restarts DSH and reopens it automatically, with no console window; right-click it for a built-in self check that writes a single diagnostic report.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-hot-restart
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:xiaolu511/dsh-hot-restart
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
One fixed button inside the DSH window. Click it and DSH closes and reopens automatically. Right-click it for a built-in self check.
Built-in self check
When the button does not work, when DSH closed and never came back, or when installing the plugin broke startup - all of that used to need a back-and-forth conversation. Now one click answers it:
right-click the button, pick the self check; a small progress card shows the current step and the elapsed time, and you get the full path of the report when it is done (it opens in Notepad);
it also runs by itself when a restart is refused, when the button is greyed out, or when the host notices the previous startup failed; the restart helper runs it too when DSH never came back;
by default it creates no processes at all (it only reads policy and state), so antivirus does not pop an authorisation dialog and the whole run takes about 9 seconds. Add
-DeepProbetotools\diagnose.cmdif you want the five dispatch channels tested for real;the report is self-contained: verdicts, the dispatch capability matrix, security context (WSH policy, execution policy, installed AV, Defender controlled folder access and ASR, AppLocker), every DSH process and command line, plugin file hashes, whether the market lock is stuck, the stage the last startup died at, GPU crash count, ports, routes and the full plugin log.
the button floats above the page and never squeezes your content;
solid theme colour with white text, hard to miss;
clicking asks for confirmation first, because a restart interrupts running tasks;
once DSH is back, the page shows a short "DSH hot restart finished" toast.
Release notes for every version live in CHANGELOG.md. There is also a beginner guide, in Chinese.
Install
Published on npm. Use an exact version (a freshly published version is skipped for 24 hours):
dsh-hot-restart@0.3.16
If that fails, use the GitHub spec. The target machine needs git:
github:xiaolu511/dsh-hot-restart@0.3.16
For an offline machine, pack a tgz and use a file: spec with its absolute path.
On the desktop client, ask the Agent to run plugin_manager and then install_bundle. For the
web profile, use the CLI:
dsh plugin --profile web add dsh-hot-restart@0.3.16
Restart DSH once after installing
Two reasons, both of which need a real process restart:
- The desktop shell collects its injection table once, at host startup, then hands it to the page over IPC. There is no runtime refresh channel, so without a restart the button never shows up;
- Host-side code is cached by module URL, so a hot install or update does not replace a module
that is already running. Changes to
lib/index.jstake effect on the next host start. The plugin manager marks these installs asrestart-required.
Pick either way to restart, both are window-free:
- double-click
tools\restart-dsh.vbs, recommended; - right-click the tray icon and choose Quit, then start DSH again.
Usage
| Action | Result |
|---|---|
| Click the button | confirmation dialog → "restart now" → DSH closes and reopens |
Esc |
closes the dialog |
The button uses the theme colour normally. It turns grey when the host decides a restart is not possible and hovering shows the reason. It turns amber while a restart is running.
How the restart works
- The page sends
POST /dsh-hot-restart/restartwith thex-dsh-hot-restart: 1header; - The host locates the shell process from its own parent. The parent must not be an Electron
--type=child, must not be a terminal or an interpreter, and its executable name has to look like a DSH app. Anything else is refused, so adsh webrunning in a terminal is never killed; - It dispatches
wscript.exe //B lib\relaunch.vbsthrough WMI. wscript is a GUI-subsystem program and creates no console. Processes created through WMI leave the DSH job object, so the helper survives the shell; - The host answers the page, then runs
taskkill /Fon the shell process 700 ms later; - The helper waits for the shell to exit, force-terminates it through WMI if that takes longer than 25 seconds, waits for the port to be released, and finally starts DSH through WMI, so the new instance inherits no console.
Logs live in $DSH_HOME/hot-restart/: restart.log and last-restart.json.
Files
dsh-hot-restart/
├─ cordis.patch.yml # bundle mount declaration
├─ lib/
│ ├─ index.js # host half: injection row + /dsh-hot-restart/* routes + restart orchestration
│ ├─ relaunch.vbs # preferred helper: zero console, waits for the shell, starts DSH via WMI
│ ├─ relaunch.ps1 # helper fallback, only used when wscript or VBScript is disabled
│ └─ ui.js # page half: the fixed button, no build step
├─ tools/
│ ├─ restart-dsh.vbs # double-click to restart DSH silently, zero window, handy for upgrades
│ ├─ restart-dsh.cmd # for terminals, prints progress, but .cmd always brings a console window
│ └─ restart-dsh.ps1 # implementation behind the .cmd above
├─ tests/host-half.test.mjs
└─ package.json
Routes
| Method | Path | Notes |
|---|---|---|
| GET | /dsh-hot-restart/status.json |
host and shell info, whether a restart is possible. The page asks once on load |
| POST | /dsh-hot-restart/restart |
starts a hot restart, requires x-dsh-hot-restart: 1 |
| GET | /dsh-hot-restart/ui.js |
the page script itself |
All three routes run the plugin's own loopback, same-origin and Sec-Fetch-Site checks first, then
hand over to the host trust fence, so only a local page can trigger them. A bare curl gets a 401.
Uninstall
Ask the Agent to run plugin_manager and then remove_bundle with the target dsh-hot-restart, or:
dsh plugin --profile web remove dsh-hot-restart@0.3.16
Then delete $DSH_HOME/hot-restart/, which only holds logs and the last restart record.
Limitations
- A hot restart only works on the Windows desktop client. Everywhere else the button turns grey and explains why.
- The restart is forced. Tasks that are generating or executing tools are interrupted; the session and your project files are already on disk, so you can continue after the restart.
- Do not start DSH by typing a command in a console. DSH then hangs off that console, and closing the window kills DSH. This is Windows behaviour, not something this plugin causes. Starting DSH from a Start Menu shortcut, by double-clicking the exe, or through this plugin's restart tools is fine.
- Position: bottom-left of the main area on a plain Web page; on the Windows desktop shell it moves to
the top-right, immediately left of the minimise button (centred in the 40px caption row, and back to
the bottom-left in fullscreen). To change it, edit
left/bottom/righton#dsh-hr-btninlib/ui.js.
Thanks
- @xiangjian9998: moved the button from the bottom-left of the main area into the Windows title bar, immediately left of the minimise button (PR #3)
Links
More in this category
yjh051108/dsh-routing-suite★ 7027
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3950
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
first-fluke/oh-my-agent#dsh★ 1494
Runs project OMA checks before and after tool execution and when a turn tries to finish. Installs its OMA CLI dependency and initializes unconfigured projects on first use. Requires Node.js 22+; initial setup needs network access and project write access.
MichengAI/dsh-skills-manager★ 631
Manages local DeepSeek Harness skills in Settings and shows shared Agent skills as read-only.
hust-open-atom-club/oh-dsh★ 326
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
Fishquito7/dsh-skill-mcp-panel★ 291
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.