Skip to main content

Crate vmette_proto

Crate vmette_proto 

Source
Expand description

vmette-proto — the serde-only wire contracts shared across the vmette workspace. This crate is a leaf (its only dependency is serde): it owns the types, not any I/O. The framing codecs that carry these types live with their transport — the vsock frame reader/writer in vmette::desktop, the line-delimited JSON loop in vmette-daemon.

Three contracts live here, one per submodule:

  • agent — the host↔guest computer-use vocabulary: the Action enum (mirroring the Anthropic computer-use tool) and the ResponseHeader the in-guest agent replies with. Spoken over vsock.
  • daemon — the vmetted UNIX-socket protocol: the stateless run Request/Frame pair and the stateful desktop DesktopRequest/ DesktopReply pair.
  • boot — the host→guest boot contract: BootParams, the typed configuration the host hands the guest’s /init, replacing the untyped vmette.*= kernel-cmdline tokens. Delivered via the ctl share.

geom::Rect is the one pixel-rectangle type both the perception layer and the desktop replies share.

Because every consumer (the core library, the daemon, the MCP server, the CLI) depends on these same Rust types, a renamed field or a new variant is a compile error at every site instead of a silent runtime wire break.

Re-exports§

pub use agent::Action;
pub use agent::ResponseHeader;
pub use agent::ScrollDirection;
pub use boot::BootParams;
pub use boot::RootfsSpec;
pub use boot::Strategy;
pub use boot::BOOT_PROTO_VERSION;
pub use geom::Rect;
pub use mount::ShareMount;

Modules§

agent
The host↔guest computer-use vocabulary spoken over vsock between the host Session (Agent workload) and the in-guest vmette-desktop-agent.
boot
The host→guest boot contract. BootParams is the single owner of the configuration the host hands the guest’s PID-1 (/init) at boot: the exec command, environment, rootfs mode, extra shares, and workload strategy.
daemon
The vmetted UNIX-socket protocol: line-delimited JSON, one request object in, one-or-more reply objects out. Two independent request/reply pairs share the socket:
geom
Pixel geometry shared between the perception layer (settle detection) and the desktop wire replies.
mount
Host-directory share descriptor — a neutral type shared by the core Config share API and the daemon’s run Request. It lives here, not under daemon, because it is not a daemon-specific concern.