1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// REQ-CDP-003: CDP module public API — server entry + WS / JSON-RPC codec
// @trace REQ-CDP-001 [entity:CdpRouter] [entity:CdpServer]
// @trace REQ-PURE-009 [level:library] [entity:HttpServer,HttpServerConfig]
// @trace REQ-IMPL-03 [level:library] (CDP server = Phase 3)
//
// TASK-6 (DEC-CDP-001): evaluate_js 注入式 domain handler 已删除,
// CDP 命令分发由 bao_cdp_client::CDPRdpBridge 接管。本 crate 退化为
// 对外 CDP server 入口(Playwright 兼容)+ 基础设施(RFC 6455 codec、
// JSON-RPC 编解码、Target 路由),被 bao_cdp_client 复用。
//
// TASK-18 (REQ-CDP-UWS-001): RFC 6455 codec / handshake / masking 已迁移
// 至 `bun_uws`(ws_codec / ws_handshake / ws_client / ws_server)。本 crate
// 通过 `pub use bun_uws::*` 重导出,删除自写 ws_codec/ws_handshake/ws。
// 所有 WebSocket 表面入口统一在 `bun_uws`(bao_cdp / bao_cdp_client 仅依赖
// bun_uws,无 tungstenite)。
//
// TASK-4-CDP: Removed the dead synchronous `CDPServer`/`CDPSession`/
// `CDPCommand`/`CDPServerError`/`WebSocketConnection` server entry + the
// `respond_json`/`respond_raw`/`rand_id` helpers. Production now uses
// `cdp_server::CdpServer` (re-exported below) for the Playwright-compatible
// async server; tests that need a CDP server use `cdp_server::CdpServer`
// directly. The `CdpRouter` (internal/external session routing) and the BAO
// domain dispatch (`protocol::handle_command`) remain here.
// ---------------------------------------------------------------------------
// §1 CdpServer + wire types — re-exports from the `cdp-server` crate
// ---------------------------------------------------------------------------
// The async Playwright-compatible CDP server lives in `cdp-server`.
// Re-exported so callers can use `bao_cdp::CdpServer`.
pub use ;
// JSON-RPC 2.0 wire types are owned by `cdp-server` and re-exported here.
// TASK-4-CDP removed the byte-for-byte duplicate definitions that used to
// live in `bao_cdp::protocol`. The codec helpers (parse_message/
// serialize_response/serialize_event) stay in `bao_cdp::protocol` as thin
// wrappers over these types (the cdp-server `protocol` module is private,
// so its functions cannot be re-exported directly).
pub use ;
// WebSocket surface — re-exported from `bun_uws` (REQ-CDP-UWS-001).
// Removed: bao_cdp::{ws, ws_codec, ws_handshake} self-written modules.
pub use ;
pub use ;
pub use ;
// BAO-specific 11-domain CDP command dispatch + JSON-RPC 2.0 codec helpers.
// Wire types come from cdp_server (re-exported above); the codec helpers are
// thin serde wrappers in `bao_cdp::protocol`.
pub use ;
pub use ;
pub use ;