Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Cua Spaces for iPhone, iPad and Android: design
The phone talks to your Spaces and watches them, and it can start a task: the machine's daemon makes the Space (or finds the agent's home), the way the web Home does. It does not host any Space (out of scope, conditional in the storyboard). A Space opens as its room thread: people and agents are members, you @mention an agent to task it, results come back inline, approvals are cards with Deny and Allow, and the Space's live desktop is one tap away at the top.
Status: first version. The Home layout puts the live thumbnail bar above the agent list. What is real and what is not available yet is listed in README.md and SETUP.md.
Why React Native, and Expo
The phone app is React Native rather than SwiftUI. One code base then covers iOS (iPhone, iPad, the folding iPhone Duo by window width) and Android (phones, tablets, foldables) from the same screens, tokens and tests. The SwiftUI Mac app stays the Mac product (apps/cua-spaces-macos); the phone does not replace it.
Expo (managed workflow with a local native module, prebuilt on demand) over bare React Native:
- The native surface we need is small: one local module (
modules/cua-core), the system sign-in sheet, the Keychain, local notifications, haptics, a web view. Expo ships maintained modules for all of them (expo-auth-session,expo-secure-store,expo-notifications,expo-haptics,react-native-webview), andexpo/fetchstreams response bodies, which gRPC-Web needs and React Native's ownfetchdoes not. expo prebuildgeneratesios/andandroid/fromapp.jsonand the module; they are not committed, so there is nothing to keep in sync by hand. Leaving Expo later (to bare) is a prebuild away.- expo-router gives file based routes and deep links for free (
cua-spaces://space/<id>?entry=<seq>is what a notification opens).
Reach: iOS 16.4 and later, iPhone and iPad (the layout follows the window width, so Split View, Slide Over, a folded or opened Duo and landscape all land on the right one; see src/layout/layout.ts). Android: the same JS and views run; what is missing there is the Rust core library (a cargo-ndk build into the module's android/ folder; the module reports available: false until then and the screens say so instead of answering in the core's place) and the Android build itself, which was not made here (no Android SDK on the build machine). Web is not a target.
The app core: one C function, not WASM and not UniFFI
The web app loads cua-spaces-app-core as WebAssembly behind one export, call(method, argsJson). The SwiftUI app reaches the same crate through UniFFI (cua-spaces-ffi). For React Native:
- WebAssembly is out: Hermes has no
WebAssemblyglobal. uniffi-bindgen-react-nativeovercua-spaces-ffiwas considered. That crate links the local runtimes, the host, media decoding and teleport, none of which build for iOS or Android, so it would need a new cut down UniFFI crate first, plus a pre-1.0 generator (C++ and JSI glue) in the build.- Chosen:
core/is a 100 line crate (cua-spaces-mobile-core) over the same JSON dispatcher the web app uses, exported as three C functions and linked as a static library into an Expo module (modules/cua-core; iOS Swift calling an Objective-C shim;scripts/build-core-ios.shbuilds the xcframework). It needs onlycua-spaces-app-corewith default features, which is the pure view-model logic that already builds for wasm.
Parity: the phone is one more host of the core's scripted flows. core/tests/parity.rs replays every flow in cua-spaces-app-core/parity/ through cua_spaces_mobile_core::call (the function the module calls) against the same goldens the Mac, web and Tauri apps match. core/tests/fixtures.rs pins the answers the React Native tests read (core/fixtures/results.json, from the calls in calls.json): Jest cannot load a Rust library, so Jest replays that file and cargo test fails when the core drifts from it. RECORD_CORE_CALLS=1 pnpm test records new calls the tests make.
What comes from the core today: the Home status words and the agent list (agentList.view: order, "Waiting for you in checkout-api", "Running tests in checkout-api"), the loading and reaching lines (spaces.listView), the sign-in failure words (signIn.failedFromError) and the notification plan (notifications.plan). The push approval card (threadCards.exportCard) and how authors show (threadCards.author, Cua's own entries as the APP) are the core's too. Strings that exist only on the phone (button labels, the composer, empty states) are in the components.
Data: what the relay and the daemons give a phone
No local daemon is needed; the phone is a client of the account.
- Sign in: authorization code with PKCE in the system sign-in sheet (ASWebAuthenticationSession through
expo-auth-session), issuerhttps://auth.cua.ai/realms/cyclops-cs, tokens in the Keychain, refresh before expiry (src/auth/session.ts). The shape followscua-auth.cua-clionly accepts a loopback redirect, so the phone needs its own public client with the redirectai.cua.spaces:/oauth/callback; registering it is owner-only (SETUP.md). - Relay: this phone is a client device of the account (
cua-host::device): a P-256 key that is made, kept in the Keychain and used for signing on the native side (core/src/device.rsbehind the Expo module: JavaScript only holds the public key, the id and signatures, never the key), enrolled by the sign-in or by a one-time code an enrolled machine approves, then a session proved by a signed timestamp (src/data/live/enroll.ts).core/tests/device_known_answers.rschecks the ids, the signatures and the message formats againstcua_host::device, the Rust the relay and the CLI use; the message formats are one shared file read by both languages. Machines come fromGET /v1/machines; a Space provided by a host is grouped under that host (src/data/live/spaces.ts). - Thread, members, posting, approvals: the daemon's
thread_read,thread_post,agent_members(andagent_interrupt), run by the host that provides the Space throughHostThreadService.CallThreadToolover gRPC-Web at<relay>/m/<host>(the pathcua-spaces::thread_routetakes). The wire mapping is carried over from the web app (src/data/thread/protocol.ts,fold.ts). Long polling (follow_ms) keeps the thread live; the stage and streaming text of working agents ride the same read. - Stream and touch:
SystemService.CreateViewerTicketfor the daemon's HTML5 viewer (WebCodecs) in a web view, andComputerService.PointerandKeyboardfor touch (normalized coordinates), through the same generated Connect-ES client the viewer uses (scripts/sync-proto.mjscopies it and--checkfails on drift). A native decoder of the CuaSpacesStreaming media protocol is the later step. - Notifications: local only. A push that reaches a closed app needs a sender in the relay and an APNs key; see
SETUP.md.
None of the live paths has ever been run against a real relay, a real sign-in provider or a real daemon (no account was available to the build). They are tested against a fake relay and a fake host daemon (__tests__/live-backend.test.ts, relay.test.ts) and are labelled unverified in the README. Where the relay or the daemon cannot do something for a phone, the backend says so (capabilities.why) and the screen hides the control; nothing stands in.
The screens
- Home. A bar of live 16:9 Space thumbnails (a small live dot, the name under each, an orange ring for Needs you) above an iMessage style list of the agents you talk to (avatar, last message, time, unread badge, one status: Needs you, Running, Asleep, and the plain words). A Space with no agent yet is listed too, so every Space opens. Search, a machine filter (no separate machines page), pull to refresh, swipe or long press for Sleep and Share where the backend can, a skeleton while loading, a quiet offline line over what was last loaded.
- The thread. A centred header with the live thumbnail and a status pill under it (name, then one line: "Needs you, approval", "Claude Code, running tests", "Asleep, a message wakes it", "Reconnecting"), the room as one column, a floating pill composer. Cua's own entries show as the author
Cuawith anAPPtag and the Cua Spaces icon. Approvals are cards; a push approval is a small card (headline,branch into base, one diff line with green+and red-, the account) with "Show changes" for the files with their five square bars, the commits and the pull request that will open; an answered card collapses to one line. Tool calls are one muted line each, grouped under one phrase ("Read 2 files, edited 2 files, ran 1 command"; "Used 3 machine actions" for computer use) and opened for the short rows, then the detail. The group phrase is the table of cua-agents'tool_row::group_label, which a phone cannot link (cua-agents pulls in the daemon client), so it is repeated intimeline.tsand pinned to the crate's shared fixture by__tests__/tool-groups.test.ts, which fails when the two drift; moving the table into the app core is the follow-up that removes the copy. A "Since you were here" line sits before what is new. Messaging an asleep agent wakes it. - The stream. Tap the header thumbnail: it grows into a compact stream under the header, then full screen. Taking control interrupts the agents; giving back needs no call (an agent wakes on its next message). Touch: tap clicks, long press right clicks, double tap double clicks, two fingers scroll, pinch zooms, one finger moves the cursor in trackpad mode, a keys row (Esc, Tab, Ctrl, Alt, Cmd, arrows, Enter) and the keyboard.
- Wide windows.
split(an iPad portrait): list and chat, the stream stacked in the chat.duo(a Duo opened out): chat on the left half, desktop on the right half.triple(an iPad landscape): list, chat and desktop.
Look: the desktop apps' tokens (converted once from apps/cua-spaces-web/src/index.css), system fonts with Dynamic Type, SF Symbols on iOS, borderless tiles a step off the page, one neutral primary, Cua Blue only for focus and mentions. Light and dark follow the system. Reduce Motion drops the springs and fades. Every control has an accessibility label; statuses are named ("Studio Mac, online").
Wording rules the tests enforce
"Machines", never "devices" or "computers", and no middle dot separator, in any string the app can show (__tests__/strings.test.ts reads every string literal and JSX text, the core fixtures and the sample card). Where a CLI command a person must type contains "devices" (cua devices approve), it is listed as a quoted command in that test.
Sample data
src/data/demo holds made up people, machines, Spaces and messages in the real wire shapes. It exists only in a build made with EXPO_PUBLIC_CUA_SAMPLE=1 (screenshots, the Maestro flow, tests), and every screen says "Sample data". A normal build has no way into it. The sample agent's replies are canned text.
The second pass: closing the gap with a full remote control
What was added after the first version, and where each piece lives. The rule for all of it: every sentence and every rule is the Rust app core's (libs/cua/crates/cua-spaces-app-core/src/phone), so the phone, and any other shell that wants the same screen, say the same thing; React Native lays out and runs the network.
- Start a task (
features/task/StartTaskSheet.tsx, corestartTask.*). One box, an agent, where it runs (Let Cua decide, a machine, or a Space that exists) and "Add a repo". The job is the first message@agent job(summon.firstMessage, the web Home's rule); the machine adds theRepo:line. The options are what each online machine says (task_options: itself and which agents are connected there), so a machine without the agent, an offline machine and a machine with no room are shown disabled with the reason. The request carries aclient_id, so the same task twice is one task; a Space that takes time to make answerscreatingand the sheet followstask_status("Starting your task"). Example jobs for an empty box are the core's prompt library, read throughfirstPrompts.choose; nothing is copied. - Tool rows (
state/backend.tsxuseToolRows, coretoolRows.*). The daemon writes each row (cua_agents::tool_row); the phone long-pollsthread_tool_rows, merges calls by id (running to done), and draws one muted group per message with the core's phrase. The phrase table moved into the core and is held equal tocua-agentsby a Rust test; the TypeScript copy is gone. The sample build answers in the same wire shape through the same mapper. - Offline store (
store/, coreoutbox.*,cache.line, the mobile core'sstore.*). Two things on disk, both sealed: the outbox and the cached threads and Spaces list. Sealing is AES-256-GCM in Rust (core/src/store.rs, checked against a published known answer); the key is made on first use and lives in the Keychain, this phone only; JavaScript holds sealed text. The outbox is the core's state machine:prepare's message semantics (claim before posting, never post a claimed message blindly after a quit, back off on a lost connection, give up loudly after five real refusals), per Space and in order. A message the machine did not take shows under the thread with "Waiting for a connection", "Sending...", or "Not sent" with Retry and Delete; the thread says "You're offline. Showing what was saved 2h ago." over cached content and never presents it as current. Sign-out removes the sealed copies and the key. - Approval scopes, Queue and Steer (
features/thread/cards.tsx,Composer.tsx, coreapprovals.*,sendMode.view). A card has Decline, Allow once and, only when the daemon says a Space grant makes sense (scope_choices), Allow for this Space; "1 of 3" when several wait. Inside a Space agents run auto-approved because the Space is the sandbox, so there are no per-thread permission modes: approvals only exist at the Space's edge. While an agent runs the send button is Queue (the message waits behind the step in progress; "2 messages queued") and Steer (interrupts the step) is a long press, the plus menu or the VoiceOver action; both go throughagent_messagewith a client id. - Voice (
modules/cua-voice,features/thread/dictation.ts, corevoice.*). Hold the microphone button: the phone's own recognizer (SFSpeechRecognizer, on the phone when the language supports it) types into the box at the cursor, replacing its own earlier guess. Microphone and speech access are two system prompts, asked on the first press; refused states say where to turn them on and open Settings. No Cua server transcribes. VoiceOver users activate the button to start and stop. - Diffs (
features/diff, corediff.*). Reachable from the thread header and from the push card ("Open the full diff"). A file list with the card's counts and bars, one file's diff as numbered hunks (unified, or with the words that changed marked: a token diff in the core), and a preview of an image or a text file; large, binary and cut files say so. When the machine checked the changes against the push approval's card the screen says so. - Push (
notifications/push.ts, corepush.*). Registers the APNs token with the relay (PUT /v1/push/registrations/{device}), withdraws it when every alert is off, permission is refused or the person signs out, and routes a tap from the structureddataonly (the approval it is about, else the thread at the entry, else Home). Settings says exactly where push stands. The relay's sender and the APNs key are owner and server work; the client is tested against a mock provider (notifications/mockPush.ts).