/**
 * Workflow Rule Evaluator
 *
 * Subscribes to ticket:status_changed events on the global EventBus and
 * evaluates workflow rules when a ticket enters a new state.
 *
 * For on_enter rules, emits a work:rule_matched event so that
 * downstream systems (orchestrators, hooks) can fire the associated action.
 * For manual rules, the match is logged but no action is auto-fired.
 */
import type Database from 'better-sqlite3';
export declare class WorkflowRuleEvaluator {
    private unsubscribers;
    private db;
    constructor(db: Database.Database);
    /**
     * Start listening for ticket state changes.
     */
    start(): void;
    /**
     * Stop listening for events.
     */
    stop(): void;
    /**
     * Evaluate workflow rules for a status change event.
     * Finds all enabled rules matching the new state and emits events for on_enter rules.
     */
    private evaluate;
}
/**
 * Initialize and start the workflow rule evaluator.
 * Safe to call multiple times — subsequent calls are no-ops.
 */
export declare function initWorkflowRuleEvaluator(db: Database.Database): WorkflowRuleEvaluator;
/**
 * Stop the workflow rule evaluator (primarily for testing).
 */
export declare function stopWorkflowRuleEvaluator(): void;
