A2A Java SDK 1.4.0.Final Released
I am happy to announce the release of A2A Java SDK 1.4.0.Final . This release consolidates the multi-tenancy API with an important breaking change, brings SSE configuration improvements, strengthens interoperability testing, and delivers a large set of bug fixes across all transports.
|
NOTE
|
This release contains a breaking change affecting the |
What's New
Multi-Tenancy: @Tenant Qualifier Consolidation
The @Tenant qualifier annotation has been moved from a2a-java-extras-multitenancy into server-common ( #1176
). This is a breaking change -- see migration
below.
Moving the qualifier into server-common means the CDI runtime can now correctly filter out tenant-qualified beans at all @PublicAgentCard and @ExtendedAgentCard injection points. Previously, annotating a tenant card with both @Tenant("x") and @PublicAgentCard would cause CDI ambiguity and result in 404 errors on the default route.
Additional improvements in this area:
-
Tenant cards annotated with both
@Tenant("x")and@PublicAgentCardnow take precedence over bare@Tenantcards at the public card endpoint. -
Duplicate
@ExtendedAgentCardregistrations for the same tenant are now rejected at startup instead of silently winning arbitrarily. -
Missing default
AgentExecutorbeans now throw an explicit exception at startup rather than causing silent runtime failures. -
Agent card resolution now correctly falls back to the router even when no default bean is present ( #1184 ).
SSE Configuration
A new SSEParserConfig class ( #1149
) makes Server-Sent Events parsing configurable per client. The default per-line size limit has been raised to 1 MB, resolving issues where large message payloads were rejected by the SSE parser.
application/a2a+json Content-Type Support
The server transports now recognize application/a2a+json as a valid content type alongside application/json ( #1181
), improving out-of-the-box interoperability with clients that send this media type.
ITK Enhancements
Documentation Improvements
-
A complete
TaskAuthorizationProviderimplementation example has been added to the documentation ( #1146 ). -
Security advisory GHSA-4fpj-g9jf-9rgg has been incorporated into the threat model ( #1148 ).
-
JDK HttpClient's restricted
Hostheader behavior and the Vert.x HTTP client as an alternative are now documented ( #1180 ).
Bug Fixes
-
Task history -- current status messages are no longer incorrectly included in task history ( #1122 )
-
Push notification ordering -- delivery order of push notifications per task is now preserved ( #1156 )
-
gRPC
Part.metadata-- themetadatafield is now correctly mapped in 0.3 gRPC classes ( #1169 ) -
Blank task/context IDs -- blank
taskIdandcontextIdvalues inmessages/sendare treated as absent ( #1172 ) -
JSON null preservation -- explicit JSON nulls in value mappings are now preserved correctly ( #1174 )
-
Relative redirects -- relative
Locationheader values in HTTP redirects are now resolved against the request URI ( #1162 ) -
SSE terminal callback -- exactly one terminal SSE callback is now guaranteed ( #1173 )
-
A2ACardResolverfallback URL -- a fallback URL is now always provided ( #1179 ) -
Event bus processor -- the event bus processor now starts correctly when using manual (non-CDI) wiring ( #997 )
-
Terminal enqueue recovery -- failed terminal enqueue operations are now recovered ( #1185 )
Migration from 1.3.x
Update your BOM version:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-bom</artifactId>
<version>1.4.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
@Tenant Import Change (Breaking)
The @Tenant qualifier has moved from the a2a-java-extras-multitenancy module into server-common, and its package has changed accordingly. Any class that imports @Tenant must be updated:
// Before (1.3.x) -- from the extras module
import org.a2aproject.sdk.extras.multitenancy.Tenant;
// After (1.4.0) -- from server-common
import org.a2aproject.sdk.server.multitenancy.Tenant;
The annotation's semantics are unchanged. No other code modifications are required.
Missing Default AgentExecutor Now Throws
If a CDI-based multi-tenant deployment has no default AgentExecutor bean, the server will now throw an explicit exception at startup. Previously this would compile and deploy successfully but fail silently at runtime. Ensure a default AgentExecutor bean is always registered, or supply an AgentExecutorRouter programmatically via the builder:
AgentExecutorRouter router = tenant ->
executors.getOrDefault(tenant, defaultExecutor);
DefaultRequestHandler handler = DefaultRequestHandler.builder()
.agentExecutorRouter(router)
.taskStore(taskStore)
.queueManager(queueManager)
// ...
.build();
Contributors
A big thank you to all contributors of this release -- and a warm welcome to those joining for the first time!
@ehsavoie , @kabir , @JakubWorek , @014-code , @1fanwang , @hutiefang76 , @serhiy-bzhezytskyy , @56wj , @paulrutter , @girishkvs , @chopmob-cloud
Come Join Us
We value your feedback a lot so please report bugs, ask for improvements etc. Let's build something great together!
If you are an A2A Java SDK user or just curious, don't be shy and join our welcoming community: