/** * Controlled runtime escalation and de-escalation. * * Escalation moves to a stronger (more capable / more budgeted) candidate. * De-escalation moves to a cheaper/faster candidate. Both are governed by an * explicit transition policy, bounded by maximum transitions, and never exceed * the operator budget. Configured and resolved model stay distinct; no hidden * model substitution occurs. */ import type { OrchestrationCandidate } from "./types.js"; export interface EscalationSignal { reasonCode: string; /** 0..1 severity / confidence that escalation is warranted. */ strength: number; } export interface EscalationPolicy { /** Maximum escalating transitions per run (hard bound). */ maxEscalations: number; /** Maximum de-escalating transitions per run. */ maxDeescalations: number; /** Model escalation cannot exceed this provider/model capability tier. */ maxModelTier: number; } export declare const DEFAULT_ESCALATION_POLICY: EscalationPolicy; export interface TransitionResult { kind: "escalate" | "deescalate" | "stay"; nextCandidate?: OrchestrationCandidate; reasonCode: string; remainingEscalations: number; remainingDeescalations: number; durEvent: { type: "ORCHESTRATION_ESCALATION_APPLIED" | "ORCHESTRATION_DEESCALATION_APPLIED"; reasonCode: string; }; } /** Decide whether to escalate, de-escalate, or stay, given signals and bounds. */ export declare function decideTransition(signals: EscalationSignal[], currentCandidate: OrchestrationCandidate, candidatesByModelTier: Map, tierOf: (candidateId: string) => number, policy: EscalationPolicy | undefined, runtime: { escalationsUsed: number; deescalationsUsed: number; budgetRemainingReserve: boolean; }): TransitionResult; //# sourceMappingURL=escalation.d.ts.map