/**
 * Rule Evaluator
 *
 * Evaluates rules against intent context with support for multiple operators.
 *
 * @packageDocumentation
 */
import type { Intent } from '../common/types.js';
import type { Rule, RuleGroup, Policy, PolicyEffect } from './policy.js';
/**
 * Result of evaluating a single rule
 */
export interface RuleMatchResult {
    /** The rule that was evaluated */
    rule: Rule;
    /** Whether the rule matched */
    matched: boolean;
    /** Actual field value that was evaluated */
    actualValue: unknown;
    /** Expected value from the rule */
    expectedValue: unknown;
    /** Evaluation duration in milliseconds */
    durationMs: number;
    /** Error message if evaluation failed */
    error?: string;
}
/**
 * Result of evaluating a rule group
 */
export interface RuleGroupResult {
    /** The rule group that was evaluated */
    ruleGroup: RuleGroup;
    /** Whether the group matched */
    matched: boolean;
    /** Individual rule results */
    ruleResults: RuleMatchResult[];
    /** Total evaluation duration */
    durationMs: number;
}
/**
 * Result of evaluating a policy
 */
export interface PolicyMatchResult {
    /** The policy that was evaluated */
    policy: Policy;
    /** Whether the policy matched */
    matched: boolean;
    /** The effect of the policy */
    effect: PolicyEffect;
    /** Rule group evaluation result */
    ruleGroupResult: RuleGroupResult;
    /** Evaluation duration */
    durationMs: number;
}
/**
 * Context for rule evaluation
 */
export interface EvaluationContext {
    /** The intent being evaluated */
    intent: Intent;
    /** Additional context data */
    context?: Record<string, unknown>;
    /** Environment data */
    environment?: {
        timestamp?: string;
        timezone?: string;
    };
}
/**
 * RuleEvaluator class for evaluating rules against intent context
 */
export declare class RuleEvaluator {
    /**
     * Evaluate a single rule against the context
     */
    evaluateRule(rule: Rule, context: EvaluationContext): RuleMatchResult;
    /**
     * Evaluate a rule group with AND/OR logic
     */
    evaluateRuleGroup(ruleGroup: RuleGroup, context: EvaluationContext): RuleGroupResult;
    /**
     * Evaluate a policy against the context
     */
    evaluatePolicy(policy: Policy, context: EvaluationContext): PolicyMatchResult;
    /**
     * Evaluate a policy with tracing
     */
    evaluatePolicyWithTracing(policy: Policy, context: EvaluationContext): Promise<PolicyMatchResult>;
    /**
     * Check if policy conditions match the context
     */
    private checkPolicyConditions;
    /**
     * Resolve a field path from the evaluation context
     */
    private resolveFieldPath;
    /**
     * Compare values using the specified operator
     */
    private compareValues;
}
/**
 * Create a new rule evaluator instance
 */
export declare function createRuleEvaluator(): RuleEvaluator;
//# sourceMappingURL=evaluator.d.ts.map