After weeks of tensions that disrupted global energy markets, the United States and Iran have agreed on a roadmap aimed at ending hostilities, restoring maritime traffic and reviving diplomatic engagement.