Inspect optional-dependency install status for the running distribution.
Reads Requires-Dist metadata to report which packages declared under
[project.optional-dependencies] are installed, and renders that status
in either plain text (for stdout) or markdown (for rich UI contexts).
Optional extras that add model-provider integrations.
Keep in sync with [project.optional-dependencies] in pyproject.toml.
Optional extras that add sandbox integrations.
Mapping from extra name to (package, installed_version) tuples.
Only packages that are actually installed are included. Extras whose declared packages are all missing are omitted entirely.
Return installed optional dependencies grouped by extra.
Reads Requires-Dist metadata from the named distribution, groups the
entries gated by extra == "..." markers under their extra name, and
resolves each package's installed version via importlib.metadata.
Packages that are not installed are omitted; extras whose entire
package list is absent are dropped.
Composite meta-extras that only bundle other extras (see
_COMPOSITE_EXTRAS) and self-references to the distribution itself
are skipped — their components already appear under their own extras.
Return installed and missing optional dependencies grouped by extra.
Render an ExtrasStatus mapping as column-aligned plain text.
Suitable for stdout in non-interactive contexts (e.g. the --version
CLI flag) where a markdown renderer is unavailable.
Render an ExtrasStatus mapping as a markdown fragment.