public static Set<String> resolveNames(Collection<ToCapabilitySet> capabilities) {
        var names = new HashSet<String>();
        for (ToCapabilitySet tcs : capabilities) {
            if (tcs instanceof Capability c) names.add(c.asString());
            else if (tcs instanceof CapabilitySet cs) names.addAll(cs.resolveNames());
            else throw new IllegalArgumentException(tcs.toString());
        }
        return Set.copyOf(names);
    }
@return the name if this is a predefined capability set, or empty if not
security-utils/src/main/java/com/yahoo/security/tls/CapabilitySet.java