fix(cua-driver): check_permissions prompts by default - #1396
Conversation
`cua-driver check_permissions` told users it raises the Accessibility +
Screen Recording dialogs, but only `{"prompt": true}` did — the bare
form was read-only, leaving new users hunting for CuaDriver.app in
System Settings after a fresh install.
Flip the default to prompt. Apple's request APIs (`AXIsProcessTrusted-
WithOptions(prompt:)`, `CGRequestScreenCaptureAccess`) no-op when the
grant is already active, so callers asking only for a status check pay
nothing — and the install-flow callout in installation.mdx now matches
reality.
The in-process CLI fallback (no daemon listening) forces `prompt:
false`. Prompting from a one-shot CLI inside an IDE terminal would
attribute the TCC dialog to the IDE's bundle, not CuaDriver.app —
the user would grant the wrong identity. The existing stderr warning
already steers them to start the daemon; this keeps the prompt
behavior consistent with that path.
Docs: mcp-tools.mdx + SKILL.md updated to flip the example to
`{"prompt": false}` (the now-interesting opt-out form).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe PR changes the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Summary
cua-driver check_permissionsnow raises the Accessibility + Screen Recording dialogs by default. Previously only{"prompt": true}did — the bare form (whichinstallation.mdx,SKILL.md, andinstall.shall tell users to run) was read-only, so new users saw❌ NOT grantedand had to go hunt forCuaDriver.appin System Settings.AXIsProcessTrustedWithOptions(prompt:),CGRequestScreenCaptureAccess) no-op when the grant is already active, so this is safe to call repeatedly. Callers who explicitly want a quiet status check can pass{"prompt": false}.prompt: false. Prompting from a one-shot CLI inside an IDE terminal would attribute the TCC dialog to the IDE's bundle, notCuaDriver.app— the user would grant the wrong identity. The existing stderr warning still steers them to start the daemon.Why
Caught while walking through a fresh install: install.sh ends with "macOS raises the Accessibility + Screen Recording dialogs" — but only if the user knew to add
{"prompt": true}themselves. Without that, the install flow surfaces a red ❌ and goes silent. The defaults should match what install.sh / installation.mdx promise.Files
Sources/CuaDriverServer/Tools/CheckPermissionsTool.swift— flip default + update tool description.Sources/CuaDriverCLI/CallCommand.swift— coerceprompt: falsein the in-process fallback.docs/content/docs/cua-driver/reference/mcp-tools.mdx— update tool reference.Skills/cua-driver/SKILL.md— update prereqs guidance.Test plan
swift buildclean.test_no_daemon_emits_tcc_warning_on_stderrintegration test passes (exercises the in-process path; verifies warning + summary). The other test in that file fails on a pre-existing.app-bundle path assumption unrelated to this change.🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Documentation
check_permissionstool documentation to clarify that the default behavior now triggers macOS permission dialogs for missing Accessibility/Screen Recording grants.{"prompt": false}.Changes
check_permissionsnow prompts for missing permissions by default; repeated calls are safe.