Skip to main content

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/// Error types shared by the bridge and adapters.
11pub mod error;
12/// Bounded canonical runtime event replay and subscription hub.
13pub mod event_hub;
14/// Safe headless filesystem runtime adapter.
15pub mod filesystem;
16/// One-time pairing and revocation state.
17pub mod pairing;
18/// Browser/server WebSocket protocol types.
19pub mod protocol;
20/// Read-only OpenAI-compatible remote MCP transport.
21pub mod remote_mcp;
22/// Runtime adapter traits and bridge result types.
23pub mod runtime;
24/// Axum WebSocket server and request dispatcher.
25pub mod server;
26
27pub use error::{Result, WebmcpError};
28pub use event_hub::{EventHubConfig, EventHubSubscription, SequencedThreadEvent, WebmcpEventHub};
29pub use filesystem::{FilesystemLimits, FilesystemWorkspace};
30pub use pairing::{PairingDisplay, PairingManager, PairingSession};
31pub use protocol::{BridgeRequest, BridgeResponse, BridgeSettings, FileChange, PROTOCOL_VERSION};
32pub use remote_mcp::{
33    FetchInput, FetchOutput, RemoteMcpEndpoint, RemoteMcpHandler, RemoteMcpServerConfig, SearchInput, SearchOutput,
34    SearchResult,
35};
36pub use runtime::{RuntimeAdapter, RuntimeStatus};
37pub use server::{WebmcpServer, WebmcpServerConfig};