DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-plugin-restart

c

dsh-plugin-restart

Manifest valid★ 1

A Restart button for DeepSeek Harness Settings: replaces the dsh web process serving the page, then reconnects the page by itself.

UI (client)hasBundlePatch

dsh-plugin-restart: one click in DeepSeek Harness Settings replaces the running dsh web process and the page reconnects itself, without a terminal. A four-step sequence shows the same port going from the old process out to quiet to a new instance to the page back, and a measured timeline records a real run: 0.0s port serving, 1.2s old process gone, 11s launcher ready, 12s page reconnected.

MIT license Windows dsh 0.1.0 or newer dsh-plugin topic

A Restart card in DeepSeek Harness Settings. One click replaces the dsh web process that is serving your page — and the page reconnects by itself. No terminal, no re-opening the desktop icon.

That matters because some changes cannot hot-reload:

  • you changed a plugin's host half, and Node caches imported ES modules by URL;
  • you edited config.json, the port, or the workspace;
  • a session holds in-memory state you want gone.

Today those mean walking back to a terminal. This plugin turns them into one click.

Try it

dsh plugin --profile web add github:chenkui-luo/dsh-plugin-restart

Then refresh the page once and open Settings → Restart.

Without the dsh CLI (no pnpm, or a patched profile): copy the package into <profile>/node_modules/dsh-plugin-restart and add this row to <profile>/cordis.patch.yml:

- insert:
    - id: restart
      name: 'dsh-plugin-restart'

The bundled installer does both steps with a backup and a read-back check before it writes:

powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Install-RestartPlugin.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Install-RestartPlugin.ps1 -Action disable
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\Install-RestartPlugin.ps1 -Action uninstall

What happens when you click

StepWhat runs
1The page sends POST /dsh-restart/restart — same origin, authenticated
2The host half starts a detached helper and answers the request before anything is stopped
3The helper waits for the port to stop accepting connections, then hands over to your launcher
4The launcher starts a fresh dsh web with a new launch token and writes its token file
5The helper confirms the replacement is up, then lets the old process exit — gracefully
6The page sees a new instance id on its next poll and reloads itself

Nothing is force-killed in the middle of the response, and the old process is stopped last, by itself. A restart that fails leaves a diagnosis in the log instead of failing silently.

Why the helper is a detached node process

This part was measured on a real Windows machine, not assumed:

how a background helper is starteddoes it rundoes it outlive the process it must replace
PowerShell, detached: trueno — exits 0, silently—
PowerShell, attachedyesno — dies with its parent
node, detached: trueyesyes
node, attachedyesno

On Windows a "detached" PowerShell child gets no console and never runs the script — the same trap dsh-market documents. An attached helper dies together with the process it is supposed to replace. So the helper is a detached node process, and it gives its own children a hidden console through powershell -WindowStyle Hidden.

Force-killing the whole tree is the other half of the story: it leaves a Windows port unbindable long enough for the replacement to die with EADDRINUSE. Waiting for the port to go quiet and only then starting the replacement is what makes the handover reliable.

Verified, not asserted

CheckResult
Helper generation, offline (runtime-test/CheckHelperScript.mjs)11/11
End to end, real plugin code (runtime-test/VerifyRestartPlugin.mjs)21/21
Real launcher + real dsh web, full restart cycle (runtime-test/SmokeRestartReal.ps1)pass

The end-to-end runs cover: the installer writing a managed patch row, the host half claiming its routes, an unauthenticated request being fenced off, the restart being accepted before the port goes away, a second click inside the guard window being refused, the port wait, the launcher handover, the successor process appearing, and the page noticing it.

These live in the toolkit this plugin was built in; this repository is the packaged plugin.

API

Every route passes the connection trust fence (loopback peer + matching Origin + login cookie), so only an authenticated same-origin page can reach them.

MethodPathMeaning
GET/dsh-restart/statusinstanceId (this server's pid), port, workspace, launcher path and availability, whether a restart is in flight
POST/dsh-restart/restartArms a restart. A second request within 15 s gets 409. The response carries no launch token
GET/dsh-restart/logTail of the shared restart log

If the automatic reload comes back unauthenticated — a fresh launch token is minted on every start — the page's own token is handed back to the same browser connection once, so it can reopen itself with ?token=….

Logs

%LOCALAPPDATA%\DeepSeekHarness\restart-plugin\logs\restart.log — append-only, so the record of a restart survives the process that performed it. The helper writes the launcher's exit code, whether the port is still being served, and whether a fresh token file appeared, because the process that would normally log a failure is the one that just exited.

Configuration

VariablePurpose
DSH_RESTART_INSTALL_DIRLauncher runtime directory (default %LOCALAPPDATA%\DeepSeekHarness)
DSH_RESTART_DATAPlugin-private data directory (default <INSTALL_DIR>\restart-plugin)
DSH_RESTART_LAUNCHERPoint at another launcher script (portable installs, tests)

Restart target. By default it delegates to the launcher a hosted install already has (%LOCALAPPDATA%\DeepSeekHarness\Launch-DeepSeekHarness.ps1), which owns the reliable stop/start/readiness sequence. When that file is missing the button reports a clear error instead of pretending to work, and the status card shows the path it looked for. Making the plugin fully standalone is the next step on the roadmap.

Safety

  • Authenticated same-origin loopback only; proxy-forwarded requests are not honoured.
  • No admin rights, no system configuration touched.
  • It interrupts a running conversation turn — that is what a restart is, and the card says so.
  • If the port is owned by a process the launcher does not recognise (a dsh web you started by hand), the restart takes that port over, including its terminal's process tree.

Credits

  • DeepSeek Harness (dsh) — the open-source agent harness this plugin extends and is built on: its dsh.bundle + cordis.patch.yml declaration, the dual host/browser plugin shape, and the webserver's trust fence. deepseek-ai/deepseek-harness · MIT.
  • dsh-market — the community plugin market. Its restart.js is the reference for the approach used here: delegate to a detached helper, wait for the port instead of guessing with a fixed delay, and make a failed restart leave evidence.

License

MIT

Comments

Loading…

From the same category

awesome-dsh-plugin

by awesome-dsh-plugin

A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表

Development & Infrastructure

★ 18.5k

CC0-1.0

Python

Oct 12, 2026

Index only — not installable

by 0xsline

DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.

Development & Infrastructure

★ 1.2k

CC0-1.0

Python

Oct 10, 2026

Index only — not installable

by pax-beehive

Open-source CLI, schemas, resolver, and DSH agent tools for DSH Plugin Hub

Development & Infrastructure

★ 400

MIT

TypeScript

Oct 6, 2026

Index only — not installable

by xiajiajun516

DeepSeek Harness (DSH) backup & restore plugin — export, import, migrate and sync your complete DSH configuration, plugins, MCP servers, skills and workspace. One-click migration to another machine.

Development & InfrastructureManifest valid

★ 185

MIT

TypeScript

Oct 13, 2026

dsh plugin --profile web add dsh-config-manager

by yjh051108

推荐组件(非必须):DeepSeek Harness 运行时注入器;已随 dsh-routing-suite 单仓库化保留,本仓库继续维护/发布。

Development & InfrastructureManifest valid

★ 166

TypeScript

Sep 18, 2026

dsh plugin --profile web add @dsh-external/dsh-super-injector

by jigjoy-ai

A CLI that turns a goal into a pull request - and a sandbox for testing concurrent AI coding agents on the Mozaik runtime.

Development & Infrastructure

★ 124

MIT

TypeScript

Oct 12, 2026

Index only — not installable