返回目录
模型与 MCP 插件

dsh-mac-use

matyik/dsh-mac-use

Computer-use for DeepSeek Harness on macOS

Stars
2
Forks
0
Issues
0
更新
19 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:matyik/dsh-mac-use

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-mac-use

Computer-use for DeepSeek Harness on macOS.

Let an agent see the screen, drive the mouse and keyboard, and open apps and URLs — the same observe → act → verify loop as Claude's computer tool or Codex computer-use, shipped as a single DeepSeek Harness bundle.

npm License: MIT Platform DeepSeek Harness Release

Why

Most computer-use setups ship a separate helper binary that needs its own screen-recording and accessibility grants. dsh-mac-use doesn't:

  • Plugin only, no extra binary. Everything runs inside the DeepSeek Harness Desktop host process. Screen capture uses the bundled screencapture tool; mouse/keyboard and window inspection call macOS APIs through the koffi FFI library (an npm dependency).
  • Permissions come from the Harness app itself. Because the plugin runs in the Desktop host (a child of the Electron app), macOS checks Screen Recording and Accessibility against DeepSeek Harness. Grant those two once — never to a helper.
  • Virtual agent cursor. Mouse actions don't strand your real pointer: clicks land, then your cursor snaps back, while a blue arrow (white outline, ~2x size) glides between action points with its tip on the exact target — and it disappears when the task is done.

Tools

Tool What it does
computer_screenshot Capture the screen (main display, a region, a window, or a display) and return the image plus bounds and pixel→point scale.
computer_screen_info Read display geometry (points), cursor position, and the on-screen window list (id, app, title, bounds).
computer_ax_snapshot Read an app's Accessibility (AX) UI tree as compact text — roles, titles, values, and screen-coordinate frames, each with an integer [ref].
computer_move Move the agent cursor to (x, y) in global display points (your real pointer is untouched).
computer_click Click at (x, y) — left/right/middle, single or double.
computer_drag Drag from (x1, y1) to (x2, y2).
computer_scroll Scroll up/down/left/right at a point or the cursor.
computer_type Type arbitrary Unicode text into the focused field.
computer_key Press a key or chord (letters, digits, arrows, return, tab, escape, F-keys, and cmd/shift/option/control).
computer_open Open a URL, file, or app via the system open command.

A system-prompt section teaches the agent the workflow: observe → locate → convert image pixels to global points → act → screenshot again to verify.

Accessibility snapshots

computer_ax_snapshot reads a macOS app's Accessibility (AX) element tree as compact text instead of an image. One window costs a few hundred tokens — versus ~1,500 for a screenshot — and works with text-only models, which can read the hierarchy directly and pick the [ref] to act on next.

[0] AXApplication "Notes"
  [1] AXWindow "All Notes" @{0,25,280,875}
    [2] AXButton "New Note" @{120,60,24,24}
    [3] AXOutline @{0,90,280,810}
      [4] AXRow "Groceries" @{0,90,280,28}
      [5] AXTextField "Search" value="milk" @{40,40,200,24}
  • Cheap and text-only. A snapshot is a few hundred tokens and readable by any model — no vision required.
  • Screen coordinates. Each @{x,y,w,h} frame is in global display points, top-left origin — the same space as computer_move / computer_click.
  • Refs. The [n] index on each line is stable for that snapshot; a later phase will accept a ref to act on the element directly.
  • Bounded. It walks to maxDepth (default 8), visits up to maxNodes (default 300) nodes, caps the text at maxChars (default 12,000), and stops after ~1.5 s so an unresponsive app can't freeze the agent. When it stops early, truncated is true and the text ends with a … N more nodes not shown line.

To target an app by name or bundle id:

computer_ax_snapshot({ app: 'Notes', maxNodes: 300 });
// -> { snapshotId: 'ax_…', app: { pid, name }, count, returned, truncated, chars, text }

Requirements

  • DeepSeek Harness Desktop (the macOS app), running on macOS (Apple Silicon).
  • A vision-capable model for full observe-and-act (e.g. deepseek-flash, which reads images). Text-only models can still use computer_ax_snapshot, computer_screen_info, and the action tools.

Permissions (once)

  1. System Settings → Privacy & Security → Screen Recording → enable DeepSeek Harness.
  2. System Settings → Privacy & Security → Accessibility → enable DeepSeek Harness (needed for mouse/keyboard input).
  3. Fully quit and reopen DeepSeek Harness.

Missing a permission? The relevant tool fails with a message naming the exact setting.

Install

Install through the built-in Plugin Manager — no shell commands, no manual profile edits.

From npm (recommended):

dsh-mac-use

From git:

github:matyik/dsh-mac-use

In the Web sidebar: Plugins → Install bundle, enter either spec above (or a local directory). The plugin_manager tool's install_bundle accepts the same targets.

The only dependency is koffi@3.1.1 (the version the Desktop runtime ships). It bundles a prebuilt darwin-arm64 binary and its install script is a fast prebuild check — no compilation. pnpm 11 may ask you to approve that script once: click Allow these scripts and retry and it finishes instantly.

Coordinate system

All mouse coordinates are global display points, origin at the top-left of the main display (the same space as computer_screen_info and the click tools). Screenshots are returned in device pixels, so computer_screenshot also reports bounds (points) and scale (image pixels per point):

x = bounds.x + px / scale
y = bounds.y + py / scale

Configuration

Field Default Meaning
virtualCursor true Use the virtual agent cursor (click, then restore your pointer) and show the blue arrow. Set false to leave the pointer where it clicked.
postDelayMs 25 Delay between press/release events.
scrollAmount 3 Scroll wheel units per step.
typeDelayMs 0 Per-character typing delay.

Security

These tools drive the real desktop — treat them as powerful. They run under the agent's normal permission/approval policy; keep them in a preset that prompts before acting, and have the agent re-check its work with a follow-up screenshot. macOS-only: on other platforms the tools register but error when called.

Contributing

PRs welcome — please read CONTRIBUTING.md first.

License

MIT © matyik

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。