import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
/** Extracted workflow YAML and accompanying explanation from an agent response. */
export interface ExtractedWorkflowYaml {
    /** The raw YAML content extracted from the fenced code block. */
    readonly yaml: string;
    /** Prose explanation surrounding the YAML block (concatenated non-YAML text). */
    readonly explanation: string;
}
/**
 * Extracts the last YAML fenced code block from an agent execution's
 * assistant messages.
 *
 * The Workflow Architect agent is instructed to return validated workflow
 * YAML inside a markdown ````yaml` fence. This function scans all AI
 * messages in reverse order, finds the last such block, and separates
 * the YAML content from the surrounding explanation prose.
 *
 * Returns `null` when no YAML block is found — callers should surface
 * this as an extraction error.
 */
export declare function extractWorkflowYaml(execution: AgentExecution | null): ExtractedWorkflowYaml | null;
//# sourceMappingURL=extract-workflow-yaml.d.ts.map