/** * Workflow Run Store implementations * * Features: * - In-memory store for development/testing * - File-based store for persistence * - Query filtering and pagination * - Statistics aggregation */ import type { RunStore, WorkflowRun, WorkflowRunFilters, WorkflowRunStats } from '@cogitator-ai/types'; /** * In-memory run store for development and testing */ export declare class InMemoryRunStore implements RunStore { private runs; save(run: WorkflowRun): Promise; get(id: string): Promise; list(filters?: WorkflowRunFilters): Promise; count(filters?: WorkflowRunFilters): Promise; update(id: string, updates: Partial): Promise; delete(id: string): Promise; getStats(workflowName?: string): Promise; cleanup(olderThan: number): Promise; private applyFilters; private calculateStats; private isTerminal; /** * Clear all data (for testing) */ clear(): void; /** * Get all runs (for debugging) */ getAll(): WorkflowRun[]; } /** * File-based run store for persistence */ export declare class FileRunStore implements RunStore { private readonly directory; private cache; private cacheExpiry; private readonly cacheTTL; constructor(options: { directory: string; cacheTTL?: number; }); private getRunPath; private isCacheValid; save(run: WorkflowRun): Promise; get(id: string): Promise; list(filters?: WorkflowRunFilters): Promise; count(filters?: WorkflowRunFilters): Promise; update(id: string, updates: Partial): Promise; delete(id: string): Promise; getStats(workflowName?: string): Promise; cleanup(olderThan: number): Promise; private loadAllRuns; private applyFilters; private calculateStats; private isTerminal; /** * Clear cache */ clearCache(): void; } /** * Create an in-memory run store */ export declare function createInMemoryRunStore(): InMemoryRunStore; /** * Create a file-based run store */ export declare function createFileRunStore(options: { directory: string; cacheTTL?: number; }): FileRunStore; //# sourceMappingURL=run-store.d.ts.map