/** * NEXUS dependency analysis - global dependency graph across projects. * * Builds a unified graph of all tasks and cross-project edges, * supporting forward/reverse dependency lookups, critical path analysis, * blocking impact analysis, and orphan detection. * * @task T4574 * @epic T4540 */ import { type NexusBlockersShowParams, type NexusDepsParams, type NexusGraphParams, type NexusOrphansListParams, type NexusPathShowParams } from '@cleocode/contracts'; import { type EngineResult } from '../engine-result.js'; import { paginate } from '../pagination.js'; export interface NexusGraphNode { id: string; project: string; status: string; title: string; } export interface NexusGraphEdge { from: string; fromProject: string; to: string; toProject: string; } export interface NexusGlobalGraph { nodes: NexusGraphNode[]; edges: NexusGraphEdge[]; } /** Result of a dependency query. */ export interface DepsResult { task: string; project: string; depends: DepsEntry[]; blocking: DepsEntry[]; } /** Single dependency entry with resolution status. */ export interface DepsEntry { query: string; project: string; status: string; title?: string; } /** Critical path result. */ export interface CriticalPathResult { criticalPath: Array<{ query: string; title: string; }>; length: number; blockedBy: string; } /** Blocking analysis result. */ export interface BlockingAnalysisResult { task: string; blocking: Array<{ query: string; project: string; }>; impactScore: number; } /** Orphan detection result. */ export interface OrphanEntry { sourceProject: string; sourceTask: string; targetProject: string; targetTask: string; reason: 'project_not_registered' | 'task_not_found'; } /** Invalidate the in-memory graph cache. */ export declare function invalidateGraphCache(): void; /** * Build the global dependency graph from all registered projects. * Uses checksum-based caching to avoid unnecessary rebuilds. */ export declare function buildGlobalGraph(_projectRoot?: string, _params?: NexusGraphParams): Promise; /** * Show dependencies for a task across projects. * Supports forward (what this depends on) and reverse (what depends on this) lookups. */ export declare function nexusDeps(_projectRoot: string, params: NexusDepsParams): Promise; /** @deprecated Use `nexusDeps(projectRoot, params)` — ADR-057 D1 */ export declare function nexusDeps(taskQuery: string, direction?: 'forward' | 'reverse'): Promise; /** * Resolve an array of dependencies (local or cross-project). */ export declare function resolveCrossDeps(depsArray: string[], sourceProject: string): Promise; /** * Calculate the critical path across project boundaries. * Returns the longest dependency chain in the global graph. */ export declare function criticalPath(_projectRoot?: string, _params?: NexusPathShowParams): Promise; /** * Analyze the blocking impact of a task across all projects. * Uses BFS to find all direct and transitive dependents. */ export declare function blockingAnalysis(_projectRoot: string, params: NexusBlockersShowParams): Promise; /** @deprecated Use `blockingAnalysis(projectRoot, params)` — ADR-057 D1 */ export declare function blockingAnalysis(taskQuery: string): Promise; /** * Detect orphaned cross-project dependencies. * Finds tasks with dependency references to projects or tasks that don't exist. */ export declare function orphanDetection(_projectRoot?: string, _params?: NexusOrphansListParams): Promise; /** * Get cross-project dependencies for a task query. * * @task T1569 */ export declare function nexusDepsQuery(query: string, direction?: 'forward' | 'reverse'): Promise>>>; /** * Build the global dependency graph. * * @task T1569 */ export declare function nexusGraph(): Promise>>>; /** * Get the critical path across projects. * * @task T1569 */ export declare function nexusCriticalPath(): Promise>>>; /** * Analyze blockers for a task query. * * @task T1569 */ export declare function nexusBlockers(query: string): Promise>>>; /** * List orphaned cross-project tasks. * * @task T1569 */ export declare function nexusOrphans(limit?: number, offset?: number): Promise>; count: number; total: number; filtered: number; page: ReturnType['page']; }>>; //# sourceMappingURL=deps.d.ts.map