Skip to main content

ralph_workflow/diagnostics/
mod.rs

1//! System and agent diagnostics.
2//!
3//! This module provides comprehensive diagnostic information for troubleshooting
4//! Ralph configuration and environment issues.
5
6mod agents;
7mod system;
8
9pub use agents::AgentDiagnostics;
10pub use system::SystemInfo;
11
12use crate::agents::AgentRegistry;
13
14/// Complete diagnostic report.
15#[derive(Debug)]
16pub struct DiagnosticReport {
17    pub system: SystemInfo,
18    pub agents: AgentDiagnostics,
19}
20
21/// Run all diagnostics and return the report.
22///
23/// This function gathers all diagnostic information without printing.
24/// The CLI handler is responsible for formatting and displaying the results.
25pub fn run_diagnostics(registry: &AgentRegistry) -> DiagnosticReport {
26    let system = SystemInfo::gather();
27    let agents = AgentDiagnostics::test(registry);
28
29    DiagnosticReport { system, agents }
30}