Skip to content

Add Revyl as an alpha device host - #1

Merged
capy-ai[bot] merged 24 commits into
mainfrom
feat/revyl-device-host-v2
Dec 4, 2026
Merged

capy-ai[bot] merged 24 commits into
mainfrom
feat/revyl-device-host-v2

Conversation

@KayaanT

@KayaanT KayaanT commented Dec 2, 2026 •

Copy link
Copy Markdown

Adds Revyl as an alpha device host (proposed upstream in pingdotgg/t3code#34732). The README's "About this fork" covers running it with a Revyl key.

  • Phones: Revyl iOS simulators and Android emulators start through agent-device's Revyl plugin and stream to the Device panel over WebRTC, with taps, gestures, Home/Back, typing and rotation.
  • Revyl Macs: the org's persistent Macs plus "New Revyl Mac". Ending or idling stops the Mac with its disk saved. A reopened Mac streams its new run, not the stopping one (the old "No video received until Reconnect").
  • Revyl web apps: the org's web apps open in cloud browsers in the panel, with taps, drag-to-scroll, typing, named keys and copy/paste.
  • Agent tools: new device_input drives an open Revyl Mac or web app (click at screenshot pixels or a described target, double/right click, drag, scroll, type, key chords, navigate). device_open opens them without agent-device; phones keep agent-device.
  • Settings and docs: Revyl source settings in every locale and the Revyl sections of docs/user/devices.md. Merges the fork's main.

Testing

  • vp run check:changed and vp run i18n:check pass.
  • Live on prod, built from feat(device): Sign in with Revyl for Revyl Macs #2's head: Codex in T3 searched Wikipedia in a Revyl web app with device_input, opened Applications in Finder on a new Revyl Mac, opened a product on a Revyl iPhone and a Revyl Android emulator, then closed all four with shutdown.

Web app
Mac
iPhone
Android

The agent-context-increase label covers the new tool's schema (+1.4 KB tool list, +133 B instructions).

Known gap: Android landscape draws the portrait stream stretched (Revyl's Android stream doesn't rotate its frames).

KayaanT and others added 16 commits December 1, 2026 23:59
Opens Revyl iOS simulators and Android emulators through agent-device's Revyl plugin, one HTTP daemon per session so agents bind to the same session. Hosts can now answer hub requests themselves (DeviceHostReady.serve); the Revyl host translates serve-sim's WebRTC signalling to Revyl's WHEP endpoint and its input socket to device-proxy taps, long presses and drags.

The host sits behind a Labs toggle and is added from Settings → Devices with an API key (or REVYL_API_KEY), per-platform app URLs, and session limits. Sessions are capped per host, end at a maximum age and with their host, and daemons a stopped server left behind are stopped when the host next starts. REVYL_API_URL points it at another Revyl API.
The Revyl host now maps serve-sim key messages to text typed at the last tapped point (Enter and Backspace as keys) and orientation messages to set_orientation, falling back to portrait or landscape when the device lacks precise rotation, then reports the new screen to the panel. Input reaches Revyl in order, one request at a time, and keys typed while one is in flight go together.

Also races the serve hook with session invalidation like proxied hub requests, translates the Revyl settings copy, and shows the rotate button for Revyl Android emulators.
Revyl reports screen size in the units its taps use: an iOS simulator keeps its portrait framebuffer, which the panel turns, while an Android emulator rotates its own. Re-read health after set_orientation instead of swapping dimensions locally.
Without precise orientation support, Revyl's landscape turns an iOS simulator to what the panel calls landscape_right, so reporting landscape_left drew landscape apps upside down and mapped taps to the wrong corner.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A catalog entry such as revyl:ios boots a device with a new id. The session records the id it was opened with, so device_screenshot and device_close accept either.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Revyl answers 422 invalid_request to POST /start or /stop with a JSON body.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…hem without a start

The panel marked every listed Mac stopped unless this server held it, so a Mac another client was running read as Stopped and offered Start. Listed Macs now take their state from Revyl, and opening a starting or running Mac attaches to it without POSTing /start.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Opening a Mac someone else is running attaches to it. Letting go of it, by End session, the idle timer, or server shutdown, now leaves it running instead of stopping another client's work.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…longer has open

The Device list names each Revyl Mac by its full computer id, which mac-setup and the Revyl API need. A stream whose device the hub answers 404 for three times in a row, as after a server restart, now stops with "Open it again from the device list" instead of retrying forever.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Revyl ends idle device sessions on its own. The device proxy then answers 404, but T3 kept the lease, so the Device list still showed the device as running and every screenshot failed. A 404 on a screenshot now releases the lease, so the device leaves the list and the next device_open starts a fresh session.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
device_open now tells agents to open a booted device from device_list rather than boot another, and the Revyl quick start tells them to keep an app already connected to a dev server, such as an Expo dev client on a revyl dev loop, instead of starting a new session or tunnel. The tool list grows by 109 bytes; the context budget records it.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@KayaanT
KayaanT force-pushed the feat/revyl-device-host-v2 branch from 04f45a9 to fee01d2 Compare December 2, 2026 03:04
KayaanT and others added 7 commits December 2, 2026 05:13
…Macs

agent-device holds a Revyl cloud device for 5 minutes past its last command and ignores T3's lease TTL, so a phone shown in the panel without agent commands ended at 5 minutes. While the panel has a view open, T3 now runs agent-device appstate every minute; it stops with the view, the session's maximum age, or a close.

Persistent Macs were listed by their full computer id. They now show their Revyl name, else when they were created.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…pened Mac's new run

Revyl hosts can list the organization's Revyl web apps in the Device panel. Opening one starts a
cloud browser through Revyl's start_device, streams its page over WHEP, and drives it through the
device proxy: taps, long presses, drags as scrolls, typed text, named keys, and select all, copy,
and paste. Closing the device, the session limit, or stopping the host ends the session.

A Mac started again reports running while it still names its last run, whose session can still
publish a stream while it stops, so the panel watched a dead stream until Reconnect. Attaching now
reads the computer on each poll and takes only a live session's stream, and waits up to 20 minutes
for a start.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…redirect

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	apps/mobile/src/i18n/translations/pl.json
device_open now opens a Revyl Mac or web app without agent-device and
points the agent at device_input: clicks at screenshot pixels or on a
described target, double and right clicks, drags, scrolls, typing, key
chords, and navigate in a browser. Revyl's refusal reaches the agent.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot added the agent-context-increase Accepts agent context growth over main label Dec 4, 2026
The Mac open cleaned up with tapError, so an open cancelled while the Mac
was starting left it running untracked. Clean up on exit instead, covering
create as well as start, like the web and phone opens.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit ab13b07 into main Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-context-increase Accepts agent context growth over main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant