Human-swarm teaming with flexible autonomy