import type { ProductClient } from './client';
import type { DriverState, TurnMetrics } from './types';
interface TokenPrice {
    input: number;
    output: number;
}
/** Per-1K token pricing for exact model ids. */
export declare const MODEL_PRICING: Record<string, TokenPrice>;
/** Resolve pricing for a model id: exact table, then family fallback.
 *  Returns null when the id matches nothing (caller decides — never a
 *  silent-zero masquerading as a real $0 cost). */
export declare function resolveModelPricing(model: string): TokenPrice | null;
/** True when `model` has known pricing (exact or family). Lets cost-aware
 *  callers distinguish a real $0 from an unpriced model. */
export declare function isModelPriced(model: string): boolean;
/** Estimate token count from string length (chars / 4 approximation) */
export declare function estimateTokens(text: string): number;
/** Calculate cost in USD from token counts and model. Unknown models warn
 *  once (not a silent zero) and return 0 so callers that ignore pricing keep
 *  working; cost-sensitive callers should gate on {@link isModelPriced}. */
export declare function estimateCost(inputTokens: number, outputTokens: number, model: string): number;
/**
 * TokenCounter — accumulates token usage and cost across turns.
 */
export declare class TokenCounter {
    private totalInput;
    private totalOutput;
    private totalCost;
    private model;
    constructor(model?: string);
    /** Record tokens for a turn, returns per-turn cost */
    record(inputTokens: number, outputTokens: number): number;
    /** Estimate and record from raw text */
    recordFromText(inputText: string, outputText: string): {
        inputTokens: number;
        outputTokens: number;
        cost: number;
    };
    getTotalInput(): number;
    getTotalOutput(): number;
    getTotalCost(): number;
}
/**
 * MetricsCollector — collects per-turn metrics from the product.
 *
 * After each turn, queries the product's APIs to measure state changes.
 */
export declare class MetricsCollector {
    private client;
    private workspaceId;
    private metrics;
    constructor(client: ProductClient, workspaceId: string);
    /** Collect metrics after a turn completes */
    collect(turn: number, responseLatencyMs: number, responseChars: number, codeBlocksProduced: number, blocksExtracted: number, completionCriteriaMet: number, completionCriteriaTotal: number, qualityScore?: number, inputTokens?: number, outputTokens?: number, estimatedCostUsd?: number): Promise<TurnMetrics>;
    /** Get current product state */
    getState(): Promise<DriverState>;
    /** Get all collected metrics */
    getMetrics(): TurnMetrics[];
    /** Get convergence curve (completion% over turns) */
    getConvergenceCurve(): number[];
}
export {};
//# sourceMappingURL=metrics.d.ts.map