Commit Graph

3 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
22f1812824 feat: add a2a server config; agent card generation 2026-01-14 22:09:11 -05:00