/** * Compile a taskflow DAG to portable artifacts — zero-token, no LLM. * * `compileTaskflow` turns the declarative graph into: * - a **Mermaid `flowchart`** that GitHub / GitLab / many markdown viewers * render natively, so the DAG you declared can be screenshotted, pasted * into a PR/issue/README, and diffed as text; * - a **verification report** (the existing `verifyTaskflow` passes) whose * issues are *overlaid onto the diagram* — a phase with an error is painted * red, a warning amber — so the picture and the problems are one artifact. * * This is the visualization leg of the project thesis ("the plan is data, so it * can be verified, visualized, and replayed"): the same JSON renders a graph and * a structural audit without spending a token. It is a pure function — no I/O. */ import type { Taskflow } from "./schema.ts"; import { type TaskflowVerifier, type VerificationResult } from "./verify.ts"; export interface CompileResult { /** A Mermaid `flowchart` source block (no fences). */ mermaid: string; /** The static verification result the diagram is annotated with. */ verification: VerificationResult; /** A self-contained markdown document: diagram (fenced) + verification report. */ markdown: string; } export interface CompileOptions { /** Diagram direction. Default "TD" (top-down). "LR" for wide fan-outs. */ direction?: "TD" | "LR"; /** Document title (defaults to the flow name). */ title?: string; /** Caller-supplied verifiers forwarded into `verifyTaskflow`; their issues * overlay on the Mermaid diagram + report exactly like built-in issues. */ verifiers?: TaskflowVerifier[]; /** Include the built-in script-lint verifier. Default `true`. Set `false` * to disable (e.g. when the host registers its own verifiers and wants * full control). */ lint?: boolean; } /** * Compile a (already schema-valid) taskflow into a Mermaid diagram + verification * report. Pure function — zero tokens, no LLM, no I/O. */ export declare function compileTaskflow(flow: Taskflow, opts?: CompileOptions): CompileResult; //# sourceMappingURL=compile.d.ts.map