/**
 * Pure JSON serialiser for `olam auth list --json` (local vault path).
 *
 * Kept separate from the command action so the wire contract is
 * unit-testable without an AuthClient round-trip (mirrors `renderPsJson`
 * in ps.ts and `renderWorldList` in list.ts).
 *
 * WHY this exists: credential-vault health is exactly the precondition an
 * agent/script driver must check before dispatching Claude work — the
 * "all credentials cooled down" failure mode is a documented operational
 * concern (see `npm run audit:credentials`). The human table is colorized
 * and reflows per terminal width, so screen-scraping it is brittle. This
 * gives drivers a stable, color-free shape: a top-level `healthy` flag
 * (is any credential pickable right now?), the next cooldown reset, and a
 * per-account row carrying the fields needed to reason about rotation.
 *
 * Token security: this serialiser only ever touches the safe summary
 * fields. accessToken / refreshToken are never present on
 * AuthAccountSummary and are never emitted.
 */
import type { AuthAccountSummary } from '@olam/core/src/auth/types.js';
/** Per-account row in the `auth list --json` payload. */
export interface AuthListAccountJson {
    readonly id: string;
    readonly label: string;
    readonly state: string;
    readonly tokenValid: boolean;
    readonly expiresIn: string;
    readonly rateLimited: boolean;
    readonly rateLimitResetsAt: string | null;
    readonly weeklyResetsAt: string | null;
    readonly requestCount5h: number;
    readonly last429At: string | null;
}
/** Top-level shape emitted by `olam auth list --json`. */
export interface AuthListJson {
    readonly count: number;
    /** True when at least one credential is in the `active` state. */
    readonly healthy: boolean;
    /**
     * ISO timestamp of the soonest cooldown/rate-limit reset across the
     * vault, or null when nothing is scheduled. Lets a driver know when to
     * retry without polling.
     */
    readonly nextResetAt: string | null;
    readonly accounts: readonly AuthListAccountJson[];
}
/**
 * Serialise the local auth-service account summaries to the stable
 * `--json` wire shape. `now` is injectable for deterministic tests.
 */
export declare function renderAuthListJson(accounts: readonly AuthAccountSummary[], now?: number): string;
//# sourceMappingURL=auth-list-json.d.ts.map