Court filings reveal the Pentagon used Elon Musk’s Grok AI within its military targeting programme during operations linked to the conflict with Iran.