Skip to content

formatLineage

formatLineage(lineage, ast, options): FormattedLineage

Defined in: execution/lineage-formatter.ts:257

Format a RuntimeLineage into a human-readable structure.

RuntimeLineage

The runtime lineage from plan execution

PlanAst

The plan’s AST for node descriptions

FormatLineageOptions = {}

Formatting options

FormattedLineage

Structured, human-readable lineage

const result = await run(plan, ctx)
if (!result.ok) {
const formatted = formatLineage(result.lineage, plan.ast)
console.log(formatted.summary)
for (const step of formatted.steps) {
console.log(`${step.step}. ${step.description}`)
if (step.error) console.log(` Error: ${step.error}`)
}
}