/** * Credit-error taxonomy and fail-closed classifier — ADR-303. * * Adapters map machine-readable provider codes into the canonical * CreditErrorCode enum. Message text is NEVER parsed. Anything unmapped * stays unclassified (confidence 0) and falls through to the ordinary * error path. Only COGNITUM_CREDIT_EXHAUSTED — asserted by the Cognitum * ledger, the single credit authority — may trigger the funnel surface. */ import { type NormalizedCreditError } from './types.js'; export interface ProviderErrorLike { /** Machine-readable provider error code (e.g. `error.type` / `error.code`). */ providerCode?: string; /** HTTP status, when the transport exposes one. */ status?: number; } export declare function classifyCreditError(err: ProviderErrorLike): NormalizedCreditError; export interface CreditPromptSession { creditPromptShown: boolean; } /** * The ADR-303 gate, fail-closed and frequency-capped: fires only for a * confident, non-retryable Cognitum-ledger exhaustion, at most once per * session. Everything else falls through to the ordinary error path. */ export declare function shouldShowCreditRecovery(error: NormalizedCreditError, session: CreditPromptSession): boolean; /** Full contextual screen (interactive TTY, first occurrence). */ export declare function renderCreditRecovery(authenticated: boolean): string; /** Single-line hint (non-TTY, CI, or repeat occurrences in a session). */ export declare const CREDIT_RECOVERY_HINT = "Hint: ruflo auth login enables the free local Meta LLM proxy"; //# sourceMappingURL=credit-errors.d.ts.map