/** * REPL Session Manager * * Manages REPL session lifecycle, state persistence, and activity tracking */ /** * Session state */ export interface SessionState { sessionId: string; startTime: string; lastActivity: string; projectRoot: string; config: SessionConfig; history: CommandHistoryEntry[]; stats: SessionStats; } /** * Session configuration */ export interface SessionConfig { apiKey?: string; projectType?: ProjectType; aiTools: string[]; features: string[]; autoUpdate: boolean; theme: string; } /** * Project type */ export type ProjectType = 'monorepo' | 'webapp' | 'library' | 'api' | 'cli' | 'unknown'; /** * Command history entry */ export interface CommandHistoryEntry { command: string; timestamp: string; result?: string; duration?: number; } /** * Session statistics */ export interface SessionStats { commandsExecuted: number; searchesPerformed: number; filesIndexed: number; embeddingsGenerated: number; errorsEncountered: number; } /** * REPL Session Manager */ export declare class REPLSessionManager { private state; private statePath; private projectRoot; constructor(projectRoot: string); /** * Create a new session */ private createNewSession; /** * Load session from disk */ private load; /** * Save session to disk */ save(): void; /** * Get session state */ getState(): SessionState; /** * Update session config */ updateConfig(config: Partial): void; /** * Add command to history */ addCommand(command: string, result?: string, duration?: number): void; /** * Get command history */ getHistory(limit?: number): CommandHistoryEntry[]; /** * Update session stats */ updateStats(stats: Partial): void; /** * Get session stats */ getStats(): SessionStats; /** * Get session duration */ getDuration(): { ms: number; human: string; }; /** * Check if session is initialized (has API key and project type) */ isInitialized(): boolean; /** * Set initialization status */ setInitialized(apiKey: string, projectType: ProjectType): void; /** * Get OpenRouter API key */ getApiKey(): string | undefined; /** * Clear session (for reset/reinit) */ clear(): void; /** * End session */ end(): void; } //# sourceMappingURL=session.d.ts.map