DeepSeek Harness 插件

dsh-setting-restart

One-click restart of the DSH service from Settings > General (通用设置 · 一键重启)(英文原文)

跳到安装方式

来源信息

GitHub 仓库
893413974-bit/dsh-setting-restart
最近更新
2026年8月18日
分类
工具与能力
GitHub stars
3
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/893413974-bit/dsh-setting-restart
插件名:dsh-setting-restart
作者:893413974-bit

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

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.

![dsh-plugin](https://github.com/topics/dsh-plugin)

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 dsh command (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 (the web profile).
  • Node.js ≥ 20.

Installation

1. Install the package into the web profile (this runs pnpm add inside the profile directory):

``sh dsh plugin --profile web add dsh-setting-restart ``

2. Mount it as a loader entry by appending an insert patch to the profile's user patch layer — $DSH_HOME/profiles/web/cordis.patch.yml ($DSH_HOME defaults to ~/.dsh):

``yaml # $DSH_HOME/profiles/web/cordis.patch.yml - insert: - id: setting-restart name: dsh-setting-restart ``

3. Start (or restart) the service:

``sh dsh web ``

4. Open 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.yml to 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 strict settingRestart/restart invocation.
  • 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