/**
 * Policy Manager
 *
 * Singleton manager for tool policies. Coordinates policy resolution,
 * configuration persistence, and event emission.
 *
 * Usage:
 * ```typescript
 * const manager = getPolicyManager();
 * const decision = manager.checkTool('bash', { command: 'npm install' });
 * if (decision.action === 'allow') {
 *   // Execute tool
 * } else if (decision.action === 'confirm') {
 *   // Request user confirmation
 * } else {
 *   // Deny operation
 * }
 * ```
 */
import { EventEmitter } from 'events';
import type { PolicyProfile, PolicyAction, PolicyRule, PolicyDecision, PolicyContext, PolicyConfig, ToolGroup } from './types.js';
/**
 * Central manager for tool policies
 */
export declare class PolicyManager extends EventEmitter {
    private config;
    private resolver;
    private configPath;
    private sessionOverrides;
    private decisionCache;
    private auditLog;
    constructor(configDir?: string);
    /**
     * Check policy for a tool
     * @param toolName Tool to check
     * @param args Tool arguments (for conditional rules)
     * @returns Policy decision
     */
    checkTool(toolName: string, args?: Record<string, unknown>): PolicyDecision;
    /**
     * Check if a tool is allowed (shorthand)
     */
    isAllowed(toolName: string, args?: Record<string, unknown>): boolean;
    /**
     * Check if a tool requires confirmation
     */
    requiresConfirmation(toolName: string, args?: Record<string, unknown>): boolean;
    /**
     * Check if a tool is denied
     */
    isDenied(toolName: string, args?: Record<string, unknown>): boolean;
    /**
     * Get current profile
     */
    getProfile(): PolicyProfile;
    /**
     * Set active profile
     */
    setProfile(profile: PolicyProfile): void;
    /**
     * Get profile info
     */
    getProfileInfo(profile?: PolicyProfile): import("./types.js").ProfileDefinition;
    /**
     * Get all available profiles
     */
    getAvailableProfiles(): PolicyProfile[];
    /**
     * Set session override for a tool
     */
    setSessionOverride(toolName: string, action: PolicyAction): void;
    /**
     * Clear session override for a tool
     */
    clearSessionOverride(toolName: string): void;
    /**
     * Clear all session overrides
     */
    clearAllSessionOverrides(): void;
    /**
     * Get all session overrides
     */
    getSessionOverrides(): Map<string, PolicyAction>;
    /**
     * Add a global rule
     */
    addGlobalRule(rule: PolicyRule): void;
    /**
     * Add an agent-specific rule
     */
    addAgentRule(agentId: string, rule: PolicyRule): void;
    /**
     * Add a provider-specific rule
     */
    addProviderRule(providerId: string, rule: PolicyRule): void;
    /**
     * Remove a global rule
     */
    removeGlobalRule(group: ToolGroup): boolean;
    /**
     * Get all global rules
     */
    getGlobalRules(): PolicyRule[];
    /**
     * Register a tool with its groups
     */
    registerTool(toolName: string, groups: ToolGroup[]): void;
    /**
     * Get groups for a tool
     */
    getToolGroups(toolName: string): ToolGroup[];
    /**
     * Get current configuration
     */
    getConfig(): PolicyConfig;
    /**
     * Update configuration
     */
    updateConfig(updates: Partial<PolicyConfig>): void;
    /**
     * Reset to default configuration
     */
    resetConfig(): void;
    /**
     * Enable/disable audit logging
     */
    setAuditLog(enabled: boolean): void;
    /**
     * Get audit log
     */
    getAuditLog(): Array<{
        timestamp: Date;
        decision: PolicyDecision;
        context: PolicyContext;
    }>;
    /**
     * Clear audit log
     */
    clearAuditLog(): void;
    /**
     * Get config file path
     */
    private getConfigPath;
    /**
     * Load configuration from file
     */
    private loadConfig;
    /**
     * Save configuration to file
     */
    private saveConfig;
    /**
     * Get cache key for tool/args combination
     */
    private getCacheKey;
    /**
     * Clear decision cache
     */
    private clearCache;
    /**
     * Log decision for audit
     */
    private logDecision;
    /**
     * Format status for display
     */
    formatStatus(): string;
    /**
     * Dispose and cleanup
     */
    dispose(): void;
}
/**
 * Get or create the PolicyManager singleton
 */
export declare function getPolicyManager(configDir?: string): PolicyManager;
/**
 * Reset the PolicyManager singleton
 */
export declare function resetPolicyManager(): void;
/**
 * Quick check if tool is allowed
 */
export declare function isToolAllowed(toolName: string, args?: Record<string, unknown>): boolean;
/**
 * Quick check if tool requires confirmation
 */
export declare function toolRequiresConfirmation(toolName: string, args?: Record<string, unknown>): boolean;
/**
 * Quick check if tool is denied
 */
export declare function isToolDenied(toolName: string, args?: Record<string, unknown>): boolean;
