@swmansion/argent 0.20.1-next.8 → 0.21.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/simulator-server +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/linux/simulator-server +0 -0
- package/bin/linux-arm64/simulator-server +0 -0
- package/bin/tcp/ax-service +0 -0
- package/bin/win32/simulator-server.exe +0 -0
- package/dist/cli-cmds.mjs +6 -1
- package/dist/installer.mjs +2 -1
- package/dist/mcp-server.mjs +2 -1
- package/dist/tool-server.cjs +499 -152
- 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 +1 -1
- package/skills/argent-create-flow/references/live-authoring.md +11 -11
- package/skills/argent-create-flow/references/reliability-and-recovery.md +1 -1
- package/skills/argent-device-interact/SKILL.md +7 -5
- package/skills/argent-tv-interact/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
|
@@ -110,7 +110,7 @@ An Android app that needs a non-launcher activity has no `launch:` form. Record
|
|
|
110
110
|
|
|
111
111
|
In a `scroll-to` map, put the selector under `target:`. The map supports `up`, `down`, `left`, and `right` directions. The default is `down`; set it explicitly to reach a target above the viewport or along a horizontal carousel. If the target is already visible, the step is a safe no-op. `tap`, `type`, and `long-press` do not auto-scroll. Add `scroll-to` when the target can be off-screen. Use `within` for a nested scroller.
|
|
112
112
|
|
|
113
|
-
`type` presses Enter unless `submit: false`. A polished focus tap plus keyboard call usually needs `submit: false`. Store external values as `{{secret:NAME}}`. The runner uses the first source that defines the name: environment `ARGENT_SECRET_NAME`; project `.argent/secrets.env`; project `.env.local`, then `.env`; then `~/.argent/secrets.env`. The two `secrets.env` files accept the bare `NAME`, but the shared dotenv files expose only `ARGENT_SECRET_`-prefixed keys, so a bare `NAME=…` in `.env` or `.env.local` stays unresolved. The runner redacts every resolved value, so do not use a placeholder for content a report must show.
|
|
113
|
+
`type` presses Enter in a second `keyboard` call unless `submit: false`. A polished focus tap plus one text-only `keyboard` call usually needs `submit: false`. Store external values as `{{secret:NAME}}`. The runner uses the first source that defines the name: environment `ARGENT_SECRET_NAME`; project `.argent/secrets.env`; project `.env.local`, then `.env`; then `~/.argent/secrets.env`. The two `secrets.env` files accept the bare `NAME`, but the shared dotenv files expose only `ARGENT_SECRET_`-prefixed keys, so a bare `NAME=…` in `.env` or `.env.local` stays unresolved. The runner redacts every resolved value, so do not use a placeholder for content a report must show.
|
|
114
114
|
|
|
115
115
|
A **selector-less gesture** — a coordinate `tap`/`long-press`, or a `pinch`/`rotate` with no `on:` — resolves no frame, so a tree source it cannot read does not fail it. It settles best effort, dispatches anyway, and the step **passes carrying a warning** that quotes the source's own error. That green says the gesture was sent, not that it landed: one aimed at a moving element can miss it entirely. Restore the tree source, usually by relaunching the app so the instrumentation loads. Accept the warning only where the app serves no tree at all, and put an explicit `wait:` before a gesture that follows a transition. The first such gesture proves the outage and later ones spend that verdict without paying the settle window again. A tree read that comes back, or a relaunch, retires that verdict — which only makes the next gesture pay a fresh window, and it warns again if the source is still down.
|
|
116
116
|
|
|
@@ -111,7 +111,7 @@ Never tap the on-screen keyboard through the recorder. Some platforms expose it
|
|
|
111
111
|
|
|
112
112
|
### Typing
|
|
113
113
|
|
|
114
|
-
Record the focus tap, then record `keyboard`. Verify the complete value with `describe` or an app validation marker.
|
|
114
|
+
Record the focus tap, then record `keyboard` with `text`. A `keyboard` call carries `text` or `key`, never both. To submit, record a second `keyboard` step with `key: "enter"`. Verify the complete value with `describe` or an app validation marker.
|
|
115
115
|
|
|
116
116
|
**Never `describe` or `screenshot` a non-secure field you just filled from `{{secret:…}}`.** Only a password field is redacted; a plain text input hands the resolved value back into your context, and an API key or token typed into one is the ordinary case. Submit or navigate away first, then verify the resulting screen.
|
|
117
117
|
|
|
@@ -144,16 +144,16 @@ Stop immediately. Restore the last valid screen with direct MCP calls, not `flow
|
|
|
144
144
|
|
|
145
145
|
Call `flow-finish-recording`, then read the saved YAML. Apply only meaning-preserving conversions:
|
|
146
146
|
|
|
147
|
-
| Recorded form
|
|
148
|
-
|
|
|
149
|
-
| focus tap + `tool: keyboard`
|
|
150
|
-
| keyboard
|
|
151
|
-
| `tool: await-ui-element`
|
|
152
|
-
| element-seeking movement
|
|
153
|
-
| coordinate tap or long-press
|
|
154
|
-
| `tool: gesture-pinch`
|
|
155
|
-
| `tool: gesture-rotate`
|
|
156
|
-
| sibling `tool: flow-execute`
|
|
147
|
+
| Recorded form | Finished form |
|
|
148
|
+
| ----------------------------------------- | ------------------------------------------------------------------ |
|
|
149
|
+
| focus tap + `tool: keyboard` | `type:` |
|
|
150
|
+
| text `keyboard` + `key: enter` `keyboard` | submitted `type:` without Enter in its text |
|
|
151
|
+
| `tool: await-ui-element` | `await:` or `assert:` |
|
|
152
|
+
| element-seeking movement | `scroll-to:` |
|
|
153
|
+
| coordinate tap or long-press | strict selector after the fallback gate |
|
|
154
|
+
| `tool: gesture-pinch` | selector-based `pinch:` with `scale = endDistance / startDistance` |
|
|
155
|
+
| `tool: gesture-rotate` | selector-based `rotate:` with `by = endAngle - startAngle` |
|
|
156
|
+
| sibling `tool: flow-execute` | recorder-captured `run:` |
|
|
157
157
|
|
|
158
158
|
Only these unrecorded insertions are allowed, at states observed live:
|
|
159
159
|
|
|
@@ -59,7 +59,7 @@ Apple system apps cannot load the instrumentation, and nothing in the launch pat
|
|
|
59
59
|
|
|
60
60
|
- Raw `tool: await-ui-element` accessibility checks.
|
|
61
61
|
- Point taps or long-presses derived from `describe`, each named by an echo.
|
|
62
|
-
- A point focus tap plus raw keyboard with `delayMs: 500
|
|
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
65
|
Every point tap or long-press in such a flow passes **carrying a warning**. The app loads no instrumentation, so every tree read fails and 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 never take that settle, so they never warn.
|
|
@@ -72,7 +72,7 @@ Common schemes: `messages://`, `settings://`, `maps://?q=<query>`, `tel://<numbe
|
|
|
72
72
|
| Rotation | `gesture-rotate` | Two-finger rotation with auto-interpolation |
|
|
73
73
|
| Custom gesture | `gesture-custom` | Arbitrary touch sequences, optional interpolation |
|
|
74
74
|
| Hardware key | `button` | Home, back, power, volume, appSwitch, actionButton |
|
|
75
|
-
| Type text | `keyboard` | Every platform.
|
|
75
|
+
| Type text | `keyboard` | Every platform. Text or one named key per call, never both |
|
|
76
76
|
| Rotate device | `rotate` | Orientation changes |
|
|
77
77
|
| Shake device | `shake` | Shake handlers (sim/emu only), Undo-typing prompt, RN dev menu |
|
|
78
78
|
| Wait for UI | `await-ui-element` | Block until an element is visible/hidden/exists/contains text |
|
|
@@ -168,15 +168,17 @@ Values: `home`, `back`, `power`, `volumeUp`, `volumeDown`, `appSwitch`, `actionB
|
|
|
168
168
|
### keyboard — Type text or press special keys
|
|
169
169
|
|
|
170
170
|
```json
|
|
171
|
-
{ "udid": "<UDID>", "text": "search query"
|
|
171
|
+
{ "udid": "<UDID>", "text": "search query" }
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
+
One call does one action. `text` and `key` are mutually exclusive, and a call that carries both is rejected with nothing typed. To type and then submit, send two `keyboard` steps in one `run-sequence` (§ 8) — `{ "text": "search query" }`, then `{ "key": "enter" }`. Two separate calls do the same work, but cost an extra round-trip.
|
|
175
|
+
|
|
174
176
|
Special keys: `enter`, `escape`, `backspace`, `tab`, `space`, `arrow-up`, `arrow-down`, `arrow-left`, `arrow-right`, `f1`–`f12`. Optional: `"delayMs": 100` between keystrokes (default 50ms) — applies to the iOS simulator and Chromium; it is ignored on Android phones/tablets (typed via `adb input text`, no per-key cadence), on Vega, and on TV targets.
|
|
175
177
|
|
|
176
178
|
**Typing secrets.** To enter a credential without its plaintext ever entering your context, transcript, or logs, use a secret placeholder in `text` (works in `keyboard`, `paste`, `run-sequence` keyboard steps, and flow `type` steps):
|
|
177
179
|
|
|
178
180
|
```json
|
|
179
|
-
{ "udid": "<UDID>", "text": "{{secret:APP_PASSWORD}}"
|
|
181
|
+
{ "udid": "<UDID>", "text": "{{secret:APP_PASSWORD}}" }
|
|
180
182
|
```
|
|
181
183
|
|
|
182
184
|
The placeholder is resolved on the machine running the tool-server, from the first of these that defines the name:
|
|
@@ -191,7 +193,7 @@ The placeholder is resolved on the machine running the tool-server, from the fir
|
|
|
191
193
|
Rules:
|
|
192
194
|
|
|
193
195
|
- The result echoes the placeholder, never the value. An unknown name fails with the list of available secret _names_ and every source it looked in, with paths — read that list before asking the user anything.
|
|
194
|
-
- The auto-screenshot after the call is skipped so the typed value cannot re-enter your context as pixels. 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.
|
|
196
|
+
- The auto-screenshot after the call is skipped so the typed value cannot re-enter your context as pixels. 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. To submit, put the text step and the Enter step in **one `run-sequence`**. The skip covers a whole batch that contains the placeholder, but a second bare `keyboard` call gets its own screenshot of the filled field.
|
|
195
197
|
- Nothing outside those sources is reachable; never ask the user to paste a secret value into the conversation. Ask them to put it in a secrets file instead — a file edit applies to the next call, while an exported env var only reaches a tool-server started afterwards.
|
|
196
198
|
- The project sources are found by walking up from the tool-server's working directory. If a project file is not being picked up, the failure's source list shows the paths actually consulted; `~/.argent/secrets.env` needs no project and always applies.
|
|
197
199
|
|
|
@@ -316,7 +318,7 @@ Scroll down three times:
|
|
|
316
318
|
}
|
|
317
319
|
```
|
|
318
320
|
|
|
319
|
-
Type into a focused field and submit:
|
|
321
|
+
Type into a focused field and submit. This is the only way to mix text and a key, because one `keyboard` call cannot carry both:
|
|
320
322
|
|
|
321
323
|
```json
|
|
322
324
|
{
|
|
@@ -21,7 +21,7 @@ description: Control and inspect TV apps via argent — Apple TV (tvOS), Android
|
|
|
21
21
|
|
|
22
22
|
- `describe {udid}` — focus view: the focused / `[selected]` element + focusable elements with labels and normalized frames. The discovery tool — call before and after navigating. Empty tree → see the per-platform notes.
|
|
23
23
|
- `tv-remote {udid, button}` — D-pad / remote. `button` is one key **or a whole path** (run in one call). Keys: `up`/`down`/`left`/`right`, `select`, `back`, `menu`, `home`, `playPause`, plus media keys `rewind`/`fastForward`/`next`/`previous`/`volumeUp`/`volumeDown`/`mute`. Single: `{button:"down"}`; repeat: `{button:"down", repeat:3}`; path: `{button:["up","right","select"]}`.
|
|
24
|
-
- `keyboard {udid, text}` — type into the focused field (focus it with `tv-remote` first). Named `key` presses (e.g. `{key:"enter"}`) work on Vega; on Apple TV / Android TV move focus with `tv-remote` instead.
|
|
24
|
+
- `keyboard {udid, text}` — type into the focused field (focus it with `tv-remote` first). One call carries `text` or `key`, never both — to type and then press a key, send two `keyboard` steps in one `run-sequence`. Named `key` presses (e.g. `{key:"enter"}`) work on Vega; on Apple TV / Android TV move focus with `tv-remote` instead.
|
|
25
25
|
- `launch-app` / `restart-app` / `reinstall-app {udid, bundleId}` — `bundleId` from the app manifest. Vega `reinstall-app` takes `appPath` = a `.vpkg`.
|
|
26
26
|
- `screenshot {udid, scale?}` — Apple TV via `xcrun simctl io` (downscaled); Android TV / Vega host-side via `adb` / `screencap`.
|
|
27
27
|
|