/** * Change Impact Analyzer * * Provides semantic understanding of schema changes and their impact. * Goes beyond simple hash comparison to understand what actually breaks. */ import type { BehaviorChange, ChangeSeverity, ToolFingerprint, BehavioralBaseline, BehavioralDiff, WorkflowSignature } from './types.js'; /** * Type of schema change detected. */ export type SchemaChangeType = 'parameter_removed' | 'parameter_added' | 'parameter_type_changed' | 'parameter_required_added' | 'parameter_required_removed' | 'enum_value_removed' | 'enum_value_added' | 'constraint_added' | 'constraint_removed' | 'constraint_tightened' | 'constraint_relaxed' | 'description_changed' | 'default_changed' | 'format_changed'; /** * Detailed information about a single schema change. */ export interface SchemaChangeDetail { type: SchemaChangeType; parameterPath: string; breaking: boolean; before: unknown; after: unknown; description: string; } /** * Migration complexity levels. */ export type MigrationComplexity = 'trivial' | 'simple' | 'moderate' | 'complex'; /** * Comprehensive impact analysis for a change. */ export interface ChangeImpact { /** Overall severity of the change */ severity: ChangeSeverity; /** List of affected workflow IDs */ affectedWorkflows: string[]; /** List of affected parameter paths */ affectedParameters: string[]; /** Estimated complexity to migrate */ migrationComplexity: MigrationComplexity; /** Suggested migration approach */ suggestedMigration: string; /** Detailed breakdown of schema changes */ schemaChanges: SchemaChangeDetail[]; /** Whether this change is backwards compatible */ backwardsCompatible: boolean; /** Risk score (0-100) */ riskScore: number; } /** * Impact analysis results for the entire diff. */ export interface DiffImpactAnalysis { /** Overall severity of all changes */ overallSeverity: ChangeSeverity; /** Total number of breaking changes */ breakingChangesCount: number; /** Per-tool impact analysis */ toolImpacts: Map; /** Workflows that will fail due to changes */ brokenWorkflows: string[]; /** Overall migration complexity */ overallMigrationComplexity: MigrationComplexity; /** Summary of all changes */ summary: string; /** Action items for addressing the changes */ actionItems: ActionItem[]; } /** * Action item for addressing a change. */ export interface ActionItem { priority: 'critical' | 'high' | 'medium' | 'low'; tool: string; description: string; suggestedAction: string; } export { CHANGE_IMPACT } from '../constants.js'; /** * Analyze the impact of changes between two tool fingerprints. */ export declare function analyzeToolChangeImpact(oldTool: ToolFingerprint, newTool: ToolFingerprint, workflows?: WorkflowSignature[]): ChangeImpact; /** * Analyze a complete diff and provide comprehensive impact analysis. */ export declare function analyzeDiffImpact(diff: BehavioralDiff, oldBaseline: BehavioralBaseline, newBaseline: BehavioralBaseline): DiffImpactAnalysis; /** * Analyze changes between two schemas and return detailed change information. */ export declare function analyzeSchemaChanges(oldSchema: Record | undefined, newSchema: Record | undefined): SchemaChangeDetail[]; /** * Check if a behavior change is actually breaking based on semantic analysis. * This enhances the simple hash-based comparison with semantic understanding. */ export declare function isBreakingChange(change: BehaviorChange): boolean; /** * Get a quick summary of breaking changes for CI output. */ export declare function getBreakingChangeSummary(analysis: DiffImpactAnalysis): string; //# sourceMappingURL=change-impact-analyzer.d.ts.map