Files
moli/moli-protocol-server/src/lib.rs
T
ldm0 9464659788 refactor(server): route browser shutdown through instance control
Expose protocol-independent InstanceCommand and BrowserInstanceControl with a
native serve_with_control entry. Keep shutdown coordination in the server and
CDP session validation and response flush in a dedicated adapter, bypassing
renderer work without creating another actor or shutdown state.

Parse each CDP envelope once and check live frontend-owned session routes
through a weak registry view. Match Chromium Browser.close on browser, page,
tab, and worker sessions; ignore params and reject null or foreign session IDs.
Update optional-session test requests to omit absent routes.

Add native and pending-promise lifecycle regressions and cross-engine smoke
coverage for acknowledgment ordering, natural process exit, and isolation.
2026-10-20 20:47:16 +08:00

16 lines
466 B
Rust

//! HTTP and WebSocket host for Moli's automation protocols.
//!
//! This crate owns the transport, frontend routing, and protocol actor
//! scheduling used by CDP, WebDriver BiDi, and WebDriver Classic.
mod cdp_frontend;
mod cdp_frontend_router;
mod cdp_scheduler;
mod cdp_writer;
mod config;
pub mod protocol_server;
pub mod runtime_thread_budget;
pub use config::ServerConfig;
pub use protocol_server::{BrowserInstanceControl, InstanceCommand, ProtocolServer};