Public declaration syntax from forge-rs/crates/forge-health/src/reporting.rs Original source SHA-256: 276e226f17937aaf4371b91a8521761444372d7a7a6df4eaaea8531724489b8a Function bodies and constant values are omitted. This is not the complete implementation. Source line 68 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(tag = "status", rename_all = "snake_case")] pub enum HealthStatus { /// All metrics are within acceptable thresholds. Healthy, /// One or more metrics are approaching thresholds. /// /// The agent is functional but may need attention. Each reason describes /// a specific metric that is outside the normal range. Degraded { /// Human-readable descriptions of the metrics causing degradation. reasons: Vec, }, /// One or more metrics have exceeded critical thresholds. /// /// The agent may be unable to perform work reliably. Each reason describes /// a specific metric that has exceeded its critical threshold. Critical { /// Human-readable descriptions of the metrics causing critical status. reasons: Vec, }, } Source line 102 pub fn is_healthy(&self) -> bool; Source line 119 pub fn is_critical(&self) -> bool; Source line 140 pub fn reasons(&self) -> &[String]; Source line 177 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct HealthReport { /// The assessed health status. pub status: HealthStatus, /// The current health profile metrics. pub profile: HealthProfile, /// The current lifecycle state of the agent. pub lifecycle_state: LifecycleState, /// Timestamp when this report was generated. pub generated_at: Timestamp } Source line 218 pub fn new( status: HealthStatus, profile: HealthProfile, lifecycle_state: LifecycleState, ) -> Self; Source line 264 pub fn derive_health_status(profile: &HealthProfile) -> HealthStatus;