import type { AdaptiveRuntimeCaller, AdaptiveRuntimeGate } from "./adaptiveCapabilitySelector.js";
export type AdaptiveProviderKind = "openai" | "anthropic" | "deepmind" | "customFormat" | (string & {});
export type AdaptiveProviderFallbackBoundary = "input" | "contract" | "governance" | "runtime-state" | "provider" | "scope";
export type AdaptiveProviderFallbackErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_PROVIDERS" | "MISSING_PROVIDER_ID" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "NO_FALLBACK_PROVIDER";
export type AdaptiveProviderFallbackError = {
    code: AdaptiveProviderFallbackErrorCode;
    message: string;
    boundary: AdaptiveProviderFallbackBoundary;
    publicSafe: true;
};
export type AdaptiveProviderHealthInput = {
    providerId?: string;
    provider?: AdaptiveProviderKind;
    ready?: boolean;
    healthScore?: number;
    priority?: number;
    latencyMs?: number;
    capabilities?: readonly string[];
    scopes?: readonly string[];
    metadata?: Readonly<Record<string, unknown>>;
};
export type AdaptiveProviderFallbackRequest = {
    runtimeId?: string;
    caller?: AdaptiveRuntimeCaller;
    providers?: readonly AdaptiveProviderHealthInput[];
    currentProviderId?: string;
    requiredCapabilities?: readonly string[];
    allowedScopes?: readonly string[];
    runtimeReady?: boolean;
    contract?: AdaptiveRuntimeGate;
    governance?: AdaptiveRuntimeGate;
};
export type AdaptiveProviderCandidate = {
    providerId: string;
    provider?: AdaptiveProviderKind;
    ready: true;
    healthScore: number;
    priority: number;
    latencyMs?: number;
    capabilities: readonly string[];
    scopes: readonly string[];
    metadata: Readonly<Record<string, unknown>>;
    rankScore: number;
};
export type AdaptiveProviderFallbackPlan = {
    planId: string;
    runtimeId: string;
    caller: AdaptiveRuntimeCaller;
    route: "runtime.adaptiveRuntime.adaptiveProviderFallback";
    currentProviderId?: string;
    selectedProvider: AdaptiveProviderCandidate;
    fallbackChain: readonly AdaptiveProviderCandidate[];
    rejectedProviderIds: readonly string[];
    requiredCapabilities: readonly string[];
    contractChecked: true;
    governanceChecked: true;
    dryRun: true;
    unsafeSideEffects: false;
};
export type AdaptiveProviderFallbackResult = {
    ok: true;
    plan: AdaptiveProviderFallbackPlan;
    events: readonly string[];
} | {
    ok: false;
    error: AdaptiveProviderFallbackError;
    events: readonly string[];
};
export declare function planAdaptiveProviderFallback(request?: AdaptiveProviderFallbackRequest): AdaptiveProviderFallbackResult;
