import { collectDependencies } from '../detection-utils.js';
const PINECONE_DEPS = ['@pinecone-database/pinecone', 'pinecone-client', 'pinecone'];
const WEAVIATE_DEPS = ['weaviate-client', 'weaviate-ts-client', 'weaviate'];
const QDRANT_DEPS = ['@qdrant/js-client-rest', 'qdrant-client', 'qdrant_client'];
const MILVUS_DEPS = ['@zilliz/milvus2-sdk-node', 'pymilvus', 'milvus'];
const CHROMA_DEPS = ['chromadb', 'chromadb-client'];
const PGVECTOR_DEPS = ['pgvector', 'pgvector-node', 'pgvector-python'];
export async function detectVectorDb(projectPath) {
    const deps = await collectDependencies(projectPath);
    if (PINECONE_DEPS.some((d) => deps.has(d))) {
        return 'pinecone';
    }
    if (WEAVIATE_DEPS.some((d) => deps.has(d))) {
        return 'weaviate';
    }
    if (QDRANT_DEPS.some((d) => deps.has(d))) {
        return 'qdrant';
    }
    if (MILVUS_DEPS.some((d) => deps.has(d))) {
        return 'milvus';
    }
    if (CHROMA_DEPS.some((d) => deps.has(d))) {
        return 'chromadb';
    }
    if (PGVECTOR_DEPS.some((d) => deps.has(d))) {
        return 'pgvector';
    }
    return null;
}
/** Check if pgvector is an extension of existing PostgreSQL (not standalone) */
export function isPgVectorExtension(vectorDb) {
    return vectorDb === 'pgvector';
}
//# sourceMappingURL=vector-db-detector.js.map