doctor.py 1.1 KB

12345678910111213141516171819202122232425
  1. """``hermes doctor`` subcommand parser."""
  2. from __future__ import annotations
  3. from typing import Callable
  4. def build_doctor_parser(subparsers, *, cmd_doctor: Callable) -> None:
  5. """Attach the ``doctor`` subcommand to ``subparsers``."""
  6. doctor_parser = subparsers.add_parser(
  7. "doctor", help="Check configuration and dependencies",
  8. description="Diagnose issues with Hermes Agent setup")
  9. doctor_parser.add_argument(
  10. "--fix", action="store_true", help="Attempt to fix issues automatically")
  11. doctor_parser.add_argument(
  12. "--live", action="store_true",
  13. help="Opt-in: run one bounded, read-only real-call health probe per "
  14. "configured tool backend (Firecrawl/FAL/browser/MCP/TTS/STT) "
  15. "after the static checks. Makes real network calls.")
  16. doctor_parser.add_argument(
  17. "--ack", metavar="ADVISORY_ID", default=None,
  18. help="Acknowledge a security advisory by ID and exit. After ack, the "
  19. "advisory will no longer trigger startup banners. Run `hermes "
  20. "doctor` first to see active advisories and their IDs.")
  21. doctor_parser.set_defaults(func=cmd_doctor)