DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Restart Client — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
R

dsh-restart-client

Restart Client

一键重启 DSH 桌面客户端:侧边栏按钮、HTTP 端点和可重启整个应用的代理工具。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:liuhao11223/dsh-restart-client#0fba9ee42bff986ffbdb5924a376438911a609fc
README兼容性版本
The restart button at the foot of the sidebar

兼容性与来源证明

Restart Client 以 dsh-restart-client 发布,当前版本为 1.0.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/10/19

版本

1.0.0stable
2026/10/19
最新版
1.0.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
未声明
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/19
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

README

dsh-restart-client

A DSH (DeepSeek Harness) plugin that adds a one-click restart for the desktop client — a sidebar button, an HTTP endpoint, and an agent tool, all backed by the same host capability.

Click once. No confirmation dialog, no second press, no console window.

The restart button at the foot of the sidebar

Why

The DSH desktop app ships restart only as an official service-only extension: it respawns the Harness process and leaves the window running, so host-side changes still need a manual quit-and-relaunch. This plugin restarts the whole application while keeping the experience to a single click.

What it does

Entry pointKindPurpose
Sidebar footer buttonClient slot sidebar.footer.actionOne click → the desktop app restarts
POST /api/dsh-restart/restartHTTP routeSame operation for scripts and other plugins
GET /api/dsh-restart/statusHTTP routeReports the resolved desktop process and mode plan
restart_dsh_clientAgent toolLets the model restart the client itself

Two modes:

  • client (default) — kill the whole desktop process tree, wait for it to disappear, then relaunch the executable. The window really restarts.
  • service — respawn only the Harness service process and exit, leaving the desktop alone.

Install

The plugin is a regular DSH bundle. Point a profile at it:

// <profile>/package.json
{
  "dependencies": {
    "dsh-restart-client": "link:E:/path/to/dsh-restart-client"
  },
  "dsh": {
    "bundles": ["dsh-restart-client"]
  }
}

Then restart the client once (by hand the first time — the button does not exist yet), and refresh the page after any client.js edit, since the desktop serves client halves from disk.

Because package.json points exports at the real files and the profile links the directory, editing client.js is picked up on the next page load; editing index.js (the host half) needs a real client restart.

How the no-console restart works

The interesting part, and the reason this plugin exists rather than a five-line shell wrapper.

A helper process has to outlive the app it is about to kill, so it is created through WMI (Win32_Process.Create), which reparents it to WmiPrvSE and lets it survive taskkill /T on the desktop tree. But WMI-created processes always get a console window, and none of the usual tricks suppress it — -WindowStyle Hidden does not, and a Win32_ProcessStartup with ShowWindow = 0 returns success while the console still appears (measured on Windows 10/11).

So the helper is launched indirectly:

  1. Write a tiny .vbs launcher (UTF-16LE with BOM — WSH accepts only ANSI or UTF-16, and temp paths may contain non-ASCII user names).
  2. The launcher runs shell.Run "<helper command>", 0, False — window style 0 means no window at all.
  3. WMI creates wscript.exe //nologo <launcher.vbs>, which starts the helper invisibly.

If WSH is unavailable, the plugin falls back to creating the helper directly, so restarting still works even if a console flashes. A dry run reports which route would be taken:

// POST /api/dsh-restart/restart  {"dryRun": true}
{ "launch": "wscript (windowless)", ... }

The button

It lives in the shell's own sidebar.footer.action list slot, next to Settings, and inherits the sidebar's layout — including the centering it does when the sidebar collapses to a rail. Nothing is measured at runtime and no coordinates are hard-coded.

Styled as a ghost button in the shell's token language: 28px tall, 6px radius, transparent until hover, --dsw-alias-label-secondary → --dsw-alias-label-primary, a 180° icon turn on hover, a spin plus a pulsing label while busy, and --dsw-alias-state-error-primary with a Retry face for six seconds if the request fails. It honors prefers-reduced-motion.

API

GET /api/dsh-restart/status

{
  "ok": true,
  "host": { "platform": "win32", "selfPid": 26488, "desktopPid": 12724, "desktopOwned": true, "modes": ["client", "service"] }
}

POST /api/dsh-restart/restart

{ "mode": "client", "delayMs": 1500, "dryRun": false }

delayMs is clamped to 120000 and defaults to 1500, giving the HTTP response time to reach the browser before the app dies.

Response:

{
  "ok": true,
  "mode": "client",
  "desktopPid": 12724,
  "helperPid": 26576,
  "launch": "wscript (windowless)",
  "logPath": "C:/Users/…/dsh-restart-client/client-2026-10-19T13-21-28-091Z.log"
}

Both routes reject untrusted origins (403) through ctx.connection.requestRejection, and reject the wrong method (405).

Agent tool restart_dsh_client

{ "mode": "client", "dryRun": true }

The current turn is interrupted by a real restart.

Layout

index.js            host half — routes, WMI/VBS launcher, agent tool
client.js           client half — the sidebar button
cordis.patch.yml    bundle patch: inserts the plugin entry
locale/zh.json      plugin marketplace metadata (Chinese)
locale/en.json      plugin marketplace metadata (English)
icon.svg            plugin icon

index.js imports nothing but Node built-ins.

Limitations

  • Windows-centric. The windowless launcher path is WSH-specific; other platforms fall back to the direct route.
  • Single instance. The relaunch waits up to 20s for the old pid to disappear, because the app hands a second launch to the dying instance; if the pid outlives that, it relaunches anyway and logs it.
  • A restart interrupts the turn. Any tool call in flight is killed with the process.

License

MIT — see LICENSE.