Commit Graph

4 Commits

Author SHA1 Message Date
Devin AI
54470f4932 Fix send_message to use SendMessageRequest wrapper, fix ServerError call
- Add make_send_request() helper in _compat.py for v1.0 API
- Update all handlers to wrap Message in SendMessageRequest
- Fix ServerError(error=...) → ServerError(message) in task.py
- Fix MessageToDict parameter name (always_print_fields_with_no_presence)
- Update integration tests for v1.0 client API (A2ACardResolver, ClientFactory)
- Fix test mocks to use real protobuf Message instead of MagicMock

Co-Authored-By: João <joao@crewai.com>
2026-04-24 16:09:29 +00:00
Devin AI
bec175ec9a Migrate crewai.a2a module to a2a-sdk v1.0.x
Fix #5607: CrewAI 1.14.2 is incompatible with a2a-sdk v1.0.1+

Breaking changes in a2a-sdk v1.0:
- A2AClientHTTPError renamed to A2AClientError
- Protobuf-based types replace Pydantic models
- Enum values changed to SCREAMING_SNAKE_CASE
- TextPart/DataPart/FilePart removed (Part uses oneof)
- AgentCard.url removed (use supported_interfaces)
- StreamResponse wraps all event types
- model_dump/model_copy replaced with protobuf serialization

Changes:
- Add _compat.py: centralized compatibility layer with helpers
- Update pyproject.toml: a2a-sdk>=1.0.0,<2
- Update all a2a module files to use protobuf API
- Update existing tests for v1.0 patterns
- Add comprehensive test_a2a_sdk_v1_compat.py (46 tests)

Co-Authored-By: João <joao@crewai.com>
2026-04-24 16:01:13 +00:00
Greyson LaLonde
102b6ae855 feat: add a2a liteagent, auth, transport negotiation, and file support
* feat: add server-side auth schemes and protocol extensions

- add server auth scheme base class and implementations (api key, bearer token, basic/digest auth, mtls)
- add server-side extension system for a2a protocol extensions
- add extensions middleware for x-a2a-extensions header management
- add extension validation and registry utilities
- enhance auth utilities with server-side support
- add async intercept method to match client call interceptor protocol
- fix type_checking import to resolve mypy errors with a2aconfig

* feat: add transport negotiation and content type handling

- add transport negotiation logic with fallback support
- add content type parser and encoder utilities
- add transport configuration models (client and server)
- add transport types and enums
- enhance config with transport settings
- add negotiation events for transport and content type

* feat: add a2a delegation support to LiteAgent

* feat: add file input support to a2a delegation and tasks

Introduces handling of file inputs in A2A delegation flows by converting file dictionaries to protocol-compatible parts and propagating them through delegation and task execution functions. Updates include utility functions for file conversion, changes to message construction, and passing input_files through relevant APIs.

* feat: liteagent a2a delegation support to kickoff methods
2026-01-30 17:10:00 -05:00
Greyson LaLonde
09014215a9 feat: add a2a update mechanisms (poll/stream/push) with handlers, config, and tests
introduces structured update config, shared task helpers/error types, polling + streaming handlers with activated events, and a push notification protocol/events + handler. refactors handlers into a unified protocol with shared message sending logic and python-version-compatible typing. adds a2a integration tests + async update docs, fixes push config propagation, response model parsing safeguards, failure-state handling, stream cleanup, polling timeout catching, agent-card fallback behavior, and prevents duplicate artifacts.
2026-01-07 11:36:36 -05:00