import type { BudgetResult, BudgetExceeded, BudgetOk } from '../../types/timing.js';
export type { BudgetResult, BudgetExceeded, BudgetOk };
/**
 * Run `fn` within a time budget of `budgetMs` milliseconds.
 *
 * - If `fn` resolves in time → returns {exceeded: false, value, elapsedMs}
 * - If the budget fires first → returns {exceeded: true, step, budgetMs, elapsedMs, warning}
 *   and the underlying promise is left to settle on its own (fire-and-forget).
 *
 * Never throws — all errors from `fn` are caught and treated as budget exceeded.
 */
export declare function withBudget<T>(step: string, budgetMs: number, fn: () => Promise<T>): Promise<BudgetResult<T>>;
/**
 * Extract the value from a BudgetResult, or return `fallback` when exceeded.
 * Optionally collect warnings into a mutable array.
 */
export declare function unwrapBudget<T>(result: BudgetResult<T>, fallback: T, warnings?: string[]): T;
/**
 * Total budget enforcer — wraps an entire operation in a hard ceiling.
 * Returns {timedOut: true, warning} if the ceiling fires, or {timedOut: false, value} otherwise.
 */
export declare function withTotalBudget<T>(operationName: string, ceilingMs: number, fn: () => Promise<T>): Promise<{
    timedOut: false;
    value: T;
} | {
    timedOut: true;
    warning: string;
}>;
//# sourceMappingURL=budget.d.ts.map