DeepSeek Harness Plugin

nishuoyang/dsh-workbench-ecs

Stars ★ 2 Downloads (30d) 595 Category Remote & Mobile Added 2026-12-01 npm dsh-workbench-ecs

Drives Alibaba Cloud ECS through the local Workbench CLI: 11 agent tools for cross-region instance search, remote exec with zero-escaping scripts, byte-cursor log reading, file and directory upload with sha256 verification, read-only diagnostics, guarded multi-step deploys, runbook checks and release snapshots, plus a settings panel. Instances need no public IP; destructive commands are rejected unless explicitly approved. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-workbench-ecs

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:nishuoyang/dsh-workbench-ecs

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

v0.10.0 · MIT License

中文 | English

A DeepSeek Harness (Cordis) plugin that lets the Agent control remote Alibaba Cloud ECS instances through the local Workbench CLI.

It drives the official Alibaba Cloud Workbench CLI locally and ships 11 agent-native tools (ecs_find / ecs_list / ecs_exec / ecs_log / ecs_upload / ecs_download / ecs_diagnose / ecs_deploy / ecs_runbook / ecs_snapshot / ecs_session), covering the full find → list → diagnose → execute → upload → restart → verify → snapshot check loop, plus a visual settings panel. Instances are reached through the Workbench backend channel, so no public IP is needed; destructive commands go through the Harness approval guard and are rejected unless explicitly allowed (fail closed).

Features

Only the highlights here; the complete list is in Complete feature list, and parameter-level details are in the tools reference.

  • Runs on both surfaces (v0.9.0+): the browser surface (dsh web) and the DeepSeek Harness desktop app (dsh-desktop-host) — one package, one lib/client.js; the settings tab and all 11 tools appear on both, locked in by test/compat.mjs
  • No public IP required: tools run the local workbench command and reach instances through the Alibaba Cloud Workbench backend; upload / download relay through OSS
  • Zero-escaping script delivery (v0.4.0+): ecs_exec { script } base64-delivers the body to a remote file and executes it, never through a shell quoting layer — nested quotes, Chinese text, $, backticks and heredocs all work untouched; bodies over 16KB are chunked and byte-verified
  • Guarded deployment (v0.6.0+): ecs_deploy { steps } expresses "upload → run → assert → read log" as one call; assert states exactly which check failed, what was expected and what happened; dry_run previews, from_step resumes
  • Release snapshots (v0.8.0+): ecs_snapshot makes "rollback point before + difference check after" a first-class tool — read-only collection written to .dsh/workbench-ecs/snapshots/<name>.json in the workspace, diffable / committable / greppable
  • Failures you can attribute (v0.7.0+): remote timeouts settle to exit_code: 124 (the CLI's JSON claims 0); guard rejections are explained in four distinct cases (no approval service / never policy / user rejected / no responder); upload failures say the problem is the "machine → OSS" hop, not the target instance
  • Long tasks and pseudo-sessions (v0.5.0+): detach starts a remote nohup job and returns job_id / log_path immediately without holding the instance; session_id carries cd/export across calls
  • Visual settings panel: CLI status, instance browser, one-click diagnostics with disk & memory gauges, guarded deploy wizard, sessions, operation timeline — auto-adapts to light/dark

Quick start

Three steps, about five minutes. Full instructions (all five credential modes, least-privilege RAM policy, multiple profiles, the Windows PATH trap) are in Installation & credentials.

1. Install Workbench CLI and configure credentials

# Linux / macOS
curl -fsSL https://workbench-cli.oss-cn-hangzhou.aliyuncs.com/install.sh | bash
# Windows (PowerShell)
irm https://workbench-cli.oss-cn-hangzhou.aliyuncs.com/install.ps1 | iex

workbench version      # self-check: prints version / commit / build date
workbench config       # prompts for AccessKey ID / Secret, writes ~/.workbench/config.json (0600)

Official docs: Alibaba Cloud — Install and configure Workbench CLI credentials (installation, least-privilege RAM policy, every credential mode, upgrade and uninstall). In production prefer a RAM role (RamRoleArn) over a long-lived AccessKey; scripts/workbench-setup.ps1 in this repo writes the config, fixes permissions and handles multiple profiles in one go.

2. Install the plugin

# browser surface
dsh plugin --profile web add dsh-workbench-ecs

# desktop app (a separate profile — the two are not interchangeable)
dsh plugin --profile desktop add dsh-workbench-ecs

Restart the host afterwards (the desktop app reads its profile only at process start).

3. Verify

# the desktop host uses 19387, `dsh web` uses 3080 — use whichever you run
curl -s http://127.0.0.1:19387/dsh-workbench-ecs/health
# => {"ok":true,"plugin":"dsh-workbench-ecs","version":"0.9.2"}

Then ask the agent to call:

ecs_list { region: "cn-shanghai" }
ecs_exec { instance_id: "i-xxx", command: "df -h" }

Tools at a glance

Tool What it does Since
ecs_find Cross-region instance search (name / ID / private & public IP / type / tag); searches all 22 public regions in parallel by default v0.7.0+
ecs_list List instances in one region with status / tag / type / name filters and pagination —
ecs_exec Remote command execution: zero-escaping script, instance_ids batches, concurrency, detach long tasks, session_id pseudo-sessions, read_only guard v0.5.0+
ecs_log Read any remote file by byte cursor (read-only) v0.5.0+
ecs_upload Upload a file or a whole directory (local_dir → tar + sha256 verify + remote extract), with retries on transient failures —
ecs_download Download a file from an instance —
ecs_diagnose One-shot read-only diagnostics (host / disk / memory / ports / containers), read-only guard on by default —
ecs_deploy Guarded deployment and multi-step orchestration: steps / assert / dry_run / from_step / runbook v0.6.0+
ecs_runbook Read-only inventory and static checks for workspace runbooks (validate / plan) v0.6.3+
ecs_snapshot Release snapshots: create / list / diff / against v0.8.0+
ecs_session Pseudo-session management (list / reset) v0.5.0+

What the commands look like

11 tools, 13 primary usage shapes: what you hand the Agent on the left, the exact command the plugin hands to the workbench CLI in the middle, and the interesting result fields on the right.

Command reference: 11 tools, 13 primary usages

A "502 triage -> deploy dry-run" session looks like this (read-only guard, script delivery, byte-cursor log follow, dry_run preview, zero-remote runbook check):

Session flow: from triage to deploy preview

Both images are rendered from HTML in this repo (docs/internal/assets/*.html); the commands come from the code paths that actually build the argv. Random instance IDs and temp filenames are elided.

Documentation

Doc Contents
Complete feature list All 30 feature notes verbatim, with the version and reasoning behind each
Installation & credentials Workbench CLI install, all five credential modes, least-privilege RAM policy, multiple profiles, manual install, local development
Usage guide Settings panel, how it works, project-level instance anchors (instances.json), production fix loop
Tools reference Every tool's parameters and results, built-in runbook templates, snapshots and diffs
Safety & troubleshooting Approval guard, read-only guard, exit-code semantics, common issues
Development & release Local debugging, test matrix, release flow and the traps hit along the way

Safety

  • Destructive commands fail closed: rm -rf, shutdown, reboot, mkfs, dd, iptables -F/-X and friends go through the Harness approval service; anything without allowed-once is rejected — the plugin never guesses that you meant it
  • Read-only guard: read_only: true rejects redirects, rm/mv/chmod, docker/systemctl mutations before they reach a shell; on by default for ecs_diagnose
  • Credentials stay local: the plugin neither reads nor forwards ~/.workbench/config.json — it only invokes the local workbench command; grant the RAM user the official least-privilege policy

Requirements

Item Requirement
Node.js ≥ 20
Host dsh web or the DeepSeek Harness desktop app — install the plugin into each profile separately
Workbench CLI On the same machine as the plugin, with credentials configured
Target instance Linux only (Workbench CLI connects over SSH; Windows instances are unsupported) with the Cloud Assistant agent running
Network The local machine reaches *.aliyuncs.com and the Workbench backend WebSocket; upload/download also need the instance to reach its regional OSS internal endpoint

License

MIT © 2026 nishuoyang

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.