Preface¶
DSH (DeepSeek Harness) operates on the philosophy of “everything is a plugin.” Agent developers frequently need to configure environment access capabilities for an Agent. For scenarios requiring macOS interaction, the traditional approach is to directly connect to a real machine or write complex wrappers. The dsh-terminal-mac plugin introduced here offers an alternative: through virtual machine isolation, it directly invokes guest-internal capabilities such as screenshot, click, and typing within the Harness, while also controlling the virtual machine lifecycle.
Plugin Positioning¶
dingmac/dsh-terminal-mac is a DSH bundle plugin that packages “a full set of virtual Mac capabilities” into a standalone plugin. Maintainer: dingmac. It solves the problem of “how to safely operate a macOS environment within an agent workflow,” providing two sets of capabilities—guest-internal operations and virtual machine start/stop—and includes a built-in skill to teach the Agent when to use these capabilities.
Core Features¶
This plugin provides two plugin lines via its bundle structure:
-
@deepseek-ai/dsh-mcp-client(serverNameterminal-mac)
Connects to the stdio MCP server bundled with terminal-mac, exposing eight guest-internal operation tools undermcp__terminal-mac__*. -
@local/dsh-terminal-mac
Provides virtual machine lifecycle tools (terminal_mac_vm_*) and an embedded skillvirtual-mac.
Tool definitions use plain objects with hand-written JSON Schema, avoiding a dependency on defineTool. Lifecycle commands invoke the launcher via node:child_process.execFile with timeout control; when exec.signal cancels, SIGTERM is sent to terminate the child process.
The approval mechanism is implemented in tools/pre-execute: it returns ask only when confirm === true (or requireConfirm). The skill is optionally injected via ctx.inject(['skills'], ...) before calling ctx.skills.register(), with the body sourced from skills/virtual-mac/SKILL.md.
After executing an action command, a follow-up status call is made to read the actual state.
Installation and Activation¶
Use the official install command:
dsh plugin add <absolute path to this directory>
After installation, you must reload the plugin or restart the Harness for changes to take effect.
Typical Usage¶
The plugin inserts two plugin lines, corresponding to MCP guest operations and virtual machine lifecycle management respectively. The embedded skill virtual-mac guides the Agent in deciding when to invoke guest tools and when to control the virtual machine start/stop. After modifying index.js or the skill body, you must disable → enable the plugin or restart the Harness for changes to take effect.
Use Cases and Caveats¶
Suitable for scenarios requiring access to a macOS environment via a virtual machine, such as cross-platform automated testing or environment-isolated interactive tasks.
Caveats:
- The plugin runs with the permissions of the current dsh process. Review the source code and license before installing.
terminal_mac_vm_stopwill discard unsaved content inside the guest;pausedoes not release memory.- Action commands do not return state; a follow-up
statuscall is required to read the actual state. - The skill service is optional. The plugin still works normally in profiles without the skill service.
Conclusion¶
dingmac/dsh-terminal-mac packages “a full set of virtual Mac capabilities” as a DSH plugin. Through the combination of MCP guest tools and lifecycle tools, it provides guest-internal operations and virtual machine control within the Harness. Its bundle structure and built-in skill give the agent a closed-loop decision process for “when to use, when to shut down.”