import type { Automation, AutomationArtifact, AutomationResultDeliveryRecord, AutomationResultEnvelope, AutomationRun, AutomationRunDeliveryContext } from '../domain/types.js'; type AutomationDeliveryHandler = (input: { deliveryId: string; attempt: number; run: AutomationRun; result: AutomationResultEnvelope; config: Record; signal: AbortSignal; }) => void | Promise; export declare function listAutomationResultDeliveries(input?: { runId?: string; status?: AutomationResultDeliveryRecord['status']; limit?: number; }): AutomationResultDeliveryRecord[]; export declare function retryAutomationResultDelivery(runId: string, destinationKey: string): boolean; export declare function getAutomationResultDeliveryMetrics(): { pending: number; deadLetters: number; activeLeases: number; }; export declare class AutomationDeliveryRouter { private readonly options; private active?; private timer?; private readonly handlers; private readonly owner; private readonly abortController; constructor(options?: { deliverGatewayEvent?: (run: AutomationRun, context: AutomationRunDeliveryContext) => void | Promise; onDeadLetter?: (input: { phase: 'result_delivery'; runId: string; destinationKey: string; error: string; }) => void; fetch?: typeof fetch; }); register(kind: string, handler: AutomationDeliveryHandler): void; validateArtifacts(artifacts: AutomationArtifact[]): void; enqueue(run: AutomationRun, automation: Automation, suppliedArtifacts?: AutomationArtifact[]): void; start(): void; stop(): Promise; dispatch(): Promise; private claim; private runDispatch; private release; private fail; private postWebhook; } export {};