Pure, unit-tested core of the daemon-side relay that bridges the ab-connect extension to the existing CdpClient. The extension exposes per-tab chrome.debugger + synthesized Target events; CdpClient expects a browser-level endpoint. So RelayState: - answers Target.getTargets / attachToTarget / setDiscoverTargets LOCALLY from targets learned via the extension's forwardCDPEvent(Target.attachedToTarget), returning the extension's cb-tab-N sessionId (consumes those synth events rather than double-forwarding them); - forwards every other command as a forwardCDPCommand envelope (carrying method/params/sessionId); - maps forwardCDPCommand responses and forwardCDPEvent events back to raw CDP; - validates the connect-handshake token; emits challenge/ping. Keeps CdpClient and browser.rs unchanged. 8 unit tests; clippy clean. Still inert — the tokio WS server + `connect` command wire it next.
56 lines
988 B
Rust
56 lines
988 B
Rust
#[allow(dead_code)]
|
|
pub mod actions;
|
|
#[allow(dead_code)]
|
|
pub mod adaptive;
|
|
#[allow(dead_code)]
|
|
pub mod auth;
|
|
#[allow(dead_code)]
|
|
pub mod browser;
|
|
#[allow(dead_code)]
|
|
pub mod cdp;
|
|
#[allow(dead_code)]
|
|
pub mod cookies;
|
|
#[allow(dead_code)]
|
|
pub mod daemon;
|
|
#[allow(dead_code)]
|
|
pub mod diff;
|
|
#[allow(dead_code)]
|
|
pub mod element;
|
|
#[allow(dead_code)]
|
|
pub mod inspect_server;
|
|
#[allow(dead_code)]
|
|
pub mod interaction;
|
|
#[allow(dead_code)]
|
|
pub mod network;
|
|
#[allow(dead_code)]
|
|
pub mod policy;
|
|
#[allow(dead_code)]
|
|
pub mod providers;
|
|
#[allow(dead_code)]
|
|
pub mod relay;
|
|
#[allow(dead_code)]
|
|
pub mod react;
|
|
#[allow(dead_code)]
|
|
pub mod recording;
|
|
#[allow(dead_code)]
|
|
pub mod screenshot;
|
|
#[allow(dead_code)]
|
|
pub mod snapshot;
|
|
#[allow(dead_code)]
|
|
pub mod state;
|
|
#[allow(dead_code)]
|
|
pub mod stealth;
|
|
#[allow(dead_code)]
|
|
pub mod storage;
|
|
#[allow(dead_code)]
|
|
pub mod stream;
|
|
#[allow(dead_code)]
|
|
pub mod tracing;
|
|
#[allow(dead_code)]
|
|
pub mod webdriver;
|
|
|
|
#[cfg(test)]
|
|
mod e2e_tests;
|
|
#[cfg(test)]
|
|
mod parity_tests;
|