@swmansion/argent 0.28.1-next.8 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/agents/argent-environment-inspector.md +7 -7
  2. package/agents/references/quality-control-checklist.md +14 -14
  3. package/assets/manifest.json +2 -2
  4. package/bin/argent-android-devtools-0.3.0.apk +0 -0
  5. package/bin/darwin/ax-service +0 -0
  6. package/bin/darwin/simulator-server +0 -0
  7. package/bin/darwin/tvos-ax-service +0 -0
  8. package/bin/darwin/tvos-hid-daemon +0 -0
  9. package/bin/linux/simulator-server +0 -0
  10. package/bin/linux-arm64/simulator-server +0 -0
  11. package/bin/tcp/ax-service +0 -0
  12. package/bin/win32/simulator-server.exe +0 -0
  13. package/dist/cli-cmds.mjs +4 -1
  14. package/dist/client.d.ts +18 -0
  15. package/dist/client.js +3 -0
  16. package/dist/installer.mjs +9 -2
  17. package/dist/mcp-server.mjs +13 -1
  18. package/dist/tool-args.generated.d.ts +87 -77
  19. package/dist/tool-server.cjs +948 -370
  20. package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
  21. package/dylibs/libKeyboardPatch.dylib +0 -0
  22. package/dylibs/libNativeDevtoolsIos.dylib +0 -0
  23. package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
  24. package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
  25. package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
  26. package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
  27. package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
  28. package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
  29. package/package.json +1 -1
  30. package/rules/argent.md +16 -16
  31. package/skills/argent-android-emulator-setup/SKILL.md +9 -9
  32. package/skills/argent-create-flow/references/flow-yaml.md +11 -11
  33. package/skills/argent-create-flow/references/live-authoring.md +11 -11
  34. package/skills/argent-create-flow/references/reliability-and-recovery.md +13 -13
  35. package/skills/argent-device-interact/SKILL.md +47 -47
  36. package/skills/argent-device-interact/references/chromium.md +1 -1
  37. package/skills/argent-device-interact/references/gesture-examples.md +7 -7
  38. package/skills/argent-device-interact/references/secrets.md +6 -6
  39. package/skills/argent-lens/SKILL.md +21 -21
  40. package/skills/argent-metro-debugger/SKILL.md +24 -24
  41. package/skills/argent-metro-debugger/references/failure-scenarios.md +11 -11
  42. package/skills/argent-metro-debugger/references/source-maps.md +4 -4
  43. package/skills/argent-native-profiler/SKILL.md +13 -13
  44. package/skills/argent-qa-flows/SKILL.md +3 -3
  45. package/skills/argent-react-native-app-workflow/SKILL.md +18 -18
  46. package/skills/argent-react-native-optimization/SKILL.md +12 -12
  47. package/skills/argent-react-native-optimization/references/fix-reference.md +10 -10
  48. package/skills/argent-react-native-optimization/references/lint-rules.md +1 -1
  49. package/skills/argent-react-native-profiler/SKILL.md +25 -25
  50. package/skills/argent-react-native-profiler/references/diagnostic-tools.md +19 -19
  51. package/skills/argent-screen-recording/SKILL.md +14 -14
  52. package/skills/argent-test-ui-flow/SKILL.md +9 -9
  53. package/skills/argent-tv-interact/SKILL.md +19 -19
  54. package/bin/argent-android-devtools-0.2.0.apk +0 -0
@@ -12,7 +12,7 @@ export interface ArgentToolArgs {
12
12
  "await-ui-element": {
13
13
  /** Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id). */
14
14
  udid: string;
15
- /** What to wait for. `exists`: selector is anywhere in the tree. `visible`: selector is present with a non-zero on-screen frame. `hidden`: selector is absent or zero-area. `text`: the first visible match in reading order (topmost), falling back to the first match overall if none is visible, contains (or, with textMatch `equals`, exactly matches) expectedText — if a loose selector hits several elements, only that one is checked, so narrow it to target the intended element. */
15
+ /** What to wait for. `exists`: selector is anywhere in the tree. `visible`: selector is present with a non-zero on-screen frame. `hidden`: selector is absent or zero-area. `text`: the first visible match in reading order (topmost), falling back to the first match overall if none is visible, contains (or, with textMatch `equals`, exactly matches) expectedText. If a loose selector hits several elements, only that one is checked, so narrow it to target the intended element. */
16
16
  condition: "exists" | "visible" | "hidden" | "text";
17
17
  /** Element to match (text / identifier / role). */
18
18
  selector: {
@@ -23,7 +23,7 @@ export interface ArgentToolArgs {
23
23
  /** Case-insensitive substring of the element's role (e.g. AXButton, button, TextView). */
24
24
  role?: string;
25
25
  };
26
- /** For condition `text`: the string the first visible matched element (topmost in reading order; the first match overall if none is visible) must contain (default) or equal — see `textMatch`. Case-insensitive. */
26
+ /** For condition `text`: the string the first visible matched element (topmost in reading order; the first match overall if none is visible) must contain (default) or equal (see `textMatch`). Case-insensitive. */
27
27
  expectedText?: string;
28
28
  /** For condition `text`: how expectedText is compared. `contains` (default) is a case-insensitive substring; `equals` is a case-insensitive full-string match. */
29
29
  textMatch?: "contains" | "equals";
@@ -35,7 +35,7 @@ export interface ArgentToolArgs {
35
35
  pollIntervalMs?: number;
36
36
  };
37
37
  await_user_selection: {
38
- /** Max seconds to block this call before returning a re-awaitable { status: 'pending' } result (default 1800). The user's proposals stay live across timeouts — on 'pending' just call await_user_selection again. Lower this if your MCP client enforces a short request timeout. */
38
+ /** Max seconds to block this call before returning a re-awaitable { status: 'pending' } result (default 1800). The user's proposals stay live across timeouts; on 'pending' just call await_user_selection again. Lower this if your MCP client enforces a short request timeout. */
39
39
  timeoutSeconds?: number;
40
40
  };
41
41
  "boot-device": {
@@ -43,13 +43,13 @@ export interface ArgentToolArgs {
43
43
  udid?: string;
44
44
  /** Android: AVD name to launch a new emulator from (from `list-devices` → `avds[].name`). Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`. */
45
45
  avdName?: string;
46
- /** Vega (Fire TV): VVD image to boot — the `vvdImage` of a Vega device from `list-devices` (e.g. `tv`). Starts the single SDK-managed Vega Virtual Device. Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`. */
46
+ /** Vega (Fire TV): VVD image to boot: the `vvdImage` of a Vega device from `list-devices` (e.g. `tv`). Starts the single SDK-managed Vega Virtual Device. Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`. */
47
47
  vvdImage?: string;
48
48
  /** Android/Vega: overall budget for the boot sequence. Default 480000 (8 min) on Android, 120000 (2 min) on Vega. Clamped to [30s, 15min]. Ignored on iOS. */
49
49
  bootTimeoutMs?: number;
50
50
  /** Shut down and re-boot the device even if already running. */
51
51
  force?: boolean;
52
- /** Android only: boot the emulator with audio output enabled. Defaults to false — argent boots emulators MUTED so several agent-driven devices don't all play sound on the host machine; pass `true` when the task involves playing, hearing, or testing audio. Takes effect at boot: if the emulator is already running muted, add `force: true` to reboot it with sound. A boot snapshot saved in the other audio mode can't be reused, so the first boot after toggling is a slower cold boot. The `boot-sound` argent flag flips this default to true. Ignored on iOS/Vega/Electron, which argent never mutes. */
52
+ /** Android only: boot the emulator with audio output enabled. Defaults to false: argent boots emulators MUTED so several agent-driven devices don't all play sound on the host machine; pass `true` when the task involves playing, hearing, or testing audio. Takes effect at boot: if the emulator is already running muted, add `force: true` to reboot it with sound. A boot snapshot saved in the other audio mode can't be reused, so the first boot after toggling is a slower cold boot. The `boot-sound` argent flag flips this default to true. Ignored on iOS/Vega/Electron, which argent never mutes. */
53
53
  sound?: boolean;
54
54
  /** iOS only: boot the simulator core WITHOUT opening its GUI window (Simulator.app, or Device Hub on Xcode 27+). The device still streams via simulator-server; used by Argent Lens. Set the `ARGENT_SIMULATOR_NO_WINDOW` env var (1/true/yes) to force this host-wide without passing the flag per call (the iOS analog of `ARGENT_EMULATOR_NO_WINDOW`). Ignored on Android/Vega/Electron, which have no equivalent GUI step. */
55
55
  headless?: boolean;
@@ -115,9 +115,9 @@ export interface ArgentToolArgs {
115
115
  label?: string;
116
116
  };
117
117
  "debugger-component-tree": {
118
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
118
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
119
119
  port?: number;
120
- /** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
120
+ /** Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
121
121
  device_id: string;
122
122
  /** iOS simulator UDID from list-devices. Pass it when device_id is a logicalDeviceId (two or more devices share one Metro), so that the tap coordinates of a landscape UI are on the screen's axes. Give the UDID of the simulator that shows the app. */
123
123
  udid?: string;
@@ -129,23 +129,23 @@ export interface ArgentToolArgs {
129
129
  includeSkipped?: boolean;
130
130
  };
131
131
  "debugger-connect": {
132
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
132
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
133
133
  port?: number;
134
- /** Device id from list-devices: iOS simulator UDID, Android serial, Vega serial (amazon-...), 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. */
134
+ /** Device id from list-devices: iOS simulator UDID, Android serial, Vega serial (amazon-...), 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. */
135
135
  device_id: string;
136
136
  };
137
137
  "debugger-evaluate": {
138
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
138
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
139
139
  port?: number;
140
- /** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id. */
140
+ /** Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id. */
141
141
  device_id: string;
142
142
  /** JavaScript expression to evaluate in the app runtime */
143
143
  expression: string;
144
144
  };
145
145
  "debugger-inspect-element": {
146
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
146
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
147
147
  port?: number;
148
- /** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
148
+ /** Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
149
149
  device_id: string;
150
150
  /** Logical X coordinate on device screen */
151
151
  x: number;
@@ -155,27 +155,27 @@ export interface ArgentToolArgs {
155
155
  contextLines?: number;
156
156
  /** 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 symbolication or source reading. */
157
157
  resolveSourceMaps?: boolean;
158
- /** Maximum number of hierarchy items to return, counted from the bottom (most specific component first). The hierarchy walks from the tapped element up to the root — the first items are the most relevant for editing. Increase to 70+ if you need to understand the broader navigation/screen structure. */
158
+ /** Maximum number of hierarchy items to return, counted from the bottom (most specific component first). The hierarchy walks from the tapped element up to the root, so the first items are the most relevant for editing. Increase to 70+ if you need to understand the broader navigation/screen structure. */
159
159
  maxItems?: number;
160
160
  /** When true, items that would normally be filtered are kept in the response with skipped=true and a skipReason. Useful for understanding what was pruned. */
161
161
  includeSkipped?: boolean;
162
162
  };
163
163
  "debugger-log-registry": {
164
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
164
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
165
165
  port?: number;
166
- /** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id. */
166
+ /** Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id. */
167
167
  device_id: string;
168
168
  };
169
169
  "debugger-reload-metro": {
170
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
170
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
171
171
  port?: number;
172
- /** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
172
+ /** Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
173
173
  device_id: string;
174
174
  };
175
175
  "debugger-status": {
176
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
176
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
177
177
  port?: number;
178
- /** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id. */
178
+ /** Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id. */
179
179
  device_id: string;
180
180
  };
181
181
  describe: {
@@ -188,10 +188,16 @@ export interface ArgentToolArgs {
188
188
  /** Number of hours to suppress the update notification */
189
189
  hours: number;
190
190
  };
191
+ fill: {
192
+ /** Target device id from `list-devices`. */
193
+ udid: string;
194
+ /** The text the focused field must hold afterwards; "" clears it. Supports `{{secret:<NAME>}}` placeholders like `keyboard`. */
195
+ text: string;
196
+ };
191
197
  "flow-add-echo": {
192
- /** Name of the flow being recorded — the one passed to flow-start-recording. */
198
+ /** Name of the flow being recorded: the one passed to flow-start-recording. */
193
199
  name: string;
194
- /** Absolute path to the project root of the flow being recorded — the same value passed to flow-start-recording. Together with `name` it identifies which recording this echo belongs to. */
200
+ /** Absolute path to the project root of the flow being recorded: the same value passed to flow-start-recording. Together with `name` it identifies which recording this echo belongs to. */
195
201
  project_root: string;
196
202
  /** Message to echo when the flow is replayed */
197
203
  message: string;
@@ -207,9 +213,9 @@ export interface ArgentToolArgs {
207
213
  timeout?: number;
208
214
  };
209
215
  "flow-add-step": {
210
- /** Name of the flow being recorded — the one passed to flow-start-recording. */
216
+ /** Name of the flow being recorded: the one passed to flow-start-recording. */
211
217
  name: string;
212
- /** Absolute path to the project root of the flow being recorded — the same value passed to flow-start-recording. Together with `name` it identifies which recording this step belongs to. */
218
+ /** Absolute path to the project root of the flow being recorded: the same value passed to flow-start-recording. Together with `name` it identifies which recording this step belongs to. */
213
219
  project_root: string;
214
220
  /** MCP tool to execute and record, for example "gesture-tap". Do not pass a flow directive or a recording tool. Call flow-add-script directly for a requested script step. */
215
221
  command: string;
@@ -221,15 +227,15 @@ export interface ArgentToolArgs {
221
227
  "flow-execute": {
222
228
  /** Name of a saved flow to run from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set. */
223
229
  name?: string;
224
- /** Absolute path to the calling agent's project root — the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the flow, its run: siblings, its script: paths and baselines all resolve beside the YAML instead, so pass the agent's cwd. A script still RUNS in this root whichever source was used. */
230
+ /** Absolute path to the calling agent's project root: the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the flow, its run: siblings, its script: paths and baselines all resolve beside the YAML instead, so pass the agent's cwd. A script still RUNS in this root whichever source was used. */
225
231
  project_root: string;
226
- /** Path to the flow .yaml as readable by the tool-server. Internal — the argent client derives it from project_root and name automatically; leave unset. */
232
+ /** Path to the flow .yaml as readable by the tool-server. Internal: the argent client derives it from project_root and name automatically; leave unset. */
227
233
  flow_file?: string;
228
234
  /** Omit when name is set. Absolute path to a flow .yaml on the client. Over a link (argent link or ARGENT_TOOLS_URL), the argent client uploads the file, its run: fragments and the snapshot baselines of each run, and the tool-server runs those copies. Keep run: fragments under project_root or beside the flow file. With updateBaselines, the client writes the new baselines when the run ends. The client also uploads each absolute .png or .yaml path that a tool: step takes as a file argument, when the file is under project_root or beside the flow file. A tool: flow-execute step that names a flow with name and an absolute project_root without a .. segment runs: the client also uploads that flow and its own files. Over a link, the uploaded flows must not have: script: steps; tool: steps that run a flow another way or record a flow; tool: steps that take a directory, an app or an output directory; tool: steps whose tool builds a file path from several arguments; tool: steps that name a relative path or a file other than .png or .yaml. Without a link, the tool-server reads the files in place and all step kinds run. */
229
235
  flow_path?: string;
230
- /** Device id to run against (iOS UDID, Android/Vega serial, Chromium id) — the id list-devices reports. Auto-detected when omitted, but only when exactly one booted device matches (optionally narrowed by `platform`); with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up. */
236
+ /** Device id to run against (iOS UDID, Android/Vega serial, Chromium id), as list-devices reports it. Auto-detected when omitted, but only when exactly one booted device matches (optionally narrowed by `platform`); with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up. */
231
237
  device?: string;
232
- /** Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only — pass `ios-remote` to select a remote one. `chromium` does more than filter: with no `device` it SELECTS the self-boot branch for an e2e flow - the runner boots an Electron instance from the `launch` step's chromium value and tears it down after the run (a single-key `launch: { chromium: … }` map selects it on its own, without this parameter). When it selects that branch it never falls back to device auto-detection (a fragment, or an e2e launch map with no `chromium` key, still does), and the launch value must be a real Electron app path on the tool-server host: a bare-string `launch:` - what the recorder writes - holds an installed-app bundle id, so passing `chromium` for one fails the whole run with `Electron boot: path does not exist`. Edit the launch to `{ chromium: <app path> }` first. */
238
+ /** Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only; pass `ios-remote` to select a remote one. `chromium` does more than filter: with no `device` it SELECTS the self-boot branch for an e2e flow - the runner boots an Electron instance from the `launch` step's chromium value and tears it down after the run (a single-key `launch: { chromium: … }` map selects it on its own, without this parameter). When it selects that branch it never falls back to device auto-detection (a fragment, or an e2e launch map with no `chromium` key, still does), and the launch value must be a real Electron app path on the tool-server host: a bare-string `launch:` - what the recorder writes - holds an installed-app bundle id, so passing `chromium` for one fails the whole run with `Electron boot: path does not exist`. Edit the launch to `{ chromium: <app path> }` first. */
233
239
  platform?: "ios" | "android" | "chromium" | "vega" | "ios-remote";
234
240
  /** Write/refresh screenshot baselines for `snapshot` steps instead of diffing against them, also in the flows that tool: flow-execute steps run, unless such a step sets updateBaselines itself. */
235
241
  updateBaselines?: boolean;
@@ -237,27 +243,27 @@ export interface ArgentToolArgs {
237
243
  prerequisiteAcknowledged?: boolean;
238
244
  };
239
245
  "flow-finish-recording": {
240
- /** Name of the flow being recorded — the one passed to flow-start-recording. */
246
+ /** Name of the flow being recorded: the one passed to flow-start-recording. */
241
247
  name: string;
242
- /** Absolute path to the project root of the flow being recorded — the same value passed to flow-start-recording. Together with `name` it identifies which recording to finish. */
248
+ /** Absolute path to the project root of the flow being recorded: the same value passed to flow-start-recording. Together with `name` it identifies which recording to finish. */
243
249
  project_root: string;
244
250
  };
245
251
  "flow-read-prerequisite": {
246
252
  /** Name of a saved flow to inspect from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set. */
247
253
  name?: string;
248
- /** Absolute path to the calling agent's project root — the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the prerequisite is read from that YAML instead, so pass the agent's cwd. */
254
+ /** Absolute path to the calling agent's project root: the cwd it is working in. With name, the saved flow is read from `.argent/flows/<name>.yaml` under this root; with flow_path, the prerequisite is read from that YAML instead, so pass the agent's cwd. */
249
255
  project_root: string;
250
- /** Path to the flow .yaml as readable by the tool-server. Internal — the argent client derives it from project_root and name automatically; leave unset. */
256
+ /** Path to the flow .yaml as readable by the tool-server. Internal: the argent client derives it from project_root and name automatically; leave unset. */
251
257
  flow_file?: string;
252
258
  /** Omit when name is set. Absolute path to a flow .yaml on the client. Over a link (argent link or ARGENT_TOOLS_URL), the argent client uploads the file and the tool-server reads the uploaded copy; without a link, the tool-server reads the file in place. Pass the path through the argent client; a raw path that the file-input boundary did not verify is rejected. Pass the same flow source here as to flow-execute, so the prerequisite you read belongs to the flow that will run. */
253
259
  flow_path?: string;
254
260
  };
255
261
  "flow-start-recording": {
256
- /** Name for this flow (e.g. "settings-explore") — letters, digits, underscore and hyphen only. */
262
+ /** Name for this flow (e.g. "settings-explore"): letters, digits, underscore and hyphen only. */
257
263
  name: string;
258
264
  /** Absolute path to the project root directory (the directory that contains or should contain `.argent/flows/`). The flow file is created at `<project_root>/.argent/flows/<name>.yaml`. */
259
265
  project_root: string;
260
- /** Fragments only: the app/device state assumed on entry (e.g. "Settings app open on General page"). For a self-contained e2e flow, omit this and record a `restart-app` as the first step instead — it is captured as the flow's `launch` step. restart-app has no chromium support, so a chromium flow records as a fragment; add the `launch: { chromium: <app path> }` line to the YAML afterward, deleting the executionPrerequisite line if you passed one — a flow that starts with a launch must not declare it. */
266
+ /** Fragments only: the app/device state assumed on entry (e.g. "Settings app open on General page"). For a self-contained e2e flow, omit this and record a `restart-app` as the first step instead; it is captured as the flow's `launch` step. restart-app has no chromium support, so a chromium flow records as a fragment; add the `launch: { chromium: <app path> }` line to the YAML afterward, deleting the executionPrerequisite line if you passed one, since a flow that starts with a launch must not declare it. */
261
267
  executionPrerequisite?: string;
262
268
  };
263
269
  fold: {
@@ -268,6 +274,10 @@ export interface ArgentToolArgs {
268
274
  /** The hinge angle in degrees, 0 (closed) to 180 (open). Exactly one of `posture` and `angle`. */
269
275
  angle?: number;
270
276
  };
277
+ "foreground-app": {
278
+ /** Target device id from `list-devices`. */
279
+ udid: string;
280
+ };
271
281
  "gather-workspace-data": {
272
282
  /** Absolute path to the project root directory to inspect (e.g. /Users/dev/MyApp) */
273
283
  workspacePath: string;
@@ -306,7 +316,7 @@ export interface ArgentToolArgs {
306
316
  toY: number;
307
317
  /** Total drag duration in milliseconds (default 300, at most 10000 - the button stays down for exactly this long), interpolated at ~60fps. */
308
318
  durationMs?: number;
309
- /** Whether the drag releases with momentum; default true (a constant-speed drag). Pass false to decelerate into the release point (ease-out) so an app deriving fling from pointer release velocity (carousels, drag libraries) reads ~0 and applies little to no momentum — use it when the drag must stop where it was aimed rather than fling past. Deceleration needs wall clock: under ~100ms the whole drag fits inside the velocity window a page averages over (tens of ms), so some fling survives, and under ~70ms its extra frames cannot dispatch fast enough to fit durationMs. Keep durationMs at its default when the fling must be fully suppressed. */
319
+ /** Whether the drag releases with momentum; default true (a constant-speed drag). Pass false to decelerate into the release point (ease-out) so an app deriving fling from pointer release velocity (carousels, drag libraries) reads ~0 and applies little to no momentum. Use it when the drag must stop where it was aimed rather than fling past. Deceleration needs wall clock: under ~100ms the whole drag fits inside the velocity window a page averages over (tens of ms), so some fling survives, and under ~70ms its extra frames cannot dispatch fast enough to fit durationMs. Keep durationMs at its default when the fling must be fully suppressed. */
310
320
  momentum?: boolean;
311
321
  };
312
322
  "gesture-pinch": {
@@ -336,11 +346,11 @@ export interface ArgentToolArgs {
336
346
  centerX: number;
337
347
  /** Center of rotation, vertical: normalized 0.0–1.0 (fraction of screen height, not pixels) */
338
348
  centerY: number;
339
- /** Distance from center to each finger: normalized 0.0–1.0 (fraction of screen, not pixels). E.g. 0.15 = fingers placed 15% of screen away from center. One value for both axes, so on a non-square screen the orbit is a physical ellipse — pass radiusX+radiusY instead for a true circle. Required unless radiusX and radiusY are given. */
349
+ /** Distance from center to each finger: normalized 0.0–1.0 (fraction of screen, not pixels). E.g. 0.15 = fingers placed 15% of screen away from center. One value for both axes, so on a non-square screen the orbit is a physical ellipse; pass radiusX+radiusY instead for a true circle. Required unless radiusX and radiusY are given. */
340
350
  radius?: number;
341
- /** Per-axis finger distance, horizontal: normalized 0.0–1.0 fraction of screen WIDTH. Give both radiusX and radiusY (they override radius) with radiusX·screenWidth = radiusY·screenHeight for a physically circular orbit — constant finger separation, no pinch coupled into the turn. */
351
+ /** Per-axis finger distance, horizontal: normalized 0.0–1.0 fraction of screen WIDTH. Give both radiusX and radiusY (they override radius) with radiusX·screenWidth = radiusY·screenHeight for a physically circular orbit: constant finger separation, no pinch coupled into the turn. */
342
352
  radiusX?: number;
343
- /** Per-axis finger distance, vertical: normalized 0.0–1.0 fraction of screen HEIGHT. Always paired with radiusX — see radiusX. */
353
+ /** Per-axis finger distance, vertical: normalized 0.0–1.0 fraction of screen HEIGHT. Always paired with radiusX; see radiusX. */
344
354
  radiusY?: number;
345
355
  /** Starting angle in degrees (0 = right, 90 = down) */
346
356
  startAngle: number;
@@ -352,7 +362,7 @@ export interface ArgentToolArgs {
352
362
  "gesture-scroll": {
353
363
  /** Target Chromium device id from `list-devices` (chromium-cdp-<port>). */
354
364
  udid: string;
355
- /** Anchor x: normalized 0.0–1.0 (fraction of window width, not pixels). The wheel events land here — put it over the element you want to scroll. */
365
+ /** Anchor x: normalized 0.0–1.0 (fraction of window width, not pixels). The wheel events land here; put it over the element you want to scroll. */
356
366
  x: number;
357
367
  /** Anchor y: normalized 0.0–1.0 (fraction of window height, not pixels). */
358
368
  y: number;
@@ -392,7 +402,7 @@ export interface ArgentToolArgs {
392
402
  keyboard: {
393
403
  /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id). */
394
404
  udid: string;
395
- /** Text to type character by character. Cannot be combined with `key` in one call — one call per action; to type and then press a key, put two `keyboard` steps in one `run-sequence`. Handles uppercase and common punctuation. To type a credential without its plaintext ever entering your context, use a secret placeholder: `{{secret:<NAME>}}` — e.g. text: "{{secret:APP_PASSWORD}}". The value is resolved on the machine running the tool-server, from the first source that defines the name: the `ARGENT_SECRET_<NAME>` environment variable, `.argent/secrets.env` in the project, the project's `.env.local` / `.env` (only their `ARGENT_SECRET_`-prefixed keys), then `~/.argent/secrets.env`. Nothing else on the host is reachable. Placeholders can be embedded in longer text and are never echoed back resolved. If the secret you need is not set, the failure lists the available names and every source it looked in — ask the user to add it to one of them (a secrets file applies immediately; an env var needs a restart), NEVER ask the user to paste the secret value into the conversation. */
405
+ /** Text to type character by character. Cannot be combined with `key` in one call (one call per action); to type and then press a key, put two `keyboard` steps in one `run-sequence`. Handles uppercase and common punctuation. To type a credential without its plaintext ever entering your context, use a secret placeholder: `{{secret:<NAME>}}`, e.g. text: "{{secret:APP_PASSWORD}}". The value is resolved on the machine running the tool-server, from the first source that defines the name: the `ARGENT_SECRET_<NAME>` environment variable, `.argent/secrets.env` in the project, the project's `.env.local` / `.env` (only their `ARGENT_SECRET_`-prefixed keys), then `~/.argent/secrets.env`. Nothing else on the host is reachable. Placeholders can be embedded in longer text and are never echoed back resolved. If the secret you need is not set, the failure lists the available names and every source it looked in; ask the user to add it to one of them (a secrets file applies immediately; an env var needs a restart), NEVER ask the user to paste the secret value into the conversation. */
396
406
  text?: string;
397
407
  /** Named key to press: enter, escape, backspace, tab, space, arrow-up, arrow-down, arrow-left, arrow-right, f1-f12. Cannot be combined with `text` in one call: one call per action; to type and then press a key, put two `keyboard` steps in one `run-sequence`. Not supported on TV targets; move focus with `tv-remote` (up/down/left/right) instead. Physical iOS: only `enter` and `backspace`. */
398
408
  key?: string;
@@ -457,7 +467,7 @@ export interface ArgentToolArgs {
457
467
  fields?: Array<string>;
458
468
  /** Exact UIView class names whose entire subtree should be pruned (e.g. ["UIImageView"] to drop image leaf nodes) */
459
469
  skipClasses?: Array<string>;
460
- /** 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. */
470
+ /** 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. */
461
471
  skipClassPrefixes?: Array<string>;
462
472
  /** Maximum recursion depth (default 8). Increase for deeper inspection, decrease to reduce output size. */
463
473
  maxDepth?: number;
@@ -483,7 +493,7 @@ export interface ArgentToolArgs {
483
493
  app_process?: string;
484
494
  /** iOS-only: path to an Instruments .tracetemplate file (defaults to bundled Argent template). Ignored on Android. */
485
495
  template_path?: string;
486
- /** iOS-only. When true, cold-launches the app under the profiler with Malloc Stack Logging enabled so memory leaks carry an allocation backtrace (responsible frame + library). Without it, leaks are still detected but unattributable — Instruments reports '<Call stack limit reached>'. Trade-offs: this RESTARTS the app (current state is lost), adds memory/CPU overhead, and makes the app noticeably slow to launch (every startup allocation records a backtrace), so leave it off for pure CPU/hang profiling. Requires a non-degraded Xcode: on Xcode 26.4 and later the cold-launch path is broken, so the call is rejected up front (re-run without the flag, or set ARGENT_IOS_CAPTURE=device to override if the device path works on your host). ARGENT_IOS_CAPTURE=all-processes — e.g. exported globally for the normal capture path — also rejects this flag up front, since that fallback cannot cold-launch; unset it (or set it to device) first. Ignored on Android. */
496
+ /** iOS-only. When true, cold-launches the app under the profiler with Malloc Stack Logging enabled so memory leaks carry an allocation backtrace (responsible frame + library). Without it, leaks are still detected but unattributable: Instruments reports '<Call stack limit reached>'. Trade-offs: this RESTARTS the app (current state is lost), adds memory/CPU overhead, and makes the app noticeably slow to launch (every startup allocation records a backtrace), so leave it off for pure CPU/hang profiling. Requires a non-degraded Xcode: on Xcode 26.4 and later the cold-launch path is broken, so the call is rejected up front (re-run without the flag, or set ARGENT_IOS_CAPTURE=device to override if the device path works on your host). ARGENT_IOS_CAPTURE=all-processes (e.g. exported globally for the normal capture path) also rejects this flag up front, since that fallback cannot cold-launch; unset it (or set it to device) first. Ignored on Android. */
487
497
  malloc_stack_logging?: boolean;
488
498
  };
489
499
  "native-profiler-stop": {
@@ -545,17 +555,17 @@ export interface ArgentToolArgs {
545
555
  paste: {
546
556
  /** Target device id from `list-devices` (iOS simulator UDID or Android emulator serial). */
547
557
  udid: string;
548
- /** 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. 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. */
558
+ /** 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. 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. */
549
559
  text: string;
550
560
  };
551
561
  "profiler-combined-report": {
552
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
562
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
553
563
  port?: number;
554
564
  /** iOS Simulator/device UDID or Android serial */
555
565
  device_id: string;
556
566
  };
557
567
  "profiler-commit-query": {
558
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
568
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
559
569
  port?: number;
560
570
  /** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
561
571
  device_id: string;
@@ -565,28 +575,28 @@ export interface ArgentToolArgs {
565
575
  component_name?: string;
566
576
  /** Time range filter for by_time_range mode */
567
577
  time_range_ms?: {
568
- /** Start of range in ms since profiling started — the same clock profiler-commit-query prints */
578
+ /** Start of range in ms since profiling started, the same clock profiler-commit-query prints */
569
579
  start: number;
570
- /** End of range in ms since profiling started — the same clock profiler-commit-query prints */
580
+ /** End of range in ms since profiling started, the same clock profiler-commit-query prints */
571
581
  end: number;
572
582
  };
573
583
  /** Commit index for by_index and cascade_tree modes */
574
584
  commit_index?: number;
575
- /** Max results to return. Defaults to 20 for by_component / by_time_range, which count commits. by_index counts individual fibers and returns all of them unless this is set, because one commit's fibers collapse to far fewer distinct components — a small cap there can show less than the analyze report it is meant to expand on. */
585
+ /** Max results to return. Defaults to 20 for by_component / by_time_range, which count commits. by_index counts individual fibers and returns all of them unless this is set, because one commit's fibers collapse to far fewer distinct components, and a small cap there can show less than the analyze report it is meant to expand on. */
576
586
  top_n?: number;
577
587
  };
578
588
  "profiler-cpu-query": {
579
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
589
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
580
590
  port?: number;
581
591
  /** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
582
592
  device_id: string;
583
593
  /** Query mode: top_functions (global hotspots), time_window (CPU in a time range), call_tree (callers/callees of a function), component_cpu (CPU during a component's commits) */
584
594
  mode: "top_functions" | "time_window" | "call_tree" | "component_cpu";
585
- /** Time window filter for time_window mode (ms since profiling started — the same clock profiler-commit-query prints) */
595
+ /** Time window filter for time_window mode (ms since profiling started, the same clock profiler-commit-query prints) */
586
596
  time_window_ms?: {
587
- /** Start of window in ms since profiling started — the same clock profiler-commit-query prints */
597
+ /** Start of window in ms since profiling started, the same clock profiler-commit-query prints */
588
598
  start: number;
589
- /** End of window in ms since profiling started — the same clock profiler-commit-query prints */
599
+ /** End of window in ms since profiling started, the same clock profiler-commit-query prints */
590
600
  end: number;
591
601
  };
592
602
  /** Component name for component_cpu mode */
@@ -603,7 +613,7 @@ export interface ArgentToolArgs {
603
613
  mode: "list" | "load_react" | "load_native";
604
614
  /** Timestamp-based session identifier (e.g. '20250313-143022') from the list output. Required for load_react and load_native modes. */
605
615
  session_id?: string;
606
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
616
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
607
617
  port?: number;
608
618
  /** 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. */
609
619
  device_id: string;
@@ -629,7 +639,7 @@ export interface ArgentToolArgs {
629
639
  propose_variant: {
630
640
  /** Human name of the on-screen element this variant targets, e.g. "Foo button" or "profile header". Repeated calls with the same element accumulate multiple variants on it. Used as the default screen matcher when `match` is omitted. */
631
641
  element: string;
632
- /** Device id (iOS udid / Android serial) the variants were captured on. The preview window streams THIS device directly — pass the same udid you screenshotted/described with, so the human never has to pick a simulator. Set it on the first propose_variant of a round; later calls may omit it (the last non-empty value wins). */
642
+ /** Device id (iOS udid / Android serial) the variants were captured on. The preview window streams THIS device directly; pass the same udid you screenshotted/described with, so the human never has to pick a simulator. Set it on the first propose_variant of a round; later calls may omit it (the last non-empty value wins). */
633
643
  udid?: string;
634
644
  /** Optional precise matcher so the floating variant bubble anchors to the right element on the streamed screen. Defaults to { by: 'text', value: element }. Get exact labels/identifiers from the `describe` tool first for reliable anchoring. */
635
645
  match?: {
@@ -650,7 +660,7 @@ export interface ArgentToolArgs {
650
660
  filePath?: string;
651
661
  /** Required preview of how the variant looks, shown on the floating card. An http(s) URL, a data: URI, or a local image file path (e.g. a screenshot path returned by the screenshot tool after you rendered the variant). */
652
662
  previewImage: string;
653
- /** Normalized [0..1] bounds (fractions of screen width/height) of the target element AS IT APPEARS IN THIS VARIANT — read the matched node's `frame` from `describe` AFTER applying this variant. The preview window crops the screenshot to these bounds, so each variant shows its own re-laid-out element instead of every variant sharing one stale frame. The element moves/resizes between variants, so capture it per variant. Omit if unknown. */
663
+ /** Normalized [0..1] bounds (fractions of screen width/height) of the target element AS IT APPEARS IN THIS VARIANT. Read the matched node's `frame` from `describe` AFTER applying this variant. The preview window crops the screenshot to these bounds, so each variant shows its own re-laid-out element instead of every variant sharing one stale frame. The element moves/resizes between variants, so capture it per variant. Omit if unknown. */
654
664
  frame?: {
655
665
  x: number;
656
666
  y: number;
@@ -660,7 +670,7 @@ export interface ArgentToolArgs {
660
670
  };
661
671
  };
662
672
  "react-profiler-analyze": {
663
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
673
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
664
674
  port?: number;
665
675
  /** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
666
676
  device_id: string;
@@ -685,7 +695,7 @@ export interface ArgentToolArgs {
685
695
  project_root: string;
686
696
  };
687
697
  "react-profiler-cpu-summary": {
688
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
698
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
689
699
  port?: number;
690
700
  /** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
691
701
  device_id: string;
@@ -695,7 +705,7 @@ export interface ArgentToolArgs {
695
705
  react_only?: boolean;
696
706
  };
697
707
  "react-profiler-fiber-tree": {
698
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
708
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
699
709
  port?: number;
700
710
  /** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
701
711
  device_id: string;
@@ -705,7 +715,7 @@ export interface ArgentToolArgs {
705
715
  filter?: string;
706
716
  };
707
717
  "react-profiler-renders": {
708
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
718
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
709
719
  port?: number;
710
720
  /** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
711
721
  device_id: string;
@@ -713,9 +723,9 @@ export interface ArgentToolArgs {
713
723
  top_n?: number;
714
724
  };
715
725
  "react-profiler-start": {
716
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
726
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
717
727
  port?: number;
718
- /** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
728
+ /** Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
719
729
  device_id: string;
720
730
  /** CPU sampling interval in microseconds (default 100) */
721
731
  sample_interval_us?: number;
@@ -723,15 +733,15 @@ export interface ArgentToolArgs {
723
733
  force?: boolean;
724
734
  };
725
735
  "react-profiler-status": {
726
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
736
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
727
737
  port?: number;
728
738
  /** Device logicalDeviceId from debugger-connect (iOS simulator UDID or Android logicalDeviceId). */
729
739
  device_id: string;
730
740
  };
731
741
  "react-profiler-stop": {
732
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
742
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
733
743
  port?: number;
734
- /** Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
744
+ /** Device id from list-devices: the SAME id you passed to debugger-connect (iOS simulator UDID or Android serial). */
735
745
  device_id: string;
736
746
  };
737
747
  "reinstall-app": {
@@ -759,11 +769,11 @@ export interface ArgentToolArgs {
759
769
  orientation: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
760
770
  };
761
771
  "run-sequence": {
762
- /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id) — shared across all steps. */
772
+ /** Target device id from `list-devices` (iOS UDID, Android serial, Vega serial, or Chromium id), shared across all steps. */
763
773
  udid: string;
764
774
  /** Ordered list of interaction steps to execute sequentially */
765
775
  steps: Array<{
766
- /** Tool name — one of: gesture-tap, gesture-swipe, gesture-scroll, gesture-drag, gesture-custom, gesture-pinch, gesture-rotate, button, keyboard, paste, rotate, shake, fold, tv-remote, await-ui-element. On a TV target (Apple TV / Android TV / Vega) use tv-remote (remote presses) and keyboard (text). */
776
+ /** Tool name, one of: gesture-tap, gesture-swipe, gesture-scroll, gesture-drag, gesture-custom, gesture-pinch, gesture-rotate, button, keyboard, paste, rotate, shake, fold, tv-remote, await-ui-element. On a TV target (Apple TV / Android TV / Vega) use tv-remote (remote presses) and keyboard (text). */
767
777
  tool: string;
768
778
  /** Tool arguments (excluding udid, which is injected automatically) */
769
779
  args: {
@@ -792,9 +802,9 @@ export interface ArgentToolArgs {
792
802
  udid: string;
793
803
  /** Orientation override for the screenshot (rotates the captured image after Page.captureScreenshot on Chromium). On Android the capture already follows the device's rotation. Ignored on physical iPhones. */
794
804
  rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
795
- /** Scale factor (0.01-1.0). Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android. On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency. */
805
+ /** Scale factor (0.01-1.0). Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android. On a local Apple TV simulator, an Android TV or Vega, with neither set, the capture is downscaled to a 576 px long side (0.15 of a 4K capture); an Android TV whose form factor or display size cannot be read in time keeps 0.25. On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency. */
796
806
  scale?: number;
797
- /** Default true. Set false only when capturing a full-resolution PNG (scale: 1.0) to save as a baseline/current for screenshot-diff — the file is still written, but the image bytes are not attached to the agent context. */
807
+ /** Default true. Set false only when capturing a full-resolution PNG (scale: 1.0) to save as a baseline/current for screenshot-diff. The file is still written, but the image bytes are not attached to the agent context. */
798
808
  includeImageInContext?: boolean;
799
809
  /** Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Mirrors sim-server's wire enum. Ignored on physical iPhones. */
800
810
  downscaler?: "lanczos3" | "box" | "bilinear" | "nearest";
@@ -812,7 +822,7 @@ export interface ArgentToolArgs {
812
822
  captureCurrent?: boolean;
813
823
  /** Orientation override for live baseline/current captures. Ignored on physical iPhones. */
814
824
  rotation?: "Portrait" | "LandscapeLeft" | "LandscapeRight" | "PortraitUpsideDown";
815
- /** Directory where diff artifacts should be written. Optional — defaults to a temp directory; the diff images are returned in the result either way. */
825
+ /** Directory where diff artifacts should be written. Optional: defaults to a temp directory; the diff images are returned in the result either way. */
816
826
  outputDir?: string;
817
827
  };
818
828
  "settings-permissions": {
@@ -822,7 +832,7 @@ export interface ArgentToolArgs {
822
832
  action: "grant" | "deny" | "reset";
823
833
  /** The permission to change. `notifications` is Android-only (iOS has no simctl service for it); `reminders` is iOS-only; `camera` works on Android and on iOS only when the target simulator's runtime models the service (varies by simruntime, not by the installed Xcode). */
824
834
  permission: "camera" | "microphone" | "photos" | "contacts" | "notifications" | "calendar" | "location" | "location-always" | "media-library" | "motion" | "reminders";
825
- /** App to change the permission for — required for every action. iOS: bundle id (e.g. com.example.app). Android: package name. `reset` is per-app too: simctl's device-wide reset (no bundleId) silently leaves existing per-app grants untouched on recent iOS, so the permission is always reset for this one app. */
835
+ /** App to change the permission for, required for every action. iOS: bundle id (e.g. com.example.app). Android: package name. `reset` is per-app too: simctl's device-wide reset (no bundleId) silently leaves existing per-app grants untouched on recent iOS, so the permission is always reset for this one app. */
826
836
  bundleId: string;
827
837
  };
828
838
  shake: {
@@ -832,7 +842,7 @@ export interface ArgentToolArgs {
832
842
  count?: number;
833
843
  };
834
844
  "stop-all-simulator-servers": {
835
- /** Device ids (iOS UDID / Android serial / Chromium id) to scope the teardown to — pass the devices THIS session actually used. Omit only for a deliberate machine-wide cleanup: one tool-server serves every agent using this argent install, so an unscoped stop also kills devices another agent is mid-session on. */
845
+ /** Device ids (iOS UDID / Android serial / Chromium id) to scope the teardown to. Pass the devices THIS session actually used. Omit only for a deliberate machine-wide cleanup: one tool-server serves every agent using this argent install, so an unscoped stop also kills devices another agent is mid-session on. */
836
846
  devices?: Array<string>;
837
847
  };
838
848
  "stop-metro": {
@@ -852,7 +862,7 @@ export interface ArgentToolArgs {
852
862
  "tv-remote": {
853
863
  /** Target TV device id from `list-devices` (Apple TV, Android TV, or Vega). */
854
864
  udid: string;
855
- /** A single TV-remote button, or a path of them run in one call. Buttons: up/down/left/right (D-pad), select (OK), back, home, menu, playPause, rewind, fastForward, next, previous, volumeUp, volumeDown, mute. The media-transport and volume keys work on Android TV and Vega; on the Apple TV simulator they are rejected (its HID stack ignores them) — the D-pad/select/back/menu/home/playPause core works on all three. 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. */
865
+ /** A single TV-remote button, or a path of them run in one call. Buttons: up/down/left/right (D-pad), select (OK), back, home, menu, playPause, rewind, fastForward, next, previous, volumeUp, volumeDown, mute. The media-transport and volume keys work on Android TV and Vega; on the Apple TV simulator they are rejected (its HID stack ignores them). The D-pad/select/back/menu/home/playPause core works on all three. 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. */
856
866
  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">;
857
867
  /** Repeat the whole `button` value this many times (default 1). Compact for long same-button runs, e.g. { button: "down", repeat: 12 }. */
858
868
  repeat?: number;
@@ -862,21 +872,21 @@ export interface ArgentToolArgs {
862
872
  udid: string;
863
873
  };
864
874
  "update-argent": {
865
- /** Which install to update. 'auto' (default) updates the install serving this session — the global PATH install or this project's local devDependency, whichever this server runs from. Pass 'global' / 'local' to force one, or 'both' when the user has both and wants each updated. */
875
+ /** Which install to update. 'auto' (default) updates the install serving this session: the global PATH install or this project's local devDependency, whichever this server runs from. Pass 'global' / 'local' to force one, or 'both' when the user has both and wants each updated. */
866
876
  target?: "auto" | "global" | "local" | "both";
867
877
  };
868
878
  "view-network-logs": {
869
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
879
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
870
880
  port?: number;
871
- /** Device id from list-devices (iOS simulator UDID or Android serial) — the same id used with debugger-connect. */
881
+ /** Device id from list-devices (iOS simulator UDID or Android serial), the same id used with debugger-connect. */
872
882
  device_id: string;
873
883
  /** Page index (0-based) or "latest" for the most recent page. Each page contains up to 50 entries. */
874
884
  pageIndex?: number | "latest";
875
885
  };
876
886
  "view-network-request-details": {
877
- /** Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
887
+ /** Metro server port. Optional: omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id. */
878
888
  port?: number;
879
- /** Device id from list-devices (iOS simulator UDID or Android serial) — the same id used with debugger-connect. */
889
+ /** Device id from list-devices (iOS simulator UDID or Android serial), the same id used with debugger-connect. */
880
890
  device_id: string;
881
891
  /** The requestId from view-network-logs to get full details for */
882
892
  requestId: string;