Expand description
SQLite-backed registry of running browser instances.
Re-exports§
pub use bidi_lock::BidiLockBusy;pub use bidi_lock::BidiLockGuard;pub use bidi_lock::BidiLockRow;pub use foreground::ForegroundRow;pub use scratches::ScratchRow;pub use tabs::TabRow;
Modules§
- bidi_
lock bidi_locksSQLite table: arbitrates the Firefox single-BiDi-session limit across concurrent CLI processes.- foreground
foreground_holdersSQLite table: one row per tab whose foreground emulation is currently held by abrowser-control tab foreground-holdprocess (seecrate::session::foreground). Rows whosepidis dead are evicted lazily on read, likebidi_locks.- naming
- Friendly-name generator for browser instances.
- schema
- SQLite schema for the browser registry.
- scratches
scratchesSQLite table: one row per browser, holding the daemon-style scratch tab’starget_id. Used by lock-free ops (eval,fetchwith no explicit tab) so the default code path never touches a user-visible tab — the architectural answer to the iLO failure mode (an admin tab whose renderer ignoresRuntime.evaluatecould otherwise be silently picked by the default selector).- tabs
tabsSQLite table: named tab handles addressable as<browser>/<name>across the CLI. Backs thetab open/tab listsubcommands and the cross-command<browser>/<name>positional routing.- words
- Friendly word list used for browser instance naming.
Structs§
- Browser
Row - One row in the
browserstable. - Registry
- SQLite registry handle. SQLite-level WAL +
busy_timeouthandles concurrent reader/writer coordination across processes; we no longer hold a long-lived exclusive file lock for the lifetime of the handle. A short exclusive lock is taken only across the schema-migration window inopen_atto serialise initialCREATE TABLE/CREATE INDEXagainst a concurrent first open.
Enums§
- Browser
Liveness - Current registry liveness classification for a browser row.
Functions§
- format_
unix_ seconds_ as_ iso8601 - Format a Unix epoch second count as
YYYY-MM-DDTHH:MM:SSZ. - is_
alive - Liveness check: PID exists AND a TCP connect to the local port succeeds.
- liveness
- Classify row liveness. Only
BrowserLiveness::DeadPidis safe to prune. - now_
epoch_ s - Current Unix epoch seconds.
- now_
iso8601 - Current time formatted as
YYYY-MM-DDTHH:MM:SSZ(UTC). - pid_
alive - Cheap check: is process
pidstill running on this machine? Used by stale-row eviction inscratches,tabs, andbidi_locksto avoid keeping rows registered to a crashed CLI process.