Move entire Msg definition into commandformat.json, generate the enum

Avoids duplication.
Fix compile errors in host build