Skip to content

docs(cua-driver): audit fixes across macOS/Linux/Windows - #2089

Merged
f-trycua merged 12 commits into
mainfrom
docs/driver-audit-fixes
Jul 1, 2026
Merged

docs(cua-driver): audit fixes across macOS/Linux/Windows#2089
f-trycua merged 12 commits into
mainfrom
docs/driver-audit-fixes

Conversation

@f-trycua

@f-trycua f-trycua commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Walked the cua-driver docs end-to-end as a new user — install → tutorial → how-to → recipes → reference → explanation — running every documented command against live cua-driver 0.7.0 on macOS (local, full drive loop), Linux (Azure Ubuntu 22.04), and Windows (Azure Server 2022). This PR fixes the hand-written-doc issues found. 13 files, no auto-generated docs touched.

Highlights

  • [blocker] Linux install — a fresh Ubuntu 22.04 can't launch the binary (libXi.so.6 missing); docs listed no apt prereqs and claimed "no admin access." Added sudo apt install libxi6 at-spi2-core + the sudo caveat + a note that headless servers have no desktop to drive.
  • [blocker] tutorial — "the agent reports 391" contradicted its own step (6×7=42, live drive read 42).
  • mcp-config example was stale — live emits --scope user and no longer emits --claude-code-computer-use-compat.
  • Removed phantom screenshot tool references (no such tool on any platform); fixed the action-response-shape anchor; "three axes" → four; the video-"by default" contradiction; recipe call check_permissions (JSON) → permissions status.
  • Windows: documented that the installer registers the cua-driver-serve autostart task, and that autostart enable from a non-interactive/SSH context fails with a cryptic SID error.
  • Refreshed stale sample versions (0.3.x/0.5.x0.7.0).

Verified live (no fix needed)

Full macOS drive loop (launch_app → get_window_state → click by element_index → 42, no-foreground contract holds); drove a real Chrome tab via the page tool; cursor/recording/modality flags match describe; Linux install layout + serve lifecycle after libxi6; Windows install one-liner + paths + serve/status/stop.

Left for follow-up (NOT in this PR)

Generator (coordinate with #2088 — the reference is auto-generated from one platform): the tool surface is platform-specific — macOS 38 / Linux 43 / Windows 39 tools. mcp-tools.mdx should emit per-platform tools (incl. the Linux-only type_text_chars that set_value references) with a correct count; cli-reference.mdx is missing manifest, overstates the now-inert compat flag, and omits the serve/mcp cursor + pip flags (dump-docs reports serve args: []).

Upstream binary (not docs): the Windows/Linux doctor warning string names a nonexistent screenshot tool; autostart enable should detect Session 0 and print a friendly message; recording render help advertises --output but takes a positional arg.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified capture behavior, window state, and dispatch guidance.
    • Updated installation, update, autostart, and Windows/Linux/macOS setup instructions with current commands and platform-specific notes.
    • Added guidance for choosing a cursor palette at launch.
    • Refreshed examples and version outputs across tutorials and recipes to match the latest release.

f-trycua and others added 8 commits July 1, 2026 00:39
…ssions status

Iteration 1 live-audit fixes (verified against cua-driver 0.7.0):
- tutorial: result was reported as 391, contradicting its own step 4 (42)
- install: --version/doctor showed 0.5.x; live is 0.7.0
- install: pretty ✅ TCC output belongs to 'permissions status', not
  'check_permissions' (which returns JSON)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Th8TxivbUjS6NUT2cKVo6s
…axes, mcp-config

Iteration 1 cross-doc consistency fixes (verified vs live cua-driver 0.7.0):
- remove phantom 'screenshot' tool refs (no such tool among the 38)
- fix action-response-shape anchor to mcp-tool-notes
- explanation index: three axes -> four (adds the action-rung axis)
- demonstrations: video is not recorded 'by default'
- connect-your-agent: Pi examples need 'call'; mcp-config claude example matches
  live output (--scope user, no compat flag)

Source/generator-level findings (type_text_chars, manifest, flag docs) recorded
in DOCS_AUDIT.md for a coordinated fix with cua#2088.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Th8TxivbUjS6NUT2cKVo6s
…versions, autostart, cursor-palette

Iteration 2 (macOS how-to guides + recipes, verified vs 0.7.0):
- recipes: 'call check_permissions' (JSON) -> 'permissions status' (matches shown
  output); stale 0.5.x placeholder -> 0.7.0
- keep-running: macOS autostart helper is repo-relative and breaks for
  curl-installed users; reframed around the plist
- personalize-cursor: document the live --cursor-palette launch flag

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Th8TxivbUjS6NUT2cKVo6s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Th8TxivbUjS6NUT2cKVo6s
…mpeg, systemd target

Iteration 3 (Linux, live-verified on fresh Azure Ubuntu 22.04):
- install (Linux): [blocker] binary won't launch without libXi.so.6; add
  'sudo apt install libxi6 at-spi2-core' prereq + sudo caveat + headless-desktop
  note; drop the phantom ffmpeg claim from the doctor sentence
- keep-running (Linux): headless boxes need WantedBy=default.target

Recorded (generator fix, cua#2088): mcp-tools tool count is platform-specific —
Linux exposes 43 (5 Linux-only tools incl type_text_chars), macOS 38.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Th8TxivbUjS6NUT2cKVo6s
Iteration 4 (Windows, live on Azure Server 2022 via run-command/Session 0):
- install (Windows): note the installer registers the cua-driver-serve autostart
  task + its interactive requirement
- keep-running (Windows): autostart from a non-interactive/SSH context fails with
  a cryptic SID error — use RDP/local console

Windows list-tools = 39 (macOS 38 / Linux 43) — reinforces the platform-specific
tool-surface finding for cua#2088. Full audit summary in DOCS_AUDIT.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Th8TxivbUjS6NUT2cKVo6s
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Error Error Jul 1, 2026 3:12pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 21f1c838-a039-4e6c-941f-dd3f04a5fd55

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Documentation-only updates across the Cua Driver docs: clarifies that capture_mode is deprecated/ignored by get_window_state, updates version references to 0.7.0, renames permissions-check commands to cua-driver permissions status, revises Claude Code registration examples, and expands install/autostart/keep-running platform guidance.

Changes

Documentation Updates

Layer / File(s) Summary
Capture/dispatch modality clarifications
docs/content/docs/explanation/capture-and-dispatch-modalities.mdx, docs/content/docs/explanation/demonstrations-skills-and-trajectories.mdx, docs/content/docs/explanation/index.mdx
Clarifies capture_mode is deprecated and ignored, fixes an escalation doc link, notes video recording only occurs when record_video is set, and expands modality axes from three to four.
Agent connection and MCP registration
docs/content/docs/how-to-guides/driver/connect-your-agent.mdx
Updates Claude Code registration example to claude mcp add-json --scope user with cua-computer-use, and updates Pi CLI examples to cua-driver call ... form.
Install and permissions verification
docs/content/docs/how-to-guides/driver/install.mdx, docs/content/docs/how-to-guides/recipes/build-a-report-in-a-native-app.mdx, docs/content/docs/how-to-guides/recipes/export-contacts-overnight.mdx, docs/content/docs/how-to-guides/recipes/fill-a-form-from-a-local-file.mdx
Adds Windows/Linux install detail, updates example doctor output and versions to 0.7.0, and renames permissions verification command from check_permissions to permissions status across install and recipe guides.
Autostart and keep-running guidance
docs/content/docs/how-to-guides/driver/keep-running.mdx
Revises macOS LaunchAgent setup flow, adds Windows autostart interactive-context warning, and adds Linux systemd headless-target guidance.
Cursor palette flag and update/version examples
docs/content/docs/how-to-guides/driver/personalize-cursor.mdx, docs/content/docs/how-to-guides/driver/update.mdx, docs/content/docs/how-to-guides/driver/windows-ssh.mdx, docs/content/docs/tutorials/drive-your-first-app.mdx
Documents new --cursor-palette launch flag, updates version examples in update.mdx to 0.7.0, removes screenshot from Session-0 empty-result tool list, and updates a tutorial example output value.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • trycua/cua#1717: Both touch get_window_state/capture_mode documentation, with this PR marking it deprecated/no-op.
  • trycua/cua#1787: Both relate to the --claude-code-computer-use-compat flag removal in the Claude Code registration example.
  • trycua/cua#2077: Both update the same capture-and-dispatch-modalities.mdx page's get_window_state/dispatch semantics.

Poem

A rabbit hops through docs at dawn,
Version bumped, old flags withdrawn,
"permissions status" now the phrase,
capture_mode fades into a haze.
Hop, hop — 0.7.0 rolls in,
tidy docs, let the reading begin! 🐇📖

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the PR’s cross-platform documentation audit fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/driver-audit-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The page title is 'Choose an Action Rung and Dispatch Mode' but several docs
linked it as 'Choose a capture and dispatch mode'. Unify to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Th8TxivbUjS6NUT2cKVo6s

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/content/docs/how-to-guides/driver/install.mdx (1)

98-107: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Replace the stale prompt example
The cua-driver check_permissions example is misleading here: from a terminal it falls back to report-only and won’t open the macOS prompts. Use cua-driver permissions grant here, or remove this block since the previous example already covers prompting.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/content/docs/how-to-guides/driver/install.mdx` around lines 98 - 107,
The prompt example in the install guide is stale: `cua-driver check_permissions`
from a terminal only reports status and does not open the macOS dialogs. Update
the example in the permissions section to use `cua-driver permissions grant`
instead, or remove the “trigger the prompts yourself” block if the preceding
`cua-driver permissions status` example already covers the flow; keep the
surrounding explanation aligned with the actual behavior of the `permissions`
commands.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/content/docs/explanation/capture-and-dispatch-modalities.mdx`:
- Line 63: The reference link for the escalation field is pointing to the wrong
MCP docs page. Update the link in the `capture-and-dispatch-modalities.mdx`
content to use the existing `mcp-tools` reference anchor for
`action-response-shape`, or add an equivalent redirect if you want to keep the
newer path. Keep the surrounding guidance about `escalation`, `px`,
`foreground`, `page`, and the linked ladder doc unchanged.

In `@docs/content/docs/how-to-guides/recipes/fill-a-form-from-a-local-file.mdx`:
- Around line 49-55: The example in this recipe is using the wrong command to
trigger the macOS permission prompts; `permissions status` only checks state and
will not prompt the user. Update the flow in the form-filling guide so the first
command uses `cua-driver permissions grant`, then keep `cua-driver permissions
status` as the follow-up verification step after both prompts are approved.

---

Outside diff comments:
In `@docs/content/docs/how-to-guides/driver/install.mdx`:
- Around line 98-107: The prompt example in the install guide is stale:
`cua-driver check_permissions` from a terminal only reports status and does not
open the macOS dialogs. Update the example in the permissions section to use
`cua-driver permissions grant` instead, or remove the “trigger the prompts
yourself” block if the preceding `cua-driver permissions status` example already
covers the flow; keep the surrounding explanation aligned with the actual
behavior of the `permissions` commands.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: da65896c-3384-4911-bf2d-53b9e6be2f80

📥 Commits

Reviewing files that changed from the base of the PR and between 62b3a7e and c300a91.

📒 Files selected for processing (13)
  • docs/content/docs/explanation/capture-and-dispatch-modalities.mdx
  • docs/content/docs/explanation/demonstrations-skills-and-trajectories.mdx
  • docs/content/docs/explanation/index.mdx
  • docs/content/docs/how-to-guides/driver/connect-your-agent.mdx
  • docs/content/docs/how-to-guides/driver/install.mdx
  • docs/content/docs/how-to-guides/driver/keep-running.mdx
  • docs/content/docs/how-to-guides/driver/personalize-cursor.mdx
  • docs/content/docs/how-to-guides/driver/update.mdx
  • docs/content/docs/how-to-guides/driver/windows-ssh.mdx
  • docs/content/docs/how-to-guides/recipes/build-a-report-in-a-native-app.mdx
  • docs/content/docs/how-to-guides/recipes/export-contacts-overnight.mdx
  • docs/content/docs/how-to-guides/recipes/fill-a-form-from-a-local-file.mdx
  • docs/content/docs/tutorials/drive-your-first-app.mdx

`effect` is the confidence signal that separates those cases. `"confirmed"` means the driver verified the result through AX read-back. `"unverifiable"` means the dispatch path ran, but the driver cannot prove the application applied it. `"suspected_noop"` means an AX action dispatched but almost certainly did not change the target. Callers should treat `effect`, not the transport-level success status, as the action outcome.

`escalation` is the machine-readable climb-the-ladder hint. When present, it tells the caller which surface to try next: `"px"` for acting off the screenshot, `"foreground"` for explicitly fronting the target, or `"page"` for the browser-tab DOM path through the `page` tool. See [Choose an action rung and dispatch mode](/how-to-guides/driver/choose-a-modality) for the procedural ladder and [MCP tools](/reference/cua-driver/mcp-tools#action-response-shape) for the field table.
`escalation` is the machine-readable climb-the-ladder hint. When present, it tells the caller which surface to try next: `"px"` for acting off the screenshot, `"foreground"` for explicitly fronting the target, or `"page"` for the browser-tab DOM path through the `page` tool. See [Choose an action rung and dispatch mode](/how-to-guides/driver/choose-a-modality) for the procedural ladder and [MCP tool notes](/reference/cua-driver/mcp-tool-notes#action-response-shape) for the field table.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check for mcp-tool-notes.mdx and the action-response-shape anchor
fd -i 'mcp-tool-notes' docs
rg -n 'action-response-shape|Action response shape' docs/content/docs/reference/cua-driver/

Repository: trycua/cua

Length of output: 230


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant docs tree and look for any redirect/alias from mcp-tools to mcp-tool-notes.
find docs/content/docs/reference/cua-driver -maxdepth 1 -type f | sort
echo '---'
rg -n --hidden --glob '!**/node_modules/**' 'mcp-tool-notes|mcp-tools|redirect|aliases|slug' docs/content/docs/reference/cua-driver docs/content/docs -g '*.mdx' -g '*.md'

Repository: trycua/cua

Length of output: 3550


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- meta.json ---'
cat -n docs/content/docs/reference/cua-driver/meta.json
echo '--- redirects / aliases search ---'
rg -n --hidden --glob '!**/node_modules/**' 'mcp-tool-notes|mcp-tools|redirect|alias|aliases|slug' docs . -g 'meta.json' -g '*.json' -g '*.mdx' -g '*.md'

Repository: trycua/cua

Length of output: 11396


Keep the action-response-shape link on mcp-tools
docs/content/docs/explanation/capture-and-dispatch-modalities.mdx:63 points to /reference/cua-driver/mcp-tool-notes#action-response-shape, but the Cua Driver docs still expose mcp-tools.mdx as the reference page and ## Action response shape lives there. Point the link back to /reference/cua-driver/mcp-tools#action-response-shape or add a matching redirect/page.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/content/docs/explanation/capture-and-dispatch-modalities.mdx` at line
63, The reference link for the escalation field is pointing to the wrong MCP
docs page. Update the link in the `capture-and-dispatch-modalities.mdx` content
to use the existing `mcp-tools` reference anchor for `action-response-shape`, or
add an equivalent redirect if you want to keep the newer path. Keep the
surrounding guidance about `escalation`, `px`, `foreground`, `page`, and the
linked ladder doc unchanged.

Comment on lines +49 to +55
cua-driver permissions status
```

Approve both prompts, then run the check again:

```bash
cua-driver call check_permissions
cua-driver permissions status

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,120p' docs/content/docs/how-to-guides/recipes/fill-a-form-from-a-local-file.mdx

printf '\n--- SEARCH ---\n'
rg -n "cua-driver permissions (status|grant)" docs . -g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**'

Repository: trycua/cua

Length of output: 8936


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '356,366p' docs/content/docs/reference/cua-driver/cli-reference.mdx
printf '\n---\n'
sed -n '88,116p' docs/content/docs/how-to-guides/driver/install.mdx
printf '\n---\n'
sed -n '28,38p' docs/content/docs/tutorials/drive-your-first-app.mdx

Repository: trycua/cua

Length of output: 1591


Use permissions grant before rechecking

permissions status is read-only and won’t trigger the macOS prompts. Start with permissions grant, then run permissions status to confirm both permissions are granted.

Suggested fix
```bash
-cua-driver permissions status
+cua-driver permissions grant

Approve both prompts, then run the check again:

cua-driver permissions status

</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/content/docs/how-to-guides/recipes/fill-a-form-from-a-local-file.mdx`
around lines 49 - 55, The example in this recipe is using the wrong command to
trigger the macOS permission prompts; `permissions status` only checks state and
will not prompt the user. Update the flow in the form-filling guide so the first
command uses `cua-driver permissions grant`, then keep `cua-driver permissions
status` as the follow-up verification step after both prompts are approved.

…grant recipe

- capture-and-dispatch-modalities: mcp-tool-notes doesn't exist on main (it's
  introduced by #2088), so point action-response-shape back to mcp-tools
- fill-a-form recipe: 'permissions status' is read-only and won't trigger the
  prompts the step tells you to approve — use 'permissions grant' first

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Th8TxivbUjS6NUT2cKVo6s
Now that #2088 has merged, the 'Action response shape' section lives in
mcp-tool-notes.mdx (moved out of the auto-generated mcp-tools.mdx). Point the
capture-and-dispatch-modalities link at its new home.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Th8TxivbUjS6NUT2cKVo6s
@f-trycua
f-trycua merged commit cf60a27 into main Jul 1, 2026
5 of 7 checks passed
@f-trycua
f-trycua deleted the docs/driver-audit-fixes branch July 1, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant