export type ProviderApiStatus = { provider: string; /** Whether the API surface is usable (operational or merely degraded). */ available: boolean; /** The raw component status or page indicator we read. */ indicator: string; /** The status-page component matched, or null when we fell back to the page. */ componentName: string | null; reason: string; statusPageUrl: string | null; checkedAt: number; }; /** * Fetch the current API availability for a provider from its public status * page. Best-effort: any failure (no status page, network/CORS, parse error) * resolves to "available: true, unknown" so a flaky status page never blocks a * provider that might actually be fine. */ export declare const fetchProviderApiStatus: (provider: string, signal?: AbortSignal) => Promise; export type ProviderStatusMonitorOptions = { /** Providers to watch. Default: anthropic + openai. */ providers?: string[]; /** Poll interval. Default 60s (status pages are CDN-cached ~30s). */ intervalMs?: number; /** Called with each provider's status after every poll. */ onUpdate?: (status: ProviderApiStatus) => void; }; /** * Start a server-side poll loop that feeds provider availability into the * circuit breaker (via setProviderAvailability). Returns a stop function. * Run ONE per process; clients should read the resulting getProviderHealth() * via your own endpoint rather than polling status pages themselves. */ export declare const startProviderStatusMonitor: (options?: ProviderStatusMonitorOptions) => () => void;