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

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.29.1-next.2",
3
+ "version": "0.29.1-next.21",
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",
@@ -68,14 +68,14 @@
68
68
  "assets/"
69
69
  ],
70
70
  "dependencies": {
71
- "@fails-components/webtransport": "^1.6.3",
72
- "@fails-components/webtransport-transport-http3-quiche": "^1.6.3",
73
- "@modelcontextprotocol/sdk": "^1.20.0",
71
+ "@fails-components/webtransport": "^1.6.8",
72
+ "@fails-components/webtransport-transport-http3-quiche": "^1.6.8",
73
+ "@modelcontextprotocol/sdk": "^1.30.0",
74
74
  "tree-sitter": "^0.21.1",
75
75
  "tree-sitter-typescript": "^0.23.2"
76
76
  },
77
77
  "optionalDependencies": {
78
- "electron": "^42.5.0",
78
+ "electron": "^44.8.0",
79
79
  "node-pty": "^1.1.0"
80
80
  },
81
81
  "devDependencies": {
@@ -84,19 +84,19 @@
84
84
  "@argent/installer": "file:../argent-installer",
85
85
  "@argent/mcp": "file:../argent-mcp",
86
86
  "@argent/tools-client": "file:../argent-tools-client",
87
- "@clack/prompts": "^1.6.0",
87
+ "@clack/prompts": "^1.8.1",
88
88
  "@opentelemetry/api": "1.9.1",
89
- "@opentelemetry/api-logs": "0.221.0",
90
- "@opentelemetry/exporter-logs-otlp-http": "0.221.0",
91
- "@opentelemetry/resources": "2.10.0",
92
- "@opentelemetry/sdk-logs": "0.221.0",
93
- "@types/node": "^26.0.1",
94
- "esbuild": "^0.28.1",
89
+ "@opentelemetry/api-logs": "0.223.0",
90
+ "@opentelemetry/exporter-logs-otlp-http": "0.223.0",
91
+ "@opentelemetry/resources": "2.12.0",
92
+ "@opentelemetry/sdk-logs": "0.223.0",
93
+ "@types/node": "^26.6.2",
94
+ "esbuild": "^0.28.2",
95
95
  "picocolors": "^1.1.1",
96
96
  "semver": "^7.8.5",
97
- "smol-toml": "^1.7.0",
97
+ "smol-toml": "^1.9.0",
98
98
  "typescript": "^6.0.3",
99
- "vitest": "^4.1.9",
100
- "yaml": "^2.8.3"
99
+ "vitest": "^5.0.5",
100
+ "yaml": "^2.9.1"
101
101
  }
102
102
  }
package/rules/argent.md CHANGED
@@ -119,7 +119,7 @@ Prompt keywords: physical iPhone, real device, on my phone, USB, hardware
119
119
 
120
120
  TAPPING, SWIPING, TYPING, GESTURES, SCREENSHOTS, SCROLLING
121
121
  Skill: `argent-device-interact`
122
- When: Performing touch interactions, typing, pressing hardware buttons, launching/restarting apps, opening URLs, rotating or folding the device, taking standalone screenshots, or verifying a visible UI code change. Phone/tablet iOS and Android simulators and emulators only: for any TV target use the TV skill below, and for a physical iPhone use the entry above.
122
+ When: Performing touch interactions, typing, pressing hardware buttons, launching/restarting apps, opening URLs, rotating or folding the device, taking standalone screenshots, or verifying a visible UI code change. Covers phone/tablet iOS and Android simulators and emulators plus Chromium (CDP) apps: for any TV target use the TV skill below, and for a physical iPhone use the entry above.
123
123
 
124
124
  APP PERMISSIONS (GRANT / DENY / RESET WITHOUT THE SETTINGS UI)
125
125
  Skill: `argent-settings-permissions`
@@ -111,12 +111,12 @@ 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`, `fold`, `await`, `assert`, `wait`, `snapshot`, `run`, `script`, `when`, `echo`, and `tool`.
113
113
 
114
- `fold` folds or unfolds a foldable iOS simulator. Write a posture (`fold: closed`, `fold: half-open`, `fold: open`) or an angle from 0 to 180 (`fold: 120`). The step waits until the device accepts input again. A recorded `fold` tool call becomes a `fold:` step. After a `fold` step:
114
+ `fold` folds or unfolds a foldable iOS simulator or Android emulator. Write a posture (`fold: closed`, `fold: half-open`, `fold: open`) or an angle from 0 to 180 (`fold: 120`). The step waits until the device accepts input again. A recorded `fold` tool call becomes a `fold:` step. After a `fold` step:
115
115
 
116
116
  - The coordinates change with the panel. Selectors resolve against a new tree.
117
117
  - A `snapshot` baseline is valid only for the posture that made it.
118
- - Unfolded, the UI is landscape. `swipe` and `scroll-to` directions and the reading order stay as the user sees the UI. Coordinates stay in the space of the `describe` frames.
119
- - A fold between two angles that are not `closed` or `open` can keep the current panel. The step passes, and the report names the panel. To change panels, fold to `closed` or `open`.
118
+ - iOS: unfolded, the UI is landscape. `swipe` and `scroll-to` directions and the reading order stay as the user sees the UI. Coordinates stay in the space of the `describe` frames.
119
+ - iOS: a fold between two angles that are not `closed` or `open` can keep the current panel. The step passes, and the report names the panel. To change panels, fold to `closed` or `open`.
120
120
 
121
121
  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. `ios:` also accepts `{ app, args }`; a simulator passes `args` to the app at launch. 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.
122
122
 
@@ -67,7 +67,7 @@ Common schemes: `messages://`, `settings://`, `maps://?q=<query>`, `tel://<numbe
67
67
  | Type text | `keyboard` | Every platform. Text or one named key per call, never both |
68
68
  | Paste text | `paste` | Only where a user would paste (OTP code, long link). Sim/emu only |
69
69
  | Rotate device | `rotate` | Orientation changes |
70
- | Fold device | `fold` | Foldable iOS simulator: closed / half-open / open, or an angle |
70
+ | Fold device | `fold` | Foldable simulator/emulator: closed / half-open / open, or angle |
71
71
  | Shake device | `shake` | Shake handlers (sim/emu only), Undo-typing prompt, RN dev menu |
72
72
  | Wait for UI | `await-ui-element` | Block until an element is visible/hidden/exists/contains text |
73
73
  | Wait for idle | `await-screen-idle` | Block until a non-empty screen tree stops changing |
@@ -201,7 +201,7 @@ Values: `Portrait`, `LandscapeLeft`, `LandscapeRight`, `PortraitUpsideDown`
201
201
 
202
202
  On an unfolded foldable simulator, the value sets the orientation of the device, not of the UI. `Portrait` gives a landscape UI. `LandscapeLeft` gives a portrait UI.
203
203
 
204
- ### fold: Fold or unfold a foldable simulator
204
+ ### fold: Fold or unfold a foldable device
205
205
 
206
206
  ```json
207
207
  { "udid": "<UDID>", "posture": "open" }
@@ -209,7 +209,7 @@ On an unfolded foldable simulator, the value sets the orientation of the device,
209
209
 
210
210
  Give `posture` (`closed`, `half-open` or `open`) or `angle` (0–180). Do not give both.
211
211
 
212
- Use `fold` only on a foldable iOS simulator. `list-devices` marks it with `foldable: true`, for example the iPhone Duo. Other devices reject the call.
212
+ Use `fold` only on a foldable iOS simulator (the iPhone Duo) or Android emulator (a Pixel Fold or generic foldable AVD). `list-devices` marks them with `foldable: true`. Other devices reject the call.
213
213
 
214
214
  Closed, the cover panel shows the UI. Half-open and open, the inner panel shows the UI. All tools use the active panel (the panel that shows the UI), also after a fold made outside argent. `fold` returns when the device accepts input again, so the next tap lands. This is also true for the next step in `run-sequence`.
215
215
 
@@ -217,10 +217,12 @@ Rules:
217
217
 
218
218
  - The coordinates change with the panel. Before you tap, read the element tree in the `fold` result, or run `describe` again. Do not use frames from before the fold.
219
219
  - The screenshot size changes with the panel. Keep one screenshot-diff baseline for each posture.
220
- - Unfolded, the UI is landscape. The screenshot shows the UI turned 90 degrees, and the `describe` frames use the same axes, as on a rotated iPhone.
221
- - A fold between two angles that are not 0 or 180 can keep the current panel. The result names the active panel. To change panels, fold to `closed` or `open`.
220
+ - iOS: unfolded, the UI is landscape. The screenshot shows the UI turned 90 degrees, and the `describe` frames use the same axes, as on a rotated iPhone.
221
+ - iOS: a fold between two angles that are not 0 or 180 can keep the current panel. The result names the active panel. To change panels, fold to `closed` or `open`.
222
222
  - Fold between gestures, not during a gesture. A gesture stays on the panel where it started.
223
- - If argent cannot find the active panel, it uses the cover panel. The tool result then has a `warning`, and a screenshot-diff summary has a `panel:` line. Take a screenshot to see what the device shows, then do the check that the warning gives.
223
+ - Android: the result gives `deviceState` (`CLOSED`, `HALF_OPENED`, `OPENED`). A lock screen that the fold to closed shows is dismissed; a `warning` says when it cannot be, or when a lock screen is up after the fold. Unlock the device before the next action.
224
+ - Android: only a Pixel Fold AVD has a cover panel. When a generic foldable AVD is closed, the emulator shows only the left part of the display. `describe` frames do not match tap coordinates. Argent can reliably tap only an element that covers the visible part, for example a full-width row. Use a Pixel Fold AVD to test the cover panel.
225
+ - iOS: if argent cannot find the active panel, it uses the cover panel. The tool result then has a `warning`, and a screenshot-diff summary has a `panel:` line. Take a screenshot to see what the device shows, then do the check that the warning gives.
224
226
 
225
227
  ### await-ui-element: Block until a UI element reaches a state
226
228
 
@@ -11,7 +11,7 @@ For **React Native (iOS / Android)**: requires **Metro dev server running** (def
11
11
 
12
12
  For **Vega (Fire TV)**: requires a **Debug `.vpkg`** (a Release build never attaches) and **Metro reachable from the device** (`vega device start-port-forwarding --port 8081 --forward false`). Verify via `debugger-status`. `debugger-component-tree`, `debugger-inspect-element`, `debugger-reload-metro` and the `react-profiler-*` / `profiler-*` tools are unavailable there; see the `argent-tv-interact` skill.
13
13
 
14
- For **Chromium (CDP)**: requires a Chromium/CDP app already available: an Electron app booted via `boot-device` with `electronAppPath`, or any Chromium browser exposing a CDP port (auto-discovered by `list-devices` on `9222` / `ARGENT_CHROMIUM_PORTS`). The debugger re-uses the page CDP session; `port` is ignored, `device_id` is the `chromium-cdp-<port>` value from `list-devices` / `boot-device`. Only `debugger-connect`, `debugger-status`, `debugger-evaluate`, `debugger-log-registry`, `view-network-logs`, and `view-network-request-details` work on Chromium (the latter two read the browser's native CDP Network recording for the active tab instead of the Metro-injected `fetch` interceptor); `debugger-component-tree`, `debugger-reload-metro`, `debugger-inspect-element`, and the `react-profiler-*` / `profiler-*` tools are RN-only and reject Chromium at the capability gate with `Tool 'X' is not supported on chromium app`.
14
+ For **Chromium (CDP)**: requires a Chromium/CDP app already available; an Electron app booted via `boot-device` with `electronAppPath`, or any Chromium browser exposing a CDP port (auto-discovered by `list-devices` on `9222` / `ARGENT_CHROMIUM_PORTS`). The debugger re-uses the page CDP session; `port` is ignored, `device_id` is the `chromium-cdp-<port>` value from `list-devices` / `boot-device`. Only `debugger-connect`, `debugger-status`, `debugger-evaluate`, `debugger-log-registry`, `view-network-logs`, and `view-network-request-details` work on Chromium (the latter two read the browser's native CDP Network recording for the active tab instead of the Metro-injected `fetch` / `XMLHttpRequest` interceptor); `debugger-component-tree`, `debugger-reload-metro`, `debugger-inspect-element`, and the `react-profiler-*` / `profiler-*` tools are RN-only and reject Chromium at the capability gate with `Tool 'X' is not supported on chromium app`.
15
15
 
16
16
  ### Android: reverse port for Metro
17
17
 
@@ -42,7 +42,7 @@ With two or more devices on one Metro, `debugger-connect` refuses a udid/serial
42
42
 
43
43
  | Tool | Purpose |
44
44
  | ----------------------- | --------------------------------------------------------------------------------------------- |
45
- | `debugger-reload-metro` | Reload all connected apps (like pressing "r" in Metro terminal). Needs a CDP target. |
45
+ | `debugger-reload-metro` | Reload the `device_id` app (all apps on the port when `method: "http"`). Needs a CDP target. |
46
46
  | `restart-app` | Terminate and relaunch the app by device id and bundleId. Use when app lost Metro connection. |
47
47
 
48
48
  ### Inspection & console