import type { SprintClaim, GolfScorecard, SlopeEvent, WorkflowExecution, WorkflowStepResult } from '../core/types.js'; import type { CommonIssuesFile } from '../core/briefing.js'; import type { StoreStats } from '../core/store.js'; import type { SlopeStore, SlopeSession, SlopeSessionUpdate } from '../core/store.js'; type Pool = import('pg').Pool; export interface PostgresStoreOptions { connectionString?: string; pool?: Pool; projectId?: string; } export declare class PostgresSlopeStore implements SlopeStore { private pool; private ownedPool; private projectId; private migrated; constructor(opts: PostgresStoreOptions); /** Run schema migrations with transaction-scoped advisory lock for concurrency safety */ migrate(): Promise; getSchemaVersion(): Promise; getStats(): Promise; registerSession(session: Omit): Promise; removeSession(sessionId: string): Promise; updateSession(sessionId: string, updates: SlopeSessionUpdate): Promise; getActiveSessions(): Promise; getSessionsBySwarm(swarmId: string): Promise; updateHeartbeat(sessionId: string): Promise; cleanStaleSessions(maxAgeMs: number): Promise; claim(input: Omit): Promise; release(id: string): Promise; list(sprintNumber: number): Promise; get(id: string): Promise; getActiveClaims(sprintNumber?: number): Promise; saveScorecard(card: GolfScorecard): Promise; listScorecards(filter?: { minSprint?: number; maxSprint?: number; }): Promise; loadCommonIssues(): Promise; saveCommonIssues(issues: CommonIssuesFile): Promise; insertEvent(event: Omit): Promise; getEventsBySession(sessionId: string): Promise; getEventsBySprint(sprintNumber: number): Promise; getEventsByTicket(ticketKey: string): Promise; createTestingSession(session: { branch?: string; sprint?: number; purpose?: string; worktree_path?: string; branch_name?: string; }): Promise<{ id: string; started_at: string; }>; endTestingSession(sessionId: string): Promise<{ ended_at: string; finding_count: number; worktree_path?: string; branch_name?: string; }>; getActiveTestingSession(): Promise<{ id: string; branch?: string; sprint?: number; purpose?: string; worktree_path?: string; branch_name?: string; started_at: string; } | null>; addTestingFinding(finding: { session_id: string; description: string; severity?: string; ticket?: string; }): Promise<{ id: string; }>; getTestingFindings(sessionId: string): Promise>; startExecution(params: { workflow_name: string; sprint_id?: string; variables?: Record; session_id?: string; definition_json?: string; definition_hash?: string; }): Promise; getExecution(executionId: string): Promise; getExecutionBySprint(sprintId: string): Promise; updateExecutionState(executionId: string, phase: string, step: string): Promise; completeExecution(executionId: string, status: 'completed' | 'failed' | 'paused' | 'running'): Promise; recordStepResult(params: { execution_id: string; step_id: string; phase: string; status: 'completed' | 'skipped' | 'failed'; output?: Record; exit_code?: number; item?: string; started_at?: string; }): Promise; listExecutions(filter?: { sprint_id?: string; status?: string; }): Promise; close(): void; } /** Create a PostgreSQL-backed SlopeStore. Requires `pg` package to be installed. */ export declare function createPostgresStore(opts: { connectionString?: string; pool?: unknown; projectId?: string; }): Promise; export {}; //# sourceMappingURL=index.d.ts.map