agent-device 0.13.2 → 0.14.0

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 (65) hide show
  1. package/README.md +68 -63
  2. package/android-snapshot-helper/README.md +75 -0
  3. package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.14.0.apk +0 -0
  4. package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.14.0.apk.sha256 +1 -0
  5. package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.14.0.manifest.json +17 -0
  6. package/bin/agent-device.mjs +6 -2
  7. package/dist/src/113.js +1 -1
  8. package/dist/src/1974.js +2 -2
  9. package/dist/src/221.js +4 -0
  10. package/dist/src/2301.js +1 -1
  11. package/dist/src/3918.js +29 -29
  12. package/dist/src/7847.js +1 -1
  13. package/dist/src/8161.js +3 -0
  14. package/dist/src/8656.js +1 -1
  15. package/dist/src/9152.js +1 -1
  16. package/dist/src/940.js +1 -0
  17. package/dist/src/9542.js +2 -2
  18. package/dist/src/9818.js +1 -1
  19. package/dist/src/989.js +1 -1
  20. package/dist/src/android-snapshot-helper.d.ts +181 -0
  21. package/dist/src/android-snapshot-helper.js +1 -0
  22. package/dist/src/index.d.ts +204 -1942
  23. package/dist/src/index.js +1 -1
  24. package/dist/src/internal/bin.js +440 -0
  25. package/dist/src/internal/companion-tunnel.js +1 -0
  26. package/dist/src/internal/daemon.js +45 -0
  27. package/dist/src/internal/update-check-entry.js +1 -0
  28. package/dist/src/metro.d.ts +5 -3
  29. package/dist/src/selectors.js +1 -1
  30. package/package.json +28 -24
  31. package/skills/agent-device/SKILL.md +20 -62
  32. package/skills/dogfood/SKILL.md +9 -168
  33. package/skills/react-devtools/SKILL.md +15 -31
  34. package/dist/src/4993.js +0 -1
  35. package/dist/src/5721.js +0 -1
  36. package/dist/src/7166.js +0 -1
  37. package/dist/src/8564.js +0 -3
  38. package/dist/src/9076.js +0 -1
  39. package/dist/src/backend.d.ts +0 -527
  40. package/dist/src/backend.js +0 -1
  41. package/dist/src/bin.js +0 -105
  42. package/dist/src/commands/index.d.ts +0 -1883
  43. package/dist/src/commands/index.js +0 -1
  44. package/dist/src/daemon.js +0 -43
  45. package/dist/src/metro-companion.js +0 -1
  46. package/dist/src/observability.d.ts +0 -91
  47. package/dist/src/observability.js +0 -1
  48. package/dist/src/testing/conformance.d.ts +0 -753
  49. package/dist/src/testing/conformance.js +0 -1
  50. package/dist/src/update-check-entry.js +0 -1
  51. package/skills/agent-device/references/bootstrap-install.md +0 -244
  52. package/skills/agent-device/references/coordinate-system.md +0 -28
  53. package/skills/agent-device/references/debugging.md +0 -138
  54. package/skills/agent-device/references/exploration.md +0 -362
  55. package/skills/agent-device/references/macos-desktop.md +0 -88
  56. package/skills/agent-device/references/remote-tenancy.md +0 -188
  57. package/skills/agent-device/references/verification.md +0 -134
  58. package/skills/dogfood/references/issue-taxonomy.md +0 -83
  59. package/skills/dogfood/templates/dogfood-report-template.md +0 -52
  60. package/skills/react-devtools/references/commands.md +0 -91
  61. package/skills/react-devtools/references/profiling.md +0 -74
  62. /package/dist/src/{bin.d.ts → internal/bin.d.ts} +0 -0
  63. /package/dist/src/{daemon.d.ts → internal/companion-tunnel.d.ts} +0 -0
  64. /package/dist/src/{metro-companion.d.ts → internal/daemon.d.ts} +0 -0
  65. /package/dist/src/{update-check-entry.d.ts → internal/update-check-entry.d.ts} +0 -0
@@ -1,753 +0,0 @@
1
- export declare const adminConformanceSuite: CommandConformanceSuite;
2
-
3
- declare type AgentDeviceBackend = {
4
- platform: AgentDeviceBackendPlatform;
5
- capabilities?: BackendCapabilitySet;
6
- escapeHatches?: BackendEscapeHatches;
7
- captureSnapshot?(context: BackendCommandContext, options?: BackendSnapshotOptions): Promise<BackendSnapshotResult>;
8
- captureScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
9
- readText?(context: BackendCommandContext, node: SnapshotNode): Promise<BackendReadTextResult>;
10
- findText?(context: BackendCommandContext, text: string): Promise<BackendFindTextResult>;
11
- tap?(context: BackendCommandContext, point: Point, options?: BackendTapOptions): Promise<BackendActionResult>;
12
- fill?(context: BackendCommandContext, point: Point, text: string, options?: BackendFillOptions): Promise<BackendActionResult>;
13
- typeText?(context: BackendCommandContext, text: string, options?: {
14
- delayMs?: number;
15
- }): Promise<BackendActionResult>;
16
- focus?(context: BackendCommandContext, point: Point): Promise<BackendActionResult>;
17
- longPress?(context: BackendCommandContext, point: Point, options?: BackendLongPressOptions): Promise<BackendActionResult>;
18
- swipe?(context: BackendCommandContext, from: Point, to: Point, options?: BackendSwipeOptions): Promise<BackendActionResult>;
19
- scroll?(context: BackendCommandContext, target: BackendScrollTarget, options: BackendScrollOptions): Promise<BackendActionResult>;
20
- pinch?(context: BackendCommandContext, options: BackendPinchOptions): Promise<BackendActionResult>;
21
- pressKey?(context: BackendCommandContext, key: string, options?: {
22
- modifiers?: string[];
23
- }): Promise<BackendActionResult>;
24
- pressBack?(context: BackendCommandContext, options?: BackendBackOptions): Promise<BackendActionResult>;
25
- pressHome?(context: BackendCommandContext): Promise<BackendActionResult>;
26
- rotate?(context: BackendCommandContext, orientation: BackendDeviceOrientation): Promise<BackendActionResult>;
27
- setKeyboard?(context: BackendCommandContext, options: BackendKeyboardOptions): Promise<BackendKeyboardResult | BackendActionResult>;
28
- getClipboard?(context: BackendCommandContext): Promise<string | BackendClipboardTextResult>;
29
- setClipboard?(context: BackendCommandContext, text: string): Promise<BackendActionResult>;
30
- openSettings?(context: BackendCommandContext, target?: string): Promise<BackendActionResult>;
31
- handleAlert?(context: BackendCommandContext, action: BackendAlertAction, options?: {
32
- timeoutMs?: number;
33
- }): Promise<BackendAlertResult>;
34
- openAppSwitcher?(context: BackendCommandContext): Promise<BackendActionResult>;
35
- openApp?(context: BackendCommandContext, target: BackendOpenTarget, options?: BackendOpenOptions): Promise<BackendActionResult>;
36
- closeApp?(context: BackendCommandContext, app?: string): Promise<BackendActionResult>;
37
- listApps?(context: BackendCommandContext, filter?: BackendAppListFilter): Promise<readonly BackendAppInfo[]>;
38
- getAppState?(context: BackendCommandContext, app: string): Promise<BackendAppState>;
39
- pushFile?(context: BackendCommandContext, input: BackendPushInput, target: string): Promise<BackendActionResult>;
40
- triggerAppEvent?(context: BackendCommandContext, event: BackendAppEvent): Promise<BackendActionResult>;
41
- listDevices?(context: BackendCommandContext, filter?: BackendDeviceFilter): Promise<readonly BackendDeviceInfo[]>;
42
- bootDevice?(context: BackendCommandContext, target?: BackendDeviceTarget): Promise<BackendActionResult>;
43
- ensureSimulator?(context: BackendCommandContext, options: BackendEnsureSimulatorOptions): Promise<BackendEnsureSimulatorResult>;
44
- resolveInstallSource?(context: BackendCommandContext, source: BackendInstallSource): Promise<BackendInstallSource>;
45
- installApp?(context: BackendCommandContext, target: BackendInstallTarget): Promise<BackendInstallResult>;
46
- reinstallApp?(context: BackendCommandContext, target: BackendInstallTarget): Promise<BackendInstallResult>;
47
- startRecording?(context: BackendCommandContext, options?: BackendRecordingOptions): Promise<BackendRecordingResult>;
48
- stopRecording?(context: BackendCommandContext, options?: BackendRecordingOptions): Promise<BackendRecordingResult>;
49
- startTrace?(context: BackendCommandContext, options?: BackendTraceOptions): Promise<BackendTraceResult>;
50
- stopTrace?(context: BackendCommandContext, options?: BackendTraceOptions): Promise<BackendTraceResult>;
51
- readLogs?(context: BackendCommandContext, options?: BackendReadLogsOptions): Promise<BackendReadLogsResult>;
52
- dumpNetwork?(context: BackendCommandContext, options?: BackendDumpNetworkOptions): Promise<BackendDumpNetworkResult>;
53
- measurePerf?(context: BackendCommandContext, options?: BackendMeasurePerfOptions): Promise<BackendMeasurePerfResult>;
54
- };
55
-
56
- declare type AgentDeviceBackendPlatform = 'ios' | 'android' | 'macos' | 'linux';
57
-
58
- declare type AgentDeviceRuntime = {
59
- backend: AgentDeviceBackend;
60
- artifacts: ArtifactAdapter;
61
- sessions: CommandSessionStore;
62
- policy: CommandPolicy;
63
- diagnostics?: DiagnosticsSink;
64
- clock?: CommandClock;
65
- signal?: AbortSignal;
66
- };
67
-
68
- export declare const appsConformanceSuite: CommandConformanceSuite;
69
-
70
- declare type ArtifactAdapter = {
71
- resolveInput(ref: FileInputRef, options: ResolveInputOptions): Promise<ResolvedInputFile>;
72
- reserveOutput(ref: FileOutputRef | undefined, options: ReserveOutputOptions): Promise<ReservedOutputFile>;
73
- createTempFile(options: CreateTempFileOptions): Promise<TemporaryFile>;
74
- };
75
-
76
- declare type ArtifactDescriptor = {
77
- kind: 'localPath';
78
- field: string;
79
- path: string;
80
- fileName?: string;
81
- metadata?: Record<string, unknown>;
82
- } | {
83
- kind: 'artifact';
84
- field: string;
85
- artifactId: string;
86
- fileName?: string;
87
- url?: string;
88
- clientPath?: string;
89
- metadata?: Record<string, unknown>;
90
- };
91
-
92
- export declare function assertCommandConformance(target: CommandConformanceTarget, options?: {
93
- suites?: readonly CommandConformanceSuite[];
94
- }): Promise<CommandConformanceReport>;
95
-
96
- declare const BACKEND_CAPABILITY_NAMES: readonly ["android.shell", "ios.runnerCommand", "macos.desktopScreenshot"];
97
-
98
- declare type BackendActionResult = Record<string, unknown> | void;
99
-
100
- declare type BackendAlertAction = 'get' | 'accept' | 'dismiss' | 'wait';
101
-
102
- declare type BackendAlertInfo = {
103
- title?: string;
104
- message?: string;
105
- buttons?: string[];
106
- };
107
-
108
- declare type BackendAlertResult = {
109
- kind: 'alertStatus';
110
- alert: BackendAlertInfo | null;
111
- } | {
112
- kind: 'alertHandled';
113
- handled: boolean;
114
- alert?: BackendAlertInfo;
115
- button?: string;
116
- } | {
117
- kind: 'alertWait';
118
- alert: BackendAlertInfo | null;
119
- waitedMs?: number;
120
- timedOut?: boolean;
121
- };
122
-
123
- declare type BackendAppEvent = {
124
- name: string;
125
- payload?: Record<string, unknown>;
126
- };
127
-
128
- declare type BackendAppInfo = {
129
- id: string;
130
- name?: string;
131
- bundleId?: string;
132
- packageName?: string;
133
- activity?: string;
134
- };
135
-
136
- declare type BackendAppListFilter = 'all' | 'user-installed';
137
-
138
- declare type BackendAppState = {
139
- appId?: string;
140
- bundleId?: string;
141
- packageName?: string;
142
- activity?: string;
143
- state?: 'unknown' | 'notRunning' | 'running' | 'foreground' | 'background';
144
- details?: Record<string, unknown>;
145
- };
146
-
147
- declare type BackendBackOptions = {
148
- mode?: 'in-app' | 'system';
149
- };
150
-
151
- declare type BackendCapabilityName = (typeof BACKEND_CAPABILITY_NAMES)[number];
152
-
153
- declare type BackendCapabilitySet = readonly BackendCapabilityName[];
154
-
155
- declare type BackendClipboardTextResult = {
156
- text: string;
157
- };
158
-
159
- declare type BackendCommandContext = {
160
- session?: string;
161
- requestId?: string;
162
- appId?: string;
163
- appBundleId?: string;
164
- signal?: AbortSignal;
165
- metadata?: Record<string, unknown>;
166
- };
167
-
168
- declare type BackendDeviceFilter = {
169
- platform?: AgentDeviceBackendPlatform | 'apple';
170
- target?: 'mobile' | 'tv' | 'desktop';
171
- kind?: 'simulator' | 'emulator' | 'device' | 'desktop';
172
- };
173
-
174
- declare type BackendDeviceInfo = {
175
- id: string;
176
- name: string;
177
- platform: AgentDeviceBackendPlatform;
178
- target?: 'mobile' | 'tv' | 'desktop';
179
- kind?: 'simulator' | 'emulator' | 'device' | 'desktop';
180
- booted?: boolean;
181
- details?: Record<string, unknown>;
182
- };
183
-
184
- declare type BackendDeviceOrientation = 'portrait' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right';
185
-
186
- declare type BackendDeviceTarget = {
187
- id?: string;
188
- name?: string;
189
- platform?: AgentDeviceBackendPlatform;
190
- target?: 'mobile' | 'tv' | 'desktop';
191
- headless?: boolean;
192
- };
193
-
194
- declare type BackendDiagnosticsPageOptions = BackendDiagnosticsTimeWindow & {
195
- cursor?: string;
196
- limit?: number;
197
- };
198
-
199
- declare type BackendDiagnosticsTimeWindow = {
200
- since?: string;
201
- until?: string;
202
- };
203
-
204
- declare type BackendDumpNetworkOptions = BackendDiagnosticsPageOptions & {
205
- include?: BackendNetworkIncludeMode;
206
- };
207
-
208
- declare type BackendDumpNetworkResult = {
209
- entries: readonly BackendNetworkEntry[];
210
- nextCursor?: string;
211
- timeWindow?: BackendDiagnosticsTimeWindow;
212
- backend?: string;
213
- redacted?: boolean;
214
- notes?: readonly string[];
215
- };
216
-
217
- declare type BackendEnsureSimulatorOptions = {
218
- device: string;
219
- runtime?: string;
220
- boot?: boolean;
221
- reuseExisting?: boolean;
222
- };
223
-
224
- declare type BackendEnsureSimulatorResult = {
225
- udid: string;
226
- device: string;
227
- runtime: string;
228
- created: boolean;
229
- booted: boolean;
230
- simulatorSetPath?: string | null;
231
- };
232
-
233
- declare type BackendEscapeHatches = {
234
- androidShell?(context: BackendCommandContext, args: readonly string[]): Promise<BackendShellResult>;
235
- iosRunnerCommand?(context: BackendCommandContext, command: BackendRunnerCommand): Promise<BackendActionResult>;
236
- macosDesktopScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
237
- };
238
-
239
- declare type BackendFillOptions = {
240
- delayMs?: number;
241
- };
242
-
243
- declare type BackendFindTextResult = {
244
- found: boolean;
245
- };
246
-
247
- declare type BackendInstallResult = Record<string, unknown> & {
248
- appId?: string;
249
- appName?: string;
250
- bundleId?: string;
251
- packageName?: string;
252
- launchTarget?: string;
253
- installablePath?: string;
254
- archivePath?: string;
255
- };
256
-
257
- declare type BackendInstallSource = {
258
- kind: 'path';
259
- path: string;
260
- } | {
261
- kind: 'uploadedArtifact';
262
- id: string;
263
- } | {
264
- kind: 'url';
265
- url: string;
266
- };
267
-
268
- declare type BackendInstallTarget = {
269
- app?: string;
270
- source: BackendInstallSource;
271
- };
272
-
273
- declare type BackendKeyboardOptions = {
274
- action: 'status' | 'get' | 'dismiss';
275
- };
276
-
277
- declare type BackendKeyboardResult = {
278
- platform?: 'android' | 'ios' | 'macos' | 'linux';
279
- action?: BackendKeyboardOptions['action'];
280
- visible?: boolean;
281
- inputType?: string | null;
282
- type?: string | null;
283
- wasVisible?: boolean;
284
- dismissed?: boolean;
285
- attempts?: number;
286
- };
287
-
288
- declare type BackendLogEntry = {
289
- timestamp?: string;
290
- level?: 'debug' | 'info' | 'warn' | 'error' | string;
291
- message: string;
292
- source?: string;
293
- metadata?: Record<string, unknown>;
294
- };
295
-
296
- declare type BackendLongPressOptions = {
297
- durationMs?: number;
298
- };
299
-
300
- declare type BackendMeasurePerfOptions = BackendDiagnosticsTimeWindow & {
301
- sampleMs?: number;
302
- metrics?: readonly string[];
303
- };
304
-
305
- declare type BackendMeasurePerfResult = {
306
- metrics: readonly BackendPerfMetric[];
307
- startedAt?: string;
308
- endedAt?: string;
309
- backend?: string;
310
- redacted?: boolean;
311
- notes?: readonly string[];
312
- };
313
-
314
- declare type BackendNetworkEntry = {
315
- timestamp?: string;
316
- method?: string;
317
- url?: string;
318
- status?: number;
319
- durationMs?: number;
320
- requestHeaders?: Record<string, string>;
321
- responseHeaders?: Record<string, string>;
322
- requestBody?: string;
323
- responseBody?: string;
324
- metadata?: Record<string, unknown>;
325
- };
326
-
327
- declare type BackendNetworkIncludeMode = 'summary' | 'headers' | 'body' | 'all';
328
-
329
- declare type BackendOpenOptions = {
330
- relaunch?: boolean;
331
- };
332
-
333
- declare type BackendOpenTarget = {
334
- /**
335
- * Generic app identifier accepted by the backend. Hosted adapters should
336
- * prefer structured appId, bundleId, or packageName when available.
337
- */
338
- app?: string;
339
- appId?: string;
340
- bundleId?: string;
341
- packageName?: string;
342
- /**
343
- * URL may be used by itself for a deep link or with an app identifier when
344
- * the backend supports opening a URL in a specific app context.
345
- */
346
- url?: string;
347
- /**
348
- * Platform-specific activity override, primarily for Android app launches.
349
- */
350
- activity?: string;
351
- };
352
-
353
- declare type BackendPerfMetric = {
354
- name: string;
355
- value?: number;
356
- unit?: string;
357
- status?: 'ok' | 'unavailable' | 'error';
358
- message?: string;
359
- metadata?: Record<string, unknown>;
360
- };
361
-
362
- declare type BackendPinchOptions = {
363
- scale: number;
364
- center?: Point;
365
- };
366
-
367
- declare type BackendPushInput = {
368
- kind: 'json';
369
- payload: Record<string, unknown>;
370
- } | {
371
- kind: 'file';
372
- path: string;
373
- };
374
-
375
- declare type BackendReadLogsOptions = BackendDiagnosticsPageOptions & {
376
- levels?: readonly string[];
377
- search?: string;
378
- source?: string;
379
- };
380
-
381
- declare type BackendReadLogsResult = {
382
- entries: readonly BackendLogEntry[];
383
- nextCursor?: string;
384
- timeWindow?: BackendDiagnosticsTimeWindow;
385
- backend?: string;
386
- redacted?: boolean;
387
- notes?: readonly string[];
388
- };
389
-
390
- declare type BackendReadTextResult = {
391
- text: string;
392
- };
393
-
394
- declare type BackendRecordingOptions = {
395
- outPath?: string;
396
- fps?: number;
397
- quality?: number;
398
- showTouches?: boolean;
399
- };
400
-
401
- declare type BackendRecordingResult = Record<string, unknown> & {
402
- path?: string;
403
- telemetryPath?: string;
404
- warning?: string;
405
- };
406
-
407
- declare type BackendRunnerCommand = {
408
- command: string;
409
- args?: readonly string[];
410
- payload?: Record<string, unknown>;
411
- };
412
-
413
- declare type BackendScreenshotOptions = {
414
- fullscreen?: boolean;
415
- overlayRefs?: boolean;
416
- surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
417
- };
418
-
419
- declare type BackendScreenshotResult = {
420
- path?: string;
421
- overlayRefs?: ScreenshotOverlayRef[];
422
- };
423
-
424
- declare type BackendScrollOptions = {
425
- direction: 'up' | 'down' | 'left' | 'right';
426
- amount?: number;
427
- pixels?: number;
428
- };
429
-
430
- declare type BackendScrollTarget = {
431
- kind: 'viewport';
432
- } | {
433
- kind: 'point';
434
- point: Point;
435
- };
436
-
437
- declare type BackendShellResult = {
438
- exitCode: number;
439
- stdout: string;
440
- stderr: string;
441
- };
442
-
443
- declare type BackendSnapshotAnalysis = {
444
- rawNodeCount?: number;
445
- maxDepth?: number;
446
- };
447
-
448
- declare type BackendSnapshotFreshness = {
449
- action: string;
450
- retryCount: number;
451
- staleAfterRetries: boolean;
452
- reason?: 'empty-interactive' | 'sharp-drop' | 'stuck-route';
453
- };
454
-
455
- declare type BackendSnapshotOptions = SnapshotOptions & {
456
- outPath?: string;
457
- };
458
-
459
- declare type BackendSnapshotResult = {
460
- nodes?: SnapshotNode[];
461
- truncated?: boolean;
462
- backend?: string;
463
- snapshot?: SnapshotState;
464
- analysis?: BackendSnapshotAnalysis;
465
- freshness?: BackendSnapshotFreshness;
466
- warnings?: string[];
467
- appName?: string;
468
- appBundleId?: string;
469
- };
470
-
471
- declare type BackendSwipeOptions = {
472
- durationMs?: number;
473
- };
474
-
475
- declare type BackendTapOptions = {
476
- button?: 'primary' | 'secondary' | 'middle';
477
- count?: number;
478
- intervalMs?: number;
479
- holdMs?: number;
480
- jitterPx?: number;
481
- doubleTap?: boolean;
482
- };
483
-
484
- declare type BackendTraceOptions = {
485
- outPath?: string;
486
- };
487
-
488
- declare type BackendTraceResult = Record<string, unknown> & {
489
- outPath?: string;
490
- };
491
-
492
- export declare const captureConformanceSuite: CommandConformanceSuite;
493
-
494
- declare type CommandClock = {
495
- now(): number;
496
- sleep(ms: number): Promise<void>;
497
- };
498
-
499
- export declare type CommandConformanceCase = {
500
- name: string;
501
- command: string;
502
- run(runtime: AgentDeviceRuntime, fixtures: CommandConformanceFixtures): Promise<void>;
503
- };
504
-
505
- export declare type CommandConformanceCaseContext = {
506
- suite: string;
507
- caseName: string;
508
- fixtures: CommandConformanceFixtures;
509
- };
510
-
511
- export declare type CommandConformanceFailure = {
512
- suite: string;
513
- caseName: string;
514
- command: string;
515
- error: unknown;
516
- };
517
-
518
- export declare type CommandConformanceFixtures = {
519
- session: string;
520
- app: string;
521
- installSourcePath: string;
522
- appEventName: string;
523
- appPushPayload: Record<string, unknown>;
524
- visibleSelector: string;
525
- visibleText: string;
526
- editableTarget: InteractionTarget;
527
- fillText: string;
528
- point: Point;
529
- swipeTo: Point;
530
- };
531
-
532
- export declare type CommandConformanceReport = {
533
- target: string;
534
- passed: number;
535
- failed: number;
536
- failures: CommandConformanceFailure[];
537
- suites: CommandConformanceSuiteResult[];
538
- };
539
-
540
- export declare type CommandConformanceSuite = {
541
- name: string;
542
- cases: readonly CommandConformanceCase[];
543
- run(target: CommandConformanceTarget): Promise<CommandConformanceSuiteResult>;
544
- };
545
-
546
- export declare type CommandConformanceSuiteResult = {
547
- suite: string;
548
- passed: number;
549
- failed: number;
550
- failures: CommandConformanceFailure[];
551
- };
552
-
553
- export declare const commandConformanceSuites: readonly CommandConformanceSuite[];
554
-
555
- export declare type CommandConformanceTarget = {
556
- name: string;
557
- createRuntime: ConformanceRuntimeFactory;
558
- fixtures?: Partial<CommandConformanceFixtures>;
559
- beforeEach?(context: CommandConformanceCaseContext): void | Promise<void>;
560
- afterEach?(context: CommandConformanceCaseContext): void | Promise<void>;
561
- };
562
-
563
- declare type CommandPolicy = {
564
- allowLocalInputPaths: boolean;
565
- allowLocalOutputPaths: boolean;
566
- maxImagePixels: number;
567
- allowNamedBackendCapabilities: readonly BackendCapabilityName[];
568
- };
569
-
570
- declare type CommandSessionRecord = {
571
- name: string;
572
- appId?: string;
573
- appBundleId?: string;
574
- appName?: string;
575
- backendSessionId?: string;
576
- snapshot?: SnapshotState;
577
- metadata?: Record<string, unknown>;
578
- };
579
-
580
- declare type CommandSessionStore = {
581
- get(name: string): CommandSessionRecord | undefined | Promise<CommandSessionRecord | undefined>;
582
- set(record: CommandSessionRecord): void | Promise<void>;
583
- delete?(name: string): void | Promise<void>;
584
- list?(): readonly CommandSessionRecord[] | Promise<readonly CommandSessionRecord[]>;
585
- };
586
-
587
- export declare type ConformanceRuntimeFactory = () => AgentDeviceRuntime | Promise<AgentDeviceRuntime>;
588
-
589
- declare type CreateTempFileOptions = {
590
- prefix: string;
591
- ext: string;
592
- };
593
-
594
- export declare const defaultCommandConformanceFixtures: CommandConformanceFixtures;
595
-
596
- export declare const diagnosticsConformanceSuite: CommandConformanceSuite;
597
-
598
- declare type DiagnosticsSink = {
599
- emit(event: {
600
- level: 'debug' | 'info' | 'warn' | 'error';
601
- message: string;
602
- data?: unknown;
603
- }): void;
604
- };
605
-
606
- declare type ElementTarget = SelectorTarget | RefTarget;
607
-
608
- declare type FileInputRef = {
609
- kind: 'path';
610
- path: string;
611
- } | {
612
- kind: 'uploadedArtifact';
613
- id: string;
614
- };
615
-
616
- declare type FileOutputRef = {
617
- kind: 'path';
618
- path: string;
619
- } | {
620
- kind: 'downloadableArtifact';
621
- clientPath?: string;
622
- fileName?: string;
623
- };
624
-
625
- export declare const interactionConformanceSuite: CommandConformanceSuite;
626
-
627
- declare type InteractionTarget = ElementTarget | PointTarget;
628
-
629
- declare type OutputVisibility = 'client-visible' | 'internal';
630
-
631
- declare type Point = {
632
- x: number;
633
- y: number;
634
- };
635
-
636
- declare type PointTarget = {
637
- kind: 'point';
638
- x: number;
639
- y: number;
640
- };
641
-
642
- declare type RawSnapshotNode = {
643
- index: number;
644
- type?: string;
645
- role?: string;
646
- subrole?: string;
647
- label?: string;
648
- value?: string;
649
- identifier?: string;
650
- rect?: Rect;
651
- enabled?: boolean;
652
- selected?: boolean;
653
- hittable?: boolean;
654
- depth?: number;
655
- parentIndex?: number;
656
- pid?: number;
657
- bundleId?: string;
658
- appName?: string;
659
- windowTitle?: string;
660
- surface?: string;
661
- hiddenContentAbove?: boolean;
662
- hiddenContentBelow?: boolean;
663
- };
664
-
665
- export declare const recordingConformanceSuite: CommandConformanceSuite;
666
-
667
- declare type Rect = {
668
- x: number;
669
- y: number;
670
- width: number;
671
- height: number;
672
- };
673
-
674
- declare type RefTarget = {
675
- kind: 'ref';
676
- ref: string;
677
- fallbackLabel?: string;
678
- };
679
-
680
- declare type ReservedOutputFile = {
681
- path: string;
682
- visibility: OutputVisibility;
683
- publish: () => Promise<ArtifactDescriptor | undefined>;
684
- cleanup?: () => Promise<void>;
685
- };
686
-
687
- declare type ReserveOutputOptions = {
688
- field: string;
689
- ext: string;
690
- requestedClientPath?: string;
691
- visibility?: OutputVisibility;
692
- };
693
-
694
- declare type ResolvedInputFile = {
695
- path: string;
696
- cleanup?: () => Promise<void>;
697
- };
698
-
699
- declare type ResolveInputOptions = {
700
- usage: string;
701
- field?: string;
702
- };
703
-
704
- export declare function runCommandConformance(target: CommandConformanceTarget, options?: {
705
- suites?: readonly CommandConformanceSuite[];
706
- }): Promise<CommandConformanceReport>;
707
-
708
- declare type ScreenshotOverlayRef = {
709
- ref: string;
710
- label?: string;
711
- rect: Rect;
712
- overlayRect: Rect;
713
- center: Point;
714
- };
715
-
716
- export declare const selectorConformanceSuite: CommandConformanceSuite;
717
-
718
- declare type SelectorTarget = {
719
- kind: 'selector';
720
- selector: string;
721
- };
722
-
723
- declare type SnapshotBackend = 'xctest' | 'android' | 'macos-helper' | 'linux-atspi';
724
-
725
- declare type SnapshotNode = RawSnapshotNode & {
726
- ref: string;
727
- };
728
-
729
- declare type SnapshotOptions = {
730
- interactiveOnly?: boolean;
731
- compact?: boolean;
732
- depth?: number;
733
- scope?: string;
734
- raw?: boolean;
735
- };
736
-
737
- declare type SnapshotState = {
738
- nodes: SnapshotNode[];
739
- createdAt: number;
740
- truncated?: boolean;
741
- backend?: SnapshotBackend;
742
- comparisonSafe?: boolean;
743
- };
744
-
745
- export declare const systemConformanceSuite: CommandConformanceSuite;
746
-
747
- declare type TemporaryFile = {
748
- path: string;
749
- visibility: 'internal';
750
- cleanup: () => Promise<void>;
751
- };
752
-
753
- export { }