/**
 * Skill Fabric Registry Schema
 * Defines the structure for the curated skill registry.
 */
// ─── Helper Constants ────────────────────────────────────────────────────
/** Certification level ordering for comparison. Higher = more trusted. */
export const CERTIFICATION_LEVEL_ORDER = {
    'none': 0,
    'rejected': 0,
    'scanned': 1,
    'verified': 2,
    'certified': 3,
};
/** Finding severity ordering. Higher = more severe. */
export const FINDING_SEVERITY_ORDER = {
    'info': 0,
    'low': 1,
    'medium': 2,
    'high': 3,
    'critical': 4,
};
// ─── Helper Functions ────────────────────────────────────────────────────
/** Check if an entry has been certified at a minimum level. */
export function isCertifiedAtLevel(entry, minLevel) {
    if (!entry.certification)
        return minLevel === 'none';
    return CERTIFICATION_LEVEL_ORDER[entry.certification.level] >=
        CERTIFICATION_LEVEL_ORDER[minLevel];
}
/** Check if an entry has a specific trust label. */
export function hasLabel(entry, labelId) {
    return entry.trustLabels?.some(l => l.id === labelId) ?? false;
}
/** Get the most recent scan record for an entry. */
export function getLatestScan(entry) {
    return entry.scanHistory?.[0];
}
/** Check if an entry has unresolved contradictions. */
export function hasUnresolvedContradictions(entry) {
    return entry.contradictions?.some(c => !c.acknowledged) ?? false;
}
//# sourceMappingURL=registry-schema.js.map