import { type LanguageModel } from 'ai'; import type { Session, SessionMetadata } from '../types/session.js'; import type { RunState } from '../runtime/durable/types.js'; import type { EscalationConfig, EscalationOutcome, EscalationReason, EscalationRequest } from './types.js'; /** One-shot latch: set when the handler fired at flow-escalate pause time, so * the post-resume terminal handoff does not notify a second time. */ export declare const ESCALATION_NOTIFIED_KEY = "__escalationNotified"; export declare function ensureSessionMetadata(session: Session): SessionMetadata; export interface BuildEscalationRequestOptions { session: Session; runState: RunState; reason: string; category?: EscalationReason; config: EscalationConfig; /** Resolved summary model (config.model → controlModel → model → defaultModel). */ model?: LanguageModel; abortSignal?: AbortSignal; } export declare function buildEscalationRequest(options: BuildEscalationRequestOptions): Promise; export declare function recordEscalationOutcome(session: Session, category: EscalationReason, outcome: EscalationOutcome): void;