import type { GraphDescription } from '../types/graph.js'; /** Anything that can describe itself: a compiled graph, or a description already taken from one. */ export type Describable = GraphDescription | { describe(): GraphDescription; }; /** Options for `toMermaid()`. */ export interface MermaidOptions { /** Layout direction. Defaults to top-down. */ direction?: 'TD' | 'LR'; /** Draw each subgraph's nodes inside it, or show it as a single node. Defaults to `expand`. */ subgraphs?: 'expand' | 'collapse'; /** * Nodes to highlight — typically `checkpoint.next` or the nodes of the step being inspected, so a * diagram shows where a thread is. */ highlight?: readonly string[]; } /** * Renders a graph as a Mermaid flowchart. * * Mermaid rather than an image, because GitHub, GitLab, most documentation sites, and many chat tools * render it natively, and it diffs as text. For PNG or SVG output, pass the result to any Mermaid * renderer; none is bundled, so the graph runtime pays nothing for diagrams. * * Solid arrows are edges that are always taken, dotted ones are chosen at run time, and a node whose * router has neither a mapping nor declared `ends` points at a `?`, because its targets cannot be * known without running it. */ export declare function toMermaid(graph: Describable, options?: MermaidOptions): string; /** The description as JSON, for a UI or a test that wants the shape rather than a picture. */ export declare function toGraphJSON(graph: Describable): GraphDescription;