@swmansion/argent 0.25.1-next.30 → 0.25.1-next.31

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.
package/dist/cli-cmds.mjs CHANGED
@@ -21857,7 +21857,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
21857
21857
  var SESSION_ID2 = randomUUID5();
21858
21858
  function readCliVersion() {
21859
21859
  if (true) {
21860
- return "0.25.1-next.30";
21860
+ return "0.25.1-next.31";
21861
21861
  }
21862
21862
  return "0.0.0";
21863
21863
  }
@@ -16710,7 +16710,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16710
16710
  var SESSION_ID = randomUUID4();
16711
16711
  function readCliVersion() {
16712
16712
  if (true) {
16713
- return "0.25.1-next.30";
16713
+ return "0.25.1-next.31";
16714
16714
  }
16715
16715
  return "0.0.0";
16716
16716
  }
@@ -94704,7 +94704,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
94704
94704
  var SESSION_ID = (0, import_node_crypto3.randomUUID)();
94705
94705
  function readCliVersion() {
94706
94706
  if (true) {
94707
- return "0.25.1-next.30";
94707
+ return "0.25.1-next.31";
94708
94708
  }
94709
94709
  return "0.0.0";
94710
94710
  }
@@ -131946,7 +131946,7 @@ function deriveSelector(node) {
131946
131946
  return null;
131947
131947
  }
131948
131948
  async function fetchTree(registry2, device, opts = {}) {
131949
- if (device.platform === "ios") {
131949
+ if (device.platform === "ios" || device.platform === "ios-remote") {
131950
131950
  return describeIos(registry2, device, { bundleId: opts.bundleId });
131951
131951
  }
131952
131952
  if (device.platform === "android") {
@@ -147517,6 +147517,7 @@ function bindDeviceArgs(registry2, toolName, deviceId, args, deviceIsExplicit =
147517
147517
 
147518
147518
  // ../tool-server/src/tools/flows/flow-ios-tree.ts
147519
147519
  init_src();
147520
+ init_device_info();
147520
147521
 
147521
147522
  // ../tool-server/src/tools/flows/flow-tree-flatten.ts
147522
147523
  function intersectClip(rect, clip3) {
@@ -147891,6 +147892,9 @@ Flow selector steps auto-target and cannot provide a bundleId. Bring that app to
147891
147892
  );
147892
147893
  }
147893
147894
  async function terminateCommand(device) {
147895
+ if (device.platform === "ios-remote") {
147896
+ return `sim-remote simctl terminate ${stripRemotePrefix(device.id)} <bundleId>`;
147897
+ }
147894
147898
  try {
147895
147899
  const { prefix } = await simctlTargetForUdid(device.id);
147896
147900
  return `xcrun ${prefix.join(" ")} terminate <udid> <bundleId>`;
@@ -148177,10 +148181,16 @@ async function fetchFlowTree(registry2, device, target) {
148177
148181
  var FLOW_TREE_SOURCES = {
148178
148182
  // Simulator iOS uses the injected hierarchy and an optional target.
148179
148183
  // Physical devices use the XCUITest runner tree.
148180
- ios: (registry2, device, target) => device.kind === "device" ? queryIosDeviceFlowTree(registry2, device) : queryFullHierarchyTree(registry2, device, target),
148181
- android: (registry2, device) => queryAndroidFullHierarchy(registry2, device),
148182
- chromium: (registry2, device) => queryChromiumTree(registry2, device),
148183
- vega: (_registry, device) => queryVegaTree(device)
148184
+ "ios": (registry2, device, target) => device.kind === "device" ? queryIosDeviceFlowTree(registry2, device) : queryFullHierarchyTree(registry2, device, target),
148185
+ // A remote sim is an iOS simulator reached over the sim-remote tunnel, and
148186
+ // the native-devtools blueprint routes `getFullHierarchy` over TCP for one.
148187
+ // So it is the local simulator source with no `kind === "device"` arm:
148188
+ // `ios-remote` is always kind "simulator" (utils/device-info.ts) and has no
148189
+ // physical-device variant.
148190
+ "ios-remote": (registry2, device, target) => queryFullHierarchyTree(registry2, device, target),
148191
+ "android": (registry2, device) => queryAndroidFullHierarchy(registry2, device),
148192
+ "chromium": (registry2, device) => queryChromiumTree(registry2, device),
148193
+ "vega": (_registry, device) => queryVegaTree(device)
148184
148194
  };
148185
148195
  function supportsFlowTree(platform) {
148186
148196
  return FLOW_TREE_SOURCES[platform] !== void 0;
@@ -154212,7 +154222,7 @@ async function treeSourceGate(registry2, device, bundleId, signal) {
154212
154222
  return `the on-device XCUITest runner did not become ready for ${device.id}: ${err instanceof Error ? err.message : String(err)}`;
154213
154223
  }
154214
154224
  }
154215
- if (device.platform === "ios" && !signal?.aborted) {
154225
+ if ((device.platform === "ios" || device.platform === "ios-remote") && !signal?.aborted) {
154216
154226
  const reason = await waitForNativeDevtools(registry2, device, bundleId, signal);
154217
154227
  if (reason !== null && !signal?.aborted) {
154218
154228
  return `could not connect to native devtools. ${reason}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.25.1-next.30",
3
+ "version": "0.25.1-next.31",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server for iOS Simulator and Android Emulator control",
6
6
  "license": "Apache-2.0",
@@ -111,7 +111,7 @@ Scopes can combine and nest, with at most six scope keys. Use strict selectors f
111
111
 
112
112
  Directives stop the flow on failure and skip later steps. The available directives are `launch`, `tap`, `long-press`, `swipe`, `type`, `scroll-to`, `pinch`, `rotate`, `await`, `assert`, `wait`, `snapshot`, `run`, `script`, `when`, `echo`, and `tool`.
113
113
 
114
- Use the launch map for cross-platform flows. A bare launch applies everywhere and becomes an app path on Chromium. The map takes `native:`, `ios:`, `android:`, `vega:`, and `chromium:`. `native:` is one id shared by iOS, Android, and Vega, and a per-platform key overrides it for that platform. `chromium:` accepts a relative or absolute app path. A launch that declares no id for the run's platform is an error, not a cue to switch platforms. On iOS, a successful launch also pins later tree reads to that app until the next raw `tool:` step, so read [The runner tree is not the discovery tree](#the-runner-tree-is-not-the-discovery-tree) when a read describes the wrong screen.
114
+ Use the launch map for cross-platform flows. A bare launch applies everywhere and becomes an app path on Chromium. The map takes `native:`, `ios:`, `android:`, `vega:`, and `chromium:`. `native:` is one id shared by iOS, Android, and Vega, and a per-platform key overrides it for that platform. `chromium:` accepts a relative or absolute app path. A launch that declares no id for the run's platform is an error, not a cue to switch platforms. A run on a remote simulator uses the `ios:` id, or the `native:` id when the map has no `ios:` key, so no flow needs a key for a remote run. On iOS, a successful launch also pins later tree reads to that app until the next raw `tool:` step, so read [The runner tree is not the discovery tree](#the-runner-tree-is-not-the-discovery-tree) when a read describes the wrong screen.
115
115
 
116
116
  ```yaml
117
117
  - launch: { native: com.acme.app, chromium: ../../app }
@@ -219,7 +219,7 @@ Use `when:` only for optional setup or an interstitial that reconverges:
219
219
  - tap: { text: Got it }
220
220
  ```
221
221
 
222
- The guard accepts one `exists`, `visible`, `hidden`, or `text` condition, or `{ platform: ios|android|chromium|vega }`. UI guards use the short assert grace and reject `timeout`. There is no `else` or per-step `optional`. Put separate behavioral paths in separate flows. Never place a required acceptance check inside `when:`.
222
+ The guard accepts one `exists`, `visible`, `hidden`, or `text` condition, or `{ platform: ios|android|chromium|vega }`. A run on a remote simulator matches `ios`. UI guards use the short assert grace and reject `timeout`. There is no `else` or per-step `optional`. Put separate behavioral paths in separate flows. Never place a required acceptance check inside `when:`.
223
223
 
224
224
  ## Composition and platform limits
225
225
 
@@ -249,7 +249,7 @@ If a script fails, check its changes before you retry.
249
249
 
250
250
  ## Snapshots and standalone runs
251
251
 
252
- `argent flow run <name> [--device <id>] [--platform ios|android|chromium|vega] [--update-baselines] [--output <dir>] [--json]` runs without an LLM and exits non-zero on failure.
252
+ `argent flow run <name> [--device <id>] [--platform ios|android|chromium|vega|ios-remote] [--update-baselines] [--output <dir>] [--json]` runs without an LLM and exits non-zero on failure.
253
253
 
254
254
  A screenshot is human evidence. A `snapshot:` is executable visual verification. A missing baseline or excessive mismatch fails. A `cropOn` size change also fails. Use snapshots for color, layout, size, spacing, typography, clipping, overflow, images, icons, or stable component appearance. Use full screen for global changes and `cropOn` for one component.
255
255