@swmansion/argent 0.30.2-next.5 → 0.30.2-next.6
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/mcp-server.mjs
CHANGED
|
@@ -28485,7 +28485,9 @@ var AUTO_SCREENSHOT_TOOLS = /* @__PURE__ */ new Set([
|
|
|
28485
28485
|
"restart-app",
|
|
28486
28486
|
"open-url",
|
|
28487
28487
|
"describe",
|
|
28488
|
-
"run-sequence"
|
|
28488
|
+
"run-sequence",
|
|
28489
|
+
// A wait is almost always followed by a look at the screen it waited for.
|
|
28490
|
+
"await-ui-element"
|
|
28489
28491
|
]);
|
|
28490
28492
|
var AUTO_SCREENSHOT_DELAY_MS_BY_TOOL = {
|
|
28491
28493
|
"launch-app": 3e3,
|
|
@@ -28506,7 +28508,10 @@ var AUTO_SCREENSHOT_DELAY_MS_BY_TOOL = {
|
|
|
28506
28508
|
"fold": 1500,
|
|
28507
28509
|
"keyboard": 300,
|
|
28508
28510
|
"paste": 300,
|
|
28509
|
-
"describe": 100
|
|
28511
|
+
"describe": 100,
|
|
28512
|
+
// The wait returns on the first match, often mid-transition; the cap must
|
|
28513
|
+
// leave `await-screen-idle` room to see two identical reads.
|
|
28514
|
+
"await-ui-element": 1500
|
|
28510
28515
|
};
|
|
28511
28516
|
var DEFAULT_DELAY_MS = 1400;
|
|
28512
28517
|
function autoScreenshotEnabled(options) {
|
|
@@ -28528,7 +28533,8 @@ var AUTO_DESCRIBE_TOOLS = /* @__PURE__ */ new Set([
|
|
|
28528
28533
|
"launch-app",
|
|
28529
28534
|
"restart-app",
|
|
28530
28535
|
"open-url",
|
|
28531
|
-
"run-sequence"
|
|
28536
|
+
"run-sequence",
|
|
28537
|
+
"await-ui-element"
|
|
28532
28538
|
]);
|
|
28533
28539
|
function autoDescribeEnabled(options) {
|
|
28534
28540
|
return !isFlagEnabled("disable-auto-describe", options);
|
package/package.json
CHANGED
package/rules/argent.md
CHANGED
|
@@ -37,9 +37,9 @@ If argent is ABSENT, treat it as an expected state, not an error to retry. Do no
|
|
|
37
37
|
|
|
38
38
|
<tapping_rule>
|
|
39
39
|
<important>**Never** derive tap coordinates from screenshot pixels</important>
|
|
40
|
-
Interaction tools (`gesture-tap`, `gesture-swipe`, `keyboard`, `button`, `launch-app`, `open-url`, `run-sequence`, …) return the screen **after** the action: a screenshot AND the accessibility element tree (`--- Elements after action (describe) ---`, the same format `describe` prints, with normalized 0–1 frames). Take tap coordinates from that tree: the centre of the element's frame (`x + width/2`, `y + height/2`). You do not need a separate discovery call before a tap when the last result already lists the target.
|
|
40
|
+
Interaction tools (`gesture-tap`, `gesture-swipe`, `keyboard`, `button`, `launch-app`, `open-url`, `run-sequence`, `await-ui-element`, …) return the screen **after** the action: a screenshot AND the accessibility element tree (`--- Elements after action (describe) ---`, the same format `describe` prints, with normalized 0–1 frames). Take tap coordinates from that tree: the centre of the element's frame (`x + width/2`, `y + height/2`). You do not need a separate discovery call before a tap when the last result already lists the target.
|
|
41
41
|
|
|
42
|
-
Call a discovery tool yourself only when you have no fresh tree for the current screen: before the first action on a screen you have not touched yet, after waiting for something to load
|
|
42
|
+
Call a discovery tool yourself only when you have no fresh tree for the current screen: before the first action on a screen you have not touched yet, after waiting for something to load without `await-ui-element`, or when the last tree did not list your target. Preferred tools are, in order:
|
|
43
43
|
|
|
44
44
|
- `describe` - native app-level components and safely targetable foreground apps (iOS and Android).
|
|
45
45
|
- `native-describe-screen` - accessibility screen description via injected native devtools (iOS only)
|
|
@@ -98,8 +98,7 @@ Steps:
|
|
|
98
98
|
```
|
|
99
99
|
1. gesture-tap { x: 0.5, y: 0.7 } → trigger an action that fetches data
|
|
100
100
|
2. screenshot → loading spinner is showing
|
|
101
|
-
3. await-ui-element { condition: hidden, selector: { text: "Loading" } } → block until the fetch finishes and the spinner disappears
|
|
102
|
-
4. describe / screenshot → verify the fetched content rendered
|
|
101
|
+
3. await-ui-element { condition: hidden, selector: { text: "Loading" } } → block until the fetch finishes and the spinner disappears; its result carries the screenshot and element tree, so verify the fetched content rendered from it
|
|
103
102
|
```
|
|
104
103
|
|
|
105
104
|
---
|