UNPKG

@hivetechs/hive-ai

Version:

Real-time streaming AI consensus platform with HTTP+SSE MCP integration for Claude Code, VS Code, Cursor, and Windsurf - powered by OpenRouter's unified API

63 lines 2.01 kB
/** * Context Manager for Hive.AI MCP Server * * Manages conversation context persistence across sessions including: * - Tracking conversation history * - Recording pipeline stage results * - Retrieving context for new conversations * - Building context-aware prompts */ interface Message { id: string; conversationId: string; role: string; content: string; timestamp?: string; } interface PipelineResult { id: string; messageId: string; stage: string; model: string; content: string; timestamp?: string; } /** * Initialize the context manager and database */ export declare function initialize(): Promise<boolean>; /** * Get or create a conversation */ export declare function getOrCreateConversation(conversationId?: string): Promise<string>; /** * Add a user message to a conversation */ export declare function addUserMessage(conversationId: string, content: string): Promise<string>; /** * Add an assistant message to a conversation */ export declare function addAssistantMessage(conversationId: string, content: string): Promise<string>; /** * Record a pipeline stage result */ export declare function recordPipelineStage(messageId: string, stage: string, model: string, content: string): Promise<string>; /** * Get conversation history */ export declare function getConversationHistory(conversationId: string, limit?: number): Promise<Message[]>; /** * Get pipeline results for a message */ export declare function getPipelineResults(messageId: string): Promise<PipelineResult[]>; /** * Build a context-aware prompt that includes conversation history and relevant knowledge * with enhanced timestamp handling and prioritization of recent information */ export declare function buildContextAwarePrompt(conversationId: string, currentPrompt: string, historyLimit?: number): Promise<string>; /** * Close the database connection */ export declare function cleanup(): Promise<void>; export {}; //# sourceMappingURL=contextManager.d.ts.map