/** * DAG Scheduler — builds a directed acyclic graph from work packages * and determines which tasks can execute next. * (AC-13.10, AC-13.11, AC-13.12) */ import type { WorkPackage } from '../stages/contract-types.js'; export interface DAGNode { id: string; dependsOn: string[]; parallel: boolean; } export interface DAG { nodes: Map; topologicalOrder: string[]; hasCycle: boolean; } export interface ScheduleDecision { nextBatch: string[]; reason: string; timestamp: string; } /** * Build a DAG from work packages. * Each node represents a work package; edges represent dependsOn relationships. */ export declare function buildDAG(tasks: WorkPackage[]): DAG; /** * Given a set of completed task IDs, return the next batch of tasks * that can be executed (all dependencies satisfied, marked parallel or no deps). */ export declare function scheduleNext(dag: DAG, completed: string[]): ScheduleDecision; export interface DAGAuditEntry { action: 'dag_built' | 'schedule_next' | 'task_completed'; timestamp: string; detail: Record; } /** * Create an audit log entry for DAG scheduling decisions. */ export declare function createDAGAuditEntry(action: DAGAuditEntry['action'], detail: Record): DAGAuditEntry; //# sourceMappingURL=dag-scheduler.d.ts.map