插件目录 / Developer / dsh-setting-restart
dsh-setting-restart
已验证 · 实测可装 893413974-bit
功能简介
One-click restart of the DSH service from Settings → General. A dsh-plugin for DeepSeek Harness; the restart row stays pinned at the bottom of the general settings page. 在设置 → 通用设置中一键重启 DSH 服务。DeepSeek Harness 的 dsh-plugin,重启行固定显示在通用设置页面最底部。
可用 — 实测通过,早期项目
One-click restart of the DSH service from Settings → General. A dsh-plugin for DeepSeek Harness; the restart row stays pinned at the bottom of the general settings page. 在设置 → 通用设置中一键重启 DSH 服务。DeepSeek Harness 的 dsh-plugin,重启行固定显示在通用设置页面最底部。 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-setting-restart
One-click restart of the DSH service, from Settings → General. The "一键重启" row is pinned at the very bottom of the General settings page — no matter how many rows are added above it later, it always stays the last one. After the restart the page reconnects automatically and the row confirms it with a green "Connected" state, so you always know the service is back.
Features
- A one-click restart row at the bottom of Settings → General (below "繁忙时 Enter 键行为" / whatever comes last).
- The row is pinned with the maximum slot
order, so it always renders at the bottom of the page. - Restart is a real process restart: the host spawns a detached helper, exits, and the helper re-spawns the exact same
dshcommand (same executable, arguments, cwd and environment). The browser tab reconnects automatically once the new instance binds the same port. - Bilingual UI copy (简体中文 / English), following the DSH client conventions.
- Fully typed host invocation through the DSH Typert RPC registry (
settingRestart/restart).
Requirements
- DeepSeek Harness
dsh≥ 0.1.0-rc.6 (thewebprofile). - Node.js ≥ 20.
Installation
Install the package into the
webprofile (this runspnpm addinside the profile directory):dsh plugin --profile web add dsh-setting-restartMount it as a loader entry by appending an
insertpatch to the profile's user patch layer —$DSH_HOME/profiles/web/cordis.patch.yml($DSH_HOMEdefaults to~/.dsh):# $DSH_HOME/profiles/web/cordis.patch.yml - insert: - id: setting-restart name: dsh-setting-restartStart (or restart) the service:
dsh webOpen Settings → General — the "一键重启" row is at the very bottom. Click 重启 to restart the service; the page reconnects automatically.
The same patch can be added to the home-level
$DSH_HOME/cordis.patch.ymlto enable the plugin for every profile.
Configuration
The loader entry accepts an optional config block:
- insert:
- id: setting-restart
name: dsh-setting-restart
config:
exitDelayMs: 1500 # delay between the click response and process exit (default 1200)
waitForExitMs: 30000 # how long the helper waits for the old process to exit (default 30000)
respawn: true # set false when a supervisor (systemd/pm2) already restarts the service
How it works
browser row (client.js)
└─ connection.rpc.call("/api", "settingRestart/restart", { args: {} })
└─ api-gateway dispatches the strict typert invocation
└─ SettingRestartService.restart() (index.js)
├─ spawns relaunch.js detached ── waits for pid to die ── re-spawns the same command
└─ process.exit(0) after exitDelayMs
client.js— the browser bundle (dsh.client/exports["./client"]) that registers the settings row.typert.host.js— the TYPERT host manifest (exports["./typert"]) declaring the strictsettingRestart/restartinvocation.index.js— the host plugin (SettingRestartService) that performs the restart.relaunch.js— the detached helper that re-spawns the command after the old process exits.
Publishing
This package is published to npm and hosted on GitHub under the dsh-plugin topic:
npm publish
# then, on the GitHub repository page:
# Settings → Manage topics → add "dsh-plugin"
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-setting-restart」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:893413974-bit/dsh-setting-restart Headless(CLI)profile:
dsh plugin --profile headless add github:893413974-bit/dsh-setting-restart 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。