It's possible to distinguish Jupyter lab from the other two via: psutil.Process().parent().name()
(thanks to How to detect whether in Jupyter Notebook or Lab).
But how can I tell nbclassic notebook from a new? My plugin implementation is quite different for those two. I need a way to tell the difference automatically.
I would potentially need to distinguish those from Google Colab and vscode-jupyter in the future, but currently they are not in my priority list.