/** * Session State Management * Maintains state for the interactive REPL session */ import type { AIProvider } from '../ai/providers.js'; import type { ScanResult } from '../scanner/types.js'; import type { RalphConfig } from '../utils/config.js'; /** * Session state for the REPL */ export interface SessionState { /** Root directory of the project */ projectRoot: string; /** Loaded Ralph configuration */ config: RalphConfig | null; /** AI provider being used */ provider: AIProvider | null; /** Model to use for AI operations */ model: string; /** Cached scan result from init */ scanResult?: ScanResult; /** Whether we're in a conversation mode (e.g., spec generation) */ conversationMode: boolean; /** Current conversation context (e.g., 'spec-generation') */ conversationContext?: string; /** Whether /init has been run in this session */ initialized: boolean; /** Cached spec names from the configured specs directory */ specNames?: string[]; } /** * Create a new session state */ export declare function createSessionState(projectRoot: string, provider: AIProvider | null, model: string, scanResult?: ScanResult, config?: RalphConfig | null, initialized?: boolean): SessionState; /** * Update session state immutably */ export declare function updateSessionState(state: SessionState, updates: Partial): SessionState;