import { type WorkflowSpec, type WorkflowLintReport } from './workflow-spec.js'; export type ResolvedWorkflowSource = { kind: 'project'; path: string; } | { kind: 'global'; path: string; } | { kind: 'bundled'; path: string; } | { kind: 'missing'; }; export interface ResolvedWorkflow { readonly source: ResolvedWorkflowSource; readonly spec: WorkflowSpec; readonly lint: WorkflowLintReport; } /** Try the project → global → bundled fallback chain and parse + lint. */ export declare function resolveWorkflow(projectRoot: string, id: string): ResolvedWorkflow; /** Render the plan-graph for a resolved workflow (used by `peaks workflow plan`). */ export interface WorkflowPlanGraph { readonly id: string; readonly label: string; readonly phases: ReadonlyArray<{ readonly id: string; readonly role: string; readonly gates: readonly string[]; readonly parallelGroup: string | null; readonly dependsOn: readonly string[]; }>; readonly parallelGroups: ReadonlyArray<{ readonly id: string; readonly phaseIds: readonly string[]; }>; readonly evaluators: ReadonlyArray<{ readonly type: string; readonly gate: string | null; readonly scope: string | null; }>; readonly budget: { readonly tokens: number | null; readonly wallSeconds: number | null; readonly cycles: number | null; }; readonly source: ResolvedWorkflowSource; } export declare function planWorkflow(spec: WorkflowSpec, source: ResolvedWorkflowSource): WorkflowPlanGraph; /** Run a workflow — deterministic step ordering for the runtime. */ export interface WorkflowRunStep { readonly phaseId: string; readonly role: string; readonly status: 'pending' | 'ready' | 'running' | 'completed' | 'failed' | 'skipped'; readonly dependsOn: readonly string[]; readonly parallelGroup: string | null; } export interface WorkflowRunPlan { readonly id: string; readonly steps: readonly WorkflowRunStep[]; /** Topological order, with parallel groups flattened to a single "ready" set. */ readonly order: readonly string[]; } export declare function planWorkflowRun(spec: WorkflowSpec): WorkflowRunPlan;