@swmansion/argent 0.35.1-next.14 → 0.35.1-next.16

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.
package/dist/cli-cmds.mjs CHANGED
@@ -38588,7 +38588,7 @@ function isCi(env = process.env) {
38588
38588
  var SESSION_ID2 = randomUUID5();
38589
38589
  function readCliVersion() {
38590
38590
  if (true) {
38591
- return "0.35.1-next.13";
38591
+ return "0.35.1-next.16";
38592
38592
  }
38593
38593
  return "0.0.0";
38594
38594
  }
@@ -17103,7 +17103,7 @@ function isCi(env = process.env) {
17103
17103
  var SESSION_ID = randomUUID4();
17104
17104
  function readCliVersion() {
17105
17105
  if (true) {
17106
- return "0.35.1-next.13";
17106
+ return "0.35.1-next.16";
17107
17107
  }
17108
17108
  return "0.0.0";
17109
17109
  }
@@ -37853,7 +37853,7 @@ function debuggerLogRegistryText(result) {
37853
37853
  }
37854
37854
 
37855
37855
  // ../argent-mcp/src/instructions.ts
37856
- var SERVER_INSTRUCTIONS = "Argent \u2014 iOS Simulator, Android Emulator, and Chromium app control for interacting, testing, profiling and debugging mobile and Chromium applications. Use the platform the user named; otherwise prefer a device list-devices shows already running, and do not default to iOS. In a single-platform project, boot that platform. Prefer these tools over raw xcrun or adb commands, which are a fallback. Prefer launch-app or open-url over tapping home-screen icons. If the task may need a saved e2e test, load the argent-create-e2e skill (argent-qa-e2e for acceptance tests) before the first launch or in-app action: recording is not retroactive. Load the matching argent-* skill before React Native build or debug work, profiling, a physical phone, a Mac app or a TV. Interaction tools return the screen after the action: a screenshot plus the accessibility element tree with normalized tap frames. Take coordinates from that tree; call describe only when no fresh tree is available \u2014 never guess coordinates from pixels. When the screenshot or tree matches (or the tree differs slightly from) an earlier result, it names that earlier result by its screenshot or tree id (unchanged note or `-` gone / `+` new lines) in place of repeating it. If a tap fails twice, stop retrying and call a discovery tool again. Use await-ui-element to wait for the UI instead of polling with screenshots. Do not stop simulator servers when a task finishes: the next task reuses them. Call stop-all-simulator-servers when the user asks to clean up or ends the session, or when a skill tells you to recycle a device's services, always with devices: [...] naming the devices this session used. Never stop a Metro the user started unless they ask. One tool-server is shared by every agent using this argent install, so an unscoped call tears down their devices too \u2014 reserve it for a deliberate machine-wide cleanup. The argent CLI manages the toolkit: argent --help lists its commands.";
37856
+ var SERVER_INSTRUCTIONS = "Argent controls iOS, Android, Chromium, Mac, TV, and HarmonyOS apps. Use the platform named by the user; otherwise prefer an already-running device from `list-devices` (do not default to iOS). In a single-platform project, boot that platform. Prefer Argent tools over raw `xcrun`/`adb`; use `launch-app`/`open-url` instead of tapping home-screen icons. Load `argent-create-e2e` (`argent-qa-e2e` for acceptance tests) before the first action if an e2e test may be needed (recording is not retroactive), and load the matching `argent-*` skill before React Native build/debug, profiling, physical phone, Mac app, or TV work. Interaction tools return a screenshot + accessibility tree with normalized [0,1] tap frames (or an unchanged note / `-`+`+` diff referencing an earlier screenshot/tree id). Take tap coordinates from that tree \u2014 never guess from pixels \u2014 and call `describe` only without a fresh tree. After two failed taps, re-discover. Use `await-ui-element` instead of polling. Do not stop simulator servers when finishing; call `stop-all-simulator-servers` only when asked to clean up or when a skill tells you to recycle a device's services, scoped with `devices: [...]` (the tool-server is shared across agents), and never stop a user-started Metro. CLI: `argent --help`.";
37857
37857
 
37858
37858
  // ../argent-mcp/src/installed-version.ts
37859
37859
  import * as fs12 from "node:fs";
@@ -38058,7 +38058,7 @@ async function startMcpServer(options) {
38058
38058
  const autoDescribeOn = autoDescribeEnabled();
38059
38059
  const whatsNewOn = whatsNewEnabled();
38060
38060
  const installedVersion = getInstalledVersion();
38061
- const highlightsVersion = true ? "0.35.1-next.13" : installedVersion;
38061
+ const highlightsVersion = true ? "0.35.1-next.16" : installedVersion;
38062
38062
  const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
38063
38063
  const trees = createTreeMemory();
38064
38064
  const screenshots = createScreenshotMemory();
@@ -46,11 +46,11 @@ export interface ArgentToolArgs {
46
46
  minStableMs?: number;
47
47
  };
48
48
  "await-ui-element": {
49
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
49
+ /** Target device id from `list-devices`. */
50
50
  udid: string;
51
- /** 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. */
51
+ /** `exists`: in tree; `visible`: non-zero on-screen frame; `hidden`: absent or zero-area; `text`: first visible match in reading order matches `expectedText`. On a Mac app, open menus match before alerts/sheets and the window. */
52
52
  condition: "exists" | "visible" | "hidden" | "text";
53
- /** Element to match. Give at least one field; every given field must match. */
53
+ /** Element matcher (at least one field; all given fields must match). */
54
54
  selector: {
55
55
  /** Case-insensitive substring of the element's visible label or value. */
56
56
  text?: string;
@@ -59,15 +59,15 @@ export interface ArgentToolArgs {
59
59
  /** Case-insensitive substring of the element's role (e.g. AXButton, button, TextView). */
60
60
  role?: string;
61
61
  };
62
- /** Required for condition `text`: the string the checked match must contain or equal (see `textMatch`). */
62
+ /** Required for `text`: expected substring or full string (see `textMatch`). */
63
63
  expectedText?: string;
64
- /** For condition `text`: how expectedText is compared. `contains` (default) is a case-insensitive substring; `equals` is a case-insensitive full-string match. */
64
+ /** Case-insensitive match mode for `text`: `contains` (default) or `equals`. */
65
65
  textMatch?: "contains" | "equals";
66
- /** iOS app bundle id, passed to the describe fallback (see `describe`). Ignored on every other platform, including physical iOS. */
66
+ /** iOS simulator only: fallback bundle id for `describe`. */
67
67
  bundleId?: string;
68
- /** Max time to wait for the condition before giving up (default 5000). */
68
+ /** Timeout in ms (default 5000). */
69
69
  timeoutMs?: number;
70
- /** How often to re-check the tree (default 400). */
70
+ /** Poll interval in ms (default 400). */
71
71
  pollIntervalMs?: number;
72
72
  };
73
73
  await_user_selection: {
@@ -75,39 +75,39 @@ export interface ArgentToolArgs {
75
75
  timeoutSeconds?: number;
76
76
  };
77
77
  "boot-device": {
78
- /** iOS: simulator UDID to boot (from `list-devices`). A Mac app id (`macos-app-<bundle id>`) starts that app again from its last path. */
78
+ /** iOS simulator UDID from `list-devices`. Or Mac app id (`macos-app-<bundle id>`) to relaunch from its last path. */
79
79
  udid?: string;
80
- /** Android: AVD to start, the `avdName` of a `list-devices` entry with kind 'avd'. A running emulator of it is reused when it fits the call: see `readOnly` and `port`. */
80
+ /** Android AVD name (`kind: 'avd'` from `list-devices`). Reuses a compatible running emulator. */
81
81
  avdName?: string;
82
- /** Vega (Fire TV): VVD image to boot: the `vvdImage` of a Vega device from `list-devices` (e.g. `tv`). */
82
+ /** Vega (Fire TV) VVD image name from `list-devices` (e.g. `tv`). */
83
83
  vvdImage?: string;
84
- /** HarmonyOS: emulator instance to start: the `name` of a `kind: "emulator"` device from `list-devices` (e.g. `Phone_1`); the `harmony-emulator-<name>` id that entry reports as its `udid` is accepted too. */
84
+ /** HarmonyOS emulator instance name or `harmony-emulator-<name>` id from `list-devices`. */
85
85
  harmonyInstance?: string;
86
- /** 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. */
86
+ /** Overall boot budget in ms (Android default 480000, Vega 120000, HarmonyOS 180000). On HarmonyOS with `force`, this spans shutdown too. */
87
87
  bootTimeoutMs?: number;
88
- /** 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. */
88
+ /** Shut down and reboot even if already running. On HarmonyOS, also ties a running instance to its `hdc` connect key. On a Mac app, quits and restarts the same .app build, including a copy running without the argent library (losing its unsaved changes); fails if the app shows a save prompt. Ignored for Electron. */
89
89
  force?: boolean;
90
- /** 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. */
90
+ /** Android only: enable emulator audio (default false, or `boot-sound` flag). Pair with `force: true` to toggle a running emulator. */
91
91
  sound?: boolean;
92
- /** Android on a macOS host only: boot the emulator with guest Vulkan. Defaults to false: guest Vulkan crashes Chrome's GPU process, which breaks Chrome and Custom Tab sign-in flows. Without it apps find no Vulkan device, although the guest still lists the Vulkan features, so a Vulkan-only renderer such as WebGPU (react-native-wgpu) draws nothing; pass `true` to test one. Takes effect at boot: an emulator already running in the other mode is reused with a `note`, and `force: true` reboots it. A boot snapshot saved in the other mode can't be reused, so the first boot after toggling is a slower cold boot. The `ARGENT_EMULATOR_GUEST_VULKAN` env var flips this default to true. Ignored on other hosts and platforms. */
92
+ /** Android on a macOS host only: enable guest Vulkan (default false; true needed for WebGPU/Vulkan renderers, may crash Chrome GPU). Pair with `force: true` to toggle. */
93
93
  guestVulkan?: boolean;
94
- /** Android only: boot the emulator with `-read-only`, so that several emulators can run one AVD at once, for example one per agent. Defaults to false. A read-only emulator saves no snapshot and loses its changes when it exits, so the AVD and its quickboot snapshot stay as they were. The emulator runs an AVD either writable once or read-only any number of times, never both, so the boot fails while the AVD runs writable, and a writable boot fails while the AVD runs in any instance it cannot reuse. A read-only boot reuses only a running read-only emulator. Ignored on other platforms. */
94
+ /** Android only: boot `-read-only` (default false) to run multiple concurrent instances of one AVD without saving snapshot changes. */
95
95
  readOnly?: boolean;
96
- /** Android only: the emulator's console port, an even number from 5554 to 5584 (`emulator -port`), the range adb finds emulators in; its serial is `emulator-<port>`. Without it the emulator takes the first free port from 5554 up, as Android Studio does. The gRPC server Argent needs for screenshots and gestures goes on the port plus 3000, which must be free too. Given a port, the tool reuses only the emulator on that port and fails if another emulator holds it, or if this AVD runs there writable on a read-only boot and `force` is not set. A read-only emulator started with `-port` belongs to the calls that give that port: a call without `port` never reuses or shuts it down. Where the process list cannot be read (Windows, or a failed `ps`), Argent knows only the pinned emulators it booted itself, so a writable call without `port` can reuse, or with `force` shut down, one that someone else pinned. A writable one is still reused, or with `force` shut down, by a writable call without `port`, since the AVD runs one writable emulator at a time. `force` shuts nothing down when another emulator of the AVD would still block the boot. Ignored on other platforms. */
96
+ /** Android only: emulator console port (even, 5554–5584; serial `emulator-<port>`, gRPC on port+3000). Defaults to first free port. */
97
97
  port?: number;
98
- /** Local iOS simulator only: apply accessibility preferences and leave the simulator shut down for a pool manager to boot. Requires Shutdown state. Cannot be combined with force: true. */
98
+ /** Local iOS simulator only: apply accessibility prefs to a Shutdown simulator without booting. Cannot combine with `force: true`. */
99
99
  prepareOnly?: boolean;
100
- /** iOS only: boot the simulator core WITHOUT opening its GUI window (Simulator.app, or Device Hub on Xcode 27+). The device still streams via simulator-server. The `ARGENT_SIMULATOR_NO_WINDOW` env var (1/true/yes) forces this host-wide. */
100
+ /** iOS only: boot simulator core without opening Simulator.app (`ARGENT_SIMULATOR_NO_WINDOW=1` forces host-wide). */
101
101
  headless?: boolean;
102
- /** Electron: path to the Electron app to launch. Either a packaged .app bundle / executable, or a project directory whose package.json points the Electron binary at the entry script. */
102
+ /** Electron: path to `.app` bundle, executable, or project directory with `package.json`. */
103
103
  electronAppPath?: string;
104
- /** Electron-only: CDP remote-debugging port to expose. Defaults to a free port; the resulting device id is `chromium-cdp-<port>`. */
104
+ /** Electron only: CDP remote-debugging port (default: free port; id `chromium-cdp-<port>`). */
105
105
  electronPort?: number;
106
- /** Electron-only: extra CLI arguments forwarded to the Electron binary after the app path. */
106
+ /** Electron only: extra CLI args forwarded to the Electron binary. */
107
107
  electronArgs?: Array<string>;
108
- /** Mac app: path to the .app bundle to start with the argent library; its device id is `macos-app-<bundle id>`. An exported or notarized Release build with the hardened runtime cannot be driven without extra entitlements; a hardened Debug build needs the step the error names. */
108
+ /** Mac app: path to `.app` bundle (id `macos-app-<bundle id>`). */
109
109
  macosAppPath?: string;
110
- /** Mac app only: arguments for the app executable. Omitted, the app starts with none, also when an earlier start had some. */
110
+ /** Mac app only: launch arguments (omitted = none). */
111
111
  macosAppArgs?: Array<string>;
112
112
  };
113
113
  button: {
@@ -231,9 +231,9 @@ export interface ArgentToolArgs {
231
231
  device_id: string;
232
232
  };
233
233
  describe: {
234
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
234
+ /** Target device id from `list-devices`. */
235
235
  udid: string;
236
- /** 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. */
236
+ /** iOS simulator only: fallback bundle id when AX-service returns empty (auto-detects frontmost if omitted). */
237
237
  bundleId?: string;
238
238
  };
239
239
  "dismiss-update": {
@@ -487,53 +487,55 @@ export interface ArgentToolArgs {
487
487
  durationMs?: number;
488
488
  };
489
489
  "gesture-swipe": {
490
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
490
+ /** Target device id from `list-devices`. */
491
491
  udid: string;
492
- /** Start x. */
492
+ /** Start x [0,1]. */
493
493
  fromX: number;
494
- /** Start y. */
494
+ /** Start y [0,1]. */
495
495
  fromY: number;
496
- /** End x. */
496
+ /** End x [0,1]. */
497
497
  toX: number;
498
- /** End y. */
498
+ /** End y [0,1]. */
499
499
  toY: number;
500
- /** Total gesture duration in milliseconds (default 300); the finger stays down this long. Below ~32ms the whole travel lands in one or two frames, which the OS flings as hard as any flick. */
500
+ /** Swipe duration in ms (default 300). */
501
501
  durationMs?: number;
502
- /** Whether the swipe releases with momentum; default true (a natural flinging swipe). false eases the finger into the end point so the OS applies little to no fling and the content stops where the finger lifts: use it when you need a deterministic scroll distance, e.g. in scroll-to-element loops. false needs durationMs >= 150 and is rejected below that; near 150 it can still land short or fling, so keep the default 300. */
502
+ /** Default true (flinging swipe). Set false to ease out with no fling for deterministic scroll distance (requires durationMs >= 150). */
503
503
  momentum?: boolean;
504
504
  };
505
505
  "gesture-tap": {
506
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, Mac app id, or Chromium id). */
506
+ /** Target device id from `list-devices`. */
507
507
  udid: string;
508
- /** Horizontal position: 0 = left edge, 1 = right edge. */
508
+ /** Horizontal screen fraction [0,1]. */
509
509
  x: number;
510
- /** Vertical position: 0 = top edge, 1 = bottom edge. */
510
+ /** Vertical screen fraction [0,1]. */
511
511
  y: number;
512
- /** 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. */
512
+ /** Tap/click count as one OS gesture (2 = double-tap; default 1). On physical iOS, higher counts loop single taps, which a double-tap recognizer may pair. */
513
513
  clickCount?: number;
514
- /** Mouse button, Mac app only: "right" is a right-click, for example to open a context menu; any other device refuses it. Default "left". */
514
+ /** Mac app only: mouse button ("left" default, or "right"). */
515
515
  button?: "left" | "right";
516
- /** Keys held throughout a click or multi-click gesture. Mac apps only. An empty list leaves the click unmodified. */
516
+ /** Mac app only: modifier keys held during click. */
517
517
  modifiers?: Array<"control" | "option" | "shift" | "command">;
518
518
  };
519
519
  keyboard: {
520
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
520
+ /** Target device id from `list-devices`. */
521
521
  udid: string;
522
- /** 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. */
522
+ /** Text to type. Cannot be combined with `key` (use two steps in `run-sequence` to type then press enter). Supports `{{secret:<NAME>}}` placeholders resolved server-side from `ARGENT_SECRET_<NAME>` / `.argent/secrets.env` (auto-screenshot is skipped; combine with submit in one `run-sequence` to keep the skip; never ask the user for plaintext). */
523
523
  text?: string;
524
- /** 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. */
524
+ /** Named key. Cannot be combined with `text` (use two steps in `run-sequence`). Values: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Not supported on Apple TV / Android TV (use `tv-remote`). Physical iOS: enter/backspace only. HarmonyOS: enter, backspace, space, arrow-left/right. Mac app: also delete (forward delete), home, end, page-up/down, and modifier shortcuts (e.g. command+a). */
525
525
  key?: string;
526
- /** 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. */
526
+ /** Press `key` this many times in one call, e.g. `{ key: "backspace", repeat: 12 }`. Only valid with `key`. */
527
+ repeat?: number;
528
+ /** Delay in ms between key presses (default 50; ignored on platforms that type in one shot). */
527
529
  delayMs?: number;
528
530
  };
529
531
  "launch-app": {
530
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, Mac app id, or Chromium id). */
532
+ /** Target device id from `list-devices`. */
531
533
  udid: string;
532
- /** 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. */
534
+ /** App identifier (iOS/Mac app bundle id, Android package name, Vega interactive component app id from manifest.toml e.g. `com.example.app.main`, HarmonyOS bundle name from `bm dump -a`, or Chromium tag). */
533
535
  bundleId: string;
534
- /** 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. */
536
+ /** Android only: Activity name (default: launcher activity). */
535
537
  activity?: string;
536
- /** 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. */
538
+ /** Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`. Relaunches running simulators/phones to apply. */
537
539
  launchArgs?: Array<string>;
538
540
  };
539
541
  "list-devices": Record<string, never>;
@@ -938,13 +940,13 @@ export interface ArgentToolArgs {
938
940
  appPath: string;
939
941
  };
940
942
  "restart-app": {
941
- /** Target device id from `list-devices` (iOS UDID, Mac app id, HarmonyOS id, or Android serial). */
943
+ /** Target device id from `list-devices`. */
942
944
  udid: string;
943
- /** 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. */
945
+ /** App identifier (iOS/Mac app bundle id, Android package name, Vega interactive component app id, or HarmonyOS bundle name). */
944
946
  bundleId: string;
945
- /** 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. */
947
+ /** Android only: Activity name to relaunch (default: launcher activity). */
946
948
  activity?: string;
947
- /** 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. */
949
+ /** Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`. */
948
950
  launchArgs?: Array<string>;
949
951
  };
950
952
  rotate: {
@@ -954,20 +956,20 @@ export interface ArgentToolArgs {
954
956
  orientation: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
955
957
  };
956
958
  "run-sequence": {
957
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id), shared across all steps. */
959
+ /** Target device id from `list-devices`, shared across all steps. */
958
960
  udid: string;
959
- /** Ordered list of interaction steps to execute sequentially */
961
+ /** Ordered steps to execute. */
960
962
  steps: Array<{
961
- /** Tool name: one of the allowed tools listed in the description. */
963
+ /** Allowed tool name (see description). */
962
964
  tool: string;
963
- /** Tool arguments (excluding udid, which is injected automatically) */
965
+ /** Tool arguments (omit `udid`, injected automatically). */
964
966
  args: {
965
967
  [key: string]: unknown;
966
968
  };
967
- /** Wait time in ms after this step (and after the settle wait) before the next (default 100) */
969
+ /** Extra pause in ms after step settle (default 100). */
968
970
  delayMs?: number;
969
971
  }>;
970
- /** Wait up to 1000ms after a screen-changing step for the element tree to settle before the next step. Default true; set false on a screen that never stops changing. */
972
+ /** Wait up to 1000ms for tree settle between screen-changing steps (default true). */
971
973
  settle?: boolean;
972
974
  };
973
975
  "screen-recording-start": {
@@ -985,15 +987,15 @@ export interface ArgentToolArgs {
985
987
  udid: string;
986
988
  };
987
989
  screenshot: {
988
- /** Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
990
+ /** Target device id from `list-devices`. */
989
991
  udid: string;
990
- /** Orientation override for the screenshot (on Chromium it rotates the captured image). Rarely needed: on Android and iOS simulators the capture already follows the UI's orientation, the space describe frames and gesture coordinates use, and an override can make the image disagree with them. Rejected on HarmonyOS, which captures the display in its current orientation and has no override. Ignored on physical iPhones. */
992
+ /** Orientation override (rarely needed; captures already follow UI orientation). Rejected on HarmonyOS (captures display in current orientation). Ignored on physical iPhones. */
991
993
  rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
992
- /** 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. */
994
+ /** Scale factor (default 0.25 on iOS/Android/HarmonyOS or `ARGENT_SCREENSHOT_SCALE`, 576px long side on TV, 1.0 on Chromium, <=768px on Mac). */
993
995
  scale?: number;
994
- /** 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. */
996
+ /** Set false only when saving a full-res (`scale: 1.0`) baseline/current for `screenshot-diff`. */
995
997
  includeImageInContext?: boolean;
996
- /** Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Ignored on every other platform. */
998
+ /** Chromium only: downscaler when scale < 1 (default lanczos3). */
997
999
  downscaler?: "lanczos3" | "box" | "bilinear" | "nearest";
998
1000
  };
999
1001
  "screenshot-diff": {