/**
 * Session Recovery Event Handler
 *
 * Integrates with the OpenCode event system to automatically recover from session errors.
 *
 * Supported error types:
 * - tool_result_missing: Tool crashed, inject error message
 * - thinking_block_order: Thinking block ordering issue
 * - rate_limit: API rate limiting
 * - context_overflow: Token limit exceeded
 */
import type { PluginInput } from "@opencode-ai/plugin";
type OpencodeClient = PluginInput["client"];
/**
 * Handle session error event and attempt recovery
 */
export declare function handleSessionError(client: OpencodeClient, sessionID: string, error: unknown, properties?: Record<string, unknown>): Promise<boolean>;
/**
 * Mark that recovery is complete for a session
 */
export declare function markRecoveryComplete(sessionID: string): void;
/**
 * Clean up session recovery state
 */
export declare function cleanupSessionRecovery(sessionID: string): void;
/**
 * Check if session is currently recovering
 */
export declare function isSessionRecovering(sessionID: string): boolean;
export {};
