@swmansion/argent 0.29.1-next.21 → 0.29.1-next.23

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.
@@ -188,84 +188,84 @@ 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
- };
197
- "flow-add-echo": {
198
- /** Name of the flow being recorded: the one passed to flow-start-recording. */
191
+ "e2e-add-echo": {
192
+ /** Name of the e2e test being recorded: the one passed to e2e-start-recording. */
199
193
  name: string;
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. */
194
+ /** Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording. Together with `name` it identifies which recording this echo belongs to. */
201
195
  project_root: string;
202
- /** Message to echo when the flow is replayed */
196
+ /** Message to echo when the e2e test is replayed */
203
197
  message: string;
204
198
  };
205
- "flow-add-script": {
206
- /** Flow name passed to flow-start-recording. */
199
+ "e2e-add-script": {
200
+ /** E2E test name passed to e2e-start-recording. */
207
201
  name: string;
208
- /** Absolute project root passed to flow-start-recording. */
202
+ /** Absolute project root passed to e2e-start-recording. */
209
203
  project_root: string;
210
- /** Path to the .mjs file, relative to the flow YAML. For example: "../../scripts/seed-order.mjs". */
204
+ /** Path to the .mjs file, relative to the e2e test YAML. For example: "../../scripts/seed-order.mjs". */
211
205
  path: string;
212
206
  /** Optional time limit in milliseconds. The default is 30000 and the minimum is 100. */
213
207
  timeout?: number;
214
208
  };
215
- "flow-add-step": {
216
- /** Name of the flow being recorded: the one passed to flow-start-recording. */
209
+ "e2e-add-step": {
210
+ /** Name of the e2e test being recorded: the one passed to e2e-start-recording. */
217
211
  name: string;
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. */
212
+ /** Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording. Together with `name` it identifies which recording this step belongs to. */
219
213
  project_root: string;
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. */
214
+ /** 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. */
221
215
  command: string;
222
216
  /** Tool arguments as a JSON string, e.g. '{"udid": "ABC", "x": 0.5, "y": 0.3}'. Omit for tools with no arguments. */
223
217
  args?: string;
224
218
  /** Milliseconds to sleep before executing this step during replay. */
225
219
  delayMs?: number;
226
220
  };
227
- "flow-execute": {
228
- /** Name of a saved flow to run from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set. */
221
+ "e2e-execute": {
222
+ /** Name of a saved e2e test to run from `.argent/e2e`, or `.argent/flows` when it is not there (e.g. "settings-explore"). Omit when flow_path is set. */
229
223
  name?: string;
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. */
224
+ /** Absolute path to the calling agent's project root: the cwd it is working in. With name, the saved e2e test is read from `.argent/e2e/<name>.yaml`, else `.argent/flows/<name>.yaml`, under this root; with flow_path, the e2e test, 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. */
231
225
  project_root: string;
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. */
226
+ /** 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. */
233
227
  flow_file?: string;
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. */
228
+ /** Omit when name is set. Absolute path to an e2e test .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 e2e test 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 e2e test file. A tool: e2e-execute step that names an e2e test with name and an absolute project_root without a .. segment runs: the client also uploads that e2e test and its own files. Over a link, the uploaded e2e tests must not have: script: steps; tool: steps that run an e2e test another way or record an e2e test; 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. */
235
229
  flow_path?: string;
236
230
  /** 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. */
237
231
  device?: string;
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. */
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 a standalone e2e test - 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 a standalone e2e test's 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. */
239
233
  platform?: "ios" | "android" | "chromium" | "vega" | "ios-remote";
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. */
234
+ /** 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. */
241
235
  updateBaselines?: boolean;
242
236
  /** Set to true to confirm the execution prerequisite has been met. Required (LLM path) when a fragment defines an executionPrerequisite. */
243
237
  prerequisiteAcknowledged?: boolean;
244
238
  };
245
- "flow-finish-recording": {
246
- /** Name of the flow being recorded: the one passed to flow-start-recording. */
239
+ "e2e-finish-recording": {
240
+ /** Name of the e2e test being recorded: the one passed to e2e-start-recording. */
247
241
  name: string;
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. */
242
+ /** Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording. Together with `name` it identifies which recording to finish. */
249
243
  project_root: string;
250
244
  };
251
- "flow-read-prerequisite": {
252
- /** Name of a saved flow to inspect from `.argent/flows` (e.g. "settings-explore"). Omit when flow_path is set. */
245
+ "e2e-read-prerequisite": {
246
+ /** Name of a saved e2e test to inspect from `.argent/e2e`, or `.argent/flows` when it is not there (e.g. "settings-explore"). Omit when flow_path is set. */
253
247
  name?: string;
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. */
248
+ /** Absolute path to the calling agent's project root: the cwd it is working in. With name, the saved e2e test is read from `.argent/e2e/<name>.yaml`, else `.argent/flows/<name>.yaml`, under this root; with flow_path, the prerequisite is read from that YAML instead, so pass the agent's cwd. */
255
249
  project_root: string;
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. */
250
+ /** 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. */
257
251
  flow_file?: string;
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. */
252
+ /** Omit when name is set. Absolute path to an e2e test .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 e2e test source here as to e2e-execute, so the prerequisite you read belongs to the e2e test that will run. */
259
253
  flow_path?: string;
260
254
  };
261
- "flow-start-recording": {
262
- /** Name for this flow (e.g. "settings-explore"): letters, digits, underscore and hyphen only. */
255
+ "e2e-start-recording": {
256
+ /** Name for this e2e test (e.g. "settings-explore"): letters, digits, underscore and hyphen only. */
263
257
  name: string;
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`. */
258
+ /** Absolute path to the project root directory (the directory that contains or should contain `.argent/e2e/`). The e2e test file is created at `<project_root>/.argent/e2e/<name>.yaml`. */
265
259
  project_root: string;
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. */
260
+ /** Fragments only: the app/device state assumed on entry (e.g. "Settings app open on General page"). For a standalone e2e test, omit this and record a `restart-app` as the first step instead; it is captured as the e2e test's `launch` step. 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. */
267
261
  executionPrerequisite?: string;
268
262
  };
263
+ fill: {
264
+ /** Target device id from `list-devices`. */
265
+ udid: string;
266
+ /** The text the focused field must hold afterwards; "" clears it. Supports `{{secret:<NAME>}}` placeholders like `keyboard`. */
267
+ text: string;
268
+ };
269
269
  fold: {
270
270
  /** Target device id from `list-devices` (a foldable iOS simulator UDID or Android emulator serial). */
271
271
  udid: string;
@@ -893,4 +893,18 @@ export interface ArgentToolArgs {
893
893
  /** Whether to include the response body (if captured). Defaults to true. */
894
894
  includeBody?: boolean;
895
895
  };
896
+ /** @deprecated Renamed to `e2e-add-echo`. */
897
+ "flow-add-echo": ArgentToolArgs["e2e-add-echo"];
898
+ /** @deprecated Renamed to `e2e-add-script`. */
899
+ "flow-add-script": ArgentToolArgs["e2e-add-script"];
900
+ /** @deprecated Renamed to `e2e-add-step`. */
901
+ "flow-add-step": ArgentToolArgs["e2e-add-step"];
902
+ /** @deprecated Renamed to `e2e-execute`. */
903
+ "flow-execute": ArgentToolArgs["e2e-execute"];
904
+ /** @deprecated Renamed to `e2e-finish-recording`. */
905
+ "flow-finish-recording": ArgentToolArgs["e2e-finish-recording"];
906
+ /** @deprecated Renamed to `e2e-read-prerequisite`. */
907
+ "flow-read-prerequisite": ArgentToolArgs["e2e-read-prerequisite"];
908
+ /** @deprecated Renamed to `e2e-start-recording`. */
909
+ "flow-start-recording": ArgentToolArgs["e2e-start-recording"];
896
910
  }