Yes, you can do that with an InterProcessConnection.
You can probably run the app from the plugin as well, but I would advise against, since your Plugin can exist in multiple instances…
I guess ChildProcess should work, you could modify it and create another pipe (to send back to the App, for now it’s just reading what the app would send you, not writing back). Then you do the same trick with the dup2 calls to route the pipes to cout and cin.