/** * File Modification Detector * * Detects when user has modified generated context files. * Uses content hashing for efficient change detection. */ import type { DatabaseClient } from '../../db/client.js'; /** * File modification status */ export interface FileModificationStatus { /** Tool name */ tool: string; /** Full file path */ filePath: string; /** Whether file exists on disk */ exists: boolean; /** Whether file was generated by k0ntext */ wasGenerated: boolean; /** Current content hash */ currentHash: string | null; /** Hash stored in database when generated */ storedHash: string | null; /** Whether file has been modified since generation */ isModified: boolean; /** Last time file was generated */ generatedAt?: string; /** Last time file was verified */ lastVerifiedAt?: string; } /** * File modification detector options */ export interface ModificationDetectorOptions { /** Include files that don't exist in results */ includeNonExistent?: boolean; } /** * File modification detector * * Checks if user has modified generated context files. */ export declare class FileModificationDetector { private db; private projectRoot; constructor(db: DatabaseClient, projectRoot?: string); /** * Convert absolute path to relative path for database lookup */ private toRelativePath; /** * Check a single file for modifications * * @param tool - Tool name * @param filePath - Full path to file * @returns File modification status */ checkFile(tool: string, filePath: string): Promise; /** * Check all generated files for modifications * * @param options - Detector options * @returns Array of file modification statuses */ checkAll(options?: ModificationDetectorOptions): Promise; /** * Get only modified files * * @returns Array of modified file statuses */ getModifiedFiles(): Promise; /** * Mark a file as verified (update last_verified_at) * * @param tool - Tool name * @param filePath - Full path to file */ markAsVerified(tool: string, filePath: string): void; /** * Mark a file as user-modified * * @param tool - Tool name * @param filePath - Full path to file */ markAsModified(tool: string, filePath: string): void; } //# sourceMappingURL=file-detector.d.ts.map