/**
 * Database Module
 *
 * Central SQLite database for code-buddy persistence.
 *
 * Features:
 * - Persistent memories with vector embeddings
 * - Session and message history
 * - Code embeddings for semantic search
 * - Analytics and cost tracking
 * - Tool statistics and repair learning
 * - General-purpose cache with TTL
 */
// Schema and types
export * from './schema.js';
// Migration
export { DatabaseMigration, runMigration, needsMigration, getMigrationStatus, } from './migration.js';
// Database manager
export { DatabaseManager, getDatabaseManager, initializeDatabase, resetDatabaseManager, } from './database-manager.js';
// Repositories
export { 
// Memory
MemoryRepository, getMemoryRepository, resetMemoryRepository, 
// Session
SessionRepository, getSessionRepository, resetSessionRepository, 
// Analytics
AnalyticsRepository, getAnalyticsRepository, resetAnalyticsRepository, 
// Embedding
EmbeddingRepository, getEmbeddingRepository, resetEmbeddingRepository, 
// Cache
CacheRepository, getCacheRepository, resetCacheRepository, } from './repositories/index.js';
// ============================================================================
// Convenience Functions
// ============================================================================
import { initializeDatabase, resetDatabaseManager } from './database-manager.js';
import { resetMemoryRepository, resetSessionRepository, resetAnalyticsRepository, resetEmbeddingRepository, resetCacheRepository, } from './repositories/index.js';
// Integration layer
export { DatabaseIntegration, getDatabaseIntegration, initializeDatabaseIntegration, resetDatabaseIntegration, } from './integration.js';
/**
 * Initialize the entire database system
 */
export async function initializeDatabaseSystem(config) {
    await initializeDatabase(config);
}
/**
 * Reset all database components (for testing)
 */
export function resetDatabaseSystem() {
    resetMemoryRepository();
    resetSessionRepository();
    resetAnalyticsRepository();
    resetEmbeddingRepository();
    resetCacheRepository();
    resetDatabaseManager();
}
//# sourceMappingURL=index.js.map