/** * Visualization IR. * * Renderers (mermaid, ascii, markdown, dot, …) operate on a single, * normalized tree of `VizNode` objects. The `normalize()` function turns * the tagged-config trees produced by every `.build()` into that shape. * * Every renderer is therefore independent of the source builder — the * same code visualizes a `Pipeline` build output, a hand-rolled config * literal, or a deserialized JSON dump from another process. */ /** A single node in the visualization tree. */ export interface VizNode { /** Discriminator. */ kind: "agent" | "sequence" | "parallel" | "loop" | "fallback" | "route" | "primitive" | "tool" | "unknown"; /** Stable identifier (typically the builder `.name`). */ name: string; /** Human-readable label shown in renderers. Defaults to `name`. */ label: string; /** Original `_type` tag from the source object, when available. */ source?: string; /** Free-form metadata renderers can surface (model, instruction, …). */ meta: Record; /** Composite children — pipeline steps, fan-out branches, loop body, etc. */ children: VizNode[]; /** Routing branches: each is a labelled edge to a child node. */ branches?: { label: string; node: VizNode; }[]; /** Default branch on a Route. */ defaultChild?: VizNode; /** Sub-agents that can receive transfer (LlmAgent.sub_agents). */ transfers: VizNode[]; /** Tool nodes attached directly to an agent. */ tools: VizNode[]; /** Number of guards (before+after model callbacks attached via `.guard()`). */ guardCount: number; } /** * Normalize a tagged-config tree (or any builder build output) into the * visualization IR. Unknown shapes degrade to `kind: "unknown"` rather * than throwing. */ export declare function normalize(input: unknown): VizNode; //# sourceMappingURL=ir.d.ts.map