Skip to content

Commit 9444ed6

Browse files
authored
feat: Add metadata as parameter to TaskUpdater.update_status() (#371)
Fixes #364 🦕
1 parent ee48d68 commit 9444ed6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/a2a/server/tasks/task_updater.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ async def update_status(
4949
message: Message | None = None,
5050
final: bool = False,
5151
timestamp: str | None = None,
52+
metadata: dict[str, Any] | None = None,
5253
) -> None:
5354
"""Updates the status of the task and publishes a `TaskStatusUpdateEvent`.
5455
@@ -57,6 +58,7 @@ async def update_status(
5758
message: An optional message associated with the status update.
5859
final: If True, indicates this is the final status update for the task.
5960
timestamp: Optional ISO 8601 datetime string. Defaults to current time.
61+
metadata: Optional metadata for extensions.
6062
"""
6163
async with self._lock:
6264
if self._terminal_state_reached:
@@ -77,6 +79,7 @@ async def update_status(
7779
task_id=self.task_id,
7880
context_id=self.context_id,
7981
final=final,
82+
metadata=metadata,
8083
status=TaskStatus(
8184
state=state,
8285
message=message,

0 commit comments

Comments
 (0)