It is the first major energy extraction agreement with a foreign firm since the Taliban took power.