/**
 * Dependency graph resolution - topological sort, cycle detection, impact analysis.
 * @task T4464
 * @task T4659
 * @epic T4454
 * @epic T4654
 */
import type { Task, TaskRef } from '@cleocode/contracts';
import { type DataAccessor } from '../store/data-accessor.js';
/**
 * Invalidate the cached TaskFile (call after writes).
 * @task T4659
 * @epic T4654
 */
export declare function invalidateDepsCache(): void;
/** A node in the dependency graph. */
export interface DepNode {
    id: string;
    title: string;
    status: string;
    depends: string[];
    dependents: string[];
}
/** Dependency overview result. */
export interface DepsOverviewResult {
    nodes: DepNode[];
    totalTasks: number;
    withDependencies: number;
    withDependents: number;
    roots: string[];
    leaves: string[];
}
/** Single task dependency result. */
export interface TaskDepsResult {
    task: TaskRef;
    upstream: TaskRef[];
    downstream: TaskRef[];
    blockedBy: TaskRef[];
}
/** Execution wave (group of parallelizable tasks). */
export interface ExecutionWave {
    wave: number;
    tasks: Array<TaskRef & {
        depends: string[];
    }>;
}
/** Critical path result. */
export interface CriticalPathResult {
    path: TaskRef[];
    length: number;
}
/** Cycle detection result. */
export interface CycleResult {
    hasCycles: boolean;
    cycles: string[][];
}
/**
 * Build an adjacency graph from task dependencies.
 * @task T4464
 */
export declare function buildGraph(tasks: Task[]): Map<string, DepNode>;
/**
 * Get dependency overview for all tasks.
 * @task T4464
 */
export declare function getDepsOverview(cwd?: string, accessor?: DataAccessor): Promise<DepsOverviewResult>;
/**
 * Get dependencies for a specific task.
 * @task T4464
 */
export declare function getTaskDeps(taskId: string, cwd?: string, accessor?: DataAccessor): Promise<TaskDepsResult>;
/**
 * Topological sort of tasks respecting dependencies.
 * Returns tasks in execution order. Throws on cycles.
 * @task T4464
 */
export declare function topologicalSort(tasks: Task[]): Task[];
/**
 * Group tasks into parallelizable execution waves.
 * @task T4464
 */
export declare function getExecutionWaves(epicId?: string, cwd?: string, accessor?: DataAccessor): Promise<ExecutionWave[]>;
/**
 * Find the critical path (longest dependency chain) from a task.
 * @task T4464
 */
export declare function getCriticalPath(taskId: string, cwd?: string, accessor?: DataAccessor): Promise<CriticalPathResult>;
/**
 * Find all tasks affected by changes to a given task.
 * @task T4464
 */
export declare function getImpact(taskId: string, maxDepth?: number, cwd?: string, accessor?: DataAccessor): Promise<string[]>;
/**
 * Detect circular dependencies in the task graph.
 * @task T4464
 */
export declare function detectCycles(cwd?: string, accessor?: DataAccessor): Promise<CycleResult>;
/**
 * Build task hierarchy tree.
 * @task T4464
 */
export declare function getTaskTree(rootId?: string, cwd?: string, accessor?: DataAccessor): Promise<TreeNode[]>;
/** Tree node representation. */
export interface TreeNode {
    id: string;
    title: string;
    status: string;
    type?: string;
    children: TreeNode[];
}
/**
 * Manage task relationships (relates/blocks).
 * @task T4464
 */
export declare function addRelation(taskId: string, relatedId: string, _cwd?: string, accessor?: DataAccessor): Promise<{
    taskId: string;
    relatedId: string;
}>;
//# sourceMappingURL=deps.d.ts.map