/**
* Framework Validator
* Centralized validation and normalization for framework identifiers.
*
* This class serves as the single entrypoint for verifying framework identifiers
* across parsing, execution, and state-management components. All lookups are
* delegated to the FrameworkManager to ensure a single source of truth.
*/
import { Logger } from '../logging/index.js';
import { type ErrorContext } from '../utils/errorHandling.js';
import type { FrameworkManager } from './framework-manager.js';
import type { FrameworkDefinition } from './types/index.js';
export interface FrameworkValidationOptions {
/** Reject disabled frameworks when true */
requireEnabled?: boolean;
/** Optional identifier for logging/error context (ex: pipeline stage name) */
stage?: string;
/** Additional context merged into raised ValidationError instances */
context?: Partial<ErrorContext>;
}
export interface FrameworkExistenceOptions {
/** Only consider enabled frameworks */
enabledOnly?: boolean;
}
export interface FrameworkValidationResult {
normalizedId: string;
definition: FrameworkDefinition;
}
interface FrameworkValidatorConfig {
/** Default action label injected into ValidationError context */
defaultStage?: string;
}
export declare class FrameworkValidator {
private readonly frameworkManager;
private readonly logger;
private readonly defaultStage;
constructor(frameworkManager: FrameworkManager, logger: Logger, config?: FrameworkValidatorConfig);
/**
* Validate and normalize an identifier, returning the framework definition.
* Throws ValidationError when identifier is missing, unknown, or disabled.
*/
validateAndNormalize(frameworkId: string, options?: FrameworkValidationOptions): FrameworkValidationResult;
/**
* Return true when the identifier exists in the registry.
*/
exists(frameworkId: string, options?: FrameworkExistenceOptions): boolean;
/**
* Try to normalize the identifier without raising errors.
*/
tryNormalize(frameworkId: string | undefined | null): string | null;
private buildMissingFrameworkError;
private buildDisabledFrameworkError;
private buildErrorContext;
}
export {};