agent-device 0.17.10 → 0.18.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/README.md +3 -2
- package/android-multitouch-helper/dist/{agent-device-android-multitouch-helper-0.17.10.apk → agent-device-android-multitouch-helper-0.18.1.apk} +0 -0
- package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.18.1.apk.sha256 +1 -0
- package/android-multitouch-helper/dist/{agent-device-android-multitouch-helper-0.17.10.manifest.json → agent-device-android-multitouch-helper-0.18.1.manifest.json} +4 -4
- package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.17.10.apk → agent-device-android-snapshot-helper-0.18.1.apk} +0 -0
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.18.1.apk.sha256 +1 -0
- package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.17.10.manifest.json → agent-device-android-snapshot-helper-0.18.1.manifest.json} +6 -6
- package/apple-runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m +156 -0
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj +10 -16
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift +2 -0
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +3 -1
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift +2 -0
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift +2 -4
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +9 -36
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift +2 -0
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift +2 -0
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +2 -0
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +2 -0
- package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift +0 -1
- package/dist/src/1986.js +1 -0
- package/dist/src/2748.js +1 -1
- package/dist/src/2948.js +21 -21
- package/dist/src/314.js +1 -1
- package/dist/src/3340.js +8 -7
- package/dist/src/432.js +4 -4
- package/dist/src/4418.js +1 -1
- package/dist/src/4428.js +3 -3
- package/dist/src/485.js +1 -0
- package/dist/src/495.js +5 -0
- package/dist/src/5484.js +1 -1
- package/dist/src/5643.js +1 -0
- package/dist/src/587.js +1 -1
- package/dist/src/5913.js +4 -0
- package/dist/src/6849.js +1 -0
- package/dist/src/6918.js +1 -1
- package/dist/src/6967.js +1 -0
- package/dist/src/760.js +1 -0
- package/dist/src/7871.js +1 -0
- package/dist/src/8225.js +1 -1
- package/dist/src/8391.js +1 -0
- package/dist/src/8404.js +2 -0
- package/dist/src/8414.js +2 -0
- package/dist/src/8875.js +1 -1
- package/dist/src/8936.js +1 -0
- package/dist/src/9414.js +1 -0
- package/dist/src/9581.js +5 -5
- package/dist/src/9624.js +1 -1
- package/dist/src/9722.js +37 -37
- package/dist/src/android-adb.d.ts +19 -54
- package/dist/src/android-adb.js +1 -1
- package/dist/src/android.js +5 -5
- package/dist/src/apps.js +9 -11
- package/dist/src/audio-probe.js +1 -0
- package/dist/src/batch.d.ts +50 -25
- package/dist/src/batch.js +1 -1
- package/dist/src/cli-help.js +104 -37
- package/dist/src/cli.js +36 -27
- package/dist/src/contracts.d.ts +46 -122
- package/dist/src/contracts.js +1 -1
- package/dist/src/debug-symbols.js +3 -0
- package/dist/src/devices.js +1 -1
- package/dist/src/devices~1.js +1 -1
- package/dist/src/devices~2.js +1 -1
- package/dist/src/find.js +1 -1
- package/dist/src/finders.d.ts +2 -6
- package/dist/src/finders.js +1 -1
- package/dist/src/generic.js +1 -9
- package/dist/src/handler-utils.js +1 -0
- package/dist/src/index.d.ts +500 -182
- package/dist/src/index.js +1 -1
- package/dist/src/input-actions.js +1 -1
- package/dist/src/input-actions~1.js +1 -1
- package/dist/src/install-source.d.ts +0 -26
- package/dist/src/install-source.js +1 -1
- package/dist/src/interaction.js +1 -1
- package/dist/src/interactor.js +1 -0
- package/dist/src/internal/bin.js +1 -1
- package/dist/src/internal/companion-tunnel.js +1 -1
- package/dist/src/internal/png-worker.js +1 -1
- package/dist/src/lease.js +1 -1
- package/dist/src/linux.js +1 -1
- package/dist/src/metro.d.ts +10 -134
- package/dist/src/metro.js +1 -1
- package/dist/src/notifications.js +1 -1
- package/dist/src/react-native.js +1 -1
- package/dist/src/record-trace-recording.js +3 -3
- package/dist/src/record-trace.js +1 -1
- package/dist/src/remote-config.d.ts +28 -24
- package/dist/src/remote-config.js +1 -1
- package/dist/src/runner-sequence.js +1 -0
- package/dist/src/selector-runtime.js +1 -1
- package/dist/src/selectors.d.ts +7 -3
- package/dist/src/selectors.js +1 -1
- package/dist/src/server.js +2 -2
- package/dist/src/session.js +11 -8
- package/dist/src/simulator.js +2 -0
- package/dist/src/snapshot.js +2 -2
- package/dist/src/web.js +1 -1
- package/macos-helper/Sources/AgentDeviceMacOSHelper/AudioProbe.swift +297 -0
- package/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift +30 -0
- package/package.json +15 -11
- package/server.json +2 -2
- package/android-multitouch-helper/README.md +0 -41
- package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.17.10.apk.sha256 +0 -1
- package/android-snapshot-helper/README.md +0 -88
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.17.10.apk.sha256 +0 -1
- package/dist/src/2133.js +0 -1
- package/dist/src/2577.js +0 -1
- package/dist/src/2954.js +0 -2
- package/dist/src/4291.js +0 -1
- package/dist/src/4723.js +0 -1
- package/dist/src/5628.js +0 -1
- package/dist/src/5910.js +0 -2
- package/dist/src/6024.js +0 -1
- package/dist/src/733.js +0 -1
- package/dist/src/7394.js +0 -6
- package/dist/src/8275.js +0 -2
- package/dist/src/8358.js +0 -4
- package/dist/src/9919.js +0 -6
- package/dist/src/android-snapshot-helper.d.ts +0 -359
- package/dist/src/android-snapshot-helper.js +0 -1
- package/dist/src/apple.js +0 -1
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.swift +0 -17
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/Assets.xcassets/AccentColor.colorset/Contents.json +0 -11
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -36
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/Assets.xcassets/AppIcon.appiconset/logo.jpg +0 -0
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/Assets.xcassets/Contents.json +0 -6
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/Assets.xcassets/Logo.imageset/Contents.json +0 -21
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/Assets.xcassets/Logo.imageset/logo.jpg +0 -0
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/Assets.xcassets/PoweredBy.imageset/Contents.json +0 -21
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/Assets.xcassets/PoweredBy.imageset/powered-by.png +0 -0
- package/ios-runner/AgentDeviceRunner/AgentDeviceRunner/ContentView.swift +0 -34
- package/ios-runner/README.md +0 -53
- package/ios-runner/RUNNER_PROTOCOL.md +0 -76
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcshareddata/xcschemes/AgentDeviceRunner.xcscheme +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests-Bridging-Header.h +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests.entitlements +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.m +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.h +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.m +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Exceptions.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/AgentDeviceRunnerUITests.xctestplan +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/RecordingScripts/recording-overlay.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/RecordingScripts/recording-resize.swift +0 -0
- /package/{ios-runner → apple-runner}/AgentDeviceRunner/RecordingScripts/recording-trim.swift +0 -0
- /package/dist/src/{4069.js → 4917.js} +0 -0
- /package/dist/src/{9836.js → 893.js} +0 -0
package/dist/src/batch.d.ts
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare type BatchFlags = Record<string, unknown> & {
|
|
1
|
+
declare type BatchFlags = Record<string, unknown> & {
|
|
4
2
|
batchOnError?: 'stop';
|
|
5
3
|
batchMaxSteps?: number;
|
|
6
4
|
batchSteps?: DaemonBatchStep[];
|
|
7
5
|
};
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
declare type BatchInvoke = (req: BatchRequest) => Promise<DaemonResponse>;
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
declare type BatchRequest = Omit<DaemonRequest, 'flags'> & {
|
|
12
10
|
flags?: BatchFlags | Record<string, unknown>;
|
|
13
11
|
};
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
declare type BatchRunResponse = {
|
|
14
|
+
ok: true;
|
|
15
|
+
data: BatchRunResult;
|
|
16
|
+
} | Extract<DaemonResponse, {
|
|
17
|
+
ok: false;
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
declare type BatchRunResult = Record<string, unknown> & {
|
|
21
|
+
total: number;
|
|
22
|
+
executed: number;
|
|
23
|
+
totalDurationMs: number;
|
|
24
|
+
results: BatchStepResult[];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare type BatchStepResult = {
|
|
16
28
|
step: number;
|
|
17
29
|
command: string;
|
|
18
30
|
ok: true;
|
|
@@ -20,8 +32,6 @@ export declare type BatchStepResult = {
|
|
|
20
32
|
durationMs: number;
|
|
21
33
|
};
|
|
22
34
|
|
|
23
|
-
export declare function buildBatchStepFlags(parentFlags: BatchFlags | Record<string, unknown> | undefined, stepFlags: DaemonBatchStep['flags'] | Record<string, unknown> | undefined): BatchFlags;
|
|
24
|
-
|
|
25
35
|
declare const DAEMON_LOCK_POLICIES: readonly ['reject', 'strip'];
|
|
26
36
|
|
|
27
37
|
declare type DaemonArtifact = {
|
|
@@ -32,11 +42,11 @@ declare type DaemonArtifact = {
|
|
|
32
42
|
path?: string;
|
|
33
43
|
};
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
declare type DaemonBatchStep = {
|
|
36
46
|
command: string;
|
|
37
47
|
positionals?: string[];
|
|
38
48
|
flags?: Record<string, unknown>;
|
|
39
|
-
runtime?:
|
|
49
|
+
runtime?: DaemonRequest['runtime'];
|
|
40
50
|
};
|
|
41
51
|
|
|
42
52
|
declare type DaemonError = {
|
|
@@ -46,6 +56,18 @@ declare type DaemonError = {
|
|
|
46
56
|
diagnosticId?: string;
|
|
47
57
|
logPath?: string;
|
|
48
58
|
details?: Record<string, unknown>;
|
|
59
|
+
/**
|
|
60
|
+
* Machine-readable typed-error signals (Phase 2). Additive: present only when
|
|
61
|
+
* derivable, so the default error wire shape is unchanged.
|
|
62
|
+
*
|
|
63
|
+
* `retriable` flags a transient failure an agent should retry (vs. a
|
|
64
|
+
* deterministic one where a retry is wasted). `supportedOn` lists the platform
|
|
65
|
+
* families that DO support the command (derived from the capability matrix),
|
|
66
|
+
* surfaced on platform-mismatch errors so an agent self-corrects without a
|
|
67
|
+
* wasted round-trip.
|
|
68
|
+
*/
|
|
69
|
+
retriable?: boolean;
|
|
70
|
+
supportedOn?: string;
|
|
49
71
|
};
|
|
50
72
|
|
|
51
73
|
declare type DaemonInstallSource = {
|
|
@@ -83,6 +105,8 @@ declare type DaemonRequest = {
|
|
|
83
105
|
declare type DaemonRequestMeta = {
|
|
84
106
|
requestId?: string;
|
|
85
107
|
debug?: boolean;
|
|
108
|
+
includeCost?: boolean;
|
|
109
|
+
responseLevel?: ResponseLevel;
|
|
86
110
|
cwd?: string;
|
|
87
111
|
sessionExplicit?: boolean;
|
|
88
112
|
tenantId?: string;
|
|
@@ -90,6 +114,9 @@ declare type DaemonRequestMeta = {
|
|
|
90
114
|
leaseId?: string;
|
|
91
115
|
leaseTtlMs?: number;
|
|
92
116
|
leaseBackend?: LeaseBackend;
|
|
117
|
+
leaseProvider?: string;
|
|
118
|
+
deviceKey?: string;
|
|
119
|
+
clientId?: string;
|
|
93
120
|
sessionIsolation?: SessionIsolationMode;
|
|
94
121
|
uploadedArtifactId?: string;
|
|
95
122
|
clientArtifactPaths?: Record<string, string>;
|
|
@@ -99,7 +126,7 @@ declare type DaemonRequestMeta = {
|
|
|
99
126
|
materializationId?: string;
|
|
100
127
|
lockPolicy?: DaemonLockPolicy;
|
|
101
128
|
lockPlatform?: PlatformSelector;
|
|
102
|
-
requestProgress?: 'replay-test';
|
|
129
|
+
requestProgress?: 'replay-test' | 'command';
|
|
103
130
|
};
|
|
104
131
|
|
|
105
132
|
declare type DaemonResponse = {
|
|
@@ -112,28 +139,28 @@ declare type DaemonResponse = {
|
|
|
112
139
|
|
|
113
140
|
declare type DaemonResponseData = Record<string, unknown> & {
|
|
114
141
|
artifacts?: DaemonArtifact[];
|
|
142
|
+
cost?: ResponseCost;
|
|
115
143
|
};
|
|
116
144
|
|
|
117
|
-
export declare const DEFAULT_BATCH_MAX_STEPS = 100;
|
|
118
|
-
|
|
119
|
-
export declare const INHERITED_PARENT_FLAG_KEYS: readonly ['platform', 'target', 'device', 'udid', 'serial', 'verbose', 'out'];
|
|
120
|
-
|
|
121
145
|
declare const LEASE_BACKENDS: readonly ['ios-simulator', 'ios-instance', 'android-instance'];
|
|
122
146
|
|
|
123
147
|
declare type LeaseBackend = (typeof LEASE_BACKENDS)[number];
|
|
124
148
|
|
|
125
|
-
export declare type NormalizedBatchStep = {
|
|
126
|
-
command: string;
|
|
127
|
-
positionals: string[];
|
|
128
|
-
flags: Record<string, unknown>;
|
|
129
|
-
runtime?: unknown;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
149
|
declare const PLATFORM_SELECTORS: readonly ["ios", "macos", "android", "linux", "web", "apple"];
|
|
133
150
|
|
|
134
151
|
declare type PlatformSelector = (typeof PLATFORM_SELECTORS)[number];
|
|
135
152
|
|
|
136
|
-
|
|
153
|
+
declare const RESPONSE_LEVELS: readonly ['digest', 'default', 'full'];
|
|
154
|
+
|
|
155
|
+
declare type ResponseCost = {
|
|
156
|
+
wallClockMs: number;
|
|
157
|
+
runnerRoundTrips: number;
|
|
158
|
+
nodeCount?: number;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
declare type ResponseLevel = (typeof RESPONSE_LEVELS)[number];
|
|
162
|
+
|
|
163
|
+
export declare function runBatch(req: BatchRequest, sessionName: string, invoke: BatchInvoke): Promise<BatchRunResponse>;
|
|
137
164
|
|
|
138
165
|
declare const SESSION_ISOLATION_MODES: readonly ['none', 'tenant'];
|
|
139
166
|
|
|
@@ -147,6 +174,4 @@ declare type SessionRuntimeHints = {
|
|
|
147
174
|
launchUrl?: string;
|
|
148
175
|
};
|
|
149
176
|
|
|
150
|
-
export declare function validateAndNormalizeBatchSteps(steps: unknown, maxSteps: number): NormalizedBatchStep[];
|
|
151
|
-
|
|
152
177
|
export { }
|
package/dist/src/batch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{runBatch}from"./6918.js";
|
package/dist/src/cli-help.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{listCliCommandNames as e}from"./
|
|
1
|
+
import{listCliCommandNames as e}from"./1986.js";import{getCliCommandSchema as t,getCommandSchema as a}from"./9581.js";import{getFlagDefinitions as o,GLOBAL_FLAG_KEYS as s}from"./2948.js";let n=[{label:"agent-device help workflow",description:"Start here for the core loop, command shape, refs/selectors, and verification"},{label:"agent-device help debugging",description:"Use when logs, network, audio, perf memory, traces, alerts, or diagnostics matter"},{label:"agent-device help react-native",description:"Use when the target app is React Native, Expo, or a dev client"},{label:"agent-device help react-devtools",description:"Use when inspecting components, props/state/hooks, renders, or profiles"},{label:"agent-device help cdp",description:"Use when investigating JS heap growth, heap snapshots, or retainers"},{label:"agent-device help physical-device",description:"Use when using a connected phone/tablet or iOS signing setup"},{label:"agent-device help remote",description:"Use when working through cloud config, tenants, leases, or local tunnels"},{label:"agent-device help web",description:"Use when automating a browser through agent-device sessions"},{label:"agent-device help macos",description:"Use when targeting desktop, frontmost app, or menu bar surfaces"},{label:"agent-device help dogfood",description:"Use when producing exploratory QA evidence"}],r=["agent-device is the default automation surface for app/device workflows across supported targets.","Default to agent-device for installs, opens, snapshots, interactions, screenshots, logs, network/perf evidence, and verification.","Use raw adb, simctl, xcrun, or platform scripts only when this help calls out a tool gap or platform setup step.","Start with agent-device help workflow to understand the core loop and how to use the tool."],i=["Planning output contract: when asked to plan commands, output command lines only: no prose, numbering, Markdown fences, pipes, or shell helpers.","Default loop: devices/apps -> open -> snapshot -i -> press/fill/get/is/wait/find -> verify -> close.",'Use selectors or refs as positional targets: id="submit", label="Allow", or @e12 from snapshot -i.',"Plain snapshot reads state; snapshot -i refreshes current interactive refs only.","Default snapshot text is an agent-facing, token-efficient view for planning and targeting actions.","Read-only visible/state question: use snapshot/get/is/find; use snapshot -i only when refs are needed.","Anti-pattern: snapshot -i followed by snapshot -i | grep ...; prior refs stay valid until app state changes, and --force-full is the explicit full re-read.","Truncated text/input preview: expand first with snapshot -s @e12, not get text.","React Native apps: read help react-native for Metro, DevTools routing, and RN-specific blockers; use react-native dismiss-overlay for LogBox/RedBox overlays.","React Native JS memory leaks: read help cdp; use heap usage samples for a quick signal, then snapshot diff/leak-triplet for retained object proof.","Android RN/Expo Metro: direct Android localhost URL opens with a port auto-configure host reachability.",'Expo Go/dev clients: use the provided URL when given; on iOS use open "Expo Go" <url> --platform ios, then snapshot -i --platform ios to verify project UI. Do not use plain snapshot or snapshot --diff for this recovery check. Android URL opens infer the foreground package for logs/perf when possible.',"Install flows: install/install-from-source first, then open the installed id with --relaunch.",'Text: fill \'id="field-email"\' "qa@example.com" replaces; type appends after press.','Clearing text: do not use fill <target> ""; use a visible clear/reset control or report that clearing is unsupported.',"Android IME capture: if fill says input was captured by the keyboard/IME, inspect keyboard state and switch/disable handwriting before retrying; do not loop fill/type.","Implicit default sessions are scoped to the current worktree; if a prompt names a Session, include --session <name> on every command in that flow.","Run mutating commands serially within one session; parallelize only read-only commands or separate sessions/devices.","Clipboard limits: iOS Allow Paste cannot be automated through XCUITest; prefill with clipboard write. Android non-ASCII should use fill/type, not raw adb input.","After mutation: refs are stale. If the next target is known, use its selector directly; otherwise refresh with snapshot -i, scoped with -s when a stable container is known. Do not use tap; use press or click.","Raw coordinates are fallback-only: use snapshot -i --json rects when iOS refs no-op or child refs are missing, then verify the action with diff snapshot -i or snapshot --diff.","Sparse or AX-unavailable snapshot: use screenshot for visual truth, press the visible coordinate to leave the bad screen, then retry AX with snapshot -i.","macOS context menus use click <ref> --button secondary, then snapshot -i. Longpress is for mobile hold gestures, not macOS secondary-click menus.","Remote lifecycle: use connect, then open, commands, close, and disconnect. Cloud, remote-config, direct proxy, and limrun use the same flow.","Direct proxy: run agent-device connect proxy --daemon-base-url <proxy-agent-device-url> before using a shared Mac proxy. Device leases are automatic on open and expire after five minutes of inactivity.",'Batch JSON steps use "command" and structured "input"; legacy "positionals"/"flags" steps still run in CLI but are deprecated until the next major version.',"Navigation: app-owned back uses back; system back uses back --system.","Web browser sessions: read help web; first slice is web setup if needed -> web doctor -> open <url> --platform web -> snapshot -i -> click/fill/get/is/find/wait/screenshot -> close.","Verification commands must name the expected text/selector; bare screenshots/snapshots are not enough.","Debug evidence: Session state contains request diagnostics and runner.log; use logs clear --restart/mark/path, trace, and network dump --include headers for app evidence.","Full operating guide: agent-device help workflow. Exploratory QA: agent-device help dogfood."],c=["Default config files: ~/.agent-device/config.json, ./agent-device.json","Use --config <path> or AGENT_DEVICE_CONFIG to load one explicit config file."],d=[{label:"AGENT_DEVICE_SESSION",description:"Explicit session name"},{label:"AGENT_DEVICE_PLATFORM",description:"Default platform binding"},{label:"AGENT_DEVICE_SESSION_LOCK",description:"Bound-session conflict mode"},{label:"AGENT_DEVICE_DAEMON_BASE_URL",description:"Connect to remote daemon"},{label:"AGENT_DEVICE_DAEMON_AUTH_TOKEN",description:"Remote daemon service/API token"},{label:"AGENT_DEVICE_CLOUD_BASE_URL",description:"Bridge/control-plane API origin for cloud auth and /api-keys"}],l=["agent-device open Settings --platform ios","agent-device open https://example.com --platform web","agent-device open TextEdit --platform macos","agent-device snapshot -i","agent-device react-devtools get tree --depth 3","agent-device cdp memory usage sample --gc --label baseline",'agent-device fill @e3 "test@example.com"',"agent-device replay ./session.ad","agent-device test ./suite --platform android"],p={workflow:{summary:"Normal agent-device bootstrap, exploration, and validation loop",body:`agent-device help workflow
|
|
2
2
|
|
|
3
3
|
Version-matched operating guide for normal agent-device work.
|
|
4
4
|
|
|
@@ -28,8 +28,8 @@ Bootstrap:
|
|
|
28
28
|
agent-device prepare ios-runner --platform ios --timeout 240000
|
|
29
29
|
If app id is unknown, plan devices, apps, then open <discovered-app-id>. Discovery is not enough when the task asks to open/start the app.
|
|
30
30
|
Install arguments are app/package id then artifact path. If the task says install, use install; use reinstall only when explicitly requested. Fresh runtime state is open --relaunch after install.
|
|
31
|
-
In Apple CI, run prepare ios-runner after boot/install and before replay/test. prepare ios-runner builds/reuses the XCTest runner, health-checks it with a lightweight command, and retries one stuck/non-connecting runner launch before the first snapshot pays that setup cost. It is not a recovery step for "runner already owned by another agent-device daemon"; stop
|
|
32
|
-
CI may cache ~/.agent-device/
|
|
31
|
+
In Apple CI, run prepare ios-runner after boot/install and before replay/test. prepare ios-runner builds/reuses the XCTest runner, health-checks it with a lightweight command, and retries one stuck/non-connecting runner launch before the first snapshot pays that setup cost. It is not a recovery step for "runner already owned by another agent-device daemon"; stop the owning daemon on the Mac with simulator access instead. If the replay/test step starts a separate daemon, stop the prepare daemon before replay/test so the prepared runner does not keep a live lease owned by that daemon.
|
|
32
|
+
CI may cache ~/.agent-device/apple-runner/derived with an exact key that includes the agent-device package and Xcode version. Avoid broad restore-key fallbacks; prepare ios-runner already recovers bad restored runner artifacts and one retryable non-connecting runner launch. Runner build/start output is written to the session's runner.log; daemon.log is for daemon lifecycle/startup issues.
|
|
33
33
|
Do not open artifact paths or invent package ids. If apps lookup misses the target and no URL/artifact is provided, ask or stop.
|
|
34
34
|
|
|
35
35
|
Snapshots and refs:
|
|
@@ -67,7 +67,7 @@ Text entry:
|
|
|
67
67
|
agent-device type "Handle with care" --delay-ms 80
|
|
68
68
|
Empty replacement is not a supported clear-field command: do not plan fill <target> "" or fill <target> ''. Prefer a visible clear/reset control; if the app exposes none, report the tool gap instead of inventing a clear command.
|
|
69
69
|
Debounced field with no result selector: agent-device wait 1000. Keyboard read-only: keyboard status/get. Blocked control: try keyboard dismiss when supported.
|
|
70
|
-
|
|
70
|
+
To hide the keyboard, use keyboard dismiss. It taps safe controls like Done when available and verifies the keyboard closed. If it reports UNSUPPORTED_OPERATION, press a visible app control such as Done only when that is the intended fallback.
|
|
71
71
|
Use plain fill/type first for ordinary login and form fields. If an iOS debounced or search-as-you-type field actually drops characters, or must receive incremental updates, retry with --delay-ms before trying clipboard paste; --delay-ms intentionally paces character entry.
|
|
72
72
|
iOS Allow Paste prompt cannot be exercised under XCUITest. To test paste-driven app behavior, prefill first with agent-device clipboard write "some text"; test the system prompt manually.
|
|
73
73
|
Android Gboard handwriting/stylus UI can capture text in an IME-owned input instead of the app field. If fill reports that input was captured by the keyboard/IME, use the diagnostic targetInput/actualInput details, inspect keyboard status/get if needed, and switch or disable handwriting outside the command plan before retrying. Do not keep retrying fill/type against the same field while the IME owns focus.
|
|
@@ -140,9 +140,10 @@ Validation and evidence:
|
|
|
140
140
|
Android animations: settings animations off/on, not animations disable/restore.
|
|
141
141
|
Debug logs: logs clear --restart, logs mark, reproduce, then logs path; do not split clear/restart into separate stop/start commands.
|
|
142
142
|
Network headers: network dump --include headers; do not write network log headers.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
Remote lifecycle: cloud, remote-config, direct proxy, and limrun use the same flow: connect, open, commands, close, disconnect.
|
|
144
|
+
Remote config profile: agent-device connect --remote-config ./remote-config.json; then run normal commands and disconnect.
|
|
145
|
+
Direct proxy to a Mac you control: cloud/Linux clients can use local/proxy iOS devices through the proxied Mac. Run agent-device connect proxy --daemon-base-url <proxy-agent-device-url> first. Device leases are automatic on open and expire after five minutes of inactivity.
|
|
146
|
+
Web: agent-device uses a managed, pinned agent-browser backend as an implementation detail. Use --platform web when a browser step belongs inside an agent-device session, replay, batch, MCP, or typed-client flow; use agent-browser directly for standalone web automation. Run agent-device web setup before first use, then agent-device web doctor for backend health checks. Web automation requires Node 24+. For audio probe start, the first timing positional is duration in seconds and the second is bucket size in milliseconds. On web, audio probe samples HTML media elements, and URL-backed media may be routed through the probe AudioContext while observed. On macOS hosts, audio probe samples host system audio through ScreenCaptureKit for macOS sessions, iOS simulators, and Android emulators; Screen Recording permission is required.
|
|
146
147
|
agent-device web setup
|
|
147
148
|
agent-device web doctor
|
|
148
149
|
agent-device open https://example.com --platform web
|
|
@@ -153,13 +154,17 @@ Validation and evidence:
|
|
|
153
154
|
agent-device click @e12 --platform web
|
|
154
155
|
agent-device fill @e13 "qa@example.com" --platform web
|
|
155
156
|
agent-device wait text "Welcome" 3000 --platform web
|
|
157
|
+
agent-device record start ./artifacts/web-flow.webm --platform web
|
|
156
158
|
agent-device network dump 25 --include headers --platform web
|
|
159
|
+
agent-device audio probe start 10 1000 --platform web
|
|
157
160
|
agent-device screenshot ./artifacts/web-home.png --platform web
|
|
158
161
|
agent-device screenshot ./artifacts/web-full.png --platform web --fullscreen
|
|
159
162
|
agent-device viewport 1280 900 --platform web
|
|
163
|
+
agent-device record stop --platform web
|
|
160
164
|
agent-device close --platform web
|
|
161
|
-
Minimal web support is for browser sessions with open, snapshot, find, get, is, click/press, fill/type, wait, network dump, screenshot, close, and replay over those commands. Use agent-browser directly for browser-specific features that agent-device does not surface, such as tab/devtools management, advanced page scripting, network routing/HAR, or raw browser debugging.
|
|
165
|
+
Minimal web support is for browser sessions with open, snapshot, find, get, is, click/press, fill/type, wait, network dump, audio probe, screenshot, record start/stop with WebM output, close, and replay over those commands. Use agent-browser directly for browser-specific features that agent-device does not surface, such as tab/devtools management, advanced page scripting, network routing/HAR, or raw browser debugging.
|
|
162
166
|
macOS menu bar: open ... --platform macos --surface menubar; snapshot -i --platform macos --surface menubar.
|
|
167
|
+
Host audio: audio probe start 10 1000 --platform macos|ios|android samples host system audio through ScreenCaptureKit for macOS sessions, iOS simulators, and Android emulators on macOS hosts; grant Screen Recording permission first.
|
|
163
168
|
Maestro full-suite validation on explicit connected devices uses one test command with a comma-separated --device list and --shard-all. Use --shard-split only when splitting suite entries across devices:
|
|
164
169
|
agent-device test ./e2e/maestro --maestro --device udid1,emulator-5554 --shard-all 2
|
|
165
170
|
|
|
@@ -213,6 +218,18 @@ Network:
|
|
|
213
218
|
Use this instead of logs path when the question is request/response metadata.
|
|
214
219
|
network log is a supported alias, but network dump --include headers is the clearest plan form. Do not write network log headers.
|
|
215
220
|
|
|
221
|
+
Audio:
|
|
222
|
+
Use audio probe when the question is whether a browser page, macOS session, iOS simulator, or Android emulator produced audible output during a short observation window.
|
|
223
|
+
agent-device audio probe start 10 1000 --platform web
|
|
224
|
+
agent-device audio probe status --platform web
|
|
225
|
+
agent-device audio probe stop --platform web
|
|
226
|
+
agent-device audio probe start 10 1000 --platform macos
|
|
227
|
+
agent-device audio probe start 10 1000 --platform ios
|
|
228
|
+
agent-device audio probe start 10 1000 --platform android
|
|
229
|
+
audio probe start uses duration seconds first, then bucket milliseconds. Results are compact rmsDbfs and peakDbfs arrays so agents can correlate audible moments with screenshots, actions, network entries, or frame samples.
|
|
230
|
+
On web, audio probe samples HTML media elements and URL-backed media may be routed through the probe AudioContext while observed.
|
|
231
|
+
On macOS hosts, audio probe samples host system audio through ScreenCaptureKit for macOS sessions, iOS simulators, and Android emulators. It requires Screen Recording permission and is system-audio evidence, not app-instrumented audio. Physical iOS and Android devices are not supported.
|
|
232
|
+
|
|
216
233
|
Crash symbolication:
|
|
217
234
|
Crash routing:
|
|
218
235
|
Use logs when you need the lead-up timeline before a failure.
|
|
@@ -221,7 +238,7 @@ Crash symbolication:
|
|
|
221
238
|
Use debug symbols when you already have an Apple crash artifact and local dSYMs and need the failing code path, not a full log dump:
|
|
222
239
|
agent-device debug symbols --artifact crash.log --dsym MyApp.dSYM --out crash-symbolicated.log
|
|
223
240
|
agent-device debug symbols --artifact crash.ips --search-path ./build --out crash-symbolicated.ips
|
|
224
|
-
debug is intentionally narrow. Do not use it for logs, network evidence, performance samples, recordings, traces, or React Native internals.
|
|
241
|
+
debug is intentionally narrow. Do not use it for logs, network/audio evidence, performance samples, recordings, traces, or React Native internals.
|
|
225
242
|
Apple support matches crash Binary Images / IPS usedImages UUIDs against dwarfdump --uuid output from .dSYM bundles, then writes a symbolicated artifact path and compact crash report: app/thread, exception or termination, top symbolicated frames, and first-frame finding. This is better than pasting crash logs because it keeps agent context small while preserving the artifact on disk for inspection.
|
|
226
243
|
Android Java/R8 mapping.txt and native ndk-stack/addr2line symbolication are not in this first debug symbols workflow; capture crash evidence with logs and use the Android toolchain externally for now.
|
|
227
244
|
|
|
@@ -353,6 +370,7 @@ state. Do not use this as the default React Native profiler.
|
|
|
353
370
|
|
|
354
371
|
Setup:
|
|
355
372
|
Start Metro and open the app first. For Android devices/emulators, make sure Metro is reachable from the app, typically with adb reverse tcp:8081 tcp:8081.
|
|
373
|
+
In remote bridge sessions, omit --url for target list/select after connect; agent-device derives the Metro CDP URL from the prepared remote runtime.
|
|
356
374
|
agent-device cdp target list --url http://127.0.0.1:8081
|
|
357
375
|
agent-device cdp target select <target-id>
|
|
358
376
|
|
|
@@ -405,12 +423,17 @@ Choose the next help topic:
|
|
|
405
423
|
Remote/cloud config, leases, and local service tunnels: help remote.
|
|
406
424
|
|
|
407
425
|
React Native dev loop:
|
|
426
|
+
Before QA/dogfood runs, use doctor to separate environment setup from app failures:
|
|
427
|
+
agent-device doctor --platform android
|
|
428
|
+
agent-device doctor --platform ios
|
|
429
|
+
agent-device doctor --platform android --app com.example.app
|
|
430
|
+
agent-device doctor --remote --remote-config ./remote.json
|
|
408
431
|
For "start from screen X" flows, prefer open --relaunch before the first snapshot so the app does not reuse a prior in-progress navigation state.
|
|
409
432
|
JS-only change with Metro connected:
|
|
410
433
|
agent-device metro reload
|
|
411
434
|
agent-device find "Home"
|
|
412
435
|
Do not use agent-device reload. Use open --relaunch for native startup reset.
|
|
413
|
-
Android RN/Expo Metro: direct Android localhost URL opens with a port auto-configure host reachability. For app/package launches,
|
|
436
|
+
Android RN/Expo Metro: direct Android localhost URL opens with a port auto-configure host reachability. For app/package launches, run metro prepare when the app cannot reach local Metro.
|
|
414
437
|
Verify Metro from the same host context that owns Metro. If a sandboxed shell cannot curl localhost:8081/status but an unrestricted host shell can, Metro is running and the sandbox probe is not authoritative.
|
|
415
438
|
adb reverse only affects Android device-to-host traffic. It does not prove host-to-Metro reachability, and it does not fix a redbox caused by a stale or wrong Metro/app state.
|
|
416
439
|
Multiple local worktrees can reuse one native iOS simulator build by running each worktree's Metro on a different port and opening the same installed app on different simulators with explicit runtime hints:
|
|
@@ -494,19 +517,32 @@ Android physical-device prerequisites:
|
|
|
494
517
|
Enable USB debugging and confirm the device appears in agent-device devices --platform android.
|
|
495
518
|
Android does not need the iOS runner signing setup. For React Native/Expo Metro reachability, read help react-native.`},remote:{summary:"Direct proxy, cloud profiles, and remote config",body:`agent-device help remote
|
|
496
519
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
520
|
+
Remote connection providers use the same lifecycle:
|
|
521
|
+
connect -> open -> commands -> close -> disconnect
|
|
522
|
+
|
|
523
|
+
Providers:
|
|
524
|
+
Cloud: agent-device connect or agent-device connect cloud discovers the agent-device cloud profile.
|
|
525
|
+
Remote config: agent-device connect --remote-config ./remote-config.json uses a local profile.
|
|
526
|
+
Direct proxy: agent-device connect proxy --daemon-base-url <proxy-agent-device-url> stores the shared proxy profile and client identity.
|
|
527
|
+
BrowserStack: agent-device connect browserstack stores a local provider profile and creates the App Automate session on first open.
|
|
528
|
+
AWS Device Farm: agent-device connect aws-device-farm stores a local provider profile and creates the remote access session on first open.
|
|
529
|
+
|
|
530
|
+
Device cloud interfaces:
|
|
531
|
+
CLI is the canonical bootstrap path: connect browserstack/aws-device-farm, then use normal open/snapshot/click/close/artifacts/disconnect commands.
|
|
532
|
+
JavaScript can skip persisted connect state by passing leaseProvider plus provider fields to createAgentDeviceClient or per-command options.
|
|
533
|
+
MCP exposes operational tools such as open, snapshot, click, close, and artifacts. It does not expose connect/disconnect; run CLI connect first in the same state dir before relying on MCP tools.
|
|
500
534
|
|
|
501
535
|
Direct proxy flow for a remote Mac/simulator:
|
|
502
536
|
On the Mac with simulator/device access:
|
|
503
537
|
agent-device proxy --port 4310
|
|
504
538
|
cloudflared tunnel --url http://127.0.0.1:4310
|
|
505
539
|
On the remote client:
|
|
506
|
-
agent-device
|
|
507
|
-
agent-device
|
|
508
|
-
agent-device
|
|
509
|
-
agent-device
|
|
540
|
+
agent-device connect proxy --daemon-base-url https://example.trycloudflare.com/agent-device --daemon-auth-token <token>
|
|
541
|
+
agent-device devices --platform ios
|
|
542
|
+
agent-device open Maps --platform ios --device "iPhone 17 Pro"
|
|
543
|
+
agent-device snapshot -i --platform ios --device "iPhone 17 Pro"
|
|
544
|
+
agent-device close
|
|
545
|
+
agent-device disconnect
|
|
510
546
|
|
|
511
547
|
Cloud profile flow:
|
|
512
548
|
agent-device connect
|
|
@@ -514,6 +550,24 @@ Cloud profile flow:
|
|
|
514
550
|
agent-device snapshot
|
|
515
551
|
agent-device disconnect
|
|
516
552
|
|
|
553
|
+
BrowserStack hosted-device flow:
|
|
554
|
+
BROWSERSTACK_USERNAME=... BROWSERSTACK_ACCESS_KEY=...
|
|
555
|
+
agent-device connect browserstack --platform android --device "Google Pixel 8" --provider-os-version 14.0 --provider-app bs://app-id
|
|
556
|
+
agent-device open com.example.app
|
|
557
|
+
agent-device snapshot -i
|
|
558
|
+
agent-device close
|
|
559
|
+
agent-device artifacts --json
|
|
560
|
+
agent-device disconnect
|
|
561
|
+
|
|
562
|
+
AWS Device Farm hosted-device flow:
|
|
563
|
+
AWS_REGION=us-west-2 AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... AWS_SESSION_TOKEN=...
|
|
564
|
+
agent-device connect aws-device-farm --platform android --aws-project-arn <arn> --aws-device-arn <arn> --aws-app-arn <arn>
|
|
565
|
+
agent-device open com.example.app
|
|
566
|
+
agent-device snapshot -i
|
|
567
|
+
agent-device close
|
|
568
|
+
agent-device artifacts --json
|
|
569
|
+
agent-device disconnect
|
|
570
|
+
|
|
517
571
|
Local profile flow:
|
|
518
572
|
agent-device connect --remote-config ./remote-config.json
|
|
519
573
|
agent-device open com.example.app
|
|
@@ -528,11 +582,18 @@ Script flow, per-command config:
|
|
|
528
582
|
Rules:
|
|
529
583
|
connect and disconnect are top-level commands. Do not write agent-device remote connect or agent-device remote disconnect.
|
|
530
584
|
Use connect without --remote-config when the cloud control plane owns the connection profile.
|
|
531
|
-
Prefer --remote-config over --daemon-base-url, --tenant, --run-id, and --lease-id when using a local profile.
|
|
532
|
-
Use agent-device proxy for direct tunnel access to a Mac you control.
|
|
533
|
-
|
|
585
|
+
Prefer connect --remote-config over --daemon-base-url, --tenant, --run-id, and --lease-id when using a local profile.
|
|
586
|
+
Use agent-device proxy for direct tunnel access to a Mac you control. Expose the printed proxy URL through cloudflared/ngrok, then run agent-device connect proxy with the tunnel URL and printed token before normal commands.
|
|
587
|
+
Use BrowserStack and AWS Device Farm through local provider profiles; they do not accept a remote agent-device daemon URL.
|
|
588
|
+
Device cloud credentials must be available before the command starts. BrowserStack uses BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY. AWS Device Farm uses the AWS CLI credential chain, including CI-provided AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/AWS_SESSION_TOKEN, AWS profiles, or web identity role variables.
|
|
589
|
+
Prefer short-lived AWS role credentials in CI. Generated connection profiles store app/device selectors and ARNs, not BrowserStack access keys or AWS credentials.
|
|
590
|
+
After closing a device cloud session, run agent-device artifacts --json to retrieve provider video/log/dashboard URLs when the provider has made them available.
|
|
591
|
+
connect proxy stores the connection profile and client identity. Device leases are acquired on open and expire after five minutes without commands.
|
|
592
|
+
Multiple agents can share one proxy when each uses connect proxy, open, commands, close, and disconnect.
|
|
593
|
+
disconnect releases local connection state; close releases the active session and device lease.
|
|
594
|
+
A busy direct-proxy device error means another agent owns the device until it closes or its inactivity lease expires.
|
|
534
595
|
Keep the proxy token secret. Anyone with the token can control the proxied daemon.
|
|
535
|
-
If iOS
|
|
596
|
+
If local/proxy iOS reports that the runner is already owned by another agent-device daemon after lease admission, retry after the owning session closes or after lease expiry. If the conflict repeats, clean stale daemon state on the machine with simulator access.
|
|
536
597
|
Do not use --config as a remote profile flag. --config loads CLI defaults; --remote-config selects remote daemon/profile settings.
|
|
537
598
|
For self-contained scripts, pass the same --remote-config to every operational command, including disconnect; a preceding connect is optional but not required.
|
|
538
599
|
For remote artifact installs, use install-from-source <url> or install-from-source --github-actions-artifact org/repo:artifact; do not download CI artifacts locally first.
|
|
@@ -582,6 +643,7 @@ Planning rule:
|
|
|
582
643
|
For web command plans, output only agent-device command lines. Do not add prose, numbering, Markdown fences, shell pipes, or agent-browser commands unless the task is explicitly standalone browser automation outside agent-device.
|
|
583
644
|
|
|
584
645
|
First-slice loop:
|
|
646
|
+
Audio probe start uses duration seconds first, then bucket milliseconds.
|
|
585
647
|
agent-device web setup
|
|
586
648
|
agent-device web doctor
|
|
587
649
|
agent-device open https://example.com --platform web
|
|
@@ -592,14 +654,17 @@ First-slice loop:
|
|
|
592
654
|
agent-device click @e12 --platform web
|
|
593
655
|
agent-device fill @e13 "qa@example.com" --platform web
|
|
594
656
|
agent-device wait text "Welcome" 3000 --platform web
|
|
657
|
+
agent-device record start ./artifacts/web-flow.webm --platform web
|
|
595
658
|
agent-device network dump 25 --include headers --platform web
|
|
659
|
+
agent-device audio probe start 10 1000 --platform web
|
|
596
660
|
agent-device screenshot ./artifacts/web-home.png --platform web
|
|
597
661
|
agent-device screenshot ./artifacts/web-full.png --platform web --fullscreen
|
|
598
662
|
agent-device viewport 1280 900 --platform web
|
|
663
|
+
agent-device record stop --platform web
|
|
599
664
|
agent-device close --platform web
|
|
600
665
|
|
|
601
666
|
Supported in agent-device web sessions:
|
|
602
|
-
open <url>, snapshot -i, get text/attrs, is visible/exists/text, find text/selector, click/press @ref or selector, fill/type @ref or selector, wait text/selector, network dump, screenshot, close, and replay scripts made from those commands.
|
|
667
|
+
open <url>, snapshot -i, get text/attrs, is visible/exists/text, find text/selector, click/press @ref or selector, fill/type @ref or selector, wait text/selector, network dump, audio probe, screenshot, record start/stop with WebM output, close, and replay scripts made from those commands.
|
|
603
668
|
|
|
604
669
|
Out of scope for agent-device web support:
|
|
605
670
|
Browser runtime debugging, tabs/windows/devtools control, network routing/interception/HAR, storage/cookie management, arbitrary page scripting, downloads/uploads, multi-page orchestration, and agent-browser-specific diagnostics. Use agent-browser directly for those browser-specific workflows.
|
|
@@ -664,37 +729,39 @@ Rules:
|
|
|
664
729
|
Prefer refs for exploration and selectors for deterministic replay.
|
|
665
730
|
Use logs, network, screenshot --overlay-refs, trace, perf metrics, perf frames, or react-devtools only when they add evidence to a specific issue.
|
|
666
731
|
Never delete screenshots, videos, traces, or report artifacts during a session.
|
|
667
|
-
Escalate to help debugging or help react-devtools when runtime symptoms require those tools.`}};function
|
|
732
|
+
Escalate to help debugging or help react-devtools when runtime symptoms require those tools.`}};function h(e){let t=e.endsWith("?"),a=t?e.slice(0,-1):e;return t?`[${a}]`:`<${a}>`}function m(){let a,o,p,h,m,b,w,y,k;return a=`agent-device <command> [args] [--json]
|
|
668
733
|
|
|
669
|
-
CLI to
|
|
670
|
-
`,o=
|
|
734
|
+
CLI to automate supported app, device, desktop, and web targets for AI agents.
|
|
735
|
+
`,o=g("Commands:",e().map(e=>{let a=t(e);return{name:e,schema:a,usage:function(e,t){if(t.listUsageOverride)return t.listUsageOverride;let a=(t.positionalArgs??[]).map(a=>{var o,s,n;let r,i,c,d;return o=e,s=t,i=(r=(n=a).endsWith("?"))?n.slice(0,-1):n,d=(c=/^[a-z-]+(?:\|[a-z-]+)+$/i.test(i))||void 0!==s.usageOverride&&s.usageOverride.startsWith(`${o} ${i}`),r?c?`[${i}]`:d?i:`[${i}]`:d?i:`<${i}>`});return[e,...a].join(" ")}(e,a)}}).map(e=>({label:e.usage,description:e.schema.summary??e.schema.helpDescription}))),p=f("Global Flags:",u(s)),h=v("Agent Starting Point:",r),m=v("Agent Quickstart:",i),b=g("Agent Workflows:",n),w=v("Configuration:",c),y=g("Environment:",d),k=v("Examples:",l),`${a}
|
|
671
736
|
${h}
|
|
672
737
|
|
|
673
|
-
${
|
|
738
|
+
${b}
|
|
674
739
|
|
|
675
|
-
${
|
|
740
|
+
${o}
|
|
676
741
|
|
|
677
742
|
${p}
|
|
678
743
|
|
|
679
|
-
${
|
|
680
|
-
|
|
681
|
-
${b}
|
|
744
|
+
${m}
|
|
682
745
|
|
|
683
746
|
${w}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
747
|
+
|
|
748
|
+
${y}
|
|
749
|
+
|
|
750
|
+
${k}
|
|
751
|
+
`}function u(e){return o().filter(t=>e.has(t.key)&&void 0!==t.usageLabel&&void 0!==t.usageDescription)}function f(e,t){return g(e,t.map(e=>({label:e.usageLabel??"",description:e.usageDescription??""})))}function g(e,t){if(0===t.length)return`${e}
|
|
752
|
+
(none)`;let a=Math.max(...t.map(e=>e.label.length))+2,o=[e];for(let e of t)o.push(` ${e.label.padEnd(a)}${e.description}`);return o.join("\n")}function v(e,t){return 0===t.length?`${e}
|
|
753
|
+
(none)`:[e,...t.map(e=>` ${e}`)].join("\n")}function b(e){var t,s;let n,r=(n=p[e])?`${n.body}
|
|
687
754
|
|
|
688
755
|
Related:
|
|
689
756
|
agent-device help command list and global flags
|
|
690
757
|
agent-device help <command> command-specific flags
|
|
691
758
|
agent-device help workflow normal app automation loop
|
|
692
|
-
`:null;if(r)return r;let i=a(e);if(!i)return null;let c=(t=e,(s=i).usageOverride?s.usageOverride:[t,...(s.positionalArgs??[]).map(
|
|
759
|
+
`:null;if(r)return r;let i=a(e);if(!i)return null;let c=(t=e,(s=i).usageOverride?s.usageOverride:[t,...(s.positionalArgs??[]).map(h),...(s.allowedFlags??[]).flatMap(e=>{var t;return(t=e,o().filter(e=>e.key===t)).map(e=>e.usageLabel??e.names[0])}).map(e=>`[${e}]`)].join(" ")),d=u(new Set(i.allowedFlags??[])),l=[];d.length>0&&l.push(f("Command flags:",d));let m=l.length>0?`
|
|
693
760
|
|
|
694
|
-
${
|
|
761
|
+
${l.join("\n\n")}`:"";return`agent-device ${c}
|
|
695
762
|
|
|
696
763
|
${i.helpDescription}
|
|
697
764
|
|
|
698
765
|
Usage:
|
|
699
|
-
agent-device ${c}${
|
|
700
|
-
`}export{
|
|
766
|
+
agent-device ${c}${m}
|
|
767
|
+
`}export{b as buildCommandUsageText,m as buildUsageText};
|