/**
 * In-memory per-endpoint health/latency cache.
 *
 * The Model Connection Layer probes endpoints when users add or test them in
 * Admin, and later wants to display "this endpoint was healthy 30 seconds ago,
 * latency 120ms" without re-probing on every render. This cache stores the
 * most recent sample per endpoint URL and expires entries after a TTL.
 *
 * Scope is intentionally narrow: single process, no persistence, no aggregation
 * across history. Persistence and trend metrics belong to a separate observer.
 */
export interface EndpointHealthSample {
    endpoint: string;
    ok: boolean;
    latencyMs: number;
    status?: number;
    detail: string;
    credentialSource?: 'env' | 'config' | 'unset';
    observedAt: number;
}
export interface EndpointHealthCacheOptions {
    ttlMs?: number;
}
export declare class EndpointHealthCache {
    private readonly samples;
    private readonly ttlMs;
    constructor(options?: EndpointHealthCacheOptions);
    record(sample: EndpointHealthSample): void;
    get(endpoint: string, now?: number): EndpointHealthSample | undefined;
    list(now?: number): EndpointHealthSample[];
    size(now?: number): number;
    clear(): void;
}
/**
 * Build a cache sample from a ProviderProbeResult-shaped object. Probe callers
 * use this to push results into the cache without coupling to the cache type.
 */
export declare function sampleFromProbeResult(endpoint: string, result: {
    ok: boolean;
    latencyMs: number;
    status?: number;
    detail: string;
    credentialSource?: 'env' | 'config' | 'unset';
}, now?: number): EndpointHealthSample;
