dsh-better-restart
Manifest validNo project description is available for this repository yet.
dsh-better-restart
Lovstudio's in-place application restart plugin for the DeepSeek Harness web surface. The settings header gains a Restart app action that re-boots the whole application in place (reloading the current tab, not opening a new one), with a confirmation dialog that watches running conversations live.
This is a Lovstudio plugin, not a DeepSeek-AI package, distributed under the @lovstudio scope.
What it does
- Host half exposes two
webServerroutes:POST /better-restart/status—{ running, active }(how many agent loops are mid-turn).POST /better-restart— restarts the application, preferring the launcher'sappRestartservice and falling back to a root-include recompose.
- Client half (settings-header button):
- Confirmation dialog that polls agent activity live (1.5s). With conversations running it reports the count and gates the restart behind an explicit acknowledgement; without running conversations the restart passes straight through.
- In-flight spinner + disabled button while restarting; the current tab reloads on reconnect.
- A
betterRestartUiCordis service exposing the samestatus()andrestart()operations to other browser plugins.
The plugin is completely runtime and self-contained: it reaches DSH capabilities through the injected Cordis ctx only (webServer, agents, appRestart), and the client page reaches the host through plain fetch to those routes — no Remote assembly, no build-time transforms. It has no package dependencies beyond node builtins.
Install
Prerequisites: Node.js 22.19+ or 24+, pnpm 11 (corepack enable or npm i -g pnpm) — dsh plugin forwards to pnpm inside the profile directory.
From a DeepSeek Harness source checkout (recommended — you get the harness source too):
git clone --depth 1 --branch dsh-v0.1.2-rc.1 https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness && pnpm install && pnpm run build
pnpm dsh plugin --profile web add -w github:lovstudio/dsh-better-restart#v0.1.4
pnpm dsh web
Without a checkout (npx; compiled harness only):
npx @deepseek-ai/dsh plugin --profile web add -w github:lovstudio/dsh-better-restart#v0.1.4
npx @deepseek-ai/dsh web
How the restart happens
Two mechanisms, in order of preference:
appRestart— a launcher-provided service that re-boots the process.dsh0.1.2-rc.1 provides none; this is the path a future or embedding launcher takes, and the route answers204.- Root-include recompose — the fallback that makes the button work under plain
dsh web. The loader's rootcordis:includeentry is disabled and re-enabled, which re-reads the composedcordis.ymlplus the user patch layers and restarts every plugin under it, the web server included. The node process itself survives, so the terminal that launcheddsh webkeeps owning it. The route answers202 {"mode":"recompose"}and only then tears the tree down — the response is held until its socket closes, because a recompose that races the flush reaches the browser as a transport failure rather than an accepted restart.
An app with neither lever answers 503 with that reason, the settings action shows a copyable failure instead of pretending to restart, and any plugin driving this service — the plugin marketplace, for one — sees the same rejection.
Because the process is reused, a recompose re-reads configuration and loads newly installed plugins, but Node's ESM cache means edited source of an already-loaded module is picked up only through the profile's own HMR watcher.
web is the profile dsh web boots. The tag pins a commit whose lib/ is prebuilt and committed, so nothing is compiled on your machine. Verified on 2026-09-05 against dsh-v0.1.2-rc.1 in both forms, including the recompose fallback end to end in the browser. Remove with dsh plugin --profile web remove @lovstudio/dsh-better-restart.
The client half (dsh.client) is served to the page automatically by the client module system once the plugin is composed — no rebuild of the web application is needed.
Use
- Start the web UI:
dsh web. - Open the settings header → Restart app.
- Confirm; the app restarts in place and the current tab reloads.
Local development
Keep this checkout outside the DeepSeek Harness repository. Install and build it here, then link the package into an isolated development profile:
pnpm install
pnpm run watch
DSH_HOME=/Users/mark/.dsh-lov-dev pnpm --dir /path/to/deepseek-harness dsh plugin --profile web add -w link:/path/to/dsh-better-restart
The Host consumes the generated index.js, while the browser module system consumes lib/client.js. Client-only rebuilds are detected by the Harness Client HMR watcher; Host, manifest, patch, and bundle-membership changes require a profile restart. The package build does not import a Harness tsconfig or workspace source path.
Notes
- Requires
webServerandagents(both from@deepseek-ai/dsh-base);appRestartandloaderare each optional, and the route reports when neither is there. - Copy lives under
@lovstudio/dsh-better-restart(zh/en), auto-registered to thebetter-restart-uilocale namespace.
License
Comments
Loading…
From the same category
by awesome-dsh-plugin
A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表
★ 25.1k
CC0-1.0
Python
Nov 18, 2026
by woniuniuniu
DeepSeek Harness 自媒体工作台插件:一句话记灵感,一键生成脚本、封面、配图和分镜
★ 1.5k
↓ 8.2k/wk
MIT
JavaScript
Nov 18, 2026
dsh plugin --profile web add dsh-media-deskby 0xsline
DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.
★ 1.4k
CC0-1.0
Python
Nov 6, 2026
by keli-wen
Hire Google's Antigravity CLI (agy) as a fast Gemini staffer for Claude Code, OpenAI Codex, and DeepSeek Harness.
★ 893
MIT
JavaScript
Nov 16, 2026
dsh plugin --profile agent add agy-staffby Roland0511
MarkText (muya) WYSIWYG Markdown editor for the DeepSeek Harness right sidebar
★ 846
↓ 2.8k/wk
MIT
JavaScript
Nov 7, 2026
dsh plugin --profile web add dsh-marktextby SAOS-3624
Scene-aware storyboard for DeepSeek Harness: 9-16 numbered cells with timestamps + transcript + an audio envelope, packed into ONE image (384 tokens). Two tools: video_storyboard and video_zoom.
★ 575
↓ 17k/wk
MIT
JavaScript
Nov 16, 2026
dsh plugin --profile web add dsh-video-storyboard