agent-device 0.13.2 → 0.13.3
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/bin/agent-device.mjs +6 -2
- package/dist/src/113.js +1 -1
- package/dist/src/1974.js +2 -2
- package/dist/src/2301.js +1 -1
- package/dist/src/3918.js +29 -29
- package/dist/src/7847.js +1 -1
- package/dist/src/8161.js +3 -0
- package/dist/src/8656.js +1 -1
- package/dist/src/940.js +1 -0
- package/dist/src/9542.js +2 -2
- package/dist/src/index.d.ts +170 -1927
- package/dist/src/index.js +1 -1
- package/dist/src/{bin.js → internal/bin.js} +31 -31
- package/dist/src/internal/companion-tunnel.js +1 -0
- package/dist/src/internal/daemon.js +43 -0
- package/dist/src/internal/update-check-entry.js +1 -0
- package/dist/src/metro.d.ts +5 -3
- package/dist/src/selectors.js +1 -1
- package/package.json +1 -17
- package/dist/src/4993.js +0 -1
- package/dist/src/5721.js +0 -1
- package/dist/src/7166.js +0 -1
- package/dist/src/8564.js +0 -3
- package/dist/src/9076.js +0 -1
- package/dist/src/backend.d.ts +0 -527
- package/dist/src/backend.js +0 -1
- package/dist/src/commands/index.d.ts +0 -1883
- package/dist/src/commands/index.js +0 -1
- package/dist/src/daemon.js +0 -43
- package/dist/src/metro-companion.js +0 -1
- package/dist/src/observability.d.ts +0 -91
- package/dist/src/observability.js +0 -1
- package/dist/src/testing/conformance.d.ts +0 -753
- package/dist/src/testing/conformance.js +0 -1
- package/dist/src/update-check-entry.js +0 -1
- /package/dist/src/{bin.d.ts → internal/bin.d.ts} +0 -0
- /package/dist/src/{daemon.d.ts → internal/companion-tunnel.d.ts} +0 -0
- /package/dist/src/{metro-companion.d.ts → internal/daemon.d.ts} +0 -0
- /package/dist/src/{update-check-entry.d.ts → internal/update-check-entry.d.ts} +0 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -1,113 +1,3 @@
|
|
|
1
|
-
export declare type AdminBootCommandOptions = CommandContext & {
|
|
2
|
-
target?: BackendDeviceTarget;
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
export declare type AdminBootCommandResult = {
|
|
6
|
-
kind: 'deviceBooted';
|
|
7
|
-
target?: BackendDeviceTarget;
|
|
8
|
-
backendResult?: Record<string, unknown>;
|
|
9
|
-
message?: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export declare type AdminDevicesCommandOptions = CommandContext & {
|
|
13
|
-
filter?: BackendDeviceFilter;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export declare type AdminDevicesCommandResult = {
|
|
17
|
-
kind: 'adminDevices';
|
|
18
|
-
devices: readonly BackendDeviceInfo[];
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export declare type AdminEnsureSimulatorCommandOptions = CommandContext & BackendEnsureSimulatorOptions;
|
|
22
|
-
|
|
23
|
-
export declare type AdminEnsureSimulatorCommandResult = {
|
|
24
|
-
kind: 'simulatorEnsured';
|
|
25
|
-
} & BackendEnsureSimulatorResult;
|
|
26
|
-
|
|
27
|
-
export declare type AdminInstallCommandOptions = CommandContext & {
|
|
28
|
-
app: string;
|
|
29
|
-
source: BackendInstallSource;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export declare type AdminInstallCommandResult = {
|
|
33
|
-
kind: 'appInstalled' | 'appReinstalled' | 'appInstalledFromSource';
|
|
34
|
-
app?: string;
|
|
35
|
-
source: BackendInstallSource;
|
|
36
|
-
appId?: string;
|
|
37
|
-
appName?: string;
|
|
38
|
-
bundleId?: string;
|
|
39
|
-
packageName?: string;
|
|
40
|
-
launchTarget?: string;
|
|
41
|
-
installablePath?: string;
|
|
42
|
-
archivePath?: string;
|
|
43
|
-
backendResult?: Record<string, unknown>;
|
|
44
|
-
message?: string;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export declare type AdminInstallFromSourceCommandOptions = CommandContext & {
|
|
48
|
-
app?: string;
|
|
49
|
-
source: BackendInstallSource;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export declare type AdminReinstallCommandOptions = AdminInstallCommandOptions;
|
|
53
|
-
|
|
54
|
-
export declare type AgentDevice = AgentDeviceRuntime & BoundAgentDeviceCommands;
|
|
55
|
-
|
|
56
|
-
export declare type AgentDeviceBackend = {
|
|
57
|
-
platform: AgentDeviceBackendPlatform;
|
|
58
|
-
capabilities?: BackendCapabilitySet;
|
|
59
|
-
escapeHatches?: BackendEscapeHatches;
|
|
60
|
-
captureSnapshot?(context: BackendCommandContext, options?: BackendSnapshotOptions): Promise<BackendSnapshotResult>;
|
|
61
|
-
captureScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
|
|
62
|
-
readText?(context: BackendCommandContext, node: SnapshotNode): Promise<BackendReadTextResult>;
|
|
63
|
-
findText?(context: BackendCommandContext, text: string): Promise<BackendFindTextResult>;
|
|
64
|
-
tap?(context: BackendCommandContext, point: Point, options?: BackendTapOptions): Promise<BackendActionResult>;
|
|
65
|
-
fill?(context: BackendCommandContext, point: Point, text: string, options?: BackendFillOptions): Promise<BackendActionResult>;
|
|
66
|
-
typeText?(context: BackendCommandContext, text: string, options?: {
|
|
67
|
-
delayMs?: number;
|
|
68
|
-
}): Promise<BackendActionResult>;
|
|
69
|
-
focus?(context: BackendCommandContext, point: Point): Promise<BackendActionResult>;
|
|
70
|
-
longPress?(context: BackendCommandContext, point: Point, options?: BackendLongPressOptions): Promise<BackendActionResult>;
|
|
71
|
-
swipe?(context: BackendCommandContext, from: Point, to: Point, options?: BackendSwipeOptions): Promise<BackendActionResult>;
|
|
72
|
-
scroll?(context: BackendCommandContext, target: BackendScrollTarget, options: BackendScrollOptions): Promise<BackendActionResult>;
|
|
73
|
-
pinch?(context: BackendCommandContext, options: BackendPinchOptions): Promise<BackendActionResult>;
|
|
74
|
-
pressKey?(context: BackendCommandContext, key: string, options?: {
|
|
75
|
-
modifiers?: string[];
|
|
76
|
-
}): Promise<BackendActionResult>;
|
|
77
|
-
pressBack?(context: BackendCommandContext, options?: BackendBackOptions): Promise<BackendActionResult>;
|
|
78
|
-
pressHome?(context: BackendCommandContext): Promise<BackendActionResult>;
|
|
79
|
-
rotate?(context: BackendCommandContext, orientation: BackendDeviceOrientation): Promise<BackendActionResult>;
|
|
80
|
-
setKeyboard?(context: BackendCommandContext, options: BackendKeyboardOptions): Promise<BackendKeyboardResult | BackendActionResult>;
|
|
81
|
-
getClipboard?(context: BackendCommandContext): Promise<string | BackendClipboardTextResult>;
|
|
82
|
-
setClipboard?(context: BackendCommandContext, text: string): Promise<BackendActionResult>;
|
|
83
|
-
openSettings?(context: BackendCommandContext, target?: string): Promise<BackendActionResult>;
|
|
84
|
-
handleAlert?(context: BackendCommandContext, action: BackendAlertAction, options?: {
|
|
85
|
-
timeoutMs?: number;
|
|
86
|
-
}): Promise<BackendAlertResult>;
|
|
87
|
-
openAppSwitcher?(context: BackendCommandContext): Promise<BackendActionResult>;
|
|
88
|
-
openApp?(context: BackendCommandContext, target: BackendOpenTarget, options?: BackendOpenOptions): Promise<BackendActionResult>;
|
|
89
|
-
closeApp?(context: BackendCommandContext, app?: string): Promise<BackendActionResult>;
|
|
90
|
-
listApps?(context: BackendCommandContext, filter?: BackendAppListFilter): Promise<readonly BackendAppInfo[]>;
|
|
91
|
-
getAppState?(context: BackendCommandContext, app: string): Promise<BackendAppState>;
|
|
92
|
-
pushFile?(context: BackendCommandContext, input: BackendPushInput, target: string): Promise<BackendActionResult>;
|
|
93
|
-
triggerAppEvent?(context: BackendCommandContext, event: BackendAppEvent): Promise<BackendActionResult>;
|
|
94
|
-
listDevices?(context: BackendCommandContext, filter?: BackendDeviceFilter): Promise<readonly BackendDeviceInfo[]>;
|
|
95
|
-
bootDevice?(context: BackendCommandContext, target?: BackendDeviceTarget): Promise<BackendActionResult>;
|
|
96
|
-
ensureSimulator?(context: BackendCommandContext, options: BackendEnsureSimulatorOptions): Promise<BackendEnsureSimulatorResult>;
|
|
97
|
-
resolveInstallSource?(context: BackendCommandContext, source: BackendInstallSource): Promise<BackendInstallSource>;
|
|
98
|
-
installApp?(context: BackendCommandContext, target: BackendInstallTarget): Promise<BackendInstallResult>;
|
|
99
|
-
reinstallApp?(context: BackendCommandContext, target: BackendInstallTarget): Promise<BackendInstallResult>;
|
|
100
|
-
startRecording?(context: BackendCommandContext, options?: BackendRecordingOptions): Promise<BackendRecordingResult>;
|
|
101
|
-
stopRecording?(context: BackendCommandContext, options?: BackendRecordingOptions): Promise<BackendRecordingResult>;
|
|
102
|
-
startTrace?(context: BackendCommandContext, options?: BackendTraceOptions): Promise<BackendTraceResult>;
|
|
103
|
-
stopTrace?(context: BackendCommandContext, options?: BackendTraceOptions): Promise<BackendTraceResult>;
|
|
104
|
-
readLogs?(context: BackendCommandContext, options?: BackendReadLogsOptions): Promise<BackendReadLogsResult>;
|
|
105
|
-
dumpNetwork?(context: BackendCommandContext, options?: BackendDumpNetworkOptions): Promise<BackendDumpNetworkResult>;
|
|
106
|
-
measurePerf?(context: BackendCommandContext, options?: BackendMeasurePerfOptions): Promise<BackendMeasurePerfResult>;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export declare type AgentDeviceBackendPlatform = 'ios' | 'android' | 'macos' | 'linux';
|
|
110
|
-
|
|
111
1
|
export declare type AgentDeviceClient = {
|
|
112
2
|
command: AgentDeviceCommandClient;
|
|
113
3
|
devices: {
|
|
@@ -219,78 +109,6 @@ export declare type AgentDeviceCommandClient = {
|
|
|
219
109
|
clipboard: (options: ClipboardCommandOptions) => Promise<ClipboardCommandResult>;
|
|
220
110
|
};
|
|
221
111
|
|
|
222
|
-
declare type AgentDeviceCommands = {
|
|
223
|
-
capture: {
|
|
224
|
-
screenshot: RuntimeCommand<ScreenshotCommandOptions, ScreenshotCommandResult>;
|
|
225
|
-
diffScreenshot: RuntimeCommand<DiffScreenshotCommandOptions, DiffScreenshotCommandResult>;
|
|
226
|
-
snapshot: RuntimeCommand<SnapshotCommandOptions, SnapshotCommandResult>;
|
|
227
|
-
diffSnapshot: RuntimeCommand<DiffSnapshotCommandOptions, DiffSnapshotCommandResult>;
|
|
228
|
-
};
|
|
229
|
-
selectors: {
|
|
230
|
-
find: RuntimeCommand<FindReadCommandOptions, FindReadCommandResult>;
|
|
231
|
-
get: RuntimeCommand<GetCommandOptions, GetCommandResult>;
|
|
232
|
-
getText: RuntimeCommand<GetTextCommandOptions, Extract<GetCommandResult, {
|
|
233
|
-
kind: 'text';
|
|
234
|
-
}>>;
|
|
235
|
-
getAttrs: RuntimeCommand<GetAttrsCommandOptions, Extract<GetCommandResult, {
|
|
236
|
-
kind: 'attrs';
|
|
237
|
-
}>>;
|
|
238
|
-
is: RuntimeCommand<IsCommandOptions, IsCommandResult>;
|
|
239
|
-
isVisible: RuntimeCommand<IsSelectorCommandOptions, IsCommandResult>;
|
|
240
|
-
isHidden: RuntimeCommand<IsSelectorCommandOptions, IsCommandResult>;
|
|
241
|
-
wait: RuntimeCommand<WaitCommandOptions_2, WaitCommandResult_2>;
|
|
242
|
-
waitForText: RuntimeCommand<WaitForTextCommandOptions, Extract<WaitCommandResult_2, {
|
|
243
|
-
kind: 'text';
|
|
244
|
-
}>>;
|
|
245
|
-
};
|
|
246
|
-
interactions: {
|
|
247
|
-
click: RuntimeCommand<ClickCommandOptions, PressCommandResult>;
|
|
248
|
-
press: RuntimeCommand<PressCommandOptions, PressCommandResult>;
|
|
249
|
-
fill: RuntimeCommand<FillCommandOptions, FillCommandResult>;
|
|
250
|
-
typeText: RuntimeCommand<TypeTextCommandOptions, TypeTextCommandResult>;
|
|
251
|
-
focus: RuntimeCommand<FocusCommandOptions, FocusCommandResult>;
|
|
252
|
-
longPress: RuntimeCommand<LongPressCommandOptions, LongPressCommandResult>;
|
|
253
|
-
swipe: RuntimeCommand<SwipeCommandOptions, SwipeCommandResult>;
|
|
254
|
-
scroll: RuntimeCommand<ScrollCommandOptions, ScrollCommandResult>;
|
|
255
|
-
pinch: RuntimeCommand<PinchCommandOptions, PinchCommandResult>;
|
|
256
|
-
};
|
|
257
|
-
system: {
|
|
258
|
-
back: RuntimeCommand<SystemBackCommandOptions | undefined, SystemBackCommandResult>;
|
|
259
|
-
home: RuntimeCommand<SystemHomeCommandOptions | undefined, SystemHomeCommandResult>;
|
|
260
|
-
rotate: RuntimeCommand<SystemRotateCommandOptions, SystemRotateCommandResult>;
|
|
261
|
-
keyboard: RuntimeCommand<SystemKeyboardCommandOptions | undefined, SystemKeyboardCommandResult>;
|
|
262
|
-
clipboard: RuntimeCommand<SystemClipboardCommandOptions, SystemClipboardCommandResult>;
|
|
263
|
-
settings: RuntimeCommand<SystemSettingsCommandOptions | undefined, SystemSettingsCommandResult>;
|
|
264
|
-
alert: RuntimeCommand<SystemAlertCommandOptions | undefined, SystemAlertCommandResult>;
|
|
265
|
-
appSwitcher: RuntimeCommand<SystemAppSwitcherCommandOptions | undefined, SystemAppSwitcherCommandResult>;
|
|
266
|
-
};
|
|
267
|
-
apps: {
|
|
268
|
-
open: RuntimeCommand<OpenAppCommandOptions, OpenAppCommandResult>;
|
|
269
|
-
close: RuntimeCommand<CloseAppCommandOptions | undefined, CloseAppCommandResult>;
|
|
270
|
-
list: RuntimeCommand<ListAppsCommandOptions | undefined, ListAppsCommandResult>;
|
|
271
|
-
state: RuntimeCommand<GetAppStateCommandOptions, GetAppStateCommandResult>;
|
|
272
|
-
push: RuntimeCommand<PushAppCommandOptions, PushAppCommandResult>;
|
|
273
|
-
triggerEvent: RuntimeCommand<TriggerAppEventCommandOptions, TriggerAppEventCommandResult>;
|
|
274
|
-
};
|
|
275
|
-
admin: {
|
|
276
|
-
devices: RuntimeCommand<AdminDevicesCommandOptions | undefined, AdminDevicesCommandResult>;
|
|
277
|
-
boot: RuntimeCommand<AdminBootCommandOptions | undefined, AdminBootCommandResult>;
|
|
278
|
-
ensureSimulator: RuntimeCommand<AdminEnsureSimulatorCommandOptions, AdminEnsureSimulatorCommandResult>;
|
|
279
|
-
install: RuntimeCommand<AdminInstallCommandOptions, AdminInstallCommandResult>;
|
|
280
|
-
reinstall: RuntimeCommand<AdminReinstallCommandOptions, AdminInstallCommandResult>;
|
|
281
|
-
installFromSource: RuntimeCommand<AdminInstallFromSourceCommandOptions, AdminInstallCommandResult>;
|
|
282
|
-
};
|
|
283
|
-
recording: {
|
|
284
|
-
record: RuntimeCommand<RecordingRecordCommandOptions, RecordingRecordCommandResult>;
|
|
285
|
-
trace: RuntimeCommand<RecordingTraceCommandOptions, RecordingTraceCommandResult>;
|
|
286
|
-
};
|
|
287
|
-
diagnostics: {
|
|
288
|
-
logs: RuntimeCommand<DiagnosticsLogsCommandOptions | undefined, DiagnosticsLogsCommandResult>;
|
|
289
|
-
network: RuntimeCommand<DiagnosticsNetworkCommandOptions | undefined, DiagnosticsNetworkCommandResult>;
|
|
290
|
-
perf: RuntimeCommand<DiagnosticsPerfCommandOptions | undefined, DiagnosticsPerfCommandResult>;
|
|
291
|
-
};
|
|
292
|
-
};
|
|
293
|
-
|
|
294
112
|
export declare type AgentDeviceDaemonTransport = (req: Omit<DaemonRequest, 'token'>) => Promise<DaemonResponse>;
|
|
295
113
|
|
|
296
114
|
export declare type AgentDeviceDevice = {
|
|
@@ -322,26 +140,6 @@ export declare type AgentDeviceIdentifiers = {
|
|
|
322
140
|
|
|
323
141
|
export declare type AgentDeviceRequestOverrides = Pick<AgentDeviceClientConfig, 'session' | 'lockPolicy' | 'lockPlatform' | 'requestId' | 'daemonBaseUrl' | 'daemonAuthToken' | 'daemonTransport' | 'daemonServerMode' | 'tenant' | 'sessionIsolation' | 'runId' | 'leaseId' | 'leaseBackend' | 'cwd' | 'debug'>;
|
|
324
142
|
|
|
325
|
-
export declare type AgentDeviceRuntime = {
|
|
326
|
-
backend: AgentDeviceBackend;
|
|
327
|
-
artifacts: ArtifactAdapter;
|
|
328
|
-
sessions: CommandSessionStore;
|
|
329
|
-
policy: CommandPolicy;
|
|
330
|
-
diagnostics?: DiagnosticsSink;
|
|
331
|
-
clock?: CommandClock;
|
|
332
|
-
signal?: AbortSignal;
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
export declare type AgentDeviceRuntimeConfig = {
|
|
336
|
-
backend: AgentDeviceBackend;
|
|
337
|
-
artifacts: ArtifactAdapter;
|
|
338
|
-
sessions?: CommandSessionStore;
|
|
339
|
-
policy?: CommandPolicy;
|
|
340
|
-
diagnostics?: DiagnosticsSink;
|
|
341
|
-
clock?: CommandClock;
|
|
342
|
-
signal?: AbortSignal;
|
|
343
|
-
};
|
|
344
|
-
|
|
345
143
|
export declare type AgentDeviceSelectionOptions = {
|
|
346
144
|
platform?: PlatformSelector;
|
|
347
145
|
target?: DeviceTarget;
|
|
@@ -470,11 +268,6 @@ export declare type AppOpenResult = {
|
|
|
470
268
|
identifiers: AgentDeviceIdentifiers;
|
|
471
269
|
};
|
|
472
270
|
|
|
473
|
-
export declare type AppPushInput = {
|
|
474
|
-
kind: 'json';
|
|
475
|
-
payload: Record<string, unknown>;
|
|
476
|
-
} | FileInputRef;
|
|
477
|
-
|
|
478
271
|
export declare type AppPushOptions = ClientCommandBaseOptions & {
|
|
479
272
|
app: string;
|
|
480
273
|
payload: string | Record<string, unknown>;
|
|
@@ -523,8 +316,6 @@ export declare type ArtifactDescriptor = {
|
|
|
523
316
|
metadata?: Record<string, unknown>;
|
|
524
317
|
};
|
|
525
318
|
|
|
526
|
-
export declare function assertBackendCapabilityAllowed(runtime: Pick<AgentDeviceRuntime, 'backend' | 'policy'>, capability: BackendCapabilityName): void;
|
|
527
|
-
|
|
528
319
|
export declare type BackCommandOptions = DeviceCommandBaseOptions & {
|
|
529
320
|
mode?: 'in-app' | 'system';
|
|
530
321
|
};
|
|
@@ -533,1076 +324,218 @@ export declare type BackCommandResult = CommandActionResult<'back'> & {
|
|
|
533
324
|
mode?: 'in-app' | 'system';
|
|
534
325
|
};
|
|
535
326
|
|
|
536
|
-
declare
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
327
|
+
export declare type BatchRunOptions = AgentDeviceRequestOverrides & {
|
|
328
|
+
steps: BatchStep[];
|
|
329
|
+
onError?: 'stop';
|
|
330
|
+
maxSteps?: number;
|
|
331
|
+
out?: string;
|
|
332
|
+
};
|
|
541
333
|
|
|
542
|
-
export declare type
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
334
|
+
export declare type BatchStep = {
|
|
335
|
+
command: string;
|
|
336
|
+
positionals?: string[];
|
|
337
|
+
flags?: Record<string, unknown>;
|
|
546
338
|
};
|
|
547
339
|
|
|
548
|
-
export declare type
|
|
549
|
-
kind: '
|
|
550
|
-
|
|
551
|
-
} | {
|
|
552
|
-
kind: 'alertHandled';
|
|
553
|
-
handled: boolean;
|
|
554
|
-
alert?: BackendAlertInfo;
|
|
555
|
-
button?: string;
|
|
556
|
-
} | {
|
|
557
|
-
kind: 'alertWait';
|
|
558
|
-
alert: BackendAlertInfo | null;
|
|
559
|
-
waitedMs?: number;
|
|
560
|
-
timedOut?: boolean;
|
|
340
|
+
export declare type CaptureDiffOptions = ClientCommandBaseOptions & Pick<CaptureSnapshotOptions, 'interactiveOnly' | 'compact' | 'depth' | 'scope' | 'raw'> & {
|
|
341
|
+
kind: 'snapshot';
|
|
342
|
+
out?: string;
|
|
561
343
|
};
|
|
562
344
|
|
|
563
|
-
export declare type
|
|
564
|
-
|
|
565
|
-
|
|
345
|
+
export declare type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
|
|
346
|
+
path?: string;
|
|
347
|
+
overlayRefs?: boolean;
|
|
348
|
+
fullscreen?: boolean;
|
|
349
|
+
maxSize?: number;
|
|
350
|
+
surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
|
|
566
351
|
};
|
|
567
352
|
|
|
568
|
-
export declare type
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
packageName?: string;
|
|
573
|
-
activity?: string;
|
|
353
|
+
export declare type CaptureScreenshotResult = {
|
|
354
|
+
path: string;
|
|
355
|
+
overlayRefs?: ScreenshotOverlayRef[];
|
|
356
|
+
identifiers: AgentDeviceIdentifiers;
|
|
574
357
|
};
|
|
575
358
|
|
|
576
|
-
export declare type
|
|
359
|
+
export declare type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
360
|
+
interactiveOnly?: boolean;
|
|
361
|
+
compact?: boolean;
|
|
362
|
+
depth?: number;
|
|
363
|
+
scope?: string;
|
|
364
|
+
raw?: boolean;
|
|
365
|
+
};
|
|
577
366
|
|
|
578
|
-
export declare type
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
367
|
+
export declare type CaptureSnapshotResult = {
|
|
368
|
+
nodes: SnapshotNode[];
|
|
369
|
+
truncated: boolean;
|
|
370
|
+
appName?: string;
|
|
371
|
+
appBundleId?: string;
|
|
372
|
+
visibility?: SnapshotVisibility;
|
|
373
|
+
warnings?: string[];
|
|
374
|
+
identifiers: AgentDeviceIdentifiers;
|
|
585
375
|
};
|
|
586
376
|
|
|
587
|
-
export declare
|
|
588
|
-
|
|
377
|
+
export declare function centerOfRect(rect: Rect): Point;
|
|
378
|
+
|
|
379
|
+
export declare type ClickOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions & {
|
|
380
|
+
button?: 'primary' | 'secondary' | 'middle';
|
|
589
381
|
};
|
|
590
382
|
|
|
591
|
-
|
|
383
|
+
declare type ClientCommandBaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions;
|
|
592
384
|
|
|
593
|
-
export declare type
|
|
385
|
+
export declare type ClipboardCommandOptions = (DeviceCommandBaseOptions & {
|
|
386
|
+
action: 'read';
|
|
387
|
+
}) | (DeviceCommandBaseOptions & {
|
|
388
|
+
action: 'write';
|
|
389
|
+
text: string;
|
|
390
|
+
});
|
|
594
391
|
|
|
595
|
-
export declare type
|
|
392
|
+
export declare type ClipboardCommandResult = (DaemonResponseData & {
|
|
393
|
+
action: 'read';
|
|
596
394
|
text: string;
|
|
395
|
+
}) | (DaemonResponseData & {
|
|
396
|
+
action: 'write';
|
|
397
|
+
textLength: number;
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
declare type CommandActionResult<T extends string> = DaemonResponseData & {
|
|
401
|
+
action?: T;
|
|
597
402
|
};
|
|
598
403
|
|
|
599
|
-
export declare type
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
metadata?: Record<string, unknown>;
|
|
404
|
+
export declare type CommandRequestResult = DaemonResponseData;
|
|
405
|
+
|
|
406
|
+
declare type CompanionTunnelScope = {
|
|
407
|
+
tenantId: string;
|
|
408
|
+
runId: string;
|
|
409
|
+
leaseId: string;
|
|
606
410
|
};
|
|
607
411
|
|
|
608
|
-
export declare
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
412
|
+
export declare function createAgentDeviceClient(config?: AgentDeviceClientConfig, deps?: {
|
|
413
|
+
transport?: AgentDeviceDaemonTransport;
|
|
414
|
+
}): AgentDeviceClient;
|
|
415
|
+
|
|
416
|
+
export declare function createLocalArtifactAdapter(options?: LocalArtifactAdapterOptions): ArtifactAdapter;
|
|
417
|
+
|
|
418
|
+
export declare type CreateTempFileOptions = {
|
|
419
|
+
prefix: string;
|
|
420
|
+
ext: string;
|
|
612
421
|
};
|
|
613
422
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
423
|
+
declare type DaemonArtifact = {
|
|
424
|
+
field: string;
|
|
425
|
+
artifactId?: string;
|
|
426
|
+
fileName?: string;
|
|
427
|
+
localPath?: string;
|
|
428
|
+
path?: string;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
declare type DaemonError = {
|
|
432
|
+
code: string;
|
|
433
|
+
message: string;
|
|
434
|
+
hint?: string;
|
|
435
|
+
diagnosticId?: string;
|
|
436
|
+
logPath?: string;
|
|
621
437
|
details?: Record<string, unknown>;
|
|
622
438
|
};
|
|
623
439
|
|
|
624
|
-
|
|
440
|
+
declare type DaemonInstallSource = {
|
|
441
|
+
kind: 'url';
|
|
442
|
+
url: string;
|
|
443
|
+
headers?: Record<string, string>;
|
|
444
|
+
} | {
|
|
445
|
+
kind: 'path';
|
|
446
|
+
path: string;
|
|
447
|
+
} | ({
|
|
448
|
+
kind: 'github-actions-artifact';
|
|
449
|
+
owner: string;
|
|
450
|
+
repo: string;
|
|
451
|
+
} & ({
|
|
452
|
+
artifactId: number;
|
|
453
|
+
} | {
|
|
454
|
+
runId: number;
|
|
455
|
+
artifactName: string;
|
|
456
|
+
} | {
|
|
457
|
+
artifactName: string;
|
|
458
|
+
}));
|
|
459
|
+
|
|
460
|
+
declare type DaemonLockPolicy = 'reject' | 'strip';
|
|
625
461
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
462
|
+
declare type DaemonRequest = {
|
|
463
|
+
token?: string;
|
|
464
|
+
session?: string;
|
|
465
|
+
command: string;
|
|
466
|
+
positionals: string[];
|
|
467
|
+
flags?: Record<string, unknown>;
|
|
468
|
+
runtime?: SessionRuntimeHints;
|
|
469
|
+
meta?: DaemonRequestMeta;
|
|
632
470
|
};
|
|
633
471
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
472
|
+
declare type DaemonRequestMeta = {
|
|
473
|
+
requestId?: string;
|
|
474
|
+
debug?: boolean;
|
|
475
|
+
cwd?: string;
|
|
476
|
+
tenantId?: string;
|
|
477
|
+
runId?: string;
|
|
478
|
+
leaseId?: string;
|
|
479
|
+
leaseTtlMs?: number;
|
|
480
|
+
leaseBackend?: LeaseBackend;
|
|
481
|
+
sessionIsolation?: 'none' | 'tenant';
|
|
482
|
+
uploadedArtifactId?: string;
|
|
483
|
+
clientArtifactPaths?: Record<string, string>;
|
|
484
|
+
installSource?: DaemonInstallSource;
|
|
485
|
+
retainMaterializedPaths?: boolean;
|
|
486
|
+
materializedPathRetentionMs?: number;
|
|
487
|
+
materializationId?: string;
|
|
488
|
+
lockPolicy?: DaemonLockPolicy;
|
|
489
|
+
lockPlatform?: 'ios' | 'macos' | 'android' | 'linux' | 'apple';
|
|
637
490
|
};
|
|
638
491
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
492
|
+
declare type DaemonResponse = {
|
|
493
|
+
ok: true;
|
|
494
|
+
data?: DaemonResponseData;
|
|
495
|
+
} | {
|
|
496
|
+
ok: false;
|
|
497
|
+
error: DaemonError;
|
|
642
498
|
};
|
|
643
499
|
|
|
644
|
-
|
|
645
|
-
|
|
500
|
+
declare type DaemonResponseData = Record<string, unknown> & {
|
|
501
|
+
artifacts?: DaemonArtifact[];
|
|
646
502
|
};
|
|
647
503
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
notes?: readonly string[];
|
|
504
|
+
declare type DaemonServerMode = 'socket' | 'http' | 'dual';
|
|
505
|
+
|
|
506
|
+
declare type DaemonTransportMode = 'auto' | 'socket' | 'http';
|
|
507
|
+
|
|
508
|
+
export declare type DeviceBootOptions = ClientCommandBaseOptions & {
|
|
509
|
+
headless?: boolean;
|
|
655
510
|
};
|
|
656
511
|
|
|
657
|
-
|
|
512
|
+
declare type DeviceCommandBaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions;
|
|
513
|
+
|
|
514
|
+
declare type DeviceKind = 'simulator' | 'emulator' | 'device';
|
|
515
|
+
|
|
516
|
+
declare type DeviceTarget = 'mobile' | 'tv' | 'desktop';
|
|
517
|
+
|
|
518
|
+
export declare type ElementTarget = RefTarget | SelectorTarget;
|
|
519
|
+
|
|
520
|
+
export declare type EnsureSimulatorOptions = AgentDeviceRequestOverrides & {
|
|
658
521
|
device: string;
|
|
659
522
|
runtime?: string;
|
|
660
523
|
boot?: boolean;
|
|
661
524
|
reuseExisting?: boolean;
|
|
525
|
+
iosSimulatorDeviceSet?: string;
|
|
662
526
|
};
|
|
663
527
|
|
|
664
|
-
export declare type
|
|
528
|
+
export declare type EnsureSimulatorResult = {
|
|
665
529
|
udid: string;
|
|
666
530
|
device: string;
|
|
667
531
|
runtime: string;
|
|
668
532
|
created: boolean;
|
|
669
533
|
booted: boolean;
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
export declare type BackendEscapeHatches = {
|
|
674
|
-
androidShell?(context: BackendCommandContext, args: readonly string[]): Promise<BackendShellResult>;
|
|
675
|
-
iosRunnerCommand?(context: BackendCommandContext, command: BackendRunnerCommand): Promise<BackendActionResult>;
|
|
676
|
-
macosDesktopScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
|
|
677
|
-
};
|
|
678
|
-
|
|
679
|
-
export declare type BackendFillOptions = {
|
|
680
|
-
delayMs?: number;
|
|
681
|
-
};
|
|
682
|
-
|
|
683
|
-
export declare type BackendFindTextResult = {
|
|
684
|
-
found: boolean;
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
export declare type BackendInstallResult = Record<string, unknown> & {
|
|
688
|
-
appId?: string;
|
|
689
|
-
appName?: string;
|
|
690
|
-
bundleId?: string;
|
|
691
|
-
packageName?: string;
|
|
692
|
-
launchTarget?: string;
|
|
693
|
-
installablePath?: string;
|
|
694
|
-
archivePath?: string;
|
|
534
|
+
iosSimulatorDeviceSet?: string | null;
|
|
535
|
+
identifiers: AgentDeviceIdentifiers;
|
|
695
536
|
};
|
|
696
537
|
|
|
697
|
-
export declare type
|
|
698
|
-
kind: 'path';
|
|
699
|
-
path: string;
|
|
700
|
-
} | {
|
|
701
|
-
kind: 'uploadedArtifact';
|
|
702
|
-
id: string;
|
|
703
|
-
} | {
|
|
704
|
-
kind: 'url';
|
|
705
|
-
url: string;
|
|
706
|
-
};
|
|
707
|
-
|
|
708
|
-
export declare type BackendInstallTarget = {
|
|
709
|
-
app?: string;
|
|
710
|
-
source: BackendInstallSource;
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
export declare type BackendKeyboardOptions = {
|
|
714
|
-
action: 'status' | 'get' | 'dismiss';
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
export declare type BackendKeyboardResult = {
|
|
718
|
-
platform?: 'android' | 'ios' | 'macos' | 'linux';
|
|
719
|
-
action?: BackendKeyboardOptions['action'];
|
|
720
|
-
visible?: boolean;
|
|
721
|
-
inputType?: string | null;
|
|
722
|
-
type?: string | null;
|
|
723
|
-
wasVisible?: boolean;
|
|
724
|
-
dismissed?: boolean;
|
|
725
|
-
attempts?: number;
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
export declare type BackendLogEntry = {
|
|
729
|
-
timestamp?: string;
|
|
730
|
-
level?: 'debug' | 'info' | 'warn' | 'error' | string;
|
|
731
|
-
message: string;
|
|
732
|
-
source?: string;
|
|
733
|
-
metadata?: Record<string, unknown>;
|
|
734
|
-
};
|
|
735
|
-
|
|
736
|
-
export declare type BackendLongPressOptions = {
|
|
737
|
-
durationMs?: number;
|
|
738
|
-
};
|
|
739
|
-
|
|
740
|
-
export declare type BackendMeasurePerfOptions = BackendDiagnosticsTimeWindow & {
|
|
741
|
-
sampleMs?: number;
|
|
742
|
-
metrics?: readonly string[];
|
|
743
|
-
};
|
|
744
|
-
|
|
745
|
-
export declare type BackendMeasurePerfResult = {
|
|
746
|
-
metrics: readonly BackendPerfMetric[];
|
|
747
|
-
startedAt?: string;
|
|
748
|
-
endedAt?: string;
|
|
749
|
-
backend?: string;
|
|
750
|
-
redacted?: boolean;
|
|
751
|
-
notes?: readonly string[];
|
|
752
|
-
};
|
|
753
|
-
|
|
754
|
-
export declare type BackendNetworkEntry = {
|
|
755
|
-
timestamp?: string;
|
|
756
|
-
method?: string;
|
|
757
|
-
url?: string;
|
|
758
|
-
status?: number;
|
|
759
|
-
durationMs?: number;
|
|
760
|
-
requestHeaders?: Record<string, string>;
|
|
761
|
-
responseHeaders?: Record<string, string>;
|
|
762
|
-
requestBody?: string;
|
|
763
|
-
responseBody?: string;
|
|
764
|
-
metadata?: Record<string, unknown>;
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
export declare type BackendNetworkIncludeMode = 'summary' | 'headers' | 'body' | 'all';
|
|
768
|
-
|
|
769
|
-
export declare type BackendOpenOptions = {
|
|
770
|
-
relaunch?: boolean;
|
|
771
|
-
};
|
|
772
|
-
|
|
773
|
-
export declare type BackendOpenTarget = {
|
|
774
|
-
/**
|
|
775
|
-
* Generic app identifier accepted by the backend. Hosted adapters should
|
|
776
|
-
* prefer structured appId, bundleId, or packageName when available.
|
|
777
|
-
*/
|
|
778
|
-
app?: string;
|
|
779
|
-
appId?: string;
|
|
780
|
-
bundleId?: string;
|
|
781
|
-
packageName?: string;
|
|
782
|
-
/**
|
|
783
|
-
* URL may be used by itself for a deep link or with an app identifier when
|
|
784
|
-
* the backend supports opening a URL in a specific app context.
|
|
785
|
-
*/
|
|
786
|
-
url?: string;
|
|
787
|
-
/**
|
|
788
|
-
* Platform-specific activity override, primarily for Android app launches.
|
|
789
|
-
*/
|
|
790
|
-
activity?: string;
|
|
791
|
-
};
|
|
792
|
-
|
|
793
|
-
export declare type BackendPerfMetric = {
|
|
794
|
-
name: string;
|
|
795
|
-
value?: number;
|
|
796
|
-
unit?: string;
|
|
797
|
-
status?: 'ok' | 'unavailable' | 'error';
|
|
798
|
-
message?: string;
|
|
799
|
-
metadata?: Record<string, unknown>;
|
|
800
|
-
};
|
|
801
|
-
|
|
802
|
-
export declare type BackendPinchOptions = {
|
|
803
|
-
scale: number;
|
|
804
|
-
center?: Point;
|
|
805
|
-
};
|
|
806
|
-
|
|
807
|
-
export declare type BackendPushInput = {
|
|
808
|
-
kind: 'json';
|
|
809
|
-
payload: Record<string, unknown>;
|
|
810
|
-
} | {
|
|
811
|
-
kind: 'file';
|
|
812
|
-
path: string;
|
|
813
|
-
};
|
|
814
|
-
|
|
815
|
-
export declare type BackendReadLogsOptions = BackendDiagnosticsPageOptions & {
|
|
816
|
-
levels?: readonly string[];
|
|
817
|
-
search?: string;
|
|
818
|
-
source?: string;
|
|
819
|
-
};
|
|
820
|
-
|
|
821
|
-
export declare type BackendReadLogsResult = {
|
|
822
|
-
entries: readonly BackendLogEntry[];
|
|
823
|
-
nextCursor?: string;
|
|
824
|
-
timeWindow?: BackendDiagnosticsTimeWindow;
|
|
825
|
-
backend?: string;
|
|
826
|
-
redacted?: boolean;
|
|
827
|
-
notes?: readonly string[];
|
|
828
|
-
};
|
|
829
|
-
|
|
830
|
-
export declare type BackendReadTextResult = {
|
|
831
|
-
text: string;
|
|
832
|
-
};
|
|
833
|
-
|
|
834
|
-
export declare type BackendRecordingOptions = {
|
|
835
|
-
outPath?: string;
|
|
836
|
-
fps?: number;
|
|
837
|
-
quality?: number;
|
|
838
|
-
showTouches?: boolean;
|
|
839
|
-
};
|
|
840
|
-
|
|
841
|
-
export declare type BackendRecordingResult = Record<string, unknown> & {
|
|
842
|
-
path?: string;
|
|
843
|
-
telemetryPath?: string;
|
|
844
|
-
warning?: string;
|
|
845
|
-
};
|
|
846
|
-
|
|
847
|
-
export declare type BackendRunnerCommand = {
|
|
848
|
-
command: string;
|
|
849
|
-
args?: readonly string[];
|
|
850
|
-
payload?: Record<string, unknown>;
|
|
851
|
-
};
|
|
852
|
-
|
|
853
|
-
export declare type BackendScreenshotOptions = {
|
|
854
|
-
fullscreen?: boolean;
|
|
855
|
-
overlayRefs?: boolean;
|
|
856
|
-
surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
export declare type BackendScreenshotResult = {
|
|
860
|
-
path?: string;
|
|
861
|
-
overlayRefs?: ScreenshotOverlayRef[];
|
|
862
|
-
};
|
|
863
|
-
|
|
864
|
-
export declare type BackendScrollOptions = {
|
|
865
|
-
direction: 'up' | 'down' | 'left' | 'right';
|
|
866
|
-
amount?: number;
|
|
867
|
-
pixels?: number;
|
|
868
|
-
};
|
|
869
|
-
|
|
870
|
-
export declare type BackendScrollTarget = {
|
|
871
|
-
kind: 'viewport';
|
|
872
|
-
} | {
|
|
873
|
-
kind: 'point';
|
|
874
|
-
point: Point;
|
|
875
|
-
};
|
|
876
|
-
|
|
877
|
-
export declare type BackendShellResult = {
|
|
878
|
-
exitCode: number;
|
|
879
|
-
stdout: string;
|
|
880
|
-
stderr: string;
|
|
881
|
-
};
|
|
882
|
-
|
|
883
|
-
export declare type BackendSnapshotAnalysis = {
|
|
884
|
-
rawNodeCount?: number;
|
|
885
|
-
maxDepth?: number;
|
|
886
|
-
};
|
|
887
|
-
|
|
888
|
-
export declare type BackendSnapshotFreshness = {
|
|
889
|
-
action: string;
|
|
890
|
-
retryCount: number;
|
|
891
|
-
staleAfterRetries: boolean;
|
|
892
|
-
reason?: 'empty-interactive' | 'sharp-drop' | 'stuck-route';
|
|
893
|
-
};
|
|
894
|
-
|
|
895
|
-
export declare type BackendSnapshotOptions = SnapshotOptions & {
|
|
896
|
-
outPath?: string;
|
|
897
|
-
};
|
|
898
|
-
|
|
899
|
-
export declare type BackendSnapshotResult = {
|
|
900
|
-
nodes?: SnapshotNode[];
|
|
901
|
-
truncated?: boolean;
|
|
902
|
-
backend?: string;
|
|
903
|
-
snapshot?: SnapshotState;
|
|
904
|
-
analysis?: BackendSnapshotAnalysis;
|
|
905
|
-
freshness?: BackendSnapshotFreshness;
|
|
906
|
-
warnings?: string[];
|
|
907
|
-
appName?: string;
|
|
908
|
-
appBundleId?: string;
|
|
909
|
-
};
|
|
910
|
-
|
|
911
|
-
export declare type BackendSwipeOptions = {
|
|
912
|
-
durationMs?: number;
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
export declare type BackendTapOptions = {
|
|
916
|
-
button?: 'primary' | 'secondary' | 'middle';
|
|
917
|
-
count?: number;
|
|
918
|
-
intervalMs?: number;
|
|
919
|
-
holdMs?: number;
|
|
920
|
-
jitterPx?: number;
|
|
921
|
-
doubleTap?: boolean;
|
|
922
|
-
};
|
|
923
|
-
|
|
924
|
-
export declare type BackendTraceOptions = {
|
|
925
|
-
outPath?: string;
|
|
926
|
-
};
|
|
927
|
-
|
|
928
|
-
export declare type BackendTraceResult = Record<string, unknown> & {
|
|
929
|
-
outPath?: string;
|
|
930
|
-
};
|
|
931
|
-
|
|
932
|
-
export declare type BatchCommandOptions<TContext = unknown> = CommandContext & {
|
|
933
|
-
steps: readonly CommandRouterRequest<TContext>[];
|
|
934
|
-
stopOnError?: boolean;
|
|
935
|
-
maxSteps?: number;
|
|
936
|
-
};
|
|
937
|
-
|
|
938
|
-
export declare type BatchCommandResult = {
|
|
939
|
-
kind: 'batch';
|
|
940
|
-
total: number;
|
|
941
|
-
executed: number;
|
|
942
|
-
failed: number;
|
|
943
|
-
totalDurationMs: number;
|
|
944
|
-
results: readonly BatchCommandStepResult[];
|
|
945
|
-
};
|
|
946
|
-
|
|
947
|
-
export declare type BatchCommandStepResult = {
|
|
948
|
-
step: number;
|
|
949
|
-
command: string;
|
|
950
|
-
ok: true;
|
|
951
|
-
data: CommandRouterResult;
|
|
952
|
-
durationMs: number;
|
|
953
|
-
} | {
|
|
954
|
-
step: number;
|
|
955
|
-
command: string;
|
|
956
|
-
ok: false;
|
|
957
|
-
error: NormalizedError;
|
|
958
|
-
durationMs: number;
|
|
959
|
-
};
|
|
960
|
-
|
|
961
|
-
export declare type BatchRunOptions = AgentDeviceRequestOverrides & {
|
|
962
|
-
steps: BatchStep[];
|
|
963
|
-
onError?: 'stop';
|
|
964
|
-
maxSteps?: number;
|
|
965
|
-
out?: string;
|
|
966
|
-
};
|
|
967
|
-
|
|
968
|
-
export declare type BatchStep = {
|
|
969
|
-
command: string;
|
|
970
|
-
positionals?: string[];
|
|
971
|
-
flags?: Record<string, unknown>;
|
|
972
|
-
};
|
|
973
|
-
|
|
974
|
-
export declare type BoundAgentDeviceCommands = {
|
|
975
|
-
capture: {
|
|
976
|
-
screenshot: BoundRuntimeCommand<ScreenshotCommandOptions, ScreenshotCommandResult>;
|
|
977
|
-
diffScreenshot: BoundRuntimeCommand<DiffScreenshotCommandOptions, DiffScreenshotCommandResult>;
|
|
978
|
-
snapshot: BoundRuntimeCommand<SnapshotCommandOptions, SnapshotCommandResult>;
|
|
979
|
-
diffSnapshot: BoundRuntimeCommand<DiffSnapshotCommandOptions, DiffSnapshotCommandResult>;
|
|
980
|
-
};
|
|
981
|
-
selectors: {
|
|
982
|
-
find: BoundRuntimeCommand<FindReadCommandOptions, FindReadCommandResult>;
|
|
983
|
-
get: BoundRuntimeCommand<GetCommandOptions, GetCommandResult>;
|
|
984
|
-
getText: (target: ElementTarget_2, options?: Omit<GetTextCommandOptions, 'target'>) => Promise<Extract<GetCommandResult, {
|
|
985
|
-
kind: 'text';
|
|
986
|
-
}>>;
|
|
987
|
-
getAttrs: (target: ElementTarget_2, options?: Omit<GetAttrsCommandOptions, 'target'>) => Promise<Extract<GetCommandResult, {
|
|
988
|
-
kind: 'attrs';
|
|
989
|
-
}>>;
|
|
990
|
-
is: BoundRuntimeCommand<IsCommandOptions, IsCommandResult>;
|
|
991
|
-
isVisible: (target: SelectorTarget, options?: Omit<IsSelectorCommandOptions, 'target'>) => Promise<IsCommandResult>;
|
|
992
|
-
isHidden: (target: SelectorTarget, options?: Omit<IsSelectorCommandOptions, 'target'>) => Promise<IsCommandResult>;
|
|
993
|
-
wait: BoundRuntimeCommand<WaitCommandOptions_2, WaitCommandResult_2>;
|
|
994
|
-
waitForText: (text: string, options?: Omit<WaitForTextCommandOptions, 'text'>) => Promise<Extract<WaitCommandResult_2, {
|
|
995
|
-
kind: 'text';
|
|
996
|
-
}>>;
|
|
997
|
-
};
|
|
998
|
-
interactions: {
|
|
999
|
-
click: (target: InteractionTarget_2, options?: Omit<ClickCommandOptions, 'target'>) => Promise<PressCommandResult>;
|
|
1000
|
-
press: (target: InteractionTarget_2, options?: Omit<PressCommandOptions, 'target'>) => Promise<PressCommandResult>;
|
|
1001
|
-
fill: (target: InteractionTarget_2, text: string, options?: Omit<FillCommandOptions, 'target' | 'text'>) => Promise<FillCommandResult>;
|
|
1002
|
-
typeText: (text: string, options?: Omit<TypeTextCommandOptions, 'text'>) => Promise<TypeTextCommandResult>;
|
|
1003
|
-
focus: (target: InteractionTarget_2, options?: Omit<FocusCommandOptions, 'target'>) => Promise<FocusCommandResult>;
|
|
1004
|
-
longPress: (target: InteractionTarget_2, options?: Omit<LongPressCommandOptions, 'target'>) => Promise<LongPressCommandResult>;
|
|
1005
|
-
swipe: BoundRuntimeCommand<SwipeCommandOptions, SwipeCommandResult>;
|
|
1006
|
-
scroll: BoundRuntimeCommand<ScrollCommandOptions, ScrollCommandResult>;
|
|
1007
|
-
pinch: BoundRuntimeCommand<PinchCommandOptions, PinchCommandResult>;
|
|
1008
|
-
};
|
|
1009
|
-
system: {
|
|
1010
|
-
back: (options?: SystemBackCommandOptions) => Promise<SystemBackCommandResult>;
|
|
1011
|
-
home: (options?: SystemHomeCommandOptions) => Promise<SystemHomeCommandResult>;
|
|
1012
|
-
rotate: BoundRuntimeCommand<SystemRotateCommandOptions, SystemRotateCommandResult>;
|
|
1013
|
-
keyboard: (options?: SystemKeyboardCommandOptions) => Promise<SystemKeyboardCommandResult>;
|
|
1014
|
-
clipboard: BoundRuntimeCommand<SystemClipboardCommandOptions, SystemClipboardCommandResult>;
|
|
1015
|
-
settings: (options?: SystemSettingsCommandOptions) => Promise<SystemSettingsCommandResult>;
|
|
1016
|
-
alert: (options?: SystemAlertCommandOptions) => Promise<SystemAlertCommandResult>;
|
|
1017
|
-
appSwitcher: (options?: SystemAppSwitcherCommandOptions) => Promise<SystemAppSwitcherCommandResult>;
|
|
1018
|
-
};
|
|
1019
|
-
apps: {
|
|
1020
|
-
open: BoundRuntimeCommand<OpenAppCommandOptions, OpenAppCommandResult>;
|
|
1021
|
-
close: (options?: CloseAppCommandOptions) => Promise<CloseAppCommandResult>;
|
|
1022
|
-
list: (options?: ListAppsCommandOptions) => Promise<ListAppsCommandResult>;
|
|
1023
|
-
state: BoundRuntimeCommand<GetAppStateCommandOptions, GetAppStateCommandResult>;
|
|
1024
|
-
push: BoundRuntimeCommand<PushAppCommandOptions, PushAppCommandResult>;
|
|
1025
|
-
triggerEvent: BoundRuntimeCommand<TriggerAppEventCommandOptions, TriggerAppEventCommandResult>;
|
|
1026
|
-
};
|
|
1027
|
-
admin: {
|
|
1028
|
-
devices: (options?: AdminDevicesCommandOptions) => Promise<AdminDevicesCommandResult>;
|
|
1029
|
-
boot: (options?: AdminBootCommandOptions) => Promise<AdminBootCommandResult>;
|
|
1030
|
-
ensureSimulator: BoundRuntimeCommand<AdminEnsureSimulatorCommandOptions, AdminEnsureSimulatorCommandResult>;
|
|
1031
|
-
install: BoundRuntimeCommand<AdminInstallCommandOptions, AdminInstallCommandResult>;
|
|
1032
|
-
reinstall: BoundRuntimeCommand<AdminReinstallCommandOptions, AdminInstallCommandResult>;
|
|
1033
|
-
installFromSource: BoundRuntimeCommand<AdminInstallFromSourceCommandOptions, AdminInstallCommandResult>;
|
|
1034
|
-
};
|
|
1035
|
-
recording: {
|
|
1036
|
-
record: BoundRuntimeCommand<RecordingRecordCommandOptions, RecordingRecordCommandResult>;
|
|
1037
|
-
trace: BoundRuntimeCommand<RecordingTraceCommandOptions, RecordingTraceCommandResult>;
|
|
1038
|
-
};
|
|
1039
|
-
observability: {
|
|
1040
|
-
logs: (options?: DiagnosticsLogsCommandOptions) => Promise<DiagnosticsLogsCommandResult>;
|
|
1041
|
-
network: (options?: DiagnosticsNetworkCommandOptions) => Promise<DiagnosticsNetworkCommandResult>;
|
|
1042
|
-
perf: (options?: DiagnosticsPerfCommandOptions) => Promise<DiagnosticsPerfCommandResult>;
|
|
1043
|
-
};
|
|
1044
|
-
};
|
|
1045
|
-
|
|
1046
|
-
export declare type BoundRuntimeCommand<TOptions = Record<string, unknown>, TResult = CommandResult> = (options: TOptions) => Promise<TResult>;
|
|
1047
|
-
|
|
1048
|
-
export declare type CaptureDiffOptions = ClientCommandBaseOptions & Pick<CaptureSnapshotOptions, 'interactiveOnly' | 'compact' | 'depth' | 'scope' | 'raw'> & {
|
|
1049
|
-
kind: 'snapshot';
|
|
1050
|
-
out?: string;
|
|
1051
|
-
};
|
|
1052
|
-
|
|
1053
|
-
export declare type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
|
|
1054
|
-
path?: string;
|
|
1055
|
-
overlayRefs?: boolean;
|
|
1056
|
-
fullscreen?: boolean;
|
|
1057
|
-
maxSize?: number;
|
|
1058
|
-
surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
|
|
1059
|
-
};
|
|
1060
|
-
|
|
1061
|
-
export declare type CaptureScreenshotResult = {
|
|
1062
|
-
path: string;
|
|
1063
|
-
overlayRefs?: ScreenshotOverlayRef[];
|
|
1064
|
-
identifiers: AgentDeviceIdentifiers;
|
|
1065
|
-
};
|
|
1066
|
-
|
|
1067
|
-
export declare type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
1068
|
-
interactiveOnly?: boolean;
|
|
1069
|
-
compact?: boolean;
|
|
1070
|
-
depth?: number;
|
|
1071
|
-
scope?: string;
|
|
1072
|
-
raw?: boolean;
|
|
1073
|
-
};
|
|
1074
|
-
|
|
1075
|
-
export declare type CaptureSnapshotResult = {
|
|
1076
|
-
nodes: SnapshotNode[];
|
|
1077
|
-
truncated: boolean;
|
|
1078
|
-
appName?: string;
|
|
1079
|
-
appBundleId?: string;
|
|
1080
|
-
visibility?: SnapshotVisibility;
|
|
1081
|
-
warnings?: string[];
|
|
1082
|
-
identifiers: AgentDeviceIdentifiers;
|
|
1083
|
-
};
|
|
1084
|
-
|
|
1085
|
-
export declare function centerOfRect(rect: Rect): Point;
|
|
1086
|
-
|
|
1087
|
-
declare type ClickButton = 'primary' | 'secondary' | 'middle';
|
|
1088
|
-
|
|
1089
|
-
declare type ClickCommandOptions = PressCommandOptions;
|
|
1090
|
-
|
|
1091
|
-
export declare type ClickOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions & {
|
|
1092
|
-
button?: 'primary' | 'secondary' | 'middle';
|
|
1093
|
-
};
|
|
1094
|
-
|
|
1095
|
-
declare type ClientCommandBaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions;
|
|
1096
|
-
|
|
1097
|
-
export declare type ClipboardCommandOptions = (DeviceCommandBaseOptions & {
|
|
1098
|
-
action: 'read';
|
|
1099
|
-
}) | (DeviceCommandBaseOptions & {
|
|
1100
|
-
action: 'write';
|
|
1101
|
-
text: string;
|
|
1102
|
-
});
|
|
1103
|
-
|
|
1104
|
-
export declare type ClipboardCommandResult = (DaemonResponseData & {
|
|
1105
|
-
action: 'read';
|
|
1106
|
-
text: string;
|
|
1107
|
-
}) | (DaemonResponseData & {
|
|
1108
|
-
action: 'write';
|
|
1109
|
-
textLength: number;
|
|
1110
|
-
});
|
|
1111
|
-
|
|
1112
|
-
export declare type CloseAppCommandOptions = CommandContext & {
|
|
1113
|
-
app?: string;
|
|
1114
|
-
};
|
|
1115
|
-
|
|
1116
|
-
export declare type CloseAppCommandResult = {
|
|
1117
|
-
kind: 'appClosed';
|
|
1118
|
-
app?: string;
|
|
1119
|
-
backendResult?: Record<string, unknown>;
|
|
1120
|
-
message?: string;
|
|
1121
|
-
};
|
|
1122
|
-
|
|
1123
|
-
declare type CommandActionResult<T extends string> = DaemonResponseData & {
|
|
1124
|
-
action?: T;
|
|
1125
|
-
};
|
|
1126
|
-
|
|
1127
|
-
export declare const commandCatalog: readonly CommandCatalogEntry[];
|
|
1128
|
-
|
|
1129
|
-
export declare type CommandCatalogEntry = {
|
|
1130
|
-
/**
|
|
1131
|
-
* CLI command names track daemon compatibility migration. Namespaced entries
|
|
1132
|
-
* track runtime router/API commands that are available independently.
|
|
1133
|
-
*/
|
|
1134
|
-
command: string;
|
|
1135
|
-
category: 'portable-runtime' | 'backend-admin' | 'transport-session' | 'environment' | 'capability-gated';
|
|
1136
|
-
status: 'implemented' | 'planned';
|
|
1137
|
-
};
|
|
1138
|
-
|
|
1139
|
-
export declare type CommandClock = {
|
|
1140
|
-
now(): number;
|
|
1141
|
-
sleep(ms: number): Promise<void>;
|
|
1142
|
-
};
|
|
1143
|
-
|
|
1144
|
-
export declare type CommandContext = {
|
|
1145
|
-
session?: string;
|
|
1146
|
-
requestId?: string;
|
|
1147
|
-
signal?: AbortSignal;
|
|
1148
|
-
metadata?: Record<string, unknown>;
|
|
1149
|
-
};
|
|
1150
|
-
|
|
1151
|
-
export declare type CommandPolicy = {
|
|
1152
|
-
allowLocalInputPaths: boolean;
|
|
1153
|
-
allowLocalOutputPaths: boolean;
|
|
1154
|
-
maxImagePixels: number;
|
|
1155
|
-
allowNamedBackendCapabilities: readonly BackendCapabilityName[];
|
|
1156
|
-
};
|
|
1157
|
-
|
|
1158
|
-
export declare type CommandRequestResult = DaemonResponseData;
|
|
1159
|
-
|
|
1160
|
-
export declare type CommandResult = Record<string, unknown>;
|
|
1161
|
-
|
|
1162
|
-
export declare type CommandRouter<TContext = unknown> = {
|
|
1163
|
-
dispatch(request: CommandRouterRequest<TContext>): Promise<CommandRouterResponse>;
|
|
1164
|
-
};
|
|
1165
|
-
|
|
1166
|
-
export declare type CommandRouterConfig<TContext = unknown> = {
|
|
1167
|
-
createRuntime(request: CommandRouterRequest<TContext>): AgentDeviceRuntime | Promise<AgentDeviceRuntime>;
|
|
1168
|
-
beforeDispatch?(request: CommandRouterRequest<TContext>): void | Promise<void>;
|
|
1169
|
-
formatError?(error: unknown, request: CommandRouterRequest<TContext>): NormalizedError;
|
|
1170
|
-
};
|
|
1171
|
-
|
|
1172
|
-
export declare type CommandRouterRequest<TContext = unknown> = {
|
|
1173
|
-
command: 'capture.screenshot';
|
|
1174
|
-
options: ScreenshotCommandOptions;
|
|
1175
|
-
context?: TContext;
|
|
1176
|
-
} | {
|
|
1177
|
-
command: 'capture.diffScreenshot';
|
|
1178
|
-
options: DiffScreenshotCommandOptions;
|
|
1179
|
-
context?: TContext;
|
|
1180
|
-
} | {
|
|
1181
|
-
command: 'capture.snapshot';
|
|
1182
|
-
options: SnapshotCommandOptions;
|
|
1183
|
-
context?: TContext;
|
|
1184
|
-
} | {
|
|
1185
|
-
command: 'capture.diffSnapshot';
|
|
1186
|
-
options: DiffSnapshotCommandOptions;
|
|
1187
|
-
context?: TContext;
|
|
1188
|
-
} | {
|
|
1189
|
-
command: 'selectors.find';
|
|
1190
|
-
options: FindReadCommandOptions;
|
|
1191
|
-
context?: TContext;
|
|
1192
|
-
} | {
|
|
1193
|
-
command: 'selectors.get';
|
|
1194
|
-
options: GetCommandOptions;
|
|
1195
|
-
context?: TContext;
|
|
1196
|
-
} | {
|
|
1197
|
-
command: 'selectors.is';
|
|
1198
|
-
options: IsCommandOptions;
|
|
1199
|
-
context?: TContext;
|
|
1200
|
-
} | {
|
|
1201
|
-
command: 'selectors.wait';
|
|
1202
|
-
options: WaitCommandOptions_2;
|
|
1203
|
-
context?: TContext;
|
|
1204
|
-
} | {
|
|
1205
|
-
command: 'interactions.click';
|
|
1206
|
-
options: ClickCommandOptions;
|
|
1207
|
-
context?: TContext;
|
|
1208
|
-
} | {
|
|
1209
|
-
command: 'interactions.press';
|
|
1210
|
-
options: PressCommandOptions;
|
|
1211
|
-
context?: TContext;
|
|
1212
|
-
} | {
|
|
1213
|
-
command: 'interactions.fill';
|
|
1214
|
-
options: FillCommandOptions;
|
|
1215
|
-
context?: TContext;
|
|
1216
|
-
} | {
|
|
1217
|
-
command: 'interactions.typeText';
|
|
1218
|
-
options: TypeTextCommandOptions;
|
|
1219
|
-
context?: TContext;
|
|
1220
|
-
} | {
|
|
1221
|
-
command: 'interactions.focus';
|
|
1222
|
-
options: FocusCommandOptions;
|
|
1223
|
-
context?: TContext;
|
|
1224
|
-
} | {
|
|
1225
|
-
command: 'interactions.longPress';
|
|
1226
|
-
options: LongPressCommandOptions;
|
|
1227
|
-
context?: TContext;
|
|
1228
|
-
} | {
|
|
1229
|
-
command: 'interactions.swipe';
|
|
1230
|
-
options: SwipeCommandOptions;
|
|
1231
|
-
context?: TContext;
|
|
1232
|
-
} | {
|
|
1233
|
-
command: 'interactions.scroll';
|
|
1234
|
-
options: ScrollCommandOptions;
|
|
1235
|
-
context?: TContext;
|
|
1236
|
-
} | {
|
|
1237
|
-
command: 'interactions.pinch';
|
|
1238
|
-
options: PinchCommandOptions;
|
|
1239
|
-
context?: TContext;
|
|
1240
|
-
} | {
|
|
1241
|
-
command: 'system.back';
|
|
1242
|
-
options?: SystemBackCommandOptions;
|
|
1243
|
-
context?: TContext;
|
|
1244
|
-
} | {
|
|
1245
|
-
command: 'system.home';
|
|
1246
|
-
options?: SystemHomeCommandOptions;
|
|
1247
|
-
context?: TContext;
|
|
1248
|
-
} | {
|
|
1249
|
-
command: 'system.rotate';
|
|
1250
|
-
options: SystemRotateCommandOptions;
|
|
1251
|
-
context?: TContext;
|
|
1252
|
-
} | {
|
|
1253
|
-
command: 'system.keyboard';
|
|
1254
|
-
options?: SystemKeyboardCommandOptions;
|
|
1255
|
-
context?: TContext;
|
|
1256
|
-
} | {
|
|
1257
|
-
command: 'system.clipboard';
|
|
1258
|
-
options: SystemClipboardCommandOptions;
|
|
1259
|
-
context?: TContext;
|
|
1260
|
-
} | {
|
|
1261
|
-
command: 'system.settings';
|
|
1262
|
-
options?: SystemSettingsCommandOptions;
|
|
1263
|
-
context?: TContext;
|
|
1264
|
-
} | {
|
|
1265
|
-
command: 'system.alert';
|
|
1266
|
-
options?: SystemAlertCommandOptions;
|
|
1267
|
-
context?: TContext;
|
|
1268
|
-
} | {
|
|
1269
|
-
command: 'system.appSwitcher';
|
|
1270
|
-
options?: SystemAppSwitcherCommandOptions;
|
|
1271
|
-
context?: TContext;
|
|
1272
|
-
} | {
|
|
1273
|
-
command: 'apps.open';
|
|
1274
|
-
options: OpenAppCommandOptions;
|
|
1275
|
-
context?: TContext;
|
|
1276
|
-
} | {
|
|
1277
|
-
command: 'apps.close';
|
|
1278
|
-
options?: CloseAppCommandOptions;
|
|
1279
|
-
context?: TContext;
|
|
1280
|
-
} | {
|
|
1281
|
-
command: 'apps.list';
|
|
1282
|
-
options?: ListAppsCommandOptions;
|
|
1283
|
-
context?: TContext;
|
|
1284
|
-
} | {
|
|
1285
|
-
command: 'apps.state';
|
|
1286
|
-
options: GetAppStateCommandOptions;
|
|
1287
|
-
context?: TContext;
|
|
1288
|
-
} | {
|
|
1289
|
-
command: 'apps.push';
|
|
1290
|
-
options: PushAppCommandOptions;
|
|
1291
|
-
context?: TContext;
|
|
1292
|
-
} | {
|
|
1293
|
-
command: 'apps.triggerEvent';
|
|
1294
|
-
options: TriggerAppEventCommandOptions;
|
|
1295
|
-
context?: TContext;
|
|
1296
|
-
} | {
|
|
1297
|
-
command: 'admin.devices';
|
|
1298
|
-
options?: AdminDevicesCommandOptions;
|
|
1299
|
-
context?: TContext;
|
|
1300
|
-
} | {
|
|
1301
|
-
command: 'admin.boot';
|
|
1302
|
-
options?: AdminBootCommandOptions;
|
|
1303
|
-
context?: TContext;
|
|
1304
|
-
} | {
|
|
1305
|
-
command: 'admin.ensureSimulator';
|
|
1306
|
-
options: AdminEnsureSimulatorCommandOptions;
|
|
1307
|
-
context?: TContext;
|
|
1308
|
-
} | {
|
|
1309
|
-
command: 'admin.install';
|
|
1310
|
-
options: AdminInstallCommandOptions;
|
|
1311
|
-
context?: TContext;
|
|
1312
|
-
} | {
|
|
1313
|
-
command: 'admin.reinstall';
|
|
1314
|
-
options: AdminReinstallCommandOptions;
|
|
1315
|
-
context?: TContext;
|
|
1316
|
-
} | {
|
|
1317
|
-
command: 'admin.installFromSource';
|
|
1318
|
-
options: AdminInstallFromSourceCommandOptions;
|
|
1319
|
-
context?: TContext;
|
|
1320
|
-
} | {
|
|
1321
|
-
command: 'record';
|
|
1322
|
-
options: RecordingRecordCommandOptions;
|
|
1323
|
-
context?: TContext;
|
|
1324
|
-
} | {
|
|
1325
|
-
command: 'trace';
|
|
1326
|
-
options: RecordingTraceCommandOptions;
|
|
1327
|
-
context?: TContext;
|
|
1328
|
-
} | {
|
|
1329
|
-
command: 'diagnostics.logs';
|
|
1330
|
-
options?: DiagnosticsLogsCommandOptions;
|
|
1331
|
-
context?: TContext;
|
|
1332
|
-
} | {
|
|
1333
|
-
command: 'diagnostics.network';
|
|
1334
|
-
options?: DiagnosticsNetworkCommandOptions;
|
|
1335
|
-
context?: TContext;
|
|
1336
|
-
} | {
|
|
1337
|
-
command: 'diagnostics.perf';
|
|
1338
|
-
options?: DiagnosticsPerfCommandOptions;
|
|
1339
|
-
context?: TContext;
|
|
1340
|
-
} | {
|
|
1341
|
-
command: 'batch';
|
|
1342
|
-
options: BatchCommandOptions<TContext>;
|
|
1343
|
-
context?: TContext;
|
|
1344
|
-
};
|
|
1345
|
-
|
|
1346
|
-
export declare type CommandRouterResponse = {
|
|
1347
|
-
ok: true;
|
|
1348
|
-
data: CommandRouterResult;
|
|
1349
|
-
} | {
|
|
1350
|
-
ok: false;
|
|
1351
|
-
error: NormalizedError;
|
|
1352
|
-
};
|
|
1353
|
-
|
|
1354
|
-
export declare type CommandRouterResult = ScreenshotCommandResult | DiffScreenshotCommandResult | SnapshotCommandResult | DiffSnapshotCommandResult | FindReadCommandResult | GetCommandResult | IsCommandResult | WaitCommandResult_2 | PressCommandResult | FillCommandResult | TypeTextCommandResult | FocusCommandResult | LongPressCommandResult | SwipeCommandResult | ScrollCommandResult | PinchCommandResult | SystemBackCommandResult | SystemHomeCommandResult | SystemRotateCommandResult | SystemKeyboardCommandResult | SystemClipboardCommandResult | SystemSettingsCommandResult | SystemAlertCommandResult | SystemAppSwitcherCommandResult | OpenAppCommandResult | CloseAppCommandResult | ListAppsCommandResult | GetAppStateCommandResult | PushAppCommandResult | TriggerAppEventCommandResult | AdminDevicesCommandResult | AdminBootCommandResult | AdminEnsureSimulatorCommandResult | AdminInstallCommandResult | RecordingRecordCommandResult | RecordingTraceCommandResult | DiagnosticsLogsCommandResult | DiagnosticsNetworkCommandResult | DiagnosticsPerfCommandResult | BatchCommandResult;
|
|
1355
|
-
|
|
1356
|
-
export declare const commands: AgentDeviceCommands;
|
|
1357
|
-
|
|
1358
|
-
export declare type CommandSessionRecord = {
|
|
1359
|
-
name: string;
|
|
1360
|
-
appId?: string;
|
|
1361
|
-
appBundleId?: string;
|
|
1362
|
-
appName?: string;
|
|
1363
|
-
backendSessionId?: string;
|
|
1364
|
-
snapshot?: SnapshotState;
|
|
1365
|
-
metadata?: Record<string, unknown>;
|
|
1366
|
-
};
|
|
1367
|
-
|
|
1368
|
-
export declare type CommandSessionStore = {
|
|
1369
|
-
get(name: string): CommandSessionRecord | undefined | Promise<CommandSessionRecord | undefined>;
|
|
1370
|
-
set(record: CommandSessionRecord): void | Promise<void>;
|
|
1371
|
-
delete?(name: string): void | Promise<void>;
|
|
1372
|
-
list?(): readonly CommandSessionRecord[] | Promise<readonly CommandSessionRecord[]>;
|
|
1373
|
-
};
|
|
1374
|
-
|
|
1375
|
-
declare type CompanionTunnelScope = {
|
|
1376
|
-
tenantId: string;
|
|
1377
|
-
runId: string;
|
|
1378
|
-
leaseId: string;
|
|
1379
|
-
};
|
|
1380
|
-
|
|
1381
|
-
export declare function createAgentDevice(config: AgentDeviceRuntimeConfig): AgentDevice;
|
|
1382
|
-
|
|
1383
|
-
export declare function createAgentDeviceClient(config?: AgentDeviceClientConfig, deps?: {
|
|
1384
|
-
transport?: AgentDeviceDaemonTransport;
|
|
1385
|
-
}): AgentDeviceClient;
|
|
1386
|
-
|
|
1387
|
-
export declare function createCommandRouter<TContext = unknown>(config: CommandRouterConfig<TContext>): CommandRouter<TContext>;
|
|
1388
|
-
|
|
1389
|
-
export declare function createLocalArtifactAdapter(options?: LocalArtifactAdapterOptions): ArtifactAdapter;
|
|
1390
|
-
|
|
1391
|
-
export declare function createMemorySessionStore(records?: readonly CommandSessionRecord[]): CommandSessionStore;
|
|
1392
|
-
|
|
1393
|
-
export declare type CreateTempFileOptions = {
|
|
1394
|
-
prefix: string;
|
|
1395
|
-
ext: string;
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
declare type DaemonArtifact = {
|
|
1399
|
-
field: string;
|
|
1400
|
-
artifactId?: string;
|
|
1401
|
-
fileName?: string;
|
|
1402
|
-
localPath?: string;
|
|
1403
|
-
path?: string;
|
|
1404
|
-
};
|
|
1405
|
-
|
|
1406
|
-
declare type DaemonError = {
|
|
1407
|
-
code: string;
|
|
1408
|
-
message: string;
|
|
1409
|
-
hint?: string;
|
|
1410
|
-
diagnosticId?: string;
|
|
1411
|
-
logPath?: string;
|
|
1412
|
-
details?: Record<string, unknown>;
|
|
1413
|
-
};
|
|
1414
|
-
|
|
1415
|
-
declare type DaemonInstallSource = {
|
|
1416
|
-
kind: 'url';
|
|
1417
|
-
url: string;
|
|
1418
|
-
headers?: Record<string, string>;
|
|
1419
|
-
} | {
|
|
1420
|
-
kind: 'path';
|
|
1421
|
-
path: string;
|
|
1422
|
-
} | ({
|
|
1423
|
-
kind: 'github-actions-artifact';
|
|
1424
|
-
owner: string;
|
|
1425
|
-
repo: string;
|
|
1426
|
-
} & ({
|
|
1427
|
-
artifactId: number;
|
|
1428
|
-
} | {
|
|
1429
|
-
runId: number;
|
|
1430
|
-
artifactName: string;
|
|
1431
|
-
} | {
|
|
1432
|
-
artifactName: string;
|
|
1433
|
-
}));
|
|
1434
|
-
|
|
1435
|
-
declare type DaemonLockPolicy = 'reject' | 'strip';
|
|
1436
|
-
|
|
1437
|
-
declare type DaemonRequest = {
|
|
1438
|
-
token?: string;
|
|
1439
|
-
session?: string;
|
|
1440
|
-
command: string;
|
|
1441
|
-
positionals: string[];
|
|
1442
|
-
flags?: Record<string, unknown>;
|
|
1443
|
-
runtime?: SessionRuntimeHints;
|
|
1444
|
-
meta?: DaemonRequestMeta;
|
|
1445
|
-
};
|
|
1446
|
-
|
|
1447
|
-
declare type DaemonRequestMeta = {
|
|
1448
|
-
requestId?: string;
|
|
1449
|
-
debug?: boolean;
|
|
1450
|
-
cwd?: string;
|
|
1451
|
-
tenantId?: string;
|
|
1452
|
-
runId?: string;
|
|
1453
|
-
leaseId?: string;
|
|
1454
|
-
leaseTtlMs?: number;
|
|
1455
|
-
leaseBackend?: LeaseBackend;
|
|
1456
|
-
sessionIsolation?: 'none' | 'tenant';
|
|
1457
|
-
uploadedArtifactId?: string;
|
|
1458
|
-
clientArtifactPaths?: Record<string, string>;
|
|
1459
|
-
installSource?: DaemonInstallSource;
|
|
1460
|
-
retainMaterializedPaths?: boolean;
|
|
1461
|
-
materializedPathRetentionMs?: number;
|
|
1462
|
-
materializationId?: string;
|
|
1463
|
-
lockPolicy?: DaemonLockPolicy;
|
|
1464
|
-
lockPlatform?: 'ios' | 'macos' | 'android' | 'linux' | 'apple';
|
|
1465
|
-
};
|
|
1466
|
-
|
|
1467
|
-
declare type DaemonResponse = {
|
|
1468
|
-
ok: true;
|
|
1469
|
-
data?: DaemonResponseData;
|
|
1470
|
-
} | {
|
|
1471
|
-
ok: false;
|
|
1472
|
-
error: DaemonError;
|
|
1473
|
-
};
|
|
1474
|
-
|
|
1475
|
-
declare type DaemonResponseData = Record<string, unknown> & {
|
|
1476
|
-
artifacts?: DaemonArtifact[];
|
|
1477
|
-
};
|
|
1478
|
-
|
|
1479
|
-
declare type DaemonServerMode = 'socket' | 'http' | 'dual';
|
|
1480
|
-
|
|
1481
|
-
declare type DaemonTransportMode = 'auto' | 'socket' | 'http';
|
|
1482
|
-
|
|
1483
|
-
export declare type DeviceBootOptions = ClientCommandBaseOptions & {
|
|
1484
|
-
headless?: boolean;
|
|
1485
|
-
};
|
|
1486
|
-
|
|
1487
|
-
declare type DeviceCommandBaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions;
|
|
1488
|
-
|
|
1489
|
-
declare type DeviceKind = 'simulator' | 'emulator' | 'device';
|
|
1490
|
-
|
|
1491
|
-
declare type DeviceTarget = 'mobile' | 'tv' | 'desktop';
|
|
1492
|
-
|
|
1493
|
-
export declare type DiagnosticsLogsCommandOptions = DiagnosticsPageOptions & {
|
|
1494
|
-
levels?: readonly string[];
|
|
1495
|
-
search?: string;
|
|
1496
|
-
source?: string;
|
|
1497
|
-
};
|
|
1498
|
-
|
|
1499
|
-
export declare type DiagnosticsLogsCommandResult = {
|
|
1500
|
-
kind: 'diagnosticsLogs';
|
|
1501
|
-
entries: readonly BackendLogEntry[];
|
|
1502
|
-
nextCursor?: string;
|
|
1503
|
-
timeWindow?: BackendDiagnosticsTimeWindow;
|
|
1504
|
-
backend?: string;
|
|
1505
|
-
redacted: boolean;
|
|
1506
|
-
notes?: readonly string[];
|
|
1507
|
-
};
|
|
1508
|
-
|
|
1509
|
-
export declare type DiagnosticsNetworkCommandOptions = DiagnosticsPageOptions & {
|
|
1510
|
-
include?: BackendNetworkIncludeMode;
|
|
1511
|
-
};
|
|
1512
|
-
|
|
1513
|
-
export declare type DiagnosticsNetworkCommandResult = {
|
|
1514
|
-
kind: 'diagnosticsNetwork';
|
|
1515
|
-
entries: readonly BackendNetworkEntry[];
|
|
1516
|
-
nextCursor?: string;
|
|
1517
|
-
timeWindow?: BackendDiagnosticsTimeWindow;
|
|
1518
|
-
backend?: string;
|
|
1519
|
-
redacted: boolean;
|
|
1520
|
-
notes?: readonly string[];
|
|
1521
|
-
};
|
|
1522
|
-
|
|
1523
|
-
declare type DiagnosticsPageOptions = CommandContext & {
|
|
1524
|
-
appId?: string;
|
|
1525
|
-
appBundleId?: string;
|
|
1526
|
-
since?: string;
|
|
1527
|
-
until?: string;
|
|
1528
|
-
cursor?: string;
|
|
1529
|
-
limit?: number;
|
|
1530
|
-
};
|
|
1531
|
-
|
|
1532
|
-
export declare type DiagnosticsPerfCommandOptions = CommandContext & {
|
|
1533
|
-
appId?: string;
|
|
1534
|
-
appBundleId?: string;
|
|
1535
|
-
since?: string;
|
|
1536
|
-
until?: string;
|
|
1537
|
-
sampleMs?: number;
|
|
1538
|
-
metrics?: readonly string[];
|
|
1539
|
-
};
|
|
1540
|
-
|
|
1541
|
-
export declare type DiagnosticsPerfCommandResult = {
|
|
1542
|
-
kind: 'diagnosticsPerf';
|
|
1543
|
-
metrics: readonly BackendPerfMetric[];
|
|
1544
|
-
startedAt?: string;
|
|
1545
|
-
endedAt?: string;
|
|
1546
|
-
backend?: string;
|
|
1547
|
-
redacted: boolean;
|
|
1548
|
-
notes?: readonly string[];
|
|
1549
|
-
};
|
|
1550
|
-
|
|
1551
|
-
export declare type DiagnosticsSink = {
|
|
1552
|
-
emit(event: {
|
|
1553
|
-
level: 'debug' | 'info' | 'warn' | 'error';
|
|
1554
|
-
message: string;
|
|
1555
|
-
data?: unknown;
|
|
1556
|
-
}): void;
|
|
1557
|
-
};
|
|
1558
|
-
|
|
1559
|
-
declare type DiffScreenshotCommandOptions = CommandContext & {
|
|
1560
|
-
baseline: FileInputRef;
|
|
1561
|
-
current?: FileInputRef | LiveScreenshotInputRef;
|
|
1562
|
-
out?: FileOutputRef;
|
|
1563
|
-
currentOverlayOut?: FileOutputRef;
|
|
1564
|
-
threshold?: number;
|
|
1565
|
-
overlayRefs?: boolean;
|
|
1566
|
-
surface?: BackendScreenshotOptions['surface'];
|
|
1567
|
-
};
|
|
1568
|
-
|
|
1569
|
-
declare type DiffScreenshotCommandResult = ScreenshotDiffResult & {
|
|
1570
|
-
artifacts?: ArtifactDescriptor[];
|
|
1571
|
-
};
|
|
1572
|
-
|
|
1573
|
-
declare type DiffSnapshotCommandOptions = SnapshotCommandOptions;
|
|
1574
|
-
|
|
1575
|
-
declare type DiffSnapshotCommandResult = {
|
|
1576
|
-
mode: 'snapshot';
|
|
1577
|
-
baselineInitialized: boolean;
|
|
1578
|
-
summary: SnapshotDiffSummary;
|
|
1579
|
-
lines: SnapshotDiffLine[];
|
|
1580
|
-
warnings?: string[];
|
|
1581
|
-
};
|
|
1582
|
-
|
|
1583
|
-
export declare type ElementTarget = RefTarget_2 | SelectorTarget_2;
|
|
1584
|
-
|
|
1585
|
-
declare type ElementTarget_2 = SelectorTarget | RefTarget;
|
|
1586
|
-
|
|
1587
|
-
export declare type EnsureSimulatorOptions = AgentDeviceRequestOverrides & {
|
|
1588
|
-
device: string;
|
|
1589
|
-
runtime?: string;
|
|
1590
|
-
boot?: boolean;
|
|
1591
|
-
reuseExisting?: boolean;
|
|
1592
|
-
iosSimulatorDeviceSet?: string;
|
|
1593
|
-
};
|
|
1594
|
-
|
|
1595
|
-
export declare type EnsureSimulatorResult = {
|
|
1596
|
-
udid: string;
|
|
1597
|
-
device: string;
|
|
1598
|
-
runtime: string;
|
|
1599
|
-
created: boolean;
|
|
1600
|
-
booted: boolean;
|
|
1601
|
-
iosSimulatorDeviceSet?: string | null;
|
|
1602
|
-
identifiers: AgentDeviceIdentifiers;
|
|
1603
|
-
};
|
|
1604
|
-
|
|
1605
|
-
export declare type FileInputRef = {
|
|
538
|
+
export declare type FileInputRef = {
|
|
1606
539
|
kind: 'path';
|
|
1607
540
|
path: string;
|
|
1608
541
|
} | {
|
|
@@ -1619,44 +552,11 @@ export declare type FileOutputRef = {
|
|
|
1619
552
|
fileName?: string;
|
|
1620
553
|
};
|
|
1621
554
|
|
|
1622
|
-
declare type FillCommandOptions = CommandContext & {
|
|
1623
|
-
target: InteractionTarget_2;
|
|
1624
|
-
text: string;
|
|
1625
|
-
delayMs?: number;
|
|
1626
|
-
};
|
|
1627
|
-
|
|
1628
|
-
declare type FillCommandResult = ResolvedInteractionTarget & {
|
|
1629
|
-
text: string;
|
|
1630
|
-
warning?: string;
|
|
1631
|
-
backendResult?: Record<string, unknown>;
|
|
1632
|
-
};
|
|
1633
|
-
|
|
1634
555
|
export declare type FillOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & {
|
|
1635
556
|
text: string;
|
|
1636
557
|
delayMs?: number;
|
|
1637
558
|
};
|
|
1638
559
|
|
|
1639
|
-
declare type FindAction = {
|
|
1640
|
-
kind: 'click';
|
|
1641
|
-
} | {
|
|
1642
|
-
kind: 'focus';
|
|
1643
|
-
} | {
|
|
1644
|
-
kind: 'fill';
|
|
1645
|
-
value: string;
|
|
1646
|
-
} | {
|
|
1647
|
-
kind: 'type';
|
|
1648
|
-
value: string;
|
|
1649
|
-
} | {
|
|
1650
|
-
kind: 'get_text';
|
|
1651
|
-
} | {
|
|
1652
|
-
kind: 'get_attrs';
|
|
1653
|
-
} | {
|
|
1654
|
-
kind: 'exists';
|
|
1655
|
-
} | {
|
|
1656
|
-
kind: 'wait';
|
|
1657
|
-
timeoutMs?: number;
|
|
1658
|
-
};
|
|
1659
|
-
|
|
1660
560
|
declare type FindBaseOptions = ClientCommandBaseOptions & FindSnapshotCommandOptions & {
|
|
1661
561
|
locator?: FindLocator;
|
|
1662
562
|
query: string;
|
|
@@ -1676,118 +576,28 @@ export declare type FindOptions = (FindBaseOptions & {
|
|
|
1676
576
|
value: string;
|
|
1677
577
|
});
|
|
1678
578
|
|
|
1679
|
-
declare type FindReadCommandOptions = CommandContext & {
|
|
1680
|
-
locator?: FindLocator;
|
|
1681
|
-
query: string;
|
|
1682
|
-
action: Extract<FindAction['kind'], 'exists' | 'wait' | 'get_text' | 'get_attrs'>;
|
|
1683
|
-
timeoutMs?: number;
|
|
1684
|
-
} & SelectorSnapshotOptions;
|
|
1685
|
-
|
|
1686
|
-
declare type FindReadCommandResult = {
|
|
1687
|
-
kind: 'found';
|
|
1688
|
-
found: true;
|
|
1689
|
-
waitedMs?: number;
|
|
1690
|
-
} | {
|
|
1691
|
-
kind: 'text';
|
|
1692
|
-
ref: string;
|
|
1693
|
-
text: string;
|
|
1694
|
-
node: SnapshotNode;
|
|
1695
|
-
} | {
|
|
1696
|
-
kind: 'attrs';
|
|
1697
|
-
ref: string;
|
|
1698
|
-
node: SnapshotNode;
|
|
1699
|
-
};
|
|
1700
|
-
|
|
1701
579
|
declare type FindSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'raw'>;
|
|
1702
580
|
|
|
1703
|
-
declare type FocusCommandOptions = CommandContext & {
|
|
1704
|
-
target: InteractionTarget_2;
|
|
1705
|
-
};
|
|
1706
|
-
|
|
1707
|
-
declare type FocusCommandResult = ResolvedInteractionTarget & {
|
|
1708
|
-
backendResult?: Record<string, unknown>;
|
|
1709
|
-
message?: string;
|
|
1710
|
-
};
|
|
1711
|
-
|
|
1712
581
|
declare type FocusOptions_2 = ClientCommandBaseOptions & {
|
|
1713
582
|
x: number;
|
|
1714
583
|
y: number;
|
|
1715
584
|
};
|
|
1716
585
|
export { FocusOptions_2 as FocusOptions }
|
|
1717
586
|
|
|
1718
|
-
declare type GestureDirection = 'up' | 'down' | 'left' | 'right';
|
|
1719
|
-
|
|
1720
|
-
export declare type GetAppStateCommandOptions = CommandContext & {
|
|
1721
|
-
app: string;
|
|
1722
|
-
};
|
|
1723
|
-
|
|
1724
|
-
export declare type GetAppStateCommandResult = {
|
|
1725
|
-
kind: 'appState';
|
|
1726
|
-
app: string;
|
|
1727
|
-
state: BackendAppState;
|
|
1728
|
-
};
|
|
1729
|
-
|
|
1730
|
-
declare type GetAttrsCommandOptions = CommandContext & SelectorSnapshotOptions & {
|
|
1731
|
-
target: ElementTarget_2;
|
|
1732
|
-
};
|
|
1733
|
-
|
|
1734
|
-
declare type GetCommandOptions = CommandContext & SelectorSnapshotOptions & {
|
|
1735
|
-
property: 'text' | 'attrs';
|
|
1736
|
-
target: ElementTarget_2;
|
|
1737
|
-
};
|
|
1738
|
-
|
|
1739
|
-
declare type GetCommandResult = {
|
|
1740
|
-
kind: 'text';
|
|
1741
|
-
target: ResolvedTarget;
|
|
1742
|
-
text: string;
|
|
1743
|
-
node: SnapshotNode;
|
|
1744
|
-
selectorChain?: string[];
|
|
1745
|
-
} | {
|
|
1746
|
-
kind: 'attrs';
|
|
1747
|
-
target: ResolvedTarget;
|
|
1748
|
-
node: SnapshotNode;
|
|
1749
|
-
selectorChain?: string[];
|
|
1750
|
-
};
|
|
1751
|
-
|
|
1752
587
|
export declare type GetOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & ElementTarget & {
|
|
1753
588
|
format: 'text' | 'attrs';
|
|
1754
589
|
};
|
|
1755
590
|
|
|
1756
|
-
declare type GetTextCommandOptions = CommandContext & SelectorSnapshotOptions & {
|
|
1757
|
-
target: ElementTarget_2;
|
|
1758
|
-
};
|
|
1759
|
-
|
|
1760
591
|
export declare type HomeCommandOptions = DeviceCommandBaseOptions;
|
|
1761
592
|
|
|
1762
593
|
export declare type HomeCommandResult = CommandActionResult<'home'>;
|
|
1763
594
|
|
|
1764
|
-
export declare type InteractionTarget =
|
|
1765
|
-
|
|
1766
|
-
declare type InteractionTarget_2 = ElementTarget_2 | PointTarget;
|
|
595
|
+
export declare type InteractionTarget = PointTarget | RefTarget | SelectorTarget;
|
|
1767
596
|
|
|
1768
597
|
export declare function isAgentDeviceError(err: unknown): err is AppError;
|
|
1769
598
|
|
|
1770
|
-
declare type IsCommandOptions = CommandContext & SelectorSnapshotOptions & {
|
|
1771
|
-
predicate: 'visible' | 'hidden' | 'exists' | 'editable' | 'selected' | 'text';
|
|
1772
|
-
selector: string;
|
|
1773
|
-
expectedText?: string;
|
|
1774
|
-
};
|
|
1775
|
-
|
|
1776
|
-
declare type IsCommandResult = {
|
|
1777
|
-
predicate: IsCommandOptions['predicate'];
|
|
1778
|
-
pass: true;
|
|
1779
|
-
selector: string;
|
|
1780
|
-
matches?: number;
|
|
1781
|
-
text?: string;
|
|
1782
|
-
selectorChain?: string[];
|
|
1783
|
-
};
|
|
1784
|
-
|
|
1785
599
|
export declare type IsOptions = IsTextPredicateOptions | IsStatePredicateOptions;
|
|
1786
600
|
|
|
1787
|
-
declare type IsSelectorCommandOptions = CommandContext & SelectorSnapshotOptions & {
|
|
1788
|
-
target: SelectorTarget;
|
|
1789
|
-
};
|
|
1790
|
-
|
|
1791
601
|
declare type IsStatePredicateOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & {
|
|
1792
602
|
predicate: 'visible' | 'hidden' | 'exists' | 'editable' | 'selected';
|
|
1793
603
|
selector: string;
|
|
@@ -1845,44 +655,18 @@ declare type LeaseScopedOptions = LeaseOptions & {
|
|
|
1845
655
|
leaseId: string;
|
|
1846
656
|
};
|
|
1847
657
|
|
|
1848
|
-
export declare type ListAppsCommandOptions = CommandContext & {
|
|
1849
|
-
filter?: BackendAppListFilter;
|
|
1850
|
-
};
|
|
1851
|
-
|
|
1852
|
-
export declare type ListAppsCommandResult = {
|
|
1853
|
-
kind: 'appsList';
|
|
1854
|
-
apps: readonly BackendAppInfo[];
|
|
1855
|
-
};
|
|
1856
|
-
|
|
1857
|
-
declare type LiveScreenshotInputRef = {
|
|
1858
|
-
kind: 'live';
|
|
1859
|
-
};
|
|
1860
|
-
|
|
1861
658
|
export declare type LocalArtifactAdapterOptions = {
|
|
1862
659
|
cwd?: string;
|
|
1863
660
|
tempDir?: string;
|
|
1864
661
|
rootDir?: string;
|
|
1865
662
|
};
|
|
1866
663
|
|
|
1867
|
-
export declare function localCommandPolicy(overrides?: Partial<CommandPolicy>): CommandPolicy;
|
|
1868
|
-
|
|
1869
664
|
export declare type LogsOptions = AgentDeviceRequestOverrides & {
|
|
1870
665
|
action?: 'path' | 'start' | 'stop' | 'doctor' | 'mark' | 'clear';
|
|
1871
666
|
message?: string;
|
|
1872
667
|
restart?: boolean;
|
|
1873
668
|
};
|
|
1874
669
|
|
|
1875
|
-
declare type LongPressCommandOptions = CommandContext & {
|
|
1876
|
-
target: InteractionTarget_2;
|
|
1877
|
-
durationMs?: number;
|
|
1878
|
-
};
|
|
1879
|
-
|
|
1880
|
-
declare type LongPressCommandResult = ResolvedInteractionTarget & {
|
|
1881
|
-
durationMs?: number;
|
|
1882
|
-
backendResult?: Record<string, unknown>;
|
|
1883
|
-
message?: string;
|
|
1884
|
-
};
|
|
1885
|
-
|
|
1886
670
|
export declare type LongPressOptions = ClientCommandBaseOptions & {
|
|
1887
671
|
x: number;
|
|
1888
672
|
y: number;
|
|
@@ -1920,6 +704,8 @@ declare type MetroBridgeResult = {
|
|
|
1920
704
|
};
|
|
1921
705
|
};
|
|
1922
706
|
|
|
707
|
+
declare type MetroBridgeScope = CompanionTunnelScope;
|
|
708
|
+
|
|
1923
709
|
declare type MetroPrepareKind = 'auto' | 'react-native' | 'expo';
|
|
1924
710
|
|
|
1925
711
|
export declare type MetroPrepareOptions = {
|
|
@@ -1928,7 +714,7 @@ export declare type MetroPrepareOptions = {
|
|
|
1928
714
|
publicBaseUrl?: string;
|
|
1929
715
|
proxyBaseUrl?: string;
|
|
1930
716
|
bearerToken?: string;
|
|
1931
|
-
bridgeScope?:
|
|
717
|
+
bridgeScope?: MetroBridgeScope;
|
|
1932
718
|
launchUrl?: string;
|
|
1933
719
|
companionProfileKey?: string;
|
|
1934
720
|
companionConsumerKey?: string;
|
|
@@ -1971,22 +757,10 @@ export declare function normalizeAgentDeviceError(err: unknown, context?: {
|
|
|
1971
757
|
export declare type NormalizedError = {
|
|
1972
758
|
code: string;
|
|
1973
759
|
message: string;
|
|
1974
|
-
hint?: string;
|
|
1975
|
-
diagnosticId?: string;
|
|
1976
|
-
logPath?: string;
|
|
1977
|
-
details?: Record<string, unknown>;
|
|
1978
|
-
};
|
|
1979
|
-
|
|
1980
|
-
export declare type OpenAppCommandOptions = CommandContext & BackendOpenTarget & {
|
|
1981
|
-
relaunch?: boolean;
|
|
1982
|
-
};
|
|
1983
|
-
|
|
1984
|
-
export declare type OpenAppCommandResult = {
|
|
1985
|
-
kind: 'appOpened';
|
|
1986
|
-
target: BackendOpenTarget;
|
|
1987
|
-
relaunch: boolean;
|
|
1988
|
-
backendResult?: Record<string, unknown>;
|
|
1989
|
-
message?: string;
|
|
760
|
+
hint?: string;
|
|
761
|
+
diagnosticId?: string;
|
|
762
|
+
logPath?: string;
|
|
763
|
+
details?: Record<string, unknown>;
|
|
1990
764
|
};
|
|
1991
765
|
|
|
1992
766
|
export declare type OutputVisibility = 'client-visible' | 'internal';
|
|
@@ -1995,20 +769,6 @@ export declare type PerfOptions = ClientCommandBaseOptions;
|
|
|
1995
769
|
|
|
1996
770
|
export declare type PermissionTarget = 'camera' | 'microphone' | 'photos' | 'contacts' | 'contacts-limited' | 'notifications' | 'calendar' | 'location' | 'location-always' | 'media-library' | 'motion' | 'reminders' | 'siri' | 'accessibility' | 'screen-recording' | 'input-monitoring';
|
|
1997
771
|
|
|
1998
|
-
declare type PinchCommandOptions = CommandContext & {
|
|
1999
|
-
scale: number;
|
|
2000
|
-
center?: InteractionTarget_2;
|
|
2001
|
-
};
|
|
2002
|
-
|
|
2003
|
-
declare type PinchCommandResult = {
|
|
2004
|
-
kind: 'pinch';
|
|
2005
|
-
scale: number;
|
|
2006
|
-
center?: Point;
|
|
2007
|
-
centerTarget?: ResolvedInteractionTarget;
|
|
2008
|
-
backendResult?: Record<string, unknown>;
|
|
2009
|
-
message?: string;
|
|
2010
|
-
};
|
|
2011
|
-
|
|
2012
772
|
export declare type PinchOptions = ClientCommandBaseOptions & {
|
|
2013
773
|
scale: number;
|
|
2014
774
|
x?: number;
|
|
@@ -2025,12 +785,6 @@ export declare type Point = {
|
|
|
2025
785
|
};
|
|
2026
786
|
|
|
2027
787
|
declare type PointTarget = {
|
|
2028
|
-
kind: 'point';
|
|
2029
|
-
x: number;
|
|
2030
|
-
y: number;
|
|
2031
|
-
};
|
|
2032
|
-
|
|
2033
|
-
declare type PointTarget_2 = {
|
|
2034
788
|
x: number;
|
|
2035
789
|
y: number;
|
|
2036
790
|
ref?: never;
|
|
@@ -2054,35 +808,8 @@ declare type PrepareMetroRuntimeResult = {
|
|
|
2054
808
|
bridge: MetroBridgeResult | null;
|
|
2055
809
|
};
|
|
2056
810
|
|
|
2057
|
-
declare type PressCommandOptions = CommandContext & {
|
|
2058
|
-
target: InteractionTarget_2;
|
|
2059
|
-
button?: ClickButton;
|
|
2060
|
-
count?: number;
|
|
2061
|
-
intervalMs?: number;
|
|
2062
|
-
holdMs?: number;
|
|
2063
|
-
jitterPx?: number;
|
|
2064
|
-
doubleTap?: boolean;
|
|
2065
|
-
};
|
|
2066
|
-
|
|
2067
|
-
declare type PressCommandResult = ResolvedInteractionTarget & {
|
|
2068
|
-
backendResult?: Record<string, unknown>;
|
|
2069
|
-
};
|
|
2070
|
-
|
|
2071
811
|
export declare type PressOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions;
|
|
2072
812
|
|
|
2073
|
-
export declare type PushAppCommandOptions = CommandContext & {
|
|
2074
|
-
app: string;
|
|
2075
|
-
input: AppPushInput;
|
|
2076
|
-
};
|
|
2077
|
-
|
|
2078
|
-
export declare type PushAppCommandResult = {
|
|
2079
|
-
kind: 'appPushed';
|
|
2080
|
-
app: string;
|
|
2081
|
-
inputKind: 'json' | 'file';
|
|
2082
|
-
backendResult?: Record<string, unknown>;
|
|
2083
|
-
message?: string;
|
|
2084
|
-
};
|
|
2085
|
-
|
|
2086
813
|
declare type RawSnapshotNode = {
|
|
2087
814
|
index: number;
|
|
2088
815
|
type?: string;
|
|
@@ -2108,39 +835,6 @@ declare type RawSnapshotNode = {
|
|
|
2108
835
|
|
|
2109
836
|
declare type RecordingQuality = 5 | 6 | 7 | 8 | 9 | 10;
|
|
2110
837
|
|
|
2111
|
-
export declare type RecordingRecordCommandOptions = CommandContext & {
|
|
2112
|
-
action: 'start' | 'stop';
|
|
2113
|
-
out?: FileOutputRef;
|
|
2114
|
-
fps?: number;
|
|
2115
|
-
quality?: number;
|
|
2116
|
-
hideTouches?: boolean;
|
|
2117
|
-
};
|
|
2118
|
-
|
|
2119
|
-
export declare type RecordingRecordCommandResult = {
|
|
2120
|
-
kind: 'recordingStarted' | 'recordingStopped';
|
|
2121
|
-
action: 'start' | 'stop';
|
|
2122
|
-
path?: string;
|
|
2123
|
-
telemetryPath?: string;
|
|
2124
|
-
artifact?: ArtifactDescriptor;
|
|
2125
|
-
backendResult?: Record<string, unknown>;
|
|
2126
|
-
warning?: string;
|
|
2127
|
-
message?: string;
|
|
2128
|
-
};
|
|
2129
|
-
|
|
2130
|
-
export declare type RecordingTraceCommandOptions = CommandContext & {
|
|
2131
|
-
action: 'start' | 'stop';
|
|
2132
|
-
out?: FileOutputRef;
|
|
2133
|
-
};
|
|
2134
|
-
|
|
2135
|
-
export declare type RecordingTraceCommandResult = {
|
|
2136
|
-
kind: 'traceStarted' | 'traceStopped';
|
|
2137
|
-
action: 'start' | 'stop';
|
|
2138
|
-
outPath?: string;
|
|
2139
|
-
artifact?: ArtifactDescriptor;
|
|
2140
|
-
backendResult?: Record<string, unknown>;
|
|
2141
|
-
message?: string;
|
|
2142
|
-
};
|
|
2143
|
-
|
|
2144
838
|
export declare type RecordOptions = AgentDeviceRequestOverrides & {
|
|
2145
839
|
action: 'start' | 'stop';
|
|
2146
840
|
path?: string;
|
|
@@ -2156,17 +850,7 @@ export declare type Rect = {
|
|
|
2156
850
|
height: number;
|
|
2157
851
|
};
|
|
2158
852
|
|
|
2159
|
-
export declare function ref(refInput: string, options?: {
|
|
2160
|
-
fallbackLabel?: string;
|
|
2161
|
-
}): RefTarget;
|
|
2162
|
-
|
|
2163
853
|
declare type RefTarget = {
|
|
2164
|
-
kind: 'ref';
|
|
2165
|
-
ref: string;
|
|
2166
|
-
fallbackLabel?: string;
|
|
2167
|
-
};
|
|
2168
|
-
|
|
2169
|
-
declare type RefTarget_2 = {
|
|
2170
854
|
ref: string;
|
|
2171
855
|
label?: string;
|
|
2172
856
|
x?: never;
|
|
@@ -2225,46 +909,13 @@ export declare type ResolvedInputFile = {
|
|
|
2225
909
|
cleanup?: () => Promise<void>;
|
|
2226
910
|
};
|
|
2227
911
|
|
|
2228
|
-
declare type ResolvedInteractionTarget = {
|
|
2229
|
-
kind: 'point';
|
|
2230
|
-
point: Point;
|
|
2231
|
-
} | {
|
|
2232
|
-
kind: 'ref';
|
|
2233
|
-
point: Point;
|
|
2234
|
-
target: Extract<ResolvedTarget, {
|
|
2235
|
-
kind: 'ref';
|
|
2236
|
-
}>;
|
|
2237
|
-
node: SnapshotNode;
|
|
2238
|
-
selectorChain: string[];
|
|
2239
|
-
refLabel?: string;
|
|
2240
|
-
} | {
|
|
2241
|
-
kind: 'selector';
|
|
2242
|
-
point: Point;
|
|
2243
|
-
target: Extract<ResolvedTarget, {
|
|
2244
|
-
kind: 'selector';
|
|
2245
|
-
}>;
|
|
2246
|
-
node: SnapshotNode;
|
|
2247
|
-
selectorChain: string[];
|
|
2248
|
-
refLabel?: string;
|
|
2249
|
-
};
|
|
2250
|
-
|
|
2251
912
|
declare type ResolvedMetroKind = Exclude<MetroPrepareKind, 'auto'>;
|
|
2252
913
|
|
|
2253
|
-
declare type ResolvedTarget = {
|
|
2254
|
-
kind: 'selector';
|
|
2255
|
-
selector: string;
|
|
2256
|
-
} | {
|
|
2257
|
-
kind: 'ref';
|
|
2258
|
-
ref: string;
|
|
2259
|
-
};
|
|
2260
|
-
|
|
2261
914
|
export declare type ResolveInputOptions = {
|
|
2262
915
|
usage: string;
|
|
2263
916
|
field?: string;
|
|
2264
917
|
};
|
|
2265
918
|
|
|
2266
|
-
export declare function restrictedCommandPolicy(overrides?: Partial<CommandPolicy>): CommandPolicy;
|
|
2267
|
-
|
|
2268
919
|
export declare type RotateCommandOptions = DeviceCommandBaseOptions & {
|
|
2269
920
|
orientation: 'portrait' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right';
|
|
2270
921
|
};
|
|
@@ -2273,132 +924,6 @@ export declare type RotateCommandResult = CommandActionResult<'rotate'> & {
|
|
|
2273
924
|
orientation?: RotateCommandOptions['orientation'];
|
|
2274
925
|
};
|
|
2275
926
|
|
|
2276
|
-
export declare type RuntimeCommand<TOptions = Record<string, unknown>, TResult = CommandResult> = (runtime: AgentDeviceRuntime, options: TOptions) => Promise<TResult>;
|
|
2277
|
-
|
|
2278
|
-
declare type ScreenshotCommandOptions = CommandContext & {
|
|
2279
|
-
out?: FileOutputRef;
|
|
2280
|
-
fullscreen?: boolean;
|
|
2281
|
-
overlayRefs?: boolean;
|
|
2282
|
-
maxSize?: number;
|
|
2283
|
-
appId?: string;
|
|
2284
|
-
appBundleId?: string;
|
|
2285
|
-
surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
|
|
2286
|
-
};
|
|
2287
|
-
|
|
2288
|
-
declare type ScreenshotCommandResult = {
|
|
2289
|
-
path: string;
|
|
2290
|
-
artifacts?: ArtifactDescriptor[];
|
|
2291
|
-
message?: string;
|
|
2292
|
-
};
|
|
2293
|
-
|
|
2294
|
-
declare type ScreenshotDiffRegion = {
|
|
2295
|
-
index: number;
|
|
2296
|
-
rect: {
|
|
2297
|
-
x: number;
|
|
2298
|
-
y: number;
|
|
2299
|
-
width: number;
|
|
2300
|
-
height: number;
|
|
2301
|
-
};
|
|
2302
|
-
normalizedRect: {
|
|
2303
|
-
x: number;
|
|
2304
|
-
y: number;
|
|
2305
|
-
width: number;
|
|
2306
|
-
height: number;
|
|
2307
|
-
};
|
|
2308
|
-
differentPixels: number;
|
|
2309
|
-
shareOfDiffPercentage: number;
|
|
2310
|
-
densityPercentage: number;
|
|
2311
|
-
shape: 'compact' | 'horizontal-band' | 'vertical-band' | 'large-area';
|
|
2312
|
-
size: 'small' | 'medium' | 'large';
|
|
2313
|
-
location: string;
|
|
2314
|
-
averageBaselineColorHex: string;
|
|
2315
|
-
averageCurrentColorHex: string;
|
|
2316
|
-
baselineLuminance: number;
|
|
2317
|
-
currentLuminance: number;
|
|
2318
|
-
dominantChange: 'brighter' | 'darker' | 'color-shift' | 'mixed';
|
|
2319
|
-
currentOverlayMatches?: ScreenshotDiffRegionOverlayMatch[];
|
|
2320
|
-
};
|
|
2321
|
-
|
|
2322
|
-
declare type ScreenshotDiffRegionOverlayMatch = {
|
|
2323
|
-
ref: string;
|
|
2324
|
-
label?: string;
|
|
2325
|
-
regionCoveragePercentage: number;
|
|
2326
|
-
rect: {
|
|
2327
|
-
x: number;
|
|
2328
|
-
y: number;
|
|
2329
|
-
width: number;
|
|
2330
|
-
height: number;
|
|
2331
|
-
};
|
|
2332
|
-
};
|
|
2333
|
-
|
|
2334
|
-
declare type ScreenshotDiffResult = {
|
|
2335
|
-
diffPath?: string;
|
|
2336
|
-
totalPixels: number;
|
|
2337
|
-
differentPixels: number;
|
|
2338
|
-
mismatchPercentage: number;
|
|
2339
|
-
match: boolean;
|
|
2340
|
-
dimensionMismatch?: ScreenshotDimensionMismatch;
|
|
2341
|
-
regions?: ScreenshotDiffRegion[];
|
|
2342
|
-
currentOverlayPath?: string;
|
|
2343
|
-
currentOverlayRefCount?: number;
|
|
2344
|
-
ocr?: ScreenshotOcrSummary;
|
|
2345
|
-
nonTextDeltas?: ScreenshotNonTextDelta[];
|
|
2346
|
-
};
|
|
2347
|
-
|
|
2348
|
-
declare type ScreenshotDimensionMismatch = {
|
|
2349
|
-
expected: {
|
|
2350
|
-
width: number;
|
|
2351
|
-
height: number;
|
|
2352
|
-
};
|
|
2353
|
-
actual: {
|
|
2354
|
-
width: number;
|
|
2355
|
-
height: number;
|
|
2356
|
-
};
|
|
2357
|
-
};
|
|
2358
|
-
|
|
2359
|
-
declare type ScreenshotNonTextDelta = {
|
|
2360
|
-
index: number;
|
|
2361
|
-
regionIndex?: number;
|
|
2362
|
-
slot: 'leading' | 'trailing' | 'background' | 'separator' | 'unknown';
|
|
2363
|
-
likelyKind: 'icon' | 'toggle' | 'chevron' | 'separator' | 'visual';
|
|
2364
|
-
rect: Rect;
|
|
2365
|
-
nearestText?: string;
|
|
2366
|
-
};
|
|
2367
|
-
|
|
2368
|
-
declare type ScreenshotOcrMovementCluster = {
|
|
2369
|
-
texts: string[];
|
|
2370
|
-
xRange: {
|
|
2371
|
-
min: number;
|
|
2372
|
-
max: number;
|
|
2373
|
-
};
|
|
2374
|
-
yRange: {
|
|
2375
|
-
min: number;
|
|
2376
|
-
max: number;
|
|
2377
|
-
};
|
|
2378
|
-
};
|
|
2379
|
-
|
|
2380
|
-
declare type ScreenshotOcrSummary = {
|
|
2381
|
-
provider: 'tesseract';
|
|
2382
|
-
baselineBlocks: number;
|
|
2383
|
-
currentBlocks: number;
|
|
2384
|
-
matches: ScreenshotOcrTextMatch[];
|
|
2385
|
-
movementClusters?: ScreenshotOcrMovementCluster[];
|
|
2386
|
-
};
|
|
2387
|
-
|
|
2388
|
-
declare type ScreenshotOcrTextMatch = {
|
|
2389
|
-
text: string;
|
|
2390
|
-
baselineRect: Rect;
|
|
2391
|
-
currentRect: Rect;
|
|
2392
|
-
delta: {
|
|
2393
|
-
x: number;
|
|
2394
|
-
y: number;
|
|
2395
|
-
width: number;
|
|
2396
|
-
height: number;
|
|
2397
|
-
};
|
|
2398
|
-
confidence: number;
|
|
2399
|
-
possibleTextMetricMismatch: boolean;
|
|
2400
|
-
};
|
|
2401
|
-
|
|
2402
927
|
export declare type ScreenshotOverlayRef = {
|
|
2403
928
|
ref: string;
|
|
2404
929
|
label?: string;
|
|
@@ -2407,28 +932,6 @@ export declare type ScreenshotOverlayRef = {
|
|
|
2407
932
|
center: Point;
|
|
2408
933
|
};
|
|
2409
934
|
|
|
2410
|
-
declare type ScrollCommandOptions = CommandContext & {
|
|
2411
|
-
target?: ScrollTarget;
|
|
2412
|
-
direction: GestureDirection;
|
|
2413
|
-
amount?: number;
|
|
2414
|
-
pixels?: number;
|
|
2415
|
-
};
|
|
2416
|
-
|
|
2417
|
-
declare type ScrollCommandResult = {
|
|
2418
|
-
kind: 'viewport';
|
|
2419
|
-
direction: GestureDirection;
|
|
2420
|
-
amount?: number;
|
|
2421
|
-
pixels?: number;
|
|
2422
|
-
backendResult?: Record<string, unknown>;
|
|
2423
|
-
message?: string;
|
|
2424
|
-
} | (ResolvedInteractionTarget & {
|
|
2425
|
-
direction: GestureDirection;
|
|
2426
|
-
amount?: number;
|
|
2427
|
-
pixels?: number;
|
|
2428
|
-
backendResult?: Record<string, unknown>;
|
|
2429
|
-
message?: string;
|
|
2430
|
-
});
|
|
2431
|
-
|
|
2432
935
|
declare type ScrollOptions_2 = ClientCommandBaseOptions & {
|
|
2433
936
|
direction: 'up' | 'down' | 'left' | 'right';
|
|
2434
937
|
amount?: number;
|
|
@@ -2436,26 +939,9 @@ declare type ScrollOptions_2 = ClientCommandBaseOptions & {
|
|
|
2436
939
|
};
|
|
2437
940
|
export { ScrollOptions_2 as ScrollOptions }
|
|
2438
941
|
|
|
2439
|
-
declare type ScrollTarget = InteractionTarget_2 | {
|
|
2440
|
-
kind: 'viewport';
|
|
2441
|
-
};
|
|
2442
|
-
|
|
2443
|
-
export declare function selector(expression: string): SelectorTarget;
|
|
2444
|
-
|
|
2445
942
|
declare type SelectorSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'scope' | 'raw'>;
|
|
2446
943
|
|
|
2447
|
-
export declare type SelectorSnapshotOptions = {
|
|
2448
|
-
depth?: number;
|
|
2449
|
-
scope?: string;
|
|
2450
|
-
raw?: boolean;
|
|
2451
|
-
};
|
|
2452
|
-
|
|
2453
944
|
declare type SelectorTarget = {
|
|
2454
|
-
kind: 'selector';
|
|
2455
|
-
selector: string;
|
|
2456
|
-
};
|
|
2457
|
-
|
|
2458
|
-
declare type SelectorTarget_2 = {
|
|
2459
945
|
selector: string;
|
|
2460
946
|
x?: never;
|
|
2461
947
|
y?: never;
|
|
@@ -2501,56 +987,10 @@ export declare type SettingsUpdateOptions = (ClientCommandBaseOptions & {
|
|
|
2501
987
|
mode?: 'full' | 'limited';
|
|
2502
988
|
});
|
|
2503
989
|
|
|
2504
|
-
declare type SnapshotBackend = 'xctest' | 'android' | 'macos-helper' | 'linux-atspi';
|
|
2505
|
-
|
|
2506
|
-
declare type SnapshotCommandOptions = CommandContext & {
|
|
2507
|
-
interactiveOnly?: boolean;
|
|
2508
|
-
compact?: boolean;
|
|
2509
|
-
depth?: number;
|
|
2510
|
-
scope?: string;
|
|
2511
|
-
raw?: boolean;
|
|
2512
|
-
};
|
|
2513
|
-
|
|
2514
|
-
declare type SnapshotCommandResult = {
|
|
2515
|
-
nodes: SnapshotNode[];
|
|
2516
|
-
truncated: boolean;
|
|
2517
|
-
appName?: string;
|
|
2518
|
-
appBundleId?: string;
|
|
2519
|
-
visibility?: SnapshotVisibility;
|
|
2520
|
-
warnings?: string[];
|
|
2521
|
-
};
|
|
2522
|
-
|
|
2523
|
-
declare type SnapshotDiffLine = {
|
|
2524
|
-
kind: 'added' | 'removed' | 'unchanged';
|
|
2525
|
-
text: string;
|
|
2526
|
-
};
|
|
2527
|
-
|
|
2528
|
-
declare type SnapshotDiffSummary = {
|
|
2529
|
-
additions: number;
|
|
2530
|
-
removals: number;
|
|
2531
|
-
unchanged: number;
|
|
2532
|
-
};
|
|
2533
|
-
|
|
2534
990
|
export declare type SnapshotNode = RawSnapshotNode & {
|
|
2535
991
|
ref: string;
|
|
2536
992
|
};
|
|
2537
993
|
|
|
2538
|
-
declare type SnapshotOptions = {
|
|
2539
|
-
interactiveOnly?: boolean;
|
|
2540
|
-
compact?: boolean;
|
|
2541
|
-
depth?: number;
|
|
2542
|
-
scope?: string;
|
|
2543
|
-
raw?: boolean;
|
|
2544
|
-
};
|
|
2545
|
-
|
|
2546
|
-
declare type SnapshotState = {
|
|
2547
|
-
nodes: SnapshotNode[];
|
|
2548
|
-
createdAt: number;
|
|
2549
|
-
truncated?: boolean;
|
|
2550
|
-
backend?: SnapshotBackend;
|
|
2551
|
-
comparisonSafe?: boolean;
|
|
2552
|
-
};
|
|
2553
|
-
|
|
2554
994
|
export declare type SnapshotVisibility = {
|
|
2555
995
|
partial: boolean;
|
|
2556
996
|
visibleNodeCount: number;
|
|
@@ -2568,22 +1008,6 @@ export declare type StartupPerfSample = {
|
|
|
2568
1008
|
appBundleId?: string;
|
|
2569
1009
|
};
|
|
2570
1010
|
|
|
2571
|
-
declare type SwipeCommandOptions = CommandContext & SwipeOptions_2;
|
|
2572
|
-
|
|
2573
|
-
declare type SwipeCommandResult = {
|
|
2574
|
-
kind: 'swipe';
|
|
2575
|
-
from: Point;
|
|
2576
|
-
to: Point;
|
|
2577
|
-
direction?: GestureDirection;
|
|
2578
|
-
distance?: number;
|
|
2579
|
-
durationMs?: number;
|
|
2580
|
-
fromTarget?: ResolvedInteractionTarget | {
|
|
2581
|
-
kind: 'viewport';
|
|
2582
|
-
};
|
|
2583
|
-
backendResult?: Record<string, unknown>;
|
|
2584
|
-
message?: string;
|
|
2585
|
-
};
|
|
2586
|
-
|
|
2587
1011
|
export declare type SwipeOptions = ClientCommandBaseOptions & {
|
|
2588
1012
|
from: {
|
|
2589
1013
|
x: number;
|
|
@@ -2599,124 +1023,6 @@ export declare type SwipeOptions = ClientCommandBaseOptions & {
|
|
|
2599
1023
|
pattern?: 'one-way' | 'ping-pong';
|
|
2600
1024
|
};
|
|
2601
1025
|
|
|
2602
|
-
declare type SwipeOptions_2 = {
|
|
2603
|
-
from?: Point | InteractionTarget_2;
|
|
2604
|
-
to?: Point;
|
|
2605
|
-
direction?: GestureDirection;
|
|
2606
|
-
distance?: number;
|
|
2607
|
-
durationMs?: number;
|
|
2608
|
-
};
|
|
2609
|
-
|
|
2610
|
-
declare type SystemAlertCommandOptions = CommandContext & {
|
|
2611
|
-
action?: BackendAlertAction;
|
|
2612
|
-
timeoutMs?: number;
|
|
2613
|
-
};
|
|
2614
|
-
|
|
2615
|
-
declare type SystemAlertCommandResult = {
|
|
2616
|
-
kind: 'alertStatus';
|
|
2617
|
-
action: 'get';
|
|
2618
|
-
alert: BackendAlertInfo | null;
|
|
2619
|
-
} | {
|
|
2620
|
-
kind: 'alertHandled';
|
|
2621
|
-
action: 'accept' | 'dismiss';
|
|
2622
|
-
handled: boolean;
|
|
2623
|
-
alert?: BackendAlertInfo;
|
|
2624
|
-
button?: string;
|
|
2625
|
-
message?: string;
|
|
2626
|
-
} | {
|
|
2627
|
-
kind: 'alertWait';
|
|
2628
|
-
action: 'wait';
|
|
2629
|
-
alert: BackendAlertInfo | null;
|
|
2630
|
-
waitedMs?: number;
|
|
2631
|
-
timedOut?: boolean;
|
|
2632
|
-
message?: string;
|
|
2633
|
-
};
|
|
2634
|
-
|
|
2635
|
-
declare type SystemAppSwitcherCommandOptions = CommandContext;
|
|
2636
|
-
|
|
2637
|
-
declare type SystemAppSwitcherCommandResult = {
|
|
2638
|
-
kind: 'appSwitcherOpened';
|
|
2639
|
-
backendResult?: Record<string, unknown>;
|
|
2640
|
-
message?: string;
|
|
2641
|
-
};
|
|
2642
|
-
|
|
2643
|
-
declare type SystemBackCommandOptions = CommandContext & {
|
|
2644
|
-
mode?: 'in-app' | 'system';
|
|
2645
|
-
};
|
|
2646
|
-
|
|
2647
|
-
declare type SystemBackCommandResult = {
|
|
2648
|
-
kind: 'systemBack';
|
|
2649
|
-
mode: 'in-app' | 'system';
|
|
2650
|
-
backendResult?: Record<string, unknown>;
|
|
2651
|
-
message?: string;
|
|
2652
|
-
};
|
|
2653
|
-
|
|
2654
|
-
declare type SystemClipboardCommandOptions = (CommandContext & {
|
|
2655
|
-
action: 'read';
|
|
2656
|
-
}) | (CommandContext & {
|
|
2657
|
-
action: 'write';
|
|
2658
|
-
text: string;
|
|
2659
|
-
});
|
|
2660
|
-
|
|
2661
|
-
declare type SystemClipboardCommandResult = {
|
|
2662
|
-
kind: 'clipboardText';
|
|
2663
|
-
action: 'read';
|
|
2664
|
-
text: string;
|
|
2665
|
-
} | {
|
|
2666
|
-
kind: 'clipboardUpdated';
|
|
2667
|
-
action: 'write';
|
|
2668
|
-
textLength: number;
|
|
2669
|
-
backendResult?: Record<string, unknown>;
|
|
2670
|
-
message?: string;
|
|
2671
|
-
};
|
|
2672
|
-
|
|
2673
|
-
declare type SystemHomeCommandOptions = CommandContext;
|
|
2674
|
-
|
|
2675
|
-
declare type SystemHomeCommandResult = {
|
|
2676
|
-
kind: 'systemHome';
|
|
2677
|
-
backendResult?: Record<string, unknown>;
|
|
2678
|
-
message?: string;
|
|
2679
|
-
};
|
|
2680
|
-
|
|
2681
|
-
declare type SystemKeyboardCommandOptions = CommandContext & {
|
|
2682
|
-
action?: 'status' | 'get' | 'dismiss';
|
|
2683
|
-
};
|
|
2684
|
-
|
|
2685
|
-
declare type SystemKeyboardCommandResult = {
|
|
2686
|
-
kind: 'keyboardState';
|
|
2687
|
-
action: 'status' | 'get';
|
|
2688
|
-
state: BackendKeyboardResult;
|
|
2689
|
-
backendResult?: Record<string, unknown>;
|
|
2690
|
-
} | {
|
|
2691
|
-
kind: 'keyboardDismissed';
|
|
2692
|
-
action: 'dismiss';
|
|
2693
|
-
state: BackendKeyboardResult;
|
|
2694
|
-
backendResult?: Record<string, unknown>;
|
|
2695
|
-
message?: string;
|
|
2696
|
-
};
|
|
2697
|
-
|
|
2698
|
-
declare type SystemRotateCommandOptions = CommandContext & {
|
|
2699
|
-
orientation: BackendDeviceOrientation;
|
|
2700
|
-
};
|
|
2701
|
-
|
|
2702
|
-
declare type SystemRotateCommandResult = {
|
|
2703
|
-
kind: 'systemRotated';
|
|
2704
|
-
orientation: BackendDeviceOrientation;
|
|
2705
|
-
backendResult?: Record<string, unknown>;
|
|
2706
|
-
message?: string;
|
|
2707
|
-
};
|
|
2708
|
-
|
|
2709
|
-
declare type SystemSettingsCommandOptions = CommandContext & {
|
|
2710
|
-
target?: string;
|
|
2711
|
-
};
|
|
2712
|
-
|
|
2713
|
-
declare type SystemSettingsCommandResult = {
|
|
2714
|
-
kind: 'settingsOpened';
|
|
2715
|
-
target?: string;
|
|
2716
|
-
backendResult?: Record<string, unknown>;
|
|
2717
|
-
message?: string;
|
|
2718
|
-
};
|
|
2719
|
-
|
|
2720
1026
|
export declare type TemporaryFile = {
|
|
2721
1027
|
path: string;
|
|
2722
1028
|
visibility: 'internal';
|
|
@@ -2728,32 +1034,6 @@ export declare type TraceOptions = AgentDeviceRequestOverrides & {
|
|
|
2728
1034
|
path?: string;
|
|
2729
1035
|
};
|
|
2730
1036
|
|
|
2731
|
-
export declare type TriggerAppEventCommandOptions = CommandContext & {
|
|
2732
|
-
name: string;
|
|
2733
|
-
payload?: Record<string, unknown>;
|
|
2734
|
-
};
|
|
2735
|
-
|
|
2736
|
-
export declare type TriggerAppEventCommandResult = {
|
|
2737
|
-
kind: 'appEventTriggered';
|
|
2738
|
-
name: string;
|
|
2739
|
-
payload?: Record<string, unknown>;
|
|
2740
|
-
backendResult?: Record<string, unknown>;
|
|
2741
|
-
message?: string;
|
|
2742
|
-
};
|
|
2743
|
-
|
|
2744
|
-
export declare type TypeTextCommandOptions = CommandContext & {
|
|
2745
|
-
text: string;
|
|
2746
|
-
delayMs?: number;
|
|
2747
|
-
};
|
|
2748
|
-
|
|
2749
|
-
export declare type TypeTextCommandResult = {
|
|
2750
|
-
kind: 'text';
|
|
2751
|
-
text: string;
|
|
2752
|
-
delayMs: number;
|
|
2753
|
-
backendResult?: Record<string, unknown>;
|
|
2754
|
-
message?: string;
|
|
2755
|
-
};
|
|
2756
|
-
|
|
2757
1037
|
export declare type TypeTextOptions = ClientCommandBaseOptions & {
|
|
2758
1038
|
text: string;
|
|
2759
1039
|
delayMs?: number;
|
|
@@ -2761,44 +1041,12 @@ export declare type TypeTextOptions = ClientCommandBaseOptions & {
|
|
|
2761
1041
|
|
|
2762
1042
|
export declare type WaitCommandOptions = DeviceCommandBaseOptions & WaitCommandTarget;
|
|
2763
1043
|
|
|
2764
|
-
declare type WaitCommandOptions_2 = CommandContext & SelectorSnapshotOptions & {
|
|
2765
|
-
target: {
|
|
2766
|
-
kind: 'sleep';
|
|
2767
|
-
durationMs: number;
|
|
2768
|
-
} | {
|
|
2769
|
-
kind: 'text';
|
|
2770
|
-
text: string;
|
|
2771
|
-
timeoutMs?: number | null;
|
|
2772
|
-
} | {
|
|
2773
|
-
kind: 'ref';
|
|
2774
|
-
ref: string;
|
|
2775
|
-
timeoutMs?: number | null;
|
|
2776
|
-
} | {
|
|
2777
|
-
kind: 'selector';
|
|
2778
|
-
selector: string;
|
|
2779
|
-
timeoutMs?: number | null;
|
|
2780
|
-
};
|
|
2781
|
-
};
|
|
2782
|
-
|
|
2783
1044
|
export declare type WaitCommandResult = DaemonResponseData & {
|
|
2784
1045
|
waitedMs?: number;
|
|
2785
1046
|
text?: string;
|
|
2786
1047
|
selector?: string;
|
|
2787
1048
|
};
|
|
2788
1049
|
|
|
2789
|
-
declare type WaitCommandResult_2 = {
|
|
2790
|
-
kind: 'sleep';
|
|
2791
|
-
waitedMs: number;
|
|
2792
|
-
} | {
|
|
2793
|
-
kind: 'text';
|
|
2794
|
-
waitedMs: number;
|
|
2795
|
-
text: string;
|
|
2796
|
-
} | {
|
|
2797
|
-
kind: 'selector';
|
|
2798
|
-
waitedMs: number;
|
|
2799
|
-
selector: string;
|
|
2800
|
-
};
|
|
2801
|
-
|
|
2802
1050
|
declare type WaitCommandTarget = {
|
|
2803
1051
|
durationMs: number;
|
|
2804
1052
|
text?: never;
|
|
@@ -2825,11 +1073,6 @@ declare type WaitCommandTarget = {
|
|
|
2825
1073
|
timeoutMs?: number;
|
|
2826
1074
|
});
|
|
2827
1075
|
|
|
2828
|
-
declare type WaitForTextCommandOptions = CommandContext & SelectorSnapshotOptions & {
|
|
2829
|
-
text: string;
|
|
2830
|
-
timeoutMs?: number | null;
|
|
2831
|
-
};
|
|
2832
|
-
|
|
2833
1076
|
declare type WaitSnapshotOptions = Pick<CaptureSnapshotOptions, 'depth' | 'scope' | 'raw'>;
|
|
2834
1077
|
|
|
2835
1078
|
export { }
|