@swmansion/argent 0.33.1-next.2 → 0.33.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/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 +267 -70
- package/dist/client.js +253 -56
- package/dist/flow-script-runner.mjs +148 -5
- package/dist/installer.mjs +52 -26
- package/dist/ios-device-runner/ArgentRunner/ArgentRunnerUITests/ArgentRunnerSession+Snapshot.swift +110 -4
- package/dist/mcp-server.mjs +327 -68
- package/dist/tool-args.generated.d.ts +3 -1
- package/dist/tool-server.cjs +1367 -698
- 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/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 -3
- package/rules/argent.md +1 -1
- package/skills/argent-create-e2e/references/e2e-yaml.md +11 -1
- package/skills/argent-create-e2e/references/reliability-and-recovery.md +1 -1
- package/skills/argent-device-interact/SKILL.md +2 -2
- package/skills/argent-device-interact/references/harmonyos.md +1 -1
- package/skills/argent-react-native-app-workflow/SKILL.md +1 -1
- package/skills/argent-test-ui-flow/SKILL.md +6 -8
- package/assets/trace-processor/SHA256SUMS +0 -4
- package/assets/trace-processor/engine.mjs +0 -42423
|
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.33.1-next.
|
|
3
|
+
"version": "0.33.1-next.21",
|
|
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",
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"default": "./dist/client.js"
|
|
16
16
|
},
|
|
17
17
|
"./assets/manifest": "./assets/manifest.json",
|
|
18
|
-
"./assets/trace-processor/engine": "./assets/trace-processor/engine.mjs",
|
|
19
18
|
"./assets/trace-processor/engine_bundle.node": "./assets/trace-processor/engine_bundle.node.js",
|
|
20
19
|
"./bin/argent-simulator-server": "./bin/argent-simulator-server.cjs",
|
|
21
20
|
"./dist/bundled-paths": "./dist/bundled-paths.js",
|
|
@@ -52,7 +51,7 @@
|
|
|
52
51
|
},
|
|
53
52
|
"private": false,
|
|
54
53
|
"engines": {
|
|
55
|
-
"node": ">=
|
|
54
|
+
"node": "^22.18.0 || >=23.8.0"
|
|
56
55
|
},
|
|
57
56
|
"publishConfig": {
|
|
58
57
|
"registry": "https://registry.npmjs.org",
|
package/rules/argent.md
CHANGED
|
@@ -9,7 +9,7 @@ Argent - general rules:
|
|
|
9
9
|
- use the platform the user named; otherwise prefer a device `list-devices` shows already running, and don't default to iOS; in a single-platform project boot that platform.
|
|
10
10
|
- if tap fails twice, stop retrying and re-run a discovery tool
|
|
11
11
|
- Prefer mcp-tool calls over raw commands like `xcrun` or `adb`; use them as fallback.
|
|
12
|
-
- Interaction tools return screenshot and element tree automatically.
|
|
12
|
+
- Interaction tools return screenshot and element tree automatically; an identical earlier tree is named by its tree id, not repeated.
|
|
13
13
|
- prefer `launch-app` or `open-url` than tapping icons on home screen.
|
|
14
14
|
- If a task can require a saved e2e test, load `argent-create-e2e` (`argent-qa-e2e` for acceptance tests) before the first launch or in-app action; recording is not retroactive.
|
|
15
15
|
- Load the matching `argent-*` skill before React Native build/debug, profiling, a physical phone, a Mac app or a TV.
|
|
@@ -252,7 +252,17 @@ A `run:` target is a YAML path resolved against the directory of the test file c
|
|
|
252
252
|
|
|
253
253
|
Use the map form shown above. A bare `script: scripts/seed.mjs` is invalid.
|
|
254
254
|
|
|
255
|
-
`path` is relative to the test file that contains the step.
|
|
255
|
+
`path` is relative to the test file that contains the step. Use an `.mjs` or `.js` file, or an `.mts` or `.ts` file for TypeScript, and match the file name's letter case. `timeout` is in milliseconds, as in `e2e-add-script`.
|
|
256
|
+
|
|
257
|
+
`.mjs` and `.mts` are always ES modules. `.js` and `.ts` take their module type from the project's `package.json` `type` field; with no `type`, Node reads a file with `import`, `export` or top-level `await` as an ES module, and each other file as CommonJS. So prefer `.mjs` or `.mts` for a new script and use `.js` or `.ts` for a script the project already has. `.cjs` and `.cts` are invalid: under `"type": "module"`, use `import` in the script, not `require`.
|
|
258
|
+
|
|
259
|
+
Node runs `.mts` and `.ts` by removing the types, and it does not read `tsconfig.json`. In an `.mts` or `.ts` script:
|
|
260
|
+
|
|
261
|
+
- Use no `enum`, runtime `namespace`, parameter property or `paths` alias.
|
|
262
|
+
- Write the extension in each relative import (`./helpers.mts`), and import shared code only from `.mts` or `.mjs` files.
|
|
263
|
+
- Import a type with `import type`.
|
|
264
|
+
|
|
265
|
+
If the reason says that the Node.js of the tool-server cannot run TypeScript, use `.mjs` or `.js` files.
|
|
256
266
|
|
|
257
267
|
Over a link (`argent link` or `ARGENT_TOOLS_URL`, also to 127.0.0.1), `e2e-add-script` refuses the call, and a replay rejects a test with a `script:` step. Record and replay a test with a script without a link.
|
|
258
268
|
|
|
@@ -99,7 +99,7 @@ When an overlay intersects the next target:
|
|
|
99
99
|
3. Record the same selector as `hidden`.
|
|
100
100
|
4. Only then touch the covered region.
|
|
101
101
|
|
|
102
|
-
Do not rely on auto-dismiss timers. Prefer an app e2e affordance that disables transient overlays. On iOS, use `native-
|
|
102
|
+
Do not rely on auto-dismiss timers. Prefer an app e2e affordance that disables transient overlays. On iOS, use `native-view-at-point` with `hitTest: true` for hit-test diagnosis. Other platforms rely on the recorded visibility trio.
|
|
103
103
|
|
|
104
104
|
Keep a dismissal swipe only when the UI supports it. Pass it through the coordinate gate and hard-check that the overlay disappeared.
|
|
105
105
|
|
|
@@ -40,13 +40,13 @@ Each tool's own description carries its parameters, defaults, return shape and e
|
|
|
40
40
|
|
|
41
41
|
## 3. Finding Tap Targets
|
|
42
42
|
|
|
43
|
-
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.
|
|
43
|
+
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 tree has a `Tree id`. When the tree is identical to an earlier one, the result names that id in place of the tree: use that tree, and call `describe` if it is not in your context. An identical tree does not mean the action did nothing.
|
|
44
44
|
|
|
45
45
|
| Need | Tool |
|
|
46
46
|
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
47
47
|
| Any screen: app, system dialog, Home screen | `describe` |
|
|
48
48
|
| UIKit properties of a view (iOS simulator) | `native-find-views` (needs `bundleId` and a class, id, label, tag or `nativeID` to match) |
|
|
49
|
-
| What sits at a known raw point (iOS simulator) | `native-
|
|
49
|
+
| 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) |
|
|
50
50
|
| Final visual fallback | `screenshot`, only when the tools above cannot expose the control. Do not derive routine in-app navigation targets from pixels |
|
|
51
51
|
|
|
52
52
|
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.
|
|
@@ -17,7 +17,7 @@ Refused as unsupported on harmony:
|
|
|
17
17
|
|
|
18
18
|
- `gesture-rotate` and `gesture-custom`: the device moves each contact along one straight line per call, so there is no arc and no long-press. There is no long-press tool on HarmonyOS.
|
|
19
19
|
- `gesture-drag` and `gesture-scroll` (Chromium-only), and `rotate`: the device has no orientation command.
|
|
20
|
-
- `native-view-at-point`, `
|
|
20
|
+
- `native-view-at-point`, `debugger-component-tree`, the rest of the debugger (`debugger-evaluate`, `debugger-log-registry`), `view-network-logs` and the profilers.
|
|
21
21
|
- `paste`, so a `{{secret:...}}` placeholder goes through `keyboard` only.
|
|
22
22
|
- Screen recording: HarmonyOS exposes no readable frame stream. Use `screenshot` for a still frame.
|
|
23
23
|
|
|
@@ -15,7 +15,7 @@ react-native-macos app: start Metro (§1.2), then follow `argent-macos-app-inter
|
|
|
15
15
|
|
|
16
16
|
**If the project structure is convoluted, ask the user before proceeding.**
|
|
17
17
|
|
|
18
|
-
Once you know how the project starts Metro, builds and runs the app, and what environment setup it needs,
|
|
18
|
+
Once you know how the project starts Metro, builds and runs the app, and what environment setup it needs, reuse that for the rest of the session instead of rediscovering it.
|
|
19
19
|
|
|
20
20
|
### 1.2 Start Metro
|
|
21
21
|
|
|
@@ -16,8 +16,7 @@ For implementation tasks that modify visible UI, this workflow also serves as a
|
|
|
16
16
|
1. **Baseline screenshot**: call `screenshot` to see the current UI state. For visual regression comparison or UI change verification, capture the baseline at `scale: 1.0` with `includeImageInContext: false` and keep the returned `path` before editing whenever feasible.
|
|
17
17
|
2. **Find target**: get element coordinates from a discovery tool before tapping:
|
|
18
18
|
- **App screens (React Native included), in-app modals and system dialogs**: `describe`. Fall back to `screenshot` only if an overlay is not exposed reliably. When the app raises its own permission dialog, answer it here; that's the real flow under test. To take a prompt _out_ of the flow, use `argent-settings-permissions` during setup.
|
|
19
|
-
|
|
20
|
-
3. **Interact**: perform the action (`gesture-tap`, `gesture-swipe`, `keyboard`, `button`, ...); you receive a screenshot automatically.
|
|
19
|
+
3. **Interact**: perform the action (`gesture-tap`, `gesture-swipe`, `keyboard`, `button`, ...); you receive a screenshot and element tree automatically (an identical earlier tree is named by its `Tree id`, not repeated).
|
|
21
20
|
4. **Verify**: check the returned screenshot. If it shows a loading/transitional state, block with `await-ui-element` (expected element `visible`, or a spinner `hidden`) rather than a guessed delay (its result carries the new screenshot and element tree), but only with a selector you can trust (`text`/`identifier`/`role`) that the screen is known to have or that you saw in a prior `describe`; a guessed one just times out. Otherwise use a short fixed wait. Pick evidence by what's being asserted:
|
|
22
21
|
- **Visual** (layout, spacing, color, typography, image/icon rendering, clipping, overflow, text rendering): prefer `screenshot-diff` against the step 1 baseline: it surfaces pixel-visible changes the auto-screenshot might miss. Fall back to inspecting the auto-screenshot only when a stable baseline isn't available.
|
|
23
22
|
- **Structural** (navigation state, element existence, accessibility labels/values, selection, hierarchy, route): verify with `describe` or `debugger-component-tree`.
|
|
@@ -29,13 +28,12 @@ For implementation tasks that modify visible UI, this workflow also serves as a
|
|
|
29
28
|
## 2. Example: login flow
|
|
30
29
|
|
|
31
30
|
```
|
|
32
|
-
1.
|
|
33
|
-
2. gesture-tap
|
|
31
|
+
1. describe → login screen
|
|
32
|
+
2. gesture-tap email field (frame centre from the tree)
|
|
34
33
|
3. keyboard { text: "user@example.com" }
|
|
35
|
-
4. gesture-tap
|
|
36
|
-
5. keyboard { text: "{{secret:APP_PASSWORD}}" }
|
|
37
|
-
6.
|
|
38
|
-
7. screenshot → verify home screen appeared
|
|
34
|
+
4. gesture-tap password field (from the returned tree)
|
|
35
|
+
5. run-sequence: keyboard { text: "{{secret:APP_PASSWORD}}" }, gesture-tap Login button
|
|
36
|
+
6. await-ui-element → home screen appeared
|
|
39
37
|
```
|
|
40
38
|
|
|
41
39
|
> **Credentials:** never type plaintext credentials; use a `{{secret:<NAME>}}` placeholder (`keyboard`'s `text` parameter lists where it is read from and what to do when a name is missing). Never invent credentials or echo secret values into reports or saved files.
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
c1c25c299b74cc9b9651592c94b669c91916434a2990f214f03c8135c848d3fa trace_processor.wasm
|
|
2
|
-
390f39007f0a617c44d88df051cbec33f52b1cffad145748a51f5b4961a4ffd9 engine_bundle.node.js
|
|
3
|
-
321e956788280009b2f7a89be8f6c8c745107642e3288c71c6c180100ffbaac4 engine.mjs
|
|
4
|
-
73f3b0eee3d8d064888f928c52211f33bdcc9145925a9e1340d07cd78ed62351 LICENSE
|