/** * ValidationErrorFormatter — LLM-Friendly Zod Error Translation * * Translates raw ZodIssue arrays into directive correction prompts * that guide the LLM to fix its input on the next call. * * Instead of returning: * "Validation failed: email: Invalid" * * It produces structured XML: * * Invalid email format. You sent: 'admin@local'. Expected: a valid email address. * Number must be >= 18. You sent: 10. * Fix the fields above and call the tool again. Do not explain the error. * * * This dramatically reduces LLM retry loops by providing actionable, * unambiguous correction instructions. * * Pure-function module: no state, no side effects. * * @module */ import { type ZodIssue } from 'zod'; /** * Format Zod validation issues into an LLM-friendly correction prompt. * * @param issues - Array of ZodIssue from safeParse failure * @param actionKey - The action key (e.g. "users.create") for context * @param sentArgs - The raw args the LLM sent (for "You sent:" hints) * @returns A formatted string optimized for LLM self-correction */ export declare function formatValidationError(issues: readonly ZodIssue[], actionKey: string, sentArgs: Record): string; //# sourceMappingURL=ValidationErrorFormatter.d.ts.map