"COM" by itself is a rather broad umbrella. What you're describing seems to be OLE Automation. That's the one that has type libraries (which you need for discoverability).
And then Active Scripting was supposed to be how you'd script those endpoints...
Apps can expose endpoints that can be listed, and external processes can call these endpoints.