Most humans will be able to identify cloaked units, but only if they look carefully, and not in heavy battle. Can the AIs see and/or identify cloaked units?
It begs the question if fair gameplay is even possible unless the AI uses machine vision against the same interface. For fair human-vs-AI games, they shouldn't allow cloaked units!
I do agree that detecting cloaked (or burrowed) units is a bit of an interesting case, since a simple API like I mentioned would make it trivial for the AI to detect these units. Perhaps you could do some sort of probabilistic system, or some sort of "attention" system where the AI has to choose where on the game screen to spend its limited attention, and more attention in an area around a cloaked units would increase the probability of the AI "detecting" the cloaked unit. That probably comes close to matching how humans detect cloaked units, e.g. when you're deliberately looking for an observer around your army you have an almost 100% chance of finding it if it's there.