IMO they have crossed the line. This is declaration of war. Imagine what US would do if we killed their top general while he was in Mexico. What is next? Do we need to wait for them to invade and bombard Tehran for us to give a proper response? By that time it would be too late and wouldn't even matter how we respond. Our only and absolutely only option is to launch BM's into all their bases, destroy every single one of them. Develop and test a nuke and put it on a modified Khorramshahr missile.
From the point of view of Iranian leadership. I am guessing they will do the following.
Iran should definitely leave the NNPT. The Indians and Pakistani's left it citing the fact that it's extremely biased and discriminatory.
A Beirut style attack would be a good enough, satisfactory in the eyes of Iranian people, along with actively targeting US personnel, generals, statesmen, embassies, etc The Iranian leadership will look to bog down America in the region, perhaps by arming Taliban with limited amounts of advanced weapons ? ambushing American forces ?
If Iran gives Taliban the same support as Houthi's or even anything close they will be in Kabul within a few months. This will force Trump to send more troops to Afghanistan, which will make him look bad.
If the Houthi's have saved up, accumulated enough missiles parts, then perhaps a larger strike on Saudi oil facilities ? Another goal should be to get Trump kicked out of office. American's don't want higher gasoline prices and they don't want a war in the middle east.
If Iran launches missiles directly at American bases, they're going to start a war they can't win. Iran can't win a conventional war with the US. The best thing Iran can do is act rationally. Wait for the tension to cool down a bit and then start putting pressure on the US.
The way I look at it, it's not a matter of if but when.