How to retrieve the notebook directory in developing jupyterlab extension?

I am now working on a JupyterLab extension and struggling to get the notebook directory from the app front end.

For example, the user runs the jupyter lab with option --notebook-dir, like

jupyter lab --notebook-dir dir1

In the activate input of a JupyterFrontEndPlugin (in index.ts), i.e.

const extension: JupyterFrontEndPlugin<void> = {
  id: PLUGIN_ID,
  autoStart: true,
  requires: [IFileBrowserFactory],
  activate: activate

I tried to locate a property in JupyterFrontEnd app object for the notebook directory

function activate(
  app: JupyterFrontEnd,
) {

but no luck.

If I look into the app object in runtime, it seems the property app.paths.directories.serverRoot is only found in the runtime.

Is there any other static property I can rely on?