/** * Credit-exhaustion notifier — writes a marker file so the ADR-303 recovery * surface fires on the next appropriate command render, and keeps a short * user-visible notification in `~/.ruflo/credit-status.json`. * * This is NOT the ADR-303 credit-error classifier — that lives in * `credit-errors.ts` and reads provider error codes to decide when a * credit surface fires *during* a command. This module is the OUT-OF-BAND * signal path: the analytics transport detected a credit-exhausted * response (HTTP 402 or ADR-303 machine-readable code), and we need to * warn the user asynchronously. * * State is cheap and durable: * ~/.ruflo/credit-status.json = { exhausted: bool, since: ISO, cleared: ISO|null } * * Cleared automatically when the user opens the enrollment / signup * surface, or explicitly via `ruflo funnel credit-clear`. */ export declare const CREDIT_STATUS_FILE = "credit-status.json"; export interface CreditStatus { exhausted: boolean; since: string | null; cleared: string | null; } /** Read the current credit status. Never throws. */ export declare function readCreditStatus(): CreditStatus; /** * Mark credit as exhausted — idempotent. Sets `since` on the first mark, * leaves it alone on subsequent marks so the user sees a stable "since" * timestamp until they clear it. */ export declare function markCreditExhausted(now?: Date): void; /** * Clear credit-exhaustion status. Called when the user completes signup or * runs `ruflo funnel credit-clear`. `cleared` is stamped so the previous * `since` remains inspectable for one recovery cycle. */ export declare function clearCreditStatus(now?: Date): void; /** * User-facing single-line summary — plain text, no ANSI. Callers style it * themselves. Returns null when credit isn't exhausted (no surface). */ export declare function creditExhaustedNotice(now?: Date): string | null; //# sourceMappingURL=credit-notifier.d.ts.map