import type { WithEscalationOptions, EscalateResult, FlowResult } from '../../types/escalator.js';
/**
 * Wraps a retryable flow with bounded retry logic.
 *
 * Behaviour:
 * - Calls `fn` in a loop.
 * - On `ok: true`, returns the result with attempt count.
 * - On `ok: false`, increments the retry counter.
 * - When `nextDecision(role, attempts) === 'escalate'`, returns an escalation sentinel.
 * - The wrapper does NOT pause for user input — it returns a sentinel that the caller
 *   is responsible for forwarding as `interactiveQuestions`.
 *
 * The `reviewerToken` in `opts` is preserved across retries (SPEC-722).
 *
 * @param opts - Escalation options (role, specId, frontmatterSha, projectId, reviewerToken).
 * @param fn   - The async function to retry. Must return `{ ok, result }` or `{ ok, reason }`.
 */
export declare function withEscalation<T>(opts: WithEscalationOptions, fn: (attempt: number, reviewerToken?: string) => Promise<FlowResult<T>>): Promise<EscalateResult<T>>;
//# sourceMappingURL=with-escalation.d.ts.map