Sur-Cai/macos-computer-use-kit--packages-dsh ↗★ 2

dsh-macos-computer-use

AX-first computer use on macOS for DeepSeek Harness: accessibility-tree targeting instead of screenshot coordinate guessing, window-scoped input, action read-back verification, blank-frame-checked screenshots, and optional Jev (TypeSafe System One) semantic guards before irreversible actions — bridged to the macos-cu CLI. 适合在macOS上通过无障碍树而非截图坐标进行自动化操作。

패키지
dsh-macos-computer-use
호환성
미검증
Harness peer 범위
*
Cordis peer 범위
*
버전
0.2.2
라이선스
MIT
최근 업데이트
2026. 9. 22.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Sur-Cai/macos-computer-use-kit#1f805825983a0cfb2283fa912c61b8823abe0246&path:packages/dsh

dsh-macos-computer-use

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 six focused tools that shell out to macos-cu with an argument array (never shell-string concatenation) and return the CLI's JSON output:

ToolCLI callPurpose
macos_cu_doctormacos-cu doctorPermissions/displays/deps/Jev diagnostics — run first
macos_ax_findmacos-cu ax find|treeSemantic element lookup with exact geometry
macos_ax_pressmacos-cu ax press|setvalueNative AX action with read-back verification
macos_input_clickmacos-cu input clickWindow-scoped click that never moves the user's cursor
macos_shotmacos-cu shot capture|check|windowsBlank-frame-checked screenshots for verification only
macos_jev_guardmacos-cu jev guard|selectOptional 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  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  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  add ./dsh-macos-computer-use-0.2.0.tgz

Verify the layer without booting, then boot:

dsh --profile  --dump-config   # shows a "# == dsh-macos-computer-use" layer
dsh --profile 

Prerequisites

  • macOS (AX, CGEvent, and ScreenCaptureKit are macOS APIs).
  • The macos-cu binary on PATH: pip install macos-computer-use-kit (or run from a checkout; override with MACOS_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_doctor reports both.
  • Optional: TYPESAFE_API_KEY for the CLI's Jev semantic guards (macos-cu jev guard|select, invoked via shell — no dedicated tool here).

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).