/**
 * Provider snapshot cache.
 *
 * Computing a provider's availability + auth status is expensive: it spawns the
 * provider CLI (and, for ACP providers, runs a full agent handshake). Doing that
 * inline on every `GET /api/providers` froze the initial page load while ~7
 * providers were probed.
 *
 * This cache computes the snapshot once, serves it immediately, and refreshes in
 * the background (stale-while-revalidate). Warm it at startup so the first page
 * load never pays the probe cost.
 */
import type { ProviderRegistry } from "./registry.js";
import type { ProviderAuthInfo, RuntimeMode } from "./contracts.js";
export interface ProviderSnapshot {
    id: string;
    providerType?: string;
    name: string;
    description: string;
    available: boolean;
    unavailableReason?: string;
    modes: RuntimeMode[];
    auth?: ProviderAuthInfo;
}
export declare class ProviderSnapshotCache {
    private readonly registry;
    private snapshot;
    private computedAt;
    private inflight;
    constructor(registry: ProviderRegistry);
    /**
     * Return the current snapshot. Serves cached data immediately when available;
     * refreshes in the background when stale. Only blocks on a cold cache (or when
     * `force` is set, e.g. an explicit user-triggered refresh).
     */
    get(force?: boolean): Promise<ProviderSnapshot[]>;
    invalidate(): void;
    /** Kick a background refresh without awaiting it (used to warm at startup). */
    warm(): void;
    private refresh;
    private compute;
}
//# sourceMappingURL=provider-snapshot.d.ts.map