@swmansion/argent 0.35.1-next.7 → 0.35.1-next.71

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 (58) hide show
  1. package/README.md +16 -15
  2. package/bin/argent-android-devtools-0.4.0.apk +0 -0
  3. package/bin/darwin/argent-macos-helper +0 -0
  4. package/bin/darwin/ax-service +0 -0
  5. package/bin/darwin/tvos-ax-service +0 -0
  6. package/bin/darwin/tvos-hid-daemon +0 -0
  7. package/bin/network-inspector/network-inspector.jar +0 -0
  8. package/bin/tcp/ax-service +0 -0
  9. package/dist/cli-cmds.mjs +2821 -2159
  10. package/dist/cli.js +22 -3
  11. package/dist/cli.js.map +1 -1
  12. package/dist/client.js +760 -440
  13. package/dist/fatal-handlers.d.ts +1 -0
  14. package/dist/fatal-handlers.js +8 -2
  15. package/dist/fatal-handlers.js.map +1 -1
  16. package/dist/installer-help.js +4 -2
  17. package/dist/installer-help.js.map +1 -1
  18. package/dist/installer.mjs +760 -705
  19. package/dist/mcp-server.mjs +1825 -1408
  20. package/dist/tool-args.generated.d.ts +409 -320
  21. package/dist/tool-server.cjs +17569 -12596
  22. package/dylibs/libArgentAudio.dylib +0 -0
  23. package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
  24. package/dylibs/libKeyboardPatch.dylib +0 -0
  25. package/dylibs/libNativeDevtoolsIos.dylib +0 -0
  26. package/dylibs/macos/libArgentInjectionBootstrap.dylib +0 -0
  27. package/dylibs/macos/libNativeDevtoolsMacos.dylib +0 -0
  28. package/dylibs/tcp/argent-audio-feeder +0 -0
  29. package/dylibs/tcp/libArgentAudio.dylib +0 -0
  30. package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
  31. package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
  32. package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
  33. package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
  34. package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
  35. package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
  36. package/package.json +2 -2
  37. package/skills/argent-android-emulator-setup/SKILL.md +2 -2
  38. package/skills/argent-create-e2e/SKILL.md +2 -1
  39. package/skills/argent-create-e2e/references/e2e-yaml.md +40 -5
  40. package/skills/argent-create-e2e/references/live-authoring.md +14 -3
  41. package/skills/argent-device-interact/SKILL.md +21 -94
  42. package/skills/argent-device-interact/references/advanced.md +64 -0
  43. package/skills/argent-ios-device-interact/SKILL.md +1 -1
  44. package/skills/argent-ios-device-setup/SKILL.md +1 -1
  45. package/skills/argent-ios-simulator-setup/SKILL.md +1 -1
  46. package/skills/argent-lens/SKILL.md +1 -1
  47. package/skills/argent-macos-app-interact/SKILL.md +1 -1
  48. package/skills/argent-metro-debugger/SKILL.md +4 -4
  49. package/skills/argent-native-profiler/SKILL.md +1 -1
  50. package/skills/argent-qa-e2e/SKILL.md +1 -1
  51. package/skills/argent-react-native-app-workflow/SKILL.md +1 -1
  52. package/skills/argent-react-native-optimization/SKILL.md +1 -1
  53. package/skills/argent-react-native-profiler/SKILL.md +1 -1
  54. package/skills/argent-screen-recording/SKILL.md +1 -1
  55. package/skills/argent-screenshot-diff/SKILL.md +1 -1
  56. package/skills/argent-settings-permissions/SKILL.md +1 -1
  57. package/skills/argent-test-ui-flow/SKILL.md +1 -1
  58. package/skills/argent-tv-interact/SKILL.md +1 -1
@@ -16,23 +16,70 @@ export interface ArgentToolArgs {
16
16
  bundleId?: string;
17
17
  };
18
18
  "await-network-request": {
19
- /** Device ID passed as udid to network-capture-start. The wait reuses its Metro target. */
19
+ /** Device ID used in `network-capture-start`. */
20
20
  udid: string;
21
- /** The bundleId used for network-capture-start. On Chromium, use a valid placeholder such as argent.capture. */
21
+ /** `bundleId` used in `network-capture-start` (Chromium: placeholder like `argent.capture`). */
22
22
  bundleId: string;
23
- /** URL text or a pattern. Match a part with no secrets. The result includes the full URL and secret placeholders are rejected. */
23
+ /** URL text or pattern. `{{secret:NAME}}` expands to the secret value. */
24
24
  url: string;
25
- /** contains (default) and equals ignore case. matches uses a case-sensitive JavaScript regular expression with no implicit anchors. */
25
+ /** `contains` (default) / `equals` (case-insensitive) or `matches` (case-sensitive JS regex). */
26
26
  urlMatch?: "contains" | "equals" | "matches";
27
- /** HTTP method, matched without regard to case. */
27
+ /** HTTP method (case-insensitive). */
28
28
  method?: string;
29
- /** Exact HTTP status or a class such as "2xx". Failed requests can match if they received response headers. */
29
+ /** Exact HTTP status or class (e.g. "2xx"). */
30
30
  status?: "1xx" | "2xx" | "3xx" | "4xx" | "5xx" | number;
31
- /** complete (default) accepts a finished response, including HTTP errors. failed accepts a request error. any accepts either. */
32
- outcome?: "complete" | "failed" | "any";
33
- /** Wait limit in milliseconds. Default 10000. */
31
+ /** `complete` includes HTTP error responses. `failed` matches network errors. `any` matches either. `sent` matches all states. Defaults to `sent` with `absent: true`, otherwise `complete`. */
32
+ outcome?: "complete" | "failed" | "any" | "sent";
33
+ /** Check one request header using exactly one of `equals`, `contains`, `matches`, or `exists`. */
34
+ header?: {
35
+ /** Case-insensitive header name, such as `authorization`. Names of only digits are invalid. */
36
+ name: string;
37
+ /** Dot-separated JWT payload claim, such as `consents.analytics`. Accepts a `Bearer ` prefix and reads the payload without validating the signature. */
38
+ claim?: string;
39
+ /** Exact, case-sensitive match. Compares numbers and booleans as text. */
40
+ equals?: string | number | boolean;
41
+ /** Case-sensitive substring. */
42
+ contains?: string;
43
+ /** Case-sensitive JavaScript regular expression. */
44
+ matches?: string;
45
+ /** Use true for a present value or false for a missing or null value. */
46
+ exists?: boolean;
47
+ };
48
+ /** Check a request body using exactly one of `equals`, `contains`, `matches`, or `exists`. */
49
+ requestBody?: {
50
+ /** JSON field specified as keys and array indexes joined by dots, e.g. `data.items.0.id`. Omit to use the whole body. */
51
+ path?: string;
52
+ /** Dot-separated JWT payload claim, such as `consents.analytics`. Accepts a `Bearer ` prefix and reads the payload without validating the signature. */
53
+ claim?: string;
54
+ /** Exact, case-sensitive match. Compares numbers and booleans as text. */
55
+ equals?: string | number | boolean;
56
+ /** Case-sensitive substring. */
57
+ contains?: string;
58
+ /** Case-sensitive JavaScript regular expression. */
59
+ matches?: string;
60
+ /** Use true for a present value or false for a missing or null value. */
61
+ exists?: boolean;
62
+ };
63
+ /** Use the same check as `requestBody` on a finished response. */
64
+ responseBody?: {
65
+ /** JSON field specified as keys and array indexes joined by dots, e.g. `data.items.0.id`. Omit to use the whole body. */
66
+ path?: string;
67
+ /** Dot-separated JWT payload claim, such as `consents.analytics`. Accepts a `Bearer ` prefix and reads the payload without validating the signature. */
68
+ claim?: string;
69
+ /** Exact, case-sensitive match. Compares numbers and booleans as text. */
70
+ equals?: string | number | boolean;
71
+ /** Case-sensitive substring. */
72
+ contains?: string;
73
+ /** Case-sensitive JavaScript regular expression. */
74
+ matches?: string;
75
+ /** Use true for a present value or false for a missing or null value. */
76
+ exists?: boolean;
77
+ };
78
+ /** Set to true to fail on the first match and require complete capture to pass. */
79
+ absent?: boolean;
80
+ /** Timeout in ms (default 10000). */
34
81
  timeoutMs?: number;
35
- /** Interval between capture reads in milliseconds. Default 400. */
82
+ /** Poll interval in ms (default 400). */
36
83
  pollIntervalMs?: number;
37
84
  };
38
85
  "await-screen-idle": {
@@ -46,11 +93,11 @@ export interface ArgentToolArgs {
46
93
  minStableMs?: number;
47
94
  };
48
95
  "await-ui-element": {
49
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
96
+ /** Target device id from `list-devices`. */
50
97
  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. */
98
+ /** `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
99
  condition: "exists" | "visible" | "hidden" | "text";
53
- /** Element to match. Give at least one field; every given field must match. */
100
+ /** Element matcher (at least one field; all given fields must match). */
54
101
  selector: {
55
102
  /** Case-insensitive substring of the element's visible label or value. */
56
103
  text?: string;
@@ -59,15 +106,15 @@ export interface ArgentToolArgs {
59
106
  /** Case-insensitive substring of the element's role (e.g. AXButton, button, TextView). */
60
107
  role?: string;
61
108
  };
62
- /** Required for condition `text`: the string the checked match must contain or equal (see `textMatch`). */
109
+ /** Required for `text`: expected substring or full string (see `textMatch`). */
63
110
  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. */
111
+ /** Case-insensitive match mode for `text`: `contains` (default) or `equals`. */
65
112
  textMatch?: "contains" | "equals";
66
- /** iOS app bundle id, passed to the describe fallback (see `describe`). Ignored on every other platform, including physical iOS. */
113
+ /** iOS simulator only: fallback bundle id for `describe`. */
67
114
  bundleId?: string;
68
- /** Max time to wait for the condition before giving up (default 5000). */
115
+ /** Timeout in ms (default 5000). */
69
116
  timeoutMs?: number;
70
- /** How often to re-check the tree (default 400). */
117
+ /** Poll interval in ms (default 400). */
71
118
  pollIntervalMs?: number;
72
119
  };
73
120
  await_user_selection: {
@@ -75,39 +122,39 @@ export interface ArgentToolArgs {
75
122
  timeoutSeconds?: number;
76
123
  };
77
124
  "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. */
125
+ /** iOS simulator UDID from `list-devices`. Or Mac app id (`macos-app-<bundle id>`) to relaunch from its last path. */
79
126
  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`. */
127
+ /** Android AVD name (`kind: 'avd'` from `list-devices`). Reuses a compatible running emulator. */
81
128
  avdName?: string;
82
- /** Vega (Fire TV): VVD image to boot: the `vvdImage` of a Vega device from `list-devices` (e.g. `tv`). */
129
+ /** Vega (Fire TV) VVD image name from `list-devices` (e.g. `tv`). */
83
130
  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. */
131
+ /** HarmonyOS emulator instance name or `harmony-emulator-<name>` id from `list-devices`. */
85
132
  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. */
133
+ /** Overall boot budget in ms (Android default 480000, Vega 120000, HarmonyOS 180000). On HarmonyOS with `force`, this spans shutdown too. */
87
134
  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. */
135
+ /** 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
136
  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. */
137
+ /** Android only: enable emulator audio (default false, or `boot-sound` flag). Pair with `force: true` to toggle a running emulator. */
91
138
  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. */
139
+ /** 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
140
  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. */
141
+ /** Android only: boot `-read-only` (default false) to run multiple concurrent instances of one AVD without saving snapshot changes. */
95
142
  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. */
143
+ /** Android only: emulator console port (even, 5554–5584; serial `emulator-<port>`, gRPC on port+3000). Defaults to first free port. */
97
144
  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. */
145
+ /** Local iOS simulator only: apply accessibility prefs to a Shutdown simulator without booting. Cannot combine with `force: true`. */
99
146
  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. */
147
+ /** iOS only: boot simulator core without opening Simulator.app (`ARGENT_SIMULATOR_NO_WINDOW=1` forces host-wide). */
101
148
  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. */
149
+ /** Electron: path to `.app` bundle, executable, or project directory with `package.json`. */
103
150
  electronAppPath?: string;
104
- /** Electron-only: CDP remote-debugging port to expose. Defaults to a free port; the resulting device id is `chromium-cdp-<port>`. */
151
+ /** Electron only: CDP remote-debugging port (default: free port; id `chromium-cdp-<port>`). */
105
152
  electronPort?: number;
106
- /** Electron-only: extra CLI arguments forwarded to the Electron binary after the app path. */
153
+ /** Electron only: extra CLI args forwarded to the Electron binary. */
107
154
  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. */
155
+ /** Mac app: path to `.app` bundle (id `macos-app-<bundle id>`). */
109
156
  macosAppPath?: string;
110
- /** Mac app only: arguments for the app executable. Omitted, the app starts with none, also when an earlier start had some. */
157
+ /** Mac app only: launch arguments (omitted = none). */
111
158
  macosAppArgs?: Array<string>;
112
159
  };
113
160
  button: {
@@ -117,27 +164,27 @@ export interface ArgentToolArgs {
117
164
  button: "home" | "back" | "power" | "volumeUp" | "volumeDown" | "appSwitch" | "actionButton";
118
165
  };
119
166
  "chromium-cookies": {
120
- /** Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`). */
167
+ /** Chromium device id (`chromium-cdp-<port>`). */
121
168
  udid: string;
122
- /** get: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies. */
169
+ /** get: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies across all domains (ignores url/domain). */
123
170
  action: "get" | "set" | "delete" | "clear";
124
- /** Cookie name. */
171
+ /** Cookie name (required for `set`/`delete`). */
125
172
  name?: string;
126
- /** Cookie value. */
173
+ /** Cookie value (required for `set`). */
127
174
  value?: string;
128
- /** get: restrict to this URL (defaults to the active page). set/delete: scope the cookie by URL. */
175
+ /** URL filter for `get` (defaults to the active page) or scope for `set`/`delete`. */
129
176
  url?: string;
130
- /** set/delete: scope the cookie by domain. */
177
+ /** Domain scope (`set`/`delete`). */
131
178
  domain?: string;
132
- /** set/delete: cookie path (default /). */
179
+ /** Path scope (default `/`). */
133
180
  path?: string;
134
- /** set: mark Secure. */
181
+ /** Secure flag (`set`). */
135
182
  secure?: boolean;
136
- /** set: mark HttpOnly. */
183
+ /** HttpOnly flag (`set`). */
137
184
  httpOnly?: boolean;
138
- /** set: SameSite policy. */
185
+ /** SameSite policy (`set`). */
139
186
  sameSite?: "Strict" | "Lax" | "None";
140
- /** set: expiry as a Unix timestamp (seconds). Omit for a session cookie. */
187
+ /** Unix expiry in seconds (`set`; omit for session). */
141
188
  expires?: number;
142
189
  };
143
190
  "chromium-storage": {
@@ -153,88 +200,90 @@ export interface ArgentToolArgs {
153
200
  value?: string;
154
201
  };
155
202
  "chromium-tabs": {
156
- /** Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`). */
203
+ /** Chromium device id (`chromium-cdp-<port>`). */
157
204
  udid: string;
158
- /** list: enumerate tabs/windows. select: make a tab active. new: open a tab and activate it. close: close a tab; if it was active, another live tab becomes active. */
205
+ /** Tab operation. */
159
206
  action: "list" | "select" | "new" | "close";
160
- /** Target tab for `select` (required) / `close`: a tabId like `t2` or a label. `close` defaults to the active tab. */
207
+ /** Tab id (e.g. `t2`) or label (`select` required; `close` defaults to active). */
161
208
  tab?: string;
162
- /** `new` only: URL to open (defaults to about:blank). */
209
+ /** URL for `new` (default `about:blank`). */
163
210
  url?: string;
164
- /** `new` only: a memorable label usable interchangeably with the tabId. */
211
+ /** Optional alias label for `new`. */
165
212
  label?: string;
166
213
  };
167
214
  "debugger-component-tree": {
168
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
215
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
169
216
  port?: number;
170
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
217
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
171
218
  device_id: string;
172
- /** When true, only components visible on screen are returned. Set to false to include all mounted components, including those scrolled off-screen, e.g. to understand the full page structure. */
219
+ /** Only on-screen components (default true; false includes off-screen mounted nodes). */
173
220
  onScreenOnly?: boolean;
174
- /** Maximum total nodes to include. When exceeded, intermediate single-child wrapper chains are collapsed to preserve both root structure and leaf elements. Default: no limit. */
221
+ /** Max nodes to return (collapses single-child wrappers when exceeded). */
175
222
  maxNodes?: number;
176
- /** When true, appends a summary of all filtered components: total fiber count and skip counts by component name and by filter. */
223
+ /** Append filtered/skipped fiber counts summary. */
177
224
  includeSkipped?: boolean;
178
225
  };
179
226
  "debugger-connect": {
180
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
227
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
181
228
  port?: number;
182
- /** Device id from list-devices: iOS simulator UDID, Android serial, Vega serial (amazon-...), Mac app id (macos-app-<bundle id>), or Chromium device id (chromium-cdp-<port>). Pass this SAME id as device_id to every subsequent debugger-* call to pin them to this device. The returned logicalDeviceId is informational (Metro's own per-connection handle, absent on Vega); you do not switch to it. Forwarding it still resolves here, but the list-devices id is the stable one. On a Metro shared by several devices, a simulator UDID or Android serial is matched by the device's name (a simulator's name; an Android model, release and API level); the app's device log must then confirm it runs there. When another booted simulator or attached device shares that name, or the log does not confirm it, the error asks for the logicalDeviceId instead. */
229
+ /** Device id from `list-devices`: iOS UDID, Android/Vega serial, Mac app id (`macos-app-<bundle id>`), or Chromium id (`chromium-cdp-<port>`). Reuse this same id on subsequent `debugger-*` calls (or pass the error's `logicalDeviceId` if shared Metro is ambiguous). */
183
230
  device_id: string;
184
231
  };
185
232
  "debugger-evaluate": {
186
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
233
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
187
234
  port?: number;
188
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
235
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
189
236
  device_id: string;
190
- /** JavaScript expression to evaluate in the app runtime */
237
+ /** JavaScript expression to evaluate. */
191
238
  expression: string;
192
239
  };
193
240
  "debugger-inspect-element": {
194
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
241
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
195
242
  port?: number;
196
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
243
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
197
244
  device_id: string;
198
- /** Horizontal position in logical pixels from the left edge of the screen, or in points from the left edge of the Mac app window, title bar included. */
245
+ /** X in logical pixels from screen left (or Mac app window left, title bar included). */
199
246
  x: number;
200
- /** Vertical position in logical pixels from the top edge of the screen, or in points from the top edge of the Mac app window, title bar included. */
247
+ /** Y in logical pixels from screen top (or Mac app window top, title bar included). */
201
248
  y: number;
202
- /** Lines of source context to include around the component definition */
249
+ /** Source context lines around each component. */
203
250
  contextLines?: number;
204
- /** When true, resolves bundled frame locations to original source files via Metro symbolication and includes a code fragment. When false, returns the raw bundled frame info (file, line, column) without a code fragment. */
251
+ /** Symbolicate via Metro and include code snippets (false = raw bundle frames). */
205
252
  resolveSourceMaps?: boolean;
206
- /** Maximum number of hierarchy items to return, most specific first. The default covers all app-specific code; increase to 70+ to also see the navigation/screen structure. */
253
+ /** Max hierarchy items, most specific first (default 35). */
207
254
  maxItems?: number;
208
- /** When true, items that would normally be filtered are kept in the response with skipped=true and a skipReason. */
255
+ /** Keep normally filtered items marked `skipped: true`. */
209
256
  includeSkipped?: boolean;
210
257
  };
211
258
  "debugger-log-registry": {
212
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
259
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
213
260
  port?: number;
214
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
261
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
215
262
  device_id: string;
216
- /** How many of the newest entries to return in `entries`. Default 20. */
263
+ /** Newest entries to inline (default 20). */
217
264
  tail?: number;
218
- /** Return only these levels in `entries`, e.g. ["warning", "error"]. Stats and clusters stay unfiltered. */
265
+ /** Filter inline `entries` by level (e.g. ["warning", "error"]). */
219
266
  levels?: Array<"log" | "debug" | "info" | "error" | "warning" | "dir" | "dirxml" | "table" | "trace" | "clear" | "startGroup" | "startGroupCollapsed" | "endGroup" | "assert" | "profile" | "profileEnd" | "count" | "timeEnd">;
220
267
  };
221
268
  "debugger-reload-metro": {
222
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
269
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
223
270
  port?: number;
224
271
  /** Device id used with debugger-connect. For macOS, use the Mac app id. */
225
272
  device_id: string;
226
273
  };
227
274
  "debugger-status": {
228
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
275
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
229
276
  port?: number;
230
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
277
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
231
278
  device_id: string;
232
279
  };
233
280
  describe: {
234
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
281
+ /** Target device id from `list-devices`. */
235
282
  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. */
283
+ /** iOS simulator only: fallback bundle id when AX-service returns empty (auto-detects frontmost if omitted). */
237
284
  bundleId?: string;
285
+ /** Return the unpruned tree, keeping bare structural wrapper containers and duplicate child labels omitted by default. */
286
+ raw?: boolean;
238
287
  };
239
288
  "dismiss-update": {
240
289
  /** Hours until reminders resume: 168 is a week, 87600 is the longest, 0 turns them back on */
@@ -247,48 +296,70 @@ export interface ArgentToolArgs {
247
296
  project_root: string;
248
297
  /** Text the echo step prints */
249
298
  message: string;
299
+ /** Save the message in the shutdown list. stepCount counts shutdown entries. */
300
+ shutdown?: boolean;
250
301
  };
251
302
  "e2e-add-script": {
252
- /** E2E test name passed to e2e-start-recording. */
303
+ /** E2E test name from `e2e-start-recording`. */
253
304
  name: string;
254
- /** Absolute project root passed to e2e-start-recording. */
305
+ /** Project root from `e2e-start-recording`. */
255
306
  project_root: string;
256
- /** Path to the script file (.mjs, .mts, .js or .ts), relative to the e2e test YAML. For example: "../../scripts/seed-order.mjs". */
307
+ /** Script path (.mjs/.mts/.js/.ts) relative to the test YAML. */
257
308
  path: string;
258
- /** Time limit in milliseconds. The default is 30000 and the minimum is 100. */
309
+ /** Timeout in ms (default 30000, min 100). */
259
310
  timeout?: number;
311
+ /** Environment values for this script. Override same-name vars. Supports `{{secret:NAME}}`, `{{var:NAME}}`, and `{{output:PATH}}`. */
312
+ env?: {
313
+ [key: string]: string;
314
+ };
315
+ /** Save the script in the shutdown list. Pending fragment cleanup runs before the script. The script's output reaches only later shutdown steps. stepCount counts shutdown entries. */
316
+ shutdown?: boolean;
317
+ /** Recording device from `list-devices`, read by the script as ARGENT_DEVICE_ID/_PLATFORM/_KIND as on a replay. Omit for a test with no device. */
318
+ udid?: string;
260
319
  };
261
320
  "e2e-add-step": {
262
- /** Name of the e2e test being recorded: the one passed to e2e-start-recording. */
321
+ /** E2E test name from `e2e-start-recording`. */
263
322
  name: string;
264
- /** Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording. */
323
+ /** Project root from `e2e-start-recording`. */
265
324
  project_root: string;
266
- /** MCP tool to execute and record, for example "gesture-tap". Do not pass an e2e test directive or a recording tool. Call e2e-add-script directly for a requested script step. */
325
+ /** MCP tool id to run and record (e.g. "gesture-tap"; call `e2e-add-script` directly for scripts). */
267
326
  command: string;
268
- /** Tool arguments as a JSON string, e.g. '{"udid": "ABC", "x": 0.5, "y": 0.3}'. Omit for tools with no arguments. */
327
+ /** JSON string of tool arguments (omit if none). */
269
328
  args?: string;
270
- /** Milliseconds to sleep before executing this step during replay. */
329
+ /** Replay delay in ms before this step. */
271
330
  delayMs?: number;
331
+ /** Save the call in the shutdown list. Pending fragment cleanup runs before the call. stepCount counts shutdown entries. */
332
+ shutdown?: boolean;
272
333
  };
273
- "e2e-execute": {
274
- /** Name of a saved e2e test to run from `<project_root>/.argent/e2e`, or `.argent/flows` when it is not there (e.g. "settings-explore"). */
334
+ "e2e-check": {
335
+ /** Name of a saved e2e test to check from `<project_root>/.argent/e2e`, or `.argent/flows` when it is not there. */
275
336
  name?: string;
276
- /** Absolute path to the calling agent's project root: the cwd it is working in, also with e2e_test_path, where the e2e test, its run: siblings, its script: paths and baselines resolve beside the YAML instead. A script still RUNS in this root. */
337
+ /** Absolute path to the calling agent's project root: the cwd it is working in. */
277
338
  project_root: string;
278
339
  /** Path to the e2e test .yaml as readable by the tool-server. Internal: the argent client derives it from project_root and name automatically; leave unset. */
279
340
  e2e_test_file?: string;
280
341
  /** Absolute path to an e2e test .yaml on the client. */
281
342
  e2e_test_path?: string;
282
- /** 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. */
343
+ };
344
+ "e2e-execute": {
345
+ /** Saved e2e test name in `<project_root>/.argent/e2e/` (or `.argent/flows/`). */
346
+ name?: string;
347
+ /** Absolute path to the project root (script cwd; with e2e_test_path, run:/script:/baselines resolve beside the YAML). */
348
+ project_root: string;
349
+ /** Internal; leave unset (derived from `project_root` and `name`). */
350
+ e2e_test_file?: string;
351
+ /** Absolute path to an e2e test `.yaml` on the client. */
352
+ e2e_test_path?: string;
353
+ /** Target device id from `list-devices` (iOS UDID, Android/Vega serial, Chromium id, Mac app id). Auto-detected only when one booted device matches; pass explicitly if multiple are booted. */
283
354
  device?: string;
284
- /** 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. */
355
+ /** Filter auto-detection (`ios` = local simulator, `ios-remote` = remote). With `chromium` and no `device`, boots Electron from `launch: { chromium: <app path> }` and tears it down after. With `macos` and no `device`, runs on the Mac app named in `launch` (auto-detection never picks Mac apps otherwise). */
285
356
  platform?: "ios" | "android" | "chromium" | "vega" | "macos" | "ios-remote";
286
- /** 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. */
357
+ /** Refresh screenshot baselines for `snapshot` steps instead of diffing. */
287
358
  updateBaselines?: boolean;
288
- /** 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. */
359
+ /** Set true to confirm a fragment's `executionPrerequisite` is met; otherwise returns the prerequisite text without running. Not a dry run: a test with no prerequisite runs in full (read `executionPrerequisite` in the YAML to inspect without running). */
289
360
  prerequisiteAcknowledged?: boolean;
290
- /** Script environment overrides for this run, including run: fragments. Names match [A-Za-z_][A-Za-z0-9_]*, except __proto__. Values can include {{secret:NAME}}. A missing secret rejects the run before any step. */
291
- env?: {
361
+ /** Overrides for the test's `vars:` defaults, including `run:` fragments. Values can contain `{{secret:NAME}}` placeholders. */
362
+ vars?: {
292
363
  [key: string]: string;
293
364
  };
294
365
  /** @deprecated Renamed to `e2e_test_path`. */
@@ -297,9 +368,9 @@ export interface ArgentToolArgs {
297
368
  flow_file?: string;
298
369
  };
299
370
  "e2e-finish-recording": {
300
- /** Name of the e2e test being recorded: the one passed to e2e-start-recording. */
371
+ /** E2E test name from `e2e-start-recording`. */
301
372
  name: string;
302
- /** Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording. */
373
+ /** Project root from `e2e-start-recording`. */
303
374
  project_root: string;
304
375
  };
305
376
  "e2e-read-prerequisite": {
@@ -316,18 +387,32 @@ export interface ArgentToolArgs {
316
387
  /** @deprecated Renamed to `e2e_test_file`. */
317
388
  flow_file?: string;
318
389
  };
390
+ "e2e-set-vars": {
391
+ /** Test name passed to e2e-start-recording. */
392
+ name: string;
393
+ /** Absolute project root passed to e2e-start-recording. */
394
+ project_root: string;
395
+ /** Set values by name. Use null to remove a name and `{{secret:NAME}}` for credentials. */
396
+ vars: {
397
+ [key: string]: string | null;
398
+ };
399
+ };
319
400
  "e2e-start-recording": {
320
- /** Name for this e2e test (e.g. "settings-explore"): letters, digits, underscore and hyphen only. */
401
+ /** E2E test name (letters, digits, `_`, `-`). */
321
402
  name: string;
322
- /** Absolute path to the project root directory (the directory that contains or should contain `.argent/e2e/`). */
403
+ /** Absolute path to the project root containing `.argent/e2e/`. */
323
404
  project_root: string;
324
- /** 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. */
405
+ /** Fragments only: entry state assumed. Omit for standalone tests (Chromium records as a fragment, then add `launch: { chromium: <app path> }` and remove this). */
325
406
  executionPrerequisite?: string;
326
- /** 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. */
407
+ /** Supported target filter (`platform` and/or `runtimeKind`, ANDed). Omit for any. */
327
408
  requires?: {
328
409
  platform?: "ios" | "android" | "chromium" | "vega" | "macos" | Array<"ios" | "android" | "chromium" | "vega" | "macos">;
329
410
  runtimeKind?: "mobile" | "tv";
330
411
  };
412
+ /** Test inputs to save under `vars:` and read with `{{var:NAME}}`. Use `{{secret:NAME}}` for credentials. */
413
+ vars?: {
414
+ [key: string]: string;
415
+ };
331
416
  };
332
417
  "file-panel": {
333
418
  /** Mac app id from `list-devices` (macos-app-<bundle id>). */
@@ -354,11 +439,11 @@ export interface ArgentToolArgs {
354
439
  text: string;
355
440
  };
356
441
  fold: {
357
- /** Target device id from `list-devices` (a foldable iOS simulator UDID or Android emulator serial). */
442
+ /** Foldable device id from `list-devices` (iOS simulator UDID or Android emulator serial). */
358
443
  udid: string;
359
- /** Where to move the hinge: `closed` shows the cover panel, `half-open` and `open` show the inner panel. */
444
+ /** Target posture: `closed` (cover panel), `half-open`, or `open` (inner panel). */
360
445
  posture?: "closed" | "half-open" | "open";
361
- /** The hinge angle in degrees: 0 = closed, 180 = open. */
446
+ /** Hinge angle in degrees (0 = closed, 180 = open). */
362
447
  angle?: number;
363
448
  };
364
449
  "foreground-app": {
@@ -372,144 +457,148 @@ export interface ArgentToolArgs {
372
457
  "gesture-custom": {
373
458
  /** Target device id from `list-devices` (iOS UDID or Android serial). */
374
459
  udid: string;
375
- /** Starting edge in upright screen coordinates for a single-finger system gesture on a local iOS simulator. */
460
+ /** Starting screen edge for a single-finger system gesture (local iOS simulator). */
376
461
  edge?: "top" | "right" | "bottom" | "left";
377
- /** Touch events, dispatched in order. */
462
+ /** Ordered touch events. */
378
463
  events: Array<{
379
- /** Touch event type */
464
+ /** Touch event type. */
380
465
  type: "Down" | "Move" | "Up";
381
- /** Touch x. */
466
+ /** Normalized x. */
382
467
  x: number;
383
- /** Touch y. */
468
+ /** Normalized y. */
384
469
  y: number;
385
- /** Second finger x, for two-finger gestures. */
470
+ /** Second finger x. */
386
471
  x2?: number;
387
- /** Second finger y, for two-finger gestures. */
472
+ /** Second finger y. */
388
473
  y2?: number;
389
- /** Delay before this event in milliseconds (default 16ms ≈ 60fps) */
474
+ /** Delay before event in ms (default 16). */
390
475
  delayMs?: number;
391
476
  }>;
392
- /** Number of Move events to insert between each pair of consecutive events, linearly interpolating both x,y and x2,y2 and splitting the delay evenly, for a smooth gesture. Default: no interpolation. */
477
+ /** Insert N linearly interpolated Move events between consecutive events (default 0). */
393
478
  interpolate?: number;
394
479
  };
395
480
  "gesture-drag": {
396
- /** Target Chromium device id from `list-devices` (chromium-cdp-<port>), or a Mac app id. */
481
+ /** Chromium device id (`chromium-cdp-<port>`) or Mac app id from `list-devices`. */
397
482
  udid: string;
398
- /** Press x. */
483
+ /** Start x. */
399
484
  fromX: number;
400
- /** Press y. */
485
+ /** Start y. */
401
486
  fromY: number;
402
- /** Release x. */
487
+ /** End x. */
403
488
  toX: number;
404
- /** Release y. */
489
+ /** End y. */
405
490
  toY: number;
406
- /** Total drag duration in milliseconds (default 300, 800 for a long press on a Mac app); the button stays down this long. */
491
+ /** Drag duration in ms (default 300; 800 for a Mac app long press). */
407
492
  durationMs?: number;
408
- /** 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. */
493
+ /** Default true (constant speed). false decelerates into release to avoid fling. */
409
494
  momentum?: boolean;
410
495
  };
411
496
  "gesture-pinch": {
412
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
497
+ /** Device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
413
498
  udid: string;
414
- /** Center of the pinch, horizontal. */
499
+ /** Normalized center x. */
415
500
  centerX: number;
416
- /** Center of the pinch, vertical. */
501
+ /** Normalized center y. */
417
502
  centerY: number;
418
- /** Initial distance between the two fingers. */
503
+ /** Initial normalized finger distance. */
419
504
  startDistance: number;
420
- /** Final distance between the two fingers. */
505
+ /** Final normalized finger distance (> start = zoom in). */
421
506
  endDistance: number;
422
- /** Final horizontal center of the pinch. When set, the centroid drifts linearly from centerX to endCenterX over the gesture (e.g. to keep expanding fingers on-screen near an edge). Omit for a fixed center. */
507
+ /** Optional final center x (centroid drifts linearly). */
423
508
  endCenterX?: number;
424
- /** Final vertical center of the pinch; drifts from centerY like endCenterX. Omit for a fixed center. */
509
+ /** Optional final center y. */
425
510
  endCenterY?: number;
426
- /** Angle in degrees of the axis the fingers lie on: 0 = horizontal (default), 90 = vertical. */
511
+ /** Finger axis angle in degrees (0 = horizontal, 90 = vertical). */
427
512
  angle?: number;
428
- /** Total gesture duration in milliseconds (default 300). On HarmonyOS the device runs the whole move itself and takes this as wall-clock time, clamped to the 1–15000ms range `uinput` accepts. */
513
+ /** Duration in ms (default 300); clamped to 1–15000ms on HarmonyOS. */
429
514
  durationMs?: number;
430
515
  };
431
516
  "gesture-rotate": {
432
- /** Target device id from `list-devices` (iOS UDID or Android serial). */
517
+ /** Device id from `list-devices` (iOS UDID or Android serial). */
433
518
  udid: string;
434
- /** Center of rotation, horizontal. */
519
+ /** Normalized rotation center x. */
435
520
  centerX: number;
436
- /** Center of rotation, vertical. */
521
+ /** Normalized rotation center y. */
437
522
  centerY: number;
438
- /** Distance from the center to each finger. */
523
+ /** Normalized finger orbit radius (e.g. 0.15). */
439
524
  radius?: number;
440
- /** Finger distance along the horizontal axis, as a fraction of screen WIDTH. */
525
+ /** Horizontal radius fraction of screen width (pair with `radiusY`). */
441
526
  radiusX?: number;
442
- /** Finger distance along the vertical axis, as a fraction of screen HEIGHT. */
527
+ /** Vertical radius fraction of screen height (pair with `radiusX`). */
443
528
  radiusY?: number;
444
- /** Starting angle in degrees (0 = right, 90 = down) */
529
+ /** Start angle in degrees (0 = right, 90 = down). */
445
530
  startAngle: number;
446
- /** Ending angle in degrees. */
531
+ /** End angle in degrees (> startAngle = clockwise). */
447
532
  endAngle: number;
448
- /** Total gesture duration in milliseconds (default 300) */
533
+ /** Duration in ms (default 300). */
449
534
  durationMs?: number;
450
535
  };
451
536
  "gesture-scroll": {
452
- /** Target Chromium device id from `list-devices` (chromium-cdp-<port>), or a Mac app id. */
537
+ /** Chromium device id (`chromium-cdp-<port>`) or Mac app id from `list-devices`. */
453
538
  udid: string;
454
- /** Anchor x. The wheel events land here; put it over the element you want to scroll. */
539
+ /** Normalized anchor x over the scrollable element. */
455
540
  x: number;
456
- /** Anchor y. */
541
+ /** Normalized anchor y. */
457
542
  y: number;
458
- /** Horizontal scroll distance as a fraction of the window width. Positive reveals content to the right; negative scrolls back left. */
543
+ /** Horizontal scroll fraction (+ right, - left). */
459
544
  deltaX?: number;
460
- /** 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. */
545
+ /** Vertical scroll fraction (+ down, - up; e.g. 0.5). */
461
546
  deltaY?: number;
462
- /** Spread the scroll over this many milliseconds in wheel-event steps (default 300) so scroll handlers fire progressively. Ignored on a Mac app. */
547
+ /** Scroll duration in ms (default 300); ignored on Mac apps. */
463
548
  durationMs?: number;
464
549
  };
465
550
  "gesture-swipe": {
466
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
551
+ /** Target device id from `list-devices`. */
467
552
  udid: string;
468
- /** Start x. */
553
+ /** Start x [0,1]. */
469
554
  fromX: number;
470
- /** Start y. */
555
+ /** Start y [0,1]. */
471
556
  fromY: number;
472
- /** End x. */
557
+ /** End x [0,1]. */
473
558
  toX: number;
474
- /** End y. */
559
+ /** End y [0,1]. */
475
560
  toY: number;
476
- /** 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. */
561
+ /** Swipe duration in ms (default 300). */
477
562
  durationMs?: number;
478
- /** 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. */
563
+ /** Default true (flinging swipe). Set false to ease out with no fling for deterministic scroll distance (requires durationMs >= 150). */
479
564
  momentum?: boolean;
480
565
  };
481
566
  "gesture-tap": {
482
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, Mac app id, or Chromium id). */
567
+ /** Target device id from `list-devices`. */
483
568
  udid: string;
484
- /** Horizontal position: 0 = left edge, 1 = right edge. */
569
+ /** Horizontal screen fraction [0,1]. */
485
570
  x: number;
486
- /** Vertical position: 0 = top edge, 1 = bottom edge. */
571
+ /** Vertical screen fraction [0,1]. */
487
572
  y: number;
488
- /** 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. */
573
+ /** 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. */
489
574
  clickCount?: number;
490
- /** Mouse button, Mac app only: "right" is a right-click, for example to open a context menu; any other device refuses it. Default "left". */
575
+ /** Mac app only: mouse button ("left" default, or "right"). */
491
576
  button?: "left" | "right";
492
- /** Keys held throughout a click or multi-click gesture. Mac apps only. An empty list leaves the click unmodified. */
577
+ /** Mac app only: modifier keys held during click. */
493
578
  modifiers?: Array<"control" | "option" | "shift" | "command">;
494
579
  };
495
580
  keyboard: {
496
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
581
+ /** Target device id from `list-devices`. */
497
582
  udid: string;
498
- /** 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. */
583
+ /** Text to type. Cannot be combined with `key`. Use `{{secret:NAME}}` for credentials, looked up where the MCP server started, first match wins: the `ARGENT_SECRET_NAME` env var, the project's `.argent/secrets.env`, `ARGENT_SECRET_NAME` in the project's `.env.local` or `.env`, then `~/.argent/secrets.env`. Ask the user to configure missing secrets there without sharing their values. Secret placeholders suppress the automatic screenshot for the call. Use one `run-sequence` to type a secret and press Enter with the same protection. */
499
584
  text?: string;
500
- /** 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. */
585
+ /** Named key. Cannot be combined with `text` or `clear` (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). */
501
586
  key?: string;
502
- /** 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. */
587
+ /** Clear the focused text field before typing `text` (or alone when `text` is omitted). Cannot be combined with `key`. Fails if nothing editable has focus. On physical iOS, deletes up to 100 characters before the caret, unverified, and returns no `cleared`. Not supported on Mac apps, HarmonyOS, Apple TV, Android TV, or Vega. */
588
+ clear?: boolean;
589
+ /** Press `key` this many times in one call, e.g. `{ key: "backspace", repeat: 12 }`. Only valid with `key`. */
590
+ repeat?: number;
591
+ /** Delay in ms between key presses (default 50; ignored on platforms that type in one shot). */
503
592
  delayMs?: number;
504
593
  };
505
594
  "launch-app": {
506
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, Mac app id, or Chromium id). */
595
+ /** Target device id from `list-devices`. */
507
596
  udid: string;
508
- /** 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. */
597
+ /** 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). */
509
598
  bundleId: string;
510
- /** 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. */
599
+ /** Android only: Activity name (default: launcher activity). */
511
600
  activity?: string;
512
- /** 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. */
601
+ /** Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`. Relaunches running simulators/phones to apply. */
513
602
  launchArgs?: Array<string>;
514
603
  };
515
604
  "list-devices": Record<string, never>;
@@ -544,21 +633,21 @@ export interface ArgentToolArgs {
544
633
  udid: string;
545
634
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
546
635
  bundleId: string;
547
- /** UIView class name to match (exact, e.g. UIButton) */
636
+ /** Exact UIView class name (e.g. UIButton). */
548
637
  className?: string;
549
- /** Accessibility identifier to match (exact) */
638
+ /** Exact accessibility identifier. */
550
639
  identifier?: string;
551
- /** Accessibility label to match (exact) */
640
+ /** Exact accessibility label. */
552
641
  label?: string;
553
- /** UIView tag integer to match */
642
+ /** UIView integer tag. */
554
643
  tag?: number;
555
- /** React Native nativeID prop to match (exact) */
644
+ /** Exact React Native nativeID. */
556
645
  nativeID?: string;
557
- /** Include ancestor chain for each matched view (default true) */
646
+ /** Include ancestor chain (default true). */
558
647
  includeAncestors?: boolean;
559
- /** Include child views for each matched view (default true) */
648
+ /** Include child views (default true). */
560
649
  includeChildren?: boolean;
561
- /** 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 */
650
+ /** View fields to return (defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID; extra: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder). */
562
651
  fields?: Array<string>;
563
652
  };
564
653
  "native-full-hierarchy": {
@@ -566,25 +655,25 @@ export interface ArgentToolArgs {
566
655
  udid: string;
567
656
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
568
657
  bundleId: string;
569
- /** 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 */
658
+ /** Exact view fields to return (defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID; extra: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder). */
570
659
  fields?: Array<string>;
571
- /** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes) */
660
+ /** Exact UIView classes to prune (e.g. ["UIImageView"]). */
572
661
  skipClasses?: Array<string>;
573
- /** Class name prefixes to prune entire subtrees. For SwiftUI apps use ["_TtGC7SwiftUI"] to drop mangled SwiftUI generic type subtrees while keeping _UIHostingView and UIKit bridges. Avoid broad prefixes like "_UI": they prune useful system views. */
662
+ /** Class prefixes to prune (e.g. ["_TtGC7SwiftUI"] for SwiftUI; avoid broad "_UI"). */
574
663
  skipClassPrefixes?: Array<string>;
575
- /** Maximum recursion depth (default 8). Raise it to reach deeper views. */
664
+ /** Max recursion depth (default 8). */
576
665
  maxDepth?: number;
577
666
  };
578
667
  "native-network-logs": {
579
- /** Device ID from list-devices: an iOS simulator UDID or Android serial, or a Mac app id (macos-app-<bundle id>) */
668
+ /** Device ID from `list-devices`: iOS simulator UDID, Android serial, or Mac app id (`macos-app-<bundle id>`). */
580
669
  udid: string;
581
- /** App bundle ID on iOS or package name on Android. On macOS, omit the macos-app- prefix. */
670
+ /** Bundle ID (iOS) or package name (Android); on macOS, omit `macos-app-`. */
582
671
  bundleId: string;
583
- /** Exclude requests to this Metro port on local addresses. Omit it to use the device's Metro port (usually 8081). */
672
+ /** Metro port to exclude from logs (omit for device default, usually 8081). */
584
673
  port?: number;
585
- /** Take the newest matching requests and return them oldest first. Use 0 for capture status and totals without entries. */
674
+ /** Newest requests to return oldest-first (default 50; 0 = status/totals only). */
586
675
  limit?: number;
587
- /** Hide existing history from later lists. Cleared request IDs still work in view-network-request-details. */
676
+ /** Hide current history from later lists (IDs still work in `view-network-request-details`). */
588
677
  clear?: boolean;
589
678
  };
590
679
  "native-profiler-analyze": {
@@ -592,25 +681,25 @@ export interface ArgentToolArgs {
592
681
  device_id: string;
593
682
  };
594
683
  "native-profiler-launch-analysis": {
595
- /** measure: time five launches with XCTest. profile: record one Instruments App Launch trace. */
684
+ /** `measure`: 5 XCTest timed launches. `profile`: 1 Instruments App Launch trace. */
596
685
  mode: "measure" | "profile";
597
- /** Bundle ID of the Release build already installed on the device. The tool does not build or install the app. */
686
+ /** Installed Release build bundle ID (not built or installed by this tool). */
598
687
  bundle_id: string;
599
- /** Connected iPhone UDID; required for a physical-device run. With allow_simulator, a booted simulator UDID also works. */
688
+ /** iPhone UDID (or booted simulator UDID with `allow_simulator: true`). */
600
689
  device_id?: string;
601
- /** Explicitly allow a booted simulator when no iPhone is selected. */
690
+ /** Allow booted simulator when no iPhone is selected. */
602
691
  allow_simulator?: boolean;
603
- /** profile mode only: App Launch trace recording length in seconds (default 8). Rejected in measure mode. */
692
+ /** `profile` mode only: trace duration in s (default 8). */
604
693
  duration_seconds?: number;
605
694
  };
606
695
  "native-profiler-start": {
607
696
  /** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
608
697
  device_id: string;
609
- /** iOS: the CFBundleExecutable or display name of the app to profile. Android: the app's package name. If omitted, auto-detects the foreground app; set it only if auto-detection picks the wrong app. Do not set it for a Mac app: the tool refuses it, because the device id names the app. */
698
+ /** iOS executable/name or Android package (auto-detects foreground app if omitted); omit for Mac apps. */
610
699
  app_process?: string;
611
- /** iOS and Mac apps only. Path to an Instruments .tracetemplate file, or the name of a built-in template such as "Time Profiler" (defaults to the bundled Argent template). */
700
+ /** iOS/Mac app Instruments `.tracetemplate` path or built-in name (e.g. "Time Profiler"; default: bundled template). */
612
701
  template_path?: string;
613
- /** iOS and Mac apps only. Enable allocation stacks from app launch. Restarts the app, clears its current state, and adds CPU and memory overhead. Leave it off for CPU and hang timing. On iOS, attach recordings typically lack allocation stacks. The all-processes capture (including ARGENT_IOS_CAPTURE=all-processes) rejects this option and records no leaks. On a Mac app, argent restarts the app with MallocStackLogging=1 and then attaches, and logging stays active until restart-app. The bundled template can capture stacks for allocations during recording, so enable this for older allocations. */
702
+ /** iOS/Mac apps only: restart app with allocation stacks from launch (adds overhead; leave off for CPU/hang timing). */
614
703
  malloc_stack_logging?: boolean;
615
704
  };
616
705
  "native-profiler-stop": {
@@ -622,21 +711,21 @@ export interface ArgentToolArgs {
622
711
  udid: string;
623
712
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
624
713
  bundleId: string;
625
- /** Raw X coordinate in points, on the axes of the UI as the user sees it (the axes of screenshots and describe frames); on a Mac app, points from the top-left of the area describe reports. NOT normalized [0,1] tap space. */
714
+ /** Raw X in upright UI points (Mac app: from describe area top-left). Not normalized [0,1]. */
626
715
  x: number;
627
- /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
716
+ /** Raw Y in upright UI points. Not normalized [0,1]. */
628
717
  y: number;
629
- /** Include ancestor chain for the matched view (default true) */
718
+ /** Include ancestor chain (default true). */
630
719
  includeAncestors?: boolean;
631
- /** Include child views for the matched view (default false) */
720
+ /** Include child views (default false). */
632
721
  includeChildren?: boolean;
633
- /** 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 */
722
+ /** View fields to return (defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID; extra: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder). */
634
723
  fields?: Array<string>;
635
- /** Exact UIView class names whose entire subtree should be pruned */
724
+ /** Exact UIView class names to prune. */
636
725
  skipClasses?: Array<string>;
637
- /** Class name prefixes to prune entire subtrees */
726
+ /** Class name prefixes to prune. */
638
727
  skipClassPrefixes?: Array<string>;
639
- /** Maximum depth for returned child/ancestor serialization (default 150) */
728
+ /** Max serialization depth (default 150). */
640
729
  maxDepth?: number;
641
730
  };
642
731
  "native-view-at-point": {
@@ -644,157 +733,157 @@ export interface ArgentToolArgs {
644
733
  udid: string;
645
734
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
646
735
  bundleId: string;
647
- /** Raw X coordinate in points, on the axes of the UI as the user sees it (the axes of screenshots and describe frames); on a Mac app, points from the top-left of the area describe reports. NOT normalized [0,1] tap space. */
736
+ /** Raw X in upright UI points (Mac app: from describe area top-left). Not normalized [0,1]. */
648
737
  x: number;
649
- /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
738
+ /** Raw Y in upright UI points. Not normalized [0,1]. */
650
739
  y: number;
651
- /** Include ancestor chain for the matched view (default true) */
740
+ /** Include ancestor chain (default true). */
652
741
  includeAncestors?: boolean;
653
- /** Include child views for the matched view (default false) */
742
+ /** Include child views (default false). */
654
743
  includeChildren?: boolean;
655
- /** 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 */
744
+ /** View fields to return (defaults: pointer, className, tag, frame, windowFrame, screenFrame, bounds, hidden, alpha, opaque, clipsToBounds, userInteractionEnabled, depth, identifier, label, layerName, nativeID; extra: center, transform, contentMode, backgroundColor, tintColor, value, firstResponder). */
656
745
  fields?: Array<string>;
657
- /** Exact UIView class names whose entire subtree should be pruned */
746
+ /** Exact UIView class names to prune. */
658
747
  skipClasses?: Array<string>;
659
- /** Class name prefixes to prune entire subtrees */
748
+ /** Class name prefixes to prune. */
660
749
  skipClassPrefixes?: Array<string>;
661
- /** Maximum depth for returned child/ancestor serialization (default 150) */
750
+ /** Max serialization depth (default 150). */
662
751
  maxDepth?: number;
663
- /** true returns the view that would receive a touch at the point: it respects userInteractionEnabled, close to UIKit hit-testing. Default false: the deepest visible view. */
752
+ /** true: touch-receiving view (UIKit hit-test). false (default): deepest visible view. */
664
753
  hitTest?: boolean;
665
754
  };
666
755
  "network-capture-start": {
667
- /** Device ID from list-devices. For Mac builds started outside Argent, use macos-app-<bundle id>. */
756
+ /** Device ID from `list-devices` (external Mac builds: `macos-app-<bundle id>`). */
668
757
  udid: string;
669
- /** App bundle ID on iOS or package name on Android. On Mac, omit the macos-app- prefix. On Chromium, use a valid placeholder such as argent.capture. */
758
+ /** Bundle ID (iOS) / package (Android) / Mac bundle ID / placeholder on Chromium (e.g. `argent.capture`). */
670
759
  bundleId: string;
671
- /** The app's Metro port for JS capture and native log filtering. Omit it only when the app uses the device's port (usually 8081); otherwise check the project's Metro start script. Chromium uses the CDP port in udid. */
760
+ /** Metro port for JS capture and native filtering (omit for device default, usually 8081; ignored on Chromium). */
672
761
  port?: number;
673
- /** Omit to control both layers. Selecting one leaves the other alone. Chromium ignores this setting. */
762
+ /** Control one layer only (default: both; ignored on Chromium). */
674
763
  layer?: "js" | "native";
675
- /** For iOS simulators and Android on shared Metro, use the logical ID for the intended device if requested. Reuse it for start and stop, and as device_id for JS reads. For Mac apps, omit logicalDeviceId and keep the Mac app id even on shared Metro. */
764
+ /** Shared-Metro logical ID for iOS/Android if requested (reuse for start/stop/JS reads); omit on Mac apps. */
676
765
  logicalDeviceId?: string;
677
766
  };
678
767
  "network-capture-stop": {
679
- /** Device ID from list-devices. For Mac builds started outside Argent, use macos-app-<bundle id>. */
768
+ /** Device ID from `list-devices` (external Mac builds: `macos-app-<bundle id>`). */
680
769
  udid: string;
681
- /** App bundle ID on iOS or package name on Android. On Mac, omit the macos-app- prefix. On Chromium, use a valid placeholder such as argent.capture. */
770
+ /** Bundle ID (iOS) / package (Android) / Mac bundle ID / placeholder on Chromium (e.g. `argent.capture`). */
682
771
  bundleId: string;
683
- /** The app's Metro port for JS capture and native log filtering. Omit it only when the app uses the device's port (usually 8081); otherwise check the project's Metro start script. Chromium uses the CDP port in udid. */
772
+ /** Metro port for JS capture and native filtering (omit for device default, usually 8081; ignored on Chromium). */
684
773
  port?: number;
685
- /** Omit to control both layers. Selecting one leaves the other alone. Chromium ignores this setting. */
774
+ /** Control one layer only (default: both; ignored on Chromium). */
686
775
  layer?: "js" | "native";
687
- /** For iOS simulators and Android on shared Metro, use the logical ID for the intended device if requested. Reuse it for start and stop, and as device_id for JS reads. For Mac apps, omit logicalDeviceId and keep the Mac app id even on shared Metro. */
776
+ /** Shared-Metro logical ID for iOS/Android if requested (reuse for start/stop/JS reads); omit on Mac apps. */
688
777
  logicalDeviceId?: string;
689
778
  };
690
779
  "network-conditions": {
691
- /** Device ID from list-devices. */
780
+ /** Device ID from `list-devices`. */
692
781
  udid: string;
693
- /** Bundle ID of the app to shape. Required on iOS and ignored elsewhere. */
782
+ /** App bundle ID (required on iOS; ignored elsewhere). */
694
783
  bundleId?: string;
695
- /** Metro port to exempt from shaping on iOS and Android. Omit for the device's port (usually 8081). */
784
+ /** Metro port exempt from shaping (omit for device default, usually 8081). */
696
785
  port?: number;
697
- /** Delay in milliseconds. Android adds it per round trip. iOS and Chromium use it as a minimum response delay. */
786
+ /** Added latency in ms. */
698
787
  latencyMs?: number;
699
- /** Download limit in kilobits per second. */
788
+ /** Download cap in kbps. */
700
789
  downloadKbps?: number;
701
- /** Upload limit in kilobits per second. */
790
+ /** Upload cap in kbps. */
702
791
  uploadKbps?: number;
703
- /** Make requests fail as if the network were down. On Android, adb reverse ports stay reachable, but Metro at 10.0.2.2 does not. False alone resets the conditions. */
792
+ /** Simulate offline (on Android, `adb reverse` ports stay reachable while Metro at `10.0.2.2` does not; `false` alone resets conditions). */
704
793
  offline?: boolean;
705
794
  };
706
795
  "open-url": {
707
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
796
+ /** Device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
708
797
  udid: string;
709
- /** URL or scheme to open (e.g. https://example.com, messages://, tel:555, geo:37.0,-122.0). */
798
+ /** URL or custom scheme (e.g. https://example.com, myapp://path). */
710
799
  url: string;
711
- /** Physical iOS only: the app that receives the URL. Defaults to Safari for http(s); required for any other scheme. */
800
+ /** Physical iOS only: receiving app (defaults to Safari for http/https; required otherwise). */
712
801
  bundleId?: string;
713
802
  };
714
803
  paste: {
715
- /** Target device id from `list-devices` (iOS simulator UDID or Android emulator serial, or Mac app id). */
804
+ /** Device id from `list-devices` (iOS simulator UDID, Android emulator serial, or Mac app id). */
716
805
  udid: string;
717
- /** 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. */
806
+ /** Text to paste. Use `{{secret:NAME}}` for credentials, looked up in the same sources as `keyboard`. Ask the user to configure missing secrets there without sharing their values. */
718
807
  text: string;
719
808
  };
720
809
  "profiler-combined-report": {
721
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
810
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
722
811
  port?: number;
723
812
  /** Device ID from list-devices used for the native profile (iOS simulator UDID, Android serial, or Mac app ID). */
724
813
  device_id: string;
725
814
  };
726
815
  "profiler-commit-query": {
727
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
816
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
728
817
  port?: number;
729
818
  /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
730
819
  device_id: string;
731
- /** Query mode; see Modes in the tool description. */
820
+ /** Query mode. */
732
821
  mode: "by_component" | "by_time_range" | "by_index" | "cascade_tree" | "render_counts";
733
- /** Component name; optional for render_counts, which it narrows to one component */
822
+ /** Component name (optional filter for `render_counts`). */
734
823
  component_name?: string;
735
- /** Time range in ms since profiling started, the clock this tool prints */
824
+ /** Range in ms since profiling started. */
736
825
  time_range_ms?: {
737
- /** Start of range in ms */
826
+ /** Start ms. */
738
827
  start: number;
739
- /** End of range in ms */
828
+ /** End ms. */
740
829
  end: number;
741
830
  };
742
- /** Commit index */
831
+ /** Commit index. */
743
832
  commit_index?: number | null;
744
- /** 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. */
833
+ /** Max results (default 20; unlimited for `by_index`). */
745
834
  top_n?: number;
746
835
  };
747
836
  "profiler-cpu-query": {
748
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
837
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
749
838
  port?: number;
750
839
  /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
751
840
  device_id: string;
752
- /** Query mode; see Modes in the tool description. */
841
+ /** Query mode. */
753
842
  mode: "top_functions" | "time_window" | "call_tree" | "component_cpu";
754
- /** Time window in ms since profiling started, the same clock profiler-commit-query prints */
843
+ /** Window in ms since profiling started (same clock as `profiler-commit-query`). */
755
844
  time_window_ms?: {
756
- /** Start of window in ms */
845
+ /** Start ms. */
757
846
  start: number;
758
- /** End of window in ms */
847
+ /** End ms. */
759
848
  end: number;
760
849
  };
761
- /** Component name */
850
+ /** Component name. */
762
851
  component_name?: string;
763
- /** Function name */
852
+ /** Function name. */
764
853
  function_name?: string;
765
- /** Number of results to return */
854
+ /** Max rows (default 15). */
766
855
  top_n?: number;
767
- /** Also show callers of the function */
856
+ /** Include callers (`call_tree`). */
768
857
  include_callers?: boolean;
769
- /** top_functions and time_window: list only React component functions (PascalCase names) */
858
+ /** Only PascalCase React components. */
770
859
  react_only?: boolean;
771
860
  };
772
861
  "profiler-load": {
773
- /** What to do; see Modes in the tool description. */
862
+ /** `list`, `load_react`, or `load_native`. */
774
863
  mode: "list" | "load_react" | "load_native";
775
- /** Timestamp-based session identifier (e.g. '20250313-143022') from the list output. */
864
+ /** Session ID from `list` (required for `load_*`). */
776
865
  session_id?: string;
777
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
866
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
778
867
  port?: number;
779
- /** Target device id from `list-devices`. Used to cache the loaded React session under the correct port+device key, and required to resolve the native profiler session for load_native. */
868
+ /** Device id from `list-devices` to bind the loaded session to. */
780
869
  device_id: string;
781
- /** Android package name to pass when restoring an older load_native .pftrace session that has no metadata sidecar. */
870
+ /** Android package name for legacy `.pftrace` sessions without metadata. */
782
871
  app_process?: string;
783
872
  };
784
873
  "profiler-stack-query": {
785
874
  /** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
786
875
  device_id: string;
787
- /** Query mode; see Modes in the tool description. */
876
+ /** Query mode. */
788
877
  mode: "hang_stacks" | "function_callers" | "thread_breakdown" | "leak_stacks";
789
- /** 0-based index into the hang list */
878
+ /** 0-based hang index. */
790
879
  hang_index?: number | null;
791
- /** Native function name */
880
+ /** Native function name. */
792
881
  function_name?: string;
793
- /** Thread filter. thread_breakdown: case-insensitive substring match. function_callers: exact raw thread name (e.g. ".blueskyweb.app"), or "main" for the UI thread; omit to search ALL threads (each result is tagged with its thread). Run thread_breakdown first to see the exact raw names. */
882
+ /** Thread filter (substring for `thread_breakdown`; exact raw name or `"main"` for `function_callers`). */
794
883
  thread?: string;
795
- /** Object type filter */
884
+ /** Object type filter (`leak_stacks`). */
796
885
  object_type?: string;
797
- /** Max results to return */
886
+ /** Max results (default 15). */
798
887
  top_n?: number;
799
888
  };
800
889
  propose_variant: {
@@ -831,21 +920,21 @@ export interface ArgentToolArgs {
831
920
  };
832
921
  };
833
922
  "react-profiler-analyze": {
834
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
923
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
835
924
  port?: number;
836
- /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
925
+ /** Device ID from list-devices used for the profile (Mac app: its list-devices ID). */
837
926
  device_id: string;
838
- /** Absolute path to the RN project root for session context detection */
927
+ /** Absolute path to the RN project root. */
839
928
  project_root: string;
840
- /** Platform for source lookup when the recording does not identify one. */
929
+ /** Fallback platform for source lookup if absent from recording. */
841
930
  platform?: "ios" | "android" | "macos";
842
- /** React Native version (e.g. "0.73.4") */
931
+ /** RN version (e.g. "0.73.4"). */
843
932
  rn_version?: string;
844
- /** User actions to annotate the report's commits with: each commit shows the action that preceded it. */
933
+ /** User actions to annotate report commits. */
845
934
  annotations?: Array<{
846
- /** Milliseconds since profiling started: tapTimestampMs - startedAtEpochMs, where tapTimestampMs is the timestampMs a tap/swipe tool returned and startedAtEpochMs is the value react-profiler-start returned. */
935
+ /** Ms since profiling started (`tapTimestampMs - startedAtEpochMs`). */
847
936
  offsetMs: number;
848
- /** Description of the action performed */
937
+ /** Action label. */
849
938
  label: string;
850
939
  }>;
851
940
  };
@@ -856,7 +945,7 @@ export interface ArgentToolArgs {
856
945
  project_root: string;
857
946
  };
858
947
  "react-profiler-cpu-summary": {
859
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
948
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
860
949
  port?: number;
861
950
  /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
862
951
  device_id: string;
@@ -866,7 +955,7 @@ export interface ArgentToolArgs {
866
955
  react_only?: boolean;
867
956
  };
868
957
  "react-profiler-fiber-tree": {
869
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
958
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
870
959
  port?: number;
871
960
  /** Device ID of the app to inspect. For a Mac app, use its ID from list-devices. During a recording, use the ID passed to react-profiler-start. */
872
961
  device_id: string;
@@ -876,7 +965,7 @@ export interface ArgentToolArgs {
876
965
  filter?: string;
877
966
  };
878
967
  "react-profiler-renders": {
879
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
968
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
880
969
  port?: number;
881
970
  /** Device ID of the app to inspect. For a Mac app, use its ID from list-devices. During a recording, use the ID passed to react-profiler-start. */
882
971
  device_id: string;
@@ -884,43 +973,43 @@ export interface ArgentToolArgs {
884
973
  top_n?: number;
885
974
  };
886
975
  "react-profiler-start": {
887
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
976
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
888
977
  port?: number;
889
- /** Device ID from list-devices, including a Mac app ID. For iOS or Android on a shared Metro, use the target's logicalDeviceId if asked to disambiguate. */
978
+ /** Device ID from list-devices, including a Mac app ID (or `logicalDeviceId` on shared Metro if requested). */
890
979
  device_id: string;
891
- /** CPU sampling interval in microseconds */
980
+ /** CPU sampling interval in microseconds. */
892
981
  sample_interval_us?: number;
893
- /** Take over an active profiling session even when it is owned by another tool-server and still fresh. Set to true only when you know the prior owner is gone. */
982
+ /** Take over another active fresh session (ask user approval first). */
894
983
  force?: boolean;
895
984
  };
896
985
  "react-profiler-status": {
897
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
986
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
898
987
  port?: number;
899
988
  /** Device ID of the app to inspect. For a Mac app, use its ID from list-devices. During a recording, use the ID passed to react-profiler-start. */
900
989
  device_id: string;
901
990
  };
902
991
  "react-profiler-stop": {
903
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
992
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
904
993
  port?: number;
905
994
  /** Device ID passed to react-profiler-start. For a Mac app, use its ID from list-devices. */
906
995
  device_id: string;
907
996
  };
908
997
  "reinstall-app": {
909
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
998
+ /** Device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
910
999
  udid: string;
911
- /** App identifier, used to uninstall the previous installation. iOS: bundle id. Android: package name. Vega: interactive component app id (e.g. com.example.app.main). HarmonyOS: bundle name (`app.bundleName` in the `.hap`). */
1000
+ /** Bundle id (iOS), package name (Android), component id (Vega), or bundleName (HarmonyOS). */
912
1001
  bundleId: string;
913
- /** Path to the app bundle. iOS: `.app` directory (e.g. ./build/.../MyApp.app). Android: `.apk` file (e.g. android/app/build/outputs/apk/debug/app-debug.apk). Vega: `.vpkg` file. HarmonyOS: `.hap` file. Relative paths are resolved from the current working directory. */
1002
+ /** Path to `.app` (iOS), `.apk` (Android), `.vpkg` (Vega), or `.hap` (HarmonyOS). */
914
1003
  appPath: string;
915
1004
  };
916
1005
  "restart-app": {
917
- /** Target device id from `list-devices` (iOS UDID, Mac app id, HarmonyOS id, or Android serial). */
1006
+ /** Target device id from `list-devices`. */
918
1007
  udid: string;
919
- /** 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. */
1008
+ /** App identifier (iOS/Mac app bundle id, Android package name, Vega interactive component app id, or HarmonyOS bundle name). */
920
1009
  bundleId: string;
921
- /** 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. */
1010
+ /** Android only: Activity name to relaunch (default: launcher activity). */
922
1011
  activity?: string;
923
- /** 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. */
1012
+ /** Apple targets only: process launch args, e.g. `["-FeatureFlag", "YES"]`. */
924
1013
  launchArgs?: Array<string>;
925
1014
  };
926
1015
  rotate: {
@@ -930,30 +1019,30 @@ export interface ArgentToolArgs {
930
1019
  orientation: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
931
1020
  };
932
1021
  "run-sequence": {
933
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, HarmonyOS id, Mac app id, or Chromium id), shared across all steps. */
1022
+ /** Target device id from `list-devices`, shared across all steps. */
934
1023
  udid: string;
935
- /** Ordered list of interaction steps to execute sequentially */
1024
+ /** Ordered steps to execute. */
936
1025
  steps: Array<{
937
- /** Tool name: one of the allowed tools listed in the description. */
1026
+ /** Allowed tool name (see description). */
938
1027
  tool: string;
939
- /** Tool arguments (excluding udid, which is injected automatically) */
1028
+ /** Tool arguments (omit `udid`, injected automatically). */
940
1029
  args: {
941
1030
  [key: string]: unknown;
942
1031
  };
943
- /** Wait time in ms after this step (and after the settle wait) before the next (default 100) */
1032
+ /** Extra pause in ms after step settle (default 100). */
944
1033
  delayMs?: number;
945
1034
  }>;
946
- /** 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. */
1035
+ /** Wait up to 1000ms for tree settle between screen-changing steps (default true). */
947
1036
  settle?: boolean;
948
1037
  };
949
1038
  "screen-recording-start": {
950
- /** Target ID from `list-devices`. For a Mac app, use its device ID, such as `macos-app-com.example.notes`. */
1039
+ /** Target ID from `list-devices` (Mac app: `macos-app-<bundle id>`). */
951
1040
  udid: string;
952
- /** Auto-stop cap in seconds (default 180). Set it to slightly more than the interaction you plan to capture. */
1041
+ /** Auto-stop cap in seconds (default 180). */
953
1042
  timeLimitSeconds?: number;
954
- /** Default true. Collapse stretches where the screen does not change: the first second of each still stretch is kept, then unchanged frames are dropped until something moves again, so a long recording with brief activity comes back short instead of full of dead air. Set false to keep a faithful real-time recording. */
1043
+ /** Collapse idle unchanged stretches after 1s (default true; false = real-time). */
955
1044
  trimStatic?: boolean;
956
- /** Draw touch markers in the video (default true). Recordings of physical iPhones have no touch markers. For Mac apps, this shows the agent's pointer, a click ring, and a dot while a mouse button is held. */
1045
+ /** Draw touch markers (default true; unsupported on physical iPhones). Mac apps: shows pointer, click ring, and hold dot. */
957
1046
  showTouches?: boolean;
958
1047
  };
959
1048
  "screen-recording-stop": {
@@ -961,41 +1050,41 @@ export interface ArgentToolArgs {
961
1050
  udid: string;
962
1051
  };
963
1052
  screenshot: {
964
- /** Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, HarmonyOS id, Mac app id, or Chromium id). */
1053
+ /** Target device id from `list-devices`. */
965
1054
  udid: string;
966
- /** 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. */
1055
+ /** Orientation override (rarely needed; captures already follow UI orientation). Rejected on HarmonyOS (captures display in current orientation). Ignored on physical iPhones. */
967
1056
  rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
968
- /** 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. */
1057
+ /** 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). */
969
1058
  scale?: number;
970
- /** 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. */
1059
+ /** Set false only when saving a full-res (`scale: 1.0`) baseline/current for `screenshot-diff`. */
971
1060
  includeImageInContext?: boolean;
972
- /** Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Ignored on every other platform. */
1061
+ /** Chromium only: downscaler when scale < 1 (default lanczos3). */
973
1062
  downscaler?: "lanczos3" | "box" | "bilinear" | "nearest";
974
1063
  };
975
1064
  "screenshot-diff": {
976
- /** Path to the saved baseline PNG file. Required unless captureBaseline is true; do not pass both. */
1065
+ /** Saved baseline PNG path (omit when `captureBaseline: true`). */
977
1066
  baselinePath?: string;
978
- /** Path to the saved current PNG file. Required unless captureCurrent is true; do not pass both. */
1067
+ /** Saved current PNG path (omit when `captureCurrent: true`). */
979
1068
  currentPath?: string;
980
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial, or a Mac app id). */
1069
+ /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial, or Mac app id). */
981
1070
  udid: string;
982
- /** Capture the baseline screenshot live from the device, at full resolution, before diffing. Cannot be combined with captureCurrent. */
1071
+ /** Capture baseline live from the device, at full resolution (mutually exclusive with `captureCurrent`). */
983
1072
  captureBaseline?: boolean;
984
- /** Capture the current screenshot live from the device, at full resolution, before diffing. Cannot be combined with captureBaseline. */
1073
+ /** Capture current live from the device, at full resolution (mutually exclusive with `captureBaseline`). */
985
1074
  captureCurrent?: boolean;
986
- /** Orientation override for live baseline/current captures. Rejected on HarmonyOS, which captures the display in its current orientation and has no override. Ignored on physical iPhones. */
1075
+ /** Orientation override for live captures. Rejected on HarmonyOS. Ignored on physical iPhones. */
987
1076
  rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
988
- /** Directory where diff artifacts should be written (default: a temp directory). */
1077
+ /** Output directory for diff artifacts (default: temp dir). */
989
1078
  outputDir?: string;
990
1079
  };
991
1080
  "settings-permissions": {
992
- /** Target device id from `list-devices` (iOS simulator UDID or Android serial). */
1081
+ /** Device id from `list-devices` (iOS simulator UDID or Android serial). */
993
1082
  udid: string;
994
- /** `grant` pre-authorizes the permission, `deny` refuses it, `reset` returns it to the not-yet-asked state so the app prompts on next use. */
1083
+ /** `grant` (pre-authorize), `deny`, or `reset` (re-prompt on next use). */
995
1084
  action: "grant" | "deny" | "reset";
996
- /** The permission to change. `notifications` is Android-only; `reminders` is iOS-only; `camera` works on Android, and on iOS only when the simulator's runtime models the service. */
1085
+ /** Permission name (`notifications` = Android-only; `reminders` = iOS-only). */
997
1086
  permission: "camera" | "microphone" | "photos" | "contacts" | "notifications" | "calendar" | "location" | "location-always" | "media-library" | "motion" | "reminders";
998
- /** App to change the permission for; every action, `reset` included, applies to this app only. iOS: bundle id (e.g. com.example.app). Android: package name. */
1087
+ /** Target app bundle id (iOS) or package name (Android). */
999
1088
  bundleId: string;
1000
1089
  };
1001
1090
  shake: {
@@ -1023,11 +1112,11 @@ export interface ArgentToolArgs {
1023
1112
  bundleId: string;
1024
1113
  };
1025
1114
  "tv-remote": {
1026
- /** Target TV device id from `list-devices` (Apple TV, Android TV, or Vega). */
1115
+ /** TV device id from `list-devices` (Apple TV, Android TV, or Vega). */
1027
1116
  udid: string;
1028
- /** A single TV-remote button, or a path of them run in one call. Move focus with up/down/left/right, confirm with select, go back with back/menu, exit with home; the media and volume buttons press the matching remote keys. For multi-step navigation pass an array, e.g. ["up","right","right","select"]; strongly prefer this over multiple `tv-remote` calls: the whole path runs in a single call. */
1117
+ /** Single remote button or array path run in one call (e.g. ["up","right","select"]; prefer an array over repeated calls). */
1029
1118
  button: "up" | "down" | "left" | "right" | "select" | "back" | "home" | "menu" | "playPause" | "rewind" | "fastForward" | "next" | "previous" | "volumeUp" | "volumeDown" | "mute" | Array<"up" | "down" | "left" | "right" | "select" | "back" | "home" | "menu" | "playPause" | "rewind" | "fastForward" | "next" | "previous" | "volumeUp" | "volumeDown" | "mute">;
1030
- /** Repeat the whole `button` value this many times (default 1). Compact for long same-button runs, e.g. { button: "down", repeat: 12 }. */
1119
+ /** Repeat `button` N times (default 1, e.g. `{ button: "down", repeat: 12 }`). */
1031
1120
  repeat?: number;
1032
1121
  };
1033
1122
  "ui-tree": {
@@ -1039,21 +1128,21 @@ export interface ArgentToolArgs {
1039
1128
  target?: "auto" | "global" | "local" | "both";
1040
1129
  };
1041
1130
  "view-network-logs": {
1042
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
1131
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
1043
1132
  port?: number;
1044
- /** Device ID from list-devices. For iOS simulators and Android, use logicalDeviceId if capture started with it. For a Mac app, keep the Mac app id macos-app-<bundle id> on shared Metro and for builds started outside Argent. */
1133
+ /** Device ID from `list-devices` (or `logicalDeviceId` if shared Metro capture used it); Mac app: Mac app id `macos-app-<bundle id>`. */
1045
1134
  device_id: string;
1046
- /** Zero-based page index. "latest" and null select the newest page. Each page contains up to 50 entries. */
1135
+ /** 0-based page index, or `"latest"`/null for newest (50 entries/page). */
1047
1136
  pageIndex?: number | "latest" | null;
1048
1137
  };
1049
1138
  "view-network-request-details": {
1050
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
1139
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
1051
1140
  port?: number;
1052
- /** Device ID for the matching log. For JS capture on iOS simulators and Android, use the logicalDeviceId if capture started with it. For a Mac app, keep the Mac app id even on shared Metro. */
1141
+ /** Device ID for the log (or `logicalDeviceId` if JS capture used it); Mac app: Mac app id. */
1053
1142
  device_id: string;
1054
- /** Request ID from either network log or await-network-request. */
1143
+ /** Request ID from `view-network-logs`, `native-network-logs`, or `await-network-request`. */
1055
1144
  requestId: string;
1056
- /** Set false to omit the response body. The request body can still appear. */
1145
+ /** Include response body (default true). */
1057
1146
  includeBody?: boolean;
1058
1147
  };
1059
1148
  /** @deprecated Renamed to `e2e-add-echo`. */