Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,13 @@ public EventKind onMessageSend(MessageSendParams params, ServerCallContext conte
}
}
}
if (kind instanceof Task taskResult && !taskId.equals(taskResult.getId())) {
throw new InternalError("Task ID mismatch in agent response");
if (kind instanceof Task taskResult) {
if (shouldAddPushInfo(params)) {
pushConfigStore.setInfo(taskResult.getId(), params.configuration().pushNotificationConfig());
}
if (taskId != null && !taskId.equals(taskResult.getId())) {
throw new InternalError("Task ID mismatch in agent response");
}
}

// Send push notification after initial return (for both blocking and non-blocking)
Expand Down
4 changes: 4 additions & 0 deletions spec/src/main/java/io/a2a/spec/AgentCapabilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
public record AgentCapabilities(boolean streaming, boolean pushNotifications, boolean stateTransitionHistory,
List<AgentExtension> extensions) {

public AgentCapabilities {
extensions = extensions == null ? List.of() : extensions;
}

public static class Builder {

private boolean streaming;
Expand Down