/** * Iteration pattern collapse and detection. * * Collapses runs of repeated tool calls into single batch steps * with iteration metadata, and detects structural patterns for * informational annotation. */ import type { ExtractedStepLike, PatternAnnotation } from './types'; /** * Collapse iteration patterns in the step sequence. * * Detects runs of 3+ consecutive calls to the same tool, analyzes * which arguments vary vs. stay constant, and replaces the run with * a single step that carries _iteration metadata. * * The YAML generator reads this annotation to produce either: * - A batch tool call (if the tool accepts arrays) * - A cycle/hook pattern (if iteration must happen in the graph) * * This function is entirely tool-agnostic -- it knows nothing about * playwright, screenshots, or any specific MCP server. */ export declare function collapseIterationPatterns(steps: ExtractedStepLike[]): ExtractedStepLike[]; /** * Detect structural patterns and return annotations (informational). */ export declare function detectPatterns(steps: ExtractedStepLike[]): PatternAnnotation[];