/**
 * Signal Diversity Requirements for Trust Tier Promotion
 *
 * Prevents gaming by requiring diverse signal sources and types
 * before allowing tier promotion. Agents cannot inflate their trust
 * score from a single source or signal dimension.
 *
 * @packageDocumentation
 */
import type { TrustSignal as TrustSignalType, TrustLevel } from '../common/types.js';
import { CertificationTier } from '@vorionsys/contracts/car';
/**
 * Signal diversity configuration
 */
export interface SignalDiversityConfig {
    /** Minimum unique signal sources required for each tier */
    minSourcesForTier: Record<TrustLevel, number>;
    /** Minimum signal dimensions (behavioral, compliance, identity, context) required */
    minDimensionsForTier: Record<TrustLevel, number>;
    /** Time window for diversity calculation (default: 30 days) */
    diversityWindowDays: number;
    /** Minimum signals per dimension to count as "covered" */
    minSignalsPerDimension: number;
}
/**
 * Default diversity requirements
 *
 * Higher tiers require more diverse signal sources to prevent
 * single-source trust inflation attacks.
 */
export declare const DEFAULT_DIVERSITY_CONFIG: SignalDiversityConfig;
/** Trust signal dimensions */
export type SignalDimension = 'behavioral' | 'compliance' | 'identity' | 'context';
/** All signal dimensions */
export declare const ALL_DIMENSIONS: SignalDimension[];
/**
 * Extract dimension from signal type
 *
 * Signal types are expected to be prefixed with dimension, e.g.:
 * - "behavioral.action_success"
 * - "compliance.audit_passed"
 * - "identity.verification_complete"
 * - "context.environment_stable"
 */
export declare function getSignalDimension(signalType: string): SignalDimension | null;
/**
 * Signal diversity analysis result
 */
export interface DiversityAnalysis {
    /** Unique sources found */
    uniqueSources: Set<string>;
    /** Dimensions covered (with sufficient signals) */
    coveredDimensions: Set<SignalDimension>;
    /** Signals per dimension */
    signalsPerDimension: Record<SignalDimension, number>;
    /** Total signals analyzed */
    totalSignals: number;
    /** Signals within the diversity window */
    signalsInWindow: number;
}
/**
 * Analyze signal diversity within a time window
 *
 * @param signals - All signals to analyze
 * @param config - Diversity configuration
 * @returns Diversity analysis results
 */
export declare function analyzeSignalDiversity(signals: TrustSignalType[], config?: SignalDiversityConfig): DiversityAnalysis;
/**
 * Result of tier promotion validation
 */
export interface TierPromotionValidation {
    /** Whether the entity meets diversity requirements for target tier */
    valid: boolean;
    /** Current tier */
    currentTier: TrustLevel;
    /** Target tier */
    targetTier: TrustLevel;
    /** Gaps preventing promotion */
    gaps: string[];
    /** Details about current diversity */
    diversity: DiversityAnalysis;
    /** Requirements for target tier */
    requirements: {
        minSources: number;
        minDimensions: number;
    };
}
/**
 * Validate if an entity can be promoted to a target tier
 *
 * @param signals - Entity's trust signals
 * @param currentTier - Current trust tier
 * @param targetTier - Tier attempting to promote to
 * @param config - Diversity configuration
 * @returns Validation result with gaps if not valid
 */
export declare function validateTierPromotion(signals: TrustSignalType[], currentTier: TrustLevel, targetTier: TrustLevel, config?: SignalDiversityConfig): TierPromotionValidation;
/**
 * Calculate the maximum tier achievable given current signal diversity
 *
 * @param signals - Entity's trust signals
 * @param config - Diversity configuration
 * @returns Maximum tier that diversity requirements allow
 */
export declare function getMaxTierForDiversity(signals: TrustSignalType[], config?: SignalDiversityConfig): TrustLevel;
/**
 * Convert TrustLevel to CertificationTier
 */
export declare function trustLevelToCertificationTier(level: TrustLevel): CertificationTier;
/**
 * Validate certification tier promotion using diversity
 *
 * @param signals - Entity's trust signals
 * @param currentTier - Current certification tier
 * @param targetTier - Target certification tier
 * @param config - Diversity configuration
 */
export declare function validateCertificationTierPromotion(signals: TrustSignalType[], currentTier: CertificationTier, targetTier: CertificationTier, config?: SignalDiversityConfig): TierPromotionValidation;
/**
 * Calculate a diversity score (0-100) for an entity's signals
 *
 * Higher score = more diverse signal portfolio
 *
 * @param signals - Entity's trust signals
 * @param config - Diversity configuration
 * @returns Diversity score 0-100
 */
export declare function calculateDiversityScore(signals: TrustSignalType[], config?: SignalDiversityConfig): number;
//# sourceMappingURL=signal-diversity.d.ts.map