import { BaseAgent, AgentContext, AgentResult } from "./base.js"; export class DebuggerAgent extends BaseAgent { readonly name = "debugger"; readonly description = "Autonomous debugging. Auto-fixes when root cause confidence > 0.60, escalates otherwise."; readonly workflow = "debug"; async execute(context: AgentContext): Promise { const start = Date.now(); this.log("Running autonomous debug..."); if (context.backend) { const result = await this.executeViaBackend( context, `Debug the following issue: ${context.specification}` ); return { ...result, duration_ms: Date.now() - start }; } return { success: false, output: "Debugging requires an intelligence backend. Configure one with: ci init --backend", artifacts_created: [], decisions: 0, escalations: 0, duration_ms: Date.now() - start, error: "No intelligence backend available", }; } }