Introduction¶
When developing DeepSeek Harness (DSH) agents, a common issue is: after an agent modifies its own configuration and restarts, it often crashes due to configuration errors and must rely on an external agent for “rescue.” The dsh-double plugin solves this problem by encapsulating self-management, self-evolution, and dual-brain communication logic, allowing DSH to safely modify and upgrade itself.
Plugin Overview¶
Name: dsh-double
Author: Junkrat9527
Category: Workflow
License: MIT
Description: Self-management & self-evolution plugin for DeepSeek Harness.
Core Features¶
The plugin provides a complete set of mechanisms that allow DSH instances to maintain and evolve themselves:
- Self-evolution (blue-green deployment): Includes configuration pre-checks (syntax and dependency checks), trial runs, and automatic rollback. Changes are applied to the main instance only after validation passes.
- Health probing: Verifies the health of the main instance through TCP, HTTP, and process checks.
- Snapshots and last known good state: Supports creating and restoring baseline snapshots.
- Wake-on-demand standby: Disk standby mode with zero processes and zero port usage, awakened only when the main instance becomes abnormal.
- Dual-brain mechanism: Provides a fully isolated second DSH instance.
- Agent-to-agent communication: Implements
twin_messagethrough the official/apigateway. - Dual-brain tools: Provides tools such as
twin_exec,twin_fs_read/write,twin_evolve, andtwin_log. - HTTP API: Provides
/double/*endpoints.
Installation and Enabling¶
Before installing, ensure your system meets the following requirements:
* Node.js >= 18
* Binaries bin/dsh-double.py and bin/dshd-supervisor exist on the host (distributed with the bin/ directory of the source code)
Installation command:
dsh plugin add dsh-double
After installation, you can view the status in the “Self-management” panel on the DSH settings page.
Typical Usage¶
The plugin offers both command-line tools and an HTTP interface.
Command-line example:
dsh-double.py testbed init && dsh-double.py testbed up
API invocation example:
Query status:
curl http://127.0.0.1:3080/double/status
Workflow example:
First run a configuration pre-check, then apply the changes, and finally confirm the status:
先跑 double_check 预检我的配置,然后 double_evolve 应用我准备好的变更目录,成功后 double_status 确认主实例健康、备用身已休眠。
Architecture and Notes¶
The plugin requires specific ports to distinguish instances during operation:
* Main instance: 3080
* Testbed: 3081
* Blue-green trial run: 3082
Plugin files are primarily located in the ~/.dsh/double/ directory and include snapshots, standby data, evolution records, communication logs, and so on.
Conclusion¶
By using blue-green deployment and the dual-brain mechanism, dsh-double provides DSH agents with the ability to self-repair and evolve. For DSH projects that require high reliability and self-maintenance capabilities, this is a plugin worth trying.
For more details, refer to:
* GitHub repository
* Plugin catalog