Public declaration syntax from forge-swift/Sources/ForgeAgent/ToolLoop.swift Original source SHA-256: 0c98802f307a6b24c7f09aedf47eac43afff2313a66ddd8d4195c06f2d8fcb62 Function bodies and constant values are omitted. This is not the complete implementation. Source line 36 public final class ToolLoopAgent: ForgeAgent, @unchecked Sendable Source line 37 public let config: AgentConfig private let model: any LanguageModel private let toolRegistry: ToolRegistry private let approvalHandler: any ToolApprovalHandler private let telemetry: any TelemetryEmitter private let lifecycleManager: LifecycleManager private let healthMonitor: HealthMonitor /// Creates a new tool loop agent. /// /// - Parameters: /// - model: The language model to use. /// - config: The agent configuration. /// - toolRegistry: The registry of available tools. /// - approvalHandler: The tool approval handler. Defaults to auto-approve. /// - telemetry: The telemetry emitter. Defaults to no-op. public init( model: any LanguageModel, config: AgentConfig, toolRegistry: ToolRegistry; Source line 54 public init( model: any LanguageModel, config: AgentConfig, toolRegistry: ToolRegistry; Source line 71 public func health() -> HealthProfile Source line 76 public func lifecycle() -> LifecycleState Source line 87 public func start() throws Source line 99 public func run(input: String) async throws -> AgentOutput Source line 210 public func stop() throws