The dcode doctor command: report install health and diagnostics.
Inspired by claude doctor, this prints a grouped, tree-style summary of the
running install, update status, and configuration locations so the output is
safe to paste into a bug report. It stays offline: the update section reads
only the local cache and never contacts PyPI.
Help rendering for dcode doctor -h is served by ui.show_doctor_help, which
does not import this module, so the help path stays light.
Gather every diagnostic section in display order.
Run dcode doctor, printing diagnostics as text or JSON.
Offline snapshot of LangSmith tracing configuration for diagnostics.
Carries only presence/identity facts — never API keys or other secret
values — so it is safe to render in dcode doctor output.
Network-free snapshot of the version facts diagnostics need.
Bundles the running CLI and installed SDK version facts with the result of
comparing the deepagents requirement that deepagents-code declares
against the effective SDK version for diagnostics.
A single labeled diagnostic fact.
ok is False only for genuine problems (e.g. a missing dependency), not
for informational states such as an available update.
A named group of related diagnostic items.
Write a JSON envelope to stdout and flush.
The envelope is a single-line JSON object with a stable schema:
{"schema_version": 1, "command": "...", "data": ...}