import type { FormRegistry } from '../forms';
import type { OperationSpecRegistry } from '../operations/registry';
import type { WorkflowSpec } from './spec';
export type WorkflowValidationLevel = 'error' | 'warning';
export interface WorkflowValidationIssue {
    level: WorkflowValidationLevel;
    message: string;
    context?: Record<string, unknown>;
}
export interface ValidateWorkflowSpecOptions {
    operations?: OperationSpecRegistry;
    forms?: FormRegistry;
}
export declare class WorkflowValidationError extends Error {
    readonly issues: WorkflowValidationIssue[];
    constructor(message: string, issues: WorkflowValidationIssue[]);
}
/**
 * Validate workflow structure, references, and reachability.
 * Returns the collected issues. Consumers may call {@link assertWorkflowSpecValid}
 * to throw on validation errors.
 */
export declare function validateWorkflowSpec(spec: WorkflowSpec, options?: ValidateWorkflowSpecOptions): WorkflowValidationIssue[];
export declare function assertWorkflowSpecValid(spec: WorkflowSpec, options?: ValidateWorkflowSpecOptions): void;
import type { CapabilityRegistry } from '../capabilities/capabilities';
import type { EventRegistry } from '../events';
import type { WorkflowRegistry } from './spec';
export interface WorkflowConsistencyDeps {
    workflows: WorkflowRegistry;
    operations?: OperationSpecRegistry;
    forms?: FormRegistry;
    events?: EventRegistry;
    capabilities?: CapabilityRegistry;
}
export interface WorkflowValidationResult {
    valid: boolean;
    issues: WorkflowValidationIssue[];
}
/**
 * Validate workflow consistency across registries.
 *
 * Checks that:
 * - All workflow specs are internally valid
 * - Operations referenced by steps exist
 * - Forms referenced by steps exist
 * - Capabilities required by steps exist
 *
 * @param deps - Registry dependencies
 * @returns Validation result
 */
export declare function validateWorkflowConsistency(deps: WorkflowConsistencyDeps): WorkflowValidationResult;
/**
 * Assert workflow consistency across registries.
 *
 * @param deps - Registry dependencies
 * @throws {WorkflowValidationError} If validation fails
 */
export declare function assertWorkflowConsistency(deps: WorkflowConsistencyDeps): void;
/**
 * Validate SLA configuration is reasonable.
 *
 * @param spec - Workflow spec to validate
 * @returns Array of validation issues
 */
export declare function validateSlaConfig(spec: WorkflowSpec): WorkflowValidationIssue[];
/**
 * Validate compensation configuration.
 *
 * @param spec - Workflow spec to validate
 * @returns Array of validation issues
 */
export declare function validateCompensation(spec: WorkflowSpec): WorkflowValidationIssue[];
/**
 * Validate retry configuration.
 *
 * @param spec - Workflow spec to validate
 * @returns Array of validation issues
 */
export declare function validateRetryConfig(spec: WorkflowSpec): WorkflowValidationIssue[];
/**
 * Perform comprehensive workflow validation.
 *
 * @param spec - Workflow spec to validate
 * @param options - Validation options
 * @returns Validation result
 */
export declare function validateWorkflowComprehensive(spec: WorkflowSpec, options?: ValidateWorkflowSpecOptions): WorkflowValidationResult;
