agent-device 0.17.10 → 0.18.0
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/android-multitouch-helper/dist/{agent-device-android-multitouch-helper-0.17.10.apk → agent-device-android-multitouch-helper-0.18.0.apk} +0 -0
- package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.18.0.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.0.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.0.apk} +0 -0
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.18.0.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.0.manifest.json} +6 -6
- package/dist/src/1848.js +4 -0
- package/dist/src/2577.js +1 -1
- package/dist/src/2948.js +20 -20
- package/dist/src/4291.js +1 -1
- package/dist/src/4723.js +1 -1
- package/dist/src/5341.js +1 -0
- package/dist/src/5643.js +1 -0
- package/dist/src/6918.js +1 -1
- package/dist/src/8275.js +2 -2
- package/dist/src/8936.js +1 -0
- package/dist/src/9414.js +1 -0
- package/dist/src/9581.js +4 -4
- package/dist/src/9722.js +32 -37
- package/dist/src/9919.js +5 -5
- package/dist/src/apple.js +1 -1
- package/dist/src/apps.js +10 -10
- package/dist/src/batch.d.ts +20 -3
- package/dist/src/batch.js +1 -1
- package/dist/src/cli-help.js +49 -32
- package/dist/src/cli.js +22 -25
- package/dist/src/contracts.d.ts +14 -0
- package/dist/src/device-ready.js +2 -0
- package/dist/src/find.js +1 -1
- package/dist/src/index.d.ts +67 -16
- package/dist/src/interaction.js +1 -1
- package/dist/src/internal/bin.js +1 -1
- package/dist/src/lease.js +1 -1
- package/dist/src/metro.js +1 -1
- package/dist/src/react-native.js +1 -1
- package/dist/src/record-trace-recording.js +3 -3
- package/dist/src/remote-config.d.ts +17 -11
- package/dist/src/selector-runtime.js +1 -1
- package/dist/src/session.js +11 -8
- package/dist/src/simulator.js +2 -0
- package/dist/src/snapshot.js +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.17.10.apk.sha256 +0 -1
- 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/5628.js +0 -1
- package/dist/src/8358.js +0 -4
package/dist/src/batch.d.ts
CHANGED
|
@@ -12,6 +12,20 @@ export declare type BatchRequest = Omit<DaemonRequest, 'flags'> & {
|
|
|
12
12
|
flags?: BatchFlags | Record<string, unknown>;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
export declare type BatchRunResponse = {
|
|
16
|
+
ok: true;
|
|
17
|
+
data: BatchRunResult;
|
|
18
|
+
} | Extract<DaemonResponse, {
|
|
19
|
+
ok: false;
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
|
+
export declare type BatchRunResult = Record<string, unknown> & {
|
|
23
|
+
total: number;
|
|
24
|
+
executed: number;
|
|
25
|
+
totalDurationMs: number;
|
|
26
|
+
results: BatchStepResult[];
|
|
27
|
+
};
|
|
28
|
+
|
|
15
29
|
export declare type BatchStepResult = {
|
|
16
30
|
step: number;
|
|
17
31
|
command: string;
|
|
@@ -36,7 +50,7 @@ export declare type DaemonBatchStep = {
|
|
|
36
50
|
command: string;
|
|
37
51
|
positionals?: string[];
|
|
38
52
|
flags?: Record<string, unknown>;
|
|
39
|
-
runtime?:
|
|
53
|
+
runtime?: DaemonRequest['runtime'];
|
|
40
54
|
};
|
|
41
55
|
|
|
42
56
|
declare type DaemonError = {
|
|
@@ -90,6 +104,9 @@ declare type DaemonRequestMeta = {
|
|
|
90
104
|
leaseId?: string;
|
|
91
105
|
leaseTtlMs?: number;
|
|
92
106
|
leaseBackend?: LeaseBackend;
|
|
107
|
+
leaseProvider?: string;
|
|
108
|
+
deviceKey?: string;
|
|
109
|
+
clientId?: string;
|
|
93
110
|
sessionIsolation?: SessionIsolationMode;
|
|
94
111
|
uploadedArtifactId?: string;
|
|
95
112
|
clientArtifactPaths?: Record<string, string>;
|
|
@@ -126,14 +143,14 @@ export declare type NormalizedBatchStep = {
|
|
|
126
143
|
command: string;
|
|
127
144
|
positionals: string[];
|
|
128
145
|
flags: Record<string, unknown>;
|
|
129
|
-
runtime?:
|
|
146
|
+
runtime?: DaemonRequest['runtime'];
|
|
130
147
|
};
|
|
131
148
|
|
|
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
|
-
export declare function runBatch(req: BatchRequest, sessionName: string, invoke: BatchInvoke): Promise<
|
|
153
|
+
export declare function runBatch(req: BatchRequest, sessionName: string, invoke: BatchInvoke): Promise<BatchRunResponse>;
|
|
137
154
|
|
|
138
155
|
declare const SESSION_ISOLATION_MODES: readonly ['none', 'tenant'];
|
|
139
156
|
|
package/dist/src/batch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _=100;export{BATCH_BLOCKED_COMMANDS,INHERITED_PARENT_FLAG_KEYS}from"./
|
|
1
|
+
var _=100;export{BATCH_BLOCKED_COMMANDS,INHERITED_PARENT_FLAG_KEYS}from"./5341.js";export{buildBatchStepFlags,runBatch,validateAndNormalizeBatchSteps}from"./6918.js";export{_ as DEFAULT_BATCH_MAX_STEPS};
|
package/dist/src/cli-help.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{listCliCommandNames as e}from"./
|
|
1
|
+
import{listCliCommandNames as e}from"./5341.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, 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
|
|
|
@@ -140,8 +140,9 @@ 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
|
-
|
|
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.
|
|
145
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+.
|
|
146
147
|
agent-device web setup
|
|
147
148
|
agent-device web doctor
|
|
@@ -153,12 +154,14 @@ 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
|
|
157
159
|
agent-device screenshot ./artifacts/web-home.png --platform web
|
|
158
160
|
agent-device screenshot ./artifacts/web-full.png --platform web --fullscreen
|
|
159
161
|
agent-device viewport 1280 900 --platform web
|
|
162
|
+
agent-device record stop --platform web
|
|
160
163
|
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.
|
|
164
|
+
Minimal web support is for browser sessions with open, snapshot, find, get, is, click/press, fill/type, wait, network dump, 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
165
|
macOS menu bar: open ... --platform macos --surface menubar; snapshot -i --platform macos --surface menubar.
|
|
163
166
|
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
167
|
agent-device test ./e2e/maestro --maestro --device udid1,emulator-5554 --shard-all 2
|
|
@@ -353,6 +356,7 @@ state. Do not use this as the default React Native profiler.
|
|
|
353
356
|
|
|
354
357
|
Setup:
|
|
355
358
|
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.
|
|
359
|
+
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
360
|
agent-device cdp target list --url http://127.0.0.1:8081
|
|
357
361
|
agent-device cdp target select <target-id>
|
|
358
362
|
|
|
@@ -410,7 +414,7 @@ React Native dev loop:
|
|
|
410
414
|
agent-device metro reload
|
|
411
415
|
agent-device find "Home"
|
|
412
416
|
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,
|
|
417
|
+
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
418
|
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
419
|
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
420
|
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 +498,25 @@ Android physical-device prerequisites:
|
|
|
494
498
|
Enable USB debugging and confirm the device appears in agent-device devices --platform android.
|
|
495
499
|
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
500
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
501
|
+
Remote connection providers use the same lifecycle:
|
|
502
|
+
connect -> open -> commands -> close -> disconnect
|
|
503
|
+
|
|
504
|
+
Providers:
|
|
505
|
+
Cloud: agent-device connect discovers the cloud profile.
|
|
506
|
+
Remote config: agent-device connect --remote-config ./remote-config.json uses a local profile.
|
|
507
|
+
Direct proxy: agent-device connect proxy --daemon-base-url <proxy-agent-device-url> stores the shared proxy profile and client identity.
|
|
500
508
|
|
|
501
509
|
Direct proxy flow for a remote Mac/simulator:
|
|
502
510
|
On the Mac with simulator/device access:
|
|
503
511
|
agent-device proxy --port 4310
|
|
504
512
|
cloudflared tunnel --url http://127.0.0.1:4310
|
|
505
513
|
On the remote client:
|
|
506
|
-
agent-device
|
|
507
|
-
agent-device
|
|
508
|
-
agent-device
|
|
509
|
-
agent-device
|
|
514
|
+
agent-device connect proxy --daemon-base-url https://example.trycloudflare.com/agent-device --daemon-auth-token <token>
|
|
515
|
+
agent-device devices --platform ios
|
|
516
|
+
agent-device open Maps --platform ios --device "iPhone 17 Pro"
|
|
517
|
+
agent-device snapshot -i --platform ios --device "iPhone 17 Pro"
|
|
518
|
+
agent-device close
|
|
519
|
+
agent-device disconnect
|
|
510
520
|
|
|
511
521
|
Cloud profile flow:
|
|
512
522
|
agent-device connect
|
|
@@ -528,11 +538,14 @@ Script flow, per-command config:
|
|
|
528
538
|
Rules:
|
|
529
539
|
connect and disconnect are top-level commands. Do not write agent-device remote connect or agent-device remote disconnect.
|
|
530
540
|
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
|
-
|
|
541
|
+
Prefer connect --remote-config over --daemon-base-url, --tenant, --run-id, and --lease-id when using a local profile.
|
|
542
|
+
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.
|
|
543
|
+
connect proxy stores the connection profile and client identity. Device leases are acquired on open and expire after five minutes without commands.
|
|
544
|
+
Multiple agents can share one proxy when each uses connect proxy, open, commands, close, and disconnect.
|
|
545
|
+
disconnect releases local connection state; close releases the active session and device lease.
|
|
546
|
+
A busy direct-proxy device error means another agent owns the device until it closes or its inactivity lease expires.
|
|
534
547
|
Keep the proxy token secret. Anyone with the token can control the proxied daemon.
|
|
535
|
-
If iOS
|
|
548
|
+
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
549
|
Do not use --config as a remote profile flag. --config loads CLI defaults; --remote-config selects remote daemon/profile settings.
|
|
537
550
|
For self-contained scripts, pass the same --remote-config to every operational command, including disconnect; a preceding connect is optional but not required.
|
|
538
551
|
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.
|
|
@@ -592,14 +605,16 @@ First-slice loop:
|
|
|
592
605
|
agent-device click @e12 --platform web
|
|
593
606
|
agent-device fill @e13 "qa@example.com" --platform web
|
|
594
607
|
agent-device wait text "Welcome" 3000 --platform web
|
|
608
|
+
agent-device record start ./artifacts/web-flow.webm --platform web
|
|
595
609
|
agent-device network dump 25 --include headers --platform web
|
|
596
610
|
agent-device screenshot ./artifacts/web-home.png --platform web
|
|
597
611
|
agent-device screenshot ./artifacts/web-full.png --platform web --fullscreen
|
|
598
612
|
agent-device viewport 1280 900 --platform web
|
|
613
|
+
agent-device record stop --platform web
|
|
599
614
|
agent-device close --platform web
|
|
600
615
|
|
|
601
616
|
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.
|
|
617
|
+
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, record start/stop with WebM output, close, and replay scripts made from those commands.
|
|
603
618
|
|
|
604
619
|
Out of scope for agent-device web support:
|
|
605
620
|
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 +679,39 @@ Rules:
|
|
|
664
679
|
Prefer refs for exploration and selectors for deterministic replay.
|
|
665
680
|
Use logs, network, screenshot --overlay-refs, trace, perf metrics, perf frames, or react-devtools only when they add evidence to a specific issue.
|
|
666
681
|
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
|
|
682
|
+
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 u(){let a,o,p,h,u,b,w,y,k;return a=`agent-device <command> [args] [--json]
|
|
668
683
|
|
|
669
|
-
CLI to
|
|
670
|
-
`,o=
|
|
684
|
+
CLI to automate supported app, device, desktop, and web targets for AI agents.
|
|
685
|
+
`,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:",m(s)),h=v("Agent Starting Point:",r),u=v("Agent Quickstart:",i),b=g("Agent Workflows:",n),w=v("Configuration:",c),y=g("Environment:",d),k=v("Examples:",l),`${a}
|
|
671
686
|
${h}
|
|
672
687
|
|
|
673
|
-
${
|
|
688
|
+
${b}
|
|
674
689
|
|
|
675
|
-
${
|
|
690
|
+
${o}
|
|
676
691
|
|
|
677
692
|
${p}
|
|
678
693
|
|
|
679
|
-
${
|
|
680
|
-
|
|
681
|
-
${b}
|
|
694
|
+
${u}
|
|
682
695
|
|
|
683
696
|
${w}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
697
|
+
|
|
698
|
+
${y}
|
|
699
|
+
|
|
700
|
+
${k}
|
|
701
|
+
`}function m(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}
|
|
702
|
+
(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}
|
|
703
|
+
(none)`:[e,...t.map(e=>` ${e}`)].join("\n")}function b(e){var t,s;let n,r=(n=p[e])?`${n.body}
|
|
687
704
|
|
|
688
705
|
Related:
|
|
689
706
|
agent-device help command list and global flags
|
|
690
707
|
agent-device help <command> command-specific flags
|
|
691
708
|
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(
|
|
709
|
+
`: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=m(new Set(i.allowedFlags??[])),l=[];d.length>0&&l.push(f("Command flags:",d));let u=l.length>0?`
|
|
693
710
|
|
|
694
|
-
${
|
|
711
|
+
${l.join("\n\n")}`:"";return`agent-device ${c}
|
|
695
712
|
|
|
696
713
|
${i.helpDescription}
|
|
697
714
|
|
|
698
715
|
Usage:
|
|
699
|
-
agent-device ${c}${
|
|
700
|
-
`}export{
|
|
716
|
+
agent-device ${c}${u}
|
|
717
|
+
`}export{b as buildCommandUsageText,u as buildUsageText};
|