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/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: {
|
|
@@ -71,6 +73,7 @@ export declare type AgentDeviceClient = {
|
|
|
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,7 +87,7 @@ 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;
|
|
@@ -95,29 +98,32 @@ export declare type AgentDeviceClientConfig = RemoteConnectionProfileFields & {
|
|
|
95
98
|
runtime?: SessionRuntimeHints;
|
|
96
99
|
cwd?: string;
|
|
97
100
|
debug?: boolean;
|
|
101
|
+
cost?: boolean;
|
|
102
|
+
responseLevel?: ResponseLevel;
|
|
98
103
|
iosXctestrunFile?: string;
|
|
99
104
|
iosXctestDerivedDataPath?: string;
|
|
100
105
|
iosXctestEnvDir?: string;
|
|
101
106
|
};
|
|
102
107
|
|
|
103
|
-
|
|
104
|
-
wait: (options: WaitCommandOptions) => Promise<
|
|
105
|
-
alert: (options?: AlertCommandOptions) => Promise<
|
|
106
|
-
appState: (options?: AppStateCommandOptions) => Promise<
|
|
107
|
-
back: (options?: BackCommandOptions) => Promise<
|
|
108
|
-
home: (options?: HomeCommandOptions) => Promise<
|
|
109
|
-
rotate: (options: RotateCommandOptions) => Promise<
|
|
110
|
-
appSwitcher: (options?: AppSwitcherCommandOptions) => Promise<
|
|
111
|
-
keyboard: (options?: KeyboardCommandOptions) => Promise<
|
|
112
|
-
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'>>;
|
|
113
118
|
reactNative: (options: ReactNativeCommandOptions) => Promise<CommandRequestResult>;
|
|
119
|
+
doctor: (options?: DoctorCommandOptions) => Promise<CommandRequestResult>;
|
|
114
120
|
prepare: (options: PrepareCommandOptions) => Promise<CommandRequestResult>;
|
|
115
|
-
viewport: (options: ViewportCommandOptions) => Promise<
|
|
121
|
+
viewport: (options: ViewportCommandOptions) => Promise<CommandResult<'viewport'>>;
|
|
116
122
|
};
|
|
117
123
|
|
|
118
|
-
|
|
124
|
+
declare type AgentDeviceDaemonTransport = (req: Omit<DaemonRequest, 'token'>) => Promise<DaemonResponse>;
|
|
119
125
|
|
|
120
|
-
|
|
126
|
+
declare type AgentDeviceDevice = {
|
|
121
127
|
platform: Platform;
|
|
122
128
|
target: DeviceTarget;
|
|
123
129
|
kind: DeviceKind;
|
|
@@ -133,7 +139,7 @@ export declare type AgentDeviceDevice = {
|
|
|
133
139
|
};
|
|
134
140
|
};
|
|
135
141
|
|
|
136
|
-
|
|
142
|
+
declare type AgentDeviceIdentifiers = {
|
|
137
143
|
session?: string;
|
|
138
144
|
deviceId?: string;
|
|
139
145
|
deviceName?: string;
|
|
@@ -144,9 +150,9 @@ export declare type AgentDeviceIdentifiers = {
|
|
|
144
150
|
package?: string;
|
|
145
151
|
};
|
|
146
152
|
|
|
147
|
-
|
|
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'>;
|
|
148
154
|
|
|
149
|
-
|
|
155
|
+
declare type AgentDeviceSelectionOptions = {
|
|
150
156
|
platform?: PlatformSelector;
|
|
151
157
|
target?: DeviceTarget;
|
|
152
158
|
device?: string;
|
|
@@ -156,7 +162,7 @@ export declare type AgentDeviceSelectionOptions = {
|
|
|
156
162
|
androidDeviceAllowlist?: string;
|
|
157
163
|
};
|
|
158
164
|
|
|
159
|
-
|
|
165
|
+
declare type AgentDeviceSession = {
|
|
160
166
|
name: string;
|
|
161
167
|
createdAt: number;
|
|
162
168
|
sessionStateDir?: string;
|
|
@@ -165,7 +171,7 @@ export declare type AgentDeviceSession = {
|
|
|
165
171
|
identifiers: AgentDeviceIdentifiers;
|
|
166
172
|
};
|
|
167
173
|
|
|
168
|
-
|
|
174
|
+
declare type AgentDeviceSessionDevice = {
|
|
169
175
|
platform: Platform;
|
|
170
176
|
target: DeviceTarget;
|
|
171
177
|
id: string;
|
|
@@ -182,40 +188,13 @@ export declare type AgentDeviceSessionDevice = {
|
|
|
182
188
|
|
|
183
189
|
declare const ALERT_ACTIONS: readonly ['get', 'accept', 'dismiss', 'wait'];
|
|
184
190
|
|
|
185
|
-
|
|
191
|
+
declare type AlertAction = (typeof ALERT_ACTIONS)[number];
|
|
186
192
|
|
|
187
|
-
|
|
193
|
+
declare type AlertCommandOptions = DeviceCommandBaseOptions & {
|
|
188
194
|
action?: AlertAction;
|
|
189
195
|
timeoutMs?: number;
|
|
190
196
|
};
|
|
191
197
|
|
|
192
|
-
export declare type AlertCommandResult = DaemonResponseData & {
|
|
193
|
-
kind?: 'alertStatus' | 'alertHandled' | 'alertWait';
|
|
194
|
-
action?: AlertCommandOptions['action'];
|
|
195
|
-
alert?: AlertInfo | null;
|
|
196
|
-
handled?: boolean;
|
|
197
|
-
button?: string;
|
|
198
|
-
waitedMs?: number;
|
|
199
|
-
timedOut?: boolean;
|
|
200
|
-
platform?: AlertInfo['platform'];
|
|
201
|
-
accepted?: boolean;
|
|
202
|
-
dismissed?: boolean;
|
|
203
|
-
items?: string[];
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
export declare type AlertInfo = {
|
|
207
|
-
title?: string;
|
|
208
|
-
message?: string;
|
|
209
|
-
buttons?: string[];
|
|
210
|
-
platform?: AlertPlatform;
|
|
211
|
-
source?: AlertSource;
|
|
212
|
-
packageName?: string;
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
export declare type AlertPlatform = 'android' | 'ios' | 'macos';
|
|
216
|
-
|
|
217
|
-
export declare type AlertSource = 'permission' | 'native-dialog' | 'system-dialog';
|
|
218
|
-
|
|
219
198
|
declare type AndroidSnapshotBackendMetadata = {
|
|
220
199
|
backend: 'android-helper' | 'uiautomator-dump';
|
|
221
200
|
helperVersion?: string;
|
|
@@ -243,24 +222,24 @@ declare type AndroidSnapshotHelperInstallReason = 'missing' | 'outdated' | 'forc
|
|
|
243
222
|
|
|
244
223
|
declare type AndroidSnapshotHelperTransport = 'instrumentation' | 'persistent-session';
|
|
245
224
|
|
|
246
|
-
|
|
225
|
+
declare type AppCloseOptions = AgentDeviceRequestOverrides & {
|
|
247
226
|
app?: string;
|
|
248
227
|
shutdown?: boolean;
|
|
249
228
|
};
|
|
250
229
|
|
|
251
|
-
|
|
230
|
+
declare type AppCloseResult = {
|
|
252
231
|
session: string;
|
|
253
232
|
closedApp?: string;
|
|
254
233
|
shutdown?: TargetShutdownResult;
|
|
255
234
|
identifiers: AgentDeviceIdentifiers;
|
|
256
235
|
};
|
|
257
236
|
|
|
258
|
-
|
|
237
|
+
declare type AppDeployOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
259
238
|
app: string;
|
|
260
239
|
appPath: string;
|
|
261
240
|
};
|
|
262
241
|
|
|
263
|
-
|
|
242
|
+
declare type AppDeployResult = {
|
|
264
243
|
app: string;
|
|
265
244
|
appPath: string;
|
|
266
245
|
platform: Platform;
|
|
@@ -277,7 +256,7 @@ export declare class AppError extends Error {
|
|
|
277
256
|
constructor(code: AppErrorCode, message: string, details?: AppErrorDetails, cause?: unknown);
|
|
278
257
|
}
|
|
279
258
|
|
|
280
|
-
|
|
259
|
+
declare type AppErrorCode = KnownAppErrorCode | (string & {});
|
|
281
260
|
|
|
282
261
|
declare type AppErrorDetails = Record<string, unknown> & {
|
|
283
262
|
hint?: string;
|
|
@@ -285,13 +264,13 @@ declare type AppErrorDetails = Record<string, unknown> & {
|
|
|
285
264
|
logPath?: string;
|
|
286
265
|
};
|
|
287
266
|
|
|
288
|
-
|
|
267
|
+
declare type AppInstallFromSourceOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
289
268
|
source: DaemonInstallSource;
|
|
290
269
|
retainPaths?: boolean;
|
|
291
270
|
retentionMs?: number;
|
|
292
271
|
};
|
|
293
272
|
|
|
294
|
-
|
|
273
|
+
declare type AppInstallFromSourceResult = {
|
|
295
274
|
appName?: string;
|
|
296
275
|
appId?: string;
|
|
297
276
|
bundleId?: string;
|
|
@@ -304,11 +283,16 @@ export declare type AppInstallFromSourceResult = {
|
|
|
304
283
|
identifiers: AgentDeviceIdentifiers;
|
|
305
284
|
};
|
|
306
285
|
|
|
307
|
-
|
|
286
|
+
declare type AppInstallOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
287
|
+
app?: string;
|
|
288
|
+
appPath: string;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
declare type AppListOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
308
292
|
appsFilter?: AppsFilter;
|
|
309
293
|
};
|
|
310
294
|
|
|
311
|
-
|
|
295
|
+
declare type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
312
296
|
app?: string;
|
|
313
297
|
url?: string;
|
|
314
298
|
surface?: SessionSurface;
|
|
@@ -322,7 +306,7 @@ export declare type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSe
|
|
|
322
306
|
runtime?: SessionRuntimeHints;
|
|
323
307
|
};
|
|
324
308
|
|
|
325
|
-
|
|
309
|
+
declare type AppOpenResult = {
|
|
326
310
|
session: string;
|
|
327
311
|
sessionStateDir?: string;
|
|
328
312
|
runnerLogPath?: string;
|
|
@@ -336,41 +320,62 @@ export declare type AppOpenResult = {
|
|
|
336
320
|
identifiers: AgentDeviceIdentifiers;
|
|
337
321
|
};
|
|
338
322
|
|
|
339
|
-
|
|
323
|
+
declare type AppPushOptions = DeviceCommandBaseOptions & {
|
|
340
324
|
app: string;
|
|
341
325
|
payload: string | Record<string, unknown>;
|
|
342
326
|
};
|
|
343
327
|
|
|
344
328
|
declare type AppsFilter = 'user-installed' | 'all';
|
|
345
329
|
|
|
346
|
-
|
|
330
|
+
declare type AppStateCommandOptions = DeviceCommandBaseOptions;
|
|
347
331
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
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;
|
|
351
346
|
appBundleId?: string;
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
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;
|
|
356
357
|
};
|
|
357
358
|
|
|
358
|
-
|
|
359
|
+
declare type AppSwitcherCommandOptions = DeviceCommandBaseOptions;
|
|
359
360
|
|
|
360
|
-
|
|
361
|
+
/** `app-switcher` — `{ action: 'app-switcher', message: 'Opened app switcher' }`. */
|
|
362
|
+
declare type AppSwitcherCommandResult = {
|
|
363
|
+
action: 'app-switcher';
|
|
364
|
+
message: string;
|
|
365
|
+
};
|
|
361
366
|
|
|
362
|
-
|
|
367
|
+
declare type AppTriggerEventOptions = DeviceCommandBaseOptions & {
|
|
363
368
|
event: string;
|
|
364
369
|
payload?: Record<string, unknown>;
|
|
365
370
|
};
|
|
366
371
|
|
|
367
|
-
|
|
372
|
+
declare type ArtifactAdapter = {
|
|
368
373
|
resolveInput(ref: FileInputRef, options: ResolveInputOptions): Promise<ResolvedInputFile>;
|
|
369
374
|
reserveOutput(ref: FileOutputRef | undefined, options: ReserveOutputOptions): Promise<ReservedOutputFile>;
|
|
370
375
|
createTempFile(options: CreateTempFileOptions): Promise<TemporaryFile>;
|
|
371
376
|
};
|
|
372
377
|
|
|
373
|
-
|
|
378
|
+
declare type ArtifactDescriptor = {
|
|
374
379
|
kind: 'localPath';
|
|
375
380
|
field: string;
|
|
376
381
|
path: string;
|
|
@@ -386,33 +391,43 @@ export declare type ArtifactDescriptor = {
|
|
|
386
391
|
metadata?: Record<string, unknown>;
|
|
387
392
|
};
|
|
388
393
|
|
|
394
|
+
declare type AudioOptions = AgentDeviceRequestOverrides & {
|
|
395
|
+
action?: 'probe';
|
|
396
|
+
probeAction?: 'start' | 'status' | 'stop';
|
|
397
|
+
durationMs?: number;
|
|
398
|
+
bucketMs?: number;
|
|
399
|
+
};
|
|
400
|
+
|
|
389
401
|
declare const BACK_MODES: readonly ['in-app', 'system'];
|
|
390
402
|
|
|
391
|
-
|
|
403
|
+
declare type BackCommandOptions = DeviceCommandBaseOptions & {
|
|
392
404
|
mode?: BackMode;
|
|
393
405
|
};
|
|
394
406
|
|
|
395
|
-
|
|
396
|
-
|
|
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;
|
|
397
412
|
};
|
|
398
413
|
|
|
399
414
|
declare type BackMode = (typeof BACK_MODES)[number];
|
|
400
415
|
|
|
401
|
-
|
|
416
|
+
declare type BatchRunOptions = AgentDeviceRequestOverrides & {
|
|
402
417
|
steps: BatchStep[];
|
|
403
418
|
onError?: 'stop';
|
|
404
419
|
maxSteps?: number;
|
|
405
420
|
out?: string;
|
|
406
421
|
};
|
|
407
422
|
|
|
408
|
-
|
|
423
|
+
declare type BatchRunResult = Record<string, unknown> & {
|
|
409
424
|
total: number;
|
|
410
425
|
executed: number;
|
|
411
426
|
totalDurationMs: number;
|
|
412
427
|
results: BatchStepResult[];
|
|
413
428
|
};
|
|
414
429
|
|
|
415
|
-
|
|
430
|
+
declare type BatchStep = {
|
|
416
431
|
command: string;
|
|
417
432
|
input: Record<string, unknown>;
|
|
418
433
|
runtime?: SessionRuntimeHints;
|
|
@@ -426,26 +441,45 @@ declare type BatchStepResult = {
|
|
|
426
441
|
durationMs: number;
|
|
427
442
|
};
|
|
428
443
|
|
|
429
|
-
|
|
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'> & {
|
|
430
463
|
kind: 'snapshot';
|
|
431
464
|
out?: string;
|
|
432
465
|
};
|
|
433
466
|
|
|
434
|
-
|
|
467
|
+
declare type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
|
|
435
468
|
path?: string;
|
|
436
469
|
overlayRefs?: boolean;
|
|
437
470
|
fullscreen?: boolean;
|
|
438
471
|
maxSize?: number;
|
|
439
472
|
stabilize?: boolean;
|
|
473
|
+
normalizeStatusBar?: boolean;
|
|
440
474
|
surface?: SessionSurface;
|
|
441
475
|
};
|
|
442
476
|
|
|
443
|
-
|
|
477
|
+
declare type CaptureScreenshotResult = ScreenshotResultData & {
|
|
444
478
|
path: string;
|
|
445
479
|
identifiers: AgentDeviceIdentifiers;
|
|
446
480
|
};
|
|
447
481
|
|
|
448
|
-
|
|
482
|
+
declare type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
449
483
|
interactiveOnly?: boolean;
|
|
450
484
|
depth?: number;
|
|
451
485
|
scope?: string;
|
|
@@ -454,7 +488,7 @@ export declare type CaptureSnapshotOptions = AgentDeviceRequestOverrides & Agent
|
|
|
454
488
|
timeoutMs?: number;
|
|
455
489
|
};
|
|
456
490
|
|
|
457
|
-
|
|
491
|
+
declare type CaptureSnapshotResult = {
|
|
458
492
|
nodes: SnapshotNode[];
|
|
459
493
|
truncated: boolean;
|
|
460
494
|
appName?: string;
|
|
@@ -471,30 +505,130 @@ declare const CLICK_BUTTONS: readonly ['primary', 'secondary', 'middle'];
|
|
|
471
505
|
|
|
472
506
|
declare type ClickButton = (typeof CLICK_BUTTONS)[number];
|
|
473
507
|
|
|
474
|
-
|
|
508
|
+
declare type ClickOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions & {
|
|
475
509
|
button?: ClickButton;
|
|
476
510
|
};
|
|
477
511
|
|
|
478
|
-
|
|
512
|
+
declare type ClipboardCommandOptions = (DeviceCommandBaseOptions & {
|
|
479
513
|
action: 'read';
|
|
480
514
|
}) | (DeviceCommandBaseOptions & {
|
|
481
515
|
action: 'write';
|
|
482
516
|
text: string;
|
|
483
517
|
});
|
|
484
518
|
|
|
485
|
-
|
|
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 = {
|
|
486
527
|
action: 'read';
|
|
487
528
|
text: string;
|
|
488
|
-
}
|
|
529
|
+
} | {
|
|
489
530
|
action: 'write';
|
|
490
531
|
textLength: number;
|
|
491
|
-
|
|
532
|
+
message: string;
|
|
533
|
+
};
|
|
492
534
|
|
|
493
|
-
declare
|
|
494
|
-
|
|
535
|
+
declare const CLOUD_ARTIFACT_KINDS: readonly ['video', 'appium-log', 'device-log', 'automation-log', 'provider-session', 'raw'];
|
|
536
|
+
|
|
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>;
|
|
548
|
+
};
|
|
549
|
+
|
|
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;
|
|
495
565
|
};
|
|
496
566
|
|
|
497
|
-
|
|
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
|
+
}
|
|
498
632
|
|
|
499
633
|
declare type CompanionTunnelScope = {
|
|
500
634
|
tenantId: string;
|
|
@@ -508,7 +642,7 @@ export declare function createAgentDeviceClient(config?: AgentDeviceClientConfig
|
|
|
508
642
|
|
|
509
643
|
export declare function createLocalArtifactAdapter(options?: LocalArtifactAdapterOptions): ArtifactAdapter;
|
|
510
644
|
|
|
511
|
-
|
|
645
|
+
declare type CreateTempFileOptions = {
|
|
512
646
|
prefix: string;
|
|
513
647
|
ext: string;
|
|
514
648
|
};
|
|
@@ -534,6 +668,18 @@ declare type DaemonError = {
|
|
|
534
668
|
diagnosticId?: string;
|
|
535
669
|
logPath?: string;
|
|
536
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;
|
|
537
683
|
};
|
|
538
684
|
|
|
539
685
|
declare type DaemonInstallSource = {
|
|
@@ -571,6 +717,8 @@ declare type DaemonRequest = {
|
|
|
571
717
|
declare type DaemonRequestMeta = {
|
|
572
718
|
requestId?: string;
|
|
573
719
|
debug?: boolean;
|
|
720
|
+
includeCost?: boolean;
|
|
721
|
+
responseLevel?: ResponseLevel;
|
|
574
722
|
cwd?: string;
|
|
575
723
|
sessionExplicit?: boolean;
|
|
576
724
|
tenantId?: string;
|
|
@@ -590,7 +738,7 @@ declare type DaemonRequestMeta = {
|
|
|
590
738
|
materializationId?: string;
|
|
591
739
|
lockPolicy?: DaemonLockPolicy;
|
|
592
740
|
lockPlatform?: PlatformSelector;
|
|
593
|
-
requestProgress?: 'replay-test';
|
|
741
|
+
requestProgress?: 'replay-test' | 'command';
|
|
594
742
|
};
|
|
595
743
|
|
|
596
744
|
declare type DaemonResponse = {
|
|
@@ -603,6 +751,7 @@ declare type DaemonResponse = {
|
|
|
603
751
|
|
|
604
752
|
declare type DaemonResponseData = Record<string, unknown> & {
|
|
605
753
|
artifacts?: DaemonArtifact[];
|
|
754
|
+
cost?: ResponseCost;
|
|
606
755
|
};
|
|
607
756
|
|
|
608
757
|
declare type DaemonServerMode = (typeof DAEMON_SERVER_MODES)[number];
|
|
@@ -667,7 +816,7 @@ declare const DEVICE_ROTATIONS: readonly ['portrait', 'portrait-upside-down', 'l
|
|
|
667
816
|
|
|
668
817
|
declare const DEVICE_TARGETS: readonly ['mobile', 'tv', 'desktop'];
|
|
669
818
|
|
|
670
|
-
|
|
819
|
+
declare type DeviceBootOptions = DeviceCommandBaseOptions & {
|
|
671
820
|
headless?: boolean;
|
|
672
821
|
};
|
|
673
822
|
|
|
@@ -677,13 +826,18 @@ declare type DeviceKind = (typeof DEVICE_KINDS)[number];
|
|
|
677
826
|
|
|
678
827
|
declare type DeviceRotation = (typeof DEVICE_ROTATIONS)[number];
|
|
679
828
|
|
|
680
|
-
|
|
829
|
+
declare type DeviceShutdownOptions = DeviceCommandBaseOptions;
|
|
681
830
|
|
|
682
831
|
declare type DeviceTarget = (typeof DEVICE_TARGETS)[number];
|
|
683
832
|
|
|
684
|
-
|
|
833
|
+
declare type DoctorCommandOptions = DeviceCommandBaseOptions & {
|
|
834
|
+
targetApp?: string;
|
|
835
|
+
remote?: boolean;
|
|
836
|
+
};
|
|
685
837
|
|
|
686
|
-
|
|
838
|
+
declare type ElementTarget = RefTarget | SelectorTarget;
|
|
839
|
+
|
|
840
|
+
declare type FileInputRef = {
|
|
687
841
|
kind: 'path';
|
|
688
842
|
path: string;
|
|
689
843
|
} | {
|
|
@@ -691,7 +845,7 @@ export declare type FileInputRef = {
|
|
|
691
845
|
id: string;
|
|
692
846
|
};
|
|
693
847
|
|
|
694
|
-
|
|
848
|
+
declare type FileOutputRef = {
|
|
695
849
|
kind: 'path';
|
|
696
850
|
path: string;
|
|
697
851
|
} | {
|
|
@@ -700,7 +854,14 @@ export declare type FileOutputRef = {
|
|
|
700
854
|
fileName?: string;
|
|
701
855
|
};
|
|
702
856
|
|
|
703
|
-
|
|
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 & {
|
|
704
865
|
text: string;
|
|
705
866
|
delayMs?: number;
|
|
706
867
|
};
|
|
@@ -714,9 +875,9 @@ declare type FindBaseOptions = DeviceCommandBaseOptions & FindSnapshotCommandOpt
|
|
|
714
875
|
last?: boolean;
|
|
715
876
|
};
|
|
716
877
|
|
|
717
|
-
|
|
878
|
+
declare type FindLocator = (typeof FIND_LOCATORS)[number];
|
|
718
879
|
|
|
719
|
-
|
|
880
|
+
declare type FindOptions = (FindBaseOptions & {
|
|
720
881
|
action?: 'click' | 'focus' | 'exists' | 'getText' | 'getAttrs';
|
|
721
882
|
}) | (FindBaseOptions & {
|
|
722
883
|
action: 'wait';
|
|
@@ -740,21 +901,33 @@ declare type FocusOptions_2 = DeviceCommandBaseOptions & {
|
|
|
740
901
|
x: number;
|
|
741
902
|
y: number;
|
|
742
903
|
};
|
|
743
|
-
export { FocusOptions_2 as FocusOptions }
|
|
744
904
|
|
|
745
|
-
|
|
905
|
+
declare type GetOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & ElementTarget & {
|
|
746
906
|
format: 'text' | 'attrs';
|
|
747
907
|
};
|
|
748
908
|
|
|
749
|
-
|
|
909
|
+
declare type HomeCommandOptions = DeviceCommandBaseOptions;
|
|
750
910
|
|
|
751
|
-
|
|
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
|
+
};
|
|
752
925
|
|
|
753
|
-
|
|
926
|
+
declare type InteractionTarget = PointTarget | RefTarget | SelectorTarget;
|
|
754
927
|
|
|
755
928
|
export declare function isAgentDeviceError(err: unknown): err is AppError;
|
|
756
929
|
|
|
757
|
-
|
|
930
|
+
declare type IsOptions = IsTextPredicateOptions | IsStatePredicateOptions;
|
|
758
931
|
|
|
759
932
|
declare type IsStatePredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & {
|
|
760
933
|
predicate: 'visible' | 'hidden' | 'exists' | 'editable' | 'selected';
|
|
@@ -768,23 +941,38 @@ declare type IsTextPredicateOptions = DeviceCommandBaseOptions & SelectorSnapsho
|
|
|
768
941
|
value: string;
|
|
769
942
|
};
|
|
770
943
|
|
|
771
|
-
|
|
944
|
+
declare type KeyboardCommandOptions = DeviceCommandBaseOptions & {
|
|
772
945
|
action?: 'status' | 'dismiss' | 'enter' | 'return';
|
|
773
946
|
};
|
|
774
947
|
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
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';
|
|
778
965
|
visible?: boolean;
|
|
779
|
-
inputType?: string | null;
|
|
780
|
-
inputMethodPackage?: string | null;
|
|
781
|
-
type?: string | null;
|
|
782
|
-
focusedPackage?: string | null;
|
|
783
|
-
focusedResourceId?: string | null;
|
|
784
|
-
inputOwner?: 'app' | 'ime' | 'unknown';
|
|
785
966
|
wasVisible?: boolean;
|
|
786
967
|
dismissed?: boolean;
|
|
787
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;
|
|
788
976
|
};
|
|
789
977
|
|
|
790
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';
|
|
@@ -816,7 +1004,7 @@ declare type LeaseAllocateOptions = LeaseOptions & {
|
|
|
816
1004
|
|
|
817
1005
|
declare type LeaseBackend = (typeof LEASE_BACKENDS)[number];
|
|
818
1006
|
|
|
819
|
-
declare type LeaseOptions = AgentDeviceRequestOverrides & {
|
|
1007
|
+
declare type LeaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
820
1008
|
ttlMs?: number;
|
|
821
1009
|
};
|
|
822
1010
|
|
|
@@ -831,7 +1019,7 @@ declare type LeaseScopedOptions = LeaseOptions & {
|
|
|
831
1019
|
clientId?: string;
|
|
832
1020
|
};
|
|
833
1021
|
|
|
834
|
-
|
|
1022
|
+
declare type LocalArtifactAdapterOptions = {
|
|
835
1023
|
cwd?: string;
|
|
836
1024
|
tempDir?: string;
|
|
837
1025
|
rootDir?: string;
|
|
@@ -841,21 +1029,27 @@ declare const LOG_ACTION_VALUES: readonly ['path', 'start', 'stop', 'doctor', 'm
|
|
|
841
1029
|
|
|
842
1030
|
declare type LogAction = (typeof LOG_ACTION_VALUES)[number];
|
|
843
1031
|
|
|
844
|
-
|
|
1032
|
+
declare type LogsOptions = AgentDeviceRequestOverrides & {
|
|
845
1033
|
action?: LogAction;
|
|
846
1034
|
message?: string;
|
|
847
1035
|
restart?: boolean;
|
|
848
1036
|
};
|
|
849
1037
|
|
|
850
|
-
|
|
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 & {
|
|
851
1045
|
durationMs?: number;
|
|
852
1046
|
};
|
|
853
1047
|
|
|
854
|
-
|
|
1048
|
+
declare type MaterializationReleaseOptions = AgentDeviceRequestOverrides & {
|
|
855
1049
|
materializationId: string;
|
|
856
1050
|
};
|
|
857
1051
|
|
|
858
|
-
|
|
1052
|
+
declare type MaterializationReleaseResult = {
|
|
859
1053
|
released: boolean;
|
|
860
1054
|
materializationId: string;
|
|
861
1055
|
identifiers: AgentDeviceIdentifiers;
|
|
@@ -886,7 +1080,7 @@ declare type MetroBridgeScope = CompanionTunnelScope;
|
|
|
886
1080
|
|
|
887
1081
|
declare type MetroPrepareKind = 'auto' | 'react-native' | 'expo';
|
|
888
1082
|
|
|
889
|
-
|
|
1083
|
+
declare type MetroPrepareOptions = {
|
|
890
1084
|
projectRoot?: string;
|
|
891
1085
|
kind?: MetroPrepareKind;
|
|
892
1086
|
publicBaseUrl?: string;
|
|
@@ -907,16 +1101,16 @@ export declare type MetroPrepareOptions = {
|
|
|
907
1101
|
logPath?: string;
|
|
908
1102
|
};
|
|
909
1103
|
|
|
910
|
-
|
|
1104
|
+
declare type MetroPrepareResult = PrepareMetroRuntimeResult;
|
|
911
1105
|
|
|
912
|
-
|
|
1106
|
+
declare type MetroReloadOptions = {
|
|
913
1107
|
metroHost?: string;
|
|
914
1108
|
metroPort?: number;
|
|
915
1109
|
bundleUrl?: string;
|
|
916
1110
|
timeoutMs?: number;
|
|
917
1111
|
};
|
|
918
1112
|
|
|
919
|
-
|
|
1113
|
+
declare type MetroReloadResult = ReloadMetroResult;
|
|
920
1114
|
|
|
921
1115
|
/** Re-export of {@link SessionRuntimeHints} under the Metro-specific alias used by public API consumers. */
|
|
922
1116
|
declare type MetroRuntimeHints = SessionRuntimeHints;
|
|
@@ -925,7 +1119,7 @@ declare const NETWORK_INCLUDE_MODES: readonly ['summary', 'headers', 'body', 'al
|
|
|
925
1119
|
|
|
926
1120
|
declare type NetworkIncludeMode = (typeof NETWORK_INCLUDE_MODES)[number];
|
|
927
1121
|
|
|
928
|
-
|
|
1122
|
+
declare type NetworkOptions = AgentDeviceRequestOverrides & {
|
|
929
1123
|
action?: 'dump' | 'log';
|
|
930
1124
|
limit?: number;
|
|
931
1125
|
include?: NetworkIncludeMode;
|
|
@@ -936,7 +1130,7 @@ export declare function normalizeAgentDeviceError(err: unknown, context?: {
|
|
|
936
1130
|
logPath?: string;
|
|
937
1131
|
}): NormalizedError;
|
|
938
1132
|
|
|
939
|
-
|
|
1133
|
+
declare type NormalizedError = {
|
|
940
1134
|
code: string;
|
|
941
1135
|
message: string;
|
|
942
1136
|
hint?: string;
|
|
@@ -945,7 +1139,7 @@ export declare type NormalizedError = {
|
|
|
945
1139
|
details?: Record<string, unknown>;
|
|
946
1140
|
};
|
|
947
1141
|
|
|
948
|
-
|
|
1142
|
+
declare type OutputVisibility = 'client-visible' | 'internal';
|
|
949
1143
|
|
|
950
1144
|
declare type PanOptions = DeviceCommandBaseOptions & {
|
|
951
1145
|
x: number;
|
|
@@ -969,7 +1163,7 @@ declare type PerfArea = (typeof PERF_AREA_VALUES)[number];
|
|
|
969
1163
|
|
|
970
1164
|
declare type PerfKind = (typeof PERF_KIND_VALUES)[number];
|
|
971
1165
|
|
|
972
|
-
|
|
1166
|
+
declare type PerfOptions = DeviceCommandBaseOptions & {
|
|
973
1167
|
area?: PerfArea;
|
|
974
1168
|
subject?: PerfSubject;
|
|
975
1169
|
action?: PerfAction;
|
|
@@ -981,9 +1175,9 @@ export declare type PerfOptions = DeviceCommandBaseOptions & {
|
|
|
981
1175
|
|
|
982
1176
|
declare type PerfSubject = (typeof PERF_SUBJECT_VALUES)[number];
|
|
983
1177
|
|
|
984
|
-
|
|
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';
|
|
985
1179
|
|
|
986
|
-
|
|
1180
|
+
declare type PinchOptions = DeviceCommandBaseOptions & {
|
|
987
1181
|
scale: number;
|
|
988
1182
|
x?: number;
|
|
989
1183
|
y?: number;
|
|
@@ -997,7 +1191,7 @@ declare const PLATFORMS: readonly ['ios', 'macos', 'android', 'linux', 'web'];
|
|
|
997
1191
|
|
|
998
1192
|
declare type PlatformSelector = (typeof PLATFORM_SELECTORS)[number];
|
|
999
1193
|
|
|
1000
|
-
|
|
1194
|
+
declare type Point = {
|
|
1001
1195
|
x: number;
|
|
1002
1196
|
y: number;
|
|
1003
1197
|
};
|
|
@@ -1031,7 +1225,12 @@ declare type PrepareMetroRuntimeResult = {
|
|
|
1031
1225
|
bridge: MetroBridgeResult | null;
|
|
1032
1226
|
};
|
|
1033
1227
|
|
|
1034
|
-
|
|
1228
|
+
declare type PressCommandResult = ResolvedInteractionTarget & {
|
|
1229
|
+
backendResult?: Record<string, unknown>;
|
|
1230
|
+
message?: string;
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1233
|
+
declare type PressOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions;
|
|
1035
1234
|
|
|
1036
1235
|
declare type PublicSnapshotCaptureAnnotations = Pick<SnapshotCaptureAnnotations, 'androidSnapshot' | 'warnings'> & {
|
|
1037
1236
|
snapshotQuality?: SnapshotQualityVerdict;
|
|
@@ -1072,7 +1271,7 @@ declare const RECORDING_EXPORT_QUALITIES: readonly ['medium', 'high'];
|
|
|
1072
1271
|
|
|
1073
1272
|
declare type RecordingExportQuality = (typeof RECORDING_EXPORT_QUALITIES)[number];
|
|
1074
1273
|
|
|
1075
|
-
|
|
1274
|
+
declare type RecordOptions = AgentDeviceRequestOverrides & {
|
|
1076
1275
|
action: 'start' | 'stop';
|
|
1077
1276
|
path?: string;
|
|
1078
1277
|
fps?: number;
|
|
@@ -1081,7 +1280,7 @@ export declare type RecordOptions = AgentDeviceRequestOverrides & {
|
|
|
1081
1280
|
hideTouches?: boolean;
|
|
1082
1281
|
};
|
|
1083
1282
|
|
|
1084
|
-
|
|
1283
|
+
declare type Rect = {
|
|
1085
1284
|
x: number;
|
|
1086
1285
|
y: number;
|
|
1087
1286
|
width: number;
|
|
@@ -1127,7 +1326,7 @@ declare type RepeatedPressOptions = {
|
|
|
1127
1326
|
doubleTap?: boolean;
|
|
1128
1327
|
};
|
|
1129
1328
|
|
|
1130
|
-
|
|
1329
|
+
declare type ReplayRunOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
1131
1330
|
path: string;
|
|
1132
1331
|
update?: boolean;
|
|
1133
1332
|
/** @deprecated Use backend: 'maestro'. */
|
|
@@ -1137,7 +1336,7 @@ export declare type ReplayRunOptions = AgentDeviceRequestOverrides & AgentDevice
|
|
|
1137
1336
|
timeoutMs?: number;
|
|
1138
1337
|
};
|
|
1139
1338
|
|
|
1140
|
-
|
|
1339
|
+
declare type ReplayTestOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
1141
1340
|
paths: string[];
|
|
1142
1341
|
update?: boolean;
|
|
1143
1342
|
/** @deprecated Use backend: 'maestro'. */
|
|
@@ -1149,43 +1348,88 @@ export declare type ReplayTestOptions = AgentDeviceRequestOverrides & AgentDevic
|
|
|
1149
1348
|
retries?: number;
|
|
1150
1349
|
recordVideo?: boolean;
|
|
1151
1350
|
artifactsDir?: string;
|
|
1351
|
+
/** @deprecated Use the CLI --reporter junit:<path> or --report-junit <path>. */
|
|
1152
1352
|
reportJunit?: string;
|
|
1153
1353
|
shardAll?: number;
|
|
1154
1354
|
shardSplit?: number;
|
|
1155
1355
|
};
|
|
1156
1356
|
|
|
1157
|
-
|
|
1357
|
+
declare type ReservedOutputFile = {
|
|
1158
1358
|
path: string;
|
|
1159
1359
|
visibility: OutputVisibility;
|
|
1160
1360
|
publish: () => Promise<ArtifactDescriptor | undefined>;
|
|
1161
1361
|
cleanup?: () => Promise<void>;
|
|
1162
1362
|
};
|
|
1163
1363
|
|
|
1164
|
-
|
|
1364
|
+
declare type ReserveOutputOptions = {
|
|
1165
1365
|
field: string;
|
|
1166
1366
|
ext: string;
|
|
1167
1367
|
requestedClientPath?: string;
|
|
1168
1368
|
visibility?: OutputVisibility;
|
|
1169
1369
|
};
|
|
1170
1370
|
|
|
1171
|
-
|
|
1371
|
+
declare type ResolvedInputFile = {
|
|
1172
1372
|
path: string;
|
|
1173
1373
|
cleanup?: () => Promise<void>;
|
|
1174
1374
|
};
|
|
1175
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
|
+
|
|
1176
1399
|
declare type ResolvedMetroKind = Exclude<MetroPrepareKind, 'auto'>;
|
|
1177
1400
|
|
|
1178
|
-
|
|
1401
|
+
declare type ResolvedTarget = {
|
|
1402
|
+
kind: 'selector';
|
|
1403
|
+
selector: string;
|
|
1404
|
+
} | {
|
|
1405
|
+
kind: 'ref';
|
|
1406
|
+
ref: string;
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
declare type ResolveInputOptions = {
|
|
1179
1410
|
usage: string;
|
|
1180
1411
|
field?: string;
|
|
1181
1412
|
};
|
|
1182
1413
|
|
|
1183
|
-
|
|
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 & {
|
|
1184
1425
|
orientation: DeviceRotation;
|
|
1185
1426
|
};
|
|
1186
1427
|
|
|
1187
|
-
|
|
1188
|
-
|
|
1428
|
+
/** `rotate` — `{ action: 'rotate', orientation, message: 'Rotated to <orientation>' }`. */
|
|
1429
|
+
declare type RotateCommandResult = {
|
|
1430
|
+
action: 'rotate';
|
|
1431
|
+
orientation: DeviceRotation;
|
|
1432
|
+
message: string;
|
|
1189
1433
|
};
|
|
1190
1434
|
|
|
1191
1435
|
declare type RotateGestureOptions = DeviceCommandBaseOptions & {
|
|
@@ -1195,7 +1439,7 @@ declare type RotateGestureOptions = DeviceCommandBaseOptions & {
|
|
|
1195
1439
|
velocity?: number;
|
|
1196
1440
|
};
|
|
1197
1441
|
|
|
1198
|
-
|
|
1442
|
+
declare type ScreenshotOverlayRef = {
|
|
1199
1443
|
ref: string;
|
|
1200
1444
|
label?: string;
|
|
1201
1445
|
rect: Rect;
|
|
@@ -1222,7 +1466,6 @@ declare type ScrollOptions_2 = DeviceCommandBaseOptions & {
|
|
|
1222
1466
|
pixels?: number;
|
|
1223
1467
|
durationMs?: number;
|
|
1224
1468
|
};
|
|
1225
|
-
export { ScrollOptions_2 as ScrollOptions }
|
|
1226
1469
|
|
|
1227
1470
|
declare type SelectorSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'scope' | 'raw'>;
|
|
1228
1471
|
|
|
@@ -1238,9 +1481,10 @@ declare const SESSION_ISOLATION_MODES: readonly ['none', 'tenant'];
|
|
|
1238
1481
|
|
|
1239
1482
|
declare const SESSION_SURFACES: readonly ['app', 'frontmost-app', 'desktop', 'menubar'];
|
|
1240
1483
|
|
|
1241
|
-
|
|
1484
|
+
declare type SessionCloseResult = {
|
|
1242
1485
|
session: string;
|
|
1243
1486
|
shutdown?: TargetShutdownResult;
|
|
1487
|
+
provider?: CloudProviderSessionResult;
|
|
1244
1488
|
identifiers: AgentDeviceIdentifiers;
|
|
1245
1489
|
};
|
|
1246
1490
|
|
|
@@ -1256,7 +1500,7 @@ declare type SessionRuntimeHints = {
|
|
|
1256
1500
|
|
|
1257
1501
|
declare type SessionSurface = (typeof SESSION_SURFACES)[number];
|
|
1258
1502
|
|
|
1259
|
-
|
|
1503
|
+
declare type SettingsUpdateOptions = (DeviceCommandBaseOptions & {
|
|
1260
1504
|
setting: 'clear-app-state';
|
|
1261
1505
|
state: 'clear';
|
|
1262
1506
|
app?: string;
|
|
@@ -1287,6 +1531,23 @@ export declare type SettingsUpdateOptions = (DeviceCommandBaseOptions & {
|
|
|
1287
1531
|
mode?: 'full' | 'limited';
|
|
1288
1532
|
});
|
|
1289
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
|
+
|
|
1290
1551
|
declare type SnapshotCaptureAnalysis = {
|
|
1291
1552
|
rawNodeCount: number;
|
|
1292
1553
|
maxDepth: number;
|
|
@@ -1312,13 +1573,17 @@ declare type SnapshotDiagnosticsSummary = {
|
|
|
1312
1573
|
warning?: string;
|
|
1313
1574
|
};
|
|
1314
1575
|
|
|
1315
|
-
|
|
1576
|
+
declare type SnapshotNode = RawSnapshotNode & {
|
|
1316
1577
|
ref: string;
|
|
1317
1578
|
};
|
|
1318
1579
|
|
|
1319
1580
|
/**
|
|
1320
1581
|
* Structured quality verdict computed once by the iOS runner's snapshot capture plan.
|
|
1321
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.
|
|
1322
1587
|
*/
|
|
1323
1588
|
declare type SnapshotQualityVerdict = {
|
|
1324
1589
|
state: 'healthy' | 'recovered' | 'sparse';
|
|
@@ -1346,16 +1611,16 @@ declare type SnapshotUnchanged = {
|
|
|
1346
1611
|
scope?: string;
|
|
1347
1612
|
};
|
|
1348
1613
|
|
|
1349
|
-
|
|
1614
|
+
declare type SnapshotVisibility = {
|
|
1350
1615
|
partial: boolean;
|
|
1351
1616
|
visibleNodeCount: number;
|
|
1352
1617
|
totalNodeCount: number;
|
|
1353
1618
|
reasons: SnapshotVisibilityReason[];
|
|
1354
1619
|
};
|
|
1355
1620
|
|
|
1356
|
-
|
|
1621
|
+
declare type SnapshotVisibilityReason = 'offscreen-nodes' | 'scroll-hidden-above' | 'scroll-hidden-below';
|
|
1357
1622
|
|
|
1358
|
-
|
|
1623
|
+
declare type StartupPerfSample = {
|
|
1359
1624
|
durationMs: number;
|
|
1360
1625
|
measuredAt: string;
|
|
1361
1626
|
method: string;
|
|
@@ -1372,7 +1637,7 @@ declare type SwipeGestureOptions = DeviceCommandBaseOptions & {
|
|
|
1372
1637
|
durationMs?: number;
|
|
1373
1638
|
};
|
|
1374
1639
|
|
|
1375
|
-
|
|
1640
|
+
declare type SwipeOptions = DeviceCommandBaseOptions & {
|
|
1376
1641
|
from: {
|
|
1377
1642
|
x: number;
|
|
1378
1643
|
y: number;
|
|
@@ -1391,7 +1656,7 @@ declare type SwipePattern = (typeof SWIPE_PATTERNS)[number];
|
|
|
1391
1656
|
|
|
1392
1657
|
declare type SwipePreset = (typeof SWIPE_PRESETS)[number];
|
|
1393
1658
|
|
|
1394
|
-
|
|
1659
|
+
declare type TargetShutdownResult = {
|
|
1395
1660
|
success: boolean;
|
|
1396
1661
|
exitCode: number;
|
|
1397
1662
|
stdout: string;
|
|
@@ -1399,13 +1664,13 @@ export declare type TargetShutdownResult = {
|
|
|
1399
1664
|
error?: NormalizedError;
|
|
1400
1665
|
};
|
|
1401
1666
|
|
|
1402
|
-
|
|
1667
|
+
declare type TemporaryFile = {
|
|
1403
1668
|
path: string;
|
|
1404
1669
|
visibility: 'internal';
|
|
1405
1670
|
cleanup: () => Promise<void>;
|
|
1406
1671
|
};
|
|
1407
1672
|
|
|
1408
|
-
|
|
1673
|
+
declare type TraceOptions = AgentDeviceRequestOverrides & {
|
|
1409
1674
|
action: 'start' | 'stop';
|
|
1410
1675
|
path?: string;
|
|
1411
1676
|
};
|
|
@@ -1422,7 +1687,7 @@ declare type TransformGestureParams = {
|
|
|
1422
1687
|
durationMs?: number;
|
|
1423
1688
|
};
|
|
1424
1689
|
|
|
1425
|
-
|
|
1690
|
+
declare type TypeTextOptions = DeviceCommandBaseOptions & {
|
|
1426
1691
|
text: string;
|
|
1427
1692
|
delayMs?: number;
|
|
1428
1693
|
};
|
|
@@ -1432,18 +1697,20 @@ declare type ViewportCommandOptions = DeviceCommandBaseOptions & {
|
|
|
1432
1697
|
height: number;
|
|
1433
1698
|
};
|
|
1434
1699
|
|
|
1435
|
-
|
|
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 = {
|
|
1436
1708
|
width: number;
|
|
1437
1709
|
height: number;
|
|
1710
|
+
message: string;
|
|
1438
1711
|
};
|
|
1439
1712
|
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
export declare type WaitCommandResult = DaemonResponseData & {
|
|
1443
|
-
waitedMs?: number;
|
|
1444
|
-
text?: string;
|
|
1445
|
-
selector?: string;
|
|
1446
|
-
};
|
|
1713
|
+
declare type WaitCommandOptions = DeviceCommandBaseOptions & WaitCommandTarget;
|
|
1447
1714
|
|
|
1448
1715
|
declare type WaitCommandTarget = {
|
|
1449
1716
|
durationMs: number;
|