🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@alDuncanson
Copy link
Owner

This pull request introduces a comprehensive, modular command-line interface (CLI) for the Handler A2A protocol client, using rich-click for enhanced usability and structured command grouping. It adds new CLI modules for authentication, messaging, agent card operations, server management, and session handling, each with clear commands and shared utilities. The configuration and error handling are centralized for consistency and maintainability.

Key changes include:

1. New Modular CLI Architecture

  • Introduces a new CLI entry point in src/a2a_handler/cli/__init__.py, organizing commands into submodules (auth, card, message, server, session, task) and using rich-click for improved help and formatting. Adds global options for verbose and debug logging.
  • Updates pyproject.toml to ignore linting errors in the new CLI module structure.

2. Enhanced CLI User Experience

  • Adds a dedicated src/a2a_handler/cli/_config.py for configuring rich-click, grouping commands and options for clarity in help output, and applying consistent styles.

3. New CLI Command Implementations

  • Adds auth commands for setting, showing, and clearing agent authentication credentials.
  • Adds card commands for retrieving and validating agent cards, including output formatting and validation result display.
  • Adds message commands for sending and streaming messages to agents, supporting session continuation, inline authentication, and push notifications.
  • Adds server commands to start local agent and webhook servers with configurable options.
  • Adds session commands for listing, showing, and clearing saved session state.

4. Shared Utilities and Error Handling

  • Introduces src/a2a_handler/cli/_helpers.py with reusable functions for HTTP client creation and robust error handling across CLI commands.

These changes make the CLI more modular, user-friendly, and maintainable, providing a solid foundation for further feature development.

@alDuncanson alDuncanson merged commit 9457e08 into main Dec 20, 2025
1 check passed
@alDuncanson alDuncanson deleted the structure-and-organization branch December 20, 2025 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants