/** * Session Store - JSON Persistence * * Phase 2: Persistent storage for research sessions using JSON file * * Storage location: ~/.local/share/australian-history-mcp/sessions.json */ import type { Session, SessionQuery, ResultFingerprint, SourceCoverage, ListSessionOptions } from './types.js'; /** * Session store with JSON persistence */ export declare class SessionStore { private data; /** * Get the sessions file path */ static getFilePath(): string; /** * Check if sessions file exists */ static exists(): boolean; /** * Load sessions from disk */ private load; /** * Save sessions to disk (atomic write via temp file + rename) */ private save; /** * Clear cached data (for testing) */ clearCache(): void; /** * Create a new session */ create(options: { name: string; topic: string; planId?: string; planPath?: string; }): Session; /** * Get a session by ID */ get(id: string): Session | undefined; /** * Get a session by name */ getByName(name: string): Session | undefined; /** * Get the currently active session */ getActive(): Session | undefined; /** * Set a session as active */ setActive(id: string): void; /** * Clear the active session flag */ clearActive(): void; /** * Update a session */ update(id: string, updates: Partial>): Session; /** * End a session (set status to completed or archived) */ end(id: string, status?: 'completed' | 'archived'): Session; /** * Pause a session */ pause(id: string): Session; /** * Resume a paused session */ resume(id: string): Session; /** * List sessions with optional filtering */ list(options?: ListSessionOptions): { sessions: Session[]; total: number; hasMore: boolean; }; /** * Log a query to a session */ logQuery(sessionId: string, query: SessionQuery): void; /** * Add a fingerprint to a session */ addFingerprint(sessionId: string, fingerprint: ResultFingerprint): void; /** * Check if a fingerprint exists in a session */ hasFingerprint(sessionId: string, fingerprintId: string): boolean; /** * Get all fingerprints for a session */ getFingerprints(sessionId: string): ResultFingerprint[]; /** * Update coverage for a source */ updateCoverage(sessionId: string, source: string, status: SourceCoverage['status'], resultsFound?: number, error?: string): void; /** * Get coverage summary for a session */ getCoverageSummary(sessionId: string): { searched: string[]; pending: string[]; failed: string[]; }; /** * Add a note to a session */ addNote(sessionId: string, note: string): number; /** * Get count of all sessions */ count(): number; /** * Delete a session by ID */ delete(id: string): boolean; } export declare const sessionStore: SessionStore; //# sourceMappingURL=store.d.ts.map