/**
 * Cost Tracker Service
 *
 * Real-time cost tracking for agent executions. Tracks token usage, calculates
 * costs, aggregates by increment, and calculates savings vs baseline (Sonnet-only).
 *
 * Persistence: Stores data in .specweave/logs/costs.json
 */
import type { Model } from '../../types/model-selection.js';
import type { CostSession, IncrementCostReport } from '../../types/cost-tracking.js';
interface CostTrackerConfig {
    logPath?: string;
    autoSave?: boolean;
}
export declare class CostTracker {
    private sessions;
    private currentSessionId;
    private logPath;
    private autoSave;
    constructor(config?: CostTrackerConfig);
    /**
     * Start a new tracking session
     *
     * @param agent - Agent name (e.g., 'pm', 'frontend')
     * @param model - Model used ('sonnet', 'haiku', 'opus')
     * @param increment - Optional increment ID (e.g., '0003')
     * @param command - Optional command that triggered this (e.g., '/specweave.inc')
     * @returns Session ID
     */
    startSession(agent: string, model: Exclude<Model, 'auto'>, increment?: string, command?: string): string;
    /**
     * Record token usage for current session
     *
     * @param inputTokens - Number of input tokens
     * @param outputTokens - Number of output tokens
     * @param sessionId - Optional session ID (defaults to current)
     */
    recordTokens(inputTokens: number, outputTokens: number, sessionId?: string): void;
    /**
     * End current session
     *
     * @param sessionId - Optional session ID (defaults to current)
     */
    endSession(sessionId?: string): void;
    /**
     * Get session by ID
     */
    getSession(sessionId: string): CostSession | undefined;
    /**
     * Get current session
     */
    getCurrentSession(): CostSession | undefined;
    /**
     * Get all sessions for a specific increment
     *
     * @param incrementId - Increment ID (e.g., '0003')
     * @returns Array of sessions for this increment
     */
    getIncrementSessions(incrementId: string): CostSession[];
    /**
     * Get cost report for a specific increment
     *
     * @param incrementId - Increment ID (e.g., '0003')
     * @returns Aggregate cost report
     */
    getIncrementCost(incrementId: string): IncrementCostReport;
    /**
     * Get total cost across all sessions
     */
    getTotalCost(): number;
    /**
     * Get total savings across all sessions
     */
    getTotalSavings(): number;
    /**
     * Get all sessions
     */
    getAllSessions(): CostSession[];
    /**
     * Clear all sessions (useful for testing)
     */
    clearSessions(): void;
    /**
     * Save sessions to disk
     */
    saveToDisk(): Promise<void>;
    /**
     * Load sessions from disk
     */
    loadFromDisk(): Promise<void>;
    /**
     * Generate unique session ID
     */
    private generateSessionId;
    /**
     * Get summary statistics
     */
    getSummary(): {
        totalSessions: number;
        totalCost: number;
        totalSavings: number;
        savingsPercentage: number;
        mostExpensiveAgent: string | null;
        cheapestAgent: string | null;
    };
}
export {};
//# sourceMappingURL=cost-tracker.d.ts.map