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

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": {
@@ -570,21 +570,21 @@ export interface ArgentToolArgs {
570
570
  udid: string;
571
571
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
572
572
  bundleId: string;
573
- /** UIView class name to match (exact, e.g. UIButton) */
573
+ /** Exact UIView class name (e.g. UIButton). */
574
574
  className?: string;
575
- /** Accessibility identifier to match (exact) */
575
+ /** Exact accessibility identifier. */
576
576
  identifier?: string;
577
- /** Accessibility label to match (exact) */
577
+ /** Exact accessibility label. */
578
578
  label?: string;
579
- /** UIView tag integer to match */
579
+ /** UIView integer tag. */
580
580
  tag?: number;
581
- /** React Native nativeID prop to match (exact) */
581
+ /** Exact React Native nativeID. */
582
582
  nativeID?: string;
583
- /** Include ancestor chain for each matched view (default true) */
583
+ /** Include ancestor chain (default true). */
584
584
  includeAncestors?: boolean;
585
- /** Include child views for each matched view (default true) */
585
+ /** Include child views (default true). */
586
586
  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 */
587
+ /** 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
588
  fields?: Array<string>;
589
589
  };
590
590
  "native-full-hierarchy": {
@@ -592,25 +592,25 @@ export interface ArgentToolArgs {
592
592
  udid: string;
593
593
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
594
594
  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 */
595
+ /** 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
596
  fields?: Array<string>;
597
- /** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes) */
597
+ /** Exact UIView classes to prune (e.g. ["UIImageView"]). */
598
598
  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. */
599
+ /** Class prefixes to prune (e.g. ["_TtGC7SwiftUI"] for SwiftUI; avoid broad "_UI"). */
600
600
  skipClassPrefixes?: Array<string>;
601
- /** Maximum recursion depth (default 8). Raise it to reach deeper views. */
601
+ /** Max recursion depth (default 8). */
602
602
  maxDepth?: number;
603
603
  };
604
604
  "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>) */
605
+ /** Device ID from `list-devices`: iOS simulator UDID, Android serial, or Mac app id (`macos-app-<bundle id>`). */
606
606
  udid: string;
607
- /** App bundle ID on iOS or package name on Android. On macOS, omit the macos-app- prefix. */
607
+ /** Bundle ID (iOS) or package name (Android); on macOS, omit `macos-app-`. */
608
608
  bundleId: string;
609
- /** Exclude requests to this Metro port on local addresses. Omit it to use the device's Metro port (usually 8081). */
609
+ /** Metro port to exclude from logs (omit for device default, usually 8081). */
610
610
  port?: number;
611
- /** Take the newest matching requests and return them oldest first. Use 0 for capture status and totals without entries. */
611
+ /** Newest requests to return oldest-first (default 50; 0 = status/totals only). */
612
612
  limit?: number;
613
- /** Hide existing history from later lists. Cleared request IDs still work in view-network-request-details. */
613
+ /** Hide current history from later lists (IDs still work in `view-network-request-details`). */
614
614
  clear?: boolean;
615
615
  };
616
616
  "native-profiler-analyze": {
@@ -618,25 +618,25 @@ export interface ArgentToolArgs {
618
618
  device_id: string;
619
619
  };
620
620
  "native-profiler-launch-analysis": {
621
- /** measure: time five launches with XCTest. profile: record one Instruments App Launch trace. */
621
+ /** `measure`: 5 XCTest timed launches. `profile`: 1 Instruments App Launch trace. */
622
622
  mode: "measure" | "profile";
623
- /** Bundle ID of the Release build already installed on the device. The tool does not build or install the app. */
623
+ /** Installed Release build bundle ID (not built or installed by this tool). */
624
624
  bundle_id: string;
625
- /** Connected iPhone UDID; required for a physical-device run. With allow_simulator, a booted simulator UDID also works. */
625
+ /** iPhone UDID (or booted simulator UDID with `allow_simulator: true`). */
626
626
  device_id?: string;
627
- /** Explicitly allow a booted simulator when no iPhone is selected. */
627
+ /** Allow booted simulator when no iPhone is selected. */
628
628
  allow_simulator?: boolean;
629
- /** profile mode only: App Launch trace recording length in seconds (default 8). Rejected in measure mode. */
629
+ /** `profile` mode only: trace duration in s (default 8). */
630
630
  duration_seconds?: number;
631
631
  };
632
632
  "native-profiler-start": {
633
633
  /** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
634
634
  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. */
635
+ /** iOS executable/name or Android package (auto-detects foreground app if omitted); omit for Mac apps. */
636
636
  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). */
637
+ /** iOS/Mac app Instruments `.tracetemplate` path or built-in name (e.g. "Time Profiler"; default: bundled template). */
638
638
  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. */
639
+ /** iOS/Mac apps only: restart app with allocation stacks from launch (adds overhead; leave off for CPU/hang timing). */
640
640
  malloc_stack_logging?: boolean;
641
641
  };
642
642
  "native-profiler-stop": {
@@ -648,21 +648,21 @@ export interface ArgentToolArgs {
648
648
  udid: string;
649
649
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
650
650
  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. */
651
+ /** Raw X in upright UI points (Mac app: from describe area top-left). Not normalized [0,1]. */
652
652
  x: number;
653
- /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
653
+ /** Raw Y in upright UI points. Not normalized [0,1]. */
654
654
  y: number;
655
- /** Include ancestor chain for the matched view (default true) */
655
+ /** Include ancestor chain (default true). */
656
656
  includeAncestors?: boolean;
657
- /** Include child views for the matched view (default false) */
657
+ /** Include child views (default false). */
658
658
  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 */
659
+ /** 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
660
  fields?: Array<string>;
661
- /** Exact UIView class names whose entire subtree should be pruned */
661
+ /** Exact UIView class names to prune. */
662
662
  skipClasses?: Array<string>;
663
- /** Class name prefixes to prune entire subtrees */
663
+ /** Class name prefixes to prune. */
664
664
  skipClassPrefixes?: Array<string>;
665
- /** Maximum depth for returned child/ancestor serialization (default 150) */
665
+ /** Max serialization depth (default 150). */
666
666
  maxDepth?: number;
667
667
  };
668
668
  "native-view-at-point": {
@@ -670,157 +670,157 @@ export interface ArgentToolArgs {
670
670
  udid: string;
671
671
  /** Bundle ID of the app (on a Mac app, the bundle id in the device id) */
672
672
  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. */
673
+ /** Raw X in upright UI points (Mac app: from describe area top-left). Not normalized [0,1]. */
674
674
  x: number;
675
- /** Raw Y coordinate in points, on the same axes as x. NOT normalized [0,1] tap space. */
675
+ /** Raw Y in upright UI points. Not normalized [0,1]. */
676
676
  y: number;
677
- /** Include ancestor chain for the matched view (default true) */
677
+ /** Include ancestor chain (default true). */
678
678
  includeAncestors?: boolean;
679
- /** Include child views for the matched view (default false) */
679
+ /** Include child views (default false). */
680
680
  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 */
681
+ /** 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
682
  fields?: Array<string>;
683
- /** Exact UIView class names whose entire subtree should be pruned */
683
+ /** Exact UIView class names to prune. */
684
684
  skipClasses?: Array<string>;
685
- /** Class name prefixes to prune entire subtrees */
685
+ /** Class name prefixes to prune. */
686
686
  skipClassPrefixes?: Array<string>;
687
- /** Maximum depth for returned child/ancestor serialization (default 150) */
687
+ /** Max serialization depth (default 150). */
688
688
  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. */
689
+ /** true: touch-receiving view (UIKit hit-test). false (default): deepest visible view. */
690
690
  hitTest?: boolean;
691
691
  };
692
692
  "network-capture-start": {
693
- /** Device ID from list-devices. For Mac builds started outside Argent, use macos-app-<bundle id>. */
693
+ /** Device ID from `list-devices` (external Mac builds: `macos-app-<bundle id>`). */
694
694
  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. */
695
+ /** Bundle ID (iOS) / package (Android) / Mac bundle ID / placeholder on Chromium (e.g. `argent.capture`). */
696
696
  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. */
697
+ /** Metro port for JS capture and native filtering (omit for device default, usually 8081; ignored on Chromium). */
698
698
  port?: number;
699
- /** Omit to control both layers. Selecting one leaves the other alone. Chromium ignores this setting. */
699
+ /** Control one layer only (default: both; ignored on Chromium). */
700
700
  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. */
701
+ /** Shared-Metro logical ID for iOS/Android if requested (reuse for start/stop/JS reads); omit on Mac apps. */
702
702
  logicalDeviceId?: string;
703
703
  };
704
704
  "network-capture-stop": {
705
- /** Device ID from list-devices. For Mac builds started outside Argent, use macos-app-<bundle id>. */
705
+ /** Device ID from `list-devices` (external Mac builds: `macos-app-<bundle id>`). */
706
706
  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. */
707
+ /** Bundle ID (iOS) / package (Android) / Mac bundle ID / placeholder on Chromium (e.g. `argent.capture`). */
708
708
  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. */
709
+ /** Metro port for JS capture and native filtering (omit for device default, usually 8081; ignored on Chromium). */
710
710
  port?: number;
711
- /** Omit to control both layers. Selecting one leaves the other alone. Chromium ignores this setting. */
711
+ /** Control one layer only (default: both; ignored on Chromium). */
712
712
  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. */
713
+ /** Shared-Metro logical ID for iOS/Android if requested (reuse for start/stop/JS reads); omit on Mac apps. */
714
714
  logicalDeviceId?: string;
715
715
  };
716
716
  "network-conditions": {
717
- /** Device ID from list-devices. */
717
+ /** Device ID from `list-devices`. */
718
718
  udid: string;
719
- /** Bundle ID of the app to shape. Required on iOS and ignored elsewhere. */
719
+ /** App bundle ID (required on iOS; ignored elsewhere). */
720
720
  bundleId?: string;
721
- /** Metro port to exempt from shaping on iOS and Android. Omit for the device's port (usually 8081). */
721
+ /** Metro port exempt from shaping (omit for device default, usually 8081). */
722
722
  port?: number;
723
- /** Delay in milliseconds. Android adds it per round trip. iOS and Chromium use it as a minimum response delay. */
723
+ /** Added latency in ms. */
724
724
  latencyMs?: number;
725
- /** Download limit in kilobits per second. */
725
+ /** Download cap in kbps. */
726
726
  downloadKbps?: number;
727
- /** Upload limit in kilobits per second. */
727
+ /** Upload cap in kbps. */
728
728
  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. */
729
+ /** Simulate offline (on Android, `adb reverse` ports stay reachable while Metro at `10.0.2.2` does not; `false` alone resets conditions). */
730
730
  offline?: boolean;
731
731
  };
732
732
  "open-url": {
733
- /** Target device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
733
+ /** Device id from `list-devices` (iOS UDID, Android serial, HarmonyOS id, or Chromium id). */
734
734
  udid: string;
735
- /** URL or scheme to open (e.g. https://example.com, messages://, tel:555, geo:37.0,-122.0). */
735
+ /** URL or custom scheme (e.g. https://example.com, myapp://path). */
736
736
  url: string;
737
- /** Physical iOS only: the app that receives the URL. Defaults to Safari for http(s); required for any other scheme. */
737
+ /** Physical iOS only: receiving app (defaults to Safari for http/https; required otherwise). */
738
738
  bundleId?: string;
739
739
  };
740
740
  paste: {
741
- /** Target device id from `list-devices` (iOS simulator UDID or Android emulator serial, or Mac app id). */
741
+ /** Device id from `list-devices` (iOS simulator UDID, Android emulator serial, or Mac app id). */
742
742
  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. */
743
+ /** Text to paste. Supports `{{secret:<NAME>}}` placeholders resolved server-side (never ask the user for plaintext). */
744
744
  text: string;
745
745
  };
746
746
  "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. */
747
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
748
748
  port?: number;
749
749
  /** Device ID from list-devices used for the native profile (iOS simulator UDID, Android serial, or Mac app ID). */
750
750
  device_id: string;
751
751
  };
752
752
  "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. */
753
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
754
754
  port?: number;
755
755
  /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
756
756
  device_id: string;
757
- /** Query mode; see Modes in the tool description. */
757
+ /** Query mode. */
758
758
  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 */
759
+ /** Component name (optional filter for `render_counts`). */
760
760
  component_name?: string;
761
- /** Time range in ms since profiling started, the clock this tool prints */
761
+ /** Range in ms since profiling started. */
762
762
  time_range_ms?: {
763
- /** Start of range in ms */
763
+ /** Start ms. */
764
764
  start: number;
765
- /** End of range in ms */
765
+ /** End ms. */
766
766
  end: number;
767
767
  };
768
- /** Commit index */
768
+ /** Commit index. */
769
769
  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. */
770
+ /** Max results (default 20; unlimited for `by_index`). */
771
771
  top_n?: number;
772
772
  };
773
773
  "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. */
774
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
775
775
  port?: number;
776
776
  /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
777
777
  device_id: string;
778
- /** Query mode; see Modes in the tool description. */
778
+ /** Query mode. */
779
779
  mode: "top_functions" | "time_window" | "call_tree" | "component_cpu";
780
- /** Time window in ms since profiling started, the same clock profiler-commit-query prints */
780
+ /** Window in ms since profiling started (same clock as `profiler-commit-query`). */
781
781
  time_window_ms?: {
782
- /** Start of window in ms */
782
+ /** Start ms. */
783
783
  start: number;
784
- /** End of window in ms */
784
+ /** End ms. */
785
785
  end: number;
786
786
  };
787
- /** Component name */
787
+ /** Component name. */
788
788
  component_name?: string;
789
- /** Function name */
789
+ /** Function name. */
790
790
  function_name?: string;
791
- /** Number of results to return */
791
+ /** Max rows (default 15). */
792
792
  top_n?: number;
793
- /** Also show callers of the function */
793
+ /** Include callers (`call_tree`). */
794
794
  include_callers?: boolean;
795
- /** top_functions and time_window: list only React component functions (PascalCase names) */
795
+ /** Only PascalCase React components. */
796
796
  react_only?: boolean;
797
797
  };
798
798
  "profiler-load": {
799
- /** What to do; see Modes in the tool description. */
799
+ /** `list`, `load_react`, or `load_native`. */
800
800
  mode: "list" | "load_react" | "load_native";
801
- /** Timestamp-based session identifier (e.g. '20250313-143022') from the list output. */
801
+ /** Session ID from `list` (required for `load_*`). */
802
802
  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. */
803
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
804
804
  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. */
805
+ /** Device id from `list-devices` to bind the loaded session to. */
806
806
  device_id: string;
807
- /** Android package name to pass when restoring an older load_native .pftrace session that has no metadata sidecar. */
807
+ /** Android package name for legacy `.pftrace` sessions without metadata. */
808
808
  app_process?: string;
809
809
  };
810
810
  "profiler-stack-query": {
811
811
  /** Target device id from `list-devices` (iOS UDID, Mac app id or Android serial). */
812
812
  device_id: string;
813
- /** Query mode; see Modes in the tool description. */
813
+ /** Query mode. */
814
814
  mode: "hang_stacks" | "function_callers" | "thread_breakdown" | "leak_stacks";
815
- /** 0-based index into the hang list */
815
+ /** 0-based hang index. */
816
816
  hang_index?: number | null;
817
- /** Native function name */
817
+ /** Native function name. */
818
818
  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. */
819
+ /** Thread filter (substring for `thread_breakdown`; exact raw name or `"main"` for `function_callers`). */
820
820
  thread?: string;
821
- /** Object type filter */
821
+ /** Object type filter (`leak_stacks`). */
822
822
  object_type?: string;
823
- /** Max results to return */
823
+ /** Max results (default 15). */
824
824
  top_n?: number;
825
825
  };
826
826
  propose_variant: {
@@ -857,21 +857,21 @@ export interface ArgentToolArgs {
857
857
  };
858
858
  };
859
859
  "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. */
860
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
861
861
  port?: number;
862
- /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
862
+ /** Device ID from list-devices used for the profile (Mac app: its list-devices ID). */
863
863
  device_id: string;
864
- /** Absolute path to the RN project root for session context detection */
864
+ /** Absolute path to the RN project root. */
865
865
  project_root: string;
866
- /** Platform for source lookup when the recording does not identify one. */
866
+ /** Fallback platform for source lookup if absent from recording. */
867
867
  platform?: "ios" | "android" | "macos";
868
- /** React Native version (e.g. "0.73.4") */
868
+ /** RN version (e.g. "0.73.4"). */
869
869
  rn_version?: string;
870
- /** User actions to annotate the report's commits with: each commit shows the action that preceded it. */
870
+ /** User actions to annotate report commits. */
871
871
  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. */
872
+ /** Ms since profiling started (`tapTimestampMs - startedAtEpochMs`). */
873
873
  offsetMs: number;
874
- /** Description of the action performed */
874
+ /** Action label. */
875
875
  label: string;
876
876
  }>;
877
877
  };
@@ -882,7 +882,7 @@ export interface ArgentToolArgs {
882
882
  project_root: string;
883
883
  };
884
884
  "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. */
885
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
886
886
  port?: number;
887
887
  /** Device ID used to record or load the React profile. For a Mac app, use its ID from list-devices. */
888
888
  device_id: string;
@@ -892,7 +892,7 @@ export interface ArgentToolArgs {
892
892
  react_only?: boolean;
893
893
  };
894
894
  "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. */
895
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
896
896
  port?: number;
897
897
  /** 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
898
  device_id: string;
@@ -902,7 +902,7 @@ export interface ArgentToolArgs {
902
902
  filter?: string;
903
903
  };
904
904
  "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. */
905
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
906
906
  port?: number;
907
907
  /** 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
908
  device_id: string;
@@ -910,33 +910,33 @@ export interface ArgentToolArgs {
910
910
  top_n?: number;
911
911
  };
912
912
  "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. */
913
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
914
914
  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. */
915
+ /** Device ID from list-devices, including a Mac app ID (or `logicalDeviceId` on shared Metro if requested). */
916
916
  device_id: string;
917
- /** CPU sampling interval in microseconds */
917
+ /** CPU sampling interval in microseconds. */
918
918
  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. */
919
+ /** Take over another active fresh session (ask user approval first). */
920
920
  force?: boolean;
921
921
  };
922
922
  "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. */
923
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
924
924
  port?: number;
925
925
  /** 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
926
  device_id: string;
927
927
  };
928
928
  "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. */
929
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
930
930
  port?: number;
931
931
  /** Device ID passed to react-profiler-start. For a Mac app, use its ID from list-devices. */
932
932
  device_id: string;
933
933
  };
934
934
  "reinstall-app": {
935
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
935
+ /** Device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial). */
936
936
  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`). */
937
+ /** Bundle id (iOS), package name (Android), component id (Vega), or bundleName (HarmonyOS). */
938
938
  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. */
939
+ /** Path to `.app` (iOS), `.apk` (Android), `.vpkg` (Vega), or `.hap` (HarmonyOS). */
940
940
  appPath: string;
941
941
  };
942
942
  "restart-app": {
@@ -973,13 +973,13 @@ export interface ArgentToolArgs {
973
973
  settle?: boolean;
974
974
  };
975
975
  "screen-recording-start": {
976
- /** Target ID from `list-devices`. For a Mac app, use its device ID, such as `macos-app-com.example.notes`. */
976
+ /** Target ID from `list-devices` (Mac app: `macos-app-<bundle id>`). */
977
977
  udid: string;
978
- /** Auto-stop cap in seconds (default 180). Set it to slightly more than the interaction you plan to capture. */
978
+ /** Auto-stop cap in seconds (default 180). */
979
979
  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. */
980
+ /** Collapse idle unchanged stretches after 1s (default true; false = real-time). */
981
981
  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. */
982
+ /** Draw touch markers (default true; unsupported on physical iPhones). Mac apps: shows pointer, click ring, and hold dot. */
983
983
  showTouches?: boolean;
984
984
  };
985
985
  "screen-recording-stop": {
@@ -999,29 +999,29 @@ export interface ArgentToolArgs {
999
999
  downscaler?: "lanczos3" | "box" | "bilinear" | "nearest";
1000
1000
  };
1001
1001
  "screenshot-diff": {
1002
- /** Path to the saved baseline PNG file. Required unless captureBaseline is true; do not pass both. */
1002
+ /** Saved baseline PNG path (omit when `captureBaseline: true`). */
1003
1003
  baselinePath?: string;
1004
- /** Path to the saved current PNG file. Required unless captureCurrent is true; do not pass both. */
1004
+ /** Saved current PNG path (omit when `captureCurrent: true`). */
1005
1005
  currentPath?: string;
1006
- /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial, or a Mac app id). */
1006
+ /** Target device id from `list-devices` (iOS UDID, HarmonyOS id, or Android serial, or Mac app id). */
1007
1007
  udid: string;
1008
- /** Capture the baseline screenshot live from the device, at full resolution, before diffing. Cannot be combined with captureCurrent. */
1008
+ /** Capture baseline live from the device, at full resolution (mutually exclusive with `captureCurrent`). */
1009
1009
  captureBaseline?: boolean;
1010
- /** Capture the current screenshot live from the device, at full resolution, before diffing. Cannot be combined with captureBaseline. */
1010
+ /** Capture current live from the device, at full resolution (mutually exclusive with `captureBaseline`). */
1011
1011
  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. */
1012
+ /** Orientation override for live captures. Rejected on HarmonyOS. Ignored on physical iPhones. */
1013
1013
  rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
1014
- /** Directory where diff artifacts should be written (default: a temp directory). */
1014
+ /** Output directory for diff artifacts (default: temp dir). */
1015
1015
  outputDir?: string;
1016
1016
  };
1017
1017
  "settings-permissions": {
1018
- /** Target device id from `list-devices` (iOS simulator UDID or Android serial). */
1018
+ /** Device id from `list-devices` (iOS simulator UDID or Android serial). */
1019
1019
  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. */
1020
+ /** `grant` (pre-authorize), `deny`, or `reset` (re-prompt on next use). */
1021
1021
  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. */
1022
+ /** Permission name (`notifications` = Android-only; `reminders` = iOS-only). */
1023
1023
  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. */
1024
+ /** Target app bundle id (iOS) or package name (Android). */
1025
1025
  bundleId: string;
1026
1026
  };
1027
1027
  shake: {
@@ -1049,11 +1049,11 @@ export interface ArgentToolArgs {
1049
1049
  bundleId: string;
1050
1050
  };
1051
1051
  "tv-remote": {
1052
- /** Target TV device id from `list-devices` (Apple TV, Android TV, or Vega). */
1052
+ /** TV device id from `list-devices` (Apple TV, Android TV, or Vega). */
1053
1053
  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. */
1054
+ /** Single remote button or array path run in one call (e.g. ["up","right","select"]; prefer an array over repeated calls). */
1055
1055
  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 }. */
1056
+ /** Repeat `button` N times (default 1, e.g. `{ button: "down", repeat: 12 }`). */
1057
1057
  repeat?: number;
1058
1058
  };
1059
1059
  "ui-tree": {
@@ -1065,21 +1065,21 @@ export interface ArgentToolArgs {
1065
1065
  target?: "auto" | "global" | "local" | "both";
1066
1066
  };
1067
1067
  "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. */
1068
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
1069
1069
  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. */
1070
+ /** Device ID from `list-devices` (or `logicalDeviceId` if shared Metro capture used it); Mac app: Mac app id `macos-app-<bundle id>`. */
1071
1071
  device_id: string;
1072
- /** Zero-based page index. "latest" and null select the newest page. Each page contains up to 50 entries. */
1072
+ /** 0-based page index, or `"latest"`/null for newest (50 entries/page). */
1073
1073
  pageIndex?: number | "latest" | null;
1074
1074
  };
1075
1075
  "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. */
1076
+ /** Metro port (omit to use this device's port, default 8081; ignored on Chromium). */
1077
1077
  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. */
1078
+ /** Device ID for the log (or `logicalDeviceId` if JS capture used it); Mac app: Mac app id. */
1079
1079
  device_id: string;
1080
- /** Request ID from either network log or await-network-request. */
1080
+ /** Request ID from `view-network-logs`, `native-network-logs`, or `await-network-request`. */
1081
1081
  requestId: string;
1082
- /** Set false to omit the response body. The request body can still appear. */
1082
+ /** Include response body (default true). */
1083
1083
  includeBody?: boolean;
1084
1084
  };
1085
1085
  /** @deprecated Renamed to `e2e-add-echo`. */