import type { CommitRecord, CommitMetadata, GitMemoryConfig } from './types.js'; import type { IEmbeddingFunction } from './embeddings.js'; export declare class ContextStore { private col; private llm; private llmModel; private constructor(); /** * Async factory — opens (or creates) the local SQLite context store and detects LLM availability. * LLM detection order (matches Python _default_mem0_config() priority): * 1. OPENAI_API_KEY set → use OpenAI gpt-4o-mini * 2. otherwise → attempt Ollama at OLLAMA_URL * 3. Ollama fails → llm = null (graceful degradation) */ static create(config: GitMemoryConfig, embedFn: IEmbeddingFunction): Promise; /** * Extract LLM interpretation and store it. * Mirrors Python: memory.add(messages=[{"role":"user","content":summary}], metadata) * * Flow: * 1. If llm is null → no-op (graceful degradation) * 2. Dedup check — skip if hash already stored * 3. Extract 1–2 sentence interpretation via LLM * 4. Store extracted text + metadata in collection */ addCommit(params: { hash: string; summary: string; metadata: CommitMetadata; userId: string; }): Promise; /** * Semantic search on extracted context collection. * Returns CommitRecord[] with the LLM interpretation as the summary field. */ search(params: { query: string; userId: string; limit: number; }): Promise; /** * Get all stored context entries (for latest_commits enrichment map). * Matches Python: mem.get_all(user_id=USER_ID) */ getAll(_userId: string): Promise; /** Whether LLM context extraction is available. */ get isActive(): boolean; /** * Call LLM to extract a concise interpretation of a commit. * Prompt matches spirit of mem0's extraction: brief, why-focused. */ private extractContext; } //# sourceMappingURL=context-store.d.ts.map