pub enum RemoteMessage {
Register {
api_key: String,
hostname: String,
os: String,
version: String,
protocol: Option<ProtocolHello>,
device_fingerprint: Option<String>,
},
Heartbeat {
session_token: String,
agents: Vec<RemoteAgentInfo>,
system_load: f32,
},
CommandResult {
command_id: String,
success: bool,
result: Option<Value>,
error: Option<String>,
},
AgentEvent {
event_type: AgentEventType,
agent_id: String,
data: Value,
},
AgentStream {
agent_id: String,
chunk_type: StreamChunkType,
content: String,
},
Pong {
timestamp: i64,
},
PermissionRequest {
request_id: String,
agent_id: String,
tool_name: String,
action: String,
details: Value,
timeout_secs: u32,
},
AttachmentReceived {
attachment_id: String,
success: bool,
file_path: Option<String>,
error: Option<String>,
},
}Expand description
Messages FROM CLI TO Backend
Variants§
Register
Initial registration with API key and protocol negotiation
Fields
§
protocol: Option<ProtocolHello>Protocol negotiation (optional for backward compatibility)
Heartbeat
Regular heartbeat with agent status
Fields
§
agents: Vec<RemoteAgentInfo>List of active agents.
CommandResult
Response to a command
Fields
AgentEvent
Agent event (new agent, agent exit, state change)
Fields
§
event_type: AgentEventTypeType of agent event.
AgentStream
Stream chunk from agent (for real-time viewing)
Fields
§
chunk_type: StreamChunkTypeType of stream chunk.
Pong
Pong response to backend ping
PermissionRequest
Request permission from the remote user for a dangerous tool call
Fields
AttachmentReceived
Acknowledgment that attachment was received
Trait Implementations§
Source§impl Clone for RemoteMessage
impl Clone for RemoteMessage
Source§fn clone(&self) -> RemoteMessage
fn clone(&self) -> RemoteMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RemoteMessage
impl Debug for RemoteMessage
Source§impl<'de> Deserialize<'de> for RemoteMessage
impl<'de> Deserialize<'de> for RemoteMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RemoteMessage
impl RefUnwindSafe for RemoteMessage
impl Send for RemoteMessage
impl Sync for RemoteMessage
impl Unpin for RemoteMessage
impl UnsafeUnpin for RemoteMessage
impl UnwindSafe for RemoteMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more