import type { AutomationEvent, AutomationEventEnvelope, AutomationRun } from '../domain/types.js'; export interface AutomationEventDispatchService { availableRunSlots(): number; queueRunAtomically(id: string, opts: { manual: boolean; event?: AutomationEvent; }): AutomationRun; dispatchQueuedRun(runId: string): void; } export declare class AutomationEventDispatcher { private readonly automationService; private readonly options; private timer?; private active?; private stopping; private readonly owner; private readonly abortController; constructor(automationService: AutomationEventDispatchService, options?: { onEvent?: (event: AutomationEventEnvelope, signal?: AbortSignal) => void | Promise; onDeadLetter?: (input: { phase: 'event_projection' | 'event_delivery'; eventId: string; automationId?: string; error: string; }) => void; intervalMs?: number; }); start(): void; stop(): Promise; dispatch(): Promise; runCompleted(run: AutomationRun): void; private runDispatch; private projectEvents; }