import { type Database as DatabaseType } from 'better-sqlite3'; /** * Document metadata interface. */ export interface DocumentMetadata { path: string; title: string; content: string; summary?: string; status?: 'GAP' | 'WIP' | 'PASS' | 'BLOCKED' | 'MISSING'; dependencies?: string[]; modifiedAt: number; hash: string; } /** * Indexing result interface for batch operations. */ export interface IndexingResult { indexed: number; updated: number; skipped: number; errors: { path: string; error: string; }[]; } /** * Initialize a SQLite database at the given path. * Creates the database file if it doesn't exist. * * @param dbPath - Path to the SQLite database file * @returns Database instance */ export declare function initializeDatabase(dbPath: string): DatabaseType; /** * Create the database schema including documents table and FTS5 virtual table. * Must be called after initializeDatabase. * * @param db - Database instance */ export declare function createSchema(db: DatabaseType): void; /** * Clear all indexed documents. * * @param db - Database instance */ export declare function clearIndex(db: DatabaseType): void; /** * Index a single document into the database. * * @param db - Database instance * @param filePath - Path to the markdown file * @returns Document metadata */ export declare function indexDocument(db: DatabaseType, filePath: string, maxFileSize?: number): Promise; /** * Update document index in database and FTS5. * * @param db - Database instance * @param metadata - Document metadata */ export declare function updateDocumentIndex(db: DatabaseType, metadata: DocumentMetadata): Promise; /** * Remove document from database and FTS5 index. * * @param db - Database instance * @param filePath - Path to the document */ export declare function removeDocument(db: DatabaseType, filePath: string): Promise; /** * Remove indexed documents for a path and all nested descendants. * * @param db - Database instance * @param pathPrefix - Absolute path to file/directory root */ export declare function removeDocumentsByPathPrefix(db: DatabaseType, pathPrefix: string): Promise; /** * Index all documents in a directory. * * @param db - Database instance * @param plansPath - Path to the plans directory * @param ignorePatterns - Patterns to ignore (e.g., ['node_modules', '.git']) * @returns Indexing result */ export declare function indexAllDocuments(db: DatabaseType, plansPath: string, ignorePatterns?: string[]): Promise; /** * Index all documents from multiple paths with configurable file extensions. * * @param db - Database instance * @param paths - Array of paths to index * @param extensions - File extensions to index (e.g., ['.md', '.jsx', '.tsx']) * @param ignorePatterns - Patterns to ignore (e.g., ['node_modules', '.git']) * @param maxDepth - Maximum directory recursion depth * @param maxFileSize - Maximum file size in bytes to index * @returns Combined indexing result */ export declare function indexAllPaths(db: DatabaseType, paths: string[], extensions?: string[], ignorePatterns?: string[], maxDepth?: number, maxFileSize?: number): Promise; //# sourceMappingURL=indexer.d.ts.map