import type { StoragePlugin, KnowledgeEntry, KnowledgeCategory, SourceType, ContradictionWarning } from '../../core/types.js'; import type { LLMService } from '../../core/llm-provider.js'; export declare function computeAuthority(entry: KnowledgeEntry, sessionCount: number): number; export declare class KnowledgeBase { private storage; private llmService?; constructor(storage: StoragePlugin, llmService?: LLMService); save(entry: { category: KnowledgeCategory; title: string; content: string; tags?: string[]; shareable?: boolean; source_type?: SourceType; }): Promise; checkContradictions(title: string, content: string, category: KnowledgeCategory): Promise; /** * Use vector embeddings to find semantically similar knowledge entries. * Returns entries with cosine similarity >= 0.75. * Silently returns [] if embeddings are unavailable. */ private findSemanticCandidates; generateProfile(): string; saveProfile(content: string): void; getProfile(): { content: string; updated_at: number; } | null; search(query: string, opts?: { category?: KnowledgeCategory; limit?: number; }, sessionId?: string): KnowledgeEntry[]; access(id: string): KnowledgeEntry | null; /** Get entry by ID (including archived entries). Does NOT increment access count. */ getById(id: string): KnowledgeEntry | null; /** Archive a knowledge entry by setting archived = 1. */ archive(id: string): boolean; /** Update tags on a knowledge entry (merges with existing). */ addTags(id: string, tags: string[]): boolean; computeConfidence(entry: KnowledgeEntry, sessionCount?: number): number; prune(): number; private searchFTS5; private searchTrigram; private searchScan; private rowToEntry; } //# sourceMappingURL=knowledge-base.d.ts.map