agent-device 0.18.0 → 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.18.0.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.18.0.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.18.0.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.18.0.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/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 -1
- package/dist/src/9581.js +3 -3
- package/dist/src/9624.js +1 -1
- package/dist/src/9722.js +37 -32
- 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 +33 -25
- package/dist/src/batch.js +1 -1
- package/dist/src/cli-help.js +66 -16
- package/dist/src/cli.js +33 -21
- package/dist/src/contracts.d.ts +32 -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 +438 -171
- 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 +14 -16
- 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 -11
- package/dist/src/simulator.js +2 -2
- 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.18.0.apk.sha256 +0 -1
- package/android-snapshot-helper/README.md +0 -88
- package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.18.0.apk.sha256 +0 -1
- package/dist/src/1848.js +0 -4
- 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/5341.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/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/dist/src/device-ready.js +0 -2
- 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,32 +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 = {
|
|
16
14
|
ok: true;
|
|
17
15
|
data: BatchRunResult;
|
|
18
16
|
} | Extract<DaemonResponse, {
|
|
19
17
|
ok: false;
|
|
20
18
|
}>;
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
declare type BatchRunResult = Record<string, unknown> & {
|
|
23
21
|
total: number;
|
|
24
22
|
executed: number;
|
|
25
23
|
totalDurationMs: number;
|
|
26
24
|
results: BatchStepResult[];
|
|
27
25
|
};
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
declare type BatchStepResult = {
|
|
30
28
|
step: number;
|
|
31
29
|
command: string;
|
|
32
30
|
ok: true;
|
|
@@ -34,8 +32,6 @@ export declare type BatchStepResult = {
|
|
|
34
32
|
durationMs: number;
|
|
35
33
|
};
|
|
36
34
|
|
|
37
|
-
export declare function buildBatchStepFlags(parentFlags: BatchFlags | Record<string, unknown> | undefined, stepFlags: DaemonBatchStep['flags'] | Record<string, unknown> | undefined): BatchFlags;
|
|
38
|
-
|
|
39
35
|
declare const DAEMON_LOCK_POLICIES: readonly ['reject', 'strip'];
|
|
40
36
|
|
|
41
37
|
declare type DaemonArtifact = {
|
|
@@ -46,7 +42,7 @@ declare type DaemonArtifact = {
|
|
|
46
42
|
path?: string;
|
|
47
43
|
};
|
|
48
44
|
|
|
49
|
-
|
|
45
|
+
declare type DaemonBatchStep = {
|
|
50
46
|
command: string;
|
|
51
47
|
positionals?: string[];
|
|
52
48
|
flags?: Record<string, unknown>;
|
|
@@ -60,6 +56,18 @@ declare type DaemonError = {
|
|
|
60
56
|
diagnosticId?: string;
|
|
61
57
|
logPath?: string;
|
|
62
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;
|
|
63
71
|
};
|
|
64
72
|
|
|
65
73
|
declare type DaemonInstallSource = {
|
|
@@ -97,6 +105,8 @@ declare type DaemonRequest = {
|
|
|
97
105
|
declare type DaemonRequestMeta = {
|
|
98
106
|
requestId?: string;
|
|
99
107
|
debug?: boolean;
|
|
108
|
+
includeCost?: boolean;
|
|
109
|
+
responseLevel?: ResponseLevel;
|
|
100
110
|
cwd?: string;
|
|
101
111
|
sessionExplicit?: boolean;
|
|
102
112
|
tenantId?: string;
|
|
@@ -116,7 +126,7 @@ declare type DaemonRequestMeta = {
|
|
|
116
126
|
materializationId?: string;
|
|
117
127
|
lockPolicy?: DaemonLockPolicy;
|
|
118
128
|
lockPlatform?: PlatformSelector;
|
|
119
|
-
requestProgress?: 'replay-test';
|
|
129
|
+
requestProgress?: 'replay-test' | 'command';
|
|
120
130
|
};
|
|
121
131
|
|
|
122
132
|
declare type DaemonResponse = {
|
|
@@ -129,27 +139,27 @@ declare type DaemonResponse = {
|
|
|
129
139
|
|
|
130
140
|
declare type DaemonResponseData = Record<string, unknown> & {
|
|
131
141
|
artifacts?: DaemonArtifact[];
|
|
142
|
+
cost?: ResponseCost;
|
|
132
143
|
};
|
|
133
144
|
|
|
134
|
-
export declare const DEFAULT_BATCH_MAX_STEPS = 100;
|
|
135
|
-
|
|
136
|
-
export declare const INHERITED_PARENT_FLAG_KEYS: readonly ['platform', 'target', 'device', 'udid', 'serial', 'verbose', 'out'];
|
|
137
|
-
|
|
138
145
|
declare const LEASE_BACKENDS: readonly ['ios-simulator', 'ios-instance', 'android-instance'];
|
|
139
146
|
|
|
140
147
|
declare type LeaseBackend = (typeof LEASE_BACKENDS)[number];
|
|
141
148
|
|
|
142
|
-
export declare type NormalizedBatchStep = {
|
|
143
|
-
command: string;
|
|
144
|
-
positionals: string[];
|
|
145
|
-
flags: Record<string, unknown>;
|
|
146
|
-
runtime?: DaemonRequest['runtime'];
|
|
147
|
-
};
|
|
148
|
-
|
|
149
149
|
declare const PLATFORM_SELECTORS: readonly ["ios", "macos", "android", "linux", "web", "apple"];
|
|
150
150
|
|
|
151
151
|
declare type PlatformSelector = (typeof PLATFORM_SELECTORS)[number];
|
|
152
152
|
|
|
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
|
+
|
|
153
163
|
export declare function runBatch(req: BatchRequest, sessionName: string, invoke: BatchInvoke): Promise<BatchRunResponse>;
|
|
154
164
|
|
|
155
165
|
declare const SESSION_ISOLATION_MODES: readonly ['none', 'tenant'];
|
|
@@ -164,6 +174,4 @@ declare type SessionRuntimeHints = {
|
|
|
164
174
|
launchUrl?: string;
|
|
165
175
|
};
|
|
166
176
|
|
|
167
|
-
export declare function validateAndNormalizeBatchSteps(steps: unknown, maxSteps: number): NormalizedBatchStep[];
|
|
168
|
-
|
|
169
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.
|
|
@@ -143,7 +143,7 @@ Validation and evidence:
|
|
|
143
143
|
Remote lifecycle: cloud, remote-config, direct proxy, and limrun use the same flow: connect, open, commands, close, disconnect.
|
|
144
144
|
Remote config profile: agent-device connect --remote-config ./remote-config.json; then run normal commands and disconnect.
|
|
145
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+.
|
|
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.
|
|
147
147
|
agent-device web setup
|
|
148
148
|
agent-device web doctor
|
|
149
149
|
agent-device open https://example.com --platform web
|
|
@@ -156,13 +156,15 @@ Validation and evidence:
|
|
|
156
156
|
agent-device wait text "Welcome" 3000 --platform web
|
|
157
157
|
agent-device record start ./artifacts/web-flow.webm --platform web
|
|
158
158
|
agent-device network dump 25 --include headers --platform web
|
|
159
|
+
agent-device audio probe start 10 1000 --platform web
|
|
159
160
|
agent-device screenshot ./artifacts/web-home.png --platform web
|
|
160
161
|
agent-device screenshot ./artifacts/web-full.png --platform web --fullscreen
|
|
161
162
|
agent-device viewport 1280 900 --platform web
|
|
162
163
|
agent-device record stop --platform web
|
|
163
164
|
agent-device close --platform web
|
|
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.
|
|
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.
|
|
165
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.
|
|
166
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:
|
|
167
169
|
agent-device test ./e2e/maestro --maestro --device udid1,emulator-5554 --shard-all 2
|
|
168
170
|
|
|
@@ -216,6 +218,18 @@ Network:
|
|
|
216
218
|
Use this instead of logs path when the question is request/response metadata.
|
|
217
219
|
network log is a supported alias, but network dump --include headers is the clearest plan form. Do not write network log headers.
|
|
218
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
|
+
|
|
219
233
|
Crash symbolication:
|
|
220
234
|
Crash routing:
|
|
221
235
|
Use logs when you need the lead-up timeline before a failure.
|
|
@@ -224,7 +238,7 @@ Crash symbolication:
|
|
|
224
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:
|
|
225
239
|
agent-device debug symbols --artifact crash.log --dsym MyApp.dSYM --out crash-symbolicated.log
|
|
226
240
|
agent-device debug symbols --artifact crash.ips --search-path ./build --out crash-symbolicated.ips
|
|
227
|
-
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.
|
|
228
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.
|
|
229
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.
|
|
230
244
|
|
|
@@ -409,6 +423,11 @@ Choose the next help topic:
|
|
|
409
423
|
Remote/cloud config, leases, and local service tunnels: help remote.
|
|
410
424
|
|
|
411
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
|
|
412
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.
|
|
413
432
|
JS-only change with Metro connected:
|
|
414
433
|
agent-device metro reload
|
|
@@ -502,9 +521,16 @@ Remote connection providers use the same lifecycle:
|
|
|
502
521
|
connect -> open -> commands -> close -> disconnect
|
|
503
522
|
|
|
504
523
|
Providers:
|
|
505
|
-
Cloud: agent-device connect discovers the cloud profile.
|
|
524
|
+
Cloud: agent-device connect or agent-device connect cloud discovers the agent-device cloud profile.
|
|
506
525
|
Remote config: agent-device connect --remote-config ./remote-config.json uses a local profile.
|
|
507
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.
|
|
508
534
|
|
|
509
535
|
Direct proxy flow for a remote Mac/simulator:
|
|
510
536
|
On the Mac with simulator/device access:
|
|
@@ -524,6 +550,24 @@ Cloud profile flow:
|
|
|
524
550
|
agent-device snapshot
|
|
525
551
|
agent-device disconnect
|
|
526
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
|
+
|
|
527
571
|
Local profile flow:
|
|
528
572
|
agent-device connect --remote-config ./remote-config.json
|
|
529
573
|
agent-device open com.example.app
|
|
@@ -540,6 +584,10 @@ Rules:
|
|
|
540
584
|
Use connect without --remote-config when the cloud control plane owns the connection profile.
|
|
541
585
|
Prefer connect --remote-config over --daemon-base-url, --tenant, --run-id, and --lease-id when using a local profile.
|
|
542
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.
|
|
543
591
|
connect proxy stores the connection profile and client identity. Device leases are acquired on open and expire after five minutes without commands.
|
|
544
592
|
Multiple agents can share one proxy when each uses connect proxy, open, commands, close, and disconnect.
|
|
545
593
|
disconnect releases local connection state; close releases the active session and device lease.
|
|
@@ -595,6 +643,7 @@ Planning rule:
|
|
|
595
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.
|
|
596
644
|
|
|
597
645
|
First-slice loop:
|
|
646
|
+
Audio probe start uses duration seconds first, then bucket milliseconds.
|
|
598
647
|
agent-device web setup
|
|
599
648
|
agent-device web doctor
|
|
600
649
|
agent-device open https://example.com --platform web
|
|
@@ -607,6 +656,7 @@ First-slice loop:
|
|
|
607
656
|
agent-device wait text "Welcome" 3000 --platform web
|
|
608
657
|
agent-device record start ./artifacts/web-flow.webm --platform web
|
|
609
658
|
agent-device network dump 25 --include headers --platform web
|
|
659
|
+
agent-device audio probe start 10 1000 --platform web
|
|
610
660
|
agent-device screenshot ./artifacts/web-home.png --platform web
|
|
611
661
|
agent-device screenshot ./artifacts/web-full.png --platform web --fullscreen
|
|
612
662
|
agent-device viewport 1280 900 --platform web
|
|
@@ -614,7 +664,7 @@ First-slice loop:
|
|
|
614
664
|
agent-device close --platform web
|
|
615
665
|
|
|
616
666
|
Supported in agent-device web sessions:
|
|
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.
|
|
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.
|
|
618
668
|
|
|
619
669
|
Out of scope for agent-device web support:
|
|
620
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.
|
|
@@ -679,10 +729,10 @@ Rules:
|
|
|
679
729
|
Prefer refs for exploration and selectors for deterministic replay.
|
|
680
730
|
Use logs, network, screenshot --overlay-refs, trace, perf metrics, perf frames, or react-devtools only when they add evidence to a specific issue.
|
|
681
731
|
Never delete screenshots, videos, traces, or report artifacts during a session.
|
|
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
|
|
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]
|
|
683
733
|
|
|
684
734
|
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:",
|
|
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}
|
|
686
736
|
${h}
|
|
687
737
|
|
|
688
738
|
${b}
|
|
@@ -691,14 +741,14 @@ ${o}
|
|
|
691
741
|
|
|
692
742
|
${p}
|
|
693
743
|
|
|
694
|
-
${
|
|
744
|
+
${m}
|
|
695
745
|
|
|
696
746
|
${w}
|
|
697
747
|
|
|
698
748
|
${y}
|
|
699
749
|
|
|
700
750
|
${k}
|
|
701
|
-
`}function
|
|
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}
|
|
702
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}
|
|
703
753
|
(none)`:[e,...t.map(e=>` ${e}`)].join("\n")}function b(e){var t,s;let n,r=(n=p[e])?`${n.body}
|
|
704
754
|
|
|
@@ -706,12 +756,12 @@ Related:
|
|
|
706
756
|
agent-device help command list and global flags
|
|
707
757
|
agent-device help <command> command-specific flags
|
|
708
758
|
agent-device help workflow normal app automation loop
|
|
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=
|
|
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?`
|
|
710
760
|
|
|
711
761
|
${l.join("\n\n")}`:"";return`agent-device ${c}
|
|
712
762
|
|
|
713
763
|
${i.helpDescription}
|
|
714
764
|
|
|
715
765
|
Usage:
|
|
716
|
-
agent-device ${c}${
|
|
717
|
-
`}export{b as buildCommandUsageText,
|
|
766
|
+
agent-device ${c}${m}
|
|
767
|
+
`}export{b as buildCommandUsageText,m as buildUsageText};
|