/** * Graph Workflow Validation * * Validates graph workflow configurations to ensure they form valid DAGs * with proper structure and required default branches at decision points. */ import type { GraphWorkflowConfig } from './graph'; export interface DirectedGraphShape { readonly id: string; readonly nodeIds: readonly string[]; readonly edges: readonly { readonly from: string; readonly to: string; }[]; readonly entry: string; } /** * Shared structural DAG validation used by both graph configs and WorkflowIR. * Returns the first issue so each caller can preserve its public error type. */ export declare function findDirectedGraphIssue(shape: DirectedGraphShape, options: { readonly label: string; readonly requireReachable?: boolean; }): string | undefined; /** * Validation error for graph workflows */ export declare class GraphValidationError extends Error { workflowId: string; constructor(message: string, workflowId: string); } /** * Validate a graph workflow configuration. * * Checks: * - Entry node exists * - All node IDs are unique * - All edge references point to valid nodes * - Graph is a DAG (no cycles) * - Fork/join nodes reference valid targets * - Each decision point has a default branch * - Handoff targets reference valid agent nodes * * @param config - Graph workflow configuration to validate * @throws GraphValidationError if validation fails */ export declare function validateGraphWorkflow(config: GraphWorkflowConfig): void; //# sourceMappingURL=graph-validator.d.ts.map