import type { Automation, AutomationProductEventRun, AutomationRun, AutomationRunEvent } from '../domain/types.js'; import type { LocalAppResourceScope } from '@xopcai/gateway-contract'; export declare function saveAutomationRunRequest(runId: string, automation: Automation): void; export declare function getAutomationRunRequest(runId: string): Automation | null; export declare function listUnfinishedAutomationRuns(): AutomationRun[]; export declare function appendAutomationRunEvent(event: AutomationRunEvent): void; export declare function saveAutomationRun(run: AutomationRun): void; export declare function touchAutomationRunLease(runId: string, leaseOwner: string, heartbeatAtMs: number, leaseExpiresAtMs: number): void; export declare function listAutomationRunEvents(runId: string): AutomationRunEvent[]; export declare function getAutomationRun(runId: string): AutomationRun | null; export interface AutomationRunListOptions { localAppRestriction?: { extensionId: string; scope: LocalAppResourceScope; }; automationId?: string; projectId?: string; limit?: number; before?: { createdAtMs: number; id: string; }; } export declare function listAutomationRuns(options?: AutomationRunListOptions): AutomationRun[]; export declare function isAutomationConversationShared(automationId: string, conversationId: string, runId: string): boolean; export declare function getAutomationExecutionSummaries(projectId?: string): Record; export declare function listAutomationRunsForProductEvent(options: { eventType: string; source?: string; payloadKey?: string; payloadValue?: string; limit?: number; }): AutomationProductEventRun[]; export declare function deleteAutomationRunsForAutomation(automationId: string): void; export declare function pruneAutomationHistory(cutoffMs?: number): number; export declare function markAutomationRunRead(runId: string, readAtMs?: number): boolean; export declare function markAllAutomationRunsRead(options?: { projectId?: string; readAtMs?: number; }): number;