/** * Graph cache - memoized dependency graph operations. * Ported from lib/tasks/graph-cache.sh * * @epic T4454 * @task T4529 */ import type { Task } from '@cleocode/contracts'; import { type DependencyWave } from './graph-ops.js'; /** * Graph cache for expensive dependency calculations. * Automatically invalidates when tasks change. */ export declare class GraphCache { private descendantsCache; private childrenCache; private dependentsCache; private wavesCache; private taskChecksum; private ttlMs; constructor(options?: { ttlMs?: number; }); /** * Compute a simple checksum from task data to detect changes. */ private computeChecksum; /** * Check if cache is still valid for given tasks. */ private isValid; /** * Check if a cache entry has expired. */ private isExpired; /** * Invalidate all caches. */ invalidate(): void; /** * Ensure cache is fresh for the given task set. */ private ensureFresh; /** * Get descendants of a task (cached). */ getDescendants(taskId: string, tasks: Task[]): string[]; /** * Get children of a task (cached). */ getChildren(taskId: string, tasks: Task[]): string[]; /** * Get dependents of a task (cached). */ getDependents(taskId: string, tasks: Task[]): string[]; /** * Get dependency waves (cached). */ getWaves(tasks: Task[]): DependencyWave[]; /** * Get cache statistics. */ getStats(): { descendantsSize: number; childrenSize: number; dependentsSize: number; hasWaves: boolean; }; } //# sourceMappingURL=graph-cache.d.ts.map