/**
 * DM Policy Engine
 *
 * Intelligent message routing with policy evaluation and sender reputation.
 */
import { EventEmitter } from 'events';
import type { DMPolicyRule, PolicyDecision, MessageContext, SenderReputation, InteractionResult, PolicyEngineConfig } from './types.js';
/**
 * DM Policy Engine
 *
 * Evaluates messages against policy rules and manages sender reputation.
 */
export declare class DMPolicyEngine extends EventEmitter {
    private config;
    private rules;
    private reputations;
    private rateLimits;
    private reputationCache;
    constructor(config?: Partial<PolicyEngineConfig>);
    /**
     * Add a policy rule
     */
    addRule(rule: DMPolicyRule): void;
    /**
     * Remove a policy rule
     */
    removeRule(ruleId: string): boolean;
    /**
     * Get a rule by ID
     */
    getRule(ruleId: string): DMPolicyRule | undefined;
    /**
     * Get all rules
     */
    getAllRules(): DMPolicyRule[];
    /**
     * Get rules sorted by priority
     */
    getSortedRules(): DMPolicyRule[];
    /**
     * Enable a rule
     */
    enableRule(ruleId: string): boolean;
    /**
     * Disable a rule
     */
    disableRule(ruleId: string): boolean;
    /**
     * Evaluate a message against all rules
     */
    evaluate(context: MessageContext): PolicyDecision;
    /**
     * Evaluate a single rule
     */
    private evaluateRule;
    /**
     * Evaluate a single condition
     */
    private evaluateCondition;
    /**
     * Compare values with operator
     */
    private compare;
    /**
     * Check if content contains keywords
     */
    private containsKeywords;
    /**
     * Create decision from matched rule
     */
    private createDecision;
    /**
     * Check rate limits for sender
     */
    private checkRateLimits;
    /**
     * Get or create rate limit entry
     */
    private getRateLimitEntry;
    /**
     * Get current message rate for sender
     */
    private getMessageRate;
    /**
     * Get sender reputation
     */
    getReputation(senderId: string): SenderReputation;
    /**
     * Create new reputation for sender
     */
    private createReputation;
    /**
     * Update sender reputation
     */
    updateReputation(result: InteractionResult): void;
    /**
     * Block a sender
     */
    blockSender(senderId: string, reason: string): void;
    /**
     * Unblock a sender
     */
    unblockSender(senderId: string): void;
    /**
     * Check if sender is blocked
     */
    isSenderBlocked(senderId: string): boolean;
    /**
     * Mark sender as trusted
     */
    trustSender(senderId: string): void;
    /**
     * Mark sender as suspicious
     */
    markSuspicious(senderId: string): void;
    /**
     * Initialize default policy rules
     */
    private initializeDefaultRules;
    /**
     * Get engine statistics
     */
    getStats(): {
        totalRules: number;
        enabledRules: number;
        trackedSenders: number;
        blockedSenders: number;
        trustedSenders: number;
        activeRateLimits: number;
    };
    /**
     * Clear all rate limits
     */
    clearRateLimits(): void;
    /**
     * Clear reputation cache
     */
    clearReputationCache(): void;
    /**
     * Shutdown
     */
    shutdown(): void;
}
/**
 * Get DM policy engine instance
 */
export declare function getDMPolicyEngine(config?: Partial<PolicyEngineConfig>): DMPolicyEngine;
/**
 * Reset DM policy engine instance
 */
export declare function resetDMPolicyEngine(): void;
export default DMPolicyEngine;
