Public declaration syntax from forge-rs/crates/forge-health/src/summary.rs Original source SHA-256: 2489e536c5bc7e4cdbe188f5dd8978cec8d3121f2829ccd749a0d21fb3ad0ffc Function bodies and constant values are omitted. This is not the complete implementation. Source line 82 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AgentHealthSnapshot { /// The agent's identifier (OAS DID or human-readable name). pub agent_id: String, /// The agent's current lifecycle state. pub lifecycle_state: LifecycleState, /// The agent's current health status. pub health_status: HealthStatus, /// Number of currently active tasks. pub active_tasks: u32, /// Current success rate (0.0 to 1.0) from the agent's latency tracker. pub success_rate: f64 } Source line 111 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RuntimeHealthSummary { /// Total number of agents included in this summary. pub total_agents: u32, /// Number of agents with `HealthStatus::Healthy`. pub healthy_count: u32, /// Number of agents with `HealthStatus::Degraded`. pub degraded_count: u32, /// Number of agents with `HealthStatus::Critical`. pub critical_count: u32, /// Count of agents per lifecycle state. pub lifecycle_counts: LifecycleStateCounts, /// Total active tasks across all agents. pub total_active_tasks: u64, /// Mean success rate across all agents (0.0 to 1.0). /// NaN-safe: returns 0.0 if no agents are included. pub mean_success_rate: f64, /// Agent IDs currently in degraded state. pub degraded_agents: Vec, /// Agent IDs currently in critical state. pub critical_agents: Vec, /// Timestamp when this summary was generated. pub generated_at: Timestamp } Source line 156 #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct LifecycleStateCounts { /// Agents in `Initializing` state. pub initializing: u32, /// Agents in `Ready` state. pub ready: u32, /// Agents in `Running` state. pub running: u32, /// Agents in `Paused` state. pub paused: u32, /// Agents in `Error` state. pub error: u32, /// Agents in `Terminated` state. pub terminated: u32 } Source line 173 pub fn empty() -> Self; Source line 206 pub fn empty() -> Self; Source line 253 pub fn from_snapshots(snapshots: &[AgentHealthSnapshot]) -> Self; Source line 323 pub fn all_healthy(&self) -> bool; Source line 337 pub fn has_critical(&self) -> bool;