import type { Policy, PolicyEvaluationContext, PolicyEvaluationResult, MultiPolicyEvaluationResult } from './types.js';
/**
 * Cache metrics for monitoring
 */
export interface PolicyCacheMetrics {
    hits: number;
    misses: number;
    evictions: number;
    invalidations: number;
    size: number;
    hitRate: number;
}
/**
 * Invalidate policy cache entries when a policy is updated.
 * Call this from policy update/delete operations.
 */
export declare function invalidatePolicyCache(policyId: string): number;
/**
 * Get policy evaluation cache metrics
 */
export declare function getPolicyCacheMetrics(): PolicyCacheMetrics | null;
/**
 * Clear the entire policy evaluation cache
 */
export declare function clearPolicyCache(): void;
/**
 * Stop and clean up the policy cache (for shutdown)
 */
export declare function stopPolicyCache(): void;
/**
 * Policy Evaluator class
 * Includes result caching for improved performance
 */
export declare class PolicyEvaluator {
    private readonly enableCache;
    constructor(options?: {
        enableCache?: boolean;
    });
    /**
     * Evaluate multiple policies against a context
     * Uses caching to avoid redundant evaluations
     */
    evaluateMultiple(policies: Policy[], context: PolicyEvaluationContext): Promise<MultiPolicyEvaluationResult>;
    /**
     * Evaluate a single policy against a context
     */
    evaluatePolicy(policy: Policy, context: PolicyEvaluationContext): Promise<PolicyEvaluationResult>;
    /**
     * Evaluate a single rule against a context
     */
    private evaluateRule;
    /**
     * Check if a policy applies to the given context
     */
    private policyApplies;
    /**
     * Evaluate a condition against a context
     */
    private evaluateCondition;
    /**
     * Evaluate a field condition
     */
    private evaluateFieldCondition;
    /**
     * Evaluate a compound condition (AND, OR, NOT)
     */
    private evaluateCompoundCondition;
    /**
     * Evaluate a trust level condition
     */
    private evaluateTrustCondition;
    /**
     * Evaluate a time-based condition
     */
    private evaluateTimeCondition;
    /**
     * Resolve a field path to its value in the context
     */
    private resolveField;
    /**
     * Compare two values using an operator
     */
    private compareValues;
}
/**
 * Create a new policy evaluator instance
 *
 * @param options - Configuration options
 * @param options.enableCache - Whether to enable result caching (default: true)
 */
export declare function createPolicyEvaluator(options?: {
    enableCache?: boolean;
}): PolicyEvaluator;
//# sourceMappingURL=evaluator.d.ts.map