MASAKA / Browser / Control
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 humanDELETE
/api/sessions/:id/controlRelease human controlA 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.
{"kind":"tabs"}
{"kind":"tab_new"}
{"kind":"tab_switch","handle":"page-7f…"}
{"kind":"tab_close","handle":"page-92…"}| Action | Result | Rule |
|---|---|---|
tabs | Current list and active handle | Read-only |
tab_new | Creates and activates a real tab | Requires control |
tab_switch | Activates the observed handle | Never invent handles |
tab_close | Closes an observed handle | Last tab cannot close |
Page commands
POST
/api/sessions/:id/commandsnavigate, click, type, key, scroll, snapshot, tabsGET
/api/commands/:idResolve the exact queued receipt