/**
 * Workflow validator — load-time structural checks for inline `workflows:` blocks.
 *
 * See docs/design/multi-repo-components.md §3.4.
 *
 * Two entry points:
 *   - validateWorkflow(wf, components)  → returns array of errors for one workflow
 *   - validateAllWorkflows(map, components) → aggregates across all workflows
 *
 * Errors carry the structured location (`workflow`, `gate`, `step`) plus a
 * human-readable message in the canonical format used in user-facing
 * surfaces:
 *
 *   Workflow "general", gate "implementation", step 3:
 *     component "apii" not found in components[]. Did you mean "api"?
 */
export interface WorkflowComponentRef {
    name: string;
    commands?: Record<string, string>;
}
export interface ValidatorVerifyStep {
    name?: string;
    type?: string;
    component?: string;
    command?: string;
    run?: string;
    prompt?: string;
    role?: string;
    optional?: boolean;
    /** Human-signoff card title. Legacy optional-step toggle label may still appear here on old configs. */
    label?: string;
    /** Optional-step opt-in toggle label (canonical after the label/optionalLabel split). */
    optionalLabel?: string;
    [k: string]: unknown;
}
export interface ValidatorGate {
    id?: string;
    name?: string;
    dependsOn?: string[];
    depends_on?: string[];
    verify?: ValidatorVerifyStep[];
    [k: string]: unknown;
}
export interface ValidatorWorkflow {
    id?: string;
    name?: string;
    gates?: ValidatorGate[];
    [k: string]: unknown;
}
export declare class WorkflowResolveError extends Error {
    readonly workflow: string;
    readonly gate: string;
    readonly stepIndex: number;
    readonly stepName: string;
    readonly reason: string;
    constructor(opts: {
        workflow: string;
        gate: string;
        stepIndex: number;
        stepName: string;
        reason: string;
    });
}
/**
 * Validate a single workflow against the project's component list.
 *
 * Returns an array of WorkflowResolveError; an empty array means valid.
 * The validator deliberately does NOT throw — callers may wish to collect
 * errors across all workflows before surfacing them.
 */
export declare function validateWorkflow(wf: ValidatorWorkflow, components: WorkflowComponentRef[]): WorkflowResolveError[];
/**
 * Validate a full `workflows:` map against the project's component list.
 * Aggregates errors across every workflow.
 */
export declare function validateAllWorkflows(workflows: Record<string, ValidatorWorkflow> | undefined | null, components: WorkflowComponentRef[]): WorkflowResolveError[];
//# sourceMappingURL=workflow-validator.d.ts.map