import { ToolRegistration } from '../../core/types.js';
import { setupRAGRetrievalTools } from './tools.js';

/**
 * RAG Retrieval Module - 12-Factor MCP Implementation
 * 
 * This module replaces the legacy RAG retrieval implementation
 * with a 12-factor compliant version that uses:
 * 
 * - Standardized tool interface
 * - SQLite-based vector storage
 * - Schema validation
 * - Structured outputs
 * - Stateless execution
 * - Efficient chunk management
 * 
 * Key differences from legacy:
 * - Uses SQLite for storing documents, chunks, and metadata
 * - Embeddings stored as binary BLOBs for efficiency
 * - Collections managed through database relationships
 * - Search history tracking for analytics
 * - Caching layer for embeddings
 */

/**
 * Setup the RAG retrieval module
 */
export async function setupRAGRetrieval(): Promise<ToolRegistration> {
  return await setupRAGRetrievalTools();
}

// Export for backward compatibility
export { setupRAGRetrievalTools } from './tools.js';