pub struct AgentConfig {
pub identity: String,
pub name: String,
pub short_name: String,
pub protocol: String,
pub type: String,
pub active: Option<bool>,
pub run_command: HashMap<String, String>,
pub env: HashMap<String, String>,
pub install_command: Option<String>,
pub actions: HashMap<String, HashMap<String, ActionConfig>>,
pub connector_installed: bool,
}Expand description
Agent configuration loaded from TOML.
Fields§
§identity: String§name: String§short_name: String§protocol: String§type: String§active: Option<bool>§run_command: HashMap<String, String>§env: HashMap<String, String>§install_command: Option<String>Optional command to install the ACP connector for this agent.
actions: HashMap<String, HashMap<String, ActionConfig>>§connector_installed: boolWhether the ACP connector binary was found in PATH during discovery.
Populated by discover_agents, not deserialized.
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn run_command_for_platform(&self) -> Option<&str>
pub fn run_command_for_platform(&self) -> Option<&str>
Returns the run command for the current platform.
Falls back to the wildcard "*" entry if the platform-specific key is absent.
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Returns whether this agent is active. Defaults to true if not specified.
Sourcepub fn detect_connector(&mut self)
pub fn detect_connector(&mut self)
Check if the run command binary exists in PATH and update
connector_installed.
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentConfig
impl Debug for AgentConfig
Source§impl<'de> Deserialize<'de> for AgentConfig
impl<'de> Deserialize<'de> for AgentConfig
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 AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnsafeUnpin for AgentConfig
impl UnwindSafe for AgentConfig
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