dsh-restart: Delayed Restart of Harness via /dsh-restart in DSH Web

Introduction

After modifying plugins, adjusting configurations, or upgrading dependencies in DSH Web, the Harness process often requires a restart to load the new behavior. If you are limited to manually running systemctl --user restart via SSH or killing and restarting processes in external scripts, the command interface is disconnected from the actual running environment. This also makes it difficult to confirm within a conversation that “a restart has been scheduled” before disconnecting.

The dsh-restart plugin described below (maintained by yoggu) registers the slash command /dsh-restart in DSH Web. It restarts the current Harness process or its systemd user unit after a short delay, allowing the command response to be sent back to the browser before the restart is executed. The plugin is categorized as admin-security in the SkillHub directory; the repository has 0 stars and is licensed under MIT (see GitHub).

What is this

dsh-restart is a DeepSeek Harness plugin for DSH Web (version v0.1.3 in current documentation). It addresses the need to securely and configurably trigger a restart of the “local Harness itself” via the web command panel, rather than having external tools blindly terminate the process.

The plugin runs with the permissions of the current DSH process; please review the source code and license before installation, and ensure that only trusted users can access the DSH command surface.

Core Features

Based on the README and package.json descriptions, the verified capabilities are as follows:

  1. Slash Command: Provides /dsh-restart, with an optional argument to specify a delay in seconds.
  2. Delayed Restart: Defaults to a 1-second delay before restarting, allowing the HTTP response to reach the browser first; the currently running turn will be interrupted, and the page will reconnect subsequently.
  3. Restart Methods: Configures mode via Plugins → Restart:
    • auto: Uses the plugin’s bundled systemd unit if detected, otherwise spawns a successor process;
    • unit: Specifies a systemd user unit;
    • exec: Configurable execution-related options such as execStdio.
  4. Adjustable Delay: The delaySeconds range is 1–60 seconds (consistent semantics for CLI arguments and the settings page).
  5. Environment Requirements: No additional credentials are required, but the DSH process must be permitted to restart itself or be able to schedule a systemd user timer.

Commands and responses are in English by default; setting Command language to Deutsch (language: de) in the plugin settings retains the original German text, independent of the Harness global UI language.

Installation and Activation

The installation command must use the tagged release format from the official README (do not construct github:owner/repo based solely on the plugin name):

dsh plugin --profile web add 'https://github.com/yoggu/dsh-restart.git#v0.1.3'

If the actual running profile is not web, replace --profile web with the profile you are using.

Restart DSH Web if necessary to load the command. To uninstall:

dsh plugin --profile web remove dsh-restart

package.json requires Node >=22.19.0, DSH engine ^0.1.5-rc.2 || ^0.2.0-rc.1, and depends on peer dependencies such as @deepseek-ai/cordis, @deepseek-ai/dsh-commands, and @deepseek-ai/schemastery.

Typical Usage

In the DSH Web command input box:

/dsh-restart       # Uses configured delay (default 1 second)
/dsh-restart 10    # Restarts after 10 seconds

Before first use, confirm in Plugins → Restart that mode, systemd unit, delaySeconds, and execStdio match your deployment method (systemd user service vs. direct exec successor process).

Applicable Scenarios and Notes

Suitable for: Developers or administrators who self-host DSH Web, frequently modify plugins or configurations, wish to schedule restarts with one click from within the web interface, and manage the Harness using systemd user units.

Notes:

  • It is categorized as admin-security because a restart is equivalent to a high-privilege operational action; it should only be granted to trusted users who can access the DSH command surface.
  • The plugin does not verify systemd policies on the host for you; you must ensure the process has the right to restart itself or create a timer.
  • Developers can run npm test within the repository (peer dependencies must be installed first); the tests mock process spawning, cgroups, and exit timers, and do not actually call systemd or restart processes.

The DSH ecosystem emphasizes “everything is a plugin”; the SkillHub directory page is a community site and has no official affiliation with DeepSeek or High-Flyer.

Conclusion

dsh-restart integrates “restarting the Harness” into web slash commands and the settings page. With configurable delays and multiple modes to adapt to systemd or direct exec, it reduces the need to switch to a terminal after making configuration changes.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye