NASA is quietly rewriting the script for human exploration of the Red Planet, turning robots from remote-controlled tools into autonomous partners tasked with keeping crews alive far from home.