Is there any way how from php can be send plugin to output, which is registered in client in javascript file?
Something like this:
$rcmail->output->command('plugin.myplugin');
You can't send commands from PHP to the browser directly.
The browser has to request an action. It can be done by Javascript/AJAX or by requesting a URL with a query string (http://myroundcube_residence.com/?what=that).
It is always the same:
Client Request => Server Response => Client process the response.