Refactor PackageId.namespace -> source_id
emit -C extra-filename and metadata
Fix registry query fn