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,527 +0,0 @@
1
- export declare type AgentDeviceBackend = {
2
- platform: AgentDeviceBackendPlatform;
3
- capabilities?: BackendCapabilitySet;
4
- escapeHatches?: BackendEscapeHatches;
5
- captureSnapshot?(context: BackendCommandContext, options?: BackendSnapshotOptions): Promise<BackendSnapshotResult>;
6
- captureScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
7
- readText?(context: BackendCommandContext, node: SnapshotNode): Promise<BackendReadTextResult>;
8
- findText?(context: BackendCommandContext, text: string): Promise<BackendFindTextResult>;
9
- tap?(context: BackendCommandContext, point: Point, options?: BackendTapOptions): Promise<BackendActionResult>;
10
- fill?(context: BackendCommandContext, point: Point, text: string, options?: BackendFillOptions): Promise<BackendActionResult>;
11
- typeText?(context: BackendCommandContext, text: string, options?: {
12
- delayMs?: number;
13
- }): Promise<BackendActionResult>;
14
- focus?(context: BackendCommandContext, point: Point): Promise<BackendActionResult>;
15
- longPress?(context: BackendCommandContext, point: Point, options?: BackendLongPressOptions): Promise<BackendActionResult>;
16
- swipe?(context: BackendCommandContext, from: Point, to: Point, options?: BackendSwipeOptions): Promise<BackendActionResult>;
17
- scroll?(context: BackendCommandContext, target: BackendScrollTarget, options: BackendScrollOptions): Promise<BackendActionResult>;
18
- pinch?(context: BackendCommandContext, options: BackendPinchOptions): Promise<BackendActionResult>;
19
- pressKey?(context: BackendCommandContext, key: string, options?: {
20
- modifiers?: string[];
21
- }): Promise<BackendActionResult>;
22
- pressBack?(context: BackendCommandContext, options?: BackendBackOptions): Promise<BackendActionResult>;
23
- pressHome?(context: BackendCommandContext): Promise<BackendActionResult>;
24
- rotate?(context: BackendCommandContext, orientation: BackendDeviceOrientation): Promise<BackendActionResult>;
25
- setKeyboard?(context: BackendCommandContext, options: BackendKeyboardOptions): Promise<BackendKeyboardResult | BackendActionResult>;
26
- getClipboard?(context: BackendCommandContext): Promise<string | BackendClipboardTextResult>;
27
- setClipboard?(context: BackendCommandContext, text: string): Promise<BackendActionResult>;
28
- openSettings?(context: BackendCommandContext, target?: string): Promise<BackendActionResult>;
29
- handleAlert?(context: BackendCommandContext, action: BackendAlertAction, options?: {
30
- timeoutMs?: number;
31
- }): Promise<BackendAlertResult>;
32
- openAppSwitcher?(context: BackendCommandContext): Promise<BackendActionResult>;
33
- openApp?(context: BackendCommandContext, target: BackendOpenTarget, options?: BackendOpenOptions): Promise<BackendActionResult>;
34
- closeApp?(context: BackendCommandContext, app?: string): Promise<BackendActionResult>;
35
- listApps?(context: BackendCommandContext, filter?: BackendAppListFilter): Promise<readonly BackendAppInfo[]>;
36
- getAppState?(context: BackendCommandContext, app: string): Promise<BackendAppState>;
37
- pushFile?(context: BackendCommandContext, input: BackendPushInput, target: string): Promise<BackendActionResult>;
38
- triggerAppEvent?(context: BackendCommandContext, event: BackendAppEvent): Promise<BackendActionResult>;
39
- listDevices?(context: BackendCommandContext, filter?: BackendDeviceFilter): Promise<readonly BackendDeviceInfo[]>;
40
- bootDevice?(context: BackendCommandContext, target?: BackendDeviceTarget): Promise<BackendActionResult>;
41
- ensureSimulator?(context: BackendCommandContext, options: BackendEnsureSimulatorOptions): Promise<BackendEnsureSimulatorResult>;
42
- resolveInstallSource?(context: BackendCommandContext, source: BackendInstallSource): Promise<BackendInstallSource>;
43
- installApp?(context: BackendCommandContext, target: BackendInstallTarget): Promise<BackendInstallResult>;
44
- reinstallApp?(context: BackendCommandContext, target: BackendInstallTarget): Promise<BackendInstallResult>;
45
- startRecording?(context: BackendCommandContext, options?: BackendRecordingOptions): Promise<BackendRecordingResult>;
46
- stopRecording?(context: BackendCommandContext, options?: BackendRecordingOptions): Promise<BackendRecordingResult>;
47
- startTrace?(context: BackendCommandContext, options?: BackendTraceOptions): Promise<BackendTraceResult>;
48
- stopTrace?(context: BackendCommandContext, options?: BackendTraceOptions): Promise<BackendTraceResult>;
49
- readLogs?(context: BackendCommandContext, options?: BackendReadLogsOptions): Promise<BackendReadLogsResult>;
50
- dumpNetwork?(context: BackendCommandContext, options?: BackendDumpNetworkOptions): Promise<BackendDumpNetworkResult>;
51
- measurePerf?(context: BackendCommandContext, options?: BackendMeasurePerfOptions): Promise<BackendMeasurePerfResult>;
52
- };
53
-
54
- export declare type AgentDeviceBackendPlatform = 'ios' | 'android' | 'macos' | 'linux';
55
-
56
- export declare const BACKEND_CAPABILITY_ESCAPE_HATCH_METHODS: {
57
- readonly 'android.shell': "androidShell";
58
- readonly 'ios.runnerCommand': "iosRunnerCommand";
59
- readonly 'macos.desktopScreenshot': "macosDesktopScreenshot";
60
- };
61
-
62
- export declare const BACKEND_CAPABILITY_NAMES: readonly ["android.shell", "ios.runnerCommand", "macos.desktopScreenshot"];
63
-
64
- export declare type BackendActionResult = Record<string, unknown> | void;
65
-
66
- export declare type BackendAlertAction = 'get' | 'accept' | 'dismiss' | 'wait';
67
-
68
- export declare type BackendAlertInfo = {
69
- title?: string;
70
- message?: string;
71
- buttons?: string[];
72
- };
73
-
74
- export declare type BackendAlertResult = {
75
- kind: 'alertStatus';
76
- alert: BackendAlertInfo | null;
77
- } | {
78
- kind: 'alertHandled';
79
- handled: boolean;
80
- alert?: BackendAlertInfo;
81
- button?: string;
82
- } | {
83
- kind: 'alertWait';
84
- alert: BackendAlertInfo | null;
85
- waitedMs?: number;
86
- timedOut?: boolean;
87
- };
88
-
89
- export declare type BackendAppEvent = {
90
- name: string;
91
- payload?: Record<string, unknown>;
92
- };
93
-
94
- export declare type BackendAppInfo = {
95
- id: string;
96
- name?: string;
97
- bundleId?: string;
98
- packageName?: string;
99
- activity?: string;
100
- };
101
-
102
- export declare type BackendAppListFilter = 'all' | 'user-installed';
103
-
104
- export declare type BackendAppState = {
105
- appId?: string;
106
- bundleId?: string;
107
- packageName?: string;
108
- activity?: string;
109
- state?: 'unknown' | 'notRunning' | 'running' | 'foreground' | 'background';
110
- details?: Record<string, unknown>;
111
- };
112
-
113
- export declare type BackendBackOptions = {
114
- mode?: 'in-app' | 'system';
115
- };
116
-
117
- export declare type BackendCapabilityName = (typeof BACKEND_CAPABILITY_NAMES)[number];
118
-
119
- export declare type BackendCapabilitySet = readonly BackendCapabilityName[];
120
-
121
- export declare type BackendClipboardTextResult = {
122
- text: string;
123
- };
124
-
125
- export declare type BackendCommandContext = {
126
- session?: string;
127
- requestId?: string;
128
- appId?: string;
129
- appBundleId?: string;
130
- signal?: AbortSignal;
131
- metadata?: Record<string, unknown>;
132
- };
133
-
134
- export declare type BackendDeviceFilter = {
135
- platform?: AgentDeviceBackendPlatform | 'apple';
136
- target?: 'mobile' | 'tv' | 'desktop';
137
- kind?: 'simulator' | 'emulator' | 'device' | 'desktop';
138
- };
139
-
140
- export declare type BackendDeviceInfo = {
141
- id: string;
142
- name: string;
143
- platform: AgentDeviceBackendPlatform;
144
- target?: 'mobile' | 'tv' | 'desktop';
145
- kind?: 'simulator' | 'emulator' | 'device' | 'desktop';
146
- booted?: boolean;
147
- details?: Record<string, unknown>;
148
- };
149
-
150
- export declare type BackendDeviceOrientation = 'portrait' | 'portrait-upside-down' | 'landscape-left' | 'landscape-right';
151
-
152
- export declare type BackendDeviceTarget = {
153
- id?: string;
154
- name?: string;
155
- platform?: AgentDeviceBackendPlatform;
156
- target?: 'mobile' | 'tv' | 'desktop';
157
- headless?: boolean;
158
- };
159
-
160
- export declare type BackendDiagnosticsPageOptions = BackendDiagnosticsTimeWindow & {
161
- cursor?: string;
162
- limit?: number;
163
- };
164
-
165
- export declare type BackendDiagnosticsTimeWindow = {
166
- since?: string;
167
- until?: string;
168
- };
169
-
170
- export declare type BackendDumpNetworkOptions = BackendDiagnosticsPageOptions & {
171
- include?: BackendNetworkIncludeMode;
172
- };
173
-
174
- export declare type BackendDumpNetworkResult = {
175
- entries: readonly BackendNetworkEntry[];
176
- nextCursor?: string;
177
- timeWindow?: BackendDiagnosticsTimeWindow;
178
- backend?: string;
179
- redacted?: boolean;
180
- notes?: readonly string[];
181
- };
182
-
183
- export declare type BackendEnsureSimulatorOptions = {
184
- device: string;
185
- runtime?: string;
186
- boot?: boolean;
187
- reuseExisting?: boolean;
188
- };
189
-
190
- export declare type BackendEnsureSimulatorResult = {
191
- udid: string;
192
- device: string;
193
- runtime: string;
194
- created: boolean;
195
- booted: boolean;
196
- simulatorSetPath?: string | null;
197
- };
198
-
199
- export declare type BackendEscapeHatches = {
200
- androidShell?(context: BackendCommandContext, args: readonly string[]): Promise<BackendShellResult>;
201
- iosRunnerCommand?(context: BackendCommandContext, command: BackendRunnerCommand): Promise<BackendActionResult>;
202
- macosDesktopScreenshot?(context: BackendCommandContext, outPath: string, options?: BackendScreenshotOptions): Promise<BackendScreenshotResult | void>;
203
- };
204
-
205
- export declare type BackendFillOptions = {
206
- delayMs?: number;
207
- };
208
-
209
- export declare type BackendFindTextResult = {
210
- found: boolean;
211
- };
212
-
213
- export declare type BackendInstallResult = Record<string, unknown> & {
214
- appId?: string;
215
- appName?: string;
216
- bundleId?: string;
217
- packageName?: string;
218
- launchTarget?: string;
219
- installablePath?: string;
220
- archivePath?: string;
221
- };
222
-
223
- export declare type BackendInstallSource = {
224
- kind: 'path';
225
- path: string;
226
- } | {
227
- kind: 'uploadedArtifact';
228
- id: string;
229
- } | {
230
- kind: 'url';
231
- url: string;
232
- };
233
-
234
- export declare type BackendInstallTarget = {
235
- app?: string;
236
- source: BackendInstallSource;
237
- };
238
-
239
- export declare type BackendKeyboardOptions = {
240
- action: 'status' | 'get' | 'dismiss';
241
- };
242
-
243
- export declare type BackendKeyboardResult = {
244
- platform?: 'android' | 'ios' | 'macos' | 'linux';
245
- action?: BackendKeyboardOptions['action'];
246
- visible?: boolean;
247
- inputType?: string | null;
248
- type?: string | null;
249
- wasVisible?: boolean;
250
- dismissed?: boolean;
251
- attempts?: number;
252
- };
253
-
254
- export declare type BackendLogEntry = {
255
- timestamp?: string;
256
- level?: 'debug' | 'info' | 'warn' | 'error' | string;
257
- message: string;
258
- source?: string;
259
- metadata?: Record<string, unknown>;
260
- };
261
-
262
- export declare type BackendLongPressOptions = {
263
- durationMs?: number;
264
- };
265
-
266
- export declare type BackendMeasurePerfOptions = BackendDiagnosticsTimeWindow & {
267
- sampleMs?: number;
268
- metrics?: readonly string[];
269
- };
270
-
271
- export declare type BackendMeasurePerfResult = {
272
- metrics: readonly BackendPerfMetric[];
273
- startedAt?: string;
274
- endedAt?: string;
275
- backend?: string;
276
- redacted?: boolean;
277
- notes?: readonly string[];
278
- };
279
-
280
- export declare type BackendNetworkEntry = {
281
- timestamp?: string;
282
- method?: string;
283
- url?: string;
284
- status?: number;
285
- durationMs?: number;
286
- requestHeaders?: Record<string, string>;
287
- responseHeaders?: Record<string, string>;
288
- requestBody?: string;
289
- responseBody?: string;
290
- metadata?: Record<string, unknown>;
291
- };
292
-
293
- export declare type BackendNetworkIncludeMode = 'summary' | 'headers' | 'body' | 'all';
294
-
295
- export declare type BackendOpenOptions = {
296
- relaunch?: boolean;
297
- };
298
-
299
- export declare type BackendOpenTarget = {
300
- /**
301
- * Generic app identifier accepted by the backend. Hosted adapters should
302
- * prefer structured appId, bundleId, or packageName when available.
303
- */
304
- app?: string;
305
- appId?: string;
306
- bundleId?: string;
307
- packageName?: string;
308
- /**
309
- * URL may be used by itself for a deep link or with an app identifier when
310
- * the backend supports opening a URL in a specific app context.
311
- */
312
- url?: string;
313
- /**
314
- * Platform-specific activity override, primarily for Android app launches.
315
- */
316
- activity?: string;
317
- };
318
-
319
- export declare type BackendPerfMetric = {
320
- name: string;
321
- value?: number;
322
- unit?: string;
323
- status?: 'ok' | 'unavailable' | 'error';
324
- message?: string;
325
- metadata?: Record<string, unknown>;
326
- };
327
-
328
- export declare type BackendPinchOptions = {
329
- scale: number;
330
- center?: Point;
331
- };
332
-
333
- export declare type BackendPushInput = {
334
- kind: 'json';
335
- payload: Record<string, unknown>;
336
- } | {
337
- kind: 'file';
338
- path: string;
339
- };
340
-
341
- export declare type BackendReadLogsOptions = BackendDiagnosticsPageOptions & {
342
- levels?: readonly string[];
343
- search?: string;
344
- source?: string;
345
- };
346
-
347
- export declare type BackendReadLogsResult = {
348
- entries: readonly BackendLogEntry[];
349
- nextCursor?: string;
350
- timeWindow?: BackendDiagnosticsTimeWindow;
351
- backend?: string;
352
- redacted?: boolean;
353
- notes?: readonly string[];
354
- };
355
-
356
- export declare type BackendReadTextResult = {
357
- text: string;
358
- };
359
-
360
- export declare type BackendRecordingOptions = {
361
- outPath?: string;
362
- fps?: number;
363
- quality?: number;
364
- showTouches?: boolean;
365
- };
366
-
367
- export declare type BackendRecordingResult = Record<string, unknown> & {
368
- path?: string;
369
- telemetryPath?: string;
370
- warning?: string;
371
- };
372
-
373
- export declare type BackendRunnerCommand = {
374
- command: string;
375
- args?: readonly string[];
376
- payload?: Record<string, unknown>;
377
- };
378
-
379
- export declare type BackendScreenshotOptions = {
380
- fullscreen?: boolean;
381
- overlayRefs?: boolean;
382
- surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
383
- };
384
-
385
- export declare type BackendScreenshotResult = {
386
- path?: string;
387
- overlayRefs?: ScreenshotOverlayRef[];
388
- };
389
-
390
- export declare type BackendScrollOptions = {
391
- direction: 'up' | 'down' | 'left' | 'right';
392
- amount?: number;
393
- pixels?: number;
394
- };
395
-
396
- export declare type BackendScrollTarget = {
397
- kind: 'viewport';
398
- } | {
399
- kind: 'point';
400
- point: Point;
401
- };
402
-
403
- export declare type BackendShellResult = {
404
- exitCode: number;
405
- stdout: string;
406
- stderr: string;
407
- };
408
-
409
- export declare type BackendSnapshotAnalysis = {
410
- rawNodeCount?: number;
411
- maxDepth?: number;
412
- };
413
-
414
- export declare type BackendSnapshotFreshness = {
415
- action: string;
416
- retryCount: number;
417
- staleAfterRetries: boolean;
418
- reason?: 'empty-interactive' | 'sharp-drop' | 'stuck-route';
419
- };
420
-
421
- export declare type BackendSnapshotOptions = SnapshotOptions & {
422
- outPath?: string;
423
- };
424
-
425
- export declare type BackendSnapshotResult = {
426
- nodes?: SnapshotNode[];
427
- truncated?: boolean;
428
- backend?: string;
429
- snapshot?: SnapshotState;
430
- analysis?: BackendSnapshotAnalysis;
431
- freshness?: BackendSnapshotFreshness;
432
- warnings?: string[];
433
- appName?: string;
434
- appBundleId?: string;
435
- };
436
-
437
- export declare type BackendSwipeOptions = {
438
- durationMs?: number;
439
- };
440
-
441
- export declare type BackendTapOptions = {
442
- button?: 'primary' | 'secondary' | 'middle';
443
- count?: number;
444
- intervalMs?: number;
445
- holdMs?: number;
446
- jitterPx?: number;
447
- doubleTap?: boolean;
448
- };
449
-
450
- export declare type BackendTraceOptions = {
451
- outPath?: string;
452
- };
453
-
454
- export declare type BackendTraceResult = Record<string, unknown> & {
455
- outPath?: string;
456
- };
457
-
458
- export declare function hasBackendCapability(backend: Pick<AgentDeviceBackend, 'platform' | 'capabilities'>, capability: BackendCapabilityName): boolean;
459
-
460
- export declare function hasBackendEscapeHatch(backend: Pick<AgentDeviceBackend, 'escapeHatches'>, capability: BackendCapabilityName): boolean;
461
-
462
- declare type Point = {
463
- x: number;
464
- y: number;
465
- };
466
-
467
- declare type RawSnapshotNode = {
468
- index: number;
469
- type?: string;
470
- role?: string;
471
- subrole?: string;
472
- label?: string;
473
- value?: string;
474
- identifier?: string;
475
- rect?: Rect;
476
- enabled?: boolean;
477
- selected?: boolean;
478
- hittable?: boolean;
479
- depth?: number;
480
- parentIndex?: number;
481
- pid?: number;
482
- bundleId?: string;
483
- appName?: string;
484
- windowTitle?: string;
485
- surface?: string;
486
- hiddenContentAbove?: boolean;
487
- hiddenContentBelow?: boolean;
488
- };
489
-
490
- declare type Rect = {
491
- x: number;
492
- y: number;
493
- width: number;
494
- height: number;
495
- };
496
-
497
- declare type ScreenshotOverlayRef = {
498
- ref: string;
499
- label?: string;
500
- rect: Rect;
501
- overlayRect: Rect;
502
- center: Point;
503
- };
504
-
505
- declare type SnapshotBackend = 'xctest' | 'android' | 'macos-helper' | 'linux-atspi';
506
-
507
- declare type SnapshotNode = RawSnapshotNode & {
508
- ref: string;
509
- };
510
-
511
- declare type SnapshotOptions = {
512
- interactiveOnly?: boolean;
513
- compact?: boolean;
514
- depth?: number;
515
- scope?: string;
516
- raw?: boolean;
517
- };
518
-
519
- declare type SnapshotState = {
520
- nodes: SnapshotNode[];
521
- createdAt: number;
522
- truncated?: boolean;
523
- backend?: SnapshotBackend;
524
- comparisonSafe?: boolean;
525
- };
526
-
527
- export { }
@@ -1 +0,0 @@
1
- export{BACKEND_CAPABILITY_ESCAPE_HATCH_METHODS,BACKEND_CAPABILITY_NAMES,hasBackendCapability,hasBackendEscapeHatch}from"./4993.js";