/**
 * OODA resource limits runtime — sprint-525:quick-2.
 *
 * `ResourceLimitsRunner` is the runtime helper enforcing the
 * `ResourceLimits` interface declared in `./types.ts` (quick-1).
 * Hard caps on phase wall-clock, step count per cycle, and process heap
 * usage. Defaults are conservative; agents with heavier workloads MUST
 * raise them explicitly via the constructor — there is no implicit
 * "unlimited" mode.
 *
 * Usage:
 *   const runner = new ResourceLimitsRunner({ phaseTimeoutMs: 90_000 });
 *   const ac = runner.createPhaseAbortController();
 *   await runPhase(observePayload, { signal: ac.signal });
 *   runner.enforceStepCount(steps.length);
 *   runner.checkHeap();
 *
 * @public
 */
export interface ResourceLimitsOpts {
    /** Hard wall-clock limit per OODA phase. Default: 60_000 ms. */
    phaseTimeoutMs: number;
    /** Max steps allowed per OODA cycle. Default: 200. */
    maxStepsPerCycle: number;
    /** Soft heap warning threshold (MiB). Default: 256. */
    maxHeapMb: number;
    /** Optional warn sink for heap excess (defaults to console.warn). */
    onHeapExceeded?: (info: {
        rssMb: number;
        heapMb: number;
        max: number;
    }) => void;
}
export declare class StepCountExceededError extends Error {
    readonly code = "OODA_STEP_COUNT_EXCEEDED";
    constructor(currentCount: number, max: number);
}
export declare class ResourceLimitsRunner {
    readonly phaseTimeoutMs: number;
    readonly maxStepsPerCycle: number;
    readonly maxHeapMb: number;
    private readonly onHeapExceeded?;
    constructor(opts?: Partial<ResourceLimitsOpts>);
    /**
     * Build an AbortController whose signal trips after `phaseTimeoutMs`.
     * The host is responsible for forwarding the signal to async work
     * (fetch, MCP calls, child Promise.race, …) so the abort actually
     * propagates.
     */
    createPhaseAbortController(): AbortController;
    /**
     * Throw if `currentCount` exceeds `maxStepsPerCycle`. Caller increments
     * the counter as steps are committed and calls this before the next
     * step starts.
     */
    enforceStepCount(currentCount: number): void;
    /**
     * Sample the process heap and warn if it exceeds `maxHeapMb`. Pure
     * observability — never throws (a hard kill is the OS' job).
     */
    checkHeap(): void;
}
//# sourceMappingURL=resource-limits.d.ts.map