import { NeuroLink } from "../neurolink.js"; import type { ClassifierRouterConfig, ConversationMemoryConfig, LoopSessionState, SessionVariableValue, SkillsConfig, ToolRoutingConfig } from "../types/index.js"; export declare class GlobalSessionManager { private static instance; private loopSession; /** Optional tool-routing config set by CLI handlers before SDK construction. */ private _toolRoutingConfig; /** Optional classifier-router config set by CLI handlers before SDK construction. */ private _classifierRouterConfig; /** Optional skills config set by CLI handlers before SDK construction. */ private _skillsConfig; static getInstance(): GlobalSessionManager; setLoopSession(config?: ConversationMemoryConfig): string; /** * Restore a loop session with an existing sessionId and NeuroLink instance * Used for conversation restoration */ restoreLoopSession(sessionId: string, neurolinkInstance: NeuroLink, config?: ConversationMemoryConfig, sessionVariables?: Record): void; /** * Update session variables during restoration */ restoreSessionVariables(variables: Record): void; /** * Check if a session is currently active */ hasActiveSession(): boolean; /** * Get current session metadata for restoration purposes */ getSessionMetadata(): { sessionId?: string; conversationMemoryConfig?: ConversationMemoryConfig; sessionVariables: Record; isActive: boolean; }; /** * Update the sessionId of the current session (used during restoration) */ updateSessionId(newSessionId: string): void; getLoopSession(): LoopSessionState | null; clearLoopSession(): void; /** * Store a tool-routing config to be injected at SDK construction time. * Call this BEFORE `getOrCreateNeuroLink()` inside a command handler. * When a loop session is already active the config is ignored (the instance * already exists). */ setToolRoutingConfig(config: ToolRoutingConfig): void; /** * Store a classifier-router config to be injected at SDK construction time. * Call this BEFORE `getOrCreateNeuroLink()` inside a command handler. * When a loop session is already active the config is ignored (the instance * already exists). */ setClassifierRouterConfig(config: ClassifierRouterConfig): void; /** * Store a skills config to be injected at SDK construction time. * Call this BEFORE `getOrCreateNeuroLink()` inside a command handler. * When a loop session is already active the config is ignored (the instance * already exists). */ setSkillsConfig(config: SkillsConfig): void; getOrCreateNeuroLink(): NeuroLink; getCurrentSessionId(): string | undefined; setSessionVariable(key: string, value: SessionVariableValue): void; getSessionVariable(key: string): SessionVariableValue | undefined; getSessionVariables(): Record; unsetSessionVariable(key: string): boolean; clearSessionVariables(): void; } export declare const globalSession: GlobalSessionManager;