import type { CallbackEventAdapter } from '../../lib/events/callback';
/**
 * Agent Trigger Registry — arms event subscriptions for active agents at startup.
 *
 * Analogous to LTCronRegistry but for event-driven reactions. When an event
 * matches a subscription's topic pattern (and optional filter), the registry
 * invokes the configured workflow with a deterministic ID for distributed dedup.
 */
declare class AgentTriggerRegistry {
    private adapter;
    private unsubs;
    private connected;
    /**
     * Load all active subscriptions from DB and arm event listeners.
     * Also subscribes to `agent.triggers_changed` so other containers
     * can signal this one to re-arm after subscription CRUD.
     */
    connect(adapter: CallbackEventAdapter): Promise<void>;
    /**
     * Re-arm all subscriptions for a specific agent (after config change).
     */
    restartAgent(agentId: string): Promise<void>;
    /**
     * Stop all subscriptions for a specific agent.
     */
    stopAgent(agentId: string): void;
    /**
     * Disconnect all subscriptions.
     */
    disconnect(): void;
    private armSubscription;
    private buildHandler;
    /**
     * Shallow key-value match: every key in filter must match the corresponding
     * key in event.data. Missing keys in event.data fail the match.
     */
    /**
     * Match event.data against a filter object.
     *
     * Supports:
     * - Equality:  { "extension": "png" }
     * - Negation:  { "extension": { "$ne": "png" } }
     * - In-list:   { "extension": { "$in": ["png", "jpg"] } }
     * - Exists:    { "trace_id": { "$exists": true } }
     */
    private matchesFilter;
    /**
     * Deterministic workflow ID derived from the subscription + event.
     * Multiple containers receiving the same event produce the same ID,
     * so HotMesh's idempotent workflow.start() prevents duplicate execution.
     */
    private deriveWorkflowId;
    private executeReaction;
}
export declare const agentTriggerRegistry: AgentTriggerRegistry;
export {};
