import { Message } from '../config/index'; import { ProjectContext } from '../utils/project'; export declare class ApiError extends Error { readonly status: number; constructor(message: string, status: number); } export declare class TimeoutError extends Error { constructor(message: string); } export declare function setProjectContext(ctx: ProjectContext | null): void; export declare function chat(message: string, history?: Message[], onChunk?: (chunk: string) => void, onRetry?: (attempt: number) => void, projectContext?: ProjectContext | null, abortSignal?: AbortSignal): Promise; export declare function validateApiKey(apiKey: string, providerId?: string): Promise<{ valid: boolean; error?: string; }>;