diff --git a/.github/workflows/itk.yaml b/.github/workflows/itk.yaml index f846e2d7c..ab272d0e3 100644 --- a/.github/workflows/itk.yaml +++ b/.github/workflows/itk.yaml @@ -28,4 +28,4 @@ jobs: run: bash run_itk.sh working-directory: itk env: - A2A_SAMPLES_REVISION: itk-v.015-alpha + A2A_SAMPLES_REVISION: itk-v.016-alpha diff --git a/itk/README.md b/itk/README.md index eaa5f254a..9a82d0469 100644 --- a/itk/README.md +++ b/itk/README.md @@ -35,7 +35,7 @@ podman system migrate You must set the `A2A_SAMPLES_REVISION` environment variable to specify which revision of the `a2a-samples` repository to use for testing. This can be a branch name, tag, or commit hash. Example: -```bash +``` export A2A_SAMPLES_REVISION=itk-v.015-alpha ``` @@ -58,6 +58,7 @@ The script will: To enable debug logging and persist logs for inspection: 1. Set the `ITK_LOG_LEVEL` environment variable to `DEBUG`: + ```bash export ITK_LOG_LEVEL=DEBUG ``` diff --git a/itk/main.py b/itk/main.py index 5ce062fac..6792c540a 100644 --- a/itk/main.py +++ b/itk/main.py @@ -32,7 +32,9 @@ Message, Part, SendMessageRequest, + Task, TaskState, + TaskStatus, ) from a2a.utils import TransportProtocol @@ -198,7 +200,16 @@ async def execute( context.context_id, ) - await task_updater.update_status(TaskState.TASK_STATE_SUBMITTED) + # Explicitly create the task by sending it to the queue + task = Task( + id=context.task_id, + context_id=context.context_id, + status=TaskStatus(state=TaskState.TASK_STATE_SUBMITTED), + history=[context.message] if context.message else [], + ) + async with task_updater._lock: # noqa: SLF001 + await event_queue.enqueue_event(task) + await task_updater.update_status(TaskState.TASK_STATE_WORKING) instruction = extract_instruction(context.message)