DeepSeek Harness 的 macOS computer use:基于无障碍树的稳定 ref 定位、后台输入、Unicode 输入、菜单与应用、set-of-mark 截图、本地 OCR 与动作校验——11 个工具桥接 macos-cu CLI。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-macos-computer-use
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:Sur-Cai/macos-computer-use-kit#path:/packages/dsh
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 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).
链接
同类插件
DayuanJiang/next-ai-draw-io#dsh-plugin★ 36802
dsh 的 draw.io 绘图插件:通过 next-ai-drawio MCP 服务器作图,点回复里的链接在右侧栏打开实时预览,可以手动修改图,AI 的每次修改都是可以恢复的版本。需 Node.js 18+,首次使用由 npx 下载 MCP 服务器。
Tencent/WeKnora#dsh-weknora★ 36302
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 7042
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
T-Auto/dsh-ops★ 5074
为 Windows 的 DSH 提供 bash、PowerShell 7 及 Rust 高性能工具,减少 token 消耗。
sixtysevenlf/dsh-blender-plugin★ 1575
让 DSH agent 通过直连 TCP 通道驱动本地 Blender,提供 15 个工具:视口帧、自定义视角渲染、Python 执行、无头与作业卸载、事务回滚,以及 34 个 family / 228 个 op 的规划层。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1155
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。