/** * Auto-Layout for Agent Spec Flows * * Agent Spec has no visual position information. This module assigns * positions to imported nodes using a layered layout algorithm: * * 1. Topological sort from StartNode using control-flow edges * 2. Assign layers based on longest path from StartNode * 3. Position nodes with configurable spacing * 4. Fan out branches vertically from BranchingNode */ import type { AgentSpecFlow } from '../../types/agentspec.js'; /** Layout configuration */ export interface AutoLayoutConfig { /** Horizontal spacing between layers (px) */ horizontalSpacing: number; /** Vertical spacing between nodes in the same layer (px) */ verticalSpacing: number; /** Starting X position */ startX: number; /** Starting Y position */ startY: number; } /** * Compute node positions for an Agent Spec flow using layered layout. * * @param flow - The Agent Spec flow to layout * @param config - Optional layout configuration * @returns Map of node name to {x, y} position */ export declare function computeAutoLayout(flow: AgentSpecFlow, config?: Partial): Map;