agent-device 0.13.1 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/bin/agent-device.mjs +6 -2
  2. package/dist/src/113.js +1 -1
  3. package/dist/src/1974.js +2 -2
  4. package/dist/src/2301.js +1 -0
  5. package/dist/src/3918.js +29 -29
  6. package/dist/src/7847.js +1 -1
  7. package/dist/src/8161.js +3 -0
  8. package/dist/src/8656.js +1 -1
  9. package/dist/src/9152.js +1 -1
  10. package/dist/src/940.js +1 -0
  11. package/dist/src/9542.js +2 -2
  12. package/dist/src/index.d.ts +168 -1925
  13. package/dist/src/index.js +1 -1
  14. package/dist/src/internal/bin.js +105 -0
  15. package/dist/src/internal/companion-tunnel.js +1 -0
  16. package/dist/src/{daemon.js → internal/daemon.js} +10 -10
  17. package/dist/src/internal/update-check-entry.js +1 -0
  18. package/dist/src/metro.d.ts +7 -5
  19. package/dist/src/metro.js +1 -1
  20. package/dist/src/selectors.js +1 -1
  21. package/package.json +1 -13
  22. package/skills/agent-device/references/remote-tenancy.md +6 -7
  23. package/dist/src/320.js +0 -1
  24. package/dist/src/8564.js +0 -3
  25. package/dist/src/9076.js +0 -1
  26. package/dist/src/backend.d.ts +0 -527
  27. package/dist/src/backend.js +0 -1
  28. package/dist/src/bin.js +0 -97
  29. package/dist/src/commands/index.d.ts +0 -1883
  30. package/dist/src/commands/index.js +0 -1
  31. package/dist/src/metro-companion.js +0 -1
  32. package/dist/src/testing/conformance.d.ts +0 -753
  33. package/dist/src/testing/conformance.js +0 -1
  34. package/dist/src/update-check-entry.js +0 -1
  35. /package/dist/src/{bin.d.ts → internal/bin.d.ts} +0 -0
  36. /package/dist/src/{daemon.d.ts → internal/companion-tunnel.d.ts} +0 -0
  37. /package/dist/src/{metro-companion.d.ts → internal/daemon.d.ts} +0 -0
  38. /package/dist/src/{update-check-entry.d.ts → internal/update-check-entry.d.ts} +0 -0
@@ -1,1883 +0,0 @@
1
- export declare type AdminBootCommandOptions = CommandContext & {
2
- target?: BackendDeviceTarget;
3
- };
4
-
5
- export declare type AdminBootCommandResult = {
6
- kind: 'deviceBooted';
7
- target?: BackendDeviceTarget;
8
- backendResult?: Record<string, unknown>;
9
- message?: string;
10
- };
11
-
12
- export declare type AdminDevicesCommandOptions = CommandContext & {
13
- filter?: BackendDeviceFilter;
14
- };
15
-
16
- export declare type AdminDevicesCommandResult = {
17
- kind: 'adminDevices';
18
- devices: readonly BackendDeviceInfo[];
19
- };
20
-
21
- export declare type AdminEnsureSimulatorCommandOptions = CommandContext & BackendEnsureSimulatorOptions;
22
-
23
- export declare type AdminEnsureSimulatorCommandResult = {
24
- kind: 'simulatorEnsured';
25
- } & BackendEnsureSimulatorResult;
26
-
27
- export declare type AdminInstallCommandOptions = CommandContext & {
28
- app: string;
29
- source: BackendInstallSource;
30
- };
31
-
32
- export declare type AdminInstallCommandResult = {
33
- kind: 'appInstalled' | 'appReinstalled' | 'appInstalledFromSource';
34
- app?: string;
35
- source: BackendInstallSource;
36
- appId?: string;
37
- appName?: string;
38
- bundleId?: string;
39
- packageName?: string;
40
- launchTarget?: string;
41
- installablePath?: string;
42
- archivePath?: string;
43
- backendResult?: Record<string, unknown>;
44
- message?: string;
45
- };
46
-
47
- export declare type AdminInstallFromSourceCommandOptions = CommandContext & {
48
- app?: string;
49
- source: BackendInstallSource;
50
- };
51
-
52
- export declare type AdminReinstallCommandOptions = AdminInstallCommandOptions;
53
-
54
- declare type AgentDeviceBackend = {
55
- platform: AgentDeviceBackendPlatform;
56
- capabilities?: BackendCapabilitySet;
57
- escapeHatches?: BackendEscapeHatches;
58
- captureSnapshot?(context: BackendCommandContext, options?: BackendSnapshotOptions): Promise<BackendSnapshotResult>;
59
- captureScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
60
- readText?(context: BackendCommandContext, node: SnapshotNode): Promise<BackendReadTextResult>;
61
- findText?(context: BackendCommandContext, text: string): Promise<BackendFindTextResult>;
62
- tap?(context: BackendCommandContext, point: Point, options?: BackendTapOptions): Promise<BackendActionResult>;
63
- fill?(context: BackendCommandContext, point: Point, text: string, options?: BackendFillOptions): Promise<BackendActionResult>;
64
- typeText?(context: BackendCommandContext, text: string, options?: {
65
- delayMs?: number;
66
- }): Promise<BackendActionResult>;
67
- focus?(context: BackendCommandContext, point: Point): Promise<BackendActionResult>;
68
- longPress?(context: BackendCommandContext, point: Point, options?: BackendLongPressOptions): Promise<BackendActionResult>;
69
- swipe?(context: BackendCommandContext, from: Point, to: Point, options?: BackendSwipeOptions): Promise<BackendActionResult>;
70
- scroll?(context: BackendCommandContext, target: BackendScrollTarget, options: BackendScrollOptions): Promise<BackendActionResult>;
71
- pinch?(context: BackendCommandContext, options: BackendPinchOptions): Promise<BackendActionResult>;
72
- pressKey?(context: BackendCommandContext, key: string, options?: {
73
- modifiers?: string[];
74
- }): Promise<BackendActionResult>;
75
- pressBack?(context: BackendCommandContext, options?: BackendBackOptions): Promise<BackendActionResult>;
76
- pressHome?(context: BackendCommandContext): Promise<BackendActionResult>;
77
- rotate?(context: BackendCommandContext, orientation: BackendDeviceOrientation): Promise<BackendActionResult>;
78
- setKeyboard?(context: BackendCommandContext, options: BackendKeyboardOptions): Promise<BackendKeyboardResult | BackendActionResult>;
79
- getClipboard?(context: BackendCommandContext): Promise<string | BackendClipboardTextResult>;
80
- setClipboard?(context: BackendCommandContext, text: string): Promise<BackendActionResult>;
81
- openSettings?(context: BackendCommandContext, target?: string): Promise<BackendActionResult>;
82
- handleAlert?(context: BackendCommandContext, action: BackendAlertAction, options?: {
83
- timeoutMs?: number;
84
- }): Promise<BackendAlertResult>;
85
- openAppSwitcher?(context: BackendCommandContext): Promise<BackendActionResult>;
86
- openApp?(context: BackendCommandContext, target: BackendOpenTarget, options?: BackendOpenOptions): Promise<BackendActionResult>;
87
- closeApp?(context: BackendCommandContext, app?: string): Promise<BackendActionResult>;
88
- listApps?(context: BackendCommandContext, filter?: BackendAppListFilter): Promise<readonly BackendAppInfo[]>;
89
- getAppState?(context: BackendCommandContext, app: string): Promise<BackendAppState>;
90
- pushFile?(context: BackendCommandContext, input: BackendPushInput, target: string): Promise<BackendActionResult>;
91
- triggerAppEvent?(context: BackendCommandContext, event: BackendAppEvent): Promise<BackendActionResult>;
92
- listDevices?(context: BackendCommandContext, filter?: BackendDeviceFilter): Promise<readonly BackendDeviceInfo[]>;
93
- bootDevice?(context: BackendCommandContext, target?: BackendDeviceTarget): Promise<BackendActionResult>;
94
- ensureSimulator?(context: BackendCommandContext, options: BackendEnsureSimulatorOptions): Promise<BackendEnsureSimulatorResult>;
95
- resolveInstallSource?(context: BackendCommandContext, source: BackendInstallSource): Promise<BackendInstallSource>;
96
- installApp?(context: BackendCommandContext, target: BackendInstallTarget): Promise<BackendInstallResult>;
97
- reinstallApp?(context: BackendCommandContext, target: BackendInstallTarget): Promise<BackendInstallResult>;
98
- startRecording?(context: BackendCommandContext, options?: BackendRecordingOptions): Promise<BackendRecordingResult>;
99
- stopRecording?(context: BackendCommandContext, options?: BackendRecordingOptions): Promise<BackendRecordingResult>;
100
- startTrace?(context: BackendCommandContext, options?: BackendTraceOptions): Promise<BackendTraceResult>;
101
- stopTrace?(context: BackendCommandContext, options?: BackendTraceOptions): Promise<BackendTraceResult>;
102
- readLogs?(context: BackendCommandContext, options?: BackendReadLogsOptions): Promise<BackendReadLogsResult>;
103
- dumpNetwork?(context: BackendCommandContext, options?: BackendDumpNetworkOptions): Promise<BackendDumpNetworkResult>;
104
- measurePerf?(context: BackendCommandContext, options?: BackendMeasurePerfOptions): Promise<BackendMeasurePerfResult>;
105
- };
106
-
107
- declare type AgentDeviceBackendPlatform = 'ios' | 'android' | 'macos' | 'linux';
108
-
109
- export declare type AgentDeviceCommands = {
110
- capture: {
111
- screenshot: RuntimeCommand<ScreenshotCommandOptions, ScreenshotCommandResult>;
112
- diffScreenshot: RuntimeCommand<DiffScreenshotCommandOptions, DiffScreenshotCommandResult>;
113
- snapshot: RuntimeCommand<SnapshotCommandOptions, SnapshotCommandResult>;
114
- diffSnapshot: RuntimeCommand<DiffSnapshotCommandOptions, DiffSnapshotCommandResult>;
115
- };
116
- selectors: {
117
- find: RuntimeCommand<FindReadCommandOptions, FindReadCommandResult>;
118
- get: RuntimeCommand<GetCommandOptions, GetCommandResult>;
119
- getText: RuntimeCommand<GetTextCommandOptions, Extract<GetCommandResult, {
120
- kind: 'text';
121
- }>>;
122
- getAttrs: RuntimeCommand<GetAttrsCommandOptions, Extract<GetCommandResult, {
123
- kind: 'attrs';
124
- }>>;
125
- is: RuntimeCommand<IsCommandOptions, IsCommandResult>;
126
- isVisible: RuntimeCommand<IsSelectorCommandOptions, IsCommandResult>;
127
- isHidden: RuntimeCommand<IsSelectorCommandOptions, IsCommandResult>;
128
- wait: RuntimeCommand<WaitCommandOptions, WaitCommandResult>;
129
- waitForText: RuntimeCommand<WaitForTextCommandOptions, Extract<WaitCommandResult, {
130
- kind: 'text';
131
- }>>;
132
- };
133
- interactions: {
134
- click: RuntimeCommand<ClickCommandOptions, PressCommandResult>;
135
- press: RuntimeCommand<PressCommandOptions, PressCommandResult>;
136
- fill: RuntimeCommand<FillCommandOptions, FillCommandResult>;
137
- typeText: RuntimeCommand<TypeTextCommandOptions, TypeTextCommandResult>;
138
- focus: RuntimeCommand<FocusCommandOptions, FocusCommandResult>;
139
- longPress: RuntimeCommand<LongPressCommandOptions, LongPressCommandResult>;
140
- swipe: RuntimeCommand<SwipeCommandOptions, SwipeCommandResult>;
141
- scroll: RuntimeCommand<ScrollCommandOptions, ScrollCommandResult>;
142
- pinch: RuntimeCommand<PinchCommandOptions, PinchCommandResult>;
143
- };
144
- system: {
145
- back: RuntimeCommand<SystemBackCommandOptions | undefined, SystemBackCommandResult>;
146
- home: RuntimeCommand<SystemHomeCommandOptions | undefined, SystemHomeCommandResult>;
147
- rotate: RuntimeCommand<SystemRotateCommandOptions, SystemRotateCommandResult>;
148
- keyboard: RuntimeCommand<SystemKeyboardCommandOptions | undefined, SystemKeyboardCommandResult>;
149
- clipboard: RuntimeCommand<SystemClipboardCommandOptions, SystemClipboardCommandResult>;
150
- settings: RuntimeCommand<SystemSettingsCommandOptions | undefined, SystemSettingsCommandResult>;
151
- alert: RuntimeCommand<SystemAlertCommandOptions | undefined, SystemAlertCommandResult>;
152
- appSwitcher: RuntimeCommand<SystemAppSwitcherCommandOptions | undefined, SystemAppSwitcherCommandResult>;
153
- };
154
- apps: {
155
- open: RuntimeCommand<OpenAppCommandOptions, OpenAppCommandResult>;
156
- close: RuntimeCommand<CloseAppCommandOptions | undefined, CloseAppCommandResult>;
157
- list: RuntimeCommand<ListAppsCommandOptions | undefined, ListAppsCommandResult>;
158
- state: RuntimeCommand<GetAppStateCommandOptions, GetAppStateCommandResult>;
159
- push: RuntimeCommand<PushAppCommandOptions, PushAppCommandResult>;
160
- triggerEvent: RuntimeCommand<TriggerAppEventCommandOptions, TriggerAppEventCommandResult>;
161
- };
162
- admin: {
163
- devices: RuntimeCommand<AdminDevicesCommandOptions | undefined, AdminDevicesCommandResult>;
164
- boot: RuntimeCommand<AdminBootCommandOptions | undefined, AdminBootCommandResult>;
165
- ensureSimulator: RuntimeCommand<AdminEnsureSimulatorCommandOptions, AdminEnsureSimulatorCommandResult>;
166
- install: RuntimeCommand<AdminInstallCommandOptions, AdminInstallCommandResult>;
167
- reinstall: RuntimeCommand<AdminReinstallCommandOptions, AdminInstallCommandResult>;
168
- installFromSource: RuntimeCommand<AdminInstallFromSourceCommandOptions, AdminInstallCommandResult>;
169
- };
170
- recording: {
171
- record: RuntimeCommand<RecordingRecordCommandOptions, RecordingRecordCommandResult>;
172
- trace: RuntimeCommand<RecordingTraceCommandOptions, RecordingTraceCommandResult>;
173
- };
174
- diagnostics: {
175
- logs: RuntimeCommand<DiagnosticsLogsCommandOptions | undefined, DiagnosticsLogsCommandResult>;
176
- network: RuntimeCommand<DiagnosticsNetworkCommandOptions | undefined, DiagnosticsNetworkCommandResult>;
177
- perf: RuntimeCommand<DiagnosticsPerfCommandOptions | undefined, DiagnosticsPerfCommandResult>;
178
- };
179
- };
180
-
181
- declare type AgentDeviceRuntime = {
182
- backend: AgentDeviceBackend;
183
- artifacts: ArtifactAdapter;
184
- sessions: CommandSessionStore;
185
- policy: CommandPolicy;
186
- diagnostics?: DiagnosticsSink;
187
- clock?: CommandClock;
188
- signal?: AbortSignal;
189
- };
190
-
191
- export declare type AppPushInput = {
192
- kind: 'json';
193
- payload: Record<string, unknown>;
194
- } | FileInputRef;
195
-
196
- declare type ArtifactAdapter = {
197
- resolveInput(ref: FileInputRef, options: ResolveInputOptions): Promise<ResolvedInputFile>;
198
- reserveOutput(ref: FileOutputRef | undefined, options: ReserveOutputOptions): Promise<ReservedOutputFile>;
199
- createTempFile(options: CreateTempFileOptions): Promise<TemporaryFile>;
200
- };
201
-
202
- declare type ArtifactDescriptor = {
203
- kind: 'localPath';
204
- field: string;
205
- path: string;
206
- fileName?: string;
207
- metadata?: Record<string, unknown>;
208
- } | {
209
- kind: 'artifact';
210
- field: string;
211
- artifactId: string;
212
- fileName?: string;
213
- url?: string;
214
- clientPath?: string;
215
- metadata?: Record<string, unknown>;
216
- };
217
-
218
- declare const BACKEND_CAPABILITY_NAMES: readonly ["android.shell", "ios.runnerCommand", "macos.desktopScreenshot"];
219
-
220
- declare type BackendActionResult = Record<string, unknown> | void;
221
-
222
- declare type BackendAlertAction = 'get' | 'accept' | 'dismiss' | 'wait';
223
-
224
- declare type BackendAlertInfo = {
225
- title?: string;
226
- message?: string;
227
- buttons?: string[];
228
- };
229
-
230
- declare type BackendAlertResult = {
231
- kind: 'alertStatus';
232
- alert: BackendAlertInfo | null;
233
- } | {
234
- kind: 'alertHandled';
235
- handled: boolean;
236
- alert?: BackendAlertInfo;
237
- button?: string;
238
- } | {
239
- kind: 'alertWait';
240
- alert: BackendAlertInfo | null;
241
- waitedMs?: number;
242
- timedOut?: boolean;
243
- };
244
-
245
- declare type BackendAppEvent = {
246
- name: string;
247
- payload?: Record<string, unknown>;
248
- };
249
-
250
- declare type BackendAppInfo = {
251
- id: string;
252
- name?: string;
253
- bundleId?: string;
254
- packageName?: string;
255
- activity?: string;
256
- };
257
-
258
- declare type BackendAppListFilter = 'all' | 'user-installed';
259
-
260
- declare type BackendAppState = {
261
- appId?: string;
262
- bundleId?: string;
263
- packageName?: string;
264
- activity?: string;
265
- state?: 'unknown' | 'notRunning' | 'running' | 'foreground' | 'background';
266
- details?: Record<string, unknown>;
267
- };
268
-
269
- declare type BackendBackOptions = {
270
- mode?: 'in-app' | 'system';
271
- };
272
-
273
- declare type BackendCapabilityName = (typeof BACKEND_CAPABILITY_NAMES)[number];
274
-
275
- declare type BackendCapabilitySet = readonly BackendCapabilityName[];
276
-
277
- declare type BackendClipboardTextResult = {
278
- text: string;
279
- };
280
-
281
- declare type BackendCommandContext = {
282
- session?: string;
283
- requestId?: string;
284
- appId?: string;
285
- appBundleId?: string;
286
- signal?: AbortSignal;
287
- metadata?: Record<string, unknown>;
288
- };
289
-
290
- declare type BackendDeviceFilter = {
291
- platform?: AgentDeviceBackendPlatform | 'apple';
292
- target?: 'mobile' | 'tv' | 'desktop';
293
- kind?: 'simulator' | 'emulator' | 'device' | 'desktop';
294
- };
295
-
296
- declare type BackendDeviceInfo = {
297
- id: string;
298
- name: string;
299
- platform: AgentDeviceBackendPlatform;
300
- target?: 'mobile' | 'tv' | 'desktop';
301
- kind?: 'simulator' | 'emulator' | 'device' | 'desktop';
302
- booted?: boolean;
303
- details?: Record<string, unknown>;
304
- };
305
-
306
- declare type BackendDeviceOrientation = 'portrait' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right';
307
-
308
- declare type BackendDeviceTarget = {
309
- id?: string;
310
- name?: string;
311
- platform?: AgentDeviceBackendPlatform;
312
- target?: 'mobile' | 'tv' | 'desktop';
313
- headless?: boolean;
314
- };
315
-
316
- declare type BackendDiagnosticsPageOptions = BackendDiagnosticsTimeWindow & {
317
- cursor?: string;
318
- limit?: number;
319
- };
320
-
321
- declare type BackendDiagnosticsTimeWindow = {
322
- since?: string;
323
- until?: string;
324
- };
325
-
326
- declare type BackendDumpNetworkOptions = BackendDiagnosticsPageOptions & {
327
- include?: BackendNetworkIncludeMode;
328
- };
329
-
330
- declare type BackendDumpNetworkResult = {
331
- entries: readonly BackendNetworkEntry[];
332
- nextCursor?: string;
333
- timeWindow?: BackendDiagnosticsTimeWindow;
334
- backend?: string;
335
- redacted?: boolean;
336
- notes?: readonly string[];
337
- };
338
-
339
- declare type BackendEnsureSimulatorOptions = {
340
- device: string;
341
- runtime?: string;
342
- boot?: boolean;
343
- reuseExisting?: boolean;
344
- };
345
-
346
- declare type BackendEnsureSimulatorResult = {
347
- udid: string;
348
- device: string;
349
- runtime: string;
350
- created: boolean;
351
- booted: boolean;
352
- simulatorSetPath?: string | null;
353
- };
354
-
355
- declare type BackendEscapeHatches = {
356
- androidShell?(context: BackendCommandContext, args: readonly string[]): Promise<BackendShellResult>;
357
- iosRunnerCommand?(context: BackendCommandContext, command: BackendRunnerCommand): Promise<BackendActionResult>;
358
- macosDesktopScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
359
- };
360
-
361
- declare type BackendFillOptions = {
362
- delayMs?: number;
363
- };
364
-
365
- declare type BackendFindTextResult = {
366
- found: boolean;
367
- };
368
-
369
- declare type BackendInstallResult = Record<string, unknown> & {
370
- appId?: string;
371
- appName?: string;
372
- bundleId?: string;
373
- packageName?: string;
374
- launchTarget?: string;
375
- installablePath?: string;
376
- archivePath?: string;
377
- };
378
-
379
- declare type BackendInstallSource = {
380
- kind: 'path';
381
- path: string;
382
- } | {
383
- kind: 'uploadedArtifact';
384
- id: string;
385
- } | {
386
- kind: 'url';
387
- url: string;
388
- };
389
-
390
- declare type BackendInstallTarget = {
391
- app?: string;
392
- source: BackendInstallSource;
393
- };
394
-
395
- declare type BackendKeyboardOptions = {
396
- action: 'status' | 'get' | 'dismiss';
397
- };
398
-
399
- declare type BackendKeyboardResult = {
400
- platform?: 'android' | 'ios' | 'macos' | 'linux';
401
- action?: BackendKeyboardOptions['action'];
402
- visible?: boolean;
403
- inputType?: string | null;
404
- type?: string | null;
405
- wasVisible?: boolean;
406
- dismissed?: boolean;
407
- attempts?: number;
408
- };
409
-
410
- declare type BackendLogEntry = {
411
- timestamp?: string;
412
- level?: 'debug' | 'info' | 'warn' | 'error' | string;
413
- message: string;
414
- source?: string;
415
- metadata?: Record<string, unknown>;
416
- };
417
-
418
- declare type BackendLongPressOptions = {
419
- durationMs?: number;
420
- };
421
-
422
- declare type BackendMeasurePerfOptions = BackendDiagnosticsTimeWindow & {
423
- sampleMs?: number;
424
- metrics?: readonly string[];
425
- };
426
-
427
- declare type BackendMeasurePerfResult = {
428
- metrics: readonly BackendPerfMetric[];
429
- startedAt?: string;
430
- endedAt?: string;
431
- backend?: string;
432
- redacted?: boolean;
433
- notes?: readonly string[];
434
- };
435
-
436
- declare type BackendNetworkEntry = {
437
- timestamp?: string;
438
- method?: string;
439
- url?: string;
440
- status?: number;
441
- durationMs?: number;
442
- requestHeaders?: Record<string, string>;
443
- responseHeaders?: Record<string, string>;
444
- requestBody?: string;
445
- responseBody?: string;
446
- metadata?: Record<string, unknown>;
447
- };
448
-
449
- declare type BackendNetworkIncludeMode = 'summary' | 'headers' | 'body' | 'all';
450
-
451
- declare type BackendOpenOptions = {
452
- relaunch?: boolean;
453
- };
454
-
455
- declare type BackendOpenTarget = {
456
- /**
457
- * Generic app identifier accepted by the backend. Hosted adapters should
458
- * prefer structured appId, bundleId, or packageName when available.
459
- */
460
- app?: string;
461
- appId?: string;
462
- bundleId?: string;
463
- packageName?: string;
464
- /**
465
- * URL may be used by itself for a deep link or with an app identifier when
466
- * the backend supports opening a URL in a specific app context.
467
- */
468
- url?: string;
469
- /**
470
- * Platform-specific activity override, primarily for Android app launches.
471
- */
472
- activity?: string;
473
- };
474
-
475
- declare type BackendPerfMetric = {
476
- name: string;
477
- value?: number;
478
- unit?: string;
479
- status?: 'ok' | 'unavailable' | 'error';
480
- message?: string;
481
- metadata?: Record<string, unknown>;
482
- };
483
-
484
- declare type BackendPinchOptions = {
485
- scale: number;
486
- center?: Point;
487
- };
488
-
489
- declare type BackendPushInput = {
490
- kind: 'json';
491
- payload: Record<string, unknown>;
492
- } | {
493
- kind: 'file';
494
- path: string;
495
- };
496
-
497
- declare type BackendReadLogsOptions = BackendDiagnosticsPageOptions & {
498
- levels?: readonly string[];
499
- search?: string;
500
- source?: string;
501
- };
502
-
503
- declare type BackendReadLogsResult = {
504
- entries: readonly BackendLogEntry[];
505
- nextCursor?: string;
506
- timeWindow?: BackendDiagnosticsTimeWindow;
507
- backend?: string;
508
- redacted?: boolean;
509
- notes?: readonly string[];
510
- };
511
-
512
- declare type BackendReadTextResult = {
513
- text: string;
514
- };
515
-
516
- declare type BackendRecordingOptions = {
517
- outPath?: string;
518
- fps?: number;
519
- quality?: number;
520
- showTouches?: boolean;
521
- };
522
-
523
- declare type BackendRecordingResult = Record<string, unknown> & {
524
- path?: string;
525
- telemetryPath?: string;
526
- warning?: string;
527
- };
528
-
529
- declare type BackendRunnerCommand = {
530
- command: string;
531
- args?: readonly string[];
532
- payload?: Record<string, unknown>;
533
- };
534
-
535
- declare type BackendScreenshotOptions = {
536
- fullscreen?: boolean;
537
- overlayRefs?: boolean;
538
- surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
539
- };
540
-
541
- declare type BackendScreenshotResult = {
542
- path?: string;
543
- overlayRefs?: ScreenshotOverlayRef[];
544
- };
545
-
546
- declare type BackendScrollOptions = {
547
- direction: 'up' | 'down' | 'left' | 'right';
548
- amount?: number;
549
- pixels?: number;
550
- };
551
-
552
- declare type BackendScrollTarget = {
553
- kind: 'viewport';
554
- } | {
555
- kind: 'point';
556
- point: Point;
557
- };
558
-
559
- declare type BackendShellResult = {
560
- exitCode: number;
561
- stdout: string;
562
- stderr: string;
563
- };
564
-
565
- declare type BackendSnapshotAnalysis = {
566
- rawNodeCount?: number;
567
- maxDepth?: number;
568
- };
569
-
570
- declare type BackendSnapshotFreshness = {
571
- action: string;
572
- retryCount: number;
573
- staleAfterRetries: boolean;
574
- reason?: 'empty-interactive' | 'sharp-drop' | 'stuck-route';
575
- };
576
-
577
- declare type BackendSnapshotOptions = SnapshotOptions & {
578
- outPath?: string;
579
- };
580
-
581
- declare type BackendSnapshotResult = {
582
- nodes?: SnapshotNode[];
583
- truncated?: boolean;
584
- backend?: string;
585
- snapshot?: SnapshotState;
586
- analysis?: BackendSnapshotAnalysis;
587
- freshness?: BackendSnapshotFreshness;
588
- warnings?: string[];
589
- appName?: string;
590
- appBundleId?: string;
591
- };
592
-
593
- declare type BackendSwipeOptions = {
594
- durationMs?: number;
595
- };
596
-
597
- declare type BackendTapOptions = {
598
- button?: 'primary' | 'secondary' | 'middle';
599
- count?: number;
600
- intervalMs?: number;
601
- holdMs?: number;
602
- jitterPx?: number;
603
- doubleTap?: boolean;
604
- };
605
-
606
- declare type BackendTraceOptions = {
607
- outPath?: string;
608
- };
609
-
610
- declare type BackendTraceResult = Record<string, unknown> & {
611
- outPath?: string;
612
- };
613
-
614
- export declare type BatchCommandOptions<TContext = unknown> = CommandContext & {
615
- steps: readonly CommandRouterRequest<TContext>[];
616
- stopOnError?: boolean;
617
- maxSteps?: number;
618
- };
619
-
620
- export declare type BatchCommandResult = {
621
- kind: 'batch';
622
- total: number;
623
- executed: number;
624
- failed: number;
625
- totalDurationMs: number;
626
- results: readonly BatchCommandStepResult[];
627
- };
628
-
629
- export declare type BatchCommandStepResult = {
630
- step: number;
631
- command: string;
632
- ok: true;
633
- data: CommandRouterResult;
634
- durationMs: number;
635
- } | {
636
- step: number;
637
- command: string;
638
- ok: false;
639
- error: NormalizedError;
640
- durationMs: number;
641
- };
642
-
643
- export declare function bindCommands(runtime: AgentDeviceRuntime): BoundAgentDeviceCommands;
644
-
645
- export declare type BoundAgentDeviceCommands = {
646
- capture: {
647
- screenshot: BoundRuntimeCommand<ScreenshotCommandOptions, ScreenshotCommandResult>;
648
- diffScreenshot: BoundRuntimeCommand<DiffScreenshotCommandOptions, DiffScreenshotCommandResult>;
649
- snapshot: BoundRuntimeCommand<SnapshotCommandOptions, SnapshotCommandResult>;
650
- diffSnapshot: BoundRuntimeCommand<DiffSnapshotCommandOptions, DiffSnapshotCommandResult>;
651
- };
652
- selectors: {
653
- find: BoundRuntimeCommand<FindReadCommandOptions, FindReadCommandResult>;
654
- get: BoundRuntimeCommand<GetCommandOptions, GetCommandResult>;
655
- getText: (target: ElementTarget, options?: Omit<GetTextCommandOptions, 'target'>) => Promise<Extract<GetCommandResult, {
656
- kind: 'text';
657
- }>>;
658
- getAttrs: (target: ElementTarget, options?: Omit<GetAttrsCommandOptions, 'target'>) => Promise<Extract<GetCommandResult, {
659
- kind: 'attrs';
660
- }>>;
661
- is: BoundRuntimeCommand<IsCommandOptions, IsCommandResult>;
662
- isVisible: (target: SelectorTarget, options?: Omit<IsSelectorCommandOptions, 'target'>) => Promise<IsCommandResult>;
663
- isHidden: (target: SelectorTarget, options?: Omit<IsSelectorCommandOptions, 'target'>) => Promise<IsCommandResult>;
664
- wait: BoundRuntimeCommand<WaitCommandOptions, WaitCommandResult>;
665
- waitForText: (text: string, options?: Omit<WaitForTextCommandOptions, 'text'>) => Promise<Extract<WaitCommandResult, {
666
- kind: 'text';
667
- }>>;
668
- };
669
- interactions: {
670
- click: (target: InteractionTarget, options?: Omit<ClickCommandOptions, 'target'>) => Promise<PressCommandResult>;
671
- press: (target: InteractionTarget, options?: Omit<PressCommandOptions, 'target'>) => Promise<PressCommandResult>;
672
- fill: (target: InteractionTarget, text: string, options?: Omit<FillCommandOptions, 'target' | 'text'>) => Promise<FillCommandResult>;
673
- typeText: (text: string, options?: Omit<TypeTextCommandOptions, 'text'>) => Promise<TypeTextCommandResult>;
674
- focus: (target: InteractionTarget, options?: Omit<FocusCommandOptions, 'target'>) => Promise<FocusCommandResult>;
675
- longPress: (target: InteractionTarget, options?: Omit<LongPressCommandOptions, 'target'>) => Promise<LongPressCommandResult>;
676
- swipe: BoundRuntimeCommand<SwipeCommandOptions, SwipeCommandResult>;
677
- scroll: BoundRuntimeCommand<ScrollCommandOptions, ScrollCommandResult>;
678
- pinch: BoundRuntimeCommand<PinchCommandOptions, PinchCommandResult>;
679
- };
680
- system: {
681
- back: (options?: SystemBackCommandOptions) => Promise<SystemBackCommandResult>;
682
- home: (options?: SystemHomeCommandOptions) => Promise<SystemHomeCommandResult>;
683
- rotate: BoundRuntimeCommand<SystemRotateCommandOptions, SystemRotateCommandResult>;
684
- keyboard: (options?: SystemKeyboardCommandOptions) => Promise<SystemKeyboardCommandResult>;
685
- clipboard: BoundRuntimeCommand<SystemClipboardCommandOptions, SystemClipboardCommandResult>;
686
- settings: (options?: SystemSettingsCommandOptions) => Promise<SystemSettingsCommandResult>;
687
- alert: (options?: SystemAlertCommandOptions) => Promise<SystemAlertCommandResult>;
688
- appSwitcher: (options?: SystemAppSwitcherCommandOptions) => Promise<SystemAppSwitcherCommandResult>;
689
- };
690
- apps: {
691
- open: BoundRuntimeCommand<OpenAppCommandOptions, OpenAppCommandResult>;
692
- close: (options?: CloseAppCommandOptions) => Promise<CloseAppCommandResult>;
693
- list: (options?: ListAppsCommandOptions) => Promise<ListAppsCommandResult>;
694
- state: BoundRuntimeCommand<GetAppStateCommandOptions, GetAppStateCommandResult>;
695
- push: BoundRuntimeCommand<PushAppCommandOptions, PushAppCommandResult>;
696
- triggerEvent: BoundRuntimeCommand<TriggerAppEventCommandOptions, TriggerAppEventCommandResult>;
697
- };
698
- admin: {
699
- devices: (options?: AdminDevicesCommandOptions) => Promise<AdminDevicesCommandResult>;
700
- boot: (options?: AdminBootCommandOptions) => Promise<AdminBootCommandResult>;
701
- ensureSimulator: BoundRuntimeCommand<AdminEnsureSimulatorCommandOptions, AdminEnsureSimulatorCommandResult>;
702
- install: BoundRuntimeCommand<AdminInstallCommandOptions, AdminInstallCommandResult>;
703
- reinstall: BoundRuntimeCommand<AdminReinstallCommandOptions, AdminInstallCommandResult>;
704
- installFromSource: BoundRuntimeCommand<AdminInstallFromSourceCommandOptions, AdminInstallCommandResult>;
705
- };
706
- recording: {
707
- record: BoundRuntimeCommand<RecordingRecordCommandOptions, RecordingRecordCommandResult>;
708
- trace: BoundRuntimeCommand<RecordingTraceCommandOptions, RecordingTraceCommandResult>;
709
- };
710
- observability: {
711
- logs: (options?: DiagnosticsLogsCommandOptions) => Promise<DiagnosticsLogsCommandResult>;
712
- network: (options?: DiagnosticsNetworkCommandOptions) => Promise<DiagnosticsNetworkCommandResult>;
713
- perf: (options?: DiagnosticsPerfCommandOptions) => Promise<DiagnosticsPerfCommandResult>;
714
- };
715
- };
716
-
717
- export declare type BoundRuntimeCommand<TOptions = Record<string, unknown>, TResult = CommandResult> = (options: TOptions) => Promise<TResult>;
718
-
719
- declare type ClickButton = 'primary' | 'secondary' | 'middle';
720
-
721
- export declare type ClickCommandOptions = PressCommandOptions;
722
-
723
- export declare type CloseAppCommandOptions = CommandContext & {
724
- app?: string;
725
- };
726
-
727
- export declare type CloseAppCommandResult = {
728
- kind: 'appClosed';
729
- app?: string;
730
- backendResult?: Record<string, unknown>;
731
- message?: string;
732
- };
733
-
734
- export declare const commandCatalog: readonly CommandCatalogEntry[];
735
-
736
- export declare type CommandCatalogEntry = {
737
- /**
738
- * CLI command names track daemon compatibility migration. Namespaced entries
739
- * track runtime router/API commands that are available independently.
740
- */
741
- command: string;
742
- category: 'portable-runtime' | 'backend-admin' | 'transport-session' | 'environment' | 'capability-gated';
743
- status: 'implemented' | 'planned';
744
- };
745
-
746
- declare type CommandClock = {
747
- now(): number;
748
- sleep(ms: number): Promise<void>;
749
- };
750
-
751
- declare type CommandContext = {
752
- session?: string;
753
- requestId?: string;
754
- signal?: AbortSignal;
755
- metadata?: Record<string, unknown>;
756
- };
757
-
758
- declare type CommandPolicy = {
759
- allowLocalInputPaths: boolean;
760
- allowLocalOutputPaths: boolean;
761
- maxImagePixels: number;
762
- allowNamedBackendCapabilities: readonly BackendCapabilityName[];
763
- };
764
-
765
- export declare type CommandResult = Record<string, unknown>;
766
-
767
- export declare type CommandRouter<TContext = unknown> = {
768
- dispatch(request: CommandRouterRequest<TContext>): Promise<CommandRouterResponse>;
769
- };
770
-
771
- export declare type CommandRouterConfig<TContext = unknown> = {
772
- createRuntime(request: CommandRouterRequest<TContext>): AgentDeviceRuntime | Promise<AgentDeviceRuntime>;
773
- beforeDispatch?(request: CommandRouterRequest<TContext>): void | Promise<void>;
774
- formatError?(error: unknown, request: CommandRouterRequest<TContext>): NormalizedError;
775
- };
776
-
777
- export declare type CommandRouterRequest<TContext = unknown> = {
778
- command: 'capture.screenshot';
779
- options: ScreenshotCommandOptions;
780
- context?: TContext;
781
- } | {
782
- command: 'capture.diffScreenshot';
783
- options: DiffScreenshotCommandOptions;
784
- context?: TContext;
785
- } | {
786
- command: 'capture.snapshot';
787
- options: SnapshotCommandOptions;
788
- context?: TContext;
789
- } | {
790
- command: 'capture.diffSnapshot';
791
- options: DiffSnapshotCommandOptions;
792
- context?: TContext;
793
- } | {
794
- command: 'selectors.find';
795
- options: FindReadCommandOptions;
796
- context?: TContext;
797
- } | {
798
- command: 'selectors.get';
799
- options: GetCommandOptions;
800
- context?: TContext;
801
- } | {
802
- command: 'selectors.is';
803
- options: IsCommandOptions;
804
- context?: TContext;
805
- } | {
806
- command: 'selectors.wait';
807
- options: WaitCommandOptions;
808
- context?: TContext;
809
- } | {
810
- command: 'interactions.click';
811
- options: ClickCommandOptions;
812
- context?: TContext;
813
- } | {
814
- command: 'interactions.press';
815
- options: PressCommandOptions;
816
- context?: TContext;
817
- } | {
818
- command: 'interactions.fill';
819
- options: FillCommandOptions;
820
- context?: TContext;
821
- } | {
822
- command: 'interactions.typeText';
823
- options: TypeTextCommandOptions;
824
- context?: TContext;
825
- } | {
826
- command: 'interactions.focus';
827
- options: FocusCommandOptions;
828
- context?: TContext;
829
- } | {
830
- command: 'interactions.longPress';
831
- options: LongPressCommandOptions;
832
- context?: TContext;
833
- } | {
834
- command: 'interactions.swipe';
835
- options: SwipeCommandOptions;
836
- context?: TContext;
837
- } | {
838
- command: 'interactions.scroll';
839
- options: ScrollCommandOptions;
840
- context?: TContext;
841
- } | {
842
- command: 'interactions.pinch';
843
- options: PinchCommandOptions;
844
- context?: TContext;
845
- } | {
846
- command: 'system.back';
847
- options?: SystemBackCommandOptions;
848
- context?: TContext;
849
- } | {
850
- command: 'system.home';
851
- options?: SystemHomeCommandOptions;
852
- context?: TContext;
853
- } | {
854
- command: 'system.rotate';
855
- options: SystemRotateCommandOptions;
856
- context?: TContext;
857
- } | {
858
- command: 'system.keyboard';
859
- options?: SystemKeyboardCommandOptions;
860
- context?: TContext;
861
- } | {
862
- command: 'system.clipboard';
863
- options: SystemClipboardCommandOptions;
864
- context?: TContext;
865
- } | {
866
- command: 'system.settings';
867
- options?: SystemSettingsCommandOptions;
868
- context?: TContext;
869
- } | {
870
- command: 'system.alert';
871
- options?: SystemAlertCommandOptions;
872
- context?: TContext;
873
- } | {
874
- command: 'system.appSwitcher';
875
- options?: SystemAppSwitcherCommandOptions;
876
- context?: TContext;
877
- } | {
878
- command: 'apps.open';
879
- options: OpenAppCommandOptions;
880
- context?: TContext;
881
- } | {
882
- command: 'apps.close';
883
- options?: CloseAppCommandOptions;
884
- context?: TContext;
885
- } | {
886
- command: 'apps.list';
887
- options?: ListAppsCommandOptions;
888
- context?: TContext;
889
- } | {
890
- command: 'apps.state';
891
- options: GetAppStateCommandOptions;
892
- context?: TContext;
893
- } | {
894
- command: 'apps.push';
895
- options: PushAppCommandOptions;
896
- context?: TContext;
897
- } | {
898
- command: 'apps.triggerEvent';
899
- options: TriggerAppEventCommandOptions;
900
- context?: TContext;
901
- } | {
902
- command: 'admin.devices';
903
- options?: AdminDevicesCommandOptions;
904
- context?: TContext;
905
- } | {
906
- command: 'admin.boot';
907
- options?: AdminBootCommandOptions;
908
- context?: TContext;
909
- } | {
910
- command: 'admin.ensureSimulator';
911
- options: AdminEnsureSimulatorCommandOptions;
912
- context?: TContext;
913
- } | {
914
- command: 'admin.install';
915
- options: AdminInstallCommandOptions;
916
- context?: TContext;
917
- } | {
918
- command: 'admin.reinstall';
919
- options: AdminReinstallCommandOptions;
920
- context?: TContext;
921
- } | {
922
- command: 'admin.installFromSource';
923
- options: AdminInstallFromSourceCommandOptions;
924
- context?: TContext;
925
- } | {
926
- command: 'record';
927
- options: RecordingRecordCommandOptions;
928
- context?: TContext;
929
- } | {
930
- command: 'trace';
931
- options: RecordingTraceCommandOptions;
932
- context?: TContext;
933
- } | {
934
- command: 'diagnostics.logs';
935
- options?: DiagnosticsLogsCommandOptions;
936
- context?: TContext;
937
- } | {
938
- command: 'diagnostics.network';
939
- options?: DiagnosticsNetworkCommandOptions;
940
- context?: TContext;
941
- } | {
942
- command: 'diagnostics.perf';
943
- options?: DiagnosticsPerfCommandOptions;
944
- context?: TContext;
945
- } | {
946
- command: 'batch';
947
- options: BatchCommandOptions<TContext>;
948
- context?: TContext;
949
- };
950
-
951
- export declare type CommandRouterResponse = {
952
- ok: true;
953
- data: CommandRouterResult;
954
- } | {
955
- ok: false;
956
- error: NormalizedError;
957
- };
958
-
959
- export declare type CommandRouterResult = ScreenshotCommandResult | DiffScreenshotCommandResult | SnapshotCommandResult | DiffSnapshotCommandResult | FindReadCommandResult | GetCommandResult | IsCommandResult | WaitCommandResult | 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;
960
-
961
- export declare const commands: AgentDeviceCommands;
962
-
963
- declare type CommandSessionRecord = {
964
- name: string;
965
- appId?: string;
966
- appBundleId?: string;
967
- appName?: string;
968
- backendSessionId?: string;
969
- snapshot?: SnapshotState;
970
- metadata?: Record<string, unknown>;
971
- };
972
-
973
- declare type CommandSessionStore = {
974
- get(name: string): CommandSessionRecord | undefined | Promise<CommandSessionRecord | undefined>;
975
- set(record: CommandSessionRecord): void | Promise<void>;
976
- delete?(name: string): void | Promise<void>;
977
- list?(): readonly CommandSessionRecord[] | Promise<readonly CommandSessionRecord[]>;
978
- };
979
-
980
- export declare function createCommandRouter<TContext = unknown>(config: CommandRouterConfig<TContext>): CommandRouter<TContext>;
981
-
982
- declare type CreateTempFileOptions = {
983
- prefix: string;
984
- ext: string;
985
- };
986
-
987
- export declare type DiagnosticsLogsCommandOptions = DiagnosticsPageOptions & {
988
- levels?: readonly string[];
989
- search?: string;
990
- source?: string;
991
- };
992
-
993
- export declare type DiagnosticsLogsCommandResult = {
994
- kind: 'diagnosticsLogs';
995
- entries: readonly BackendLogEntry[];
996
- nextCursor?: string;
997
- timeWindow?: BackendDiagnosticsTimeWindow;
998
- backend?: string;
999
- redacted: boolean;
1000
- notes?: readonly string[];
1001
- };
1002
-
1003
- export declare type DiagnosticsNetworkCommandOptions = DiagnosticsPageOptions & {
1004
- include?: BackendNetworkIncludeMode;
1005
- };
1006
-
1007
- export declare type DiagnosticsNetworkCommandResult = {
1008
- kind: 'diagnosticsNetwork';
1009
- entries: readonly BackendNetworkEntry[];
1010
- nextCursor?: string;
1011
- timeWindow?: BackendDiagnosticsTimeWindow;
1012
- backend?: string;
1013
- redacted: boolean;
1014
- notes?: readonly string[];
1015
- };
1016
-
1017
- declare type DiagnosticsPageOptions = CommandContext & {
1018
- appId?: string;
1019
- appBundleId?: string;
1020
- since?: string;
1021
- until?: string;
1022
- cursor?: string;
1023
- limit?: number;
1024
- };
1025
-
1026
- export declare type DiagnosticsPerfCommandOptions = CommandContext & {
1027
- appId?: string;
1028
- appBundleId?: string;
1029
- since?: string;
1030
- until?: string;
1031
- sampleMs?: number;
1032
- metrics?: readonly string[];
1033
- };
1034
-
1035
- export declare type DiagnosticsPerfCommandResult = {
1036
- kind: 'diagnosticsPerf';
1037
- metrics: readonly BackendPerfMetric[];
1038
- startedAt?: string;
1039
- endedAt?: string;
1040
- backend?: string;
1041
- redacted: boolean;
1042
- notes?: readonly string[];
1043
- };
1044
-
1045
- declare type DiagnosticsSink = {
1046
- emit(event: {
1047
- level: 'debug' | 'info' | 'warn' | 'error';
1048
- message: string;
1049
- data?: unknown;
1050
- }): void;
1051
- };
1052
-
1053
- export declare type DiffScreenshotCommandOptions = CommandContext & {
1054
- baseline: FileInputRef;
1055
- current?: FileInputRef | LiveScreenshotInputRef;
1056
- out?: FileOutputRef;
1057
- currentOverlayOut?: FileOutputRef;
1058
- threshold?: number;
1059
- overlayRefs?: boolean;
1060
- surface?: BackendScreenshotOptions['surface'];
1061
- };
1062
-
1063
- export declare type DiffScreenshotCommandResult = ScreenshotDiffResult & {
1064
- artifacts?: ArtifactDescriptor[];
1065
- };
1066
-
1067
- export declare type DiffSnapshotCommandOptions = SnapshotCommandOptions;
1068
-
1069
- export declare type DiffSnapshotCommandResult = {
1070
- mode: 'snapshot';
1071
- baselineInitialized: boolean;
1072
- summary: SnapshotDiffSummary;
1073
- lines: SnapshotDiffLine[];
1074
- warnings?: string[];
1075
- };
1076
-
1077
- export declare type ElementTarget = SelectorTarget | RefTarget;
1078
-
1079
- declare type FileInputRef = {
1080
- kind: 'path';
1081
- path: string;
1082
- } | {
1083
- kind: 'uploadedArtifact';
1084
- id: string;
1085
- };
1086
-
1087
- declare type FileOutputRef = {
1088
- kind: 'path';
1089
- path: string;
1090
- } | {
1091
- kind: 'downloadableArtifact';
1092
- clientPath?: string;
1093
- fileName?: string;
1094
- };
1095
-
1096
- export declare type FillCommandOptions = CommandContext & {
1097
- target: InteractionTarget;
1098
- text: string;
1099
- delayMs?: number;
1100
- };
1101
-
1102
- export declare type FillCommandResult = ResolvedInteractionTarget & {
1103
- text: string;
1104
- warning?: string;
1105
- backendResult?: Record<string, unknown>;
1106
- };
1107
-
1108
- declare type FindAction = {
1109
- kind: 'click';
1110
- } | {
1111
- kind: 'focus';
1112
- } | {
1113
- kind: 'fill';
1114
- value: string;
1115
- } | {
1116
- kind: 'type';
1117
- value: string;
1118
- } | {
1119
- kind: 'get_text';
1120
- } | {
1121
- kind: 'get_attrs';
1122
- } | {
1123
- kind: 'exists';
1124
- } | {
1125
- kind: 'wait';
1126
- timeoutMs?: number;
1127
- };
1128
-
1129
- declare type FindLocator = 'any' | 'text' | 'label' | 'value' | 'role' | 'id';
1130
-
1131
- export declare type FindReadCommandOptions = CommandContext & {
1132
- locator?: FindLocator;
1133
- query: string;
1134
- action: Extract<FindAction['kind'], 'exists' | 'wait' | 'get_text' | 'get_attrs'>;
1135
- timeoutMs?: number;
1136
- } & SelectorSnapshotOptions;
1137
-
1138
- export declare type FindReadCommandResult = {
1139
- kind: 'found';
1140
- found: true;
1141
- waitedMs?: number;
1142
- } | {
1143
- kind: 'text';
1144
- ref: string;
1145
- text: string;
1146
- node: SnapshotNode;
1147
- } | {
1148
- kind: 'attrs';
1149
- ref: string;
1150
- node: SnapshotNode;
1151
- };
1152
-
1153
- export declare type FocusCommandOptions = CommandContext & {
1154
- target: InteractionTarget;
1155
- };
1156
-
1157
- export declare type FocusCommandResult = ResolvedInteractionTarget & {
1158
- backendResult?: Record<string, unknown>;
1159
- message?: string;
1160
- };
1161
-
1162
- declare type GestureDirection = 'up' | 'down' | 'left' | 'right';
1163
-
1164
- export declare type GetAppStateCommandOptions = CommandContext & {
1165
- app: string;
1166
- };
1167
-
1168
- export declare type GetAppStateCommandResult = {
1169
- kind: 'appState';
1170
- app: string;
1171
- state: BackendAppState;
1172
- };
1173
-
1174
- export declare type GetAttrsCommandOptions = CommandContext & SelectorSnapshotOptions & {
1175
- target: ElementTarget;
1176
- };
1177
-
1178
- export declare type GetCommandOptions = CommandContext & SelectorSnapshotOptions & {
1179
- property: 'text' | 'attrs';
1180
- target: ElementTarget;
1181
- };
1182
-
1183
- export declare type GetCommandResult = {
1184
- kind: 'text';
1185
- target: ResolvedTarget;
1186
- text: string;
1187
- node: SnapshotNode;
1188
- selectorChain?: string[];
1189
- } | {
1190
- kind: 'attrs';
1191
- target: ResolvedTarget;
1192
- node: SnapshotNode;
1193
- selectorChain?: string[];
1194
- };
1195
-
1196
- export declare type GetTextCommandOptions = CommandContext & SelectorSnapshotOptions & {
1197
- target: ElementTarget;
1198
- };
1199
-
1200
- export declare type InteractionTarget = ElementTarget | PointTarget;
1201
-
1202
- export declare type IsCommandOptions = CommandContext & SelectorSnapshotOptions & {
1203
- predicate: 'visible' | 'hidden' | 'exists' | 'editable' | 'selected' | 'text';
1204
- selector: string;
1205
- expectedText?: string;
1206
- };
1207
-
1208
- export declare type IsCommandResult = {
1209
- predicate: IsCommandOptions['predicate'];
1210
- pass: true;
1211
- selector: string;
1212
- matches?: number;
1213
- text?: string;
1214
- selectorChain?: string[];
1215
- };
1216
-
1217
- export declare type IsSelectorCommandOptions = CommandContext & SelectorSnapshotOptions & {
1218
- target: SelectorTarget;
1219
- };
1220
-
1221
- export declare type ListAppsCommandOptions = CommandContext & {
1222
- filter?: BackendAppListFilter;
1223
- };
1224
-
1225
- export declare type ListAppsCommandResult = {
1226
- kind: 'appsList';
1227
- apps: readonly BackendAppInfo[];
1228
- };
1229
-
1230
- export declare type LiveScreenshotInputRef = {
1231
- kind: 'live';
1232
- };
1233
-
1234
- export declare type LongPressCommandOptions = CommandContext & {
1235
- target: InteractionTarget;
1236
- durationMs?: number;
1237
- };
1238
-
1239
- export declare type LongPressCommandResult = ResolvedInteractionTarget & {
1240
- durationMs?: number;
1241
- backendResult?: Record<string, unknown>;
1242
- message?: string;
1243
- };
1244
-
1245
- declare type NormalizedError = {
1246
- code: string;
1247
- message: string;
1248
- hint?: string;
1249
- diagnosticId?: string;
1250
- logPath?: string;
1251
- details?: Record<string, unknown>;
1252
- };
1253
-
1254
- export declare type OpenAppCommandOptions = CommandContext & BackendOpenTarget & {
1255
- relaunch?: boolean;
1256
- };
1257
-
1258
- export declare type OpenAppCommandResult = {
1259
- kind: 'appOpened';
1260
- target: BackendOpenTarget;
1261
- relaunch: boolean;
1262
- backendResult?: Record<string, unknown>;
1263
- message?: string;
1264
- };
1265
-
1266
- declare type OutputVisibility = 'client-visible' | 'internal';
1267
-
1268
- export declare type PinchCommandOptions = CommandContext & {
1269
- scale: number;
1270
- center?: InteractionTarget;
1271
- };
1272
-
1273
- export declare type PinchCommandResult = {
1274
- kind: 'pinch';
1275
- scale: number;
1276
- center?: Point;
1277
- centerTarget?: ResolvedInteractionTarget;
1278
- backendResult?: Record<string, unknown>;
1279
- message?: string;
1280
- };
1281
-
1282
- declare type Point = {
1283
- x: number;
1284
- y: number;
1285
- };
1286
-
1287
- export declare type PointTarget = {
1288
- kind: 'point';
1289
- x: number;
1290
- y: number;
1291
- };
1292
-
1293
- export declare type PressCommandOptions = CommandContext & {
1294
- target: InteractionTarget;
1295
- button?: ClickButton;
1296
- count?: number;
1297
- intervalMs?: number;
1298
- holdMs?: number;
1299
- jitterPx?: number;
1300
- doubleTap?: boolean;
1301
- };
1302
-
1303
- export declare type PressCommandResult = ResolvedInteractionTarget & {
1304
- backendResult?: Record<string, unknown>;
1305
- };
1306
-
1307
- export declare type PushAppCommandOptions = CommandContext & {
1308
- app: string;
1309
- input: AppPushInput;
1310
- };
1311
-
1312
- export declare type PushAppCommandResult = {
1313
- kind: 'appPushed';
1314
- app: string;
1315
- inputKind: 'json' | 'file';
1316
- backendResult?: Record<string, unknown>;
1317
- message?: string;
1318
- };
1319
-
1320
- declare type RawSnapshotNode = {
1321
- index: number;
1322
- type?: string;
1323
- role?: string;
1324
- subrole?: string;
1325
- label?: string;
1326
- value?: string;
1327
- identifier?: string;
1328
- rect?: Rect;
1329
- enabled?: boolean;
1330
- selected?: boolean;
1331
- hittable?: boolean;
1332
- depth?: number;
1333
- parentIndex?: number;
1334
- pid?: number;
1335
- bundleId?: string;
1336
- appName?: string;
1337
- windowTitle?: string;
1338
- surface?: string;
1339
- hiddenContentAbove?: boolean;
1340
- hiddenContentBelow?: boolean;
1341
- };
1342
-
1343
- export declare type RecordingRecordCommandOptions = CommandContext & {
1344
- action: 'start' | 'stop';
1345
- out?: FileOutputRef;
1346
- fps?: number;
1347
- quality?: number;
1348
- hideTouches?: boolean;
1349
- };
1350
-
1351
- export declare type RecordingRecordCommandResult = {
1352
- kind: 'recordingStarted' | 'recordingStopped';
1353
- action: 'start' | 'stop';
1354
- path?: string;
1355
- telemetryPath?: string;
1356
- artifact?: ArtifactDescriptor;
1357
- backendResult?: Record<string, unknown>;
1358
- warning?: string;
1359
- message?: string;
1360
- };
1361
-
1362
- export declare type RecordingTraceCommandOptions = CommandContext & {
1363
- action: 'start' | 'stop';
1364
- out?: FileOutputRef;
1365
- };
1366
-
1367
- export declare type RecordingTraceCommandResult = {
1368
- kind: 'traceStarted' | 'traceStopped';
1369
- action: 'start' | 'stop';
1370
- outPath?: string;
1371
- artifact?: ArtifactDescriptor;
1372
- backendResult?: Record<string, unknown>;
1373
- message?: string;
1374
- };
1375
-
1376
- declare type Rect = {
1377
- x: number;
1378
- y: number;
1379
- width: number;
1380
- height: number;
1381
- };
1382
-
1383
- export declare function ref(refInput: string, options?: {
1384
- fallbackLabel?: string;
1385
- }): RefTarget;
1386
-
1387
- export declare type RefTarget = {
1388
- kind: 'ref';
1389
- ref: string;
1390
- fallbackLabel?: string;
1391
- };
1392
-
1393
- declare type ReservedOutputFile = {
1394
- path: string;
1395
- visibility: OutputVisibility;
1396
- publish: () => Promise<ArtifactDescriptor | undefined>;
1397
- cleanup?: () => Promise<void>;
1398
- };
1399
-
1400
- declare type ReserveOutputOptions = {
1401
- field: string;
1402
- ext: string;
1403
- requestedClientPath?: string;
1404
- visibility?: OutputVisibility;
1405
- };
1406
-
1407
- declare type ResolvedInputFile = {
1408
- path: string;
1409
- cleanup?: () => Promise<void>;
1410
- };
1411
-
1412
- export declare type ResolvedInteractionTarget = {
1413
- kind: 'point';
1414
- point: Point;
1415
- } | {
1416
- kind: 'ref';
1417
- point: Point;
1418
- target: Extract<ResolvedTarget, {
1419
- kind: 'ref';
1420
- }>;
1421
- node: SnapshotNode;
1422
- selectorChain: string[];
1423
- refLabel?: string;
1424
- } | {
1425
- kind: 'selector';
1426
- point: Point;
1427
- target: Extract<ResolvedTarget, {
1428
- kind: 'selector';
1429
- }>;
1430
- node: SnapshotNode;
1431
- selectorChain: string[];
1432
- refLabel?: string;
1433
- };
1434
-
1435
- export declare type ResolvedTarget = {
1436
- kind: 'selector';
1437
- selector: string;
1438
- } | {
1439
- kind: 'ref';
1440
- ref: string;
1441
- };
1442
-
1443
- declare type ResolveInputOptions = {
1444
- usage: string;
1445
- field?: string;
1446
- };
1447
-
1448
- export declare type RuntimeCommand<TOptions = Record<string, unknown>, TResult = CommandResult> = (runtime: AgentDeviceRuntime, options: TOptions) => Promise<TResult>;
1449
-
1450
- export declare type ScreenshotCommandOptions = CommandContext & {
1451
- out?: FileOutputRef;
1452
- fullscreen?: boolean;
1453
- overlayRefs?: boolean;
1454
- maxSize?: number;
1455
- appId?: string;
1456
- appBundleId?: string;
1457
- surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
1458
- };
1459
-
1460
- export declare type ScreenshotCommandResult = {
1461
- path: string;
1462
- artifacts?: ArtifactDescriptor[];
1463
- message?: string;
1464
- };
1465
-
1466
- declare type ScreenshotDiffRegion = {
1467
- index: number;
1468
- rect: {
1469
- x: number;
1470
- y: number;
1471
- width: number;
1472
- height: number;
1473
- };
1474
- normalizedRect: {
1475
- x: number;
1476
- y: number;
1477
- width: number;
1478
- height: number;
1479
- };
1480
- differentPixels: number;
1481
- shareOfDiffPercentage: number;
1482
- densityPercentage: number;
1483
- shape: 'compact' | 'horizontal-band' | 'vertical-band' | 'large-area';
1484
- size: 'small' | 'medium' | 'large';
1485
- location: string;
1486
- averageBaselineColorHex: string;
1487
- averageCurrentColorHex: string;
1488
- baselineLuminance: number;
1489
- currentLuminance: number;
1490
- dominantChange: 'brighter' | 'darker' | 'color-shift' | 'mixed';
1491
- currentOverlayMatches?: ScreenshotDiffRegionOverlayMatch[];
1492
- };
1493
-
1494
- declare type ScreenshotDiffRegionOverlayMatch = {
1495
- ref: string;
1496
- label?: string;
1497
- regionCoveragePercentage: number;
1498
- rect: {
1499
- x: number;
1500
- y: number;
1501
- width: number;
1502
- height: number;
1503
- };
1504
- };
1505
-
1506
- declare type ScreenshotDiffResult = {
1507
- diffPath?: string;
1508
- totalPixels: number;
1509
- differentPixels: number;
1510
- mismatchPercentage: number;
1511
- match: boolean;
1512
- dimensionMismatch?: ScreenshotDimensionMismatch;
1513
- regions?: ScreenshotDiffRegion[];
1514
- currentOverlayPath?: string;
1515
- currentOverlayRefCount?: number;
1516
- ocr?: ScreenshotOcrSummary;
1517
- nonTextDeltas?: ScreenshotNonTextDelta[];
1518
- };
1519
-
1520
- declare type ScreenshotDimensionMismatch = {
1521
- expected: {
1522
- width: number;
1523
- height: number;
1524
- };
1525
- actual: {
1526
- width: number;
1527
- height: number;
1528
- };
1529
- };
1530
-
1531
- declare type ScreenshotNonTextDelta = {
1532
- index: number;
1533
- regionIndex?: number;
1534
- slot: 'leading' | 'trailing' | 'background' | 'separator' | 'unknown';
1535
- likelyKind: 'icon' | 'toggle' | 'chevron' | 'separator' | 'visual';
1536
- rect: Rect;
1537
- nearestText?: string;
1538
- };
1539
-
1540
- declare type ScreenshotOcrMovementCluster = {
1541
- texts: string[];
1542
- xRange: {
1543
- min: number;
1544
- max: number;
1545
- };
1546
- yRange: {
1547
- min: number;
1548
- max: number;
1549
- };
1550
- };
1551
-
1552
- declare type ScreenshotOcrSummary = {
1553
- provider: 'tesseract';
1554
- baselineBlocks: number;
1555
- currentBlocks: number;
1556
- matches: ScreenshotOcrTextMatch[];
1557
- movementClusters?: ScreenshotOcrMovementCluster[];
1558
- };
1559
-
1560
- declare type ScreenshotOcrTextMatch = {
1561
- text: string;
1562
- baselineRect: Rect;
1563
- currentRect: Rect;
1564
- delta: {
1565
- x: number;
1566
- y: number;
1567
- width: number;
1568
- height: number;
1569
- };
1570
- confidence: number;
1571
- possibleTextMetricMismatch: boolean;
1572
- };
1573
-
1574
- declare type ScreenshotOverlayRef = {
1575
- ref: string;
1576
- label?: string;
1577
- rect: Rect;
1578
- overlayRect: Rect;
1579
- center: Point;
1580
- };
1581
-
1582
- export declare type ScrollCommandOptions = CommandContext & {
1583
- target?: ScrollTarget;
1584
- direction: GestureDirection;
1585
- amount?: number;
1586
- pixels?: number;
1587
- };
1588
-
1589
- export declare type ScrollCommandResult = {
1590
- kind: 'viewport';
1591
- direction: GestureDirection;
1592
- amount?: number;
1593
- pixels?: number;
1594
- backendResult?: Record<string, unknown>;
1595
- message?: string;
1596
- } | (ResolvedInteractionTarget & {
1597
- direction: GestureDirection;
1598
- amount?: number;
1599
- pixels?: number;
1600
- backendResult?: Record<string, unknown>;
1601
- message?: string;
1602
- });
1603
-
1604
- export declare type ScrollTarget = InteractionTarget | {
1605
- kind: 'viewport';
1606
- };
1607
-
1608
- export declare function selector(expression: string): SelectorTarget;
1609
-
1610
- export declare type SelectorSnapshotOptions = {
1611
- depth?: number;
1612
- scope?: string;
1613
- raw?: boolean;
1614
- };
1615
-
1616
- export declare type SelectorTarget = {
1617
- kind: 'selector';
1618
- selector: string;
1619
- };
1620
-
1621
- declare type SnapshotBackend = 'xctest' | 'android' | 'macos-helper' | 'linux-atspi';
1622
-
1623
- export declare type SnapshotCommandOptions = CommandContext & {
1624
- interactiveOnly?: boolean;
1625
- compact?: boolean;
1626
- depth?: number;
1627
- scope?: string;
1628
- raw?: boolean;
1629
- };
1630
-
1631
- export declare type SnapshotCommandResult = {
1632
- nodes: SnapshotNode[];
1633
- truncated: boolean;
1634
- appName?: string;
1635
- appBundleId?: string;
1636
- visibility?: SnapshotVisibility;
1637
- warnings?: string[];
1638
- };
1639
-
1640
- export declare type SnapshotDiffLine = {
1641
- kind: 'added' | 'removed' | 'unchanged';
1642
- text: string;
1643
- };
1644
-
1645
- export declare type SnapshotDiffSummary = {
1646
- additions: number;
1647
- removals: number;
1648
- unchanged: number;
1649
- };
1650
-
1651
- declare type SnapshotNode = RawSnapshotNode & {
1652
- ref: string;
1653
- };
1654
-
1655
- declare type SnapshotOptions = {
1656
- interactiveOnly?: boolean;
1657
- compact?: boolean;
1658
- depth?: number;
1659
- scope?: string;
1660
- raw?: boolean;
1661
- };
1662
-
1663
- declare type SnapshotState = {
1664
- nodes: SnapshotNode[];
1665
- createdAt: number;
1666
- truncated?: boolean;
1667
- backend?: SnapshotBackend;
1668
- comparisonSafe?: boolean;
1669
- };
1670
-
1671
- declare type SnapshotVisibility = {
1672
- partial: boolean;
1673
- visibleNodeCount: number;
1674
- totalNodeCount: number;
1675
- reasons: SnapshotVisibilityReason[];
1676
- };
1677
-
1678
- declare type SnapshotVisibilityReason = 'offscreen-nodes' | 'scroll-hidden-above' | 'scroll-hidden-below';
1679
-
1680
- export declare type SwipeCommandOptions = CommandContext & SwipeOptions;
1681
-
1682
- export declare type SwipeCommandResult = {
1683
- kind: 'swipe';
1684
- from: Point;
1685
- to: Point;
1686
- direction?: GestureDirection;
1687
- distance?: number;
1688
- durationMs?: number;
1689
- fromTarget?: ResolvedInteractionTarget | {
1690
- kind: 'viewport';
1691
- };
1692
- backendResult?: Record<string, unknown>;
1693
- message?: string;
1694
- };
1695
-
1696
- export declare type SwipeOptions = {
1697
- from?: Point | InteractionTarget;
1698
- to?: Point;
1699
- direction?: GestureDirection;
1700
- distance?: number;
1701
- durationMs?: number;
1702
- };
1703
-
1704
- export declare type SystemAlertCommandOptions = CommandContext & {
1705
- action?: BackendAlertAction;
1706
- timeoutMs?: number;
1707
- };
1708
-
1709
- export declare type SystemAlertCommandResult = {
1710
- kind: 'alertStatus';
1711
- action: 'get';
1712
- alert: BackendAlertInfo | null;
1713
- } | {
1714
- kind: 'alertHandled';
1715
- action: 'accept' | 'dismiss';
1716
- handled: boolean;
1717
- alert?: BackendAlertInfo;
1718
- button?: string;
1719
- message?: string;
1720
- } | {
1721
- kind: 'alertWait';
1722
- action: 'wait';
1723
- alert: BackendAlertInfo | null;
1724
- waitedMs?: number;
1725
- timedOut?: boolean;
1726
- message?: string;
1727
- };
1728
-
1729
- export declare type SystemAppSwitcherCommandOptions = CommandContext;
1730
-
1731
- export declare type SystemAppSwitcherCommandResult = {
1732
- kind: 'appSwitcherOpened';
1733
- backendResult?: Record<string, unknown>;
1734
- message?: string;
1735
- };
1736
-
1737
- export declare type SystemBackCommandOptions = CommandContext & {
1738
- mode?: 'in-app' | 'system';
1739
- };
1740
-
1741
- export declare type SystemBackCommandResult = {
1742
- kind: 'systemBack';
1743
- mode: 'in-app' | 'system';
1744
- backendResult?: Record<string, unknown>;
1745
- message?: string;
1746
- };
1747
-
1748
- export declare type SystemClipboardCommandOptions = (CommandContext & {
1749
- action: 'read';
1750
- }) | (CommandContext & {
1751
- action: 'write';
1752
- text: string;
1753
- });
1754
-
1755
- export declare type SystemClipboardCommandResult = {
1756
- kind: 'clipboardText';
1757
- action: 'read';
1758
- text: string;
1759
- } | {
1760
- kind: 'clipboardUpdated';
1761
- action: 'write';
1762
- textLength: number;
1763
- backendResult?: Record<string, unknown>;
1764
- message?: string;
1765
- };
1766
-
1767
- export declare type SystemHomeCommandOptions = CommandContext;
1768
-
1769
- export declare type SystemHomeCommandResult = {
1770
- kind: 'systemHome';
1771
- backendResult?: Record<string, unknown>;
1772
- message?: string;
1773
- };
1774
-
1775
- export declare type SystemKeyboardCommandOptions = CommandContext & {
1776
- action?: 'status' | 'get' | 'dismiss';
1777
- };
1778
-
1779
- export declare type SystemKeyboardCommandResult = {
1780
- kind: 'keyboardState';
1781
- action: 'status' | 'get';
1782
- state: BackendKeyboardResult;
1783
- backendResult?: Record<string, unknown>;
1784
- } | {
1785
- kind: 'keyboardDismissed';
1786
- action: 'dismiss';
1787
- state: BackendKeyboardResult;
1788
- backendResult?: Record<string, unknown>;
1789
- message?: string;
1790
- };
1791
-
1792
- export declare type SystemRotateCommandOptions = CommandContext & {
1793
- orientation: BackendDeviceOrientation;
1794
- };
1795
-
1796
- export declare type SystemRotateCommandResult = {
1797
- kind: 'systemRotated';
1798
- orientation: BackendDeviceOrientation;
1799
- backendResult?: Record<string, unknown>;
1800
- message?: string;
1801
- };
1802
-
1803
- export declare type SystemSettingsCommandOptions = CommandContext & {
1804
- target?: string;
1805
- };
1806
-
1807
- export declare type SystemSettingsCommandResult = {
1808
- kind: 'settingsOpened';
1809
- target?: string;
1810
- backendResult?: Record<string, unknown>;
1811
- message?: string;
1812
- };
1813
-
1814
- declare type TemporaryFile = {
1815
- path: string;
1816
- visibility: 'internal';
1817
- cleanup: () => Promise<void>;
1818
- };
1819
-
1820
- export declare type TriggerAppEventCommandOptions = CommandContext & {
1821
- name: string;
1822
- payload?: Record<string, unknown>;
1823
- };
1824
-
1825
- export declare type TriggerAppEventCommandResult = {
1826
- kind: 'appEventTriggered';
1827
- name: string;
1828
- payload?: Record<string, unknown>;
1829
- backendResult?: Record<string, unknown>;
1830
- message?: string;
1831
- };
1832
-
1833
- export declare type TypeTextCommandOptions = CommandContext & {
1834
- text: string;
1835
- delayMs?: number;
1836
- };
1837
-
1838
- export declare type TypeTextCommandResult = {
1839
- kind: 'text';
1840
- text: string;
1841
- delayMs: number;
1842
- backendResult?: Record<string, unknown>;
1843
- message?: string;
1844
- };
1845
-
1846
- export declare type WaitCommandOptions = CommandContext & SelectorSnapshotOptions & {
1847
- target: {
1848
- kind: 'sleep';
1849
- durationMs: number;
1850
- } | {
1851
- kind: 'text';
1852
- text: string;
1853
- timeoutMs?: number | null;
1854
- } | {
1855
- kind: 'ref';
1856
- ref: string;
1857
- timeoutMs?: number | null;
1858
- } | {
1859
- kind: 'selector';
1860
- selector: string;
1861
- timeoutMs?: number | null;
1862
- };
1863
- };
1864
-
1865
- export declare type WaitCommandResult = {
1866
- kind: 'sleep';
1867
- waitedMs: number;
1868
- } | {
1869
- kind: 'text';
1870
- waitedMs: number;
1871
- text: string;
1872
- } | {
1873
- kind: 'selector';
1874
- waitedMs: number;
1875
- selector: string;
1876
- };
1877
-
1878
- export declare type WaitForTextCommandOptions = CommandContext & SelectorSnapshotOptions & {
1879
- text: string;
1880
- timeoutMs?: number | null;
1881
- };
1882
-
1883
- export { }