What happened?
A bug happened!
java sdk version: 1.0.0-Alpha3
@ApplicationScoped
public class AgentCardProducer {
@Inject
@ConfigProperty(name = "agent.name", defaultValue = "Test-Agent")
String name;
@Inject
@ConfigProperty(name = "agent.host", defaultValue = "127.0.0.1")
String host;
@Inject
@ConfigProperty(name = "quarkus.http.port")
int httpPort;
@Produces
@PublicAgentCard
public AgentCard agentCard() {
ClientCredentialsOAuthFlow clientCredentialsOAuthFlow = new ClientCredentialsOAuthFlow(
null,
Map.of("openid", "openid", "profile", "profile"),
"http://" + host + ":" + httpPort + "/auth");
OAuth2SecurityScheme securityScheme = OAuth2SecurityScheme.builder()
.flows(OAuthFlows.builder().clientCredentials(clientCredentialsOAuthFlow).build())
.build();
return AgentCard.builder()
.name(name)
.description("Helps with event")
.version("1.0.0")
.capabilities(AgentCapabilities.builder()
.streaming(true)
.pushNotifications(false)
.extensions(List.of(AgentExtension.builder()
.uri("https://projects.tmforum.org/a2aproject/telecommunication/extensions/Notification-T/v1")
.description("push notification extension")
.required(false)
.build()))
.extendedAgentCard(false)
.build())
.defaultInputModes(Collections.singletonList("text"))
.defaultOutputModes(Collections.singletonList("text"))
.skills(Collections.singletonList(AgentSkill.builder()
.id("event_publish")
.name("Event publish")
.description("Helps with event publish")
.tags(Collections.singletonList("event"))
.examples(List.of("push current event"))
.build()))
.supportedInterfaces(
List.of(
new AgentInterface(
TransportProtocol.HTTP_JSON.asString(),
"http://" + host + ":" + httpPort)
))
.securitySchemes(Map.of(OAuth2SecurityScheme.TYPE, securityScheme))
.build();
}
}
Relevant log output
error="parse AgentCard failed: unknown security scheme type for oauth2SecurityScheme: [flows description oauth2MetadataUrl]"
Code of Conduct
What happened?
A bug happened!
java sdk version: 1.0.0-Alpha3
Relevant log output
error="parse AgentCard failed: unknown security scheme type for oauth2SecurityScheme: [flows description oauth2MetadataUrl]"Code of Conduct