/** * Knowledge base service for CRUD operations * Manages knowledge base metadata, statistics, and lifecycle operations */ import type { KnowledgeBaseMetadata, KnowledgeBaseStats, Config } from '../../shared/types/index.js'; import { LanceDBClientWrapper } from '../../infrastructure/lancedb/lancedb.client.js'; /** * Error thrown when knowledge base operations fail */ export declare class KnowledgeBaseError extends Error { cause?: unknown | undefined; constructor(message: string, cause?: unknown | undefined); } /** * Service for managing knowledge bases */ export declare class KnowledgeBaseService { private lanceClient; constructor(lanceClient: LanceDBClientWrapper, _config: Config); /** * Create an empty knowledge base * Creates a table with a placeholder record so the KB exists */ createKnowledgeBase(name: string): Promise; /** * List all knowledge bases with metadata */ listKnowledgeBases(): Promise; /** * Get detailed statistics for a knowledge base */ getKnowledgeBaseStats(name: string): Promise; /** * Rename a knowledge base and propagate to all chunk metadata */ renameKnowledgeBase(oldName: string, newName: string): Promise; /** * Delete a knowledge base and all its chunks */ deleteKnowledgeBase(name: string): Promise; /** * Delete chunks from a specific ingestion timestamp */ deleteChunkSet(knowledgeBaseName: string, timestamp: string): Promise; /** * Delete all chunks for a specific document from a knowledge base * @param knowledgeBaseName - Name of the knowledge base * @param filePath - Relative path to the document to remove * @returns Number of chunks deleted */ deleteDocument(knowledgeBaseName: string, filePath: string): Promise; /** * List all unique documents in a knowledge base * @param knowledgeBaseName - Name of the knowledge base * @returns Array of document metadata */ listDocuments(knowledgeBaseName: string): Promise; } //# sourceMappingURL=knowledgebase.service.d.ts.map