Skip to main content

agent_service/run/
run_status.rs

1//! Lifecycle states for service-level runs.
2
3/// Public lifecycle state of an agent run.
4#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5pub enum RunStatus {
6    Queued,
7    Running,
8    Completed,
9    Failed,
10    Cancelled,
11    TimedOut,
12    MaxIterationsReached,
13}
14
15impl RunStatus {
16    pub fn is_terminal(self) -> bool {
17        matches!(
18            self,
19            Self::Completed
20                | Self::Failed
21                | Self::Cancelled
22                | Self::TimedOut
23                | Self::MaxIterationsReached
24        )
25    }
26}