agent-device 0.12.5 → 0.12.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,56 @@
1
+ export declare type AdminBootCommandOptions = CommandContext & {
2
+ target?: BackendDeviceTarget;
3
+ };
4
+
5
+ export declare type AdminBootCommandResult = {
6
+ kind: 'deviceBooted';
7
+ target?: BackendDeviceTarget;
8
+ backendResult?: Record<string, unknown>;
9
+ message?: string;
10
+ };
11
+
12
+ export declare type AdminDevicesCommandOptions = CommandContext & {
13
+ filter?: BackendDeviceFilter;
14
+ };
15
+
16
+ export declare type AdminDevicesCommandResult = {
17
+ kind: 'adminDevices';
18
+ devices: readonly BackendDeviceInfo[];
19
+ };
20
+
21
+ export declare type AdminEnsureSimulatorCommandOptions = CommandContext & BackendEnsureSimulatorOptions;
22
+
23
+ export declare type AdminEnsureSimulatorCommandResult = {
24
+ kind: 'simulatorEnsured';
25
+ } & BackendEnsureSimulatorResult;
26
+
27
+ export declare type AdminInstallCommandOptions = CommandContext & {
28
+ app: string;
29
+ source: BackendInstallSource;
30
+ };
31
+
32
+ export declare type AdminInstallCommandResult = {
33
+ kind: 'appInstalled' | 'appReinstalled' | 'appInstalledFromSource';
34
+ app?: string;
35
+ source: BackendInstallSource;
36
+ appId?: string;
37
+ appName?: string;
38
+ bundleId?: string;
39
+ packageName?: string;
40
+ launchTarget?: string;
41
+ installablePath?: string;
42
+ archivePath?: string;
43
+ backendResult?: Record<string, unknown>;
44
+ message?: string;
45
+ };
46
+
47
+ export declare type AdminInstallFromSourceCommandOptions = CommandContext & {
48
+ app?: string;
49
+ source: BackendInstallSource;
50
+ };
51
+
52
+ export declare type AdminReinstallCommandOptions = AdminInstallCommandOptions;
53
+
1
54
  declare type AgentDeviceBackend = {
2
55
  platform: AgentDeviceBackendPlatform;
3
56
  capabilities?: BackendCapabilitySet;
@@ -11,12 +64,44 @@ declare type AgentDeviceBackend = {
11
64
  typeText?(context: BackendCommandContext, text: string, options?: {
12
65
  delayMs?: number;
13
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>;
14
72
  pressKey?(context: BackendCommandContext, key: string, options?: {
15
73
  modifiers?: string[];
16
74
  }): Promise<BackendActionResult>;
17
- openApp?(context: BackendCommandContext, target: BackendOpenTarget): 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>;
18
87
  closeApp?(context: BackendCommandContext, app?: string): Promise<BackendActionResult>;
19
- installApp?(context: BackendCommandContext, target: BackendInstallTarget): 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>;
20
105
  };
21
106
 
22
107
  declare type AgentDeviceBackendPlatform = 'ios' | 'android' | 'macos' | 'linux';
@@ -50,6 +135,46 @@ export declare type AgentDeviceCommands = {
50
135
  press: RuntimeCommand<PressCommandOptions, PressCommandResult>;
51
136
  fill: RuntimeCommand<FillCommandOptions, FillCommandResult>;
52
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>;
53
178
  };
54
179
  };
55
180
 
@@ -63,6 +188,11 @@ declare type AgentDeviceRuntime = {
63
188
  signal?: AbortSignal;
64
189
  };
65
190
 
191
+ export declare type AppPushInput = {
192
+ kind: 'json';
193
+ payload: Record<string, unknown>;
194
+ } | FileInputRef;
195
+
66
196
  declare type ArtifactAdapter = {
67
197
  resolveInput(ref: FileInputRef, options: ResolveInputOptions): Promise<ResolvedInputFile>;
68
198
  reserveOutput(ref: FileOutputRef | undefined, options: ReserveOutputOptions): Promise<ReservedOutputFile>;
@@ -89,10 +219,65 @@ declare const BACKEND_CAPABILITY_NAMES: readonly ["android.shell", "ios.runnerCo
89
219
 
90
220
  declare type BackendActionResult = Record<string, unknown> | void;
91
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
+
92
273
  declare type BackendCapabilityName = (typeof BACKEND_CAPABILITY_NAMES)[number];
93
274
 
94
275
  declare type BackendCapabilitySet = readonly BackendCapabilityName[];
95
276
 
277
+ declare type BackendClipboardTextResult = {
278
+ text: string;
279
+ };
280
+
96
281
  declare type BackendCommandContext = {
97
282
  session?: string;
98
283
  requestId?: string;
@@ -102,6 +287,71 @@ declare type BackendCommandContext = {
102
287
  metadata?: Record<string, unknown>;
103
288
  };
104
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
+
105
355
  declare type BackendEscapeHatches = {
106
356
  androidShell?(context: BackendCommandContext, args: readonly string[]): Promise<BackendShellResult>;
107
357
  iosRunnerCommand?(context: BackendCommandContext, command: BackendRunnerCommand): Promise<BackendActionResult>;
@@ -116,21 +366,166 @@ declare type BackendFindTextResult = {
116
366
  found: boolean;
117
367
  };
118
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
+
119
390
  declare type BackendInstallTarget = {
120
- app: string;
121
- artifactPath: string;
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;
122
453
  };
123
454
 
124
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
+ */
125
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
+ */
126
468
  url?: string;
469
+ /**
470
+ * Platform-specific activity override, primarily for Android app launches.
471
+ */
127
472
  activity?: string;
128
473
  };
129
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
+
130
512
  declare type BackendReadTextResult = {
131
513
  text: string;
132
514
  };
133
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
+
134
529
  declare type BackendRunnerCommand = {
135
530
  command: string;
136
531
  args?: readonly string[];
@@ -148,6 +543,19 @@ declare type BackendScreenshotResult = {
148
543
  overlayRefs?: ScreenshotOverlayRef[];
149
544
  };
150
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
+
151
559
  declare type BackendShellResult = {
152
560
  exitCode: number;
153
561
  stdout: string;
@@ -182,6 +590,10 @@ declare type BackendSnapshotResult = {
182
590
  appBundleId?: string;
183
591
  };
184
592
 
593
+ declare type BackendSwipeOptions = {
594
+ durationMs?: number;
595
+ };
596
+
185
597
  declare type BackendTapOptions = {
186
598
  button?: 'primary' | 'secondary' | 'middle';
187
599
  count?: number;
@@ -191,6 +603,43 @@ declare type BackendTapOptions = {
191
603
  doubleTap?: boolean;
192
604
  };
193
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
+
194
643
  export declare function bindCommands(runtime: AgentDeviceRuntime): BoundAgentDeviceCommands;
195
644
 
196
645
  export declare type BoundAgentDeviceCommands = {
@@ -222,6 +671,46 @@ export declare type BoundAgentDeviceCommands = {
222
671
  press: (target: InteractionTarget, options?: Omit<PressCommandOptions, 'target'>) => Promise<PressCommandResult>;
223
672
  fill: (target: InteractionTarget, text: string, options?: Omit<FillCommandOptions, 'target' | 'text'>) => Promise<FillCommandResult>;
224
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>;
225
714
  };
226
715
  };
227
716
 
@@ -229,9 +718,24 @@ export declare type BoundRuntimeCommand<TOptions = Record<string, unknown>, TRes
229
718
 
230
719
  export declare type ClickCommandOptions = PressCommandOptions;
231
720
 
721
+ export declare type CloseAppCommandOptions = CommandContext & {
722
+ app?: string;
723
+ };
724
+
725
+ export declare type CloseAppCommandResult = {
726
+ kind: 'appClosed';
727
+ app?: string;
728
+ backendResult?: Record<string, unknown>;
729
+ message?: string;
730
+ };
731
+
232
732
  export declare const commandCatalog: readonly CommandCatalogEntry[];
233
733
 
234
734
  export declare type CommandCatalogEntry = {
735
+ /**
736
+ * CLI command names track daemon compatibility migration. Namespaced entries
737
+ * track runtime router/API commands that are available independently.
738
+ */
235
739
  command: string;
236
740
  category: 'portable-runtime' | 'backend-admin' | 'transport-session' | 'environment' | 'capability-gated';
237
741
  status: 'implemented' | 'planned';
@@ -316,6 +820,130 @@ export declare type CommandRouterRequest<TContext = unknown> = {
316
820
  command: 'interactions.typeText';
317
821
  options: TypeTextCommandOptions;
318
822
  context?: TContext;
823
+ } | {
824
+ command: 'interactions.focus';
825
+ options: FocusCommandOptions;
826
+ context?: TContext;
827
+ } | {
828
+ command: 'interactions.longPress';
829
+ options: LongPressCommandOptions;
830
+ context?: TContext;
831
+ } | {
832
+ command: 'interactions.swipe';
833
+ options: SwipeCommandOptions;
834
+ context?: TContext;
835
+ } | {
836
+ command: 'interactions.scroll';
837
+ options: ScrollCommandOptions;
838
+ context?: TContext;
839
+ } | {
840
+ command: 'interactions.pinch';
841
+ options: PinchCommandOptions;
842
+ context?: TContext;
843
+ } | {
844
+ command: 'system.back';
845
+ options?: SystemBackCommandOptions;
846
+ context?: TContext;
847
+ } | {
848
+ command: 'system.home';
849
+ options?: SystemHomeCommandOptions;
850
+ context?: TContext;
851
+ } | {
852
+ command: 'system.rotate';
853
+ options: SystemRotateCommandOptions;
854
+ context?: TContext;
855
+ } | {
856
+ command: 'system.keyboard';
857
+ options?: SystemKeyboardCommandOptions;
858
+ context?: TContext;
859
+ } | {
860
+ command: 'system.clipboard';
861
+ options: SystemClipboardCommandOptions;
862
+ context?: TContext;
863
+ } | {
864
+ command: 'system.settings';
865
+ options?: SystemSettingsCommandOptions;
866
+ context?: TContext;
867
+ } | {
868
+ command: 'system.alert';
869
+ options?: SystemAlertCommandOptions;
870
+ context?: TContext;
871
+ } | {
872
+ command: 'system.appSwitcher';
873
+ options?: SystemAppSwitcherCommandOptions;
874
+ context?: TContext;
875
+ } | {
876
+ command: 'apps.open';
877
+ options: OpenAppCommandOptions;
878
+ context?: TContext;
879
+ } | {
880
+ command: 'apps.close';
881
+ options?: CloseAppCommandOptions;
882
+ context?: TContext;
883
+ } | {
884
+ command: 'apps.list';
885
+ options?: ListAppsCommandOptions;
886
+ context?: TContext;
887
+ } | {
888
+ command: 'apps.state';
889
+ options: GetAppStateCommandOptions;
890
+ context?: TContext;
891
+ } | {
892
+ command: 'apps.push';
893
+ options: PushAppCommandOptions;
894
+ context?: TContext;
895
+ } | {
896
+ command: 'apps.triggerEvent';
897
+ options: TriggerAppEventCommandOptions;
898
+ context?: TContext;
899
+ } | {
900
+ command: 'admin.devices';
901
+ options?: AdminDevicesCommandOptions;
902
+ context?: TContext;
903
+ } | {
904
+ command: 'admin.boot';
905
+ options?: AdminBootCommandOptions;
906
+ context?: TContext;
907
+ } | {
908
+ command: 'admin.ensureSimulator';
909
+ options: AdminEnsureSimulatorCommandOptions;
910
+ context?: TContext;
911
+ } | {
912
+ command: 'admin.install';
913
+ options: AdminInstallCommandOptions;
914
+ context?: TContext;
915
+ } | {
916
+ command: 'admin.reinstall';
917
+ options: AdminReinstallCommandOptions;
918
+ context?: TContext;
919
+ } | {
920
+ command: 'admin.installFromSource';
921
+ options: AdminInstallFromSourceCommandOptions;
922
+ context?: TContext;
923
+ } | {
924
+ command: 'record';
925
+ options: RecordingRecordCommandOptions;
926
+ context?: TContext;
927
+ } | {
928
+ command: 'trace';
929
+ options: RecordingTraceCommandOptions;
930
+ context?: TContext;
931
+ } | {
932
+ command: 'diagnostics.logs';
933
+ options?: DiagnosticsLogsCommandOptions;
934
+ context?: TContext;
935
+ } | {
936
+ command: 'diagnostics.network';
937
+ options?: DiagnosticsNetworkCommandOptions;
938
+ context?: TContext;
939
+ } | {
940
+ command: 'diagnostics.perf';
941
+ options?: DiagnosticsPerfCommandOptions;
942
+ context?: TContext;
943
+ } | {
944
+ command: 'batch';
945
+ options: BatchCommandOptions<TContext>;
946
+ context?: TContext;
319
947
  };
320
948
 
321
949
  export declare type CommandRouterResponse = {
@@ -326,7 +954,7 @@ export declare type CommandRouterResponse = {
326
954
  error: NormalizedError;
327
955
  };
328
956
 
329
- export declare type CommandRouterResult = ScreenshotCommandResult | DiffScreenshotCommandResult | SnapshotCommandResult | DiffSnapshotCommandResult | FindReadCommandResult | GetCommandResult | IsCommandResult | WaitCommandResult | PressCommandResult | FillCommandResult | TypeTextCommandResult;
957
+ 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;
330
958
 
331
959
  export declare const commands: AgentDeviceCommands;
332
960
 
@@ -354,6 +982,64 @@ declare type CreateTempFileOptions = {
354
982
  ext: string;
355
983
  };
356
984
 
985
+ export declare type DiagnosticsLogsCommandOptions = DiagnosticsPageOptions & {
986
+ levels?: readonly string[];
987
+ search?: string;
988
+ source?: string;
989
+ };
990
+
991
+ export declare type DiagnosticsLogsCommandResult = {
992
+ kind: 'diagnosticsLogs';
993
+ entries: readonly BackendLogEntry[];
994
+ nextCursor?: string;
995
+ timeWindow?: BackendDiagnosticsTimeWindow;
996
+ backend?: string;
997
+ redacted: boolean;
998
+ notes?: readonly string[];
999
+ };
1000
+
1001
+ export declare type DiagnosticsNetworkCommandOptions = DiagnosticsPageOptions & {
1002
+ include?: BackendNetworkIncludeMode;
1003
+ };
1004
+
1005
+ export declare type DiagnosticsNetworkCommandResult = {
1006
+ kind: 'diagnosticsNetwork';
1007
+ entries: readonly BackendNetworkEntry[];
1008
+ nextCursor?: string;
1009
+ timeWindow?: BackendDiagnosticsTimeWindow;
1010
+ backend?: string;
1011
+ redacted: boolean;
1012
+ notes?: readonly string[];
1013
+ };
1014
+
1015
+ declare type DiagnosticsPageOptions = CommandContext & {
1016
+ appId?: string;
1017
+ appBundleId?: string;
1018
+ since?: string;
1019
+ until?: string;
1020
+ cursor?: string;
1021
+ limit?: number;
1022
+ };
1023
+
1024
+ export declare type DiagnosticsPerfCommandOptions = CommandContext & {
1025
+ appId?: string;
1026
+ appBundleId?: string;
1027
+ since?: string;
1028
+ until?: string;
1029
+ sampleMs?: number;
1030
+ metrics?: readonly string[];
1031
+ };
1032
+
1033
+ export declare type DiagnosticsPerfCommandResult = {
1034
+ kind: 'diagnosticsPerf';
1035
+ metrics: readonly BackendPerfMetric[];
1036
+ startedAt?: string;
1037
+ endedAt?: string;
1038
+ backend?: string;
1039
+ redacted: boolean;
1040
+ notes?: readonly string[];
1041
+ };
1042
+
357
1043
  declare type DiagnosticsSink = {
358
1044
  emit(event: {
359
1045
  level: 'debug' | 'info' | 'warn' | 'error';
@@ -462,6 +1148,27 @@ export declare type FindReadCommandResult = {
462
1148
  node: SnapshotNode;
463
1149
  };
464
1150
 
1151
+ export declare type FocusCommandOptions = CommandContext & {
1152
+ target: InteractionTarget;
1153
+ };
1154
+
1155
+ export declare type FocusCommandResult = ResolvedInteractionTarget & {
1156
+ backendResult?: Record<string, unknown>;
1157
+ message?: string;
1158
+ };
1159
+
1160
+ declare type GestureDirection = 'up' | 'down' | 'left' | 'right';
1161
+
1162
+ export declare type GetAppStateCommandOptions = CommandContext & {
1163
+ app: string;
1164
+ };
1165
+
1166
+ export declare type GetAppStateCommandResult = {
1167
+ kind: 'appState';
1168
+ app: string;
1169
+ state: BackendAppState;
1170
+ };
1171
+
465
1172
  export declare type GetAttrsCommandOptions = CommandContext & SelectorSnapshotOptions & {
466
1173
  target: ElementTarget;
467
1174
  };
@@ -509,10 +1216,30 @@ export declare type IsSelectorCommandOptions = CommandContext & SelectorSnapshot
509
1216
  target: SelectorTarget;
510
1217
  };
511
1218
 
1219
+ export declare type ListAppsCommandOptions = CommandContext & {
1220
+ filter?: BackendAppListFilter;
1221
+ };
1222
+
1223
+ export declare type ListAppsCommandResult = {
1224
+ kind: 'appsList';
1225
+ apps: readonly BackendAppInfo[];
1226
+ };
1227
+
512
1228
  export declare type LiveScreenshotInputRef = {
513
1229
  kind: 'live';
514
1230
  };
515
1231
 
1232
+ export declare type LongPressCommandOptions = CommandContext & {
1233
+ target: InteractionTarget;
1234
+ durationMs?: number;
1235
+ };
1236
+
1237
+ export declare type LongPressCommandResult = ResolvedInteractionTarget & {
1238
+ durationMs?: number;
1239
+ backendResult?: Record<string, unknown>;
1240
+ message?: string;
1241
+ };
1242
+
516
1243
  declare type NormalizedError = {
517
1244
  code: string;
518
1245
  message: string;
@@ -522,8 +1249,34 @@ declare type NormalizedError = {
522
1249
  details?: Record<string, unknown>;
523
1250
  };
524
1251
 
1252
+ export declare type OpenAppCommandOptions = CommandContext & BackendOpenTarget & {
1253
+ relaunch?: boolean;
1254
+ };
1255
+
1256
+ export declare type OpenAppCommandResult = {
1257
+ kind: 'appOpened';
1258
+ target: BackendOpenTarget;
1259
+ relaunch: boolean;
1260
+ backendResult?: Record<string, unknown>;
1261
+ message?: string;
1262
+ };
1263
+
525
1264
  declare type OutputVisibility = 'client-visible' | 'internal';
526
1265
 
1266
+ export declare type PinchCommandOptions = CommandContext & {
1267
+ scale: number;
1268
+ center?: InteractionTarget;
1269
+ };
1270
+
1271
+ export declare type PinchCommandResult = {
1272
+ kind: 'pinch';
1273
+ scale: number;
1274
+ center?: Point;
1275
+ centerTarget?: ResolvedInteractionTarget;
1276
+ backendResult?: Record<string, unknown>;
1277
+ message?: string;
1278
+ };
1279
+
527
1280
  declare type Point = {
528
1281
  x: number;
529
1282
  y: number;
@@ -549,6 +1302,19 @@ export declare type PressCommandResult = ResolvedInteractionTarget & {
549
1302
  backendResult?: Record<string, unknown>;
550
1303
  };
551
1304
 
1305
+ export declare type PushAppCommandOptions = CommandContext & {
1306
+ app: string;
1307
+ input: AppPushInput;
1308
+ };
1309
+
1310
+ export declare type PushAppCommandResult = {
1311
+ kind: 'appPushed';
1312
+ app: string;
1313
+ inputKind: 'json' | 'file';
1314
+ backendResult?: Record<string, unknown>;
1315
+ message?: string;
1316
+ };
1317
+
552
1318
  declare type RawSnapshotNode = {
553
1319
  index: number;
554
1320
  type?: string;
@@ -572,6 +1338,39 @@ declare type RawSnapshotNode = {
572
1338
  hiddenContentBelow?: boolean;
573
1339
  };
574
1340
 
1341
+ export declare type RecordingRecordCommandOptions = CommandContext & {
1342
+ action: 'start' | 'stop';
1343
+ out?: FileOutputRef;
1344
+ fps?: number;
1345
+ quality?: number;
1346
+ hideTouches?: boolean;
1347
+ };
1348
+
1349
+ export declare type RecordingRecordCommandResult = {
1350
+ kind: 'recordingStarted' | 'recordingStopped';
1351
+ action: 'start' | 'stop';
1352
+ path?: string;
1353
+ telemetryPath?: string;
1354
+ artifact?: ArtifactDescriptor;
1355
+ backendResult?: Record<string, unknown>;
1356
+ warning?: string;
1357
+ message?: string;
1358
+ };
1359
+
1360
+ export declare type RecordingTraceCommandOptions = CommandContext & {
1361
+ action: 'start' | 'stop';
1362
+ out?: FileOutputRef;
1363
+ };
1364
+
1365
+ export declare type RecordingTraceCommandResult = {
1366
+ kind: 'traceStarted' | 'traceStopped';
1367
+ action: 'start' | 'stop';
1368
+ outPath?: string;
1369
+ artifact?: ArtifactDescriptor;
1370
+ backendResult?: Record<string, unknown>;
1371
+ message?: string;
1372
+ };
1373
+
575
1374
  declare type Rect = {
576
1375
  x: number;
577
1376
  y: number;
@@ -608,7 +1407,7 @@ declare type ResolvedInputFile = {
608
1407
  cleanup?: () => Promise<void>;
609
1408
  };
610
1409
 
611
- declare type ResolvedInteractionTarget = {
1410
+ export declare type ResolvedInteractionTarget = {
612
1411
  kind: 'point';
613
1412
  point: Point;
614
1413
  } | {
@@ -777,6 +1576,32 @@ declare type ScreenshotOverlayRef = {
777
1576
  center: Point;
778
1577
  };
779
1578
 
1579
+ export declare type ScrollCommandOptions = CommandContext & {
1580
+ target?: ScrollTarget;
1581
+ direction: GestureDirection;
1582
+ amount?: number;
1583
+ pixels?: number;
1584
+ };
1585
+
1586
+ export declare type ScrollCommandResult = {
1587
+ kind: 'viewport';
1588
+ direction: GestureDirection;
1589
+ amount?: number;
1590
+ pixels?: number;
1591
+ backendResult?: Record<string, unknown>;
1592
+ message?: string;
1593
+ } | (ResolvedInteractionTarget & {
1594
+ direction: GestureDirection;
1595
+ amount?: number;
1596
+ pixels?: number;
1597
+ backendResult?: Record<string, unknown>;
1598
+ message?: string;
1599
+ });
1600
+
1601
+ export declare type ScrollTarget = InteractionTarget | {
1602
+ kind: 'viewport';
1603
+ };
1604
+
780
1605
  export declare function selector(expression: string): SelectorTarget;
781
1606
 
782
1607
  export declare type SelectorSnapshotOptions = {
@@ -849,12 +1674,159 @@ declare type SnapshotVisibility = {
849
1674
 
850
1675
  declare type SnapshotVisibilityReason = 'offscreen-nodes' | 'scroll-hidden-above' | 'scroll-hidden-below';
851
1676
 
1677
+ export declare type SwipeCommandOptions = CommandContext & SwipeOptions;
1678
+
1679
+ export declare type SwipeCommandResult = {
1680
+ kind: 'swipe';
1681
+ from: Point;
1682
+ to: Point;
1683
+ direction?: GestureDirection;
1684
+ distance?: number;
1685
+ durationMs?: number;
1686
+ fromTarget?: ResolvedInteractionTarget | {
1687
+ kind: 'viewport';
1688
+ };
1689
+ backendResult?: Record<string, unknown>;
1690
+ message?: string;
1691
+ };
1692
+
1693
+ export declare type SwipeOptions = {
1694
+ from?: Point | InteractionTarget;
1695
+ to?: Point;
1696
+ direction?: GestureDirection;
1697
+ distance?: number;
1698
+ durationMs?: number;
1699
+ };
1700
+
1701
+ export declare type SystemAlertCommandOptions = CommandContext & {
1702
+ action?: BackendAlertAction;
1703
+ timeoutMs?: number;
1704
+ };
1705
+
1706
+ export declare type SystemAlertCommandResult = {
1707
+ kind: 'alertStatus';
1708
+ action: 'get';
1709
+ alert: BackendAlertInfo | null;
1710
+ } | {
1711
+ kind: 'alertHandled';
1712
+ action: 'accept' | 'dismiss';
1713
+ handled: boolean;
1714
+ alert?: BackendAlertInfo;
1715
+ button?: string;
1716
+ message?: string;
1717
+ } | {
1718
+ kind: 'alertWait';
1719
+ action: 'wait';
1720
+ alert: BackendAlertInfo | null;
1721
+ waitedMs?: number;
1722
+ timedOut?: boolean;
1723
+ message?: string;
1724
+ };
1725
+
1726
+ export declare type SystemAppSwitcherCommandOptions = CommandContext;
1727
+
1728
+ export declare type SystemAppSwitcherCommandResult = {
1729
+ kind: 'appSwitcherOpened';
1730
+ backendResult?: Record<string, unknown>;
1731
+ message?: string;
1732
+ };
1733
+
1734
+ export declare type SystemBackCommandOptions = CommandContext & {
1735
+ mode?: 'in-app' | 'system';
1736
+ };
1737
+
1738
+ export declare type SystemBackCommandResult = {
1739
+ kind: 'systemBack';
1740
+ mode: 'in-app' | 'system';
1741
+ backendResult?: Record<string, unknown>;
1742
+ message?: string;
1743
+ };
1744
+
1745
+ export declare type SystemClipboardCommandOptions = (CommandContext & {
1746
+ action: 'read';
1747
+ }) | (CommandContext & {
1748
+ action: 'write';
1749
+ text: string;
1750
+ });
1751
+
1752
+ export declare type SystemClipboardCommandResult = {
1753
+ kind: 'clipboardText';
1754
+ action: 'read';
1755
+ text: string;
1756
+ } | {
1757
+ kind: 'clipboardUpdated';
1758
+ action: 'write';
1759
+ textLength: number;
1760
+ backendResult?: Record<string, unknown>;
1761
+ message?: string;
1762
+ };
1763
+
1764
+ export declare type SystemHomeCommandOptions = CommandContext;
1765
+
1766
+ export declare type SystemHomeCommandResult = {
1767
+ kind: 'systemHome';
1768
+ backendResult?: Record<string, unknown>;
1769
+ message?: string;
1770
+ };
1771
+
1772
+ export declare type SystemKeyboardCommandOptions = CommandContext & {
1773
+ action?: 'status' | 'get' | 'dismiss';
1774
+ };
1775
+
1776
+ export declare type SystemKeyboardCommandResult = {
1777
+ kind: 'keyboardState';
1778
+ action: 'status' | 'get';
1779
+ state: BackendKeyboardResult;
1780
+ backendResult?: Record<string, unknown>;
1781
+ } | {
1782
+ kind: 'keyboardDismissed';
1783
+ action: 'dismiss';
1784
+ state: BackendKeyboardResult;
1785
+ backendResult?: Record<string, unknown>;
1786
+ message?: string;
1787
+ };
1788
+
1789
+ export declare type SystemRotateCommandOptions = CommandContext & {
1790
+ orientation: BackendDeviceOrientation;
1791
+ };
1792
+
1793
+ export declare type SystemRotateCommandResult = {
1794
+ kind: 'systemRotated';
1795
+ orientation: BackendDeviceOrientation;
1796
+ backendResult?: Record<string, unknown>;
1797
+ message?: string;
1798
+ };
1799
+
1800
+ export declare type SystemSettingsCommandOptions = CommandContext & {
1801
+ target?: string;
1802
+ };
1803
+
1804
+ export declare type SystemSettingsCommandResult = {
1805
+ kind: 'settingsOpened';
1806
+ target?: string;
1807
+ backendResult?: Record<string, unknown>;
1808
+ message?: string;
1809
+ };
1810
+
852
1811
  declare type TemporaryFile = {
853
1812
  path: string;
854
1813
  visibility: 'internal';
855
1814
  cleanup: () => Promise<void>;
856
1815
  };
857
1816
 
1817
+ export declare type TriggerAppEventCommandOptions = CommandContext & {
1818
+ name: string;
1819
+ payload?: Record<string, unknown>;
1820
+ };
1821
+
1822
+ export declare type TriggerAppEventCommandResult = {
1823
+ kind: 'appEventTriggered';
1824
+ name: string;
1825
+ payload?: Record<string, unknown>;
1826
+ backendResult?: Record<string, unknown>;
1827
+ message?: string;
1828
+ };
1829
+
858
1830
  export declare type TypeTextCommandOptions = CommandContext & {
859
1831
  text: string;
860
1832
  delayMs?: number;