dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DSH Web 远程运维插件:管理 SSH 服务器、采集硬件与进程指标、以只读 AI 巡检日志,并通过 SSH 部署 Git 仓库(git pull --ff-only 加健康检查)。凭据 AES-256-GCM 加密存储。支持 Linux 与 macOS,不支持 Windows。
Server operations inside the DSH Web app: SSH server management · hardware / process / log monitoring · AI inspection · a Git deploy loop
dsh-devops is a DeepSeek Harness (DSH) Web plugin. Without leaving the chat view or opening a separate terminal, you open Remote Operations from the DSH sidebar to add SSH servers, watch hardware and processes, have the AI inspect logs and process anomalies on a schedule, and deploy a Git repository to a server and restart its services.
The core of it is a deploy loop:
.sh scripts (candidate → verified → invalidated, hash-pinned against tampering),
so one-off environment work and routine updates are handled separately.git pull --ff-only on the server (fast-forward
only, no surprise merges or rebases). Frozen steps run their script, unfrozen steps fall back
to the AI, and a failure is retried after AI-assisted repair (2 rounds by default).Inspection is always read-only: the AI analyses and recommends, it never repairs or restarts anything on its own. That boundary is enforced structurally by tool permissions, not by prompt wording.
| Server overview | Hardware monitoring |
|---|---|
| Process groups and AI inspection | Project service detail |
|---|---|
Projects: multiple projects, repositories and deploy targets; a first AI deploy and a manual update are both one click away.
git pull --ff-only → dependency update /
build → service restart → health verificationdsh plugin mechanism — see Compatibility
for the versions this was verified againstDSH_DEVOPS_KEY_FILE before you save any credential (see below)Prebuilt on both paths — you never run a build on your machine:
# from npm (preferred: no build approval needed)
dsh plugin --profile web add @bigbigtooth/dsh-devops
# or from a prebuilt tarball
dsh plugin --profile web add https://github.com/bigbigtooth/DSH-DevOps-Plugin/releases/latest/download/dsh-devops-latest.tgz
You must restart the host afterwards — plugin bundles are loaded at boot, and plugin add
only writes the manifest:
pkill -f '\.bin/dsh --profile web'
sleep 2
nohup ~/.dsh/tooling/node_modules/.bin/dsh --profile web >> /tmp/dsh-web.log 2>&1 &
After installing, a Remote Operations entry appears at the bottom of the DSH sidebar, above Settings. Click it to open the operations panel, and use "Back to conversation" to return to chat at any time.
For headless use, swap
--profile webfor--profile headless. The UI half of this plugin only exists under the web profile; inspection and deployment work in either.
DSH_DEVOPS_KEY_FILE the plugin uses an in-memory key
that is regenerated on every host start, so stored credentials cannot be decrypted after a
restart:
export DSH_DEVOPS_KEY_FILE="$HOME/.dsh-devops/master.key"
The key file is written with mode 0600. There is no recovery path — lose the key file and
the credentials are gone.file: spec from cache, so
remove before adding:
dsh plugin --profile web remove @bigbigtooth/dsh-devops
dsh plugin --profile web add @bigbigtooth/dsh-devops
The full disclosure is in SAFETY.md. Summary:
| Item | Detail |
|---|---|
| Local files read | Only <dataDir> (default ~/.dsh-devops) and the host storage domain dsh_devops. Not ~/.ssh, not shell history |
| Remote files read | Hardware, processes, logs and the git working tree on the servers you add |
| Network egress | ① to your servers (SSH); ② to your configured model (inspection and deploy data). No telemetry, no third-party endpoint |
| API keys | The plugin holds no model API key of its own; it uses the host's LLM service |
| Write behaviour | Inspection is read-only; deployment writes only inside a task you explicitly created (git pull --ff-only, build, restart) |
| Conversation data | Never read and never transmitted. AI context is assembled from inspection and deployment material only |
| Install scripts | No preinstall / install / postinstall |
DSH is entirely on rc and the maintainers state that breaking changes are expected. Align your versions with this table:
| dsh-devops | DSH (harness) | Status |
|---|---|---|
| 0.5.0 | 0.1.5-rc.2 | ✅ Verified (full test suite plus a real install) |
| 0.4.x | 0.1.5-rc.2 | ✅ Verified |
The package was renamed from
dsh-devopsto@bigbigtooth/dsh-devopsin 0.5.0 because the unscoped name on npm is reserved by someone else. 0.4.x remains installable from thev0.4.0release assets.
Check the host version with dsh --version. dsh-devops declares a stable range for
@deepseek-ai/cordis (^4.0.1; both are optional peers), so there is no prerelease triplet
matching problem. When the host moves to a new minor, upgrade this plugin first.
There is no console exporter during install and ctx.logger only writes to an in-memory buffer,
so neither logs nor exit codes are a verification signal. The only hard evidence is that the
layer loads and that a real route answers:
# 1) Is the config layer present? (you should see a dsh-devops layer)
dsh --profile web --dump-config | grep -A5 'dsh-devops'
# 2) The host log should show no activation gate failure
# 3) Open "Remote Operations" after boot and add a server — the mandatory login test
# actually executes a remote command, so its success is the real proof
The defaults below can be overridden through the cordis patch layer:
| Field | Default | Description |
|---|---|---|
dataDir | ~/.dsh-devops | Private data directory (SSH config, keys, degraded storage) |
modelRef | null | Model used for AI inspection and deploy steps; when empty, AI steps honestly report the capability as unavailable |
hardwareIntervalSeconds | 60 | Hardware collection interval |
processIntervalSeconds / logsIntervalSeconds | 300 | Process / log AI inspection interval |
retentionDays | 30 | Retention for ordinary history (config and valid scripts are not pruned) |
batchBudgetTokens | 8000 | Per-batch AI input budget |
The DSH_DEVOPS_KEY_FILE environment variable points at the credential master key file
(see trap 1 above).
git clone https://github.com/bigbigtooth/DSH-DevOps-Plugin.git
cd DSH-DevOps-Plugin
pnpm install
pnpm build && pnpm pack --pack-destination dist
dsh plugin --profile web remove @bigbigtooth/dsh-devops # required before reinstalling the same version
dsh plugin --profile web add ./dist/bigbigtooth-dsh-devops-*.tgz
Installing from Git means you build it yourself — git installs do not run build scripts.
pnpm typecheck # strict types (host / client / tests)
pnpm test:unit # contracts / SSH / vault / repository / execution / probes / inspection / logs / scheduler / scripts…
pnpm test:contract:dsh # real cordis runtime lifecycle + restart persistence
pnpm test:integration:ssh # private config / askpass / fingerprint / execution / stop
pnpm test:integration:ops # real git repository deploy pipeline
pnpm test:e2e:web # full path + counterexample matrix
pnpm test:acceptance # executable subset of the product acceptance suite
pnpm test # everything
The SSH and deployment integration suites run against an in-process fake, so no real server is needed. See CONTRIBUTING.md.
src/contracts/ DTO schemas, error codes, deploy state machine, API contracts (shared by both sides)
src/host/
adapters/ ports + DSH / file / memory adapters (business logic depends on no SDK)
repository/ versioned records, migration backups, atomic claim, requestId idempotency
vault/ AES-256-GCM credential envelope, redaction
ssh/ command whitelist parser, private config generation, OpenSSH transport (private askpass channel)
execution/ identified remote execution units (intent first, fact file, stop reconciliation)
probes/ hardware / process collection (Linux + macOS parsers, missing fields are null, not 0)
agents/ restricted AI inspection (batched, coverage-tracked, evidence verified server-side)
logs/ Supervisor discovery, dual cursors, incremental reads, alert de-duplication
scheduler/ persistent scheduling (single-flight coalescing, no catch-up, jitter, AI concurrency cap)
deployment/ git precheck, ff-only update, first-deploy orchestration, repair (≤2 rounds), recovery, reconciliation
scripts/ candidate → verified → invalidated (hash-pinned, applicability fingerprint)
api/ zod-validated RPC dispatch (/rpc/dsh-devops on the authenticated channel)
src/client/ slots entry + large-card page modules (servers / projects + their detail pages) + charts + state model
config, the plugin receives undefined (not {}), so Config
must fall back with .prefault({}) or the whole plugin tree fails to boot.ctx.get(name); domain and table names must match ^[a-z][a-z0-9_]*$ (dsh-devops→
dsh_devops, inspectionRuns→inspection_runs), mapped at the adapter boundary.ctx.effect, awaiting them serially.