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 插件精选列表
★ 17.8k
CC0-1.0
Python
Oct 1, 2026
by 0xsline
DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.
★ 1.1k
CC0-1.0
Python
Sep 30, 2026
by pax-beehive
Open-source CLI, schemas, resolver, and DSH agent tools for DSH Plugin Hub
★ 458
MIT
TypeScript
Sep 22, 2026
by yjh051108
推荐组件(非必须):DeepSeek Harness 运行时注入器;已随 dsh-routing-suite 单仓库化保留,本仓库继续维护/发布。
★ 167
TypeScript
Sep 18, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injectorby 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.
★ 153
MIT
TypeScript
Oct 4, 2026
dsh plugin --profile web add dsh-config-managerby 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.
★ 124
MIT
TypeScript
Oct 2, 2026