API to query Logic’s Playback / Recording state?

I’d really like to get access to Logic Pro’s playback / recording state so that I can make a “On Air” / “Live” recording light 😊

Is this possible? Any Control Surface Plug-in SDK access available to developers?

The Logic Pro remote is ace but I’m guessing it’s using all private APIs?
I'm also interested in this.
API to query Logic’s Playback / Recording state?
 
 
Q