rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
seanwhy/dsh-restart-confirm
DSH (DeepSeek Harness) plugin: sidebar one-click restart of the dsh web process (WebUI + backend) with mandatory double confirmation, auto-relaunch, cross-platform. / DSH 插件:侧边栏一键重启(WebUI 与后台),强制二次确认,自动重新拉起,跨平台。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:seanwhy/dsh-restart-confirm
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Sidebar one-click restart button for the DeepSeek Harness Web UI — with a mandatory two-step confirmation before anything happens.
| Button | A compact restart icon (↻) pinned to the sidebar fold toggle — left of "收起侧边栏" when expanded, above "打开侧边栏" in the 56px rail |
| Safety | You must confirm twice before the restart is triggered |
| Scope | Restarts the dsh web process — the WebUI and the harness backend are the same process, so both come back together |
| Relaunch | Automatically re-runs the exact command that started DSH (process.execPath + process.argv) — no hardcoded paths, all flags (--host, --port, --trusted-host, profile) preserved |
| Platform | macOS · Linux · Windows (detached helper survives the kill) |
| Pending dot | Hidden by default; polls the marketplace operation snapshot every 5s and turns green only when another plugin is pending install/update/removal (restart required) |
--dsw-alias-* tokens, so the button and dialogs follow light/dark theme.Version 0.1.2 is adapted for DSH 0.1.0-rc.6 through 0.1.0-rc.8. The
client injects only the runtime and locates the sidebar through public labels,
slot/data attributes, and class suffixes; it does not require the sidebar
client package to be in this plugin's own injection graph. The host also sends
the workspace root in its shell sandbox policy for the newer shell contract.
dsh plugin --profile web add github:seanwhy/dsh-restart-confirm
Then restart dsh web once so the bundle layer loads.
The repo carries the dsh-plugin topic, so it is indexed by the DSH Plugin Marketplace. Open Settings → Plugins → Plugin Marketplace, search dsh-restart-confirm, and install with one click.
~/.dsh/profiles/web/package.json:{
"dependencies": {
"dsh-restart-confirm": "github:seanwhy/dsh-restart-confirm"
}
}
~/.dsh/profiles/web/cordis.patch.yml (or install via the dsh plugin command which does it for you):- insert:
- id: dsh-restart-confirm
name: dsh-restart-confirm
pnpm install in the profile, then restart dsh web.Plugin config (Settings → Plugins → dsh-restart-confirm → config, or the profile manifest):
| Option | Type | Default | Meaning |
|---|---|---|---|
delaySeconds |
number | 3 |
Seconds after the response before the process is killed (gives the browser time to show the "restarting" state) |
relaunchDelaySeconds |
number | 2 |
Seconds after the kill before DSH is relaunched |
customRestartCommand |
string | '' |
Custom shell command used to relaunch instead of the auto-reconstructed argv |
killOnly |
boolean | false |
Only kill the process; never relaunch (use when an external supervisor restarts DSH) |
| Layer | File | What it does |
|---|---|---|
| Host | lib/index.js |
Registers GET /dsh-health (including a per-process bootId) + POST /restart-dsh; launches a detached helper that sleeps → SIGTERM → (SIGKILL) → relaunches with the original argv |
| Client | lib/client.js |
Vanilla (no React) client that pins the sized icon button by DOM placement; shows a dot only for marketplace pending plugin operations; waits for a changed bootId and reloads as soon as the new server is healthy |
| Bundle | cordis.patch.yml |
The loader row that mounts both halves |
The handler replies before the kill happens; the helper script carries the kill/relaunch delays. The client does not guess when the restart is done: it polls the health endpoint and reloads as soon as the boot identity changes.
If the plugin killed DSH from inside its own process, nothing would be left to relaunch it. The helper is detached (nohup sh … & on Unix, Start-Process -WindowStyle Hidden on Windows), so it survives the harness exit and brings DSH back up.
POST /restart-dsh only accepts loopback callers (127.0.0.1 / ::1) and only POST./dsh-health is a local-only liveness probe.The client bundle is hand-written in the exact wire format (window.__ModuleLoader__.load({ id, factory })) with no build step. It is dependency-free (no React), locating the sidebar fold toggle by stable aria-labels plus public slot/data hooks and CSS-module class suffixes so no hashed class is hard-coded:
node --check lib/index.js
node --check lib/client.js
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。