1#![forbid(unsafe_code)]
2#![doc = include_str!("../README.md")]
3
4pub mod console;
5pub mod detection;
6pub mod theme;
7
8pub mod banner;
9#[cfg(any(feature = "legacy-2024-11-05", feature = "tasks", feature = "apps"))]
10pub mod client;
11pub mod diagnostics;
12pub mod error;
13#[cfg(any(feature = "legacy-2024-11-05", feature = "tasks", feature = "apps"))]
14pub mod handlers;
15pub mod logging;
16pub mod stats;
17pub mod status;
18#[cfg(any(feature = "legacy-2024-11-05", feature = "tasks", feature = "apps"))]
19pub mod tables;
20pub mod testing;
21
22pub use console::{UntrustedDisplayText, console};
23pub mod config;
24
25#[cfg(any(feature = "legacy-2024-11-05", feature = "tasks", feature = "apps"))]
26pub use client::RequestResponseRenderer;
27pub use config::ConsoleConfig;
28pub use detection::{DisplayContext, is_agent_context, should_enable_rich};
29pub use error::ErrorBoundary;
30#[cfg(any(feature = "legacy-2024-11-05", feature = "tasks", feature = "apps"))]
31pub use handlers::{HandlerRegistryRenderer, ServerCapabilities};
32pub use rich_rust;
33pub use theme::theme;
34
35#[cfg(test)]
36mod feature_surface_tests {
37 #[cfg(not(any(feature = "legacy-2024-11-05", feature = "tasks", feature = "apps")))]
38 #[test]
39 fn empty_graph_exposes_only_generic_console_surface() {
40 let console = super::console::FastMcpConsole::with_enabled(false);
41 let _ = super::ConsoleConfig::new();
42 let _ = super::ErrorBoundary::new(&console);
43 let _ = super::logging::RichLoggerBuilder::new();
44 }
45
46 #[cfg(any(feature = "legacy-2024-11-05", feature = "tasks", feature = "apps"))]
47 #[test]
48 fn protocol_rendering_surface_is_enabled_with_a_protocol_feature() {
49 let context = super::DisplayContext::new_agent();
50 let _ = super::client::ClientInfoRenderer::new(context.clone());
51 let _ = super::handlers::HandlerRegistryRenderer::new(context.clone());
52 let _ = super::handlers::ServerCapabilities::new();
53 let _ = super::tables::ToolTableRenderer::new(context);
54 }
55}