import type { SQLiteStore } from '../storage/sqlite.js'; export interface StalenessFactors { daysSinceCreation: number; daysSinceLastAccess: number; accessCount: number; hasGraphConnections: boolean; } /** * Compute a staleness score between 0 (fresh) and 1 (stale). * * Formula: * base = daysSinceLastAccess / thresholdDays (clamped to [0, 1]) * frequency discount = min(accessCount / 10, 0.3) — accessed more = less stale * graph discount = 0.1 if entity has graph connections * staleness = max(0, base - frequency discount - graph discount) */ export declare function computeStaleness(factors: StalenessFactors, thresholdDays: number): number; export declare class AccessTracker { private sqlite; private thresholdDays; constructor(sqlite: SQLiteStore, thresholdDays?: number); /** * Log an access event for one or more memory IDs. * Uses synchronous SQLite inserts — fast for single rows. */ logAccess(memoryIds: string[], tool: string, project: string | null): void; /** * Recalculate staleness scores for all memories. * Called periodically (e.g. during consolidation) or via CLI. */ updateAllStaleness(): { updated: number; averageStaleness: number; }; } //# sourceMappingURL=access-tracker.d.ts.map