pub enum GuestMessage {
Hello {
protocol_version: u32,
guest_version: String,
container: String,
capabilities: Vec<String>,
},
Notify {
summary: String,
body: String,
urgency: String,
actions: Vec<NotifyAction>,
app_name: String,
},
XdgOpen {
uri: String,
},
ClipboardSet {
text: String,
},
ClipboardGet,
HostExec {
cmd: String,
args: Vec<String>,
},
HostExecV2 {
cmd: String,
args: Vec<String>,
env: Vec<(String, String)>,
cwd: Option<String>,
tty: bool,
},
HostExecSignal {
sig: i32,
},
RegisterSession,
Busy,
IdleTimeout,
Info {
guest_version: String,
protocol_version: u32,
},
}Expand description
Messages sent from guest to host.
Variants§
Hello
Notify
XdgOpen
ClipboardSet
ClipboardGet
HostExec
HostExecV2
Host-exec with the child’s stdio taken from descriptors the guest
attaches to this frame (capability host_exec_fds).
Exactly three descriptors ride via SCM_RIGHTS on the same message,
in stdin, stdout, stderr order. The host uses them directly as the
child’s stdio, so binary data and large outputs never pass through
the protocol. A guest whose request is refused by this capability
keeps using GuestMessage::HostExec instead.
The optional fields are serde-defaulted so the wire format here is
frozen now, while the host phases in behaviour behind them:
cmd/args/env are consumed, cwd is carried but not yet
processed, and tty must be false (the host refuses true with a
typed error until the TTY path exists).
Fields
HostExecSignal
Relay a signal (SIGINT, SIGTERM, SIGHUP or SIGWINCH) from the guest
shim to a running host-exec child. Only sent on a host_exec_fds
session: the host forwards it to the child’s process group. The
child’s death is reported through the regular HostExecDone frame.
RegisterSession
Sent by the host CLI to register a new terminal session.
The pidfd follows via SCM_RIGHTS on the same connection.
Busy
Sent by the guest daemon when user processes are still running.
IdleTimeout
Sent by the guest daemon when no user processes remain.
Info
Guest reply to host GetInfo.