I’ve done /etrace and looked at the Lua APIs, and cannot determine if or when the player has an active bodyguard as a combat ally. I have learned that summoning a combat ally is with a successful spellcast, and if the ally dies, the player gets a hidden debuff, but none of those tell me if a combat ally is by the player’s side, ready to fight.
The game obviously knows, and I have figured out if a follower is assigned to the barracks, but that is only part of the answer.
I have not found a single event or API that fires or provides information that yes, Vivianne or Delvar or whomever is good to go, or if they (and the others) are milling about.
How does the game know?
Edit: C_Garrison.GetFollowerInfo(guid or garrFollowerID) does return info.status, yet that only says “working” because the follower is assigned a building. When I dismiss the bodyguard, it still says “working” unless I also remove the follower from the building, so that isn’t the answer.