/**
 * Tool Permissions System
 *
 * Inspired by mistral-vibe's tool permission system that allows:
 * - ALWAYS: Auto-execute without prompting
 * - ASK: Request user confirmation before running
 * - NEVER: Block execution entirely
 *
 * Supports:
 * - Exact tool name matching
 * - Glob patterns (e.g., "read_*", "git*")
 * - Regex patterns with "re:" prefix (e.g., "re:^file_.*")
 */
export declare enum ToolPermission {
    ALWAYS = "always",// Auto-execute without prompting
    ASK = "ask",// Request user confirmation
    NEVER = "never"
}
export interface ToolPermissionRule {
    /** Pattern to match tool names (exact, glob, or regex with "re:" prefix) */
    pattern: string;
    /** Permission level for matching tools */
    permission: ToolPermission;
    /** Optional reason for this rule (shown to user) */
    reason?: string;
}
export interface ToolPermissionConfig {
    /** Default permission for tools not matching any rule */
    default: ToolPermission;
    /** Rules for specific tools or patterns */
    rules: ToolPermissionRule[];
    /** Allowlist patterns (auto-approve these) */
    allowlist: string[];
    /** Denylist patterns (always block these) */
    denylist: string[];
}
export declare class ToolPermissionManager {
    private config;
    private configPath;
    constructor(configPath?: string);
    /**
     * Load configuration from file or use defaults
     */
    private loadConfig;
    /**
     * Save configuration to file
     */
    saveConfig(): void;
    /**
     * Get permission for a tool
     *
     * @param toolName - Name of the tool
     * @param commandArgs - Optional command arguments (for bash/shell tools)
     * @returns Permission level and optional reason
     */
    getPermission(toolName: string, commandArgs?: string): {
        permission: ToolPermission;
        reason?: string;
    };
    /**
     * Check if a tool should be auto-approved
     */
    shouldAutoApprove(toolName: string, commandArgs?: string): boolean;
    /**
     * Check if a tool should be blocked
     */
    shouldBlock(toolName: string, commandArgs?: string): boolean;
    /**
     * Add a rule
     */
    addRule(rule: ToolPermissionRule): void;
    /**
     * Remove a rule by pattern
     */
    removeRule(pattern: string): boolean;
    /**
     * Add to allowlist
     */
    addToAllowlist(pattern: string): void;
    /**
     * Add to denylist
     */
    addToDenylist(pattern: string): void;
    /**
     * Get all rules
     */
    getRules(): ToolPermissionRule[];
    /**
     * Get configuration
     */
    getConfig(): ToolPermissionConfig;
    /**
     * Reset to defaults
     */
    resetToDefaults(): void;
    /**
     * Format rules for display
     */
    formatRules(): string;
}
export declare function getToolPermissionManager(): ToolPermissionManager;
export declare function resetToolPermissionManager(): void;
