Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
db90915
fix(macos): see the surfaces of a background window and read a window…
lahfir Nov 16, 2026
d87a777
fix(macos): refuse a headless click on a button inside a popover, and…
lahfir Nov 16, 2026
9803d17
feat: wait until a surface of a kind is open
lahfir Nov 16, 2026
937f3e7
fix(windows): list an owned pop-up window as a popover and resolve re…
lahfir Nov 17, 2026
af30657
fix(linux): list a showing alert as an alert surface
lahfir Nov 17, 2026
9faa9fb
fix(macos): walk to the window before saying a button is outside a po…
lahfir Nov 17, 2026
6431580
fix: keep wait --surface polling through a retryable read failure
lahfir Nov 17, 2026
340c33a
fix: report a post-action surface read that failed
lahfir Nov 17, 2026
ca2c5e5
docs(macos): state the clipboard helper rules in the skill
lahfir Nov 17, 2026
b172f54
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
096a54a
fix(macos): search for a popover while the app shows a window AX does…
lahfir Nov 20, 2026
9afc26d
fix: match only the overlay kinds for wait --surface any
lahfir Nov 20, 2026
7edb505
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
2e92684
fix: stop calling the app busy when a surface wait saw no such surface
lahfir Nov 20, 2026
29f785e
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
0bf1ebd
fix(windows): snapshot a sheet that is not the foreground window
lahfir Nov 20, 2026
834b625
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
f8a7e20
perf(linux): refuse a surface kind no shell answers without probing t…
lahfir Nov 20, 2026
83a23e9
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
6232c2c
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
bfdd496
fix(linux): keep the no-bus answer when a surface kind is refused early
lahfir Nov 20, 2026
23dcb7f
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
2c666d0
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
b4ebb95
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
566a005
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
e03ac01
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
fee2e3c
fix(macos): name popover unread on a window whose popover search was cut
lahfir Nov 20, 2026
fa55785
fix(linux): list a modal alert as both an alert and a sheet
lahfir Nov 20, 2026
7b362dc
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 20, 2026
2e6602f
test(linux): expect a modal alert to list its alert and its sheet entry
lahfir Nov 20, 2026
c89e6de
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 21, 2026
31a0c8b
docs: name popover among the kinds a surface entry can leave unclassi…
lahfir Nov 21, 2026
f10c6bb
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 21, 2026
09325e2
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 23, 2026
36893b6
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 23, 2026
ead2c4c
fix(surfaces): report unread surfaces and keep stable surface identity
lahfir Nov 23, 2026
7544a38
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 23, 2026
8c1004e
fix(refs): read a saved surface ref at the window it recorded
lahfir Nov 24, 2026
63aee05
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 24, 2026
00c24d8
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 24, 2026
69ddd78
fix(windows): record the read surface on a window-rooted observation
lahfir Nov 25, 2026
f0bfdfb
fix(linux): locate the shell message list by structure alone
lahfir Nov 25, 2026
d7f9f7b
fix(macos): read a sheet control's window from its ancestors
lahfir Nov 25, 2026
8dfe927
docs: state what reaches a background app and the limits the dogfood …
lahfir Nov 25, 2026
9cbbd3d
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
4ed80ad
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
ac6b4bc
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
9deed39
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
b165988
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
ac5f9a6
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
a07eb82
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
329e10d
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
bcc07b2
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
f99b3e3
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
ae68075
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
b358414
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
b777d37
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
2ff9bbb
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
aac5309
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
8bb23e3
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 25, 2026
be74e4a
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 26, 2026
9770792
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 26, 2026
8144441
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
074c08b
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
a7b46ce
fix(macos): treat AXWindow ancestors with AXSubrole AXPopover as insi…
lahfir Nov 27, 2026
3fec384
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
1c4a50a
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
064af29
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
ae55dcc
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
de482fc
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
e161f53
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
43ce19d
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
22561e8
Merge branch 'laf/reliability-16-effect-witness' into laf/reliability…
lahfir Nov 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/content/docs/commands/app-window.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ agent-desktop close-app <APP> [--force]
- `INVALID_ARGS` for a protected system process, with or without `--force`.
- A save prompt keeps the app open. Read it with `snapshot --surface sheet`, answer it, then close again.
- On macOS a graceful close returns `ACTION_FAILED` with `details.cause: modal_pending` and names the prompt when an alert or sheet is open before the request (`not_delivered`, nothing sent) or when the request raises one (`delivered_unverified`). Answer the prompt, or use `--force`.
- On Linux a headless graceful close runs. Where the focused window cannot be read (a Wayland session, or a focused window whose owner cannot be identified), it fails with `POLICY_DENIED` (`details.kind: focus_unreadable`) before any close request is sent. Report it to the user, or use `--force` (it discards unsaved work). If the app answers with a save prompt, the command fails with `ACTION_FAILED` (`details.cause: dialog_pending`), the app stays open, and the focus goes back to the window that had it (`details.focus_returned: true`). With `--headed` the focus is left where the prompt put it. Answer the prompt, or use `--force` (it discards unsaved work).
- On Linux a headless graceful close runs. On a native Wayland client it returns `ACTION_NOT_SUPPORTED` (`details.cause: wayland_session`), because the compositor has no close request for another client's window. Where the focused window cannot be read, it fails with `POLICY_DENIED` (`details.kind: focus_unreadable`) before any close request is sent. Report it to the user, or use `--force` (it discards unsaved work). If the app answers with a save prompt, the command fails with `ACTION_FAILED` (`details.cause: dialog_pending`), the app stays open, and the focus goes back to the window that had it (`details.focus_returned: true`). With `--headed` the focus is left where the prompt put it. Answer the prompt, or use `--force` (it discards unsaved work).
On macOS a headless graceful close sends the quit request, and a save prompt opens in the app's own window behind the window in front. On Windows the close is posted to the app's windows, and if a window of the app takes the foreground, as a save prompt can, the command gives the foreground back to the window that had it. Linux checks focus first, as described above.
Expand Down
9 changes: 9 additions & 0 deletions apps/docs/content/docs/commands/batch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ agent-desktop batch '[{"command":"version"},{"command":"wait","args":{"ms":100}}
</tbody>
</table>

In Windows PowerShell 5.1 the double quotes inside the JSON argument are dropped, and `batch` fails with `INVALID_ARGS` ("key must be a string"). Escape each quote with a backslash. `batch` has no stdin or file input.

```powershell
$json = @'
[{"command":"version"},{"command":"wait","args":{"ms":100}}]
'@
agent-desktop batch ($json -replace '"','\"') --stop-on-error
```

### Entry format

<table>
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/content/docs/commands/interaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ printf '%s' 'hello' | agent-desktop type @s8f3k2p9:e2 --stdin

The action timeout starts after the input ends; it doesn't limit this wait. Empty input and all line breaks are kept, including a final newline. Use `printf '%s'` to avoid adding one. Input must be valid UTF-8 without NUL bytes (`\0`). The limits are 10,000 bytes for `type` and 128 KiB for `set-value`.

`--stdin` uses the bytes it receives, so a trailing newline becomes part of the text. `printf '%s'` sends none. PowerShell adds a line ending to a piped string; to send exact text on Windows, redirect a file in `cmd`: `cmd /c "agent-desktop set-value @s8f3k2p9:e2 --stdin < text.txt"`.

Provide either `--stdin` or a command-line value. To enter the text `--stdin`, put it after `--`: `agent-desktop type @s8f3k2p9:e2 -- --stdin`. Batch uses the JSON `text` or `value` field, which puts the text in process arguments. Run secret steps as separate `--stdin` commands.

`--stdin` keeps text out of process arguments and omits observed `value` fields from JSON results, including `post_state.value`. Other app text and screenshot artifacts aren't redacted.
Expand Down
75 changes: 73 additions & 2 deletions apps/docs/content/docs/commands/wait.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ agent-desktop wait --text TEXT [--count N] [--app NAME]
agent-desktop wait --menu [--app NAME]
agent-desktop wait --menu-closed [--app NAME]
agent-desktop wait --notification [--text TEXT] [--app NAME]
agent-desktop wait --surface KIND [--app NAME] [--timeout MS]
agent-desktop wait --event KIND [--app NAME] [--window TITLE] [--window-id ID]
```

Expand All @@ -34,9 +35,10 @@ agent-desktop wait --event KIND [--app NAME] [--window TITLE] [--window-id ID]
<tr><td><code>--count N</code></td><td>none</td><td>For <code>--text</code>: wait until exactly N nodes match.</td></tr>
<tr><td><code>--menu</code>, <code>--menu-closed</code></td><td>off</td><td>Wait until a menu surface is open, or dismissed.</td></tr>
<tr><td><code>--notification</code></td><td>off</td><td>Wait until a new notification arrives.</td></tr>
<tr><td><code>--surface KIND</code></td><td>none</td><td>Wait until a surface of this kind is open in the app: <code>popover</code>, <code>sheet</code>, <code>alert</code>, <code>menu</code>, or <code>any</code>. A surface that is already open matches at once.</td></tr>
<tr><td><code>--event KIND</code></td><td>none</td><td>Wait for a lifecycle signal: <code>window-opened</code>, <code>window-closed</code>, <code>app-launched</code>, <code>app-terminated</code>, <code>focus-changed</code>, <code>surface-appeared</code>, or <code>surface-dismissed</code>.</td></tr>
<tr><td><code>--window-id ID</code></td><td>none</td><td>Narrow <code>window-opened</code>, <code>window-closed</code>, or <code>focus-changed</code> to one window.</td></tr>
<tr><td><code>--app NAME</code></td><td>none</td><td>Scope a window, text, menu, notification, or event wait to one application. Element and time waits ignore it.</td></tr>
<tr><td><code>--app NAME</code></td><td>none</td><td>Scope a window, text, menu, notification, surface, or event wait to one application. Element and time waits ignore it. A surface wait resolves the application once, at the start; without it the uniquely focused window's application is used, and a missing or ambiguous one is <code>APP_NOT_FOUND</code> or <code>AMBIGUOUS_TARGET</code>.</td></tr>
<tr><td><code>--timeout MS</code></td><td><code>30000</code></td><td>Timeout for every mode except <code>MS</code>, at most 86400000.</td></tr>
</tbody>
</table>
Expand Down Expand Up @@ -74,7 +76,7 @@ agent-desktop wait --element @s2txcl95uvubmn:e6 --predicate value --value 7 --ti

### Window

`--window TITLE` waits for any window whose title contains `TITLE`, focused or not.
`--window TITLE` waits for any window whose title contains `TITLE`, focused or not. When you do not know the title, wait for the event instead: `wait --event window-opened --app NAME`, in the same [batch](/desktop/commands/batch) as the action that opens the window. `--app` alone is not a wait mode.

```bash
agent-desktop wait --window Calculator --app gnome-calculator --timeout 3000
Expand Down Expand Up @@ -105,6 +107,75 @@ agent-desktop wait --text Calculator --app gnome-calculator --timeout 3000

`--menu` waits until a menu surface is open, and `--menu-closed` until it is gone. Both return `{ "elapsed_ms", "found": true }`. On Linux, `--menu-closed` on a menu that never opened is true at once, so wait for `--menu` first.

### Surface

`--surface KIND` polls the app's surface inventory until a surface of that kind is open: `popover`, `sheet`, `alert`, `menu`, or `any`. It waits for a state, not a change, so a surface that is already open matches immediately. Run it after the click that opens the surface:

```bash
agent-desktop wait --surface sheet --app gedit --timeout 2000
```

```json
{
"version": "2.7",
"ok": true,
"command": "wait",
"data": {
"elapsed_ms": 87,
"found": true,
"surface": {
"id": "w-1.167-org-a11y-atspi-accessible-44",
"title": "Save As",
"type": "sheet"
}
}
}
```

The result is `{ "elapsed_ms", "found": true, "surface": SURFACE }`, where `SURFACE` has the fields `list-surfaces` returns.

A kind the app's inventory could not read is never reported as one the app does not show. When the last inventory named the kind as unclassified, the timeout says the surface could not be read, sets `details.unread: true`, and lists what it did read in `last_observed`:

```bash
agent-desktop wait --surface menu --app gedit --timeout 2000
```

```json
{
"version": "2.7",
"ok": false,
"command": "wait",
"error": {
"code": "TIMEOUT",
"message": "The menu surface could not be read within 2000ms",
"recovery": {
"strategy": "inspect_state_then_retry_original",
"retryable": true,
"requires_fresh_snapshot": true,
"retry_after_ms": 250
},
"details": {
"kind": "wait_timeout",
"last_observed": [
{
"id": "w-1.167-org-a11y-atspi-accessible-12",
"title": "Untitled Document 1 - gedit",
"type": "window",
"unclassified": ["menu"]
}
],
"predicate": "surface",
"surface": "menu",
"timeout_ms": 2000,
"unread": true
},
"disposition": { "delivery": "not_delivered", "retry": "safe" }
}
}
```

A read of every window that shows no such surface is an observed absence: its timeout reads `No popover surface was open within 2000ms` and carries no `unread`.

### Notification

`--notification` takes a baseline of the notification list when it starts and returns the first notification not in it. `--text` and `--app` filter which notifications count. The result is `{ "condition": "notification", "matched": true, "notification": {...}, "elapsed_ms" }`. Headless limits on macOS and Windows are on the [notification commands](/desktop/commands/notifications) page.
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/guides/traces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ agent-desktop --trace /tmp/run.jsonl find --app gnome-calculator --role button -
jq -c 'select(.event == "command.end")' /tmp/run.jsonl
```

The file is created private. While `--trace` is set, the session's trace directory receives nothing. A trace write failure does not fail the command unless you add `--trace-strict`.
The file must be private: a regular file you own with one link. On Windows its folder must also exist and be private (only you, SYSTEM and Administrators); a folder that grants `Users` write is refused with `INVALID_ARGS`, so use a new folder under your profile. The file is created private. While `--trace` is set, the session's trace directory receives nothing. A trace write failure does not fail the command unless you add `--trace-strict`.

## Capture screenshots with a session

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/json-output.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ A snapshot that runs out of budget still returns `ok: true`, with `"complete": f

## Action results and disposition

A ref action such as `click`, `type`, or `toggle` returns `data.action` and `data.disposition`, and can add `steps` (each mechanism tried), `post_state`, `surfaces` (surfaces open once the action settled), and `details`. `disposition` has two fields, `delivery` and `retry`; on success, `delivery` is `delivered_verified`, `delivered_unverified`, or `not_delivered` (already satisfied). What each value proves, and when a retry is safe, is in [Errors and recovery](/desktop/errors-and-recovery#disposition).
A ref action such as `click`, `type`, or `toggle` returns `data.action` and `data.disposition`, and can add `steps` (each mechanism tried), `post_state`, `surfaces` (surfaces open once the action settled), and `details`. When the read of `surfaces` fails, `details.surfaces` is `"not_read"`: an absent `surfaces` then does not mean that no overlay opened. `disposition` has two fields, `delivery` and `retry`; on success, `delivery` is `delivered_verified`, `delivered_unverified`, or `not_delivered` (already satisfied). What each value proves, and when a retry is safe, is in [Errors and recovery](/desktop/errors-and-recovery#disposition).

### Post-action observation

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/platforms/linux.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Ref actions are semantic AT-SPI calls that never move the pointer or change the
<tr><td>Pointer gestures</td><td></td><td><code>double-click</code>, <code>triple-click</code>, <code>hover</code>, <code>drag</code>, <code>mouse-click</code>, <code>mouse-move</code>, X11 only</td><td>Wayland: <code>ACTION_NOT_SUPPORTED</code>, cause <code>wayland_session</code></td></tr>
<tr><td>Keyboard</td><td>Scoped <code>press</code> (<code>--app</code> or <code>--window-id</code>) on X11 and Mutter Wayland. A scoped headless <code>press</code> needs the target window already active</td><td>Unscoped <code>press</code>; a scoped <code>press</code> to a background app (X11)</td><td>Blocked combos such as <code>alt+f4</code> without <code>--force</code></td></tr>
<tr><td>Held input</td><td></td><td></td><td><code>key-down</code>, <code>key-up</code>, <code>mouse-down</code>, <code>mouse-up</code></td></tr>
<tr><td>App and window</td><td><code>launch</code>, <code>list-apps</code>, <code>list-windows</code> on X11 and Wayland; window control and <code>close-app --force</code> on X11</td><td><code>focus-window</code> on X11; a graceful <code>close-app</code> of an app with unsaved work: the save prompt keeps the app open and is reported as <code>dialog_pending</code></td><td><code>focus-window</code> and window control on Wayland: <code>ACTION_NOT_SUPPORTED</code>. A headless graceful <code>close-app</code> that cannot read the focused window (a Wayland session, or an owner it cannot identify) returns <code>POLICY_DENIED</code> with <code>details.kind: focus_unreadable</code> before any close request is sent.</td></tr>
<tr><td>App and window</td><td><code>launch</code>, <code>list-apps</code>, <code>list-windows</code> on X11 and Wayland; window control and <code>close-app --force</code> on X11</td><td><code>focus-window</code> on X11; a graceful <code>close-app</code> of an app with unsaved work: the save prompt keeps the app open and is reported as <code>dialog_pending</code></td><td><code>focus-window</code> and window control on Wayland: <code>ACTION_NOT_SUPPORTED</code>. A headless graceful <code>close-app</code> of a native Wayland client returns <code>ACTION_NOT_SUPPORTED</code> with <code>details.cause: wayland_session</code>. One that cannot read the focused window returns <code>POLICY_DENIED</code> with <code>details.kind: focus_unreadable</code> before any close request is sent.</td></tr>
<tr><td>Capture</td><td><code>screenshot</code>, <code>list-displays</code></td><td></td><td>X11 under a compositing window manager (GNOME): display and <code>--screen</code> captures return <code>PLATFORM_NOT_SUPPORTED</code> (<code>details.reason: "compositing"</code>); capture one window instead. Wayland: portal consent on first use, and window targets are <code>PLATFORM_NOT_SUPPORTED</code></td></tr>
<tr><td>Clipboard</td><td><code>clipboard-get</code> (text, images, file lists)</td><td><code>clipboard-set</code>, <code>clipboard-clear</code> (text, images, file lists)</td><td>Missing helper or <code>wl-clipboard</code>: <code>PLATFORM_NOT_SUPPORTED</code></td></tr>
<tr><td>Wait</td><td>All modes; <code>--notification</code> on GNOME</td><td></td><td></td></tr>
Expand All @@ -91,7 +91,7 @@ Ref actions are semantic AT-SPI calls that never move the pointer or change the

## Surfaces

`supported_surfaces` lists `window`, `sheet`, `alert`, and `menu`, plus GNOME Shell kinds the session can resolve. After an opener, read `data.surfaces`. A GTK popover appears asynchronously, so if it is absent, run `wait --menu` before you assume the opener failed. A list-backed GTK4 dropdown is part of the window tree, not a menu surface. See [Surfaces](/desktop/surfaces).
`supported_surfaces` lists `window`, `sheet`, `alert`, and `menu`, plus GNOME Shell kinds the session can resolve. After an opener, read `data.surfaces`. A GTK popover appears asynchronously, so if it is absent, run `wait --menu` before you assume the opener failed. A list-backed GTK4 dropdown is part of the window tree, not a menu surface. A GTK4 list or grid view exposes its items without row nodes, so `select` and `click` cannot pick a row. See [Surfaces](/desktop/surfaces).

## Chromium, Qt, and Electron

Expand Down
3 changes: 2 additions & 1 deletion apps/docs/content/docs/platforms/macos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ A text field that shows a file's name, such as a Finder name cell, does not rena
<tr><td>Capture</td><td><code>screenshot</code>, with Screen Recording permission</td><td></td><td></td></tr>
<tr><td>Ref actions</td><td><code>click</code>, <code>type</code>, <code>clear</code>, <code>scroll</code>, <code>expand</code>, <code>collapse</code>, <code>set-value</code>, <code>select</code> on a list, table, outline or editable combo box, <code>toggle</code>, <code>check</code>, <code>uncheck</code>, <code>scroll-to</code>, <code>focus</code></td><td><code>right-click</code>, <code>select</code> through a menu, <code>click</code> or <code>expand</code> on a pop-up button, menu button or combo box, <code>click</code>, <code>toggle</code>, <code>check</code> or <code>uncheck</code> on a label that ends in <code>…</code> or <code>...</code></td><td>Headless: <code>POLICY_DENIED</code></td></tr>
<tr><td>Multi-click and pointer</td><td><code>double-click</code> when the element offers <code>AXOpen</code></td><td><code>double-click</code>, <code>triple-click</code>, <code>hover</code>, <code>drag</code>, <code>mouse-move</code>, <code>mouse-click</code>, <code>mouse-wheel</code></td><td>Headless: <code>POLICY_DENIED</code></td></tr>
<tr><td>Keyboard</td><td>Scoped <code>press</code> (<code>--app</code> or <code>--window-id</code>), always physical keyboard input; it never runs a menu item, so <code>click</code> the item instead</td><td>Unscoped <code>press</code></td><td>Quit shortcuts such as <code>cmd+q</code>: <code>POLICY_DENIED</code> without <code>--force</code></td></tr>
<tr><td>Keyboard</td><td>Scoped <code>press</code> (<code>--app</code> or <code>--window-id</code>), headless, <code>return</code> and <code>escape</code> run as accessibility actions on the focused element and every other key needs a focused element in the app (<code>ACTION_FAILED</code>, <code>details.check: process_focus</code>, <code>not_delivered</code> otherwise); a headless shortcut with a modifier never runs a menu item, so <code>click</code> the item instead</td><td>Unscoped <code>press</code></td><td>Quit shortcuts such as <code>cmd+q</code>: <code>POLICY_DENIED</code> without <code>--force</code></td></tr>
<tr><td>Held input</td><td></td><td></td><td><code>key-down</code>, <code>key-up</code>, <code>mouse-down</code>, <code>mouse-up</code></td></tr>
<tr><td>App and window</td><td><code>launch</code>, <code>close-app</code>, <code>list-apps</code>, <code>list-windows</code>, <code>resize-window</code>, <code>move-window</code>, <code>minimize</code>, <code>maximize</code>, <code>restore</code></td><td><code>focus-window</code></td><td></td></tr>
<tr><td>Clipboard</td><td><code>clipboard-get</code></td><td><code>clipboard-set</code> (read back: <code>delivered_verified</code>), <code>clipboard-clear</code></td><td></td></tr>
Expand All @@ -76,6 +76,7 @@ Judge delivery by observation. AX return codes do not prove an effect: an app ca
- The primary modifier is `cmd`: `press cmd+c --app "TextEdit"`. Punctuation keys work as the symbol or by name (`comma`, `period`, `slash`).
- `cmd+q`, `cmd+shift+q`, `cmd+alt+esc`, `ctrl+cmd+q`, and `cmd+shift+delete` return `POLICY_DENIED` unless you pass `--force`. To quit an app, use `close-app`.
- `press cmd+s --app "TextEdit"` sends the chord only when that app is frontmost. For a background app it returns `ACTION_FAILED` (`check: process_focus`) and sends nothing.
- A Save panel's name field takes a file name, never a path, and macOS shows a `/` typed there as `:`. Choose the folder with the panel's Where pop-up, which opens a menu and so needs `--headed`. Confirm the file on disk afterwards.
- When agent-desktop opens Notification Center, it closes it afterward and restores the previous focus. Pass `--expected-app` and `--expected-title` on a single dismiss or action, because the stack shifts. Use `wait --notification --app "App"` for banners that vanish before you can list them.

## Chromium and Electron
Expand Down
Loading
Loading