Skip to main content

browser_control/session/
mod.rs

1//! Engine-agnostic page operations shared by CLI and MCP.
2//!
3//! The CLI surface (`cookies`, `fetch`, `storage`, `eval`, …) and the MCP
4//! tools (`navigate`, `get_dom`, `screenshot`, `fetch`, `select_element`)
5//! both need the same primitives: attach to a page target, evaluate a script,
6//! navigate, capture a screenshot. This module provides those once instead
7//! of duplicating them per consumer.
8
9pub mod attach;
10pub mod backend;
11pub mod crash;
12pub mod freshness;
13pub mod scratch;
14pub mod tabs;
15pub mod targets;
16
17pub use attach::{evaluate_for_origin_with_recover_once, PageSession};
18pub use backend::{open_backend, TabBackend};
19pub use crash::evaluate_with_crash_detection;
20pub use scratch::with_scratch_recovery;
21pub use tabs::{resolve_tab, tab_list, tab_open, with_named_tab_recovery};
22pub use targets::{list as list_targets, TargetInfo};