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/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
declare type AgentDeviceClient = {
|
|
2
2
|
command: AgentDeviceCommandClient;
|
|
3
3
|
devices: {
|
|
4
4
|
list: (options?: AgentDeviceRequestOverrides & AgentDeviceSelectionOptions) => Promise<AgentDeviceDevice[]>;
|
|
5
|
-
boot: (options?: DeviceBootOptions) => Promise<
|
|
6
|
-
shutdown: (options?: DeviceShutdownOptions) => Promise<
|
|
5
|
+
boot: (options?: DeviceBootOptions) => Promise<CommandResult<'boot'>>;
|
|
6
|
+
shutdown: (options?: DeviceShutdownOptions) => Promise<CommandResult<'shutdown'>>;
|
|
7
7
|
};
|
|
8
8
|
sessions: {
|
|
9
9
|
list: (options?: AgentDeviceRequestOverrides) => Promise<AgentDeviceSession[]>;
|
|
@@ -11,9 +11,10 @@ export declare type AgentDeviceClient = {
|
|
|
11
11
|
close: (options?: AgentDeviceRequestOverrides & {
|
|
12
12
|
shutdown?: boolean;
|
|
13
13
|
}) => Promise<SessionCloseResult>;
|
|
14
|
+
artifacts: (options?: CloudArtifactsOptions) => Promise<CloudArtifactsResult>;
|
|
14
15
|
};
|
|
15
16
|
apps: {
|
|
16
|
-
install: (options:
|
|
17
|
+
install: (options: AppInstallOptions) => Promise<AppDeployResult>;
|
|
17
18
|
reinstall: (options: AppDeployOptions) => Promise<AppDeployResult>;
|
|
18
19
|
installFromSource: (options: AppInstallFromSourceOptions) => Promise<AppInstallFromSourceResult>;
|
|
19
20
|
list: (options?: AppListOptions) => Promise<string[]>;
|
|
@@ -30,6 +31,7 @@ export declare type AgentDeviceClient = {
|
|
|
30
31
|
heartbeat: (options: LeaseScopedOptions) => Promise<Lease>;
|
|
31
32
|
release: (options: LeaseScopedOptions) => Promise<{
|
|
32
33
|
released: boolean;
|
|
34
|
+
provider?: CloudProviderSessionResult;
|
|
33
35
|
}>;
|
|
34
36
|
};
|
|
35
37
|
metro: {
|
|
@@ -65,12 +67,13 @@ export declare type AgentDeviceClient = {
|
|
|
65
67
|
test: (options: ReplayTestOptions) => Promise<CommandRequestResult>;
|
|
66
68
|
};
|
|
67
69
|
batch: {
|
|
68
|
-
run: (options: BatchRunOptions) => Promise<
|
|
70
|
+
run: (options: BatchRunOptions) => Promise<BatchRunResult>;
|
|
69
71
|
};
|
|
70
72
|
observability: {
|
|
71
73
|
perf: (options?: PerfOptions) => Promise<CommandRequestResult>;
|
|
72
74
|
logs: (options?: LogsOptions) => Promise<CommandRequestResult>;
|
|
73
75
|
network: (options?: NetworkOptions) => Promise<CommandRequestResult>;
|
|
76
|
+
audio: (options?: AudioOptions) => Promise<CommandRequestResult>;
|
|
74
77
|
};
|
|
75
78
|
debug: {
|
|
76
79
|
symbols: (options: DebugSymbolsOptions) => Promise<DebugSymbolsResult>;
|
|
@@ -84,47 +87,43 @@ export declare type AgentDeviceClient = {
|
|
|
84
87
|
};
|
|
85
88
|
};
|
|
86
89
|
|
|
87
|
-
|
|
90
|
+
declare type AgentDeviceClientConfig = RemoteConnectionProfileFields & CloudProviderProfileFields & {
|
|
88
91
|
session?: string;
|
|
89
92
|
lockPolicy?: DaemonLockPolicy;
|
|
90
93
|
lockPlatform?: PlatformSelector;
|
|
91
94
|
requestId?: string;
|
|
92
|
-
stateDir?: string;
|
|
93
|
-
daemonBaseUrl?: string;
|
|
94
|
-
daemonAuthToken?: string;
|
|
95
|
-
daemonTransport?: DaemonTransportPreference;
|
|
96
|
-
daemonServerMode?: DaemonServerMode;
|
|
97
|
-
tenant?: string;
|
|
98
95
|
sessionIsolation?: SessionIsolationMode;
|
|
99
|
-
runId?: string;
|
|
100
|
-
leaseId?: string;
|
|
101
96
|
leaseBackend?: LeaseBackend;
|
|
97
|
+
leaseTtlMs?: number;
|
|
102
98
|
runtime?: SessionRuntimeHints;
|
|
103
99
|
cwd?: string;
|
|
104
100
|
debug?: boolean;
|
|
101
|
+
cost?: boolean;
|
|
102
|
+
responseLevel?: ResponseLevel;
|
|
105
103
|
iosXctestrunFile?: string;
|
|
106
104
|
iosXctestDerivedDataPath?: string;
|
|
107
105
|
iosXctestEnvDir?: string;
|
|
108
106
|
};
|
|
109
107
|
|
|
110
|
-
|
|
111
|
-
wait: (options: WaitCommandOptions) => Promise<
|
|
112
|
-
alert: (options?: AlertCommandOptions) => Promise<
|
|
113
|
-
appState: (options?: AppStateCommandOptions) => Promise<
|
|
114
|
-
back: (options?: BackCommandOptions) => Promise<
|
|
115
|
-
home: (options?: HomeCommandOptions) => Promise<
|
|
116
|
-
rotate: (options: RotateCommandOptions) => Promise<
|
|
117
|
-
appSwitcher: (options?: AppSwitcherCommandOptions) => Promise<
|
|
118
|
-
keyboard: (options?: KeyboardCommandOptions) => Promise<
|
|
119
|
-
clipboard: (options: ClipboardCommandOptions) => Promise<
|
|
108
|
+
declare type AgentDeviceCommandClient = {
|
|
109
|
+
wait: (options: WaitCommandOptions) => Promise<CommandRequestResult>;
|
|
110
|
+
alert: (options?: AlertCommandOptions) => Promise<CommandRequestResult>;
|
|
111
|
+
appState: (options?: AppStateCommandOptions) => Promise<CommandResult<'appstate'>>;
|
|
112
|
+
back: (options?: BackCommandOptions) => Promise<CommandResult<'back'>>;
|
|
113
|
+
home: (options?: HomeCommandOptions) => Promise<CommandResult<'home'>>;
|
|
114
|
+
rotate: (options: RotateCommandOptions) => Promise<CommandResult<'rotate'>>;
|
|
115
|
+
appSwitcher: (options?: AppSwitcherCommandOptions) => Promise<CommandResult<'app-switcher'>>;
|
|
116
|
+
keyboard: (options?: KeyboardCommandOptions) => Promise<CommandResult<'keyboard'>>;
|
|
117
|
+
clipboard: (options: ClipboardCommandOptions) => Promise<CommandResult<'clipboard'>>;
|
|
120
118
|
reactNative: (options: ReactNativeCommandOptions) => Promise<CommandRequestResult>;
|
|
119
|
+
doctor: (options?: DoctorCommandOptions) => Promise<CommandRequestResult>;
|
|
121
120
|
prepare: (options: PrepareCommandOptions) => Promise<CommandRequestResult>;
|
|
122
|
-
viewport: (options: ViewportCommandOptions) => Promise<
|
|
121
|
+
viewport: (options: ViewportCommandOptions) => Promise<CommandResult<'viewport'>>;
|
|
123
122
|
};
|
|
124
123
|
|
|
125
|
-
|
|
124
|
+
declare type AgentDeviceDaemonTransport = (req: Omit<DaemonRequest, 'token'>) => Promise<DaemonResponse>;
|
|
126
125
|
|
|
127
|
-
|
|
126
|
+
declare type AgentDeviceDevice = {
|
|
128
127
|
platform: Platform;
|
|
129
128
|
target: DeviceTarget;
|
|
130
129
|
kind: DeviceKind;
|
|
@@ -140,7 +139,7 @@ export declare type AgentDeviceDevice = {
|
|
|
140
139
|
};
|
|
141
140
|
};
|
|
142
141
|
|
|
143
|
-
|
|
142
|
+
declare type AgentDeviceIdentifiers = {
|
|
144
143
|
session?: string;
|
|
145
144
|
deviceId?: string;
|
|
146
145
|
deviceName?: string;
|
|
@@ -151,9 +150,9 @@ export declare type AgentDeviceIdentifiers = {
|
|
|
151
150
|
package?: string;
|
|
152
151
|
};
|
|
153
152
|
|
|
154
|
-
|
|
153
|
+
declare type AgentDeviceRequestOverrides = Pick<AgentDeviceClientConfig, 'session' | 'lockPolicy' | 'lockPlatform' | 'requestId' | 'daemonBaseUrl' | 'daemonAuthToken' | 'daemonTransport' | 'daemonServerMode' | 'tenant' | 'sessionIsolation' | 'runId' | 'leaseId' | 'leaseBackend' | 'leaseProvider' | 'deviceKey' | 'clientId' | 'providerApp' | 'providerOsVersion' | 'providerProject' | 'providerBuild' | 'providerSessionName' | 'awsProjectArn' | 'awsDeviceArn' | 'awsAppArn' | 'awsRegion' | 'awsInteractionMode' | 'leaseTtlMs' | 'cwd' | 'debug' | 'cost' | 'responseLevel' | 'iosXctestrunFile' | 'iosXctestDerivedDataPath' | 'iosXctestEnvDir'>;
|
|
155
154
|
|
|
156
|
-
|
|
155
|
+
declare type AgentDeviceSelectionOptions = {
|
|
157
156
|
platform?: PlatformSelector;
|
|
158
157
|
target?: DeviceTarget;
|
|
159
158
|
device?: string;
|
|
@@ -163,7 +162,7 @@ export declare type AgentDeviceSelectionOptions = {
|
|
|
163
162
|
androidDeviceAllowlist?: string;
|
|
164
163
|
};
|
|
165
164
|
|
|
166
|
-
|
|
165
|
+
declare type AgentDeviceSession = {
|
|
167
166
|
name: string;
|
|
168
167
|
createdAt: number;
|
|
169
168
|
sessionStateDir?: string;
|
|
@@ -172,7 +171,7 @@ export declare type AgentDeviceSession = {
|
|
|
172
171
|
identifiers: AgentDeviceIdentifiers;
|
|
173
172
|
};
|
|
174
173
|
|
|
175
|
-
|
|
174
|
+
declare type AgentDeviceSessionDevice = {
|
|
176
175
|
platform: Platform;
|
|
177
176
|
target: DeviceTarget;
|
|
178
177
|
id: string;
|
|
@@ -189,40 +188,13 @@ export declare type AgentDeviceSessionDevice = {
|
|
|
189
188
|
|
|
190
189
|
declare const ALERT_ACTIONS: readonly ['get', 'accept', 'dismiss', 'wait'];
|
|
191
190
|
|
|
192
|
-
|
|
191
|
+
declare type AlertAction = (typeof ALERT_ACTIONS)[number];
|
|
193
192
|
|
|
194
|
-
|
|
193
|
+
declare type AlertCommandOptions = DeviceCommandBaseOptions & {
|
|
195
194
|
action?: AlertAction;
|
|
196
195
|
timeoutMs?: number;
|
|
197
196
|
};
|
|
198
197
|
|
|
199
|
-
export declare type AlertCommandResult = DaemonResponseData & {
|
|
200
|
-
kind?: 'alertStatus' | 'alertHandled' | 'alertWait';
|
|
201
|
-
action?: AlertCommandOptions['action'];
|
|
202
|
-
alert?: AlertInfo | null;
|
|
203
|
-
handled?: boolean;
|
|
204
|
-
button?: string;
|
|
205
|
-
waitedMs?: number;
|
|
206
|
-
timedOut?: boolean;
|
|
207
|
-
platform?: AlertInfo['platform'];
|
|
208
|
-
accepted?: boolean;
|
|
209
|
-
dismissed?: boolean;
|
|
210
|
-
items?: string[];
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
export declare type AlertInfo = {
|
|
214
|
-
title?: string;
|
|
215
|
-
message?: string;
|
|
216
|
-
buttons?: string[];
|
|
217
|
-
platform?: AlertPlatform;
|
|
218
|
-
source?: AlertSource;
|
|
219
|
-
packageName?: string;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
export declare type AlertPlatform = 'android' | 'ios' | 'macos';
|
|
223
|
-
|
|
224
|
-
export declare type AlertSource = 'permission' | 'native-dialog' | 'system-dialog';
|
|
225
|
-
|
|
226
198
|
declare type AndroidSnapshotBackendMetadata = {
|
|
227
199
|
backend: 'android-helper' | 'uiautomator-dump';
|
|
228
200
|
helperVersion?: string;
|
|
@@ -250,24 +222,24 @@ declare type AndroidSnapshotHelperInstallReason = 'missing' | 'outdated' | 'forc
|
|
|
250
222
|
|
|
251
223
|
declare type AndroidSnapshotHelperTransport = 'instrumentation' | 'persistent-session';
|
|
252
224
|
|
|
253
|
-
|
|
225
|
+
declare type AppCloseOptions = AgentDeviceRequestOverrides & {
|
|
254
226
|
app?: string;
|
|
255
227
|
shutdown?: boolean;
|
|
256
228
|
};
|
|
257
229
|
|
|
258
|
-
|
|
230
|
+
declare type AppCloseResult = {
|
|
259
231
|
session: string;
|
|
260
232
|
closedApp?: string;
|
|
261
|
-
shutdown?:
|
|
233
|
+
shutdown?: TargetShutdownResult;
|
|
262
234
|
identifiers: AgentDeviceIdentifiers;
|
|
263
235
|
};
|
|
264
236
|
|
|
265
|
-
|
|
237
|
+
declare type AppDeployOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
266
238
|
app: string;
|
|
267
239
|
appPath: string;
|
|
268
240
|
};
|
|
269
241
|
|
|
270
|
-
|
|
242
|
+
declare type AppDeployResult = {
|
|
271
243
|
app: string;
|
|
272
244
|
appPath: string;
|
|
273
245
|
platform: Platform;
|
|
@@ -284,7 +256,7 @@ export declare class AppError extends Error {
|
|
|
284
256
|
constructor(code: AppErrorCode, message: string, details?: AppErrorDetails, cause?: unknown);
|
|
285
257
|
}
|
|
286
258
|
|
|
287
|
-
|
|
259
|
+
declare type AppErrorCode = KnownAppErrorCode | (string & {});
|
|
288
260
|
|
|
289
261
|
declare type AppErrorDetails = Record<string, unknown> & {
|
|
290
262
|
hint?: string;
|
|
@@ -292,13 +264,13 @@ declare type AppErrorDetails = Record<string, unknown> & {
|
|
|
292
264
|
logPath?: string;
|
|
293
265
|
};
|
|
294
266
|
|
|
295
|
-
|
|
267
|
+
declare type AppInstallFromSourceOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
296
268
|
source: DaemonInstallSource;
|
|
297
269
|
retainPaths?: boolean;
|
|
298
270
|
retentionMs?: number;
|
|
299
271
|
};
|
|
300
272
|
|
|
301
|
-
|
|
273
|
+
declare type AppInstallFromSourceResult = {
|
|
302
274
|
appName?: string;
|
|
303
275
|
appId?: string;
|
|
304
276
|
bundleId?: string;
|
|
@@ -311,11 +283,16 @@ export declare type AppInstallFromSourceResult = {
|
|
|
311
283
|
identifiers: AgentDeviceIdentifiers;
|
|
312
284
|
};
|
|
313
285
|
|
|
314
|
-
|
|
286
|
+
declare type AppInstallOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
287
|
+
app?: string;
|
|
288
|
+
appPath: string;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
declare type AppListOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
315
292
|
appsFilter?: AppsFilter;
|
|
316
293
|
};
|
|
317
294
|
|
|
318
|
-
|
|
295
|
+
declare type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
319
296
|
app?: string;
|
|
320
297
|
url?: string;
|
|
321
298
|
surface?: SessionSurface;
|
|
@@ -329,7 +306,7 @@ export declare type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSe
|
|
|
329
306
|
runtime?: SessionRuntimeHints;
|
|
330
307
|
};
|
|
331
308
|
|
|
332
|
-
|
|
309
|
+
declare type AppOpenResult = {
|
|
333
310
|
session: string;
|
|
334
311
|
sessionStateDir?: string;
|
|
335
312
|
runnerLogPath?: string;
|
|
@@ -343,41 +320,62 @@ export declare type AppOpenResult = {
|
|
|
343
320
|
identifiers: AgentDeviceIdentifiers;
|
|
344
321
|
};
|
|
345
322
|
|
|
346
|
-
|
|
323
|
+
declare type AppPushOptions = DeviceCommandBaseOptions & {
|
|
347
324
|
app: string;
|
|
348
325
|
payload: string | Record<string, unknown>;
|
|
349
326
|
};
|
|
350
327
|
|
|
351
328
|
declare type AppsFilter = 'user-installed' | 'all';
|
|
352
329
|
|
|
353
|
-
|
|
330
|
+
declare type AppStateCommandOptions = DeviceCommandBaseOptions;
|
|
354
331
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
332
|
+
/**
|
|
333
|
+
* Closed result of the `appstate` command, grounded in the daemon handler's
|
|
334
|
+
* success returns (src/daemon/handlers/session-state.ts `handleAppStateCommand`).
|
|
335
|
+
* A discriminated union on `platform`:
|
|
336
|
+
* - Apple (`ios` / `macos`) session state, with iOS-only device locators that
|
|
337
|
+
* the previous hand-written mirror omitted; and
|
|
338
|
+
* - Android foreground `package` / `activity`.
|
|
339
|
+
*
|
|
340
|
+
* The handler returns one of these fixed objects (errors take the `ok: false`
|
|
341
|
+
* path), so each branch is closed.
|
|
342
|
+
*/
|
|
343
|
+
declare type AppStateCommandResult = {
|
|
344
|
+
platform: 'ios' | 'macos';
|
|
345
|
+
appName: string;
|
|
358
346
|
appBundleId?: string;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
347
|
+
source: 'session';
|
|
348
|
+
surface: SessionSurface;
|
|
349
|
+
/** iOS only — the session device's UDID. */
|
|
350
|
+
device_udid?: string;
|
|
351
|
+
/** iOS only — the simulator set path, or `null` when unknown. */
|
|
352
|
+
ios_simulator_device_set?: string | null;
|
|
353
|
+
} | {
|
|
354
|
+
platform: 'android';
|
|
355
|
+
package: string;
|
|
356
|
+
activity: string;
|
|
363
357
|
};
|
|
364
358
|
|
|
365
|
-
|
|
359
|
+
declare type AppSwitcherCommandOptions = DeviceCommandBaseOptions;
|
|
366
360
|
|
|
367
|
-
|
|
361
|
+
/** `app-switcher` — `{ action: 'app-switcher', message: 'Opened app switcher' }`. */
|
|
362
|
+
declare type AppSwitcherCommandResult = {
|
|
363
|
+
action: 'app-switcher';
|
|
364
|
+
message: string;
|
|
365
|
+
};
|
|
368
366
|
|
|
369
|
-
|
|
367
|
+
declare type AppTriggerEventOptions = DeviceCommandBaseOptions & {
|
|
370
368
|
event: string;
|
|
371
369
|
payload?: Record<string, unknown>;
|
|
372
370
|
};
|
|
373
371
|
|
|
374
|
-
|
|
372
|
+
declare type ArtifactAdapter = {
|
|
375
373
|
resolveInput(ref: FileInputRef, options: ResolveInputOptions): Promise<ResolvedInputFile>;
|
|
376
374
|
reserveOutput(ref: FileOutputRef | undefined, options: ReserveOutputOptions): Promise<ReservedOutputFile>;
|
|
377
375
|
createTempFile(options: CreateTempFileOptions): Promise<TemporaryFile>;
|
|
378
376
|
};
|
|
379
377
|
|
|
380
|
-
|
|
378
|
+
declare type ArtifactDescriptor = {
|
|
381
379
|
kind: 'localPath';
|
|
382
380
|
field: string;
|
|
383
381
|
path: string;
|
|
@@ -393,52 +391,95 @@ export declare type ArtifactDescriptor = {
|
|
|
393
391
|
metadata?: Record<string, unknown>;
|
|
394
392
|
};
|
|
395
393
|
|
|
394
|
+
declare type AudioOptions = AgentDeviceRequestOverrides & {
|
|
395
|
+
action?: 'probe';
|
|
396
|
+
probeAction?: 'start' | 'status' | 'stop';
|
|
397
|
+
durationMs?: number;
|
|
398
|
+
bucketMs?: number;
|
|
399
|
+
};
|
|
400
|
+
|
|
396
401
|
declare const BACK_MODES: readonly ['in-app', 'system'];
|
|
397
402
|
|
|
398
|
-
|
|
403
|
+
declare type BackCommandOptions = DeviceCommandBaseOptions & {
|
|
399
404
|
mode?: BackMode;
|
|
400
405
|
};
|
|
401
406
|
|
|
402
|
-
|
|
403
|
-
|
|
407
|
+
/** `back` — `{ action: 'back', mode, message: 'Back' }`; `mode` defaults to `'in-app'`. */
|
|
408
|
+
declare type BackCommandResult = {
|
|
409
|
+
action: 'back';
|
|
410
|
+
mode: BackMode;
|
|
411
|
+
message: string;
|
|
404
412
|
};
|
|
405
413
|
|
|
406
414
|
declare type BackMode = (typeof BACK_MODES)[number];
|
|
407
415
|
|
|
408
|
-
|
|
416
|
+
declare type BatchRunOptions = AgentDeviceRequestOverrides & {
|
|
409
417
|
steps: BatchStep[];
|
|
410
418
|
onError?: 'stop';
|
|
411
419
|
maxSteps?: number;
|
|
412
420
|
out?: string;
|
|
413
421
|
};
|
|
414
422
|
|
|
415
|
-
|
|
423
|
+
declare type BatchRunResult = Record<string, unknown> & {
|
|
424
|
+
total: number;
|
|
425
|
+
executed: number;
|
|
426
|
+
totalDurationMs: number;
|
|
427
|
+
results: BatchStepResult[];
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
declare type BatchStep = {
|
|
416
431
|
command: string;
|
|
417
432
|
input: Record<string, unknown>;
|
|
418
|
-
runtime?:
|
|
433
|
+
runtime?: SessionRuntimeHints;
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
declare type BatchStepResult = {
|
|
437
|
+
step: number;
|
|
438
|
+
command: string;
|
|
439
|
+
ok: true;
|
|
440
|
+
data: Record<string, unknown>;
|
|
441
|
+
durationMs: number;
|
|
419
442
|
};
|
|
420
443
|
|
|
421
|
-
|
|
444
|
+
/**
|
|
445
|
+
* Closed result of the `boot` command. Mirrors the daemon handler's only
|
|
446
|
+
* success return EXACTLY (src/daemon/handlers/session-state.ts) — the fixed
|
|
447
|
+
* object literal `{ platform, target, device, id, kind, booted }`. The handler
|
|
448
|
+
* spreads nothing, so this shape is intentionally closed.
|
|
449
|
+
*/
|
|
450
|
+
declare type BootCommandResult = {
|
|
451
|
+
platform: Platform;
|
|
452
|
+
target: DeviceTarget;
|
|
453
|
+
/** Human-readable device name (`device.name`). */
|
|
454
|
+
device: string;
|
|
455
|
+
/** Stable device id (`device.id`). */
|
|
456
|
+
id: string;
|
|
457
|
+
kind: DeviceKind;
|
|
458
|
+
/** Always `true` on the success path. */
|
|
459
|
+
booted: true;
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
declare type CaptureDiffOptions = DeviceCommandBaseOptions & Pick<CaptureSnapshotOptions, 'interactiveOnly' | 'depth' | 'scope' | 'raw'> & {
|
|
422
463
|
kind: 'snapshot';
|
|
423
464
|
out?: string;
|
|
424
465
|
};
|
|
425
466
|
|
|
426
|
-
|
|
467
|
+
declare type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
|
|
427
468
|
path?: string;
|
|
428
469
|
overlayRefs?: boolean;
|
|
429
470
|
fullscreen?: boolean;
|
|
430
471
|
maxSize?: number;
|
|
431
472
|
stabilize?: boolean;
|
|
473
|
+
normalizeStatusBar?: boolean;
|
|
432
474
|
surface?: SessionSurface;
|
|
433
475
|
};
|
|
434
476
|
|
|
435
|
-
|
|
477
|
+
declare type CaptureScreenshotResult = ScreenshotResultData & {
|
|
436
478
|
path: string;
|
|
437
|
-
overlayRefs?: ScreenshotOverlayRef[];
|
|
438
479
|
identifiers: AgentDeviceIdentifiers;
|
|
439
480
|
};
|
|
440
481
|
|
|
441
|
-
|
|
482
|
+
declare type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
442
483
|
interactiveOnly?: boolean;
|
|
443
484
|
depth?: number;
|
|
444
485
|
scope?: string;
|
|
@@ -447,7 +488,7 @@ export declare type CaptureSnapshotOptions = AgentDeviceRequestOverrides & Agent
|
|
|
447
488
|
timeoutMs?: number;
|
|
448
489
|
};
|
|
449
490
|
|
|
450
|
-
|
|
491
|
+
declare type CaptureSnapshotResult = {
|
|
451
492
|
nodes: SnapshotNode[];
|
|
452
493
|
truncated: boolean;
|
|
453
494
|
appName?: string;
|
|
@@ -464,30 +505,130 @@ declare const CLICK_BUTTONS: readonly ['primary', 'secondary', 'middle'];
|
|
|
464
505
|
|
|
465
506
|
declare type ClickButton = (typeof CLICK_BUTTONS)[number];
|
|
466
507
|
|
|
467
|
-
|
|
508
|
+
declare type ClickOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions & {
|
|
468
509
|
button?: ClickButton;
|
|
469
510
|
};
|
|
470
511
|
|
|
471
|
-
|
|
512
|
+
declare type ClipboardCommandOptions = (DeviceCommandBaseOptions & {
|
|
472
513
|
action: 'read';
|
|
473
514
|
}) | (DeviceCommandBaseOptions & {
|
|
474
515
|
action: 'write';
|
|
475
516
|
text: string;
|
|
476
517
|
});
|
|
477
518
|
|
|
478
|
-
|
|
519
|
+
/**
|
|
520
|
+
* Closed result of the `clipboard` command. Mirrors the dispatch handler's
|
|
521
|
+
* literal return EXACTLY (src/core/dispatch.ts `handleClipboardCommand`): a
|
|
522
|
+
* discriminated union on `action`. `read` returns the clipboard `text`; `write`
|
|
523
|
+
* reports the written `textLength` plus the `successText` message. The handler
|
|
524
|
+
* spreads nothing else, so each branch is closed.
|
|
525
|
+
*/
|
|
526
|
+
declare type ClipboardCommandResult = {
|
|
479
527
|
action: 'read';
|
|
480
528
|
text: string;
|
|
481
|
-
}
|
|
529
|
+
} | {
|
|
482
530
|
action: 'write';
|
|
483
531
|
textLength: number;
|
|
484
|
-
|
|
532
|
+
message: string;
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
declare const CLOUD_ARTIFACT_KINDS: readonly ['video', 'appium-log', 'device-log', 'automation-log', 'provider-session', 'raw'];
|
|
485
536
|
|
|
486
|
-
declare type
|
|
487
|
-
|
|
537
|
+
declare type CloudArtifact = {
|
|
538
|
+
provider: string;
|
|
539
|
+
kind: CloudArtifactKind;
|
|
540
|
+
name: string;
|
|
541
|
+
url?: string;
|
|
542
|
+
providerSessionId?: string;
|
|
543
|
+
providerArtifactId?: string;
|
|
544
|
+
contentType?: string;
|
|
545
|
+
extension?: string;
|
|
546
|
+
availability?: CloudArtifactAvailability;
|
|
547
|
+
metadata?: Record<string, unknown>;
|
|
488
548
|
};
|
|
489
549
|
|
|
490
|
-
|
|
550
|
+
declare type CloudArtifactAvailability = 'ready' | 'pending' | 'unavailable' | 'expired';
|
|
551
|
+
|
|
552
|
+
declare type CloudArtifactKind = (typeof CLOUD_ARTIFACT_KINDS)[number];
|
|
553
|
+
|
|
554
|
+
declare type CloudArtifactsOptions = AgentDeviceRequestOverrides & {
|
|
555
|
+
provider?: string;
|
|
556
|
+
providerSessionId?: string;
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
declare type CloudArtifactsResult = {
|
|
560
|
+
provider: string;
|
|
561
|
+
status: CloudArtifactsStatus;
|
|
562
|
+
cloudArtifacts: CloudArtifact[];
|
|
563
|
+
providerSessionId?: string;
|
|
564
|
+
message?: string;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
declare type CloudArtifactsStatus = 'ready' | 'pending' | 'unavailable';
|
|
568
|
+
|
|
569
|
+
declare type CloudProviderProfileFields = {
|
|
570
|
+
providerApp?: string;
|
|
571
|
+
providerOsVersion?: string;
|
|
572
|
+
providerProject?: string;
|
|
573
|
+
providerBuild?: string;
|
|
574
|
+
providerSessionName?: string;
|
|
575
|
+
awsProjectArn?: string;
|
|
576
|
+
awsDeviceArn?: string;
|
|
577
|
+
awsAppArn?: string;
|
|
578
|
+
awsRegion?: string;
|
|
579
|
+
awsInteractionMode?: 'INTERACTIVE' | 'NO_VIDEO' | 'VIDEO_ONLY';
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
declare type CloudProviderSessionResult = {
|
|
583
|
+
provider?: string;
|
|
584
|
+
providerSessionId?: string;
|
|
585
|
+
cloudArtifacts?: CloudArtifactsResult;
|
|
586
|
+
} & Record<string, unknown>;
|
|
587
|
+
|
|
588
|
+
declare type CommandRequestResult = DaemonResponseData;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* The typed result for a command named `N`. Seeded commands resolve to their
|
|
592
|
+
* contract result type from {@link CommandResultMap}; every other (unmigrated)
|
|
593
|
+
* command falls back to the untyped `Record<string, unknown>` bag. That default
|
|
594
|
+
* branch is what keeps the mapping total over every command name, so consumers
|
|
595
|
+
* can switch to `CommandResult<Name>` without first migrating every command.
|
|
596
|
+
*/
|
|
597
|
+
declare type CommandResult<N extends string> = N extends keyof CommandResultMap ? CommandResultMap[N] : Record<string, unknown>;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* The additive typed-result spine (ADR-0008, Phase 1 step 6).
|
|
601
|
+
*
|
|
602
|
+
* Maps a command name to the per-command result type from `src/contracts/*`. It
|
|
603
|
+
* is SEEDED, not exhaustive: a command is listed here only once its accurate,
|
|
604
|
+
* closed result shape lives in the contracts layer. Commands whose daemon
|
|
605
|
+
* handler spreads dynamic/Record data (screenshot overlays, gesture
|
|
606
|
+
* visualization, perf, logs, …) are deliberately omitted rather than given an
|
|
607
|
+
* invented shape.
|
|
608
|
+
*
|
|
609
|
+
* Batches 1-2 wired `boot` / `shutdown` / `viewport` and the navigation/action
|
|
610
|
+
* commands `home` / `back` / `rotate` / `app-switcher` alongside the seed
|
|
611
|
+
* interaction trio. Batch 3 adds `clipboard` (a closed `read`/`write` union) and
|
|
612
|
+
* `appstate` (a closed `platform` union — Apple session state with the iOS-only
|
|
613
|
+
* device locators, or Android package/activity). Batch 4 adds `keyboard` (a
|
|
614
|
+
* closed flat shape). Each entry is grounded in a
|
|
615
|
+
* re-read of the handler's literal return; see the per-type docstrings.
|
|
616
|
+
*/
|
|
617
|
+
declare interface CommandResultMap {
|
|
618
|
+
press: PressCommandResult;
|
|
619
|
+
fill: FillCommandResult;
|
|
620
|
+
longpress: LongPressCommandResult;
|
|
621
|
+
boot: BootCommandResult;
|
|
622
|
+
shutdown: ShutdownCommandResult;
|
|
623
|
+
viewport: ViewportCommandResult;
|
|
624
|
+
home: HomeCommandResult;
|
|
625
|
+
back: BackCommandResult;
|
|
626
|
+
rotate: RotateCommandResult;
|
|
627
|
+
'app-switcher': AppSwitcherCommandResult;
|
|
628
|
+
clipboard: ClipboardCommandResult;
|
|
629
|
+
appstate: AppStateCommandResult;
|
|
630
|
+
keyboard: KeyboardCommandResult;
|
|
631
|
+
}
|
|
491
632
|
|
|
492
633
|
declare type CompanionTunnelScope = {
|
|
493
634
|
tenantId: string;
|
|
@@ -501,7 +642,7 @@ export declare function createAgentDeviceClient(config?: AgentDeviceClientConfig
|
|
|
501
642
|
|
|
502
643
|
export declare function createLocalArtifactAdapter(options?: LocalArtifactAdapterOptions): ArtifactAdapter;
|
|
503
644
|
|
|
504
|
-
|
|
645
|
+
declare type CreateTempFileOptions = {
|
|
505
646
|
prefix: string;
|
|
506
647
|
ext: string;
|
|
507
648
|
};
|
|
@@ -527,6 +668,18 @@ declare type DaemonError = {
|
|
|
527
668
|
diagnosticId?: string;
|
|
528
669
|
logPath?: string;
|
|
529
670
|
details?: Record<string, unknown>;
|
|
671
|
+
/**
|
|
672
|
+
* Machine-readable typed-error signals (Phase 2). Additive: present only when
|
|
673
|
+
* derivable, so the default error wire shape is unchanged.
|
|
674
|
+
*
|
|
675
|
+
* `retriable` flags a transient failure an agent should retry (vs. a
|
|
676
|
+
* deterministic one where a retry is wasted). `supportedOn` lists the platform
|
|
677
|
+
* families that DO support the command (derived from the capability matrix),
|
|
678
|
+
* surfaced on platform-mismatch errors so an agent self-corrects without a
|
|
679
|
+
* wasted round-trip.
|
|
680
|
+
*/
|
|
681
|
+
retriable?: boolean;
|
|
682
|
+
supportedOn?: string;
|
|
530
683
|
};
|
|
531
684
|
|
|
532
685
|
declare type DaemonInstallSource = {
|
|
@@ -564,6 +717,8 @@ declare type DaemonRequest = {
|
|
|
564
717
|
declare type DaemonRequestMeta = {
|
|
565
718
|
requestId?: string;
|
|
566
719
|
debug?: boolean;
|
|
720
|
+
includeCost?: boolean;
|
|
721
|
+
responseLevel?: ResponseLevel;
|
|
567
722
|
cwd?: string;
|
|
568
723
|
sessionExplicit?: boolean;
|
|
569
724
|
tenantId?: string;
|
|
@@ -571,6 +726,9 @@ declare type DaemonRequestMeta = {
|
|
|
571
726
|
leaseId?: string;
|
|
572
727
|
leaseTtlMs?: number;
|
|
573
728
|
leaseBackend?: LeaseBackend;
|
|
729
|
+
leaseProvider?: string;
|
|
730
|
+
deviceKey?: string;
|
|
731
|
+
clientId?: string;
|
|
574
732
|
sessionIsolation?: SessionIsolationMode;
|
|
575
733
|
uploadedArtifactId?: string;
|
|
576
734
|
clientArtifactPaths?: Record<string, string>;
|
|
@@ -580,7 +738,7 @@ declare type DaemonRequestMeta = {
|
|
|
580
738
|
materializationId?: string;
|
|
581
739
|
lockPolicy?: DaemonLockPolicy;
|
|
582
740
|
lockPlatform?: PlatformSelector;
|
|
583
|
-
requestProgress?: 'replay-test';
|
|
741
|
+
requestProgress?: 'replay-test' | 'command';
|
|
584
742
|
};
|
|
585
743
|
|
|
586
744
|
declare type DaemonResponse = {
|
|
@@ -593,6 +751,7 @@ declare type DaemonResponse = {
|
|
|
593
751
|
|
|
594
752
|
declare type DaemonResponseData = Record<string, unknown> & {
|
|
595
753
|
artifacts?: DaemonArtifact[];
|
|
754
|
+
cost?: ResponseCost;
|
|
596
755
|
};
|
|
597
756
|
|
|
598
757
|
declare type DaemonServerMode = (typeof DAEMON_SERVER_MODES)[number];
|
|
@@ -657,7 +816,7 @@ declare const DEVICE_ROTATIONS: readonly ['portrait', 'portrait-upside-down', 'l
|
|
|
657
816
|
|
|
658
817
|
declare const DEVICE_TARGETS: readonly ['mobile', 'tv', 'desktop'];
|
|
659
818
|
|
|
660
|
-
|
|
819
|
+
declare type DeviceBootOptions = DeviceCommandBaseOptions & {
|
|
661
820
|
headless?: boolean;
|
|
662
821
|
};
|
|
663
822
|
|
|
@@ -667,13 +826,18 @@ declare type DeviceKind = (typeof DEVICE_KINDS)[number];
|
|
|
667
826
|
|
|
668
827
|
declare type DeviceRotation = (typeof DEVICE_ROTATIONS)[number];
|
|
669
828
|
|
|
670
|
-
|
|
829
|
+
declare type DeviceShutdownOptions = DeviceCommandBaseOptions;
|
|
671
830
|
|
|
672
831
|
declare type DeviceTarget = (typeof DEVICE_TARGETS)[number];
|
|
673
832
|
|
|
674
|
-
|
|
833
|
+
declare type DoctorCommandOptions = DeviceCommandBaseOptions & {
|
|
834
|
+
targetApp?: string;
|
|
835
|
+
remote?: boolean;
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
declare type ElementTarget = RefTarget | SelectorTarget;
|
|
675
839
|
|
|
676
|
-
|
|
840
|
+
declare type FileInputRef = {
|
|
677
841
|
kind: 'path';
|
|
678
842
|
path: string;
|
|
679
843
|
} | {
|
|
@@ -681,7 +845,7 @@ export declare type FileInputRef = {
|
|
|
681
845
|
id: string;
|
|
682
846
|
};
|
|
683
847
|
|
|
684
|
-
|
|
848
|
+
declare type FileOutputRef = {
|
|
685
849
|
kind: 'path';
|
|
686
850
|
path: string;
|
|
687
851
|
} | {
|
|
@@ -690,7 +854,14 @@ export declare type FileOutputRef = {
|
|
|
690
854
|
fileName?: string;
|
|
691
855
|
};
|
|
692
856
|
|
|
693
|
-
|
|
857
|
+
declare type FillCommandResult = ResolvedInteractionTarget & {
|
|
858
|
+
text: string;
|
|
859
|
+
warning?: string;
|
|
860
|
+
backendResult?: Record<string, unknown>;
|
|
861
|
+
message?: string;
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
declare type FillOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & {
|
|
694
865
|
text: string;
|
|
695
866
|
delayMs?: number;
|
|
696
867
|
};
|
|
@@ -704,9 +875,9 @@ declare type FindBaseOptions = DeviceCommandBaseOptions & FindSnapshotCommandOpt
|
|
|
704
875
|
last?: boolean;
|
|
705
876
|
};
|
|
706
877
|
|
|
707
|
-
|
|
878
|
+
declare type FindLocator = (typeof FIND_LOCATORS)[number];
|
|
708
879
|
|
|
709
|
-
|
|
880
|
+
declare type FindOptions = (FindBaseOptions & {
|
|
710
881
|
action?: 'click' | 'focus' | 'exists' | 'getText' | 'getAttrs';
|
|
711
882
|
}) | (FindBaseOptions & {
|
|
712
883
|
action: 'wait';
|
|
@@ -730,21 +901,33 @@ declare type FocusOptions_2 = DeviceCommandBaseOptions & {
|
|
|
730
901
|
x: number;
|
|
731
902
|
y: number;
|
|
732
903
|
};
|
|
733
|
-
export { FocusOptions_2 as FocusOptions }
|
|
734
904
|
|
|
735
|
-
|
|
905
|
+
declare type GetOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & ElementTarget & {
|
|
736
906
|
format: 'text' | 'attrs';
|
|
737
907
|
};
|
|
738
908
|
|
|
739
|
-
|
|
909
|
+
declare type HomeCommandOptions = DeviceCommandBaseOptions;
|
|
740
910
|
|
|
741
|
-
|
|
911
|
+
/**
|
|
912
|
+
* Closed results of the navigation/global action commands. Each mirrors the
|
|
913
|
+
* dispatch handler's literal return EXACTLY (src/core/dispatch.ts
|
|
914
|
+
* `DISPATCH_HANDLERS`): a fixed `action` discriminant plus the always-present
|
|
915
|
+
* `successText` message (the handlers always pass a non-empty message, so it is
|
|
916
|
+
* required here). The handlers spread nothing else, so the shapes are closed —
|
|
917
|
+
* consistent with the `viewport` contract, the generic-dispatch Android
|
|
918
|
+
* dialog-recovery `warning` annotation is intentionally not part of the contract.
|
|
919
|
+
*/
|
|
920
|
+
/** `home` — `{ action: 'home', message: 'Home' }`. */
|
|
921
|
+
declare type HomeCommandResult = {
|
|
922
|
+
action: 'home';
|
|
923
|
+
message: string;
|
|
924
|
+
};
|
|
742
925
|
|
|
743
|
-
|
|
926
|
+
declare type InteractionTarget = PointTarget | RefTarget | SelectorTarget;
|
|
744
927
|
|
|
745
928
|
export declare function isAgentDeviceError(err: unknown): err is AppError;
|
|
746
929
|
|
|
747
|
-
|
|
930
|
+
declare type IsOptions = IsTextPredicateOptions | IsStatePredicateOptions;
|
|
748
931
|
|
|
749
932
|
declare type IsStatePredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & {
|
|
750
933
|
predicate: 'visible' | 'hidden' | 'exists' | 'editable' | 'selected';
|
|
@@ -758,23 +941,38 @@ declare type IsTextPredicateOptions = DeviceCommandBaseOptions & SelectorSnapsho
|
|
|
758
941
|
value: string;
|
|
759
942
|
};
|
|
760
943
|
|
|
761
|
-
|
|
944
|
+
declare type KeyboardCommandOptions = DeviceCommandBaseOptions & {
|
|
762
945
|
action?: 'status' | 'dismiss' | 'enter' | 'return';
|
|
763
946
|
};
|
|
764
947
|
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
948
|
+
/**
|
|
949
|
+
* Closed result of the `keyboard` command, grounded in the dispatch handlers'
|
|
950
|
+
* literal returns (src/core/dispatch.ts `handleAndroidKeyboardCommand` /
|
|
951
|
+
* `handleIosKeyboardCommand`).
|
|
952
|
+
*
|
|
953
|
+
* `platform` and `action` are always present; the remaining fields appear per
|
|
954
|
+
* branch (Android `status`/`dismiss` carry the keyboard-state fields; `enter`
|
|
955
|
+
* and iOS `dismiss` carry a `message`). It is kept as a flat closed shape rather
|
|
956
|
+
* than a five-way `platform`×`action` union because the per-branch field sets
|
|
957
|
+
* overlap heavily and the underlying Android keyboard-state types live in the
|
|
958
|
+
* platform layer (below the public contract). The `Record` index signature of
|
|
959
|
+
* the previous hand-written mirror is dropped, and the spurious `| null`s are
|
|
960
|
+
* removed (the handler never returns `null` for these).
|
|
961
|
+
*/
|
|
962
|
+
declare type KeyboardCommandResult = {
|
|
963
|
+
platform: 'android' | 'ios';
|
|
964
|
+
action: 'status' | 'dismiss' | 'enter';
|
|
768
965
|
visible?: boolean;
|
|
769
|
-
inputType?: string | null;
|
|
770
|
-
inputMethodPackage?: string | null;
|
|
771
|
-
type?: string | null;
|
|
772
|
-
focusedPackage?: string | null;
|
|
773
|
-
focusedResourceId?: string | null;
|
|
774
|
-
inputOwner?: 'app' | 'ime' | 'unknown';
|
|
775
966
|
wasVisible?: boolean;
|
|
776
967
|
dismissed?: boolean;
|
|
777
968
|
attempts?: number;
|
|
969
|
+
inputType?: string;
|
|
970
|
+
type?: 'text' | 'number' | 'email' | 'phone' | 'password' | 'datetime' | 'unknown';
|
|
971
|
+
inputMethodPackage?: string;
|
|
972
|
+
focusedPackage?: string;
|
|
973
|
+
focusedResourceId?: string;
|
|
974
|
+
inputOwner?: 'app' | 'ime' | 'unknown';
|
|
975
|
+
message?: string;
|
|
778
976
|
};
|
|
779
977
|
|
|
780
978
|
declare type KnownAppErrorCode = 'INVALID_ARGS' | 'DEVICE_NOT_FOUND' | 'DEVICE_IN_USE' | 'TOOL_MISSING' | 'APP_NOT_INSTALLED' | 'UNSUPPORTED_PLATFORM' | 'UNSUPPORTED_OPERATION' | 'NOT_IMPLEMENTED' | 'COMMAND_FAILED' | 'SESSION_NOT_FOUND' | 'UNAUTHORIZED' | 'AMBIGUOUS_MATCH' | 'UNKNOWN';
|
|
@@ -784,6 +982,9 @@ declare type Lease = {
|
|
|
784
982
|
tenantId: string;
|
|
785
983
|
runId: string;
|
|
786
984
|
backend: LeaseBackend;
|
|
985
|
+
leaseProvider?: string;
|
|
986
|
+
deviceKey?: string;
|
|
987
|
+
clientId?: string;
|
|
787
988
|
createdAt?: number;
|
|
788
989
|
heartbeatAt?: number;
|
|
789
990
|
expiresAt?: number;
|
|
@@ -795,11 +996,15 @@ declare type LeaseAllocateOptions = LeaseOptions & {
|
|
|
795
996
|
tenant: string;
|
|
796
997
|
runId: string;
|
|
797
998
|
leaseBackend?: LeaseBackend;
|
|
999
|
+
leaseProvider?: string;
|
|
1000
|
+
provider?: string;
|
|
1001
|
+
deviceKey?: string;
|
|
1002
|
+
clientId?: string;
|
|
798
1003
|
};
|
|
799
1004
|
|
|
800
1005
|
declare type LeaseBackend = (typeof LEASE_BACKENDS)[number];
|
|
801
1006
|
|
|
802
|
-
declare type LeaseOptions = AgentDeviceRequestOverrides & {
|
|
1007
|
+
declare type LeaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
803
1008
|
ttlMs?: number;
|
|
804
1009
|
};
|
|
805
1010
|
|
|
@@ -807,9 +1012,14 @@ declare type LeaseScopedOptions = LeaseOptions & {
|
|
|
807
1012
|
tenant?: string;
|
|
808
1013
|
runId?: string;
|
|
809
1014
|
leaseId: string;
|
|
1015
|
+
leaseBackend?: LeaseBackend;
|
|
1016
|
+
leaseProvider?: string;
|
|
1017
|
+
provider?: string;
|
|
1018
|
+
deviceKey?: string;
|
|
1019
|
+
clientId?: string;
|
|
810
1020
|
};
|
|
811
1021
|
|
|
812
|
-
|
|
1022
|
+
declare type LocalArtifactAdapterOptions = {
|
|
813
1023
|
cwd?: string;
|
|
814
1024
|
tempDir?: string;
|
|
815
1025
|
rootDir?: string;
|
|
@@ -819,21 +1029,27 @@ declare const LOG_ACTION_VALUES: readonly ['path', 'start', 'stop', 'doctor', 'm
|
|
|
819
1029
|
|
|
820
1030
|
declare type LogAction = (typeof LOG_ACTION_VALUES)[number];
|
|
821
1031
|
|
|
822
|
-
|
|
1032
|
+
declare type LogsOptions = AgentDeviceRequestOverrides & {
|
|
823
1033
|
action?: LogAction;
|
|
824
1034
|
message?: string;
|
|
825
1035
|
restart?: boolean;
|
|
826
1036
|
};
|
|
827
1037
|
|
|
828
|
-
|
|
1038
|
+
declare type LongPressCommandResult = ResolvedInteractionTarget & {
|
|
1039
|
+
durationMs?: number;
|
|
1040
|
+
backendResult?: Record<string, unknown>;
|
|
1041
|
+
message?: string;
|
|
1042
|
+
};
|
|
1043
|
+
|
|
1044
|
+
declare type LongPressOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & {
|
|
829
1045
|
durationMs?: number;
|
|
830
1046
|
};
|
|
831
1047
|
|
|
832
|
-
|
|
1048
|
+
declare type MaterializationReleaseOptions = AgentDeviceRequestOverrides & {
|
|
833
1049
|
materializationId: string;
|
|
834
1050
|
};
|
|
835
1051
|
|
|
836
|
-
|
|
1052
|
+
declare type MaterializationReleaseResult = {
|
|
837
1053
|
released: boolean;
|
|
838
1054
|
materializationId: string;
|
|
839
1055
|
identifiers: AgentDeviceIdentifiers;
|
|
@@ -864,7 +1080,7 @@ declare type MetroBridgeScope = CompanionTunnelScope;
|
|
|
864
1080
|
|
|
865
1081
|
declare type MetroPrepareKind = 'auto' | 'react-native' | 'expo';
|
|
866
1082
|
|
|
867
|
-
|
|
1083
|
+
declare type MetroPrepareOptions = {
|
|
868
1084
|
projectRoot?: string;
|
|
869
1085
|
kind?: MetroPrepareKind;
|
|
870
1086
|
publicBaseUrl?: string;
|
|
@@ -885,16 +1101,16 @@ export declare type MetroPrepareOptions = {
|
|
|
885
1101
|
logPath?: string;
|
|
886
1102
|
};
|
|
887
1103
|
|
|
888
|
-
|
|
1104
|
+
declare type MetroPrepareResult = PrepareMetroRuntimeResult;
|
|
889
1105
|
|
|
890
|
-
|
|
1106
|
+
declare type MetroReloadOptions = {
|
|
891
1107
|
metroHost?: string;
|
|
892
1108
|
metroPort?: number;
|
|
893
1109
|
bundleUrl?: string;
|
|
894
1110
|
timeoutMs?: number;
|
|
895
1111
|
};
|
|
896
1112
|
|
|
897
|
-
|
|
1113
|
+
declare type MetroReloadResult = ReloadMetroResult;
|
|
898
1114
|
|
|
899
1115
|
/** Re-export of {@link SessionRuntimeHints} under the Metro-specific alias used by public API consumers. */
|
|
900
1116
|
declare type MetroRuntimeHints = SessionRuntimeHints;
|
|
@@ -903,7 +1119,7 @@ declare const NETWORK_INCLUDE_MODES: readonly ['summary', 'headers', 'body', 'al
|
|
|
903
1119
|
|
|
904
1120
|
declare type NetworkIncludeMode = (typeof NETWORK_INCLUDE_MODES)[number];
|
|
905
1121
|
|
|
906
|
-
|
|
1122
|
+
declare type NetworkOptions = AgentDeviceRequestOverrides & {
|
|
907
1123
|
action?: 'dump' | 'log';
|
|
908
1124
|
limit?: number;
|
|
909
1125
|
include?: NetworkIncludeMode;
|
|
@@ -914,7 +1130,7 @@ export declare function normalizeAgentDeviceError(err: unknown, context?: {
|
|
|
914
1130
|
logPath?: string;
|
|
915
1131
|
}): NormalizedError;
|
|
916
1132
|
|
|
917
|
-
|
|
1133
|
+
declare type NormalizedError = {
|
|
918
1134
|
code: string;
|
|
919
1135
|
message: string;
|
|
920
1136
|
hint?: string;
|
|
@@ -923,7 +1139,7 @@ export declare type NormalizedError = {
|
|
|
923
1139
|
details?: Record<string, unknown>;
|
|
924
1140
|
};
|
|
925
1141
|
|
|
926
|
-
|
|
1142
|
+
declare type OutputVisibility = 'client-visible' | 'internal';
|
|
927
1143
|
|
|
928
1144
|
declare type PanOptions = DeviceCommandBaseOptions & {
|
|
929
1145
|
x: number;
|
|
@@ -947,7 +1163,7 @@ declare type PerfArea = (typeof PERF_AREA_VALUES)[number];
|
|
|
947
1163
|
|
|
948
1164
|
declare type PerfKind = (typeof PERF_KIND_VALUES)[number];
|
|
949
1165
|
|
|
950
|
-
|
|
1166
|
+
declare type PerfOptions = DeviceCommandBaseOptions & {
|
|
951
1167
|
area?: PerfArea;
|
|
952
1168
|
subject?: PerfSubject;
|
|
953
1169
|
action?: PerfAction;
|
|
@@ -959,9 +1175,9 @@ export declare type PerfOptions = DeviceCommandBaseOptions & {
|
|
|
959
1175
|
|
|
960
1176
|
declare type PerfSubject = (typeof PERF_SUBJECT_VALUES)[number];
|
|
961
1177
|
|
|
962
|
-
|
|
1178
|
+
declare type PermissionTarget = 'camera' | 'microphone' | 'photos' | 'contacts' | 'contacts-limited' | 'notifications' | 'calendar' | 'location' | 'location-always' | 'media-library' | 'motion' | 'reminders' | 'siri' | 'accessibility' | 'screen-recording' | 'input-monitoring';
|
|
963
1179
|
|
|
964
|
-
|
|
1180
|
+
declare type PinchOptions = DeviceCommandBaseOptions & {
|
|
965
1181
|
scale: number;
|
|
966
1182
|
x?: number;
|
|
967
1183
|
y?: number;
|
|
@@ -975,7 +1191,7 @@ declare const PLATFORMS: readonly ['ios', 'macos', 'android', 'linux', 'web'];
|
|
|
975
1191
|
|
|
976
1192
|
declare type PlatformSelector = (typeof PLATFORM_SELECTORS)[number];
|
|
977
1193
|
|
|
978
|
-
|
|
1194
|
+
declare type Point = {
|
|
979
1195
|
x: number;
|
|
980
1196
|
y: number;
|
|
981
1197
|
};
|
|
@@ -1009,7 +1225,12 @@ declare type PrepareMetroRuntimeResult = {
|
|
|
1009
1225
|
bridge: MetroBridgeResult | null;
|
|
1010
1226
|
};
|
|
1011
1227
|
|
|
1012
|
-
|
|
1228
|
+
declare type PressCommandResult = ResolvedInteractionTarget & {
|
|
1229
|
+
backendResult?: Record<string, unknown>;
|
|
1230
|
+
message?: string;
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1233
|
+
declare type PressOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions;
|
|
1013
1234
|
|
|
1014
1235
|
declare type PublicSnapshotCaptureAnnotations = Pick<SnapshotCaptureAnnotations, 'androidSnapshot' | 'warnings'> & {
|
|
1015
1236
|
snapshotQuality?: SnapshotQualityVerdict;
|
|
@@ -1050,7 +1271,7 @@ declare const RECORDING_EXPORT_QUALITIES: readonly ['medium', 'high'];
|
|
|
1050
1271
|
|
|
1051
1272
|
declare type RecordingExportQuality = (typeof RECORDING_EXPORT_QUALITIES)[number];
|
|
1052
1273
|
|
|
1053
|
-
|
|
1274
|
+
declare type RecordOptions = AgentDeviceRequestOverrides & {
|
|
1054
1275
|
action: 'start' | 'stop';
|
|
1055
1276
|
path?: string;
|
|
1056
1277
|
fps?: number;
|
|
@@ -1059,7 +1280,7 @@ export declare type RecordOptions = AgentDeviceRequestOverrides & {
|
|
|
1059
1280
|
hideTouches?: boolean;
|
|
1060
1281
|
};
|
|
1061
1282
|
|
|
1062
|
-
|
|
1283
|
+
declare type Rect = {
|
|
1063
1284
|
x: number;
|
|
1064
1285
|
y: number;
|
|
1065
1286
|
width: number;
|
|
@@ -1081,6 +1302,22 @@ declare type ReloadMetroResult = {
|
|
|
1081
1302
|
body: string;
|
|
1082
1303
|
};
|
|
1083
1304
|
|
|
1305
|
+
declare type RemoteConnectionProfileFields = {
|
|
1306
|
+
stateDir?: string;
|
|
1307
|
+
daemonBaseUrl?: string;
|
|
1308
|
+
daemonAuthToken?: string;
|
|
1309
|
+
daemonTransport?: DaemonTransportPreference;
|
|
1310
|
+
daemonServerMode?: DaemonServerMode;
|
|
1311
|
+
tenant?: string;
|
|
1312
|
+
sessionIsolation?: SessionIsolationMode;
|
|
1313
|
+
runId?: string;
|
|
1314
|
+
leaseId?: string;
|
|
1315
|
+
leaseBackend?: LeaseBackend;
|
|
1316
|
+
leaseProvider?: string;
|
|
1317
|
+
deviceKey?: string;
|
|
1318
|
+
clientId?: string;
|
|
1319
|
+
};
|
|
1320
|
+
|
|
1084
1321
|
declare type RepeatedPressOptions = {
|
|
1085
1322
|
count?: number;
|
|
1086
1323
|
intervalMs?: number;
|
|
@@ -1089,7 +1326,7 @@ declare type RepeatedPressOptions = {
|
|
|
1089
1326
|
doubleTap?: boolean;
|
|
1090
1327
|
};
|
|
1091
1328
|
|
|
1092
|
-
|
|
1329
|
+
declare type ReplayRunOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
1093
1330
|
path: string;
|
|
1094
1331
|
update?: boolean;
|
|
1095
1332
|
/** @deprecated Use backend: 'maestro'. */
|
|
@@ -1099,7 +1336,7 @@ export declare type ReplayRunOptions = AgentDeviceRequestOverrides & AgentDevice
|
|
|
1099
1336
|
timeoutMs?: number;
|
|
1100
1337
|
};
|
|
1101
1338
|
|
|
1102
|
-
|
|
1339
|
+
declare type ReplayTestOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
1103
1340
|
paths: string[];
|
|
1104
1341
|
update?: boolean;
|
|
1105
1342
|
/** @deprecated Use backend: 'maestro'. */
|
|
@@ -1111,43 +1348,88 @@ export declare type ReplayTestOptions = AgentDeviceRequestOverrides & AgentDevic
|
|
|
1111
1348
|
retries?: number;
|
|
1112
1349
|
recordVideo?: boolean;
|
|
1113
1350
|
artifactsDir?: string;
|
|
1351
|
+
/** @deprecated Use the CLI --reporter junit:<path> or --report-junit <path>. */
|
|
1114
1352
|
reportJunit?: string;
|
|
1115
1353
|
shardAll?: number;
|
|
1116
1354
|
shardSplit?: number;
|
|
1117
1355
|
};
|
|
1118
1356
|
|
|
1119
|
-
|
|
1357
|
+
declare type ReservedOutputFile = {
|
|
1120
1358
|
path: string;
|
|
1121
1359
|
visibility: OutputVisibility;
|
|
1122
1360
|
publish: () => Promise<ArtifactDescriptor | undefined>;
|
|
1123
1361
|
cleanup?: () => Promise<void>;
|
|
1124
1362
|
};
|
|
1125
1363
|
|
|
1126
|
-
|
|
1364
|
+
declare type ReserveOutputOptions = {
|
|
1127
1365
|
field: string;
|
|
1128
1366
|
ext: string;
|
|
1129
1367
|
requestedClientPath?: string;
|
|
1130
1368
|
visibility?: OutputVisibility;
|
|
1131
1369
|
};
|
|
1132
1370
|
|
|
1133
|
-
|
|
1371
|
+
declare type ResolvedInputFile = {
|
|
1134
1372
|
path: string;
|
|
1135
1373
|
cleanup?: () => Promise<void>;
|
|
1136
1374
|
};
|
|
1137
1375
|
|
|
1376
|
+
declare type ResolvedInteractionTarget = {
|
|
1377
|
+
kind: 'point';
|
|
1378
|
+
point: Point;
|
|
1379
|
+
} | {
|
|
1380
|
+
kind: 'ref';
|
|
1381
|
+
point?: Point;
|
|
1382
|
+
target: Extract<ResolvedTarget, {
|
|
1383
|
+
kind: 'ref';
|
|
1384
|
+
}>;
|
|
1385
|
+
node?: SnapshotNode;
|
|
1386
|
+
selectorChain?: string[];
|
|
1387
|
+
refLabel?: string;
|
|
1388
|
+
} | {
|
|
1389
|
+
kind: 'selector';
|
|
1390
|
+
point: Point;
|
|
1391
|
+
target: Extract<ResolvedTarget, {
|
|
1392
|
+
kind: 'selector';
|
|
1393
|
+
}>;
|
|
1394
|
+
node: SnapshotNode;
|
|
1395
|
+
selectorChain: string[];
|
|
1396
|
+
refLabel?: string;
|
|
1397
|
+
};
|
|
1398
|
+
|
|
1138
1399
|
declare type ResolvedMetroKind = Exclude<MetroPrepareKind, 'auto'>;
|
|
1139
1400
|
|
|
1140
|
-
|
|
1401
|
+
declare type ResolvedTarget = {
|
|
1402
|
+
kind: 'selector';
|
|
1403
|
+
selector: string;
|
|
1404
|
+
} | {
|
|
1405
|
+
kind: 'ref';
|
|
1406
|
+
ref: string;
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
declare type ResolveInputOptions = {
|
|
1141
1410
|
usage: string;
|
|
1142
1411
|
field?: string;
|
|
1143
1412
|
};
|
|
1144
1413
|
|
|
1145
|
-
|
|
1414
|
+
declare const RESPONSE_LEVELS: readonly ['digest', 'default', 'full'];
|
|
1415
|
+
|
|
1416
|
+
declare type ResponseCost = {
|
|
1417
|
+
wallClockMs: number;
|
|
1418
|
+
runnerRoundTrips: number;
|
|
1419
|
+
nodeCount?: number;
|
|
1420
|
+
};
|
|
1421
|
+
|
|
1422
|
+
declare type ResponseLevel = (typeof RESPONSE_LEVELS)[number];
|
|
1423
|
+
|
|
1424
|
+
declare type RotateCommandOptions = DeviceCommandBaseOptions & {
|
|
1146
1425
|
orientation: DeviceRotation;
|
|
1147
1426
|
};
|
|
1148
1427
|
|
|
1149
|
-
|
|
1150
|
-
|
|
1428
|
+
/** `rotate` — `{ action: 'rotate', orientation, message: 'Rotated to <orientation>' }`. */
|
|
1429
|
+
declare type RotateCommandResult = {
|
|
1430
|
+
action: 'rotate';
|
|
1431
|
+
orientation: DeviceRotation;
|
|
1432
|
+
message: string;
|
|
1151
1433
|
};
|
|
1152
1434
|
|
|
1153
1435
|
declare type RotateGestureOptions = DeviceCommandBaseOptions & {
|
|
@@ -1157,7 +1439,7 @@ declare type RotateGestureOptions = DeviceCommandBaseOptions & {
|
|
|
1157
1439
|
velocity?: number;
|
|
1158
1440
|
};
|
|
1159
1441
|
|
|
1160
|
-
|
|
1442
|
+
declare type ScreenshotOverlayRef = {
|
|
1161
1443
|
ref: string;
|
|
1162
1444
|
label?: string;
|
|
1163
1445
|
rect: Rect;
|
|
@@ -1165,6 +1447,11 @@ export declare type ScreenshotOverlayRef = {
|
|
|
1165
1447
|
center: Point;
|
|
1166
1448
|
};
|
|
1167
1449
|
|
|
1450
|
+
declare type ScreenshotResultData = {
|
|
1451
|
+
path?: string;
|
|
1452
|
+
overlayRefs?: ScreenshotOverlayRef[];
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1168
1455
|
declare const SCROLL_DIRECTIONS: readonly ['up', 'down', 'left', 'right'];
|
|
1169
1456
|
|
|
1170
1457
|
declare const SCROLL_INPUT_DIRECTIONS: readonly ['up', 'down', 'left', 'right', 'top', 'bottom'];
|
|
@@ -1179,7 +1466,6 @@ declare type ScrollOptions_2 = DeviceCommandBaseOptions & {
|
|
|
1179
1466
|
pixels?: number;
|
|
1180
1467
|
durationMs?: number;
|
|
1181
1468
|
};
|
|
1182
|
-
export { ScrollOptions_2 as ScrollOptions }
|
|
1183
1469
|
|
|
1184
1470
|
declare type SelectorSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'scope' | 'raw'>;
|
|
1185
1471
|
|
|
@@ -1195,9 +1481,10 @@ declare const SESSION_ISOLATION_MODES: readonly ['none', 'tenant'];
|
|
|
1195
1481
|
|
|
1196
1482
|
declare const SESSION_SURFACES: readonly ['app', 'frontmost-app', 'desktop', 'menubar'];
|
|
1197
1483
|
|
|
1198
|
-
|
|
1484
|
+
declare type SessionCloseResult = {
|
|
1199
1485
|
session: string;
|
|
1200
|
-
shutdown?:
|
|
1486
|
+
shutdown?: TargetShutdownResult;
|
|
1487
|
+
provider?: CloudProviderSessionResult;
|
|
1201
1488
|
identifiers: AgentDeviceIdentifiers;
|
|
1202
1489
|
};
|
|
1203
1490
|
|
|
@@ -1213,7 +1500,7 @@ declare type SessionRuntimeHints = {
|
|
|
1213
1500
|
|
|
1214
1501
|
declare type SessionSurface = (typeof SESSION_SURFACES)[number];
|
|
1215
1502
|
|
|
1216
|
-
|
|
1503
|
+
declare type SettingsUpdateOptions = (DeviceCommandBaseOptions & {
|
|
1217
1504
|
setting: 'clear-app-state';
|
|
1218
1505
|
state: 'clear';
|
|
1219
1506
|
app?: string;
|
|
@@ -1244,6 +1531,23 @@ export declare type SettingsUpdateOptions = (DeviceCommandBaseOptions & {
|
|
|
1244
1531
|
mode?: 'full' | 'limited';
|
|
1245
1532
|
});
|
|
1246
1533
|
|
|
1534
|
+
/**
|
|
1535
|
+
* Closed result of the `shutdown` command. Mirrors the daemon handler's success
|
|
1536
|
+
* return EXACTLY (src/daemon/handlers/session-state.ts) — the fixed object
|
|
1537
|
+
* literal `{ platform, target, device, id, kind, shutdown }`. The `shutdown`
|
|
1538
|
+
* field is the raw {@link TargetShutdownResult} from `shutdownDeviceTarget`.
|
|
1539
|
+
*/
|
|
1540
|
+
declare type ShutdownCommandResult = {
|
|
1541
|
+
platform: Platform;
|
|
1542
|
+
target: DeviceTarget;
|
|
1543
|
+
/** Human-readable device name (`device.name`). */
|
|
1544
|
+
device: string;
|
|
1545
|
+
/** Stable device id (`device.id`). */
|
|
1546
|
+
id: string;
|
|
1547
|
+
kind: DeviceKind;
|
|
1548
|
+
shutdown: TargetShutdownResult;
|
|
1549
|
+
};
|
|
1550
|
+
|
|
1247
1551
|
declare type SnapshotCaptureAnalysis = {
|
|
1248
1552
|
rawNodeCount: number;
|
|
1249
1553
|
maxDepth: number;
|
|
@@ -1269,13 +1573,17 @@ declare type SnapshotDiagnosticsSummary = {
|
|
|
1269
1573
|
warning?: string;
|
|
1270
1574
|
};
|
|
1271
1575
|
|
|
1272
|
-
|
|
1576
|
+
declare type SnapshotNode = RawSnapshotNode & {
|
|
1273
1577
|
ref: string;
|
|
1274
1578
|
};
|
|
1275
1579
|
|
|
1276
1580
|
/**
|
|
1277
1581
|
* Structured quality verdict computed once by the iOS runner's snapshot capture plan.
|
|
1278
1582
|
* The daemon renders it; it never re-derives degradation from node shapes.
|
|
1583
|
+
*
|
|
1584
|
+
* Defined here (the foundational snapshot type module) rather than in
|
|
1585
|
+
* snapshot-quality.ts so SnapshotNode can reference it without a cyclic import;
|
|
1586
|
+
* snapshot-quality.ts (the validation logic) re-exports it for existing callers.
|
|
1279
1587
|
*/
|
|
1280
1588
|
declare type SnapshotQualityVerdict = {
|
|
1281
1589
|
state: 'healthy' | 'recovered' | 'sparse';
|
|
@@ -1303,16 +1611,16 @@ declare type SnapshotUnchanged = {
|
|
|
1303
1611
|
scope?: string;
|
|
1304
1612
|
};
|
|
1305
1613
|
|
|
1306
|
-
|
|
1614
|
+
declare type SnapshotVisibility = {
|
|
1307
1615
|
partial: boolean;
|
|
1308
1616
|
visibleNodeCount: number;
|
|
1309
1617
|
totalNodeCount: number;
|
|
1310
1618
|
reasons: SnapshotVisibilityReason[];
|
|
1311
1619
|
};
|
|
1312
1620
|
|
|
1313
|
-
|
|
1621
|
+
declare type SnapshotVisibilityReason = 'offscreen-nodes' | 'scroll-hidden-above' | 'scroll-hidden-below';
|
|
1314
1622
|
|
|
1315
|
-
|
|
1623
|
+
declare type StartupPerfSample = {
|
|
1316
1624
|
durationMs: number;
|
|
1317
1625
|
measuredAt: string;
|
|
1318
1626
|
method: string;
|
|
@@ -1329,7 +1637,7 @@ declare type SwipeGestureOptions = DeviceCommandBaseOptions & {
|
|
|
1329
1637
|
durationMs?: number;
|
|
1330
1638
|
};
|
|
1331
1639
|
|
|
1332
|
-
|
|
1640
|
+
declare type SwipeOptions = DeviceCommandBaseOptions & {
|
|
1333
1641
|
from: {
|
|
1334
1642
|
x: number;
|
|
1335
1643
|
y: number;
|
|
@@ -1348,13 +1656,21 @@ declare type SwipePattern = (typeof SWIPE_PATTERNS)[number];
|
|
|
1348
1656
|
|
|
1349
1657
|
declare type SwipePreset = (typeof SWIPE_PRESETS)[number];
|
|
1350
1658
|
|
|
1351
|
-
|
|
1659
|
+
declare type TargetShutdownResult = {
|
|
1660
|
+
success: boolean;
|
|
1661
|
+
exitCode: number;
|
|
1662
|
+
stdout: string;
|
|
1663
|
+
stderr: string;
|
|
1664
|
+
error?: NormalizedError;
|
|
1665
|
+
};
|
|
1666
|
+
|
|
1667
|
+
declare type TemporaryFile = {
|
|
1352
1668
|
path: string;
|
|
1353
1669
|
visibility: 'internal';
|
|
1354
1670
|
cleanup: () => Promise<void>;
|
|
1355
1671
|
};
|
|
1356
1672
|
|
|
1357
|
-
|
|
1673
|
+
declare type TraceOptions = AgentDeviceRequestOverrides & {
|
|
1358
1674
|
action: 'start' | 'stop';
|
|
1359
1675
|
path?: string;
|
|
1360
1676
|
};
|
|
@@ -1371,7 +1687,7 @@ declare type TransformGestureParams = {
|
|
|
1371
1687
|
durationMs?: number;
|
|
1372
1688
|
};
|
|
1373
1689
|
|
|
1374
|
-
|
|
1690
|
+
declare type TypeTextOptions = DeviceCommandBaseOptions & {
|
|
1375
1691
|
text: string;
|
|
1376
1692
|
delayMs?: number;
|
|
1377
1693
|
};
|
|
@@ -1381,18 +1697,20 @@ declare type ViewportCommandOptions = DeviceCommandBaseOptions & {
|
|
|
1381
1697
|
height: number;
|
|
1382
1698
|
};
|
|
1383
1699
|
|
|
1384
|
-
|
|
1700
|
+
/**
|
|
1701
|
+
* Closed result of the `viewport` command. Mirrors the dispatch handler's return
|
|
1702
|
+
* EXACTLY (src/core/dispatch.ts `handleViewportCommand`) — `{ width, height }`
|
|
1703
|
+
* plus the always-present `successText` message. The generic dispatch path
|
|
1704
|
+
* returns this object unchanged (viewport has no Android dialog guard, so no
|
|
1705
|
+
* `warning` is ever appended), so the shape is intentionally closed.
|
|
1706
|
+
*/
|
|
1707
|
+
declare type ViewportCommandResult = {
|
|
1385
1708
|
width: number;
|
|
1386
1709
|
height: number;
|
|
1710
|
+
message: string;
|
|
1387
1711
|
};
|
|
1388
1712
|
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
export declare type WaitCommandResult = DaemonResponseData & {
|
|
1392
|
-
waitedMs?: number;
|
|
1393
|
-
text?: string;
|
|
1394
|
-
selector?: string;
|
|
1395
|
-
};
|
|
1713
|
+
declare type WaitCommandOptions = DeviceCommandBaseOptions & WaitCommandTarget;
|
|
1396
1714
|
|
|
1397
1715
|
declare type WaitCommandTarget = {
|
|
1398
1716
|
durationMs: number;
|