/**
 * Three-Tier Approval Modes System
 *
 * Inspired by Codex CLI's permission model:
 * - read-only: Only read operations, no writes or commands
 * - auto: Automatically approve safe operations, confirm dangerous ones
 * - full-access: All operations auto-approved (for trusted environments)
 *
 * Provides fine-grained control over what the agent can do without confirmation.
 */
import { EventEmitter } from 'events';
export type ApprovalMode = 'read-only' | 'auto' | 'full-access';
export type OperationType = 'file-read' | 'file-write' | 'file-create' | 'file-delete' | 'command-safe' | 'command-network' | 'command-system' | 'command-destructive' | 'network-fetch' | 'search' | 'unknown';
export interface OperationRequest {
    type: OperationType;
    tool: string;
    target?: string;
    command?: string;
    description?: string;
}
export interface ApprovalResult {
    approved: boolean;
    requiresConfirmation: boolean;
    reason?: string;
    autoApproved?: boolean;
}
export interface ApprovalModeConfig {
    mode: ApprovalMode;
    description: string;
    autoApproveTypes: OperationType[];
    requireConfirmTypes: OperationType[];
    blockTypes: OperationType[];
}
export declare class ApprovalModeManager extends EventEmitter {
    private mode;
    private configPath;
    private sessionApprovals;
    private operationHistory;
    constructor(configPath?: string);
    /**
     * Load configuration from file with schema validation
     */
    private loadConfig;
    /**
     * Save configuration to file
     */
    saveConfig(): void;
    /**
     * Set approval mode
     */
    setMode(mode: ApprovalMode): void;
    /**
     * Get current mode
     */
    getMode(): ApprovalMode;
    /**
     * Get mode configuration
     */
    getModeConfig(): ApprovalModeConfig;
    /**
     * Check if an operation should be approved
     */
    checkApproval(request: OperationRequest): ApprovalResult;
    /**
     * Classify operation type from request
     */
    private classifyOperation;
    /**
     * Classify a shell command
     */
    private classifyCommand;
    /**
     * Get session key for an operation
     */
    private getSessionKey;
    /**
     * Remember approval for this session
     */
    rememberApproval(request: OperationRequest, approved: boolean): void;
    /**
     * Clear session approvals
     */
    clearSessionApprovals(): void;
    /**
     * Get operation history
     */
    getOperationHistory(): OperationRequest[];
    /**
     * Get statistics
     */
    getStats(): {
        totalOperations: number;
        byType: Record<OperationType, number>;
        autoApproved: number;
        blocked: number;
    };
    /**
     * Get all available modes
     */
    getAvailableModes(): ApprovalModeConfig[];
    /**
     * Format mode for display
     */
    formatMode(mode: ApprovalMode): string;
    /**
     * Get help text
     */
    getHelpText(): string;
    /**
     * Dispose and cleanup resources
     */
    dispose(): void;
}
export declare function getApprovalModeManager(configPath?: string): ApprovalModeManager;
export declare function resetApprovalModeManager(): void;
