pub struct AppState {Show 16 fields
pub runtime: Arc<OnceLock<RuntimeState>>,
pub startup: Arc<RwLock<StartupState>>,
pub in_process_mode: Arc<AtomicBool>,
pub api_token: Arc<RwLock<Option<String>>>,
pub engine_leases: Arc<RwLock<HashMap<String, EngineLease>>>,
pub run_registry: RunRegistry,
pub run_stale_ms: u64,
pub memory_records: Arc<RwLock<HashMap<String, GovernedMemoryRecord>>>,
pub memory_audit_log: Arc<RwLock<Vec<MemoryAuditEvent>>>,
pub missions: Arc<RwLock<HashMap<String, MissionState>>>,
pub shared_resources: Arc<RwLock<HashMap<String, SharedResourceRecord>>>,
pub shared_resources_path: PathBuf,
pub routines: Arc<RwLock<HashMap<String, RoutineSpec>>>,
pub routine_history: Arc<RwLock<HashMap<String, Vec<RoutineHistoryEvent>>>>,
pub routines_path: PathBuf,
pub agent_teams: AgentTeamRuntime,
}Fields§
§runtime: Arc<OnceLock<RuntimeState>>§startup: Arc<RwLock<StartupState>>§in_process_mode: Arc<AtomicBool>§api_token: Arc<RwLock<Option<String>>>§engine_leases: Arc<RwLock<HashMap<String, EngineLease>>>§run_registry: RunRegistry§run_stale_ms: u64§memory_records: Arc<RwLock<HashMap<String, GovernedMemoryRecord>>>§memory_audit_log: Arc<RwLock<Vec<MemoryAuditEvent>>>§missions: Arc<RwLock<HashMap<String, MissionState>>>§routines: Arc<RwLock<HashMap<String, RoutineSpec>>>§routine_history: Arc<RwLock<HashMap<String, Vec<RoutineHistoryEvent>>>>§routines_path: PathBuf§agent_teams: AgentTeamRuntimeImplementations§
Source§impl AppState
impl AppState
pub fn new_starting(attempt_id: String, in_process: bool) -> Self
pub fn is_ready(&self) -> bool
pub fn mode_label(&self) -> &'static str
pub async fn api_token(&self) -> Option<String>
pub async fn set_api_token(&self, token: Option<String>)
pub async fn startup_snapshot(&self) -> StartupSnapshot
pub async fn set_phase(&self, phase: impl Into<String>)
pub async fn mark_ready(&self, runtime: RuntimeState) -> Result<()>
pub async fn mark_failed( &self, phase: impl Into<String>, error: impl Into<String>, )
pub async fn load_routines(&self) -> Result<()>
pub async fn persist_routines(&self) -> Result<()>
pub async fn put_routine( &self, routine: RoutineSpec, ) -> Result<RoutineSpec, RoutineStoreError>
pub async fn list_routines(&self) -> Vec<RoutineSpec>
pub async fn get_routine(&self, routine_id: &str) -> Option<RoutineSpec>
pub async fn delete_routine( &self, routine_id: &str, ) -> Result<Option<RoutineSpec>, RoutineStoreError>
pub async fn evaluate_routine_misfires( &self, now_ms: u64, ) -> Vec<RoutineTriggerPlan>
pub async fn mark_routine_fired( &self, routine_id: &str, fired_at_ms: u64, ) -> Option<RoutineSpec>
pub async fn append_routine_history(&self, event: RoutineHistoryEvent)
pub async fn list_routine_history( &self, routine_id: &str, limit: usize, ) -> Vec<RoutineHistoryEvent>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe for AppState
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