1 Commits
Author SHA1 Message Date
CatoandClaude Opus 5.5 29bfe8012a feat(browser): Terminal → Browser — watch a bot's browser live and take it over (#1772)
The browser Loki's agents and Cat Bot already drive (lib/bot-browser) gets
a screen: a third view of a session beside Chat and Terminal, beside the
conversation on a wide screen and in its place on a phone, with the agent
box under it.

- CDP screencast while someone watches (6 fps, newest wins), drawn by the
  existing RobotBrowser, which gains onTap
- one wheel: a person's step takes it; every bot step (a look too) answers
  TAKEN_OVER until hand-back, and the bot's next look carries handedBack
- the password/code/card refusal shows as "<bot> needs you" with Take over
- caption, pointer on the bot's target, "What happened" timeline (never
  typed text); native <select> offered as a picker; dialogs said in words
- memory: every browser's process tree measured (PSS), closed over 700 MB
- doors: /api/browser/live + /input (a signed-in person, own browsers only),
  /api/browser/step (the account's ck_ token, for Terminal agents),
  /api/browser/sessions; cloud-builder accounts only; demo denied
- /screen redirects to /terminal?view=browser
- scripts/test/screen-browser.ts: end to end at 390px and wide

Measured on the laptop: one live browser 229–236 MB PSS.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 22:11:03 +01:00