pub enum BackendCommand {
Show 15 variants
Authenticated {
session_token: String,
user_id: String,
refresh_interval_secs: u32,
protocol: Option<ProtocolAccept>,
device_status: Option<DeviceStatus>,
org_policies: Option<OrgPolicies>,
},
SendInput {
command_id: String,
agent_id: String,
content: String,
},
SlashCommand {
command_id: String,
agent_id: String,
command: String,
args: Vec<String>,
},
CancelOperation {
command_id: String,
agent_id: String,
},
Subscribe {
agent_id: String,
},
Unsubscribe {
agent_id: String,
},
SpawnAgent {
command_id: String,
model: Option<String>,
working_directory: Option<String>,
},
RequestSync,
Ping {
timestamp: i64,
},
Disconnect {
reason: String,
},
AuthenticationFailed {
error: String,
},
AttachmentUpload {
command_id: String,
agent_id: String,
attachment_id: String,
filename: String,
mime_type: String,
size: u64,
compressed: bool,
compression_algorithm: Option<CompressionAlgorithm>,
chunks_total: u32,
},
AttachmentChunk {
attachment_id: String,
chunk_index: u32,
data: String,
is_final: bool,
},
PermissionResponse {
request_id: String,
approved: bool,
remember_for_session: bool,
always_allow: bool,
},
AttachmentComplete {
attachment_id: String,
checksum: String,
},
}Expand description
Messages FROM Backend TO CLI
Variants§
Authenticated
Authenticated - here’s your session token and negotiated protocol
Fields
§
protocol: Option<ProtocolAccept>Negotiated protocol (optional for backward compatibility)
§
device_status: Option<DeviceStatus>Device allowlist status returned by backend.
§
org_policies: Option<OrgPolicies>Organization-level policies (enforced client-side, verified server-side).
SendInput
Send input to an agent
Fields
SlashCommand
Execute slash command on agent
Fields
CancelOperation
Cancel current operation
Subscribe
Subscribe to agent stream
Unsubscribe
Unsubscribe from agent stream
SpawnAgent
Spawn new agent
Fields
RequestSync
Request full sync of all agents
Ping
Ping to check connection health
Disconnect
Disconnect (server closing)
AuthenticationFailed
Authentication failed
AttachmentUpload
Start of an attachment upload
Fields
§
compression_algorithm: Option<CompressionAlgorithm>Compression algorithm used (if compressed)
AttachmentChunk
A chunk of attachment data
Fields
PermissionResponse
Response to a permission request from the remote user
Fields
AttachmentComplete
Attachment upload complete - verify checksum
Trait Implementations§
Source§impl Clone for BackendCommand
impl Clone for BackendCommand
Source§fn clone(&self) -> BackendCommand
fn clone(&self) -> BackendCommand
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 BackendCommand
impl Debug for BackendCommand
Source§impl<'de> Deserialize<'de> for BackendCommand
impl<'de> Deserialize<'de> for BackendCommand
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 BackendCommand
impl RefUnwindSafe for BackendCommand
impl Send for BackendCommand
impl Sync for BackendCommand
impl Unpin for BackendCommand
impl UnsafeUnpin for BackendCommand
impl UnwindSafe for BackendCommand
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