export type RunErrorClass = "insufficient_credits" | "service_unavailable" | "rate_limited" | "provider_auth" | "context_overflow" | "timeout" | "internal"; export type ClassifiedRunError = { errorClass: RunErrorClass; /** Short, user-facing sentence the web/app can show verbatim. */ userMessage: string; /** The raw error text, for logs and diagnostics. */ detail: string; }; /** * Classify an arbitrary run failure into a web-facing class + message. Reuses * the failover taxonomy ({@link describeFailoverError}) and the billing/quota * detector so a provider 402 / "credit balance too low" always reads as * `insufficient_credits`. */ export declare function classifyRunError(err: unknown): ClassifiedRunError; /** The user-facing sentence for a class, without needing an Error object. */ export declare function runErrorMessageFor(errorClass: RunErrorClass): string;