@swmansion/argent 0.32.1-next.2 → 0.32.1-next.21

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 (46) 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 +552 -440
  11. package/dist/client.d.ts +5 -0
  12. package/dist/client.js +71 -9
  13. package/dist/installer.mjs +384 -202
  14. package/dist/mcp-server.mjs +167 -20
  15. package/dist/tool-args.generated.d.ts +91 -50
  16. package/dist/tool-server.cjs +34748 -29334
  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 +8 -4
  31. package/skills/argent-create-e2e/references/live-authoring.md +1 -0
  32. package/skills/argent-create-e2e/references/reliability-and-recovery.md +3 -3
  33. package/skills/argent-device-interact/SKILL.md +3 -2
  34. package/skills/argent-device-interact/references/chromium.md +1 -1
  35. package/skills/argent-device-interact/references/harmonyos.md +1 -1
  36. package/skills/argent-ios-simulator-setup/SKILL.md +1 -1
  37. package/skills/argent-macos-app-interact/SKILL.md +44 -0
  38. package/skills/argent-macos-app-interact/references/e2e.md +6 -0
  39. package/skills/argent-qa-e2e/SKILL.md +1 -1
  40. package/skills/argent-react-native-app-workflow/SKILL.md +2 -0
  41. package/skills/argent-react-native-optimization/SKILL.md +2 -3
  42. package/skills/argent-react-native-profiler/SKILL.md +8 -8
  43. package/skills/argent-screenshot-diff/SKILL.md +1 -1
  44. package/skills/argent-test-ui-flow/SKILL.md +1 -1
  45. package/skills/argent-tv-interact/SKILL.md +4 -4
  46. 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; not Apple TV, whose tree it cannot read). */
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; 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 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;
@@ -271,6 +275,29 @@ export interface ArgentToolArgs {
271
275
  project_root: string;
272
276
  /** Fragments only: the app/device state assumed on entry (e.g. "Settings app open on General page"). Omit it for a standalone e2e test. restart-app has no chromium support, so a chromium e2e test records as a fragment; add the `launch: { chromium: <app path> }` line to the YAML afterward, deleting the executionPrerequisite line if you passed one, since an e2e test that starts with a launch must not declare it. */
273
277
  executionPrerequisite?: string;
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. */
279
+ requires?: {
280
+ platform?: "ios" | "android" | "chromium" | "vega" | "macos" | Array<"ios" | "android" | "chromium" | "vega" | "macos">;
281
+ runtimeKind?: "mobile" | "tv";
282
+ };
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;
274
301
  };
275
302
  fill: {
276
303
  /** Target device id from `list-devices`. */
@@ -316,7 +343,7 @@ export interface ArgentToolArgs {
316
343
  interpolate?: number;
317
344
  };
318
345
  "gesture-drag": {
319
- /** 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. */
320
347
  udid: string;
321
348
  /** Press x. */
322
349
  fromX: number;
@@ -326,7 +353,7 @@ export interface ArgentToolArgs {
326
353
  toX: number;
327
354
  /** Release y. */
328
355
  toY: number;
329
- /** 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. */
330
357
  durationMs?: number;
331
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. */
332
359
  momentum?: boolean;
@@ -372,7 +399,7 @@ export interface ArgentToolArgs {
372
399
  durationMs?: number;
373
400
  };
374
401
  "gesture-scroll": {
375
- /** 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. */
376
403
  udid: string;
377
404
  /** Anchor x. The wheel events land here; put it over the element you want to scroll. */
378
405
  x: number;
@@ -382,7 +409,7 @@ export interface ArgentToolArgs {
382
409
  deltaX?: number;
383
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. */
384
411
  deltaY?: number;
385
- /** 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. */
386
413
  durationMs?: number;
387
414
  };
388
415
  "gesture-swipe": {
@@ -402,7 +429,7 @@ export interface ArgentToolArgs {
402
429
  momentum?: boolean;
403
430
  };
404
431
  "gesture-tap": {
405
- /** 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). */
406
433
  udid: string;
407
434
  /** Horizontal position: 0 = left edge, 1 = right edge. */
408
435
  x: number;
@@ -410,32 +437,44 @@ export interface ArgentToolArgs {
410
437
  y: number;
411
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. */
412
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";
413
442
  };
414
443
  keyboard: {
415
- /** 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). */
416
445
  udid: string;
417
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. */
418
447
  text?: string;
419
- /** 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. */
420
449
  key?: string;
421
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. */
422
451
  delayMs?: number;
423
452
  };
424
453
  "launch-app": {
425
- /** 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). */
426
455
  udid: string;
427
- /** 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. */
428
457
  bundleId: string;
429
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. */
430
459
  activity?: string;
431
- /** 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. */
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. */
432
461
  launchArgs?: Array<string>;
433
462
  };
434
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
+ };
435
474
  "native-describe-screen": {
436
- /** Simulator UDID */
475
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
437
476
  udid: string;
438
- /** Bundle ID of the app */
477
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
439
478
  bundleId: string;
440
479
  /** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image-heavy branches) */
441
480
  skipClasses?: Array<string>;
@@ -449,9 +488,9 @@ export interface ArgentToolArgs {
449
488
  bundleId: string;
450
489
  };
451
490
  "native-find-views": {
452
- /** Simulator UDID */
491
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
453
492
  udid: string;
454
- /** Bundle ID of the app */
493
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
455
494
  bundleId: string;
456
495
  /** UIView class name to match (exact, e.g. UIButton) */
457
496
  className?: string;
@@ -467,15 +506,15 @@ export interface ArgentToolArgs {
467
506
  includeAncestors?: boolean;
468
507
  /** Include child views for each matched view (default true) */
469
508
  includeChildren?: boolean;
470
- /** 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 */
471
510
  fields?: Array<string>;
472
511
  };
473
512
  "native-full-hierarchy": {
474
- /** Simulator UDID */
513
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
475
514
  udid: string;
476
- /** Bundle ID of the app */
515
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
477
516
  bundleId: string;
478
- /** 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 */
479
518
  fields?: Array<string>;
480
519
  /** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes) */
481
520
  skipClasses?: Array<string>;
@@ -485,9 +524,9 @@ export interface ArgentToolArgs {
485
524
  maxDepth?: number;
486
525
  };
487
526
  "native-network-logs": {
488
- /** 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>) */
489
528
  udid: string;
490
- /** 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) */
491
530
  bundleId: string;
492
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. */
493
532
  port?: number;
@@ -517,11 +556,11 @@ export interface ArgentToolArgs {
517
556
  device_id: string;
518
557
  };
519
558
  "native-user-interactable-view-at-point": {
520
- /** Simulator UDID */
559
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
521
560
  udid: string;
522
- /** Bundle ID of the app */
561
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
523
562
  bundleId: string;
524
- /** 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. */
525
564
  x: number;
526
565
  /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
527
566
  y: number;
@@ -529,7 +568,7 @@ export interface ArgentToolArgs {
529
568
  includeAncestors?: boolean;
530
569
  /** Include child views for the matched view (default false) */
531
570
  includeChildren?: boolean;
532
- /** 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 */
533
572
  fields?: Array<string>;
534
573
  /** Exact UIView class names whose entire subtree should be pruned */
535
574
  skipClasses?: Array<string>;
@@ -539,11 +578,11 @@ export interface ArgentToolArgs {
539
578
  maxDepth?: number;
540
579
  };
541
580
  "native-view-at-point": {
542
- /** Simulator UDID */
581
+ /** Simulator UDID, or a Mac app id (macos-app-<bundle id>) */
543
582
  udid: string;
544
- /** Bundle ID of the app */
583
+ /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
545
584
  bundleId: string;
546
- /** 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. */
547
586
  x: number;
548
587
  /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
549
588
  y: number;
@@ -551,7 +590,7 @@ export interface ArgentToolArgs {
551
590
  includeAncestors?: boolean;
552
591
  /** Include child views for the matched view (default false) */
553
592
  includeChildren?: boolean;
554
- /** 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 */
555
594
  fields?: Array<string>;
556
595
  /** Exact UIView class names whose entire subtree should be pruned */
557
596
  skipClasses?: Array<string>;
@@ -569,7 +608,7 @@ export interface ArgentToolArgs {
569
608
  bundleId?: string;
570
609
  };
571
610
  paste: {
572
- /** 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). */
573
612
  udid: string;
574
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. */
575
614
  text: string;
@@ -586,8 +625,8 @@ export interface ArgentToolArgs {
586
625
  /** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
587
626
  device_id: string;
588
627
  /** Query mode; see Modes in the tool description. */
589
- mode: "by_component" | "by_time_range" | "by_index" | "cascade_tree";
590
- /** 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 */
591
630
  component_name?: string;
592
631
  /** Time range in ms since profiling started, the clock this tool prints */
593
632
  time_range_ms?: {
@@ -598,7 +637,7 @@ export interface ArgentToolArgs {
598
637
  };
599
638
  /** Commit index */
600
639
  commit_index?: number;
601
- /** 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. */
602
641
  top_n?: number;
603
642
  };
604
643
  "profiler-cpu-query": {
@@ -623,6 +662,8 @@ export interface ArgentToolArgs {
623
662
  top_n?: number;
624
663
  /** Also show callers of the function */
625
664
  include_callers?: boolean;
665
+ /** top_functions and time_window: list only React component functions (PascalCase names) */
666
+ react_only?: boolean;
626
667
  };
627
668
  "profiler-load": {
628
669
  /** What to do; see Modes in the tool description. */
@@ -769,13 +810,13 @@ export interface ArgentToolArgs {
769
810
  appPath: string;
770
811
  };
771
812
  "restart-app": {
772
- /** 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). */
773
814
  udid: string;
774
- /** 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. */
775
816
  bundleId: string;
776
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. */
777
818
  activity?: string;
778
- /** 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. */
779
820
  launchArgs?: Array<string>;
780
821
  };
781
822
  rotate: {
@@ -785,7 +826,7 @@ export interface ArgentToolArgs {
785
826
  orientation: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
786
827
  };
787
828
  "run-sequence": {
788
- /** 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. */
789
830
  udid: string;
790
831
  /** Ordered list of interaction steps to execute sequentially */
791
832
  steps: Array<{
@@ -814,11 +855,11 @@ export interface ArgentToolArgs {
814
855
  udid: string;
815
856
  };
816
857
  screenshot: {
817
- /** 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). */
818
859
  udid: string;
819
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. */
820
861
  rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
821
- /** 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. */
822
863
  scale?: number;
823
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. */
824
865
  includeImageInContext?: boolean;
@@ -830,7 +871,7 @@ export interface ArgentToolArgs {
830
871
  baselinePath?: string;
831
872
  /** Path to the saved current PNG file. Required unless captureCurrent is true; do not pass both. */
832
873
  currentPath?: string;
833
- /** 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). */
834
875
  udid: string;
835
876
  /** Capture the baseline screenshot live from the device, at full resolution, before diffing. Cannot be combined with captureCurrent. */
836
877
  captureBaseline?: boolean;