Skip to main content

Module session

Module session 

Source
Expand description

Engine-agnostic page operations shared by CLI and MCP.

The CLI surface (cookies, fetch, storage, eval, …) and the MCP tools (navigate, get_dom, screenshot, fetch, select_element) both need the same primitives: attach to a page target, evaluate a script, navigate, capture a screenshot. This module provides those once instead of duplicating them per consumer.

Re-exports§

pub use attach::evaluate_for_origin_with_recover_once;
pub use attach::PageSession;
pub use backend::open_backend;
pub use backend::TabBackend;
pub use crash::evaluate_with_crash_detection;
pub use scratch::with_scratch_recovery;
pub use tabs::resolve_tab;
pub use tabs::tab_list;
pub use tabs::tab_open;
pub use tabs::with_named_tab_recovery;
pub use targets::list as list_targets;
pub use targets::TargetInfo;

Modules§

attach
Attach to a page target and expose engine-agnostic high-level operations.
backend
Engine-agnostic tab backend used by the named-tab registry and the scratch-recovery wrapper.
capture
Passive console and network capture for the MCP server.
cdp_session
Transient flat-session helper for CDP page operations.
crash
CDP renderer-crash detection.
foreground
Foreground emulation for background tabs (ADR-004).
freshness
Page freshness helpers used before reading browser-backed auth state.
input
Native CDP input and geometry for ref-based interaction.
input_bidi
WebDriver BiDi (Firefox) counterpart of crate::session::input.
scratch
Scratch-tab recover-once wrapper. The architectural answer to the iLO failure mode: lock-free ops (eval, fetch with no explicit tab) run against a daemon-style scratch tab tracked in the scratches SQLite row, not against the user’s first page.
tabs
Named-tab orchestration: SQLite + the engine-agnostic TabBackend working together.
targets
Unified page-target listing across CDP and BiDi.