import { AgencyGenerator } from "../backends/agencyGenerator.js"; import { MultiLineStringLiteral, PromptSegment } from "../types/literals.js"; /** * Apply doc-string trimming to a segment list: strip leading whitespace * from the first text segment and trailing whitespace from the last * text segment, then drop any empty text segments left behind. This * normalizes source like `"""\n Hello\n """` to `"Hello"` for the * audiences that want clean text (the LLM and human-readable docs), * while leaving the underlying AST unchanged so the formatter can * round-trip the original source. */ export declare function trimDocStringSegments(segments: PromptSegment[]): PromptSegment[]; /** * Render a doc string (a `MultiLineStringLiteral`) back to plain text, * reconstructing `${expr}` source form for interpolation segments using * the agency generator's expression printer. Leading/trailing * indentation is trimmed so the rendered text matches what users * expect to see in human-facing doc output. * * Used by the doc CLI and LSP for human-readable doc output. */ export declare function docStringText(docString: MultiLineStringLiteral, gen?: AgencyGenerator): string; /** Canonical doc-comment → plain text, the doc-comment sibling of * docStringText above: trimmed content, no markers. Doc comments cannot * interpolate, so this is simple — the helper exists so every consumer * normalizes the same way. */ export declare function docCommentText(comment: { content: string; }): string;