@@ -15,7 +15,7 @@ The project is in early development and considered experimental. Pull requests a
1515## Features
1616- Platforms: iOS (simulator + physical device core automation) and Android (emulator + device).
1717- Core commands: ` open ` , ` back ` , ` home ` , ` app-switcher ` , ` press ` , ` long-press ` , ` focus ` , ` type ` , ` fill ` , ` scroll ` , ` scrollintoview ` , ` wait ` , ` alert ` , ` screenshot ` , ` close ` , ` reinstall ` .
18- - Inspection commands: ` snapshot ` (accessibility tree), ` appstate ` , ` apps ` , ` devices ` .
18+ - Inspection commands: ` snapshot ` (accessibility tree), ` diff snapshot ` (snapshot diffs), ` appstate ` , ` apps ` , ` devices ` .
1919- Device tooling: ` adb ` (Android), ` simctl ` /` devicectl ` (iOS via Xcode).
2020- Minimal dependencies; TypeScript executed directly on Node 22+ (no build step).
2121
@@ -34,13 +34,14 @@ npx agent-device open SampleApp
3434## Quick Start
3535
3636Use refs for agent-driven exploration and normal automation flows.
37- Use ` press ` as the canonical tap command; ` click ` is an equivalent alias.
37+ Use ` press ` as the canonical tap command; ` click ` is an equivalent alias; ` dblclick ` is an alias for ` click --double-tap ` .
3838
3939``` bash
4040agent-device open Contacts --platform ios # creates session on iOS Simulator
4141agent-device snapshot
4242agent-device press @e5
4343agent-device fill @e6 " John"
44+ agent-device diff snapshot
4445agent-device fill @e7 " Doe"
4546agent-device press @e3
4647agent-device close
@@ -105,6 +106,7 @@ agent-device open SampleApp
105106agent-device snapshot
106107agent-device press @e7
107108agent-device fill @e8 " hello"
109+ agent-device diff snapshot
108110agent-device close SampleApp
109111```
110112
@@ -122,6 +124,7 @@ Coordinates:
122124- X increases to the right, Y increases downward.
123125- ` press ` is the canonical tap command.
124126- ` click ` is an equivalent alias and accepts the same targets (` x y ` , ` @ref ` , selector) and flags.
127+ - ` dblclick ` is shorthand for ` click --double-tap ` .
125128
126129Gesture series examples:
127130
@@ -135,8 +138,8 @@ agent-device swipe 540 1500 540 500 120 --count 8 --pause-ms 30 --pattern ping-p
135138## Command Index
136139- ` boot ` , ` open ` , ` close ` , ` reinstall ` , ` home ` , ` back ` , ` app-switcher `
137140- ` batch `
138- - ` snapshot ` , ` find ` , ` get `
139- - ` press ` (alias : ` click ` ), ` focus ` , ` type ` , ` fill ` , ` long-press ` , ` swipe ` , ` scroll ` , ` scrollintoview ` , ` pinch ` , ` is `
141+ - ` snapshot ` , ` diff ` , ` find ` , ` get `
142+ - ` press ` (aliases : ` click ` , ` dblclick ` ), ` focus ` , ` type ` , ` fill ` , ` long-press ` , ` swipe ` , ` scroll ` , ` scrollintoview ` , ` pinch ` , ` is `
140143- ` alert ` , ` wait ` , ` screenshot `
141144- ` trace start ` , ` trace stop `
142145- ` settings wifi|airplane|location on|off `
@@ -149,6 +152,7 @@ Notes:
149152- iOS snapshots use XCTest on simulators and physical devices.
150153- Scope snapshots with ` -s "<label>" ` or ` -s @ref ` .
151154- If XCTest returns 0 nodes (e.g., foreground app changed), agent-device fails explicitly.
155+ - ` diff snapshot ` compares the current snapshot against the previous snapshot in the same session and then updates the baseline.
152156
153157Flags:
154158- ` --version, -V ` print version and exit
@@ -162,7 +166,7 @@ Flags:
162166- ` --interval-ms <ms> ` delay between ` press ` iterations
163167- ` --hold-ms <ms> ` hold duration per ` press ` iteration
164168- ` --jitter-px <n> ` deterministic coordinate jitter for ` press `
165- - ` --double-tap ` use a double-tap gesture per ` press ` /` click ` iteration (cannot be combined with ` --hold-ms ` or ` --jitter-px ` )
169+ - ` --double-tap ` use a double-tap gesture per ` press ` /` click ` / ` dblclick ` iteration (cannot be combined with ` --hold-ms ` or ` --jitter-px ` )
166170- ` --pause-ms <ms> ` delay between ` swipe ` iterations
167171- ` --pattern one-way|ping-pong ` repeat pattern for ` swipe `
168172- ` --debug ` (alias: ` --verbose ` ) for debug diagnostics + daemon/runner logs
@@ -235,7 +239,7 @@ Replay update:
235239- ` replay <path> ` runs deterministic replay from ` .ad ` scripts.
236240- ` replay -u <path> ` attempts selector updates on failures and atomically rewrites the same file.
237241- Refs are the default/core mechanism for interactive agent flows.
238- - Update targets: ` click ` , ` fill ` , ` get ` , ` is ` , ` wait ` .
242+ - Update targets: ` click ` , ` dblclick ` , ` fill ` , ` get ` , ` is ` , ` wait ` .
239243- Selector matching is a replay-update internal: replay parses ` .ad ` lines into actions, tries them, snapshots on failure, resolves a better selector, then rewrites that failing line.
240244
241245Update examples:
0 commit comments