pub struct ProjectConfig {
pub version: String,
pub agents: Vec<Agent>,
pub session_name: String,
pub sync: SyncConfig,
pub settings: ProjectSettings,
}Expand description
Top-level configuration that defines the entire multi-agent setup.
Fields§
§version: StringConfiguration version for migration support
agents: Vec<Agent>List of configured agents
session_name: StringSession configuration name (references a tmux profile)
sync: SyncConfigSynchronization settings
settings: ProjectSettingsGlobal project settings
Implementations§
Source§impl ProjectConfig
impl ProjectConfig
Sourcepub fn add_agent(&mut self, agent: Agent) -> Result<(), String>
pub fn add_agent(&mut self, agent: Agent) -> Result<(), String>
Add an agent to the configuration.
Sourcepub fn remove_agent(&mut self, agent_id: &str) -> Option<Agent>
pub fn remove_agent(&mut self, agent_id: &str) -> Option<Agent>
Remove an agent by ID.
Sourcepub fn get_agent_mut(&mut self, agent_id: &str) -> Option<&mut Agent>
pub fn get_agent_mut(&mut self, agent_id: &str) -> Option<&mut Agent>
Get an agent by ID (mutable).
Sourcepub fn agent_count(&self) -> usize
pub fn agent_count(&self) -> usize
Get the number of configured agents.
Sourcepub fn active_agents(&self) -> Vec<&Agent>
pub fn active_agents(&self) -> Vec<&Agent>
Get active agents only.
Sourcepub fn config_path() -> PathBuf
pub fn config_path() -> PathBuf
Get the configuration file path.
Sourcepub fn load_from_file(path: &PathBuf) -> Result<Self, String>
pub fn load_from_file(path: &PathBuf) -> Result<Self, String>
Load configuration from a file.
Trait Implementations§
Source§impl Clone for ProjectConfig
impl Clone for ProjectConfig
Source§impl Debug for ProjectConfig
impl Debug for ProjectConfig
Source§impl Default for ProjectConfig
impl Default for ProjectConfig
Source§impl<'de> Deserialize<'de> for ProjectConfig
impl<'de> Deserialize<'de> for ProjectConfig
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 ProjectConfig
impl RefUnwindSafe for ProjectConfig
impl Send for ProjectConfig
impl Sync for ProjectConfig
impl Unpin for ProjectConfig
impl UnsafeUnpin for ProjectConfig
impl UnwindSafe for ProjectConfig
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