Is there any way for Keyboard Maestro to know if it is being run over VNC / Screen Sharing?

I've tried thinking this one through and came up empty, but I can't help but thinking that I must be missing something.

I'd like to be able to have some macros which look for "I am using Keyboard Maestro on this local computer" vs "I am using Keyboard Maestro via screen sharing / VNC / etc".

I can't think of a way to do that, but obviously the system must have some way to tell the difference… is there a way for me to access that info ?

Could you via AppleScript maybe check the vnc-server if any users are logged in?
If a user is logged in, then you control it via VNC.

If there's a way to do that, I haven't found it.

I am only on my phone now. But found this link

Do not know if it is possible to parse the log and deduce the information from there?

When I control my Mac remotely I use Chrome Remote Desktop and when I use it there's a small green window that appears on the bottom of my Mac saying that my desktop iOS currently being shared. If I wanted to I could detect that window using the Find Image action.