agent-device 0.12.5 → 0.12.6
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/dist/src/641.js +33 -33
- package/dist/src/backend.d.ts +326 -4
- package/dist/src/bin.js +32 -32
- package/dist/src/commands/index.d.ts +978 -6
- package/dist/src/commands/index.js +1 -1
- package/dist/src/daemon.js +15 -15
- package/dist/src/index.d.ts +977 -5
- package/dist/src/index.js +3 -3
- package/dist/src/testing/conformance.d.ts +341 -4
- package/dist/src/testing/conformance.js +1 -1
- package/package.json +1 -1
- package/skills/agent-device/references/macos-desktop.md +1 -1
- package/skills/agent-device/references/remote-tenancy.md +13 -5
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,56 @@
|
|
|
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
|
+
|
|
1
54
|
export declare type AgentDevice = AgentDeviceRuntime & BoundAgentDeviceCommands;
|
|
2
55
|
|
|
3
56
|
export declare type AgentDeviceBackend = {
|
|
@@ -13,12 +66,44 @@ export declare type AgentDeviceBackend = {
|
|
|
13
66
|
typeText?(context: BackendCommandContext, text: string, options?: {
|
|
14
67
|
delayMs?: number;
|
|
15
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>;
|
|
16
74
|
pressKey?(context: BackendCommandContext, key: string, options?: {
|
|
17
75
|
modifiers?: string[];
|
|
18
76
|
}): Promise<BackendActionResult>;
|
|
19
|
-
|
|
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>;
|
|
20
89
|
closeApp?(context: BackendCommandContext, app?: string): Promise<BackendActionResult>;
|
|
21
|
-
|
|
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>;
|
|
22
107
|
};
|
|
23
108
|
|
|
24
109
|
export declare type AgentDeviceBackendPlatform = 'ios' | 'android' | 'macos' | 'linux';
|
|
@@ -162,6 +247,46 @@ declare type AgentDeviceCommands = {
|
|
|
162
247
|
press: RuntimeCommand<PressCommandOptions, PressCommandResult>;
|
|
163
248
|
fill: RuntimeCommand<FillCommandOptions, FillCommandResult>;
|
|
164
249
|
typeText: RuntimeCommand<TypeTextCommandOptions, TypeTextCommandResult>;
|
|
250
|
+
focus: RuntimeCommand<FocusCommandOptions, FocusCommandResult>;
|
|
251
|
+
longPress: RuntimeCommand<LongPressCommandOptions, LongPressCommandResult>;
|
|
252
|
+
swipe: RuntimeCommand<SwipeCommandOptions, SwipeCommandResult>;
|
|
253
|
+
scroll: RuntimeCommand<ScrollCommandOptions, ScrollCommandResult>;
|
|
254
|
+
pinch: RuntimeCommand<PinchCommandOptions, PinchCommandResult>;
|
|
255
|
+
};
|
|
256
|
+
system: {
|
|
257
|
+
back: RuntimeCommand<SystemBackCommandOptions | undefined, SystemBackCommandResult>;
|
|
258
|
+
home: RuntimeCommand<SystemHomeCommandOptions | undefined, SystemHomeCommandResult>;
|
|
259
|
+
rotate: RuntimeCommand<SystemRotateCommandOptions, SystemRotateCommandResult>;
|
|
260
|
+
keyboard: RuntimeCommand<SystemKeyboardCommandOptions | undefined, SystemKeyboardCommandResult>;
|
|
261
|
+
clipboard: RuntimeCommand<SystemClipboardCommandOptions, SystemClipboardCommandResult>;
|
|
262
|
+
settings: RuntimeCommand<SystemSettingsCommandOptions | undefined, SystemSettingsCommandResult>;
|
|
263
|
+
alert: RuntimeCommand<SystemAlertCommandOptions | undefined, SystemAlertCommandResult>;
|
|
264
|
+
appSwitcher: RuntimeCommand<SystemAppSwitcherCommandOptions | undefined, SystemAppSwitcherCommandResult>;
|
|
265
|
+
};
|
|
266
|
+
apps: {
|
|
267
|
+
open: RuntimeCommand<OpenAppCommandOptions, OpenAppCommandResult>;
|
|
268
|
+
close: RuntimeCommand<CloseAppCommandOptions | undefined, CloseAppCommandResult>;
|
|
269
|
+
list: RuntimeCommand<ListAppsCommandOptions | undefined, ListAppsCommandResult>;
|
|
270
|
+
state: RuntimeCommand<GetAppStateCommandOptions, GetAppStateCommandResult>;
|
|
271
|
+
push: RuntimeCommand<PushAppCommandOptions, PushAppCommandResult>;
|
|
272
|
+
triggerEvent: RuntimeCommand<TriggerAppEventCommandOptions, TriggerAppEventCommandResult>;
|
|
273
|
+
};
|
|
274
|
+
admin: {
|
|
275
|
+
devices: RuntimeCommand<AdminDevicesCommandOptions | undefined, AdminDevicesCommandResult>;
|
|
276
|
+
boot: RuntimeCommand<AdminBootCommandOptions | undefined, AdminBootCommandResult>;
|
|
277
|
+
ensureSimulator: RuntimeCommand<AdminEnsureSimulatorCommandOptions, AdminEnsureSimulatorCommandResult>;
|
|
278
|
+
install: RuntimeCommand<AdminInstallCommandOptions, AdminInstallCommandResult>;
|
|
279
|
+
reinstall: RuntimeCommand<AdminReinstallCommandOptions, AdminInstallCommandResult>;
|
|
280
|
+
installFromSource: RuntimeCommand<AdminInstallFromSourceCommandOptions, AdminInstallCommandResult>;
|
|
281
|
+
};
|
|
282
|
+
recording: {
|
|
283
|
+
record: RuntimeCommand<RecordingRecordCommandOptions, RecordingRecordCommandResult>;
|
|
284
|
+
trace: RuntimeCommand<RecordingTraceCommandOptions, RecordingTraceCommandResult>;
|
|
285
|
+
};
|
|
286
|
+
diagnostics: {
|
|
287
|
+
logs: RuntimeCommand<DiagnosticsLogsCommandOptions | undefined, DiagnosticsLogsCommandResult>;
|
|
288
|
+
network: RuntimeCommand<DiagnosticsNetworkCommandOptions | undefined, DiagnosticsNetworkCommandResult>;
|
|
289
|
+
perf: RuntimeCommand<DiagnosticsPerfCommandOptions | undefined, DiagnosticsPerfCommandResult>;
|
|
165
290
|
};
|
|
166
291
|
};
|
|
167
292
|
|
|
@@ -344,6 +469,11 @@ export declare type AppOpenResult = {
|
|
|
344
469
|
identifiers: AgentDeviceIdentifiers;
|
|
345
470
|
};
|
|
346
471
|
|
|
472
|
+
export declare type AppPushInput = {
|
|
473
|
+
kind: 'json';
|
|
474
|
+
payload: Record<string, unknown>;
|
|
475
|
+
} | FileInputRef;
|
|
476
|
+
|
|
347
477
|
export declare type AppPushOptions = ClientCommandBaseOptions & {
|
|
348
478
|
app: string;
|
|
349
479
|
payload: string | Record<string, unknown>;
|
|
@@ -406,10 +536,65 @@ declare const BACKEND_CAPABILITY_NAMES: readonly ["android.shell", "ios.runnerCo
|
|
|
406
536
|
|
|
407
537
|
export declare type BackendActionResult = Record<string, unknown> | void;
|
|
408
538
|
|
|
539
|
+
export declare type BackendAlertAction = 'get' | 'accept' | 'dismiss' | 'wait';
|
|
540
|
+
|
|
541
|
+
export declare type BackendAlertInfo = {
|
|
542
|
+
title?: string;
|
|
543
|
+
message?: string;
|
|
544
|
+
buttons?: string[];
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
export declare type BackendAlertResult = {
|
|
548
|
+
kind: 'alertStatus';
|
|
549
|
+
alert: BackendAlertInfo | null;
|
|
550
|
+
} | {
|
|
551
|
+
kind: 'alertHandled';
|
|
552
|
+
handled: boolean;
|
|
553
|
+
alert?: BackendAlertInfo;
|
|
554
|
+
button?: string;
|
|
555
|
+
} | {
|
|
556
|
+
kind: 'alertWait';
|
|
557
|
+
alert: BackendAlertInfo | null;
|
|
558
|
+
waitedMs?: number;
|
|
559
|
+
timedOut?: boolean;
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
export declare type BackendAppEvent = {
|
|
563
|
+
name: string;
|
|
564
|
+
payload?: Record<string, unknown>;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
export declare type BackendAppInfo = {
|
|
568
|
+
id: string;
|
|
569
|
+
name?: string;
|
|
570
|
+
bundleId?: string;
|
|
571
|
+
packageName?: string;
|
|
572
|
+
activity?: string;
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
export declare type BackendAppListFilter = 'all' | 'user-installed';
|
|
576
|
+
|
|
577
|
+
export declare type BackendAppState = {
|
|
578
|
+
appId?: string;
|
|
579
|
+
bundleId?: string;
|
|
580
|
+
packageName?: string;
|
|
581
|
+
activity?: string;
|
|
582
|
+
state?: 'unknown' | 'notRunning' | 'running' | 'foreground' | 'background';
|
|
583
|
+
details?: Record<string, unknown>;
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
export declare type BackendBackOptions = {
|
|
587
|
+
mode?: 'in-app' | 'system';
|
|
588
|
+
};
|
|
589
|
+
|
|
409
590
|
export declare type BackendCapabilityName = (typeof BACKEND_CAPABILITY_NAMES)[number];
|
|
410
591
|
|
|
411
592
|
export declare type BackendCapabilitySet = readonly BackendCapabilityName[];
|
|
412
593
|
|
|
594
|
+
export declare type BackendClipboardTextResult = {
|
|
595
|
+
text: string;
|
|
596
|
+
};
|
|
597
|
+
|
|
413
598
|
export declare type BackendCommandContext = {
|
|
414
599
|
session?: string;
|
|
415
600
|
requestId?: string;
|
|
@@ -419,6 +604,71 @@ export declare type BackendCommandContext = {
|
|
|
419
604
|
metadata?: Record<string, unknown>;
|
|
420
605
|
};
|
|
421
606
|
|
|
607
|
+
export declare type BackendDeviceFilter = {
|
|
608
|
+
platform?: AgentDeviceBackendPlatform | 'apple';
|
|
609
|
+
target?: 'mobile' | 'tv' | 'desktop';
|
|
610
|
+
kind?: 'simulator' | 'emulator' | 'device' | 'desktop';
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
export declare type BackendDeviceInfo = {
|
|
614
|
+
id: string;
|
|
615
|
+
name: string;
|
|
616
|
+
platform: AgentDeviceBackendPlatform;
|
|
617
|
+
target?: 'mobile' | 'tv' | 'desktop';
|
|
618
|
+
kind?: 'simulator' | 'emulator' | 'device' | 'desktop';
|
|
619
|
+
booted?: boolean;
|
|
620
|
+
details?: Record<string, unknown>;
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
export declare type BackendDeviceOrientation = 'portrait' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right';
|
|
624
|
+
|
|
625
|
+
export declare type BackendDeviceTarget = {
|
|
626
|
+
id?: string;
|
|
627
|
+
name?: string;
|
|
628
|
+
platform?: AgentDeviceBackendPlatform;
|
|
629
|
+
target?: 'mobile' | 'tv' | 'desktop';
|
|
630
|
+
headless?: boolean;
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
export declare type BackendDiagnosticsPageOptions = BackendDiagnosticsTimeWindow & {
|
|
634
|
+
cursor?: string;
|
|
635
|
+
limit?: number;
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
export declare type BackendDiagnosticsTimeWindow = {
|
|
639
|
+
since?: string;
|
|
640
|
+
until?: string;
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
export declare type BackendDumpNetworkOptions = BackendDiagnosticsPageOptions & {
|
|
644
|
+
include?: BackendNetworkIncludeMode;
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
export declare type BackendDumpNetworkResult = {
|
|
648
|
+
entries: readonly BackendNetworkEntry[];
|
|
649
|
+
nextCursor?: string;
|
|
650
|
+
timeWindow?: BackendDiagnosticsTimeWindow;
|
|
651
|
+
backend?: string;
|
|
652
|
+
redacted?: boolean;
|
|
653
|
+
notes?: readonly string[];
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
export declare type BackendEnsureSimulatorOptions = {
|
|
657
|
+
device: string;
|
|
658
|
+
runtime?: string;
|
|
659
|
+
boot?: boolean;
|
|
660
|
+
reuseExisting?: boolean;
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
export declare type BackendEnsureSimulatorResult = {
|
|
664
|
+
udid: string;
|
|
665
|
+
device: string;
|
|
666
|
+
runtime: string;
|
|
667
|
+
created: boolean;
|
|
668
|
+
booted: boolean;
|
|
669
|
+
simulatorSetPath?: string | null;
|
|
670
|
+
};
|
|
671
|
+
|
|
422
672
|
export declare type BackendEscapeHatches = {
|
|
423
673
|
androidShell?(context: BackendCommandContext, args: readonly string[]): Promise<BackendShellResult>;
|
|
424
674
|
iosRunnerCommand?(context: BackendCommandContext, command: BackendRunnerCommand): Promise<BackendActionResult>;
|
|
@@ -433,21 +683,166 @@ export declare type BackendFindTextResult = {
|
|
|
433
683
|
found: boolean;
|
|
434
684
|
};
|
|
435
685
|
|
|
686
|
+
export declare type BackendInstallResult = Record<string, unknown> & {
|
|
687
|
+
appId?: string;
|
|
688
|
+
appName?: string;
|
|
689
|
+
bundleId?: string;
|
|
690
|
+
packageName?: string;
|
|
691
|
+
launchTarget?: string;
|
|
692
|
+
installablePath?: string;
|
|
693
|
+
archivePath?: string;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
export declare type BackendInstallSource = {
|
|
697
|
+
kind: 'path';
|
|
698
|
+
path: string;
|
|
699
|
+
} | {
|
|
700
|
+
kind: 'uploadedArtifact';
|
|
701
|
+
id: string;
|
|
702
|
+
} | {
|
|
703
|
+
kind: 'url';
|
|
704
|
+
url: string;
|
|
705
|
+
};
|
|
706
|
+
|
|
436
707
|
export declare type BackendInstallTarget = {
|
|
437
|
-
app
|
|
438
|
-
|
|
708
|
+
app?: string;
|
|
709
|
+
source: BackendInstallSource;
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
export declare type BackendKeyboardOptions = {
|
|
713
|
+
action: 'status' | 'get' | 'dismiss';
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
export declare type BackendKeyboardResult = {
|
|
717
|
+
platform?: 'android' | 'ios' | 'macos' | 'linux';
|
|
718
|
+
action?: BackendKeyboardOptions['action'];
|
|
719
|
+
visible?: boolean;
|
|
720
|
+
inputType?: string | null;
|
|
721
|
+
type?: string | null;
|
|
722
|
+
wasVisible?: boolean;
|
|
723
|
+
dismissed?: boolean;
|
|
724
|
+
attempts?: number;
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
export declare type BackendLogEntry = {
|
|
728
|
+
timestamp?: string;
|
|
729
|
+
level?: 'debug' | 'info' | 'warn' | 'error' | string;
|
|
730
|
+
message: string;
|
|
731
|
+
source?: string;
|
|
732
|
+
metadata?: Record<string, unknown>;
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
export declare type BackendLongPressOptions = {
|
|
736
|
+
durationMs?: number;
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
export declare type BackendMeasurePerfOptions = BackendDiagnosticsTimeWindow & {
|
|
740
|
+
sampleMs?: number;
|
|
741
|
+
metrics?: readonly string[];
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
export declare type BackendMeasurePerfResult = {
|
|
745
|
+
metrics: readonly BackendPerfMetric[];
|
|
746
|
+
startedAt?: string;
|
|
747
|
+
endedAt?: string;
|
|
748
|
+
backend?: string;
|
|
749
|
+
redacted?: boolean;
|
|
750
|
+
notes?: readonly string[];
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
export declare type BackendNetworkEntry = {
|
|
754
|
+
timestamp?: string;
|
|
755
|
+
method?: string;
|
|
756
|
+
url?: string;
|
|
757
|
+
status?: number;
|
|
758
|
+
durationMs?: number;
|
|
759
|
+
requestHeaders?: Record<string, string>;
|
|
760
|
+
responseHeaders?: Record<string, string>;
|
|
761
|
+
requestBody?: string;
|
|
762
|
+
responseBody?: string;
|
|
763
|
+
metadata?: Record<string, unknown>;
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
export declare type BackendNetworkIncludeMode = 'summary' | 'headers' | 'body' | 'all';
|
|
767
|
+
|
|
768
|
+
export declare type BackendOpenOptions = {
|
|
769
|
+
relaunch?: boolean;
|
|
439
770
|
};
|
|
440
771
|
|
|
441
772
|
export declare type BackendOpenTarget = {
|
|
773
|
+
/**
|
|
774
|
+
* Generic app identifier accepted by the backend. Hosted adapters should
|
|
775
|
+
* prefer structured appId, bundleId, or packageName when available.
|
|
776
|
+
*/
|
|
442
777
|
app?: string;
|
|
778
|
+
appId?: string;
|
|
779
|
+
bundleId?: string;
|
|
780
|
+
packageName?: string;
|
|
781
|
+
/**
|
|
782
|
+
* URL may be used by itself for a deep link or with an app identifier when
|
|
783
|
+
* the backend supports opening a URL in a specific app context.
|
|
784
|
+
*/
|
|
443
785
|
url?: string;
|
|
786
|
+
/**
|
|
787
|
+
* Platform-specific activity override, primarily for Android app launches.
|
|
788
|
+
*/
|
|
444
789
|
activity?: string;
|
|
445
790
|
};
|
|
446
791
|
|
|
792
|
+
export declare type BackendPerfMetric = {
|
|
793
|
+
name: string;
|
|
794
|
+
value?: number;
|
|
795
|
+
unit?: string;
|
|
796
|
+
status?: 'ok' | 'unavailable' | 'error';
|
|
797
|
+
message?: string;
|
|
798
|
+
metadata?: Record<string, unknown>;
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
export declare type BackendPinchOptions = {
|
|
802
|
+
scale: number;
|
|
803
|
+
center?: Point;
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
export declare type BackendPushInput = {
|
|
807
|
+
kind: 'json';
|
|
808
|
+
payload: Record<string, unknown>;
|
|
809
|
+
} | {
|
|
810
|
+
kind: 'file';
|
|
811
|
+
path: string;
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
export declare type BackendReadLogsOptions = BackendDiagnosticsPageOptions & {
|
|
815
|
+
levels?: readonly string[];
|
|
816
|
+
search?: string;
|
|
817
|
+
source?: string;
|
|
818
|
+
};
|
|
819
|
+
|
|
820
|
+
export declare type BackendReadLogsResult = {
|
|
821
|
+
entries: readonly BackendLogEntry[];
|
|
822
|
+
nextCursor?: string;
|
|
823
|
+
timeWindow?: BackendDiagnosticsTimeWindow;
|
|
824
|
+
backend?: string;
|
|
825
|
+
redacted?: boolean;
|
|
826
|
+
notes?: readonly string[];
|
|
827
|
+
};
|
|
828
|
+
|
|
447
829
|
export declare type BackendReadTextResult = {
|
|
448
830
|
text: string;
|
|
449
831
|
};
|
|
450
832
|
|
|
833
|
+
export declare type BackendRecordingOptions = {
|
|
834
|
+
outPath?: string;
|
|
835
|
+
fps?: number;
|
|
836
|
+
quality?: number;
|
|
837
|
+
showTouches?: boolean;
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
export declare type BackendRecordingResult = Record<string, unknown> & {
|
|
841
|
+
path?: string;
|
|
842
|
+
telemetryPath?: string;
|
|
843
|
+
warning?: string;
|
|
844
|
+
};
|
|
845
|
+
|
|
451
846
|
export declare type BackendRunnerCommand = {
|
|
452
847
|
command: string;
|
|
453
848
|
args?: readonly string[];
|
|
@@ -465,6 +860,19 @@ export declare type BackendScreenshotResult = {
|
|
|
465
860
|
overlayRefs?: ScreenshotOverlayRef[];
|
|
466
861
|
};
|
|
467
862
|
|
|
863
|
+
export declare type BackendScrollOptions = {
|
|
864
|
+
direction: 'up' | 'down' | 'left' | 'right';
|
|
865
|
+
amount?: number;
|
|
866
|
+
pixels?: number;
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
export declare type BackendScrollTarget = {
|
|
870
|
+
kind: 'viewport';
|
|
871
|
+
} | {
|
|
872
|
+
kind: 'point';
|
|
873
|
+
point: Point;
|
|
874
|
+
};
|
|
875
|
+
|
|
468
876
|
export declare type BackendShellResult = {
|
|
469
877
|
exitCode: number;
|
|
470
878
|
stdout: string;
|
|
@@ -499,6 +907,10 @@ export declare type BackendSnapshotResult = {
|
|
|
499
907
|
appBundleId?: string;
|
|
500
908
|
};
|
|
501
909
|
|
|
910
|
+
export declare type BackendSwipeOptions = {
|
|
911
|
+
durationMs?: number;
|
|
912
|
+
};
|
|
913
|
+
|
|
502
914
|
export declare type BackendTapOptions = {
|
|
503
915
|
button?: 'primary' | 'secondary' | 'middle';
|
|
504
916
|
count?: number;
|
|
@@ -508,6 +920,43 @@ export declare type BackendTapOptions = {
|
|
|
508
920
|
doubleTap?: boolean;
|
|
509
921
|
};
|
|
510
922
|
|
|
923
|
+
export declare type BackendTraceOptions = {
|
|
924
|
+
outPath?: string;
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
export declare type BackendTraceResult = Record<string, unknown> & {
|
|
928
|
+
outPath?: string;
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
export declare type BatchCommandOptions<TContext = unknown> = CommandContext & {
|
|
932
|
+
steps: readonly CommandRouterRequest<TContext>[];
|
|
933
|
+
stopOnError?: boolean;
|
|
934
|
+
maxSteps?: number;
|
|
935
|
+
};
|
|
936
|
+
|
|
937
|
+
export declare type BatchCommandResult = {
|
|
938
|
+
kind: 'batch';
|
|
939
|
+
total: number;
|
|
940
|
+
executed: number;
|
|
941
|
+
failed: number;
|
|
942
|
+
totalDurationMs: number;
|
|
943
|
+
results: readonly BatchCommandStepResult[];
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
export declare type BatchCommandStepResult = {
|
|
947
|
+
step: number;
|
|
948
|
+
command: string;
|
|
949
|
+
ok: true;
|
|
950
|
+
data: CommandRouterResult;
|
|
951
|
+
durationMs: number;
|
|
952
|
+
} | {
|
|
953
|
+
step: number;
|
|
954
|
+
command: string;
|
|
955
|
+
ok: false;
|
|
956
|
+
error: NormalizedError;
|
|
957
|
+
durationMs: number;
|
|
958
|
+
};
|
|
959
|
+
|
|
511
960
|
export declare type BatchRunOptions = AgentDeviceRequestOverrides & {
|
|
512
961
|
steps: BatchStep[];
|
|
513
962
|
onError?: 'stop';
|
|
@@ -550,6 +999,46 @@ export declare type BoundAgentDeviceCommands = {
|
|
|
550
999
|
press: (target: InteractionTarget_2, options?: Omit<PressCommandOptions, 'target'>) => Promise<PressCommandResult>;
|
|
551
1000
|
fill: (target: InteractionTarget_2, text: string, options?: Omit<FillCommandOptions, 'target' | 'text'>) => Promise<FillCommandResult>;
|
|
552
1001
|
typeText: (text: string, options?: Omit<TypeTextCommandOptions, 'text'>) => Promise<TypeTextCommandResult>;
|
|
1002
|
+
focus: (target: InteractionTarget_2, options?: Omit<FocusCommandOptions, 'target'>) => Promise<FocusCommandResult>;
|
|
1003
|
+
longPress: (target: InteractionTarget_2, options?: Omit<LongPressCommandOptions, 'target'>) => Promise<LongPressCommandResult>;
|
|
1004
|
+
swipe: BoundRuntimeCommand<SwipeCommandOptions, SwipeCommandResult>;
|
|
1005
|
+
scroll: BoundRuntimeCommand<ScrollCommandOptions, ScrollCommandResult>;
|
|
1006
|
+
pinch: BoundRuntimeCommand<PinchCommandOptions, PinchCommandResult>;
|
|
1007
|
+
};
|
|
1008
|
+
system: {
|
|
1009
|
+
back: (options?: SystemBackCommandOptions) => Promise<SystemBackCommandResult>;
|
|
1010
|
+
home: (options?: SystemHomeCommandOptions) => Promise<SystemHomeCommandResult>;
|
|
1011
|
+
rotate: BoundRuntimeCommand<SystemRotateCommandOptions, SystemRotateCommandResult>;
|
|
1012
|
+
keyboard: (options?: SystemKeyboardCommandOptions) => Promise<SystemKeyboardCommandResult>;
|
|
1013
|
+
clipboard: BoundRuntimeCommand<SystemClipboardCommandOptions, SystemClipboardCommandResult>;
|
|
1014
|
+
settings: (options?: SystemSettingsCommandOptions) => Promise<SystemSettingsCommandResult>;
|
|
1015
|
+
alert: (options?: SystemAlertCommandOptions) => Promise<SystemAlertCommandResult>;
|
|
1016
|
+
appSwitcher: (options?: SystemAppSwitcherCommandOptions) => Promise<SystemAppSwitcherCommandResult>;
|
|
1017
|
+
};
|
|
1018
|
+
apps: {
|
|
1019
|
+
open: BoundRuntimeCommand<OpenAppCommandOptions, OpenAppCommandResult>;
|
|
1020
|
+
close: (options?: CloseAppCommandOptions) => Promise<CloseAppCommandResult>;
|
|
1021
|
+
list: (options?: ListAppsCommandOptions) => Promise<ListAppsCommandResult>;
|
|
1022
|
+
state: BoundRuntimeCommand<GetAppStateCommandOptions, GetAppStateCommandResult>;
|
|
1023
|
+
push: BoundRuntimeCommand<PushAppCommandOptions, PushAppCommandResult>;
|
|
1024
|
+
triggerEvent: BoundRuntimeCommand<TriggerAppEventCommandOptions, TriggerAppEventCommandResult>;
|
|
1025
|
+
};
|
|
1026
|
+
admin: {
|
|
1027
|
+
devices: (options?: AdminDevicesCommandOptions) => Promise<AdminDevicesCommandResult>;
|
|
1028
|
+
boot: (options?: AdminBootCommandOptions) => Promise<AdminBootCommandResult>;
|
|
1029
|
+
ensureSimulator: BoundRuntimeCommand<AdminEnsureSimulatorCommandOptions, AdminEnsureSimulatorCommandResult>;
|
|
1030
|
+
install: BoundRuntimeCommand<AdminInstallCommandOptions, AdminInstallCommandResult>;
|
|
1031
|
+
reinstall: BoundRuntimeCommand<AdminReinstallCommandOptions, AdminInstallCommandResult>;
|
|
1032
|
+
installFromSource: BoundRuntimeCommand<AdminInstallFromSourceCommandOptions, AdminInstallCommandResult>;
|
|
1033
|
+
};
|
|
1034
|
+
recording: {
|
|
1035
|
+
record: BoundRuntimeCommand<RecordingRecordCommandOptions, RecordingRecordCommandResult>;
|
|
1036
|
+
trace: BoundRuntimeCommand<RecordingTraceCommandOptions, RecordingTraceCommandResult>;
|
|
1037
|
+
};
|
|
1038
|
+
observability: {
|
|
1039
|
+
logs: (options?: DiagnosticsLogsCommandOptions) => Promise<DiagnosticsLogsCommandResult>;
|
|
1040
|
+
network: (options?: DiagnosticsNetworkCommandOptions) => Promise<DiagnosticsNetworkCommandResult>;
|
|
1041
|
+
perf: (options?: DiagnosticsPerfCommandOptions) => Promise<DiagnosticsPerfCommandResult>;
|
|
553
1042
|
};
|
|
554
1043
|
};
|
|
555
1044
|
|
|
@@ -616,6 +1105,17 @@ export declare type ClipboardCommandResult = (DaemonResponseData & {
|
|
|
616
1105
|
textLength: number;
|
|
617
1106
|
});
|
|
618
1107
|
|
|
1108
|
+
export declare type CloseAppCommandOptions = CommandContext & {
|
|
1109
|
+
app?: string;
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
export declare type CloseAppCommandResult = {
|
|
1113
|
+
kind: 'appClosed';
|
|
1114
|
+
app?: string;
|
|
1115
|
+
backendResult?: Record<string, unknown>;
|
|
1116
|
+
message?: string;
|
|
1117
|
+
};
|
|
1118
|
+
|
|
619
1119
|
declare type CommandActionResult<T extends string> = DaemonResponseData & {
|
|
620
1120
|
action?: T;
|
|
621
1121
|
};
|
|
@@ -623,6 +1123,10 @@ declare type CommandActionResult<T extends string> = DaemonResponseData & {
|
|
|
623
1123
|
export declare const commandCatalog: readonly CommandCatalogEntry[];
|
|
624
1124
|
|
|
625
1125
|
export declare type CommandCatalogEntry = {
|
|
1126
|
+
/**
|
|
1127
|
+
* CLI command names track daemon compatibility migration. Namespaced entries
|
|
1128
|
+
* track runtime router/API commands that are available independently.
|
|
1129
|
+
*/
|
|
626
1130
|
command: string;
|
|
627
1131
|
category: 'portable-runtime' | 'backend-admin' | 'transport-session' | 'environment' | 'capability-gated';
|
|
628
1132
|
status: 'implemented' | 'planned';
|
|
@@ -709,6 +1213,130 @@ export declare type CommandRouterRequest<TContext = unknown> = {
|
|
|
709
1213
|
command: 'interactions.typeText';
|
|
710
1214
|
options: TypeTextCommandOptions;
|
|
711
1215
|
context?: TContext;
|
|
1216
|
+
} | {
|
|
1217
|
+
command: 'interactions.focus';
|
|
1218
|
+
options: FocusCommandOptions;
|
|
1219
|
+
context?: TContext;
|
|
1220
|
+
} | {
|
|
1221
|
+
command: 'interactions.longPress';
|
|
1222
|
+
options: LongPressCommandOptions;
|
|
1223
|
+
context?: TContext;
|
|
1224
|
+
} | {
|
|
1225
|
+
command: 'interactions.swipe';
|
|
1226
|
+
options: SwipeCommandOptions;
|
|
1227
|
+
context?: TContext;
|
|
1228
|
+
} | {
|
|
1229
|
+
command: 'interactions.scroll';
|
|
1230
|
+
options: ScrollCommandOptions;
|
|
1231
|
+
context?: TContext;
|
|
1232
|
+
} | {
|
|
1233
|
+
command: 'interactions.pinch';
|
|
1234
|
+
options: PinchCommandOptions;
|
|
1235
|
+
context?: TContext;
|
|
1236
|
+
} | {
|
|
1237
|
+
command: 'system.back';
|
|
1238
|
+
options?: SystemBackCommandOptions;
|
|
1239
|
+
context?: TContext;
|
|
1240
|
+
} | {
|
|
1241
|
+
command: 'system.home';
|
|
1242
|
+
options?: SystemHomeCommandOptions;
|
|
1243
|
+
context?: TContext;
|
|
1244
|
+
} | {
|
|
1245
|
+
command: 'system.rotate';
|
|
1246
|
+
options: SystemRotateCommandOptions;
|
|
1247
|
+
context?: TContext;
|
|
1248
|
+
} | {
|
|
1249
|
+
command: 'system.keyboard';
|
|
1250
|
+
options?: SystemKeyboardCommandOptions;
|
|
1251
|
+
context?: TContext;
|
|
1252
|
+
} | {
|
|
1253
|
+
command: 'system.clipboard';
|
|
1254
|
+
options: SystemClipboardCommandOptions;
|
|
1255
|
+
context?: TContext;
|
|
1256
|
+
} | {
|
|
1257
|
+
command: 'system.settings';
|
|
1258
|
+
options?: SystemSettingsCommandOptions;
|
|
1259
|
+
context?: TContext;
|
|
1260
|
+
} | {
|
|
1261
|
+
command: 'system.alert';
|
|
1262
|
+
options?: SystemAlertCommandOptions;
|
|
1263
|
+
context?: TContext;
|
|
1264
|
+
} | {
|
|
1265
|
+
command: 'system.appSwitcher';
|
|
1266
|
+
options?: SystemAppSwitcherCommandOptions;
|
|
1267
|
+
context?: TContext;
|
|
1268
|
+
} | {
|
|
1269
|
+
command: 'apps.open';
|
|
1270
|
+
options: OpenAppCommandOptions;
|
|
1271
|
+
context?: TContext;
|
|
1272
|
+
} | {
|
|
1273
|
+
command: 'apps.close';
|
|
1274
|
+
options?: CloseAppCommandOptions;
|
|
1275
|
+
context?: TContext;
|
|
1276
|
+
} | {
|
|
1277
|
+
command: 'apps.list';
|
|
1278
|
+
options?: ListAppsCommandOptions;
|
|
1279
|
+
context?: TContext;
|
|
1280
|
+
} | {
|
|
1281
|
+
command: 'apps.state';
|
|
1282
|
+
options: GetAppStateCommandOptions;
|
|
1283
|
+
context?: TContext;
|
|
1284
|
+
} | {
|
|
1285
|
+
command: 'apps.push';
|
|
1286
|
+
options: PushAppCommandOptions;
|
|
1287
|
+
context?: TContext;
|
|
1288
|
+
} | {
|
|
1289
|
+
command: 'apps.triggerEvent';
|
|
1290
|
+
options: TriggerAppEventCommandOptions;
|
|
1291
|
+
context?: TContext;
|
|
1292
|
+
} | {
|
|
1293
|
+
command: 'admin.devices';
|
|
1294
|
+
options?: AdminDevicesCommandOptions;
|
|
1295
|
+
context?: TContext;
|
|
1296
|
+
} | {
|
|
1297
|
+
command: 'admin.boot';
|
|
1298
|
+
options?: AdminBootCommandOptions;
|
|
1299
|
+
context?: TContext;
|
|
1300
|
+
} | {
|
|
1301
|
+
command: 'admin.ensureSimulator';
|
|
1302
|
+
options: AdminEnsureSimulatorCommandOptions;
|
|
1303
|
+
context?: TContext;
|
|
1304
|
+
} | {
|
|
1305
|
+
command: 'admin.install';
|
|
1306
|
+
options: AdminInstallCommandOptions;
|
|
1307
|
+
context?: TContext;
|
|
1308
|
+
} | {
|
|
1309
|
+
command: 'admin.reinstall';
|
|
1310
|
+
options: AdminReinstallCommandOptions;
|
|
1311
|
+
context?: TContext;
|
|
1312
|
+
} | {
|
|
1313
|
+
command: 'admin.installFromSource';
|
|
1314
|
+
options: AdminInstallFromSourceCommandOptions;
|
|
1315
|
+
context?: TContext;
|
|
1316
|
+
} | {
|
|
1317
|
+
command: 'record';
|
|
1318
|
+
options: RecordingRecordCommandOptions;
|
|
1319
|
+
context?: TContext;
|
|
1320
|
+
} | {
|
|
1321
|
+
command: 'trace';
|
|
1322
|
+
options: RecordingTraceCommandOptions;
|
|
1323
|
+
context?: TContext;
|
|
1324
|
+
} | {
|
|
1325
|
+
command: 'diagnostics.logs';
|
|
1326
|
+
options?: DiagnosticsLogsCommandOptions;
|
|
1327
|
+
context?: TContext;
|
|
1328
|
+
} | {
|
|
1329
|
+
command: 'diagnostics.network';
|
|
1330
|
+
options?: DiagnosticsNetworkCommandOptions;
|
|
1331
|
+
context?: TContext;
|
|
1332
|
+
} | {
|
|
1333
|
+
command: 'diagnostics.perf';
|
|
1334
|
+
options?: DiagnosticsPerfCommandOptions;
|
|
1335
|
+
context?: TContext;
|
|
1336
|
+
} | {
|
|
1337
|
+
command: 'batch';
|
|
1338
|
+
options: BatchCommandOptions<TContext>;
|
|
1339
|
+
context?: TContext;
|
|
712
1340
|
};
|
|
713
1341
|
|
|
714
1342
|
export declare type CommandRouterResponse = {
|
|
@@ -719,7 +1347,7 @@ export declare type CommandRouterResponse = {
|
|
|
719
1347
|
error: NormalizedError;
|
|
720
1348
|
};
|
|
721
1349
|
|
|
722
|
-
export declare type CommandRouterResult = ScreenshotCommandResult | DiffScreenshotCommandResult | SnapshotCommandResult | DiffSnapshotCommandResult | FindReadCommandResult | GetCommandResult | IsCommandResult | WaitCommandResult_2 | PressCommandResult | FillCommandResult | TypeTextCommandResult;
|
|
1350
|
+
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;
|
|
723
1351
|
|
|
724
1352
|
export declare const commands: AgentDeviceCommands;
|
|
725
1353
|
|
|
@@ -841,6 +1469,64 @@ declare type DeviceKind = 'simulator' | 'emulator' | 'device';
|
|
|
841
1469
|
|
|
842
1470
|
declare type DeviceTarget = 'mobile' | 'tv' | 'desktop';
|
|
843
1471
|
|
|
1472
|
+
export declare type DiagnosticsLogsCommandOptions = DiagnosticsPageOptions & {
|
|
1473
|
+
levels?: readonly string[];
|
|
1474
|
+
search?: string;
|
|
1475
|
+
source?: string;
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1478
|
+
export declare type DiagnosticsLogsCommandResult = {
|
|
1479
|
+
kind: 'diagnosticsLogs';
|
|
1480
|
+
entries: readonly BackendLogEntry[];
|
|
1481
|
+
nextCursor?: string;
|
|
1482
|
+
timeWindow?: BackendDiagnosticsTimeWindow;
|
|
1483
|
+
backend?: string;
|
|
1484
|
+
redacted: boolean;
|
|
1485
|
+
notes?: readonly string[];
|
|
1486
|
+
};
|
|
1487
|
+
|
|
1488
|
+
export declare type DiagnosticsNetworkCommandOptions = DiagnosticsPageOptions & {
|
|
1489
|
+
include?: BackendNetworkIncludeMode;
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
export declare type DiagnosticsNetworkCommandResult = {
|
|
1493
|
+
kind: 'diagnosticsNetwork';
|
|
1494
|
+
entries: readonly BackendNetworkEntry[];
|
|
1495
|
+
nextCursor?: string;
|
|
1496
|
+
timeWindow?: BackendDiagnosticsTimeWindow;
|
|
1497
|
+
backend?: string;
|
|
1498
|
+
redacted: boolean;
|
|
1499
|
+
notes?: readonly string[];
|
|
1500
|
+
};
|
|
1501
|
+
|
|
1502
|
+
declare type DiagnosticsPageOptions = CommandContext & {
|
|
1503
|
+
appId?: string;
|
|
1504
|
+
appBundleId?: string;
|
|
1505
|
+
since?: string;
|
|
1506
|
+
until?: string;
|
|
1507
|
+
cursor?: string;
|
|
1508
|
+
limit?: number;
|
|
1509
|
+
};
|
|
1510
|
+
|
|
1511
|
+
export declare type DiagnosticsPerfCommandOptions = CommandContext & {
|
|
1512
|
+
appId?: string;
|
|
1513
|
+
appBundleId?: string;
|
|
1514
|
+
since?: string;
|
|
1515
|
+
until?: string;
|
|
1516
|
+
sampleMs?: number;
|
|
1517
|
+
metrics?: readonly string[];
|
|
1518
|
+
};
|
|
1519
|
+
|
|
1520
|
+
export declare type DiagnosticsPerfCommandResult = {
|
|
1521
|
+
kind: 'diagnosticsPerf';
|
|
1522
|
+
metrics: readonly BackendPerfMetric[];
|
|
1523
|
+
startedAt?: string;
|
|
1524
|
+
endedAt?: string;
|
|
1525
|
+
backend?: string;
|
|
1526
|
+
redacted: boolean;
|
|
1527
|
+
notes?: readonly string[];
|
|
1528
|
+
};
|
|
1529
|
+
|
|
844
1530
|
export declare type DiagnosticsSink = {
|
|
845
1531
|
emit(event: {
|
|
846
1532
|
level: 'debug' | 'info' | 'warn' | 'error';
|
|
@@ -995,12 +1681,33 @@ declare type FindReadCommandResult = {
|
|
|
995
1681
|
|
|
996
1682
|
declare type FindSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'raw'>;
|
|
997
1683
|
|
|
1684
|
+
declare type FocusCommandOptions = CommandContext & {
|
|
1685
|
+
target: InteractionTarget_2;
|
|
1686
|
+
};
|
|
1687
|
+
|
|
1688
|
+
declare type FocusCommandResult = ResolvedInteractionTarget & {
|
|
1689
|
+
backendResult?: Record<string, unknown>;
|
|
1690
|
+
message?: string;
|
|
1691
|
+
};
|
|
1692
|
+
|
|
998
1693
|
declare type FocusOptions_2 = ClientCommandBaseOptions & {
|
|
999
1694
|
x: number;
|
|
1000
1695
|
y: number;
|
|
1001
1696
|
};
|
|
1002
1697
|
export { FocusOptions_2 as FocusOptions }
|
|
1003
1698
|
|
|
1699
|
+
declare type GestureDirection = 'up' | 'down' | 'left' | 'right';
|
|
1700
|
+
|
|
1701
|
+
export declare type GetAppStateCommandOptions = CommandContext & {
|
|
1702
|
+
app: string;
|
|
1703
|
+
};
|
|
1704
|
+
|
|
1705
|
+
export declare type GetAppStateCommandResult = {
|
|
1706
|
+
kind: 'appState';
|
|
1707
|
+
app: string;
|
|
1708
|
+
state: BackendAppState;
|
|
1709
|
+
};
|
|
1710
|
+
|
|
1004
1711
|
declare type GetAttrsCommandOptions = CommandContext & SelectorSnapshotOptions & {
|
|
1005
1712
|
target: ElementTarget_2;
|
|
1006
1713
|
};
|
|
@@ -1117,6 +1824,15 @@ declare type LeaseScopedOptions = LeaseOptions & {
|
|
|
1117
1824
|
leaseId: string;
|
|
1118
1825
|
};
|
|
1119
1826
|
|
|
1827
|
+
export declare type ListAppsCommandOptions = CommandContext & {
|
|
1828
|
+
filter?: BackendAppListFilter;
|
|
1829
|
+
};
|
|
1830
|
+
|
|
1831
|
+
export declare type ListAppsCommandResult = {
|
|
1832
|
+
kind: 'appsList';
|
|
1833
|
+
apps: readonly BackendAppInfo[];
|
|
1834
|
+
};
|
|
1835
|
+
|
|
1120
1836
|
declare type LiveScreenshotInputRef = {
|
|
1121
1837
|
kind: 'live';
|
|
1122
1838
|
};
|
|
@@ -1135,6 +1851,17 @@ export declare type LogsOptions = AgentDeviceRequestOverrides & {
|
|
|
1135
1851
|
restart?: boolean;
|
|
1136
1852
|
};
|
|
1137
1853
|
|
|
1854
|
+
declare type LongPressCommandOptions = CommandContext & {
|
|
1855
|
+
target: InteractionTarget_2;
|
|
1856
|
+
durationMs?: number;
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
declare type LongPressCommandResult = ResolvedInteractionTarget & {
|
|
1860
|
+
durationMs?: number;
|
|
1861
|
+
backendResult?: Record<string, unknown>;
|
|
1862
|
+
message?: string;
|
|
1863
|
+
};
|
|
1864
|
+
|
|
1138
1865
|
export declare type LongPressOptions = ClientCommandBaseOptions & {
|
|
1139
1866
|
x: number;
|
|
1140
1867
|
y: number;
|
|
@@ -1224,12 +1951,38 @@ export declare type NormalizedError = {
|
|
|
1224
1951
|
details?: Record<string, unknown>;
|
|
1225
1952
|
};
|
|
1226
1953
|
|
|
1954
|
+
export declare type OpenAppCommandOptions = CommandContext & BackendOpenTarget & {
|
|
1955
|
+
relaunch?: boolean;
|
|
1956
|
+
};
|
|
1957
|
+
|
|
1958
|
+
export declare type OpenAppCommandResult = {
|
|
1959
|
+
kind: 'appOpened';
|
|
1960
|
+
target: BackendOpenTarget;
|
|
1961
|
+
relaunch: boolean;
|
|
1962
|
+
backendResult?: Record<string, unknown>;
|
|
1963
|
+
message?: string;
|
|
1964
|
+
};
|
|
1965
|
+
|
|
1227
1966
|
export declare type OutputVisibility = 'client-visible' | 'internal';
|
|
1228
1967
|
|
|
1229
1968
|
export declare type PerfOptions = ClientCommandBaseOptions;
|
|
1230
1969
|
|
|
1231
1970
|
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';
|
|
1232
1971
|
|
|
1972
|
+
declare type PinchCommandOptions = CommandContext & {
|
|
1973
|
+
scale: number;
|
|
1974
|
+
center?: InteractionTarget_2;
|
|
1975
|
+
};
|
|
1976
|
+
|
|
1977
|
+
declare type PinchCommandResult = {
|
|
1978
|
+
kind: 'pinch';
|
|
1979
|
+
scale: number;
|
|
1980
|
+
center?: Point;
|
|
1981
|
+
centerTarget?: ResolvedInteractionTarget;
|
|
1982
|
+
backendResult?: Record<string, unknown>;
|
|
1983
|
+
message?: string;
|
|
1984
|
+
};
|
|
1985
|
+
|
|
1233
1986
|
export declare type PinchOptions = ClientCommandBaseOptions & {
|
|
1234
1987
|
scale: number;
|
|
1235
1988
|
x?: number;
|
|
@@ -1291,6 +2044,19 @@ declare type PressCommandResult = ResolvedInteractionTarget & {
|
|
|
1291
2044
|
|
|
1292
2045
|
export declare type PressOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions;
|
|
1293
2046
|
|
|
2047
|
+
export declare type PushAppCommandOptions = CommandContext & {
|
|
2048
|
+
app: string;
|
|
2049
|
+
input: AppPushInput;
|
|
2050
|
+
};
|
|
2051
|
+
|
|
2052
|
+
export declare type PushAppCommandResult = {
|
|
2053
|
+
kind: 'appPushed';
|
|
2054
|
+
app: string;
|
|
2055
|
+
inputKind: 'json' | 'file';
|
|
2056
|
+
backendResult?: Record<string, unknown>;
|
|
2057
|
+
message?: string;
|
|
2058
|
+
};
|
|
2059
|
+
|
|
1294
2060
|
declare type RawSnapshotNode = {
|
|
1295
2061
|
index: number;
|
|
1296
2062
|
type?: string;
|
|
@@ -1316,6 +2082,39 @@ declare type RawSnapshotNode = {
|
|
|
1316
2082
|
|
|
1317
2083
|
declare type RecordingQuality = 5 | 6 | 7 | 8 | 9 | 10;
|
|
1318
2084
|
|
|
2085
|
+
export declare type RecordingRecordCommandOptions = CommandContext & {
|
|
2086
|
+
action: 'start' | 'stop';
|
|
2087
|
+
out?: FileOutputRef;
|
|
2088
|
+
fps?: number;
|
|
2089
|
+
quality?: number;
|
|
2090
|
+
hideTouches?: boolean;
|
|
2091
|
+
};
|
|
2092
|
+
|
|
2093
|
+
export declare type RecordingRecordCommandResult = {
|
|
2094
|
+
kind: 'recordingStarted' | 'recordingStopped';
|
|
2095
|
+
action: 'start' | 'stop';
|
|
2096
|
+
path?: string;
|
|
2097
|
+
telemetryPath?: string;
|
|
2098
|
+
artifact?: ArtifactDescriptor;
|
|
2099
|
+
backendResult?: Record<string, unknown>;
|
|
2100
|
+
warning?: string;
|
|
2101
|
+
message?: string;
|
|
2102
|
+
};
|
|
2103
|
+
|
|
2104
|
+
export declare type RecordingTraceCommandOptions = CommandContext & {
|
|
2105
|
+
action: 'start' | 'stop';
|
|
2106
|
+
out?: FileOutputRef;
|
|
2107
|
+
};
|
|
2108
|
+
|
|
2109
|
+
export declare type RecordingTraceCommandResult = {
|
|
2110
|
+
kind: 'traceStarted' | 'traceStopped';
|
|
2111
|
+
action: 'start' | 'stop';
|
|
2112
|
+
outPath?: string;
|
|
2113
|
+
artifact?: ArtifactDescriptor;
|
|
2114
|
+
backendResult?: Record<string, unknown>;
|
|
2115
|
+
message?: string;
|
|
2116
|
+
};
|
|
2117
|
+
|
|
1319
2118
|
export declare type RecordOptions = AgentDeviceRequestOverrides & {
|
|
1320
2119
|
action: 'start' | 'stop';
|
|
1321
2120
|
path?: string;
|
|
@@ -1572,6 +2371,28 @@ export declare type ScreenshotOverlayRef = {
|
|
|
1572
2371
|
center: Point;
|
|
1573
2372
|
};
|
|
1574
2373
|
|
|
2374
|
+
declare type ScrollCommandOptions = CommandContext & {
|
|
2375
|
+
target?: ScrollTarget;
|
|
2376
|
+
direction: GestureDirection;
|
|
2377
|
+
amount?: number;
|
|
2378
|
+
pixels?: number;
|
|
2379
|
+
};
|
|
2380
|
+
|
|
2381
|
+
declare type ScrollCommandResult = {
|
|
2382
|
+
kind: 'viewport';
|
|
2383
|
+
direction: GestureDirection;
|
|
2384
|
+
amount?: number;
|
|
2385
|
+
pixels?: number;
|
|
2386
|
+
backendResult?: Record<string, unknown>;
|
|
2387
|
+
message?: string;
|
|
2388
|
+
} | (ResolvedInteractionTarget & {
|
|
2389
|
+
direction: GestureDirection;
|
|
2390
|
+
amount?: number;
|
|
2391
|
+
pixels?: number;
|
|
2392
|
+
backendResult?: Record<string, unknown>;
|
|
2393
|
+
message?: string;
|
|
2394
|
+
});
|
|
2395
|
+
|
|
1575
2396
|
declare type ScrollOptions_2 = ClientCommandBaseOptions & {
|
|
1576
2397
|
direction: 'up' | 'down' | 'left' | 'right';
|
|
1577
2398
|
amount?: number;
|
|
@@ -1579,6 +2400,10 @@ declare type ScrollOptions_2 = ClientCommandBaseOptions & {
|
|
|
1579
2400
|
};
|
|
1580
2401
|
export { ScrollOptions_2 as ScrollOptions }
|
|
1581
2402
|
|
|
2403
|
+
declare type ScrollTarget = InteractionTarget_2 | {
|
|
2404
|
+
kind: 'viewport';
|
|
2405
|
+
};
|
|
2406
|
+
|
|
1582
2407
|
export declare function selector(expression: string): SelectorTarget;
|
|
1583
2408
|
|
|
1584
2409
|
declare type SelectorSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'scope' | 'raw'>;
|
|
@@ -1704,6 +2529,22 @@ export declare type StartupPerfSample = {
|
|
|
1704
2529
|
appBundleId?: string;
|
|
1705
2530
|
};
|
|
1706
2531
|
|
|
2532
|
+
declare type SwipeCommandOptions = CommandContext & SwipeOptions_2;
|
|
2533
|
+
|
|
2534
|
+
declare type SwipeCommandResult = {
|
|
2535
|
+
kind: 'swipe';
|
|
2536
|
+
from: Point;
|
|
2537
|
+
to: Point;
|
|
2538
|
+
direction?: GestureDirection;
|
|
2539
|
+
distance?: number;
|
|
2540
|
+
durationMs?: number;
|
|
2541
|
+
fromTarget?: ResolvedInteractionTarget | {
|
|
2542
|
+
kind: 'viewport';
|
|
2543
|
+
};
|
|
2544
|
+
backendResult?: Record<string, unknown>;
|
|
2545
|
+
message?: string;
|
|
2546
|
+
};
|
|
2547
|
+
|
|
1707
2548
|
export declare type SwipeOptions = ClientCommandBaseOptions & {
|
|
1708
2549
|
from: {
|
|
1709
2550
|
x: number;
|
|
@@ -1719,6 +2560,124 @@ export declare type SwipeOptions = ClientCommandBaseOptions & {
|
|
|
1719
2560
|
pattern?: 'one-way' | 'ping-pong';
|
|
1720
2561
|
};
|
|
1721
2562
|
|
|
2563
|
+
declare type SwipeOptions_2 = {
|
|
2564
|
+
from?: Point | InteractionTarget_2;
|
|
2565
|
+
to?: Point;
|
|
2566
|
+
direction?: GestureDirection;
|
|
2567
|
+
distance?: number;
|
|
2568
|
+
durationMs?: number;
|
|
2569
|
+
};
|
|
2570
|
+
|
|
2571
|
+
declare type SystemAlertCommandOptions = CommandContext & {
|
|
2572
|
+
action?: BackendAlertAction;
|
|
2573
|
+
timeoutMs?: number;
|
|
2574
|
+
};
|
|
2575
|
+
|
|
2576
|
+
declare type SystemAlertCommandResult = {
|
|
2577
|
+
kind: 'alertStatus';
|
|
2578
|
+
action: 'get';
|
|
2579
|
+
alert: BackendAlertInfo | null;
|
|
2580
|
+
} | {
|
|
2581
|
+
kind: 'alertHandled';
|
|
2582
|
+
action: 'accept' | 'dismiss';
|
|
2583
|
+
handled: boolean;
|
|
2584
|
+
alert?: BackendAlertInfo;
|
|
2585
|
+
button?: string;
|
|
2586
|
+
message?: string;
|
|
2587
|
+
} | {
|
|
2588
|
+
kind: 'alertWait';
|
|
2589
|
+
action: 'wait';
|
|
2590
|
+
alert: BackendAlertInfo | null;
|
|
2591
|
+
waitedMs?: number;
|
|
2592
|
+
timedOut?: boolean;
|
|
2593
|
+
message?: string;
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2596
|
+
declare type SystemAppSwitcherCommandOptions = CommandContext;
|
|
2597
|
+
|
|
2598
|
+
declare type SystemAppSwitcherCommandResult = {
|
|
2599
|
+
kind: 'appSwitcherOpened';
|
|
2600
|
+
backendResult?: Record<string, unknown>;
|
|
2601
|
+
message?: string;
|
|
2602
|
+
};
|
|
2603
|
+
|
|
2604
|
+
declare type SystemBackCommandOptions = CommandContext & {
|
|
2605
|
+
mode?: 'in-app' | 'system';
|
|
2606
|
+
};
|
|
2607
|
+
|
|
2608
|
+
declare type SystemBackCommandResult = {
|
|
2609
|
+
kind: 'systemBack';
|
|
2610
|
+
mode: 'in-app' | 'system';
|
|
2611
|
+
backendResult?: Record<string, unknown>;
|
|
2612
|
+
message?: string;
|
|
2613
|
+
};
|
|
2614
|
+
|
|
2615
|
+
declare type SystemClipboardCommandOptions = (CommandContext & {
|
|
2616
|
+
action: 'read';
|
|
2617
|
+
}) | (CommandContext & {
|
|
2618
|
+
action: 'write';
|
|
2619
|
+
text: string;
|
|
2620
|
+
});
|
|
2621
|
+
|
|
2622
|
+
declare type SystemClipboardCommandResult = {
|
|
2623
|
+
kind: 'clipboardText';
|
|
2624
|
+
action: 'read';
|
|
2625
|
+
text: string;
|
|
2626
|
+
} | {
|
|
2627
|
+
kind: 'clipboardUpdated';
|
|
2628
|
+
action: 'write';
|
|
2629
|
+
textLength: number;
|
|
2630
|
+
backendResult?: Record<string, unknown>;
|
|
2631
|
+
message?: string;
|
|
2632
|
+
};
|
|
2633
|
+
|
|
2634
|
+
declare type SystemHomeCommandOptions = CommandContext;
|
|
2635
|
+
|
|
2636
|
+
declare type SystemHomeCommandResult = {
|
|
2637
|
+
kind: 'systemHome';
|
|
2638
|
+
backendResult?: Record<string, unknown>;
|
|
2639
|
+
message?: string;
|
|
2640
|
+
};
|
|
2641
|
+
|
|
2642
|
+
declare type SystemKeyboardCommandOptions = CommandContext & {
|
|
2643
|
+
action?: 'status' | 'get' | 'dismiss';
|
|
2644
|
+
};
|
|
2645
|
+
|
|
2646
|
+
declare type SystemKeyboardCommandResult = {
|
|
2647
|
+
kind: 'keyboardState';
|
|
2648
|
+
action: 'status' | 'get';
|
|
2649
|
+
state: BackendKeyboardResult;
|
|
2650
|
+
backendResult?: Record<string, unknown>;
|
|
2651
|
+
} | {
|
|
2652
|
+
kind: 'keyboardDismissed';
|
|
2653
|
+
action: 'dismiss';
|
|
2654
|
+
state: BackendKeyboardResult;
|
|
2655
|
+
backendResult?: Record<string, unknown>;
|
|
2656
|
+
message?: string;
|
|
2657
|
+
};
|
|
2658
|
+
|
|
2659
|
+
declare type SystemRotateCommandOptions = CommandContext & {
|
|
2660
|
+
orientation: BackendDeviceOrientation;
|
|
2661
|
+
};
|
|
2662
|
+
|
|
2663
|
+
declare type SystemRotateCommandResult = {
|
|
2664
|
+
kind: 'systemRotated';
|
|
2665
|
+
orientation: BackendDeviceOrientation;
|
|
2666
|
+
backendResult?: Record<string, unknown>;
|
|
2667
|
+
message?: string;
|
|
2668
|
+
};
|
|
2669
|
+
|
|
2670
|
+
declare type SystemSettingsCommandOptions = CommandContext & {
|
|
2671
|
+
target?: string;
|
|
2672
|
+
};
|
|
2673
|
+
|
|
2674
|
+
declare type SystemSettingsCommandResult = {
|
|
2675
|
+
kind: 'settingsOpened';
|
|
2676
|
+
target?: string;
|
|
2677
|
+
backendResult?: Record<string, unknown>;
|
|
2678
|
+
message?: string;
|
|
2679
|
+
};
|
|
2680
|
+
|
|
1722
2681
|
export declare type TemporaryFile = {
|
|
1723
2682
|
path: string;
|
|
1724
2683
|
visibility: 'internal';
|
|
@@ -1730,6 +2689,19 @@ export declare type TraceOptions = AgentDeviceRequestOverrides & {
|
|
|
1730
2689
|
path?: string;
|
|
1731
2690
|
};
|
|
1732
2691
|
|
|
2692
|
+
export declare type TriggerAppEventCommandOptions = CommandContext & {
|
|
2693
|
+
name: string;
|
|
2694
|
+
payload?: Record<string, unknown>;
|
|
2695
|
+
};
|
|
2696
|
+
|
|
2697
|
+
export declare type TriggerAppEventCommandResult = {
|
|
2698
|
+
kind: 'appEventTriggered';
|
|
2699
|
+
name: string;
|
|
2700
|
+
payload?: Record<string, unknown>;
|
|
2701
|
+
backendResult?: Record<string, unknown>;
|
|
2702
|
+
message?: string;
|
|
2703
|
+
};
|
|
2704
|
+
|
|
1733
2705
|
export declare type TypeTextCommandOptions = CommandContext & {
|
|
1734
2706
|
text: string;
|
|
1735
2707
|
delayMs?: number;
|