github feder-cr/AIHawk v0.15.0
v0.15.0 a session holds up to eight browsers

latest release: article-views
4 hours ago

A session can hold several browsers now, up to eight, and every tool can say which one it means.

Each browser has its own tabs, its own cookies and its own identity, and shares none of them: one for the dashboard, one for the docs, one logged in as somebody else. Work in one cannot disturb another.

New tools. browser_open starts another browser in the session and makes it the one unaddressed commands go to, because opening one only to then address every following command by hand would make the common case the tedious one. browser_close frees one. browser_list reports what a session holds without starting anything. browser_focus moves where the unaddressed commands land, and naming a browser still reaches it whatever the focus is.

Every existing tool takes session_id and browser_id, both optional. A client that sends neither behaves exactly as it always did, which is the promise the whole change is built around and the first thing its tests pin.

The machinery was already there and unreachable. The registry has kept browsers by id since it was written, with a lock per id so two callers racing start one browser rather than two, the configuration remembered so a rebuild is the same person with the same seed and the same exit, and tab numbering that does not restart across a rebuild. None of it could be used, because every tool called it with no argument and landed on the same key. The registry is almost untouched here: the key is composed instead, and everything it already got right started applying per browser.

Closing forgets who that browser was, which is deliberate. The registry already drew that line between recovery, where the identity is kept so a dead browser comes back as the same person, and a deliberate close, where a browser that returned wearing an identity its owner had shut down would hand the next caller somebody they never asked for.

Eight is a measurement, and the refusal says so. Eight live browsers were measured at 61 processes and about 6.5 GB, with the eighth taking 13.6 s to start against the first one's 6.8. Asking for a ninth is refused with those numbers in the sentence, because a refusal that only says "no" invites the next reader to raise the limit.

Don't miss a new AIHawk release

NewReleases is sending notifications on new releases.