agent: add metadata validation for global units