MASAKA / Browser / Tabs
Browser

Real tabs the agent
can identify.

MASAKA exposes the browser’s actual WebDriver window handles, keeps the active page explicit, and resets preview after every tab transition.

Discover before switching

A fresh snapshot returns page content, tabs, and active_tab. Use tabs to refresh only the tab state. Each item includes an opaque handle, bounded title, URL, and active flag.

Example result
{
  "tabs": [
    {"handle":"page-one","title":"Search","url":"https://example.com/","active":true},
    {"handle":"page-two","title":"Result","url":"https://example.org/","active":false}
  ],
  "active_tab":"page-one"
}

Mutate with observed handles

POST/api/sessions/:id/commands{"kind":"tab_new"}
POST/api/sessions/:id/commands{"kind":"tab_switch","handle":"page-two"}
POST/api/sessions/:id/commands{"kind":"tab_close","handle":"page-one"}

All three require the current input capability. The last remaining tab cannot be closed.

Agent behavior

  1. 1
    Snapshot

    Read current tabs and active handle.

  2. 2
    Choose an observed handle

    Never infer or fabricate one from a title or URL.

  3. 3
    Switch once

    Resolve the returned command receipt.

  4. 4
    Snapshot again

    Verify active tab and newly rendered page before input.

Implementation guarantee

Tab operations call real WebDriver window/handles, window/new, window switch, and window delete commands. They do not simulate a tab by navigating one physical page to a stored URL.