Provide a language agnostic way to determine mode in which a Positron session is running
While RStudio uses .rs.api.versionInfo() to describe version and session mode metadata, we want a language agnostic way to provide similar information consistently. Positron currently has ENV vars:
POSITRON=1 and POSITRON_VERSION=YYYY.MM.PP format, which is a reasonable way to achieve this. We need to extend the env with more metadata including the precise build number (the "long" form of the version info), and at least the session mode (e.g. desktop vs. server) once it is hosted in Workbench.
Note: Positron also currently passes information to a kernel to describe if the session is supporting a notebook. We should be careful to reconcile terminology here.
Do we want these additional env vars available in the terminal as well as the Python/R consoles? Right now the terminal only has POSITRON, not any version info at all.
Verified Fixed
Positron Version(s) : 2024.09.0-69
OS Version : OSX
Test scenario(s)
Verified as described in QA notes here: https://github.com/posit-dev/positron/pull/4703
Link(s) to TestRail test cases run or created: