let your agent control your phone
Onboarding offers a cloud Android, with the first 100 minutes free (#79)
shawn panacb981e84a729
diff --git a/README.md b/README.mdindex 5db4eb2..d2f687b 100644--- a/README.md+++ b/README.md@@ -39,6 +39,8 @@ Set up phone-harness for me. Clone https://github.com/ShawnPana/phone-harness inThe 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.`phone-harness --doctor` checks the chain. Details in [install.md](install.md).## Usagediff --git a/install.md b/install.mdindex 63564a4..f5a50a6 100644--- a/install.md+++ b/install.md@@ -31,6 +31,9 @@ phone-harness skill > "${CODEX_HOME:-$HOME/.codex}/skills/phone-harness/SKILL.mdRe-run the `phone-harness skill > …/SKILL.md` lines after pulling updates sothe agent's copy matches the code.+- **No phone on your desk?** `phone-harness cloud login` then+ `phone-harness cloud start` rents your own Android in the cloud; new accounts+ get $5 of credit (100 minutes). It needs only adb (below) — nothing to pair.## iPhonediff --git a/onboarding.md b/onboarding.mdindex 472ddd4..b41e66f 100644--- a/onboarding.md+++ b/onboarding.md@@ -7,8 +7,10 @@ Settings, then wait.## 1. One question-"Which phone should be your default — iPhone or Android?" (Both is fine: set-up each, then ask which is the default.)+"Which phone should be your default — your iPhone, an Android on your desk,+or an Android in the cloud?" (Both an iPhone and an Android is fine: set up+each, then ask which is the default.) The cloud option needs no phone at all:+skip to step 4.## 2. iPhone@@ -38,13 +40,36 @@ so the user can see what you're doing.Check with `phone-harness android` and `phone-harness --doctor android`.-## 4. Verify+## 4. Cloud Android (offer it once)++Phone Harness Cloud rents the user their own Android in the cloud: the same+helpers, nothing to pair, and the phone keeps its apps and logins between+sessions. **New accounts start with $5 of credit — the first 100 minutes are+free.** After the iPhone or desk-Android setup, offer it once:++"Want a cloud Android as well? Same tools, nothing to plug in, and your first+100 minutes are free. It is a one-time sign-in in your browser."++For an iPhone user the pitch is testing on Android without owning one; for an+Android user it is a second, always-available phone. If they say no, note it+in the summary and move on. If yes:++- `phone-harness cloud login` — a URL and a code print, and their browser+ opens. They sign in or, without an account, join the waitlist right there+ and get an invite email; if they join the waitlist, the sign-in times out+ and they come back once invited. Never click Join or Approve for them.+- Once signed in: `phone-harness cloud start` (it opens the live view in their+ browser), one read-only proof — a screenshot and the screen read back —+ then `phone-harness cloud stop`. Keep it to a minute or two: the credit is+ theirs.++## 5. Verify`phone-harness --doctor` for the default phone (add `ios` or `android` tocheck the other), then a read-only proof: take a screenshot and read thescreen back to the user.-## 5. Demo (opt-in)+## 6. Demo (opt-in)Ask whether to open phone-harness.com on the phone (Safari on iPhone, Chromeon Android), tap "Star on GitHub" and star the repo for them — only if they say@@ -53,7 +78,8 @@ instead.## Rules-Never type a PIN. Never change a phone setting without asking. Connecting the-phone is the user's job — relay the doctor's message and wait; don't+Never type a PIN. Never change a phone setting without asking. Never sign the+user up for anything or spend their cloud credit beyond the proof. Connecting+the phone is the user's job — relay the doctor's message and wait; don'tretry-loop. After this, day-to-day usage is `SKILL.md`; setup reference andtroubleshooting are `install.md`.diff --git a/src/phone_harness/cloud.py b/src/phone_harness/cloud.pyindex d7fb909..8604ae2 100644--- a/src/phone_harness/cloud.py+++ b/src/phone_harness/cloud.py@@ -424,8 +424,9 @@ def _login(args):sys.exit("Sign-in was denied." if err == "access_denied"else f"Sign-in failed: {err}")if not tok:- sys.exit("Sign-in timed out. Run `phone-harness cloud login` again — or, without an "- f"account to sign in with, get one at {SIGNUP}")+ sys.exit("Sign-in timed out. If you joined the waitlist just now, run "+ "`phone-harness cloud login` again once your invite email arrives. "+ f"No account and no waitlist yet? {SIGNUP}")try:me = _api("GET", "/me", token=tok["access_token"])except CloudError as e: