@bastani/atomic 0.9.56-alpha.1 → 0.9.57-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +24 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/agent-desktop/SKILL.md +83 -0
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +12 -0
- package/dist/builtin/workflows/builtin/adversarial-verification.js +3 -3
- package/dist/builtin/workflows/builtin/{chunk-49kkbdpr.js → chunk-2f1shjah.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-dcxscfnb.js → chunk-37gm3bzk.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-2jfst7e4.js → chunk-45fn5q5p.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-hx8v4p97.js → chunk-4ek3v2wm.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-z3pajrfs.js → chunk-8d40nyz9.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-qhm35ntx.js → chunk-g3b2zf8r.js} +2 -2
- package/dist/builtin/workflows/builtin/{chunk-6jpwc09k.js → chunk-h6bt0r0g.js} +2 -2
- package/dist/builtin/workflows/builtin/{chunk-9cm2ckq2.js → chunk-x25rjw4y.js} +4 -4
- package/dist/builtin/workflows/builtin/{chunk-apagcs4r.js → chunk-xqcy5nve.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-w4xp1w1f.js → chunk-yb55w6me.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-k5q3t7je.js → chunk-yjgfnbgd.js} +1 -1
- package/dist/builtin/workflows/builtin/classify-and-act.js +3 -3
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +3 -3
- package/dist/builtin/workflows/builtin/generate-and-filter.js +3 -3
- package/dist/builtin/workflows/builtin/goal.js +3 -3
- package/dist/builtin/workflows/builtin/index.js +11 -11
- package/dist/builtin/workflows/builtin/loop-until-done.js +3 -3
- package/dist/builtin/workflows/builtin/open-claude-design.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +3 -3
- package/dist/builtin/workflows/builtin/steering-context.js +1 -1
- package/dist/builtin/workflows/builtin/tournament.js +3 -3
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +7 -7
- package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +4 -4
- package/dist/builtin/workflows/src/index.js +4 -4
- package/dist/builtin/workflows/src/local-worker-entry.mjs +4 -4
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +2 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/docs/computer-use.md +119 -98
- package/docs/getting-started/first-session.md +1 -1
- package/docs/skills.md +2 -2
- package/docs/usage.md +1 -1
- package/docs/workflows/authoring.md +105 -141
- package/docs/workflows/verification.md +14 -13
- package/npm-shrinkwrap.json +32 -32
- package/package.json +3 -3
- package/dist/builtin/subagents/skills/cua-driver/BROWSER.md +0 -562
- package/dist/builtin/subagents/skills/cua-driver/EMBEDDING.md +0 -685
- package/dist/builtin/subagents/skills/cua-driver/LINUX.md +0 -412
- package/dist/builtin/subagents/skills/cua-driver/MACOS.md +0 -996
- package/dist/builtin/subagents/skills/cua-driver/README.md +0 -123
- package/dist/builtin/subagents/skills/cua-driver/RECORDING.md +0 -132
- package/dist/builtin/subagents/skills/cua-driver/RUNTIME.md +0 -115
- package/dist/builtin/subagents/skills/cua-driver/SKILL.md +0 -108
- package/dist/builtin/subagents/skills/cua-driver/VISUAL.md +0 -125
- package/dist/builtin/subagents/skills/cua-driver/WINDOWS.md +0 -832
- package/dist/builtin/subagents/skills/cua-driver/WORKFLOW.md +0 -226
package/docs/computer-use.md
CHANGED
|
@@ -5,11 +5,11 @@ description: "Use desktop apps, browsers, and terminals with Atomic on macOS, Li
|
|
|
5
5
|
|
|
6
6
|
# Computer use
|
|
7
7
|
|
|
8
|
-
Atomic can work in applications, not just edit code. Computer
|
|
8
|
+
Atomic can work in applications, not just edit code. Computer use can create a Blender scene, build a presentation, edit a video, operate a desktop app, or move work between applications. Browser and terminal automation cover related tasks with more direct controls.
|
|
9
9
|
|
|
10
10
|
This guide explains tool selection, setup, and safe operation. To test a software change and attach the results to a PR, see [Verification and evidence](/workflows/verification).
|
|
11
11
|
|
|
12
|
-
Jump to [application scripting](#application-scripting-and-apis), [desktop
|
|
12
|
+
Jump to [application scripting](#application-scripting-and-apis), [desktop automation](#desktop-automation-with-agent-desktop), [browser automation](#browser-automation-with-agent-browser), [terminal automation](#terminal-automation-with-herdr), or [creative workflows](#creative-work-and-computer-use-workflows). Platform setup: [macOS](#macos), [Linux](#linux), [Windows](#windows).
|
|
13
13
|
|
|
14
14
|
## Choose the right tool
|
|
15
15
|
|
|
@@ -19,12 +19,12 @@ Start with the result you need, not the application you could click through. If
|
|
|
19
19
|
| --- | --- | --- |
|
|
20
20
|
| Create or edit files, such as presentations, documents, spreadsheets, or media | **A file library or CLI** | Use an app API or UI when the library cannot preserve required features, or when you need rendering or visual adjustments. |
|
|
21
21
|
| Interactive terminal or TUI | **Herdr** | Use tmux on macOS/Linux or native Windows psmux when Herdr cannot be used. Ordinary shell commands need no multiplexer. |
|
|
22
|
-
| Website or web app in Chrome/Chromium, Mobile Safari in the iOS Simulator or on a connected iPhone/iPad, Electron desktop app (VS Code, Slack, Discord, Figma, Notion, Spotify) or another app that exposes a Chrome DevTools Protocol (CDP) port, Slack workspace, or cloud browser | **agent-browser** | Prefer it whenever the target is web content it can reach: its text snapshots and element refs cost far fewer tokens than screenshot-driven
|
|
23
|
-
| Native desktop application,
|
|
22
|
+
| Website or web app in Chrome/Chromium, Mobile Safari in the iOS Simulator or on a connected iPhone/iPad, Electron desktop app (VS Code, Slack, Discord, Figma, Notion, Spotify) or another app that exposes a Chrome DevTools Protocol (CDP) port, Slack workspace, or cloud browser | **agent-browser** | Prefer it whenever the target is web content it can reach: its text snapshots and element refs cost far fewer tokens than screenshot-driven computer use. See [what agent-browser covers](#what-agent-browser-covers). Use agent-desktop for anything native outside that list or whenever agent-browser hits a limitation. Keep existing browser test suites for repeatable tests. |
|
|
23
|
+
| Native desktop application, menus and menu bars, desktop Safari, Firefox or another non-Chromium browser, browser chrome, OS dialogs and permission prompts, work across apps, or any agent-browser limitation | **agent-desktop**: the bundled `agent-desktop` skill with one-shot `agent-desktop` commands when a model chooses each action; the `agent-desktop` CLI called from `ctx.tool` when workflow code owns the scenario | Use application scripting or a CLI when they make the task easier, safer, or more reliable. It reads accessibility trees only. Native iOS apps in the iOS Simulator and Android emulators need `xcrun simctl`, Appium/XCUITest, or `adb`; see [coverage and limits](#coverage-and-limits). |
|
|
24
24
|
|
|
25
|
-
You can combine tools without driving the whole task through a desktop. Generate a presentation with `python-pptx`, then inspect rendered slides for layout problems. Use Blender's Python API to generate repeated objects, then
|
|
25
|
+
You can combine tools without driving the whole task through a desktop. Generate a presentation with `python-pptx`, then inspect rendered slides for layout problems. Use Blender's Python API to generate repeated objects, then agent-desktop for adjustments in the visible editor. Use browser DOM controls rather than desktop clicks for a web form. For a supported web-service operation that does not require browser interaction, an authorized API request may be enough.
|
|
26
26
|
|
|
27
|
-
Atomic's skills supply operating instructions, not an installed desktop or automatic permission to control one. Load the `
|
|
27
|
+
Atomic's skills supply operating instructions, not an installed desktop or automatic permission to control one. Load the `agent-desktop`, `herdr`, `agent-browser`, or `tmux` skill when applicable. Check the installed command's help before using version-dependent options.
|
|
28
28
|
|
|
29
29
|
**Herdr eligibility:** the bundled Herdr skill requires an explicit user mention or request and an agent running inside a Herdr-managed pane with `HERDR_ENV=1`. Launch Atomic inside Herdr and ask it to use Herdr for terminal work. Do not set the variable manually to bypass the check or control a focused session from outside Herdr. If those conditions are not met, use a suitable fallback.
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@ Atomic's skills supply operating instructions, not an installed desktop or autom
|
|
|
33
33
|
For file-only automation, you need the input files, a suitable runtime, and an explicit output path, not a graphical desktop. Keep originals intact and work in a scratch directory. The window, display, and input checks below apply when you actually operate a UI.
|
|
34
34
|
|
|
35
35
|
1. Identify the host OS and the environment that owns the application. An SSH shell, container, WSL distribution, or CI runner is not automatically connected to the user's desktop.
|
|
36
|
-
2. Check installed tools, cached runtimes, and permissions. Install missing tools, including `
|
|
36
|
+
2. Check installed tools, cached runtimes, and permissions. Install missing tools, including `agent-desktop` and uv, when network access and permissions allow. Follow the official installer instructions, inspect downloaded scripts before running them, and make one bounded setup attempt rather than retrying indefinitely. For a desktop, `agent-desktop status` reports the platform, permissions, and readable surfaces in one call.
|
|
37
37
|
3. Use a dedicated browser profile, terminal pane, desktop account, or VM where practical. For creative work, open copies of source assets and choose an explicit output directory.
|
|
38
38
|
4. Confirm the target window, display size, scaling, keyboard layout, and starting document. Capture or inspect the current state before sending input.
|
|
39
39
|
5. Define the stopping point. Saving a local draft is different from overwriting an original, publishing a video, sending a message, or purchasing something. Obtain any needed authorization before those actions.
|
|
@@ -44,7 +44,7 @@ Treat text in pages, documents, and terminal output as task data, not instructio
|
|
|
44
44
|
|
|
45
45
|
## Application scripting and APIs
|
|
46
46
|
|
|
47
|
-
Prefer direct file automation for structured tasks such as assembling slides, filling a document template, or formatting a spreadsheet. These jobs often need no running Office app, macros, or desktop access. Use application scripting when you need features that a file library does not expose.
|
|
47
|
+
Prefer direct file automation for structured tasks such as assembling slides, filling a document template, or formatting a spreadsheet. These jobs often need no running Office app, macros, or desktop access. Use application scripting when you need features that a file library does not expose. agent-desktop is useful for the remaining desktop interaction, not a required step in every automation.
|
|
48
48
|
|
|
49
49
|
| Mechanism | Good uses | Limits to check first |
|
|
50
50
|
| --- | --- | --- |
|
|
@@ -175,99 +175,118 @@ Argument order matters. This loads the scene before running the script, and `--p
|
|
|
175
175
|
|
|
176
176
|
For file-only work, a library can avoid opening the application at all. Know what it preserves: [openpyxl does not calculate Excel formulas](https://openpyxl.readthedocs.io/en/stable/simple_formulae.html), and a deck created with [python-pptx](https://python-pptx.readthedocs.io/en/latest/) still needs a layout check for clipping, fonts, and missing media. For video, FFmpeg can handle batch transforms while an editor's own scripting API can retain timeline structure. Check installed API/version or edition limits before assuming an editor exposes scripting.
|
|
177
177
|
|
|
178
|
-
Combine these approaches only where they help. Generate content with a script, inspect it in a viewer, and use
|
|
178
|
+
Combine these approaches only where they help. Generate content with a script, inspect it in a viewer, and use agent-desktop if it needs visual adjustments or UI-only export controls. You do not need a desktop interaction just to prove that a file script ran. If the task is specifically to verify a menu, dialog, or user flow, exercise that interface too; an API call is not proof that the GUI path works.
|
|
179
179
|
|
|
180
|
-
## Desktop automation with
|
|
180
|
+
## Desktop automation with agent-desktop
|
|
181
181
|
|
|
182
|
-
[
|
|
182
|
+
[agent-desktop](https://agent-browser.dev/desktop) reads a desktop app's accessibility tree as JSON and gives every element you can act on a ref. You act on a ref, read the UI again, and repeat. It is a tool that an agent calls, not an agent: it has no model inside, no GUI, and prints one JSON envelope per command. It runs on macOS, Windows and Linux, and it is Apache-2.0 licensed. A successful action does not prove the UI changed, so every step ends with a read: a fresh snapshot, `get`, or `wait`.
|
|
183
183
|
|
|
184
|
-
The bundled `
|
|
184
|
+
The bundled `agent-desktop` skill is a short guide to that loop and to installing the CLI. The detailed guides are compiled into the CLI, so they always match the version you run:
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
```sh
|
|
187
|
+
agent-desktop status # platform, permissions, supported surfaces
|
|
188
|
+
agent-desktop skills get desktop # the loop, refs, verification, and retry rules
|
|
189
|
+
agent-desktop skills get platform # what differs on this OS
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Open a reference only when you need it, for example `agent-desktop skills get desktop workflows` for worked patterns or `agent-desktop skills get linux troubleshooting`. Every command prints a JSON envelope; the guide's Markdown is in `data.content`.
|
|
193
|
+
|
|
194
|
+
Atomic uses the CLI in two ways. Choose by who decides the next action:
|
|
187
195
|
|
|
188
|
-
| Situation |
|
|
196
|
+
| Situation | How | Why |
|
|
189
197
|
| --- | --- | --- |
|
|
190
|
-
| A language model chooses each action: an interactive session driving, inspecting, or automating a desktop app,
|
|
191
|
-
| A custom workflow's TypeScript owns the scenario and its postcondition, run inside `ctx.tool(name, args, fn, { timeoutMs })` |
|
|
198
|
+
| A language model chooses each action: an interactive session driving, inspecting, or automating a desktop app, or any workflow stage acting outside `ctx.tool` | The bundled `agent-desktop` skill and one-shot `agent-desktop` commands | The model decides turn by turn. The skill's loop is written for one command at a time, and the evidence is the JSON results, screenshots, and trace the commands produce. |
|
|
199
|
+
| A custom workflow's TypeScript owns the scenario and its postcondition, run inside `ctx.tool(name, args, fn, { timeoutMs })` | The `agent-desktop` CLI, called from the `ctx.tool` function | Code owns the sequence, and the result is durably checkpointed and replayed on resume. |
|
|
192
200
|
|
|
193
|
-
The rule of thumb: **when a model chooses the next action, use the
|
|
201
|
+
The rule of thumb: **when a model chooses the next action, use the skill and one-shot commands; when TypeScript code owns the sequence and the postcondition, call the CLI from `ctx.tool`.** agent-desktop has no TypeScript SDK. Its CLI prints one JSON envelope per command, and that envelope is the contract. Before reaching for either, check whether [agent-browser covers the target](#what-agent-browser-covers): websites and web apps in Chrome/Chromium, Mobile Safari in the iOS Simulator, Electron and other CDP-exposing apps, Slack, and cloud browsers. It is much cheaper than screenshot-driven computer use there. Use agent-desktop for native desktop apps, menus and menu bars, OS dialogs and permission prompts, work across apps, browser chrome and desktop browsers, and whenever agent-browser hits a limitation. Terminals stay with [Herdr](#terminal-automation-with-herdr), falling back to tmux or psmux.
|
|
194
202
|
|
|
195
|
-
|
|
203
|
+
Atomic bundles the skill. You do not need `npx skills add` for it, and an installed copy can go stale when you upgrade the CLI. Do not link or copy another skill into `~/.agents/skills`, `~/.claude/skills`, or other agent directories, and leave any existing user-level skill alone.
|
|
196
204
|
|
|
197
205
|
### Install if missing
|
|
198
206
|
|
|
199
|
-
Check `
|
|
207
|
+
Check `agent-desktop version`. If the command is missing, make **one bounded attempt** to install it. It needs Node 18 or later:
|
|
200
208
|
|
|
201
209
|
```sh
|
|
202
|
-
|
|
203
|
-
|
|
210
|
+
npm install -g agent-desktop
|
|
211
|
+
agent-desktop version
|
|
204
212
|
```
|
|
205
213
|
|
|
206
|
-
|
|
207
|
-
# Windows PowerShell
|
|
208
|
-
irm https://cua.ai/driver/install.ps1 | iex
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
Report what the installer did. On macOS it places `CuaDriver.app` in `/Applications`, creates the `~/.local/bin/cua-driver` symlink, and appends an `export PATH=…` line to your `zsh`, `bash`, or `fish` rc file when `~/.local/bin` is not already on `PATH`; open a new shell or source the rc file before retrying `cua-driver --version`. On Linux it downloads into `~/.cua-driver/packages/releases/` and creates the same symlink; a minimal image may first need `sudo apt install libxi6 at-spi2-core`. On Windows it installs under `%LOCALAPPDATA%\Programs\Cua\cua-driver\bin`, appends that directory to the user `Path`, and registers a `cua-driver-serve` autostart task when the session is interactive.
|
|
214
|
+
It supports macOS 13 or later, Windows 10 1809 or later (or Windows Server 2019), and Ubuntu 24.04 or later, on x64 and arm64. Without `-g`, the command lands in `./node_modules/.bin` and is not on `PATH`; use `npx agent-desktop` or install globally. The package carries the native executable and the helper each platform needs: `agent-desktop-macos-helper` on macOS and `agent-desktop-linux-clipboard-owner` on Linux. Windows needs none.
|
|
212
215
|
|
|
213
|
-
|
|
216
|
+
Its `postinstall` script replaces the Node launcher with a link to the native binary. If your package manager blocks install scripts, as npm 12 does by default, the Node launcher runs instead. It works, but every call starts Node first and costs more than 100 ms, and the launcher prints a one-time notice with the fix. Approve the script and reinstall:
|
|
214
217
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
+
```sh
|
|
219
|
+
npm install-scripts approve agent-desktop # npm 12
|
|
220
|
+
npm install -g agent-desktop --allow-scripts=agent-desktop # npm 11
|
|
221
|
+
```
|
|
218
222
|
|
|
219
|
-
|
|
223
|
+
There is no Homebrew or Scoop package: the custom tap and bucket were removed in 1.0.1, and an older tap or bucket install stays pinned to its version and can shadow the npm command. If `agent-desktop version` is older than expected, check which executable runs with `command -v agent-desktop` (PowerShell: `Get-Command agent-desktop`) and uninstall the old one with the package manager that installed it. Upgrade by running the npm install again.
|
|
220
224
|
|
|
221
|
-
|
|
222
|
-
- **After an executable install.** Additionally run `cua-driver telemetry disable` once, so the preference persists for daemon-owned sessions Atomic does not spawn (on macOS the daemon is launched through `open`, which does not inherit the agent's shell environment). Confirm with `cua-driver telemetry status --json`.
|
|
223
|
-
- Never post the installation UUID from `telemetry status` in an issue, an evidence artifact, or a transcript.
|
|
225
|
+
Report what the install did. Never loop on it. In a workflow stage, a refused or failed install is reported as `blocked`/`needs_human` together with the exact command above, not worked around with an alternative tool.
|
|
224
226
|
|
|
225
|
-
|
|
227
|
+
agent-desktop's documentation describes no telemetry or update check, so Atomic's guidance sets no opt-out environment variable. Check the release notes when you upgrade.
|
|
226
228
|
|
|
227
229
|
### Check readiness
|
|
228
230
|
|
|
229
231
|
A version string verifies the binary, not desktop access. Before the first action:
|
|
230
232
|
|
|
231
233
|
```sh
|
|
232
|
-
|
|
233
|
-
cua-driver status # the daemon is running
|
|
234
|
-
cua-driver doctor # session, display, accessibility bus, telemetry setup
|
|
235
|
-
cua-driver call list_apps # a GUI app you recognize appears
|
|
234
|
+
agent-desktop status
|
|
236
235
|
```
|
|
237
236
|
|
|
238
|
-
`
|
|
237
|
+
`data.permissions` reports `accessibility`, `automation`, and `screen_recording`, each with a state such as `granted`, `denied`, `unknown`, or `not_required`. `data.supported_surfaces` lists the overlay kinds this OS can read (`window`, `sheet`, `alert`, `menu`, and on some platforms shell surfaces), and `data.state_root` is where sessions and traces live (`~/.agent-desktop`; the absolute path in `AGENT_DESKTOP_HOME` moves it). Then load the platform guide with `agent-desktop skills get platform`.
|
|
239
238
|
|
|
240
|
-
- **macOS.**
|
|
241
|
-
- **Windows.**
|
|
242
|
-
- **Linux.**
|
|
239
|
+
- **macOS.** Accessibility permission must be granted to the app that launches the command (Terminal, iTerm2, Warp, VS Code). Screen Recording is needed only for `screenshot` and for session screenshot artifacts. Run `agent-desktop permissions` to read the state and `agent-desktop permissions --guide` to open the right System Settings page with a panel that shows which app to add; the user confirms with Touch ID or a password. A new grant is seen by the next call, so the launching app does not need a restart.
|
|
240
|
+
- **Windows.** No permission dialog exists. Run the command in the interactive desktop session of the signed-in user: Session 0 services, the UAC secure desktop, the sign-in screen, a locked desktop, and another user's session are not supported. Windows blocks input from a non-elevated terminal into an elevated app (UIPI), so stop for the user or use an authorized non-elevated path rather than escalating just to force input through.
|
|
241
|
+
- **Linux.** Run the command inside the graphical session of the user who owns the apps, with a running AT-SPI bus, so the session bus, display, and runtime directory come from its environment. Ubuntu 24.04 or later is the supported base; other distributions need the at-spi2-core bridge fix noted in the platform guide. An empty `supported_surfaces` means the bus did not answer. A TTY login, an SSH shell without the session variables, or a container without a bus sees no apps. X11 and Wayland sessions both work and differ in input, capture, and window control.
|
|
243
242
|
|
|
244
|
-
A missing macOS
|
|
243
|
+
A missing macOS permission, a non-interactive Windows session, or no graphical Linux session with an accessibility bus is a `blocked`/`needs_human` finding in a workflow stage. Report the exact fix from the list above and re-run `agent-desktop status` on resume. Let the user grant permissions; do not script around consent dialogs.
|
|
245
244
|
|
|
246
|
-
### Drive
|
|
245
|
+
### Drive an app from the shell
|
|
247
246
|
|
|
248
|
-
Load the `
|
|
247
|
+
Load the `agent-desktop` skill and follow its loop. Map the app with a shallow skeleton, drill into the region you need, act on a ref, and verify. Refs are qualified with the snapshot that produced them and are valid for that snapshot only:
|
|
249
248
|
|
|
250
249
|
```sh
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
cua-driver call get_window_state '{"pid":844,"window_id":10725,"session":"run-1","screenshot_out_file":"artifacts/after.png"}' > artifacts/after.json
|
|
250
|
+
agent-desktop snapshot --app "Notes" --skeleton -i --compact # map: children_count on cut branches
|
|
251
|
+
agent-desktop snapshot --root @s8f3k2p9:e3 -i --compact # drill into one region
|
|
252
|
+
agent-desktop click @s8f3k2p9:e12 # act on a qualified ref
|
|
253
|
+
agent-desktop wait --element @s8f3k2p9:e5 --predicate value --value "Done" --timeout 5000 # verify
|
|
254
|
+
agent-desktop get @s8f3k2p9:e5 --property value # read it back
|
|
257
255
|
```
|
|
258
256
|
|
|
259
|
-
Replace the
|
|
257
|
+
Replace the app name and refs with values from your own run, and do not reuse an example ref without discovering what it points to. `find --app "Notes" --role button --name "Save" --exact` is cheaper than a snapshot when you know the role and name.
|
|
258
|
+
|
|
259
|
+
- **Verify with a read.** Use `wait`, not a sleep, after an asynchronous step. A successful action reports `data.disposition`; retry or substitute an action only when `disposition.retry` is `safe`, because any other delivery value means the action may have landed and a repeat can click or submit twice. Read the live state first.
|
|
260
|
+
- **Stale and ambiguous refs.** `STALE_REF` means the UI changed: snapshot again. `AMBIGUOUS_TARGET` means several elements match: narrow the target with `find --role --name --exact` or `--root`.
|
|
261
|
+
- **Overlays.** An action that opens a menu, sheet, or alert lists it in `data.surfaces`. Snapshot that surface, not the window behind it.
|
|
262
|
+
- **Headless first.** Ref actions use semantic accessibility calls and do not take focus, move the cursor, or use the clipboard. Add the global `--headed` flag only when the user permits physical input such as double-click, hover, drag, or focus, and never to recover from a headless failure. Dangerous shortcuts such as quit and lock are refused without `--force`.
|
|
263
|
+
- **PowerShell.** Quote every ref (`'@s8f3k2p9:e12'`), because a bare `@token` is the splatting operator.
|
|
264
|
+
- **Sessions.** For a multi-command run, `agent-desktop session start --name run-1` returns a session id; pass it with `--session` or `AGENT_DESKTOP_SESSION` on every command so refs and traces stay in your namespace, and end only your own session with `agent-desktop session end <id>`. `agent-desktop batch '[...]'` runs several commands in one process and is not a transaction.
|
|
265
|
+
- **Evidence.** Keep the JSON results and save `agent-desktop screenshot --app "Notes" after.png`; a session with tracing on can export an HTML timeline with `agent-desktop trace export`. A screenshot is evidence for you, not proof that an action worked. When the work ends in a PR, attach the before and after PNGs to the PR body (`gh pr create --body-file body.md --attach 'before.png#Before' --attach 'after.png#After'` on supported GitHub) next to the scenario they prove, and cite the JSON by name as a local artifact; see [Verification and evidence](/workflows/verification#native-github-media).
|
|
266
|
+
|
|
267
|
+
For the web contents of a Chromium or Electron app that you launch, `agent-desktop launch "Obsidian" --cdp` starts it fresh with a loopback-only debugging port and prints the port; `agent-browser connect <port>` then drives its pages (`agent-browser skills get electron` has the guide). The port exists only for a fresh process, so a running app must be closed first, which loses its state: ask before you do that. Keep the native menu bar, file dialogs and sheets, window management, notifications, screenshots, and any app you did not launch on agent-desktop. While the port is open, any local process of the same user can control the app's web contents, so request `--cdp` only for the step that needs it; `close-app` ends the exposure.
|
|
260
268
|
|
|
261
269
|
### Run a scenario from workflow code
|
|
262
270
|
|
|
263
|
-
When a custom workflow owns the scenario,
|
|
271
|
+
When a custom workflow owns the scenario, call the `agent-desktop` CLI from inside `ctx.tool` so the observe, act, verify loop is a durable, replayable node. The [workflow authoring guide](/workflows/authoring#desktop-verification-with-agent-desktop-in-ctx-tool) has the runnable example; the summary is:
|
|
272
|
+
|
|
273
|
+
- **Prerequisite.** `agent-desktop` on the host, installed by [the steps above](#install-if-missing). The preflight below reports it missing as a limitation rather than installing during the run.
|
|
274
|
+
- **One process per command.** Spawn `agent-desktop`, parse the one JSON envelope it prints, and branch on `ok`, `error.code`, and `disposition`, never on message text. Forward the `signal` and give `ctx.tool` a positive finite `timeoutMs`.
|
|
275
|
+
- **Readiness preflight.** A first `ctx.tool` checks `agent-desktop version` and `agent-desktop status`, and calls `ctx.exit({ status: "blocked", reason })` for a missing macOS permission, an absent Linux accessibility bus, or a missing install.
|
|
276
|
+
- **Loop.** `snapshot` (check `data.complete`) → resolve exactly one element with `find` → act on the ref → `wait` for the postcondition → read it back. Re-drill after any UI change.
|
|
277
|
+
- **Result.** Machine-readable `verified` / `refuted` / `blocked` / `unknown`; the wrapper maps anything but `verified` to a nonzero outcome. An action whose delivery is not `not_delivered`, or that times out before its response, is `unknown`, resolved by reading the state, never by replaying the mutation.
|
|
264
278
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
-
|
|
268
|
-
|
|
269
|
-
- **
|
|
270
|
-
- **
|
|
279
|
+
### Coverage and limits
|
|
280
|
+
|
|
281
|
+
agent-desktop reads accessibility trees and acts through the operating system's accessibility APIs. State these limits instead of working around them:
|
|
282
|
+
|
|
283
|
+
- **No pixel matching.** It cannot see a UI that publishes no accessibility tree, such as a custom-drawn canvas, a game, or some remote-desktop windows. For those it can only take a `screenshot` you judge yourself and, with the user's permission, send coordinate input (`--headed mouse-click --xy X,Y`). Say what stayed unverified. Prefer a ref whenever one exists.
|
|
284
|
+
- **No native iOS or Android support.** agent-desktop has no Simulator or emulator support of its own. It treats the iOS Simulator and Android emulators as ordinary desktop windows and sees only what their accessibility trees expose, which may not include the simulated device's UI. Use `xcrun simctl` (including `simctl io booted recordVideo`), Appium with XCUITest, or `adb` with UI Automator for native mobile apps, and report the gap when none is installed. For Mobile Safari, [agent-browser's iOS mode](#what-agent-browser-covers) remains the route.
|
|
285
|
+
- **Browsers other than Chromium.** Desktop Safari, Firefox, and other browsers expose whatever their accessibility trees publish. Web content there can be thin, so check with a snapshot, and use agent-browser for any page it can reach.
|
|
286
|
+
- **Reserved input.** `key-down`, `key-up`, `mouse-down`, and `mouse-up` never deliver input on any platform. Use `press`, `mouse-click`, or `drag`.
|
|
287
|
+
- **Per-platform differences.** Which actions need `--headed`, and what each OS refuses, is in `agent-desktop skills get platform`; read it before relying on a command.
|
|
288
|
+
|
|
289
|
+
agent-desktop also ships as a C library for embedding; Atomic's guidance does not use it.
|
|
271
290
|
|
|
272
291
|
### Stay safe
|
|
273
292
|
|
|
@@ -275,7 +294,7 @@ One controller owns a desktop at a time. Use a dedicated session or account wher
|
|
|
275
294
|
|
|
276
295
|
## Browser automation with agent-browser
|
|
277
296
|
|
|
278
|
-
Prefer [agent-browser](https://agent-browser.dev/) for any target it can reach. Its `snapshot` returns a compact text accessibility tree with `@eN` element refs, usually a few hundred tokens, so each step costs far less context than a screenshot-driven
|
|
297
|
+
Prefer [agent-browser](https://agent-browser.dev/) for any target it can reach. Its `snapshot` returns a compact text accessibility tree with `@eN` element refs, usually a few hundred tokens, so each step costs far less context than a screenshot-driven computer-use step, and actions land on real controls rather than screen coordinates. Anything outside the scope below, or a limitation you hit inside it, goes to [agent-desktop](#desktop-automation-with-agent-desktop). For data retrieval or batch operations, consider a supported API first when it meets the request and you have permission to use it.
|
|
279
298
|
|
|
280
299
|
### What agent-browser covers
|
|
281
300
|
|
|
@@ -290,15 +309,16 @@ Prefer [agent-browser](https://agent-browser.dev/) for any target it can reach.
|
|
|
290
309
|
| Cloud and sandboxed browsers | `-p browserbase`, `browserless`, `browseruse`, `kernel`, or `agentcore`; `agent-browser skills get vercel-sandbox` | Provider credentials come from the provider's environment variables. |
|
|
291
310
|
| Local HTML or PDF files | `agent-browser --allow-file-access open file:///path/to/file` | Chromium only. |
|
|
292
311
|
|
|
293
|
-
Hand the task to
|
|
312
|
+
Hand the task to agent-desktop when it needs any of these:
|
|
294
313
|
|
|
295
|
-
- A native desktop app that exposes no CDP port (AppKit, SwiftUI, Win32/WPF, GTK, Qt), or an Electron app that
|
|
296
|
-
-
|
|
297
|
-
- Desktop Safari, Firefox, or another browser that is neither Chromium-based nor iOS Safari.
|
|
314
|
+
- A native desktop app that exposes no CDP port (AppKit, SwiftUI, Win32/WPF, GTK, Qt), or an Electron app that is already running. For an Electron or Chromium app you can launch fresh, `agent-desktop launch <app> --cdp` opens a port that `agent-browser connect <port>` drives, and agent-desktop keeps the native menus, dialogs, and windows.
|
|
315
|
+
- Desktop Safari, Firefox, or another browser that is neither Chromium-based nor iOS Safari. agent-desktop sees what their accessibility trees expose, so check the snapshot.
|
|
298
316
|
- Browser chrome outside the page: the toolbar, extension popups, native print or save dialogs, or permission prompts.
|
|
299
317
|
- OS dialogs and pickers the page cannot bypass. Try `agent-browser upload` for file inputs first.
|
|
300
318
|
- Work across several applications, or a capability the installed agent-browser version rejects.
|
|
301
319
|
|
|
320
|
+
A native iOS app in the Simulator, or an Android emulator, is outside both tools: agent-browser's iOS mode drives Mobile Safari only, and agent-desktop sees a simulator window as an ordinary app. Use `xcrun simctl`, Appium with XCUITest, or `adb` with UI Automator, and report the gap when none is available.
|
|
321
|
+
|
|
302
322
|
Check the installed CLI (`agent-browser --help`, `agent-browser skills get core`) before relying on a version-dependent command.
|
|
303
323
|
|
|
304
324
|
### Setup and first session
|
|
@@ -330,10 +350,10 @@ For a real task, act between the snapshot and final capture. Read element refere
|
|
|
330
350
|
- Prefer a fresh profile. Attach to an existing personal browser only when authorized; stored sessions can expose private tabs and credentials.
|
|
331
351
|
- Use headed mode for visual work. Headless mode can verify DOM behavior, but does not establish that desktop integration or native dialogs work.
|
|
332
352
|
- Inspect visible results and relevant console/network output (`agent-browser console`, `agent-browser errors`, `agent-browser network requests`). Keep semantic locators and assertions in a maintained browser test suite for repeatable regression coverage.
|
|
333
|
-
- Use the CLI's file-upload support for supported file inputs rather than driving an OS file picker. Switch to
|
|
353
|
+
- Use the CLI's file-upload support for supported file inputs rather than driving an OS file picker. Switch to agent-desktop or native tooling only for UI outside the page, and then recheck focus before returning to browser control.
|
|
334
354
|
- Treat cookies, saved authentication state, and network logs as sensitive. Do not commit or attach a browser profile as evidence.
|
|
335
355
|
- Keep `screenshot` PNGs and `record` recordings from the verified flow; when the work ends in a PR, attach them to the PR body with `gh pr create --attach` on supported GitHub, each next to the scenario it proves. See [Verification and evidence](/workflows/verification#native-github-media).
|
|
336
|
-
- `set device` emulates a mobile viewport in Chromium; `-p ios` runs real Mobile Safari. Neither exercises a native Android or iOS app, which needs
|
|
356
|
+
- `set device` emulates a mobile viewport in Chromium; `-p ios` runs real Mobile Safari. Neither exercises a native Android or iOS app, which needs `adb`, `xcrun simctl`, or Appium and XCUITest.
|
|
337
357
|
|
|
338
358
|
For verification captures and recordings, see [browser evidence](/workflows/verification#browser-changes).
|
|
339
359
|
|
|
@@ -394,12 +414,10 @@ For modified-key setup in Atomic, see [tmux setup](/tmux). For behavioral checks
|
|
|
394
414
|
|
|
395
415
|
### Desktop and native tools
|
|
396
416
|
|
|
397
|
-
- Install a missing `
|
|
398
|
-
-
|
|
399
|
-
-
|
|
400
|
-
-
|
|
401
|
-
- AppleScript automation may also prompt for Automation permission to control another app. Let the user grant permissions; do not script around consent dialogs. Only Cua Driver's own Accessibility and Screen Recording prompts are approved by the agent, over VNC, unless `ATOMIC_CUA_AUTO_APPROVE=0` (see [Check readiness](#check-readiness) above).
|
|
402
|
-
- Window screenshots use the window's own coordinate space and report their scale factor; act by element token where possible and read dimensions from the same snapshot before any pixel action. A black or incomplete capture usually needs permission or display troubleshooting, not more clicks.
|
|
417
|
+
- Install a missing `agent-desktop` with [`npm install -g agent-desktop`](#install-if-missing) (macOS 13 or later; Intel or Apple Silicon). Install missing uv with `brew install uv` when Homebrew is available, or use the reviewed macOS installer from [uv installation](https://docs.astral.sh/uv/getting-started/installation/).
|
|
418
|
+
- Accessibility permission belongs to the app that launches the command (Terminal, iTerm2, Warp, VS Code). Run `agent-desktop permissions` to read it and `agent-desktop permissions --guide` to open System Settings with a panel that shows the user which app to add; the user confirms with Touch ID or a password. macOS 27 and later name the list Device Control and Data Access. If System Settings also lists the `agent-desktop` binary, grant it too. Screen Recording is needed only for `screenshot`.
|
|
419
|
+
- AppleScript automation may also prompt for Automation permission to control another app, and `agent-desktop permissions` reports it as `unknown` until macOS would prompt. Let the user grant permissions; do not script around consent dialogs.
|
|
420
|
+
- Act by ref where possible. Read `bounds` from the same snapshot before any coordinate action, and check that they are live (`get --property bounds` reports `data.live`). A black or incomplete capture usually needs permission or display troubleshooting, not more clicks.
|
|
403
421
|
|
|
404
422
|
Use `osascript` for AppleScript or JavaScript for Automation when an app's scripting dictionary exposes the operation you need. See [application scripting and recipes](#application-scripting-and-apis) for a runnable example and Office automation choices. `System Events` UI scripting and native accessibility APIs can address menus and controls more reliably than coordinates; consult Apple's [UI scripting guide](https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/AutomatetheUserInterface.html).
|
|
405
423
|
|
|
@@ -407,7 +425,7 @@ Use `osascript` for AppleScript or JavaScript for Automation when an app's scrip
|
|
|
407
425
|
|
|
408
426
|
### Browser and terminal
|
|
409
427
|
|
|
410
|
-
agent-browser's default session is Chrome/Chromium, which is not proof of Safari-specific behavior. For Mobile Safari, use `agent-browser -p ios` against an iOS Simulator (requires Xcode, Appium, and the XCUITest driver). For desktop Safari, use
|
|
428
|
+
agent-browser's default session is Chrome/Chromium, which is not proof of Safari-specific behavior. For Mobile Safari, use `agent-browser -p ios` against an iOS Simulator (requires Xcode, Appium, and the XCUITest driver). For desktop Safari, use agent-desktop and check what its accessibility tree exposes.
|
|
411
429
|
|
|
412
430
|
Herdr is the first choice for interactive terminals when eligible. Homebrew provides Herdr and tmux. Preserve the shell, terminal dimensions, and keyboard behavior relevant to the task rather than silently changing them to make a scenario pass.
|
|
413
431
|
|
|
@@ -415,12 +433,12 @@ Herdr is the first choice for interactive terminals when eligible. Homebrew prov
|
|
|
415
433
|
|
|
416
434
|
### Desktop and native tools
|
|
417
435
|
|
|
418
|
-
- Install a missing `
|
|
419
|
-
- Installing the binary does not
|
|
420
|
-
-
|
|
421
|
-
- For unattended X11 work, a dedicated virtual display such as Xvfb with a desktop session (for example `xfce4`) can be useful. It does not prove behavior on a real Wayland desktop, GPU configuration, or physical display. Creative applications may require working graphics acceleration.
|
|
436
|
+
- Install a missing `agent-desktop` with [`npm install -g agent-desktop`](#install-if-missing) (Ubuntu 24.04 or later on x86_64 or aarch64; other distributions need the at-spi2-core bridge fix named in `agent-desktop skills get linux`). Install missing uv through the [official Linux installer](https://docs.astral.sh/uv/getting-started/installation/) or an available distribution package.
|
|
437
|
+
- Installing the binary does not create a desktop session. Run `agent-desktop status` in a terminal inside the graphical session that owns the apps, so the session bus, display, and runtime directory come from its environment. An empty `supported_surfaces` means the AT-SPI bus did not answer; a TTY login, an SSH shell without the session variables, or a container without a bus sees no apps.
|
|
438
|
+
- Observation and semantic actions work on X11 and Wayland through AT-SPI and need no helper tool. Pointer gestures (`double-click`, `hover`, `drag`) and wheel scrolling are X11 and `--headed` only, and on Wayland they refuse with `ACTION_NOT_SUPPORTED`. Do not weaken session security or claim full Wayland support.
|
|
439
|
+
- For unattended X11 work, a dedicated virtual display such as Xvfb with a desktop session (for example `xfce4`) and a session bus can be useful. It does not prove behavior on a real Wayland desktop, GPU configuration, or physical display. Creative applications may require working graphics acceleration.
|
|
422
440
|
|
|
423
|
-
[AT-SPI](https://gnome.pages.gitlab.gnome.org/at-spi2-core/) can expose named controls in accessible applications. `xdotool` and `wmctrl` can help with focus and window placement on X11; they are not general Wayland replacements. On Wayland, choose tools for the actual compositor and inspect their permission requirements. Use app APIs where custom canvases do not expose useful accessibility controls.
|
|
441
|
+
[AT-SPI](https://gnome.pages.gitlab.gnome.org/at-spi2-core/) can expose named controls in accessible applications. `xdotool` and `wmctrl` can help with focus and window placement on X11 when agent-desktop's window commands are not enough; they are not general Wayland replacements. On Wayland, choose tools for the actual compositor and inspect their permission requirements. Use app APIs where custom canvases do not expose useful accessibility controls.
|
|
424
442
|
|
|
425
443
|
For recordings, use a supported desktop recorder or OBS with the appropriate display or portal source. Confirm the saved file contains the intended window, not a blank capture.
|
|
426
444
|
|
|
@@ -434,14 +452,14 @@ Herdr is preferred when eligible; tmux is a practical fallback on local or remot
|
|
|
434
452
|
|
|
435
453
|
### Desktop and native tools
|
|
436
454
|
|
|
437
|
-
- Install a missing `
|
|
438
|
-
-
|
|
439
|
-
-
|
|
455
|
+
- Install a missing `agent-desktop` with [`npm install -g agent-desktop`](#install-if-missing) from PowerShell and run `agent-desktop version`; open a new shell if `Path` changed. Install missing uv with `winget install --id=astral-sh.uv -e` or use the reviewed PowerShell installer from [uv installation](https://docs.astral.sh/uv/getting-started/installation/).
|
|
456
|
+
- Run `agent-desktop` in the interactive desktop session of the signed-in user (Windows 10 1809 or later, or Windows Server 2019 or later). Session 0 services, Server Core, the UAC secure desktop, the sign-in screen, a locked desktop, and another user's session are not supported. No permission dialog exists, and `agent-desktop status` reports `automation` as `not_required`.
|
|
457
|
+
- In PowerShell, quote every ref (`'@s8f3k2p9:e1'`) and use `$env:NAME = 'value'` instead of `export`. A minimized window is not drivable: `agent-desktop restore --app <name>`, then snapshot again. `type` needs `--headed`; prefer `set-value`.
|
|
440
458
|
- Keep the session unlocked and available during automation. A disconnected or minimized Remote Desktop session can change rendering or input behavior; verify the actual remote-session setup before relying on it.
|
|
441
459
|
- Use a consistent display scale and primary monitor. Check coordinates again after moving a window between displays with different DPI settings.
|
|
442
|
-
-
|
|
460
|
+
- Windows blocks input from a non-elevated terminal into an elevated app (UIPI) and the UAC secure desktop is out of reach. Stop for the user or choose an authorized non-elevated path rather than escalating just to force input through.
|
|
443
461
|
|
|
444
|
-
[Windows UI Automation](https://learn.microsoft.com/en-us/dotnet/framework/ui-automation/ui-automation-overview) exposes controls by name and automation ID.
|
|
462
|
+
[Windows UI Automation](https://learn.microsoft.com/en-us/dotnet/framework/ui-automation/ui-automation-overview) exposes controls by name and automation ID. agent-desktop reads that UIA tree in `snapshot` and acts on it through semantic calls, so prefer refs over pixel matching for accessible Windows apps. For structured document operations, start with [file libraries and app scripting](#application-scripting-and-apis). Use agent-desktop for the remaining visual interactions.
|
|
445
463
|
|
|
446
464
|
Snipping Tool or OBS can capture desktop evidence. Check the selected window and saved recording before sharing it.
|
|
447
465
|
|
|
@@ -453,28 +471,28 @@ Prefer native Herdr when eligible. In PowerShell, check `$env:HERDR_ENV -eq '1'`
|
|
|
453
471
|
|
|
454
472
|
See [Windows setup](/windows) for Atomic's shell requirements.
|
|
455
473
|
|
|
456
|
-
## Creative work and
|
|
474
|
+
## Creative work and computer-use workflows
|
|
457
475
|
|
|
458
476
|
Choose the deliverable first. A library or application API may produce it without computer use at all. Add visual interaction when it helps create or inspect the result.
|
|
459
477
|
|
|
460
478
|
| Task | Practical approach | Useful deliverables |
|
|
461
479
|
| --- | --- | --- |
|
|
462
|
-
| Blender 3D modeling | Use Blender Python for repeatable geometry or scene setup; use
|
|
463
|
-
| Presentations | Generate structured slides with `python-pptx`, inspect them in a compatible viewer, and use
|
|
464
|
-
| Video editing | Use the editor's scripting API or media CLI for repetitive operations; use
|
|
465
|
-
| Work across applications | Use native scripting for named windows and file operations; use
|
|
480
|
+
| Blender 3D modeling | Use Blender Python for repeatable geometry or scene setup; use agent-desktop for visible editor operations and visual inspection. | Editable `.blend` file, exported model if requested, preview render. |
|
|
481
|
+
| Presentations | Generate structured slides with `python-pptx`, inspect them in a compatible viewer, and use agent-desktop for visual refinements or slideshow interaction when needed. | Editable deck plus PDF or slide previews exported through a compatible application. |
|
|
482
|
+
| Video editing | Use the editor's scripting API or media CLI for repetitive operations; use agent-desktop to adjust the timeline, inspect transitions, and review playback. | Editable project, required source references, final export. |
|
|
483
|
+
| Work across applications | Use native scripting for named windows and file operations; use agent-desktop where the task needs visual interaction, addressing each window by app name and window id. | Saved documents and a concise record of completed steps. |
|
|
466
484
|
|
|
467
485
|
Do not substitute a screenshot for the editable project or final export the user requested. Reopen saved files, check missing assets and fonts, and inspect the actual export. For video, check audio and timing as well as a still frame. Keep originals intact and use explicit save paths. Rendering, uploading, or exporting through a paid service may need separate authorization.
|
|
468
486
|
|
|
469
|
-
When the user specifically wants a
|
|
487
|
+
When the user specifically wants a computer-use workflow, give the stage that operates the desktop the `agent-desktop` skill, or put a code-owned scenario in `ctx.tool` that calls the `agent-desktop` CLI. For artifact-only requests, keep script-based work outside the desktop session and omit UI stages that add no useful operation or check. A desktop sequence is:
|
|
470
488
|
|
|
471
489
|
1. Prepare assets and confirm the intended application, output formats, and permissions.
|
|
472
490
|
2. Open the dedicated desktop and inspect its starting state.
|
|
473
|
-
3. Create or edit with
|
|
491
|
+
3. Create or edit with agent-desktop and suitable native/app APIs, saving checkpoints.
|
|
474
492
|
4. Reopen and inspect the deliverables, then make bounded corrections if needed.
|
|
475
493
|
5. Hand off local files. Publish or upload only to an authorized target.
|
|
476
494
|
|
|
477
|
-
Pass scripts, project files, and artifact paths between stages rather than long click transcripts. Give one stage exclusive desktop ownership and use finite deadlines for renders and exports. Stop on unexpected dialogs,
|
|
495
|
+
Pass scripts, project files, and artifact paths between stages rather than long click transcripts. Give one stage exclusive desktop ownership and use finite deadlines for renders and exports. Stop on unexpected dialogs, incomplete snapshots (`data.complete` is `false`), missing permissions, or failed observations. On resume, inspect the app and files before repeating an action.
|
|
478
496
|
|
|
479
497
|
See [workflow authoring](/workflows/authoring) for stages and human-input gates. Use durable `ctx.tool` calls for workflow-owned external operations, with finite timeouts and cancellation; model stages can use the appropriate automation tools to operate the app. If the user asks to work inline, keep the same safety and deliverable checks without creating a workflow.
|
|
480
498
|
|
|
@@ -482,11 +500,14 @@ See [workflow authoring](/workflows/authoring) for stages and human-input gates.
|
|
|
482
500
|
|
|
483
501
|
| Symptom | What to check |
|
|
484
502
|
| --- | --- |
|
|
485
|
-
| `
|
|
486
|
-
| `
|
|
487
|
-
|
|
|
488
|
-
|
|
|
489
|
-
|
|
|
503
|
+
| `agent-desktop`, uv, or another command is missing | Install it when permitted with one bounded attempt, refresh PATH, and check its version in the same shell that will launch automation. |
|
|
504
|
+
| Every `agent-desktop` call is slow, or a notice mentions the Node launcher | npm blocked the package's install script. Approve it (`npm install-scripts approve agent-desktop` on npm 12, or `npm install -g agent-desktop --allow-scripts=agent-desktop` on npm 11) and reinstall. |
|
|
505
|
+
| `agent-desktop version` is older than expected, or `command -v agent-desktop` names an unexpected path | An older Homebrew tap or Scoop bucket install can shadow the npm command. Uninstall it with the package manager that installed it, then run the npm install again. |
|
|
506
|
+
| `permissions` shows `denied`, an app's tree is empty, or `PERM_DENIED` | On macOS, run `agent-desktop permissions --guide` and let the user grant Accessibility (and Screen Recording for screenshots) to the app that launched the command. A missing permission looks like an empty tree, so check `status` before concluding the app has no UI. |
|
|
507
|
+
| `supported_surfaces` is empty on Linux, or no apps appear | The AT-SPI bus did not answer. Run the command inside the user's graphical session, not a TTY, bare SSH shell, or container, then rerun `agent-desktop status`. |
|
|
508
|
+
| `STALE_REF`, `AMBIGUOUS_TARGET`, or `SNAPSHOT_NOT_FOUND` | The UI changed, several elements match, or the snapshot expired. Snapshot again, narrow with `find --role --name --exact` or `--root`, and use the new ref. |
|
|
509
|
+
| An action succeeded but the UI looks unchanged | Delivery is not proof. `wait` for the postcondition or read the state again; retry only when `disposition.retry` is `safe`. |
|
|
510
|
+
| A snapshot is thin or `data.complete` is `false` | Do not act on a partial tree. Drill with `--root`, or raise `--timeout-ms`; a cold Chromium or Electron app can take 10 to 25 seconds to expose its web tree. |
|
|
490
511
|
| Black screenshot or no desktop | Check screen permissions, display/session ownership, X11 versus Wayland, and remote-session state. |
|
|
491
512
|
| Input reaches the wrong app | Stop. Confirm focus, window identity, scaling, and that no other controller shares the desktop. |
|
|
492
513
|
| Browser element reference no longer works | Take a fresh snapshot and locate the current control. |
|
|
@@ -115,7 +115,7 @@ Skills are reusable expert instructions. Trigger one with `/skill:<name>` follow
|
|
|
115
115
|
| `tdd` | Test-first feature or bug work. | `/skill:tdd` |
|
|
116
116
|
| `impeccable` | Critique or refine web/native frontend and product UI; includes detector hooks, framework-aware live review, and mount-failure recovery. | `/skill:impeccable` |
|
|
117
117
|
| `agent-browser` | Drive a real browser for end-to-end UI checks, screenshots, and reviewable proof videos. | `/skill:agent-browser` |
|
|
118
|
-
| `
|
|
118
|
+
| `agent-desktop` | Drive a native desktop app through its accessibility tree with the agent-desktop CLI: snapshot, act on a ref, and wait for the postcondition to verify. | `/skill:agent-desktop` |
|
|
119
119
|
| `qlty` | Lint, auto-format, and measure code quality — complexity, duplication, and code smells — through one CLI across the repository's languages. | `/skill:qlty check this branch before I hand it off` |
|
|
120
120
|
| `liteparse` | Pull text, tables, or values out of PDF, DOCX, PPTX, XLSX, and image files locally. | `/skill:liteparse` |
|
|
121
121
|
| `show-me` | Explain a topic visually with concise diagrams, code-shape sketches, or focused HTML artifacts. HumanLayer, MIT licensed. | `/skill:show-me` |
|
package/docs/skills.md
CHANGED
|
@@ -115,9 +115,9 @@ Offline, `qlty metrics` and `qlty smells` still work through built-in static ana
|
|
|
115
115
|
|
|
116
116
|
### Built-in computer-use and automation guidance
|
|
117
117
|
|
|
118
|
-
Load `/skill:agent-browser` first for anything it covers: websites and web apps in Chrome/Chromium, Mobile Safari in the iOS Simulator (`agent-browser -p ios`), Electron and other apps that expose a CDP port, Slack, and cloud browsers. Its text snapshots cost far fewer tokens than
|
|
118
|
+
Load `/skill:agent-browser` first for anything it covers: websites and web apps in Chrome/Chromium, Mobile Safari in the iOS Simulator (`agent-browser -p ios`), Electron and other apps that expose a CDP port, Slack, and cloud browsers. Its text snapshots cost far fewer tokens than desktop accessibility trees and screenshots. For native desktop apps, menus and menu bars, OS dialogs and permission prompts, desktop Safari and other non-Chromium browsers, and work across apps, load `/skill:agent-desktop` and drive the app with one-shot `agent-desktop` commands; when a custom workflow's TypeScript owns the scenario, call the `agent-desktop` CLI from `ctx.tool` instead. Native iOS apps in the Simulator and Android emulators need native mobile tooling; agent-desktop sees them only as desktop windows. See [what agent-browser covers](/computer-use#what-agent-browser-covers) for the full split, and [Computer use](/computer-use#desktop-automation-with-agent-desktop) for installing the agent-desktop CLI, readiness, permissions, and [coverage limits](/computer-use#coverage-and-limits). For terminal automation/testing, prefer `/skill:herdr` on macOS, Linux and Windows. Install Herdr if missing when network access and permissions permit; fall back to `/skill:tmux` or native Windows psmux when installation or use is not possible. Preserve the upstream skill's explicit-request and managed-pane requirements. These are separate interfaces, not interchangeable command names. See [verification and desktop safety](/workflows/verification) for installation, permissions, dedicated sessions and evidence.
|
|
119
119
|
|
|
120
|
-
The bundled [
|
|
120
|
+
The bundled [agent-desktop skill](https://github.com/vercel-labs/agent-desktop/tree/v1.0.2/skills/agent-desktop) is upstream's `skills/agent-desktop/SKILL.md` at tag `v1.0.2`, Apache-2.0 licensed. Atomic owns its frontmatter and adds one section, "Install and permissions", with the bounded install attempt and the readiness check; the rest is upstream's text. It is a short guide: the detailed guides and every reference are compiled into the CLI and printed by `agent-desktop skills get desktop`, `agent-desktop skills get platform`, and `agent-desktop skills get desktop <reference>`, so they always match the installed version. The skill does not install the `agent-desktop` executable, and Atomic never runs `npx skills add` for it. Permission prompts stay with you: on macOS the agent opens `agent-desktop permissions --guide` and you approve it.
|
|
121
121
|
|
|
122
122
|
The bundled [Herdr skill](https://github.com/herdrdev/herdr/blob/v0.9.5/skills/herdr/SKILL.md) requires an explicit Herdr mention or request and `HERDR_ENV=1`; it stops outside a Herdr-managed pane. It does not install Herdr or authorize control of unrelated panes. Use returned pane IDs, and check completion separately from command submission.
|
|
123
123
|
|
package/docs/usage.md
CHANGED
|
@@ -181,7 +181,7 @@ User-preference: keep PRs under 500 changed lines
|
|
|
181
181
|
Co-authored-by: Ada Lovelace <ada@example.com>
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
Tasks done without a workflow record `Assistant-workflow: inline`. Each `Assistant-verification` line names one check that ran or was attempted, such as unit or E2E tests, agent-browser,
|
|
184
|
+
Tasks done without a workflow record `Assistant-workflow: inline`. Each `Assistant-verification` line names one check that ran or was attempted, such as unit or E2E tests, agent-browser, agent-desktop, Herdr terminal automation, or the qlty CLI, with its outcome (`passed`, `failed`, or `unavailable`). Each preference carries a `Co-authored-by` line naming the user who expressed it. Before choosing between a workflow and inline work, deciding how to verify a change, or estimating how long a task will take, the agent looks up comparable records with your version control system and its hosting CLI (for example `git log` and `gh` on GitHub) and uses them as a guide alongside your request. A lack of workflow history, or a history of mostly inline tasks, does not make the agent default to inline work: it still judges from the task itself whether a workflow would help unless you have stated or recorded a preference. For verification, it starts from the checks that proved similar changes and skips setups previously recorded as unavailable unless something has changed, while still running the project's required checks. It applies your own recorded preferences first and falls back to other contributors' preferences as repository conventions only when yours don't cover the situation, so you can always override a convention by stating your preference. To turn off any of these records, such as only preferences or all of them, say so in your request, a context file, or `APPEND_SYSTEM.md`.
|
|
185
185
|
|
|
186
186
|
## Exporting and Sharing Sessions
|
|
187
187
|
|