-
Notifications
You must be signed in to change notification settings - Fork 4.6k
[Feature]: Desktop — capability handlers for macOS UI control (screenshot, click, keys, AX, AppleScript) #6499
Copy link
Copy link
Open
Labels
dependenciesAuto scope: dependency manifest/lock/policy changed.Auto scope: dependency manifest/lock/policy changed.desktopDesktop app (Tauri) — menu bar, dashboard parity, macOS integrationsDesktop app (Tauri) — menu bar, dashboard parity, macOS integrationsenhancementNew feature or requestNew feature or requestpriority:p2Medium priorityMedium priorityrisk: highAuto risk: security/runtime/gateway/tools/workflows.Auto risk: security/runtime/gateway/tools/workflows.runtimeAuto scope: src/runtime/** changed.Auto scope: src/runtime/** changed.securityAuto scope: src/security/** changed.Auto scope: src/security/** changed.status:in-progressAn open PR is actively targeting this issue.An open PR is actively targeting this issue.status:no-staleExempt from the 60-day stale auto-close policy.Exempt from the 60-day stale auto-close policy.tauriTauri shell, native bindings, build/packagingTauri shell, native bindings, build/packaging
Milestone
Metadata
Metadata
Assignees
Labels
dependenciesAuto scope: dependency manifest/lock/policy changed.Auto scope: dependency manifest/lock/policy changed.desktopDesktop app (Tauri) — menu bar, dashboard parity, macOS integrationsDesktop app (Tauri) — menu bar, dashboard parity, macOS integrationsenhancementNew feature or requestNew feature or requestpriority:p2Medium priorityMedium priorityrisk: highAuto risk: security/runtime/gateway/tools/workflows.Auto risk: security/runtime/gateway/tools/workflows.runtimeAuto scope: src/runtime/** changed.Auto scope: src/runtime/** changed.securityAuto scope: src/security/** changed.Auto scope: src/security/** changed.status:in-progressAn open PR is actively targeting this issue.An open PR is actively targeting this issue.status:no-staleExempt from the 60-day stale auto-close policy.Exempt from the 60-day stale auto-close policy.tauriTauri shell, native bindings, build/packagingTauri shell, native bindings, build/packaging
Type
Projects
Status
Backlog
Summary
Implement the actual macOS operations the agent can dispatch over
/ws/nodesonce the persistent NodeClient is in place. Each handler reads its required permission via the existing primitives inapps/tauri/src/macos/permissions.rs, executes the operation, and returns a structured result.Problem
The persistent WebSocket and capability advertisement are useless without handlers that actually do the work. We need first-class implementations for the high-value verbs.
Proposal
apps/tauri/src/capabilities/:screenshot.rs— usesCGDisplayCreateImage/ ScreenCaptureKit; requires Screen Recording.click.rs— synthetic mouse click viaCGEventCreateMouseEvent; requires Accessibility.type_keys.rs— synthetic keyboard viaCGEventCreateKeyboardEvent; requires Accessibility.read_ax.rs— read UI tree viaAXUIElement; requires Accessibility.applescript.rs—osascript -e <script>; requires Automation per-app.notify.rs—UNUserNotificationCenter.add; requires Notifications.macos::permissions::check_*to verify the prerequisite.permission_denied(name)error so the agent can surface "I lost — re-grant?".{}for clicks, JSON tree for AX read).Approval gating (per #6321)
screenshot,read_ax) auto-approve.click,type_keys,applescript) trigger a system dialog the first time per-app and remember per a small allowlist persisted viatauri-plugin-store.Files
apps/tauri/src/capabilities/{mod,screenshot,click,type_keys,read_ax,applescript,notify}.rs(new)apps/tauri/src/lib.rs— register handlers in the NodeClient dispatch tableapps/tauri/Cargo.toml— addcore-graphicsandcore-foundationif neededAcceptance
{type:"invoke", capability:"screenshot"}returns a base64 PNG of the primary display.{capability:"click", args:{x:100, y:200}}clicks at that coordinate.permission_denied("screen_recording").Related