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