Yang-Mills and Dirac fields in a bag, existence and uniqueness theorems