/** * PatchFragment to MEL Renderer * * Converts PatchFragment to MEL syntax with metadata comments. */ import { PatchOp, RenderOptions } from "./patch-op.js"; export interface PatchFragment { /** * Unique fragment identifier (content-addressed) */ fragmentId: string; /** * Source intent identifier */ sourceIntentId: string; /** * Fragment operation */ op: PatchOp; /** * Confidence score (0-1) */ confidence: number; /** * Evidence strings */ evidence: string[]; /** * Creation timestamp (ISO 8601) */ createdAt: string; } export interface FragmentRenderOptions extends RenderOptions { /** * Include fragment metadata as comments */ includeMetadata?: boolean; /** * Include evidence as comments */ includeEvidence?: boolean; /** * Include confidence score */ includeConfidence?: boolean; /** * Include fragment ID */ includeFragmentId?: boolean; } /** * Renders a PatchFragment to MEL syntax string with optional metadata. * * @param fragment - The PatchFragment to render * @param options - Rendering options * @returns MEL syntax string with metadata comments */ export declare function renderFragment(fragment: PatchFragment, options?: FragmentRenderOptions): string; /** * Renders multiple PatchFragments to MEL syntax string. * * @param fragments - The PatchFragments to render * @param options - Rendering options * @returns MEL syntax string with all fragments */ export declare function renderFragments(fragments: PatchFragment[], options?: FragmentRenderOptions): string; /** * Renders PatchFragments grouped by operation kind. * * @param fragments - The PatchFragments to render * @param options - Rendering options * @returns Object with rendered strings grouped by operation kind */ export declare function renderFragmentsByKind(fragments: PatchFragment[], options?: FragmentRenderOptions): Record; /** * Renders PatchFragments as a complete MEL domain block. * * @param domainName - The domain name * @param fragments - The PatchFragments to render * @param options - Rendering options * @returns Complete MEL domain string */ export declare function renderAsDomain(domainName: string, fragments: PatchFragment[], options?: FragmentRenderOptions): string;