DSH Plugins Marketplace

DSH Plugins

Plugins

/

Terminal & Clients

/

dsh-web-restart

d

dsh-web-restart

Manifest valid

DSH web plugin: one-click full process restart of the harness from the sidebar — terminates the current `dsh web` process and relaunches the identical command via a startup guard (no daemon required), with automatic page recovery and an agent-callable restart tool. DSH Web plugin: one-click full restart of the harness from the sidebar — terminates the current `dsh web` process and relaunches it with the same command via a startup guard (no daemon required), with automatic page recovery, and provides an agent-callable restart tool.

UI (client)hasBundlePatch

dsh-web-restart

English | 中文

DSH web plugin: one-click full restart of the harness from the sidebar — terminates the current dsh web process and relaunches the identical command through a startup guard (no systemd/Docker supervisor required), with automatic page recovery and an agent-callable restart tool.

The npm name dsh-restart is already taken by a same-purpose project, so this plugin ships as dsh-web-restart.

Features

  • 🔘 Sidebar restart button in the sidebar.footer.action row (beside the Cordis lifecycle panel). Click = restart, no confirmation dialog (single-user, trusted-host model).
  • ♻️ Full process restart: terminates the current dsh web process and relaunches the same command line (preserving --profile / --patch and all inner flags, always ensuring --no-open so no browser window is popped).
  • 🛡️ Startup guard (no daemon needed): the fresh process is launched only after the old process has exited AND the web port is free, eliminating the port-races that would otherwise crash boot (DSH's webserver binds on startup and has no EADDRINUSE retry).
  • 🔄 No page reload, no new tab: while restarting, the button shows "Restarting…" and polls the health endpoint; the page stays put and DSH's WebSocket auto-reconnect (connection/reset) restores the UI in the same session tab (the session survives via DSH persistence).
  • 🧰 Agent-callable tool dsh_restart sharing the same restart core.
  • 🌐 Bilingual (zh/en) UI copy and README.
  • 🚫 Single-flight guard: duplicate clicks/tool calls while a restart is in flight are rejected.

Install

dsh plugin --profile web add github:csdjl88/dsh-web-restart

Restart DSH for the button to appear in the sidebar footer.

Usage

Web button

Click "Restart DSH" at the bottom of the sidebar. The button shows "Restarting…" and polls automatically; the page does not reload — DSH's WebSocket auto-reconnect restores the UI in the same session tab (no new tab). If the fresh process is not ready within 30 seconds, an error is shown (check the terminal running dsh).

Agent tool

Just ask "restart DSH" in a conversation (tool dsh_restart, optional reason argument). Note: a restart interrupts all running agent tasks and background jobs.

How it works

click / tool call
   └─ POST /dsh-restart (idempotent, single-flight)
        └─ spawn the relaunch guard (same node + original argv + auto `--no-open`)
             └─ old process exits after ~1s
                  └─ guard polls: old pid gone & port free
                       └─ relaunch `dsh web` (with `--no-open`) in its own session
                            └─ no reload, no new tab — DSH auto-reconnects to the same session tab
  • The relaunch command always carries --no-open (appended when the original command lacks it): the browser is already in front of the user, so no new window is popped.
  • No full-page reload: DSH's WebSocket auto-reconnect (connection/reset) restores the UI in the original session tab.
  • HTTP endpoints: POST /dsh-restart (trigger), GET /dsh-restart/health (liveness; returns pid so the front end can recognise the fresh process).
  • Env contract: DSH_RESTARTED_BY / DSH_RESTART_OLD_PID / DSH_RESTART_PORT.

Stopping a restarted DSH (important)

After a restart the fresh dsh web runs in its own session (process group). The original dsh was the terminal's foreground process-group leader; once it dies the old group becomes orphaned and no longer receives the terminal's Ctrl+C — this is inherent to the Unix process model and cannot be fixed by the plugin. Stop the restarted harness with any of:

  • Close the terminal window running dsh (the guard detects the terminal closing and terminates the harness; the port is released) — recommended.
  • Press Ctrl+D in the terminal (also a terminal-close signal).
  • Or, in a new terminal: pkill -f "dsh web" / kill <pid> (lsof -iTCP:3080 to find the pid).

Compatibility

  • Designed for running dsh web in a foreground terminal (no supervisor); the relaunch pipeline is verified against a real dsh web instance.
  • ⚠️ Use with caution under a supervisor that has an auto-restart policy (systemd / Docker / pm2): when the old process exits, BOTH the supervisor and this plugin's guard may relaunch it, producing two instances racing for the port (one crashes with EADDRINUSE). In a supervised environment, disable the supervisor's restart policy or remove this plugin.
  • Requires DSH 0.1.0-rc.7 or newer.

Development

npm run check   # syntax checks
npm test        # unit tests + process-level e2e (real restart pipeline)

License

MIT

Comments

Loading…

From the same category

dsh-TUI

by ccch1mneyyy

DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol

Terminal & ClientsManifest valid

★ 4.3k

↓ 10.9k/wk

MIT

TypeScript

Oct 11, 2026

dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tui

by strukto-ai

The World's First Virtual Terminal for AI Agents

Terminal & ClientsManifest valid

★ 3.7k

↓ 355/wk

Apache-2.0

TypeScript

Oct 11, 2026

dsh plugin --profile agent add @struktoai/mirage-dsh

by bowenliang123

The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,

Tools & CapabilitiesTerminal & ClientsUI & ExperienceManifest valid

★ 2k

↓ 34.4k/wk

Apache-2.0

TypeScript

Oct 11, 2026

dsh plugin --profile web add dsh-context

by huiliyi37

官方 DeepSeek Harness 的交互式终端 UI 插件:自研 ANSI 极简交互渲染、流式 Markdown/工具卡、16+ 主题、slash 命令与选择器、输入历史与本地偏好持久化、LSP 诊断、memory记忆,很丝滑的开发体验。

Terminal & ClientsManifest valid

★ 287

↓ 462/wk

Apache-2.0

TypeScript

Sep 30, 2026

dsh plugin --profile terminal add @huiliyi37/dsh-tianshu-tui

by Hilbert-beinghappy

面向 DeepSeek Harness 的 Claude Code 风格终端界面,支持 Windows、macOS 与 Linux,兼容透明终端、VS Code 主题和自定义配色。

Terminal & ClientsManifest valid

★ 197

↓ 108/wk

MIT

TypeScript

Oct 1, 2026

dsh plugin --profile web add seektty

by T-Auto

deepseek-harness Plugin Access and Implementation Standards / deepseek-harness交互生态插件规范与实施标准

Terminal & Clients

★ 83

MIT

JavaScript

Oct 10, 2026

Index only — not installable