import type { SprintClaim, GolfScorecard, SlopeEvent, WorkflowExecution, WorkflowStepResult } from './types.js'; import type { CommonIssuesFile } from './briefing.js'; import type { SprintRegistry } from './registry.js'; /** Aggregate row counts from the store — used by health checks and diagnostics. */ export interface StoreStats { sessions: number; claims: number; scorecards: number; events: number; lastEventAt: string | null; } /** Live agent/IDE session — distinct from SessionEntry (journal-style briefing entries) */ export interface SlopeSession { session_id: string; role: 'primary' | 'secondary' | 'observer'; ide: string; worktree_path?: string; branch?: string; started_at: string; last_heartbeat_at: string; metadata?: Record; agent_role?: string; swarm_id?: string; } export type SlopeSessionUpdate = Partial>; export type StoreErrorCode = 'SESSION_CONFLICT' | 'CLAIM_EXISTS' | 'NOT_FOUND' | 'STORE_UNAVAILABLE' | 'EXTENSION_UNAVAILABLE'; export declare class SlopeStoreError extends Error { code: StoreErrorCode; constructor(code: StoreErrorCode, message: string); } export interface SlopeStore extends SprintRegistry { registerSession(session: Omit): Promise; updateSession(sessionId: string, updates: SlopeSessionUpdate): Promise; removeSession(sessionId: string): Promise; getActiveSessions(): Promise; getSessionsBySwarm(swarmId: string): Promise; updateHeartbeat(sessionId: string): Promise; cleanStaleSessions(maxAgeMs: number): 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; getSchemaVersion(): Promise; getStats(): Promise; close(): void; } //# sourceMappingURL=store.d.ts.map