import type { PhaseBudgetEnvelope, WorkflowPhase } from '../types/index.js';
export type BudgetCheckResult = {
    allowed: boolean;
    exceeded: string[];
    envelope: PhaseBudgetEnvelope;
};
export type PhaseBudgetUsage = {
    tokens?: number;
    costCents?: number;
    retries?: number;
    elapsedMinutes?: number;
};
export type BudgetUtilizationReport = {
    phase: WorkflowPhase;
    envelope: PhaseBudgetEnvelope;
    usage: PhaseBudgetUsage;
    utilizationPct: {
        tokens?: number;
        cost?: number;
        retries?: number;
        time?: number;
    };
    exceeded: boolean;
    exceededReasons: string[];
};
export type BudgetExceededEvent = {
    taskId: string;
    runId: string;
    phase: WorkflowPhase;
    envelope: PhaseBudgetEnvelope;
    usage: PhaseBudgetUsage;
    reasons: string[];
    timestamp: string;
};
export declare class BudgetAccumulator {
    private totalTokens;
    private totalCostCents;
    private retryCount;
    private startTime;
    private readonly phase;
    private readonly envelope;
    constructor(phase: WorkflowPhase, envelope: PhaseBudgetEnvelope);
    accumulate(tokens: number, cost: number, retryCount: number): void;
    isExceeded(): {
        exceeded: boolean;
        reasons: string[];
    };
    toReport(): BudgetUtilizationReport;
    resetTimer(): void;
    private currentUsage;
    private elapsedMinutes;
}
export declare function resolveBudgetEnvelope(envelopes: PhaseBudgetEnvelope[] | undefined, phase: WorkflowPhase): PhaseBudgetEnvelope | null;
export declare function checkBudget(envelope: PhaseBudgetEnvelope | null, usage: PhaseBudgetUsage): BudgetCheckResult;
