Introduction¶
DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture, allowing developers to extend various operations, monitoring, and collaboration capabilities within DSH. However, in practice, daily Linux server inspections, backup restoration, and operations sessions often require switching across multiple tools, with configurations scattered and lacking a unified operational entry point. yanaoyong/dsh-server-ops-agent provides a set of plugins within DSH for Linux operations, backup Time Machine, and native operations sessions. It connects to a low-privilege daemon running on the server via existing SSH connections, offering a unified monitoring overview, Time Machine recovery, and a host-bound native operations Agent workspace within DSH.
What Is It¶
This is a Linux operations, backup Time Machine, and native operations session plugin for DeepSeek Harness (DSH). Maintained by yanaoyong, the current version is v0.4.0-beta.3, released under the MIT License. It connects to a low-privilege daemon running on the server through an SSH slim-forwarding entry point, achieving zero public listening ports and zero persistent desktop background processes.
Core Features¶
3-Tab Operations Workbench¶
The plugin provides three core tabs in DSH, managing multiple Linux hosts through a global top bar and settings drawer:
- Tab 1 · Overview: Top status peace-of-mind bar (with an embedded expandable daily 07:00 pure-function morning report summary), 2×2 core 24h trend cards (CPU / Memory / Disk mount points with 24h net change and Top directories / SSH security events), dynamic service and probe matrix, and a bottom backup health bar. Supports DSH KV snapshot caching (<500ms first-screen rendering), with automatic refresh for cold connections to fetch real-time data.
- Tab 2 · Time Machine: Displays local and remote backup repository status, supports single-end retry and immediate snapshot triggering; dual-pane snapshot browser (left pane: timeline + right pane: paginated directory table, debounced search, “show only changes since previous snapshot” filter), with one-click secure isolated recovery.
- Tab 3 · Activity & Daily Reports: Unified filtering of alert events, daily 07:00 pure-function inspection reports, and background task archives; all deep investigations are completed in DSH’s left-side native workspace, with zero handcrafted chat boxes in the page.
Three-Way Permission Split + Zero Public Port Architecture¶
- SSH Slim-Forwarding Entry Point:
/usr/local/bin/dsh-server-ops. Uses DSH single SSH connection reuse (5-minute idle auto-reclaim, enforced SHA-256 host fingerprint verification). Each request is routed to the corresponding Unix Socket by RPC verb, exits after reading with no orphan processes. - Dual Unix Socket Low-Privilege Daemon:
server-ops-daemon. Runs as low-privilegeUser=server-ops(withProtectSystem=strictandNoNewPrivilegesenabled, never added to thedockergroup), responsible for 60-second sampling, SQLite WAL ledger (with 30-day automatic retention cleanup), and pure-function 07:00 daily reports. It never holds any backup credentials or keys: read.sock(server-ops-readgroup): Allows only read-only observation, snapshot directory browsing, and task status queries.admin.sock(server-ops-admingroup): Allows only writing schema-validated0600async task request files (e.g., immediate snapshot, remote retry, secure isolated recovery).- Root Read-Only Probes & Whitelist Task Executor: All root-write directories are unified and isolated under
/var/lib/server-ops-agent-root/(results/,restores/,catalog/,probes/are all0750 root:server-ops-read,server-opsis read-only only), and symlink hijacking is completely eliminated viaO_NOFOLLOW+dirfd: server-ops-container-probe.timer→.service: Executes read-only container/supervisor probes as root every 60s and exports sanitized snapshots.server-ops-jobs.path→server-ops-jobs.service: Triggered viaoneshotexecution, exclusively locksRuntimeDirectory=server-ops-agent-jobslock file, validatesO_NOFOLLOW, UID, and0600permissions before executing tasks per whitelist verbs with 8 GiB space reservation.
restic First-Class Universal Time Machine & Secure Isolated Recovery¶
The plugin treats restic as the first-class universal backup engine in the public release, supporting “local repository + remote storage (S3 / rclone, etc.)” by default, and is backward compatible with restic 0.12+ v1 and v2 repositories (never automatically executes destructive repository format migrations). Through scheduled read-only index export (catalog-export.py), it generates lightweight snapshot directory indexes, enabling millisecond-level directory browsing, keyword search, and cross-snapshot diff comparison (diff).
Never overwrites original files: Whether through UI operations or Agent calls, all recoveries are forced to first preview target paths and check space, generate a one-time confirmToken for human confirmation, and then the root executor restores to an isolated directory /var/lib/server-ops-agent-root/restores/<jobId>/files.
13 Native Operations Session Tools¶
In DSH’s native operations workspace, the Agent is automatically restricted to the following 13 authorized tools (dynamically bound to the target host based on the current workspace serverId):
- Agent Bootstrap Deployment (3 tools):
deploy_probe: Read-only probe of the target host’s OS/architecture, systemd, Node runtime, Docker, mount points,restic, andsudocapabilities (returns SHA-256 host fingerprint for user verification when no fingerprint is provided).deploy_install: Explicitly displays host fingerprint, Node 22 LTS self-pull requirement, granted user groups, and initial read-onlyprofile.yamlscope via DSHuserQuestionshuman confirmation card; after confirmation, uploads verified installation package, deploys service, and enforces SSH reconnection verification.deploy_status: Checks the readiness state of the daemon, dual Unix Sockets, and task executor on the target host or current workspace host.- Host Observation (1 tool):
read_host_observations(snapshot overview, event/report/task ID forensics, resource and dynamic mount point historical trends). - Backup Time Machine (6 tools):
read_backup_status,list_backup_snapshots,browse_backup_files,trigger_backup_snapshot,retry_backup_destination,read_backup_job. - Controlled Isolated Recovery (3 tools):
find_missing_workspace_items,recover_workspace_items(enforced preview + human confirmation card),read_workspace_recovery.
Installation & Activation¶
Plugin compatibility: engines.dsh supports >=0.2.0-rc.2 || >=0.2.1-rc.2 || >=0.2.2-rc.1 (verified with 0.2.2-rc.5); Linux server side supports ARM64 and x86_64 (systemd + OpenSSH + Python 3 + glibc).
DSH Plugin Marketplace Installation (npm beta tag)¶
Add plugin dsh-server-ops-agent@beta in DSH.
DSH Public Custom Plugin Index¶
Enable “Custom Plugin Index” in DSH, and add the public index address to “Discover”:
https://raw.githubusercontent.com/yanaoyong/dsh-server-ops-agent/main/index.json
GitHub Release Offline Packages & Server Packages¶
Download same-version artifacts from GitHub Releases and verify against SHA256SUMS:
- DSH plugin offline package: dsh-server-ops-agent-0.4.0-beta.3.tgz
- Linux server offline package: linux-release.tgz
- Verification manifest: SHA256SUMS
For more configuration details, see:
- Installation, Upgrade, Permission Groups & restic Integration Guide
- Public Distribution Plan & Acceptance Criteria
Building from Source¶
The build environment requires Node.js >=22.13 (with built-in node:sqlite), pnpm (via corepack), and Python 3. After checking out the target tag, run:
corepack pnpm install --frozen-lockfile
corepack pnpm typecheck
corepack pnpm run build
corepack pnpm run pack:linux
corepack pnpm test
npm pack
cp generated/linux-release.tgz linux-release.tgz
shasum -a 256 dsh-server-ops-agent-0.4.0-beta.3.tgz linux-release.tgz > SHA256SUMS
corepack pnpm run pack:linux generates a zero-dependency Linux server distribution package under 1 MiB and embeds it into the DSH plugin; at release time, the Linux package, plugin .tgz, and SHA256SUMS are synced to GitHub Release, and the plugin package is published to the npm beta tag.
Use Cases & Notes¶
This plugin is suitable for operations scenarios requiring unified management of multiple Linux hosts within DSH, including daily inspections, backup restoration, and operations sessions. The plugin runs with the current DSH process privileges; source code and license should be reviewed before installation. The plugin is released under the MIT License, and generated/ssh-licenses.txt within the plugin package records the open-source license information for built-in SSH dependencies.
Brief Closing¶
This plugin provides a complete set of Linux operations capabilities within DSH, achieving a secure and controllable operations experience through three-way permission split and zero public port architecture. It is ideal for developers and operations personnel who need to manage multiple Linux servers within DSH. For more details, refer to the catalog page and the GitHub repository.