Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/itk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion itk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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
```
Expand Down
13 changes: 12 additions & 1 deletion itk/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
Message,
Part,
SendMessageRequest,
Task,
TaskState,
TaskStatus,
)
from a2a.utils import TransportProtocol

Expand Down Expand Up @@ -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)
Expand Down
Loading