Detect Kernel Restart inside extension

I am trying to detect a kernel restart inside an Extension to trigger an action in the Extension.

The top-level application object provides a reference to the service manager for session from which I can listen to changes in session: app.serviceManager.sessions.runningChanged

But this does not help to reliably detect a kernel restart. Would appreciate any pointers towards identifying change in kernel state to ‘restarting’. Thanks.

Jupyterlab version: 2.x