Commit Graph
1 Commits
Author SHA1 Message Date
CatoandClaude Fable 5.2 5199fff1dd feat(orangecat): a browser of its own for every bot; a picture a thread can show (#1697)
* feat(orangecat): a browser of its own for every bot; a picture a thread can show

Cat Bot's computer use (OrangeCat docs/PARITY.md, plan step 2), Loki's half.

POST /api/orangecat/browser, on the signed rail for the linked account, takes
one step in the bot's browser: open, click, type, press, scroll, back, look,
close. Every answer carries what the page now shows: address, title, the
readable text, what can be clicked or typed into (numbered, so a model that
cannot see pictures can still drive), and a picture.

- lib/bot-browser: one session per (account, bot) in Loki's own Chromium,
  the whole context kept out of the private network, cookies kept between
  sessions in a file only this server reads. Closed after three idle
  minutes, twenty at the outside; two at once on the box, and a session in
  use is never closed for another. The page reader is sent as a string: a
  bundler that names inner functions made it read every page as empty.
- lib/bot-browser-rules: pure. A bot never types a password, a sign-in code
  or a card; the step stops and says the owner does that.
- lib/bot-shots + GET /api/orangecat/shot/[token]: a thread shows a picture
  only from a web address, so pictures are kept a week under a name nobody
  can guess. The site walk now answers a failed page with that address
  instead of bytes.
- page-picture exports its private-network guard and its browser lookup, so
  there is still one of each.

scripts/test/bot-browser.ts (11), site-walk.ts (13). Driven for real from a
sandbox browser against orangecat.ch: open, numbered elements, click by
label, scroll, back, a password field refused, a private address refused.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmt4p1jMfJnbJtpeNhi

* docs(handoff): Cat Bot parity with Grok Bot, the running checkpoint

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmt4p1jMfJnbJtpeNhi

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 07:20:09 +01:00