signatures) {
return this;
}
+ public Builder preferredTransport(String preferredTransport) {
+ this.preferredTransport = preferredTransport;
+ return this;
+ }
+
+ public Builder url(String url) {
+ this.url = url;
+ return this;
+ }
+
/**
* Builds an immutable {@link AgentCard} from the current builder state.
*
@@ -399,7 +415,9 @@ public AgentCard build() {
securityRequirements,
iconUrl,
Assert.checkNotNullParam("supportedInterfaces", supportedInterfaces),
- signatures);
+ signatures,
+ url,
+ preferredTransport == null ? TransportProtocol.JSONRPC.name() : preferredTransport);
}
}
}
diff --git a/tck/pom.xml b/tck/pom.xml
index 41eaec905..07e469690 100644
--- a/tck/pom.xml
+++ b/tck/pom.xml
@@ -45,6 +45,51 @@
+
+
+ multi-mode
+
+
+ org.a2aproject.sdk
+ a2a-java-sdk-compat-0.3-reference-jsonrpc
+ ${project.version}
+
+
+ org.a2aproject.sdk
+ a2a-java-sdk-compat-0.3-reference-grpc
+ ${project.version}
+
+
+ org.a2aproject.sdk
+ a2a-java-sdk-compat-0.3-reference-rest
+ ${project.version}
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ add-multi-mode-source
+ generate-sources
+
+ add-source
+
+
+
+ src/multi-mode/java
+
+
+
+
+
+
+
+
+
+
diff --git a/tck/src/multi-mode/java/org/a2aproject/sdk/sut/StubAgentCardProducer_v0_3.java b/tck/src/multi-mode/java/org/a2aproject/sdk/sut/StubAgentCardProducer_v0_3.java
new file mode 100644
index 000000000..780aa3277
--- /dev/null
+++ b/tck/src/multi-mode/java/org/a2aproject/sdk/sut/StubAgentCardProducer_v0_3.java
@@ -0,0 +1,43 @@
+package org.a2aproject.sdk.sut;
+
+import java.util.List;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.Produces;
+
+import io.quarkus.arc.DefaultBean;
+
+import org.a2aproject.sdk.compat03.spec.AgentCapabilities_v0_3;
+import org.a2aproject.sdk.compat03.spec.AgentCard_v0_3;
+import org.a2aproject.sdk.compat03.spec.AgentSkill_v0_3;
+import org.a2aproject.sdk.server.PublicAgentCard;
+
+/**
+ * Stub producer that satisfies the v0.3 handler CDI requirements when the
+ * multi-mode profile adds compat-0.3 dependencies to the classpath.
+ * This will be replaced by a proper translation layer in the future.
+ */
+@ApplicationScoped
+public class StubAgentCardProducer_v0_3 {
+
+ @Produces
+ @PublicAgentCard
+ @DefaultBean
+ public AgentCard_v0_3 createStubAgentCard() {
+ return new AgentCard_v0_3.Builder()
+ .name("stub")
+ .description("Stub agent card for multi-mode testing")
+ .url("http://localhost:9999")
+ .version("0.0.0")
+ .capabilities(new AgentCapabilities_v0_3.Builder().build())
+ .defaultInputModes(List.of("text"))
+ .defaultOutputModes(List.of("text"))
+ .skills(List.of(new AgentSkill_v0_3.Builder()
+ .id("stub")
+ .name("stub")
+ .description("stub")
+ .tags(List.of())
+ .build()))
+ .build();
+ }
+}
diff --git a/tests/server-common/src/test/java/org/a2aproject/sdk/server/apps/common/AgentCardProducer.java b/tests/server-common/src/test/java/org/a2aproject/sdk/server/apps/common/AgentCardProducer.java
index fa90cbfd8..d6d76dcca 100644
--- a/tests/server-common/src/test/java/org/a2aproject/sdk/server/apps/common/AgentCardProducer.java
+++ b/tests/server-common/src/test/java/org/a2aproject/sdk/server/apps/common/AgentCardProducer.java
@@ -58,7 +58,9 @@ public AgentCard agentCard() {
.defaultInputModes(Collections.singletonList("text"))
.defaultOutputModes(Collections.singletonList("text"))
.skills(new ArrayList<>())
- .supportedInterfaces(Collections.singletonList(new AgentInterface(preferredTransport, transportUrl)));
+ .supportedInterfaces(Collections.singletonList(new AgentInterface(preferredTransport, transportUrl)))
+ .url(transportUrl)
+ .preferredTransport(preferredTransport);
// Add security configuration if enabled (for authentication tests)
if (securityEnabled) {