/** * Base interface for AI CLI tool adapters */ export interface SendOptions { /** Working directory for the tool */ cwd?: string; /** Whether to continue the previous session (default: true) */ continueSession?: boolean; /** Timeout in milliseconds */ timeout?: number; /** Keep stdin open after command (for interactive sessions) */ keepStdinOpen?: boolean; } export interface ToolAdapter { /** Unique name identifier for the tool */ readonly name: string; /** Display name for the tool */ readonly displayName: string; /** ANSI color code for the tool (e.g., '\x1b[96m' for bright cyan) */ readonly color: string; /** Regex pattern to detect when tool is showing its input prompt (ready for input) */ readonly promptPattern: RegExp; /** Fallback timeout in ms - if no output for this long, assume response complete */ readonly idleTimeout: number; /** Time in ms to wait for tool to start before sending commands (first launch) */ readonly startupDelay: number; /** Check if the tool is installed and available */ isAvailable(): Promise; /** Send a prompt to the tool and get a response */ send(prompt: string, options?: SendOptions): Promise; /** Reset conversation context */ resetContext(): void; /** Get the command that would be executed (for debugging) */ getCommand(prompt: string, options?: SendOptions): string[]; /** Get the command to start an interactive session */ getInteractiveCommand(options?: SendOptions): string[]; /** Get arguments for starting a persistent PTY session */ getPersistentArgs(): string[]; /** Clean response output - remove UI noise like spinners, prompts, status lines */ cleanResponse(rawOutput: string): string; /** Check if there's an active session with this tool */ hasSession(): boolean; /** Set whether there's an active session (for persistence) */ setHasSession(value: boolean): void; /** Mark that an interactive session has been started (optional, for PTY respawns) */ markInteractiveSessionStarted?(): void; } /** * Registry of available tool adapters */ export declare class AdapterRegistry { private adapters; register(adapter: ToolAdapter): void; get(name: string): ToolAdapter | undefined; getAll(): ToolAdapter[]; getNames(): string[]; getAvailable(): Promise; } //# sourceMappingURL=base.d.ts.map