vtcode_webmcp/lib.rs
1//! Authenticated WebMCP bridge primitives for VT Code.
2//!
3//! The crate separates transport, pairing, workspace policy, and runtime
4//! integration. This lets the interactive TUI provide an adapter that routes
5//! through its existing permission pipeline while the standalone command uses
6//! [`FilesystemWorkspace`].
7
8#![deny(unsafe_code)]
9
10/// Opt-in companion task interface; execution remains binary-owned.
11pub mod companion;
12/// Error types shared by the bridge and adapters.
13pub mod error;
14/// Bounded canonical runtime event replay and subscription hub.
15pub mod event_hub;
16/// Safe headless filesystem runtime adapter.
17pub mod filesystem;
18/// One-time pairing and revocation state.
19pub mod pairing;
20/// Browser/server WebSocket protocol types.
21pub mod protocol;
22/// Local stdio and authenticated remote MCP transports, read-only by default.
23pub mod remote_mcp;
24/// Runtime adapter traits and bridge result types.
25pub mod runtime;
26/// Axum WebSocket server and request dispatcher.
27pub mod server;
28
29pub use error::{Result, WebmcpError};
30pub use event_hub::{EventHubConfig, EventHubSubscription, SequencedThreadEvent, WebmcpEventHub};
31pub use filesystem::{FilesystemLimits, FilesystemWorkspace};
32pub use pairing::{PairingDisplay, PairingManager, PairingSession};
33pub use protocol::{BridgeRequest, BridgeResponse, BridgeSettings, FileChange, PROTOCOL_VERSION};
34pub use remote_mcp::{
35 FetchInput, FetchOutput, RemoteMcpEndpoint, RemoteMcpHandler, RemoteMcpServerConfig, SearchInput, SearchOutput,
36 SearchResult,
37};
38pub use runtime::{RuntimeAdapter, RuntimeStatus};
39pub use server::{WebmcpServer, WebmcpServerConfig};