feat: support cloud devices in agent CLI runs - #431
Conversation
9462445 to
8e0985d
Compare
| raise ValueError("--cloud and --ios are mutually exclusive") | ||
| if tcp: | ||
| raise ValueError("--cloud and --tcp are mutually exclusive") | ||
| if config.device.control_backend: |
There was a problem hiding this comment.
Leave the comment about difference pls
|
|
||
| from mobilerun_core_local.driver.cloud import CloudDriver | ||
|
|
||
| injected_driver = CloudDriver( |
There was a problem hiding this comment.
Codex review — [P2]: Cloud runs do not enable CloudDriver’s built-in stealth mode. This constructor leaves stealth at its default value of false. The generic wrapper later delegates cloud tap and swipe operations back to this driver, so requests are sent without stealth enabled even when config.tools.stealth is true. Please pass the configured value to CloudDriver, or otherwise wire cloud stealth explicitly, and add a regression test.
| goal=command, | ||
| llms=llm, | ||
| config=config, | ||
| driver=injected_driver, |
There was a problem hiding this comment.
Codex review — [P1]: Combining --cloud with an external agent can target the wrong device. The user selects a cloud device, but external agents only support locally connected ADB devices, so the task may run on the first local Android device instead. I reproduced this behavior. Please either reject this combination with a clear error or extend the external-agent contract to accept a DeviceDriver, and add a regression test.
Summary
mobilerun run --cloudsupport using an injectedCloudDriver-d/--deviceor--device-id--cloud-base-urlTesting
uv run pytest -q— 630 passed, 6 subtests passeduv run ruff check .— passedblack==25.9.0 --checkon changed Python files — passedgit diff --check— passeduv run bandit -r mobilerun -q— reports the existing repository baseline findings; no new finding was introduced by these changesuv run safety scan --output screen— could not run non-interactively because Safety requires account loginManual verification
mobilerun run --helpexposes--cloudand--cloud-base-url