/** * Agent Integration Interface * * Defines interfaces for agent-handler integration and tool definitions. * These interfaces allow ticket-mate to work with agent-handler or other AI execution frameworks. */ import type { FileChange } from "./executor"; /** * Tool definitions for AI agents */ export interface AgentTools { /** * Read a file from the repository */ read_file(path: string): Promise; /** * Write content to a file */ write_file(path: string, content: string): Promise; /** * Run a whitelisted command */ run_command(cmd: string, args: string[]): Promise<{ stdout: string; stderr: string; exitCode: number; }>; } /** * Agent integration interface * * This interface defines how to integrate with agent-handler or similar frameworks. */ export interface AgentIntegration { /** * Execute agent loop with tools * * @param prompts System and user prompts * @param tools Available tools * @returns File changes proposed by the agent */ executeAgentLoop(options: { systemPrompt: string; userPrompt: string; tools: AgentTools; maxIterations?: number; }): Promise; } /** * Default stub implementation * * This is a placeholder that logs what would be done but doesn't actually execute. * Real implementations would integrate with agent-handler or OpenAI. */ export declare class DefaultAgentIntegration implements AgentIntegration { executeAgentLoop(options: { systemPrompt: string; userPrompt: string; tools: AgentTools; maxIterations?: number; }): Promise; } /** * Tool implementations for testing/stubbing */ export declare class StubAgentTools implements AgentTools { private files; private commandHistory; read_file(path: string): Promise; write_file(path: string, content: string): Promise; run_command(cmd: string, args: string[]): Promise<{ stdout: string; stderr: string; exitCode: number; }>; /** * Get all files in the stub */ getFiles(): Map; /** * Get command history */ getCommandHistory(): Array<{ cmd: string; args: string[]; }>; /** * Set a file in the stub */ setFile(path: string, content: string): void; /** * Clear all files and history */ clear(): void; } //# sourceMappingURL=agent-integration.d.ts.map