/** * 会话管理器 - 基于 vibecli/mcp-context-manager.ts 的设计模式 * 负责维护多轮对话状态、用户偏好和渐进式信息收集 */ import type { SpecSpriteSession, ConversationTurn, ReadinessAnalysis, IntentAnalysisResult } from './types.js'; export declare class ConversationManager { private sessions; private readonly SESSION_TIMEOUT_MINUTES; private readonly MAX_CONVERSATION_TURNS; /** * 获取或创建会话 */ getOrCreateSession(sessionId?: string): SpecSpriteSession; /** * 记录用户输入并更新上下文 */ recordUserInput(session: SpecSpriteSession, userInput: string): ConversationTurn; /** * 记录助手响应 */ recordAssistantResponse(session: SpecSpriteSession, response: string, metadata?: any): ConversationTurn; /** * 更新累积上下文 - 基于意图分析结果 */ updateAccumulatedContext(session: SpecSpriteSession, intentAnalysis: IntentAnalysisResult): void; /** * 提取用户偏好 - 从对话中智能提取 */ extractUserPreferences(session: SpecSpriteSession, userInput: string): void; /** * 分析是否准备生成 PRD */ analyzeReadiness(session: SpecSpriteSession): ReadinessAnalysis; /** * 生成智能澄清问题 */ generateClarificationQuestions(session: SpecSpriteSession): string[]; /** * 获取会话摘要 */ getSessionSummary(sessionId: string): string | null; /** * 清理过期会话 */ cleanupExpiredSessions(): number; private createNewSession; private generateSessionId; private generateTurnId; private calculateReadinessScore; private assessInputQuality; } //# sourceMappingURL=conversation-manager.d.ts.map