///|
/// Upstream participant annotators use ASCII case-insensitive keys.
pub fn normalize_key(key : String) -> String {
  key.to_lower()
}

///|
/// Registry identity lookup without any renderer or asset dependency.
pub fn known(reference : Reference) -> Bool {
  match reference.pack {
    "zenuml" => participant_keys.contains(normalize_key(reference.key))
    "architecture" =>
      ["cloud", "database", "disk", "internet", "server"].contains(
        reference.key,
      )
    _ => false
  }
}

///|
/// The keys of the pinned participant registry, in stable lexical order.
pub fn registry_keys() -> ReadOnlyArray[String] {
  let keys = participant_keys.keys().to_array()
  keys.sort_by((a, b) => a.lexical_compare(b))
  ReadOnlyArray::from_array(keys)
}