/** * A read-only snapshot of accumulated spend. Returned by * {@link CostAccumulator.snapshot} so a report can render the total without * holding a mutable reference to the accumulator. */ export interface CostSnapshot { /** Total cost in US dollars summed across every recorded call. */ totalUsd: number; /** Number of provider calls recorded (including zero-cost cache hits). */ calls: number; } /** * Accumulates the per-call `costUsd` of provider results into a single per-run * total. Cache hits (cost `0`) are still counted as calls so the call count * reflects how many generations the pipeline requested, not how many hit the * network. */ export declare class CostAccumulator { #private; /** * Record one provider call's cost. Negative costs are rejected (no provider * reports a negative charge; a negative value signals a bug upstream and * must not silently understate the run total). Resolves nothing; mutates the * running total in place. */ add(costUsd: number): void; /** Total accumulated cost in US dollars across all recorded calls. */ get totalUsd(): number; /** Number of provider calls recorded so far. */ get calls(): number; /** A plain read-only snapshot suitable for handing to a reporter. */ snapshot(): CostSnapshot; /** Reset the accumulator to its initial empty state (for reuse across runs). */ reset(): void; }