/**
 * src/compute/with-compute.ts
 *
 * Public `withCompute()` API — caller-explicit strategy entry point.
 *
 * Contract (Sprint A):
 * - Strategy is REQUIRED and explicit (no auto-routing).
 * - Returns `StrategyResult<O>` whose `metadata.strategy` equals the strategy's `name`.
 * - Pre-flight guards run BEFORE invoking the generator:
 *     1. `strategy` must be a non-null object with a usable `run` function.
 *     2. `budget.maxCalls === 0` → throw `BudgetExhaustedError`.
 *     3. `deadline` already past → throw `DeadlineExceededError`.
 *     4. `signal` already aborted → throw the signal's `reason` (DOMException 'AbortError' by default).
 * - Generator rejections bubble up unchanged.
 */
import type { ComputeContext, Strategy, StrategyResult } from "./types.js";
export declare class InvalidStrategyError extends Error {
    readonly name = "InvalidStrategyError";
    constructor(message?: string);
}
export declare class BudgetExhaustedError extends Error {
    readonly name = "BudgetExhaustedError";
    constructor(message?: string);
}
export declare class DeadlineExceededError extends Error {
    readonly name = "DeadlineExceededError";
    constructor(message?: string);
}
export interface ComputeBudget {
    /** Maximum number of generator calls allowed. `0` halts immediately. */
    maxCalls?: number;
}
export interface WithComputeOptions<TInput, TOutput> {
    /** Caller-explicit strategy. No auto-routing. */
    strategy: Strategy<TInput, TOutput>;
    /** Generator invoked by the strategy. */
    generator: (input: TInput, ctx: ComputeContext) => Promise<TOutput>;
    /** Optional cost cap. */
    budget?: ComputeBudget;
    /** Epoch milliseconds. If `Date.now() >= deadline` at entry, throws. */
    deadline?: number;
    /** Optional cancellation signal — wired into ComputeContext. */
    signal?: AbortSignal;
}
export type WithComputeResult<TOutput> = StrategyResult<TOutput>;
/**
 * Run a compute task under an explicit strategy with pre-flight budget/deadline/abort guards.
 */
export declare function withCompute<TInput, TOutput>(input: TInput, options: WithComputeOptions<TInput, TOutput>): Promise<WithComputeResult<TOutput>>;
//# sourceMappingURL=with-compute.d.ts.map