pub struct MissionControl { /* private fields */ }Expand description
Mission Control
Main coordinator for task queue, slot configuration, agent processes, and inbox.
Implementations§
Source§impl MissionControl
impl MissionControl
Sourcepub fn new(options: MissionControlOptions) -> Result<Self>
pub fn new(options: MissionControlOptions) -> Result<Self>
Create a new MissionControl
Sourcepub fn submit(&self, role: &str, prompt: &str) -> Result<String>
pub fn submit(&self, role: &str, prompt: &str) -> Result<String>
Submit a task (async, returns immediately)
Sourcepub async fn ask_expert(
&self,
role: &str,
question: &str,
_timeout_ms: u64,
) -> Result<String>
pub async fn ask_expert( &self, role: &str, question: &str, _timeout_ms: u64, ) -> Result<String>
Synchronous ask (submit + wait)
Sourcepub fn get_status(&self, task_id: &str) -> Option<Task>
pub fn get_status(&self, task_id: &str) -> Option<Task>
Get task status
Sourcepub async fn spawn_agent(
&self,
slot_id: &str,
options: Option<SpawnOptions>,
) -> Result<AgentProcess>
pub async fn spawn_agent( &self, slot_id: &str, options: Option<SpawnOptions>, ) -> Result<AgentProcess>
Spawn an agent process
Sourcepub async fn kill_agent(&self, slot_id: &str) -> Result<()>
pub async fn kill_agent(&self, slot_id: &str) -> Result<()>
Kill an agent process
Sourcepub async fn restart_agent(
&self,
slot_id: &str,
options: Option<SpawnOptions>,
) -> Result<AgentProcess>
pub async fn restart_agent( &self, slot_id: &str, options: Option<SpawnOptions>, ) -> Result<AgentProcess>
Restart an agent process
Sourcepub fn get_agents(&self) -> Vec<AgentProcess>
pub fn get_agents(&self) -> Vec<AgentProcess>
Get all agent statuses
Sourcepub fn get_agent(&self, slot_id: &str) -> Option<AgentProcess>
pub fn get_agent(&self, slot_id: &str) -> Option<AgentProcess>
Get a specific agent’s status
Sourcepub fn get_inbox(&self, unread_only: bool, limit: usize) -> Vec<InboxMessage>
pub fn get_inbox(&self, unread_only: bool, limit: usize) -> Vec<InboxMessage>
Get inbox messages
Sourcepub fn mark_inbox_read(&self, message_id: &str)
pub fn mark_inbox_read(&self, message_id: &str)
Mark a message as read
Sourcepub fn list_slots(&self) -> Vec<Slot>
pub fn list_slots(&self) -> Vec<Slot>
List all slots
Sourcepub fn reset_slot_session(&self, slot_id: &str)
pub fn reset_slot_session(&self, slot_id: &str)
Reset a slot’s session
Sourcepub async fn get_default_mode(&self) -> ExecutionMode
pub async fn get_default_mode(&self) -> ExecutionMode
Get default execution mode
Sourcepub async fn set_default_mode(&self, mode: ExecutionMode)
pub async fn set_default_mode(&self, mode: ExecutionMode)
Set default execution mode
Sourcepub fn get_permission_config(&self) -> PermissionConfig
pub fn get_permission_config(&self) -> PermissionConfig
Get permission configuration
Sourcepub fn set_role_permission(&self, role: &str, rule: PermissionRule)
pub fn set_role_permission(&self, role: &str, rule: PermissionRule)
Set role permission rule
Sourcepub fn set_slot_permission(&self, slot_id: &str, rule: PermissionRule)
pub fn set_slot_permission(&self, slot_id: &str, rule: PermissionRule)
Set slot permission rule
Sourcepub fn add_role_auto_allow(&self, role: &str, pattern: &str)
pub fn add_role_auto_allow(&self, role: &str, pattern: &str)
Add role auto_allow
Sourcepub fn add_slot_auto_allow(&self, slot_id: &str, pattern: &str)
pub fn add_slot_auto_allow(&self, slot_id: &str, pattern: &str)
Add slot auto_allow
Sourcepub fn reload_permission_config(&self)
pub fn reload_permission_config(&self)
Reload permission configuration
Sourcepub fn check_permission(
&self,
slot_id: &str,
role: &str,
tool_name: &str,
) -> PermissionDecision
pub fn check_permission( &self, slot_id: &str, role: &str, tool_name: &str, ) -> PermissionDecision
Check tool permission
Auto Trait Implementations§
impl !Freeze for MissionControl
impl !RefUnwindSafe for MissionControl
impl !Send for MissionControl
impl !Sync for MissionControl
impl !UnwindSafe for MissionControl
impl Unpin for MissionControl
impl UnsafeUnpin for MissionControl
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.