/**
 * Interpreter Service
 *
 * Open Interpreter-inspired service for Code Buddy.
 * Manages profiles, safe mode, auto-run, and budget tracking.
 *
 * Usage:
 * ```typescript
 * import { interpreter } from './services/InterpreterService';
 *
 * // Load a profile
 * interpreter.loadProfile('fast');
 *
 * // Configure
 * interpreter.autoRun = true;
 * interpreter.safeMode = 'ask';
 * interpreter.maxBudget = 1.00;
 *
 * // Execute
 * const result = await interpreter.chat('Open Chrome');
 * await interpreter.continue();
 * interpreter.reset();
 *
 * // Stats
 * console.log(interpreter.tokenUsage);
 * console.log(interpreter.totalCost);
 * ```
 */
import { EventEmitter } from 'events';
import type { SafeMode, InterpreterProfile, InterpreterConfig, TokenUsage, BudgetStatus, UsageStats, ChatMessage, ChatResult, PendingApproval } from './types.js';
export declare class InterpreterService extends EventEmitter {
    private config;
    private state;
    private conversationHistory;
    private customProfiles;
    private pendingApprovals;
    constructor(config?: Partial<InterpreterConfig>);
    /** Get current profile */
    get profile(): InterpreterProfile;
    /** Get/set auto-run mode */
    get autoRun(): boolean;
    set autoRun(value: boolean);
    /** Get/set safe mode */
    get safeMode(): SafeMode;
    set safeMode(value: SafeMode);
    /** Get/set custom instructions */
    get customInstructions(): string | undefined;
    set customInstructions(value: string | undefined);
    /** Get/set max budget */
    get maxBudget(): number;
    set maxBudget(value: number);
    /** Get token usage */
    get tokenUsage(): TokenUsage;
    /** Get total cost */
    get totalCost(): number;
    /** Get budget status */
    get budgetStatus(): BudgetStatus;
    /** Get full usage stats */
    get usage(): UsageStats;
    /** Is currently processing */
    get isProcessing(): boolean;
    /** Is loop mode enabled */
    get loopMode(): boolean;
    set loopMode(value: boolean);
    /**
     * Load a profile by ID
     */
    loadProfile(profileId: string): void;
    /**
     * Load a profile from YAML file
     */
    loadProfileFromFile(filePath: string): void;
    /**
     * Save current profile to YAML file
     */
    saveProfile(filePath: string): void;
    /**
     * List available profiles
     */
    listProfiles(): Array<{
        id: string;
        name: string;
        description?: string;
        builtin: boolean;
    }>;
    /**
     * Create a custom profile
     */
    createProfile(profile: InterpreterProfile): void;
    /**
     * Delete a custom profile
     */
    deleteProfile(profileId: string): boolean;
    /**
     * Send a message and get a response
     */
    chat(message: string): Promise<ChatResult>;
    /**
     * Continue the conversation (loop mode)
     */
    continue(): Promise<ChatResult | null>;
    /**
     * Reset the conversation
     */
    reset(): void;
    /**
     * Get conversation history
     */
    getHistory(): ChatMessage[];
    /**
     * Check if an action needs approval
     */
    needsApproval(action: string, risk: 'low' | 'medium' | 'high' | 'critical'): boolean;
    /**
     * Request approval for an action
     */
    requestApproval(approval: Omit<PendingApproval, 'id'>): string;
    /**
     * Approve a pending action
     */
    approve(approvalId: string): Promise<unknown>;
    /**
     * Reject a pending action
     */
    reject(approvalId: string): void;
    /**
     * Get all pending approvals
     */
    getPendingApprovals(): PendingApproval[];
    /**
     * Update usage statistics
     */
    private updateUsage;
    /**
     * Update budget status
     */
    private updateBudgetStatus;
    /**
     * Reset usage statistics
     */
    resetUsage(): void;
    /**
     * Calculate cost for tokens
     */
    calculateCost(model: string, tokens: TokenUsage): number;
    /**
     * Format usage for display
     */
    formatUsage(): string;
    private createInitialState;
    private createInitialUsage;
    private resolvePath;
    private loadCustomProfiles;
    private loadPersistedUsage;
    private persistUsage;
    private processMessage;
}
export declare function getInterpreter(config?: Partial<InterpreterConfig>): InterpreterService;
export declare function resetInterpreter(): void;
export declare const interpreter: InterpreterService;
export default InterpreterService;
