/** * Copyright (c) 2025 Elara AI Pty Ltd * Licensed under BSL 1.1. See LICENSE for details. */ import type { ExecutionStateStore, TaskStatusDetails, ExecutionStatusDetails } from './interfaces.js'; import type { DataflowExecutionState, ExecutionEvent, TaskStatus } from '../types.js'; /** * In-memory state store for testing and simple use cases. * * @remarks * - Thread-safe for concurrent access within a single process * - State is lost on process exit * - No durability guarantees */ export declare class InMemoryStateStore implements ExecutionStateStore { /** Map of "repo::workspace" -> execution ID -> state */ private states; /** Map of "repo::workspace" -> next execution ID counter */ private counters; private makeKey; create(state: DataflowExecutionState): Promise; read(repo: string, workspace: string, id: string): Promise; readLatest(repo: string, workspace: string): Promise; update(state: DataflowExecutionState): Promise; updateTaskStatus(repo: string, workspace: string, executionId: string, task: string, status: TaskStatus, details?: TaskStatusDetails): Promise; updateStatus(repo: string, workspace: string, executionId: string, status: 'running' | 'completed' | 'failed' | 'cancelled', details?: ExecutionStatusDetails): Promise; recordEvent(repo: string, workspace: string, executionId: string, event: ExecutionEvent): Promise; getEventsSince(repo: string, workspace: string, executionId: string, sinceSeq: number): Promise; nextExecutionId(repo: string, workspace: string): Promise; delete(repo: string, workspace: string, executionId: string): Promise; /** * Clear all state (for testing). */ clear(): void; /** * Deep clone execution state to prevent external mutation. * * Note: We use spread and some() to properly clone the branded option types. */ private cloneState; } //# sourceMappingURL=InMemoryStateStore.d.ts.map