Astrophysical Engineering and the Fate of the Earth