"use strict";
// src/orchestrator/rag/VectorStoreRegistry.ts
// v1.13.0 — Vector store resolver.
Object.defineProperty(exports, "__esModule", { value: true });
exports.VectorStoreRegistry = void 0;
const VALID = new Set(['sqlite', 'qdrant']);
class VectorStoreRegistry {
    static selectName() {
        const raw = (process.env.OPENLIFE_VECTOR_STORE || 'sqlite').toLowerCase().trim();
        if (VALID.has(raw))
            return raw;
        if (raw !== 'sqlite') {
            console.warn(`[VECTOR-REGISTRY] OPENLIFE_VECTOR_STORE="${raw}" não reconhecido — caindo pra 'sqlite'.`);
        }
        return 'sqlite';
    }
    static create(dim, name) {
        const which = name || VectorStoreRegistry.selectName();
        if (which === 'qdrant') {
            throw new Error('[VECTOR-REGISTRY] Qdrant adapter not implemented yet — use OPENLIFE_VECTOR_STORE=sqlite (default).');
        }
        const { SqliteVectorStore } = require('./SqliteVectorStore');
        return new SqliteVectorStore({ dim });
    }
}
exports.VectorStoreRegistry = VectorStoreRegistry;
