Skip to content
Back to search

dsh-cua-driver

A self-contained DeepSeek Harness (DSH) profile plugin that adds background Windows desktop and browser control to DSH, powered by the cua-driver MCP server (trycua/cua, v0.55.0, MIT).

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/internettrollwatt--dsh-cua-driver/badge.svg)](/listings/internettrollwatt--dsh-cua-driver)

HTML

<a href="/listings/internettrollwatt--dsh-cua-driver"><img src="/api/listings/internettrollwatt--dsh-cua-driver/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

**Option A — from npm (simplest):** add the published package to your DSH profile (`C:\Users\<you>\.dsh\profiles\desktop\package.json` by default), the bundle, then restart DSH:

"dependencies": { "dsh-cua-driver": "^0.1.0" },
"dsh": { "profile": { "bundles": [ "…existing…", "dsh-cua-driver" ] } }

Then install the profile's dependencies (`pnpm install` in the profile directory, or let DSH do it) and restart DSH Desktop. In a new session, load the skill with `/cua-driver` and call `cua_activate` (it returns the tool list and a short manual).

**Option B — from git (bleeding edge):**

1. Get the code anywhere stable:

   git clone https://github.com/internettrollwatt/dsh-cua-driver C:\tools\dsh-cua-driver

2. Same profile edits, pointing at a local/git dependency:

   "dependencies": { "dsh-cua-driver": "file:C:/tools/dsh-cua-driver" }

A `git+https://github.com/internettrollwatt/dsh-cua-driver.git` dependency works too. Then install the profile's dependencies (`pnpm install` in the profile directory, or let DSH do it). 3. **Restart DSH Desktop** (bundles load at startup). 4. In a new session: load the skill with `/cua-driver`, then call `cua_activate` (or call `cua_activate` directly; it returns the tool list and a short manual).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 129 lines
  1. # dsh-cua-driver
  2. [English](./README.md) · [中文](./README.zh.md)
  3. A self-contained **DeepSeek Harness (DSH) profile plugin** that adds **background Windows desktop and browser control** to DSH, powered by the [cua-driver](https://github.com/trycua/cua) MCP server (trycua/cua, v0.55.0, MIT).
  4. Everything the plugin needs ships inside this repository — the driver binaries are vendored in `vendor/`, so there is **nothing to install on the machine** besides the plugin itself.
  5. ## What it does
  6. - **Spawns the vendored driver**: `vendor/.../cua-driver.exe mcp --direct --grant existing-profile`, spoken over MCP (newline-delimited JSON-RPC 2.0). No external installation, no daemon, no extra processes beyond the one the plugin manages.
  7. - **Exposes the driver's ~62 tools as DSH tools** with a `cua_` prefix:
  8. - observation: `cua_list_windows`, `cua_get_window_state` (UIA tree + screenshot), `cua_get_desktop_state`, `cua_zoom`, `cua_get_accessibility_tree`
  9. - background input: `cua_click`, `cua_double_click`, `cua_right_click`, `cua_drag`, `cua_type_text`, `cua_press_key`, `cua_hotkey`, `cua_set_value`, `cua_scroll`, `cua_clipboard_read/write`, `cua_invoke_menu` — delivered via UIA/`PostMessage`, **without stealing focus or moving your pointer**
  10. - CDP browser tools: `cua_browser_prepare`, `cua_get_browser_state`, `cua_browser_click/type/select/navigate/pointer/dialog/set_input_files/download`, `cua_browser_motion_policy`
  11. - batching & scripting: `cua_run_steps`, `cua_run_script`, `cua_start_session`/`cua_end_session`
  12. - verification & diagnostics: `cua_verify_state`, `cua_check_permissions`, `cua_health_report`, `cua_get_guide`
  13. - agent-cursor overlay: `cua_move_cursor`, `cua_set_agent_cursor_motion/theme`, `cua_get_agent_cursor_state`
  14. - recording: `cua_start_recording` / `cua_stop_recording` / `cua_replay_trajectory`
  15. - **Lazy exposure**: at startup only `cua_activate` is registered. Calling it registers the full tool surface for the profile and returns a short usage manual (keeps prompt size small). Set `eager: true` to register everything at startup.
  16. - **Bundled `/cua-driver` skill**: a short Chinese usage manual registered with the host's skill registry. Load it with the `/cua-driver` slash command.
  17. - **CDP pre-authorization**: the bundle patch starts the driver with `--grant existing-profile`, so attaching to your already-running Edge/Chrome profile does not need a consent flow.
  18. ## Repository layout
  19. ```
  20. dsh-cua-driver/
  21. ├── index.js # host-side plugin: MCP stdio client + tool/skill registration
  22. ├── cordis.patch.yml # bundle patch (inserts the `cua-driver` row into a DSH profile)
  23. ├── package.json
  24. ├── LICENSE # MIT (this plugin's own code)
  25. ├── README.md / README.zh.md # English / Chinese documentation
  26. ├── skills/
  27. │ └── cua-driver/SKILL.md # the `/cua-driver` skill (Chinese usage manual)
  28. └── vendor/
  29. └── cua-driver-rs-0.55.0-windows-x86_64/
  30. ├── cua-driver.exe # MCP stdio server (`mcp --direct`)
  31. ├── cua-driver-uia.exe
  32. ├── cua-cursor-theme.exe
  33. ├── cua_driver_sdk.dll
  34. ├── cua_driver_node_runtime.node
  35. ├── cua_driver_abi.h
  36. ├── LICENSE # MIT — Cua AI, Inc. (upstream)
  37. └── THIRD_PARTY_NOTICES.md # MIT third-party components embedded in the driver
  38. ```
  39. ## Requirements
  40. - DSH Desktop on **Windows x86_64** (the vendored driver kit is the Windows build; the plugin's host code is platform-neutral JS).
  41. - Nothing else — the driver, its SDK DLL and its embedded Node runtime are all in `vendor/`.
  42. ## Install
  43. **Option A — from npm (simplest):** add the published package to your DSH profile
  44. (`C:\Users\<you>\.dsh\profiles\desktop\package.json` by default), the bundle, then restart DSH:
  45. ```json
  46. "dependencies": { "dsh-cua-driver": "^0.1.0" },
  47. "dsh": { "profile": { "bundles": [ "…existing…", "dsh-cua-driver" ] } }
  48. ```
  49. Then install the profile's dependencies (`pnpm install` in the profile directory, or let DSH do it)
  50. and restart DSH Desktop. In a new session, load the skill with `/cua-driver` and call
  51. `cua_activate` (it returns the tool list and a short manual).
  52. **Option B — from git (bleeding edge):**
  53. 1. Get the code anywhere stable:
  54. ```powershell
  55. git clone https://github.com/internettrollwatt/dsh-cua-driver C:\tools\dsh-cua-driver
  56. ```
  57. 2. Same profile edits, pointing at a local/git dependency:
  58. ```json
  59. "dependencies": { "dsh-cua-driver": "file:C:/tools/dsh-cua-driver" }
  60. ```
  61. A `git+https://github.com/internettrollwatt/dsh-cua-driver.git` dependency works too.
  62. Then install the profile's dependencies (`pnpm install` in the profile directory, or let DSH do it).
  63. 3. **Restart DSH Desktop** (bundles load at startup).
  64. 4. In a new session: load the skill with `/cua-driver`, then call `cua_activate` (or call
  65. `cua_activate` directly; it returns the tool list and a short manual).
  66. ## Configuration (bundle row, `cordis.patch.yml`)
  67. | key | default | meaning |
  68. |-----|---------|---------|
  69. | `exe` | auto: first `vendor/cua-driver-rs-*/cua-driver.exe` | explicit path to `cua-driver.exe` |
  70. | `toolPrefix` | `cua_` | tool-name prefix |
  71. | `toolTimeoutMs` | `120000` | per-call MCP timeout |
  72. | `eager` | `false` | register all tools at startup instead of lazy activation |
  73. | `mcpArgs` | `['--grant','existing-profile']` (set in the bundle patch) | extra args after `mcp --direct`; the grant pre-authorizes CDP attachment to the user's running Chromium profile |
  74. ## Usage in one paragraph
  75. Find the target with `cua_list_windows` → read it with `cua_get_window_state` (UIA tree +
  76. screenshot; `query` narrows the tree, `element_token` = `<snapshot_id>:N` references an element,
  77. and every new snapshot invalidates old tokens) → act (`cua_click` / `cua_type_text` /
  78. `cua_set_value` / …, all defaulting to background delivery) → verify with `cua_verify_state` or a
  79. fresh read. If a tool reports `background_unavailable` for the target toolkit, retry the same call
  80. with `delivery_mode:"foreground"` (brief focus swap, auto-restored). For web page content use the
  81. CDP route: `cua_browser_prepare` → `cua_get_browser_state` (bind + `semantic_v2` snapshot) →
  82. `cua_browser_*` mutations; browser objects are session-scoped, so reuse one short `session` label
  83. across the workflow. If a browser call is refused, the refusal carries a `next_call` with the exact
  84. retry arguments; if the CDP route stays unavailable, fall back to the UIA route for web content.
  85. ## Notes
  86. - **Agent-cursor overlay**: `cua_*` actions are visualized by a *fake* cursor overlay — the real
  87. pointer never moves. AX actions pulse, pixel actions glide, and the cursor hides after 15 s of
  88. inactivity. Tunable at runtime via `cua_set_agent_cursor_motion` / `cua_set_agent_cursor_theme` /
  89. `cua_set_config` (no restart needed).
  90. - **Per-user driver store**: the driver keeps `%USERPROFILE%\.cua-driver\` (config.json,
  91. `.telemetry_id` — a stable anonymous id, and `version_check.json` — update checks), shared across
  92. all cua-driver versions on the machine. Inspect/tune via `cua_get_config` / `cua_set_config`.
  93. - **Destructive tools** (`cua_browser_download`, …) require host-side destructive approval; on
  94. DSH sessions with approval prompts disabled they will be refused — this is by design.
  95. - **Driver upgrade**: replace `vendor/cua-driver-rs-*` with a newer release kit from
  96. [trycua/cua releases](https://github.com/trycua/cua/releases) (keep its `LICENSE` and
  97. `THIRD_PARTY_NOTICES.md`) and restart DSH. The tool surface is read dynamically from
  98. `tools/list`, so no code change is needed.
  99. ## Licensing
  100. - This plugin's own code (JS, patch, skill, docs): **MIT** — see `LICENSE`.
  101. - The vendored `cua-driver` binaries: **MIT, Copyright (c) 2025 Cua AI, Inc.** — see
  102. `vendor/.../LICENSE`. Embedded third-party components are all MIT as well; see
  103. `vendor/.../THIRD_PARTY_NOTICES.md` (trope-cua, Interface-Agent, yabai, QuickJS-ng,
  104. rquickjs, T3 Code). Keep those files when redistributing.
  105. - This plugin only uses DSH's public plugin seams (`ctx.tools`, `ctx.inject`, `defineTool`); it
  106. ships no DSH host code.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.