Skip to content

API Reference parrot.self_.doctor

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.self_.doctor

View source

parrot self doctor checks (FEAT-633, spec §3 M3; rev 0.2 C14/C15; rev 0.5 C20/C23/C24). Read-only diagnostics.

Scopes: "runtime-only" (bootstrap: uv, Python, entry points, PATH, parrot_tools.wiki — offline, repo-free), "full" (runtime + host configs + toolkits + SDD readiness iff /sdd exists), "sdd" (full with SDD readiness forced). Every parrot.sdd.* import is lazy and absence-tolerant.

Class DoctorCheck

One diagnostic result. informational checks never fail doctor (C15 host-CLI checks, warnings).

Fields:

Field Type Default Description
name str
ok bool
detail str ''
fix str ''
informational bool False

Attribute DoctorScope

Attribute GIT_TIMEOUT_S

Type: float

Attribute HOST_CLIS

Type: dict[str, str]

Alias InstallRoot

Re-exported from parrot.launcher.InstallRoot.

Alias MANAGED_PYTHON

Re-exported from parrot.launcher.MANAGED_PYTHON.

Attribute PARROT_MCP_KEYS

Type: frozenset[str]

Attribute RUNTIME_ENTRYPOINTS

Type: tuple[str, ...]

Attribute SDD_LEDGER

Attribute SDD_TOOL_FIXES

Type: tuple[tuple[str, str], ...]

Alias UV_MAX_VERSION

Re-exported from parrot.self_.uv.UV_MAX_VERSION.

Alias UV_MIN_VERSION

Re-exported from parrot.self_.uv.UV_MIN_VERSION.

Function check_bwrap_sandbox

Linux-only: verify that Bubblewrap can create nested user namespaces.

Both Claude Code's native sandbox and the SDD worktree sandbox use bwrap; the combination requires nested userns. On non-Linux platforms bwrap is not used, so the check is skipped silently.

check_bwrap_sandbox() -> list[DoctorCheck]

Returns: list[DoctorCheck]

Function failed

Non-informational failures — the only thing that makes parrot self doctor exit 1.

failed(checks: list[DoctorCheck]) -> list[DoctorCheck]

Parameter Type Default Description
checks list[DoctorCheck]

Returns: list[DoctorCheck]

Function installed_version

ai-parrot version installed in venv (None when absent or not queryable).

installed_version(venv: Path) -> str | None

Parameter Type Default Description
venv Path

Returns: str | None

Alias legacy_uv_files

Re-exported from parrot.self_.uv.legacy_uv_files.

Attribute logger

Alias managed_venv

Re-exported from parrot.self_.components.managed_venv.

Alias parrot_home

Re-exported from parrot.launcher.parrot_home.

Alias resolve_uv

Re-exported from parrot.self_.uv.resolve_uv.

Function run_doctor

Run the checks of scope in spec order; never raises for a broken environment.

"runtime-only" (C14 bootstrap) touches neither root nor the network and includes parrot_tools.wiki and the ai-parrot / ai-parrot-tools version lockstep (rev 0.5 C20, TASK-5117); "full" adds host configs, toolkits and — iff root/sdd exists — the C15 SDD readiness checks; "sdd" forces the latter.

run_doctor(root: Path, *, scope: DoctorScope = 'full', install_root: InstallRoot | None = None) -> list[DoctorCheck]

Parameter Type Default Description
root Path
scope DoctorScope 'full'
install_root InstallRoot | None None

Returns: list[DoctorCheck]

Alias script_path

Re-exported from parrot.launcher.script_path.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally