Skip to content
Merged
Show file tree
Hide file tree
Changes from 114 commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
0ab3c51
feat(harmony): add HarmonyOS emulator discovery and boot
latekvo Aug 10, 2026
83b485c
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Aug 10, 2026
704f9f6
fix(harmony): drop two exports nothing imports
latekvo Aug 10, 2026
364223c
fix(harmony): bound the -list call under the discovery deadline
latekvo Aug 10, 2026
7dd0717
feat(harmony): drive real HarmonyOS devices over hdc
latekvo Aug 10, 2026
a9dd876
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Aug 10, 2026
e2cc063
feat(harmony): drive a HarmonyOS device with the interaction tools
latekvo Aug 10, 2026
0a5dce5
feat(harmony): batch and diff on a HarmonyOS device
latekvo Aug 10, 2026
26b892c
fix(harmony): scope the screenshot-diff rotation guard to a live capture
latekvo Aug 10, 2026
63bba28
docs(harmony): name HarmonyOS where a tool description lists its plat…
latekvo Aug 10, 2026
afca62f
chore(harmony): trim comments that restate the error beside them
latekvo Aug 10, 2026
44e56d2
fix(harmony): say the panel is off even when the dump has windows
latekvo Aug 10, 2026
727e385
docs(harmony): name every tool that returns 501, and why each does
latekvo Aug 10, 2026
78f260c
feat(harmony): hand back the connect key a booted emulator registers as
latekvo Aug 11, 2026
af1e94e
test(harmony): pin that boot-device hands back a drivable id
latekvo Aug 11, 2026
fbbc394
chore(harmony): cut the emulator-boot comments to what the code canno…
latekvo Aug 11, 2026
cd49be2
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Aug 11, 2026
de209d7
test(harmony): pin the hdc row shape against real tconn output
latekvo Aug 11, 2026
261a830
fix(harmony): stop the boot budget from running out inside the start
latekvo Aug 11, 2026
f41ae42
docs(harmony): say what the emulator was verified against
latekvo Aug 11, 2026
d677d3b
fix(harmony): reject a prototype key name instead of shelling it out
latekvo Aug 11, 2026
1840a2b
docs(harmony): say what the unsupported tools actually return, and na…
latekvo Aug 11, 2026
9f7bb55
test(harmony): cover the four tool branches that carry real logic
latekvo Aug 11, 2026
2ec6000
fix(harmony): clip describe frames, keep what a collapsed wrapper kne…
latekvo Aug 11, 2026
90be9c5
fix(harmony): stop boot-device adopting a device it did not start
latekvo Aug 11, 2026
4807a3b
fix(harmony): ask the manager whether it died when there is no connec…
latekvo Aug 11, 2026
e41cd44
fix(harmony): make the no-connector liveness check actually fire, and…
latekvo Aug 11, 2026
66a26b1
test(harmony): make the new tests hermetic, leak-free and able to fail
latekvo Aug 11, 2026
a3a5d78
fix(harmony): let a force restart outlast the shutdown it asked for
latekvo Aug 12, 2026
508bafa
docs(harmony): state the measured connect key once, not twice
latekvo Aug 12, 2026
4ade1c2
fix(harmony): close the device-found gaps the review round proved
latekvo Aug 13, 2026
95e81ad
fix(harmony): stop open-url and restart-app reporting more than the d…
latekvo Aug 14, 2026
173ffe5
fix(button): say which buttons the platform does take
latekvo Aug 14, 2026
509deac
fix(harmony): match aa's own error-code line, not the bare digits
latekvo Aug 14, 2026
64a05ba
fix(harmony): resolve the key a restarted instance comes back on
latekvo Aug 14, 2026
57a3e8e
fix(harmony): refuse a button press the suspended panel would swallow
latekvo Aug 14, 2026
bc44e3a
fix(harmony): keep a layout container that knows something itself
latekvo Aug 14, 2026
4d13ab5
fix(await-ui-element): keep a standing warning off a successful wait
latekvo Aug 14, 2026
9664b94
fix(harmony): try $DEVECO_STUDIO_HOME ahead of the default, not inste…
latekvo Aug 14, 2026
5242c03
fix(screenshot-diff): remove the capture it has copied in
latekvo Aug 14, 2026
c156057
test(harmony): pin the dispatch entry each harmony tool hangs from
latekvo Aug 14, 2026
ef98e5d
test(harmony): cover a value carrying more than one quote in shellQuote
latekvo Aug 14, 2026
afbe0ce
docs(await-screen-idle): describe the note returned with an unsettled…
latekvo Aug 14, 2026
a0a1493
fix(screenshot-diff): drop the capture even when the copy fails
latekvo Aug 14, 2026
d65017b
fix(boot-device): stop the harmony boot latching a verdict off one ea…
latekvo Aug 14, 2026
66efe56
fix(boot-device): refuse the harmony boot when the pre-start snapshot…
latekvo Aug 14, 2026
bc901b5
fix(boot-device): read a refused hdc listing as a refusal, not an emp…
latekvo Aug 14, 2026
24e7d0e
test(harmony): prime the hdc probe the dispatch cases do not depend on
latekvo Aug 14, 2026
db13bed
fix(harmony): catch the connector failure hdc reports on stderr with …
latekvo Aug 14, 2026
148402f
fix(boot-device): keep the harmony boot inside the budget it was given
latekvo Aug 14, 2026
a4dd81f
fix(harmony): report the screen-off caveat from await-screen-idle too
latekvo Aug 14, 2026
cc2a9e4
test(harmony): pin the behaviours a mutation run found nothing held
latekvo Aug 14, 2026
cd6cf1b
fix(harmony): classify hdc's unprefixed failures and the boot's own r…
latekvo Aug 14, 2026
cc87916
fix(harmony): tell a cut-off command from a connector that never reac…
latekvo Aug 14, 2026
21187f9
test(harmony): pin the uitest queue, sentinel parsing and role table
latekvo Aug 14, 2026
ed61b88
fix(harmony): keep the boot's own listings inside the caller's budget
latekvo Aug 14, 2026
5a53003
fix(await-screen-idle): report why the screen was never read
latekvo Aug 14, 2026
7e73156
test(wait): pin the caveats both wait tools fold onto a timeout
latekvo Aug 14, 2026
e8bf073
fix(harmony): give a describe read only the wait's remaining budget
latekvo Aug 14, 2026
dacdb2c
fix(harmony): refuse a boot target the host does not have
latekvo Aug 14, 2026
fda201c
fix(harmony): classify a killed CLI as a timeout, take the keys the o…
latekvo Aug 14, 2026
e981ec5
fix(harmony): only refuse a boot against a listing that has rows
latekvo Aug 14, 2026
bc7629a
fix(harmony): bound an interaction to one budget, and refuse a panel …
latekvo Aug 14, 2026
2322bfc
fix(harmony): fail a stop closed, and stop reading an unreadable list…
latekvo Aug 14, 2026
7f734eb
docs(harmony): say which tools the platform actually has, and name it…
latekvo Aug 14, 2026
54a56f6
test(harmony): pin the budget split the interaction ceiling depends on
latekvo Aug 15, 2026
56f7ef3
fix(harmony): read hdc's own words, not whatever came back beside them
latekvo Aug 17, 2026
9539893
fix(harmony): name the condition that failed, not the area it failed in
latekvo Aug 17, 2026
641b6c0
fix(describe,gesture-tap): stop offering HarmonyOS interactions it ca…
latekvo Aug 17, 2026
7d3523d
fix(flows): refuse a run device the engine has no arm for
latekvo Aug 17, 2026
e6afdfc
docs(flows): say what a run on these two platforms actually does
latekvo Aug 17, 2026
8027265
fix(harmony): cap each describe leg at its own ceiling
latekvo Aug 17, 2026
c232384
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Aug 17, 2026
0eace9a
test(harmony): stop pinning budget boundaries to the millisecond
latekvo Aug 17, 2026
0922f9e
Merge origin/main into harmony branch
latekvo Aug 17, 2026
dbd37c8
fix(harmony): read the panel's size and power off one dump line
latekvo Aug 17, 2026
c4f81cd
fix(harmony): allowlist the power states a touch can land in
latekvo Aug 17, 2026
86477c0
fix(flows): refuse the gestures HarmonyOS cannot make, before dispatc…
latekvo Aug 17, 2026
72163c7
fix(harmony): name an unreadable device table, and redact a secret a …
latekvo Aug 17, 2026
b99dabd
fix(secrets): redact the pieces a backend really sends, in one pass
latekvo Aug 17, 2026
1c34379
fix(secrets): match by hand, so a large secret cannot be leaked by th…
latekvo Aug 17, 2026
7ee564b
test(harmony): pin the invariants three fixtures were too kind to catch
latekvo Aug 17, 2026
584ce22
test(harmony): refuse a silent launch and open, as the stop path alre…
latekvo Aug 18, 2026
87cb8cf
Merge branch 'main' into feat/harmonyos-emulator
latekvo Aug 21, 2026
4c43e90
Merge branch 'main' into feat/harmonyos-emulator
latekvo Aug 23, 2026
b2e7c17
Merge branch 'main' into feat/harmonyos-emulator
latekvo Aug 23, 2026
e06e562
Merge branch 'main' into feat/harmonyos-emulator
latekvo Aug 24, 2026
ff5b85a
fix(harmony): close out the device-review round
latekvo Aug 24, 2026
2c74374
fix(harmony): review-round followups
latekvo Aug 24, 2026
0131374
docs(harmony): align two comments with what the code now does
latekvo Aug 24, 2026
b65e66f
Merge origin/main into feat/harmonyos-emulator
latekvo Aug 25, 2026
03d62ab
feat(harmony): multi-touch over `uinput`, so `gesture-pinch` runs on …
latekvo Sep 2, 2026
bcb4df8
docs(harmony): tighten the uinput diagnostic comment
latekvo Sep 2, 2026
38ca868
Merge origin/main into feat/harmonyos-emulator
latekvo Sep 4, 2026
82bfe8f
Merge origin/main into feat/harmonyos-emulator
latekvo Sep 7, 2026
d165c0c
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Sep 28, 2026
6a95dd7
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Oct 1, 2026
6271b32
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Oct 2, 2026
f6c23aa
Merge remote-tracking branch 'origin/main' into HEAD
latekvo Oct 12, 2026
c1d15c7
revert(secrets): keep the redaction rewrite out of the HarmonyOS PR
latekvo Oct 12, 2026
5eb8479
fix(await-ui-element): a suspended HarmonyOS panel times out unreadab…
latekvo Oct 12, 2026
e427a18
refactor(await-ui-element): drop the unreachable final-read stale check
latekvo Oct 12, 2026
1f0cb47
chore(harmony): trim comments to what the code cannot say
latekvo Oct 12, 2026
fdaf949
test(harmony): trim test comments; restore main's keyboard-secrets test
latekvo Oct 12, 2026
199a76c
test(harmony): mock hdcFileRecv in queue tests, sort start logs numer…
latekvo Oct 12, 2026
d0a334a
test(harmony): widen two wait budgets that flaked under load
latekvo Oct 12, 2026
ed6ae93
Merge remote-tracking branch 'origin/main' into HEAD
latekvo Oct 12, 2026
e516cf2
fix(harmony): keep wait-tool notes and capture cleanup on HarmonyOS only
latekvo Oct 12, 2026
8c76d6f
fix(harmony): inject nothing once an input call is cancelled
latekvo Oct 12, 2026
78e6533
test(await-screen-idle): pin that a degraded simulator settles withou…
latekvo Oct 12, 2026
092bca7
fix(describe): leave the Chromium header's gesture list as on main
latekvo Oct 12, 2026
18b26d1
fix(await-ui-element): keep a stale final read from timing out as unmet
latekvo Oct 12, 2026
b302c2d
revert(flow-run): leave the tool-step capability gate to #796
latekvo Oct 12, 2026
ded66f5
fix(describe): restore main's gesture-space sentence
latekvo Oct 12, 2026
5a52ca4
Merge branch 'main' into feat/harmonyos-emulator
latekvo Oct 14, 2026
8099514
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Oct 20, 2026
32d13f2
feat(harmony): gate HarmonyOS support behind the harmonyos flag
latekvo Oct 20, 2026
9ce8770
fix(harmony): review fixes, and run the harmony tests with the flag on
latekvo Oct 20, 2026
37c8eb5
docs(harmony): move HarmonyOS guidance behind the harmonyos flag
latekvo Oct 20, 2026
7bedc40
feat(harmony): hide HarmonyOS text in tool descriptions behind the ha…
latekvo Oct 20, 2026
33a1715
test(harmony): pin the flag-off tool catalog and boot-device error to…
latekvo Oct 20, 2026
39dfebc
fix(harmony): scale input to the rotated display in landscape
latekvo Oct 20, 2026
1520d1d
Merge branch 'harmony-flag-tagging' into feat/harmonyos-emulator
latekvo Oct 20, 2026
92949ca
Merge branch 'harmony-flag-docs' into feat/harmonyos-emulator
latekvo Oct 20, 2026
d2144a3
fix: scrub shell-quoted secrets from errors; correct two HarmonyOS de…
latekvo Oct 20, 2026
b035135
chore(harmony): format registry types, sync the HarmonyOS reference w…
latekvo Oct 20, 2026
e1cdc74
test(harmony): pin the no-flow-tree arms of e2e step scoring and the …
latekvo Oct 21, 2026
d708762
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Oct 21, 2026
8e5ce6e
Merge remote-tracking branch 'origin/main' into feat/harmonyos-emulator
latekvo Oct 22, 2026
7138191
feat(harmony): reinstall-app installs a .hap over hdc
latekvo Oct 22, 2026
daf3843
test(harmony): give the failed-dump await case room for one read unde…
latekvo Oct 22, 2026
0362e84
docs(harmony): call HarmonyOS just HarmonyOS outside its platform sec…
latekvo Oct 22, 2026
817e9d8
fix(harmony): drop the em dashes the platform added to tool descriptions
latekvo Oct 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Ad](https://swm-delivery.com/www/images/zone-gh-argent-2?n=1)](https://swm-delivery.com/www/delivery/ck-slug.php?zoneid=zone-gh-argent-2&n=1)
[![Ad](https://swm-delivery.com/www/images/zone-gh-argent-3?n=1)](https://swm-delivery.com/www/delivery/ck-slug.php?zoneid=zone-gh-argent-3&n=1)

**[Argent](https://argent.swmansion.com)** gives your AI assistant direct control of iOS simulators, Android emulators and devices, TVs (Apple TV, Android TV, Fire TV) and Electron/Chromium apps. Tap a button, profile a screen, reproduce a bug - without leaving the CLI.
**[Argent](https://argent.swmansion.com)** gives your AI assistant direct control of iOS simulators, Android emulators and devices, HarmonyOS phones and emulators, TVs (Apple TV, Android TV, Fire TV) and Electron/Chromium apps. Tap a button, profile a screen, reproduce a bug - without leaving the CLI.

```bash
npx @swmansion/argent@latest init # pnpm: pnpm dlx @swmansion/argent@latest init
Expand Down
2 changes: 1 addition & 1 deletion Telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ When you use the Argent Lens design-review flow (previewing and choosing between

- Argent version, Node.js version, operating system, processor architecture;
- whether the process runs in an interactive terminal and whether it runs in a CI environment;
- whether Argent is used in connection with Android, iOS, tvOS (Apple TV), Android TV, VegaOS, or a Chromium-based target, and whether that target is a simulator or emulator, a virtual device, a physical device, or a desktop application. This category is inferred from the form of the device identifier; the identifier itself is never recorded;
- whether Argent is used in connection with Android, iOS, tvOS (Apple TV), Android TV, VegaOS, HarmonyOS, or a Chromium-based target, and whether that target is a simulator or emulator, a virtual device, a physical device, or a desktop application. This category is inferred from the form of the device identifier; the identifier itself is never recorded;
- when a device is supplied by an external device provider, a short label for that provider (the leading segment of the name the provider registers under), never the identifier of the device it supplies.

### Diagnostics
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/features/screen-recording.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The files stay in the working tree. Add the directory to `.gitignore` when you d

## Limits

- Argent records iOS simulators, Android emulators, and physical Android devices. Argent does not record tvOS simulators, physical iPhones, Chromium apps, Vega devices, or remote simulators.
- Argent records iOS simulators, Android emulators, and physical Android devices. Argent does not record tvOS simulators, physical iPhones, Chromium apps, Vega devices, HarmonyOS devices, or remote simulators.
- One recording per device at a time. Different devices can record at the same time.
- Argent uses `ffmpeg` to encode the video. Install `ffmpeg` before the first recording.
- On Android, a secure screen such as a password field or a DRM video comes out black.
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/features/visual-regression.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ Thus you can keep visual checks in the repository and run them in CI.
- The comparison does not replace a check of the accessibility tree, the logs or the network record. The agent uses these sources together with the comparison.
- The two screenshots must come from the same device class and the same orientation. When the resolution differs, Argent scales one screenshot down, and small differences can come from the scaling.
- The agent does not use the comparison to find the position of an element for a tap. The agent uses the screen description for that.
- The comparison works on an iOS simulator, or an Android emulator or device. It does not work on Chromium, Apple TV or Vega apps. On a [physical iPhone](/docs/features/physical-ios-devices), the agent captures full-resolution screenshots and compares them on the host instead.
- The comparison works on an iOS simulator, an Android emulator or device, or a HarmonyOS device. It does not work on Chromium, Apple TV or Vega apps. On a [physical iPhone](/docs/features/physical-ios-devices), the agent captures full-resolution screenshots and compares them on the host instead.

Argent does this with the `screenshot` and `screenshot-diff` tools. The [tools reference](/docs/reference/tools) contains all tools.
1 change: 1 addition & 0 deletions packages/docs/docs/fundamentals/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ sidebar_custom_props:
- **iOS / tvOS**: macOS with **Xcode** installed. Apple TV uses tvOS simulators, and Xcode downloads the tvOS runtime on demand.
- **Android / Android TV**: **Android SDK Platform Tools** (`adb`) on `PATH`, plus the **Android Emulator** package to boot AVDs from Argent. Create AVDs via Android Studio or `avdmanager`.
- **Fire TV (Vega)**: the **Vega SDK** (`vega` CLI) on `PATH`, plus **Android SDK Platform Tools** (`adb`) on `PATH`. Most Vega tools, including UI inspection and screenshots, run over `adb`.
- **HarmonyOS**: **DevEco Studio**, which ships `hdc` (the device connector) and the `Emulator` manager. Argent looks for both in `$DEVECO_STUDIO_HOME` first, then in `/Applications/DevEco-Studio.app` on macOS. Argent also finds `hdc` on `PATH`, for hosts that installed the OpenHarmony command-line tools without the IDE. A phone needs only `hdc`.
- **Electron / Chromium**: nothing extra to control an already running app. Launch it with `--remote-debugging-port`, or let Argent spawn your Electron app for you.

## Run `init` in your project
Expand Down
13 changes: 13 additions & 0 deletions packages/docs/docs/fundamentals/supported-platforms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Argent drives a growing set of targets through a single toolkit, each with the r
| **Android** | Emulators (AVDs) and physical devices over adb | Touch / gesture |
| **TV** | Apple TV (tvOS), Android TV / Google TV, Amazon Fire TV (Vega) | D-pad / remote |
| **Desktop & web** | Electron and Chromium apps (incl. React Native Web / Expo web) over CDP | Mouse / keyboard |
| **HarmonyOS** | Phones over `hdc`, and DevEco Studio emulator instances | Touch / gesture |

<Video
src="/video/ios-android-web.mp4"
Expand Down Expand Up @@ -41,6 +42,18 @@ Argent drives the iPhone Duo simulator closed, half-open and open. The agent fol

Argent also drives a physical iPhone over a USB cable. Physical iPads are not supported yet. Automation on hardware is scoped to one app at a time, and a subset of the simulator tools is available. See [Physical iOS devices](/docs/features/physical-ios-devices).

### HarmonyOS

Argent drives any HarmonyOS phone or emulator that `hdc` is connected to. A phone with USB debugging enabled appears as `harmony-<connectKey>`. A DevEco Studio emulator instance appears as `harmony-emulator-<name>`. `boot-device` starts the instance and returns its `harmony-<connectKey>` id, so the same tools drive a phone and an emulator.

- Argent reads the screen and injects taps, swipes and text through the device's own `uitest`.
- `gesture-pinch` sends the start and end points of both fingers in one `uinput` call. The device interpolates the movement.
- `launch-app`, `restart-app` and `open-url` use the `bm` and `aa` shell commands.
- Argent refuses `gesture-rotate` and `gesture-custom`. The device moves each contact along one straight line per call.
- Argent also refuses `rotate`, the profilers and the debugger. The device has no orientation command, and the profilers and the debugger have no HarmonyOS ingest path.

Huawei restricts the emulator image download to mainland China. Outside mainland China, you cannot create an emulator instance until you get an image.

## TV targets

A TV UI is focus-driven rather than touch-driven. Argent reads which element currently holds focus, then moves the cursor with directional remote presses and confirms with select.
Expand Down
2 changes: 2 additions & 0 deletions packages/docs/docs/reference/flow-yaml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ The identity selector must exist only on the destination. `idle` waits until the

One outcome stops the run: the runner cannot read the UI tree at all. Argent marks the step as errored and skips the later steps.

On HarmonyOS, which has no UI-tree source for flows, `idle` cannot run. The step errors immediately and names `wait:` as the replacement.

`idle` has no `assert` form and no `when` form.

## Optional steps
Expand Down
36 changes: 18 additions & 18 deletions packages/docs/docs/reference/tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ Run `argent tools` to list them from the terminal, `argent tools describe <name>

## Devices and apps

| Tool | Description |
| ---------------------------- | --------------------------------------------------------------------------------------------- |
| `list-devices` | List iOS simulators, Android emulators and devices, Chromium apps, and Vega (Fire TV) devices |
| `boot-device` | Boot a simulator, emulator, or Vega Virtual Device, or spawn an Electron app |
| `launch-app` | Open an app by bundle id (iOS) or package name (Android) |
| `restart-app` | Terminate then relaunch an app |
| `terminate-app` (SDK only) | Stop an app without relaunching it |
| `reinstall-app` | Install or reinstall an app, clearing app data and runtime permissions |
| `open-url` | Open a URL or URL scheme on the device |
| `settings-permissions` | Grant, deny, or reset a runtime permission without navigating the Settings UI |
| `rotate` | Set the device orientation to portrait or either landscape |
| `fold` | Fold or unfold a foldable iOS simulator to a posture or a hinge angle |
| `shake` | Shake the device |
| `button` | Press a hardware button: home, back, power, volume, app switch, action button |
| `tv-remote` | Press a TV remote or D-pad button on Apple TV, Android TV, or Vega |
| `stop-simulator-server` | Stop the transport session for one device and free its resources |
| `stop-all-simulator-servers` | Stop every service a device owns: simulator servers, native devtools, TV daemons |
| `stop-metro` | Stop the Metro bundler listening on a given port |
| Tool | Description |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `list-devices` | List iOS simulators, Android emulators and devices, Chromium apps, Vega (Fire TV) devices, and HarmonyOS phones and emulators |
| `boot-device` | Boot a simulator, emulator, Vega Virtual Device, or HarmonyOS emulator, or spawn an Electron app |
| `launch-app` | Open an app by bundle id (iOS) or package name (Android) |
| `restart-app` | Terminate then relaunch an app |
| `terminate-app` (SDK only) | Stop an app without relaunching it |
| `reinstall-app` | Install or reinstall an app, clearing app data and runtime permissions |
| `open-url` | Open a URL or URL scheme on the device |
| `settings-permissions` | Grant, deny, or reset a runtime permission without navigating the Settings UI |
| `rotate` | Set the device orientation to portrait or either landscape |
| `fold` | Fold or unfold a foldable iOS simulator to a posture or a hinge angle |
| `shake` | Shake the device |
| `button` | Press a hardware button: home, back, power, volume, app switch, action button |
| `tv-remote` | Press a TV remote or D-pad button on Apple TV, Android TV, or Vega |
| `stop-simulator-server` | Stop the transport session for one device and free its resources |
| `stop-all-simulator-servers` | Stop every service a device owns: simulator servers, native devtools, TV daemons |
| `stop-metro` | Stop the Metro bundler listening on a given port |

`launch-app` and `restart-app` accept `launchArgs`, a list of arguments that Argent passes to the app process at launch. For example, `["-FeatureFlag", "YES"]` overrides a UserDefaults value. `launchArgs` works on Apple simulators and physical iPhones. Other targets ignore it. If the app already runs, `launch-app` terminates it first, so that the app gets the arguments. On a physical iPhone, the app sees `--` before the arguments. UserDefaults overrides still apply.

Expand Down
2 changes: 2 additions & 0 deletions packages/registry/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const FAILURE_COMMANDS = [
"adb",
"emulator",
"vega",
"hdc",
"deveco_emulator",
"xcrun_simctl",
"xctrace",
"native_devtools",
Expand Down
20 changes: 20 additions & 0 deletions packages/registry/src/failure-codes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ export const FAILURE_CODES = {
VEGA_SCREENSHOT_FAILED: "VEGA_SCREENSHOT_FAILED",
VEGA_TEXT_INVALID: "VEGA_TEXT_INVALID",

HARMONY_HDC_NOT_FOUND: "HARMONY_HDC_NOT_FOUND",
HARMONY_EMULATOR_NOT_FOUND: "HARMONY_EMULATOR_NOT_FOUND",
HARMONY_EMULATOR_COMMAND_FAILED: "HARMONY_EMULATOR_COMMAND_FAILED",
HARMONY_HDC_COMMAND_FAILED: "HARMONY_HDC_COMMAND_FAILED",
HARMONY_DEVICE_ID_INVALID: "HARMONY_DEVICE_ID_INVALID",
HARMONY_DEVICE_UNREACHABLE: "HARMONY_DEVICE_UNREACHABLE",
HARMONY_SHELL_NO_STATUS: "HARMONY_SHELL_NO_STATUS",
HARMONY_FILE_TRANSFER_FAILED: "HARMONY_FILE_TRANSFER_FAILED",
HARMONY_UITEST_FAILED: "HARMONY_UITEST_FAILED",
HARMONY_DISPLAY_UNREADABLE: "HARMONY_DISPLAY_UNREADABLE",
HARMONY_SCREEN_OFF: "HARMONY_SCREEN_OFF",
HARMONY_ABILITY_START_FAILED: "HARMONY_ABILITY_START_FAILED",
HARMONY_ABILITY_STOP_FAILED: "HARMONY_ABILITY_STOP_FAILED",

ANDROID_ADB_NOT_FOUND: "ANDROID_ADB_NOT_FOUND",
ANDROID_EMULATOR_NOT_FOUND: "ANDROID_EMULATOR_NOT_FOUND",
ANDROID_ADB_COMMAND_FAILED: "ANDROID_ADB_COMMAND_FAILED",
Expand Down Expand Up @@ -309,6 +323,12 @@ export const FAILURE_CODES = {
BOOT_ANDROID_FIRST_FRAME_TIMEOUT: "BOOT_ANDROID_FIRST_FRAME_TIMEOUT",
BOOT_ANDROID_PACKAGE_MANAGER_UNAVAILABLE: "BOOT_ANDROID_PACKAGE_MANAGER_UNAVAILABLE",
BOOT_ANDROID_COLD_BOOT_FAILED: "BOOT_ANDROID_COLD_BOOT_FAILED",
BOOT_HARMONY_INSTANCE_NOT_FOUND: "BOOT_HARMONY_INSTANCE_NOT_FOUND",
BOOT_HARMONY_TARGET_LIST_FAILED: "BOOT_HARMONY_TARGET_LIST_FAILED",
BOOT_HARMONY_STOP_FAILED: "BOOT_HARMONY_STOP_FAILED",
BOOT_HARMONY_STOP_TIMEOUT: "BOOT_HARMONY_STOP_TIMEOUT",
BOOT_HARMONY_MANAGER_EXITED: "BOOT_HARMONY_MANAGER_EXITED",
BOOT_HARMONY_START_FAILED: "BOOT_HARMONY_START_FAILED",

/**
* External device providers
Expand Down
16 changes: 14 additions & 2 deletions packages/registry/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export interface ToolContext extends InvokeToolOptions {
artifacts: ArtifactStore;
}

export type Platform = "ios" | "android" | "ios-remote" | "chromium" | "vega";
export type Platform = "ios" | "android" | "ios-remote" | "chromium" | "vega" | "harmony";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Widening Platform also admits harmony ids into subsystems that have no harmony branch and no capability gate. flow-execute accepts device: "harmony-<connectKey>", validates, and then fails per-step with ui-tree matching is not supported on platform "harmony" - verified against a live emulator with a one-step flow. Flows and the step recorder are not in the PR's supported/refused tables either way, so an agent has nothing to tell it in advance.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Diplomat]: Acknowledged, and deliberately not gated in code in 4ade1c2. A flow with a harmony device fails per-step only if a step reads the tree — a flow of pure tool: calls against the harmony tool surface runs fine, since binding is device-agnostic and the failure you measured comes from fetchFlowTree naming the platform. The gap was that the PR never documented flows either way; the passing-target docstrings now note flows have no harmony tree adapter rather than leaving an agent to discover the per-step failure.


export type DeviceKind = "simulator" | "emulator" | "vvd" | "device" | "app" | "unknown";

Expand Down Expand Up @@ -181,6 +181,11 @@ export interface ToolCapability {
vvd?: boolean;
device?: boolean;
};
/** `emulator` is a DevEco instance only `boot-device` addresses; interaction tools drive `device`. */
harmony?: {
emulator?: boolean;
device?: boolean;
};
supports?: (device: DeviceInfo) => boolean;
}

Expand All @@ -196,7 +201,14 @@ export interface ToolCapability {
* A missing binary answers 424 Failed Dependency with an install hint the agent
* can surface verbatim.
*/
export type ToolDependency = "adb" | "xcrun" | "emulator" | "sim-remote" | "vega";
export type ToolDependency =
| "adb"
| "xcrun"
| "emulator"
| "sim-remote"
| "vega"
| "harmony-emulator"
| "hdc";

export interface ToolDefinition<TParams = void, TResult = unknown> {
id: string;
Expand Down
Loading
Loading