DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@moonsand/dsh-desktop-restart

Desktop Restart

侧边栏底部的 Reload UI 和 Restart App 按钮:Reload UI 仅刷新界面和客户端插件,Restart App 会重新启动 DeepSeek Harness 桌面应用及其 Host。

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

npx -y @deepseek-ai/dsh plugin --profile web add @moonsand/dsh-desktop-restart@0.1.6
README兼容性版本

兼容性与来源证明

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

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/11/4

版本

0.1.6stable
2026/10/25
0.1.5stable
2026/10/25
0.1.4stable
2026/10/25
查看其余 4 个版本收起版本
0.1.3stable
2026/10/25
0.1.2stable
2026/10/25
0.1.1stable
2026/10/25
0.1.0stable
2026/10/25

相关插件

正在加载相关插件…

最新版
0.1.6
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
68.9 kB
文件数
10
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
411
安全扫描
✓ v0.1.6 扫描通过
最近提交
2026/10/25
查看源码 ↗项目主页 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

继续浏览 ui-customization 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Experimental Session Titles Bundle@deepseek-ai/dsh-experimental-session-titles-bundle新的用户提示到达时刷新会话标题。Personalized Recommendations@deepseek-ai/dsh-personalized-recommendations回答下方以卡片形式提供个性化页面和内置插件推荐Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义

README

dsh-desktop-restart

English | 中文

Two buttons in the sidebar foot of the DeepSeek Harness desktop app: reload the interface, or restart the entire application (app + Host).

The production desktop shell ships no Reload Page menu item and no built-in accelerator for it, and it exposes no way to relaunch itself — app.relaunch() lives in the Electron main process and is wired only to crash recovery. This plugin adds both, as ordinary sidebar actions.

[⟲ 刷新界面] [↻ 重启应用]
ButtonWhat it does
Reload UIlocation.reload(). Reloads the page and every client plugin; the Host keeps running and turns in flight are not interrupted.
Restart appAsks the Host to end every process of the application binary and start it again from the same path. Second click to confirm; the label turns red when Agent turns are running.

Requirements

  • Windows only. The restart path is built on the Windows Task Scheduler and Windows Script Host.
  • DeepSeek Harness desktop 0.2.1-rc.2 or newer (declared in engines.dsh; tested on 0.2.1-rc.3), Node >=20.
  • No npm dependencies. index.js imports only Node built-ins; client.js imports react, provided by the shell.

Install

From npm:

pnpm add @moonsand/dsh-desktop-restart

From a local checkout, while developing:

# "dependencies": { "@moonsand/dsh-desktop-restart": "link:D:/path/to/dsh-desktop-restart" }
pnpm install

Either way, the package must also be registered as a bundle — that entry is what actually loads it:

"dsh": { "profile": { "bundles": [ ..., "@moonsand/dsh-desktop-restart" ] } }

A package that is installed but absent from dsh.profile.bundles silently does nothing: it produces no error and no button. Add the bundle entry, then restart the app.

The package ships its own cordis.patch.yml, which inserts the Host-side service, so no edit to the profile patch layer is needed.

Plugin market index (self-hosted)

market/index.json in this repository is a format 1 plugin market index, validated by DSH's own @deepseek-ai/dsh-plugin-market-index. To see this plugin in the desktop app's Plugins → Discover tab:

  1. Push the repository to GitHub; the index URL is https://raw.githubusercontent.com/MoonSand/dsh-desktop-restart/main/market/index.json (GitHub Pages works too).
  2. Plugins → Discover → Add index source, then paste that https URL. Index sources accept http: / https: only, without credentials or a fragment.
  3. Cards show the bilingual title and description — the index stores description as an { "en": …, "zh": … } object and must contain en; a Chinese-only value is rejected by the validator. Installing uses the exact npm version.

Every version entry carries engines.dsh matching package.json; the Discover tab derives compatibility and the default version from it, and disables Install when no version is compatible. When publishing a new version, append a versions entry with version, the real publish time as Unix seconds in publishTimestamp, and source.type: "npm".

How the restart works

Three platform facts shape the design, all measured on a real machine:

  1. A detached powershell.exe starts but never runs its -EncodedCommand script — silently, with no error. The helper is spawned as a plain child instead.
  2. Every process the Host starts inherits Chromium's job object with kill-on-close, so anything the Host spawns dies with the application's main process. A helper that kills first and launches afterwards dies between those two steps.
  3. The Task Scheduler service resolves launches in its own process, outside that job, which is the only way to leave something running that outlives the kill.

So the order is inverted:

Client click
  -> POST /desktop-restart/restart
    -> Host writes watchdog.ps1 + launch.vbs, spawns a helper (powershell -EncodedCommand, not detached)
      -> helper creates a one-shot scheduled task: wscript.exe launch.vbs   (GUI subsystem, no console)
        -> launch.vbs starts watchdog.ps1 hidden (window style 0)
      -> helper polls a marker file (<= 5 s) to prove the watchdog is alive
      -> without that proof it aborts and kills nothing
      -> helper exits — it lives inside the job and must not touch the kill
  -> watchdog (outside the job): sleep 1.2 s -> kill every process of the executable
      -> wait for all to disappear -> sleep 0.6 s -> Start-Process the same path
      -> verify it came back (up to 3 attempts, 6 s apart) -> append to the log

HTTP routes

RoutePurpose
GET /desktop-restart/status{ desktop, restarting, activeAgents, logPath }
POST /desktop-restart/restartNeeds header x-dsh-desktop-restart: 1 (or the desktop proxy shape: loopback peer, no Host/Origin header)
POST /desktop-restart/diagnoseArms a watchdog in probe mode and reports { armed, method }. Kills nothing — use it to check the chain without restarting.

Files

FileRole
index.jsHost half: routes, helper/watchdog generation, arming, kill/relaunch mode
client.jsClient half: the two sidebar actions, styles, zh/en dictionaries, confirm state machine
cordis.patch.ymlInserts the Host service into the profile
package.jsonDeclares both halves (dsh.bundle.patch + dsh.client)
locale/*.jsonPlugin page name and description
icon.svgSidebar icon

Because the package declares a Host half, Host changes need an app restart; client-half changes only need a page reload.

Known limitations

  • The restart is a hard kill (TerminateProcess). The turn in flight is interrupted. Session history and anything already written to disk are unaffected.
  • A restart is refused while a package manager is installing into the profile (409 installing). Three signals are checked: the plugin manager's own plugin-manager/install-state reports (installing / cancelling / applying) — authoritative, but it never reports completion, so a phase expires after ten minutes; a manifest written within the last 10 seconds, which catches the moment an install finishes, since the lockfile is written last; and, as a fallback, a live node process whose command line mentions pnpm. The 10-second window is kept short on purpose: a finished install should not block a restart for longer than it takes to notice. All three are best-effort and fail open.
  • Only the Windows desktop app is supported. On a plain dsh web Host the route answers 409 not-desktop and the button falls back to reloading the page.
  • When the Scheduled Task channel is blocked by policy, the helper falls back to launching PowerShell directly, which may flash a console window; the log marks it (direct powershell).
  • No keyboard accelerator. The desktop shell hands shortcut combinations to a trusted native bridge before page handlers run, so a page-level listener cannot see them; adding one through the product's shortcut service would pull in a dependency this plugin does not otherwise need.
  • tasklist.exe is not used for process detection: on a measured machine it answers Access denied (exit 1) in this context, which would make every poll report the app as gone and start several copies. Detection filters by image name first (Get-Process -Name) and then checks .Path.

Development

npm test          # smoke: builders, install guard, both sidebar actions, PS 5.1 parse
node --check index.js
node --check client.js

The three script builders are exported as pure functions, so they can be generated and handed to the Windows PowerShell parser without arming anything:

import { watchdogSource, watchdogLauncherSource, restartHelperScript } from '@moonsand/dsh-desktop-restart'

Safe way to exercise the whole chain without touching a live app: generate a watchdog with a non-existent executable path, run it with powershell -File, and watch the log walk matched pids: -> application gone=True -> relaunch issued -> watchdog end.

Logs

Everything the helper and the watchdog do is appended to %TEMP%\dsh-desktop-restart.log. This is the first place to look when a restart misbehaves. The GET /status route reports the exact path.

License

MIT. See LICENSE.