MCPcopy
hub / github.com/OneUptime/oneuptime / CodeAgent

Interface CodeAgent

AIAgent/CodeAgents/CodeAgentInterface.ts:47–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 * This allows us to support multiple agents (OpenCode, Goose, Claude Code, etc.)
46 */
47export 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
71export enum CodeAgentType {

Callers 17

Index.tsFile · 0.65
connectToDatabaseMethod · 0.65
MarkdownViewer.tsxFile · 0.65
processRepositoryMethod · 0.65
initializeApiServiceFunction · 0.65
server.test.tsFile · 0.65
processRepositoryMethod · 0.65
importItemsMethod · 0.65
processRepositoryMethod · 0.65
isAgentAvailableMethod · 0.65
fetchWithTimeoutMethod · 0.65

Implementers 1

OpenCodeAgentAIAgent/CodeAgents/OpenCodeAgent.ts

Calls

no outgoing calls

Tested by

no test coverage detected