import type { PolicyRef } from '../policy/spec';
import type { ExperimentRegistry, ExperimentVariant } from './spec';
export interface ExperimentContext {
    experiment: string;
    version?: string;
    userId?: string | null;
    organizationId?: string | null;
    sessionId?: string | null;
    attributes?: Record<string, unknown>;
    flags?: string[];
}
export interface ExperimentEvaluation {
    variant: ExperimentVariant;
    reason: 'control' | 'random' | 'sticky' | 'targeted';
}
export interface ExperimentEvaluatorConfig {
    registry: ExperimentRegistry;
    policyChecker?: (policy: PolicyRef, context: ExperimentContext) => Promise<boolean> | boolean;
    expressionEvaluator?: (expression: string, context: ExperimentContext) => boolean;
}
export declare class ExperimentEvaluator {
    private readonly registry;
    private readonly policyChecker?;
    private readonly expressionEvaluator?;
    constructor(config: ExperimentEvaluatorConfig);
    chooseVariant(context: ExperimentContext): Promise<ExperimentEvaluation | null>;
    private pickByWeight;
    private randomSeed;
    private stickySeed;
    private hashToUnitInterval;
    private evaluateTargeting;
    private matchesRule;
}
