use std::path::PathBuf;
use bitrouter_core::agents::event::{AgentEvent, PermissionRequestId, PermissionResponse};
use tokio::sync::mpsc;
pub(crate) enum AgentCommand {
Prompt {
text: String,
reply_tx: mpsc::Sender<AgentEvent>,
},
RespondPermission {
request_id: PermissionRequestId,
response: PermissionResponse,
},
Disconnect,
}
#[derive(Debug, Clone)]
pub enum AgentAvailability {
OnPath(PathBuf),
Distributable,
}
#[derive(Debug, Clone)]
pub struct DiscoveredAgent {
pub name: String,
pub binary: PathBuf,
pub args: Vec<String>,
pub availability: AgentAvailability,
}
#[derive(Debug, Clone)]
pub enum InstallProgress {
Downloading {
bytes_received: u64,
total: Option<u64>,
},
Extracting,
Done(PathBuf),
Failed(String),
}
const _: () = {
const fn _assert<T: Send>() {}
_assert::<AgentCommand>();
_assert::<AgentAvailability>();
_assert::<DiscoveredAgent>();
_assert::<InstallProgress>();
};