import type { HookChain, HookEvent, HookResult } from './types.js';
import type { HookDispatcher } from './dispatcher.js';
/**
 * Evaluate a safe condition expression against a context object.
 *
 * Allowed syntax:
 *   - Property access on context: `message`, `count`, `status`
 *   - Dot-chained property access: `event.type`
 *   - Comparison operators: `===`, `!==`, `>`, `<`, `>=`, `<=`
 *   - Logical operators: `&&`, `||`
 *   - Unary negation: `!expr`
 *   - String methods: `.startsWith()`, `.endsWith()`, `.includes()`
 *   - Literals: strings, numbers, booleans, null, undefined
 *   - Grouping: `(expr)`
 *
 * Does NOT use `eval`, `new Function`, or `vm.runInNewContext`.
 * Any expression that references identifiers not in the context, or
 * uses unsupported constructs, evaluates to false.
 */
export declare function safeEvaluate(condition: string, context: Record<string, unknown>): boolean;
export declare class ChainEngine {
    private dispatcher;
    private chains;
    private states;
    constructor(dispatcher: HookDispatcher);
    /** Register a chain and initialize its state */
    register(chain: HookChain): void;
    /** Called after each event to advance matching chains */
    evaluate(event: HookEvent): Promise<HookResult | null>;
    private _advanceState;
    private _resetState;
    /** Reset a specific chain */
    reset(chainName: string): void;
    /** Reset all chains */
    resetAll(): void;
    /** Get chain states for debugging */
    getStates(): Map<string, {
        currentStep: number;
        captures: Record<string, string>;
        lastAdvance: number;
    }>;
}
//# sourceMappingURL=chain-engine.d.ts.map