fix: Resolve lint and type-checking issues in A2A integration

- Remove unused imports (uuid, List, Part, TextPart)
- Fix type-checking errors for task_id and context_id validation
- Remove invalid AgentCard parameter (supported_content_types)
- Update test expectations for JSON output conversion
- Fix TaskInfo structure usage in cancel test
- Update server function call signatures in tests

All A2A tests now pass (34 passed, 2 skipped)

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-06-06 23:50:21 +00:00
parent 78b9c7dbeb
commit 4b9426fbcc
9 changed files with 251 additions and 29 deletions

View File

@@ -3,7 +3,6 @@
import pytest
from unittest.mock import Mock, patch
from crewai import Agent, Crew, Task
try:
from crewai.a2a import CrewAgentExecutor, create_a2a_app
@@ -94,7 +93,9 @@ class TestA2AIntegration:
mock_create_app.assert_called_once_with(
executor,
transport="starlette"
transport="starlette",
agent_name=None,
agent_description=None
)
mock_uvicorn_run.assert_called_once_with(
mock_app,