/**
 * Product Budget — token/time budget enforcement for Product Mode.
 *
 * Tracks cumulative token usage and elapsed time across all agent instances.
 * Emits 80% warning and enforces 100% hard limit.
 */
import type { ProductBudget } from "../protocol/wire/acp-agent-management.js";
import type { AcpUsageTracker } from "../runtime/infra/acp-usage-tracker.js";
/** Budget state and enforcement result. */
export type BudgetAction = "ok" | "warning" | "exceeded";
export interface BudgetCheck {
    action: BudgetAction;
    percentage: number;
    usedTokens: number;
    maxTotalTokens?: number;
    elapsed: number;
    maxDuration?: number;
}
export declare class ProductBudgetTracker {
    private maxTotalTokens?;
    private maxDuration?;
    private usedTokens;
    private startedAt;
    private warningEmitted;
    constructor(budget?: {
        maxTotalTokens?: number;
        maxDuration?: number;
    });
    /** Add tokens from a usage tracker snapshot. */
    addUsage(inputTokens: number, outputTokens: number): void;
    /** Add tokens from an ACP usage tracker. */
    addFromTracker(tracker: AcpUsageTracker): void;
    /** Get current elapsed time in ms. */
    getElapsed(): number;
    /** Get the budget snapshot. */
    getBudget(): ProductBudget;
    /**
     * Check budget status. Returns:
     * - "ok": within budget
     * - "warning": 80%+ but not exceeded
     * - "exceeded": over 100%, should pause
     */
    check(): BudgetCheck;
    /** Restore from persisted budget data. */
    restore(data: {
        usedTokens: number;
        startedAt: number;
        warningEmitted: boolean;
    }): void;
    /** Serialize for persistence. */
    serialize(): {
        usedTokens: number;
        startedAt: number;
        warningEmitted: boolean;
    };
}
