let your agent control your phone
Say that only cloud Android bills by the minute (#137)
shawn panab962471da6fd
diff --git a/README.md b/README.mdindex c405957..5448770 100644--- a/README.md+++ b/README.md@@ -41,7 +41,7 @@ The agent asks which phone is your default and walks you through the partsthat need your hands: pairing iPhone Mirroring and granting Accessibility andScreen Recording, or turning on Android developer options and approving adb.It also offers a cloud Android — the same helpers with nothing to pair, and-the first 100 minutes free — so an iPhone user can test on Android too.+the first 100 minutes free; only cloud Android bills by the minute — so an iPhone user can test on Android too.`phone-harness --doctor` checks the chain. Details in [install.md](install.md).**Hermes Agent:** `hermes plugins install ShawnPana/phone-harness/integrations/hermes`@@ -79,7 +79,7 @@ phone-harness cloud start ios # the account's iPhone, when only one is liphone-harness <<'PY'print(screenshot())PY-phone-harness cloud stop # billing stops; a saved Android is written back+phone-harness cloud stop # ends the session; a saved Android is written back````cloud ls` is the catalog (`GET /me` → `available`): each phone's label,diff --git a/SKILL.md b/SKILL.mdindex 686db85..978732d 100644--- a/SKILL.md+++ b/SKILL.md@@ -198,7 +198,7 @@ phone-harness cloud start "Temporary phone" --for 90sphone-harness --session SID <<'PY' # this process only; or PHONE_HARNESS_SESSIONprint(screen_info())PY-phone-harness cloud stop # ends billing; returns at once+phone-harness cloud stop # ends the session; returns at oncephone-harness cloud phone # the saved Android's stored statephone-harness cloud watch # reopen the read-only live view (--print to share)phone-harness cloud open # the dashboard: the user takes the controls@@ -211,8 +211,9 @@ phone-harness cloud open # the dashboard: the user takes the`cloud use` rewrites that shared fallback. Parallel agents should pass`--session` and leave `cloud use` alone, or they will steal the fallbackfrom each other.-- **It bills by the minute while it is up.** Start it once and keep it for the- whole conversation. Stop it when the user is done, and say that you did.+- **A cloud Android bills by the minute while it is up; a cloud iPhone does+ not.** Start it once and keep it for the whole conversation. Stop an Android+ when the user is done, and say that you did. An iPhone can stay running.`--for` is the length: `90s`, `15m` / `15min`, or a bare number of minutes.Default 15, cap 30 (`cloud.minutes`, `cloud.max_minutes`).- **Stop before the deadline; a session cannot be extended.** One that simply@@ -269,15 +270,16 @@ A ready session carries `control: {url, token, expires_at}` and no `adb`.From then on the helpers drive it over HTTPS. This machine needs no adb, noshell, and no Mac. It is a phone granted to the user's account and keptbetween sessions - not the personal iPhone mirrored on the Mac, which is a-different device with its own apps and logins. `cloud stop` ends billing-and returns at once; the phone keeps its own data. There is no Android-style+different device with its own apps and logins. It does not bill by the+minute, so there is no need to stop it to save credit, or to ask before+starting it. `cloud stop` returns at once; the phone keeps its own data. There is no Android-styledisk save, and nothing on this phone for `cloud phone` to wipe.An Android session can stay up beside it. Target one with `--session SID`.`cloud use SID` only changes the terminal fallback.-Length, billing, `ls`, `watch`, and `stop` are the **Cloud phones** commands-above. An iPhone session reports `billing_mode: disabled`. Run scripts as+Length, `ls`, `watch`, and `stop` are the **Cloud phones** commands+above. An iPhone session reports `billing_mode: disabled`: no per-minute charge. Run scripts asplain `phone-harness` (with `--session` when you must pin one).`PHONE_HARNESS_PLATFORM=...` selects a local backend and skips the attachedcloud phone.diff --git a/install.md b/install.mdindex db8a39b..e4696ae 100644--- a/install.md+++ b/install.md@@ -71,7 +71,8 @@ That reaches the default phone. If it fails, use the sections below.`ios` / `android` when that names one phone. An Android needs adb, below.An iPhone needs no adb and no Mac; driving it is **Cloud iPhone** inthe skill. A start lasts 15 minutes unless you pass `--for` (`90s`, `15m`,- or a number of minutes). New accounts get $5 of credit (100 minutes).+ or a number of minutes). New accounts get $5 of credit (100 Android minutes). Only a cloud Android+ bills by the minute; a cloud iPhone does not.No uv? `pip install phone-harness` works too. Upgrade that install with`pip install -U phone-harness` (what `phone-harness update` prints for it).diff --git a/integrations/hermes/README.md b/integrations/hermes/README.mdindex e7c12dc..d1b990c 100644--- a/integrations/hermes/README.md+++ b/integrations/hermes/README.md@@ -102,8 +102,8 @@ is still the skill's consent rule: the agent asks you before those.- Runs model-written Python locally through the phone-harness Hermes installed.- Taps and types into your real phone, with your apps and accounts.- Screenshots are PNG files in the system temp folder.-- A cloud phone streams its screen to Phone Harness Cloud, bills by the minute,- and uses phone-harness's own cloud sign-in.+- A cloud phone streams its screen to Phone Harness Cloud and uses phone-harness's own cloud sign-in.+ A cloud Android bills by the minute; a cloud iPhone does not.- Hermes adds the plugin's toolset to every platform that has a saved toolselection, messaging platforms included. Turn it off there with`hermes tools` unless you want people who can message your bot to drive yourdiff --git a/onboarding.md b/onboarding.mdindex a45e494..f8a368a 100644--- a/onboarding.md+++ b/onboarding.md@@ -77,7 +77,8 @@ in the summary and move on. If yes:- Once signed in: `phone-harness cloud start` (it opens the live view in theirbrowser), then the same demo as step 5 on the cloud phone — openphone-harness.com in Chrome, offer the star — and `phone-harness cloud- stop`. Keep it to a few minutes: the credit is theirs.+ stop`. Keep it to a few minutes: a cloud Android bills by the minute and the+ credit is theirs. (A cloud iPhone does not bill by the minute.)## Rulesdiff --git a/src/phone_harness/cloud.py b/src/phone_harness/cloud.pyindex 23e22aa..6ebad3d 100644--- a/src/phone_harness/cloud.py+++ b/src/phone_harness/cloud.py@@ -951,7 +951,7 @@ def _logout(args):_auth_path().unlink(missing_ok=True)print("Signed out.")if attached():- print("A cloud phone is still running and billing; sign in again to stop it.")+ print("A cloud phone is still running; sign in again to stop it.")return 0@@ -1325,7 +1325,7 @@ def _stop(args):before = _api("GET", f"/sessions/{sid}")held_profile = held_profile or _keeps_state(before)_api("DELETE", f"/sessions/{sid}")- print(f"{term.mark()} Session {sid} ended; billing stopped.")+ print(f"{term.mark()} Session {sid} ended.")except CloudError as e:if e.status != 404:raisediff --git a/tests/test_cloud.py b/tests/test_cloud.pyindex 3cac953..59d5788 100644--- a/tests/test_cloud.py+++ b/tests/test_cloud.py@@ -771,7 +771,7 @@ class CloudCli(unittest.TestCase):r = self.run_cli("cloud", "stop")self.assertEqual(r.returncode, 0, r.stderr)self.assertLess(time.monotonic() - started, 2.5) # no polling for the save- self.assertIn("billing stopped", r.stdout)+ self.assertIn("ended.", r.stdout)self.assertIn("being saved", r.stdout)self.assertEqual(FakeCloud.sessions, {})state = json.loads((Path(self.home.name) / "state" / "cloud.json").read_text())