Look at how the Deskbar replicant communicates with the plug-in for Claws that I’ve created.
It’s done via StartWatching/StopWatching and SendNotices. In this particular use case I send a message to the application and the replicant receives a notice of that specific message.