/**
 * Compact workflow renderer — the "workflow-as-context" feeder (plan D17,
 * spec workflow-conversational-editing-spec.md §B).
 *
 * Every page-chat user turn injects the LATEST workflow as compact, deterministic text (NOT raw
 * JSON: cheaper tokens, never stale, stable node ids the agent references back in a WorkflowPatch).
 * This module is the deterministic ENGINE half of that loop — the agent reads this rendering and
 * emits a `WorkflowPatch` (workflow-patch.ts) against the shown `rev`. Pure function: no gateway,
 * no LLM, no I/O.
 *
 * Determinism (§1.5): node order follows the def's node array (stable, persisted order); param
 * keys are sorted; expressions (`{{ }}`) render verbatim so the agent can copy them into bindings.
 * Large graphs truncate with an explicit hint to call `workflow.get` for the full definition.
 */
import type { WorkflowDef } from "./node-schema.js";
import type { TriggerDef } from "./workflow-patch.js";
/** The minimal shape needed to render (WorkflowRecord satisfies it). */
export interface RenderableWorkflow {
    name: string;
    rev: number;
    active: boolean;
    trigger?: TriggerDef | null;
    def: WorkflowDef;
}
export interface RenderOptions {
    /** Max nodes to list before truncating (default 50). */
    maxNodes?: number;
    /** Max rendered length of a single param value before eliding (default 60). */
    maxValueLen?: number;
}
/**
 * Render a workflow as compact agent-context text. Shape (spec §B):
 *
 *   Workflow "晨报" (rev 7, trigger: schedule "0 9 * * *", active)
 *   nodes:
 *     n1 [agent]   prompt="抓取今日新闻要点"   out: default
 *     n3 [if]      cond={{ $json.count > 0 }}   out: true,false
 *   edges:
 *     n1.default→n2.default ; n3.true→n4.default
 */
export declare function renderWorkflow(wf: RenderableWorkflow, opts?: RenderOptions): string;
