/** * Built-in Plugin: Cost Tracker * * Track and limit costs per test and per suite. * Accumulates token usage from traces and enforces budget limits. */ import type { AgentProbePlugin } from '../plugins'; import type { TestResult } from '../types'; export interface CostTrackerConfig { /** Maximum cost per individual test in USD */ maxCostPerTest?: number; /** Maximum cost per suite in USD */ maxCostPerSuite?: number; /** Whether to warn (log) or throw on budget exceeded */ mode?: 'warn' | 'enforce'; /** Callback when cost exceeds limit */ onBudgetExceeded?: (test: string, cost: number, limit: number) => void; } export interface CostRecord { testName: string; cost: number; inputTokens: number; outputTokens: number; model: string; } export declare class CostTracker { private records; private suiteCost; readonly config: CostTrackerConfig; constructor(config?: CostTrackerConfig); recordTest(result: TestResult): CostRecord | null; checkSuiteBudget(): boolean; getRecords(): CostRecord[]; getTotalCost(): number; reset(): void; formatReport(): string; } /** * Create the cost-tracker plugin instance. */ export declare function createCostTrackerPlugin(config?: CostTrackerConfig): AgentProbePlugin & { tracker: CostTracker; }; export default createCostTrackerPlugin; //# sourceMappingURL=cost-tracker.d.ts.map