/** * Typed fallback and degradation. * * Fallback triggers are typed: no fuzzy substitution, no surprise paid * provider, local-only preserved, safety class preserved, fallback reason and * cost implications visible, loops bounded, and no silent quality downgrade. * * Fallback hierarchy: * explicit operator fallback → validated policy fallback → * deterministic baseline → safe degraded mode → typed blocked state. */ import type { OrchestrationCandidate, OrchestrationFeatureVector } from "./types.js"; export type FallbackTrigger = "provider_unavailable" | "model_unavailable" | "rate_limited" | "context_limit" | "structured_output_invalid" | "tool_capability_unavailable" | "subagent_unavailable" | "evaluation_store_unavailable" | "routing_policy_corrupt"; export interface FallbackResult { trigger: FallbackTrigger; selectedCandidate?: OrchestrationCandidate; fallbackLayer: "operator" | "validated_policy" | "deterministic_baseline" | "degraded" | "blocked"; reason: string; costImplication: string; blocked: boolean; } /** * Resolve a fallback for a trigger. * - explicitFallback: operator-provided candidate (highest authority). * - policyFallback: candidate from the validated policy. * - Otherwise, fall to the deterministic baseline then to a typed degraded mode. */ export declare function resolveFallback(trigger: FallbackTrigger, features: OrchestrationFeatureVector, options: { explicitFallback?: OrchestrationCandidate; policyFallback?: OrchestrationCandidate; localOnly: boolean; safetyClass: string; }): FallbackResult; export declare function isRemoteProvider(provider: string): boolean; export declare const FALLBACK_CHAIN_LIMIT = 5; //# sourceMappingURL=fallback.d.ts.map