There is a way to Control JupyterLab from Python notebooks, https://github.com/jtpio/ipylab.
I am wondering whether it can be done with Xeus-JavaScript. Full functions are not needed.
Maybe some variables, functions and modules can be exposed to do so.
Thanks,