import type { ProactiveSignalPublisher } from '../../proactive/events/publisher.js'; import type { Automation, AutomationDeps, AutomationEvent, AutomationMetrics, AutomationProductEventRun, AutomationRun, AutomationRunEvent } from '../domain/types.js'; import { type CreateAutomationInput, type UpdateAutomationInput } from '../domain/validation.js'; export declare class AutomationAlreadyRunningError extends Error { readonly automationId: string; readonly runningRunId?: string; constructor(automationId: string, runningRunId?: string); } export declare class AutomationService { private readonly signals?; private readonly executor; private timer; private stopped; private runningScheduler; private deps; private maxConcurrentRuns; private readonly activeRuns; private readonly heartbeatTimers; private readonly leaseOwner; constructor(signals?: ProactiveSignalPublisher); setDeps(deps: AutomationDeps): void; initialize(options?: { maxConcurrentRuns?: number; }): Promise; stop(): Promise; create(input: CreateAutomationInput): Promise; list(options?: { projectId?: string; }): Promise; get(id: string): Promise; update(id: string, patch: UpdateAutomationInput): Promise; remove(id: string): Promise; pause(id: string): Promise; resume(id: string): Promise; runNow(id: string): Promise; rerunFromRun(runId: string): Promise; triggerEvent(event: AutomationEvent): Promise; listRuns(options?: { automationId?: string; projectId?: string; limit?: number; }): Promise; listRunsForProductEvent(options: { eventType: string; source?: string; payloadKey?: string; payloadValue?: string; limit?: number; }): Promise; getRun(runId: string): Promise; listRunEvents(runId: string): Promise; cancelRun(runId: string): Promise; getMetrics(): Promise; private recomputeNextRuns; private armTimer; private onTimer; private startRun; private executeRun; private recoverInterruptedRuns; private waitForRetry; private appendRunEvent; private finishAutomationRun; private postAfterRunWebhook; }