Yea, I don't mean "looking out the window" detection. The game doesn't care about any of this, but presumably they're working off various signals inevitably given off by powerplants, engines, etc. Similarly, the concept of "cloaking" probably involves all manner of electronic warfare, etc.
Though bear in mind that if any kind of scientific rigor were to be applied to all this, it'd need to start with the fact that the distance from one extreme end of a system's traversible range (roughly 160,000 range units) can't be more than a few light-seconds given the speeds of the various ships and the fact that there's no perceptible signal delay from one end to the other. And within that kind of range, something as big as a DN might well be visible to the mark-one eyeball
But in any event, there are a number of gameplay problems with the spire capital ships (larger than frigate) being cloakable, so that will be going away.