export interface ContextIndexFileEntry { path: string; size: number; mtimeMs: number; extension: string; depth: number; headings?: string[]; imports?: string[]; symbols?: string[]; testHints?: string[]; } export interface ContextIndexManifest { schemaVersion: 1; root: string; generatedAt: string; exclusionHash: string; totalFiles: number; indexedFiles: number; excludedFiles: number; totalBytes: number; filesPath: string; } export interface ContextIndexBuildResult { manifest: ContextIndexManifest; files: ContextIndexFileEntry[]; indexDirectory: string; } export interface ContextIndexStatus { exists: boolean; stale: boolean; reason: string; manifest?: ContextIndexManifest; current?: { indexedFiles: number; excludedFiles: number; totalBytes: number; }; } export interface ContextIndexSearchMatch { path: string; score: number; matchedSignals: string[]; reasons: string[]; omissionReasons: string[]; } export interface ContextIndexSearchResult { generatedAt: string; query: string; taskId?: string; phase?: string; role?: string; status: "ok" | "stale" | "missing"; reason: string; limit: number; results: ContextIndexSearchMatch[]; omitted: ContextIndexSearchMatch[]; } export interface ContextPackSnippet { startLine: number; endLine: number; text: string; truncated: boolean; } export interface ContextPackItem { path: string; inclusionReason: string; score: number; snippets: ContextPackSnippet[]; } export interface ContextPackBudget { targetChars: number; hardCapChars: number; usedChars: number; maxFiles: number; maxSnippets: number; perSnippetChars: number; truncated: boolean; } export interface ContextPackResult { generatedAt: string; query: string; taskId?: string; phase?: string; role?: string; jsonArtifact: string; markdownArtifact: string; budget: ContextPackBudget; items: ContextPackItem[]; redactions: number; omitted: ContextIndexSearchMatch[]; }