export type DispatchMode = 'parallel' | 'serial-fallback'; export interface DagNode { id: string; workPackageId: string; dependsOn: string[]; parallel: boolean; payload: TPayload; } export interface DagMetrics { parallelTaskCount: number; maxParallelism: number; criticalPathLength: number; } export interface TaskDispatchAuditEntry { taskId: string; workPackageId: string; batchId: number; dependsOn: string[]; dispatchedAt: string; completedAt?: string; unlockedTasks: string[]; mode: DispatchMode; } export interface DispatchBatch { batchId: number; mode: DispatchMode; tasks: DagNode[]; } export declare function sanitizeDagNodes(nodes: DagNode[]): DagNode[]; export declare function buildDependencyGraph(nodes: DagNode[]): Record; export declare function computeDagMetrics(nodes: DagNode[]): DagMetrics; export declare class TaskDagScheduler { private readonly options; private readonly nodes; private readonly adjacency; private readonly criticalPathDepth; private readonly pending; private readonly running; private readonly completed; private readonly auditLog; private batchCounter; constructor(inputNodes: DagNode[], options?: { singleAgent?: boolean; }); get mode(): DispatchMode; hasPendingWork(): boolean; getAuditLog(): readonly TaskDispatchAuditEntry[]; getDependencyGraph(): Record; getMetrics(): DagMetrics; dispatchNextBatch(dispatchedAt: string): DispatchBatch | null; markCompleted(taskIds: string[], completedAt: string): string[]; private getReadyTaskIds; private getReadyNodes; private pickFallbackNodes; private sortReady; private findLatestAuditEntry; } //# sourceMappingURL=task-dag.d.ts.map