/** Roles that participate in escalation policy. */
export type EscalateRole = 'reviewer' | 'validator' | 'releaser';
/** Decisions available when budget is exhausted. */
export type EscalateDecision = 'retry' | 'abort' | 'manual-override';
/** Options for withEscalation wrapper. */
export interface WithEscalationOptions {
    /** Which role is being escalated. Determines retry budget. */
    role: EscalateRole;
    /** Spec identifier for retry counter keying. */
    specId: string;
    /** Frontmatter SHA for retry counter keying (counter resets on spec version bump). */
    frontmatterSha: string;
    /** Project identifier for persistence. */
    projectId: string;
    /** SPEC-722: Reviewer token forwarded across retries without re-issuing. */
    reviewerToken?: string;
    /** Optional hint about why the flow failed (surfaced in AskUserQuestion). */
    reasonHint?: string;
}
/** Return type for withEscalation when the wrapped function succeeds. */
export interface EscalateSuccess<T> {
    ok: true;
    result: T;
    /** Number of attempts taken (1 = first attempt succeeded). */
    attempts: number;
}
/** Return type for withEscalation when budget is exhausted and escalated. */
export interface EscalateFailure {
    ok: false;
    escalated: true;
    /** The decision to surface to the caller for forwarding as interactiveQuestions. */
    decision: EscalateDecision;
    /** Reason from the last failed attempt. */
    lastReason: string;
}
/** Union return type for withEscalation. */
export type EscalateResult<T> = EscalateSuccess<T> | EscalateFailure;
/** Result type for the wrapped function passed to withEscalation. */
export type FlowResult<T> = {
    ok: true;
    result: T;
} | {
    ok: false;
    reason: string;
};
//# sourceMappingURL=escalator.d.ts.map