bc-code-intelligence-mcp
Version:
BC Code Intelligence MCP Server - Complete Specialist Bundle with AI-driven expert consultation, seamless handoffs, and context-preserving workflows
76 lines • 2.53 kB
TypeScript
/**
* Specialist Session Manager
*
* Manages persistent, contextual conversations with BC specialist personas.
* Supports in-memory sessions by default with layer-configurable persistence.
*/
import { SpecialistSession, SessionSummary, SessionMessage, SessionContext, SessionManager, SessionStorageConfig, SessionEvents } from '../types/session-types.js';
import { MultiContentLayerService } from './multi-content-layer-service.js';
export declare class SpecialistSessionManager implements SessionManager {
private storage;
private layerService;
private events;
constructor(layerService: MultiContentLayerService, storageConfig?: SessionStorageConfig);
/**
* Start a new specialist session
*/
startSession(specialistId: string, userId: string, initialMessage?: string): Promise<SpecialistSession>;
/**
* Get existing session
*/
getSession(sessionId: string): Promise<SpecialistSession | null>;
/**
* Continue existing session with new message
*/
continueSession(sessionId: string, message: string): Promise<SpecialistSession>;
/**
* Transfer session to different specialist
*/
transferSession(sessionId: string, toSpecialistId: string): Promise<SpecialistSession>;
/**
* End session
*/
endSession(sessionId: string): Promise<void>;
/**
* List user's sessions
*/
listUserSessions(userId: string): Promise<SessionSummary[]>;
/**
* List user's active sessions
*/
listActiveSessions(userId: string): Promise<SessionSummary[]>;
/**
* Add message to session
*/
addMessage(sessionId: string, message: SessionMessage): Promise<void>;
/**
* Update session context
*/
updateContext(sessionId: string, context: Partial<SessionContext>): Promise<void>;
/**
* Cleanup expired sessions
*/
cleanupSessions(): Promise<number>;
/**
* Subscribe to session events
*/
on<K extends keyof SessionEvents>(event: K, handler: SessionEvents[K]): void;
/**
* Get session statistics
*/
getSessionStats(userId?: string): Promise<{
totalSessions: number;
activeSessions: number;
totalMessages: number;
averageSessionLength: number;
}>;
/**
* Initialize storage based on configuration
*/
private initializeStorage;
/**
* Get all session summaries (for stats)
*/
private getAllSessionSummaries;
}
//# sourceMappingURL=specialist-session-manager.d.ts.map