Public declaration syntax from forge-swift/Sources/ForgeHealth/Monitoring.swift Original source SHA-256: ab7c4d8674bb6e10f47119f0fb7fc5313b526dbc90e7cd2cf336f43aab202a39 Function bodies and constant values are omitted. This is not the complete implementation. Source line 17 public struct HealthThresholds: Codable, Sendable, Equatable Source line 19 public var degradedErrorCount: UInt64 /// Maximum error count before critical status. public var criticalErrorCount: UInt64 /// Minimum tool success rate for healthy status (0.0 to 1.0). public var minToolSuccessRate: Double /// Minimum tool success rate for degraded (below this is critical) (0.0 to 1.0). public var criticalToolSuccessRate: Double /// Maximum error rate before degraded status (0.0 to 1.0). public var degradedErrorRate: Double /// Maximum error rate before critical status (0.0 to 1.0). public var criticalErrorRate: Double /// Creates thresholds with sensible defaults. public init( degradedErrorCount: UInt64; Source line 21 public var criticalErrorCount: UInt64 /// Minimum tool success rate for healthy status (0.0 to 1.0). public var minToolSuccessRate: Double /// Minimum tool success rate for degraded (below this is critical) (0.0 to 1.0). public var criticalToolSuccessRate: Double /// Maximum error rate before degraded status (0.0 to 1.0). public var degradedErrorRate: Double /// Maximum error rate before critical status (0.0 to 1.0). public var criticalErrorRate: Double /// Creates thresholds with sensible defaults. public init( degradedErrorCount: UInt64; Source line 23 public var minToolSuccessRate: Double /// Minimum tool success rate for degraded (below this is critical) (0.0 to 1.0). public var criticalToolSuccessRate: Double /// Maximum error rate before degraded status (0.0 to 1.0). public var degradedErrorRate: Double /// Maximum error rate before critical status (0.0 to 1.0). public var criticalErrorRate: Double /// Creates thresholds with sensible defaults. public init( degradedErrorCount: UInt64; Source line 25 public var criticalToolSuccessRate: Double /// Maximum error rate before degraded status (0.0 to 1.0). public var degradedErrorRate: Double /// Maximum error rate before critical status (0.0 to 1.0). public var criticalErrorRate: Double /// Creates thresholds with sensible defaults. public init( degradedErrorCount: UInt64; Source line 27 public var degradedErrorRate: Double /// Maximum error rate before critical status (0.0 to 1.0). public var criticalErrorRate: Double /// Creates thresholds with sensible defaults. public init( degradedErrorCount: UInt64; Source line 29 public var criticalErrorRate: Double /// Creates thresholds with sensible defaults. public init( degradedErrorCount: UInt64; Source line 32 public init( degradedErrorCount: UInt64; Source line 55 public final class HealthMonitor: @unchecked Sendable Source line 63 public init(thresholds: HealthThresholds; Source line 69 public var profile: HealthProfile Source line 78 public func recordToolInvocation(success: Bool; Source line 87 public func recordInference(tokens: UInt64) Source line 94 public func recordError() Source line 101 public func recordLifecycleTransition() Source line 108 public func recordTaskStarted() Source line 115 public func recordTaskCompleted() Source line 122 public func recordGenerationSuccess() Source line 129 public func recordGenerationFailure() Source line 140 public func updateResources(cpu: Double, memory: UInt64) Source line 149 public func updateUptime(_ seconds: UInt64) Source line 160 public func checkHealth() -> HealthStatus