{
  "name": "ForgeHealth",
  "language": "swift",
  "version": "Swift package source snapshot",
  "description": "Swift ForgeHealth library product.",
  "manifest": "forge-swift/Package.swift",
  "manifestSha256": "8579cd038904d9101db7b7714fa006f94144a6f951c0535512114bb00d4a3128",
  "status": "source-reference",
  "registryPublicationVerified": false,
  "route": "/libraries/swift/ForgeHealth",
  "features": {},
  "files": [
    {
      "path": "forge-swift/Sources/ForgeHealth/Events.swift",
      "sha256": "f76f5f4daca51c08bb013c01889cb5b8775e87323ba9879c7efee1b7c18c047e",
      "artifactSha256": "4e5debc5f4f00c084622e7cb54b92a17e4178133a7d1f56adc2d0d55f17e24d1",
      "url": "/reference/source/forge-swift/Sources/ForgeHealth/Events.swift.txt",
      "declarations": [
        {
          "name": "public struct LifecycleEvent: Codable, Sendable",
          "line": 15,
          "signature": "public struct LifecycleEvent: Codable, Sendable",
          "documentation": ""
        },
        {
          "name": "public let from: LifecycleState",
          "line": 17,
          "signature": "public let from: LifecycleState\n/// The state after the transition.\npublic let to: LifecycleState\n/// When the transition occurred.\npublic let timestamp: Timestamp\n/// Optional reason for the transition.\npublic let reason: String?\n/// The agent DID (if available).\npublic let agentDid: String?\n\npublic init(\nfrom: LifecycleState,\nto: LifecycleState,\ntimestamp: Timestamp;",
          "documentation": ""
        },
        {
          "name": "public let to: LifecycleState",
          "line": 19,
          "signature": "public let to: LifecycleState\n/// When the transition occurred.\npublic let timestamp: Timestamp\n/// Optional reason for the transition.\npublic let reason: String?\n/// The agent DID (if available).\npublic let agentDid: String?\n\npublic init(\nfrom: LifecycleState,\nto: LifecycleState,\ntimestamp: Timestamp;",
          "documentation": ""
        },
        {
          "name": "public let timestamp: Timestamp",
          "line": 21,
          "signature": "public let timestamp: Timestamp\n/// Optional reason for the transition.\npublic let reason: String?\n/// The agent DID (if available).\npublic let agentDid: String?\n\npublic init(\nfrom: LifecycleState,\nto: LifecycleState,\ntimestamp: Timestamp;",
          "documentation": ""
        },
        {
          "name": "public let reason: String?",
          "line": 23,
          "signature": "public let reason: String?\n/// The agent DID (if available).\npublic let agentDid: String?\n\npublic init(\nfrom: LifecycleState,\nto: LifecycleState,\ntimestamp: Timestamp;",
          "documentation": ""
        },
        {
          "name": "public let agentDid: String?",
          "line": 25,
          "signature": "public let agentDid: String?\n\npublic init(\nfrom: LifecycleState,\nto: LifecycleState,\ntimestamp: Timestamp;",
          "documentation": ""
        },
        {
          "name": "public init(",
          "line": 27,
          "signature": "public init(\nfrom: LifecycleState,\nto: LifecycleState,\ntimestamp: Timestamp;",
          "documentation": ""
        },
        {
          "name": "public static func from(",
          "line": 48,
          "signature": "public static func from(\ntransition: LifecycleTransition,\nreason: String?;",
          "documentation": ""
        },
        {
          "name": "public func toForgeEvent() -> ForgeEvent",
          "line": 65,
          "signature": "public func toForgeEvent() -> ForgeEvent",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-swift/Sources/ForgeHealth/Lifecycle.swift",
      "sha256": "af179323901a399602dc1b3ceaf6c44f156c4e5134ae8c036853006832db0f81",
      "artifactSha256": "df6d0e3a00f1e237b2eceb2aee298a17484101e235be60b4f8f11b7bf5303c30",
      "url": "/reference/source/forge-swift/Sources/ForgeHealth/Lifecycle.swift.txt",
      "declarations": [
        {
          "name": "public enum LifecycleState: String, Codable, Sendable, Hashable, CaseIterable",
          "line": 45,
          "signature": "public enum LifecycleState: String, Codable, Sendable, Hashable, CaseIterable",
          "documentation": ""
        },
        {
          "name": "public var validTransitions: [LifecycleState]",
          "line": 98,
          "signature": "public var validTransitions: [LifecycleState]",
          "documentation": ""
        },
        {
          "name": "public var isTerminal: Bool",
          "line": 112,
          "signature": "public var isTerminal: Bool",
          "documentation": ""
        },
        {
          "name": "public var isOperational: Bool",
          "line": 120,
          "signature": "public var isOperational: Bool",
          "documentation": ""
        },
        {
          "name": "public var description: String",
          "line": 126,
          "signature": "public var description: String",
          "documentation": ""
        },
        {
          "name": "public struct LifecycleTransition: Codable, Sendable",
          "line": 135,
          "signature": "public struct LifecycleTransition: Codable, Sendable",
          "documentation": ""
        },
        {
          "name": "public let from: LifecycleState",
          "line": 137,
          "signature": "public let from: LifecycleState\n/// The state after the transition.\npublic let to: LifecycleState\n/// The UTC timestamp when the transition occurred.\npublic let timestamp: Timestamp\n\npublic init(from: LifecycleState, to: LifecycleState, timestamp: Timestamp)",
          "documentation": ""
        },
        {
          "name": "public let to: LifecycleState",
          "line": 139,
          "signature": "public let to: LifecycleState\n/// The UTC timestamp when the transition occurred.\npublic let timestamp: Timestamp\n\npublic init(from: LifecycleState, to: LifecycleState, timestamp: Timestamp)",
          "documentation": ""
        },
        {
          "name": "public let timestamp: Timestamp",
          "line": 141,
          "signature": "public let timestamp: Timestamp\n\npublic init(from: LifecycleState, to: LifecycleState, timestamp: Timestamp)",
          "documentation": ""
        },
        {
          "name": "public init(from: LifecycleState, to: LifecycleState, timestamp: Timestamp)",
          "line": 143,
          "signature": "public init(from: LifecycleState, to: LifecycleState, timestamp: Timestamp)",
          "documentation": ""
        },
        {
          "name": "public enum LifecycleError: Error, Sendable, Equatable",
          "line": 153,
          "signature": "public enum LifecycleError: Error, Sendable, Equatable",
          "documentation": ""
        },
        {
          "name": "public var errorDescription: String?",
          "line": 159,
          "signature": "public var errorDescription: String?",
          "documentation": ""
        },
        {
          "name": "public final class LifecycleManager: @unchecked Sendable",
          "line": 194,
          "signature": "public final class LifecycleManager: @unchecked Sendable",
          "documentation": ""
        },
        {
          "name": "public init()",
          "line": 202,
          "signature": "public init()",
          "documentation": ""
        },
        {
          "name": "public var state: LifecycleState",
          "line": 205,
          "signature": "public var state: LifecycleState",
          "documentation": ""
        },
        {
          "name": "public func transition(to target: LifecycleState) throws -> LifecycleTransition",
          "line": 222,
          "signature": "public func transition(to target: LifecycleState) throws -> LifecycleTransition",
          "documentation": ""
        },
        {
          "name": "public func canTransition(to target: LifecycleState) -> Bool",
          "line": 271,
          "signature": "public func canTransition(to target: LifecycleState) -> Bool",
          "documentation": ""
        },
        {
          "name": "public func validTransitions() -> [LifecycleState]",
          "line": 280,
          "signature": "public func validTransitions() -> [LifecycleState]",
          "documentation": ""
        },
        {
          "name": "public func history() -> [LifecycleTransition]",
          "line": 289,
          "signature": "public func history() -> [LifecycleTransition]",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-swift/Sources/ForgeHealth/Monitoring.swift",
      "sha256": "ab7c4d8674bb6e10f47119f0fb7fc5313b526dbc90e7cd2cf336f43aab202a39",
      "artifactSha256": "e8f8e18b471f36075eb98b07e6c33fd09d694eec955377915cbf4e7105e7efe8",
      "url": "/reference/source/forge-swift/Sources/ForgeHealth/Monitoring.swift.txt",
      "declarations": [
        {
          "name": "public struct HealthThresholds: Codable, Sendable, Equatable",
          "line": 17,
          "signature": "public struct HealthThresholds: Codable, Sendable, Equatable",
          "documentation": ""
        },
        {
          "name": "public var degradedErrorCount: UInt64",
          "line": 19,
          "signature": "public var degradedErrorCount: UInt64\n/// Maximum error count before critical status.\npublic var criticalErrorCount: UInt64\n/// Minimum tool success rate for healthy status (0.0 to 1.0).\npublic var minToolSuccessRate: Double\n/// Minimum tool success rate for degraded (below this is critical) (0.0 to 1.0).\npublic var criticalToolSuccessRate: Double\n/// Maximum error rate before degraded status (0.0 to 1.0).\npublic var degradedErrorRate: Double\n/// Maximum error rate before critical status (0.0 to 1.0).\npublic var criticalErrorRate: Double\n\n/// Creates thresholds with sensible defaults.\npublic init(\ndegradedErrorCount: UInt64;",
          "documentation": ""
        },
        {
          "name": "public var criticalErrorCount: UInt64",
          "line": 21,
          "signature": "public var criticalErrorCount: UInt64\n/// Minimum tool success rate for healthy status (0.0 to 1.0).\npublic var minToolSuccessRate: Double\n/// Minimum tool success rate for degraded (below this is critical) (0.0 to 1.0).\npublic var criticalToolSuccessRate: Double\n/// Maximum error rate before degraded status (0.0 to 1.0).\npublic var degradedErrorRate: Double\n/// Maximum error rate before critical status (0.0 to 1.0).\npublic var criticalErrorRate: Double\n\n/// Creates thresholds with sensible defaults.\npublic init(\ndegradedErrorCount: UInt64;",
          "documentation": ""
        },
        {
          "name": "public var minToolSuccessRate: Double",
          "line": 23,
          "signature": "public var minToolSuccessRate: Double\n/// Minimum tool success rate for degraded (below this is critical) (0.0 to 1.0).\npublic var criticalToolSuccessRate: Double\n/// Maximum error rate before degraded status (0.0 to 1.0).\npublic var degradedErrorRate: Double\n/// Maximum error rate before critical status (0.0 to 1.0).\npublic var criticalErrorRate: Double\n\n/// Creates thresholds with sensible defaults.\npublic init(\ndegradedErrorCount: UInt64;",
          "documentation": ""
        },
        {
          "name": "public var criticalToolSuccessRate: Double",
          "line": 25,
          "signature": "public var criticalToolSuccessRate: Double\n/// Maximum error rate before degraded status (0.0 to 1.0).\npublic var degradedErrorRate: Double\n/// Maximum error rate before critical status (0.0 to 1.0).\npublic var criticalErrorRate: Double\n\n/// Creates thresholds with sensible defaults.\npublic init(\ndegradedErrorCount: UInt64;",
          "documentation": ""
        },
        {
          "name": "public var degradedErrorRate: Double",
          "line": 27,
          "signature": "public var degradedErrorRate: Double\n/// Maximum error rate before critical status (0.0 to 1.0).\npublic var criticalErrorRate: Double\n\n/// Creates thresholds with sensible defaults.\npublic init(\ndegradedErrorCount: UInt64;",
          "documentation": ""
        },
        {
          "name": "public var criticalErrorRate: Double",
          "line": 29,
          "signature": "public var criticalErrorRate: Double\n\n/// Creates thresholds with sensible defaults.\npublic init(\ndegradedErrorCount: UInt64;",
          "documentation": ""
        },
        {
          "name": "public init(",
          "line": 32,
          "signature": "public init(\ndegradedErrorCount: UInt64;",
          "documentation": ""
        },
        {
          "name": "public final class HealthMonitor: @unchecked Sendable",
          "line": 55,
          "signature": "public final class HealthMonitor: @unchecked Sendable",
          "documentation": ""
        },
        {
          "name": "public init(thresholds: HealthThresholds;",
          "line": 63,
          "signature": "public init(thresholds: HealthThresholds;",
          "documentation": ""
        },
        {
          "name": "public var profile: HealthProfile",
          "line": 69,
          "signature": "public var profile: HealthProfile",
          "documentation": ""
        },
        {
          "name": "public func recordToolInvocation(success: Bool;",
          "line": 78,
          "signature": "public func recordToolInvocation(success: Bool;",
          "documentation": ""
        },
        {
          "name": "public func recordInference(tokens: UInt64)",
          "line": 87,
          "signature": "public func recordInference(tokens: UInt64)",
          "documentation": ""
        },
        {
          "name": "public func recordError()",
          "line": 94,
          "signature": "public func recordError()",
          "documentation": ""
        },
        {
          "name": "public func recordLifecycleTransition()",
          "line": 101,
          "signature": "public func recordLifecycleTransition()",
          "documentation": ""
        },
        {
          "name": "public func recordTaskStarted()",
          "line": 108,
          "signature": "public func recordTaskStarted()",
          "documentation": ""
        },
        {
          "name": "public func recordTaskCompleted()",
          "line": 115,
          "signature": "public func recordTaskCompleted()",
          "documentation": ""
        },
        {
          "name": "public func recordGenerationSuccess()",
          "line": 122,
          "signature": "public func recordGenerationSuccess()",
          "documentation": ""
        },
        {
          "name": "public func recordGenerationFailure()",
          "line": 129,
          "signature": "public func recordGenerationFailure()",
          "documentation": ""
        },
        {
          "name": "public func updateResources(cpu: Double, memory: UInt64)",
          "line": 140,
          "signature": "public func updateResources(cpu: Double, memory: UInt64)",
          "documentation": ""
        },
        {
          "name": "public func updateUptime(_ seconds: UInt64)",
          "line": 149,
          "signature": "public func updateUptime(_ seconds: UInt64)",
          "documentation": ""
        },
        {
          "name": "public func checkHealth() -> HealthStatus",
          "line": 160,
          "signature": "public func checkHealth() -> HealthStatus",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-swift/Sources/ForgeHealth/Profile.swift",
      "sha256": "0a4fc28566ba54e6c81a8ff1ab88fb8e48668b8d5bf1f74894e87d7c5d7443b5",
      "artifactSha256": "530ee49968f382892231dba6ad268a2f44772c2e51546ddbf2d6649a5d04ff80",
      "url": "/reference/source/forge-swift/Sources/ForgeHealth/Profile.swift.txt",
      "declarations": [
        {
          "name": "public struct HealthProfile: Codable, Sendable, Equatable",
          "line": 26,
          "signature": "public struct HealthProfile: Codable, Sendable, Equatable",
          "documentation": ""
        },
        {
          "name": "public var createdAt: Timestamp",
          "line": 28,
          "signature": "public var createdAt: Timestamp\n/// Total uptime of the agent in seconds.\npublic var uptimeSeconds: UInt64\n/// Total number of tool invocations.\npublic var toolInvocations: UInt64\n/// Total number of successful tool invocations.\npublic var toolSuccesses: UInt64\n/// Total number of failed tool invocations.\npublic var toolFailures: UInt64\n/// Total number of inference calls.\npublic var inferenceCalls: UInt64\n/// Total tokens consumed across all inference calls.\npublic var totalTokens: UInt64\n/// Total number of errors encountered.\npublic var errorCount: UInt64\n/// Total number of lifecycle transitions.\npublic var lifecycleTransitions: UInt64\n/// Current CPU usage as a percentage (0.0 to 100.0).\npublic var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32",
          "documentation": ""
        },
        {
          "name": "public var uptimeSeconds: UInt64",
          "line": 30,
          "signature": "public var uptimeSeconds: UInt64\n/// Total number of tool invocations.\npublic var toolInvocations: UInt64\n/// Total number of successful tool invocations.\npublic var toolSuccesses: UInt64\n/// Total number of failed tool invocations.\npublic var toolFailures: UInt64\n/// Total number of inference calls.\npublic var inferenceCalls: UInt64\n/// Total tokens consumed across all inference calls.\npublic var totalTokens: UInt64\n/// Total number of errors encountered.\npublic var errorCount: UInt64\n/// Total number of lifecycle transitions.\npublic var lifecycleTransitions: UInt64\n/// Current CPU usage as a percentage (0.0 to 100.0).\npublic var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///",
          "documentation": ""
        },
        {
          "name": "public var toolInvocations: UInt64",
          "line": 32,
          "signature": "public var toolInvocations: UInt64\n/// Total number of successful tool invocations.\npublic var toolSuccesses: UInt64\n/// Total number of failed tool invocations.\npublic var toolFailures: UInt64\n/// Total number of inference calls.\npublic var inferenceCalls: UInt64\n/// Total tokens consumed across all inference calls.\npublic var totalTokens: UInt64\n/// Total number of errors encountered.\npublic var errorCount: UInt64\n/// Total number of lifecycle transitions.\npublic var lifecycleTransitions: UInt64\n/// Current CPU usage as a percentage (0.0 to 100.0).\npublic var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64",
          "documentation": ""
        },
        {
          "name": "public var toolSuccesses: UInt64",
          "line": 34,
          "signature": "public var toolSuccesses: UInt64\n/// Total number of failed tool invocations.\npublic var toolFailures: UInt64\n/// Total number of inference calls.\npublic var inferenceCalls: UInt64\n/// Total tokens consumed across all inference calls.\npublic var totalTokens: UInt64\n/// Total number of errors encountered.\npublic var errorCount: UInt64\n/// Total number of lifecycle transitions.\npublic var lifecycleTransitions: UInt64\n/// Current CPU usage as a percentage (0.0 to 100.0).\npublic var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///",
          "documentation": ""
        },
        {
          "name": "public var toolFailures: UInt64",
          "line": 36,
          "signature": "public var toolFailures: UInt64\n/// Total number of inference calls.\npublic var inferenceCalls: UInt64\n/// Total tokens consumed across all inference calls.\npublic var totalTokens: UInt64\n/// Total number of errors encountered.\npublic var errorCount: UInt64\n/// Total number of lifecycle transitions.\npublic var lifecycleTransitions: UInt64\n/// Current CPU usage as a percentage (0.0 to 100.0).\npublic var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `errors / (errors + successes)` across all generation calls.\npublic var errorRate: Double",
          "documentation": ""
        },
        {
          "name": "public var inferenceCalls: UInt64",
          "line": 38,
          "signature": "public var inferenceCalls: UInt64\n/// Total tokens consumed across all inference calls.\npublic var totalTokens: UInt64\n/// Total number of errors encountered.\npublic var errorCount: UInt64\n/// Total number of lifecycle transitions.\npublic var lifecycleTransitions: UInt64\n/// Current CPU usage as a percentage (0.0 to 100.0).\npublic var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `errors / (errors + successes)` across all generation calls.\npublic var errorRate: Double\n/// Average latency of completed operations in milliseconds.\npublic var avgLatencyMs: Double",
          "documentation": ""
        },
        {
          "name": "public var totalTokens: UInt64",
          "line": 40,
          "signature": "public var totalTokens: UInt64\n/// Total number of errors encountered.\npublic var errorCount: UInt64\n/// Total number of lifecycle transitions.\npublic var lifecycleTransitions: UInt64\n/// Current CPU usage as a percentage (0.0 to 100.0).\npublic var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `errors / (errors + successes)` across all generation calls.\npublic var errorRate: Double\n/// Average latency of completed operations in milliseconds.\npublic var avgLatencyMs: Double\n/// Tool invocation success rate as a fraction (0.0 to 1.0).\n///",
          "documentation": ""
        },
        {
          "name": "public var errorCount: UInt64",
          "line": 42,
          "signature": "public var errorCount: UInt64\n/// Total number of lifecycle transitions.\npublic var lifecycleTransitions: UInt64\n/// Current CPU usage as a percentage (0.0 to 100.0).\npublic var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `errors / (errors + successes)` across all generation calls.\npublic var errorRate: Double\n/// Average latency of completed operations in milliseconds.\npublic var avgLatencyMs: Double\n/// Tool invocation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all tool invocations.\npublic var toolSuccessRate: Double",
          "documentation": ""
        },
        {
          "name": "public var lifecycleTransitions: UInt64",
          "line": 44,
          "signature": "public var lifecycleTransitions: UInt64\n/// Current CPU usage as a percentage (0.0 to 100.0).\npublic var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `errors / (errors + successes)` across all generation calls.\npublic var errorRate: Double\n/// Average latency of completed operations in milliseconds.\npublic var avgLatencyMs: Double\n/// Tool invocation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all tool invocations.\npublic var toolSuccessRate: Double\n/// Generation success rate as a fraction (0.0 to 1.0).\n///",
          "documentation": ""
        },
        {
          "name": "public var cpuUsagePercent: Double",
          "line": 46,
          "signature": "public var cpuUsagePercent: Double\n/// Current memory usage in bytes.\npublic var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `errors / (errors + successes)` across all generation calls.\npublic var errorRate: Double\n/// Average latency of completed operations in milliseconds.\npublic var avgLatencyMs: Double\n/// Tool invocation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all tool invocations.\npublic var toolSuccessRate: Double\n/// Generation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all generation calls.\npublic var generationSuccessRate: Double",
          "documentation": ""
        },
        {
          "name": "public var memoryUsageBytes: UInt64",
          "line": 48,
          "signature": "public var memoryUsageBytes: UInt64\n/// Number of currently active (in-flight) tasks.\n///\n/// Incremented by `recordTaskStarted`, decremented by `recordTaskCompleted`.\n/// This gauge can reach zero and will not go below zero (saturating subtraction).\npublic var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `errors / (errors + successes)` across all generation calls.\npublic var errorRate: Double\n/// Average latency of completed operations in milliseconds.\npublic var avgLatencyMs: Double\n/// Tool invocation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all tool invocations.\npublic var toolSuccessRate: Double\n/// Generation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all generation calls.\npublic var generationSuccessRate: Double\n/// Timestamp of the last profile update.\npublic var lastUpdated: Timestamp",
          "documentation": ""
        },
        {
          "name": "public var activeTasks: UInt32",
          "line": 53,
          "signature": "public var activeTasks: UInt32\n/// Total number of tasks completed during the agent's lifetime.\n///\n/// This counter is monotonically increasing.\npublic var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `errors / (errors + successes)` across all generation calls.\npublic var errorRate: Double\n/// Average latency of completed operations in milliseconds.\npublic var avgLatencyMs: Double\n/// Tool invocation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all tool invocations.\npublic var toolSuccessRate: Double\n/// Generation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all generation calls.\npublic var generationSuccessRate: Double\n/// Timestamp of the last profile update.\npublic var lastUpdated: Timestamp\n\n/// Internal counter for generation successes (used to compute rates).\nprivate var generationSuccesses: UInt64\n/// Internal counter for generation failures (used to compute rates).\nprivate var generationFailures: UInt64",
          "documentation": ""
        },
        {
          "name": "public var completedTasks: UInt64",
          "line": 57,
          "signature": "public var completedTasks: UInt64\n/// Current error rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `errors / (errors + successes)` across all generation calls.\npublic var errorRate: Double\n/// Average latency of completed operations in milliseconds.\npublic var avgLatencyMs: Double\n/// Tool invocation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all tool invocations.\npublic var toolSuccessRate: Double\n/// Generation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all generation calls.\npublic var generationSuccessRate: Double\n/// Timestamp of the last profile update.\npublic var lastUpdated: Timestamp\n\n/// Internal counter for generation successes (used to compute rates).\nprivate var generationSuccesses: UInt64\n/// Internal counter for generation failures (used to compute rates).\nprivate var generationFailures: UInt64\n\n/// Creates a new health profile with zeroed counters and the given creation time.\npublic init()",
          "documentation": ""
        },
        {
          "name": "public var errorRate: Double",
          "line": 61,
          "signature": "public var errorRate: Double\n/// Average latency of completed operations in milliseconds.\npublic var avgLatencyMs: Double\n/// Tool invocation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all tool invocations.\npublic var toolSuccessRate: Double\n/// Generation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all generation calls.\npublic var generationSuccessRate: Double\n/// Timestamp of the last profile update.\npublic var lastUpdated: Timestamp\n\n/// Internal counter for generation successes (used to compute rates).\nprivate var generationSuccesses: UInt64\n/// Internal counter for generation failures (used to compute rates).\nprivate var generationFailures: UInt64\n\n/// Creates a new health profile with zeroed counters and the given creation time.\npublic init()",
          "documentation": ""
        },
        {
          "name": "public var avgLatencyMs: Double",
          "line": 63,
          "signature": "public var avgLatencyMs: Double\n/// Tool invocation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all tool invocations.\npublic var toolSuccessRate: Double\n/// Generation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all generation calls.\npublic var generationSuccessRate: Double\n/// Timestamp of the last profile update.\npublic var lastUpdated: Timestamp\n\n/// Internal counter for generation successes (used to compute rates).\nprivate var generationSuccesses: UInt64\n/// Internal counter for generation failures (used to compute rates).\nprivate var generationFailures: UInt64\n\n/// Creates a new health profile with zeroed counters and the given creation time.\npublic init()",
          "documentation": ""
        },
        {
          "name": "public var toolSuccessRate: Double",
          "line": 67,
          "signature": "public var toolSuccessRate: Double\n/// Generation success rate as a fraction (0.0 to 1.0).\n///\n/// Computed as `successes / total` across all generation calls.\npublic var generationSuccessRate: Double\n/// Timestamp of the last profile update.\npublic var lastUpdated: Timestamp\n\n/// Internal counter for generation successes (used to compute rates).\nprivate var generationSuccesses: UInt64\n/// Internal counter for generation failures (used to compute rates).\nprivate var generationFailures: UInt64\n\n/// Creates a new health profile with zeroed counters and the given creation time.\npublic init()",
          "documentation": ""
        },
        {
          "name": "public var generationSuccessRate: Double",
          "line": 71,
          "signature": "public var generationSuccessRate: Double\n/// Timestamp of the last profile update.\npublic var lastUpdated: Timestamp\n\n/// Internal counter for generation successes (used to compute rates).\nprivate var generationSuccesses: UInt64\n/// Internal counter for generation failures (used to compute rates).\nprivate var generationFailures: UInt64\n\n/// Creates a new health profile with zeroed counters and the given creation time.\npublic init()",
          "documentation": ""
        },
        {
          "name": "public var lastUpdated: Timestamp",
          "line": 73,
          "signature": "public var lastUpdated: Timestamp\n\n/// Internal counter for generation successes (used to compute rates).\nprivate var generationSuccesses: UInt64\n/// Internal counter for generation failures (used to compute rates).\nprivate var generationFailures: UInt64\n\n/// Creates a new health profile with zeroed counters and the given creation time.\npublic init()",
          "documentation": ""
        },
        {
          "name": "public init()",
          "line": 81,
          "signature": "public init()",
          "documentation": ""
        },
        {
          "name": "public mutating func recordToolInvocation(success: Bool;",
          "line": 108,
          "signature": "public mutating func recordToolInvocation(success: Bool;",
          "documentation": ""
        },
        {
          "name": "public mutating func recordInference(tokens: UInt64)",
          "line": 122,
          "signature": "public mutating func recordInference(tokens: UInt64)",
          "documentation": ""
        },
        {
          "name": "public mutating func recordError()",
          "line": 129,
          "signature": "public mutating func recordError()",
          "documentation": ""
        },
        {
          "name": "public mutating func recordLifecycleTransition()",
          "line": 135,
          "signature": "public mutating func recordLifecycleTransition()",
          "documentation": ""
        },
        {
          "name": "public mutating func updateResources(cpu: Double, memory: UInt64)",
          "line": 147,
          "signature": "public mutating func updateResources(cpu: Double, memory: UInt64)",
          "documentation": ""
        },
        {
          "name": "public mutating func updateUptime(_ seconds: UInt64)",
          "line": 156,
          "signature": "public mutating func updateUptime(_ seconds: UInt64)",
          "documentation": ""
        },
        {
          "name": "public mutating func recordTaskStarted()",
          "line": 164,
          "signature": "public mutating func recordTaskStarted()",
          "documentation": ""
        },
        {
          "name": "public mutating func recordTaskCompleted()",
          "line": 175,
          "signature": "public mutating func recordTaskCompleted()",
          "documentation": ""
        },
        {
          "name": "public mutating func recordGenerationSuccess()",
          "line": 187,
          "signature": "public mutating func recordGenerationSuccess()",
          "documentation": ""
        },
        {
          "name": "public mutating func recordGenerationFailure()",
          "line": 197,
          "signature": "public mutating func recordGenerationFailure()",
          "documentation": ""
        },
        {
          "name": "public var averageTokensPerCall: Double?",
          "line": 207,
          "signature": "public var averageTokensPerCall: Double?",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-swift/Sources/ForgeHealth/Reporting.swift",
      "sha256": "29c5e4afae39c920bc3bd2a88dc449cf1ab8fdab5dc9cc4b866e0c581a2c63ba",
      "artifactSha256": "64d31268ed5af29855c3b76732efb8ebe4a3ba09afd3eacc17354bc0f8292294",
      "url": "/reference/source/forge-swift/Sources/ForgeHealth/Reporting.swift.txt",
      "declarations": [
        {
          "name": "public enum HealthStatus: Sendable, Equatable",
          "line": 17,
          "signature": "public enum HealthStatus: Sendable, Equatable",
          "documentation": ""
        },
        {
          "name": "public var description: String",
          "line": 27,
          "signature": "public var description: String",
          "documentation": ""
        },
        {
          "name": "public struct HealthReport: Sendable",
          "line": 45,
          "signature": "public struct HealthReport: Sendable",
          "documentation": ""
        },
        {
          "name": "public let profile: HealthProfile",
          "line": 47,
          "signature": "public let profile: HealthProfile\n/// The current lifecycle state.\npublic let lifecycleState: LifecycleState\n/// The assessed health status.\npublic let status: HealthStatus\n/// When this report was generated.\npublic let generatedAt: Timestamp\n\n/// Creates a new health report.\n///\n/// - Parameters:\n///   - profile: The current health profile.\n///   - lifecycleState: The current lifecycle state.\n///   - status: The assessed health status.\npublic init(profile: HealthProfile, lifecycleState: LifecycleState, status: HealthStatus)",
          "documentation": ""
        },
        {
          "name": "public let lifecycleState: LifecycleState",
          "line": 49,
          "signature": "public let lifecycleState: LifecycleState\n/// The assessed health status.\npublic let status: HealthStatus\n/// When this report was generated.\npublic let generatedAt: Timestamp\n\n/// Creates a new health report.\n///\n/// - Parameters:\n///   - profile: The current health profile.\n///   - lifecycleState: The current lifecycle state.\n///   - status: The assessed health status.\npublic init(profile: HealthProfile, lifecycleState: LifecycleState, status: HealthStatus)",
          "documentation": ""
        },
        {
          "name": "public let status: HealthStatus",
          "line": 51,
          "signature": "public let status: HealthStatus\n/// When this report was generated.\npublic let generatedAt: Timestamp\n\n/// Creates a new health report.\n///\n/// - Parameters:\n///   - profile: The current health profile.\n///   - lifecycleState: The current lifecycle state.\n///   - status: The assessed health status.\npublic init(profile: HealthProfile, lifecycleState: LifecycleState, status: HealthStatus)",
          "documentation": ""
        },
        {
          "name": "public let generatedAt: Timestamp",
          "line": 53,
          "signature": "public let generatedAt: Timestamp\n\n/// Creates a new health report.\n///\n/// - Parameters:\n///   - profile: The current health profile.\n///   - lifecycleState: The current lifecycle state.\n///   - status: The assessed health status.\npublic init(profile: HealthProfile, lifecycleState: LifecycleState, status: HealthStatus)",
          "documentation": ""
        },
        {
          "name": "public init(profile: HealthProfile, lifecycleState: LifecycleState, status: HealthStatus)",
          "line": 61,
          "signature": "public init(profile: HealthProfile, lifecycleState: LifecycleState, status: HealthStatus)",
          "documentation": ""
        },
        {
          "name": "public var isHealthy: Bool",
          "line": 69,
          "signature": "public var isHealthy: Bool",
          "documentation": ""
        },
        {
          "name": "public func generateHealthReport(",
          "line": 81,
          "signature": "public func generateHealthReport(\nlifecycle: LifecycleManager,\nmonitor: HealthMonitor\n) -> HealthReport",
          "documentation": ""
        }
      ]
    }
  ]
}
