@swmansion/argent 0.22.0 → 0.22.1-next.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.
- package/bin/argent-android-devtools-0.1.0.apk +0 -0
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/tcp/ax-service +0 -0
- package/dist/cli-cmds.mjs +1 -1
- package/dist/installer.mjs +1 -1
- package/dist/tool-server.cjs +818 -501
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +1 -1
- package/skills/argent-create-flow/references/flow-yaml.md +8 -8
- package/skills/argent-create-flow/references/live-authoring.md +21 -3
- package/skills/argent-create-flow/references/reliability-and-recovery.md +4 -2
- package/skills/argent-device-interact/SKILL.md +1 -1
- package/skills/argent-qa-flows/SKILL.md +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -59,16 +59,16 @@ Use single quotes for anchored, case-sensitive regexes:
|
|
|
59
59
|
|
|
60
60
|
Flow selectors and live discovery use different screen projections:
|
|
61
61
|
|
|
62
|
-
| Platform | Runner tree | `describe` / `await-ui-element` | Important difference
|
|
63
|
-
| -------- | --------------------------------------------------------- | ------------------------------- |
|
|
64
|
-
| iOS |
|
|
65
|
-
| Android | full accessibility hierarchy | trimmed interactables | Discovery can omit testID
|
|
66
|
-
| Chromium | filtered DOM nodes with id, label, value, click, or focus |
|
|
67
|
-
| Vega | toolkit page source | same source | Same elements, different shape
|
|
62
|
+
| Platform | Runner tree | `describe` / `await-ui-element` | Important difference |
|
|
63
|
+
| -------- | --------------------------------------------------------- | ------------------------------- | ------------------------------------------------------ |
|
|
64
|
+
| iOS | projected UIView hierarchy | accessibility tree | `native-full-hierarchy` is raw; nodes and roles differ |
|
|
65
|
+
| Android | full accessibility hierarchy | trimmed interactables | Discovery can omit testID containers or merge nodes |
|
|
66
|
+
| Chromium | filtered DOM nodes with id, label, value, click, or focus | shorter DOM walk | Projections and node limits differ (12,000 vs. 5,000) |
|
|
67
|
+
| Vega | toolkit page source | same source | Same elements, different shape |
|
|
68
68
|
|
|
69
|
-
On iOS and
|
|
69
|
+
On iOS, Android, and Chromium, an id absent from `describe` can still resolve in a flow. Verify it in a scratch fragment. Chromium exposes password fields to the runner as `[password]`; select them by id or role.
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
The recorder rechecks each successful `await-ui-element` against the runner tree. Follow any `message` warning and replay each conversion. On Vega, a mismatch usually means the screen changed. A `text` check can also select different elements from the same source. See [Live waits and checks](live-authoring.md#live-waits-and-checks).
|
|
72
72
|
|
|
73
73
|
**On iOS, never copy a `role` from `describe` into a flow selector.** The runner derives iOS roles from the UIView class name and `describe` from accessibility traits, so a React Native `Pressable` (class `RCTView`) is `AXGroup` to the runner and `AXButton` to `describe`. Select on `id`/`text`, or confirm the role against the runner's own tree.
|
|
74
74
|
|
|
@@ -130,11 +130,27 @@ For every retained raw gesture, add an echo and a recorded result check.
|
|
|
130
130
|
|
|
131
131
|
### Live waits and checks
|
|
132
132
|
|
|
133
|
-
Record `await-ui-element` through `flow-add-step`.
|
|
133
|
+
Record `await-ui-element` through `flow-add-step`. The recorder writes the step even when `toolResult.success` is false. Read `success` and `cause` after each check:
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
- `unmet`: The tree was readable, but the condition was false. Restore the expected state or correct the selector or timeout. Record the check again, then delete the failed step after `flow-finish-recording`.
|
|
136
|
+
- `unreadable`: The wait ended without a trustworthy read. Restore the tree source and record the check again. Keep the failed step: the condition is unknown, not false.
|
|
137
|
+
- `cancelled`: The caller stopped the wait. Record the check again. Keep the failed step: the condition is unknown, not false.
|
|
136
138
|
|
|
137
|
-
|
|
139
|
+
Only `unmet` disproves the condition. Never delete a step during the recording.
|
|
140
|
+
|
|
141
|
+
A stale `hidden` whose selector matches nothing replays as a silent pass — the unfalsifiable gate that [Record absence in three steps](#record-absence-in-three-steps) exists to prevent. Never proceed as though the gate passed. See the `await-ui-element` section of `argent-device-interact` for the full live condition and selector reference.
|
|
142
|
+
|
|
143
|
+
A wait inside `run-sequence` gets no recorder warning. Inspect the nested result. Any `success: false` fails the sequence during replay.
|
|
144
|
+
|
|
145
|
+
The live tool and flow runner use [different trees](flow-yaml.md#the-runner-tree-is-not-the-discovery-tree). After a successful wait, the recorder checks the same condition on the runner tree:
|
|
146
|
+
|
|
147
|
+
- No warning: The condition holds on both trees.
|
|
148
|
+
- Mismatch: For `text`, first rule out a selector that matches more than one element. Then rule out a changed screen. If the trees really differ, use a runner-tree selector and replay.
|
|
149
|
+
- Unreadable, slow, or cancelled check: The conversion is unknown. Restore the source or re-record before conversion.
|
|
150
|
+
|
|
151
|
+
A warning does not reject the step. `flow-finish-recording` repeats each warning below its step and reports dropped warnings.
|
|
152
|
+
|
|
153
|
+
Do not edit YAML before finishing because edits can drop recorded verdicts. If the finish reports drops, record the waits again. Replay every conversion. Keep a raw tool only for `pollIntervalMs` or `bundleId`.
|
|
138
154
|
|
|
139
155
|
### Wrong turns
|
|
140
156
|
|
|
@@ -155,6 +171,8 @@ Call `flow-finish-recording`, then read the saved YAML. Apply only meaning-prese
|
|
|
155
171
|
| `tool: gesture-rotate` | selector-based `rotate:` with `by = endAngle - startAngle` |
|
|
156
172
|
| sibling `tool: flow-execute` | recorder-captured `run:` |
|
|
157
173
|
|
|
174
|
+
Copy the recorded `selector:` map when you convert a wait. Do not use the loose bare-string form. Flow YAML accepts `identifier`; rename it to `id` only for style. Convert `textMatch: equals` to `equals:` and other text checks to `contains:`.
|
|
175
|
+
|
|
158
176
|
Only these unrecorded insertions are allowed, at states observed live:
|
|
159
177
|
|
|
160
178
|
- A planned `snapshot:` for pixel-level evidence.
|
|
@@ -27,7 +27,7 @@ Convert element-seeking swipes to `scroll-to`. Keep a coordinate swipe only when
|
|
|
27
27
|
Work this gate as soon as capture warns that it kept a raw point — and equally when it silently recorded a role-only selector, which warns about nothing. Keep the source screen available and do these checks:
|
|
28
28
|
|
|
29
29
|
1. **iOS:** query plausible ids or labels with `native-find-views`. If no term is useful, call `native-full-hierarchy` with narrow fields and `maxDepth: 100`. `describe` and `native-describe-screen` are accessibility projections. They cannot prove that no flow selector exists.
|
|
30
|
-
2. **Other platforms:** use `debugger-component-tree` for React Native
|
|
30
|
+
2. **Other platforms:** use `debugger-component-tree` for React Native; otherwise, use `describe`. Verify Android and Chromium candidates in step 3. Their discovery trees can omit runner elements.
|
|
31
31
|
3. Test each candidate in a scratch fragment with `assert: { visible: <candidate> }` on the valid screen. Inspect every failure before trying a better id, label, app, or container.
|
|
32
32
|
4. If source is available, inspect its `testID`, `accessibilityIdentifier`, or `resource-id`. If none exists, report the missing stable id as the real fix.
|
|
33
33
|
|
|
@@ -62,7 +62,9 @@ Give the flow a `launch:` step as usual. On iOS the launch waits the full devtoo
|
|
|
62
62
|
- A point focus tap plus a raw text-only `keyboard` with `delayMs: 500`, and a second raw `keyboard` with `key: "enter"` to submit.
|
|
63
63
|
- Raw swipes with `settle: true` because `scroll-to` needs the missing flow tree. Momentum-free scrolling keeps later coordinate taps valid.
|
|
64
64
|
|
|
65
|
-
Every point tap or long-press in such a flow passes **carrying a warning** for as long as the app serves no tree: each [selector-less gesture](flow-yaml.md#directives) dispatches unsettled. Nothing here repairs it. Accept the warnings, read each green as "the gesture was sent, not that it landed", and put an explicit `wait:` or a raw `tool: await-ui-element` before a gesture that follows a transition. Raw `tool:` steps
|
|
65
|
+
Every point tap or long-press in such a flow passes **carrying a warning** for as long as the app serves no tree: each [selector-less gesture](flow-yaml.md#directives) dispatches unsettled. Nothing here repairs it. Accept the warnings, read each green as "the gesture was sent, not that it landed", and put an explicit `wait:` or a raw `tool: await-ui-element` before a gesture that follows a transition. Raw `tool:` steps take no settle, so they never carry that warning.
|
|
66
|
+
|
|
67
|
+
A recorded wait carries a different warning: it adds about one second and reports that the runner tree is unavailable. That warning is expected too. Keep the wait as a raw `tool:` step.
|
|
66
68
|
|
|
67
69
|
Report that the flow is injection-free and its coordinates are not portable. It cannot satisfy the QA contract. Report the artifact and platform blocker instead.
|
|
68
70
|
|
|
@@ -233,7 +233,7 @@ Instead of polling `screenshot`/`describe` in a loop, use `await-ui-element` to
|
|
|
233
233
|
- `hidden` passes when the selector matches nothing. If `note` says it never matched, treat the check as failed and fix the selector. On iOS, a degraded empty tree does not report `hidden` success; the note gives the recovery hint.
|
|
234
234
|
- Optional `timeoutMs` (default 5000) and `pollIntervalMs` (default 400).
|
|
235
235
|
|
|
236
|
-
Returns `{ success, elapsed }
|
|
236
|
+
Returns `{ success, elapsed, note?, cause? }`. On failure, `note` describes the result. `cause` is `unmet`, `unreadable`, or `cancelled`. Only `unmet` means the tree was readable and the condition was false.
|
|
237
237
|
|
|
238
238
|
### await-screen-idle — Block until the screen stops changing
|
|
239
239
|
|
|
@@ -101,7 +101,7 @@ After the last edit and audit, set the streak to zero:
|
|
|
101
101
|
2. Seed, review, and freeze snapshot baselines. Baseline updates do not count as passes.
|
|
102
102
|
3. Before mobile pass 1, recycle Argent services for this flow's device: two warm passes are correlated evidence, because a fixed timing margin can pass twice simply because environment speed did not change. Scope `stop-all-simulator-servers` to `devices: [<device>]`. Never omit the scope — a bare call is the machine-wide sweep, and step 7 restarts this proof often enough to reap every other agent's devices repeatedly. Use the MCP call for `flow-execute`, or `argent run stop-all-simulator-servers --devices <device>` from the standalone runner's install. The reset must not change app or account data. For Chromium, let the runner boot the declared app and omit `device`. Vega owns no recyclable Argent services, so the teardown is a no-op there and both passes are warm.
|
|
103
103
|
4. Run from the flow's launch and setup without baseline-update mode. Count a pass only when `ok: true` and every acceptance check executed. A false `when:` can skip optional setup only. An errored step does not advance the streak, and the count mixes two kinds — read each reason. One that could not run (an unreadable tree under `idle`, an unresolvable `run:` target) is environment: fix it and rerun. **A failed `launch:` also scores `errored`, and it is a verdict about the app** — an app that no longer installs or starts is the regression this test exists to catch, so report it instead of rerunning.
|
|
104
|
-
5. Resolve every passing-step warning before completion. `await: { idle: true }` raises [six different warnings](../argent-create-flow/references/flow-yaml.md#idle-readiness), so read which one it is first. Two say the screen was moving. One says the wait ran out mid-hold and needs a larger `timeout:`. One says the tree stayed empty. One — **settled on the UI tree alone** — says the hierarchy did hold still and only the screenshot pairs were missing, so inspect the capture path rather than the app's rendering. One says the step ended with no evidence either way. Inspect the screen, disclose the cause, and verify that surrounding acceptance checks use stable elements rather than stillness. A [selector-less gesture](../argent-create-flow/references/flow-yaml.md#directives) — a coordinate `tap`/`long-press`, or a `pinch`/`rotate` with no `on:` — warns in a different shape: a tree-source outage left it unsettled, so it dispatched blind and the green says only that the gesture was sent. Restore the tree source, usually by relaunching the app so the instrumentation loads, and rerun. Accepting that warning needs an app that serves no tree, which cannot satisfy this contract anyway.
|
|
104
|
+
5. Resolve every passing-step warning before completion. Also resolve recorded-wait warnings from `flow-finish-recording`. Follow [Live waits and checks](../argent-create-flow/references/live-authoring.md#live-waits-and-checks). For runner warnings, `await: { idle: true }` raises [six different warnings](../argent-create-flow/references/flow-yaml.md#idle-readiness), so read which one it is first. Two say the screen was moving. One says the wait ran out mid-hold and needs a larger `timeout:`. One says the tree stayed empty. One — **settled on the UI tree alone** — says the hierarchy did hold still and only the screenshot pairs were missing, so inspect the capture path rather than the app's rendering. One says the step ended with no evidence either way. Inspect the screen, disclose the cause, and verify that surrounding acceptance checks use stable elements rather than stillness. A [selector-less gesture](../argent-create-flow/references/flow-yaml.md#directives) — a coordinate `tap`/`long-press`, or a `pinch`/`rotate` with no `on:` — warns in a different shape: a tree-source outage left it unsettled, so it dispatched blind and the green says only that the gesture was sent. Restore the tree source, usually by relaunching the app so the instrumentation loads, and rerun. Accepting that warning needs an app that serves no tree, which cannot satisfy this contract anyway.
|
|
105
105
|
6. Run the same YAML again immediately with the same runner. Do not manually reset app or account data.
|
|
106
106
|
7. Reset the streak after any failure, edit, re-recording, baseline update, or state-changing manual recovery. Repair through `argent-create-flow`, audit again, and restart with fresh services.
|
|
107
107
|
|