agent-device 0.11.14 → 0.11.15

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.
@@ -1,6 +1,8 @@
1
- declare type AgentDeviceClient = {
1
+ export declare type AgentDeviceClient = {
2
+ command: AgentDeviceCommandClient;
2
3
  devices: {
3
4
  list: (options?: AgentDeviceRequestOverrides & AgentDeviceSelectionOptions) => Promise<AgentDeviceDevice[]>;
5
+ boot: (options?: DeviceBootOptions) => Promise<CommandRequestResult>;
4
6
  };
5
7
  sessions: {
6
8
  list: (options?: AgentDeviceRequestOverrides) => Promise<AgentDeviceSession[]>;
@@ -18,6 +20,8 @@ declare type AgentDeviceClient = {
18
20
  list: (options?: AppListOptions) => Promise<string[]>;
19
21
  open: (options: AppOpenOptions) => Promise<AppOpenResult>;
20
22
  close: (options?: AppCloseOptions) => Promise<AppCloseResult>;
23
+ push: (options: AppPushOptions) => Promise<CommandRequestResult>;
24
+ triggerEvent: (options: AppTriggerEventOptions) => Promise<CommandRequestResult>;
21
25
  };
22
26
  materializations: {
23
27
  release: (options: MaterializationReleaseOptions) => Promise<MaterializationReleaseResult>;
@@ -28,14 +32,50 @@ declare type AgentDeviceClient = {
28
32
  capture: {
29
33
  snapshot: (options?: CaptureSnapshotOptions) => Promise<CaptureSnapshotResult>;
30
34
  screenshot: (options?: CaptureScreenshotOptions) => Promise<CaptureScreenshotResult>;
35
+ diff: (options: CaptureDiffOptions) => Promise<CommandRequestResult>;
36
+ };
37
+ interactions: {
38
+ click: (options: ClickOptions) => Promise<CommandRequestResult>;
39
+ press: (options: PressOptions) => Promise<CommandRequestResult>;
40
+ longPress: (options: LongPressOptions) => Promise<CommandRequestResult>;
41
+ swipe: (options: SwipeOptions) => Promise<CommandRequestResult>;
42
+ focus: (options: FocusOptions_2) => Promise<CommandRequestResult>;
43
+ type: (options: TypeTextOptions) => Promise<CommandRequestResult>;
44
+ fill: (options: FillOptions) => Promise<CommandRequestResult>;
45
+ scroll: (options: ScrollOptions_2) => Promise<CommandRequestResult>;
46
+ scrollIntoView: (options: ScrollIntoViewOptions_2) => Promise<CommandRequestResult>;
47
+ pinch: (options: PinchOptions) => Promise<CommandRequestResult>;
48
+ get: (options: GetOptions) => Promise<CommandRequestResult>;
49
+ is: (options: IsOptions) => Promise<CommandRequestResult>;
50
+ find: (options: FindOptions) => Promise<CommandRequestResult>;
51
+ };
52
+ replay: {
53
+ run: (options: ReplayRunOptions) => Promise<CommandRequestResult>;
54
+ test: (options: ReplayTestOptions) => Promise<CommandRequestResult>;
55
+ };
56
+ batch: {
57
+ run: (options: BatchRunOptions) => Promise<CommandRequestResult>;
58
+ };
59
+ observability: {
60
+ perf: (options?: PerfOptions) => Promise<CommandRequestResult>;
61
+ logs: (options?: LogsOptions) => Promise<CommandRequestResult>;
62
+ network: (options?: NetworkOptions) => Promise<CommandRequestResult>;
63
+ };
64
+ recording: {
65
+ record: (options: RecordOptions) => Promise<CommandRequestResult>;
66
+ trace: (options: TraceOptions) => Promise<CommandRequestResult>;
67
+ };
68
+ settings: {
69
+ update: (options: SettingsUpdateOptions) => Promise<CommandRequestResult>;
31
70
  };
32
71
  };
33
72
 
34
- declare type AgentDeviceClientConfig = {
73
+ export declare type AgentDeviceClientConfig = {
35
74
  session?: string;
36
75
  lockPolicy?: DaemonLockPolicy;
37
76
  lockPlatform?: PlatformSelector;
38
77
  requestId?: string;
78
+ remoteConfig?: string;
39
79
  stateDir?: string;
40
80
  daemonBaseUrl?: string;
41
81
  daemonAuthToken?: string;
@@ -49,9 +89,21 @@ declare type AgentDeviceClientConfig = {
49
89
  debug?: boolean;
50
90
  };
51
91
 
52
- declare type AgentDeviceDaemonTransport = (req: Omit<DaemonRequest, 'token'>) => Promise<DaemonResponse>;
92
+ export declare type AgentDeviceCommandClient = {
93
+ wait: (options: WaitCommandOptions) => Promise<WaitCommandResult>;
94
+ alert: (options?: AlertCommandOptions) => Promise<AlertCommandResult>;
95
+ appState: (options?: AppStateCommandOptions) => Promise<AppStateCommandResult>;
96
+ back: (options?: BackCommandOptions) => Promise<BackCommandResult>;
97
+ home: (options?: HomeCommandOptions) => Promise<HomeCommandResult>;
98
+ rotate: (options: RotateCommandOptions) => Promise<RotateCommandResult>;
99
+ appSwitcher: (options?: AppSwitcherCommandOptions) => Promise<AppSwitcherCommandResult>;
100
+ keyboard: (options?: KeyboardCommandOptions) => Promise<KeyboardCommandResult>;
101
+ clipboard: (options: ClipboardCommandOptions) => Promise<ClipboardCommandResult>;
102
+ };
103
+
104
+ export declare type AgentDeviceDaemonTransport = (req: Omit<DaemonRequest, 'token'>) => Promise<DaemonResponse>;
53
105
 
54
- declare type AgentDeviceDevice = {
106
+ export declare type AgentDeviceDevice = {
55
107
  platform: Platform;
56
108
  target: DeviceTarget;
57
109
  kind: DeviceKind;
@@ -67,7 +119,7 @@ declare type AgentDeviceDevice = {
67
119
  };
68
120
  };
69
121
 
70
- declare type AgentDeviceIdentifiers = {
122
+ export declare type AgentDeviceIdentifiers = {
71
123
  session?: string;
72
124
  deviceId?: string;
73
125
  deviceName?: string;
@@ -78,9 +130,9 @@ declare type AgentDeviceIdentifiers = {
78
130
  package?: string;
79
131
  };
80
132
 
81
- declare type AgentDeviceRequestOverrides = Pick<AgentDeviceClientConfig, 'session' | 'lockPolicy' | 'lockPlatform' | 'requestId' | 'tenant' | 'sessionIsolation' | 'runId' | 'leaseId' | 'cwd' | 'debug'>;
133
+ export declare type AgentDeviceRequestOverrides = Pick<AgentDeviceClientConfig, 'session' | 'lockPolicy' | 'lockPlatform' | 'requestId' | 'tenant' | 'sessionIsolation' | 'runId' | 'leaseId' | 'cwd' | 'debug'>;
82
134
 
83
- declare type AgentDeviceSelectionOptions = {
135
+ export declare type AgentDeviceSelectionOptions = {
84
136
  platform?: PlatformSelector;
85
137
  target?: DeviceTarget;
86
138
  device?: string;
@@ -90,14 +142,14 @@ declare type AgentDeviceSelectionOptions = {
90
142
  androidDeviceAllowlist?: string;
91
143
  };
92
144
 
93
- declare type AgentDeviceSession = {
145
+ export declare type AgentDeviceSession = {
94
146
  name: string;
95
147
  createdAt: number;
96
148
  device: AgentDeviceSessionDevice;
97
149
  identifiers: AgentDeviceIdentifiers;
98
150
  };
99
151
 
100
- declare type AgentDeviceSessionDevice = {
152
+ export declare type AgentDeviceSessionDevice = {
101
153
  platform: Platform;
102
154
  target: DeviceTarget;
103
155
  id: string;
@@ -112,24 +164,31 @@ declare type AgentDeviceSessionDevice = {
112
164
  };
113
165
  };
114
166
 
115
- declare type AppCloseOptions = AgentDeviceRequestOverrides & {
167
+ export declare type AlertCommandOptions = DeviceCommandBaseOptions & {
168
+ action?: 'get' | 'accept' | 'dismiss' | 'wait';
169
+ timeoutMs?: number;
170
+ };
171
+
172
+ export declare type AlertCommandResult = DaemonResponseData;
173
+
174
+ export declare type AppCloseOptions = AgentDeviceRequestOverrides & {
116
175
  app?: string;
117
176
  shutdown?: boolean;
118
177
  };
119
178
 
120
- declare type AppCloseResult = {
179
+ export declare type AppCloseResult = {
121
180
  session: string;
122
181
  closedApp?: string;
123
182
  shutdown?: Record<string, unknown>;
124
183
  identifiers: AgentDeviceIdentifiers;
125
184
  };
126
185
 
127
- declare type AppDeployOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
186
+ export declare type AppDeployOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
128
187
  app: string;
129
188
  appPath: string;
130
189
  };
131
190
 
132
- declare type AppDeployResult = {
191
+ export declare type AppDeployResult = {
133
192
  app: string;
134
193
  appPath: string;
135
194
  platform: Platform;
@@ -152,13 +211,13 @@ declare type AppErrorDetails = Record<string, unknown> & {
152
211
  logPath?: string;
153
212
  };
154
213
 
155
- declare type AppInstallFromSourceOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
214
+ export declare type AppInstallFromSourceOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
156
215
  source: DaemonInstallSource;
157
216
  retainPaths?: boolean;
158
217
  retentionMs?: number;
159
218
  };
160
219
 
161
- declare type AppInstallFromSourceResult = {
220
+ export declare type AppInstallFromSourceResult = {
162
221
  appName?: string;
163
222
  appId?: string;
164
223
  bundleId?: string;
@@ -173,12 +232,12 @@ declare type AppInstallFromSourceResult = {
173
232
 
174
233
  declare type ApplePlatform = 'ios' | 'macos';
175
234
 
176
- declare type AppListOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
235
+ export declare type AppListOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
177
236
  appsFilter?: 'all' | 'user-installed';
178
237
  };
179
238
 
180
- declare type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
181
- app: string;
239
+ export declare type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
240
+ app?: string;
182
241
  url?: string;
183
242
  surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
184
243
  activity?: string;
@@ -188,7 +247,7 @@ declare type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSelection
188
247
  runtime?: SessionRuntimeHints;
189
248
  };
190
249
 
191
- declare type AppOpenResult = {
250
+ export declare type AppOpenResult = {
192
251
  session: string;
193
252
  appName?: string;
194
253
  appBundleId?: string;
@@ -199,25 +258,78 @@ declare type AppOpenResult = {
199
258
  identifiers: AgentDeviceIdentifiers;
200
259
  };
201
260
 
202
- declare type BatchStep = {
261
+ export declare type AppPushOptions = ClientCommandBaseOptions & {
262
+ app: string;
263
+ payload: string | Record<string, unknown>;
264
+ };
265
+
266
+ export declare type AppStateCommandOptions = DeviceCommandBaseOptions;
267
+
268
+ export declare type AppStateCommandResult = DaemonResponseData & {
269
+ platform?: Platform;
270
+ appName?: string;
271
+ appBundleId?: string;
272
+ package?: string;
273
+ activity?: string;
274
+ source?: 'session';
275
+ surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
276
+ };
277
+
278
+ export declare type AppSwitcherCommandOptions = DeviceCommandBaseOptions;
279
+
280
+ export declare type AppSwitcherCommandResult = CommandActionResult<'app-switcher'>;
281
+
282
+ export declare type AppTriggerEventOptions = ClientCommandBaseOptions & {
283
+ event: string;
284
+ payload?: Record<string, unknown>;
285
+ };
286
+
287
+ export declare type BackCommandOptions = DeviceCommandBaseOptions & {
288
+ mode?: 'in-app' | 'system';
289
+ };
290
+
291
+ export declare type BackCommandResult = CommandActionResult<'back'> & {
292
+ mode?: 'in-app' | 'system';
293
+ };
294
+
295
+ export declare type BatchRunOptions = AgentDeviceRequestOverrides & {
296
+ steps: BatchStep[];
297
+ onError?: 'stop';
298
+ maxSteps?: number;
299
+ out?: string;
300
+ };
301
+
302
+ export declare type BatchStep = {
303
+ command: string;
304
+ positionals?: string[];
305
+ flags?: Record<string, unknown>;
306
+ };
307
+
308
+ declare type BatchStep_2 = {
203
309
  command: string;
204
310
  positionals?: string[];
205
311
  flags?: Partial<CommandFlags>;
206
312
  runtime?: unknown;
207
313
  };
208
314
 
209
- declare type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
315
+ export declare type CaptureDiffOptions = ClientCommandBaseOptions & Pick<CaptureSnapshotOptions, 'interactiveOnly' | 'compact' | 'depth' | 'scope' | 'raw'> & {
316
+ kind: 'snapshot';
317
+ out?: string;
318
+ };
319
+
320
+ export declare type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
210
321
  path?: string;
211
322
  overlayRefs?: boolean;
323
+ fullscreen?: boolean;
212
324
  };
213
325
 
214
- declare type CaptureScreenshotResult = {
326
+ export declare type CaptureScreenshotResult = {
215
327
  path: string;
216
328
  overlayRefs?: ScreenshotOverlayRef[];
217
329
  identifiers: AgentDeviceIdentifiers;
218
330
  };
219
331
 
220
- declare type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
332
+ export declare type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
221
333
  interactiveOnly?: boolean;
222
334
  compact?: boolean;
223
335
  depth?: number;
@@ -225,7 +337,7 @@ declare type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceS
225
337
  raw?: boolean;
226
338
  };
227
339
 
228
- declare type CaptureSnapshotResult = {
340
+ export declare type CaptureSnapshotResult = {
229
341
  nodes: SnapshotNode[];
230
342
  truncated: boolean;
231
343
  appName?: string;
@@ -235,6 +347,12 @@ declare type CaptureSnapshotResult = {
235
347
  identifiers: AgentDeviceIdentifiers;
236
348
  };
237
349
 
350
+ export declare type ClickOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions & {
351
+ button?: 'primary' | 'secondary' | 'middle';
352
+ };
353
+
354
+ declare type ClientCommandBaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions;
355
+
238
356
  declare type CliFlags = {
239
357
  json: boolean;
240
358
  config?: string;
@@ -339,10 +457,31 @@ declare type CliFlags = {
339
457
  version: boolean;
340
458
  };
341
459
 
460
+ export declare type ClipboardCommandOptions = (DeviceCommandBaseOptions & {
461
+ action: 'read';
462
+ }) | (DeviceCommandBaseOptions & {
463
+ action: 'write';
464
+ text: string;
465
+ });
466
+
467
+ export declare type ClipboardCommandResult = (DaemonResponseData & {
468
+ action: 'read';
469
+ text: string;
470
+ }) | (DaemonResponseData & {
471
+ action: 'write';
472
+ textLength: number;
473
+ });
474
+
475
+ declare type CommandActionResult<T extends string> = DaemonResponseData & {
476
+ action?: T;
477
+ };
478
+
342
479
  declare type CommandFlags = Omit<CliFlags, 'json' | 'help' | 'version' | 'batchSteps'> & {
343
- batchSteps?: BatchStep[];
480
+ batchSteps?: BatchStep_2[];
344
481
  };
345
482
 
483
+ export declare type CommandRequestResult = DaemonResponseData;
484
+
346
485
  export declare function createAgentDeviceClient(config?: AgentDeviceClientConfig, deps?: {
347
486
  transport?: AgentDeviceDaemonTransport;
348
487
  }): AgentDeviceClient;
@@ -424,13 +563,15 @@ declare type DaemonResponse = DaemonResponse_2;
424
563
 
425
564
  declare type DaemonResponse_2 = {
426
565
  ok: true;
427
- data?: DaemonResponseData;
566
+ data?: DaemonResponseData_2;
428
567
  } | {
429
568
  ok: false;
430
569
  error: DaemonError;
431
570
  };
432
571
 
433
- declare type DaemonResponseData = Record<string, unknown> & {
572
+ declare type DaemonResponseData = DaemonResponseData_2;
573
+
574
+ declare type DaemonResponseData_2 = Record<string, unknown> & {
434
575
  artifacts?: DaemonArtifact[];
435
576
  };
436
577
 
@@ -438,11 +579,19 @@ declare type DaemonServerMode = 'socket' | 'http' | 'dual';
438
579
 
439
580
  declare type DaemonTransportMode = 'auto' | 'socket' | 'http';
440
581
 
582
+ export declare type DeviceBootOptions = ClientCommandBaseOptions & {
583
+ headless?: boolean;
584
+ };
585
+
586
+ declare type DeviceCommandBaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions;
587
+
441
588
  declare type DeviceKind = 'simulator' | 'emulator' | 'device';
442
589
 
443
590
  declare type DeviceTarget = 'mobile' | 'tv' | 'desktop';
444
591
 
445
- declare type EnsureSimulatorOptions = AgentDeviceRequestOverrides & {
592
+ export declare type ElementTarget = RefTarget | SelectorTarget;
593
+
594
+ export declare type EnsureSimulatorOptions = AgentDeviceRequestOverrides & {
446
595
  device: string;
447
596
  runtime?: string;
448
597
  boot?: boolean;
@@ -450,7 +599,7 @@ declare type EnsureSimulatorOptions = AgentDeviceRequestOverrides & {
450
599
  iosSimulatorDeviceSet?: string;
451
600
  };
452
601
 
453
- declare type EnsureSimulatorResult = {
602
+ export declare type EnsureSimulatorResult = {
454
603
  udid: string;
455
604
  device: string;
456
605
  runtime: string;
@@ -462,13 +611,96 @@ declare type EnsureSimulatorResult = {
462
611
 
463
612
  declare type ErrorCode = 'INVALID_ARGS' | 'DEVICE_NOT_FOUND' | 'TOOL_MISSING' | 'APP_NOT_INSTALLED' | 'UNSUPPORTED_PLATFORM' | 'UNSUPPORTED_OPERATION' | 'COMMAND_FAILED' | 'SESSION_NOT_FOUND' | 'UNAUTHORIZED' | 'UNKNOWN';
464
613
 
614
+ export declare type FillOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & {
615
+ text: string;
616
+ delayMs?: number;
617
+ };
618
+
619
+ declare type FindBaseOptions = ClientCommandBaseOptions & FindSnapshotCommandOptions & {
620
+ locator?: FindLocator;
621
+ query: string;
622
+ first?: boolean;
623
+ last?: boolean;
624
+ };
625
+
626
+ export declare type FindLocator = 'any' | 'text' | 'label' | 'value' | 'role' | 'id';
627
+
628
+ export declare type FindOptions = (FindBaseOptions & {
629
+ action?: 'click' | 'focus' | 'exists' | 'getText' | 'getAttrs';
630
+ }) | (FindBaseOptions & {
631
+ action: 'wait';
632
+ timeoutMs?: number;
633
+ }) | (FindBaseOptions & {
634
+ action: 'fill' | 'type';
635
+ value: string;
636
+ });
637
+
638
+ declare type FindSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'raw'>;
639
+
640
+ declare type FocusOptions_2 = ClientCommandBaseOptions & {
641
+ x: number;
642
+ y: number;
643
+ };
644
+ export { FocusOptions_2 as FocusOptions }
645
+
646
+ export declare type GetOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & ElementTarget & {
647
+ format: 'text' | 'attrs';
648
+ };
649
+
650
+ export declare type HomeCommandOptions = DeviceCommandBaseOptions;
651
+
652
+ export declare type HomeCommandResult = CommandActionResult<'home'>;
653
+
654
+ export declare type InteractionTarget = PointTarget | RefTarget | SelectorTarget;
655
+
656
+ export declare type IsOptions = IsTextPredicateOptions | IsStatePredicateOptions;
657
+
658
+ declare type IsStatePredicateOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & {
659
+ predicate: 'visible' | 'hidden' | 'exists' | 'editable' | 'selected';
660
+ selector: string;
661
+ value?: never;
662
+ };
663
+
664
+ declare type IsTextPredicateOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & {
665
+ predicate: 'text';
666
+ selector: string;
667
+ value: string;
668
+ };
669
+
670
+ export declare type KeyboardCommandOptions = DeviceCommandBaseOptions & {
671
+ action?: 'status' | 'dismiss';
672
+ };
673
+
674
+ export declare type KeyboardCommandResult = DaemonResponseData & {
675
+ platform?: 'android' | 'ios';
676
+ action?: 'status' | 'dismiss';
677
+ visible?: boolean;
678
+ inputType?: string | null;
679
+ type?: string | null;
680
+ wasVisible?: boolean;
681
+ dismissed?: boolean;
682
+ attempts?: number;
683
+ };
684
+
465
685
  declare type LeaseBackend = 'ios-simulator' | 'ios-instance' | 'android-instance';
466
686
 
467
- declare type MaterializationReleaseOptions = AgentDeviceRequestOverrides & {
687
+ export declare type LogsOptions = AgentDeviceRequestOverrides & {
688
+ action?: 'path' | 'start' | 'stop' | 'doctor' | 'mark' | 'clear';
689
+ message?: string;
690
+ restart?: boolean;
691
+ };
692
+
693
+ export declare type LongPressOptions = ClientCommandBaseOptions & {
694
+ x: number;
695
+ y: number;
696
+ durationMs?: number;
697
+ };
698
+
699
+ export declare type MaterializationReleaseOptions = AgentDeviceRequestOverrides & {
468
700
  materializationId: string;
469
701
  };
470
702
 
471
- declare type MaterializationReleaseResult = {
703
+ export declare type MaterializationReleaseResult = {
472
704
  released: boolean;
473
705
  materializationId: string;
474
706
  identifiers: AgentDeviceIdentifiers;
@@ -506,7 +738,7 @@ declare type MetroBridgeResult = {
506
738
 
507
739
  declare type MetroPrepareKind = 'auto' | 'react-native' | 'expo';
508
740
 
509
- declare type MetroPrepareOptions = {
741
+ export declare type MetroPrepareOptions = {
510
742
  projectRoot?: string;
511
743
  kind?: MetroPrepareKind;
512
744
  publicBaseUrl: string;
@@ -526,18 +758,42 @@ declare type MetroPrepareOptions = {
526
758
  logPath?: string;
527
759
  };
528
760
 
529
- declare type MetroPrepareResult = PrepareMetroRuntimeResult;
761
+ export declare type MetroPrepareResult = PrepareMetroRuntimeResult;
530
762
 
531
763
  /** Re-export of {@link SessionRuntimeHints} under the Metro-specific alias used by public API consumers. */
532
764
  declare type MetroRuntimeHints = SessionRuntimeHints_2;
533
765
 
766
+ export declare type NetworkOptions = AgentDeviceRequestOverrides & {
767
+ action?: 'dump' | 'log';
768
+ limit?: number;
769
+ include?: 'summary' | 'headers' | 'body' | 'all';
770
+ };
771
+
772
+ export declare type PerfOptions = ClientCommandBaseOptions;
773
+
774
+ 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';
775
+
776
+ export declare type PinchOptions = ClientCommandBaseOptions & {
777
+ scale: number;
778
+ x?: number;
779
+ y?: number;
780
+ };
781
+
534
782
  declare type Platform = ApplePlatform | 'android' | 'linux';
535
783
 
536
784
  declare type PlatformSelector = Platform | 'apple';
537
785
 
538
- declare type Point = {
786
+ export declare type Point = {
787
+ x: number;
788
+ y: number;
789
+ };
790
+
791
+ declare type PointTarget = {
539
792
  x: number;
540
793
  y: number;
794
+ ref?: never;
795
+ selector?: never;
796
+ label?: never;
541
797
  };
542
798
 
543
799
  declare type PrepareMetroRuntimeResult = {
@@ -556,6 +812,8 @@ declare type PrepareMetroRuntimeResult = {
556
812
  bridge: MetroBridgeResult | null;
557
813
  };
558
814
 
815
+ export declare type PressOptions = ClientCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions;
816
+
559
817
  declare type RawSnapshotNode = {
560
818
  index: number;
561
819
  type?: string;
@@ -579,16 +837,62 @@ declare type RawSnapshotNode = {
579
837
  hiddenContentBelow?: boolean;
580
838
  };
581
839
 
582
- declare type Rect = {
840
+ export declare type RecordOptions = AgentDeviceRequestOverrides & {
841
+ action: 'start' | 'stop';
842
+ path?: string;
843
+ fps?: number;
844
+ hideTouches?: boolean;
845
+ };
846
+
847
+ export declare type Rect = {
583
848
  x: number;
584
849
  y: number;
585
850
  width: number;
586
851
  height: number;
587
852
  };
588
853
 
854
+ declare type RefTarget = {
855
+ ref: string;
856
+ label?: string;
857
+ x?: never;
858
+ y?: never;
859
+ selector?: never;
860
+ };
861
+
862
+ declare type RepeatedPressOptions = {
863
+ count?: number;
864
+ intervalMs?: number;
865
+ holdMs?: number;
866
+ jitterPx?: number;
867
+ doubleTap?: boolean;
868
+ };
869
+
870
+ export declare type ReplayRunOptions = AgentDeviceRequestOverrides & {
871
+ path: string;
872
+ update?: boolean;
873
+ };
874
+
875
+ export declare type ReplayTestOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
876
+ paths: string[];
877
+ update?: boolean;
878
+ failFast?: boolean;
879
+ timeoutMs?: number;
880
+ retries?: number;
881
+ artifactsDir?: string;
882
+ reportJunit?: string;
883
+ };
884
+
589
885
  declare type ResolvedMetroKind = Exclude<MetroPrepareKind, 'auto'>;
590
886
 
591
- declare type ScreenshotOverlayRef = {
887
+ export declare type RotateCommandOptions = DeviceCommandBaseOptions & {
888
+ orientation: 'portrait' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right';
889
+ };
890
+
891
+ export declare type RotateCommandResult = CommandActionResult<'rotate'> & {
892
+ orientation?: RotateCommandOptions['orientation'];
893
+ };
894
+
895
+ export declare type ScreenshotOverlayRef = {
592
896
  ref: string;
593
897
  label?: string;
594
898
  rect: Rect;
@@ -596,7 +900,37 @@ declare type ScreenshotOverlayRef = {
596
900
  center: Point;
597
901
  };
598
902
 
599
- declare type SessionCloseResult = {
903
+ declare type ScrollIntoViewOptions_2 = ClientCommandBaseOptions & ({
904
+ text: string;
905
+ ref?: never;
906
+ label?: never;
907
+ } | {
908
+ ref: string;
909
+ label?: string;
910
+ text?: never;
911
+ }) & {
912
+ maxScrolls?: number;
913
+ };
914
+ export { ScrollIntoViewOptions_2 as ScrollIntoViewOptions }
915
+
916
+ declare type ScrollOptions_2 = ClientCommandBaseOptions & {
917
+ direction: 'up' | 'down' | 'left' | 'right';
918
+ amount?: number;
919
+ pixels?: number;
920
+ };
921
+ export { ScrollOptions_2 as ScrollOptions }
922
+
923
+ declare type SelectorSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'scope' | 'raw'>;
924
+
925
+ declare type SelectorTarget = {
926
+ selector: string;
927
+ x?: never;
928
+ y?: never;
929
+ ref?: never;
930
+ label?: never;
931
+ };
932
+
933
+ export declare type SessionCloseResult = {
600
934
  session: string;
601
935
  shutdown?: Record<string, unknown>;
602
936
  identifiers: AgentDeviceIdentifiers;
@@ -614,20 +948,39 @@ declare type SessionRuntimeHints_2 = {
614
948
  launchUrl?: string;
615
949
  };
616
950
 
617
- declare type SnapshotNode = RawSnapshotNode & {
951
+ export declare type SettingsUpdateOptions = (ClientCommandBaseOptions & {
952
+ setting: 'wifi' | 'airplane' | 'location';
953
+ state: 'on' | 'off';
954
+ }) | (ClientCommandBaseOptions & {
955
+ setting: 'appearance';
956
+ state: 'light' | 'dark' | 'toggle';
957
+ }) | (ClientCommandBaseOptions & {
958
+ setting: 'faceid' | 'touchid';
959
+ state: 'match' | 'nonmatch' | 'enroll' | 'unenroll';
960
+ }) | (ClientCommandBaseOptions & {
961
+ setting: 'fingerprint';
962
+ state: 'match' | 'nonmatch';
963
+ }) | (ClientCommandBaseOptions & {
964
+ setting: 'permission';
965
+ state: 'grant' | 'deny' | 'reset';
966
+ permission: PermissionTarget;
967
+ mode?: 'full' | 'limited';
968
+ });
969
+
970
+ export declare type SnapshotNode = RawSnapshotNode & {
618
971
  ref: string;
619
972
  };
620
973
 
621
- declare type SnapshotVisibility = {
974
+ export declare type SnapshotVisibility = {
622
975
  partial: boolean;
623
976
  visibleNodeCount: number;
624
977
  totalNodeCount: number;
625
978
  reasons: SnapshotVisibilityReason[];
626
979
  };
627
980
 
628
- declare type SnapshotVisibilityReason = 'offscreen-nodes' | 'scroll-hidden-above' | 'scroll-hidden-below';
981
+ export declare type SnapshotVisibilityReason = 'offscreen-nodes' | 'scroll-hidden-above' | 'scroll-hidden-below';
629
982
 
630
- declare type StartupPerfSample = {
983
+ export declare type StartupPerfSample = {
631
984
  durationMs: number;
632
985
  measuredAt: string;
633
986
  method: string;
@@ -635,4 +988,65 @@ declare type StartupPerfSample = {
635
988
  appBundleId?: string;
636
989
  };
637
990
 
991
+ export declare type SwipeOptions = ClientCommandBaseOptions & {
992
+ from: {
993
+ x: number;
994
+ y: number;
995
+ };
996
+ to: {
997
+ x: number;
998
+ y: number;
999
+ };
1000
+ durationMs?: number;
1001
+ count?: number;
1002
+ pauseMs?: number;
1003
+ pattern?: 'one-way' | 'ping-pong';
1004
+ };
1005
+
1006
+ export declare type TraceOptions = AgentDeviceRequestOverrides & {
1007
+ action: 'start' | 'stop';
1008
+ path?: string;
1009
+ };
1010
+
1011
+ export declare type TypeTextOptions = ClientCommandBaseOptions & {
1012
+ text: string;
1013
+ delayMs?: number;
1014
+ };
1015
+
1016
+ export declare type WaitCommandOptions = DeviceCommandBaseOptions & WaitCommandTarget;
1017
+
1018
+ export declare type WaitCommandResult = DaemonResponseData & {
1019
+ waitedMs?: number;
1020
+ text?: string;
1021
+ selector?: string;
1022
+ };
1023
+
1024
+ declare type WaitCommandTarget = {
1025
+ durationMs: number;
1026
+ text?: never;
1027
+ ref?: never;
1028
+ selector?: never;
1029
+ timeoutMs?: never;
1030
+ } | (WaitSnapshotOptions & {
1031
+ text: string;
1032
+ durationMs?: never;
1033
+ ref?: never;
1034
+ selector?: never;
1035
+ timeoutMs?: number;
1036
+ }) | (WaitSnapshotOptions & {
1037
+ ref: string;
1038
+ durationMs?: never;
1039
+ text?: never;
1040
+ selector?: never;
1041
+ timeoutMs?: number;
1042
+ }) | (WaitSnapshotOptions & {
1043
+ selector: string;
1044
+ durationMs?: never;
1045
+ text?: never;
1046
+ ref?: never;
1047
+ timeoutMs?: number;
1048
+ });
1049
+
1050
+ declare type WaitSnapshotOptions = Pick<CaptureSnapshotOptions, 'depth' | 'scope' | 'raw'>;
1051
+
638
1052
  export { }