import { Block } from "tarsec/parsers/markdown"; export type MarkdownParseResult = { success: boolean; blocks: Block[]; error: string; rest: string; }; /** Parse a Markdown string into an array of block nodes using tarsec's * Markdown parser. Returns an object with `success`, the parsed `blocks`, * a textual `error` message (empty on success), and any unconsumed input * in `rest`. */ export declare function _parseMarkdown(input: string): MarkdownParseResult; /** Walk a Markdown AST (array of block nodes), calling `fn` on every node * top-down. `fn` returns a (possibly new) node; children of the returned * node are then walked. The input AST is not mutated. */ export declare function _walkMarkdown(blocks: unknown, fn: unknown): Promise; /** Render a Markdown AST (array of block nodes) to an ANSI-styled string * suitable for direct printing in a terminal. Links use OSC 8 escapes so * capable terminals render them as clickable hyperlinks. Code-block * bodies are emitted verbatim — pre-walk them if you want syntax * highlighting inside. */ export declare function _renderMarkdownForCli(blocks: unknown): string; /** Render a Markdown AST (array of block nodes) to an HTML string. * * Text content is HTML-escaped, and URLs are restricted to http, https, * mailto, tel, and relative paths. Raw HTML in the source (`html-block` and * `inline-html` nodes) is dropped rather than passed through, because the * Markdown handed to this renderer is often model-authored. Frontmatter is * omitted as metadata. */ export declare function _renderMarkdownForHtml(blocks: unknown): string;