@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio
45 lines (44 loc) • 1.86 kB
TypeScript
import { NeuroLink } from "../neurolink.js";
import type { ConversationMemoryConfig, LoopSessionState, SessionVariableValue } from "../types/index.js";
export declare class GlobalSessionManager {
private static instance;
private loopSession;
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<string, SessionVariableValue>): void;
/**
* Update session variables during restoration
*/
restoreSessionVariables(variables: Record<string, SessionVariableValue>): void;
/**
* Check if a session is currently active
*/
hasActiveSession(): boolean;
/**
* Get current session metadata for restoration purposes
*/
getSessionMetadata(): {
sessionId?: string;
conversationMemoryConfig?: ConversationMemoryConfig;
sessionVariables: Record<string, SessionVariableValue>;
isActive: boolean;
};
/**
* Update the sessionId of the current session (used during restoration)
*/
updateSessionId(newSessionId: string): void;
getLoopSession(): LoopSessionState | null;
clearLoopSession(): void;
getOrCreateNeuroLink(): NeuroLink;
getCurrentSessionId(): string | undefined;
setSessionVariable(key: string, value: SessionVariableValue): void;
getSessionVariable(key: string): SessionVariableValue | undefined;
getSessionVariables(): Record<string, SessionVariableValue>;
unsetSessionVariable(key: string): boolean;
clearSessionVariables(): void;
}
export declare const globalSession: GlobalSessionManager;