Introduction¶
When performing operational troubleshooting or integration debugging in DeepSeek Harness (DSH), a common practice is: first gather clues from plugins like Grafana and OpenSearch in the conversation, then examine directories, processes, or ports on a specific host, or execute limited modifications. Relying solely on general Shell tools often lacks SSH and JumpServer asset selection integrated with the DSH workbench, as well as the boundary of “read-only by default, with write operations explicitly enabled by humans.” The following introduces the community plugin dsh-zterm (package name dsh-zterm, repository guhanfei-ai/dsh-zterm). It integrates the machine connection and terminal capabilities of zterm into DSH: DSH handles AI and cross-tool workflows, while this plugin handles connections, terminals, restricted read tools, human-enabled read/write operations, and actual result recording; queries and archiving for external systems are still handled by other DSH plugins.
What is this¶
dsh-zterm is published by the maintainer guhanfei-ai, with the plugin ID zterm (see cordis.patch.yml). Its positioning can be summarized as: providing a terminal and host/folder/JumpServer asset list on the right side of the DSH Web workbench (using an independent Tab and mind map switch when Better Sidebar is available, otherwise as a resizable independent large panel), and exposing 14 zterm_* tools to the conversation. This allows the AI to read from machines according to policies after binding a terminal, perform write operations after human authorization, and hand over records to other plugins for review and archiving via zterm_results.
The typical collaboration chain is as follows:
Specify host in DSH conversation, combining evidence from Grafana / OpenSearch etc.
→ Obtain assets and evidence
→ zTerm connects, reads, operates, and verifies the machine
→ DSH uses other plugins to review and archive results
Core Features¶
The following capabilities are all derived from the current delivery scope described in the plugin README and package.json.
Connection & Credentials¶
- SSH: Supports passwords, private key content, and host private key files; save named credentials in “Settings → zTerm”, select by name for multiple hosts, and private keys can be imported directly from files.
- Conversation-specified targets: Check remote hosts first, then JumpServer authorization; if no match is found, automatically save the host using the selected default private key credential or host default private key file.
- JumpServer: Instance configuration, on-demand node trees, paginated assets, authorized accounts, fresh tokens, and Koko SSH gateway.
Terminal & Workbench¶
- Optional DSH host local PTY; multi-terminal, size synchronization, manual input, terminal search, disconnect, and reconnect.
- Terminal defaults to 12px; adjustable to 8–32px in settings, applied instantly and saved in the current browser.
AI Tools & Permissions¶
- 14
zterm_*tools; read mode by default, entering read-write mode only after a human checks “Allow AI Write” on the bound terminal toolbar; general write commands are rejected when unchecked. - Real exit codes and completion boundaries; terminal serial locks, cancellation, pre-send authorization review, isolation of unclear results, and replay prevention via duplicate callId.
- Integration with DSH settings and credential library, operation logs and export, and restoring the last target list.
Execution & Data Boundaries (Awareness required before use)¶
- AI execution requires an idle POSIX Shell; each invocation uses a separate sub-shell,
cd/exportdo not change the environment of subsequent calls. - Terminals execute on the DSH Host; local terminals correspond to the host, not the browser’s computer.
- Authorization is only in memory; refreshing the page, changing binding targets, reconnecting, or reloading the plugin does not restore old read-write permissions.
- Configuration is in DSH settings, secrets in DSH credential library; fingerprints, call identifiers, target lists, and operation logs are in
$DSH_HOME/zterm/(or~/.dsh/zterm/if unset). Logs and terminal exports have limits and cannot be treated as receipts for successful external archiving.
The license is MIT, retaining the original zterm license notice; Node.js requirement is >=22.
Installation & Activation¶
The baseline is DSH 0.2.0-rc.2 and Node.js 22 or above. Better Sidebar is an optional peer dependency (README has verified the Tab contract of Web 0.24.1); @deepseek-ai/dsh-tools is also an optional peer. Acceptance testing with real models and real test machines must be completed by yourself.
The installation method provided in the README is loading from a local package or source debugging directory into a specified profile (example is Web profile), not a generic dsh plugin add github:... command stitched from the repository name:
Install the built local package to the target profile, for example:
dsh plugin --profile web add "/path/to/dsh-zterm/out/dsh-zterm-0.1.10.tgz"
Local source debugging:
dsh plugin --profile web add "link:/path/to/dsh-zterm"
Refresh the page after loading or reloading the plugin via the existing DSH interface or method. The above examples only operate on the Web profile and do not affect the desktop profile.
The package manager must allow this plugin’s postinstall and required native dependency build scripts. scripts/prepare-native.mjs only fixes the spawn-helper execution bit of macOS node-pty in this dependency directory; SSH does not rely on local PTY, only enabling host local terminal requires a working node-pty. If the installation strategy skips plugin scripts, you should run this script in this plugin directory before accepting local PTY.
Typical Usage¶
The main flow reproducible according to the README “Getting Started” is as follows.
- Manage credentials under [Save Settings] in “Settings → zTerm”: Name, Type, Content; when adding hosts, select saved credential names, or set a default SSH private key credential for AI to use when automatically adding new hosts.
- Specify a hostname or IP in the conversation. AI uses
zterm_connectto automatically find, save, and connect; you can also click “zTerm” to select saved targets from the right side. - Click the target to establish a connection; verify the first-time SSH fingerprint via trusted channels. After connection, click “Bind AI”, or let AI call
zterm_bind. - Have the AI use read tools (directory, file, system, process, or port) to inspect the machine (general commands are rejected in default read mode).
- When modifications are needed, the human checks “Allow AI Write” on the bound terminal; AI can continuously execute policy-allowed commands, defaulting to a maximum of 100 commands per authorization.
- After verifying the effect via read tools, monitoring, or logs, use
zterm_resultsto hand records to other plugins for archiving.
Supplementary behavior: After manual input, AI pauses and switches back to read mode; after ending interactive programs like vim/less and confirming an idle shell, click “Confirm Idle Shell”. Switching visible tabs does not switch AI binding targets. For more complete workflows, settings, and FAQs, see the Chinese User Guide in the repository.
Scenarios & Notes¶
Who it is for: Developers or operations personnel who are already using multiple plugins in DSH for evidence chains (monitoring, logs, tickets, etc.), and need to SSH/JumpServer to real machines within the same workbench for read-only verification, and perform limited write operations and result export after explicit human authorization.
Permissions & Security: The plugin runs with the permissions of the current DSH process and its host environment; read the source code and MIT license as well as THIRD_PARTY_NOTICES.md before installation. Do not treat arbitrary remote output as fully masked; the manual terminal will display the machine’s actual output.
Ecosystem Note: DSH adheres to “Everything is a plugin”; the SkillHub Directory Page is a community collection site and has no official affiliation with DeepSeek/Hunyuan.
Conclusion¶
dsh-zterm embeds zTerm’s real machine terminal capabilities into DSH conversations and the workbench: named credentials and JumpServer, read-only by default with human-enabled write operations, 14 zterm_* tools and result recording, facilitating a closed loop of “Forensics → On-machine Verification → Archiving” with plugins like Grafana and OpenSearch.
- Directory Page: https://www.skillhub.cn/plugins/guhanfei-ai/dsh-zterm
- GitHub: https://github.com/guhanfei-ai/dsh-zterm