@swmansion/argent 0.35.1-next.12 → 0.35.1-next.14
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.4.0.apk +0 -0
- package/bin/darwin/argent-macos-helper +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/network-inspector/network-inspector.jar +0 -0
- package/bin/tcp/ax-service +0 -0
- package/dist/cli-cmds.mjs +22 -1
- package/dist/installer.mjs +1 -1
- package/dist/mcp-server.mjs +1 -1
- package/dist/tool-server.cjs +13 -1
- package/dylibs/libArgentAudio.dylib +0 -0
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/macos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/macos/libNativeDevtoolsMacos.dylib +0 -0
- package/dylibs/tcp/argent-audio-feeder +0 -0
- package/dylibs/tcp/libArgentAudio.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 +2 -2
- package/skills/argent-android-emulator-setup/SKILL.md +2 -2
- package/skills/argent-create-e2e/SKILL.md +1 -1
- package/skills/argent-device-interact/SKILL.md +21 -94
- package/skills/argent-device-interact/references/advanced.md +64 -0
- package/skills/argent-ios-device-interact/SKILL.md +1 -1
- package/skills/argent-ios-device-setup/SKILL.md +1 -1
- package/skills/argent-ios-simulator-setup/SKILL.md +1 -1
- package/skills/argent-lens/SKILL.md +1 -1
- package/skills/argent-macos-app-interact/SKILL.md +1 -1
- package/skills/argent-metro-debugger/SKILL.md +1 -1
- package/skills/argent-native-profiler/SKILL.md +1 -1
- package/skills/argent-qa-e2e/SKILL.md +1 -1
- package/skills/argent-react-native-app-workflow/SKILL.md +1 -1
- package/skills/argent-react-native-optimization/SKILL.md +1 -1
- package/skills/argent-react-native-profiler/SKILL.md +1 -1
- package/skills/argent-screen-recording/SKILL.md +1 -1
- package/skills/argent-screenshot-diff/SKILL.md +1 -1
- package/skills/argent-settings-permissions/SKILL.md +1 -1
- package/skills/argent-test-ui-flow/SKILL.md +1 -1
- package/skills/argent-tv-interact/SKILL.md +1 -1
|
Binary file
|
|
Binary file
|
package/bin/darwin/ax-service
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/tcp/ax-service
CHANGED
|
Binary file
|
package/dist/cli-cmds.mjs
CHANGED
|
@@ -38588,7 +38588,7 @@ function isCi(env = process.env) {
|
|
|
38588
38588
|
var SESSION_ID2 = randomUUID5();
|
|
38589
38589
|
function readCliVersion() {
|
|
38590
38590
|
if (true) {
|
|
38591
|
-
return "0.35.1-next.
|
|
38591
|
+
return "0.35.1-next.13";
|
|
38592
38592
|
}
|
|
38593
38593
|
return "0.0.0";
|
|
38594
38594
|
}
|
|
@@ -41106,6 +41106,23 @@ ${renderSummary(report, { withDevice: true })}`);
|
|
|
41106
41106
|
return exitAfterFlush(report.ok ? 0 : 1);
|
|
41107
41107
|
}
|
|
41108
41108
|
|
|
41109
|
+
// ../argent-cli/src/run-device-env.ts
|
|
41110
|
+
var DEVICE_ENV_VAR = "ARGENT_UDID";
|
|
41111
|
+
var DEVICE_FIELDS = ["udid", "device_id"];
|
|
41112
|
+
function requiredDeviceField(schema) {
|
|
41113
|
+
const properties = schema?.properties ?? {};
|
|
41114
|
+
const required2 = schema?.required ?? [];
|
|
41115
|
+
return DEVICE_FIELDS.find(
|
|
41116
|
+
(name) => required2.includes(name) && properties[name] && !isRetiredField(properties[name])
|
|
41117
|
+
);
|
|
41118
|
+
}
|
|
41119
|
+
function applyDeviceFromEnv(payload, schema, env = process.env) {
|
|
41120
|
+
const deviceId = env[DEVICE_ENV_VAR]?.trim();
|
|
41121
|
+
if (!deviceId) return;
|
|
41122
|
+
const field = requiredDeviceField(schema);
|
|
41123
|
+
if (field && !Object.hasOwn(payload, field)) payload[field] = deviceId;
|
|
41124
|
+
}
|
|
41125
|
+
|
|
41109
41126
|
// ../argent-cli/src/run.ts
|
|
41110
41127
|
function splitOptions(argv) {
|
|
41111
41128
|
let json2 = false;
|
|
@@ -41217,6 +41234,9 @@ Examples:
|
|
|
41217
41234
|
argent run run-sequence --udid <UDID> --steps-json '[{"tool":"button","args":{"button":"home"}}]'
|
|
41218
41235
|
argent run gesture-tap --args '{"udid":"<UDID>","x":0.5,"y":0.5}'
|
|
41219
41236
|
|
|
41237
|
+
Set ARGENT_UDID to use that device when a tool needs --udid or --device_id
|
|
41238
|
+
and the call does not pass one.
|
|
41239
|
+
|
|
41220
41240
|
Exits 1 when the tool fails. Also exits 1 when the result reports that the
|
|
41221
41241
|
call did not do its job: an e2e test that does not pass, an await-ui-element
|
|
41222
41242
|
or await-network-request wait with success=false, a run-sequence that a step
|
|
@@ -41343,6 +41363,7 @@ settled=false or debugger-status's not_connected.
|
|
|
41343
41363
|
for (const [k, v] of Object.entries(parsed.args)) {
|
|
41344
41364
|
payload[k] = v;
|
|
41345
41365
|
}
|
|
41366
|
+
applyDeviceFromEnv(payload, schema);
|
|
41346
41367
|
const missing = findMissingRequired(payload, schema);
|
|
41347
41368
|
if (missing.length > 0) {
|
|
41348
41369
|
await failValidation({ missing, invalid: [], rawIssues: null }, "cli_run_required_flags");
|
package/dist/installer.mjs
CHANGED
|
@@ -17103,7 +17103,7 @@ function isCi(env = process.env) {
|
|
|
17103
17103
|
var SESSION_ID = randomUUID4();
|
|
17104
17104
|
function readCliVersion() {
|
|
17105
17105
|
if (true) {
|
|
17106
|
-
return "0.35.1-next.
|
|
17106
|
+
return "0.35.1-next.13";
|
|
17107
17107
|
}
|
|
17108
17108
|
return "0.0.0";
|
|
17109
17109
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -38058,7 +38058,7 @@ async function startMcpServer(options) {
|
|
|
38058
38058
|
const autoDescribeOn = autoDescribeEnabled();
|
|
38059
38059
|
const whatsNewOn = whatsNewEnabled();
|
|
38060
38060
|
const installedVersion = getInstalledVersion();
|
|
38061
|
-
const highlightsVersion = true ? "0.35.1-next.
|
|
38061
|
+
const highlightsVersion = true ? "0.35.1-next.13" : installedVersion;
|
|
38062
38062
|
const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
|
|
38063
38063
|
const trees = createTreeMemory();
|
|
38064
38064
|
const screenshots = createScreenshotMemory();
|
package/dist/tool-server.cjs
CHANGED
|
@@ -72957,7 +72957,7 @@ function isCi(env = process.env) {
|
|
|
72957
72957
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
72958
72958
|
function readCliVersion() {
|
|
72959
72959
|
if (true) {
|
|
72960
|
-
return "0.35.1-next.
|
|
72960
|
+
return "0.35.1-next.13";
|
|
72961
72961
|
}
|
|
72962
72962
|
return "0.0.0";
|
|
72963
72963
|
}
|
|
@@ -75028,6 +75028,12 @@ var import_semver2 = __toESM(require_semver2());
|
|
|
75028
75028
|
// ../tool-server/package.json
|
|
75029
75029
|
var version2 = "0.35.0";
|
|
75030
75030
|
|
|
75031
|
+
// ../tool-server/src/utils/update-check-env.ts
|
|
75032
|
+
function isUpdateCheckDisabled() {
|
|
75033
|
+
const raw = process.env.ARGENT_DISABLE_UPDATE_CHECK;
|
|
75034
|
+
return raw === "1" || raw?.toLowerCase() === "true";
|
|
75035
|
+
}
|
|
75036
|
+
|
|
75031
75037
|
// ../tool-server/src/utils/update-checker.ts
|
|
75032
75038
|
var import_update_core = __toESM(require_dist7());
|
|
75033
75039
|
init_src();
|
|
@@ -75127,6 +75133,10 @@ function startUpdateChecker(options = {}) {
|
|
|
75127
75133
|
if (interval) {
|
|
75128
75134
|
clearInterval(interval);
|
|
75129
75135
|
}
|
|
75136
|
+
if (isUpdateCheckDisabled()) {
|
|
75137
|
+
return { dispose() {
|
|
75138
|
+
} };
|
|
75139
|
+
}
|
|
75130
75140
|
check2(options, generation).catch(() => {
|
|
75131
75141
|
});
|
|
75132
75142
|
const lifecycleInterval = setInterval(() => {
|
|
@@ -78920,6 +78930,7 @@ var updateArgentTool = {
|
|
|
78920
78930
|
id: "update-argent",
|
|
78921
78931
|
description: "Apply a pending Argent update. Call this only when the user has explicitly consented in this conversation to updating Argent, e.g. after an update notification reports a new version. Returns { message } with the update status, version info, and whether the tool server restarts. Fails if no update is available or an update is already in progress.",
|
|
78922
78932
|
zodSchema,
|
|
78933
|
+
hideWhen: isUpdateCheckDisabled,
|
|
78923
78934
|
interaction: {
|
|
78924
78935
|
startedMsg: () => `Updating Argent to ${getUpdateState().installableVersion ?? "latest"}`,
|
|
78925
78936
|
completedMsg: () => `Updated Argent to ${getUpdateState().installableVersion ?? "latest"}`,
|
|
@@ -173423,6 +173434,7 @@ var dismissUpdateTool = {
|
|
|
173423
173434
|
id: "dismiss-update",
|
|
173424
173435
|
description: "Postpone the Argent update reminder and the automatic update, on every tool-server on this machine, when the user wants it later or tomorrow, wants it stopped, or never wants it (87600 hours). Installs nothing. A memory or a reminder of your own does not change it. Returns { message, remindersResumeAt, persisted, pendingVersion }: tell the user when reminders resume, and if persisted is false, that it did not fully hold.",
|
|
173425
173436
|
zodSchema: zodSchema79,
|
|
173437
|
+
hideWhen: isUpdateCheckDisabled,
|
|
173426
173438
|
interaction: {
|
|
173427
173439
|
startedMsg: () => "Dismissing Argent update",
|
|
173428
173440
|
completedMsg: () => "Dismissed Argent update",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.35.1-next.
|
|
3
|
+
"version": "0.35.1-next.14",
|
|
4
4
|
"mcpName": "io.github.software-mansion/argent",
|
|
5
5
|
"description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"vitest": "^5.0.5",
|
|
99
99
|
"yaml": "^2.9.1"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "417672a11432f176fd4c1c28da3babc53057b58e"
|
|
102
102
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-android-emulator-setup
|
|
3
|
-
description:
|
|
3
|
+
description: Boot an Android emulator and find its serial with Argent. Use when no Android emulator is running yet or you need to pick and boot one.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 1. Prerequisites
|
|
@@ -14,7 +14,7 @@ The Android SDK (platform tools and emulator) and an AVD, created in Android Stu
|
|
|
14
14
|
|
|
15
15
|
## 3. Using the device
|
|
16
16
|
|
|
17
|
-
Pass the Android serial as `udid` to the same interaction tools as on iOS. See `argent-device-interact`
|
|
17
|
+
Pass the Android serial as `udid` to the same interaction tools as on iOS. See `argent-device-interact` (and its `references/advanced.md` for Android notes). If a React Native app can't reach Metro, see `argent-metro-debugger` §1.
|
|
18
18
|
|
|
19
19
|
## 4. Notes
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-create-e2e
|
|
3
|
-
description: Create, record, edit, replay, or repair reusable Argent e2e test YAML files. Use when the user asks to record, replay, or run an e2e test or
|
|
3
|
+
description: Create, record, edit, replay, or repair reusable Argent e2e test YAML files. Use when the user asks to record, replay, or run an e2e test or repeatable path, set up profiling/A-B comparison, or before repeating 3+ interactions. For one-off UI checks, writing QA regression tests, or screen video, use argent-test-ui-flow, argent-qa-e2e, or argent-screen-recording.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Create an Argent e2e test
|
|
@@ -1,103 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-device-interact
|
|
3
|
-
description:
|
|
3
|
+
description: Drive iOS, Android, or Chromium apps with Argent MCP tools. Use when tapping, swiping, typing, launching apps, waiting for UI, or taking screenshots (not for TV targets).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Each tool's
|
|
6
|
+
Each tool's description carries its parameters, defaults, and return shape. This skill covers routing and gotchas those descriptions don't state.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Target Routing
|
|
9
9
|
|
|
10
|
-
- Get a
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
10
|
+
- Get a `udid` from `list-devices` (or `boot-device` if none is ready). Full setup: `argent-ios-simulator-setup` / `argent-ios-device-setup` / `argent-android-emulator-setup`.
|
|
11
|
+
- Before driving a specialized target, read the matching instructions below:
|
|
12
|
+
- Physical iPhone (`kind: "device"`): `argent-ios-device-setup` and `argent-ios-device-interact`
|
|
13
|
+
- Mac app (`platform: "macos"`): `argent-macos-app-interact`
|
|
14
|
+
- TV (`runtimeKind: "tv"` or `platform: "vega"`): `argent-tv-interact`
|
|
15
|
+
- Chromium / HarmonyOS / foldables (`foldable: true`): `references/chromium.md`, `references/harmonyos.md`, `references/foldables.md`
|
|
16
|
+
- Load any deferred tool's schema (e.g. `gesture-custom`, `gesture-pinch`, `gesture-rotate`) before its first call so numbers don't serialize as strings.
|
|
17
|
+
- If delegating device tasks to sub-agents, ensure they have MCP permissions.
|
|
16
18
|
|
|
17
|
-
##
|
|
19
|
+
## Core Rules
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| Scroll (Chromium) | `gesture-scroll` | Mouse wheel |
|
|
28
|
-
| Drag (Chromium) | `gesture-drag` | Sliders, drag-and-drop, text selection |
|
|
29
|
-
| Long press, drag & drop | `gesture-custom` | Also any other non-linear touch sequence |
|
|
30
|
-
| Pinch / zoom | `gesture-pinch` | |
|
|
31
|
-
| Two-finger rotation | `gesture-rotate` | |
|
|
32
|
-
| Hardware key | `button` | Home, back, power, volume, appSwitch, actionButton |
|
|
33
|
-
| Type text or press a named key | `keyboard` | Every platform; text or one key per call (§6) |
|
|
34
|
-
| Paste text | `paste` | Only where a user would paste (§6). Sim/emu, Mac app |
|
|
35
|
-
| Rotate device | `rotate` | Orientation changes |
|
|
36
|
-
| Fold device | `fold` | Foldables only: `references/foldables.md` |
|
|
37
|
-
| Shake device | `shake` | Shake handlers (sim/emu only), Undo-typing prompt, RN dev menu |
|
|
38
|
-
| Slow or offline network | `network-conditions` | iOS simulator app, Android emulator, or Chromium tab |
|
|
39
|
-
| Wait for UI | `await-ui-element` | Block until an element is visible/hidden/exists/contains text |
|
|
40
|
-
| Wait for idle | `await-screen-idle` | Block until a non-empty tree holds for `minStableMs` (§4) |
|
|
21
|
+
- **Open apps directly:** use `launch-app` or `open-url`, never tap home-screen icons. Use `restart-app` for clean in-memory state.
|
|
22
|
+
- **Use the returned element tree:** interaction tools already attach a downscaled screenshot and `--- Elements after action (describe) ---` with normalized `[0,1]` tap frames. Call `describe` only when no fresh tree covers the current screen. Never derive routine tap coordinates from pixels.
|
|
23
|
+
- **Tree & screenshot IDs:** full trees/screenshots carry a `Tree id` / `Screenshot id`. When unchanged or slightly changed, a later result references that id (unchanged note or `-`/`+` diff); call `describe` or `screenshot` if that earlier result isn't in context. An identical tree does not mean the action did nothing.
|
|
24
|
+
- **Batch known steps:** use `run-sequence` when multiple consecutive steps are known ahead of time (scroll sweeps, type + enter, form fill + submit).
|
|
25
|
+
- **Text entry:** tap the field first (`keyboard` with no focus is a silent no-op). `keyboard` takes either `text` or `key`, not both. Keep `keyboard` as default; reserve `paste` for real paste flows (OTP, long tokens). Use `{{secret:<NAME>}}` placeholders for credentials and navigate/submit before capturing non-secure fields.
|
|
26
|
+
- **Wait server-side:** never poll `screenshot` or `describe` in a loop. Use `await-ui-element`, or use `await-screen-idle` before tapping moving UI.
|
|
27
|
+
- **Dialogs:** `describe` exposes simulator/emulator system & permission dialogs; prefer answering the app's dialog over `settings-permissions`.
|
|
28
|
+
- **Screenshots:** keep the default downscaled capture for UI checks; do not pass `scale: 1.0` as a tapping/readability aid.
|
|
41
29
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## 3. Finding Tap Targets
|
|
45
|
-
|
|
46
|
-
After an action moves you to a different screen, or whenever you don't know an element's coordinates, discover before tapping. Interaction results already carry the element tree (`--- Elements after action (describe) ---`): use it, and call a discovery tool only when no fresh tree covers the current screen. Each full tree has a `Tree id`, and each full screenshot has a `Screenshot id`. When the tree or screenshot matches an earlier one (or only a few tree lines changed), the result names that id in place of repeating it (an unchanged note, or `-` gone / `+` new lines against it): refer back to the named result, and call `describe` or `screenshot` if it is not in your context. An identical tree does not mean the action did nothing.
|
|
47
|
-
|
|
48
|
-
| Need | Tool |
|
|
49
|
-
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
50
|
-
| Any screen: app, system dialog, Home screen | `describe` |
|
|
51
|
-
| UIKit properties of a view (iOS simulator) | `native-find-views` (needs `bundleId` and a class, id, label, tag or `nativeID` to match) |
|
|
52
|
-
| What sits at a known raw point (iOS simulator) | `native-view-at-point` (the visually deepest view; `hitTest: true` for the view that receives touch) |
|
|
53
|
-
| Final visual fallback | `screenshot`, only when the tools above cannot expose the control. Do not derive routine in-app navigation targets from pixels |
|
|
54
|
-
|
|
55
|
-
If `describe` returns an empty tree, follow its `hint`; with no hint, the screen is blank, loading or unlabeled: check the attached screenshot and retry once content has loaded.
|
|
56
|
-
|
|
57
|
-
For a React Native testID or component name that `describe` does not show, use `debugger-component-tree`; take tap points from `describe`.
|
|
58
|
-
|
|
59
|
-
**React Native:** LogBox toasts sit over the bottom of the screen and catch taps meant for what is under them. Argent hides them when a `debugger-*` tool connects and after `debugger-reload-metro`; after `restart-app`, call a `debugger-*` tool again. After any other reload they come back: close each by tapping the right end of its `describe` frame (the X), not its middle.
|
|
60
|
-
|
|
61
|
-
**System and permission dialogs:** on a simulator or emulator, `describe` returns a visible dialog's buttons with tap coordinates; keep using it for in-app modals too. Fall back to `screenshot` only if it does not expose the controls: then tap one obvious button (`Allow`, `OK`, `Don't Allow`, `Not Now`, `Continue`) at a time, check the returned screenshot, and go back to `describe` once the dialog is gone.
|
|
62
|
-
|
|
63
|
-
> **Prefer the dialog over the Settings tool.** When the app triggers its own permission prompt, answering it is the real user path. Use `settings-permissions` only when you can't make the change through the app: set a permission _before_ the app asks, re-enable one the user denied (iOS won't re-prompt), or reset it so the prompt reappears. See `argent-settings-permissions`.
|
|
64
|
-
|
|
65
|
-
## 4. Waiting: `await-ui-element` and `await-screen-idle`
|
|
66
|
-
|
|
67
|
-
**Never poll `screenshot`/`describe` in a loop to wait for something.** `await-ui-element` blocks server-side on the same tree `describe` reads. It has no bare-timer mode; for a plain pause, use your own harness sleep. Its description covers conditions, selector matching and defaults. What it does not tell you:
|
|
68
|
-
|
|
69
|
-
- A `hidden` check that succeeds **immediately** may be a false pass: its `note` then says the selector never matched anything. Treat that as a failed check and fix the selector; it does not mean "the element went away".
|
|
70
|
-
- The synthetic `ROOT` container `describe` prints is never matched, so a `role` like `AXGroup`/`html` won't trivially "match the screen".
|
|
71
|
-
- To disambiguate a loose selector, pin `role` to a text role like `StaticText`; that skips a same-named button.
|
|
72
|
-
|
|
73
|
-
`await-screen-idle` is for live diagnosis after a launch or navigation, before a raw tap on an element that may still be moving. Continue only when `settled: true`, and pair it with an `await-ui-element` for the destination: stillness does not identify a screen, and the tool can return during a presentation-layer animation. Do not record it in an e2e test; tests use `await: { idle: true }`, which also compares pixels.
|
|
74
|
-
|
|
75
|
-
## 5. Action Sequencing with `run-sequence`
|
|
76
|
-
|
|
77
|
-
Use `run-sequence` when every step is known in advance; if a step depends on what the previous one shows, use separate calls. Its description lists the allowed tools and their arguments. Typical batches:
|
|
78
|
-
|
|
79
|
-
- "scroll to bottom", "scroll until X": 3-5 swipes
|
|
80
|
-
- "clear and retype a field": triple-tap to select all, then type the new value
|
|
81
|
-
- typing then submitting: a `keyboard` text step, then a `keyboard` `enter` step (one call cannot carry both)
|
|
82
|
-
- "submit form": fill every field, then tap submit
|
|
83
|
-
- "go back to X": a known tap path
|
|
84
|
-
|
|
85
|
-
Use `await-ui-element` to gate a step on a screen transition. To gate on a request, start capture before the sequence and put `await-network-request` after the triggering action. A failed step, including a wait with `success: false`, stops the sequence and returns partial results.
|
|
86
|
-
|
|
87
|
-
## 6. Text Entry and Secrets
|
|
88
|
-
|
|
89
|
-
- Tap the field first. Typing or pasting with no focused field is a silent no-op.
|
|
90
|
-
- `paste` is **not** a faster `keyboard`. `keyboard` types the way a user types and stays the default for every text entry. Use `paste` only where a real user would paste: a 2FA / OTP code from another app, a long link or token, or testing how the app handles pasted input. That it can carry text `keyboard` can't type on a platform (multi-line text, non-ASCII on Android) is not a reason on its own.
|
|
91
|
-
- **Credentials:** type them as a `{{secret:<NAME>}}` placeholder in `text` (`keyboard`, `paste`, `run-sequence` keyboard steps, e2e `type` steps), never as plaintext, and never ask the user for the value. Do **not** `describe` or `screenshot` a non-secure field you just filled with a secret: submit or navigate away first, then verify the resulting screen.
|
|
92
|
-
|
|
93
|
-
## 7. Screenshots
|
|
94
|
-
|
|
95
|
-
Interaction tools already attach a screenshot. Call `screenshot` for the initial state, for a baseline before you change visible UI, to check state after a delay, or when the attached capture shows a transitional or loading frame.
|
|
96
|
-
|
|
97
|
-
Keep the default downscaled capture for UI context and state checks; do not use `scale: 1.0` as a readability or tapping aid. Full resolution is only for saving baseline/current PNGs for comparison (`scale: 1.0` with `includeImageInContext: false`); for visual regression checks use the `argent-screenshot-diff` skill.
|
|
98
|
-
|
|
99
|
-
If `screenshot` times out, restart the device transport with `stop-simulator-server`.
|
|
100
|
-
|
|
101
|
-
## 8. Android notes
|
|
102
|
-
|
|
103
|
-
- **First-launch permission prompts**: `reinstall-app` on Android installs with `-g`, so runtime permissions are pre-granted on first launch.
|
|
30
|
+
Read `references/advanced.md` when you need: the full tool table, `network-conditions` reset, React Native LogBox dismissal, an empty `describe` tree or a `screenshot` timeout, `await-ui-element`/`await-screen-idle` edge cases, `run-sequence` gating, `paste`/secrets rules, or Android `reinstall-app` notes.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Advanced Interaction Notes
|
|
2
|
+
|
|
3
|
+
## Tool Reference
|
|
4
|
+
|
|
5
|
+
| Action | Tool | Notes |
|
|
6
|
+
| --------------------------- | ---------------------------------------- | ----------------------------------------------------------------------- |
|
|
7
|
+
| Several known steps | `run-sequence` | One call, one screenshot at the end |
|
|
8
|
+
| Open / restart app | `launch-app` / `restart-app` | Never tap home-screen icons; `restart-app` clears in-memory state |
|
|
9
|
+
| Open URL / deep link | `open-url` | Web pages, deep links, URL schemes |
|
|
10
|
+
| Tap / swipe | `gesture-tap` / `gesture-swipe` | Touch targets; not Chromium for swipe |
|
|
11
|
+
| Scroll / drag (Chromium) | `gesture-scroll` / `gesture-drag` | Mouse wheel; sliders, drag-and-drop, text selection |
|
|
12
|
+
| Long press, drag & drop | `gesture-custom` | Also any non-linear touch sequence |
|
|
13
|
+
| Pinch / rotate gesture | `gesture-pinch` / `gesture-rotate` | Two-finger gestures |
|
|
14
|
+
| Hardware key / rotate | `button` / `rotate` | Home, back, power, volume, appSwitch, actionButton; orientation changes |
|
|
15
|
+
| Shake device | `shake` | Shake handlers (sim/emu only), Undo-typing prompt, RN dev menu |
|
|
16
|
+
| Fold device | `fold` | Foldables only (`references/foldables.md`) |
|
|
17
|
+
| Type text / press named key | `keyboard` | Every platform; text or one key per call |
|
|
18
|
+
| Paste text | `paste` | Only where a user would paste; sim/emu, Mac app |
|
|
19
|
+
| Slow or offline network | `network-conditions` | iOS sim app, Android emu, or Chromium tab |
|
|
20
|
+
| Wait for UI / idle | `await-ui-element` / `await-screen-idle` | Server-side waits |
|
|
21
|
+
|
|
22
|
+
## Network Conditions Recovery
|
|
23
|
+
|
|
24
|
+
After a network test, call `network-conditions` with the same target and omit the conditions to reset. On Android, this brings an offline emulator back online. If an Argent crash leaves an emulator's proxy active, reset before retrying.
|
|
25
|
+
|
|
26
|
+
## Discovery & React Native LogBox
|
|
27
|
+
|
|
28
|
+
- **UIKit view lookup (iOS simulator):** `native-find-views` (needs `bundleId` and a class, id, label, tag, or `nativeID`) and `native-view-at-point` (visually deepest view; `hitTest: true` for touch target).
|
|
29
|
+
- **React Native component names / testIDs:** `debugger-component-tree` when `describe` omits them; still take tap points from `describe`.
|
|
30
|
+
- **React Native LogBox toasts:** sit over the bottom of the screen and catch taps meant for what is under them. Argent hides them when a `debugger-*` tool connects and after `debugger-reload-metro`; after `restart-app`, call a `debugger-*` tool again. After any other reload they come back: close each by tapping the right end of its `describe` frame (the X), not its middle.
|
|
31
|
+
- **Empty `describe` tree:** follow its `hint` if present. If there's no hint, the screen is blank, loading, or unlabeled. Check the attached screenshot and retry once content loads.
|
|
32
|
+
- **System / permission dialogs:** on a simulator or emulator, `describe` returns visible dialog buttons with tap coordinates (and in-app modals too). Fall back to `screenshot` only if `describe` omits them. Tap one obvious button (`Allow`, `OK`, `Don't Allow`, `Not Now`, `Continue`) at a time, check the screenshot, and return to `describe` once dismissed. Prefer answering the app's own dialog over `settings-permissions`. Use `settings-permissions` only to pre-authorize, re-enable a denied permission (iOS won't re-prompt), or reset prompts. See `argent-settings-permissions`.
|
|
33
|
+
|
|
34
|
+
## Waiting: `await-ui-element` and `await-screen-idle`
|
|
35
|
+
|
|
36
|
+
- `await-ui-element` blocks server-side on the same tree `describe` reads. It has no bare-timer mode; for a plain pause, use your own harness sleep.
|
|
37
|
+
- The synthetic `ROOT` container `describe` prints is never matched, so a `role` like `AXGroup`/`html` won't trivially match the screen.
|
|
38
|
+
- To disambiguate a loose selector, pin `role` to a text role like `StaticText` to skip a same-named button.
|
|
39
|
+
- `await-screen-idle` is for live diagnosis after a launch or navigation before a raw tap on a moving element. Continue only when `settled: true`, and pair it with `await-ui-element` for the destination: stillness does not identify a screen, and the tool can return during a presentation-layer animation. Do not record it in an e2e test; tests use `await: { idle: true }`, which also compares pixels.
|
|
40
|
+
|
|
41
|
+
## Action Sequencing with `run-sequence`
|
|
42
|
+
|
|
43
|
+
Use `run-sequence` when every step is known in advance; if a step depends on what the previous one shows, use separate calls. Typical batches:
|
|
44
|
+
|
|
45
|
+
- Scroll to bottom / until X: 3–5 swipes
|
|
46
|
+
- Clear and retype a field: triple-tap to select all, then type
|
|
47
|
+
- Type then submit: a `keyboard` text step, then a `keyboard` `enter` step
|
|
48
|
+
- Submit form: fill every field, then tap submit
|
|
49
|
+
- Known tap path: e.g. navigating back through screens
|
|
50
|
+
|
|
51
|
+
Use `await-ui-element` to gate a step on a screen transition. To gate on an HTTP request, start capture before the sequence and put `await-network-request` after the triggering action. A failed step (including a wait with `success: false`) stops the sequence with partial results.
|
|
52
|
+
|
|
53
|
+
## Text Entry, Paste & Secrets
|
|
54
|
+
|
|
55
|
+
- Tap the field first; typing or pasting with no focused field is a silent no-op.
|
|
56
|
+
- `paste` is **not** a faster `keyboard`. Keep `keyboard` as the default; use `paste` only where a real user would paste (OTP/2FA codes, long links/tokens, or testing paste handling). Platform text limitations alone are not a reason to switch to `paste`.
|
|
57
|
+
- **Credentials:** pass `{{secret:<NAME>}}` placeholders in `text` (`keyboard`, `paste`, `run-sequence` keyboard steps, e2e `type` steps), never plaintext, and never ask the user for the value. Do **not** `describe` or `screenshot` a non-secure field you just filled with a secret: submit or navigate away first, then verify the resulting screen.
|
|
58
|
+
|
|
59
|
+
## Screenshots & Android Notes
|
|
60
|
+
|
|
61
|
+
- Call `screenshot` for initial state, baselines before visible UI changes, state after a delay, or when an attached capture shows a transitional/loading frame.
|
|
62
|
+
- Keep the default downscaled capture for routine checks; reserve `scale: 1.0` (with `includeImageInContext: false`) for saving baselines/currents for `argent-screenshot-diff`.
|
|
63
|
+
- If `screenshot` times out, restart the device transport with `stop-simulator-server`.
|
|
64
|
+
- **Android first-launch permissions:** `reinstall-app` on Android installs with `-g`, pre-granting runtime permissions on first launch.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-ios-device-interact
|
|
3
|
-
description: Drive a physical iPhone
|
|
3
|
+
description: Drive a physical iPhone with Argent. Use when targeting a physical iPhone (list-devices kind "device") and ONLY then, never a simulator. For setup/signing, use `argent-ios-device-setup`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Physical iPhone interaction
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-ios-device-setup
|
|
3
|
-
description: Set up a physical iPhone over USB or
|
|
3
|
+
description: Set up a physical iPhone over USB or CoreDevice tunnel for Argent. Use when a physical iPhone is involved (kind "device") and ONLY then; never for a simulator.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Physical iPhone setup
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-ios-simulator-setup
|
|
3
|
-
description:
|
|
3
|
+
description: Boot an iOS simulator and find its UDID with Argent. Use when no simulator is booted yet or you need to pick and boot one.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 1. Setup Steps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-lens
|
|
3
|
-
description: Propose
|
|
3
|
+
description: Propose visual design variants for on-screen elements so the user can pick in Argent Lens. Use when presenting UI design alternatives or A/B choices.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
> **Prerequisite: feature flag.** This workflow is gated behind the `argent-lens` flag (off by default). Run `argent enable argent-lens` once before using it. If `propose_variant` comes back not-found, the flag is off; enable it and retry.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-macos-app-interact
|
|
3
|
-
description: Drive a native Mac app (AppKit, SwiftUI, react-native-macos,
|
|
3
|
+
description: Drive a native Mac app (AppKit, SwiftUI, react-native-macos, Catalyst) with Argent. Use when targeting platform "macos" or a native macOS app, never iOS or Electron/Chromium.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
`argent-device-interact` still applies for everything not listed here (`run-sequence`, `await-ui-element`, secrets).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-metro-debugger
|
|
3
|
-
description: Debug
|
|
3
|
+
description: Debug JS with Argent in React Native (iOS, Android, Vega, macOS) or Chromium/Electron (CDP). Use when reading console logs, inspecting React trees, evaluating JS, or checking HTTP requests.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 1. Prerequisites
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-native-profiler
|
|
3
|
-
description:
|
|
3
|
+
description: Profile native CPU hotspots, UI hangs, memory, and iOS launch time via Instruments (iOS/Mac) or Perfetto (Android). Use when diagnosing native performance issues.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 1. Tools and platforms
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-qa-e2e
|
|
3
|
-
description: Write repeatable QA regression e2e tests from test cases, tickets, or acceptance criteria. Use when the user asks to write, automate, or generate an e2e test or preserve
|
|
3
|
+
description: Write repeatable QA regression e2e tests from test cases, tickets, or acceptance criteria (iOS, Android, Chromium, Mac apps, Vega; not Apple TV/Android TV). Use when the user asks to write, automate, or generate an e2e test or preserve a regression scenario. For one-off checks or replayable paths without criteria, use argent-test-ui-flow or argent-create-e2e.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Create a QA regression e2e test
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-react-native-app-workflow
|
|
3
|
-
description:
|
|
3
|
+
description: Develop and debug React Native apps on iOS simulator or Android emulator. Use when starting the app, debugging Metro, fixing builds, diagnosing runtime errors, or running tests.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Physical iPhone (`kind: "device"`): Metro debugging and profiling tools reject it. Use a simulator. Exception: measure and profile app launch on the iPhone with `native-profiler-launch-analysis` (`argent-native-profiler` §4).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-react-native-optimization
|
|
3
|
-
description:
|
|
3
|
+
description: Entry-point for React Native performance optimization; profiles first via `argent-react-native-profiler`. Use when the app feels slow, fixing re-renders or jank, or improving startup/TTI.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Rules
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-react-native-profiler
|
|
3
|
-
description: Profile a React Native Hermes app
|
|
3
|
+
description: Profile a React Native Hermes app for JS re-renders and CPU hotspots via Argent profiler tools. Use when measuring before/after performance, diagnosing re-renders, or finding CPU hotspots.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
This skill is complementary to `argent-react-native-optimization`, not a replacement for it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-screen-recording
|
|
3
|
-
description: Record a screen video with Argent on
|
|
3
|
+
description: Record a screen video with Argent on iOS, Android, or Mac apps. Use when asked to capture a video clip of a flow, interaction, or animation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
`screen-recording-start` and `screen-recording-stop` carry the options (`timeLimitSeconds`, `trimStatic`, `showTouches`) and the result fields. One recording per device at a time; different devices can record concurrently.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-screenshot-diff
|
|
3
|
-
description: Compare saved or live app screenshots
|
|
3
|
+
description: Compare saved or live app screenshots via `screenshot-diff`. Use when checking visual regressions, before/after UI diffs, layout, typography, or rendering changes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## 1. Role
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-settings-permissions
|
|
3
|
-
description: Grant, deny, or reset
|
|
3
|
+
description: Grant, deny, or reset app runtime permissions out-of-band on an iOS simulator or Android device via `settings-permissions`. Use when the app's own dialog or toggle cannot change the permission.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
`settings-permissions` edits the platform's permission store directly (the iOS simulator's TCC database, Android's runtime permissions over adb). It is a **test-setup / out-of-band** tool, not a general permissions toggle: the default way to change a permission is still through the app. The tool's description covers the supported permissions per platform, the parameters, the result (`applied` / `skipped`) and the per-platform requirements.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-test-ui-flow
|
|
3
|
-
description: Autonomously
|
|
3
|
+
description: Autonomously verify one-off mobile UI flows (iOS/Android) with interact-screenshot-verify loops. Use when testing navigation, login, manual QA steps, or visible UI changes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Before testing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: argent-tv-interact
|
|
3
|
-
description: Control
|
|
3
|
+
description: Control Apple TV (tvOS), Android TV (leanback), and Fire TV (Vega) via Argent (D-pad remote, focus tree, Vega JS debugging). Use when targeting runtimeKind "tv", platform "vega", or a TV app.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Argent TV (Apple TV + Android TV + Fire TV)
|