fix bugs: 1.agent response string has \r; 2.must have a ready deploy_datum