MASAKA / Browser / Control
Browser

One controller,
real browser tabs.

Capability epochs prevent stale agent and human input from overlapping. Tab actions operate on real WebDriver window handles, not simulated URLs.

Acquire control

POST/api/sessions/:id/control{"mode":"agent"} or human
DELETE/api/sessions/:id/controlRelease human control

A transfer drains earlier input, increments the epoch, and issues a new capability. Every mutating browser command is checked at execution time.

List, create, switch, and close tabs

Every fresh snapshot includes tabs and active_tab. You can also request the tab list without a page snapshot.

Agent tab actions
{"kind":"tabs"}
{"kind":"tab_new"}
{"kind":"tab_switch","handle":"page-7f…"}
{"kind":"tab_close","handle":"page-92…"}
ActionResultRule
tabsCurrent list and active handleRead-only
tab_newCreates and activates a real tabRequires control
tab_switchActivates the observed handleNever invent handles
tab_closeCloses an observed handleLast tab cannot close
Agent observes two tab handles and switches the active physical browser page.SNAPSHOTtabs + active_tabTAB SWITCHvalidated handlecapability epochACTIVE PAGEfresh preview

Page commands

POST/api/sessions/:id/commandsnavigate, click, type, key, scroll, snapshot, tabs
GET/api/commands/:idResolve the exact queued receipt