Introduction

The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” In local development or usage scenarios, enabling an AI agent to directly interact with the desktop environment is a common requirement. dsh-mac-control is a native macOS plugin that extends the capabilities of DeepSeek Harness to browser tab control and local desktop application operations, without requiring additional services.

Core Features

The plugin provides two types of tools, targeting browsers and desktop environments respectively:

  • mac_browser: Controls tabs in Safari and Google Chrome.
  • mac_desktop: Reads and operates local applications, windows, and Accessibility controls, and supports screen capture.
  • General interaction: Supports text input, clicking, key presses, and taking screenshots.

Installation

Use the official command to install the plugin:

dsh plugin --profile web add dsh-mac-control

Usage

After installation, restart the web profile and specify which tool to use:

  1. Restart the web profile.
  2. Tell Harness to use mac_browser or mac_desktop.
  3. On first use, approve the permissions required by the Harness process in macOS settings, including Automation, Accessibility, and Screen Recording.

Implementation and Security

The plugin is implemented using native macOS capabilities, rather than through HTTP services or proxies:

  • Implementation Approach: It does not start an HTTP server, does not proxy browser traffic, and does not store credentials. Validated requests are passed to macOS osascript (JXA/System Events), open, and screencapture for execution.
  • Permission Management: Permissions are uniformly managed through macOS Automation, Accessibility, and Screen Recording settings.
  • Secure Defaults:
    • Only http/https URLs are allowed.
    • Browser and desktop targets support allowlist configuration.
    • Text length and coordinates are validated.
    • Sending passwords, API keys, cookies, or recovery codes is explicitly prohibited.

Conclusion

dsh-mac-control provides DeepSeek Harness with the ability to directly interact with the local macOS environment. By leveraging native osascript and system permissions, it achieves secure desktop control without adding extra infrastructure overhead. The plugin follows the MIT License, and the code is hosted on GitHub.