import { Orchestrator } from '@enterprise-skills/orchestrator'; import type { WorkflowDefinition } from '@enterprise-skills/orchestrator'; /** * Headless workflow runner (agentic item 4). Drives an agent through a * workflow's DAG autonomously, with the governance posture of * specs/AGENTIC_GOVERNANCE.md built in: * * - Plan visibility (§3): the plan is rendered before execution; execution * requires an explicit opt-in from the caller (--yes / dry-run first). * - Stop conditions (§6): policy/gate blocks, missing evidence, and workflow * gate failures halt the run — they are never bypassed or auto-approved. * - Verification (§7): a step only counts as completed when the executed * skill recorded a SkillOutput; an agent exiting 0 without evidence is a * failure, not a success. * - Audit (§8): every transition goes through the engine's hash-chained log. */ export interface StepExecutionContext { workflow: string; stepId: string; skillId: string; skillPaths: string[]; } export type StepExecutor = (ctx: StepExecutionContext) => Promise<{ ok: boolean; detail: string; }>; export interface HeadlessRunOptions { projectRoot: string; nameOrFile: string; executor: StepExecutor; resolveSkillPaths?: (projectRoot: string, skillId: string) => string[]; maxSteps?: number; log?: (line: string) => void; } export interface HeadlessRunResult { status: 'completed' | 'failed' | 'stopped_at_gate' | 'blocked' | 'aborted' | 'max_steps'; stepsExecuted: number; stopReason: string | null; } export declare function renderPlan(orch: Orchestrator, def: WorkflowDefinition): string[]; export declare function runWorkflowHeadless(options: HeadlessRunOptions): Promise; //# sourceMappingURL=headless-runner.d.ts.map