DSH Computer: A macOS Desktop Automation Plugin with Bounded Observation and Host Approval

Foreword

Implementing “Computer Use” in DeepSeek Harness (DSH) commonly involves a model clicking interfaces based on screenshots or coordinates. However, windows move, processes restart, and the same PID may be reused; furthermore, another Agent might be operating simultaneously—“seeing a button just now” does not guarantee that it is “still safe to click now.” If AX paths, coordinates, or PIDs are passed to model parameters for long-term use, risks concentrate on misclicks, expired targets, and sensitive fields.

Below is an introduction to the community plugin DSH Computer (@zseven-w/dsh-computer): a headless-first Computer Use driver for macOS. By utilizing bounded Accessibility observation, short-lived opaque refs, pre-action re-verification, and one-time host-side approval, it separates “observation” and “action” into auditable steps. Visual evidence is delivered via native window screenshots and Set-of-Mark numbering, without relying on the model to self-report scaling or native coordinates.

What is this

DSH Computer is released by the maintainer ZSeven-W. The npm package name is @zseven-w/dsh-computer. The local candidate version marked in the current README is 0.1.0-rc.3, and it is licensed under MIT. It is categorized as admin-security in the SkillHub community directory.

The core problem the plugin solves is providing a headless toolchain for DSH Agents on macOS to observe the Accessibility tree and optional visual attachments, perform host approval for high-risk operations, permanently reject security fields like passwords, and return action receipts in formats such as confirmed | unknown | rejected | failed. The native Helper is not distributed pre-compiled with the npm package; it must be built locally and granted Accessibility / Screen Recording permissions. The README explicitly states there are no plans for a release with Developer ID notarization, and self-building is a supported path.

Runtime environment: macOS + Node.js >=24.11.0; the repository uses pnpm 10.34.5 as the package manager.

Design Point: Observation is not a long-term coordinate

The README uses a flow to explain how the plugin treats each observation as a short-term capability ticket:

  1. computer_observe reads a bounded AX tree on an explicit App/window, returning an opaque ref, fingerprint, and expiration time (the ref is retained in memory for approximately 1–30 seconds and is isolated by exec.agent.id).
  2. The optional computer_visual_observe, under the same observation mutex, captures a native PNG of the bound window, verifies pixels, and burns AX Set-of-Mark numbers into the image, delivering it to the current image-capable model via DSH attachments.
  3. computer_act or computer_visual_act re-observes identity before acting; when policy requires, it requests a one-time allowed-once approval from the owning user for high-risk targets. A single observation is invalidated after a potentially accepted mutating action, requiring the Agent to re-observe.

Model parameters do not contain Agent ID, AX path, PID lease, or self-reported sensitive switches; real-time Agent identity is provided by the host, and raw AX location remains inside the Driver.

Core Tools (headless)

The initial vertical slice provides the following tools (per the README tool table; computer_evidence is for readiness and receipt queries):

Tool Summary of Function
computer_apps Read-only list of running Apps visible in the Dock (bundle id, pid, whether frontmost, window_number available for computer_observe).
computer_launch Opens or activates an App by exact reverse-domain bundle id and briefly waits for the first window; takes no args/docs/URLs, so no approval is needed.
computer_observe Bounded AX tree observation; returns opaque ref, fingerprint, expiration.
computer_visual_observe Screenshots the numbered window bound to a fresh observation, verifies pixels, and delivers via DSH attachments after Set-of-Mark; accepts only observation_id and optional max_marks (1–200, default 80).
computer_visual_act Executes click / drag / scroll on the attached image’s pixels; always requires host approval, receipt is unknown after dispatch, and blind retries are discouraged.
computer_act Executes click, focus, type, key, or scroll on a single fresh ref; re-verifies before every action; scroll may be unknown until re-observation proves content moved.
computer_evidence Interactive session, Accessibility/screen recording readiness, Helper identity, and recent AX/visual action receipts for the current Agent.

Additionally, the plugin exposes the zsevenComputerDriver service via Cordis and exports the TypeScript contract under @zseven-w/dsh-computer/driver (current contractVersion is 5) for injection in scenarios like dsh-qa.

Security Boundaries (Summary)

The following behaviors are explicitly defined in the README’s “Security & Result Semantics” section and must be understood when used:

  • Lock screen, login window, non-console, or unconfirmed desktop sessions: fail-closed before observation, screenshot, or action; the Helper will not wake, unlock, or activate Apps.
  • Password field input is permanently rejected and cannot be overridden by approval.
  • High-risk clicks with semantics of delete, funds, send, publish, share, etc., as well as some key combinations, require host allowed-once; safe focus/navigation may not trigger prompts.
  • Visual coordinate actions are treated as AX-opaque unknown targets; re-screenshotting/verification occurs before and after approval; if a secure field is found under the coordinate, it is refused.
  • The plugin runs with the current DSH process privileges; the Helper’s stdin/stdout JSON link still requires stronger authenticated IPC/XPC or signed host constraints to defend against other processes under the same user, as noted in the README prior to public release. Read the source code and MIT license before installation, and understand that the TCC authorization subject is the actual path of the DSH Computer Helper.

Installation and Enablement

The Helper is not installed to /Applications, nor is a locally signed .app bundled with the package. The official quick start (local candidate version) steps are as follows:

  1. Install the DSH CLI:
npm install -g @deepseek-ai/dsh@latest
  1. Install dependencies and build in the dsh-computer repository checkout directory (replace the path with your absolute path):
pnpm install
pnpm build
dsh plugin --profile web add link:/absolute/path/to/dsh-computer
dsh web
  1. Before observing the UI, an unlocked interactive console session is required, and Accessibility must be granted to the Helper; Screen Recording must be granted separately to the same Helper for screenshots. computer_evidence can check session and TCC preflight status (it will not pop permission dialogs for you).

  2. If a stable local TCC identity is needed, you must choose a code signing certificate and explicitly run the installation script (example from README):

security find-identity -v -p codesigning
pnpm run helper:install-local -- --identity "<Certificate Full Name or SHA-1>"

The script assembles ~/Library/Application Support/ZSeven/DSH Computer/DSH Computer Helper.app with the bundle id io.github.zseven-w.dsh-computer.helper.

Note: On non-macOS systems, the package can still be installed so the profile reports “unsupported,” but native actions are unavailable. The SkillHub directory page and GitHub repository are community ecosystem entries and have no official affiliation with DeepSeek / High-Flyer. Installation commands should follow the README; do not invent dsh plugin add github:... forms based on the plugin name.

Typical Usage Flow

The README does not provide a single “copy-paste” business script, but the tool contracts determine a reproducible call order:

  1. Use computer_apps or computer_launch to determine the target App and window context (computer_launch only accepts exact bundle ids).
  2. Call computer_observe to obtain the observation_id and ref; complete subsequent steps before the ref expires or the window changes.
  3. If the current model route supports images and needs to understand custom controls, first computer_visual_observe, then computer_visual_act after host approval (using attached pixel coordinates and capture_sha256); effects must be verified by re-observation because visual dispatch receipts are always unknown.
  4. For AX-resolvable targets, use computer_act to perform click/type/key etc.; complete host one-time confirmation when policy intercepts.
  5. Call computer_evidence when debugging permissions or receipts.

Development acceptance can be performed within the repository:

pnpm install
pnpm run typecheck
pnpm test
pnpm build
pnpm run smoke:pack

Use Cases and Considerations

Suitable for: macOS-based DSH Web profiles or QA/automation scenarios integrating the Cordis Driver that require AX-first, bounded visual evidence, and auditable high-risk actions for Computer Use; willing to build the Swift Helper locally and manage TCC and optional code signing independently.

Considerations:

  • Current boundaries include: no built-in OCR, clipboard automation, or full IME; type goes through writable AX value, which is not equivalent to natural keyboard input; actions will fail-closed if some Apps’ AX exposure is incomplete.
  • Visual observation depends on explicit window numbers, screen recording permissions, DSH attachment services, and declared image-supporting model routes.
  • GitHub stars are 0 (clue from directory page); the version is in RC phase, and the existence of CI configuration does not equal a signed, notarized release.

Links

DSH Computer condenses macOS desktop automation into a chain of “Short Observation → Optional Visual Evidence → Re-verification → Host Gating → Bounded Receipts.” It is suitable for completing local Computer Use with an admin-security orientation within the DSH “everything is a plugin” ecosystem, rather than treating screen snapshots as long-term operational authorization.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye