@houwert/conductor 0.29.3 → 0.31.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 (53) 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 +21 -4
  18. package/dist/commands/launch-app.js +3 -2
  19. package/dist/commands/list-apps.js +16 -0
  20. package/dist/commands/list-devices.js +37 -0
  21. package/dist/commands/memory.js +5 -0
  22. package/dist/commands/press-key.js +36 -3
  23. package/dist/commands/profile.js +4 -0
  24. package/dist/commands/screenshot.js +5 -2
  25. package/dist/commands/scroll-until-visible.js +5 -2
  26. package/dist/commands/scroll.js +4 -1
  27. package/dist/commands/start-device.js +27 -3
  28. package/dist/commands/stop-app.js +2 -1
  29. package/dist/commands/stop-device.js +25 -3
  30. package/dist/commands/swipe.js +8 -3
  31. package/dist/commands/tap.js +3 -2
  32. package/dist/commands/uninstall-app.js +4 -0
  33. package/dist/daemon/input-backends.js +26 -1
  34. package/dist/daemon/log-collector.js +6 -0
  35. package/dist/daemon/server.js +54 -11
  36. package/dist/drivers/bootstrap.js +263 -4
  37. package/dist/drivers/devicectl.js +243 -0
  38. package/dist/drivers/flow-runner.js +26 -4
  39. package/dist/drivers/ios.js +96 -4
  40. package/dist/drivers/roku/app-ui-parser.js +122 -0
  41. package/dist/drivers/roku/discovery.js +136 -0
  42. package/dist/drivers/roku/ecp-client.js +396 -0
  43. package/dist/drivers/roku/key-mapping.js +67 -0
  44. package/dist/drivers/roku.js +237 -0
  45. package/dist/drivers/vega/page-source-parser.js +5 -118
  46. package/dist/drivers/xml.js +128 -0
  47. package/dist/enum-options.js +3 -1
  48. package/dist/index.js +1 -1
  49. package/dist/runner.js +48 -8
  50. package/package.json +1 -1
  51. package/skills/conductor-device-interact/SKILL.md +14 -3
  52. package/skills/conductor-device-setup/SKILL.md +62 -2
  53. package/skills/conductor-profiler/SKILL.md +1 -1
@@ -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`, `Remote Page Up/Down` on tvOS and Android TV, and `Remote Guide` on tvOS) 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,19 @@ 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
+ - Apple TV (tvOS) is focus-driven and has **no touch surface automation**: XCTest
131
+ refuses remote swipe gestures ("Swipe events are only implemented for iOS,
132
+ visionOS, and watchOS"), so `swipe`/`scroll` are unavailable. Navigate with
133
+ `press-key "Remote Dpad Up/Down/Left/Right"` and `"Remote Dpad Center"`; for
134
+ long lists use `press-key "Remote Page Up"` / `"Remote Page Down"` (tvOS 14.3+;
135
+ also mapped on Android TV), which move a screenful at a time when the app
136
+ honours them. `"Remote Guide"` (14.3+) and
137
+ `"Remote TV Provider"` / `"Remote One Two Three"` / `"Remote Four Colors"`
138
+ (18.1+) are also available. `--duration <seconds>` holds a button for
139
+ accelerated scrolling.
140
+ - 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
141
  - Add `--json` for machine-readable output; failed assertions exit non-zero.
131
142
  - Run a per-session daemon for many commands (see `conductor-device-setup`).
132
143
  - `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, physical iOS/tvOS devices, 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, driving a physical iPhone/iPad/Apple TV, 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,66 @@ 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
+
105
+ ### Physical iOS / tvOS devices
106
+
107
+ Real iPhones, iPads, and Apple TVs work alongside simulators. They're discovered
108
+ through `devicectl`, show up in `list-devices` with status `connected`, and are
109
+ addressed by their CoreDevice identifier (`--device <uuid>`).
110
+
111
+ Requirements:
112
+
113
+ - The device is **paired** with this Mac and on the **same network** — conductor
114
+ reaches the driver over the LAN, not the host's loopback.
115
+ - **Developer Mode** is enabled on the device.
116
+ - A signing team: conductor builds and signs the XCTest driver locally on first
117
+ use (a few minutes; cached per team in `~/.conductor/<platform>-driver-device/`).
118
+ Set `CONDUCTOR_TEAM_ID=<team>` when the Mac has more than one development team
119
+ — conductor refuses to guess rather than sign with the wrong one.
120
+
121
+ Everything driven through the XCTest driver behaves the same as on a simulator:
122
+ `inspect`, `capture-ui`, `tap-on`, `press-key`, `swipe`, `launch-app`,
123
+ `terminate-app`, `install-app`, `uninstall-app`, flows.
124
+
125
+ Simulator-only — these fail with an explicit message on a physical device:
126
+ `set-location`, `open-link`, clipboard read/write, `clear-keychain`, `add-media`,
127
+ screen recording and the live video stream, and OS log collection (`conductor
128
+ logs` still gets **Metro** logs, which is the useful source for React Native).
129
+ `clear-state` uninstalls on device without reinstalling — reinstall with
130
+ `install-app` afterwards.
131
+
72
132
  ## App lifecycle
73
133
 
74
134
  | Command | Purpose |
@@ -48,7 +48,7 @@ navigation, prefer asking a human to drive the physical remote during the
48
48
  window (the command announces the window on stderr for exactly this), and treat
49
49
  a divergence between human-driven and automated numbers as the harness.
50
50
 
51
- 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
52
52
  (Android)** over adb and works fine.
53
53
 
54
54
  Attribute jank by comparing each phase's p95 against its p50: `vsyncDelay` means