[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-qwen-cua-driver":3,"mdc-ne4ex8-key":37,"related-org-qwen-cua-driver":6394,"related-repo-qwen-cua-driver":6565},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":35,"mdContent":36},"cua-driver","drive native GUI applications via MCP","Drive a native GUI app (macOS, Windows, Linux) via the Qwen Cua Driver CLI (default) or MCP server; snapshot its accessibility tree, act through snapshot-bound element tokens, native menu paths, exact window geometry, or pixel coordinates, and verify from fresh state. Use when the user asks you to operate, drive, automate, or perform a GUI task in a real application on the host.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"qwen","Qwen","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fqwen.png","QwenLM",[13,17,20,23],{"name":14,"slug":15,"type":16},"Accessibility","accessibility","tag",{"name":18,"slug":19,"type":16},"MCP","mcp",{"name":21,"slug":22,"type":16},"Desktop","desktop",{"name":24,"slug":25,"type":16},"Browser Automation","browser-automation",26008,"https:\u002F\u002Fgithub.com\u002FQwenLM\u002Fqwen-code","2026-08-09T04:04:41.832404",null,2643,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":34},[],"An open-source AI coding agent that lives in your terminal.","https:\u002F\u002Fgithub.com\u002FQwenLM\u002Fqwen-code\u002Ftree\u002FHEAD\u002Fpackages\u002Fcua-driver\u002Frust\u002FSkills\u002Fcua-driver","---\nname: cua-driver\ndescription: Drive a native GUI app (macOS, Windows, Linux) via the Qwen Cua Driver CLI (default) or MCP server; snapshot its accessibility tree, act through snapshot-bound element tokens, native menu paths, exact window geometry, or pixel coordinates, and verify from fresh state. Use when the user asks you to operate, drive, automate, or perform a GUI task in a real application on the host.\nversion: 0.17.0 # x-release-please-version\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - qwen-cua-driver\n    envVars:\n      - name: CUA_DRIVER_EMBEDDED\n        required: false\n        description: Set to 1 when a macOS host app launches the driver in embedded mode.\n      - name: CUA_DRIVER_HOST_BUNDLE_ID\n        required: false\n        description: Bundle identifier of the macOS host app in embedded mode.\n      - name: CUA_DRIVER_PATH\n        required: false\n        description: Optional path to a qwen-cua-driver binary used by an embedding host.\n      - name: CUA_DRIVER_RS_ENABLE_WAYLAND\n        required: false\n        description: Set to 1 to enable the native Wayland backend.\n      - name: CUA_DRIVER_RS_MCP_HTTP_PORT\n        required: false\n        description: Optional port for the local MCP HTTP endpoint.\n      - name: CUA_DRIVER_RS_MCP_HTTP_TOKEN\n        required: false\n        description: Required host-generated bearer token when the local MCP HTTP endpoint is enabled.\n    homepage: https:\u002F\u002Fgithub.com\u002FQwenLM\u002Fqwen-code\u002Ftree\u002Fmain\u002Fpackages\u002Fcua-driver\n---\n\n# Qwen Cua Driver\n\nOrchestrates cross-platform app automation via `qwen-cua-driver`. Whenever\na user asks to drive a native app, follow the loop in this skill\nrather than calling tools ad-hoc — the snapshot-before-action\ninvariant is not optional and silently breaks if you skip it.\n\n## Platform-specific reading — read this first\n\nThis file is the **cross-platform core**: snapshot invariant, CLI vs\nMCP choice, tool surface naming, behavior matrix, canonical loop,\npixel-click contract, common failure modes. The platform-specific\nmaterial (forbidden-list, accessibility tree implementation, launch\nsemantics, click dispatch) lives in companion files in this same\ndirectory:\n\n- **macOS** — read `MACOS.md` (no-foreground contract, forbidden\n  `open`\u002F`osascript`\u002F`cliclick` invocations, AXMenuBar navigation,\n  SkyLight pixel-click dispatch).\n- **Windows** — read `WINDOWS.md` (UIA tree vs AX, UWP \u002F\n  ApplicationFrameHost hosting, layered UIA+PostMessage click chain,\n  Session 0 isolation, Windows-specific focus-steal vectors).\n- **Linux** — read `LINUX.md` (X11 background input via AT-SPI +\n  XSendEvent and compositor-specific Wayland capabilities).\n\nCross-cutting topics also have their own files:\n\n- `BROWSER.md` — exact native-window binding, explicit browser preparation,\n  typed Chromium\u002FElectron page tools, input trust classes, and native\n  fallbacks for browser chrome and unsupported engines.\n- `RECORDING.md` — session recording + `replay_trajectory`.\n\nUse whichever combination matches the host. When in doubt, run\n`qwen-cua-driver doctor` — it reports the platform and the right entry\npoint.\n\n## Start with the narrowest semantic route\n\nBefore opening or operating an application, name the desired postcondition and\nuse the first applicable route below. Verify the result in the same domain\nbefore stopping or advancing:\n\n0. **Caller-provided headless\u002Fbackground operation for a non-GUI outcome.**\n   Prefer an exact application API\u002FSDK, service or database client, CLI, or\n   filesystem operation over imitating a user. This includes batch-safe file\n   moves, renames, copies, directory creation, archive extraction, data\n   conversion, and process inspection. Read the resulting semantic state back;\n   a zero exit status alone is not proof.\n1. **Typed Cua operation for an application or window outcome.** Use\n   `set_window_frame` for exact geometry, `invoke_menu` for a known native\n   application-menu path, typed browser tools for supported page content, and\n   clipboard tools for clipboard state. Verify with\n   `list_windows`, `get_browser_state`, or `clipboard_read`, respectively.\n2. **Background accessibility action.** Use a fresh AX\u002FUIA\u002FAT-SPI target.\n3. **Background pixel action.** Use the pixels from the same state snapshot.\n4. **Foreground delivery.** Retry only the action that evidence says could not\n   land in the background.\n5. **Desktop fallback.** Enter this explicit, one-way session phase last.\n\nUse Cua Driver when the outcome lives in an application's UI or window state,\nor when the user explicitly asks to operate that GUI. Once the task crosses\nthat boundary, do not replace Cua's targeted and verified actions with shell\nscripts that mutate the app UI. A shell is a capability of the calling agent,\nnot of the Cua Driver MCP server; an MCP-only client must not assume one exists.\n\n### Filesystem outcomes and GUI fallbacks\n\nWhen the requested outcome is a filesystem change and the caller has a\nheadless filesystem or command capability, keep it on rung 0. Enumerate the\nexact source set, decide the destination-conflict policy before changing\nanything, perform one batch-safe operation, then independently read back both\nsource and destination manifests. Do not open a file manager merely to mimic a\nmove, copy, or rename that the caller can execute and verify directly.\n\nIf the caller has no such capability, use the file manager as a GUI fallback\nand keep each claim narrow:\n\n1. After entering an inline rename and setting its value, commit it with the\n   platform's confirmation key, then take a fresh snapshot. Value readback from\n   the inline editor proves only that the editor changed; it does not prove the\n   filesystem rename committed.\n2. For a multi-selection, use the platform modifier (`cmd` on macOS, `ctrl` on\n   Windows\u002FLinux). On macOS and Windows, issue that modified click with\n   `delivery_mode:\"foreground\"` so the target observes physical modifier state;\n   a refused background attempt is an escalation signal, not a failed action to\n   trust or repeat. Re-snapshot before the next operation. Continue only when\n   every intended item is selected and the prior selection was preserved.\n3. After a cross-window drag or paste, verify the destination contains the\n   complete expected set and the source reflects copy-versus-move semantics.\n   A delivered drag, keypress, or menu action is not file-operation proof.\n4. If a destination conflict presents an unrecognized policy or ambiguous\n   partial result, stop that GUI path and surface the unresolved state instead\n   of retrying blindly.\n\n## The no-foreground principle (window phase)\n\nIn a strict `window` session, and during the initial window phase of an\n`auto` session, **the user's frontmost app MUST NOT change.** Every platform\nhas its own list of forbidden commands:\n\n- macOS: any `open` invocation, any `osascript` that mutates GUI\n  state, `cliclick`, `cghidEventTap` writes targeting another app's\n  window. Full list in `MACOS.md`.\n- Windows: any `Start-Process` that triggers a `ShowWindow`\u002F`SetForegroundWindow`\n  on the target, `WScript.Shell.AppActivate`, attaching to the\n  foreground thread for input forwarding. Full list in `WINDOWS.md`.\n\nIf you reach for a command that says \"activate\", \"foreground\",\n\"raise\", or \"make key\", stop and translate to the cua-driver tool\nthat does the same intent without focus-stealing.\n\nA strict `desktop` session is an explicit user choice to operate the visible\ndesktop and therefore uses foreground\u002Fsystem input. An `auto` session may enter\nthat phase only after the complete window ladder below has been attempted and\nverified, followed by `escalate_session`. Never infer desktop permission from a\nfailed action or a proxy\u002Ftransport session id.\n\n## GUI transport defaults — prefer cua-driver over GUI shell shims\n\n**Default transport is the `qwen-cua-driver` CLI** — `Bash` shelling out\nto `qwen-cua-driver \u003Ctool-name> '\u003CJSON-args>'`. MCP tools (prefix\n`mcp__cua-driver__*`) only when the user explicitly asks for them.\nCLI wins because it picks up rebuilds instantly, failures are\neasier to diagnose, and there's no per-tool schema-load overhead.\n\nEvery reference to `click(...)`, `get_window_state(...)` etc. in this\nskill means `qwen-cua-driver click '{...}'` — translate to MCP form only\nwhen MCP is requested.\n\n### Claude Code computer-use compatibility mode\n\nFor normal Claude Code use, keep the default CLI or `qwen-cua-driver` MCP\nserver path above. If the user explicitly wants Claude Code's\nvision\u002Fcomputer-use-style flow, they can register:\n\n```bash\nqwen-cua-driver mcp-config --client claude   # then paste + run the printed line\n```\n\nObservation: Claude Code vision flows appear to treat a screenshot\nMCP tool as the image-grounding anchor. This compatibility mode keeps\nthe normal CuaDriver tools and changes only `screenshot`. The\ncompatibility `screenshot` requires `pid` and `window_id`, captures\nonly that target window, and returns the window-local pixel\ncoordinate frame. Start with `launch_app` or `list_windows`, then\ncall `screenshot({pid, window_id})`; do not assume desktop\ncoordinates or a full-screen capture.\n\nUse MCP for this Claude Code vision\u002Fcomputer-use-style path. Do not\nshell out to `qwen-cua-driver screenshot` as a substitute: CLI screenshots\nstill work as CuaDriver calls, but they do not expose the\n`mcp__cua-computer-use__screenshot` tool name that Claude Code\nappears to use as the image-grounding cue.\n\n## Using cua-driver from the shell\n\nTool names are `snake_case`, management subcommands are\n`kebab-case` — no ambiguity. Tools invoked as `qwen-cua-driver\n\u003Ctool-name> '\u003CJSON-args>'`. Management subcommands:\n\n- `qwen-cua-driver serve` — start an explicit persistent service when short-lived\n  clients must share runtime state or a platform identity. Bare MCP owns its\n  runtime directly on Windows\u002FLinux and uses the signed app service on macOS;\n  `qwen-cua-driver mcp --socket \u003Cendpoint>` selects a service explicitly.\n  One-shot CLI tool calls still use the service path. macOS users: see\n  `MACOS.md` for the LaunchServices-routed launch form.\n- `qwen-cua-driver stop` \u002F `status`\n- `qwen-cua-driver list-tools`, `describe \u003Ctool>`\n- `qwen-cua-driver recording start|stop|status` — see `RECORDING.md`\n- `qwen-cua-driver check-update [--json] [--no-cache]` — read-only \"is a newer release available?\" probe. Same payload as the `check_for_update` MCP tool; pair with `qwen-cua-driver update --apply` to install.\n\nCanonical multi-step workflow (example shape — platform-specific\nlaunch idioms in the per-OS companion file):\n\n```bash\nqwen-cua-driver serve\nqwen-cua-driver launch_app '{\"bundle_id\":\"...\"}'\n# → {pid: 844, windows: [{window_id: 10725, ...}]}\nqwen-cua-driver get_window_state '{\"pid\":844,\"window_id\":10725}'\n# Use the returned structuredContent.elements[].element_token:\nqwen-cua-driver click '{\"pid\":844,\"element_token\":\"s0000002a:14\"}'\nqwen-cua-driver verify_state '{\"pid\":844,\"window_id\":10725,\"expect\":[{\"element\":{\"selector\":{\"label_contains\":\"Saved\"},\"exists\":true}}]}'\nqwen-cua-driver stop\n```\n\nFor Chromium page content, keep the same native window selection but switch to\nthe browser capability loop: `start_session`, bind `(pid, window_id)` with\n`get_browser_state`, snapshot the returned tab, then use `browser_click`,\n`browser_type`, or `browser_navigate`. Read `BROWSER.md` before using this\nroute. Browser target ids, tab ids, and refs are session-scoped and stale refs\nmust be replaced by a fresh snapshot.\n\n## Agent cursor overlay\n\nVisual cursor overlay for demos and screen recordings. It is enabled by\ndefault for declared sessions; anonymous actions remain cursor-less. Toggle with\n`set_agent_cursor_enabled` to hide or re-show it. The embedded\n`cua.default` theme uses a session-colored pointer over a larger,\ncursor-shaped glow in the same session color. The glow fades to transparent\naround the full silhouette. Action marks use the same\nsession-colored center and white-outline treatment, plus a tighter, softer\nglow. This pairing preserves contrast across varied backgrounds. It provides animations for\nidle, observe, click, drag, scroll, text, key, navigation, app, transfer,\nrecording, and system activity. Motion knobs:\n`set_agent_cursor_motion` takes any subset of `start_handle`,\n`end_handle`, `arc_size`, `arc_flow`, `spring` — tuneable at runtime,\npersisted to config.\n\nDelivery and target context is shown as host-owned chips inside the session\nbadge. Themes own the twelve action animations only. The session name and\ncontext chips fade independently, so an active tool can show its execution\ncontext without revealing a session name that has already faded.\n\n**Per-session cursors.** Each MCP session automatically owns its own\ncursor, keyed by the session's id (the proxy mints one session id per\nMCP connection and the daemon scopes the cursor, config overrides, and\nrecording to it). The CLI and SDK contracts take the declared `session`\nexplicitly. Cursor-theme controls no longer accept `cursor_id` or the legacy\nshape\u002Fcolor\u002Fimage fields. Input-delivery tools may still use `cursor_id` to\nname a virtual pointer; it never selects artwork. The default cursor is Cua\nblue, while each named session receives a stable fill from the built-in\npalette. Select only preinstalled\nthemes with `set_agent_cursor_theme`; theme source paths and inline animation\ndata are never accepted through an agent tool. Use the trusted local\n`qwen-cua-driver cursor-theme` workflow to validate, compile, preview, install,\nlist, or remove custom themes.\n\n**Visibility caveat (AX runs).** On a pure accessibility-action run\n(clicking by `element_index`), the first action **seeds the cursor\non-screen a short distance from the target and plays a brief glide +\npulse** — not the long Bezier sweep a cursor already on-screen would\ntrace from its previous spot. It's subtle and easy to miss in a\nrecording. If you want a clearly _gliding_ cursor for a demo or screen\nrecording, do a pixel click (`click({pid,x,y})`) or a `move_cursor`\nfirst to put the cursor on-screen; subsequent AX actions then glide the\nfull path normally.\n\nRequires a suitable UI event loop. Service and private-worker runtimes provide\none. On macOS, a same-process SDK runtime or `qwen-cua-driver mcp --direct` without\na certified host main-thread adapter returns a structured\n`facility_unavailable` result for overlay operations; do not treat that as a\nsuccessful cursor move. One-shot CLI adapters do not own an overlay\nthemselves.\n\n## The core invariant — snapshot before and verify after every action\n\n**Every action MUST be bracketed by observation for the session's effective\nscope.** Use `get_window_state(pid, window_id)` before a window action (or\n`get_desktop_state(session)` in desktop scope), then use `verify_state` for an\nexpressible window-scoped postcondition. In effective desktop scope,\n`verify_state` is intentionally refused with `window_scope_disabled`; verify\nwith a fresh `get_desktop_state` result and agent-owned visual\u002Fsemantic reading.\n\n- **Before** — the pre-action snapshot resolves the `element_index`\n  you're about to use. Indices from previous turns are stale; the\n  server replaces the element index map on every snapshot, keyed\n  on `(pid, window_id)`. Indices from turn N don't resolve in turn\n  N+1, and indices from window A don't resolve against window B of\n  the same app. Skip this and element-indexed actions fail with\n  `No cached AX state`.\n- **After** — `verify_state(pid, window_id, expect)` checks a bounded,\n  deterministic postcondition. Results are `satisfied`, `unsatisfied`, or\n  `unknown`; `unknown` never means success. Set `include_screenshot:true` when\n  the outcome also needs visual reading. The driver returns that final image\n  without interpreting it. A multimodal agent harness reads the image and owns\n  the stop\u002Fretry\u002Fladder decision.\n\n`unknown_reason` distinguishes invalid\u002Funsupported predicates, untrusted web\ncontent, ambiguous matches, missing targets, unavailable observations, and\n`stability_unproven`. A positive final sample that was not observed for the\nrequested consecutive sample count is `stability_unproven`, not success.\nNegative element existence is conservative: when an accessibility projection\ncannot prove its search domain exhaustive, absence remains `unknown`.\n\nDo not make the driver invent task meaning or retry actions automatically.\nFor postconditions not expressible by `verify_state`, take a fresh state\nsnapshot and let the agent judge the tree and\u002For image explicitly. This applies\nto pixel clicks and desktop actions too.\n\n### Read action facts without confusing them with task success\n\nA successful action returns `effect` and `route`, with optional typed\n`delivery`, `evidence`, and `escalation`. These fields describe the actuator;\nthey do not declare the user's task complete.\n\n- `confirmed` means the driver has publishable value readback or window-change\n  evidence for that action.\n- `partial` means only `delivery.delivered_count` was delivered.\n- `unverifiable` means the driver cannot prove the effect.\n- `suspected_noop` means available evidence suggests no useful change.\n- `refused` means the selected route deliberately did not deliver.\n\nThe route vocabulary is intentionally cross-platform:\n`accessibility`, `synthetic_events`, `global_input`, `dom`, and\n`trusted_input`. Do not branch on private OS transport names.\n\nAn optional escalation is a harness instruction, never an automatic retry:\n\n- `pixel`: refresh visual state and choose an exact pixel target;\n- `foreground`: explicitly select foreground delivery if session policy allows;\n- `page`: bind the native window to a supported browser page route;\n- `session`: prepare or explicitly widen the session only when policy permits.\n\nBranch on the closed reason vocabulary:\n`route_unavailable`, `delivery_failed`, `effect_unconfirmed`,\n`suspected_noop`, and `permission_required`.\n\nAfter any action, keep using `verify_state` or a fresh state snapshot for the\nactual task postcondition. The multimodal harness owns visual reading and the\ndecision to stop, retry, or advance the ladder.\n\n## Choose capture scope when the session starts\n\n`capture_scope` is a per-session policy, not persistent configuration. Declare\nit with `start_session`; it is immutable until that session ends. Concurrent\nsessions may choose different policies safely.\n\n- `auto` (default): begins with effective scope `window`. Desktop perception\n  and actions are locked until the window ladder is exhausted, each attempted\n  action is verified, and the caller explicitly invokes `escalate_session`.\n  Escalation is one-way for the live session.\n- `window`: strict window-only perception and actions. Desktop tools are always\n  rejected with `desktop_scope_disabled`.\n- `desktop`: strict full-desktop perception and foreground\u002Fsystem actions.\n  Window-scoped perception and actions are rejected with\n  `window_scope_disabled`.\n\n```bash\nqwen-cua-driver start_session '{\"session\":\"research-1\",\"capture_scope\":\"auto\"}'\nqwen-cua-driver get_session_state '{\"session\":\"research-1\"}'\n```\n\nDo not use `config set capture_scope` or `set_config`; that key is retired and\nstale values on disk are ignored. Always pass the public `session` field on\nstate and action calls. Reserved fields such as `_session_id` are transport\nmetadata and cannot create or change policy.\n\nDuring a mixed-version rollout, require `tools\u002Flist` to advertise\n`session.capture_scope` (and `session.capture_scope.escalate` for `auto`). If an\nolder daemon does not advertise them, fail closed and ask for an upgrade; never\nfall back to the retired global config key.\n\n### Why window selection is the caller's job now\n\n`get_app_state` used to pick a window for you via a max-area heuristic\nthat returned the wrong surface on apps with large off-screen utility\npanels. Concrete reproducer: IINA's OpenSubtitles helper (600×432\noff-screen) out-area'd the visible 320×240 player window, so\n`get_app_state(pid)` screenshot'd the invisible panel and clicks landed\nthere silently. The new `get_window_state(pid, window_id)` makes the\ncaller name the window explicitly — the driver validates that the\nwindow belongs to the pid and is on the current Space\u002Fdesktop, then\nsnapshots exactly what was asked for. Enumerate candidates via\n`list_windows` or read the `windows` array `launch_app` already\nreturns.\n\n## Behavior matrix\n\n### Perception is mode-agnostic — `get_window_state` returns BOTH\n\n`get_window_state(pid, window_id)` **returns both the accessibility\ntree AND a screenshot by default.** There is no capture mode to pick\nand nothing to configure — you ground on the tree and the screenshot\ntogether, and you cross-check one against the other. This matters\nbecause the tree **lies** on some surfaces:\n\n- **Electron** echo-confirms a `set_value` \u002F `type_text` against the AX\n  shim while the rendered text view never changed.\n- **Catalyst** (iOSAppOnMac) exposes null \u002F placeholder `AXValue`s.\n- **Virtualized \u002F off-viewport list rows** report bogus frames (an\n  `h:1` height, an off-screen origin) for rows that aren't actually\n  laid out.\n\nA grounding screenshot is present by default, so when the tree looks\nwrong you look at the pixels **in the same response** — no second\ncapture, no mode flip.\n\n> **Perf opt-out — `include_screenshot`.** `include_screenshot`\n> (boolean, default `true`) is the one knob, and it is a **perf** knob,\n> not a modality choice. Default returns both (grounding-first). Pass\n> `include_screenshot:false` to skip the screen grab and get the tree\n> only — the cheap path when you're just **re-indexing before an\n> element ax action** and don't need to re-ground on pixels. The\n> `ax`\u002F`px` decision still lives at action time, not here.\n\n> **`capture_mode` is DEPRECATED and ignored.** It is still _accepted_\n> on `get_window_state` so old callers don't error, but it has **no\n> effect** — both the tree and the screenshot come back regardless of\n> what you pass (`ax`, `vision`, `som`, anything). There is no\n> `ax`\u002F`vision`\u002F`som` capture choice anymore. Drop the word \"vision\"\n> for perception entirely. (The tool named `screenshot` is separate —\n> raw PNG, no AX walk — and unrelated.)\n\n### The modality is chosen at ACTION time — `ax` vs `px`\n\nYou don't pick a capture mode; you pick **how you address the target**\non the action call, and that one choice selects the rung:\n\n- **element ax action** — pass `element_token` (preferred), or the exact\n  `element_index` + `snapshot_id` pair from the same response.\n  Dispatches through the **accessibility rung**: AXPress (macOS) \u002F UIA\n  Invoke (Windows) \u002F AT-SPI `doAction` (Linux). Backgroundable,\n  z-order-independent, and the only **driver-verifiable** rung.\n- **element px action** — pass `x`, `y`. Dispatches through the **pixel\n  rung**, reading the coordinate straight off the screenshot that's\n  already in the `get_window_state` response. Best-effort; the caller\n  confirms the effect.\n\n`ax`↔`element_index`, `px`↔pixel `x,y`. We retired the word \"vision\"\nfor the _dispatch_ path — it conflated perception with dispatch.\nPerception is always both; dispatch is `ax` or `px`.\n\n**The keyboard family has both forms too.** `type_text`, `press_key`,\nand `hotkey` take a snapshot-bound element target (ax) **or** `x,y` (px) — mutually\nexclusive, same as the pointer tools. The px form **pixel-clicks at\n`(x,y)` to establish real renderer focus, then delivers the\nkeystroke(s)** to the now-focused element (it reuses `click`'s\ncoordinate translation + `delivery_mode`). That gives e.g.\n`type_text({pid, window_id, x, y, text})` as a one-call focus-then-type\nfor Chromium\u002FElectron inputs the AX path can't reach, and\n`hotkey({pid, x, y, keys:[\"cmd\",\"v\"]})` to paste into a specific field.\n\n**Typing default (the ladder).** Call `type_text` directly with\n`element_token` (ax) — it targets the field, no pre-click. On\nElectron\u002FCatalyst the AX layer echoes the write without rendering it,\nso the driver returns `effect:\"unverifiable\"` with\n`escalation.target:\"pixel\"` there (never a false `effect:\"confirmed\"`) —\nfollow it, and cross-check the\nscreenshot in the response (the only ground truth). Escalate to the px\nform — `type_text({pid, window_id, x, y, text})` — which pixel-clicks\nto focus, then types. **If the target control is closed** (a search\nbutton, a collapsed field), AX-press to open it first (AX actions work\nin the background): a px focus-click won't reliably open _and_ focus a\nclosed control, so the text leaks into whatever's already focused.\nEscalate to `delivery_mode:\"foreground\"` only if it still drops.\n\n**`set_value` stays AX-only by design** — use it when the intent is to\nreplace a control's whole value: dropdowns, checkboxes, sliders, steppers,\nand native text fields such as Finder's inline rename editor. Use\n`type_text` when the intent is to insert text at the current selection or\ncursor. Its pixel counterpart is a `click`\u002F`drag` on the control, not a\n\"set value at a pixel.\" So: insert text → `type_text` (ax+px); replace a\nsurfaced native value → `set_value`; pixel-manipulate a control →\n`click`\u002F`drag`.\n\n**Action responses carry closed action facts**\n\nUse the `effect`, `route`, optional `delivery`, `evidence`, and\n`escalation` rules in “Read action facts without confusing them with task\nsuccess” above. The old `verified`, `path`, coordinates, scope, and\n`escalation.recommended` response fields no longer exist.\nThe full wire contract and 0.14 migration notes are in\n`..\u002F..\u002F..\u002Fdocs\u002Faction-result-contract.md`.\n\n`get_window_state` itself, when the AX tree comes back empty (a non-AX\nsurface like Electron\u002FChromium\u002Fcanvas), returns `degraded: true`\nplus an observation-specific escalation hint — normally pointing at pixels (you\nstill have the screenshot from the same call to click off).\n\n**Platform nuance for action escalation.** On **Wayland** an unfocused\nwindow cannot be pixel-targeted in the background (libei →\n`background_unavailable`), so the action target is\n**`foreground`, not `pixel`**. macOS, X11, and most Windows surfaces\ncan pixel-target in the background, so they target `pixel`. See\n`LINUX.md` \u002F `WINDOWS.md`.\n\n## The verify-then-escalate ladder (algorithm)\n\nEvery snapshot already hands you both the tree and the screenshot, so\nverifying never means \"go take a screenshot\" — it means cross-check\nthe tree against the pixels you already have, and only change\n_dispatch rung_ on a real signal. Walk the rungs:\n\n```\n# Routes 0–1 — resolve non-GUI, exact geometry, and supported page outcomes first\n# Use a caller-provided semantic operation for a non-GUI outcome, then read it back.\n# For exact window geometry: set_window_frame(...), then list_windows(...) readback.\n# For a known native menu command: invoke_menu(pid, window_id, path), then verify its effect.\n# For supported page content: get_browser_state(...), typed browser action, refresh refs.\n# Continue below only when the postcondition actually requires native UI interaction.\n\n# Route 2 — element AX\u002FUIA\u002FAT-SPI action, backgrounded\nget_window_state(pid, window_id)            # tree + screenshot, both, always\nresp = click(pid, element_token)            # or type_text \u002F set_value \u002F press_key\ncheck = verify_state(                       # bounded structured read-back\n    pid, window_id,\n    expect=[...],\n    include_screenshot=true                 # optional evidence for multimodal harness\n)\n\nif check.status == \"satisfied\":\n    done                                    # driver-verified\n\nif check.status == \"unknown\" and check has an image:\n    harness reads the image                  # model-owned visual interpretation\n    if visual outcome is satisfied: done\n\n# escalate only on a real signal\nif resp.effect == \"suspected_noop\"\n   or resp.escalation.target == \"pixel\"\n   or get_window_state.degraded            # empty tree → non-AX surface\n   or check.status != \"satisfied\"\n   or the tree looks wrong vs the screenshot:   # e.g. an h:1 \u002F off-viewport row\n\n    # Route 3 — element px action off the SAME screenshot\n    pick the target pixel from the screenshot already in the response\n    click(pid, x, y)                        # background pixel — still no foreground\n    verify_state(..., include_screenshot=true)\n    if it landed: done\n\n# Route 4 — background delivery was dropped (insert\u002Fclick never arrived)\nif resp.escalation.target == \"foreground\"\n   or the px action still did nothing:\n    re-call the same action with delivery_mode:\"foreground\"\n    # on Wayland this is the ONLY escalation — px-bg can't target an\n    # unfocused window there; see LINUX.md\n    verify again\n\n# Route 5 — desktop fallback (auto sessions only, explicit and one-way)\n# Reach this only after semantic, AX, window-pixel, and foreground-window\n# delivery have all been exhausted and verified ineffective.\nescalate_session(session,\n    reason=\"foreground_ineffective\",       # or another advertised reason\n    detail=\"bounded non-sensitive summary\")\nget_desktop_state(session)                  # full primary display\ndesktop_action(session, scope=\"desktop\", ...)  # no pid\u002Fwindow_id\nget_desktop_state(session)                  # verify in the same coordinate frame\n```\n\nThe two ideas to hold onto: (1) the AX tree **lies** on canvas \u002F web \u002F\nCatalyst \u002F virtualized surfaces, so an unchanged-or-bogus tree plus\n`suspected_noop`\u002F`degraded` — or a tree that simply disagrees with the\nscreenshot — is your cue to do an **element px action** off the\nscreenshot you already have; (2) `px` is a _conscious_ switch to the\npixel addressing path, not a different capture.\n\n**Window state → what works**\n\n| state                      | `get_window_state`                                                                             | element-index click (AX\u002FUIA) | `press_key` commit                                    | pixel click                    |\n| -------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------- | ----------------------------------------------------- | ------------------------------ |\n| frontmost                  | ✅                                                                                             | ✅                           | ✅                                                    | ✅                             |\n| backgrounded \u002F visible     | ✅                                                                                             | ✅                           | ✅                                                    | ✅                             |\n| **minimized**              | ✅                                                                                             | ✅ (actions fire in place)   | ❌ silent no-op — use `set_value` or click equivalent | ❌ no on-screen bounds         |\n| hidden                     | ✅                                                                                             | ✅                           | depends                                               | ❌                             |\n| on another desktop \u002F Space | ⚠️ tree may be stripped on some apps — response carries `off_space: true` so you can detect it | ✅                           | ✅                                                    | ❌ not in current-desktop list |\n\n**Critical cell — minimized + keyboard commit.** The keystroke\nreaches the app but accessibility focus doesn't propagate to renderer\nfocus on a minimized window. Workarounds in order of preference:\n`set_value` to write the field's entire value directly, or\nelement-index-click a commit-equivalent button (Go, Submit,\ncheckbox). Tell the user the window needs to un-minimize only as a\nlast resort.\n\n## The canonical loop\n\n```\nstart_session(session, capture_scope=\"auto\") # once per run; policy is immutable\nlaunch_app(target)\n  → pick window_id from the returned `windows` array\n    (or call list_windows(pid) separately)\n  → get_window_state(pid, window_id)\n    → [act]  # every action also takes (pid, window_id) + your `session`\n  → verify_state(pid, window_id, expect)  # structured check; optional image\nend_session(session)              # when the run finishes\n```\n\nFor strict desktop sessions, replace the window portion with\n`get_desktop_state(session) → action(session, scope=\"desktop\", ...) →\nget_desktop_state(session)`. Desktop actions use screen-absolute coordinates\nfrom that exact full-display image and omit `pid`\u002F`window_id`. The global\n`get_screen_size` and `get_cursor_position` helpers are desktop-scoped too.\n\n`launch_app` now returns a `windows` array alongside the pid, so the\ncommon case collapses to two calls (`launch_app` → `get_window_state`)\nwithout a separate `list_windows` hop.\n\n**Declare a session.** A session is _your run's_ identity — a stable id\nyou choose (`\"research-1\"`), declared with `start_session` and passed as\n`session` on every action. It owns your agent cursor and capture policy (a\ndistinct colour and one immutable policy per id), follows the run across any\napps\u002Fwindows, and is the same whether\nyou drive over MCP, the CLI, or the socket. Declaring the session creates the\ncursor; anonymous actions remain cursor-less.\nEnd with `end_session` (or the idle-TTL reclaims it).\n\n**Concurrent runs\u002Fsubagents:** each run may independently choose `auto`,\n`window`, or `desktop`; one session's escalation never changes another. Also,\n`launch_app` is idempotent — two runs that\nlaunch the same app get the **same** instance (and on single-instance apps\nlike Calculator, the same window), so they clobber each other. Give each run\nits **own `session`** (→ its own cursor) AND pass\n`creates_new_application_instance: true` to `launch_app` (→ its own window).\nThe element cache is keyed on `(pid, window_id)` and the cursor on `session`,\nso distinct instances + distinct sessions keep the runs fully separated.\n\n**Parallelism vs. ordering.** Distinct sessions give distinct _cursors_, not\ndistinct _connections_. Subagents that share one `qwen-cua-driver mcp` (stdio)\nconnection have their tool calls **serialized** by the transport — they take\nturns, not run in parallel. That's not a correctness problem (session + window\nisolation means they can't collide), just a throughput one. For genuinely\nparallel agents, give each its **own connection**: separate `qwen-cua-driver mcp`\nprocesses, or point each agent's MCP client at the daemon's HTTP endpoint.\nSet `CUA_DRIVER_RS_MCP_HTTP_PORT` and a host-generated\n`CUA_DRIVER_RS_MCP_HTTP_TOKEN` of at least 32 characters, then send\n`Authorization: Bearer \u003Ctoken>` to `POST http:\u002F\u002F127.0.0.1:\u003Cport>\u002Fmcp`. The daemon\nserves connections concurrently; per-connection ordering keeps each agent's own\nsequence (e.g. `3 → + → 1 → =`) correct.\n\n`list_apps` is for app-level discovery (answering \"what's installed \u002F\nrunning \u002F frontmost?\") — not part of the core action loop. Skip it\nin the loop. For **window-level** questions — \"does this app have a\nvisible window?\", \"which desktop is this window on?\", \"which of this\npid's windows is the main one?\" — call `list_windows` instead; the\napp record doesn't carry window state on purpose. In the common\nsingle-window case you can skip `list_windows` entirely and read the\n`windows` array that `launch_app` already returned.\n\n### Snapshot and act with a snapshot-bound target\n\nCall `get_window_state({pid, window_id})` with the `window_id` from\n`launch_app`'s `windows` array (or a fresh `list_windows({pid})` if\nyou're interacting with a long-lived process). It returns **the tree\nand the screenshot together** by default, so you can both dispatch by\n`element_token` and ground on pixels from one call — no config change,\nno mode flip. When you're just re-indexing before an element ax action\nand don't need fresh pixels, pass `include_screenshot:false` to skip\nthe grab (a perf knob, not a modality choice).\n\nThe response carries:\n\n- `tree_markdown` — every actionable element tagged `[N]`; the structured row\n  with the same `element_index` carries its opaque `element_token`. The tree can be very large (Finder is\n  ~1600 elements, ~190 KB); when it exceeds token limits the MCP\n  harness saves it to a file and returns the path. Use `Bash` +\n  `jq -r '.tree_markdown'` + `grep` to pull the section you need.\n- `effect` \u002F `escalation` \u002F `degraded` — the verify-then-escalate\n  signals (see the behavior matrix above): `degraded: true` means the\n  tree came back empty (non-AX surface), so you act by **`px`** off the\n  screenshot in the same response.\n- `screenshot_file_path` — present when the screenshot was written to\n  disk instead of inlined (you passed `screenshot_out_file`, or the\n  context-saving CLI path); otherwise the frame is inlined.\n- `screenshot_width` \u002F `_height` \u002F `_scale_factor` — dimensions of\n  the captured image. Present whenever a screenshot was taken (i.e.\n  unless you passed `include_screenshot:false`).\n\n**Getting the screenshot as a file (CLI and context-constrained agents):**\n\n```bash\n# write to file — stdout stays readable (AX\u002FUIA tree \u002F summary only, no base64)\nqwen-cua-driver get_window_state '{\"pid\":N,\"window_id\":W,\"screenshot_out_file\":\"\u002Ftmp\u002Fshot.jpg\"}'\n\n# CLI --screenshot-out-file flag is equivalent\nqwen-cua-driver get_window_state '{\"pid\":N,\"window_id\":W}' --screenshot-out-file \u002Ftmp\u002Fshot.jpg\n```\n\nPass `screenshot_out_file` when using `get_window_state` via CLI or\nfrom an agent whose context window can't absorb ~31 KB of inline\nbase64 (e.g. OpenCode with a local Ollama model). The MCP image\ncontent block is omitted from the response when this param is set —\nthe model receives only the tree and `screenshot_file_path`, then\nreads the image from disk.\n\n**The tree and the screenshot are complementary, not redundant — and\nthey come from the _same_ call.** Each half carries signal the other\ncan't, which is exactly why you cross-check them:\n\n- The **tree** tells you _what's clickable_ — roles, labels,\n  snapshot-bound element handles, advertised actions, parent-child\n  structure. This is the ground truth for an **element ax action**.\n- The **screenshot** tells you _which one_ — the tree often has many\n  buttons with similar or empty labels (\"Delete\", \"OK\", anonymous\n  UUID-labeled buttons, repeated static-text), and visual context\n  disambiguates. Captions, colors, layout relationships visible in\n  pixels often don't show up in the tree at all (especially in\n  Chromium \u002F Electron \u002F web content) — and the screenshot is where you\n  catch the tree _lying_ (an `h:1`\u002Foff-viewport row, a Catalyst null\n  value).\n\nDefault to dispatching by `element_token` (the **element ax action**) —\nit's the verifiable, backgroundable rung. Do an **element px action**\n(`x,y` off the same screenshot) when the tree can't disambiguate\n(repeated\u002Fempty labels), when it's empty (`degraded` — non-AX\nsurface), when an action came back `suspected_noop`, or when the tree\ndisagrees with the pixels. You never re-capture to switch — the\nscreenshot is already there; you just change _how you address_ the\ntarget.\n\nReach for pixel coordinates only when the target is a canvas \u002F\nvideo \u002F WebGL \u002F custom-drawn surface that isn't in the tree\n(see \"Pixel-coordinate clicks\" below).\n\nThe `actions=[...]` list on each element is **advisory**, not\nauthoritative. cua-driver does not pre-flight check against it —\n`click({pid, element_token})` always attempts the default action (or\nthe action you pass) and surfaces whatever the target returns. **Try\nthe click first** — pivot only on the returned error code.\n\n### Tool dispatch table\n\nEvery row assumes a fresh `get_window_state`. Prefer its opaque\n`element_token`. If a client uses the visible integer instead, it must send\nthe response's `snapshot_id` with `element_index`; bare indices fail closed in\n0.17. Pixel-only forms remain independent of snapshot handles.\n\n| Intent                           | Tool                                                                                                            | Notes                                                                                                                                                                                                                 |\n| -------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| List an app's windows            | `list_windows({pid})`                                                                                           | returns `window_id`, `title`, `bounds`, `z_index`, `is_on_screen`, `on_current_space`. Already included in `launch_app`'s response — only call this for long-lived pids                                               |\n| Set an exact window frame        | `set_window_frame({pid, window_id, x, y, width, height})`                                                       | uses the platform window manager and returns `confirmed` only after geometry readback; inspect `list_windows` again before continuing when the result is not confirmed                                                |\n| Invoke a native application menu | `invoke_menu({pid, window_id, path:[\"Window\",\"Arrange\",\"Left\"]})`                                              | resolves exact immediate-child labels from live native state at every hop; refuses missing, ambiguous, or disabled segments and never falls back to pixels; verify the command's semantic effect afterward          |\n| Snapshot a window                | `get_window_state({pid, window_id})`                                                                            | returns `tree_markdown` + `screenshot_*`; populates the `(pid, window_id)` element_index cache                                                                                                                        |\n| Verify a postcondition           | `verify_state({pid, window_id, expect, include_screenshot?})`                                                   | polls bounded structured predicates; returns `satisfied`, `unsatisfied`, or `unknown`. Optional final image is interpreted by the agent harness, never by the driver                                                 |\n| Left click                       | `click({pid, element_token})` or `click({pid, window_id, element_index, snapshot_id})`                          | default `action: \"press\"`. Pixel form: `click({pid, x, y})` (window_id optional) — `modifier: [\"cmd\"\\|\"ctrl\"]`                                                                                                        |\n| Double-click \u002F open              | `double_click({pid, element_token})`                                                                            | Default action when the element advertises one (Open on Finder items \u002F openable rows), else stamped pixel double-click at the element's center                                                                        |\n| Right click \u002F context menu       | `right_click({pid, element_token})` or `click({pid, element_token, action:\"show_menu\"})`                       | Browser page content should use the typed route where available; see `BROWSER.md`                                                                                                                                     |\n| Type at cursor                   | `type_text({pid, text, element_token})` (ax) or `type_text({pid, text, window_id, x, y})` (px)                  | ax focuses the element then writes via the platform's text-set primitive; **px** pixel-clicks `(x,y)` to focus the renderer, then types — the one-call fix for Chromium\u002FElectron inputs the AX path can't reach       |\n| Set whole non-text control value | `set_value({pid, element_token, value})`                                                                         | **AX-only by design** — dropdown\u002F`AXPopUpButton`, checkbox, slider, stepper; **also the keyboard-commit workaround on minimized windows.** For text use `type_text`; to pixel-manipulate a control use `click`\u002F`drag` |\n| Scroll                           | `scroll({pid, direction, amount, by, element_token})`                                                           | synthesizes per-pid PageUp\u002FPageDown\u002Farrows                                                                                                                                                                            |\n| Focus + send key                 | `press_key({pid, key, element_token, modifiers})` (ax) or `press_key({pid, key, x, y})` (px)                    | ax targets the element before posting the key; **px** pixel-clicks `(x,y)` to focus, then sends the key                                                                                                               |\n| Send key to pid                  | `press_key({pid, key, modifiers})`                                                                              | no focus change; key goes to pid's current focus                                                                                                                                                                      |\n| Modifier combo                   | `hotkey({pid, keys})` (no focus) or `hotkey({pid, x, y, keys})` (px)                                            | e.g. `[\"cmd\",\"c\"]` \u002F `[\"ctrl\",\"c\"]`; posted per-pid, not HID tap. **px** pixel-clicks `(x,y)` to focus a field first, e.g. `[\"cmd\",\"v\"]` to paste into it                                                             |\n\n`list_windows.z_index` uses one portable convention: higher integer\nvalues are closer to the front. Select a frontmost candidate with the\nmaximum non-null value. If all values are `null` (as they can be on\nnative Wayland), use an explicit fallback; never treat `null` as zero\nor infer stacking from array order. The `windows` records returned by\n`launch_app` use the same convention.\n\nIn effective desktop scope, the foreground\u002Fsystem equivalents omit\n`pid`\u002F`window_id` and pass `scope:\"desktop\"`: `click`, `scroll`, `drag`,\n`move_cursor`, `type_text`, `press_key`, and `hotkey`. Coordinates are\nscreen-absolute pixels from the latest `get_desktop_state` image.\n\n**Window-scope keyboard\u002Ftext primitives require `pid`.** They use the named\ntarget's per-pid event-post path. Only a strict\u002Feffective desktop session may\nomit `pid`, and it intentionally routes keyboard input to the current\nforeground application.\n\n**Why the snapshot-bound element target is the primary path:** works on hidden \u002F\noccluded \u002F off-desktop windows, avoids focus steal, and fails closed after a\ntree rebuild instead of silently retargeting a reused index. Labels tell you\nwhat you're clicking. Reach for pixel\ncoordinates only when the accessibility tree can't.\n\n## Cross-platform parameter contract\n\nThe capture, dispatch, and addressing params — `session`,\n`delivery_mode`, `capture_mode` (deprecated\u002Fignored — see the behavior\nmatrix; still in the schema only so old callers don't error), `scope`,\n`modifier`, `button`, `element_index`, `snapshot_id`, `element_token` — are a **shared\nschema contract**: identical _shape_ (`type`\u002F`enum`\u002F`items`) on macOS,\nWindows, and Linux.\nThey compose from canonical fragments in\n`cua-driver-core::tool_schema` (+ `capture_mode`), and a CI gate\n(`schema_consistency_test`) runs every tool's live `tools\u002Flist` through a\nstructural checker on each platform, so the three surfaces can't\nsilently drift. _Contributor note:_ when you add or edit one of these\nshared params on a tool, pull from the fragment — don't re-hand-write the\nJSON, or the gate fails. (Descriptions may legitimately vary per tool;\nthe gate compares shape, not prose.)\n\nTwo consequences for callers:\n\n- **`session` is accepted on every action and cursor tool, on all three\n  platforms.** It's cursor-wired where the platform glides a cursor and\n  schema-accepted everywhere else — so the same `session` you pass on\n  macOS is no longer _rejected_ by Windows\u002FLinux, which previously\n  refused unknown keys via `additionalProperties:false`.\n- **`delivery_mode` (`\"background\"` default \u002F `\"foreground\"`) is on the\n  whole input family** — `click`, `double_click`, `right_click`, `drag`,\n  `scroll`, `type_text`, `press_key`, `hotkey` — uniformly. The\n  `foreground` rung briefly fronts the target, acts, then restores the\n  prior frontmost: the explicit last resort when a background attempt\n  didn't land. **`foreground` is a reaction, never a prediction.** Always\n  fire the `background` default first and let the driver tell you it\n  can't (a `background_unavailable` error with\n  `escalation.recommended == \"foreground\"`, or a successful action result\n  with `escalation.target == \"foreground\"`) — or observe a confirmed no-op —\n  _before_ you escalate.\n  Do **not** reason \"it's a GTK\u002FChromium\u002FElectron app, so background will\n  drop, so I'll front up-front\": the toolkit lists in the tool schemas\n  are the _driver's_ internal detectors, not a checklist for you to front\n  on a guess. (Concretely: GIMP's GTK toolbox accepts background pixel\n  clicks fine — a preemptive foreground click there just steals the\n  user's focus for nothing.) What each platform's _background_ rung can\n  actually carry differs (e.g. a Windows background click can't carry\n  `modifier` state — see `WINDOWS.md`); the schema is uniform, the\n  residual limits are per-OS.\n\n**Required-set contract.** `click` requires nothing (`required:[]`),\n`scroll` requires `[\"direction\"]`, `zoom` requires\n`[\"window_id\",\"x1\",\"y1\",\"x2\",\"y2\"]` — same on every platform. `pid` is\n**conditionally** required (needed unless a windowless desktop-scope\ncall) and validated in code with a clear error, NOT pinned in the schema\n— so omitting `pid` for a desktop-scope action is no longer\nschema-rejected.\n\nGenuinely platform-specific params stay OUT of the shared contract by\ndesign (launch-app identifiers, the Windows-only `debug_window_info`, the\nmacOS-only status-only `check_permissions.prompt`). The per-OS files list the\nresiduals that matter when you drive on that platform.\n\n## Pixel-coordinate clicks\n\nThe pixel path (`click({pid, x, y})`) is for surfaces the\naccessibility tree doesn't reach — canvases, video players, WebGL,\ncustom-drawn controls. Coords are **window-local screenshot pixels**\n(same space as the PNG `get_window_state` returns). Top-left origin,\ny-down. The driver handles screen-point conversion internally.\nPassing `window_id` alongside `x, y` is optional but recommended —\nit pins the coordinate conversion to the window whose screenshot\nproduced the pixel.\n\nPNGs returned by `get_window_state` are capped at **1568 px long-side\nby default** (`max_image_dimension` config), matching Anthropic's\nmultimodal-vision downsampling limit. The image the model reasons\nover and the image the click tool's coordinate system lives in are\nthe **same resolution** — just look at the PNG, pick a pixel, click\nat that pixel. No scaling math.\n\nThis is the default because the mismatch between \"rendered\nthumbnail\" and \"native PNG\" was a recurring coord-estimation\nfootgun. If you opt out (explicit `max_image_dimension=0` for\npixel-perfect verification flows), the old rule applies: don't\neyeball coords from whatever your client renders — it may be\n2-4× smaller than the PNG on disk, and a 2% error in thumbnail\nspace becomes ~80 px in the real image.\n\nFor precise targeting on small \u002F dense UIs:\n\n1. `get_window_state({pid, window_id})` → image capped at 1568\n   long-side plus `screenshot_width` \u002F `screenshot_height`. Write to\n   disk via `--screenshot-out-file \u003Cpath>`.\n2. Look at the PNG. Since it matches what you see, pick the target\n   pixel directly.\n3. When precision matters, draw a crosshair on the image (do\n   **not** crop — cropping loses the coordinate system) and verify\n   before clicking:\n\n```python\nfrom PIL import Image, ImageDraw\nimg = Image.open('\u002Ftmp\u002Fshot.png')\ndraw = ImageDraw.Draw(img)\nx, y = \u003Cyour_coordinate>\nr = 18\ndraw.ellipse([x-r, y-r, x+r, y+r], outline='red', width=4)\ndraw.line([x-30, y, x+30, y], fill='red', width=3)\ndraw.line([x, y-30, x, y+30], fill='red', width=3)\nimg.save('\u002Ftmp\u002Fshot_annotated.png')\n```\n\n4. Only dispatch the click after the user (or your own re-read of\n   the annotated image) confirms the crosshair is on target.\n\nAddressing variants:\n\n- `click({pid, x, y})` — single left-click.\n- `click({pid, x, y, count: 2})` — double-click.\n- `click({pid, x, y, modifier: [\"cmd\"\\|\"ctrl\"]})` — modifier click.\n  Accepts any subset of `cmd\u002Fshift\u002Foption\u002Falt\u002Fctrl`.\n- `right_click({pid, x, y})` — also takes `modifier`.\n\nThe pixel path animates the agent cursor overlay but never warps\nthe real cursor (the per-pid event paths the driver uses on macOS\nand Windows route around HID synthesis). If the pid has no on-screen\nwindow the call errors with `pid X has no on-screen window` — you\nneed a visible window to anchor the conversion. Dispatch details\n(SkyLight on macOS, layered UIA+PostMessage on Windows) are in the\nper-OS companion files.\n\n## Web-rendered apps (browsers, Electron, Tauri)\n\nFor Chromium-family browsers and Electron, use the exact, session-scoped\nbrowser capability workflow in **`BROWSER.md`**. It keeps native\n`(pid, window_id)` selection as the entry point, makes setup explicit through\n`browser_prepare`, and distinguishes trusted browser input from an explicitly\nrequested synthetic DOM event.\n\nUse the native `get_window_state` and AX\u002FPX action ladder for browser chrome,\npermission prompts, downloads, file pickers, Safari, Firefox, Tauri, and any\nembedded webview for which exact browser binding is unavailable. The legacy\n`page` tool remains a compatibility surface; do not use it as the starting\npoint for new browser workflows.\n\n## Verify after every action — mandatory\n\n**Always** verify after an action. Prefer\n`verify_state({pid, window_id, expect})` for structured state such as a\nwindow's existence\u002Fbounds or a semantic element's existence, value, enabled\nstate, or selected state. Use its bounded poll and stable-sample requirement\ninstead of hand-written sleeps. `unknown` means the driver could not establish\nthe predicate; it is not success. Once a session has effective desktop scope,\nuse a fresh `get_desktop_state(session)` result instead—window-scoped\n`verify_state` is denied by that capture policy.\n\nPass `include_screenshot:true` when visual evidence is useful. The same result\nthen contains a fresh final window image. The driver still evaluates only the\nstructured predicates; the multimodal agent harness reads the pixels and\ndecides whether to stop, retry, or advance the ladder. For a postcondition not\nexpressible by the tool, explicitly take a fresh `get_window_state` snapshot\nand have the harness judge its tree and image.\n\nSwitch to an **element px action** only on a real signal: the action\nresponse carried `effect:\"suspected_noop\"`, verification returned\n`unsatisfied`\u002F`unknown`, the snapshot came back `degraded` (empty tree →\nnon-AX surface), the tree looks unchanged\u002Funreadable or disagrees with the screenshot, or\n`escalation.target` points you there (`pixel`). That's the\nverify-then-escalate ladder in the behavior-matrix section. If the tree\nis unchanged AND the screenshot confirms nothing moved, the action\nlikely failed silently — **tell the user what you attempted and what\nyou observed**, don't paper over with \"done\" language (and consider\n`delivery_mode:\"foreground\"` when `escalation.target ==\n\"foreground\"`). Agents that skip this step report success on\nsilently-dropped actions — the single most common failure mode.\n\n## Recording trajectories\n\nSession-scoped action recording + replay, for demos, regressions,\nand training data. Only invoke when the user explicitly asks to\nrecord a session — the skill does not auto-enable this. CLI surface:\n`qwen-cua-driver recording start|stop|status`; raw tools:\n`start_recording` \u002F `stop_recording`. Video capture (main display →\n`recording.mp4`) is on by default; pass `record_video: false` to opt out.\n\nSee **`RECORDING.md`** for the full flow: enable\u002Fdisable, turn folder\ncontents, replay via `replay_trajectory`, and the element_index\ndoesn't-survive-across-sessions caveat.\n\n## Common error patterns (cross-platform)\n\n| Error text                                                                         | Meaning                                                                                                                                                                          | Fix                                                                                                                                                                                                                  |\n| ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `No cached AX state for pid X window_id W`                                         | You either skipped `get_window_state` this turn, or passed a different `window_id` to the click than the one the snapshot cached against                                         | Call `get_window_state({pid: X, window_id: W})` first — the same window_id you intend to click in                                                                                                                    |\n| `snapshot_id_required` \u002F `stale_element_token`                                    | A bare index was supplied, or a newer snapshot superseded this target                                                                                                            | Re-run `get_window_state`; use the new `element_token`, or send its `snapshot_id` with the matching integer                                                                                                          |\n| `window_id W belongs to pid P, not …`                                              | Passed a window_id that's owned by a different process                                                                                                                           | Use `list_windows({pid: X})` to enumerate this pid's own windows                                                                                                                                                     |\n| `ambiguous_window_target`                                                          | A PID-only window action matched multiple eligible top-level windows                                                                                                              | Use the returned candidates or `list_windows({pid: X})`, select the intended sibling, and retry with its explicit `window_id`                                                                                       |\n| `AX action … failed with code …` \u002F `UIA invoke failed`                             | Element doesn't support the default action                                                                                                                                       | Try `show_menu`, `confirm`, `cancel`, `pick`, or fall through to a pixel click on the element's center                                                                                                               |\n| `The user doesn't want to proceed with this tool use. The tool use was rejected …` | The harness uses this _exact_ string for BOTH a permission-prompt denial AND a manual interrupt (Esc \u002F stop) of a running tool — they are indistinguishable from the tool result | Treat as \"tool canceled, no result, await the user.\" Do NOT paraphrase (\"you stopped me\") — quote the literal message and name the canceled tool + its args, so the user can tell what was in flight vs. what landed |\n\nPlatform-specific errors (TCC dialogs on macOS, Session 0 \u002F UAC\nprompts on Windows, AT-SPI bus issues on Linux) live in their\nrespective companion files.\n\n## Things to avoid\n\n- **Never** reuse an element target across a re-snapshot of the same window.\n  A new snapshot invalidates older tokens immediately. Bare `element_index`\n  input is rejected; use `element_token` or `element_index` + `snapshot_id`.\n- **Don't conflate the two addressing modes.** The tree gives you\n  `element_index` handles; the screenshot (same call) gives you the\n  pixel frame. An **element ax action** addresses by index, an\n  **element px action** by `x,y`. Default to `element_index` and only\n  do a px action on a real signal (`suspected_noop` \u002F `degraded` \u002F\n  repeated labels \u002F tree-disagrees-with-pixels). Don't pass an\n  `element_index` you read off the screenshot, and don't pixel-click a\n  coordinate you computed from the tree's (possibly lying) frame\n  without checking it against the image.\n- **Prefer accessibility actions over pixels.** `click({pid, x, y})`\n  works for canvas \u002F WebView regions, but it lands blindly on raw\n  coordinates. Exhaust accessibility paths (menu bars, cmd-k palettes,\n  toolbar items, keyboard shortcuts) before dropping to coordinates.\n  (The AX path does **not** skip the agent-cursor overlay — it seeds and\n  pulses the session cursor and draws a focus rect on the targeted\n  element; it just doesn't play a long glide on the very first action.\n  See \"Agent cursor overlay\" for the demo-recording caveat.)\n- **Never** drive destructive actions (delete files, close unsaved\n  documents, send messages, submit forms) without explicit user\n  intent for that specific destructive step.\n- **Never** launch apps autonomously; confirm with the user first\n  unless their original request clearly implies the launch.\n\n## Example end-to-end task\n\n**User:** \"Open the Downloads folder in the system file manager.\"\n\n1. `launch_app({bundle_id: \"com.apple.finder\", urls: [\"~\u002FDownloads\"]})`\n   on macOS, or `launch_app({name: \"explorer\", args: [\"%USERPROFILE%\\\\Downloads\"]})`\n   on Windows. Returns `{pid, windows: [{window_id, title, ...}]}`.\n   Idempotent launch; the driver opens a hidden window via the\n   platform's launch primitive — zero activation, no focus steal.\n2. `get_window_state({pid, window_id})` → verify the expected window\n   title is present with a populated tree (sidebar, list view, files).\n3. Done.\n\nPlatform-specific examples and edge cases (Finder menu navigation,\nExplorer ribbon, GNOME Files) live in the per-OS companion files.\n",{"data":38,"body":66},{"name":4,"description":6,"version":39,"metadata":40},"0.17.0",{"openclaw":41},{"requires":42,"envVars":45,"homepage":65},{"bins":43},[44],"qwen-cua-driver",[46,50,53,56,59,62],{"name":47,"required":48,"description":49},"CUA_DRIVER_EMBEDDED",false,"Set to 1 when a macOS host app launches the driver in embedded mode.",{"name":51,"required":48,"description":52},"CUA_DRIVER_HOST_BUNDLE_ID","Bundle identifier of the macOS host app in embedded mode.",{"name":54,"required":48,"description":55},"CUA_DRIVER_PATH","Optional path to a qwen-cua-driver binary used by an embedding host.",{"name":57,"required":48,"description":58},"CUA_DRIVER_RS_ENABLE_WAYLAND","Set to 1 to enable the native Wayland backend.",{"name":60,"required":48,"description":61},"CUA_DRIVER_RS_MCP_HTTP_PORT","Optional port for the local MCP HTTP endpoint.",{"name":63,"required":48,"description":64},"CUA_DRIVER_RS_MCP_HTTP_TOKEN","Required host-generated bearer token when the local MCP HTTP endpoint is enabled.","https:\u002F\u002Fgithub.com\u002FQwenLM\u002Fqwen-code\u002Ftree\u002Fmain\u002Fpackages\u002Fcua-driver",{"type":67,"children":68},"root",[69,77,91,98,111,191,196,229,242,248,253,358,363,370,375,380,427,433,461,545,550,577,583,624,652,658,670,714,773,794,800,828,933,938,1095,1153,1159,1224,1229,1278,1327,1348,1354,1411,1500,1532,1544,1550,1593,1659,1700,1705,1751,1790,1802,1808,1826,1886,1943,1978,2014,2020,2068,2074,2088,2112,2176,2188,2260,2347,2365,2377,2473,2523,2614,2689,2751,2759,2826,2844,2905,2911,2923,2933,2978,2986,3183,3200,3206,3215,3256,3294,3341,3425,3515,3561,3567,3630,3635,3783,3791,3882,3908,3924,3981,4033,4038,4072,4078,4111,4711,4751,4828,4851,4861,4867,5004,5009,5219,5293,5314,5320,5361,5394,5407,5412,5462,5544,5552,5557,5616,5629,5635,5665,5684,5690,5729,5747,5822,5828,5871,5893,5899,6170,6175,6181,6322,6328,6338,6383,6388],{"type":70,"tag":71,"props":72,"children":73},"element","h1",{"id":44},[74],{"type":75,"value":76},"text","Qwen Cua Driver",{"type":70,"tag":78,"props":79,"children":80},"p",{},[81,83,89],{"type":75,"value":82},"Orchestrates cross-platform app automation via ",{"type":70,"tag":84,"props":85,"children":87},"code",{"className":86},[],[88],{"type":75,"value":44},{"type":75,"value":90},". Whenever\na user asks to drive a native app, follow the loop in this skill\nrather than calling tools ad-hoc — the snapshot-before-action\ninvariant is not optional and silently breaks if you skip it.",{"type":70,"tag":92,"props":93,"children":95},"h2",{"id":94},"platform-specific-reading-read-this-first",[96],{"type":75,"value":97},"Platform-specific reading — read this first",{"type":70,"tag":78,"props":99,"children":100},{},[101,103,109],{"type":75,"value":102},"This file is the ",{"type":70,"tag":104,"props":105,"children":106},"strong",{},[107],{"type":75,"value":108},"cross-platform core",{"type":75,"value":110},": snapshot invariant, CLI vs\nMCP choice, tool surface naming, behavior matrix, canonical loop,\npixel-click contract, common failure modes. The platform-specific\nmaterial (forbidden-list, accessibility tree implementation, launch\nsemantics, click dispatch) lives in companion files in this same\ndirectory:",{"type":70,"tag":112,"props":113,"children":114},"ul",{},[115,157,174],{"type":70,"tag":116,"props":117,"children":118},"li",{},[119,124,126,132,134,140,142,148,149,155],{"type":70,"tag":104,"props":120,"children":121},{},[122],{"type":75,"value":123},"macOS",{"type":75,"value":125}," — read ",{"type":70,"tag":84,"props":127,"children":129},{"className":128},[],[130],{"type":75,"value":131},"MACOS.md",{"type":75,"value":133}," (no-foreground contract, forbidden\n",{"type":70,"tag":84,"props":135,"children":137},{"className":136},[],[138],{"type":75,"value":139},"open",{"type":75,"value":141},"\u002F",{"type":70,"tag":84,"props":143,"children":145},{"className":144},[],[146],{"type":75,"value":147},"osascript",{"type":75,"value":141},{"type":70,"tag":84,"props":150,"children":152},{"className":151},[],[153],{"type":75,"value":154},"cliclick",{"type":75,"value":156}," invocations, AXMenuBar navigation,\nSkyLight pixel-click dispatch).",{"type":70,"tag":116,"props":158,"children":159},{},[160,165,166,172],{"type":70,"tag":104,"props":161,"children":162},{},[163],{"type":75,"value":164},"Windows",{"type":75,"value":125},{"type":70,"tag":84,"props":167,"children":169},{"className":168},[],[170],{"type":75,"value":171},"WINDOWS.md",{"type":75,"value":173}," (UIA tree vs AX, UWP \u002F\nApplicationFrameHost hosting, layered UIA+PostMessage click chain,\nSession 0 isolation, Windows-specific focus-steal vectors).",{"type":70,"tag":116,"props":175,"children":176},{},[177,182,183,189],{"type":70,"tag":104,"props":178,"children":179},{},[180],{"type":75,"value":181},"Linux",{"type":75,"value":125},{"type":70,"tag":84,"props":184,"children":186},{"className":185},[],[187],{"type":75,"value":188},"LINUX.md",{"type":75,"value":190}," (X11 background input via AT-SPI +\nXSendEvent and compositor-specific Wayland capabilities).",{"type":70,"tag":78,"props":192,"children":193},{},[194],{"type":75,"value":195},"Cross-cutting topics also have their own files:",{"type":70,"tag":112,"props":197,"children":198},{},[199,210],{"type":70,"tag":116,"props":200,"children":201},{},[202,208],{"type":70,"tag":84,"props":203,"children":205},{"className":204},[],[206],{"type":75,"value":207},"BROWSER.md",{"type":75,"value":209}," — exact native-window binding, explicit browser preparation,\ntyped Chromium\u002FElectron page tools, input trust classes, and native\nfallbacks for browser chrome and unsupported engines.",{"type":70,"tag":116,"props":211,"children":212},{},[213,219,221,227],{"type":70,"tag":84,"props":214,"children":216},{"className":215},[],[217],{"type":75,"value":218},"RECORDING.md",{"type":75,"value":220}," — session recording + ",{"type":70,"tag":84,"props":222,"children":224},{"className":223},[],[225],{"type":75,"value":226},"replay_trajectory",{"type":75,"value":228},".",{"type":70,"tag":78,"props":230,"children":231},{},[232,234,240],{"type":75,"value":233},"Use whichever combination matches the host. When in doubt, run\n",{"type":70,"tag":84,"props":235,"children":237},{"className":236},[],[238],{"type":75,"value":239},"qwen-cua-driver doctor",{"type":75,"value":241}," — it reports the platform and the right entry\npoint.",{"type":70,"tag":92,"props":243,"children":245},{"id":244},"start-with-the-narrowest-semantic-route",[246],{"type":75,"value":247},"Start with the narrowest semantic route",{"type":70,"tag":78,"props":249,"children":250},{},[251],{"type":75,"value":252},"Before opening or operating an application, name the desired postcondition and\nuse the first applicable route below. Verify the result in the same domain\nbefore stopping or advancing:",{"type":70,"tag":254,"props":255,"children":257},"ol",{"start":256},0,[258,268,318,328,338,348],{"type":70,"tag":116,"props":259,"children":260},{},[261,266],{"type":70,"tag":104,"props":262,"children":263},{},[264],{"type":75,"value":265},"Caller-provided headless\u002Fbackground operation for a non-GUI outcome.",{"type":75,"value":267},"\nPrefer an exact application API\u002FSDK, service or database client, CLI, or\nfilesystem operation over imitating a user. This includes batch-safe file\nmoves, renames, copies, directory creation, archive extraction, data\nconversion, and process inspection. Read the resulting semantic state back;\na zero exit status alone is not proof.",{"type":70,"tag":116,"props":269,"children":270},{},[271,276,278,284,286,292,294,300,302,308,310,316],{"type":70,"tag":104,"props":272,"children":273},{},[274],{"type":75,"value":275},"Typed Cua operation for an application or window outcome.",{"type":75,"value":277}," Use\n",{"type":70,"tag":84,"props":279,"children":281},{"className":280},[],[282],{"type":75,"value":283},"set_window_frame",{"type":75,"value":285}," for exact geometry, ",{"type":70,"tag":84,"props":287,"children":289},{"className":288},[],[290],{"type":75,"value":291},"invoke_menu",{"type":75,"value":293}," for a known native\napplication-menu path, typed browser tools for supported page content, and\nclipboard tools for clipboard state. Verify with\n",{"type":70,"tag":84,"props":295,"children":297},{"className":296},[],[298],{"type":75,"value":299},"list_windows",{"type":75,"value":301},", ",{"type":70,"tag":84,"props":303,"children":305},{"className":304},[],[306],{"type":75,"value":307},"get_browser_state",{"type":75,"value":309},", or ",{"type":70,"tag":84,"props":311,"children":313},{"className":312},[],[314],{"type":75,"value":315},"clipboard_read",{"type":75,"value":317},", respectively.",{"type":70,"tag":116,"props":319,"children":320},{},[321,326],{"type":70,"tag":104,"props":322,"children":323},{},[324],{"type":75,"value":325},"Background accessibility action.",{"type":75,"value":327}," Use a fresh AX\u002FUIA\u002FAT-SPI target.",{"type":70,"tag":116,"props":329,"children":330},{},[331,336],{"type":70,"tag":104,"props":332,"children":333},{},[334],{"type":75,"value":335},"Background pixel action.",{"type":75,"value":337}," Use the pixels from the same state snapshot.",{"type":70,"tag":116,"props":339,"children":340},{},[341,346],{"type":70,"tag":104,"props":342,"children":343},{},[344],{"type":75,"value":345},"Foreground delivery.",{"type":75,"value":347}," Retry only the action that evidence says could not\nland in the background.",{"type":70,"tag":116,"props":349,"children":350},{},[351,356],{"type":70,"tag":104,"props":352,"children":353},{},[354],{"type":75,"value":355},"Desktop fallback.",{"type":75,"value":357}," Enter this explicit, one-way session phase last.",{"type":70,"tag":78,"props":359,"children":360},{},[361],{"type":75,"value":362},"Use Cua Driver when the outcome lives in an application's UI or window state,\nor when the user explicitly asks to operate that GUI. Once the task crosses\nthat boundary, do not replace Cua's targeted and verified actions with shell\nscripts that mutate the app UI. A shell is a capability of the calling agent,\nnot of the Cua Driver MCP server; an MCP-only client must not assume one exists.",{"type":70,"tag":364,"props":365,"children":367},"h3",{"id":366},"filesystem-outcomes-and-gui-fallbacks",[368],{"type":75,"value":369},"Filesystem outcomes and GUI fallbacks",{"type":70,"tag":78,"props":371,"children":372},{},[373],{"type":75,"value":374},"When the requested outcome is a filesystem change and the caller has a\nheadless filesystem or command capability, keep it on rung 0. Enumerate the\nexact source set, decide the destination-conflict policy before changing\nanything, perform one batch-safe operation, then independently read back both\nsource and destination manifests. Do not open a file manager merely to mimic a\nmove, copy, or rename that the caller can execute and verify directly.",{"type":70,"tag":78,"props":376,"children":377},{},[378],{"type":75,"value":379},"If the caller has no such capability, use the file manager as a GUI fallback\nand keep each claim narrow:",{"type":70,"tag":254,"props":381,"children":382},{},[383,388,417,422],{"type":70,"tag":116,"props":384,"children":385},{},[386],{"type":75,"value":387},"After entering an inline rename and setting its value, commit it with the\nplatform's confirmation key, then take a fresh snapshot. Value readback from\nthe inline editor proves only that the editor changed; it does not prove the\nfilesystem rename committed.",{"type":70,"tag":116,"props":389,"children":390},{},[391,393,399,401,407,409,415],{"type":75,"value":392},"For a multi-selection, use the platform modifier (",{"type":70,"tag":84,"props":394,"children":396},{"className":395},[],[397],{"type":75,"value":398},"cmd",{"type":75,"value":400}," on macOS, ",{"type":70,"tag":84,"props":402,"children":404},{"className":403},[],[405],{"type":75,"value":406},"ctrl",{"type":75,"value":408}," on\nWindows\u002FLinux). On macOS and Windows, issue that modified click with\n",{"type":70,"tag":84,"props":410,"children":412},{"className":411},[],[413],{"type":75,"value":414},"delivery_mode:\"foreground\"",{"type":75,"value":416}," so the target observes physical modifier state;\na refused background attempt is an escalation signal, not a failed action to\ntrust or repeat. Re-snapshot before the next operation. Continue only when\nevery intended item is selected and the prior selection was preserved.",{"type":70,"tag":116,"props":418,"children":419},{},[420],{"type":75,"value":421},"After a cross-window drag or paste, verify the destination contains the\ncomplete expected set and the source reflects copy-versus-move semantics.\nA delivered drag, keypress, or menu action is not file-operation proof.",{"type":70,"tag":116,"props":423,"children":424},{},[425],{"type":75,"value":426},"If a destination conflict presents an unrecognized policy or ambiguous\npartial result, stop that GUI path and surface the unresolved state instead\nof retrying blindly.",{"type":70,"tag":92,"props":428,"children":430},{"id":429},"the-no-foreground-principle-window-phase",[431],{"type":75,"value":432},"The no-foreground principle (window phase)",{"type":70,"tag":78,"props":434,"children":435},{},[436,438,444,446,452,454,459],{"type":75,"value":437},"In a strict ",{"type":70,"tag":84,"props":439,"children":441},{"className":440},[],[442],{"type":75,"value":443},"window",{"type":75,"value":445}," session, and during the initial window phase of an\n",{"type":70,"tag":84,"props":447,"children":449},{"className":448},[],[450],{"type":75,"value":451},"auto",{"type":75,"value":453}," session, ",{"type":70,"tag":104,"props":455,"children":456},{},[457],{"type":75,"value":458},"the user's frontmost app MUST NOT change.",{"type":75,"value":460}," Every platform\nhas its own list of forbidden commands:",{"type":70,"tag":112,"props":462,"children":463},{},[464,503],{"type":70,"tag":116,"props":465,"children":466},{},[467,469,474,476,481,483,488,489,495,497,502],{"type":75,"value":468},"macOS: any ",{"type":70,"tag":84,"props":470,"children":472},{"className":471},[],[473],{"type":75,"value":139},{"type":75,"value":475}," invocation, any ",{"type":70,"tag":84,"props":477,"children":479},{"className":478},[],[480],{"type":75,"value":147},{"type":75,"value":482}," that mutates GUI\nstate, ",{"type":70,"tag":84,"props":484,"children":486},{"className":485},[],[487],{"type":75,"value":154},{"type":75,"value":301},{"type":70,"tag":84,"props":490,"children":492},{"className":491},[],[493],{"type":75,"value":494},"cghidEventTap",{"type":75,"value":496}," writes targeting another app's\nwindow. Full list in ",{"type":70,"tag":84,"props":498,"children":500},{"className":499},[],[501],{"type":75,"value":131},{"type":75,"value":228},{"type":70,"tag":116,"props":504,"children":505},{},[506,508,514,516,522,523,529,531,537,539,544],{"type":75,"value":507},"Windows: any ",{"type":70,"tag":84,"props":509,"children":511},{"className":510},[],[512],{"type":75,"value":513},"Start-Process",{"type":75,"value":515}," that triggers a ",{"type":70,"tag":84,"props":517,"children":519},{"className":518},[],[520],{"type":75,"value":521},"ShowWindow",{"type":75,"value":141},{"type":70,"tag":84,"props":524,"children":526},{"className":525},[],[527],{"type":75,"value":528},"SetForegroundWindow",{"type":75,"value":530},"\non the target, ",{"type":70,"tag":84,"props":532,"children":534},{"className":533},[],[535],{"type":75,"value":536},"WScript.Shell.AppActivate",{"type":75,"value":538},", attaching to the\nforeground thread for input forwarding. Full list in ",{"type":70,"tag":84,"props":540,"children":542},{"className":541},[],[543],{"type":75,"value":171},{"type":75,"value":228},{"type":70,"tag":78,"props":546,"children":547},{},[548],{"type":75,"value":549},"If you reach for a command that says \"activate\", \"foreground\",\n\"raise\", or \"make key\", stop and translate to the cua-driver tool\nthat does the same intent without focus-stealing.",{"type":70,"tag":78,"props":551,"children":552},{},[553,555,560,562,567,569,575],{"type":75,"value":554},"A strict ",{"type":70,"tag":84,"props":556,"children":558},{"className":557},[],[559],{"type":75,"value":22},{"type":75,"value":561}," session is an explicit user choice to operate the visible\ndesktop and therefore uses foreground\u002Fsystem input. An ",{"type":70,"tag":84,"props":563,"children":565},{"className":564},[],[566],{"type":75,"value":451},{"type":75,"value":568}," session may enter\nthat phase only after the complete window ladder below has been attempted and\nverified, followed by ",{"type":70,"tag":84,"props":570,"children":572},{"className":571},[],[573],{"type":75,"value":574},"escalate_session",{"type":75,"value":576},". Never infer desktop permission from a\nfailed action or a proxy\u002Ftransport session id.",{"type":70,"tag":92,"props":578,"children":580},{"id":579},"gui-transport-defaults-prefer-cua-driver-over-gui-shell-shims",[581],{"type":75,"value":582},"GUI transport defaults — prefer cua-driver over GUI shell shims",{"type":70,"tag":78,"props":584,"children":585},{},[586,598,600,606,608,614,616,622],{"type":70,"tag":104,"props":587,"children":588},{},[589,591,596],{"type":75,"value":590},"Default transport is the ",{"type":70,"tag":84,"props":592,"children":594},{"className":593},[],[595],{"type":75,"value":44},{"type":75,"value":597}," CLI",{"type":75,"value":599}," — ",{"type":70,"tag":84,"props":601,"children":603},{"className":602},[],[604],{"type":75,"value":605},"Bash",{"type":75,"value":607}," shelling out\nto ",{"type":70,"tag":84,"props":609,"children":611},{"className":610},[],[612],{"type":75,"value":613},"qwen-cua-driver \u003Ctool-name> '\u003CJSON-args>'",{"type":75,"value":615},". MCP tools (prefix\n",{"type":70,"tag":84,"props":617,"children":619},{"className":618},[],[620],{"type":75,"value":621},"mcp__cua-driver__*",{"type":75,"value":623},") only when the user explicitly asks for them.\nCLI wins because it picks up rebuilds instantly, failures are\neasier to diagnose, and there's no per-tool schema-load overhead.",{"type":70,"tag":78,"props":625,"children":626},{},[627,629,635,636,642,644,650],{"type":75,"value":628},"Every reference to ",{"type":70,"tag":84,"props":630,"children":632},{"className":631},[],[633],{"type":75,"value":634},"click(...)",{"type":75,"value":301},{"type":70,"tag":84,"props":637,"children":639},{"className":638},[],[640],{"type":75,"value":641},"get_window_state(...)",{"type":75,"value":643}," etc. in this\nskill means ",{"type":70,"tag":84,"props":645,"children":647},{"className":646},[],[648],{"type":75,"value":649},"qwen-cua-driver click '{...}'",{"type":75,"value":651}," — translate to MCP form only\nwhen MCP is requested.",{"type":70,"tag":364,"props":653,"children":655},{"id":654},"claude-code-computer-use-compatibility-mode",[656],{"type":75,"value":657},"Claude Code computer-use compatibility mode",{"type":70,"tag":78,"props":659,"children":660},{},[661,663,668],{"type":75,"value":662},"For normal Claude Code use, keep the default CLI or ",{"type":70,"tag":84,"props":664,"children":666},{"className":665},[],[667],{"type":75,"value":44},{"type":75,"value":669}," MCP\nserver path above. If the user explicitly wants Claude Code's\nvision\u002Fcomputer-use-style flow, they can register:",{"type":70,"tag":671,"props":672,"children":677},"pre",{"className":673,"code":674,"language":675,"meta":676,"style":676},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","qwen-cua-driver mcp-config --client claude   # then paste + run the printed line\n","bash","",[678],{"type":70,"tag":84,"props":679,"children":680},{"__ignoreMap":676},[681],{"type":70,"tag":682,"props":683,"children":686},"span",{"class":684,"line":685},"line",1,[687,692,698,703,708],{"type":70,"tag":682,"props":688,"children":690},{"style":689},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[691],{"type":75,"value":44},{"type":70,"tag":682,"props":693,"children":695},{"style":694},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[696],{"type":75,"value":697}," mcp-config",{"type":70,"tag":682,"props":699,"children":700},{"style":694},[701],{"type":75,"value":702}," --client",{"type":70,"tag":682,"props":704,"children":705},{"style":694},[706],{"type":75,"value":707}," claude",{"type":70,"tag":682,"props":709,"children":711},{"style":710},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[712],{"type":75,"value":713},"   # then paste + run the printed line\n",{"type":70,"tag":78,"props":715,"children":716},{},[717,719,725,727,732,734,740,742,748,750,756,758,763,765,771],{"type":75,"value":718},"Observation: Claude Code vision flows appear to treat a screenshot\nMCP tool as the image-grounding anchor. This compatibility mode keeps\nthe normal CuaDriver tools and changes only ",{"type":70,"tag":84,"props":720,"children":722},{"className":721},[],[723],{"type":75,"value":724},"screenshot",{"type":75,"value":726},". The\ncompatibility ",{"type":70,"tag":84,"props":728,"children":730},{"className":729},[],[731],{"type":75,"value":724},{"type":75,"value":733}," requires ",{"type":70,"tag":84,"props":735,"children":737},{"className":736},[],[738],{"type":75,"value":739},"pid",{"type":75,"value":741}," and ",{"type":70,"tag":84,"props":743,"children":745},{"className":744},[],[746],{"type":75,"value":747},"window_id",{"type":75,"value":749},", captures\nonly that target window, and returns the window-local pixel\ncoordinate frame. Start with ",{"type":70,"tag":84,"props":751,"children":753},{"className":752},[],[754],{"type":75,"value":755},"launch_app",{"type":75,"value":757}," or ",{"type":70,"tag":84,"props":759,"children":761},{"className":760},[],[762],{"type":75,"value":299},{"type":75,"value":764},", then\ncall ",{"type":70,"tag":84,"props":766,"children":768},{"className":767},[],[769],{"type":75,"value":770},"screenshot({pid, window_id})",{"type":75,"value":772},"; do not assume desktop\ncoordinates or a full-screen capture.",{"type":70,"tag":78,"props":774,"children":775},{},[776,778,784,786,792],{"type":75,"value":777},"Use MCP for this Claude Code vision\u002Fcomputer-use-style path. Do not\nshell out to ",{"type":70,"tag":84,"props":779,"children":781},{"className":780},[],[782],{"type":75,"value":783},"qwen-cua-driver screenshot",{"type":75,"value":785}," as a substitute: CLI screenshots\nstill work as CuaDriver calls, but they do not expose the\n",{"type":70,"tag":84,"props":787,"children":789},{"className":788},[],[790],{"type":75,"value":791},"mcp__cua-computer-use__screenshot",{"type":75,"value":793}," tool name that Claude Code\nappears to use as the image-grounding cue.",{"type":70,"tag":92,"props":795,"children":797},{"id":796},"using-cua-driver-from-the-shell",[798],{"type":75,"value":799},"Using cua-driver from the shell",{"type":70,"tag":78,"props":801,"children":802},{},[803,805,811,813,819,821,826],{"type":75,"value":804},"Tool names are ",{"type":70,"tag":84,"props":806,"children":808},{"className":807},[],[809],{"type":75,"value":810},"snake_case",{"type":75,"value":812},", management subcommands are\n",{"type":70,"tag":84,"props":814,"children":816},{"className":815},[],[817],{"type":75,"value":818},"kebab-case",{"type":75,"value":820}," — no ambiguity. Tools invoked as ",{"type":70,"tag":84,"props":822,"children":824},{"className":823},[],[825],{"type":75,"value":613},{"type":75,"value":827},". Management subcommands:",{"type":70,"tag":112,"props":829,"children":830},{},[831,857,874,890,906],{"type":70,"tag":116,"props":832,"children":833},{},[834,840,842,848,850,855],{"type":70,"tag":84,"props":835,"children":837},{"className":836},[],[838],{"type":75,"value":839},"qwen-cua-driver serve",{"type":75,"value":841}," — start an explicit persistent service when short-lived\nclients must share runtime state or a platform identity. Bare MCP owns its\nruntime directly on Windows\u002FLinux and uses the signed app service on macOS;\n",{"type":70,"tag":84,"props":843,"children":845},{"className":844},[],[846],{"type":75,"value":847},"qwen-cua-driver mcp --socket \u003Cendpoint>",{"type":75,"value":849}," selects a service explicitly.\nOne-shot CLI tool calls still use the service path. macOS users: see\n",{"type":70,"tag":84,"props":851,"children":853},{"className":852},[],[854],{"type":75,"value":131},{"type":75,"value":856}," for the LaunchServices-routed launch form.",{"type":70,"tag":116,"props":858,"children":859},{},[860,866,868],{"type":70,"tag":84,"props":861,"children":863},{"className":862},[],[864],{"type":75,"value":865},"qwen-cua-driver stop",{"type":75,"value":867}," \u002F ",{"type":70,"tag":84,"props":869,"children":871},{"className":870},[],[872],{"type":75,"value":873},"status",{"type":70,"tag":116,"props":875,"children":876},{},[877,883,884],{"type":70,"tag":84,"props":878,"children":880},{"className":879},[],[881],{"type":75,"value":882},"qwen-cua-driver list-tools",{"type":75,"value":301},{"type":70,"tag":84,"props":885,"children":887},{"className":886},[],[888],{"type":75,"value":889},"describe \u003Ctool>",{"type":70,"tag":116,"props":891,"children":892},{},[893,899,901],{"type":70,"tag":84,"props":894,"children":896},{"className":895},[],[897],{"type":75,"value":898},"qwen-cua-driver recording start|stop|status",{"type":75,"value":900}," — see ",{"type":70,"tag":84,"props":902,"children":904},{"className":903},[],[905],{"type":75,"value":218},{"type":70,"tag":116,"props":907,"children":908},{},[909,915,917,923,925,931],{"type":70,"tag":84,"props":910,"children":912},{"className":911},[],[913],{"type":75,"value":914},"qwen-cua-driver check-update [--json] [--no-cache]",{"type":75,"value":916}," — read-only \"is a newer release available?\" probe. Same payload as the ",{"type":70,"tag":84,"props":918,"children":920},{"className":919},[],[921],{"type":75,"value":922},"check_for_update",{"type":75,"value":924}," MCP tool; pair with ",{"type":70,"tag":84,"props":926,"children":928},{"className":927},[],[929],{"type":75,"value":930},"qwen-cua-driver update --apply",{"type":75,"value":932}," to install.",{"type":70,"tag":78,"props":934,"children":935},{},[936],{"type":75,"value":937},"Canonical multi-step workflow (example shape — platform-specific\nlaunch idioms in the per-OS companion file):",{"type":70,"tag":671,"props":939,"children":941},{"className":673,"code":940,"language":675,"meta":676,"style":676},"qwen-cua-driver serve\nqwen-cua-driver launch_app '{\"bundle_id\":\"...\"}'\n# → {pid: 844, windows: [{window_id: 10725, ...}]}\nqwen-cua-driver get_window_state '{\"pid\":844,\"window_id\":10725}'\n# Use the returned structuredContent.elements[].element_token:\nqwen-cua-driver click '{\"pid\":844,\"element_token\":\"s0000002a:14\"}'\nqwen-cua-driver verify_state '{\"pid\":844,\"window_id\":10725,\"expect\":[{\"element\":{\"selector\":{\"label_contains\":\"Saved\"},\"exists\":true}}]}'\nqwen-cua-driver stop\n",[942],{"type":70,"tag":84,"props":943,"children":944},{"__ignoreMap":676},[945,957,986,995,1021,1030,1056,1082],{"type":70,"tag":682,"props":946,"children":947},{"class":684,"line":685},[948,952],{"type":70,"tag":682,"props":949,"children":950},{"style":689},[951],{"type":75,"value":44},{"type":70,"tag":682,"props":953,"children":954},{"style":694},[955],{"type":75,"value":956}," serve\n",{"type":70,"tag":682,"props":958,"children":960},{"class":684,"line":959},2,[961,965,970,976,981],{"type":70,"tag":682,"props":962,"children":963},{"style":689},[964],{"type":75,"value":44},{"type":70,"tag":682,"props":966,"children":967},{"style":694},[968],{"type":75,"value":969}," launch_app",{"type":70,"tag":682,"props":971,"children":973},{"style":972},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[974],{"type":75,"value":975}," '",{"type":70,"tag":682,"props":977,"children":978},{"style":694},[979],{"type":75,"value":980},"{\"bundle_id\":\"...\"}",{"type":70,"tag":682,"props":982,"children":983},{"style":972},[984],{"type":75,"value":985},"'\n",{"type":70,"tag":682,"props":987,"children":989},{"class":684,"line":988},3,[990],{"type":70,"tag":682,"props":991,"children":992},{"style":710},[993],{"type":75,"value":994},"# → {pid: 844, windows: [{window_id: 10725, ...}]}\n",{"type":70,"tag":682,"props":996,"children":998},{"class":684,"line":997},4,[999,1003,1008,1012,1017],{"type":70,"tag":682,"props":1000,"children":1001},{"style":689},[1002],{"type":75,"value":44},{"type":70,"tag":682,"props":1004,"children":1005},{"style":694},[1006],{"type":75,"value":1007}," get_window_state",{"type":70,"tag":682,"props":1009,"children":1010},{"style":972},[1011],{"type":75,"value":975},{"type":70,"tag":682,"props":1013,"children":1014},{"style":694},[1015],{"type":75,"value":1016},"{\"pid\":844,\"window_id\":10725}",{"type":70,"tag":682,"props":1018,"children":1019},{"style":972},[1020],{"type":75,"value":985},{"type":70,"tag":682,"props":1022,"children":1024},{"class":684,"line":1023},5,[1025],{"type":70,"tag":682,"props":1026,"children":1027},{"style":710},[1028],{"type":75,"value":1029},"# Use the returned structuredContent.elements[].element_token:\n",{"type":70,"tag":682,"props":1031,"children":1033},{"class":684,"line":1032},6,[1034,1038,1043,1047,1052],{"type":70,"tag":682,"props":1035,"children":1036},{"style":689},[1037],{"type":75,"value":44},{"type":70,"tag":682,"props":1039,"children":1040},{"style":694},[1041],{"type":75,"value":1042}," click",{"type":70,"tag":682,"props":1044,"children":1045},{"style":972},[1046],{"type":75,"value":975},{"type":70,"tag":682,"props":1048,"children":1049},{"style":694},[1050],{"type":75,"value":1051},"{\"pid\":844,\"element_token\":\"s0000002a:14\"}",{"type":70,"tag":682,"props":1053,"children":1054},{"style":972},[1055],{"type":75,"value":985},{"type":70,"tag":682,"props":1057,"children":1059},{"class":684,"line":1058},7,[1060,1064,1069,1073,1078],{"type":70,"tag":682,"props":1061,"children":1062},{"style":689},[1063],{"type":75,"value":44},{"type":70,"tag":682,"props":1065,"children":1066},{"style":694},[1067],{"type":75,"value":1068}," verify_state",{"type":70,"tag":682,"props":1070,"children":1071},{"style":972},[1072],{"type":75,"value":975},{"type":70,"tag":682,"props":1074,"children":1075},{"style":694},[1076],{"type":75,"value":1077},"{\"pid\":844,\"window_id\":10725,\"expect\":[{\"element\":{\"selector\":{\"label_contains\":\"Saved\"},\"exists\":true}}]}",{"type":70,"tag":682,"props":1079,"children":1080},{"style":972},[1081],{"type":75,"value":985},{"type":70,"tag":682,"props":1083,"children":1085},{"class":684,"line":1084},8,[1086,1090],{"type":70,"tag":682,"props":1087,"children":1088},{"style":689},[1089],{"type":75,"value":44},{"type":70,"tag":682,"props":1091,"children":1092},{"style":694},[1093],{"type":75,"value":1094}," stop\n",{"type":70,"tag":78,"props":1096,"children":1097},{},[1098,1100,1106,1108,1114,1116,1121,1123,1129,1131,1137,1138,1144,1146,1151],{"type":75,"value":1099},"For Chromium page content, keep the same native window selection but switch to\nthe browser capability loop: ",{"type":70,"tag":84,"props":1101,"children":1103},{"className":1102},[],[1104],{"type":75,"value":1105},"start_session",{"type":75,"value":1107},", bind ",{"type":70,"tag":84,"props":1109,"children":1111},{"className":1110},[],[1112],{"type":75,"value":1113},"(pid, window_id)",{"type":75,"value":1115}," with\n",{"type":70,"tag":84,"props":1117,"children":1119},{"className":1118},[],[1120],{"type":75,"value":307},{"type":75,"value":1122},", snapshot the returned tab, then use ",{"type":70,"tag":84,"props":1124,"children":1126},{"className":1125},[],[1127],{"type":75,"value":1128},"browser_click",{"type":75,"value":1130},",\n",{"type":70,"tag":84,"props":1132,"children":1134},{"className":1133},[],[1135],{"type":75,"value":1136},"browser_type",{"type":75,"value":309},{"type":70,"tag":84,"props":1139,"children":1141},{"className":1140},[],[1142],{"type":75,"value":1143},"browser_navigate",{"type":75,"value":1145},". Read ",{"type":70,"tag":84,"props":1147,"children":1149},{"className":1148},[],[1150],{"type":75,"value":207},{"type":75,"value":1152}," before using this\nroute. Browser target ids, tab ids, and refs are session-scoped and stale refs\nmust be replaced by a fresh snapshot.",{"type":70,"tag":92,"props":1154,"children":1156},{"id":1155},"agent-cursor-overlay",[1157],{"type":75,"value":1158},"Agent cursor overlay",{"type":70,"tag":78,"props":1160,"children":1161},{},[1162,1164,1170,1172,1178,1180,1186,1188,1194,1195,1201,1202,1208,1209,1215,1216,1222],{"type":75,"value":1163},"Visual cursor overlay for demos and screen recordings. It is enabled by\ndefault for declared sessions; anonymous actions remain cursor-less. Toggle with\n",{"type":70,"tag":84,"props":1165,"children":1167},{"className":1166},[],[1168],{"type":75,"value":1169},"set_agent_cursor_enabled",{"type":75,"value":1171}," to hide or re-show it. The embedded\n",{"type":70,"tag":84,"props":1173,"children":1175},{"className":1174},[],[1176],{"type":75,"value":1177},"cua.default",{"type":75,"value":1179}," theme uses a session-colored pointer over a larger,\ncursor-shaped glow in the same session color. The glow fades to transparent\naround the full silhouette. Action marks use the same\nsession-colored center and white-outline treatment, plus a tighter, softer\nglow. This pairing preserves contrast across varied backgrounds. It provides animations for\nidle, observe, click, drag, scroll, text, key, navigation, app, transfer,\nrecording, and system activity. Motion knobs:\n",{"type":70,"tag":84,"props":1181,"children":1183},{"className":1182},[],[1184],{"type":75,"value":1185},"set_agent_cursor_motion",{"type":75,"value":1187}," takes any subset of ",{"type":70,"tag":84,"props":1189,"children":1191},{"className":1190},[],[1192],{"type":75,"value":1193},"start_handle",{"type":75,"value":1130},{"type":70,"tag":84,"props":1196,"children":1198},{"className":1197},[],[1199],{"type":75,"value":1200},"end_handle",{"type":75,"value":301},{"type":70,"tag":84,"props":1203,"children":1205},{"className":1204},[],[1206],{"type":75,"value":1207},"arc_size",{"type":75,"value":301},{"type":70,"tag":84,"props":1210,"children":1212},{"className":1211},[],[1213],{"type":75,"value":1214},"arc_flow",{"type":75,"value":301},{"type":70,"tag":84,"props":1217,"children":1219},{"className":1218},[],[1220],{"type":75,"value":1221},"spring",{"type":75,"value":1223}," — tuneable at runtime,\npersisted to config.",{"type":70,"tag":78,"props":1225,"children":1226},{},[1227],{"type":75,"value":1228},"Delivery and target context is shown as host-owned chips inside the session\nbadge. Themes own the twelve action animations only. The session name and\ncontext chips fade independently, so an active tool can show its execution\ncontext without revealing a session name that has already faded.",{"type":70,"tag":78,"props":1230,"children":1231},{},[1232,1237,1239,1245,1247,1253,1255,1260,1262,1268,1270,1276],{"type":70,"tag":104,"props":1233,"children":1234},{},[1235],{"type":75,"value":1236},"Per-session cursors.",{"type":75,"value":1238}," Each MCP session automatically owns its own\ncursor, keyed by the session's id (the proxy mints one session id per\nMCP connection and the daemon scopes the cursor, config overrides, and\nrecording to it). The CLI and SDK contracts take the declared ",{"type":70,"tag":84,"props":1240,"children":1242},{"className":1241},[],[1243],{"type":75,"value":1244},"session",{"type":75,"value":1246},"\nexplicitly. Cursor-theme controls no longer accept ",{"type":70,"tag":84,"props":1248,"children":1250},{"className":1249},[],[1251],{"type":75,"value":1252},"cursor_id",{"type":75,"value":1254}," or the legacy\nshape\u002Fcolor\u002Fimage fields. Input-delivery tools may still use ",{"type":70,"tag":84,"props":1256,"children":1258},{"className":1257},[],[1259],{"type":75,"value":1252},{"type":75,"value":1261}," to\nname a virtual pointer; it never selects artwork. The default cursor is Cua\nblue, while each named session receives a stable fill from the built-in\npalette. Select only preinstalled\nthemes with ",{"type":70,"tag":84,"props":1263,"children":1265},{"className":1264},[],[1266],{"type":75,"value":1267},"set_agent_cursor_theme",{"type":75,"value":1269},"; theme source paths and inline animation\ndata are never accepted through an agent tool. Use the trusted local\n",{"type":70,"tag":84,"props":1271,"children":1273},{"className":1272},[],[1274],{"type":75,"value":1275},"qwen-cua-driver cursor-theme",{"type":75,"value":1277}," workflow to validate, compile, preview, install,\nlist, or remove custom themes.",{"type":70,"tag":78,"props":1279,"children":1280},{},[1281,1286,1288,1294,1296,1301,1303,1309,1311,1317,1319,1325],{"type":70,"tag":104,"props":1282,"children":1283},{},[1284],{"type":75,"value":1285},"Visibility caveat (AX runs).",{"type":75,"value":1287}," On a pure accessibility-action run\n(clicking by ",{"type":70,"tag":84,"props":1289,"children":1291},{"className":1290},[],[1292],{"type":75,"value":1293},"element_index",{"type":75,"value":1295},"), the first action ",{"type":70,"tag":104,"props":1297,"children":1298},{},[1299],{"type":75,"value":1300},"seeds the cursor\non-screen a short distance from the target and plays a brief glide +\npulse",{"type":75,"value":1302}," — not the long Bezier sweep a cursor already on-screen would\ntrace from its previous spot. It's subtle and easy to miss in a\nrecording. If you want a clearly ",{"type":70,"tag":1304,"props":1305,"children":1306},"em",{},[1307],{"type":75,"value":1308},"gliding",{"type":75,"value":1310}," cursor for a demo or screen\nrecording, do a pixel click (",{"type":70,"tag":84,"props":1312,"children":1314},{"className":1313},[],[1315],{"type":75,"value":1316},"click({pid,x,y})",{"type":75,"value":1318},") or a ",{"type":70,"tag":84,"props":1320,"children":1322},{"className":1321},[],[1323],{"type":75,"value":1324},"move_cursor",{"type":75,"value":1326},"\nfirst to put the cursor on-screen; subsequent AX actions then glide the\nfull path normally.",{"type":70,"tag":78,"props":1328,"children":1329},{},[1330,1332,1338,1340,1346],{"type":75,"value":1331},"Requires a suitable UI event loop. Service and private-worker runtimes provide\none. On macOS, a same-process SDK runtime or ",{"type":70,"tag":84,"props":1333,"children":1335},{"className":1334},[],[1336],{"type":75,"value":1337},"qwen-cua-driver mcp --direct",{"type":75,"value":1339}," without\na certified host main-thread adapter returns a structured\n",{"type":70,"tag":84,"props":1341,"children":1343},{"className":1342},[],[1344],{"type":75,"value":1345},"facility_unavailable",{"type":75,"value":1347}," result for overlay operations; do not treat that as a\nsuccessful cursor move. One-shot CLI adapters do not own an overlay\nthemselves.",{"type":70,"tag":92,"props":1349,"children":1351},{"id":1350},"the-core-invariant-snapshot-before-and-verify-after-every-action",[1352],{"type":75,"value":1353},"The core invariant — snapshot before and verify after every action",{"type":70,"tag":78,"props":1355,"children":1356},{},[1357,1362,1364,1370,1372,1378,1380,1386,1388,1393,1395,1401,1403,1409],{"type":70,"tag":104,"props":1358,"children":1359},{},[1360],{"type":75,"value":1361},"Every action MUST be bracketed by observation for the session's effective\nscope.",{"type":75,"value":1363}," Use ",{"type":70,"tag":84,"props":1365,"children":1367},{"className":1366},[],[1368],{"type":75,"value":1369},"get_window_state(pid, window_id)",{"type":75,"value":1371}," before a window action (or\n",{"type":70,"tag":84,"props":1373,"children":1375},{"className":1374},[],[1376],{"type":75,"value":1377},"get_desktop_state(session)",{"type":75,"value":1379}," in desktop scope), then use ",{"type":70,"tag":84,"props":1381,"children":1383},{"className":1382},[],[1384],{"type":75,"value":1385},"verify_state",{"type":75,"value":1387}," for an\nexpressible window-scoped postcondition. In effective desktop scope,\n",{"type":70,"tag":84,"props":1389,"children":1391},{"className":1390},[],[1392],{"type":75,"value":1385},{"type":75,"value":1394}," is intentionally refused with ",{"type":70,"tag":84,"props":1396,"children":1398},{"className":1397},[],[1399],{"type":75,"value":1400},"window_scope_disabled",{"type":75,"value":1402},"; verify\nwith a fresh ",{"type":70,"tag":84,"props":1404,"children":1406},{"className":1405},[],[1407],{"type":75,"value":1408},"get_desktop_state",{"type":75,"value":1410}," result and agent-owned visual\u002Fsemantic reading.",{"type":70,"tag":112,"props":1412,"children":1413},{},[1414,1445],{"type":70,"tag":116,"props":1415,"children":1416},{},[1417,1422,1424,1429,1431,1436,1438,1444],{"type":70,"tag":104,"props":1418,"children":1419},{},[1420],{"type":75,"value":1421},"Before",{"type":75,"value":1423}," — the pre-action snapshot resolves the ",{"type":70,"tag":84,"props":1425,"children":1427},{"className":1426},[],[1428],{"type":75,"value":1293},{"type":75,"value":1430},"\nyou're about to use. Indices from previous turns are stale; the\nserver replaces the element index map on every snapshot, keyed\non ",{"type":70,"tag":84,"props":1432,"children":1434},{"className":1433},[],[1435],{"type":75,"value":1113},{"type":75,"value":1437},". Indices from turn N don't resolve in turn\nN+1, and indices from window A don't resolve against window B of\nthe same app. Skip this and element-indexed actions fail with\n",{"type":70,"tag":84,"props":1439,"children":1441},{"className":1440},[],[1442],{"type":75,"value":1443},"No cached AX state",{"type":75,"value":228},{"type":70,"tag":116,"props":1446,"children":1447},{},[1448,1453,1454,1460,1462,1468,1469,1475,1477,1483,1485,1490,1492,1498],{"type":70,"tag":104,"props":1449,"children":1450},{},[1451],{"type":75,"value":1452},"After",{"type":75,"value":599},{"type":70,"tag":84,"props":1455,"children":1457},{"className":1456},[],[1458],{"type":75,"value":1459},"verify_state(pid, window_id, expect)",{"type":75,"value":1461}," checks a bounded,\ndeterministic postcondition. Results are ",{"type":70,"tag":84,"props":1463,"children":1465},{"className":1464},[],[1466],{"type":75,"value":1467},"satisfied",{"type":75,"value":301},{"type":70,"tag":84,"props":1470,"children":1472},{"className":1471},[],[1473],{"type":75,"value":1474},"unsatisfied",{"type":75,"value":1476},", or\n",{"type":70,"tag":84,"props":1478,"children":1480},{"className":1479},[],[1481],{"type":75,"value":1482},"unknown",{"type":75,"value":1484},"; ",{"type":70,"tag":84,"props":1486,"children":1488},{"className":1487},[],[1489],{"type":75,"value":1482},{"type":75,"value":1491}," never means success. Set ",{"type":70,"tag":84,"props":1493,"children":1495},{"className":1494},[],[1496],{"type":75,"value":1497},"include_screenshot:true",{"type":75,"value":1499}," when\nthe outcome also needs visual reading. The driver returns that final image\nwithout interpreting it. A multimodal agent harness reads the image and owns\nthe stop\u002Fretry\u002Fladder decision.",{"type":70,"tag":78,"props":1501,"children":1502},{},[1503,1509,1511,1517,1519,1524,1526,1531],{"type":70,"tag":84,"props":1504,"children":1506},{"className":1505},[],[1507],{"type":75,"value":1508},"unknown_reason",{"type":75,"value":1510}," distinguishes invalid\u002Funsupported predicates, untrusted web\ncontent, ambiguous matches, missing targets, unavailable observations, and\n",{"type":70,"tag":84,"props":1512,"children":1514},{"className":1513},[],[1515],{"type":75,"value":1516},"stability_unproven",{"type":75,"value":1518},". A positive final sample that was not observed for the\nrequested consecutive sample count is ",{"type":70,"tag":84,"props":1520,"children":1522},{"className":1521},[],[1523],{"type":75,"value":1516},{"type":75,"value":1525},", not success.\nNegative element existence is conservative: when an accessibility projection\ncannot prove its search domain exhaustive, absence remains ",{"type":70,"tag":84,"props":1527,"children":1529},{"className":1528},[],[1530],{"type":75,"value":1482},{"type":75,"value":228},{"type":70,"tag":78,"props":1533,"children":1534},{},[1535,1537,1542],{"type":75,"value":1536},"Do not make the driver invent task meaning or retry actions automatically.\nFor postconditions not expressible by ",{"type":70,"tag":84,"props":1538,"children":1540},{"className":1539},[],[1541],{"type":75,"value":1385},{"type":75,"value":1543},", take a fresh state\nsnapshot and let the agent judge the tree and\u002For image explicitly. This applies\nto pixel clicks and desktop actions too.",{"type":70,"tag":364,"props":1545,"children":1547},{"id":1546},"read-action-facts-without-confusing-them-with-task-success",[1548],{"type":75,"value":1549},"Read action facts without confusing them with task success",{"type":70,"tag":78,"props":1551,"children":1552},{},[1553,1555,1561,1562,1568,1570,1576,1577,1583,1585,1591],{"type":75,"value":1554},"A successful action returns ",{"type":70,"tag":84,"props":1556,"children":1558},{"className":1557},[],[1559],{"type":75,"value":1560},"effect",{"type":75,"value":741},{"type":70,"tag":84,"props":1563,"children":1565},{"className":1564},[],[1566],{"type":75,"value":1567},"route",{"type":75,"value":1569},", with optional typed\n",{"type":70,"tag":84,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":75,"value":1575},"delivery",{"type":75,"value":301},{"type":70,"tag":84,"props":1578,"children":1580},{"className":1579},[],[1581],{"type":75,"value":1582},"evidence",{"type":75,"value":1584},", and ",{"type":70,"tag":84,"props":1586,"children":1588},{"className":1587},[],[1589],{"type":75,"value":1590},"escalation",{"type":75,"value":1592},". These fields describe the actuator;\nthey do not declare the user's task complete.",{"type":70,"tag":112,"props":1594,"children":1595},{},[1596,1607,1626,1637,1648],{"type":70,"tag":116,"props":1597,"children":1598},{},[1599,1605],{"type":70,"tag":84,"props":1600,"children":1602},{"className":1601},[],[1603],{"type":75,"value":1604},"confirmed",{"type":75,"value":1606}," means the driver has publishable value readback or window-change\nevidence for that action.",{"type":70,"tag":116,"props":1608,"children":1609},{},[1610,1616,1618,1624],{"type":70,"tag":84,"props":1611,"children":1613},{"className":1612},[],[1614],{"type":75,"value":1615},"partial",{"type":75,"value":1617}," means only ",{"type":70,"tag":84,"props":1619,"children":1621},{"className":1620},[],[1622],{"type":75,"value":1623},"delivery.delivered_count",{"type":75,"value":1625}," was delivered.",{"type":70,"tag":116,"props":1627,"children":1628},{},[1629,1635],{"type":70,"tag":84,"props":1630,"children":1632},{"className":1631},[],[1633],{"type":75,"value":1634},"unverifiable",{"type":75,"value":1636}," means the driver cannot prove the effect.",{"type":70,"tag":116,"props":1638,"children":1639},{},[1640,1646],{"type":70,"tag":84,"props":1641,"children":1643},{"className":1642},[],[1644],{"type":75,"value":1645},"suspected_noop",{"type":75,"value":1647}," means available evidence suggests no useful change.",{"type":70,"tag":116,"props":1649,"children":1650},{},[1651,1657],{"type":70,"tag":84,"props":1652,"children":1654},{"className":1653},[],[1655],{"type":75,"value":1656},"refused",{"type":75,"value":1658}," means the selected route deliberately did not deliver.",{"type":70,"tag":78,"props":1660,"children":1661},{},[1662,1664,1669,1670,1676,1677,1683,1684,1690,1692,1698],{"type":75,"value":1663},"The route vocabulary is intentionally cross-platform:\n",{"type":70,"tag":84,"props":1665,"children":1667},{"className":1666},[],[1668],{"type":75,"value":15},{"type":75,"value":301},{"type":70,"tag":84,"props":1671,"children":1673},{"className":1672},[],[1674],{"type":75,"value":1675},"synthetic_events",{"type":75,"value":301},{"type":70,"tag":84,"props":1678,"children":1680},{"className":1679},[],[1681],{"type":75,"value":1682},"global_input",{"type":75,"value":301},{"type":70,"tag":84,"props":1685,"children":1687},{"className":1686},[],[1688],{"type":75,"value":1689},"dom",{"type":75,"value":1691},", and\n",{"type":70,"tag":84,"props":1693,"children":1695},{"className":1694},[],[1696],{"type":75,"value":1697},"trusted_input",{"type":75,"value":1699},". Do not branch on private OS transport names.",{"type":70,"tag":78,"props":1701,"children":1702},{},[1703],{"type":75,"value":1704},"An optional escalation is a harness instruction, never an automatic retry:",{"type":70,"tag":112,"props":1706,"children":1707},{},[1708,1719,1730,1741],{"type":70,"tag":116,"props":1709,"children":1710},{},[1711,1717],{"type":70,"tag":84,"props":1712,"children":1714},{"className":1713},[],[1715],{"type":75,"value":1716},"pixel",{"type":75,"value":1718},": refresh visual state and choose an exact pixel target;",{"type":70,"tag":116,"props":1720,"children":1721},{},[1722,1728],{"type":70,"tag":84,"props":1723,"children":1725},{"className":1724},[],[1726],{"type":75,"value":1727},"foreground",{"type":75,"value":1729},": explicitly select foreground delivery if session policy allows;",{"type":70,"tag":116,"props":1731,"children":1732},{},[1733,1739],{"type":70,"tag":84,"props":1734,"children":1736},{"className":1735},[],[1737],{"type":75,"value":1738},"page",{"type":75,"value":1740},": bind the native window to a supported browser page route;",{"type":70,"tag":116,"props":1742,"children":1743},{},[1744,1749],{"type":70,"tag":84,"props":1745,"children":1747},{"className":1746},[],[1748],{"type":75,"value":1244},{"type":75,"value":1750},": prepare or explicitly widen the session only when policy permits.",{"type":70,"tag":78,"props":1752,"children":1753},{},[1754,1756,1762,1763,1769,1770,1776,1777,1782,1783,1789],{"type":75,"value":1755},"Branch on the closed reason vocabulary:\n",{"type":70,"tag":84,"props":1757,"children":1759},{"className":1758},[],[1760],{"type":75,"value":1761},"route_unavailable",{"type":75,"value":301},{"type":70,"tag":84,"props":1764,"children":1766},{"className":1765},[],[1767],{"type":75,"value":1768},"delivery_failed",{"type":75,"value":301},{"type":70,"tag":84,"props":1771,"children":1773},{"className":1772},[],[1774],{"type":75,"value":1775},"effect_unconfirmed",{"type":75,"value":1130},{"type":70,"tag":84,"props":1778,"children":1780},{"className":1779},[],[1781],{"type":75,"value":1645},{"type":75,"value":1584},{"type":70,"tag":84,"props":1784,"children":1786},{"className":1785},[],[1787],{"type":75,"value":1788},"permission_required",{"type":75,"value":228},{"type":70,"tag":78,"props":1791,"children":1792},{},[1793,1795,1800],{"type":75,"value":1794},"After any action, keep using ",{"type":70,"tag":84,"props":1796,"children":1798},{"className":1797},[],[1799],{"type":75,"value":1385},{"type":75,"value":1801}," or a fresh state snapshot for the\nactual task postcondition. The multimodal harness owns visual reading and the\ndecision to stop, retry, or advance the ladder.",{"type":70,"tag":92,"props":1803,"children":1805},{"id":1804},"choose-capture-scope-when-the-session-starts",[1806],{"type":75,"value":1807},"Choose capture scope when the session starts",{"type":70,"tag":78,"props":1809,"children":1810},{},[1811,1817,1819,1824],{"type":70,"tag":84,"props":1812,"children":1814},{"className":1813},[],[1815],{"type":75,"value":1816},"capture_scope",{"type":75,"value":1818}," is a per-session policy, not persistent configuration. Declare\nit with ",{"type":70,"tag":84,"props":1820,"children":1822},{"className":1821},[],[1823],{"type":75,"value":1105},{"type":75,"value":1825},"; it is immutable until that session ends. Concurrent\nsessions may choose different policies safely.",{"type":70,"tag":112,"props":1827,"children":1828},{},[1829,1853,1870],{"type":70,"tag":116,"props":1830,"children":1831},{},[1832,1837,1839,1844,1846,1851],{"type":70,"tag":84,"props":1833,"children":1835},{"className":1834},[],[1836],{"type":75,"value":451},{"type":75,"value":1838}," (default): begins with effective scope ",{"type":70,"tag":84,"props":1840,"children":1842},{"className":1841},[],[1843],{"type":75,"value":443},{"type":75,"value":1845},". Desktop perception\nand actions are locked until the window ladder is exhausted, each attempted\naction is verified, and the caller explicitly invokes ",{"type":70,"tag":84,"props":1847,"children":1849},{"className":1848},[],[1850],{"type":75,"value":574},{"type":75,"value":1852},".\nEscalation is one-way for the live session.",{"type":70,"tag":116,"props":1854,"children":1855},{},[1856,1861,1863,1869],{"type":70,"tag":84,"props":1857,"children":1859},{"className":1858},[],[1860],{"type":75,"value":443},{"type":75,"value":1862},": strict window-only perception and actions. Desktop tools are always\nrejected with ",{"type":70,"tag":84,"props":1864,"children":1866},{"className":1865},[],[1867],{"type":75,"value":1868},"desktop_scope_disabled",{"type":75,"value":228},{"type":70,"tag":116,"props":1871,"children":1872},{},[1873,1878,1880,1885],{"type":70,"tag":84,"props":1874,"children":1876},{"className":1875},[],[1877],{"type":75,"value":22},{"type":75,"value":1879},": strict full-desktop perception and foreground\u002Fsystem actions.\nWindow-scoped perception and actions are rejected with\n",{"type":70,"tag":84,"props":1881,"children":1883},{"className":1882},[],[1884],{"type":75,"value":1400},{"type":75,"value":228},{"type":70,"tag":671,"props":1887,"children":1889},{"className":673,"code":1888,"language":675,"meta":676,"style":676},"qwen-cua-driver start_session '{\"session\":\"research-1\",\"capture_scope\":\"auto\"}'\nqwen-cua-driver get_session_state '{\"session\":\"research-1\"}'\n",[1890],{"type":70,"tag":84,"props":1891,"children":1892},{"__ignoreMap":676},[1893,1918],{"type":70,"tag":682,"props":1894,"children":1895},{"class":684,"line":685},[1896,1900,1905,1909,1914],{"type":70,"tag":682,"props":1897,"children":1898},{"style":689},[1899],{"type":75,"value":44},{"type":70,"tag":682,"props":1901,"children":1902},{"style":694},[1903],{"type":75,"value":1904}," start_session",{"type":70,"tag":682,"props":1906,"children":1907},{"style":972},[1908],{"type":75,"value":975},{"type":70,"tag":682,"props":1910,"children":1911},{"style":694},[1912],{"type":75,"value":1913},"{\"session\":\"research-1\",\"capture_scope\":\"auto\"}",{"type":70,"tag":682,"props":1915,"children":1916},{"style":972},[1917],{"type":75,"value":985},{"type":70,"tag":682,"props":1919,"children":1920},{"class":684,"line":959},[1921,1925,1930,1934,1939],{"type":70,"tag":682,"props":1922,"children":1923},{"style":689},[1924],{"type":75,"value":44},{"type":70,"tag":682,"props":1926,"children":1927},{"style":694},[1928],{"type":75,"value":1929}," get_session_state",{"type":70,"tag":682,"props":1931,"children":1932},{"style":972},[1933],{"type":75,"value":975},{"type":70,"tag":682,"props":1935,"children":1936},{"style":694},[1937],{"type":75,"value":1938},"{\"session\":\"research-1\"}",{"type":70,"tag":682,"props":1940,"children":1941},{"style":972},[1942],{"type":75,"value":985},{"type":70,"tag":78,"props":1944,"children":1945},{},[1946,1948,1954,1955,1961,1963,1968,1970,1976],{"type":75,"value":1947},"Do not use ",{"type":70,"tag":84,"props":1949,"children":1951},{"className":1950},[],[1952],{"type":75,"value":1953},"config set capture_scope",{"type":75,"value":757},{"type":70,"tag":84,"props":1956,"children":1958},{"className":1957},[],[1959],{"type":75,"value":1960},"set_config",{"type":75,"value":1962},"; that key is retired and\nstale values on disk are ignored. Always pass the public ",{"type":70,"tag":84,"props":1964,"children":1966},{"className":1965},[],[1967],{"type":75,"value":1244},{"type":75,"value":1969}," field on\nstate and action calls. Reserved fields such as ",{"type":70,"tag":84,"props":1971,"children":1973},{"className":1972},[],[1974],{"type":75,"value":1975},"_session_id",{"type":75,"value":1977}," are transport\nmetadata and cannot create or change policy.",{"type":70,"tag":78,"props":1979,"children":1980},{},[1981,1983,1989,1991,1997,1999,2005,2007,2012],{"type":75,"value":1982},"During a mixed-version rollout, require ",{"type":70,"tag":84,"props":1984,"children":1986},{"className":1985},[],[1987],{"type":75,"value":1988},"tools\u002Flist",{"type":75,"value":1990}," to advertise\n",{"type":70,"tag":84,"props":1992,"children":1994},{"className":1993},[],[1995],{"type":75,"value":1996},"session.capture_scope",{"type":75,"value":1998}," (and ",{"type":70,"tag":84,"props":2000,"children":2002},{"className":2001},[],[2003],{"type":75,"value":2004},"session.capture_scope.escalate",{"type":75,"value":2006}," for ",{"type":70,"tag":84,"props":2008,"children":2010},{"className":2009},[],[2011],{"type":75,"value":451},{"type":75,"value":2013},"). If an\nolder daemon does not advertise them, fail closed and ask for an upgrade; never\nfall back to the retired global config key.",{"type":70,"tag":364,"props":2015,"children":2017},{"id":2016},"why-window-selection-is-the-callers-job-now",[2018],{"type":75,"value":2019},"Why window selection is the caller's job now",{"type":70,"tag":78,"props":2021,"children":2022},{},[2023,2029,2031,2037,2039,2044,2046,2051,2053,2059,2061,2066],{"type":70,"tag":84,"props":2024,"children":2026},{"className":2025},[],[2027],{"type":75,"value":2028},"get_app_state",{"type":75,"value":2030}," used to pick a window for you via a max-area heuristic\nthat returned the wrong surface on apps with large off-screen utility\npanels. Concrete reproducer: IINA's OpenSubtitles helper (600×432\noff-screen) out-area'd the visible 320×240 player window, so\n",{"type":70,"tag":84,"props":2032,"children":2034},{"className":2033},[],[2035],{"type":75,"value":2036},"get_app_state(pid)",{"type":75,"value":2038}," screenshot'd the invisible panel and clicks landed\nthere silently. The new ",{"type":70,"tag":84,"props":2040,"children":2042},{"className":2041},[],[2043],{"type":75,"value":1369},{"type":75,"value":2045}," makes the\ncaller name the window explicitly — the driver validates that the\nwindow belongs to the pid and is on the current Space\u002Fdesktop, then\nsnapshots exactly what was asked for. Enumerate candidates via\n",{"type":70,"tag":84,"props":2047,"children":2049},{"className":2048},[],[2050],{"type":75,"value":299},{"type":75,"value":2052}," or read the ",{"type":70,"tag":84,"props":2054,"children":2056},{"className":2055},[],[2057],{"type":75,"value":2058},"windows",{"type":75,"value":2060}," array ",{"type":70,"tag":84,"props":2062,"children":2064},{"className":2063},[],[2065],{"type":75,"value":755},{"type":75,"value":2067}," already\nreturns.",{"type":70,"tag":92,"props":2069,"children":2071},{"id":2070},"behavior-matrix",[2072],{"type":75,"value":2073},"Behavior matrix",{"type":70,"tag":364,"props":2075,"children":2077},{"id":2076},"perception-is-mode-agnostic-get_window_state-returns-both",[2078,2080,2086],{"type":75,"value":2079},"Perception is mode-agnostic — ",{"type":70,"tag":84,"props":2081,"children":2083},{"className":2082},[],[2084],{"type":75,"value":2085},"get_window_state",{"type":75,"value":2087}," returns BOTH",{"type":70,"tag":78,"props":2089,"children":2090},{},[2091,2096,2098,2103,2105,2110],{"type":70,"tag":84,"props":2092,"children":2094},{"className":2093},[],[2095],{"type":75,"value":1369},{"type":75,"value":2097}," ",{"type":70,"tag":104,"props":2099,"children":2100},{},[2101],{"type":75,"value":2102},"returns both the accessibility\ntree AND a screenshot by default.",{"type":75,"value":2104}," There is no capture mode to pick\nand nothing to configure — you ground on the tree and the screenshot\ntogether, and you cross-check one against the other. This matters\nbecause the tree ",{"type":70,"tag":104,"props":2106,"children":2107},{},[2108],{"type":75,"value":2109},"lies",{"type":75,"value":2111}," on some surfaces:",{"type":70,"tag":112,"props":2113,"children":2114},{},[2115,2140,2158],{"type":70,"tag":116,"props":2116,"children":2117},{},[2118,2123,2125,2131,2132,2138],{"type":70,"tag":104,"props":2119,"children":2120},{},[2121],{"type":75,"value":2122},"Electron",{"type":75,"value":2124}," echo-confirms a ",{"type":70,"tag":84,"props":2126,"children":2128},{"className":2127},[],[2129],{"type":75,"value":2130},"set_value",{"type":75,"value":867},{"type":70,"tag":84,"props":2133,"children":2135},{"className":2134},[],[2136],{"type":75,"value":2137},"type_text",{"type":75,"value":2139}," against the AX\nshim while the rendered text view never changed.",{"type":70,"tag":116,"props":2141,"children":2142},{},[2143,2148,2150,2156],{"type":70,"tag":104,"props":2144,"children":2145},{},[2146],{"type":75,"value":2147},"Catalyst",{"type":75,"value":2149}," (iOSAppOnMac) exposes null \u002F placeholder ",{"type":70,"tag":84,"props":2151,"children":2153},{"className":2152},[],[2154],{"type":75,"value":2155},"AXValue",{"type":75,"value":2157},"s.",{"type":70,"tag":116,"props":2159,"children":2160},{},[2161,2166,2168,2174],{"type":70,"tag":104,"props":2162,"children":2163},{},[2164],{"type":75,"value":2165},"Virtualized \u002F off-viewport list rows",{"type":75,"value":2167}," report bogus frames (an\n",{"type":70,"tag":84,"props":2169,"children":2171},{"className":2170},[],[2172],{"type":75,"value":2173},"h:1",{"type":75,"value":2175}," height, an off-screen origin) for rows that aren't actually\nlaid out.",{"type":70,"tag":78,"props":2177,"children":2178},{},[2179,2181,2186],{"type":75,"value":2180},"A grounding screenshot is present by default, so when the tree looks\nwrong you look at the pixels ",{"type":70,"tag":104,"props":2182,"children":2183},{},[2184],{"type":75,"value":2185},"in the same response",{"type":75,"value":2187}," — no second\ncapture, no mode flip.",{"type":70,"tag":2189,"props":2190,"children":2191},"blockquote",{},[2192],{"type":70,"tag":78,"props":2193,"children":2194},{},[2195,2207,2208,2213,2215,2221,2223,2228,2230,2236,2238,2243,2245,2251,2252,2258],{"type":70,"tag":104,"props":2196,"children":2197},{},[2198,2200,2206],{"type":75,"value":2199},"Perf opt-out — ",{"type":70,"tag":84,"props":2201,"children":2203},{"className":2202},[],[2204],{"type":75,"value":2205},"include_screenshot",{"type":75,"value":228},{"type":75,"value":2097},{"type":70,"tag":84,"props":2209,"children":2211},{"className":2210},[],[2212],{"type":75,"value":2205},{"type":75,"value":2214},"\n(boolean, default ",{"type":70,"tag":84,"props":2216,"children":2218},{"className":2217},[],[2219],{"type":75,"value":2220},"true",{"type":75,"value":2222},") is the one knob, and it is a ",{"type":70,"tag":104,"props":2224,"children":2225},{},[2226],{"type":75,"value":2227},"perf",{"type":75,"value":2229}," knob,\nnot a modality choice. Default returns both (grounding-first). Pass\n",{"type":70,"tag":84,"props":2231,"children":2233},{"className":2232},[],[2234],{"type":75,"value":2235},"include_screenshot:false",{"type":75,"value":2237}," to skip the screen grab and get the tree\nonly — the cheap path when you're just ",{"type":70,"tag":104,"props":2239,"children":2240},{},[2241],{"type":75,"value":2242},"re-indexing before an\nelement ax action",{"type":75,"value":2244}," and don't need to re-ground on pixels. The\n",{"type":70,"tag":84,"props":2246,"children":2248},{"className":2247},[],[2249],{"type":75,"value":2250},"ax",{"type":75,"value":141},{"type":70,"tag":84,"props":2253,"children":2255},{"className":2254},[],[2256],{"type":75,"value":2257},"px",{"type":75,"value":2259}," decision still lives at action time, not here.",{"type":70,"tag":2189,"props":2261,"children":2262},{},[2263],{"type":70,"tag":78,"props":2264,"children":2265},{},[2266,2277,2279,2284,2286,2291,2293,2298,2300,2305,2306,2312,2313,2319,2321,2326,2327,2332,2333,2338,2340,2345],{"type":70,"tag":104,"props":2267,"children":2268},{},[2269,2275],{"type":70,"tag":84,"props":2270,"children":2272},{"className":2271},[],[2273],{"type":75,"value":2274},"capture_mode",{"type":75,"value":2276}," is DEPRECATED and ignored.",{"type":75,"value":2278}," It is still ",{"type":70,"tag":1304,"props":2280,"children":2281},{},[2282],{"type":75,"value":2283},"accepted",{"type":75,"value":2285},"\non ",{"type":70,"tag":84,"props":2287,"children":2289},{"className":2288},[],[2290],{"type":75,"value":2085},{"type":75,"value":2292}," so old callers don't error, but it has ",{"type":70,"tag":104,"props":2294,"children":2295},{},[2296],{"type":75,"value":2297},"no\neffect",{"type":75,"value":2299}," — both the tree and the screenshot come back regardless of\nwhat you pass (",{"type":70,"tag":84,"props":2301,"children":2303},{"className":2302},[],[2304],{"type":75,"value":2250},{"type":75,"value":301},{"type":70,"tag":84,"props":2307,"children":2309},{"className":2308},[],[2310],{"type":75,"value":2311},"vision",{"type":75,"value":301},{"type":70,"tag":84,"props":2314,"children":2316},{"className":2315},[],[2317],{"type":75,"value":2318},"som",{"type":75,"value":2320},", anything). There is no\n",{"type":70,"tag":84,"props":2322,"children":2324},{"className":2323},[],[2325],{"type":75,"value":2250},{"type":75,"value":141},{"type":70,"tag":84,"props":2328,"children":2330},{"className":2329},[],[2331],{"type":75,"value":2311},{"type":75,"value":141},{"type":70,"tag":84,"props":2334,"children":2336},{"className":2335},[],[2337],{"type":75,"value":2318},{"type":75,"value":2339}," capture choice anymore. Drop the word \"vision\"\nfor perception entirely. (The tool named ",{"type":70,"tag":84,"props":2341,"children":2343},{"className":2342},[],[2344],{"type":75,"value":724},{"type":75,"value":2346}," is separate —\nraw PNG, no AX walk — and unrelated.)",{"type":70,"tag":364,"props":2348,"children":2350},{"id":2349},"the-modality-is-chosen-at-action-time-ax-vs-px",[2351,2353,2358,2360],{"type":75,"value":2352},"The modality is chosen at ACTION time — ",{"type":70,"tag":84,"props":2354,"children":2356},{"className":2355},[],[2357],{"type":75,"value":2250},{"type":75,"value":2359}," vs ",{"type":70,"tag":84,"props":2361,"children":2363},{"className":2362},[],[2364],{"type":75,"value":2257},{"type":70,"tag":78,"props":2366,"children":2367},{},[2368,2370,2375],{"type":75,"value":2369},"You don't pick a capture mode; you pick ",{"type":70,"tag":104,"props":2371,"children":2372},{},[2373],{"type":75,"value":2374},"how you address the target",{"type":75,"value":2376},"\non the action call, and that one choice selects the rung:",{"type":70,"tag":112,"props":2378,"children":2379},{},[2380,2435],{"type":70,"tag":116,"props":2381,"children":2382},{},[2383,2388,2390,2396,2398,2403,2405,2411,2413,2418,2420,2426,2428,2433],{"type":70,"tag":104,"props":2384,"children":2385},{},[2386],{"type":75,"value":2387},"element ax action",{"type":75,"value":2389}," — pass ",{"type":70,"tag":84,"props":2391,"children":2393},{"className":2392},[],[2394],{"type":75,"value":2395},"element_token",{"type":75,"value":2397}," (preferred), or the exact\n",{"type":70,"tag":84,"props":2399,"children":2401},{"className":2400},[],[2402],{"type":75,"value":1293},{"type":75,"value":2404}," + ",{"type":70,"tag":84,"props":2406,"children":2408},{"className":2407},[],[2409],{"type":75,"value":2410},"snapshot_id",{"type":75,"value":2412}," pair from the same response.\nDispatches through the ",{"type":70,"tag":104,"props":2414,"children":2415},{},[2416],{"type":75,"value":2417},"accessibility rung",{"type":75,"value":2419},": AXPress (macOS) \u002F UIA\nInvoke (Windows) \u002F AT-SPI ",{"type":70,"tag":84,"props":2421,"children":2423},{"className":2422},[],[2424],{"type":75,"value":2425},"doAction",{"type":75,"value":2427}," (Linux). Backgroundable,\nz-order-independent, and the only ",{"type":70,"tag":104,"props":2429,"children":2430},{},[2431],{"type":75,"value":2432},"driver-verifiable",{"type":75,"value":2434}," rung.",{"type":70,"tag":116,"props":2436,"children":2437},{},[2438,2443,2444,2450,2451,2457,2459,2464,2466,2471],{"type":70,"tag":104,"props":2439,"children":2440},{},[2441],{"type":75,"value":2442},"element px action",{"type":75,"value":2389},{"type":70,"tag":84,"props":2445,"children":2447},{"className":2446},[],[2448],{"type":75,"value":2449},"x",{"type":75,"value":301},{"type":70,"tag":84,"props":2452,"children":2454},{"className":2453},[],[2455],{"type":75,"value":2456},"y",{"type":75,"value":2458},". Dispatches through the ",{"type":70,"tag":104,"props":2460,"children":2461},{},[2462],{"type":75,"value":2463},"pixel\nrung",{"type":75,"value":2465},", reading the coordinate straight off the screenshot that's\nalready in the ",{"type":70,"tag":84,"props":2467,"children":2469},{"className":2468},[],[2470],{"type":75,"value":2085},{"type":75,"value":2472}," response. Best-effort; the caller\nconfirms the effect.",{"type":70,"tag":78,"props":2474,"children":2475},{},[2476,2481,2483,2488,2489,2494,2496,2502,2504,2509,2511,2516,2517,2522],{"type":70,"tag":84,"props":2477,"children":2479},{"className":2478},[],[2480],{"type":75,"value":2250},{"type":75,"value":2482},"↔",{"type":70,"tag":84,"props":2484,"children":2486},{"className":2485},[],[2487],{"type":75,"value":1293},{"type":75,"value":301},{"type":70,"tag":84,"props":2490,"children":2492},{"className":2491},[],[2493],{"type":75,"value":2257},{"type":75,"value":2495},"↔pixel ",{"type":70,"tag":84,"props":2497,"children":2499},{"className":2498},[],[2500],{"type":75,"value":2501},"x,y",{"type":75,"value":2503},". We retired the word \"vision\"\nfor the ",{"type":70,"tag":1304,"props":2505,"children":2506},{},[2507],{"type":75,"value":2508},"dispatch",{"type":75,"value":2510}," path — it conflated perception with dispatch.\nPerception is always both; dispatch is ",{"type":70,"tag":84,"props":2512,"children":2514},{"className":2513},[],[2515],{"type":75,"value":2250},{"type":75,"value":757},{"type":70,"tag":84,"props":2518,"children":2520},{"className":2519},[],[2521],{"type":75,"value":2257},{"type":75,"value":228},{"type":70,"tag":78,"props":2524,"children":2525},{},[2526,2531,2532,2537,2538,2544,2546,2552,2554,2559,2560,2565,2567,2580,2582,2588,2590,2596,2598,2604,2606,2612],{"type":70,"tag":104,"props":2527,"children":2528},{},[2529],{"type":75,"value":2530},"The keyboard family has both forms too.",{"type":75,"value":2097},{"type":70,"tag":84,"props":2533,"children":2535},{"className":2534},[],[2536],{"type":75,"value":2137},{"type":75,"value":301},{"type":70,"tag":84,"props":2539,"children":2541},{"className":2540},[],[2542],{"type":75,"value":2543},"press_key",{"type":75,"value":2545},",\nand ",{"type":70,"tag":84,"props":2547,"children":2549},{"className":2548},[],[2550],{"type":75,"value":2551},"hotkey",{"type":75,"value":2553}," take a snapshot-bound element target (ax) ",{"type":70,"tag":104,"props":2555,"children":2556},{},[2557],{"type":75,"value":2558},"or",{"type":75,"value":2097},{"type":70,"tag":84,"props":2561,"children":2563},{"className":2562},[],[2564],{"type":75,"value":2501},{"type":75,"value":2566}," (px) — mutually\nexclusive, same as the pointer tools. The px form ",{"type":70,"tag":104,"props":2568,"children":2569},{},[2570,2572,2578],{"type":75,"value":2571},"pixel-clicks at\n",{"type":70,"tag":84,"props":2573,"children":2575},{"className":2574},[],[2576],{"type":75,"value":2577},"(x,y)",{"type":75,"value":2579}," to establish real renderer focus, then delivers the\nkeystroke(s)",{"type":75,"value":2581}," to the now-focused element (it reuses ",{"type":70,"tag":84,"props":2583,"children":2585},{"className":2584},[],[2586],{"type":75,"value":2587},"click",{"type":75,"value":2589},"'s\ncoordinate translation + ",{"type":70,"tag":84,"props":2591,"children":2593},{"className":2592},[],[2594],{"type":75,"value":2595},"delivery_mode",{"type":75,"value":2597},"). That gives e.g.\n",{"type":70,"tag":84,"props":2599,"children":2601},{"className":2600},[],[2602],{"type":75,"value":2603},"type_text({pid, window_id, x, y, text})",{"type":75,"value":2605}," as a one-call focus-then-type\nfor Chromium\u002FElectron inputs the AX path can't reach, and\n",{"type":70,"tag":84,"props":2607,"children":2609},{"className":2608},[],[2610],{"type":75,"value":2611},"hotkey({pid, x, y, keys:[\"cmd\",\"v\"]})",{"type":75,"value":2613}," to paste into a specific field.",{"type":70,"tag":78,"props":2615,"children":2616},{},[2617,2622,2624,2629,2631,2636,2638,2644,2645,2651,2653,2659,2661,2666,2668,2673,2675,2680,2682,2687],{"type":70,"tag":104,"props":2618,"children":2619},{},[2620],{"type":75,"value":2621},"Typing default (the ladder).",{"type":75,"value":2623}," Call ",{"type":70,"tag":84,"props":2625,"children":2627},{"className":2626},[],[2628],{"type":75,"value":2137},{"type":75,"value":2630}," directly with\n",{"type":70,"tag":84,"props":2632,"children":2634},{"className":2633},[],[2635],{"type":75,"value":2395},{"type":75,"value":2637}," (ax) — it targets the field, no pre-click. On\nElectron\u002FCatalyst the AX layer echoes the write without rendering it,\nso the driver returns ",{"type":70,"tag":84,"props":2639,"children":2641},{"className":2640},[],[2642],{"type":75,"value":2643},"effect:\"unverifiable\"",{"type":75,"value":1115},{"type":70,"tag":84,"props":2646,"children":2648},{"className":2647},[],[2649],{"type":75,"value":2650},"escalation.target:\"pixel\"",{"type":75,"value":2652}," there (never a false ",{"type":70,"tag":84,"props":2654,"children":2656},{"className":2655},[],[2657],{"type":75,"value":2658},"effect:\"confirmed\"",{"type":75,"value":2660},") —\nfollow it, and cross-check the\nscreenshot in the response (the only ground truth). Escalate to the px\nform — ",{"type":70,"tag":84,"props":2662,"children":2664},{"className":2663},[],[2665],{"type":75,"value":2603},{"type":75,"value":2667}," — which pixel-clicks\nto focus, then types. ",{"type":70,"tag":104,"props":2669,"children":2670},{},[2671],{"type":75,"value":2672},"If the target control is closed",{"type":75,"value":2674}," (a search\nbutton, a collapsed field), AX-press to open it first (AX actions work\nin the background): a px focus-click won't reliably open ",{"type":70,"tag":1304,"props":2676,"children":2677},{},[2678],{"type":75,"value":2679},"and",{"type":75,"value":2681}," focus a\nclosed control, so the text leaks into whatever's already focused.\nEscalate to ",{"type":70,"tag":84,"props":2683,"children":2685},{"className":2684},[],[2686],{"type":75,"value":414},{"type":75,"value":2688}," only if it still drops.",{"type":70,"tag":78,"props":2690,"children":2691},{},[2692,2702,2704,2709,2711,2716,2717,2723,2725,2730,2732,2737,2739,2744,2745,2750],{"type":70,"tag":104,"props":2693,"children":2694},{},[2695,2700],{"type":70,"tag":84,"props":2696,"children":2698},{"className":2697},[],[2699],{"type":75,"value":2130},{"type":75,"value":2701}," stays AX-only by design",{"type":75,"value":2703}," — use it when the intent is to\nreplace a control's whole value: dropdowns, checkboxes, sliders, steppers,\nand native text fields such as Finder's inline rename editor. Use\n",{"type":70,"tag":84,"props":2705,"children":2707},{"className":2706},[],[2708],{"type":75,"value":2137},{"type":75,"value":2710}," when the intent is to insert text at the current selection or\ncursor. Its pixel counterpart is a ",{"type":70,"tag":84,"props":2712,"children":2714},{"className":2713},[],[2715],{"type":75,"value":2587},{"type":75,"value":141},{"type":70,"tag":84,"props":2718,"children":2720},{"className":2719},[],[2721],{"type":75,"value":2722},"drag",{"type":75,"value":2724}," on the control, not a\n\"set value at a pixel.\" So: insert text → ",{"type":70,"tag":84,"props":2726,"children":2728},{"className":2727},[],[2729],{"type":75,"value":2137},{"type":75,"value":2731}," (ax+px); replace a\nsurfaced native value → ",{"type":70,"tag":84,"props":2733,"children":2735},{"className":2734},[],[2736],{"type":75,"value":2130},{"type":75,"value":2738},"; pixel-manipulate a control →\n",{"type":70,"tag":84,"props":2740,"children":2742},{"className":2741},[],[2743],{"type":75,"value":2587},{"type":75,"value":141},{"type":70,"tag":84,"props":2746,"children":2748},{"className":2747},[],[2749],{"type":75,"value":2722},{"type":75,"value":228},{"type":70,"tag":78,"props":2752,"children":2753},{},[2754],{"type":70,"tag":104,"props":2755,"children":2756},{},[2757],{"type":75,"value":2758},"Action responses carry closed action facts",{"type":70,"tag":78,"props":2760,"children":2761},{},[2762,2764,2769,2770,2775,2777,2782,2783,2788,2789,2794,2796,2802,2803,2809,2811,2817,2819,2825],{"type":75,"value":2763},"Use the ",{"type":70,"tag":84,"props":2765,"children":2767},{"className":2766},[],[2768],{"type":75,"value":1560},{"type":75,"value":301},{"type":70,"tag":84,"props":2771,"children":2773},{"className":2772},[],[2774],{"type":75,"value":1567},{"type":75,"value":2776},", optional ",{"type":70,"tag":84,"props":2778,"children":2780},{"className":2779},[],[2781],{"type":75,"value":1575},{"type":75,"value":301},{"type":70,"tag":84,"props":2784,"children":2786},{"className":2785},[],[2787],{"type":75,"value":1582},{"type":75,"value":1691},{"type":70,"tag":84,"props":2790,"children":2792},{"className":2791},[],[2793],{"type":75,"value":1590},{"type":75,"value":2795}," rules in “Read action facts without confusing them with task\nsuccess” above. The old ",{"type":70,"tag":84,"props":2797,"children":2799},{"className":2798},[],[2800],{"type":75,"value":2801},"verified",{"type":75,"value":301},{"type":70,"tag":84,"props":2804,"children":2806},{"className":2805},[],[2807],{"type":75,"value":2808},"path",{"type":75,"value":2810},", coordinates, scope, and\n",{"type":70,"tag":84,"props":2812,"children":2814},{"className":2813},[],[2815],{"type":75,"value":2816},"escalation.recommended",{"type":75,"value":2818}," response fields no longer exist.\nThe full wire contract and 0.14 migration notes are in\n",{"type":70,"tag":84,"props":2820,"children":2822},{"className":2821},[],[2823],{"type":75,"value":2824},"..\u002F..\u002F..\u002Fdocs\u002Faction-result-contract.md",{"type":75,"value":228},{"type":70,"tag":78,"props":2827,"children":2828},{},[2829,2834,2836,2842],{"type":70,"tag":84,"props":2830,"children":2832},{"className":2831},[],[2833],{"type":75,"value":2085},{"type":75,"value":2835}," itself, when the AX tree comes back empty (a non-AX\nsurface like Electron\u002FChromium\u002Fcanvas), returns ",{"type":70,"tag":84,"props":2837,"children":2839},{"className":2838},[],[2840],{"type":75,"value":2841},"degraded: true",{"type":75,"value":2843},"\nplus an observation-specific escalation hint — normally pointing at pixels (you\nstill have the screenshot from the same call to click off).",{"type":70,"tag":78,"props":2845,"children":2846},{},[2847,2852,2854,2859,2861,2867,2869,2884,2886,2891,2893,2898,2899,2904],{"type":70,"tag":104,"props":2848,"children":2849},{},[2850],{"type":75,"value":2851},"Platform nuance for action escalation.",{"type":75,"value":2853}," On ",{"type":70,"tag":104,"props":2855,"children":2856},{},[2857],{"type":75,"value":2858},"Wayland",{"type":75,"value":2860}," an unfocused\nwindow cannot be pixel-targeted in the background (libei →\n",{"type":70,"tag":84,"props":2862,"children":2864},{"className":2863},[],[2865],{"type":75,"value":2866},"background_unavailable",{"type":75,"value":2868},"), so the action target is\n",{"type":70,"tag":104,"props":2870,"children":2871},{},[2872,2877,2879],{"type":70,"tag":84,"props":2873,"children":2875},{"className":2874},[],[2876],{"type":75,"value":1727},{"type":75,"value":2878},", not ",{"type":70,"tag":84,"props":2880,"children":2882},{"className":2881},[],[2883],{"type":75,"value":1716},{"type":75,"value":2885},". macOS, X11, and most Windows surfaces\ncan pixel-target in the background, so they target ",{"type":70,"tag":84,"props":2887,"children":2889},{"className":2888},[],[2890],{"type":75,"value":1716},{"type":75,"value":2892},". See\n",{"type":70,"tag":84,"props":2894,"children":2896},{"className":2895},[],[2897],{"type":75,"value":188},{"type":75,"value":867},{"type":70,"tag":84,"props":2900,"children":2902},{"className":2901},[],[2903],{"type":75,"value":171},{"type":75,"value":228},{"type":70,"tag":92,"props":2906,"children":2908},{"id":2907},"the-verify-then-escalate-ladder-algorithm",[2909],{"type":75,"value":2910},"The verify-then-escalate ladder (algorithm)",{"type":70,"tag":78,"props":2912,"children":2913},{},[2914,2916,2921],{"type":75,"value":2915},"Every snapshot already hands you both the tree and the screenshot, so\nverifying never means \"go take a screenshot\" — it means cross-check\nthe tree against the pixels you already have, and only change\n",{"type":70,"tag":1304,"props":2917,"children":2918},{},[2919],{"type":75,"value":2920},"dispatch rung",{"type":75,"value":2922}," on a real signal. Walk the rungs:",{"type":70,"tag":671,"props":2924,"children":2928},{"className":2925,"code":2927,"language":75},[2926],"language-text","# Routes 0–1 — resolve non-GUI, exact geometry, and supported page outcomes first\n# Use a caller-provided semantic operation for a non-GUI outcome, then read it back.\n# For exact window geometry: set_window_frame(...), then list_windows(...) readback.\n# For a known native menu command: invoke_menu(pid, window_id, path), then verify its effect.\n# For supported page content: get_browser_state(...), typed browser action, refresh refs.\n# Continue below only when the postcondition actually requires native UI interaction.\n\n# Route 2 — element AX\u002FUIA\u002FAT-SPI action, backgrounded\nget_window_state(pid, window_id)            # tree + screenshot, both, always\nresp = click(pid, element_token)            # or type_text \u002F set_value \u002F press_key\ncheck = verify_state(                       # bounded structured read-back\n    pid, window_id,\n    expect=[...],\n    include_screenshot=true                 # optional evidence for multimodal harness\n)\n\nif check.status == \"satisfied\":\n    done                                    # driver-verified\n\nif check.status == \"unknown\" and check has an image:\n    harness reads the image                  # model-owned visual interpretation\n    if visual outcome is satisfied: done\n\n# escalate only on a real signal\nif resp.effect == \"suspected_noop\"\n   or resp.escalation.target == \"pixel\"\n   or get_window_state.degraded            # empty tree → non-AX surface\n   or check.status != \"satisfied\"\n   or the tree looks wrong vs the screenshot:   # e.g. an h:1 \u002F off-viewport row\n\n    # Route 3 — element px action off the SAME screenshot\n    pick the target pixel from the screenshot already in the response\n    click(pid, x, y)                        # background pixel — still no foreground\n    verify_state(..., include_screenshot=true)\n    if it landed: done\n\n# Route 4 — background delivery was dropped (insert\u002Fclick never arrived)\nif resp.escalation.target == \"foreground\"\n   or the px action still did nothing:\n    re-call the same action with delivery_mode:\"foreground\"\n    # on Wayland this is the ONLY escalation — px-bg can't target an\n    # unfocused window there; see LINUX.md\n    verify again\n\n# Route 5 — desktop fallback (auto sessions only, explicit and one-way)\n# Reach this only after semantic, AX, window-pixel, and foreground-window\n# delivery have all been exhausted and verified ineffective.\nescalate_session(session,\n    reason=\"foreground_ineffective\",       # or another advertised reason\n    detail=\"bounded non-sensitive summary\")\nget_desktop_state(session)                  # full primary display\ndesktop_action(session, scope=\"desktop\", ...)  # no pid\u002Fwindow_id\nget_desktop_state(session)                  # verify in the same coordinate frame\n",[2929],{"type":70,"tag":84,"props":2930,"children":2931},{"__ignoreMap":676},[2932],{"type":75,"value":2927},{"type":70,"tag":78,"props":2934,"children":2935},{},[2936,2938,2942,2944,2949,2950,2956,2958,2962,2964,2969,2971,2976],{"type":75,"value":2937},"The two ideas to hold onto: (1) the AX tree ",{"type":70,"tag":104,"props":2939,"children":2940},{},[2941],{"type":75,"value":2109},{"type":75,"value":2943}," on canvas \u002F web \u002F\nCatalyst \u002F virtualized surfaces, so an unchanged-or-bogus tree plus\n",{"type":70,"tag":84,"props":2945,"children":2947},{"className":2946},[],[2948],{"type":75,"value":1645},{"type":75,"value":141},{"type":70,"tag":84,"props":2951,"children":2953},{"className":2952},[],[2954],{"type":75,"value":2955},"degraded",{"type":75,"value":2957}," — or a tree that simply disagrees with the\nscreenshot — is your cue to do an ",{"type":70,"tag":104,"props":2959,"children":2960},{},[2961],{"type":75,"value":2442},{"type":75,"value":2963}," off the\nscreenshot you already have; (2) ",{"type":70,"tag":84,"props":2965,"children":2967},{"className":2966},[],[2968],{"type":75,"value":2257},{"type":75,"value":2970}," is a ",{"type":70,"tag":1304,"props":2972,"children":2973},{},[2974],{"type":75,"value":2975},"conscious",{"type":75,"value":2977}," switch to the\npixel addressing path, not a different capture.",{"type":70,"tag":78,"props":2979,"children":2980},{},[2981],{"type":70,"tag":104,"props":2982,"children":2983},{},[2984],{"type":75,"value":2985},"Window state → what works",{"type":70,"tag":2987,"props":2988,"children":2989},"table",{},[2990,3032],{"type":70,"tag":2991,"props":2992,"children":2993},"thead",{},[2994],{"type":70,"tag":2995,"props":2996,"children":2997},"tr",{},[2998,3004,3012,3017,3027],{"type":70,"tag":2999,"props":3000,"children":3001},"th",{},[3002],{"type":75,"value":3003},"state",{"type":70,"tag":2999,"props":3005,"children":3006},{},[3007],{"type":70,"tag":84,"props":3008,"children":3010},{"className":3009},[],[3011],{"type":75,"value":2085},{"type":70,"tag":2999,"props":3013,"children":3014},{},[3015],{"type":75,"value":3016},"element-index click (AX\u002FUIA)",{"type":70,"tag":2999,"props":3018,"children":3019},{},[3020,3025],{"type":70,"tag":84,"props":3021,"children":3023},{"className":3022},[],[3024],{"type":75,"value":2543},{"type":75,"value":3026}," commit",{"type":70,"tag":2999,"props":3028,"children":3029},{},[3030],{"type":75,"value":3031},"pixel click",{"type":70,"tag":3033,"props":3034,"children":3035},"tbody",{},[3036,3062,3086,3123,3149],{"type":70,"tag":2995,"props":3037,"children":3038},{},[3039,3045,3050,3054,3058],{"type":70,"tag":3040,"props":3041,"children":3042},"td",{},[3043],{"type":75,"value":3044},"frontmost",{"type":70,"tag":3040,"props":3046,"children":3047},{},[3048],{"type":75,"value":3049},"✅",{"type":70,"tag":3040,"props":3051,"children":3052},{},[3053],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3055,"children":3056},{},[3057],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3059,"children":3060},{},[3061],{"type":75,"value":3049},{"type":70,"tag":2995,"props":3063,"children":3064},{},[3065,3070,3074,3078,3082],{"type":70,"tag":3040,"props":3066,"children":3067},{},[3068],{"type":75,"value":3069},"backgrounded \u002F visible",{"type":70,"tag":3040,"props":3071,"children":3072},{},[3073],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3075,"children":3076},{},[3077],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3079,"children":3080},{},[3081],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3083,"children":3084},{},[3085],{"type":75,"value":3049},{"type":70,"tag":2995,"props":3087,"children":3088},{},[3089,3097,3101,3106,3118],{"type":70,"tag":3040,"props":3090,"children":3091},{},[3092],{"type":70,"tag":104,"props":3093,"children":3094},{},[3095],{"type":75,"value":3096},"minimized",{"type":70,"tag":3040,"props":3098,"children":3099},{},[3100],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3102,"children":3103},{},[3104],{"type":75,"value":3105},"✅ (actions fire in place)",{"type":70,"tag":3040,"props":3107,"children":3108},{},[3109,3111,3116],{"type":75,"value":3110},"❌ silent no-op — use ",{"type":70,"tag":84,"props":3112,"children":3114},{"className":3113},[],[3115],{"type":75,"value":2130},{"type":75,"value":3117}," or click equivalent",{"type":70,"tag":3040,"props":3119,"children":3120},{},[3121],{"type":75,"value":3122},"❌ no on-screen bounds",{"type":70,"tag":2995,"props":3124,"children":3125},{},[3126,3131,3135,3139,3144],{"type":70,"tag":3040,"props":3127,"children":3128},{},[3129],{"type":75,"value":3130},"hidden",{"type":70,"tag":3040,"props":3132,"children":3133},{},[3134],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3136,"children":3137},{},[3138],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3140,"children":3141},{},[3142],{"type":75,"value":3143},"depends",{"type":70,"tag":3040,"props":3145,"children":3146},{},[3147],{"type":75,"value":3148},"❌",{"type":70,"tag":2995,"props":3150,"children":3151},{},[3152,3157,3170,3174,3178],{"type":70,"tag":3040,"props":3153,"children":3154},{},[3155],{"type":75,"value":3156},"on another desktop \u002F Space",{"type":70,"tag":3040,"props":3158,"children":3159},{},[3160,3162,3168],{"type":75,"value":3161},"⚠️ tree may be stripped on some apps — response carries ",{"type":70,"tag":84,"props":3163,"children":3165},{"className":3164},[],[3166],{"type":75,"value":3167},"off_space: true",{"type":75,"value":3169}," so you can detect it",{"type":70,"tag":3040,"props":3171,"children":3172},{},[3173],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3175,"children":3176},{},[3177],{"type":75,"value":3049},{"type":70,"tag":3040,"props":3179,"children":3180},{},[3181],{"type":75,"value":3182},"❌ not in current-desktop list",{"type":70,"tag":78,"props":3184,"children":3185},{},[3186,3191,3193,3198],{"type":70,"tag":104,"props":3187,"children":3188},{},[3189],{"type":75,"value":3190},"Critical cell — minimized + keyboard commit.",{"type":75,"value":3192}," The keystroke\nreaches the app but accessibility focus doesn't propagate to renderer\nfocus on a minimized window. Workarounds in order of preference:\n",{"type":70,"tag":84,"props":3194,"children":3196},{"className":3195},[],[3197],{"type":75,"value":2130},{"type":75,"value":3199}," to write the field's entire value directly, or\nelement-index-click a commit-equivalent button (Go, Submit,\ncheckbox). Tell the user the window needs to un-minimize only as a\nlast resort.",{"type":70,"tag":92,"props":3201,"children":3203},{"id":3202},"the-canonical-loop",[3204],{"type":75,"value":3205},"The canonical loop",{"type":70,"tag":671,"props":3207,"children":3210},{"className":3208,"code":3209,"language":75},[2926],"start_session(session, capture_scope=\"auto\") # once per run; policy is immutable\nlaunch_app(target)\n  → pick window_id from the returned `windows` array\n    (or call list_windows(pid) separately)\n  → get_window_state(pid, window_id)\n    → [act]  # every action also takes (pid, window_id) + your `session`\n  → verify_state(pid, window_id, expect)  # structured check; optional image\nend_session(session)              # when the run finishes\n",[3211],{"type":70,"tag":84,"props":3212,"children":3213},{"__ignoreMap":676},[3214],{"type":75,"value":3209},{"type":70,"tag":78,"props":3216,"children":3217},{},[3218,3220,3226,3228,3233,3234,3239,3241,3247,3248,3254],{"type":75,"value":3219},"For strict desktop sessions, replace the window portion with\n",{"type":70,"tag":84,"props":3221,"children":3223},{"className":3222},[],[3224],{"type":75,"value":3225},"get_desktop_state(session) → action(session, scope=\"desktop\", ...) → get_desktop_state(session)",{"type":75,"value":3227},". Desktop actions use screen-absolute coordinates\nfrom that exact full-display image and omit ",{"type":70,"tag":84,"props":3229,"children":3231},{"className":3230},[],[3232],{"type":75,"value":739},{"type":75,"value":141},{"type":70,"tag":84,"props":3235,"children":3237},{"className":3236},[],[3238],{"type":75,"value":747},{"type":75,"value":3240},". The global\n",{"type":70,"tag":84,"props":3242,"children":3244},{"className":3243},[],[3245],{"type":75,"value":3246},"get_screen_size",{"type":75,"value":741},{"type":70,"tag":84,"props":3249,"children":3251},{"className":3250},[],[3252],{"type":75,"value":3253},"get_cursor_position",{"type":75,"value":3255}," helpers are desktop-scoped too.",{"type":70,"tag":78,"props":3257,"children":3258},{},[3259,3264,3266,3271,3273,3278,3280,3285,3287,3292],{"type":70,"tag":84,"props":3260,"children":3262},{"className":3261},[],[3263],{"type":75,"value":755},{"type":75,"value":3265}," now returns a ",{"type":70,"tag":84,"props":3267,"children":3269},{"className":3268},[],[3270],{"type":75,"value":2058},{"type":75,"value":3272}," array alongside the pid, so the\ncommon case collapses to two calls (",{"type":70,"tag":84,"props":3274,"children":3276},{"className":3275},[],[3277],{"type":75,"value":755},{"type":75,"value":3279}," → ",{"type":70,"tag":84,"props":3281,"children":3283},{"className":3282},[],[3284],{"type":75,"value":2085},{"type":75,"value":3286},")\nwithout a separate ",{"type":70,"tag":84,"props":3288,"children":3290},{"className":3289},[],[3291],{"type":75,"value":299},{"type":75,"value":3293}," hop.",{"type":70,"tag":78,"props":3295,"children":3296},{},[3297,3302,3304,3309,3311,3317,3319,3324,3326,3331,3333,3339],{"type":70,"tag":104,"props":3298,"children":3299},{},[3300],{"type":75,"value":3301},"Declare a session.",{"type":75,"value":3303}," A session is ",{"type":70,"tag":1304,"props":3305,"children":3306},{},[3307],{"type":75,"value":3308},"your run's",{"type":75,"value":3310}," identity — a stable id\nyou choose (",{"type":70,"tag":84,"props":3312,"children":3314},{"className":3313},[],[3315],{"type":75,"value":3316},"\"research-1\"",{"type":75,"value":3318},"), declared with ",{"type":70,"tag":84,"props":3320,"children":3322},{"className":3321},[],[3323],{"type":75,"value":1105},{"type":75,"value":3325}," and passed as\n",{"type":70,"tag":84,"props":3327,"children":3329},{"className":3328},[],[3330],{"type":75,"value":1244},{"type":75,"value":3332}," on every action. It owns your agent cursor and capture policy (a\ndistinct colour and one immutable policy per id), follows the run across any\napps\u002Fwindows, and is the same whether\nyou drive over MCP, the CLI, or the socket. Declaring the session creates the\ncursor; anonymous actions remain cursor-less.\nEnd with ",{"type":70,"tag":84,"props":3334,"children":3336},{"className":3335},[],[3337],{"type":75,"value":3338},"end_session",{"type":75,"value":3340}," (or the idle-TTL reclaims it).",{"type":70,"tag":78,"props":3342,"children":3343},{},[3344,3349,3351,3356,3357,3362,3363,3368,3370,3375,3377,3382,3384,3394,3396,3402,3404,3409,3411,3416,3418,3423],{"type":70,"tag":104,"props":3345,"children":3346},{},[3347],{"type":75,"value":3348},"Concurrent runs\u002Fsubagents:",{"type":75,"value":3350}," each run may independently choose ",{"type":70,"tag":84,"props":3352,"children":3354},{"className":3353},[],[3355],{"type":75,"value":451},{"type":75,"value":1130},{"type":70,"tag":84,"props":3358,"children":3360},{"className":3359},[],[3361],{"type":75,"value":443},{"type":75,"value":309},{"type":70,"tag":84,"props":3364,"children":3366},{"className":3365},[],[3367],{"type":75,"value":22},{"type":75,"value":3369},"; one session's escalation never changes another. Also,\n",{"type":70,"tag":84,"props":3371,"children":3373},{"className":3372},[],[3374],{"type":75,"value":755},{"type":75,"value":3376}," is idempotent — two runs that\nlaunch the same app get the ",{"type":70,"tag":104,"props":3378,"children":3379},{},[3380],{"type":75,"value":3381},"same",{"type":75,"value":3383}," instance (and on single-instance apps\nlike Calculator, the same window), so they clobber each other. Give each run\nits ",{"type":70,"tag":104,"props":3385,"children":3386},{},[3387,3389],{"type":75,"value":3388},"own ",{"type":70,"tag":84,"props":3390,"children":3392},{"className":3391},[],[3393],{"type":75,"value":1244},{"type":75,"value":3395}," (→ its own cursor) AND pass\n",{"type":70,"tag":84,"props":3397,"children":3399},{"className":3398},[],[3400],{"type":75,"value":3401},"creates_new_application_instance: true",{"type":75,"value":3403}," to ",{"type":70,"tag":84,"props":3405,"children":3407},{"className":3406},[],[3408],{"type":75,"value":755},{"type":75,"value":3410}," (→ its own window).\nThe element cache is keyed on ",{"type":70,"tag":84,"props":3412,"children":3414},{"className":3413},[],[3415],{"type":75,"value":1113},{"type":75,"value":3417}," and the cursor on ",{"type":70,"tag":84,"props":3419,"children":3421},{"className":3420},[],[3422],{"type":75,"value":1244},{"type":75,"value":3424},",\nso distinct instances + distinct sessions keep the runs fully separated.",{"type":70,"tag":78,"props":3426,"children":3427},{},[3428,3433,3435,3440,3442,3447,3449,3455,3457,3462,3464,3469,3471,3476,3478,3483,3485,3490,3492,3498,3499,3505,3507,3513],{"type":70,"tag":104,"props":3429,"children":3430},{},[3431],{"type":75,"value":3432},"Parallelism vs. ordering.",{"type":75,"value":3434}," Distinct sessions give distinct ",{"type":70,"tag":1304,"props":3436,"children":3437},{},[3438],{"type":75,"value":3439},"cursors",{"type":75,"value":3441},", not\ndistinct ",{"type":70,"tag":1304,"props":3443,"children":3444},{},[3445],{"type":75,"value":3446},"connections",{"type":75,"value":3448},". Subagents that share one ",{"type":70,"tag":84,"props":3450,"children":3452},{"className":3451},[],[3453],{"type":75,"value":3454},"qwen-cua-driver mcp",{"type":75,"value":3456}," (stdio)\nconnection have their tool calls ",{"type":70,"tag":104,"props":3458,"children":3459},{},[3460],{"type":75,"value":3461},"serialized",{"type":75,"value":3463}," by the transport — they take\nturns, not run in parallel. That's not a correctness problem (session + window\nisolation means they can't collide), just a throughput one. For genuinely\nparallel agents, give each its ",{"type":70,"tag":104,"props":3465,"children":3466},{},[3467],{"type":75,"value":3468},"own connection",{"type":75,"value":3470},": separate ",{"type":70,"tag":84,"props":3472,"children":3474},{"className":3473},[],[3475],{"type":75,"value":3454},{"type":75,"value":3477},"\nprocesses, or point each agent's MCP client at the daemon's HTTP endpoint.\nSet ",{"type":70,"tag":84,"props":3479,"children":3481},{"className":3480},[],[3482],{"type":75,"value":60},{"type":75,"value":3484}," and a host-generated\n",{"type":70,"tag":84,"props":3486,"children":3488},{"className":3487},[],[3489],{"type":75,"value":63},{"type":75,"value":3491}," of at least 32 characters, then send\n",{"type":70,"tag":84,"props":3493,"children":3495},{"className":3494},[],[3496],{"type":75,"value":3497},"Authorization: Bearer \u003Ctoken>",{"type":75,"value":3403},{"type":70,"tag":84,"props":3500,"children":3502},{"className":3501},[],[3503],{"type":75,"value":3504},"POST http:\u002F\u002F127.0.0.1:\u003Cport>\u002Fmcp",{"type":75,"value":3506},". The daemon\nserves connections concurrently; per-connection ordering keeps each agent's own\nsequence (e.g. ",{"type":70,"tag":84,"props":3508,"children":3510},{"className":3509},[],[3511],{"type":75,"value":3512},"3 → + → 1 → =",{"type":75,"value":3514},") correct.",{"type":70,"tag":78,"props":3516,"children":3517},{},[3518,3524,3526,3531,3533,3538,3540,3545,3547,3552,3554,3559],{"type":70,"tag":84,"props":3519,"children":3521},{"className":3520},[],[3522],{"type":75,"value":3523},"list_apps",{"type":75,"value":3525}," is for app-level discovery (answering \"what's installed \u002F\nrunning \u002F frontmost?\") — not part of the core action loop. Skip it\nin the loop. For ",{"type":70,"tag":104,"props":3527,"children":3528},{},[3529],{"type":75,"value":3530},"window-level",{"type":75,"value":3532}," questions — \"does this app have a\nvisible window?\", \"which desktop is this window on?\", \"which of this\npid's windows is the main one?\" — call ",{"type":70,"tag":84,"props":3534,"children":3536},{"className":3535},[],[3537],{"type":75,"value":299},{"type":75,"value":3539}," instead; the\napp record doesn't carry window state on purpose. In the common\nsingle-window case you can skip ",{"type":70,"tag":84,"props":3541,"children":3543},{"className":3542},[],[3544],{"type":75,"value":299},{"type":75,"value":3546}," entirely and read the\n",{"type":70,"tag":84,"props":3548,"children":3550},{"className":3549},[],[3551],{"type":75,"value":2058},{"type":75,"value":3553}," array that ",{"type":70,"tag":84,"props":3555,"children":3557},{"className":3556},[],[3558],{"type":75,"value":755},{"type":75,"value":3560}," already returned.",{"type":70,"tag":364,"props":3562,"children":3564},{"id":3563},"snapshot-and-act-with-a-snapshot-bound-target",[3565],{"type":75,"value":3566},"Snapshot and act with a snapshot-bound target",{"type":70,"tag":78,"props":3568,"children":3569},{},[3570,3572,3578,3580,3585,3587,3592,3594,3599,3601,3607,3609,3614,3616,3621,3623,3628],{"type":75,"value":3571},"Call ",{"type":70,"tag":84,"props":3573,"children":3575},{"className":3574},[],[3576],{"type":75,"value":3577},"get_window_state({pid, window_id})",{"type":75,"value":3579}," with the ",{"type":70,"tag":84,"props":3581,"children":3583},{"className":3582},[],[3584],{"type":75,"value":747},{"type":75,"value":3586}," from\n",{"type":70,"tag":84,"props":3588,"children":3590},{"className":3589},[],[3591],{"type":75,"value":755},{"type":75,"value":3593},"'s ",{"type":70,"tag":84,"props":3595,"children":3597},{"className":3596},[],[3598],{"type":75,"value":2058},{"type":75,"value":3600}," array (or a fresh ",{"type":70,"tag":84,"props":3602,"children":3604},{"className":3603},[],[3605],{"type":75,"value":3606},"list_windows({pid})",{"type":75,"value":3608}," if\nyou're interacting with a long-lived process). It returns ",{"type":70,"tag":104,"props":3610,"children":3611},{},[3612],{"type":75,"value":3613},"the tree\nand the screenshot together",{"type":75,"value":3615}," by default, so you can both dispatch by\n",{"type":70,"tag":84,"props":3617,"children":3619},{"className":3618},[],[3620],{"type":75,"value":2395},{"type":75,"value":3622}," and ground on pixels from one call — no config change,\nno mode flip. When you're just re-indexing before an element ax action\nand don't need fresh pixels, pass ",{"type":70,"tag":84,"props":3624,"children":3626},{"className":3625},[],[3627],{"type":75,"value":2235},{"type":75,"value":3629}," to skip\nthe grab (a perf knob, not a modality choice).",{"type":70,"tag":78,"props":3631,"children":3632},{},[3633],{"type":75,"value":3634},"The response carries:",{"type":70,"tag":112,"props":3636,"children":3637},{},[3638,3693,3732,3751],{"type":70,"tag":116,"props":3639,"children":3640},{},[3641,3647,3649,3655,3657,3662,3664,3669,3671,3676,3678,3684,3685,3691],{"type":70,"tag":84,"props":3642,"children":3644},{"className":3643},[],[3645],{"type":75,"value":3646},"tree_markdown",{"type":75,"value":3648}," — every actionable element tagged ",{"type":70,"tag":84,"props":3650,"children":3652},{"className":3651},[],[3653],{"type":75,"value":3654},"[N]",{"type":75,"value":3656},"; the structured row\nwith the same ",{"type":70,"tag":84,"props":3658,"children":3660},{"className":3659},[],[3661],{"type":75,"value":1293},{"type":75,"value":3663}," carries its opaque ",{"type":70,"tag":84,"props":3665,"children":3667},{"className":3666},[],[3668],{"type":75,"value":2395},{"type":75,"value":3670},". The tree can be very large (Finder is\n~1600 elements, ~190 KB); when it exceeds token limits the MCP\nharness saves it to a file and returns the path. Use ",{"type":70,"tag":84,"props":3672,"children":3674},{"className":3673},[],[3675],{"type":75,"value":605},{"type":75,"value":3677}," +\n",{"type":70,"tag":84,"props":3679,"children":3681},{"className":3680},[],[3682],{"type":75,"value":3683},"jq -r '.tree_markdown'",{"type":75,"value":2404},{"type":70,"tag":84,"props":3686,"children":3688},{"className":3687},[],[3689],{"type":75,"value":3690},"grep",{"type":75,"value":3692}," to pull the section you need.",{"type":70,"tag":116,"props":3694,"children":3695},{},[3696,3701,3702,3707,3708,3713,3715,3720,3722,3730],{"type":70,"tag":84,"props":3697,"children":3699},{"className":3698},[],[3700],{"type":75,"value":1560},{"type":75,"value":867},{"type":70,"tag":84,"props":3703,"children":3705},{"className":3704},[],[3706],{"type":75,"value":1590},{"type":75,"value":867},{"type":70,"tag":84,"props":3709,"children":3711},{"className":3710},[],[3712],{"type":75,"value":2955},{"type":75,"value":3714}," — the verify-then-escalate\nsignals (see the behavior matrix above): ",{"type":70,"tag":84,"props":3716,"children":3718},{"className":3717},[],[3719],{"type":75,"value":2841},{"type":75,"value":3721}," means the\ntree came back empty (non-AX surface), so you act by ",{"type":70,"tag":104,"props":3723,"children":3724},{},[3725],{"type":70,"tag":84,"props":3726,"children":3728},{"className":3727},[],[3729],{"type":75,"value":2257},{"type":75,"value":3731}," off the\nscreenshot in the same response.",{"type":70,"tag":116,"props":3733,"children":3734},{},[3735,3741,3743,3749],{"type":70,"tag":84,"props":3736,"children":3738},{"className":3737},[],[3739],{"type":75,"value":3740},"screenshot_file_path",{"type":75,"value":3742}," — present when the screenshot was written to\ndisk instead of inlined (you passed ",{"type":70,"tag":84,"props":3744,"children":3746},{"className":3745},[],[3747],{"type":75,"value":3748},"screenshot_out_file",{"type":75,"value":3750},", or the\ncontext-saving CLI path); otherwise the frame is inlined.",{"type":70,"tag":116,"props":3752,"children":3753},{},[3754,3760,3761,3767,3768,3774,3776,3781],{"type":70,"tag":84,"props":3755,"children":3757},{"className":3756},[],[3758],{"type":75,"value":3759},"screenshot_width",{"type":75,"value":867},{"type":70,"tag":84,"props":3762,"children":3764},{"className":3763},[],[3765],{"type":75,"value":3766},"_height",{"type":75,"value":867},{"type":70,"tag":84,"props":3769,"children":3771},{"className":3770},[],[3772],{"type":75,"value":3773},"_scale_factor",{"type":75,"value":3775}," — dimensions of\nthe captured image. Present whenever a screenshot was taken (i.e.\nunless you passed ",{"type":70,"tag":84,"props":3777,"children":3779},{"className":3778},[],[3780],{"type":75,"value":2235},{"type":75,"value":3782},").",{"type":70,"tag":78,"props":3784,"children":3785},{},[3786],{"type":70,"tag":104,"props":3787,"children":3788},{},[3789],{"type":75,"value":3790},"Getting the screenshot as a file (CLI and context-constrained agents):",{"type":70,"tag":671,"props":3792,"children":3794},{"className":673,"code":3793,"language":675,"meta":676,"style":676},"# write to file — stdout stays readable (AX\u002FUIA tree \u002F summary only, no base64)\nqwen-cua-driver get_window_state '{\"pid\":N,\"window_id\":W,\"screenshot_out_file\":\"\u002Ftmp\u002Fshot.jpg\"}'\n\n# CLI --screenshot-out-file flag is equivalent\nqwen-cua-driver get_window_state '{\"pid\":N,\"window_id\":W}' --screenshot-out-file \u002Ftmp\u002Fshot.jpg\n",[3795],{"type":70,"tag":84,"props":3796,"children":3797},{"__ignoreMap":676},[3798,3806,3830,3839,3847],{"type":70,"tag":682,"props":3799,"children":3800},{"class":684,"line":685},[3801],{"type":70,"tag":682,"props":3802,"children":3803},{"style":710},[3804],{"type":75,"value":3805},"# write to file — stdout stays readable (AX\u002FUIA tree \u002F summary only, no base64)\n",{"type":70,"tag":682,"props":3807,"children":3808},{"class":684,"line":959},[3809,3813,3817,3821,3826],{"type":70,"tag":682,"props":3810,"children":3811},{"style":689},[3812],{"type":75,"value":44},{"type":70,"tag":682,"props":3814,"children":3815},{"style":694},[3816],{"type":75,"value":1007},{"type":70,"tag":682,"props":3818,"children":3819},{"style":972},[3820],{"type":75,"value":975},{"type":70,"tag":682,"props":3822,"children":3823},{"style":694},[3824],{"type":75,"value":3825},"{\"pid\":N,\"window_id\":W,\"screenshot_out_file\":\"\u002Ftmp\u002Fshot.jpg\"}",{"type":70,"tag":682,"props":3827,"children":3828},{"style":972},[3829],{"type":75,"value":985},{"type":70,"tag":682,"props":3831,"children":3832},{"class":684,"line":988},[3833],{"type":70,"tag":682,"props":3834,"children":3836},{"emptyLinePlaceholder":3835},true,[3837],{"type":75,"value":3838},"\n",{"type":70,"tag":682,"props":3840,"children":3841},{"class":684,"line":997},[3842],{"type":70,"tag":682,"props":3843,"children":3844},{"style":710},[3845],{"type":75,"value":3846},"# CLI --screenshot-out-file flag is equivalent\n",{"type":70,"tag":682,"props":3848,"children":3849},{"class":684,"line":1023},[3850,3854,3858,3862,3867,3872,3877],{"type":70,"tag":682,"props":3851,"children":3852},{"style":689},[3853],{"type":75,"value":44},{"type":70,"tag":682,"props":3855,"children":3856},{"style":694},[3857],{"type":75,"value":1007},{"type":70,"tag":682,"props":3859,"children":3860},{"style":972},[3861],{"type":75,"value":975},{"type":70,"tag":682,"props":3863,"children":3864},{"style":694},[3865],{"type":75,"value":3866},"{\"pid\":N,\"window_id\":W}",{"type":70,"tag":682,"props":3868,"children":3869},{"style":972},[3870],{"type":75,"value":3871},"'",{"type":70,"tag":682,"props":3873,"children":3874},{"style":694},[3875],{"type":75,"value":3876}," --screenshot-out-file",{"type":70,"tag":682,"props":3878,"children":3879},{"style":694},[3880],{"type":75,"value":3881}," \u002Ftmp\u002Fshot.jpg\n",{"type":70,"tag":78,"props":3883,"children":3884},{},[3885,3887,3892,3894,3899,3901,3906],{"type":75,"value":3886},"Pass ",{"type":70,"tag":84,"props":3888,"children":3890},{"className":3889},[],[3891],{"type":75,"value":3748},{"type":75,"value":3893}," when using ",{"type":70,"tag":84,"props":3895,"children":3897},{"className":3896},[],[3898],{"type":75,"value":2085},{"type":75,"value":3900}," via CLI or\nfrom an agent whose context window can't absorb ~31 KB of inline\nbase64 (e.g. OpenCode with a local Ollama model). The MCP image\ncontent block is omitted from the response when this param is set —\nthe model receives only the tree and ",{"type":70,"tag":84,"props":3902,"children":3904},{"className":3903},[],[3905],{"type":75,"value":3740},{"type":75,"value":3907},", then\nreads the image from disk.",{"type":70,"tag":78,"props":3909,"children":3910},{},[3911,3922],{"type":70,"tag":104,"props":3912,"children":3913},{},[3914,3916,3920],{"type":75,"value":3915},"The tree and the screenshot are complementary, not redundant — and\nthey come from the ",{"type":70,"tag":1304,"props":3917,"children":3918},{},[3919],{"type":75,"value":3381},{"type":75,"value":3921}," call.",{"type":75,"value":3923}," Each half carries signal the other\ncan't, which is exactly why you cross-check them:",{"type":70,"tag":112,"props":3925,"children":3926},{},[3927,3951],{"type":70,"tag":116,"props":3928,"children":3929},{},[3930,3932,3937,3939,3944,3946,3950],{"type":75,"value":3931},"The ",{"type":70,"tag":104,"props":3933,"children":3934},{},[3935],{"type":75,"value":3936},"tree",{"type":75,"value":3938}," tells you ",{"type":70,"tag":1304,"props":3940,"children":3941},{},[3942],{"type":75,"value":3943},"what's clickable",{"type":75,"value":3945}," — roles, labels,\nsnapshot-bound element handles, advertised actions, parent-child\nstructure. This is the ground truth for an ",{"type":70,"tag":104,"props":3947,"children":3948},{},[3949],{"type":75,"value":2387},{"type":75,"value":228},{"type":70,"tag":116,"props":3952,"children":3953},{},[3954,3955,3959,3960,3965,3967,3972,3974,3979],{"type":75,"value":3931},{"type":70,"tag":104,"props":3956,"children":3957},{},[3958],{"type":75,"value":724},{"type":75,"value":3938},{"type":70,"tag":1304,"props":3961,"children":3962},{},[3963],{"type":75,"value":3964},"which one",{"type":75,"value":3966}," — the tree often has many\nbuttons with similar or empty labels (\"Delete\", \"OK\", anonymous\nUUID-labeled buttons, repeated static-text), and visual context\ndisambiguates. Captions, colors, layout relationships visible in\npixels often don't show up in the tree at all (especially in\nChromium \u002F Electron \u002F web content) — and the screenshot is where you\ncatch the tree ",{"type":70,"tag":1304,"props":3968,"children":3969},{},[3970],{"type":75,"value":3971},"lying",{"type":75,"value":3973}," (an ",{"type":70,"tag":84,"props":3975,"children":3977},{"className":3976},[],[3978],{"type":75,"value":2173},{"type":75,"value":3980},"\u002Foff-viewport row, a Catalyst null\nvalue).",{"type":70,"tag":78,"props":3982,"children":3983},{},[3984,3986,3991,3993,3997,3999,4003,4005,4010,4012,4017,4019,4024,4026,4031],{"type":75,"value":3985},"Default to dispatching by ",{"type":70,"tag":84,"props":3987,"children":3989},{"className":3988},[],[3990],{"type":75,"value":2395},{"type":75,"value":3992}," (the ",{"type":70,"tag":104,"props":3994,"children":3995},{},[3996],{"type":75,"value":2387},{"type":75,"value":3998},") —\nit's the verifiable, backgroundable rung. Do an ",{"type":70,"tag":104,"props":4000,"children":4001},{},[4002],{"type":75,"value":2442},{"type":75,"value":4004},"\n(",{"type":70,"tag":84,"props":4006,"children":4008},{"className":4007},[],[4009],{"type":75,"value":2501},{"type":75,"value":4011}," off the same screenshot) when the tree can't disambiguate\n(repeated\u002Fempty labels), when it's empty (",{"type":70,"tag":84,"props":4013,"children":4015},{"className":4014},[],[4016],{"type":75,"value":2955},{"type":75,"value":4018}," — non-AX\nsurface), when an action came back ",{"type":70,"tag":84,"props":4020,"children":4022},{"className":4021},[],[4023],{"type":75,"value":1645},{"type":75,"value":4025},", or when the tree\ndisagrees with the pixels. You never re-capture to switch — the\nscreenshot is already there; you just change ",{"type":70,"tag":1304,"props":4027,"children":4028},{},[4029],{"type":75,"value":4030},"how you address",{"type":75,"value":4032}," the\ntarget.",{"type":70,"tag":78,"props":4034,"children":4035},{},[4036],{"type":75,"value":4037},"Reach for pixel coordinates only when the target is a canvas \u002F\nvideo \u002F WebGL \u002F custom-drawn surface that isn't in the tree\n(see \"Pixel-coordinate clicks\" below).",{"type":70,"tag":78,"props":4039,"children":4040},{},[4041,4042,4048,4050,4055,4057,4063,4065,4070],{"type":75,"value":3931},{"type":70,"tag":84,"props":4043,"children":4045},{"className":4044},[],[4046],{"type":75,"value":4047},"actions=[...]",{"type":75,"value":4049}," list on each element is ",{"type":70,"tag":104,"props":4051,"children":4052},{},[4053],{"type":75,"value":4054},"advisory",{"type":75,"value":4056},", not\nauthoritative. cua-driver does not pre-flight check against it —\n",{"type":70,"tag":84,"props":4058,"children":4060},{"className":4059},[],[4061],{"type":75,"value":4062},"click({pid, element_token})",{"type":75,"value":4064}," always attempts the default action (or\nthe action you pass) and surfaces whatever the target returns. ",{"type":70,"tag":104,"props":4066,"children":4067},{},[4068],{"type":75,"value":4069},"Try\nthe click first",{"type":75,"value":4071}," — pivot only on the returned error code.",{"type":70,"tag":364,"props":4073,"children":4075},{"id":4074},"tool-dispatch-table",[4076],{"type":75,"value":4077},"Tool dispatch table",{"type":70,"tag":78,"props":4079,"children":4080},{},[4081,4083,4088,4090,4095,4097,4102,4104,4109],{"type":75,"value":4082},"Every row assumes a fresh ",{"type":70,"tag":84,"props":4084,"children":4086},{"className":4085},[],[4087],{"type":75,"value":2085},{"type":75,"value":4089},". Prefer its opaque\n",{"type":70,"tag":84,"props":4091,"children":4093},{"className":4092},[],[4094],{"type":75,"value":2395},{"type":75,"value":4096},". If a client uses the visible integer instead, it must send\nthe response's ",{"type":70,"tag":84,"props":4098,"children":4100},{"className":4099},[],[4101],{"type":75,"value":2410},{"type":75,"value":4103}," with ",{"type":70,"tag":84,"props":4105,"children":4107},{"className":4106},[],[4108],{"type":75,"value":1293},{"type":75,"value":4110},"; bare indices fail closed in\n0.17. Pixel-only forms remain independent of snapshot handles.",{"type":70,"tag":2987,"props":4112,"children":4113},{},[4114,4135],{"type":70,"tag":2991,"props":4115,"children":4116},{},[4117],{"type":70,"tag":2995,"props":4118,"children":4119},{},[4120,4125,4130],{"type":70,"tag":2999,"props":4121,"children":4122},{},[4123],{"type":75,"value":4124},"Intent",{"type":70,"tag":2999,"props":4126,"children":4127},{},[4128],{"type":75,"value":4129},"Tool",{"type":70,"tag":2999,"props":4131,"children":4132},{},[4133],{"type":75,"value":4134},"Notes",{"type":70,"tag":3033,"props":4136,"children":4137},{},[4138,4208,4244,4266,4307,4348,4398,4420,4454,4499,4559,4581,4623,4645],{"type":70,"tag":2995,"props":4139,"children":4140},{},[4141,4146,4154],{"type":70,"tag":3040,"props":4142,"children":4143},{},[4144],{"type":75,"value":4145},"List an app's windows",{"type":70,"tag":3040,"props":4147,"children":4148},{},[4149],{"type":70,"tag":84,"props":4150,"children":4152},{"className":4151},[],[4153],{"type":75,"value":3606},{"type":70,"tag":3040,"props":4155,"children":4156},{},[4157,4159,4164,4165,4171,4172,4178,4179,4185,4186,4192,4193,4199,4201,4206],{"type":75,"value":4158},"returns ",{"type":70,"tag":84,"props":4160,"children":4162},{"className":4161},[],[4163],{"type":75,"value":747},{"type":75,"value":301},{"type":70,"tag":84,"props":4166,"children":4168},{"className":4167},[],[4169],{"type":75,"value":4170},"title",{"type":75,"value":301},{"type":70,"tag":84,"props":4173,"children":4175},{"className":4174},[],[4176],{"type":75,"value":4177},"bounds",{"type":75,"value":301},{"type":70,"tag":84,"props":4180,"children":4182},{"className":4181},[],[4183],{"type":75,"value":4184},"z_index",{"type":75,"value":301},{"type":70,"tag":84,"props":4187,"children":4189},{"className":4188},[],[4190],{"type":75,"value":4191},"is_on_screen",{"type":75,"value":301},{"type":70,"tag":84,"props":4194,"children":4196},{"className":4195},[],[4197],{"type":75,"value":4198},"on_current_space",{"type":75,"value":4200},". Already included in ",{"type":70,"tag":84,"props":4202,"children":4204},{"className":4203},[],[4205],{"type":75,"value":755},{"type":75,"value":4207},"'s response — only call this for long-lived pids",{"type":70,"tag":2995,"props":4209,"children":4210},{},[4211,4216,4225],{"type":70,"tag":3040,"props":4212,"children":4213},{},[4214],{"type":75,"value":4215},"Set an exact window frame",{"type":70,"tag":3040,"props":4217,"children":4218},{},[4219],{"type":70,"tag":84,"props":4220,"children":4222},{"className":4221},[],[4223],{"type":75,"value":4224},"set_window_frame({pid, window_id, x, y, width, height})",{"type":70,"tag":3040,"props":4226,"children":4227},{},[4228,4230,4235,4237,4242],{"type":75,"value":4229},"uses the platform window manager and returns ",{"type":70,"tag":84,"props":4231,"children":4233},{"className":4232},[],[4234],{"type":75,"value":1604},{"type":75,"value":4236}," only after geometry readback; inspect ",{"type":70,"tag":84,"props":4238,"children":4240},{"className":4239},[],[4241],{"type":75,"value":299},{"type":75,"value":4243}," again before continuing when the result is not confirmed",{"type":70,"tag":2995,"props":4245,"children":4246},{},[4247,4252,4261],{"type":70,"tag":3040,"props":4248,"children":4249},{},[4250],{"type":75,"value":4251},"Invoke a native application menu",{"type":70,"tag":3040,"props":4253,"children":4254},{},[4255],{"type":70,"tag":84,"props":4256,"children":4258},{"className":4257},[],[4259],{"type":75,"value":4260},"invoke_menu({pid, window_id, path:[\"Window\",\"Arrange\",\"Left\"]})",{"type":70,"tag":3040,"props":4262,"children":4263},{},[4264],{"type":75,"value":4265},"resolves exact immediate-child labels from live native state at every hop; refuses missing, ambiguous, or disabled segments and never falls back to pixels; verify the command's semantic effect afterward",{"type":70,"tag":2995,"props":4267,"children":4268},{},[4269,4274,4282],{"type":70,"tag":3040,"props":4270,"children":4271},{},[4272],{"type":75,"value":4273},"Snapshot a window",{"type":70,"tag":3040,"props":4275,"children":4276},{},[4277],{"type":70,"tag":84,"props":4278,"children":4280},{"className":4279},[],[4281],{"type":75,"value":3577},{"type":70,"tag":3040,"props":4283,"children":4284},{},[4285,4286,4291,4292,4298,4300,4305],{"type":75,"value":4158},{"type":70,"tag":84,"props":4287,"children":4289},{"className":4288},[],[4290],{"type":75,"value":3646},{"type":75,"value":2404},{"type":70,"tag":84,"props":4293,"children":4295},{"className":4294},[],[4296],{"type":75,"value":4297},"screenshot_*",{"type":75,"value":4299},"; populates the ",{"type":70,"tag":84,"props":4301,"children":4303},{"className":4302},[],[4304],{"type":75,"value":1113},{"type":75,"value":4306}," element_index cache",{"type":70,"tag":2995,"props":4308,"children":4309},{},[4310,4315,4324],{"type":70,"tag":3040,"props":4311,"children":4312},{},[4313],{"type":75,"value":4314},"Verify a postcondition",{"type":70,"tag":3040,"props":4316,"children":4317},{},[4318],{"type":70,"tag":84,"props":4319,"children":4321},{"className":4320},[],[4322],{"type":75,"value":4323},"verify_state({pid, window_id, expect, include_screenshot?})",{"type":70,"tag":3040,"props":4325,"children":4326},{},[4327,4329,4334,4335,4340,4341,4346],{"type":75,"value":4328},"polls bounded structured predicates; returns ",{"type":70,"tag":84,"props":4330,"children":4332},{"className":4331},[],[4333],{"type":75,"value":1467},{"type":75,"value":301},{"type":70,"tag":84,"props":4336,"children":4338},{"className":4337},[],[4339],{"type":75,"value":1474},{"type":75,"value":309},{"type":70,"tag":84,"props":4342,"children":4344},{"className":4343},[],[4345],{"type":75,"value":1482},{"type":75,"value":4347},". Optional final image is interpreted by the agent harness, never by the driver",{"type":70,"tag":2995,"props":4349,"children":4350},{},[4351,4356,4371],{"type":70,"tag":3040,"props":4352,"children":4353},{},[4354],{"type":75,"value":4355},"Left click",{"type":70,"tag":3040,"props":4357,"children":4358},{},[4359,4364,4365],{"type":70,"tag":84,"props":4360,"children":4362},{"className":4361},[],[4363],{"type":75,"value":4062},{"type":75,"value":757},{"type":70,"tag":84,"props":4366,"children":4368},{"className":4367},[],[4369],{"type":75,"value":4370},"click({pid, window_id, element_index, snapshot_id})",{"type":70,"tag":3040,"props":4372,"children":4373},{},[4374,4376,4382,4384,4390,4392],{"type":75,"value":4375},"default ",{"type":70,"tag":84,"props":4377,"children":4379},{"className":4378},[],[4380],{"type":75,"value":4381},"action: \"press\"",{"type":75,"value":4383},". Pixel form: ",{"type":70,"tag":84,"props":4385,"children":4387},{"className":4386},[],[4388],{"type":75,"value":4389},"click({pid, x, y})",{"type":75,"value":4391}," (window_id optional) — ",{"type":70,"tag":84,"props":4393,"children":4395},{"className":4394},[],[4396],{"type":75,"value":4397},"modifier: [\"cmd\"|\"ctrl\"]",{"type":70,"tag":2995,"props":4399,"children":4400},{},[4401,4406,4415],{"type":70,"tag":3040,"props":4402,"children":4403},{},[4404],{"type":75,"value":4405},"Double-click \u002F open",{"type":70,"tag":3040,"props":4407,"children":4408},{},[4409],{"type":70,"tag":84,"props":4410,"children":4412},{"className":4411},[],[4413],{"type":75,"value":4414},"double_click({pid, element_token})",{"type":70,"tag":3040,"props":4416,"children":4417},{},[4418],{"type":75,"value":4419},"Default action when the element advertises one (Open on Finder items \u002F openable rows), else stamped pixel double-click at the element's center",{"type":70,"tag":2995,"props":4421,"children":4422},{},[4423,4428,4444],{"type":70,"tag":3040,"props":4424,"children":4425},{},[4426],{"type":75,"value":4427},"Right click \u002F context menu",{"type":70,"tag":3040,"props":4429,"children":4430},{},[4431,4437,4438],{"type":70,"tag":84,"props":4432,"children":4434},{"className":4433},[],[4435],{"type":75,"value":4436},"right_click({pid, element_token})",{"type":75,"value":757},{"type":70,"tag":84,"props":4439,"children":4441},{"className":4440},[],[4442],{"type":75,"value":4443},"click({pid, element_token, action:\"show_menu\"})",{"type":70,"tag":3040,"props":4445,"children":4446},{},[4447,4449],{"type":75,"value":4448},"Browser page content should use the typed route where available; see ",{"type":70,"tag":84,"props":4450,"children":4452},{"className":4451},[],[4453],{"type":75,"value":207},{"type":70,"tag":2995,"props":4455,"children":4456},{},[4457,4462,4481],{"type":70,"tag":3040,"props":4458,"children":4459},{},[4460],{"type":75,"value":4461},"Type at cursor",{"type":70,"tag":3040,"props":4463,"children":4464},{},[4465,4471,4473,4479],{"type":70,"tag":84,"props":4466,"children":4468},{"className":4467},[],[4469],{"type":75,"value":4470},"type_text({pid, text, element_token})",{"type":75,"value":4472}," (ax) or ",{"type":70,"tag":84,"props":4474,"children":4476},{"className":4475},[],[4477],{"type":75,"value":4478},"type_text({pid, text, window_id, x, y})",{"type":75,"value":4480}," (px)",{"type":70,"tag":3040,"props":4482,"children":4483},{},[4484,4486,4490,4492,4497],{"type":75,"value":4485},"ax focuses the element then writes via the platform's text-set primitive; ",{"type":70,"tag":104,"props":4487,"children":4488},{},[4489],{"type":75,"value":2257},{"type":75,"value":4491}," pixel-clicks ",{"type":70,"tag":84,"props":4493,"children":4495},{"className":4494},[],[4496],{"type":75,"value":2577},{"type":75,"value":4498}," to focus the renderer, then types — the one-call fix for Chromium\u002FElectron inputs the AX path can't reach",{"type":70,"tag":2995,"props":4500,"children":4501},{},[4502,4507,4516],{"type":70,"tag":3040,"props":4503,"children":4504},{},[4505],{"type":75,"value":4506},"Set whole non-text control value",{"type":70,"tag":3040,"props":4508,"children":4509},{},[4510],{"type":70,"tag":84,"props":4511,"children":4513},{"className":4512},[],[4514],{"type":75,"value":4515},"set_value({pid, element_token, value})",{"type":70,"tag":3040,"props":4517,"children":4518},{},[4519,4524,4526,4532,4534,4539,4541,4546,4548,4553,4554],{"type":70,"tag":104,"props":4520,"children":4521},{},[4522],{"type":75,"value":4523},"AX-only by design",{"type":75,"value":4525}," — dropdown\u002F",{"type":70,"tag":84,"props":4527,"children":4529},{"className":4528},[],[4530],{"type":75,"value":4531},"AXPopUpButton",{"type":75,"value":4533},", checkbox, slider, stepper; ",{"type":70,"tag":104,"props":4535,"children":4536},{},[4537],{"type":75,"value":4538},"also the keyboard-commit workaround on minimized windows.",{"type":75,"value":4540}," For text use ",{"type":70,"tag":84,"props":4542,"children":4544},{"className":4543},[],[4545],{"type":75,"value":2137},{"type":75,"value":4547},"; to pixel-manipulate a control use ",{"type":70,"tag":84,"props":4549,"children":4551},{"className":4550},[],[4552],{"type":75,"value":2587},{"type":75,"value":141},{"type":70,"tag":84,"props":4555,"children":4557},{"className":4556},[],[4558],{"type":75,"value":2722},{"type":70,"tag":2995,"props":4560,"children":4561},{},[4562,4567,4576],{"type":70,"tag":3040,"props":4563,"children":4564},{},[4565],{"type":75,"value":4566},"Scroll",{"type":70,"tag":3040,"props":4568,"children":4569},{},[4570],{"type":70,"tag":84,"props":4571,"children":4573},{"className":4572},[],[4574],{"type":75,"value":4575},"scroll({pid, direction, amount, by, element_token})",{"type":70,"tag":3040,"props":4577,"children":4578},{},[4579],{"type":75,"value":4580},"synthesizes per-pid PageUp\u002FPageDown\u002Farrows",{"type":70,"tag":2995,"props":4582,"children":4583},{},[4584,4589,4606],{"type":70,"tag":3040,"props":4585,"children":4586},{},[4587],{"type":75,"value":4588},"Focus + send key",{"type":70,"tag":3040,"props":4590,"children":4591},{},[4592,4598,4599,4605],{"type":70,"tag":84,"props":4593,"children":4595},{"className":4594},[],[4596],{"type":75,"value":4597},"press_key({pid, key, element_token, modifiers})",{"type":75,"value":4472},{"type":70,"tag":84,"props":4600,"children":4602},{"className":4601},[],[4603],{"type":75,"value":4604},"press_key({pid, key, x, y})",{"type":75,"value":4480},{"type":70,"tag":3040,"props":4607,"children":4608},{},[4609,4611,4615,4616,4621],{"type":75,"value":4610},"ax targets the element before posting the key; ",{"type":70,"tag":104,"props":4612,"children":4613},{},[4614],{"type":75,"value":2257},{"type":75,"value":4491},{"type":70,"tag":84,"props":4617,"children":4619},{"className":4618},[],[4620],{"type":75,"value":2577},{"type":75,"value":4622}," to focus, then sends the key",{"type":70,"tag":2995,"props":4624,"children":4625},{},[4626,4631,4640],{"type":70,"tag":3040,"props":4627,"children":4628},{},[4629],{"type":75,"value":4630},"Send key to pid",{"type":70,"tag":3040,"props":4632,"children":4633},{},[4634],{"type":70,"tag":84,"props":4635,"children":4637},{"className":4636},[],[4638],{"type":75,"value":4639},"press_key({pid, key, modifiers})",{"type":70,"tag":3040,"props":4641,"children":4642},{},[4643],{"type":75,"value":4644},"no focus change; key goes to pid's current focus",{"type":70,"tag":2995,"props":4646,"children":4647},{},[4648,4653,4671],{"type":70,"tag":3040,"props":4649,"children":4650},{},[4651],{"type":75,"value":4652},"Modifier combo",{"type":70,"tag":3040,"props":4654,"children":4655},{},[4656,4662,4664,4670],{"type":70,"tag":84,"props":4657,"children":4659},{"className":4658},[],[4660],{"type":75,"value":4661},"hotkey({pid, keys})",{"type":75,"value":4663}," (no focus) or ",{"type":70,"tag":84,"props":4665,"children":4667},{"className":4666},[],[4668],{"type":75,"value":4669},"hotkey({pid, x, y, keys})",{"type":75,"value":4480},{"type":70,"tag":3040,"props":4672,"children":4673},{},[4674,4676,4682,4683,4689,4691,4695,4696,4701,4703,4709],{"type":75,"value":4675},"e.g. ",{"type":70,"tag":84,"props":4677,"children":4679},{"className":4678},[],[4680],{"type":75,"value":4681},"[\"cmd\",\"c\"]",{"type":75,"value":867},{"type":70,"tag":84,"props":4684,"children":4686},{"className":4685},[],[4687],{"type":75,"value":4688},"[\"ctrl\",\"c\"]",{"type":75,"value":4690},"; posted per-pid, not HID tap. ",{"type":70,"tag":104,"props":4692,"children":4693},{},[4694],{"type":75,"value":2257},{"type":75,"value":4491},{"type":70,"tag":84,"props":4697,"children":4699},{"className":4698},[],[4700],{"type":75,"value":2577},{"type":75,"value":4702}," to focus a field first, e.g. ",{"type":70,"tag":84,"props":4704,"children":4706},{"className":4705},[],[4707],{"type":75,"value":4708},"[\"cmd\",\"v\"]",{"type":75,"value":4710}," to paste into it",{"type":70,"tag":78,"props":4712,"children":4713},{},[4714,4720,4722,4728,4730,4735,4737,4742,4744,4749],{"type":70,"tag":84,"props":4715,"children":4717},{"className":4716},[],[4718],{"type":75,"value":4719},"list_windows.z_index",{"type":75,"value":4721}," uses one portable convention: higher integer\nvalues are closer to the front. Select a frontmost candidate with the\nmaximum non-null value. If all values are ",{"type":70,"tag":84,"props":4723,"children":4725},{"className":4724},[],[4726],{"type":75,"value":4727},"null",{"type":75,"value":4729}," (as they can be on\nnative Wayland), use an explicit fallback; never treat ",{"type":70,"tag":84,"props":4731,"children":4733},{"className":4732},[],[4734],{"type":75,"value":4727},{"type":75,"value":4736}," as zero\nor infer stacking from array order. The ",{"type":70,"tag":84,"props":4738,"children":4740},{"className":4739},[],[4741],{"type":75,"value":2058},{"type":75,"value":4743}," records returned by\n",{"type":70,"tag":84,"props":4745,"children":4747},{"className":4746},[],[4748],{"type":75,"value":755},{"type":75,"value":4750}," use the same convention.",{"type":70,"tag":78,"props":4752,"children":4753},{},[4754,4756,4761,4762,4767,4769,4775,4777,4782,4783,4789,4790,4795,4796,4801,4802,4807,4808,4813,4814,4819,4821,4826],{"type":75,"value":4755},"In effective desktop scope, the foreground\u002Fsystem equivalents omit\n",{"type":70,"tag":84,"props":4757,"children":4759},{"className":4758},[],[4760],{"type":75,"value":739},{"type":75,"value":141},{"type":70,"tag":84,"props":4763,"children":4765},{"className":4764},[],[4766],{"type":75,"value":747},{"type":75,"value":4768}," and pass ",{"type":70,"tag":84,"props":4770,"children":4772},{"className":4771},[],[4773],{"type":75,"value":4774},"scope:\"desktop\"",{"type":75,"value":4776},": ",{"type":70,"tag":84,"props":4778,"children":4780},{"className":4779},[],[4781],{"type":75,"value":2587},{"type":75,"value":301},{"type":70,"tag":84,"props":4784,"children":4786},{"className":4785},[],[4787],{"type":75,"value":4788},"scroll",{"type":75,"value":301},{"type":70,"tag":84,"props":4791,"children":4793},{"className":4792},[],[4794],{"type":75,"value":2722},{"type":75,"value":1130},{"type":70,"tag":84,"props":4797,"children":4799},{"className":4798},[],[4800],{"type":75,"value":1324},{"type":75,"value":301},{"type":70,"tag":84,"props":4803,"children":4805},{"className":4804},[],[4806],{"type":75,"value":2137},{"type":75,"value":301},{"type":70,"tag":84,"props":4809,"children":4811},{"className":4810},[],[4812],{"type":75,"value":2543},{"type":75,"value":1584},{"type":70,"tag":84,"props":4815,"children":4817},{"className":4816},[],[4818],{"type":75,"value":2551},{"type":75,"value":4820},". Coordinates are\nscreen-absolute pixels from the latest ",{"type":70,"tag":84,"props":4822,"children":4824},{"className":4823},[],[4825],{"type":75,"value":1408},{"type":75,"value":4827}," image.",{"type":70,"tag":78,"props":4829,"children":4830},{},[4831,4842,4844,4849],{"type":70,"tag":104,"props":4832,"children":4833},{},[4834,4836,4841],{"type":75,"value":4835},"Window-scope keyboard\u002Ftext primitives require ",{"type":70,"tag":84,"props":4837,"children":4839},{"className":4838},[],[4840],{"type":75,"value":739},{"type":75,"value":228},{"type":75,"value":4843}," They use the named\ntarget's per-pid event-post path. Only a strict\u002Feffective desktop session may\nomit ",{"type":70,"tag":84,"props":4845,"children":4847},{"className":4846},[],[4848],{"type":75,"value":739},{"type":75,"value":4850},", and it intentionally routes keyboard input to the current\nforeground application.",{"type":70,"tag":78,"props":4852,"children":4853},{},[4854,4859],{"type":70,"tag":104,"props":4855,"children":4856},{},[4857],{"type":75,"value":4858},"Why the snapshot-bound element target is the primary path:",{"type":75,"value":4860}," works on hidden \u002F\noccluded \u002F off-desktop windows, avoids focus steal, and fails closed after a\ntree rebuild instead of silently retargeting a reused index. Labels tell you\nwhat you're clicking. Reach for pixel\ncoordinates only when the accessibility tree can't.",{"type":70,"tag":92,"props":4862,"children":4864},{"id":4863},"cross-platform-parameter-contract",[4865],{"type":75,"value":4866},"Cross-platform parameter contract",{"type":70,"tag":78,"props":4868,"children":4869},{},[4870,4872,4877,4878,4883,4884,4889,4891,4897,4898,4904,4905,4911,4912,4917,4918,4923,4924,4929,4931,4936,4938,4943,4945,4951,4952,4958,4959,4965,4967,4973,4975,4980,4982,4988,4990,4995,4997,5002],{"type":75,"value":4871},"The capture, dispatch, and addressing params — ",{"type":70,"tag":84,"props":4873,"children":4875},{"className":4874},[],[4876],{"type":75,"value":1244},{"type":75,"value":1130},{"type":70,"tag":84,"props":4879,"children":4881},{"className":4880},[],[4882],{"type":75,"value":2595},{"type":75,"value":301},{"type":70,"tag":84,"props":4885,"children":4887},{"className":4886},[],[4888],{"type":75,"value":2274},{"type":75,"value":4890}," (deprecated\u002Fignored — see the behavior\nmatrix; still in the schema only so old callers don't error), ",{"type":70,"tag":84,"props":4892,"children":4894},{"className":4893},[],[4895],{"type":75,"value":4896},"scope",{"type":75,"value":1130},{"type":70,"tag":84,"props":4899,"children":4901},{"className":4900},[],[4902],{"type":75,"value":4903},"modifier",{"type":75,"value":301},{"type":70,"tag":84,"props":4906,"children":4908},{"className":4907},[],[4909],{"type":75,"value":4910},"button",{"type":75,"value":301},{"type":70,"tag":84,"props":4913,"children":4915},{"className":4914},[],[4916],{"type":75,"value":1293},{"type":75,"value":301},{"type":70,"tag":84,"props":4919,"children":4921},{"className":4920},[],[4922],{"type":75,"value":2410},{"type":75,"value":301},{"type":70,"tag":84,"props":4925,"children":4927},{"className":4926},[],[4928],{"type":75,"value":2395},{"type":75,"value":4930}," — are a ",{"type":70,"tag":104,"props":4932,"children":4933},{},[4934],{"type":75,"value":4935},"shared\nschema contract",{"type":75,"value":4937},": identical ",{"type":70,"tag":1304,"props":4939,"children":4940},{},[4941],{"type":75,"value":4942},"shape",{"type":75,"value":4944}," (",{"type":70,"tag":84,"props":4946,"children":4948},{"className":4947},[],[4949],{"type":75,"value":4950},"type",{"type":75,"value":141},{"type":70,"tag":84,"props":4953,"children":4955},{"className":4954},[],[4956],{"type":75,"value":4957},"enum",{"type":75,"value":141},{"type":70,"tag":84,"props":4960,"children":4962},{"className":4961},[],[4963],{"type":75,"value":4964},"items",{"type":75,"value":4966},") on macOS,\nWindows, and Linux.\nThey compose from canonical fragments in\n",{"type":70,"tag":84,"props":4968,"children":4970},{"className":4969},[],[4971],{"type":75,"value":4972},"cua-driver-core::tool_schema",{"type":75,"value":4974}," (+ ",{"type":70,"tag":84,"props":4976,"children":4978},{"className":4977},[],[4979],{"type":75,"value":2274},{"type":75,"value":4981},"), and a CI gate\n(",{"type":70,"tag":84,"props":4983,"children":4985},{"className":4984},[],[4986],{"type":75,"value":4987},"schema_consistency_test",{"type":75,"value":4989},") runs every tool's live ",{"type":70,"tag":84,"props":4991,"children":4993},{"className":4992},[],[4994],{"type":75,"value":1988},{"type":75,"value":4996}," through a\nstructural checker on each platform, so the three surfaces can't\nsilently drift. ",{"type":70,"tag":1304,"props":4998,"children":4999},{},[5000],{"type":75,"value":5001},"Contributor note:",{"type":75,"value":5003}," when you add or edit one of these\nshared params on a tool, pull from the fragment — don't re-hand-write the\nJSON, or the gate fails. (Descriptions may legitimately vary per tool;\nthe gate compares shape, not prose.)",{"type":70,"tag":78,"props":5005,"children":5006},{},[5007],{"type":75,"value":5008},"Two consequences for callers:",{"type":70,"tag":112,"props":5010,"children":5011},{},[5012,5048],{"type":70,"tag":116,"props":5013,"children":5014},{},[5015,5025,5027,5032,5034,5039,5041,5047],{"type":70,"tag":104,"props":5016,"children":5017},{},[5018,5023],{"type":70,"tag":84,"props":5019,"children":5021},{"className":5020},[],[5022],{"type":75,"value":1244},{"type":75,"value":5024}," is accepted on every action and cursor tool, on all three\nplatforms.",{"type":75,"value":5026}," It's cursor-wired where the platform glides a cursor and\nschema-accepted everywhere else — so the same ",{"type":70,"tag":84,"props":5028,"children":5030},{"className":5029},[],[5031],{"type":75,"value":1244},{"type":75,"value":5033}," you pass on\nmacOS is no longer ",{"type":70,"tag":1304,"props":5035,"children":5036},{},[5037],{"type":75,"value":5038},"rejected",{"type":75,"value":5040}," by Windows\u002FLinux, which previously\nrefused unknown keys via ",{"type":70,"tag":84,"props":5042,"children":5044},{"className":5043},[],[5045],{"type":75,"value":5046},"additionalProperties:false",{"type":75,"value":228},{"type":70,"tag":116,"props":5049,"children":5050},{},[5051,5076,5077,5082,5083,5089,5090,5096,5097,5102,5103,5108,5109,5114,5115,5120,5121,5126,5128,5133,5135,5145,5147,5153,5155,5160,5162,5168,5170,5176,5178,5183,5185,5190,5192,5197,5199,5203,5205,5210,5212,5217],{"type":70,"tag":104,"props":5052,"children":5053},{},[5054,5059,5060,5066,5068,5074],{"type":70,"tag":84,"props":5055,"children":5057},{"className":5056},[],[5058],{"type":75,"value":2595},{"type":75,"value":4944},{"type":70,"tag":84,"props":5061,"children":5063},{"className":5062},[],[5064],{"type":75,"value":5065},"\"background\"",{"type":75,"value":5067}," default \u002F ",{"type":70,"tag":84,"props":5069,"children":5071},{"className":5070},[],[5072],{"type":75,"value":5073},"\"foreground\"",{"type":75,"value":5075},") is on the\nwhole input family",{"type":75,"value":599},{"type":70,"tag":84,"props":5078,"children":5080},{"className":5079},[],[5081],{"type":75,"value":2587},{"type":75,"value":301},{"type":70,"tag":84,"props":5084,"children":5086},{"className":5085},[],[5087],{"type":75,"value":5088},"double_click",{"type":75,"value":301},{"type":70,"tag":84,"props":5091,"children":5093},{"className":5092},[],[5094],{"type":75,"value":5095},"right_click",{"type":75,"value":301},{"type":70,"tag":84,"props":5098,"children":5100},{"className":5099},[],[5101],{"type":75,"value":2722},{"type":75,"value":1130},{"type":70,"tag":84,"props":5104,"children":5106},{"className":5105},[],[5107],{"type":75,"value":4788},{"type":75,"value":301},{"type":70,"tag":84,"props":5110,"children":5112},{"className":5111},[],[5113],{"type":75,"value":2137},{"type":75,"value":301},{"type":70,"tag":84,"props":5116,"children":5118},{"className":5117},[],[5119],{"type":75,"value":2543},{"type":75,"value":301},{"type":70,"tag":84,"props":5122,"children":5124},{"className":5123},[],[5125],{"type":75,"value":2551},{"type":75,"value":5127}," — uniformly. The\n",{"type":70,"tag":84,"props":5129,"children":5131},{"className":5130},[],[5132],{"type":75,"value":1727},{"type":75,"value":5134}," rung briefly fronts the target, acts, then restores the\nprior frontmost: the explicit last resort when a background attempt\ndidn't land. ",{"type":70,"tag":104,"props":5136,"children":5137},{},[5138,5143],{"type":70,"tag":84,"props":5139,"children":5141},{"className":5140},[],[5142],{"type":75,"value":1727},{"type":75,"value":5144}," is a reaction, never a prediction.",{"type":75,"value":5146}," Always\nfire the ",{"type":70,"tag":84,"props":5148,"children":5150},{"className":5149},[],[5151],{"type":75,"value":5152},"background",{"type":75,"value":5154}," default first and let the driver tell you it\ncan't (a ",{"type":70,"tag":84,"props":5156,"children":5158},{"className":5157},[],[5159],{"type":75,"value":2866},{"type":75,"value":5161}," error with\n",{"type":70,"tag":84,"props":5163,"children":5165},{"className":5164},[],[5166],{"type":75,"value":5167},"escalation.recommended == \"foreground\"",{"type":75,"value":5169},", or a successful action result\nwith ",{"type":70,"tag":84,"props":5171,"children":5173},{"className":5172},[],[5174],{"type":75,"value":5175},"escalation.target == \"foreground\"",{"type":75,"value":5177},") — or observe a confirmed no-op —\n",{"type":70,"tag":1304,"props":5179,"children":5180},{},[5181],{"type":75,"value":5182},"before",{"type":75,"value":5184}," you escalate.\nDo ",{"type":70,"tag":104,"props":5186,"children":5187},{},[5188],{"type":75,"value":5189},"not",{"type":75,"value":5191}," reason \"it's a GTK\u002FChromium\u002FElectron app, so background will\ndrop, so I'll front up-front\": the toolkit lists in the tool schemas\nare the ",{"type":70,"tag":1304,"props":5193,"children":5194},{},[5195],{"type":75,"value":5196},"driver's",{"type":75,"value":5198}," internal detectors, not a checklist for you to front\non a guess. (Concretely: GIMP's GTK toolbox accepts background pixel\nclicks fine — a preemptive foreground click there just steals the\nuser's focus for nothing.) What each platform's ",{"type":70,"tag":1304,"props":5200,"children":5201},{},[5202],{"type":75,"value":5152},{"type":75,"value":5204}," rung can\nactually carry differs (e.g. a Windows background click can't carry\n",{"type":70,"tag":84,"props":5206,"children":5208},{"className":5207},[],[5209],{"type":75,"value":4903},{"type":75,"value":5211}," state — see ",{"type":70,"tag":84,"props":5213,"children":5215},{"className":5214},[],[5216],{"type":75,"value":171},{"type":75,"value":5218},"); the schema is uniform, the\nresidual limits are per-OS.",{"type":70,"tag":78,"props":5220,"children":5221},{},[5222,5227,5228,5233,5235,5241,5243,5248,5249,5255,5256,5262,5264,5270,5272,5277,5279,5284,5286,5291],{"type":70,"tag":104,"props":5223,"children":5224},{},[5225],{"type":75,"value":5226},"Required-set contract.",{"type":75,"value":2097},{"type":70,"tag":84,"props":5229,"children":5231},{"className":5230},[],[5232],{"type":75,"value":2587},{"type":75,"value":5234}," requires nothing (",{"type":70,"tag":84,"props":5236,"children":5238},{"className":5237},[],[5239],{"type":75,"value":5240},"required:[]",{"type":75,"value":5242},"),\n",{"type":70,"tag":84,"props":5244,"children":5246},{"className":5245},[],[5247],{"type":75,"value":4788},{"type":75,"value":733},{"type":70,"tag":84,"props":5250,"children":5252},{"className":5251},[],[5253],{"type":75,"value":5254},"[\"direction\"]",{"type":75,"value":301},{"type":70,"tag":84,"props":5257,"children":5259},{"className":5258},[],[5260],{"type":75,"value":5261},"zoom",{"type":75,"value":5263}," requires\n",{"type":70,"tag":84,"props":5265,"children":5267},{"className":5266},[],[5268],{"type":75,"value":5269},"[\"window_id\",\"x1\",\"y1\",\"x2\",\"y2\"]",{"type":75,"value":5271}," — same on every platform. ",{"type":70,"tag":84,"props":5273,"children":5275},{"className":5274},[],[5276],{"type":75,"value":739},{"type":75,"value":5278}," is\n",{"type":70,"tag":104,"props":5280,"children":5281},{},[5282],{"type":75,"value":5283},"conditionally",{"type":75,"value":5285}," required (needed unless a windowless desktop-scope\ncall) and validated in code with a clear error, NOT pinned in the schema\n— so omitting ",{"type":70,"tag":84,"props":5287,"children":5289},{"className":5288},[],[5290],{"type":75,"value":739},{"type":75,"value":5292}," for a desktop-scope action is no longer\nschema-rejected.",{"type":70,"tag":78,"props":5294,"children":5295},{},[5296,5298,5304,5306,5312],{"type":75,"value":5297},"Genuinely platform-specific params stay OUT of the shared contract by\ndesign (launch-app identifiers, the Windows-only ",{"type":70,"tag":84,"props":5299,"children":5301},{"className":5300},[],[5302],{"type":75,"value":5303},"debug_window_info",{"type":75,"value":5305},", the\nmacOS-only status-only ",{"type":70,"tag":84,"props":5307,"children":5309},{"className":5308},[],[5310],{"type":75,"value":5311},"check_permissions.prompt",{"type":75,"value":5313},"). The per-OS files list the\nresiduals that matter when you drive on that platform.",{"type":70,"tag":92,"props":5315,"children":5317},{"id":5316},"pixel-coordinate-clicks",[5318],{"type":75,"value":5319},"Pixel-coordinate clicks",{"type":70,"tag":78,"props":5321,"children":5322},{},[5323,5325,5330,5332,5337,5339,5344,5346,5351,5353,5359],{"type":75,"value":5324},"The pixel path (",{"type":70,"tag":84,"props":5326,"children":5328},{"className":5327},[],[5329],{"type":75,"value":4389},{"type":75,"value":5331},") is for surfaces the\naccessibility tree doesn't reach — canvases, video players, WebGL,\ncustom-drawn controls. Coords are ",{"type":70,"tag":104,"props":5333,"children":5334},{},[5335],{"type":75,"value":5336},"window-local screenshot pixels",{"type":75,"value":5338},"\n(same space as the PNG ",{"type":70,"tag":84,"props":5340,"children":5342},{"className":5341},[],[5343],{"type":75,"value":2085},{"type":75,"value":5345}," returns). Top-left origin,\ny-down. The driver handles screen-point conversion internally.\nPassing ",{"type":70,"tag":84,"props":5347,"children":5349},{"className":5348},[],[5350],{"type":75,"value":747},{"type":75,"value":5352}," alongside ",{"type":70,"tag":84,"props":5354,"children":5356},{"className":5355},[],[5357],{"type":75,"value":5358},"x, y",{"type":75,"value":5360}," is optional but recommended —\nit pins the coordinate conversion to the window whose screenshot\nproduced the pixel.",{"type":70,"tag":78,"props":5362,"children":5363},{},[5364,5366,5371,5373,5378,5379,5385,5387,5392],{"type":75,"value":5365},"PNGs returned by ",{"type":70,"tag":84,"props":5367,"children":5369},{"className":5368},[],[5370],{"type":75,"value":2085},{"type":75,"value":5372}," are capped at ",{"type":70,"tag":104,"props":5374,"children":5375},{},[5376],{"type":75,"value":5377},"1568 px long-side\nby default",{"type":75,"value":4944},{"type":70,"tag":84,"props":5380,"children":5382},{"className":5381},[],[5383],{"type":75,"value":5384},"max_image_dimension",{"type":75,"value":5386}," config), matching Anthropic's\nmultimodal-vision downsampling limit. The image the model reasons\nover and the image the click tool's coordinate system lives in are\nthe ",{"type":70,"tag":104,"props":5388,"children":5389},{},[5390],{"type":75,"value":5391},"same resolution",{"type":75,"value":5393}," — just look at the PNG, pick a pixel, click\nat that pixel. No scaling math.",{"type":70,"tag":78,"props":5395,"children":5396},{},[5397,5399,5405],{"type":75,"value":5398},"This is the default because the mismatch between \"rendered\nthumbnail\" and \"native PNG\" was a recurring coord-estimation\nfootgun. If you opt out (explicit ",{"type":70,"tag":84,"props":5400,"children":5402},{"className":5401},[],[5403],{"type":75,"value":5404},"max_image_dimension=0",{"type":75,"value":5406}," for\npixel-perfect verification flows), the old rule applies: don't\neyeball coords from whatever your client renders — it may be\n2-4× smaller than the PNG on disk, and a 2% error in thumbnail\nspace becomes ~80 px in the real image.",{"type":70,"tag":78,"props":5408,"children":5409},{},[5410],{"type":75,"value":5411},"For precise targeting on small \u002F dense UIs:",{"type":70,"tag":254,"props":5413,"children":5414},{},[5415,5446,5451],{"type":70,"tag":116,"props":5416,"children":5417},{},[5418,5423,5425,5430,5431,5437,5439,5445],{"type":70,"tag":84,"props":5419,"children":5421},{"className":5420},[],[5422],{"type":75,"value":3577},{"type":75,"value":5424}," → image capped at 1568\nlong-side plus ",{"type":70,"tag":84,"props":5426,"children":5428},{"className":5427},[],[5429],{"type":75,"value":3759},{"type":75,"value":867},{"type":70,"tag":84,"props":5432,"children":5434},{"className":5433},[],[5435],{"type":75,"value":5436},"screenshot_height",{"type":75,"value":5438},". Write to\ndisk via ",{"type":70,"tag":84,"props":5440,"children":5442},{"className":5441},[],[5443],{"type":75,"value":5444},"--screenshot-out-file \u003Cpath>",{"type":75,"value":228},{"type":70,"tag":116,"props":5447,"children":5448},{},[5449],{"type":75,"value":5450},"Look at the PNG. Since it matches what you see, pick the target\npixel directly.",{"type":70,"tag":116,"props":5452,"children":5453},{},[5454,5456,5460],{"type":75,"value":5455},"When precision matters, draw a crosshair on the image (do\n",{"type":70,"tag":104,"props":5457,"children":5458},{},[5459],{"type":75,"value":5189},{"type":75,"value":5461}," crop — cropping loses the coordinate system) and verify\nbefore clicking:",{"type":70,"tag":671,"props":5463,"children":5467},{"className":5464,"code":5465,"language":5466,"meta":676,"style":676},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from PIL import Image, ImageDraw\nimg = Image.open('\u002Ftmp\u002Fshot.png')\ndraw = ImageDraw.Draw(img)\nx, y = \u003Cyour_coordinate>\nr = 18\ndraw.ellipse([x-r, y-r, x+r, y+r], outline='red', width=4)\ndraw.line([x-30, y, x+30, y], fill='red', width=3)\ndraw.line([x, y-30, x, y+30], fill='red', width=3)\nimg.save('\u002Ftmp\u002Fshot_annotated.png')\n","python",[5468],{"type":70,"tag":84,"props":5469,"children":5470},{"__ignoreMap":676},[5471,5479,5487,5495,5503,5511,5519,5527,5535],{"type":70,"tag":682,"props":5472,"children":5473},{"class":684,"line":685},[5474],{"type":70,"tag":682,"props":5475,"children":5476},{},[5477],{"type":75,"value":5478},"from PIL import Image, ImageDraw\n",{"type":70,"tag":682,"props":5480,"children":5481},{"class":684,"line":959},[5482],{"type":70,"tag":682,"props":5483,"children":5484},{},[5485],{"type":75,"value":5486},"img = Image.open('\u002Ftmp\u002Fshot.png')\n",{"type":70,"tag":682,"props":5488,"children":5489},{"class":684,"line":988},[5490],{"type":70,"tag":682,"props":5491,"children":5492},{},[5493],{"type":75,"value":5494},"draw = ImageDraw.Draw(img)\n",{"type":70,"tag":682,"props":5496,"children":5497},{"class":684,"line":997},[5498],{"type":70,"tag":682,"props":5499,"children":5500},{},[5501],{"type":75,"value":5502},"x, y = \u003Cyour_coordinate>\n",{"type":70,"tag":682,"props":5504,"children":5505},{"class":684,"line":1023},[5506],{"type":70,"tag":682,"props":5507,"children":5508},{},[5509],{"type":75,"value":5510},"r = 18\n",{"type":70,"tag":682,"props":5512,"children":5513},{"class":684,"line":1032},[5514],{"type":70,"tag":682,"props":5515,"children":5516},{},[5517],{"type":75,"value":5518},"draw.ellipse([x-r, y-r, x+r, y+r], outline='red', width=4)\n",{"type":70,"tag":682,"props":5520,"children":5521},{"class":684,"line":1058},[5522],{"type":70,"tag":682,"props":5523,"children":5524},{},[5525],{"type":75,"value":5526},"draw.line([x-30, y, x+30, y], fill='red', width=3)\n",{"type":70,"tag":682,"props":5528,"children":5529},{"class":684,"line":1084},[5530],{"type":70,"tag":682,"props":5531,"children":5532},{},[5533],{"type":75,"value":5534},"draw.line([x, y-30, x, y+30], fill='red', width=3)\n",{"type":70,"tag":682,"props":5536,"children":5538},{"class":684,"line":5537},9,[5539],{"type":70,"tag":682,"props":5540,"children":5541},{},[5542],{"type":75,"value":5543},"img.save('\u002Ftmp\u002Fshot_annotated.png')\n",{"type":70,"tag":254,"props":5545,"children":5546},{"start":997},[5547],{"type":70,"tag":116,"props":5548,"children":5549},{},[5550],{"type":75,"value":5551},"Only dispatch the click after the user (or your own re-read of\nthe annotated image) confirms the crosshair is on target.",{"type":70,"tag":78,"props":5553,"children":5554},{},[5555],{"type":75,"value":5556},"Addressing variants:",{"type":70,"tag":112,"props":5558,"children":5559},{},[5560,5570,5581,5599],{"type":70,"tag":116,"props":5561,"children":5562},{},[5563,5568],{"type":70,"tag":84,"props":5564,"children":5566},{"className":5565},[],[5567],{"type":75,"value":4389},{"type":75,"value":5569}," — single left-click.",{"type":70,"tag":116,"props":5571,"children":5572},{},[5573,5579],{"type":70,"tag":84,"props":5574,"children":5576},{"className":5575},[],[5577],{"type":75,"value":5578},"click({pid, x, y, count: 2})",{"type":75,"value":5580}," — double-click.",{"type":70,"tag":116,"props":5582,"children":5583},{},[5584,5590,5592,5598],{"type":70,"tag":84,"props":5585,"children":5587},{"className":5586},[],[5588],{"type":75,"value":5589},"click({pid, x, y, modifier: [\"cmd\"\\|\"ctrl\"]})",{"type":75,"value":5591}," — modifier click.\nAccepts any subset of ",{"type":70,"tag":84,"props":5593,"children":5595},{"className":5594},[],[5596],{"type":75,"value":5597},"cmd\u002Fshift\u002Foption\u002Falt\u002Fctrl",{"type":75,"value":228},{"type":70,"tag":116,"props":5600,"children":5601},{},[5602,5608,5610,5615],{"type":70,"tag":84,"props":5603,"children":5605},{"className":5604},[],[5606],{"type":75,"value":5607},"right_click({pid, x, y})",{"type":75,"value":5609}," — also takes ",{"type":70,"tag":84,"props":5611,"children":5613},{"className":5612},[],[5614],{"type":75,"value":4903},{"type":75,"value":228},{"type":70,"tag":78,"props":5617,"children":5618},{},[5619,5621,5627],{"type":75,"value":5620},"The pixel path animates the agent cursor overlay but never warps\nthe real cursor (the per-pid event paths the driver uses on macOS\nand Windows route around HID synthesis). If the pid has no on-screen\nwindow the call errors with ",{"type":70,"tag":84,"props":5622,"children":5624},{"className":5623},[],[5625],{"type":75,"value":5626},"pid X has no on-screen window",{"type":75,"value":5628}," — you\nneed a visible window to anchor the conversion. Dispatch details\n(SkyLight on macOS, layered UIA+PostMessage on Windows) are in the\nper-OS companion files.",{"type":70,"tag":92,"props":5630,"children":5632},{"id":5631},"web-rendered-apps-browsers-electron-tauri",[5633],{"type":75,"value":5634},"Web-rendered apps (browsers, Electron, Tauri)",{"type":70,"tag":78,"props":5636,"children":5637},{},[5638,5640,5648,5650,5655,5657,5663],{"type":75,"value":5639},"For Chromium-family browsers and Electron, use the exact, session-scoped\nbrowser capability workflow in ",{"type":70,"tag":104,"props":5641,"children":5642},{},[5643],{"type":70,"tag":84,"props":5644,"children":5646},{"className":5645},[],[5647],{"type":75,"value":207},{"type":75,"value":5649},". It keeps native\n",{"type":70,"tag":84,"props":5651,"children":5653},{"className":5652},[],[5654],{"type":75,"value":1113},{"type":75,"value":5656}," selection as the entry point, makes setup explicit through\n",{"type":70,"tag":84,"props":5658,"children":5660},{"className":5659},[],[5661],{"type":75,"value":5662},"browser_prepare",{"type":75,"value":5664},", and distinguishes trusted browser input from an explicitly\nrequested synthetic DOM event.",{"type":70,"tag":78,"props":5666,"children":5667},{},[5668,5670,5675,5677,5682],{"type":75,"value":5669},"Use the native ",{"type":70,"tag":84,"props":5671,"children":5673},{"className":5672},[],[5674],{"type":75,"value":2085},{"type":75,"value":5676}," and AX\u002FPX action ladder for browser chrome,\npermission prompts, downloads, file pickers, Safari, Firefox, Tauri, and any\nembedded webview for which exact browser binding is unavailable. The legacy\n",{"type":70,"tag":84,"props":5678,"children":5680},{"className":5679},[],[5681],{"type":75,"value":1738},{"type":75,"value":5683}," tool remains a compatibility surface; do not use it as the starting\npoint for new browser workflows.",{"type":70,"tag":92,"props":5685,"children":5687},{"id":5686},"verify-after-every-action-mandatory",[5688],{"type":75,"value":5689},"Verify after every action — mandatory",{"type":70,"tag":78,"props":5691,"children":5692},{},[5693,5698,5700,5706,5708,5713,5715,5720,5722,5727],{"type":70,"tag":104,"props":5694,"children":5695},{},[5696],{"type":75,"value":5697},"Always",{"type":75,"value":5699}," verify after an action. Prefer\n",{"type":70,"tag":84,"props":5701,"children":5703},{"className":5702},[],[5704],{"type":75,"value":5705},"verify_state({pid, window_id, expect})",{"type":75,"value":5707}," for structured state such as a\nwindow's existence\u002Fbounds or a semantic element's existence, value, enabled\nstate, or selected state. Use its bounded poll and stable-sample requirement\ninstead of hand-written sleeps. ",{"type":70,"tag":84,"props":5709,"children":5711},{"className":5710},[],[5712],{"type":75,"value":1482},{"type":75,"value":5714}," means the driver could not establish\nthe predicate; it is not success. Once a session has effective desktop scope,\nuse a fresh ",{"type":70,"tag":84,"props":5716,"children":5718},{"className":5717},[],[5719],{"type":75,"value":1377},{"type":75,"value":5721}," result instead—window-scoped\n",{"type":70,"tag":84,"props":5723,"children":5725},{"className":5724},[],[5726],{"type":75,"value":1385},{"type":75,"value":5728}," is denied by that capture policy.",{"type":70,"tag":78,"props":5730,"children":5731},{},[5732,5733,5738,5740,5745],{"type":75,"value":3886},{"type":70,"tag":84,"props":5734,"children":5736},{"className":5735},[],[5737],{"type":75,"value":1497},{"type":75,"value":5739}," when visual evidence is useful. The same result\nthen contains a fresh final window image. The driver still evaluates only the\nstructured predicates; the multimodal agent harness reads the pixels and\ndecides whether to stop, retry, or advance the ladder. For a postcondition not\nexpressible by the tool, explicitly take a fresh ",{"type":70,"tag":84,"props":5741,"children":5743},{"className":5742},[],[5744],{"type":75,"value":2085},{"type":75,"value":5746}," snapshot\nand have the harness judge its tree and image.",{"type":70,"tag":78,"props":5748,"children":5749},{},[5750,5752,5756,5758,5764,5766,5771,5772,5777,5779,5784,5786,5792,5794,5799,5801,5806,5808,5813,5815,5820],{"type":75,"value":5751},"Switch to an ",{"type":70,"tag":104,"props":5753,"children":5754},{},[5755],{"type":75,"value":2442},{"type":75,"value":5757}," only on a real signal: the action\nresponse carried ",{"type":70,"tag":84,"props":5759,"children":5761},{"className":5760},[],[5762],{"type":75,"value":5763},"effect:\"suspected_noop\"",{"type":75,"value":5765},", verification returned\n",{"type":70,"tag":84,"props":5767,"children":5769},{"className":5768},[],[5770],{"type":75,"value":1474},{"type":75,"value":141},{"type":70,"tag":84,"props":5773,"children":5775},{"className":5774},[],[5776],{"type":75,"value":1482},{"type":75,"value":5778},", the snapshot came back ",{"type":70,"tag":84,"props":5780,"children":5782},{"className":5781},[],[5783],{"type":75,"value":2955},{"type":75,"value":5785}," (empty tree →\nnon-AX surface), the tree looks unchanged\u002Funreadable or disagrees with the screenshot, or\n",{"type":70,"tag":84,"props":5787,"children":5789},{"className":5788},[],[5790],{"type":75,"value":5791},"escalation.target",{"type":75,"value":5793}," points you there (",{"type":70,"tag":84,"props":5795,"children":5797},{"className":5796},[],[5798],{"type":75,"value":1716},{"type":75,"value":5800},"). That's the\nverify-then-escalate ladder in the behavior-matrix section. If the tree\nis unchanged AND the screenshot confirms nothing moved, the action\nlikely failed silently — ",{"type":70,"tag":104,"props":5802,"children":5803},{},[5804],{"type":75,"value":5805},"tell the user what you attempted and what\nyou observed",{"type":75,"value":5807},", don't paper over with \"done\" language (and consider\n",{"type":70,"tag":84,"props":5809,"children":5811},{"className":5810},[],[5812],{"type":75,"value":414},{"type":75,"value":5814}," when ",{"type":70,"tag":84,"props":5816,"children":5818},{"className":5817},[],[5819],{"type":75,"value":5175},{"type":75,"value":5821},"). Agents that skip this step report success on\nsilently-dropped actions — the single most common failure mode.",{"type":70,"tag":92,"props":5823,"children":5825},{"id":5824},"recording-trajectories",[5826],{"type":75,"value":5827},"Recording trajectories",{"type":70,"tag":78,"props":5829,"children":5830},{},[5831,5833,5838,5840,5846,5847,5853,5855,5861,5863,5869],{"type":75,"value":5832},"Session-scoped action recording + replay, for demos, regressions,\nand training data. Only invoke when the user explicitly asks to\nrecord a session — the skill does not auto-enable this. CLI surface:\n",{"type":70,"tag":84,"props":5834,"children":5836},{"className":5835},[],[5837],{"type":75,"value":898},{"type":75,"value":5839},"; raw tools:\n",{"type":70,"tag":84,"props":5841,"children":5843},{"className":5842},[],[5844],{"type":75,"value":5845},"start_recording",{"type":75,"value":867},{"type":70,"tag":84,"props":5848,"children":5850},{"className":5849},[],[5851],{"type":75,"value":5852},"stop_recording",{"type":75,"value":5854},". Video capture (main display →\n",{"type":70,"tag":84,"props":5856,"children":5858},{"className":5857},[],[5859],{"type":75,"value":5860},"recording.mp4",{"type":75,"value":5862},") is on by default; pass ",{"type":70,"tag":84,"props":5864,"children":5866},{"className":5865},[],[5867],{"type":75,"value":5868},"record_video: false",{"type":75,"value":5870}," to opt out.",{"type":70,"tag":78,"props":5872,"children":5873},{},[5874,5876,5884,5886,5891],{"type":75,"value":5875},"See ",{"type":70,"tag":104,"props":5877,"children":5878},{},[5879],{"type":70,"tag":84,"props":5880,"children":5882},{"className":5881},[],[5883],{"type":75,"value":218},{"type":75,"value":5885}," for the full flow: enable\u002Fdisable, turn folder\ncontents, replay via ",{"type":70,"tag":84,"props":5887,"children":5889},{"className":5888},[],[5890],{"type":75,"value":226},{"type":75,"value":5892},", and the element_index\ndoesn't-survive-across-sessions caveat.",{"type":70,"tag":92,"props":5894,"children":5896},{"id":5895},"common-error-patterns-cross-platform",[5897],{"type":75,"value":5898},"Common error patterns (cross-platform)",{"type":70,"tag":2987,"props":5900,"children":5901},{},[5902,5923],{"type":70,"tag":2991,"props":5903,"children":5904},{},[5905],{"type":70,"tag":2995,"props":5906,"children":5907},{},[5908,5913,5918],{"type":70,"tag":2999,"props":5909,"children":5910},{},[5911],{"type":75,"value":5912},"Error text",{"type":70,"tag":2999,"props":5914,"children":5915},{},[5916],{"type":75,"value":5917},"Meaning",{"type":70,"tag":2999,"props":5919,"children":5920},{},[5921],{"type":75,"value":5922},"Fix",{"type":70,"tag":3033,"props":5924,"children":5925},{},[5926,5969,6019,6049,6083,6141],{"type":70,"tag":2995,"props":5927,"children":5928},{},[5929,5938,5957],{"type":70,"tag":3040,"props":5930,"children":5931},{},[5932],{"type":70,"tag":84,"props":5933,"children":5935},{"className":5934},[],[5936],{"type":75,"value":5937},"No cached AX state for pid X window_id W",{"type":70,"tag":3040,"props":5939,"children":5940},{},[5941,5943,5948,5950,5955],{"type":75,"value":5942},"You either skipped ",{"type":70,"tag":84,"props":5944,"children":5946},{"className":5945},[],[5947],{"type":75,"value":2085},{"type":75,"value":5949}," this turn, or passed a different ",{"type":70,"tag":84,"props":5951,"children":5953},{"className":5952},[],[5954],{"type":75,"value":747},{"type":75,"value":5956}," to the click than the one the snapshot cached against",{"type":70,"tag":3040,"props":5958,"children":5959},{},[5960,5961,5967],{"type":75,"value":3571},{"type":70,"tag":84,"props":5962,"children":5964},{"className":5963},[],[5965],{"type":75,"value":5966},"get_window_state({pid: X, window_id: W})",{"type":75,"value":5968}," first — the same window_id you intend to click in",{"type":70,"tag":2995,"props":5970,"children":5971},{},[5972,5988,5993],{"type":70,"tag":3040,"props":5973,"children":5974},{},[5975,5981,5982],{"type":70,"tag":84,"props":5976,"children":5978},{"className":5977},[],[5979],{"type":75,"value":5980},"snapshot_id_required",{"type":75,"value":867},{"type":70,"tag":84,"props":5983,"children":5985},{"className":5984},[],[5986],{"type":75,"value":5987},"stale_element_token",{"type":70,"tag":3040,"props":5989,"children":5990},{},[5991],{"type":75,"value":5992},"A bare index was supplied, or a newer snapshot superseded this target",{"type":70,"tag":3040,"props":5994,"children":5995},{},[5996,5998,6003,6005,6010,6012,6017],{"type":75,"value":5997},"Re-run ",{"type":70,"tag":84,"props":5999,"children":6001},{"className":6000},[],[6002],{"type":75,"value":2085},{"type":75,"value":6004},"; use the new ",{"type":70,"tag":84,"props":6006,"children":6008},{"className":6007},[],[6009],{"type":75,"value":2395},{"type":75,"value":6011},", or send its ",{"type":70,"tag":84,"props":6013,"children":6015},{"className":6014},[],[6016],{"type":75,"value":2410},{"type":75,"value":6018}," with the matching integer",{"type":70,"tag":2995,"props":6020,"children":6021},{},[6022,6031,6036],{"type":70,"tag":3040,"props":6023,"children":6024},{},[6025],{"type":70,"tag":84,"props":6026,"children":6028},{"className":6027},[],[6029],{"type":75,"value":6030},"window_id W belongs to pid P, not …",{"type":70,"tag":3040,"props":6032,"children":6033},{},[6034],{"type":75,"value":6035},"Passed a window_id that's owned by a different process",{"type":70,"tag":3040,"props":6037,"children":6038},{},[6039,6041,6047],{"type":75,"value":6040},"Use ",{"type":70,"tag":84,"props":6042,"children":6044},{"className":6043},[],[6045],{"type":75,"value":6046},"list_windows({pid: X})",{"type":75,"value":6048}," to enumerate this pid's own windows",{"type":70,"tag":2995,"props":6050,"children":6051},{},[6052,6061,6066],{"type":70,"tag":3040,"props":6053,"children":6054},{},[6055],{"type":70,"tag":84,"props":6056,"children":6058},{"className":6057},[],[6059],{"type":75,"value":6060},"ambiguous_window_target",{"type":70,"tag":3040,"props":6062,"children":6063},{},[6064],{"type":75,"value":6065},"A PID-only window action matched multiple eligible top-level windows",{"type":70,"tag":3040,"props":6067,"children":6068},{},[6069,6071,6076,6078],{"type":75,"value":6070},"Use the returned candidates or ",{"type":70,"tag":84,"props":6072,"children":6074},{"className":6073},[],[6075],{"type":75,"value":6046},{"type":75,"value":6077},", select the intended sibling, and retry with its explicit ",{"type":70,"tag":84,"props":6079,"children":6081},{"className":6080},[],[6082],{"type":75,"value":747},{"type":70,"tag":2995,"props":6084,"children":6085},{},[6086,6102,6107],{"type":70,"tag":3040,"props":6087,"children":6088},{},[6089,6095,6096],{"type":70,"tag":84,"props":6090,"children":6092},{"className":6091},[],[6093],{"type":75,"value":6094},"AX action … failed with code …",{"type":75,"value":867},{"type":70,"tag":84,"props":6097,"children":6099},{"className":6098},[],[6100],{"type":75,"value":6101},"UIA invoke failed",{"type":70,"tag":3040,"props":6103,"children":6104},{},[6105],{"type":75,"value":6106},"Element doesn't support the default action",{"type":70,"tag":3040,"props":6108,"children":6109},{},[6110,6112,6118,6119,6125,6126,6132,6133,6139],{"type":75,"value":6111},"Try ",{"type":70,"tag":84,"props":6113,"children":6115},{"className":6114},[],[6116],{"type":75,"value":6117},"show_menu",{"type":75,"value":301},{"type":70,"tag":84,"props":6120,"children":6122},{"className":6121},[],[6123],{"type":75,"value":6124},"confirm",{"type":75,"value":301},{"type":70,"tag":84,"props":6127,"children":6129},{"className":6128},[],[6130],{"type":75,"value":6131},"cancel",{"type":75,"value":301},{"type":70,"tag":84,"props":6134,"children":6136},{"className":6135},[],[6137],{"type":75,"value":6138},"pick",{"type":75,"value":6140},", or fall through to a pixel click on the element's center",{"type":70,"tag":2995,"props":6142,"children":6143},{},[6144,6153,6165],{"type":70,"tag":3040,"props":6145,"children":6146},{},[6147],{"type":70,"tag":84,"props":6148,"children":6150},{"className":6149},[],[6151],{"type":75,"value":6152},"The user doesn't want to proceed with this tool use. The tool use was rejected …",{"type":70,"tag":3040,"props":6154,"children":6155},{},[6156,6158,6163],{"type":75,"value":6157},"The harness uses this ",{"type":70,"tag":1304,"props":6159,"children":6160},{},[6161],{"type":75,"value":6162},"exact",{"type":75,"value":6164}," string for BOTH a permission-prompt denial AND a manual interrupt (Esc \u002F stop) of a running tool — they are indistinguishable from the tool result",{"type":70,"tag":3040,"props":6166,"children":6167},{},[6168],{"type":75,"value":6169},"Treat as \"tool canceled, no result, await the user.\" Do NOT paraphrase (\"you stopped me\") — quote the literal message and name the canceled tool + its args, so the user can tell what was in flight vs. what landed",{"type":70,"tag":78,"props":6171,"children":6172},{},[6173],{"type":75,"value":6174},"Platform-specific errors (TCC dialogs on macOS, Session 0 \u002F UAC\nprompts on Windows, AT-SPI bus issues on Linux) live in their\nrespective companion files.",{"type":70,"tag":92,"props":6176,"children":6178},{"id":6177},"things-to-avoid",[6179],{"type":75,"value":6180},"Things to avoid",{"type":70,"tag":112,"props":6182,"children":6183},{},[6184,6219,6282,6304,6313],{"type":70,"tag":116,"props":6185,"children":6186},{},[6187,6192,6194,6199,6201,6206,6207,6212,6213,6218],{"type":70,"tag":104,"props":6188,"children":6189},{},[6190],{"type":75,"value":6191},"Never",{"type":75,"value":6193}," reuse an element target across a re-snapshot of the same window.\nA new snapshot invalidates older tokens immediately. Bare ",{"type":70,"tag":84,"props":6195,"children":6197},{"className":6196},[],[6198],{"type":75,"value":1293},{"type":75,"value":6200},"\ninput is rejected; use ",{"type":70,"tag":84,"props":6202,"children":6204},{"className":6203},[],[6205],{"type":75,"value":2395},{"type":75,"value":757},{"type":70,"tag":84,"props":6208,"children":6210},{"className":6209},[],[6211],{"type":75,"value":1293},{"type":75,"value":2404},{"type":70,"tag":84,"props":6214,"children":6216},{"className":6215},[],[6217],{"type":75,"value":2410},{"type":75,"value":228},{"type":70,"tag":116,"props":6220,"children":6221},{},[6222,6227,6229,6234,6236,6240,6242,6246,6248,6253,6255,6260,6262,6267,6268,6273,6275,6280],{"type":70,"tag":104,"props":6223,"children":6224},{},[6225],{"type":75,"value":6226},"Don't conflate the two addressing modes.",{"type":75,"value":6228}," The tree gives you\n",{"type":70,"tag":84,"props":6230,"children":6232},{"className":6231},[],[6233],{"type":75,"value":1293},{"type":75,"value":6235}," handles; the screenshot (same call) gives you the\npixel frame. An ",{"type":70,"tag":104,"props":6237,"children":6238},{},[6239],{"type":75,"value":2387},{"type":75,"value":6241}," addresses by index, an\n",{"type":70,"tag":104,"props":6243,"children":6244},{},[6245],{"type":75,"value":2442},{"type":75,"value":6247}," by ",{"type":70,"tag":84,"props":6249,"children":6251},{"className":6250},[],[6252],{"type":75,"value":2501},{"type":75,"value":6254},". Default to ",{"type":70,"tag":84,"props":6256,"children":6258},{"className":6257},[],[6259],{"type":75,"value":1293},{"type":75,"value":6261}," and only\ndo a px action on a real signal (",{"type":70,"tag":84,"props":6263,"children":6265},{"className":6264},[],[6266],{"type":75,"value":1645},{"type":75,"value":867},{"type":70,"tag":84,"props":6269,"children":6271},{"className":6270},[],[6272],{"type":75,"value":2955},{"type":75,"value":6274}," \u002F\nrepeated labels \u002F tree-disagrees-with-pixels). Don't pass an\n",{"type":70,"tag":84,"props":6276,"children":6278},{"className":6277},[],[6279],{"type":75,"value":1293},{"type":75,"value":6281}," you read off the screenshot, and don't pixel-click a\ncoordinate you computed from the tree's (possibly lying) frame\nwithout checking it against the image.",{"type":70,"tag":116,"props":6283,"children":6284},{},[6285,6290,6291,6296,6298,6302],{"type":70,"tag":104,"props":6286,"children":6287},{},[6288],{"type":75,"value":6289},"Prefer accessibility actions over pixels.",{"type":75,"value":2097},{"type":70,"tag":84,"props":6292,"children":6294},{"className":6293},[],[6295],{"type":75,"value":4389},{"type":75,"value":6297},"\nworks for canvas \u002F WebView regions, but it lands blindly on raw\ncoordinates. Exhaust accessibility paths (menu bars, cmd-k palettes,\ntoolbar items, keyboard shortcuts) before dropping to coordinates.\n(The AX path does ",{"type":70,"tag":104,"props":6299,"children":6300},{},[6301],{"type":75,"value":5189},{"type":75,"value":6303}," skip the agent-cursor overlay — it seeds and\npulses the session cursor and draws a focus rect on the targeted\nelement; it just doesn't play a long glide on the very first action.\nSee \"Agent cursor overlay\" for the demo-recording caveat.)",{"type":70,"tag":116,"props":6305,"children":6306},{},[6307,6311],{"type":70,"tag":104,"props":6308,"children":6309},{},[6310],{"type":75,"value":6191},{"type":75,"value":6312}," drive destructive actions (delete files, close unsaved\ndocuments, send messages, submit forms) without explicit user\nintent for that specific destructive step.",{"type":70,"tag":116,"props":6314,"children":6315},{},[6316,6320],{"type":70,"tag":104,"props":6317,"children":6318},{},[6319],{"type":75,"value":6191},{"type":75,"value":6321}," launch apps autonomously; confirm with the user first\nunless their original request clearly implies the launch.",{"type":70,"tag":92,"props":6323,"children":6325},{"id":6324},"example-end-to-end-task",[6326],{"type":75,"value":6327},"Example end-to-end task",{"type":70,"tag":78,"props":6329,"children":6330},{},[6331,6336],{"type":70,"tag":104,"props":6332,"children":6333},{},[6334],{"type":75,"value":6335},"User:",{"type":75,"value":6337}," \"Open the Downloads folder in the system file manager.\"",{"type":70,"tag":254,"props":6339,"children":6340},{},[6341,6368,6378],{"type":70,"tag":116,"props":6342,"children":6343},{},[6344,6350,6352,6358,6360,6366],{"type":70,"tag":84,"props":6345,"children":6347},{"className":6346},[],[6348],{"type":75,"value":6349},"launch_app({bundle_id: \"com.apple.finder\", urls: [\"~\u002FDownloads\"]})",{"type":75,"value":6351},"\non macOS, or ",{"type":70,"tag":84,"props":6353,"children":6355},{"className":6354},[],[6356],{"type":75,"value":6357},"launch_app({name: \"explorer\", args: [\"%USERPROFILE%\\\\Downloads\"]})",{"type":75,"value":6359},"\non Windows. Returns ",{"type":70,"tag":84,"props":6361,"children":6363},{"className":6362},[],[6364],{"type":75,"value":6365},"{pid, windows: [{window_id, title, ...}]}",{"type":75,"value":6367},".\nIdempotent launch; the driver opens a hidden window via the\nplatform's launch primitive — zero activation, no focus steal.",{"type":70,"tag":116,"props":6369,"children":6370},{},[6371,6376],{"type":70,"tag":84,"props":6372,"children":6374},{"className":6373},[],[6375],{"type":75,"value":3577},{"type":75,"value":6377}," → verify the expected window\ntitle is present with a populated tree (sidebar, list view, files).",{"type":70,"tag":116,"props":6379,"children":6380},{},[6381],{"type":75,"value":6382},"Done.",{"type":70,"tag":78,"props":6384,"children":6385},{},[6386],{"type":75,"value":6387},"Platform-specific examples and edge cases (Finder menu navigation,\nExplorer ribbon, GNOME Files) live in the per-OS companion files.",{"type":70,"tag":6389,"props":6390,"children":6391},"style",{},[6392],{"type":75,"value":6393},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":6395,"total":6564},[6396,6409,6416,6432,6448,6462,6478,6492,6505,6519,6531,6546],{"slug":6397,"name":6397,"fn":6398,"description":6399,"org":6400,"tags":6401,"stars":26,"repoUrl":27,"updatedAt":6408},"batch","execute parallel batch operations on files","Execute batch operations on multiple files in parallel. Automatically discovers files, splits into chunks, and processes with parallel worker agents. Use `\u002Fbatch` followed by operation and file pattern.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6402,6405],{"name":6403,"slug":6404,"type":16},"Automation","automation",{"name":6406,"slug":6407,"type":16},"Concurrency","concurrency","2026-07-20T05:58:45.650067",{"slug":4,"name":4,"fn":5,"description":6,"org":6410,"tags":6411,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6412,6413,6414,6415],{"name":14,"slug":15,"type":16},{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16},{"slug":6417,"name":6417,"fn":6418,"description":6419,"org":6420,"tags":6421,"stars":26,"repoUrl":27,"updatedAt":6431},"dataviz","design and validate data visualizations","Design guidance for charts, graphs, dashboards, maps, and data visualizations, including a local palette validator.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6422,6425,6428],{"name":6423,"slug":6424,"type":16},"Charts","charts",{"name":6426,"slug":6427,"type":16},"Dashboards","dashboards",{"name":6429,"slug":6430,"type":16},"Data Visualization","data-visualization","2026-07-16T05:59:28.31755",{"slug":6433,"name":6433,"fn":6434,"description":6435,"org":6436,"tags":6437,"stars":26,"repoUrl":27,"updatedAt":6447},"extension-creator","create Qwen Code extensions","Create, scaffold, customize, validate, and locally test Qwen Code extensions. Use when the user wants a new Qwen Code extension, needs help choosing an extension template, wants to add QWEN.md context, commands, skills, agents, MCP servers, settings, hooks, channels, or LSP servers, or asks how to link and test an extension locally. Invoke with `\u002Fextension-creator` followed by an extension path and optional template name.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6438,6441,6444],{"name":6439,"slug":6440,"type":16},"Coding","coding",{"name":6442,"slug":6443,"type":16},"Documentation","documentation",{"name":6445,"slug":6446,"type":16},"Plugin Development","plugin-development","2026-07-16T05:59:24.818967",{"slug":6449,"name":6449,"fn":6450,"description":6451,"org":6452,"tags":6453,"stars":26,"repoUrl":27,"updatedAt":6461},"loop","run scheduled or self-paced prompt loops","Create a loop that runs a prompt now and follows up either on a fixed schedule or through self-paced wakeups. Usage - \u002Floop check the build, \u002Floop 5m check the build, \u002Floop check the PR every 30m. \u002Floop list to show jobs, \u002Floop clear to cancel all.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6454,6455,6458],{"name":6403,"slug":6404,"type":16},{"name":6456,"slug":6457,"type":16},"Productivity","productivity",{"name":6459,"slug":6460,"type":16},"Scheduling","scheduling","2026-07-16T05:59:25.50027",{"slug":6463,"name":6463,"fn":6464,"description":6465,"org":6466,"tags":6467,"stars":26,"repoUrl":27,"updatedAt":6477},"new-app","build new applications from scratch","Workflow for creating new applications from scratch. Covers requirements gathering, tech stack selection, scaffolding, implementation, and delivery of a functional prototype.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6468,6471,6474],{"name":6469,"slug":6470,"type":16},"Engineering","engineering",{"name":6472,"slug":6473,"type":16},"Prototyping","prototyping",{"name":6475,"slug":6476,"type":16},"Web Development","web-development","2026-07-16T05:59:25.157573",{"slug":6479,"name":6479,"fn":6480,"description":6481,"org":6482,"tags":6483,"stars":26,"repoUrl":27,"updatedAt":6491},"qc-helper","provide Qwen Code usage and configuration support","Answer any question about Qwen Code usage, features, configuration, and troubleshooting by referencing the official user documentation. Also helps users view or modify their settings.json. Invoke with `\u002Fqc-helper` followed by a question, e.g. `\u002Fqc-helper how do I configure MCP servers?` or `\u002Fqc-helper change approval mode to yolo`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6484,6487,6488],{"name":6485,"slug":6486,"type":16},"Configuration","configuration",{"name":6442,"slug":6443,"type":16},{"name":6489,"slug":6490,"type":16},"Reference","reference","2026-07-16T05:59:29.118413",{"slug":6493,"name":6493,"fn":6494,"description":6495,"org":6496,"tags":6497,"stars":26,"repoUrl":27,"updatedAt":6504},"review","review code for quality and security","Review changed code for correctness, security, code quality, and performance. Use when the user asks to review code changes, a PR, or specific files. Invoke with `\u002Freview`, `\u002Freview \u003Cpr-number>`, `\u002Freview \u003Cfile-path>`, `\u002Freview \u003Cpr-number> --comment` to post inline comments on the PR, or `\u002Freview --fix` to apply the findings to your working tree. Add `--effort low|medium|high` to trade depth for speed (defaults to high for PRs, medium for local changes).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6498,6501],{"name":6499,"slug":6500,"type":16},"Code Review","code-review",{"name":6502,"slug":6503,"type":16},"Security","security","2026-08-09T04:04:43.399497",{"slug":6506,"name":6506,"fn":6507,"description":6508,"org":6509,"tags":6510,"stars":26,"repoUrl":27,"updatedAt":6518},"simplify","clean up and simplify code changes","Review recent code changes for reuse, code quality, and efficiency, then directly apply straightforward cleanup improvements. Use when the user wants a post-implementation cleanup pass, pre-PR polish, or asks to simplify\u002Frefine recent changes. Invoke with `\u002Fsimplify` or `\u002Fsimplify \u003Cfocus>`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6511,6514,6515],{"name":6512,"slug":6513,"type":16},"Code Analysis","code-analysis",{"name":6469,"slug":6470,"type":16},{"name":6516,"slug":6517,"type":16},"Performance","performance","2026-07-20T05:58:46.653811",{"slug":6520,"name":6520,"fn":6521,"description":6522,"org":6523,"tags":6524,"stars":26,"repoUrl":27,"updatedAt":6530},"stuck","diagnose and debug stuck Qwen Code sessions","Diagnose frozen, stuck, or slow Qwen Code sessions on this machine. Scans for problematic processes, high CPU\u002Fmemory usage, hung subprocesses, and debug logs. Use \u002Fstuck or \u002Fstuck \u003CPID> to focus on a specific process.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6525,6528,6529],{"name":6526,"slug":6527,"type":16},"Debugging","debugging",{"name":6469,"slug":6470,"type":16},{"name":6516,"slug":6517,"type":16},"2026-07-16T05:59:25.838629",{"slug":6532,"name":6532,"fn":6533,"description":6534,"org":6535,"tags":6536,"stars":6543,"repoUrl":6544,"updatedAt":6545},"open-computer-use","configure Open Computer Use MCP server","Platform-neutral guidance for using Open Computer Use, the open-source Computer Use MCP server and CLI for macOS, Linux, and Windows. Use when an agent needs to install, verify, troubleshoot, configure, or operate Open Computer Use through its native CLI, stdio MCP server, or direct Computer Use tool calls.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6537,6538,6541,6542],{"name":6403,"slug":6404,"type":16},{"name":6539,"slug":6540,"type":16},"CLI","cli",{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16},176,"https:\u002F\u002Fgithub.com\u002FQwenLM\u002Fopen-computer-use","2026-07-16T05:59:22.010839",{"slug":6547,"name":6547,"fn":6548,"description":6549,"org":6550,"tags":6551,"stars":6561,"repoUrl":6562,"updatedAt":6563},"auto-pr","automate pull request submission and review","Automated PR submission assistant, including code review, documentation generation, and PR creation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6552,6553,6554,6555,6558],{"name":6403,"slug":6404,"type":16},{"name":6499,"slug":6500,"type":16},{"name":6442,"slug":6443,"type":16},{"name":6556,"slug":6557,"type":16},"GitHub","github",{"name":6559,"slug":6560,"type":16},"Pull Requests","pull-requests",136,"https:\u002F\u002Fgithub.com\u002FQwenLM\u002Fqwen-code-examples","2026-07-16T06:00:01.890524",26,{"items":6566,"total":6609},[6567,6572,6579,6585,6591,6597,6603],{"slug":6397,"name":6397,"fn":6398,"description":6399,"org":6568,"tags":6569,"stars":26,"repoUrl":27,"updatedAt":6408},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6570,6571],{"name":6403,"slug":6404,"type":16},{"name":6406,"slug":6407,"type":16},{"slug":4,"name":4,"fn":5,"description":6,"org":6573,"tags":6574,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6575,6576,6577,6578],{"name":14,"slug":15,"type":16},{"name":24,"slug":25,"type":16},{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16},{"slug":6417,"name":6417,"fn":6418,"description":6419,"org":6580,"tags":6581,"stars":26,"repoUrl":27,"updatedAt":6431},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6582,6583,6584],{"name":6423,"slug":6424,"type":16},{"name":6426,"slug":6427,"type":16},{"name":6429,"slug":6430,"type":16},{"slug":6433,"name":6433,"fn":6434,"description":6435,"org":6586,"tags":6587,"stars":26,"repoUrl":27,"updatedAt":6447},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6588,6589,6590],{"name":6439,"slug":6440,"type":16},{"name":6442,"slug":6443,"type":16},{"name":6445,"slug":6446,"type":16},{"slug":6449,"name":6449,"fn":6450,"description":6451,"org":6592,"tags":6593,"stars":26,"repoUrl":27,"updatedAt":6461},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6594,6595,6596],{"name":6403,"slug":6404,"type":16},{"name":6456,"slug":6457,"type":16},{"name":6459,"slug":6460,"type":16},{"slug":6463,"name":6463,"fn":6464,"description":6465,"org":6598,"tags":6599,"stars":26,"repoUrl":27,"updatedAt":6477},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6600,6601,6602],{"name":6469,"slug":6470,"type":16},{"name":6472,"slug":6473,"type":16},{"name":6475,"slug":6476,"type":16},{"slug":6479,"name":6479,"fn":6480,"description":6481,"org":6604,"tags":6605,"stars":26,"repoUrl":27,"updatedAt":6491},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6606,6607,6608],{"name":6485,"slug":6486,"type":16},{"name":6442,"slug":6443,"type":16},{"name":6489,"slug":6490,"type":16},10]