Use `anyio.to_thread.run_sync` in CLI built-in plugins

Merged
KL
2mo ago
+47-24

Why we make these changes

Related to #7112. Six built-in CLI plugins still send blocking credential and status calls through asyncio.to_thread. Move those 22 calls to AnyIO as one coherent migration step.

New public surface

None.

User-visible behavior

The plugins continue to run credential and status operations in worker threads. abandon_on_cancel=True preserves the existing cancellation behavior under asyncio. This PR does not enable Trio tests.

Verification

  • Ruff and pre-commit passed locally.
  • CI passed, including CLI tests on Python 3.10 through 3.14, quality checks, and coverage. The checkout's .venv lacks pydantic_clai2 and termflow, so those checks could not run locally.

What changes for existing users

Nothing under asyncio.

Checklist

  • No breaking changes in accordance with the version policy.
  • Any permitted compatibility impact has a label, warning, migration, release note, and exact API-check waiver. (Not applicable.)
  • PR title is fit for the release changelog.

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.