@houwert/conductor 0.29.2 → 0.30.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.
Files changed (50) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/assert-not-visible.js +4 -1
  3. package/dist/commands/assert-visible.js +5 -2
  4. package/dist/commands/back.js +2 -1
  5. package/dist/commands/capture-ui.js +7 -3
  6. package/dist/commands/clipboard.js +9 -0
  7. package/dist/commands/copy-text-from.js +2 -1
  8. package/dist/commands/crashes.js +5 -0
  9. package/dist/commands/delete-device.js +5 -0
  10. package/dist/commands/download-app.js +4 -0
  11. package/dist/commands/erase-text.js +4 -1
  12. package/dist/commands/focused.js +5 -2
  13. package/dist/commands/foreground-app.js +4 -1
  14. package/dist/commands/gestures.js +7 -0
  15. package/dist/commands/hide-keyboard.js +5 -0
  16. package/dist/commands/inspect.js +10 -3
  17. package/dist/commands/install-app.js +5 -0
  18. package/dist/commands/launch-app.js +3 -2
  19. package/dist/commands/list-apps.js +5 -0
  20. package/dist/commands/list-devices.js +12 -0
  21. package/dist/commands/memory.js +5 -0
  22. package/dist/commands/press-key.js +15 -0
  23. package/dist/commands/profile-frames.js +4 -2
  24. package/dist/commands/profile.js +111 -7
  25. package/dist/commands/screenshot.js +5 -2
  26. package/dist/commands/scroll-until-visible.js +5 -2
  27. package/dist/commands/scroll.js +4 -1
  28. package/dist/commands/start-device.js +27 -3
  29. package/dist/commands/stop-app.js +2 -1
  30. package/dist/commands/stop-device.js +12 -1
  31. package/dist/commands/swipe.js +4 -1
  32. package/dist/commands/tap.js +3 -2
  33. package/dist/commands/uninstall-app.js +4 -0
  34. package/dist/daemon/server.js +14 -4
  35. package/dist/drivers/bootstrap.js +10 -0
  36. package/dist/drivers/flow-runner.js +16 -3
  37. package/dist/drivers/roku/app-ui-parser.js +122 -0
  38. package/dist/drivers/roku/discovery.js +136 -0
  39. package/dist/drivers/roku/ecp-client.js +396 -0
  40. package/dist/drivers/roku/key-mapping.js +67 -0
  41. package/dist/drivers/roku.js +237 -0
  42. package/dist/drivers/vega/page-source-parser.js +5 -118
  43. package/dist/drivers/xml.js +128 -0
  44. package/dist/enum-options.js +3 -1
  45. package/dist/index.js +1 -1
  46. package/dist/runner.js +32 -0
  47. package/package.json +1 -1
  48. package/skills/conductor-device-interact/SKILL.md +4 -3
  49. package/skills/conductor-device-setup/SKILL.md +35 -2
  50. package/skills/conductor-profiler/SKILL.md +9 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@houwert/conductor",
3
- "version": "0.29.2",
3
+ "version": "0.30.0",
4
4
  "description": "CLI tool for mobile app interactions — optimized for AI agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: conductor-device-interact
3
- description: Drive a running iOS simulator, Android emulator, tvOS simulator, Vega (Amazon Fire TV) virtual device, or Playwright web app with the conductor CLI. Use when launching apps, tapping UI elements (by selector or raw coordinate), typing text, scrolling/swiping, performing gestures, pressing hardware/keyboard/remote keys, opening URLs or deep links, navigating back, granting/denying app permissions, adding media to the gallery, setting GPS location or a travel route, toggling airplane mode, recording a screen video, or verifying an app change in the real running app.
3
+ description: Drive a running iOS simulator, Android emulator, tvOS simulator, Vega (Amazon Fire TV) virtual device, Roku device, or Playwright web app with the conductor CLI. Use when launching apps, tapping UI elements (by selector or raw coordinate), typing text, scrolling/swiping, performing gestures, pressing hardware/keyboard/remote keys, opening URLs or deep links, navigating back, granting/denying app permissions, adding media to the gallery, setting GPS location or a travel route, toggling airplane mode, recording a screen video, or verifying an app change in the real running app.
4
4
  ---
5
5
 
6
6
  # Conductor — device interaction
@@ -41,7 +41,7 @@ conductor assert-visible "Dashboard"
41
41
  | `conductor copy-text-from <element>` | Print an element's text (and copy to the iOS clipboard) |
42
42
  | `conductor input-text <text>` | Type into the focused field |
43
43
  | `conductor erase-text [n]` | Erase n characters (default 50) |
44
- | `conductor press-key <key>` | Press a key (Enter, Backspace, Home, …) or a remote button (`Remote Dpad Up/Down/Left/Right/Center`, `Remote Menu`) for tvOS / Android TV / vega. `--long-press` / `--duration <seconds>` holds it; `--measure` times the response (see `conductor-profiler`) |
44
+ | `conductor press-key <key>` | Press a key (Enter, Backspace, Home, …) or a remote button (`Remote Dpad Up/Down/Left/Right/Center`, `Remote Menu`) for tvOS / Android TV / vega / roku. `--long-press` / `--duration <seconds>` holds it; `--measure` times the response (see `conductor-profiler`) |
45
45
  | `conductor hide-keyboard` | Dismiss the on-screen keyboard |
46
46
  | `conductor back` | Press back |
47
47
  | `conductor scroll [--direction down\|up\|left\|right]` | Scroll |
@@ -125,8 +125,9 @@ relaunch without the flag. (See `conductor-device-setup`.)
125
125
 
126
126
  ## Tips
127
127
 
128
- - `--device <id>` / `--device-name <name>` targets a device; `--platform <ios|android|tvos|web|vega>` scopes by platform.
128
+ - `--device <id>` / `--device-name <name>` targets a device; `--platform <ios|android|tvos|web|vega|roku>` scopes by platform.
129
129
  - Vega (Amazon Fire TV) is D-pad driven: navigate with `press-key "Remote Dpad …"`; coordinate `tap-on` also works. `open-link`, `set-location`, gestures, and clipboard are unsupported. See `conductor-device-setup`.
130
+ - Roku is D-pad only — there is no touch. `tap-on <selector>` resolves the element but presses `Select`, which activates whatever currently holds **focus**, so navigate focus onto the target with `press-key "Remote Dpad …"` first and use `tap-on` to confirm. `scroll`/`swipe` become repeated D-pad presses in the direction the content moves. `open-link` needs an app id (it becomes a channel launch parameter). Only sideloaded dev-mode channels are inspectable. See `conductor-device-setup`.
130
131
  - Add `--json` for machine-readable output; failed assertions exit non-zero.
131
132
  - Run a per-session daemon for many commands (see `conductor-device-setup`).
132
133
  - `conductor <command> --help` for exact flags.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: conductor-device-setup
3
- description: Boot, list, and manage devices and app installs for the conductor CLI — iOS simulators, Android emulators, tvOS simulators, Vega (Amazon Fire TV) virtual devices, and Playwright web browsers — plus sessions, the warm-driver daemon, and the parallel device pool. Use when starting or stopping a simulator/emulator/browser, attaching to a Vega VVD, installing or launching an app, setting up the web driver, attaching to an already-running browser over CDP (e.g. an Electron app / its webviews), keeping the driver warm, or coordinating multiple devices for parallel agents.
3
+ description: Boot, list, and manage devices and app installs for the conductor CLI — iOS simulators, Android emulators, tvOS simulators, Vega (Amazon Fire TV) virtual devices, Roku devices, and Playwright web browsers — plus sessions, the warm-driver daemon, and the parallel device pool. Use when starting or stopping a simulator/emulator/browser, attaching to a Vega VVD or a Roku device, installing or launching an app, setting up the web driver, attaching to an already-running browser over CDP (e.g. an Electron app / its webviews), keeping the driver warm, or coordinating multiple devices for parallel agents.
4
4
  ---
5
5
 
6
6
  # Conductor — device & app setup
@@ -21,7 +21,7 @@ conductor list-apps # installed app ids / package names (--json adds ap
21
21
 
22
22
  | Command | Purpose |
23
23
  | --------------------------------------------------------------------- | -------------------------------------------------------------------------- |
24
- | `conductor start-device --platform <ios\|android\|tvos\|web\|vega>` | Boot a simulator/emulator, start the web driver, or attach to a Vega VVD |
24
+ | `conductor start-device --platform <ios\|android\|tvos\|web\|vega\|roku>` | Boot a simulator/emulator, start the web driver, attach to a Vega VVD, or check a Roku device |
25
25
  | `conductor start-device --os-version <n> --device-type <name>` | Pick OS version + device type (creates if needed) |
26
26
  | `conductor start-device --platform android --avd <name> --device-type <profile> --memory <mb>` | Create an Android AVD with a RAM floor (default 4096MB; only raises, creation-time only) |
27
27
  | `conductor stop-device [<name-or-id>] [--all]` | Shut down device(s) |
@@ -69,6 +69,39 @@ app launch — so launch the app under test via conductor. Navigate with the D-p
69
69
  works. Unsupported on Vega: deep links (`open-link`), `set-location`, gestures,
70
70
  screen recording, clipboard, `clear-state`/`uninstall-app`.
71
71
 
72
+ ### Roku
73
+
74
+ Roku is driven over the network with the **External Control Protocol** (ECP — an
75
+ HTTP REST API on device port 8060). There is no emulator and no driver process:
76
+ physical hardware only, and every command is a stateless ECP call.
77
+
78
+ Device setup, once per device:
79
+
80
+ 1. Enable developer mode (Home ×3, Up ×2, Right, Left, Right, Left, Right) and
81
+ set a dev password.
82
+ 2. Set **Settings > System > Advanced system settings > Control by mobile apps >
83
+ Network access** to **Permissive** — recent Roku OS versions answer `403` to
84
+ every keypress otherwise, while still serving the view hierarchy.
85
+
86
+ Environment:
87
+
88
+ ```bash
89
+ export CONDUCTOR_ROKU_HOST=192.168.1.100 # pin a device by IP (primary)
90
+ export CONDUCTOR_ROKU_PASSWORD=devpwd # dev-mode password (screenshots only)
91
+ export CONDUCTOR_ROKU_DISCOVERY=true # optional: SSDP LAN scan (~1s per listing)
92
+ ```
93
+
94
+ Devices show up in `list-devices` as `roku:<host>`;
95
+ `conductor start-device --platform roku [--name <host>]` checks reachability
96
+ rather than booting anything. The view hierarchy comes from `/query/app-ui`,
97
+ which **only reports sideloaded dev-mode channels** — a store channel inspects as
98
+ empty. A sideloaded channel's app id is `dev`. Screenshots need
99
+ `CONDUCTOR_ROKU_PASSWORD`.
100
+
101
+ Unsupported on Roku: `install-app`/`uninstall-app` (sideload via the device's dev
102
+ web server at `http://<device-ip>`), `list-apps`, `clear-state`, gestures,
103
+ screen recording, clipboard, `set-location`, memory/CPU profiling, and device logs.
104
+
72
105
  ## App lifecycle
73
106
 
74
107
  | Command | Purpose |
@@ -18,9 +18,14 @@ Measure a running app's performance and inspect crashes.
18
18
  | "Which component re-renders on every input?" | `profile react start` → interact → `profile react stop` |
19
19
  | "Memory grows / it stutters periodically" | `profile memory --track 30` |
20
20
 
21
- `profile frames`, `profile cpu` and `profile memory` work on **release builds**
22
- and on real hardware. `profile js` and `profile react` attach over Metro, so
23
- they need a dev/profiling build.
21
+ Only `profile frames` and `profile memory` work on a **stock release build**.
22
+ `profile cpu` needs `android:debuggable` or `<profileable android:shell="true"/>`
23
+ in the manifest; `profile js` and `profile react` attach over Metro, and release
24
+ Hermes ships without the inspector so there is no target to attach to.
25
+
26
+ On TV, run `profile frames --track` with `--repeat 5`. Identical captures of one
27
+ screen have been measured spanning 37.8-72.9% janky — a single window can invent
28
+ a regression or hide one, and cannot support a `--diff`.
24
29
 
25
30
  ## Frame timing & jank (Android, incl. Fire TV / Android TV)
26
31
 
@@ -43,7 +48,7 @@ navigation, prefer asking a human to drive the physical remote during the
43
48
  window (the command announces the window on stderr for exactly this), and treat
44
49
  a divergence between human-driven and automated numbers as the harness.
45
50
 
46
- Not available on `vega` — but a **physical Fire TV Stick runs Fire OS
51
+ Not available on `roku` (ECP exposes no counters) or `vega` — but a **physical Fire TV Stick runs Fire OS
47
52
  (Android)** over adb and works fine.
48
53
 
49
54
  Attribute jank by comparing each phase's p95 against its p50: `vsyncDelay` means