import type { AutomationEvent, AutomationEventDeliveryStatus, AutomationEventEnvelope, AutomationEventProjectionStatus, AutomationEventRecord, AutomationRunStatus } from '../domain/types.js'; export interface ClaimedAutomationEventDelivery { event: AutomationEventEnvelope; automationId: string; attempts: number; owner: string; } export interface AutomationEventIngestResult { event: AutomationEventEnvelope; created: boolean; deliveryCount: number; } export interface AutomationEventIngestOptions { targetAutomationIds?: string[]; } export interface AutomationEventPublisher { publish(input: AutomationEvent, options?: AutomationEventIngestOptions): AutomationEventIngestResult; } export declare function ingestAutomationEvent(input: AutomationEvent, options?: AutomationEventIngestOptions): AutomationEventIngestResult; export declare const automationEventPublisher: AutomationEventPublisher; export declare function listAutomationEvents(input?: { type?: string; source?: string; subjectKind?: string; subjectId?: string; limit?: number; newestFirst?: boolean; }): AutomationEventEnvelope[]; export declare function listAutomationEventRecords(input?: { type?: string; source?: string; limit?: number; }): AutomationEventRecord[]; export declare function claimAutomationEventsForProjection(owner: string, limit?: number, leaseMs?: number): AutomationEventEnvelope[]; export declare function expireAutomationEventProjectionLeases(): Array<{ eventId: string; error: string; }>; export declare function completeAutomationEventProjection(eventId: string, owner: string): void; export declare function releaseAutomationEventProjection(eventId: string, owner: string): void; export declare function failAutomationEventProjection(eventId: string, owner: string, error: unknown): AutomationEventProjectionStatus; export declare function claimAutomationEventDeliveries(owner: string, limit: number, leaseMs?: number): ClaimedAutomationEventDelivery[]; export declare function releaseAutomationEventDelivery(eventId: string, automationId: string, owner: string, delayMs?: number): void; export declare function getAutomationEventDeliveryRunId(eventId: string, automationId: string): string | null; export declare function getAutomationEventForRun(runId: string): AutomationEventEnvelope | null; export declare function markAutomationEventDeliveryQueued(eventId: string, automationId: string, runId: string, owner?: string): void; export declare function deferAutomationEventDelivery(eventId: string, automationId: string, owner: string, error: unknown): AutomationEventDeliveryStatus; export declare function skipAutomationEventDelivery(eventId: string, automationId: string, reason: string, owner?: string): void; export declare function completeAutomationEventDelivery(runId: string, runStatus: AutomationRunStatus): void; export declare function reconcileAutomationEventDeliveries(): number; export declare function replayAutomationEvent(eventId: string): boolean; export declare function getAutomationEventQueueMetrics(): { pending: number; oldestPendingAgeMs: number; projectionDeadLetters: number; pendingDeliveries: number; deliveryDeadLetters: number; activeLeases: number; };