agent-device 0.11.14 → 0.11.16

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