/** * Staleness detection for claude-memory * Detects which projects need rescanning based on age and git activity */ import { GlobalContext, ProjectInfo } from '../types/index.js'; export interface StaleProject { name: string; path: string; daysSinceScanned: number; reason: 'age' | 'git_activity' | 'file_changed' | 'never_scanned'; details?: string; } export interface StalenessReport { /** Overall data age in hours */ dataAgeHours: number; /** Projects that need rescanning */ staleProjects: StaleProject[]; /** Projects that are fresh */ freshCount: number; /** Human-readable summary */ summary: string; /** Suggested CLI command */ suggestion?: string; } /** * Detect all stale projects in the global context */ export declare function detectStaleProjects(context: GlobalContext): StalenessReport; /** * Get a quick staleness check for the current working directory */ export declare function checkCurrentProjectStaleness(context: GlobalContext, cwd: string): { isStale: boolean; project?: ProjectInfo; reason?: string; }; /** * Format staleness report for MCP output */ export declare function formatStalenessForMcp(report: StalenessReport): string;