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
//! # mcpr-proxy
//!
//! Full MCP proxy engine: per-request pipeline (parse → route → middleware
//! → forward → emit), upstream forwarding, SSE streaming, widget CSP
//! rewriting, widget bundle serving, per-proxy health. Embed this crate and
//! wire a frontend (axum, warp, anything) around [`pipeline::run`].
//!
//! ## Module layout
//!
//! ```text
//! proxy/
//! ├── pipeline/ Per-request pipeline (parse → route → mw → emit)
//! ├── proxy_state.rs ProxyState — the runtime one proxy instance holds
//! ├── widgets.rs Widget HTML bundle serving + discovery
//! ├── forwarding.rs UpstreamClient, forward_request, read_body_capped
//! ├── sse.rs SSE extract/wrap helpers
//! ├── csp.rs CspConfig, DirectivePolicy, WidgetScoped
//! ├── rewrite.rs RewriteConfig, rewrite_response (widget CSP)
//! └── health.rs ProxyHealth, ConnectionStatus, SharedProxyHealth
//! ```
pub use ;
pub use ;
pub use ProxyState;
pub use ;
pub use WidgetSource;