UNPKG

context-crystallizer

Version:

AI Crystallization Engineering for Large Repositories - Transform massive repositories into crystallized, AI-consumable knowledge through systematic analysis and optimization. Crystallization extracts meaningful context from any readable files.

53 lines 1.56 kB
import { FileQueueItem } from '../types/index.js'; export interface FileChange { path: string; relativePath: string; type: 'added' | 'modified' | 'deleted'; oldHash?: string; newHash?: string; lastModified: Date; size: number; } export interface ChangeDetectionResult { changes: FileChange[]; stats: { added: number; modified: number; deleted: number; totalChanges: number; }; hashManifest: FileHashManifest; } export interface FileHashManifest { version: string; generatedAt: Date; files: Record<string, FileHashEntry>; } export interface FileHashEntry { hash: string; size: number; lastModified: string; hasContext: boolean; } export declare class ChangeDetector { private repoPath; private manifestPath; private contextBasePath; constructor(repoPath: string); detectChanges(currentFiles: FileQueueItem[]): Promise<ChangeDetectionResult>; getFilesNeedingContext(currentFiles: FileQueueItem[]): Promise<FileQueueItem[]>; getOutdatedContexts(changes: FileChange[]): Promise<string[]>; cleanupObsoleteContexts(deletedFiles: string[]): Promise<number>; getChangesSummary(): Promise<{ lastScan: Date | null; totalTrackedFiles: number; filesWithContext: number; contextCoverage: number; }>; private calculateFileHash; private hasExistingContext; private loadManifest; private saveManifest; resetManifest(): Promise<void>; } //# sourceMappingURL=change-detector.d.ts.map