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

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.
@@ -16,23 +16,23 @@ 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/regex to match (no `{{secret:...}}` placeholders; full URL is returned). */
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. */
31
+ /** `complete` (default, incl. HTTP errors), `failed` (network error), or `any`. */
32
32
  outcome?: "complete" | "failed" | "any";
33
- /** Wait limit in milliseconds. Default 10000. */
33
+ /** Timeout in ms (default 10000). */
34
34
  timeoutMs?: number;
35
- /** Interval between capture reads in milliseconds. Default 400. */
35
+ /** Poll interval in ms (default 400). */
36
36
  pollIntervalMs?: number;
37
37
  };
38
38
  "await-screen-idle": {
@@ -117,27 +117,27 @@ export interface ArgentToolArgs {
117
117
  button: "home" | "back" | "power" | "volumeUp" | "volumeDown" | "appSwitch" | "actionButton";
118
118
  };
119
119
  "chromium-cookies": {
120
- /** Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`). */
120
+ /** Chromium device id (`chromium-cdp-<port>`). */
121
121
  udid: string;
122
- /** get: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies. */
122
+ /** get: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies across all domains (ignores url/domain). */
123
123
  action: "get" | "set" | "delete" | "clear";
124
- /** Cookie name. */
124
+ /** Cookie name (required for `set`/`delete`). */
125
125
  name?: string;
126
- /** Cookie value. */
126
+ /** Cookie value (required for `set`). */
127
127
  value?: string;
128
- /** get: restrict to this URL (defaults to the active page). set/delete: scope the cookie by URL. */
128
+ /** URL filter for `get` (defaults to the active page) or scope for `set`/`delete`. */
129
129
  url?: string;
130
- /** set/delete: scope the cookie by domain. */
130
+ /** Domain scope (`set`/`delete`). */
131
131
  domain?: string;
132
- /** set/delete: cookie path (default /). */
132
+ /** Path scope (default `/`). */
133
133
  path?: string;
134
- /** set: mark Secure. */
134
+ /** Secure flag (`set`). */
135
135
  secure?: boolean;
136
- /** set: mark HttpOnly. */
136
+ /** HttpOnly flag (`set`). */
137
137
  httpOnly?: boolean;
138
- /** set: SameSite policy. */
138
+ /** SameSite policy (`set`). */
139
139
  sameSite?: "Strict" | "Lax" | "None";
140
- /** set: expiry as a Unix timestamp (seconds). Omit for a session cookie. */
140
+ /** Unix expiry in seconds (`set`; omit for session). */
141
141
  expires?: number;
142
142
  };
143
143
  "chromium-storage": {
@@ -153,81 +153,81 @@ export interface ArgentToolArgs {
153
153
  value?: string;
154
154
  };
155
155
  "chromium-tabs": {
156
- /** Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`). */
156
+ /** Chromium device id (`chromium-cdp-<port>`). */
157
157
  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. */
158
+ /** Tab operation. */
159
159
  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. */
160
+ /** Tab id (e.g. `t2`) or label (`select` required; `close` defaults to active). */
161
161
  tab?: string;
162
- /** `new` only: URL to open (defaults to about:blank). */
162
+ /** URL for `new` (default `about:blank`). */
163
163
  url?: string;
164
- /** `new` only: a memorable label usable interchangeably with the tabId. */
164
+ /** Optional alias label for `new`. */
165
165
  label?: string;
166
166
  };
167
167
  "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. */
168
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
169
169
  port?: number;
170
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
170
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
171
171
  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. */
172
+ /** Only on-screen components (default true; false includes off-screen mounted nodes). */
173
173
  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. */
174
+ /** Max nodes to return (collapses single-child wrappers when exceeded). */
175
175
  maxNodes?: number;
176
- /** When true, appends a summary of all filtered components: total fiber count and skip counts by component name and by filter. */
176
+ /** Append filtered/skipped fiber counts summary. */
177
177
  includeSkipped?: boolean;
178
178
  };
179
179
  "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. */
180
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
181
181
  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. */
182
+ /** 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
183
  device_id: string;
184
184
  };
185
185
  "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. */
186
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
187
187
  port?: number;
188
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
188
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
189
189
  device_id: string;
190
- /** JavaScript expression to evaluate in the app runtime */
190
+ /** JavaScript expression to evaluate. */
191
191
  expression: string;
192
192
  };
193
193
  "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. */
194
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
195
195
  port?: number;
196
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
196
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
197
197
  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. */
198
+ /** X in logical pixels from screen left (or Mac app window left, title bar included). */
199
199
  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. */
200
+ /** Y in logical pixels from screen top (or Mac app window top, title bar included). */
201
201
  y: number;
202
- /** Lines of source context to include around the component definition */
202
+ /** Source context lines around each component. */
203
203
  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. */
204
+ /** Symbolicate via Metro and include code snippets (false = raw bundle frames). */
205
205
  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. */
206
+ /** Max hierarchy items, most specific first (default 35). */
207
207
  maxItems?: number;
208
- /** When true, items that would normally be filtered are kept in the response with skipped=true and a skipReason. */
208
+ /** Keep normally filtered items marked `skipped: true`. */
209
209
  includeSkipped?: boolean;
210
210
  };
211
211
  "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. */
212
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
213
213
  port?: number;
214
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
214
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
215
215
  device_id: string;
216
- /** How many of the newest entries to return in `entries`. Default 20. */
216
+ /** Newest entries to inline (default 20). */
217
217
  tail?: number;
218
- /** Return only these levels in `entries`, e.g. ["warning", "error"]. Stats and clusters stay unfiltered. */
218
+ /** Filter inline `entries` by level (e.g. ["warning", "error"]). */
219
219
  levels?: Array<"log" | "debug" | "info" | "error" | "warning" | "dir" | "dirxml" | "table" | "trace" | "clear" | "startGroup" | "startGroupCollapsed" | "endGroup" | "assert" | "profile" | "profileEnd" | "count" | "timeEnd">;
220
220
  };
221
221
  "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. */
222
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
223
223
  port?: number;
224
224
  /** Device id used with debugger-connect. For macOS, use the Mac app id. */
225
225
  device_id: string;
226
226
  };
227
227
  "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. */
228
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
229
229
  port?: number;
230
- /** Device id used with debugger-connect. For macOS, use the Mac app id. */
230
+ /** Device id from `debugger-connect` (macOS: Mac app id). */
231
231
  device_id: string;
232
232
  };
233
233
  describe: {
@@ -251,15 +251,15 @@ export interface ArgentToolArgs {
251
251
  shutdown?: boolean;
252
252
  };
253
253
  "e2e-add-script": {
254
- /** E2E test name passed to e2e-start-recording. */
254
+ /** E2E test name from `e2e-start-recording`. */
255
255
  name: string;
256
- /** Absolute project root passed to e2e-start-recording. */
256
+ /** Project root from `e2e-start-recording`. */
257
257
  project_root: string;
258
- /** Path to the script file (.mjs, .mts, .js or .ts), relative to the e2e test YAML. For example: "../../scripts/seed-order.mjs". */
258
+ /** Script path (.mjs/.mts/.js/.ts) relative to the test YAML. */
259
259
  path: string;
260
- /** Time limit in milliseconds. The default is 30000 and the minimum is 100. */
260
+ /** Timeout in ms (default 30000, min 100). */
261
261
  timeout?: number;
262
- /** Environment overrides for this script. Argent uses them immediately and saves them on the step. Values can include {{secret:NAME}} or {{output:PATH}}. */
262
+ /** Env overrides (supports `{{secret:NAME}}` and `{{output:PATH}}`). */
263
263
  env?: {
264
264
  [key: string]: string;
265
265
  };
@@ -267,37 +267,37 @@ export interface ArgentToolArgs {
267
267
  shutdown?: boolean;
268
268
  };
269
269
  "e2e-add-step": {
270
- /** Name of the e2e test being recorded: the one passed to e2e-start-recording. */
270
+ /** E2E test name from `e2e-start-recording`. */
271
271
  name: string;
272
- /** Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording. */
272
+ /** Project root from `e2e-start-recording`. */
273
273
  project_root: string;
274
- /** 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. */
274
+ /** MCP tool id to run and record (e.g. "gesture-tap"; call `e2e-add-script` directly for scripts). */
275
275
  command: string;
276
- /** Tool arguments as a JSON string, e.g. '{"udid": "ABC", "x": 0.5, "y": 0.3}'. Omit for tools with no arguments. */
276
+ /** JSON string of tool arguments (omit if none). */
277
277
  args?: string;
278
- /** Milliseconds to sleep before executing this step during replay. */
278
+ /** Replay delay in ms before this step. */
279
279
  delayMs?: number;
280
280
  /** Save the call in the shutdown list. Pending fragment cleanup runs before the call. stepCount counts shutdown entries. */
281
281
  shutdown?: boolean;
282
282
  };
283
283
  "e2e-execute": {
284
- /** 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"). */
284
+ /** Saved e2e test name in `<project_root>/.argent/e2e/` (or `.argent/flows/`). */
285
285
  name?: string;
286
- /** 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. */
286
+ /** Absolute path to the project root (script cwd; with e2e_test_path, run:/script:/baselines resolve beside the YAML). */
287
287
  project_root: string;
288
- /** 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. */
288
+ /** Internal; leave unset (derived from `project_root` and `name`). */
289
289
  e2e_test_file?: string;
290
- /** Absolute path to an e2e test .yaml on the client. */
290
+ /** Absolute path to an e2e test `.yaml` on the client. */
291
291
  e2e_test_path?: string;
292
- /** 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. */
292
+ /** 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. */
293
293
  device?: string;
294
- /** 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. */
294
+ /** 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). */
295
295
  platform?: "ios" | "android" | "chromium" | "vega" | "macos" | "ios-remote";
296
- /** 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. */
296
+ /** Refresh screenshot baselines for `snapshot` steps instead of diffing. */
297
297
  updateBaselines?: boolean;
298
- /** 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. */
298
+ /** 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). */
299
299
  prerequisiteAcknowledged?: boolean;
300
- /** 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. */
300
+ /** Script env overrides (also for `run:` fragments). Supports `{{secret:NAME}}`. */
301
301
  env?: {
302
302
  [key: string]: string;
303
303
  };
@@ -307,9 +307,9 @@ export interface ArgentToolArgs {
307
307
  flow_file?: string;
308
308
  };
309
309
  "e2e-finish-recording": {
310
- /** Name of the e2e test being recorded: the one passed to e2e-start-recording. */
310
+ /** E2E test name from `e2e-start-recording`. */
311
311
  name: string;
312
- /** Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording. */
312
+ /** Project root from `e2e-start-recording`. */
313
313
  project_root: string;
314
314
  };
315
315
  "e2e-read-prerequisite": {
@@ -337,18 +337,18 @@ export interface ArgentToolArgs {
337
337
  };
338
338
  };
339
339
  "e2e-start-recording": {
340
- /** Name for this e2e test (e.g. "settings-explore"): letters, digits, underscore and hyphen only. */
340
+ /** E2E test name (letters, digits, `_`, `-`). */
341
341
  name: string;
342
- /** Absolute path to the project root directory (the directory that contains or should contain `.argent/e2e/`). */
342
+ /** Absolute path to the project root containing `.argent/e2e/`. */
343
343
  project_root: string;
344
- /** 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. */
344
+ /** Fragments only: entry state assumed. Omit for standalone tests (Chromium records as a fragment, then add `launch: { chromium: <app path> }` and remove this). */
345
345
  executionPrerequisite?: string;
346
- /** 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. */
346
+ /** Supported target filter (`platform` and/or `runtimeKind`, ANDed). Omit for any. */
347
347
  requires?: {
348
348
  platform?: "ios" | "android" | "chromium" | "vega" | "macos" | Array<"ios" | "android" | "chromium" | "vega" | "macos">;
349
349
  runtimeKind?: "mobile" | "tv";
350
350
  };
351
- /** Default script environment values saved in the test's top-level env. Use {{secret:NAME}} for credentials. */
351
+ /** Top-level script env defaults. Supports `{{secret:NAME}}`. */
352
352
  env?: {
353
353
  [key: string]: string;
354
354
  };
@@ -378,11 +378,11 @@ export interface ArgentToolArgs {
378
378
  text: string;
379
379
  };
380
380
  fold: {
381
- /** Target device id from `list-devices` (a foldable iOS simulator UDID or Android emulator serial). */
381
+ /** Foldable device id from `list-devices` (iOS simulator UDID or Android emulator serial). */
382
382
  udid: string;
383
- /** Where to move the hinge: `closed` shows the cover panel, `half-open` and `open` show the inner panel. */
383
+ /** Target posture: `closed` (cover panel), `half-open`, or `open` (inner panel). */
384
384
  posture?: "closed" | "half-open" | "open";
385
- /** The hinge angle in degrees: 0 = closed, 180 = open. */
385
+ /** Hinge angle in degrees (0 = closed, 180 = open). */
386
386
  angle?: number;
387
387
  };
388
388
  "foreground-app": {
@@ -396,94 +396,94 @@ export interface ArgentToolArgs {
396
396
  "gesture-custom": {
397
397
  /** Target device id from `list-devices` (iOS UDID or Android serial). */
398
398
  udid: string;
399
- /** Starting edge in upright screen coordinates for a single-finger system gesture on a local iOS simulator. */
399
+ /** Starting screen edge for a single-finger system gesture (local iOS simulator). */
400
400
  edge?: "top" | "right" | "bottom" | "left";
401
- /** Touch events, dispatched in order. */
401
+ /** Ordered touch events. */
402
402
  events: Array<{
403
- /** Touch event type */
403
+ /** Touch event type. */
404
404
  type: "Down" | "Move" | "Up";
405
- /** Touch x. */
405
+ /** Normalized x. */
406
406
  x: number;
407
- /** Touch y. */
407
+ /** Normalized y. */
408
408
  y: number;
409
- /** Second finger x, for two-finger gestures. */
409
+ /** Second finger x. */
410
410
  x2?: number;
411
- /** Second finger y, for two-finger gestures. */
411
+ /** Second finger y. */
412
412
  y2?: number;
413
- /** Delay before this event in milliseconds (default 16ms ≈ 60fps) */
413
+ /** Delay before event in ms (default 16). */
414
414
  delayMs?: number;
415
415
  }>;
416
- /** 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. */
416
+ /** Insert N linearly interpolated Move events between consecutive events (default 0). */
417
417
  interpolate?: number;
418
418
  };
419
419
  "gesture-drag": {
420
- /** Target Chromium device id from `list-devices` (chromium-cdp-<port>), or a Mac app id. */
420
+ /** Chromium device id (`chromium-cdp-<port>`) or Mac app id from `list-devices`. */
421
421
  udid: string;
422
- /** Press x. */
422
+ /** Start x. */
423
423
  fromX: number;
424
- /** Press y. */
424
+ /** Start y. */
425
425
  fromY: number;
426
- /** Release x. */
426
+ /** End x. */
427
427
  toX: number;
428
- /** Release y. */
428
+ /** End y. */
429
429
  toY: number;
430
- /** Total drag duration in milliseconds (default 300, 800 for a long press on a Mac app); the button stays down this long. */
430
+ /** Drag duration in ms (default 300; 800 for a Mac app long press). */
431
431
  durationMs?: number;
432
- /** 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. */
432
+ /** Default true (constant speed). false decelerates into release to avoid fling. */
433
433
  momentum?: boolean;
434
434
  };
435
435
  "gesture-pinch": {
436
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
436
+ /** Device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
437
437
  udid: string;
438
- /** Center of the pinch, horizontal. */
438
+ /** Normalized center x. */
439
439
  centerX: number;
440
- /** Center of the pinch, vertical. */
440
+ /** Normalized center y. */
441
441
  centerY: number;
442
- /** Initial distance between the two fingers. */
442
+ /** Initial normalized finger distance. */
443
443
  startDistance: number;
444
- /** Final distance between the two fingers. */
444
+ /** Final normalized finger distance (> start = zoom in). */
445
445
  endDistance: number;
446
- /** 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. */
446
+ /** Optional final center x (centroid drifts linearly). */
447
447
  endCenterX?: number;
448
- /** Final vertical center of the pinch; drifts from centerY like endCenterX. Omit for a fixed center. */
448
+ /** Optional final center y. */
449
449
  endCenterY?: number;
450
- /** Angle in degrees of the axis the fingers lie on: 0 = horizontal (default), 90 = vertical. */
450
+ /** Finger axis angle in degrees (0 = horizontal, 90 = vertical). */
451
451
  angle?: number;
452
- /** 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. */
452
+ /** Duration in ms (default 300); clamped to 1–15000ms on HarmonyOS. */
453
453
  durationMs?: number;
454
454
  };
455
455
  "gesture-rotate": {
456
- /** Target device id from `list-devices` (iOS UDID or Android serial). */
456
+ /** Device id from `list-devices` (iOS UDID or Android serial). */
457
457
  udid: string;
458
- /** Center of rotation, horizontal. */
458
+ /** Normalized rotation center x. */
459
459
  centerX: number;
460
- /** Center of rotation, vertical. */
460
+ /** Normalized rotation center y. */
461
461
  centerY: number;
462
- /** Distance from the center to each finger. */
462
+ /** Normalized finger orbit radius (e.g. 0.15). */
463
463
  radius?: number;
464
- /** Finger distance along the horizontal axis, as a fraction of screen WIDTH. */
464
+ /** Horizontal radius fraction of screen width (pair with `radiusY`). */
465
465
  radiusX?: number;
466
- /** Finger distance along the vertical axis, as a fraction of screen HEIGHT. */
466
+ /** Vertical radius fraction of screen height (pair with `radiusX`). */
467
467
  radiusY?: number;
468
- /** Starting angle in degrees (0 = right, 90 = down) */
468
+ /** Start angle in degrees (0 = right, 90 = down). */
469
469
  startAngle: number;
470
- /** Ending angle in degrees. */
470
+ /** End angle in degrees (> startAngle = clockwise). */
471
471
  endAngle: number;
472
- /** Total gesture duration in milliseconds (default 300) */
472
+ /** Duration in ms (default 300). */
473
473
  durationMs?: number;
474
474
  };
475
475
  "gesture-scroll": {
476
- /** Target Chromium device id from `list-devices` (chromium-cdp-<port>), or a Mac app id. */
476
+ /** Chromium device id (`chromium-cdp-<port>`) or Mac app id from `list-devices`. */
477
477
  udid: string;
478
- /** Anchor x. The wheel events land here; put it over the element you want to scroll. */
478
+ /** Normalized anchor x over the scrollable element. */
479
479
  x: number;
480
- /** Anchor y. */
480
+ /** Normalized anchor y. */
481
481
  y: number;
482
- /** Horizontal scroll distance as a fraction of the window width. Positive reveals content to the right; negative scrolls back left. */
482
+ /** Horizontal scroll fraction (+ right, - left). */
483
483
  deltaX?: number;
484
- /** 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. */
484
+ /** Vertical scroll fraction (+ down, - up; e.g. 0.5). */
485
485
  deltaY?: number;
486
- /** Spread the scroll over this many milliseconds in wheel-event steps (default 300) so scroll handlers fire progressively. Ignored on a Mac app. */
486
+ /** Scroll duration in ms (default 300); ignored on Mac apps. */
487
487
  durationMs?: number;
488
488
  };
489
489
  "gesture-swipe": {
@@ -521,8 +521,10 @@ export interface ArgentToolArgs {
521
521
  udid: string;
522
522
  /** Text to type. Cannot be combined with `key` (use two steps in `run-sequence` to type then press enter). Supports `{{secret:<NAME>}}` placeholders resolved server-side from `ARGENT_SECRET_<NAME>` / `.argent/secrets.env` (auto-screenshot is skipped; combine with submit in one `run-sequence` to keep the skip; never ask the user for plaintext). */
523
523
  text?: string;
524
- /** Named key. Cannot be combined with `text` (use two steps in `run-sequence`). Values: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Not supported on Apple TV / Android TV (use `tv-remote`). Physical iOS: enter/backspace only. HarmonyOS: enter, backspace, space, arrow-left/right. Mac app: also delete (forward delete), home, end, page-up/down, and modifier shortcuts (e.g. command+a). */
524
+ /** 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). */
525
525
  key?: string;
526
+ /** 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. */
527
+ clear?: boolean;
526
528
  /** Press `key` this many times in one call, e.g. `{ key: "backspace", repeat: 12 }`. Only valid with `key`. */
527
529
  repeat?: number;
528
530
  /** Delay in ms between key presses (default 50; ignored on platforms that type in one shot). */
@@ -570,21 +572,21 @@ export interface ArgentToolArgs {
570
572
  udid: string;
571
573
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
572
574
  bundleId: string;
573
- /** UIView class name to match (exact, e.g. UIButton) */
575
+ /** Exact UIView class name (e.g. UIButton). */
574
576
  className?: string;
575
- /** Accessibility identifier to match (exact) */
577
+ /** Exact accessibility identifier. */
576
578
  identifier?: string;
577
- /** Accessibility label to match (exact) */
579
+ /** Exact accessibility label. */
578
580
  label?: string;
579
- /** UIView tag integer to match */
581
+ /** UIView integer tag. */
580
582
  tag?: number;
581
- /** React Native nativeID prop to match (exact) */
583
+ /** Exact React Native nativeID. */
582
584
  nativeID?: string;
583
- /** Include ancestor chain for each matched view (default true) */
585
+ /** Include ancestor chain (default true). */
584
586
  includeAncestors?: boolean;
585
- /** Include child views for each matched view (default true) */
587
+ /** Include child views (default true). */
586
588
  includeChildren?: boolean;
587
- /** 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 */
589
+ /** 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). */
588
590
  fields?: Array<string>;
589
591
  };
590
592
  "native-full-hierarchy": {
@@ -592,25 +594,25 @@ export interface ArgentToolArgs {
592
594
  udid: string;
593
595
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
594
596
  bundleId: string;
595
- /** 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 */
597
+ /** 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). */
596
598
  fields?: Array<string>;
597
- /** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes) */
599
+ /** Exact UIView classes to prune (e.g. ["UIImageView"]). */
598
600
  skipClasses?: Array<string>;
599
- /** 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. */
601
+ /** Class prefixes to prune (e.g. ["_TtGC7SwiftUI"] for SwiftUI; avoid broad "_UI"). */
600
602
  skipClassPrefixes?: Array<string>;
601
- /** Maximum recursion depth (default 8). Raise it to reach deeper views. */
603
+ /** Max recursion depth (default 8). */
602
604
  maxDepth?: number;
603
605
  };
604
606
  "native-network-logs": {
605
- /** Device ID from list-devices: an iOS simulator UDID or Android serial, or a Mac app id (macos-app-<bundle id>) */
607
+ /** Device ID from `list-devices`: iOS simulator UDID, Android serial, or Mac app id (`macos-app-<bundle id>`). */
606
608
  udid: string;
607
- /** App bundle ID on iOS or package name on Android. On macOS, omit the macos-app- prefix. */
609
+ /** Bundle ID (iOS) or package name (Android); on macOS, omit `macos-app-`. */
608
610
  bundleId: string;
609
- /** Exclude requests to this Metro port on local addresses. Omit it to use the device's Metro port (usually 8081). */
611
+ /** Metro port to exclude from logs (omit for device default, usually 8081). */
610
612
  port?: number;
611
- /** Take the newest matching requests and return them oldest first. Use 0 for capture status and totals without entries. */
613
+ /** Newest requests to return oldest-first (default 50; 0 = status/totals only). */
612
614
  limit?: number;
613
- /** Hide existing history from later lists. Cleared request IDs still work in view-network-request-details. */
615
+ /** Hide current history from later lists (IDs still work in `view-network-request-details`). */
614
616
  clear?: boolean;
615
617
  };
616
618
  "native-profiler-analyze": {
@@ -618,25 +620,25 @@ export interface ArgentToolArgs {
618
620
  device_id: string;
619
621
  };
620
622
  "native-profiler-launch-analysis": {
621
- /** measure: time five launches with XCTest. profile: record one Instruments App Launch trace. */
623
+ /** `measure`: 5 XCTest timed launches. `profile`: 1 Instruments App Launch trace. */
622
624
  mode: "measure" | "profile";
623
- /** Bundle ID of the Release build already installed on the device. The tool does not build or install the app. */
625
+ /** Installed Release build bundle ID (not built or installed by this tool). */
624
626
  bundle_id: string;
625
- /** Connected iPhone UDID; required for a physical-device run. With allow_simulator, a booted simulator UDID also works. */
627
+ /** iPhone UDID (or booted simulator UDID with `allow_simulator: true`). */
626
628
  device_id?: string;
627
- /** Explicitly allow a booted simulator when no iPhone is selected. */
629
+ /** Allow booted simulator when no iPhone is selected. */
628
630
  allow_simulator?: boolean;
629
- /** profile mode only: App Launch trace recording length in seconds (default 8). Rejected in measure mode. */
631
+ /** `profile` mode only: trace duration in s (default 8). */
630
632
  duration_seconds?: number;
631
633
  };
632
634
  "native-profiler-start": {
633
635
  /** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
634
636
  device_id: string;
635
- /** 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. */
637
+ /** iOS executable/name or Android package (auto-detects foreground app if omitted); omit for Mac apps. */
636
638
  app_process?: string;
637
- /** 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). */
639
+ /** iOS/Mac app Instruments `.tracetemplate` path or built-in name (e.g. "Time Profiler"; default: bundled template). */
638
640
  template_path?: string;
639
- /** 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. */
641
+ /** iOS/Mac apps only: restart app with allocation stacks from launch (adds overhead; leave off for CPU/hang timing). */
640
642
  malloc_stack_logging?: boolean;
641
643
  };
642
644
  "native-profiler-stop": {
@@ -648,21 +650,21 @@ export interface ArgentToolArgs {
648
650
  udid: string;
649
651
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
650
652
  bundleId: string;
651
- /** 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. */
653
+ /** Raw X in upright UI points (Mac app: from describe area top-left). Not normalized [0,1]. */
652
654
  x: number;
653
- /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
655
+ /** Raw Y in upright UI points. Not normalized [0,1]. */
654
656
  y: number;
655
- /** Include ancestor chain for the matched view (default true) */
657
+ /** Include ancestor chain (default true). */
656
658
  includeAncestors?: boolean;
657
- /** Include child views for the matched view (default false) */
659
+ /** Include child views (default false). */
658
660
  includeChildren?: boolean;
659
- /** 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 */
661
+ /** 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). */
660
662
  fields?: Array<string>;
661
- /** Exact UIView class names whose entire subtree should be pruned */
663
+ /** Exact UIView class names to prune. */
662
664
  skipClasses?: Array<string>;
663
- /** Class name prefixes to prune entire subtrees */
665
+ /** Class name prefixes to prune. */
664
666
  skipClassPrefixes?: Array<string>;
665
- /** Maximum depth for returned child/ancestor serialization (default 150) */
667
+ /** Max serialization depth (default 150). */
666
668
  maxDepth?: number;
667
669
  };
668
670
  "native-view-at-point": {
@@ -670,157 +672,157 @@ export interface ArgentToolArgs {
670
672
  udid: string;
671
673
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
672
674
  bundleId: string;
673
- /** 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. */
675
+ /** Raw X in upright UI points (Mac app: from describe area top-left). Not normalized [0,1]. */
674
676
  x: number;
675
- /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
677
+ /** Raw Y in upright UI points. Not normalized [0,1]. */
676
678
  y: number;
677
- /** Include ancestor chain for the matched view (default true) */
679
+ /** Include ancestor chain (default true). */
678
680
  includeAncestors?: boolean;
679
- /** Include child views for the matched view (default false) */
681
+ /** Include child views (default false). */
680
682
  includeChildren?: boolean;
681
- /** 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 */
683
+ /** 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). */
682
684
  fields?: Array<string>;
683
- /** Exact UIView class names whose entire subtree should be pruned */
685
+ /** Exact UIView class names to prune. */
684
686
  skipClasses?: Array<string>;
685
- /** Class name prefixes to prune entire subtrees */
687
+ /** Class name prefixes to prune. */
686
688
  skipClassPrefixes?: Array<string>;
687
- /** Maximum depth for returned child/ancestor serialization (default 150) */
689
+ /** Max serialization depth (default 150). */
688
690
  maxDepth?: number;
689
- /** 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. */
691
+ /** true: touch-receiving view (UIKit hit-test). false (default): deepest visible view. */
690
692
  hitTest?: boolean;
691
693
  };
692
694
  "network-capture-start": {
693
- /** Device ID from list-devices. For Mac builds started outside Argent, use macos-app-<bundle id>. */
695
+ /** Device ID from `list-devices` (external Mac builds: `macos-app-<bundle id>`). */
694
696
  udid: string;
695
- /** 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. */
697
+ /** Bundle ID (iOS) / package (Android) / Mac bundle ID / placeholder on Chromium (e.g. `argent.capture`). */
696
698
  bundleId: string;
697
- /** 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. */
699
+ /** Metro port for JS capture and native filtering (omit for device default, usually 8081; ignored on Chromium). */
698
700
  port?: number;
699
- /** Omit to control both layers. Selecting one leaves the other alone. Chromium ignores this setting. */
701
+ /** Control one layer only (default: both; ignored on Chromium). */
700
702
  layer?: "js" | "native";
701
- /** 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. */
703
+ /** Shared-Metro logical ID for iOS/Android if requested (reuse for start/stop/JS reads); omit on Mac apps. */
702
704
  logicalDeviceId?: string;
703
705
  };
704
706
  "network-capture-stop": {
705
- /** Device ID from list-devices. For Mac builds started outside Argent, use macos-app-<bundle id>. */
707
+ /** Device ID from `list-devices` (external Mac builds: `macos-app-<bundle id>`). */
706
708
  udid: string;
707
- /** 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. */
709
+ /** Bundle ID (iOS) / package (Android) / Mac bundle ID / placeholder on Chromium (e.g. `argent.capture`). */
708
710
  bundleId: string;
709
- /** 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. */
711
+ /** Metro port for JS capture and native filtering (omit for device default, usually 8081; ignored on Chromium). */
710
712
  port?: number;
711
- /** Omit to control both layers. Selecting one leaves the other alone. Chromium ignores this setting. */
713
+ /** Control one layer only (default: both; ignored on Chromium). */
712
714
  layer?: "js" | "native";
713
- /** 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. */
715
+ /** Shared-Metro logical ID for iOS/Android if requested (reuse for start/stop/JS reads); omit on Mac apps. */
714
716
  logicalDeviceId?: string;
715
717
  };
716
718
  "network-conditions": {
717
- /** Device ID from list-devices. */
719
+ /** Device ID from `list-devices`. */
718
720
  udid: string;
719
- /** Bundle ID of the app to shape. Required on iOS and ignored elsewhere. */
721
+ /** App bundle ID (required on iOS; ignored elsewhere). */
720
722
  bundleId?: string;
721
- /** Metro port to exempt from shaping on iOS and Android. Omit for the device's port (usually 8081). */
723
+ /** Metro port exempt from shaping (omit for device default, usually 8081). */
722
724
  port?: number;
723
- /** Delay in milliseconds. Android adds it per round trip. iOS and Chromium use it as a minimum response delay. */
725
+ /** Added latency in ms. */
724
726
  latencyMs?: number;
725
- /** Download limit in kilobits per second. */
727
+ /** Download cap in kbps. */
726
728
  downloadKbps?: number;
727
- /** Upload limit in kilobits per second. */
729
+ /** Upload cap in kbps. */
728
730
  uploadKbps?: number;
729
- /** 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. */
731
+ /** Simulate offline (on Android, `adb reverse` ports stay reachable while Metro at `10.0.2.2` does not; `false` alone resets conditions). */
730
732
  offline?: boolean;
731
733
  };
732
734
  "open-url": {
733
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
735
+ /** Device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
734
736
  udid: string;
735
- /** URL or scheme to open (e.g. https://example.com, messages://, tel:555, geo:37.0,-122.0). */
737
+ /** URL or custom scheme (e.g. https://example.com, myapp://path). */
736
738
  url: string;
737
- /** Physical iOS only: the app that receives the URL. Defaults to Safari for http(s); required for any other scheme. */
739
+ /** Physical iOS only: receiving app (defaults to Safari for http/https; required otherwise). */
738
740
  bundleId?: string;
739
741
  };
740
742
  paste: {
741
- /** Target device id from `list-devices` (iOS simulator UDID or Android emulator serial, or Mac app id). */
743
+ /** Device id from `list-devices` (iOS simulator UDID, Android emulator serial, or Mac app id). */
742
744
  udid: string;
743
- /** 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. */
745
+ /** Text to paste. Supports `{{secret:<NAME>}}` placeholders resolved server-side (never ask the user for plaintext). */
744
746
  text: string;
745
747
  };
746
748
  "profiler-combined-report": {
747
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
749
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
748
750
  port?: number;
749
751
  /** Device ID from list-devices used for the native profile (iOS simulator UDID, Android serial, or Mac app ID). */
750
752
  device_id: string;
751
753
  };
752
754
  "profiler-commit-query": {
753
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
755
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
754
756
  port?: number;
755
757
  /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
756
758
  device_id: string;
757
- /** Query mode; see Modes in the tool description. */
759
+ /** Query mode. */
758
760
  mode: "by_component" | "by_time_range" | "by_index" | "cascade_tree" | "render_counts";
759
- /** Component name; optional for render_counts, which it narrows to one component */
761
+ /** Component name (optional filter for `render_counts`). */
760
762
  component_name?: string;
761
- /** Time range in ms since profiling started, the clock this tool prints */
763
+ /** Range in ms since profiling started. */
762
764
  time_range_ms?: {
763
- /** Start of range in ms */
765
+ /** Start ms. */
764
766
  start: number;
765
- /** End of range in ms */
767
+ /** End ms. */
766
768
  end: number;
767
769
  };
768
- /** Commit index */
770
+ /** Commit index. */
769
771
  commit_index?: number | null;
770
- /** 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. */
772
+ /** Max results (default 20; unlimited for `by_index`). */
771
773
  top_n?: number;
772
774
  };
773
775
  "profiler-cpu-query": {
774
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
776
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
775
777
  port?: number;
776
778
  /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
777
779
  device_id: string;
778
- /** Query mode; see Modes in the tool description. */
780
+ /** Query mode. */
779
781
  mode: "top_functions" | "time_window" | "call_tree" | "component_cpu";
780
- /** Time window in ms since profiling started, the same clock profiler-commit-query prints */
782
+ /** Window in ms since profiling started (same clock as `profiler-commit-query`). */
781
783
  time_window_ms?: {
782
- /** Start of window in ms */
784
+ /** Start ms. */
783
785
  start: number;
784
- /** End of window in ms */
786
+ /** End ms. */
785
787
  end: number;
786
788
  };
787
- /** Component name */
789
+ /** Component name. */
788
790
  component_name?: string;
789
- /** Function name */
791
+ /** Function name. */
790
792
  function_name?: string;
791
- /** Number of results to return */
793
+ /** Max rows (default 15). */
792
794
  top_n?: number;
793
- /** Also show callers of the function */
795
+ /** Include callers (`call_tree`). */
794
796
  include_callers?: boolean;
795
- /** top_functions and time_window: list only React component functions (PascalCase names) */
797
+ /** Only PascalCase React components. */
796
798
  react_only?: boolean;
797
799
  };
798
800
  "profiler-load": {
799
- /** What to do; see Modes in the tool description. */
801
+ /** `list`, `load_react`, or `load_native`. */
800
802
  mode: "list" | "load_react" | "load_native";
801
- /** Timestamp-based session identifier (e.g. '20250313-143022') from the list output. */
803
+ /** Session ID from `list` (required for `load_*`). */
802
804
  session_id?: string;
803
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
805
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
804
806
  port?: number;
805
- /** 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. */
807
+ /** Device id from `list-devices` to bind the loaded session to. */
806
808
  device_id: string;
807
- /** Android package name to pass when restoring an older load_native .pftrace session that has no metadata sidecar. */
809
+ /** Android package name for legacy `.pftrace` sessions without metadata. */
808
810
  app_process?: string;
809
811
  };
810
812
  "profiler-stack-query": {
811
813
  /** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
812
814
  device_id: string;
813
- /** Query mode; see Modes in the tool description. */
815
+ /** Query mode. */
814
816
  mode: "hang_stacks" | "function_callers" | "thread_breakdown" | "leak_stacks";
815
- /** 0-based index into the hang list */
817
+ /** 0-based hang index. */
816
818
  hang_index?: number | null;
817
- /** Native function name */
819
+ /** Native function name. */
818
820
  function_name?: string;
819
- /** 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. */
821
+ /** Thread filter (substring for `thread_breakdown`; exact raw name or `"main"` for `function_callers`). */
820
822
  thread?: string;
821
- /** Object type filter */
823
+ /** Object type filter (`leak_stacks`). */
822
824
  object_type?: string;
823
- /** Max results to return */
825
+ /** Max results (default 15). */
824
826
  top_n?: number;
825
827
  };
826
828
  propose_variant: {
@@ -857,21 +859,21 @@ export interface ArgentToolArgs {
857
859
  };
858
860
  };
859
861
  "react-profiler-analyze": {
860
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
862
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
861
863
  port?: number;
862
- /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
864
+ /** Device ID from list-devices used for the profile (Mac app: its list-devices ID). */
863
865
  device_id: string;
864
- /** Absolute path to the RN project root for session context detection */
866
+ /** Absolute path to the RN project root. */
865
867
  project_root: string;
866
- /** Platform for source lookup when the recording does not identify one. */
868
+ /** Fallback platform for source lookup if absent from recording. */
867
869
  platform?: "ios" | "android" | "macos";
868
- /** React Native version (e.g. "0.73.4") */
870
+ /** RN version (e.g. "0.73.4"). */
869
871
  rn_version?: string;
870
- /** User actions to annotate the report's commits with: each commit shows the action that preceded it. */
872
+ /** User actions to annotate report commits. */
871
873
  annotations?: Array<{
872
- /** 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. */
874
+ /** Ms since profiling started (`tapTimestampMs - startedAtEpochMs`). */
873
875
  offsetMs: number;
874
- /** Description of the action performed */
876
+ /** Action label. */
875
877
  label: string;
876
878
  }>;
877
879
  };
@@ -882,7 +884,7 @@ export interface ArgentToolArgs {
882
884
  project_root: string;
883
885
  };
884
886
  "react-profiler-cpu-summary": {
885
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
887
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
886
888
  port?: number;
887
889
  /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
888
890
  device_id: string;
@@ -892,7 +894,7 @@ export interface ArgentToolArgs {
892
894
  react_only?: boolean;
893
895
  };
894
896
  "react-profiler-fiber-tree": {
895
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
897
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
896
898
  port?: number;
897
899
  /** 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. */
898
900
  device_id: string;
@@ -902,7 +904,7 @@ export interface ArgentToolArgs {
902
904
  filter?: string;
903
905
  };
904
906
  "react-profiler-renders": {
905
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
907
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
906
908
  port?: number;
907
909
  /** 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. */
908
910
  device_id: string;
@@ -910,33 +912,33 @@ export interface ArgentToolArgs {
910
912
  top_n?: number;
911
913
  };
912
914
  "react-profiler-start": {
913
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
915
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
914
916
  port?: number;
915
- /** 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. */
917
+ /** Device ID from list-devices, including a Mac app ID (or `logicalDeviceId` on shared Metro if requested). */
916
918
  device_id: string;
917
- /** CPU sampling interval in microseconds */
919
+ /** CPU sampling interval in microseconds. */
918
920
  sample_interval_us?: number;
919
- /** 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. */
921
+ /** Take over another active fresh session (ask user approval first). */
920
922
  force?: boolean;
921
923
  };
922
924
  "react-profiler-status": {
923
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
925
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
924
926
  port?: number;
925
927
  /** 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. */
926
928
  device_id: string;
927
929
  };
928
930
  "react-profiler-stop": {
929
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
931
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
930
932
  port?: number;
931
933
  /** Device ID passed to react-profiler-start. For a Mac app, use its ID from list-devices. */
932
934
  device_id: string;
933
935
  };
934
936
  "reinstall-app": {
935
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
937
+ /** Device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
936
938
  udid: string;
937
- /** 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`). */
939
+ /** Bundle id (iOS), package name (Android), component id (Vega), or bundleName (HarmonyOS). */
938
940
  bundleId: string;
939
- /** 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. */
941
+ /** Path to `.app` (iOS), `.apk` (Android), `.vpkg` (Vega), or `.hap` (HarmonyOS). */
940
942
  appPath: string;
941
943
  };
942
944
  "restart-app": {
@@ -973,13 +975,13 @@ export interface ArgentToolArgs {
973
975
  settle?: boolean;
974
976
  };
975
977
  "screen-recording-start": {
976
- /** Target ID from `list-devices`. For a Mac app, use its device ID, such as `macos-app-com.example.notes`. */
978
+ /** Target ID from `list-devices` (Mac app: `macos-app-<bundle id>`). */
977
979
  udid: string;
978
- /** Auto-stop cap in seconds (default 180). Set it to slightly more than the interaction you plan to capture. */
980
+ /** Auto-stop cap in seconds (default 180). */
979
981
  timeLimitSeconds?: number;
980
- /** 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. */
982
+ /** Collapse idle unchanged stretches after 1s (default true; false = real-time). */
981
983
  trimStatic?: boolean;
982
- /** 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. */
984
+ /** Draw touch markers (default true; unsupported on physical iPhones). Mac apps: shows pointer, click ring, and hold dot. */
983
985
  showTouches?: boolean;
984
986
  };
985
987
  "screen-recording-stop": {
@@ -999,29 +1001,29 @@ export interface ArgentToolArgs {
999
1001
  downscaler?: "lanczos3" | "box" | "bilinear" | "nearest";
1000
1002
  };
1001
1003
  "screenshot-diff": {
1002
- /** Path to the saved baseline PNG file. Required unless captureBaseline is true; do not pass both. */
1004
+ /** Saved baseline PNG path (omit when `captureBaseline: true`). */
1003
1005
  baselinePath?: string;
1004
- /** Path to the saved current PNG file. Required unless captureCurrent is true; do not pass both. */
1006
+ /** Saved current PNG path (omit when `captureCurrent: true`). */
1005
1007
  currentPath?: string;
1006
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial, or a Mac app id). */
1008
+ /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial, or Mac app id). */
1007
1009
  udid: string;
1008
- /** Capture the baseline screenshot live from the device, at full resolution, before diffing. Cannot be combined with captureCurrent. */
1010
+ /** Capture baseline live from the device, at full resolution (mutually exclusive with `captureCurrent`). */
1009
1011
  captureBaseline?: boolean;
1010
- /** Capture the current screenshot live from the device, at full resolution, before diffing. Cannot be combined with captureBaseline. */
1012
+ /** Capture current live from the device, at full resolution (mutually exclusive with `captureBaseline`). */
1011
1013
  captureCurrent?: boolean;
1012
- /** 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. */
1014
+ /** Orientation override for live captures. Rejected on HarmonyOS. Ignored on physical iPhones. */
1013
1015
  rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
1014
- /** Directory where diff artifacts should be written (default: a temp directory). */
1016
+ /** Output directory for diff artifacts (default: temp dir). */
1015
1017
  outputDir?: string;
1016
1018
  };
1017
1019
  "settings-permissions": {
1018
- /** Target device id from `list-devices` (iOS simulator UDID or Android serial). */
1020
+ /** Device id from `list-devices` (iOS simulator UDID or Android serial). */
1019
1021
  udid: string;
1020
- /** `grant` pre-authorizes the permission, `deny` refuses it, `reset` returns it to the not-yet-asked state so the app prompts on next use. */
1022
+ /** `grant` (pre-authorize), `deny`, or `reset` (re-prompt on next use). */
1021
1023
  action: "grant" | "deny" | "reset";
1022
- /** 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. */
1024
+ /** Permission name (`notifications` = Android-only; `reminders` = iOS-only). */
1023
1025
  permission: "camera" | "microphone" | "photos" | "contacts" | "notifications" | "calendar" | "location" | "location-always" | "media-library" | "motion" | "reminders";
1024
- /** 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. */
1026
+ /** Target app bundle id (iOS) or package name (Android). */
1025
1027
  bundleId: string;
1026
1028
  };
1027
1029
  shake: {
@@ -1049,11 +1051,11 @@ export interface ArgentToolArgs {
1049
1051
  bundleId: string;
1050
1052
  };
1051
1053
  "tv-remote": {
1052
- /** Target TV device id from `list-devices` (Apple TV, Android TV, or Vega). */
1054
+ /** TV device id from `list-devices` (Apple TV, Android TV, or Vega). */
1053
1055
  udid: string;
1054
- /** 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. */
1056
+ /** Single remote button or array path run in one call (e.g. ["up","right","select"]; prefer an array over repeated calls). */
1055
1057
  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">;
1056
- /** Repeat the whole `button` value this many times (default 1). Compact for long same-button runs, e.g. { button: "down", repeat: 12 }. */
1058
+ /** Repeat `button` N times (default 1, e.g. `{ button: "down", repeat: 12 }`). */
1057
1059
  repeat?: number;
1058
1060
  };
1059
1061
  "ui-tree": {
@@ -1065,21 +1067,21 @@ export interface ArgentToolArgs {
1065
1067
  target?: "auto" | "global" | "local" | "both";
1066
1068
  };
1067
1069
  "view-network-logs": {
1068
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
1070
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
1069
1071
  port?: number;
1070
- /** 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. */
1072
+ /** Device ID from `list-devices` (or `logicalDeviceId` if shared Metro capture used it); Mac app: Mac app id `macos-app-<bundle id>`. */
1071
1073
  device_id: string;
1072
- /** Zero-based page index. "latest" and null select the newest page. Each page contains up to 50 entries. */
1074
+ /** 0-based page index, or `"latest"`/null for newest (50 entries/page). */
1073
1075
  pageIndex?: number | "latest" | null;
1074
1076
  };
1075
1077
  "view-network-request-details": {
1076
- /** Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. */
1078
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
1077
1079
  port?: number;
1078
- /** 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. */
1080
+ /** Device ID for the log (or `logicalDeviceId` if JS capture used it); Mac app: Mac app id. */
1079
1081
  device_id: string;
1080
- /** Request ID from either network log or await-network-request. */
1082
+ /** Request ID from `view-network-logs`, `native-network-logs`, or `await-network-request`. */
1081
1083
  requestId: string;
1082
- /** Set false to omit the response body. The request body can still appear. */
1084
+ /** Include response body (default true). */
1083
1085
  includeBody?: boolean;
1084
1086
  };
1085
1087
  /** @deprecated Renamed to `e2e-add-echo`. */