import type { SprintClaim, GolfScorecard, SlopeEvent, WorkflowExecution, WorkflowStepResult } from '../core/index.js'; import type { CommonIssuesFile, StoreStats } from '../core/index.js'; import { SlopeStoreError } from '../core/index.js'; import type { SlopeStore, SlopeSession, SlopeSessionUpdate } from '../core/index.js'; import type { EmbeddingStore, EmbeddingEntry, EmbeddingSearchResult, EmbeddingStats, IndexMeta } from '../core/embedding-store.js'; type JournalMode = 'WAL' | 'TRUNCATE' | 'DELETE' | 'PERSIST' | 'MEMORY' | 'OFF'; interface JournalModeDatabase { pragma(sql: string, options?: { simple?: boolean; }): unknown; prepare(sql: string): { run(): unknown; }; } export declare function configureSqliteJournalMode(db: JournalModeDatabase, env?: Record): JournalMode; export declare function createSqliteStoreUnavailableError(dbPath: string, err: unknown): SlopeStoreError; /** Latest schema version — total number of migrations available. */ export declare const LATEST_SCHEMA_VERSION: number; export declare class SqliteSlopeStore implements SlopeStore, EmbeddingStore { private db; private vecAvailable; private vecLoaded; private vecTableReady; constructor(dbPath: string); /** Lazy-load sqlite-vec extension. Non-fatal if unavailable — embedding methods will throw. */ private ensureVecLoaded; /** Require sqlite-vec to be available. Throws if not. */ private requireVec; /** Check if vec_embeddings virtual table exists, creating it if index_meta has dimensions. */ private ensureVecTable; /** Versioned migration framework — runs each migration exactly once */ private migrate; /** Get current schema version synchronously (internal use by migrate()) */ private getSchemaVersionSync; /** Get current schema version (0 if no migrations applied) */ getSchemaVersion(): Promise; /** Get aggregate row counts from all store tables */ 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; saveEmbeddings(entries: EmbeddingEntry[]): Promise; searchEmbeddings(queryVector: Float32Array, limit?: number): Promise; getIndexedFiles(): Promise>; deleteEmbeddingsByFile(filePath: string): Promise; getEmbeddingStats(): Promise; setIndexMeta(sha: string, model: string, dimensions: number): Promise; getIndexMeta(): Promise; /** Recreate vec virtual table with new dimensions (used by `slope index --full`) */ recreateVecTable(dimensions: number): void; /** Clear all embedding data (used by `slope index --full`) */ clearAllEmbeddings(): void; close(): void; } /** Create a SlopeStore backed by SQLite */ export declare function createStore(opts: { storePath: string; cwd?: string; }): SlopeStore; export {}; //# sourceMappingURL=index.d.ts.map