| 45 | * This allows us to support multiple agents (OpenCode, Goose, Claude Code, etc.) |
| 46 | */ |
| 47 | export interface CodeAgent { |
| 48 | // Name of the agent (e.g., "OpenCode", "Goose", "ClaudeCode") |
| 49 | readonly name: string; |
| 50 | |
| 51 | // Initialize the agent with LLM configuration |
| 52 | initialize(config: CodeAgentLLMConfig, logger?: TaskLogger): Promise<void>; |
| 53 | |
| 54 | // Execute a task and return the result |
| 55 | executeTask(task: CodeAgentTask): Promise<CodeAgentResult>; |
| 56 | |
| 57 | // Set a callback for progress events (streaming output) |
| 58 | onProgress(callback: CodeAgentProgressCallback): void; |
| 59 | |
| 60 | // Check if the agent is available on the system |
| 61 | isAvailable(): Promise<boolean>; |
| 62 | |
| 63 | // Abort the current task execution |
| 64 | abort(): Promise<void>; |
| 65 | |
| 66 | // Clean up any resources used by the agent |
| 67 | cleanup(): Promise<void>; |
| 68 | } |
| 69 | |
| 70 | // Enum for supported code agent types |
| 71 | export enum CodeAgentType { |
no outgoing calls
no test coverage detected