import { LLMClient } from "../grok/client.js"; import { TokenCounter } from "../utils/token-counter.js"; import { HookManager } from "./hook-manager.js"; import { SessionState } from "../utils/chat-history-manager.js"; /** * Dependencies required by SessionManager for managing session state */ export interface SessionManagerDependencies { /** Get LLM client instance */ getLLMClient(): LLMClient; /** Get token counter instance */ getTokenCounter(): TokenCounter; /** Get API key environment variable name */ getApiKeyEnvVar(): string; /** Hook manager for persona/mood/task hooks */ hookManager: HookManager; /** Get current persona */ getPersona(): string; /** Get persona display color */ getPersonaColor(): string; /** Get current mood */ getMood(): string; /** Get mood display color */ getMoodColor(): string; /** Get active task name */ getActiveTask(): string; /** Get active task action */ getActiveTaskAction(): string; /** Get active task display color */ getActiveTaskColor(): string; /** Get current model name */ getCurrentModel(): string; /** Emit events */ emit(event: string, data: any): void; /** Set LLM client */ setLLMClient(client: LLMClient): void; /** Set token counter */ setTokenCounter(counter: TokenCounter): void; /** Set API key environment variable */ setApiKeyEnvVar(value: string): void; /** Set persona values */ setPersona(persona: string, color: string): void; /** Set mood values */ setMood(mood: string, color: string): void; /** Set active task values */ setActiveTask(task: string, action: string, color: string): void; } /** * Manages session state persistence and restoration * * Handles: * - Session state serialization for persistence * - Backend/model/API configuration restoration * - Persona/mood/task state restoration with hooks * - Working directory restoration * - MCP server reinitialization */ export declare class SessionManager { private deps; constructor(deps: SessionManagerDependencies); /** * Get current session state for persistence * Captures all session-specific configuration and state * * @returns SessionState object with current values */ getSessionState(): SessionState; /** * Restore session state from persistence * Restores backend configuration, working directory, and agent state * * @param state Previously saved session state */ restoreSessionState(state: SessionState): Promise; }