@@ -59,6 +59,20 @@ agent-device devices --platform android --android-device-allowlist emulator-5554
5959 - Android: ` AGENT_DEVICE_ANDROID_DEVICE_ALLOWLIST ` (compat: ` ANDROID_DEVICE_ALLOWLIST ` )
6060- CLI scope flags override environment values.
6161
62+ ## Device discovery
63+
64+ ``` bash
65+ agent-device devices
66+ agent-device devices --platform ios
67+ agent-device devices --platform android
68+ agent-device devices --platform ios --ios-simulator-device-set /tmp/tenant-a/simulators
69+ agent-device devices --platform android --android-device-allowlist emulator-5554,device-1234
70+ ```
71+
72+ - ` devices ` lists available targets after applying any platform selector or isolation scope flags.
73+ - Use ` --platform ` to narrow discovery to iOS/tvOS or Android targets.
74+ - Use ` --ios-simulator-device-set ` and ` --android-device-allowlist ` when you need tenant- or lab-scoped discovery.
75+
6276## Simulator provisioning
6377
6478``` bash
@@ -102,6 +116,27 @@ agent-device get attrs @e1
102116- iOS snapshots use XCTest on simulators and physical devices.
103117- ` diff snapshot ` compares the current snapshot with the previous session baseline and then updates baseline.
104118
119+ ## Wait and alerts
120+
121+ ``` bash
122+ agent-device wait 1500
123+ agent-device wait text " Welcome back"
124+ agent-device wait @e12
125+ agent-device wait ' role="button" label="Continue"' 5000
126+ agent-device alert
127+ agent-device alert get
128+ agent-device alert wait 3000
129+ agent-device alert accept
130+ agent-device alert dismiss
131+ ```
132+
133+ - ` wait ` accepts a millisecond duration, ` text <value> ` , a snapshot ref (` @eN ` ), or a selector.
134+ - ` wait <selector> [timeoutMs] ` and ` wait @ref [timeoutMs] ` poll until the target appears or the timeout expires.
135+ - ` wait ` shares the selector/snapshot resolution flow used by ` click ` , ` fill ` , ` get ` , and ` is ` .
136+ - ` alert ` inspects or handles system alerts on iOS simulator targets.
137+ - ` alert ` without an action is equivalent to ` alert get ` .
138+ - ` alert wait [timeout] ` waits for an alert to appear before returning it.
139+
105140## Interactions
106141
107142``` bash
@@ -139,6 +174,22 @@ agent-device find label "Email" fill "user@example.com"
139174agent-device find role button click
140175```
141176
177+ ## Assertions
178+
179+ ``` bash
180+ agent-device is visible @e3
181+ agent-device is exists ' role="button" label="Continue"'
182+ agent-device is hidden ' text="Loading..."'
183+ agent-device is editable ' id="email"'
184+ agent-device is selected ' label="Wi-Fi"'
185+ agent-device is text ' id="greeting"' " Welcome back"
186+ ```
187+
188+ - ` is ` evaluates UI predicates against a snapshot ref or selector and exits non-zero on failure.
189+ - Supported predicates are ` visible ` , ` hidden ` , ` exists ` , ` editable ` , ` selected ` , and ` text ` .
190+ - ` is text <target> <value> ` compares the resolved element text against the expected value.
191+ - ` is ` accepts the same selector-oriented snapshot flags as ` click ` , ` fill ` , ` get ` , and ` wait ` .
192+
142193## Replay
143194
144195``` bash
@@ -161,9 +212,9 @@ agent-device batch --steps '[{"command":"open","positionals":["settings"]}]'
161212```
162213
163214- ` batch ` runs a JSON array of steps in a single daemon request.
164- - each step has ` command ` , optional ` positionals ` , and optional ` flags ` .
165- - stop -on-first-error is the supported behavior (` --on-error stop ` ).
166- - use ` --max-steps <n> ` to tighten per-request safety limits.
215+ - Each step has ` command ` , optional ` positionals ` , and optional ` flags ` .
216+ - Stop -on-first-error is the supported behavior (` --on-error stop ` ).
217+ - Use ` --max-steps <n> ` to tighten per-request safety limits.
167218
168219See [ Batching] ( /docs/batching ) for payload format, response shape, and usage guidelines.
169220
@@ -388,6 +439,43 @@ tail -50 ~/.agent-device/sessions/default/app.log
388439- Physical-device capture defaults to uncapped (max available) FPS.
389440- ` --fps <n> ` (1-120) applies to physical iOS device recording as an explicit FPS cap.
390441
442+ ## Tracing
443+
444+ ``` bash
445+ agent-device trace start
446+ agent-device trace start session.trace
447+ agent-device trace stop
448+ agent-device trace stop session.trace
449+ ```
450+
451+ - ` trace start [path] ` begins trace-log capture for the active session.
452+ - ` trace stop [path] ` stops capture and optionally writes or finalizes the trace artifact at the provided path.
453+ - ` trace ` is intended for lower-level session diagnostics than ` record ` or ` logs ` .
454+
455+ ## Runtime hints
456+
457+ ``` bash
458+ agent-device runtime show
459+ agent-device runtime set --session my-session --platform android --metro-host 10.0.0.10 --metro-port 8081
460+ agent-device runtime set --session my-session --platform ios --bundle-url " http://10.0.0.10:8081/index.bundle?platform=ios"
461+ agent-device runtime clear
462+ ```
463+
464+ - ` runtime show ` prints the current session-scoped runtime hints.
465+ - ` runtime set ` updates supported hints: ` --metro-host ` , ` --metro-port ` , ` --bundle-url ` , and ` --launch-url ` .
466+ - ` runtime clear ` removes previously configured hints for the active session.
467+ - These hints are mainly for React Native and remote/native daemon launch flows.
468+
469+ ## Session inspection
470+
471+ ``` bash
472+ agent-device session list
473+ agent-device session list --json
474+ ```
475+
476+ - ` session list ` shows active daemon sessions and their tracked device/app context.
477+ - Use ` --json ` when you want to inspect or script against the raw session metadata.
478+
391479## iOS device prerequisites
392480
393481- Xcode + ` xcrun devicectl ` available.
0 commit comments