/** * Bounded model escalation. * * Escalation is a separate, bounded decision from a strategy pivot. It moves * the same task to a stronger/compatible model for reasons such as a required * capability, repeated schema failure, independent review, or a high-risk * release gate. Escalation REQUIRES structured evidence and policy permission. * A model can recommend escalation but can never authorize it. */ import type { EscalationRequest, StallState } from "./types.js"; export type EscalationReasonCode = "capability_mismatch" | "repeated_schema_failure" | "independent_review_required" | "high_risk_release_gate" | "complex_cross_repository_failure" | "stall_after_distinct_strategies"; /** Reasons that are forbidden for escalation. */ export declare const FORBIDDEN_ESCALATION_REASONS: ReadonlyArray; export interface EscalationBudget { maxModelEscalations: number; } export interface EscalationContext { usedEscalations: number; maxModelEscalations: number; policyAllows: boolean; remainingBudget: number; stall?: StallState; failureEvidenceCount: number; distinctStrategiesAttempted: number; forcedReasons?: string[]; } export interface EscalationDecision { allowed: boolean; reasonCodes: string[]; blockedCodes: string[]; toProvider?: string; toModel?: string; } /** * Evaluate an escalation request against policy and evidence. An escalation is * allowed only if: escalation budget remains, policy permits, allowed reasons * are present, and the aliasing of two equivalent models is not requested. */ export declare function evaluateEscalation(request: EscalationRequest, ctx: EscalationContext): EscalationDecision; //# sourceMappingURL=escalation.d.ts.map