@zibokapi/dsh-codex-computer-use: macOS Desktop Operation Plugin for DSH Installation

Preface

When doing desktop automation in DSH, the model needs more than just “seeing the screen”—it also needs to read window structures, execute input, and minimize interference with the user’s foreground. @zibokapi/dsh-codex-computer-use is a DSH plugin package for macOS that provides an application list, key window screenshots, model-readable accessibility trees, synthetic mouse and keyboard input, approval policies, and a standalone MCP server.

What This Is

This package is maintained by geohotstan, licensed under MIT, with version 0.1.2 in package.json, requiring Node >=22.19.0. Its positioning is desktop computer use for DeepSeek Harness (DSH): an installable plugin package that includes a seam, a local Swift-daemon provider, computer_use_* tools, an approval policy, and a standalone MCP server, all without requiring OpenAI components.

Core Capabilities

  • macOS Application List: Provides app listing capability.
  • Key Window Capture: Returns both screenshots and model-readable accessibility trees.
  • Accessibility-Tree-First: computer_use_get_app_state returns numbered, tab-indented element trees; the model can operate based on element indices, with window-relative coordinates as a fallback; subsequent captures of the same app return diffs.
  • Synthetic Input: Supports mouse and keyboard input; background-priority input delivery, semantic AX actions require no focus; raw events use a private SkyLight path, with CGEvent.postToPid as a fallback.
  • Local Daemon: Provides a local Swift-daemon provider supporting AX trees, screenshots, and CGEvent input.
  • Tools and Skill: Provides computer_use_* tools and a computer-use skill.
  • Approval Policy: Provides per-app approval gates, Codex-style tier guidance, and computer_use_list_granted_applications.
  • MCP Server: Provides a standalone MCP stdio server exposing the official ten Codex Computer Use window tools, request_access, and three event_stream_* recording tools.

Installation and Enablement

First, install to the target profile:

dsh plugin --profile <name> add @zibokapi/dsh-codex-computer-use

Then build the macOS daemon and request the required permissions. This step is typically done once per machine:

npx @zibokapi/dsh-codex-computer-use

Building the daemon requires Xcode Command Line Tools. If they are missing on your machine, run the following first:

xcode-select --install

After completion, restart the profile to activate the computer_use_* tools:

dsh --profile <name> web

Installation status can be checked with the following command:

dsh-codex-computer-use status

macOS Permissions

The daemon requires two macOS TCC permissions:

  • Accessibility: Used for reading the accessibility tree and input targeting.
  • Screen Recording: Used for window screenshots.

If permissions are missing or revoked, the plugin will refuse to activate and computer use will not load. Authorization is re-checked every time the plugin loads; if macOS has already recorded a denial, the corresponding System Settings pane will be opened.

The daemon installs to a stable path:

~/.dsh/computer-use/dsh-computer-daemon.app

This is to prevent node_modules path changes from affecting macOS TCC.

Typical Usage

Installing from a Plugin Lead

If starting from a plugin lead, first install the plugin package:

Install this plugin package: https://github.com/geohotstan/dsh-computer-use

Then run:

npx @zibokapi/dsh-codex-computer-use

Finally, restart the profile:

dsh --profile <name> web

Manual Installation from a Git Repository

You can also manually install from a checkout:

git clone https://github.com/geohotstan/dsh-computer-use
cd dsh-computer-use
pnpm install
pnpm exec dsh-codex-computer-use
dsh plugin --profile <name> add ../dsh-computer-use

Manual Composition

When writing compositions manually, you can use the same subpath entries:

plugins:
  computer-engine:
    plugin: '@zibokapi/dsh-codex-computer-use/computer-local'
  computer-tools:
    plugin: '@zibokapi/dsh-codex-computer-use/computer-tools'
  computer-policy:
    plugin: '@zibokapi/dsh-codex-computer-use/computer-policy'

The computer-policy entry needs an approval service mounted, for example:

@deepseek-ai/dsh-user-approval

Running the MCP Server

After daemon installation is complete, you can run it directly:

node lib/mcp.js

If you need to explicitly specify the daemon path, pass it as the first argument:

node lib/mcp.js /absolute/path/to/dsh-computer-daemon.app/Contents/MacOS/dsh-computer-daemon

You can also specify it via an environment variable:

DSH_COMPUTER_HELPER_PATH=/absolute/path/to/dsh-computer-daemon.app/Contents/MacOS/dsh-computer-daemon dsh-computer-mcp

This MCP server uses newline-delimited JSON-RPC 2.0 over stdin/stdout and supports:

initialize
ping
tools/list
tools/call

Its action tools respond with post-action state; captures include text and JPEG image blocks.

helperPath Resolution Order

helperPath is an optional configuration. The engine resolves it in the following order:

helperPath config
DSH_COMPUTER_HELPER_PATH environment variable
setup CLI install location

The default install location is:

~/.dsh/computer-use/dsh-computer-daemon.app/Contents/MacOS/dsh-computer-daemon

Suitable Scenarios and Notes

This is suitable for macOS desktop operations within DSH when you want to maintain application listing, window state reading, input execution, approval policies, and MCP integration within a single plugin package.

Things to note before use:

  • Requires macOS Accessibility and Screen Recording permissions.
  • Building the daemon requires Xcode Command Line Tools.
  • Node version requirement is >=22.19.0.
  • The plugin requests desktop-related permissions and runs with the current dsh process privileges; review the source code and license before installing.
  • Licensed under MIT.

Reference Links

GitHub Repository:

https://github.com/geohotstan/dsh-computer-use

Plugin directory page (from the plugin lead, not directly confirmed in the currently fetched materials):

https://www.skillhub.cn/plugins/geohotstan/dsh-computer-use
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye