export type YamlModel = Record; /** Formatting of the source document, so a rewrite does not reflow it. */ export interface DocumentFormatting { indent: number; indentSeq: boolean; } /** * Apply `model` to `source`, returning the new document text. * * Guarantees: * - an unchanged model returns `source` byte for byte; * - regions outside a change keep their bytes whenever the change is spliceable; * - the result parses back to exactly `model`, verified before returning, so a * planning bug can never silently write something else to disk. */ export declare function renderModelOntoSource(source: string, model: YamlModel): string; /** * Replace every `defaults.env` / `roles.*.env` value — and every `vars:` entry * those values interpolate — with `marker`. * * Splices the scalars out of the original bytes rather than re-rendering, so the * only difference from `source` is the secrets themselves. Redaction must not be * able to introduce (or conceal) a formatting change in a review diff. */ export declare function redactSourceSecrets(source: string, marker: string): string; /** * Best-effort detection of the document's block indentation, used only when a * change is not spliceable and the document has to be re-rendered. Detection * failure falls back to the library defaults; correctness never depends on it. */ export declare function detectFormatting(source: string): DocumentFormatting;