返回目录
模型与 MCP 插件

dsh-computer-use-macos

yw5579358/dsh-computer-use-macos

macOS Computer Use for DeepSeek Harness: native accessibility, screenshots and opt-in Host-routed browser automation

Stars
1
Forks
0
Issues
0
更新
14 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:yw5579358/dsh-computer-use-macos

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

PROJECT README

README

Computer Use for DeepSeek Harness on macOS

简体中文 · Browser setup · Test report

Control Mac applications and web pages from a Harness conversation. Start a PTC session, describe the target and the action, and the model can inspect the interface, operate it, and read back the result.

The interaction pattern follows Codex Computer Use: select an application or tab, observe its state and screenshot, act, then observe again. Applications and windows are exposed as objects that can be used across calls in a persistent PTC execution.

Native operations use DeepSeek Harness's macOS CUA provider (@deepseek-ai/dsh-cua and @deepseek-ai/dsh-experimental-cua-macos) for accessibility, window capture and input. Browser operations use Playwright over CDP to address elements by role, label and text in a dedicated Chrome profile.

This plugin brings those pieces together with an app/window API, installed-module loading for PTC, observation freshness checks, browser connection management and screenshot delivery. Calls use Harness's existing authorization, logging and attachment pipeline.

What you can do

Mac applications: select apps and windows, read accessibility trees, capture a window, click, enter Unicode text, send shortcuts, scroll, select text and paste.

Web pages: read page content, fill inputs, click buttons, extract tables, locate DOM elements and capture the current viewport.

When a task becomes idle, the browser connection is released for the next conversation. Pages marked as deliverables or handoffs stay open for the user.

Version 0.1.1 was exercised in the actual Harness Desktop application: Chinese form input, button clicks, result readback, screenshots and browser reuse across conversations. 44 automated tests passed locally and in GitHub CI, alongside 12 native desktop checks. The test report records the environment and results.

Install

Requirements:

  • macOS 14+
  • DeepSeek Harness 0.2.2-rc.1
  • Node.js 24.9+; an image-capable model for screenshots
  • Accessibility and Screen Recording permissions for DSH Computer Use.app

Desktop

  1. Open Plugins and enable the experimental Custom plugin indexes.
  2. Open Discover and add the JSON URL below.
  3. Select Computer Use for macOS, review the version and source, then choose Install → Enable now.
  4. Select PTC mode under Settings → Agent presets, then start a new conversation.
https://raw.githubusercontent.com/yw5579358/dsh-computer-use-macos/codex/initial-release/plugin-index.json

The Desktop Add plugin dialog also accepts a tarball from Releases. Each index version points to a specific Git commit, and built lib/ files are included in the repository.

To update a third-party plugin, back up the profile configuration, then uninstall the old version and install the new one in Desktop. Existing conversations keep their previous preset.

CLI profile

For a separate CLI profile:

dsh plugin --profile computer-demo add ./dsh-computer-use-macos-0.1.1.tgz
dsh --profile computer-demo --dump-config

Desktop manages its own desktop profile through the app's plugin page. Use one native Computer Use provider per profile.

Ask Harness to operate an app or page

Native application:

Use Computer Use to open Calculator, calculate 123 × 456, and report the result shown in the window.
Open TextEdit with Computer Use. Create a document titled “Weekly plan” with three action items. Leave the window open for me to review.

Browser DOM:

Use browser DOM control to open http://localhost:3000, check the navigation links and main buttons, and capture the result. Leave the tab open for review.
Use browser DOM control to open the dashboard I specify. After I sign in, read the visible table and count records by status.

Replace the app, URL and task with your own. Ask Harness to leave the tab open for review when you want to keep a page after the task.

Enable browser DOM control

Start the dedicated Chrome instance:

"$HOME/.dsh/profiles/desktop/node_modules/dsh-computer-use-macos/scripts/start-browser.command"

The launcher stores browser data in $HOME/.dsh/browser-dom/profile and exposes the debugging connection at 127.0.0.1:9222. Sign in to sites in that window when needed. Run the launcher again after closing the browser.

Add this row to the profile's cordis.patch.yml:

- id: macos-computer-use-compat
  name: dsh-computer-use-macos
  config:
    configuredCDPEndpoint: http://127.0.0.1:9222
    browserTimeoutMs: 15000
    browserMaxElements: 400

Save and start a new PTC conversation. The browser guide covers configuration, retained pages and connection troubleshooting.

Call the API from PTC

Native application:

const entry = await tools.computer_use_bootstrap({})
const { connectComputerUse } = await import(entry.nativeBridgeUrl)
const cua = connectComputerUse(() => tools.cua, {
  text: value => console.log(value),
})
const app = await cua.getApp('Calculator')
await app.getAXState()
// Use an elementIndex from this observation.
await app.click(elementIndex)
await app.getAXState()

Browser:

const { connectBrowser } = await import(entry.browserBridgeUrl)
const browser = connectBrowser(() => tools.computer_browser)
const tab = await browser.createBrowserTab('chromium', 'http://localhost:3000')
await tab.playwright.getByRole('button', { name: 'Continue', exact: true }).click()
await tab.getAXState()
await tab.markHandoff()

The getter resolves the current tool binding on each call. Read fresh state after input. Reselect browser tabs when resuming after an idle boundary. Harness delivers screenshots to the model as attachments.

Development and documentation

npm ci --ignore-scripts
npm run check
npm pack

Browser tests use temporary Chrome profiles and local fixture pages. Native tests use an owned AppKit window.

Remove

In Desktop, open the plugin details and choose Uninstall. For a separate CLI profile:

dsh plugin --profile computer-demo remove dsh-computer-use-macos

Manage macOS permissions in System Settings and saved application grants in Harness's Computer Use permissions page.

License

MIT

CLASSIFICATION EVIDENCE

分类依据

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

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