/** * Step summarization helpers for LLM compilation context. * * Truncates and structures execution step data so the LLM receives * concise but structurally complete information about each step. */ import type { ExtractedStep } from '../../types'; export interface StepSummary { index: number; kind: 'tool' | 'llm' | 'signal'; toolName: string; server?: string; argumentKeys: string[]; arguments: Record; resultKeys: string[]; /** Truncated result structure showing arrays and nested objects. */ resultSample: unknown; /** If this step has _iteration metadata from pattern detector. */ iterationMeta?: { tool: string; count: number; varyingKeys: string[]; constantArgs: Record; arraySource: { stepIndex: number; field: string; } | null; }; } /** Truncate a value for display in the LLM prompt. */ export declare function truncateValue(value: unknown): unknown; /** * Truncate an object's values for LLM context, preserving structure. */ export declare function truncateObject(obj: Record, maxDepth?: number): Record; /** * Summarize extracted steps for the LLM, including result structure. */ export declare function summarizeSteps(steps: ExtractedStep[]): StepSummary[];