/** * Dependency Resolver * * Builds ticket DAG, finds ready tickets, and manages dependency blocking. */ import type { TicketStatus } from '../../types/index.js'; import type { QueuedTicket, DependencyNode } from '../types.js'; import type { AutopilotApiClient } from '../api/autopilot-api-client.js'; /** * Options for buildQueue to support readiness-aware prioritization */ export interface BuildQueueOptions { /** Map of ticketId -> readiness score (0-100) */ readinessScores?: Map; /** Whether to use readiness scores as a tiebreaker for queue ordering */ enablePriorityBoost?: boolean; } /** * Dependency graph for tickets */ export declare class DependencyResolver { private apiClient; private nodes; private epicTickets; constructor(apiClient: AutopilotApiClient); /** * Build dependency graph for all tickets in specification */ buildGraph(specificationId: string): Promise; /** * Update ready states based on current dependency status */ updateReadyStates(): void; /** * Check if a node is ready (all dependencies satisfied) */ private isNodeReady; /** * Get all ready tickets */ getReadyTickets(): string[]; /** * Get ready tickets for a specific epic */ getReadyTicketsForEpic(epicId: string): string[]; /** * Mark ticket as completed and update dependents */ markCompleted(ticketId: string): string[]; /** * Mark ticket as failed and cascade to dependents */ markFailed(ticketId: string): string[]; /** * Mark ticket as in progress */ markInProgress(ticketId: string): void; /** * Update ticket status */ updateStatus(ticketId: string, status: TicketStatus): void; /** * Get node by ticket ID */ getNode(ticketId: string): DependencyNode | undefined; /** * Get all tickets for an epic */ getEpicTickets(epicId: string): string[]; /** * Check if epic is complete (all tickets done or skipped) */ isEpicComplete(epicId: string): boolean; /** * Get epic progress */ getEpicProgress(epicId: string): { total: number; completed: number; failed: number; inProgress: number; ready: number; blocked: number; }; /** * Get tickets blocked by a specific ticket */ getBlockedBy(ticketId: string): string[]; /** * Build priority queue of ready tickets */ buildQueue(epicId?: string, options?: BuildQueueOptions): QueuedTicket[]; /** * Detect circular dependencies */ detectCircularDependencies(): string[][]; /** * Get topological order for tickets */ getTopologicalOrder(epicId?: string): string[]; /** * Get statistics about the graph */ getStats(): { totalTickets: number; readyTickets: number; completedTickets: number; blockedTickets: number; inProgressTickets: number; epicCount: number; }; } /** * Create a dependency resolver */ export declare function createDependencyResolver(apiClient: AutopilotApiClient): DependencyResolver; //# sourceMappingURL=dependency-resolver.d.ts.map