/**
 * Run storage abstraction
 * Provides a unified interface for storing and retrieving runs
 * Supports both in-memory and PostgreSQL backends
 */

import { Run, CreateRunData, UpdateRunData, ListRunsFilter, RunStatus } from './types.js';

export interface RunStore {
  createRun(data: CreateRunData): Promise<Run>;
  getRunById(id: string): Promise<Run | null>;
  getRunByClientToken(clientToken: string): Promise<Run | null>;
  listRuns(filter?: ListRunsFilter): Promise<Run[]>;
  updateRunStatus(id: string, status: RunStatus, extra?: UpdateRunData): Promise<void>;
  deleteRun(id: string): Promise<void>;
}

