/** * CLI Runner * * Executes prompts via Claude Code CLI subprocess. * Based on OpenClaw's cli-runner.js implementation. * * Features: * - Calls `claude -p --output-format json` * - Supports session continuity via --session-id * - Parses JSON output for response and usage * - Handles timeouts and errors * * @example * ```typescript * const runner = new CliRunner(); * const result = await runner.run('Hello!', { model: 'sonnet' }); * console.log(result.text); * ``` */ import type { Runner, RunnerOptions, RunnerResult, CliBackendConfig } from './types.js'; /** * CLI Runner implementation */ export declare class CliRunner implements Runner { readonly type: "cli"; private config; constructor(config?: Partial); /** * Run a prompt via CLI */ run(prompt: string, options?: RunnerOptions): Promise; /** * Build CLI arguments */ private buildArgs; /** * Resolve model alias to actual model name */ private resolveModelAlias; /** * Execute CLI command with timeout * * Uses execSync for reliable execution with Claude CLI */ private executeCommand; /** * Parse CLI JSON output */ private parseOutput; /** * Check if CLI is available */ static isAvailable(command?: string): Promise; /** * Get CLI version */ static getVersion(command?: string): Promise; } //# sourceMappingURL=cli-runner.d.ts.map