@swmansion/argent 0.32.1-next.9 → 0.33.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 (44) hide show
  1. package/README.md +1 -1
  2. package/assets/manifest.json +2 -2
  3. package/bin/argent-android-devtools-0.4.0.apk +0 -0
  4. package/bin/darwin/argent-macos-helper +0 -0
  5. package/bin/darwin/ax-service +0 -0
  6. package/bin/darwin/tvos-ax-service +0 -0
  7. package/bin/darwin/tvos-hid-daemon +0 -0
  8. package/bin/network-inspector/network-inspector.jar +0 -0
  9. package/bin/tcp/ax-service +0 -0
  10. package/dist/cli-cmds.mjs +530 -438
  11. package/dist/client.d.ts +5 -0
  12. package/dist/client.js +60 -9
  13. package/dist/installer.mjs +372 -202
  14. package/dist/mcp-server.mjs +156 -20
  15. package/dist/tool-args.generated.d.ts +87 -51
  16. package/dist/tool-server.cjs +40742 -36285
  17. package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
  18. package/dylibs/libKeyboardPatch.dylib +0 -0
  19. package/dylibs/libNativeDevtoolsIos.dylib +0 -0
  20. package/dylibs/macos/libArgentInjectionBootstrap.dylib +0 -0
  21. package/dylibs/macos/libNativeDevtoolsMacos.dylib +0 -0
  22. package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
  23. package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
  24. package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
  25. package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
  26. package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
  27. package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
  28. package/package.json +2 -2
  29. package/rules/argent.md +1 -1
  30. package/skills/argent-create-e2e/references/e2e-yaml.md +4 -4
  31. package/skills/argent-create-e2e/references/reliability-and-recovery.md +3 -3
  32. package/skills/argent-device-interact/SKILL.md +3 -2
  33. package/skills/argent-device-interact/references/chromium.md +1 -1
  34. package/skills/argent-device-interact/references/harmonyos.md +1 -1
  35. package/skills/argent-ios-simulator-setup/SKILL.md +1 -1
  36. package/skills/argent-macos-app-interact/SKILL.md +44 -0
  37. package/skills/argent-macos-app-interact/references/e2e.md +6 -0
  38. package/skills/argent-qa-e2e/SKILL.md +1 -1
  39. package/skills/argent-react-native-app-workflow/SKILL.md +2 -0
  40. package/skills/argent-react-native-optimization/SKILL.md +2 -3
  41. package/skills/argent-react-native-profiler/SKILL.md +8 -8
  42. package/skills/argent-screenshot-diff/SKILL.md +1 -1
  43. package/skills/argent-test-ui-flow/SKILL.md +1 -1
  44. package/bin/argent-android-devtools-0.3.0.apk +0 -0
@@ -1,6 +1,6 @@
1
1
  export interface ArgentToolArgs {
2
2
  "await-screen-idle": {
3
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
3
+ /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, Mac app id, or Chromium id). */
4
4
  udid: string;
5
5
  /** Max time to wait for the screen to settle before giving up (default 3000). */
6
6
  timeoutMs?: number;
@@ -10,9 +10,9 @@ export interface ArgentToolArgs {
10
10
  minStableMs?: number;
11
11
  };
12
12
  "await-ui-element": {
13
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, or Chromium id). */
13
+ /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
14
14
  udid: string;
15
- /** What to wait for. `exists`: the selector matches an element anywhere in the tree. `visible`: it matches one with a non-zero on-screen frame. `hidden`: it matches nothing, or only a zero-area element (e.g. a spinner that went away). `text`: the first visible match in reading order (topmost, then leftmost; the first match overall if none is visible) contains expectedText, or equals it with textMatch `equals`. Only that match is checked, so if a loose selector hits several elements, narrow it to the one holding the text. */
15
+ /** What to wait for. `exists`: the selector matches an element anywhere in the tree. `visible`: it matches one with a non-zero on-screen frame. `hidden`: it matches nothing, or only a zero-area element (e.g. a spinner that went away). `text`: the first visible match in reading order (topmost, then leftmost; the first match overall if none is visible) contains expectedText, or equals it with textMatch `equals`. Only that match is checked, so if a loose selector hits several elements, narrow it to the one holding the text. On a Mac app, a match in an open menu comes first, then one in an alert, sheet or popover, then one in the window. */
16
16
  condition: "exists" | "visible" | "hidden" | "text";
17
17
  /** Element to match. Give at least one field; every given field must match. */
18
18
  selector: {
@@ -39,7 +39,7 @@ export interface ArgentToolArgs {
39
39
  timeoutSeconds?: number;
40
40
  };
41
41
  "boot-device": {
42
- /** iOS: simulator UDID to boot (from `list-devices`). */
42
+ /** iOS: simulator UDID to boot (from `list-devices`). A Mac app id (`macos-app-<bundle id>`) starts that app again from its last path. */
43
43
  udid?: string;
44
44
  /** Android: AVD name to launch a new emulator from (from `list-devices` → `avds[].name`). */
45
45
  avdName?: string;
@@ -49,7 +49,7 @@ export interface ArgentToolArgs {
49
49
  harmonyInstance?: string;
50
50
  /** Android/Vega/HarmonyOS: overall budget for the boot sequence. Default 480000 (8 min) on Android, 120000 (2 min) on Vega, 180000 (3 min) on HarmonyOS, where with `force` it spans the shutdown as well as the boot. */
51
51
  bootTimeoutMs?: number;
52
- /** Shut down and re-boot the device even if already running. On HarmonyOS it is also what ties an already-running instance to its `hdc` connect key: without it the instance is left alone and its key stays unresolved (`list-devices` lists the keys, but not which instance each belongs to). Ignored for Electron, which always spawns a fresh process. */
52
+ /** Shut down and re-boot the device even if already running. On HarmonyOS it is also what ties an already-running instance to its `hdc` connect key: without it the instance is left alone and its key stays unresolved (`list-devices` lists the keys, but not which instance each belongs to). On a Mac app it quits and restarts the app, also a copy of the same build running without the argent library: that copy loses its unsaved changes. When the app argent runs answers the quit with a save prompt, the call fails and the app keeps running. Force never quits a copy of another build (another .app path). Ignored for Electron, which always spawns a fresh process. */
53
53
  force?: boolean;
54
54
  /** Android only (argent never mutes other platforms): boot the emulator with audio output enabled. Defaults to false, so several agent-driven emulators don't all play sound on the host; pass `true` when the task involves playing, hearing, or testing audio. Takes effect at boot: if the emulator is already running muted, add `force: true`. The first boot after toggling is a slower cold boot (the snapshot was saved in the other audio mode). The `boot-sound` argent flag flips this default to true. */
55
55
  sound?: boolean;
@@ -63,6 +63,10 @@ export interface ArgentToolArgs {
63
63
  electronPort?: number;
64
64
  /** Electron-only: extra CLI arguments forwarded to the Electron binary after the app path. */
65
65
  electronArgs?: Array<string>;
66
+ /** Mac app: path to the .app bundle to start with the argent library; its device id is `macos-app-<bundle id>`. A Release build with the hardened runtime cannot be driven; a hardened Debug build needs the step the error names. */
67
+ macosAppPath?: string;
68
+ /** Mac app only: arguments for the app executable. Omitted, the app starts with none, also when an earlier start had some. */
69
+ macosAppArgs?: Array<string>;
66
70
  };
67
71
  button: {
68
72
  /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
@@ -183,13 +187,13 @@ export interface ArgentToolArgs {
183
187
  device_id: string;
184
188
  };
185
189
  describe: {
186
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, or Chromium id). */
190
+ /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
187
191
  udid: string;
188
192
  /** App bundle ID, used as a target hint on iOS when the AX-service returns no elements and describe falls back to native-devtools inspection. If omitted, the fallback auto-detects the frontmost connected app. Ignored on every other platform, including a physical iOS device. */
189
193
  bundleId?: string;
190
194
  };
191
195
  "dismiss-update": {
192
- /** Number of hours to suppress the update notification */
196
+ /** Hours until reminders resume: 168 is a week, 87600 is the longest, 0 turns them back on */
193
197
  hours: number;
194
198
  };
195
199
  "e2e-add-echo": {
@@ -231,13 +235,13 @@ export interface ArgentToolArgs {
231
235
  e2e_test_file?: string;
232
236
  /** Absolute path to an e2e test .yaml on the client. */
233
237
  e2e_test_path?: string;
234
- /** Device id to run against (iOS UDID, Android/Vega serial, Chromium id), as list-devices reports it. Auto-detected when omitted, but only when exactly one booted device matches (optionally narrowed by `platform` and the e2e test's `requires:` block); with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up. */
238
+ /** Device id to run against (iOS UDID, Android/Vega serial, Chromium id, Mac app id), as list-devices reports it. Auto-detected when omitted, but only when exactly one booted device matches (optionally narrowed by `platform` and the e2e test's `requires:` block); with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up. */
235
239
  device?: string;
236
- /** Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only; `ios-remote` selects a remote one. `chromium` with no `device` also makes the runner boot an Electron instance for a standalone e2e test from its `launch` step's chromium value and tear it down after the run, with no fallback to auto-detection (a single-key `launch: { chromium: … }` map, or a `requires:` block that allows only chromium, does this on its own; a fragment, or a launch map without a `chromium` key, is still auto-detected). That value must be an Electron app path on the tool-server host: the bare-string `launch:` the recorder writes holds a bundle id, which fails the run with `Electron boot: path does not exist`, so first edit it to `{ chromium: <app path> }`. */
237
- platform?: "ios" | "android" | "chromium" | "vega" | "ios-remote";
240
+ /** Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only; `ios-remote` selects a remote one. `chromium` with no `device` also makes the runner boot an Electron instance for a standalone e2e test from its `launch` step's chromium value and tear it down after the run, with no fallback to auto-detection (a single-key `launch: { chromium: … }` map, or a `requires:` block that allows only chromium, does this on its own; a fragment, or a launch map without a `chromium` key, is still auto-detected). That value must be an Electron app path on the tool-server host: the bare-string `launch:` the recorder writes holds a bundle id, which fails the run with `Electron boot: path does not exist`, so first edit it to `{ chromium: <app path> }`. `macos` with no `device` runs a standalone e2e test on the Mac app its `launch` names, which need not be running (a single-key `launch: { macos: … }` map does this on its own). Auto-detection never picks a Mac app otherwise. */
241
+ platform?: "ios" | "android" | "chromium" | "vega" | "macos" | "ios-remote";
238
242
  /** Write/refresh screenshot baselines for `snapshot` steps instead of diffing against them, also in the e2e tests that tool: e2e-execute steps run, unless such a step sets updateBaselines itself. Over a link, the client writes the new baselines when the run ends. */
239
243
  updateBaselines?: boolean;
240
- /** Set to true to confirm the execution prerequisite has been met. Required when a fragment defines an executionPrerequisite. */
244
+ /** Set to true to confirm the execution prerequisite has been met. Required when a fragment defines an executionPrerequisite: without it, the call runs no step and returns the prerequisite text. Not a dry run: an e2e test with no prerequisite runs in full. To read a prerequisite without running, read executionPrerequisite in the YAML file. */
241
245
  prerequisiteAcknowledged?: boolean;
242
246
  /** @deprecated Renamed to `e2e_test_path`. */
243
247
  flow_path?: string;
@@ -273,10 +277,28 @@ export interface ArgentToolArgs {
273
277
  executionPrerequisite?: string;
274
278
  /** The e2e test's `requires:` block: the targets it supports, ANDed. `platform` is one platform or a list (`ios` also covers a remote simulator); `runtimeKind` is `tv` or `mobile`. Omit it for a test that runs on any target. */
275
279
  requires?: {
276
- platform?: "ios" | "android" | "chromium" | "vega" | Array<"ios" | "android" | "chromium" | "vega">;
280
+ platform?: "ios" | "android" | "chromium" | "vega" | "macos" | Array<"ios" | "android" | "chromium" | "vega" | "macos">;
277
281
  runtimeKind?: "mobile" | "tv";
278
282
  };
279
283
  };
284
+ "file-panel": {
285
+ /** Mac app id from `list-devices` (macos-app-<bundle id>). */
286
+ udid: string;
287
+ /** list: the open file panels. choose: answer a panel with path or paths. cancel: cancel a panel. discard: answer a panel with its Delete or Don't Save button. stub: arm an answer or a cancel for the next panel the app presents (stubMode). */
288
+ action: "list" | "choose" | "cancel" | "discard" | "stub";
289
+ /** For choose and stub: the absolute path to answer with (a leading ~/ is your home folder). An open panel takes an existing file or folder; a save panel takes the file to write, in an existing folder. A save panel answer replaces an existing file at that path without the replace prompt a user gets: check the path first. */
290
+ path?: string;
291
+ /** For choose and stub: several absolute paths, for an open panel that allows a multiple selection. Instead of path. */
292
+ paths?: Array<string>;
293
+ /** For choose, cancel and discard: the panel's number from list. Needed only when more than one panel is open. */
294
+ panel?: number;
295
+ /** For stub: answer the next panel with path or paths (default), cancel it, or off to disarm a stub that is still armed. */
296
+ stubMode?: "answer" | "cancel" | "off";
297
+ /** For stub with stubMode answer: the kind of panel the answer is for, which also decides the path checks. Default: open when every path exists, save when the one path does not exist yet. */
298
+ panelKind?: "open" | "save";
299
+ /** For choose, cancel and discard: how long to wait for a panel to appear after the click that opens it (default 5000). */
300
+ timeoutMs?: number;
301
+ };
280
302
  fill: {
281
303
  /** Target device id from `list-devices`. */
282
304
  udid: string;
@@ -321,7 +343,7 @@ export interface ArgentToolArgs {
321
343
  interpolate?: number;
322
344
  };
323
345
  "gesture-drag": {
324
- /** Target Chromium device id from `list-devices` (chromium-cdp-<port>). */
346
+ /** Target Chromium device id from `list-devices` (chromium-cdp-<port>), or a Mac app id. */
325
347
  udid: string;
326
348
  /** Press x. */
327
349
  fromX: number;
@@ -331,7 +353,7 @@ export interface ArgentToolArgs {
331
353
  toX: number;
332
354
  /** Release y. */
333
355
  toY: number;
334
- /** Total drag duration in milliseconds (default 300); the button stays down this long. */
356
+ /** Total drag duration in milliseconds (default 300, 800 for a long press on a Mac app); the button stays down this long. */
335
357
  durationMs?: number;
336
358
  /** Whether the drag releases with momentum; default true (a constant-speed drag). false decelerates into the release point, so an app that derives a fling from the release velocity (carousels, drag libraries) applies little to no momentum: use it when the drag must stop where it was aimed. Under ~100ms durationMs some fling survives; keep the default 300 when the fling must be fully suppressed. */
337
359
  momentum?: boolean;
@@ -377,7 +399,7 @@ export interface ArgentToolArgs {
377
399
  durationMs?: number;
378
400
  };
379
401
  "gesture-scroll": {
380
- /** Target Chromium device id from `list-devices` (chromium-cdp-<port>). */
402
+ /** Target Chromium device id from `list-devices` (chromium-cdp-<port>), or a Mac app id. */
381
403
  udid: string;
382
404
  /** Anchor x. The wheel events land here; put it over the element you want to scroll. */
383
405
  x: number;
@@ -387,7 +409,7 @@ export interface ArgentToolArgs {
387
409
  deltaX?: number;
388
410
  /** Vertical scroll distance as a fraction of the window height (0.5 = half a window). Positive scrolls down (reveals content below), like rolling a mouse wheel toward you; negative scrolls back up. */
389
411
  deltaY?: number;
390
- /** Spread the scroll over this many milliseconds in wheel-event steps (default 300) so scroll handlers fire progressively. */
412
+ /** Spread the scroll over this many milliseconds in wheel-event steps (default 300) so scroll handlers fire progressively. Ignored on a Mac app. */
391
413
  durationMs?: number;
392
414
  };
393
415
  "gesture-swipe": {
@@ -407,7 +429,7 @@ export interface ArgentToolArgs {
407
429
  momentum?: boolean;
408
430
  };
409
431
  "gesture-tap": {
410
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
432
+ /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, Mac app id, or Chromium id). */
411
433
  udid: string;
412
434
  /** Horizontal position: 0 = left edge, 1 = right edge. */
413
435
  x: number;
@@ -415,32 +437,44 @@ export interface ArgentToolArgs {
415
437
  y: number;
416
438
  /** Number of taps/clicks dispatched as ONE gesture inside the OS double-tap window (2 = double-tap / double-click), which two separate tap calls cannot guarantee. On physical iOS, higher counts loop single taps, which a double-tap recognizer may pair. On HarmonyOS they land as separate taps. Default 1. */
417
439
  clickCount?: number;
440
+ /** Mouse button, Mac app only: "right" is a right-click, for example to open a context menu; any other device refuses it. Default "left". */
441
+ button?: "left" | "right";
418
442
  };
419
443
  keyboard: {
420
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, or Chromium id). */
444
+ /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
421
445
  udid: string;
422
446
  /** Text to type character by character; handles uppercase, digits and common punctuation. Cannot be combined with `key`: to type and then press a key, send two `keyboard` steps in one `run-sequence` ({ text: "hello" } then { key: "enter" }). To type a credential without its plaintext ever entering your context, use a secret placeholder `{{secret:<NAME>}}`, e.g. "{{secret:APP_PASSWORD}}", alone or inside longer text. It is resolved on the machine running the tool-server, from the first source that defines the name: the `ARGENT_SECRET_<NAME>` environment variable, `.argent/secrets.env` in the project, the project's `.env.local` / `.env` (only their `ARGENT_SECRET_`-prefixed keys), then `~/.argent/secrets.env`. Nothing else on the host is reachable. Over a link with the `forward-secrets` flag on, the client's own sources are checked first. The result echoes the placeholder, never the value, and the auto-screenshot after typing is skipped. To submit after a secret, put both steps in ONE `run-sequence`: that keeps the skip covering the Enter, which a second bare `keyboard` call would not. If the secret is not set, the failure lists the available names and the sources it checked; ask the user to add it to one of them (a secrets file applies immediately, an env var needs a restart). NEVER ask the user to paste the secret value into the conversation. */
423
447
  text?: string;
424
- /** Named key to press: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Cannot be combined with `text`; to do both, send two `keyboard` steps in one `run-sequence`. Not supported on Apple TV / Android TV; move focus with `tv-remote` (up/down/left/right) instead. Physical iOS: only `enter` and `backspace`. HarmonyOS: only enter (return), backspace (delete), space, arrow-left and arrow-right; any other key fails with 400 KEYBOARD_KEY_UNSUPPORTED. */
448
+ /** Named key to press: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Cannot be combined with `text`; to do both, send two `keyboard` steps in one `run-sequence`. Not supported on Apple TV / Android TV; move focus with `tv-remote` (up/down/left/right) instead. Physical iOS: only `enter` and `backspace`. HarmonyOS: only enter (return), backspace (delete), space, arrow-left and arrow-right; any other key fails with 400 KEYBOARD_KEY_UNSUPPORTED. Mac app: also delete (forward delete), home, end, page-up, page-down, and shortcuts with modifiers joined by + (command, shift, option, control), e.g. command+a. */
425
449
  key?: string;
426
450
  /** Delay in ms between key presses (default 50). Ignored on Android phones/tablets, HarmonyOS, Vega, Apple TV / Android TV and physical iOS, which type the whole string in one shot or at their own cadence. */
427
451
  delayMs?: number;
428
452
  };
429
453
  "launch-app": {
430
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
454
+ /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, Mac app id, or Chromium id). */
431
455
  udid: string;
432
- /** App identifier. iOS: bundle id. Android: package name from build.gradle `applicationId`. Vega (Fire TV): the interactive component app id from manifest.toml (e.g. com.example.app.main). HarmonyOS: bundle name as listed by `bm dump -a` (e.g. com.huawei.hmos.calculator). Chromium: any tag matching the pattern. */
456
+ /** App identifier. iOS: bundle id. Android: package name from build.gradle `applicationId`. Vega (Fire TV): the interactive component app id from manifest.toml (e.g. com.example.app.main). HarmonyOS: bundle name as listed by `bm dump -a` (e.g. com.huawei.hmos.calculator). Chromium: any tag matching the pattern. Mac app: the bundle id in the device id. */
433
457
  bundleId: string;
434
458
  /** Android-only: fully-qualified Activity name (e.g. `.MainActivity` or `com.example/com.example.MainActivity`). If omitted, the app's default launcher activity is used. */
435
459
  activity?: string;
436
- /** Apple simulators and physical iPhones: arguments passed to the app process at launch, e.g. `["-FeatureFlag", "YES"]` to override UserDefaults. A running app is relaunched to apply them. The call fails, launching nothing, if terminating it does not finish within 15s on a local iOS simulator, or fails for a reason other than the app not running on a remote one. */
460
+ /** Apple simulators, Mac apps and physical iPhones: arguments passed to the app process at launch, e.g. `["-FeatureFlag", "YES"]` to override UserDefaults. A running app is relaunched to apply them, except a Mac app: use restart-app for that. Omitted on a Mac app, a stopped app gets the arguments of its last start. The call fails, launching nothing, if terminating it does not finish within 15s on a local iOS simulator, or fails for a reason other than the app not running on a remote one. */
437
461
  launchArgs?: Array<string>;
438
462
  };
439
463
  "list-devices": Record<string, never>;
464
+ "menu-bar": {
465
+ /** Mac app id from `list-devices` (macos-app-<bundle id>). */
466
+ udid: string;
467
+ /** list: the app's menu bar, one line per item. choose: run one menu item, by path or identifier. */
468
+ action: "list" | "choose";
469
+ /** For choose: the titles from the menu bar down to the item, as list shows them, e.g. ["File", "Export..."]. Case and "..." versus "…" do not matter. */
470
+ path?: Array<string>;
471
+ /** For choose: the item's id="..." from list, instead of path. */
472
+ identifier?: string;
473
+ };
440
474
  "native-describe-screen": {
441
- /** Simulator UDID */
475
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
442
476
  udid: string;
443
- /** Bundle ID of the app */
477
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
444
478
  bundleId: string;
445
479
  /** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image-heavy branches) */
446
480
  skipClasses?: Array<string>;
@@ -454,9 +488,9 @@ export interface ArgentToolArgs {
454
488
  bundleId: string;
455
489
  };
456
490
  "native-find-views": {
457
- /** Simulator UDID */
491
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
458
492
  udid: string;
459
- /** Bundle ID of the app */
493
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
460
494
  bundleId: string;
461
495
  /** UIView class name to match (exact, e.g. UIButton) */
462
496
  className?: string;
@@ -472,15 +506,15 @@ export interface ArgentToolArgs {
472
506
  includeAncestors?: boolean;
473
507
  /** Include child views for each matched view (default true) */
474
508
  includeChildren?: boolean;
475
- /** View fields to include. Defaults: className, frame, hidden, alpha, identifier, label, nativeID, userInteractionEnabled, depth. Additional: pointer, tag, windowFrame, screenFrame, bounds, center, opaque, clipsToBounds, transform, contentMode, backgroundColor, tintColor, layerName */
509
+ /** View fields to include. Defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID. Additional: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder */
476
510
  fields?: Array<string>;
477
511
  };
478
512
  "native-full-hierarchy": {
479
- /** Simulator UDID */
513
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
480
514
  udid: string;
481
- /** Bundle ID of the app */
515
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
482
516
  bundleId: string;
483
- /** View fields to include. Use EXACT names: className, frame, hidden, alpha, identifier, label, nativeID, userInteractionEnabled, depth, pointer, tag, windowFrame, screenFrame, bounds, center, opaque, clipsToBounds, transform, contentMode, backgroundColor, tintColor, layerName. Defaults to all of the first group when omitted. */
517
+ /** View fields to include. Use EXACT names. Defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID. Additional: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder */
484
518
  fields?: Array<string>;
485
519
  /** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes) */
486
520
  skipClasses?: Array<string>;
@@ -490,9 +524,9 @@ export interface ArgentToolArgs {
490
524
  maxDepth?: number;
491
525
  };
492
526
  "native-network-logs": {
493
- /** Device ID from list-devices: an iOS simulator UDID or Android serial */
527
+ /** Device ID from list-devices: an iOS simulator UDID or Android serial, or a Mac app id (macos-app-<bundle id>) */
494
528
  udid: string;
495
- /** App bundle ID on iOS or package name on Android */
529
+ /** App bundle ID on iOS or package name on Android (on a Mac app, the bundle id in the device id) */
496
530
  bundleId: string;
497
531
  /** Android only: the app's Metro port, whose requests are left out of the listing. Omit it to use this device's port, 8081 by default. */
498
532
  port?: number;
@@ -522,11 +556,11 @@ export interface ArgentToolArgs {
522
556
  device_id: string;
523
557
  };
524
558
  "native-user-interactable-view-at-point": {
525
- /** Simulator UDID */
559
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
526
560
  udid: string;
527
- /** Bundle ID of the app */
561
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
528
562
  bundleId: string;
529
- /** Raw X coordinate in points, on the portrait axes of the screen (the axes of native-describe-screen frames). NOT normalized [0,1] tap space. */
563
+ /** Raw X coordinate in points, on the portrait axes of the screen; on a Mac app, points from the top-left of the area describe reports. NOT normalized [0,1] tap space. */
530
564
  x: number;
531
565
  /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
532
566
  y: number;
@@ -534,7 +568,7 @@ export interface ArgentToolArgs {
534
568
  includeAncestors?: boolean;
535
569
  /** Include child views for the matched view (default false) */
536
570
  includeChildren?: boolean;
537
- /** View fields to include. Defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID. Additional: center, transform, contentMode, backgroundColor, tintColor */
571
+ /** View fields to include. Defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID. Additional: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder */
538
572
  fields?: Array<string>;
539
573
  /** Exact UIView class names whose entire subtree should be pruned */
540
574
  skipClasses?: Array<string>;
@@ -544,11 +578,11 @@ export interface ArgentToolArgs {
544
578
  maxDepth?: number;
545
579
  };
546
580
  "native-view-at-point": {
547
- /** Simulator UDID */
581
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
548
582
  udid: string;
549
- /** Bundle ID of the app */
583
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
550
584
  bundleId: string;
551
- /** Raw X coordinate in points, on the portrait axes of the screen (the axes of native-describe-screen frames). NOT normalized [0,1] tap space. */
585
+ /** Raw X coordinate in points, on the portrait axes of the screen; on a Mac app, points from the top-left of the area describe reports. NOT normalized [0,1] tap space. */
552
586
  x: number;
553
587
  /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
554
588
  y: number;
@@ -556,7 +590,7 @@ export interface ArgentToolArgs {
556
590
  includeAncestors?: boolean;
557
591
  /** Include child views for the matched view (default false) */
558
592
  includeChildren?: boolean;
559
- /** View fields to include. Defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID. Additional: center, transform, contentMode, backgroundColor, tintColor */
593
+ /** View fields to include. Defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID. Additional: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder */
560
594
  fields?: Array<string>;
561
595
  /** Exact UIView class names whose entire subtree should be pruned */
562
596
  skipClasses?: Array<string>;
@@ -574,7 +608,7 @@ export interface ArgentToolArgs {
574
608
  bundleId?: string;
575
609
  };
576
610
  paste: {
577
- /** Target device id from `list-devices` (iOS simulator UDID or Android emulator serial). */
611
+ /** Target device id from `list-devices` (iOS simulator UDID or Android emulator serial, or Mac app id). */
578
612
  udid: string;
579
613
  /** Text to put on the device clipboard and paste into the focused field. Supports `{{secret:<NAME>}}` placeholders, resolved on the tool-server from the `ARGENT_SECRET_<NAME>` environment variable or an argent secrets file (the same sources as `keyboard`), so a credential never enters your context and is never echoed back. If the secret is not set, the failure lists the available names and every source it looked in; ask the user to add it there, NEVER ask for the value in the conversation. */
580
614
  text: string;
@@ -591,8 +625,8 @@ export interface ArgentToolArgs {
591
625
  /** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
592
626
  device_id: string;
593
627
  /** Query mode; see Modes in the tool description. */
594
- mode: "by_component" | "by_time_range" | "by_index" | "cascade_tree";
595
- /** Component name */
628
+ mode: "by_component" | "by_time_range" | "by_index" | "cascade_tree" | "render_counts";
629
+ /** Component name; optional for render_counts, which it narrows to one component */
596
630
  component_name?: string;
597
631
  /** Time range in ms since profiling started, the clock this tool prints */
598
632
  time_range_ms?: {
@@ -603,7 +637,7 @@ export interface ArgentToolArgs {
603
637
  };
604
638
  /** Commit index */
605
639
  commit_index?: number;
606
- /** Max results to return. Defaults to 20 for by_component / by_time_range, which count commits. by_index counts individual fibers and returns all of them unless this is set; a small cap there can show less than the analyze report it is meant to expand on. */
640
+ /** Max results to return. Defaults to 20 for by_component / by_time_range, which count commits, and render_counts, which counts components. by_index counts individual fibers and returns all of them unless this is set; a small cap there can show less than the analyze report it is meant to expand on. */
607
641
  top_n?: number;
608
642
  };
609
643
  "profiler-cpu-query": {
@@ -628,6 +662,8 @@ export interface ArgentToolArgs {
628
662
  top_n?: number;
629
663
  /** Also show callers of the function */
630
664
  include_callers?: boolean;
665
+ /** top_functions and time_window: list only React component functions (PascalCase names) */
666
+ react_only?: boolean;
631
667
  };
632
668
  "profiler-load": {
633
669
  /** What to do; see Modes in the tool description. */
@@ -774,13 +810,13 @@ export interface ArgentToolArgs {
774
810
  appPath: string;
775
811
  };
776
812
  "restart-app": {
777
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
813
+ /** Target device id from `list-devices` (iOS UDID, Mac app id, HarmonyOS id, or Android serial). */
778
814
  udid: string;
779
- /** App identifier. iOS: bundle id. Android: package name. Vega: interactive component app id. HarmonyOS: bundle name. */
815
+ /** App identifier. iOS: bundle id. Android: package name. Vega: interactive component app id. HarmonyOS: bundle name. Mac app: the bundle id in the device id. */
780
816
  bundleId: string;
781
817
  /** Android-only: relaunch a non-launcher Activity (e.g. `.SettingsActivity` or `com.example/com.example.SettingsActivity`). If omitted, the app's default launcher activity is used. */
782
818
  activity?: string;
783
- /** Apple simulators and physical iPhones: arguments passed to the app process at launch, e.g. `["-FeatureFlag", "YES"]` to override UserDefaults. */
819
+ /** Apple simulators, Mac apps and physical iPhones: arguments passed to the app process at launch, e.g. `["-FeatureFlag", "YES"]` to override UserDefaults. Omitted on a Mac app, the app gets the arguments of its last start. */
784
820
  launchArgs?: Array<string>;
785
821
  };
786
822
  rotate: {
@@ -790,7 +826,7 @@ export interface ArgentToolArgs {
790
826
  orientation: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
791
827
  };
792
828
  "run-sequence": {
793
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, or Chromium id), shared across all steps. */
829
+ /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id), shared across all steps. */
794
830
  udid: string;
795
831
  /** Ordered list of interaction steps to execute sequentially */
796
832
  steps: Array<{
@@ -819,11 +855,11 @@ export interface ArgentToolArgs {
819
855
  udid: string;
820
856
  };
821
857
  screenshot: {
822
- /** Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, HarmonyOS id, or Chromium id). */
858
+ /** Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
823
859
  udid: string;
824
860
  /** Orientation override for the screenshot (on Chromium it rotates the captured image). On Android the capture already follows the device's rotation. Rejected on HarmonyOS, which captures the display in its current orientation and has no override. Ignored on physical iPhones. */
825
861
  rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
826
- /** Scale factor. Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android/HarmonyOS. On a local Apple TV simulator, an Android TV or Vega, with neither set, the capture is downscaled to a 576 px long side (0.15 of a 4K capture). On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency. */
862
+ /** Scale factor. Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android/HarmonyOS. On a local Apple TV simulator, an Android TV or Vega, with neither set, the capture is downscaled to a 576 px long side (0.15 of a 4K capture). On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency. On a Mac app the default is one pixel per window point, downscaled to a 768 px long side for a larger window. */
827
863
  scale?: number;
828
864
  /** Set false only when capturing a full-resolution PNG (scale: 1.0) to save as a baseline/current for screenshot-diff. The file is still written, but the image bytes are not attached to the agent context. */
829
865
  includeImageInContext?: boolean;
@@ -835,7 +871,7 @@ export interface ArgentToolArgs {
835
871
  baselinePath?: string;
836
872
  /** Path to the saved current PNG file. Required unless captureCurrent is true; do not pass both. */
837
873
  currentPath?: string;
838
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
874
+ /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial, or a Mac app id). */
839
875
  udid: string;
840
876
  /** Capture the baseline screenshot live from the device, at full resolution, before diffing. Cannot be combined with captureCurrent. */
841
877
  captureBaseline?: boolean;