import type { PromptSegment } from "../types.js"; import type { ValidationResult } from "./types.js"; /** * The interpolations in a string literal's segments, as source text * (`generateExpression` keeps string quotes, so `format("x")` and * `format(x)` stay distinct), sorted so two lists compare as multisets. */ export declare function interpolationsOf(segments: PromptSegment[]): string[]; /** * Reads the plain text a mutator model returns for a free-text target. * Every `${...}` in the text is an interpolation; there is no way to write * a literal `${` in a replacement, and discovery warns when a target's * text contains one. Everything else, including quotes, backslashes, and * newlines, is text. */ export declare function parseReplacementText(text: string): { ok: true; segments: PromptSegment[]; } | { ok: false; reason: string; }; /** * A replacement must keep the target's interpolations: the same * placeholders, the same number of times, and no new ones. */ export declare function compareInterpolations(current: string[], proposed: string[]): ValidationResult;