import type { CommitCategory, CommitRecord } from './types.js'; import type { IEmbeddingFunction } from './embeddings.js'; export declare class ChromaCommitIndex { private col; private constructor(); /** Async factory — opens (or creates) the local SQLite vector store. */ static create(chromaDir: string, embedFn: IEmbeddingFunction): Promise; /** * Insert a commit if not already indexed. Returns false if duplicate. * Exact port of Python upsert_commit(): * 1. Check existence (col.has) * 2. Build document text * 3. col.add() with metadata */ upsertCommit(params: { commitHash: string; authorName: string; authorEmail: string; committedDate: string; message: string; category: CommitCategory; files: string[]; statsStr: string; repo: string; }): Promise; /** * Semantic cosine similarity search. * Clamps nResults to collection count (matches Python behaviour). */ search(params: { query: string; nResults?: number; category?: string; repo?: string; }): Promise; /** * Get N most recent commits sorted by committed_date descending. * Matches Python get_latest(): * - Fetches min(count, max(n*3, 50)) — bounded window * - Sorts by date in JS * - Returns first n */ getLatest(params: { n?: number; repo?: string; }): Promise; /** * Find commits that touched a file. * Matches Python search_by_file(): * 1. Fetch ALL docs (with optional repo filter) * 2. JS-side string matching: filename in files_str * 3. Sort by date, return first n_results * 4. Fallback: semantic search */ searchByFile(params: { filename: string; nResults?: number; repo?: string; }): Promise; /** Count indexed commits, optionally filtered by repo. */ count(repo?: string): Promise; } //# sourceMappingURL=chroma-index.d.ts.map