export type AgentRunErrorKind = 'provider_setup_required' | 'provider_auth_invalid' | 'rate_limit' | 'timeout' | 'billing' | 'unknown';
export type AgentRunErrorPayload = {
    kind: AgentRunErrorKind;
    code: string;
    provider?: string;
    modelRef?: string;
    deepLink?: string;
    message: string;
};
/**
 * Map a raw agent/LLM error into a structured JSON payload the web UI can render
 * as an actionable, i18n-friendly card. Falls back to plain `Error: <raw>` when
 * the input is already a legacy gateway string.
 */
export declare function formatAgentRunErrorForClient(rawError: string, context?: {
    provider?: string;
    modelRef?: string;
}): string;
/** Human-readable text for TUI/CLI when SSE carries structured JSON. */
export declare function formatAgentRunErrorForDisplay(content: string): string;
