Introduction¶
The DSH plugin ecosystem enables services to be run and managed locally. When managing multiple web sites or HTTP services, you typically need to handle registration, Git operations, and SSH remote deployment. The todaywei/dsh-wei-sitecontrol plugin aims to solve these problems. It registers local or remote sites into a registry that includes dependency information, and centrally manages their lifecycle, Git commits, and SSH release workflows in DSH.
What Is It¶
This is a site controller plugin for DeepSeek Harness. It provides a complete service management solution by using built-in pure JS Git (isomorphic-git) and an SSH release client (ssh2).
Core features include: a sidebar management panel (list, status, start/stop, logs, Git, release), site_* tools for the Agent, system monitoring (CPU/memory/disk, process usage, task names), and a fully-featured HTTP API. The plugin supports description-driven provisioning, scheduled releases, Release mode (including rollback), and a key vault.
Installation and Enablement¶
The installation process includes three steps: registering the plugin package, configuring the Profile, and registering the skill.
- Install the plugin package
Install the plugin package under the Web Profile; dependencies will be resolved automatically.
dsh plugin --profile web add <路径>\dsh-wei-sitecontrol-0.1.0.tgz
- Configure the Profile
Edit%USERPROFILE%\.dsh\profiles\web\cordis.patch.ymland append the plugin entry to the plugin list.
- insert:
- id: wei-sitecontrol
name: dsh-wei-sitecontrol
- Register the skill
Copy the skill file to the DSH Skills directory so that the Agent can discover it automatically.
# 将 skill/SKILL.md 复制到 %USERPROFILE%\.dsh\skills\dsh-wei-sitecontrol\SKILL.md
- Restart the service
Restartdsh webto load the plugin.
Core Features¶
1. Lifecycle and Monitoring¶
The management panel provides a site list, runtime state control (start, stop, restart), log viewing, and entry points for Git operations. The monitoring feature displays the local CPU/memory/disk usage in real time, the resource usage of each site’s processes, and the current DSH task list.
2. Git and SSH Deployment¶
The plugin includes isomorphic-git and ssh2, and does not depend on the system’s Git installation. It supports initializing, checking status, committing, and pushing in the site directory. SSH deployment supports In-place mode (direct overwrite) and Release mode (publishing to a new timestamped directory, with rollback support).
3. Description-Driven Provisioning¶
By providing an environment description text, the plugin can automatically parse it, connect to the server to read configurations (such as the docBase of Tomcat or the root of nginx), and backfill fields such as the release directory and service type, reducing manual configuration.
4. API and Extensions¶
It provides the /dsh-wei-sitecontrol HTTP API, which supports site management, health checks, key vault management, deployment script storage, and scheduled release scheduling.
Typical Usage¶
Description-Driven Provisioning¶
Send an environment description to the target server via a POST request; the plugin parses the text and automatically detects the server configuration.
POST /targets/<name>/provision
{
"text": "ip:203.0.113.10\nssh端口:TCP:22\n描述:…使用tomcat服务,tomcat应用目录在:/opt/tomcat9。程序发布目录在/srv/www。",
"user": "root"
}
Scheduled Release¶
Configure a schedule; when the time arrives, the plugin automatically executes the same code path as a manual release.
POST /schedules
{
"site": "example-site",
"target": "prod-server",
"at": "2026-10-06T12:00:00",
"note": "每日维护"
}
Key Vault¶
Import a local private key file; its contents do not enter the conversation or logs, and only the fingerprint and metadata are stored.
POST /keys
{
"name": "prod",
"path": "E:\\keys\\prod.pem"
}
Notes¶
- Data Storage Location: data such as the registry, keys, and logs is stored in
$DSH_HOME/storages/dsh-wei-sitecontrol/. - Key Security: key file permissions should be set to POSIX 600 or a Windows ACL limited to the current user. Key contents never appear in API, tool, or log output; only fingerprints are returned.
- SSH Client Limitations: the built-in SSH client (
ssh2) does not support PKCS#8-format keys (-----BEGIN PRIVATE KEY-----). If you need to use them, convert the keys to PEM format. - API Semantics:
POST /targetsuses PATCH semantics and only supports updatingnameandenvText; it does not modify other fields. - Permission Requirements: the plugin runs with the current DSH process permissions. Review the source code and license before installing.