/**
 * Permission Manager
 *
 * OpenClaw-inspired platform-specific permission gating.
 * Checks and requests permissions before sensitive operations.
 *
 * Supports:
 * - Screen Recording (macOS TCC, Linux, Windows)
 * - Accessibility (macOS AX, Linux AT-SPI, Windows UIAutomation)
 * - Camera/Microphone access
 * - Location services
 * - Notifications
 */
import { EventEmitter } from 'events';
export type PermissionType = 'screen-recording' | 'accessibility' | 'camera' | 'microphone' | 'location' | 'notifications' | 'full-disk-access' | 'automation';
export type PermissionStatus = 'granted' | 'denied' | 'not-determined' | 'restricted' | 'unavailable';
export interface PermissionInfo {
    type: PermissionType;
    status: PermissionStatus;
    canRequest: boolean;
    instructions?: string;
    settingsPath?: string;
}
export interface PermissionCheckResult {
    permission: PermissionType;
    status: PermissionStatus;
    granted: boolean;
    message: string;
}
export interface PermissionManagerConfig {
    /** Cache permission checks for this duration (ms) */
    cacheDuration: number;
    /** Auto-prompt for missing permissions */
    autoPrompt: boolean;
    /** Show instructions when permission denied */
    showInstructions: boolean;
}
export type Platform = 'darwin' | 'linux' | 'win32' | 'unknown';
export declare class PermissionManager extends EventEmitter {
    private platform;
    private config;
    private cache;
    constructor(config?: Partial<PermissionManagerConfig>);
    /**
     * Check permission status
     */
    check(permission: PermissionType): Promise<PermissionCheckResult>;
    /**
     * Check multiple permissions
     */
    checkAll(permissions: PermissionType[]): Promise<Map<PermissionType, PermissionCheckResult>>;
    /**
     * Request permission (opens system settings if needed)
     */
    request(permission: PermissionType): Promise<PermissionCheckResult>;
    /**
     * Get instructions for granting permission
     */
    getInstructions(permission: PermissionType): PermissionInfo;
    /**
     * Ensure permission is granted before executing action
     */
    ensurePermission(permission: PermissionType, action: () => Promise<void>): Promise<void>;
    /**
     * Clear permission cache
     */
    clearCache(): void;
    private checkMacOS;
    private checkMacOSScreenRecording;
    private checkMacOSAccessibility;
    private checkMacOSCamera;
    private checkMacOSMicrophone;
    private checkMacOSLocation;
    private checkMacOSNotifications;
    private checkMacOSFullDiskAccess;
    private checkMacOSAutomation;
    private requestMacOS;
    private getMacOSInstructions;
    private checkLinux;
    private checkLinuxScreenRecording;
    private checkLinuxAccessibility;
    private checkLinuxCamera;
    private checkLinuxMicrophone;
    private checkLinuxNotifications;
    private requestLinux;
    private getLinuxInstructions;
    private checkWindows;
    private checkWindowsScreenRecording;
    private checkWindowsCamera;
    private checkWindowsMicrophone;
    private checkWindowsLocation;
    private requestWindows;
    private getWindowsInstructions;
    private formatResult;
}
export declare class PermissionError extends Error {
    permission: PermissionType;
    info: PermissionInfo;
    constructor(permission: PermissionType, info: PermissionInfo);
}
export declare function getPermissionManager(config?: Partial<PermissionManagerConfig>): PermissionManager;
export declare function resetPermissionManager(): void;
export default PermissionManager;
