rightkit_browser/lib.rs
1//! Shared Chrome DevTools Protocol browser runtime for Right Suite products.
2//!
3//! * [`BrowserSession`] owns one Chrome process and any number of pages.
4//! * [`ProfileSpec`] selects a temporary or named persistent profile.
5//! * Pointer and keyboard actions use real `Input.dispatch*Event` commands, so
6//! `event.isTrusted`, `:hover`, focus, and default actions behave as for a user.
7//! * [`NetworkPolicy`] blocks loopback/link-local/private/reserved/`file:` targets
8//! (redirects, subresources, and every proxied connection included) before they
9//! reach the network; denials are typed ([`BrowserError::Blocked`]).
10//! * [`AdmissionHook`] then gates every effect before it happens.
11//! * [`BrowserEvent`] reports start/stop/crash/denied with session id, reason, and time.
12//! * [`BrowserPage::observe`] returns refs that are checked for staleness before use.
13mod config;
14mod error;
15mod keys;
16mod page;
17mod policy;
18mod proc;
19mod proxy;
20mod session;
21
22pub use config::{find_chrome, LaunchOptions, ProfileSpec};
23pub use error::{BrowserError, Result};
24pub use page::{BrowserPage, ConsoleLine, Observation, ObservedNode, Rect, Target};
25pub use policy::{
26 classify_ip, ActionKind, AddressClass, AdmissionHook, AdmissionRequest, AllowCallback,
27 BlockReason, BlockedRequest, BrowserEvent, BrowserRequest, Decision, EventSink, LifecycleKind,
28 NetworkPolicy, NetworkRequest, PolicyDecision, PolicyDenial, Resolver,
29};
30pub use proxy::PinnedConnection;
31pub use session::BrowserSession;