microsandbox_agent_client/lib.rs
1//! Transport-agnostic client for the microsandbox agent protocol.
2//!
3//! This crate owns the low-level client layer: handshakes, correlation IDs,
4//! request/stream routing, message encoding, and transport adapters. High-level
5//! SDK crates remain responsible for sandbox lifecycle and name resolution.
6//!
7//! No transport is enabled by default. Enable `uds` for local microsandbox relay
8//! sockets, or `stream` to drive the client over any `AsyncRead + AsyncWrite`
9//! byte stream (e.g. a caller-owned, pre-authenticated transport adapted to
10//! bytes).
11
12#![warn(missing_docs)]
13
14pub mod client;
15pub mod error;
16pub mod message;
17pub mod stream;
18pub mod transport;
19
20/// Transport adapters that can be enabled with crate features.
21pub mod transports {
22 /// Unix domain socket transport support.
23 #[cfg(feature = "uds")]
24 pub mod uds;
25}
26
27//--------------------------------------------------------------------------------------------------
28// Re-Exports
29//--------------------------------------------------------------------------------------------------
30
31pub use client::{AgentClient, AgentProtocol};
32pub use error::{AgentClientError, AgentClientResult};
33pub use message::{EncodedMessage, IntoOutboundMessage, OutboundMessage, TypedMessage};
34pub use stream::AgentStream;
35pub use transport::{AgentTransport, TransportPacket};