AX-first macOS computer use for DeepSeek Harness: accessibility snapshots with stable refs, background input, Unicode typing, menus and apps, set-of-mark screenshots, on-device OCR and verified actions — 11 tools bridged to the macos-cu CLI.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-macos-computer-use
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Sur-Cai/macos-computer-use-kit#path:/packages/dsh
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
DeepSeek Harness (dsh) bundle bridging dsh agents to the
macos-computer-use-kit
macos-cu CLI: AX-first computer use on macOS.
The plugin registers eleven focused tools that shell out to macos-cu with an
argument array (never shell-string concatenation) and return the CLI's JSON
output:
| Tool | CLI call | Purpose |
|---|---|---|
macos_cu_doctor |
macos-cu doctor |
Permissions/displays/deps/OCR/policy/Jev diagnostics — run first |
macos_ax_find |
macos-cu ax find|tree|snapshot |
Semantic element lookup with exact geometry and stable refs |
macos_ax_press |
macos-cu ax press|setvalue|focus |
Native AX action by ref with read-back verification |
macos_input_click |
macos-cu input click |
Background click that never moves the user's cursor |
macos_type |
macos-cu input type |
Unicode typing (CJK/emoji safe, clipboard untouched) |
macos_key |
macos-cu input key |
Keys and chords; lock / log-out / force-quit refused |
macos_app |
macos-cu app |
List, launch, activate, hide, quit apps; open URLs and files |
macos_menu |
macos-cu menu list|select |
Menu bar by path, with the app in the background |
macos_shot |
macos-cu shot capture|check|windows|annotate |
Blank-frame-checked screenshots and set-of-mark labels |
macos_ocr |
macos-cu ocr |
On-device OCR with screen coordinates when AX is empty |
macos_jev_guard |
macos-cu jev guard|select |
Optional Jev semantic guard before an irreversible action (needs TYPESAFE_API_KEY) |
The AX-first intent is baked into every tool description: locate elements via
macos_ax_find and use the returned geometry — use instead of guessing
coordinates from a screenshot.
Install
From a profile (npm registry):
dsh plugin --profile <name> add dsh-macos-computer-use
From git sources (builds lib/ via the prepare script — allowlist the build
when pnpm asks, then re-run the add):
dsh plugin --profile <name> add github:Sur-Cai/macos-computer-use-kit#packages/dsh
From a tarball (prebuilt, no build permission needed):
npm pack ./packages/dsh
dsh plugin --profile <name> add ./dsh-macos-computer-use-<version>.tgz
Verify the layer without booting, then boot:
dsh --profile <name> --dump-config # shows a "# == dsh-macos-computer-use" layer
dsh --profile <name>
Prerequisites
- macOS (AX, CGEvent, and ScreenCaptureKit are macOS APIs).
- The
macos-cubinary on PATH:pip install macos-computer-use-kit(or run from a checkout; override withMACOS_CU_BIN=/path/to/macos-cu). Every tool detects a missing binary and returns this instruction instead of failing obscurely. - One-time macOS grants for the process hosting dsh: Accessibility (AX
reads,
AXPress,setValue, posted events) and Screen Recording (shot, otherwise every frame is black).macos_cu_doctorreports both. - Optional:
TYPESAFE_API_KEYformacos_jev_guard(the CLI'smacos-cu jev guard|select). Everything else works without it.
Computer-use slot decision
This bundle only adds tools; it deliberately does NOT call
ctx.computerUse.register() and therefore does not claim the single
provider slot (@deepseek-ai/dsh-computer-use rejects any second provider):
- The bridge shells out to an external macOS-only CLI rather than implementing a provider-owned tool catalog and desktop-operation lifecycle, so it cannot honor the provider contract (stop tools and await owned work before releasing the registration).
- Claiming the exclusive slot would block Cua Driver (or any other) provider in the same composition on machines where this bundle is installed but unusable (non-macOS hosts, missing permissions).
- Users who want exclusivity can coordinate at the composition level; nothing here prevents a future native provider from registering the slot.
Development
cd packages/dsh
npm install
npm run build # tsc -> lib/ (also runs automatically as `prepare` on git installs)
npm run typecheck
lib/ is built output and is not committed; npm installs from the registry
ship it prebuilt, while git installs rebuild it via prepare (self-contained
tsc, no monorepo project references).
License: MIT (see LICENSE).
Links
More in this category
DayuanJiang/next-ai-draw-io#dsh-plugin★ 36802
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
Tencent/WeKnora#dsh-weknora★ 36302
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 7042
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 5074
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
sixtysevenlf/dsh-blender-plugin★ 1575
Lets a DSH agent drive a local Blender over a direct TCP channel with 15 tools: viewport frames, custom-angle renders, Python execution, headless and job offload, transaction rollback, and a planning layer of 228 ops across 34 families.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1155
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.