import { EventEmitter } from 'events';
/**
 * Security Modes - Inspired by OpenAI Codex CLI
 * Three levels of autonomy with different approval requirements
 */
export type SecurityMode = 'suggest' | 'auto-edit' | 'full-auto';
export interface SecurityModeConfig {
    mode: SecurityMode;
    networkDisabled: boolean;
    directoryRestricted: boolean;
    allowedDirectories: string[];
    blockedCommands: string[];
    blockedPaths: string[];
    requireApproval: {
        fileRead: boolean;
        fileWrite: boolean;
        fileCreate: boolean;
        fileDelete: boolean;
        bashCommand: boolean;
        networkRequest: boolean;
    };
}
export interface ApprovalRequest {
    type: 'file-read' | 'file-write' | 'file-create' | 'file-delete' | 'bash' | 'network';
    resource: string;
    description: string;
    risk: 'low' | 'medium' | 'high';
}
export interface ApprovalResult {
    approved: boolean;
    remember?: boolean;
    reason?: string;
}
/**
 * Security Mode Manager
 */
export declare class SecurityModeManager extends EventEmitter {
    private mode;
    private config;
    private workingDirectory;
    private approvedOperations;
    private deniedOperations;
    constructor(workingDirectory?: string, initialMode?: SecurityMode);
    /**
     * Build configuration for a mode
     */
    private buildConfig;
    /**
     * Load saved configuration from file
     */
    private loadSavedConfig;
    /**
     * Save current configuration
     */
    saveConfig(): void;
    /**
     * Get current security mode
     */
    getMode(): SecurityMode;
    /**
     * Set security mode
     */
    setMode(mode: SecurityMode): void;
    /**
     * Get current configuration
     */
    getConfig(): SecurityModeConfig;
    /**
     * Check if an operation requires approval
     */
    requiresApproval(request: ApprovalRequest): boolean;
    /**
     * Validate an operation
     */
    validateOperation(request: ApprovalRequest): {
        valid: boolean;
        reason?: string;
    };
    /**
     * Record an approval decision
     */
    recordApproval(request: ApprovalRequest, result: ApprovalResult): void;
    /**
     * Check if a command is blocked
     */
    private isBlockedCommand;
    /**
     * Check if a path is blocked
     */
    private isBlockedPath;
    /**
     * Check if a path is in allowed directories
     */
    private isInAllowedDirectory;
    /**
     * Add an allowed directory
     */
    addAllowedDirectory(directory: string): void;
    /**
     * Add a blocked command pattern
     */
    addBlockedCommand(command: string): void;
    /**
     * Add a blocked path
     */
    addBlockedPath(pathPattern: string): void;
    /**
     * Clear session approvals
     */
    clearSessionApprovals(): void;
    /**
     * Get risk level for an operation
     */
    getRiskLevel(request: ApprovalRequest): 'low' | 'medium' | 'high';
    /**
     * Format status for display
     */
    formatStatus(): string;
    /**
     * Dispose and cleanup resources
     */
    dispose(): void;
}
export declare function getSecurityModeManager(workingDirectory?: string, initialMode?: SecurityMode): SecurityModeManager;
export declare function resetSecurityModeManager(): void;
