vmette_proto/lib.rs
1//! vmette-proto — the serde-only **wire contracts** shared across the vmette
2//! workspace. This crate is a leaf (its only dependency is `serde`): it owns
3//! the *types*, not any I/O. The framing codecs that carry these types live
4//! with their transport — the vsock frame reader/writer in `vmette::desktop`,
5//! the line-delimited JSON loop in `vmette-daemon`.
6//!
7//! Three contracts live here, one per submodule:
8//!
9//! * [`agent`] — the host↔guest **computer-use vocabulary**: the [`Action`]
10//! enum (mirroring the Anthropic computer-use tool) and the
11//! [`ResponseHeader`] the in-guest agent replies with. Spoken over vsock.
12//! * [`daemon`] — the **`vmetted` UNIX-socket protocol**: the stateless run
13//! [`Request`](daemon::Request)/[`Frame`](daemon::Frame) pair and the
14//! stateful desktop [`DesktopRequest`](daemon::DesktopRequest)/
15//! [`DesktopReply`](daemon::DesktopReply) pair.
16//! * [`boot`] — the **host→guest boot contract**: [`BootParams`](boot::BootParams),
17//! the typed configuration the host hands the guest's `/init`, replacing the
18//! untyped `vmette.*=` kernel-cmdline tokens. Delivered via the `ctl` share.
19//!
20//! [`geom::Rect`] is the one pixel-rectangle type both the perception layer and
21//! the desktop replies share.
22//!
23//! Because every consumer (the core library, the daemon, the MCP server, the
24//! CLI) depends on these *same* Rust types, a renamed field or a new variant is
25//! a compile error at every site instead of a silent runtime wire break.
26
27pub mod agent;
28pub mod boot;
29pub mod daemon;
30pub mod geom;
31pub mod mount;
32
33pub use agent::{Action, ResponseHeader, ScrollDirection};
34pub use boot::{BootParams, RootfsSpec, Strategy, BOOT_PROTO_VERSION};
35pub use geom::Rect;
36pub use mount::ShareMount;