From f75abcfa45aa6d20bf43a29e76ff6a597b910e28 Mon Sep 17 00:00:00 2001 From: Jeff Mesnil Date: Mon, 26 Jan 2026 18:23:55 +0100 Subject: [PATCH] feat!: Update a2a.proto d14f410 based on https://github.com/a2aproject/A2A/commit/d14f4107119bf0fe0dff9e2c577eb4ab70b51793 Signed-off-by: Jeff Mesnil --- README.md | 5 +- .../java/io/a2a/client/AbstractClient.java | 10 +- .../src/main/java/io/a2a/client/Client.java | 6 +- .../java/io/a2a/client/ClientBuilderTest.java | 1 - .../client/transport/grpc/GrpcTransport.java | 8 +- .../transport/jsonrpc/JSONRPCTransport.java | 10 +- .../jsonrpc/JSONRPCTransportTest.java | 9 +- .../transport/jsonrpc/JsonMessages.java | 5 +- .../client/transport/rest/RestTransport.java | 6 +- .../transport/rest/JsonRestMessages.java | 9 +- .../transport/rest/RestTransportTest.java | 9 +- .../client/transport/spi/ClientTransport.java | 8 +- .../cloud/CloudAgentCardProducer.java | 1 - .../helloworld/AgentCardProducer.java | 1 - ...otificationConfigStoreIntegrationTest.java | 2 +- .../MultiInstanceReplicationAgentCards.java | 1 - .../ReplicationTestAgentCardProducer.java | 1 - .../java/io/a2a/client/http/JsonMessages.java | 3 +- .../jsonrpc/common/wrappers/A2AResponse.java | 2 +- ...ateTaskPushNotificationConfigRequest.java} | 18 +- ...teTaskPushNotificationConfigResponse.java} | 10 +- .../wrappers/NonStreamingJSONRPCRequest.java | 2 +- .../server/apps/quarkus/A2AServerRoutes.java | 10 +- .../apps/quarkus/A2AServerRoutesTest.java | 14 +- .../server/rest/quarkus/A2AServerRoutes.java | 4 +- .../rest/quarkus/A2AServerRoutesTest.java | 8 +- .../DefaultRequestHandler.java | 2 +- .../requesthandlers/RequestHandler.java | 2 +- .../AbstractA2ARequestHandlerTest.java | 5 +- spec-grpc/src/main/java/io/a2a/grpc/A2A.java | 339 +++++++++--------- .../main/java/io/a2a/grpc/A2AServiceGrpc.java | 76 ++-- .../java/io/a2a/grpc/AgentCapabilities.java | 125 +------ .../a2a/grpc/AgentCapabilitiesOrBuilder.java | 19 - .../java/io/a2a/grpc/CancelTaskRequest.java | 4 +- ...ateTaskPushNotificationConfigRequest.java} | 120 +++---- ...shNotificationConfigRequestOrBuilder.java} | 4 +- ...leteTaskPushNotificationConfigRequest.java | 4 +- .../main/java/io/a2a/grpc/GetTaskRequest.java | 4 +- ...istTaskPushNotificationConfigResponse.java | 4 +- .../java/io/a2a/grpc/SendMessageRequest.java | 4 +- .../grpc/mapper/AgentCapabilitiesMapper.java | 1 - ...eateTaskPushNotificationConfigMapper.java} | 30 +- .../java/io/a2a/grpc/utils/JSONRPCUtils.java | 12 +- .../java/io/a2a/grpc/utils/ProtoUtils.java | 18 +- spec-grpc/src/main/proto/a2a.proto | 26 +- .../io/a2a/grpc/utils/JSONRPCUtilsTest.java | 36 +- .../java/io/a2a/grpc/utils/ToProtoTest.java | 2 - .../src/main/java/io/a2a/spec/A2AMethods.java | 2 +- .../java/io/a2a/spec/AgentCapabilities.java | 26 +- .../io/a2a/tck/server/AgentCardProducer.java | 1 - .../apps/common/AbstractA2AServerTest.java | 8 +- .../server/apps/common/AgentCardProducer.java | 1 - .../transport/grpc/handler/GrpcHandler.java | 6 +- .../grpc/handler/GrpcHandlerTest.java | 44 +-- .../jsonrpc/handler/JSONRPCHandler.java | 18 +- .../jsonrpc/handler/JSONRPCHandlerTest.java | 48 +-- .../transport/rest/handler/RestHandler.java | 6 +- .../rest/handler/RestHandlerTest.java | 10 +- 58 files changed, 484 insertions(+), 686 deletions(-) rename jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/{SetTaskPushNotificationConfigRequest.java => CreateTaskPushNotificationConfigRequest.java} (76%) rename jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/{SetTaskPushNotificationConfigResponse.java => CreateTaskPushNotificationConfigResponse.java} (75%) rename spec-grpc/src/main/java/io/a2a/grpc/{SetTaskPushNotificationConfigRequest.java => CreateTaskPushNotificationConfigRequest.java} (85%) rename spec-grpc/src/main/java/io/a2a/grpc/{SetTaskPushNotificationConfigRequestOrBuilder.java => CreateTaskPushNotificationConfigRequestOrBuilder.java} (93%) rename spec-grpc/src/main/java/io/a2a/grpc/mapper/{SetTaskPushNotificationConfigMapper.java => CreateTaskPushNotificationConfigMapper.java} (79%) diff --git a/README.md b/README.md index 50a760b10..941419f45 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,6 @@ public class WeatherAgentCardProducer { .capabilities(AgentCapabilities.builder() .streaming(true) .pushNotifications(false) - .stateTransitionHistory(false) .build()) .defaultInputModes(Collections.singletonList("text")) .defaultOutputModes(Collections.singletonList("text")) @@ -575,10 +574,10 @@ TaskPushNotificationConfig taskConfig = TaskPushNotificationConfig.builder() .pushNotificationConfig(pushNotificationConfig) .build(); -TaskPushNotificationConfig result = client.setTaskPushNotificationConfiguration(taskConfig); +TaskPushNotificationConfig result = client.createTaskPushNotificationConfiguration(taskConfig); // You can also optionally specify a ClientCallContext with call-specific config to use -TaskPushNotificationConfig result = client.setTaskPushNotificationConfiguration(taskConfig, clientCallContext); +TaskPushNotificationConfig result = client.createTaskPushNotificationConfiguration(taskConfig, clientCallContext); ``` #### List the push notification configurations for a task diff --git a/client/base/src/main/java/io/a2a/client/AbstractClient.java b/client/base/src/main/java/io/a2a/client/AbstractClient.java index 5d2785386..c47d8238b 100644 --- a/client/base/src/main/java/io/a2a/client/AbstractClient.java +++ b/client/base/src/main/java/io/a2a/client/AbstractClient.java @@ -224,26 +224,26 @@ public Task cancelTask(TaskIdParams request) throws A2AClientException { public abstract Task cancelTask(TaskIdParams request, @Nullable ClientCallContext context) throws A2AClientException; /** - * Set or update the push notification configuration for a specific task. + * Create or update the push notification configuration for a specific task. * * @param request the push notification configuration to set for the task * @return the configured TaskPushNotificationConfig * @throws A2AClientException if setting the task push notification configuration fails for any reason */ - public TaskPushNotificationConfig setTaskPushNotificationConfiguration( + public TaskPushNotificationConfig createTaskPushNotificationConfiguration( TaskPushNotificationConfig request) throws A2AClientException { - return setTaskPushNotificationConfiguration(request, null); + return createTaskPushNotificationConfiguration(request, null); } /** - * Set or update the push notification configuration for a specific task. + * Create or update the push notification configuration for a specific task. * * @param request the push notification configuration to set for the task * @param context optional client call context for the request (may be {@code null}) * @return the configured TaskPushNotificationConfig * @throws A2AClientException if setting the task push notification configuration fails for any reason */ - public abstract TaskPushNotificationConfig setTaskPushNotificationConfiguration( + public abstract TaskPushNotificationConfig createTaskPushNotificationConfiguration( TaskPushNotificationConfig request, @Nullable ClientCallContext context) throws A2AClientException; diff --git a/client/base/src/main/java/io/a2a/client/Client.java b/client/base/src/main/java/io/a2a/client/Client.java index 117351098..405155ee2 100644 --- a/client/base/src/main/java/io/a2a/client/Client.java +++ b/client/base/src/main/java/io/a2a/client/Client.java @@ -431,7 +431,7 @@ public Task cancelTask(TaskIdParams request, @Nullable ClientCallContext context * ) * ) * ); - * client.setTaskPushNotificationConfiguration(config); + * client.createTaskPushNotificationConfiguration(config); * } * * @param request the push notification configuration for the task @@ -442,9 +442,9 @@ public Task cancelTask(TaskIdParams request, @Nullable ClientCallContext context * @see PushNotificationConfig */ @Override - public TaskPushNotificationConfig setTaskPushNotificationConfiguration( + public TaskPushNotificationConfig createTaskPushNotificationConfiguration( TaskPushNotificationConfig request, @Nullable ClientCallContext context) throws A2AClientException { - return clientTransport.setTaskPushNotificationConfiguration(request, context); + return clientTransport.createTaskPushNotificationConfiguration(request, context); } /** diff --git a/client/base/src/test/java/io/a2a/client/ClientBuilderTest.java b/client/base/src/test/java/io/a2a/client/ClientBuilderTest.java index 56eb7560d..dd38c937d 100644 --- a/client/base/src/test/java/io/a2a/client/ClientBuilderTest.java +++ b/client/base/src/test/java/io/a2a/client/ClientBuilderTest.java @@ -31,7 +31,6 @@ public class ClientBuilderTest { .capabilities(AgentCapabilities.builder() .streaming(true) .pushNotifications(true) - .stateTransitionHistory(true) .build()) .defaultInputModes(Collections.singletonList("text")) .defaultOutputModes(Collections.singletonList("text")) diff --git a/client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java b/client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java index 5cb431419..8cc67d7b0 100644 --- a/client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java +++ b/client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java @@ -229,12 +229,12 @@ public ListTasksResult listTasks(ListTasksParams request, @Nullable ClientCallCo } @Override - public TaskPushNotificationConfig setTaskPushNotificationConfiguration(TaskPushNotificationConfig request, - @Nullable ClientCallContext context) throws A2AClientException { + public TaskPushNotificationConfig createTaskPushNotificationConfiguration(TaskPushNotificationConfig request, + @Nullable ClientCallContext context) throws A2AClientException { checkNotNullParam("request", request); String configId = request.pushNotificationConfig().id(); - io.a2a.grpc.SetTaskPushNotificationConfigRequest grpcRequest = io.a2a.grpc.SetTaskPushNotificationConfigRequest.newBuilder() + io.a2a.grpc.CreateTaskPushNotificationConfigRequest grpcRequest = io.a2a.grpc.CreateTaskPushNotificationConfigRequest.newBuilder() .setParent("tasks/" + request.taskId()) .setConfig(ToProto.taskPushNotificationConfig(request)) .setConfigId(configId != null ? configId : request.taskId()) @@ -244,7 +244,7 @@ public TaskPushNotificationConfig setTaskPushNotificationConfiguration(TaskPushN try { A2AServiceBlockingV2Stub stubWithMetadata = createBlockingStubWithMetadata(context, payloadAndHeaders); - return FromProto.taskPushNotificationConfig(stubWithMetadata.setTaskPushNotificationConfig(grpcRequest)); + return FromProto.taskPushNotificationConfig(stubWithMetadata.createTaskPushNotificationConfig(grpcRequest)); } catch (StatusRuntimeException | StatusException e) { throw GrpcErrorMapper.mapGrpcError(e, "Failed to create task push notification config: "); } diff --git a/client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java b/client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java index e991eecb3..996412538 100644 --- a/client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java +++ b/client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java @@ -43,7 +43,7 @@ import io.a2a.jsonrpc.common.wrappers.ListTasksResponse; import io.a2a.jsonrpc.common.wrappers.ListTasksResult; import io.a2a.jsonrpc.common.wrappers.SendMessageResponse; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigResponse; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigResponse; import io.a2a.spec.A2AClientError; import io.a2a.spec.A2AClientException; import io.a2a.spec.A2AError; @@ -182,15 +182,15 @@ public ListTasksResult listTasks(ListTasksParams request, @Nullable ClientCallCo } @Override - public TaskPushNotificationConfig setTaskPushNotificationConfiguration(TaskPushNotificationConfig request, - @Nullable ClientCallContext context) throws A2AClientException { + public TaskPushNotificationConfig createTaskPushNotificationConfiguration(TaskPushNotificationConfig request, + @Nullable ClientCallContext context) throws A2AClientException { checkNotNullParam("request", request); PayloadAndHeaders payloadAndHeaders = applyInterceptors(SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD, - ProtoUtils.ToProto.setTaskPushNotificationConfigRequest(request), agentCard, context); + ProtoUtils.ToProto.CreateTaskPushNotificationConfigRequest(request), agentCard, context); try { String httpResponseBody = sendPostRequest(Utils.buildBaseUrl(agentInterface, request.tenant()), payloadAndHeaders, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); - SetTaskPushNotificationConfigResponse response = unmarshalResponse(httpResponseBody, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); + CreateTaskPushNotificationConfigResponse response = unmarshalResponse(httpResponseBody, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); return response.getResult(); } catch (A2AClientException e) { throw e; diff --git a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java index 9b6f7f017..74fe9545a 100644 --- a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java +++ b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java @@ -1,7 +1,5 @@ package io.a2a.client.transport.jsonrpc; -import static io.a2a.client.transport.jsonrpc.JsonMessages.AGENT_CARD; -import static io.a2a.client.transport.jsonrpc.JsonMessages.AGENT_CARD_SUPPORTS_EXTENDED; import static io.a2a.client.transport.jsonrpc.JsonMessages.CANCEL_TASK_TEST_REQUEST; import static io.a2a.client.transport.jsonrpc.JsonMessages.CANCEL_TASK_TEST_RESPONSE; import static io.a2a.client.transport.jsonrpc.JsonMessages.GET_AUTHENTICATED_EXTENDED_AGENT_CARD_REQUEST; @@ -43,7 +41,6 @@ import io.a2a.spec.AgentCard; import io.a2a.spec.ExtensionSupportRequiredError; import io.a2a.spec.VersionNotSupportedError; -import io.a2a.spec.AgentInterface; import io.a2a.spec.AgentSkill; import io.a2a.spec.Artifact; import io.a2a.spec.AuthenticationInfo; @@ -67,7 +64,6 @@ import io.a2a.spec.TaskQueryParams; import io.a2a.spec.TaskState; import io.a2a.spec.TextPart; -import io.a2a.spec.TransportProtocol; import io.a2a.util.Utils; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -322,7 +318,7 @@ public void testA2AClientGetTaskPushNotificationConfig() throws Exception { } @Test - public void testA2AClientSetTaskPushNotificationConfig() throws Exception { + public void testA2AClientCreateTaskPushNotificationConfig() throws Exception { this.server.when( request() .withMethod("POST") @@ -337,7 +333,7 @@ public void testA2AClientSetTaskPushNotificationConfig() throws Exception { ); JSONRPCTransport client = new JSONRPCTransport("http://localhost:4001"); - TaskPushNotificationConfig taskPushNotificationConfig = client.setTaskPushNotificationConfiguration( + TaskPushNotificationConfig taskPushNotificationConfig = client.createTaskPushNotificationConfiguration( new TaskPushNotificationConfig("de38c76d-d54c-436c-8b9f-4c2703648d64", PushNotificationConfig.builder() .id("c295ea44-7543-4f78-b524-7a38915ad6e4") @@ -378,7 +374,6 @@ public void testA2AClientGetExtendedAgentCard() throws Exception { assertEquals("https://docs.examplegeoservices.com/georoute-agent/api", agentCard.documentationUrl()); assertTrue(agentCard.capabilities().streaming()); assertTrue(agentCard.capabilities().pushNotifications()); - assertFalse(agentCard.capabilities().stateTransitionHistory()); assertTrue(agentCard.capabilities().extendedAgentCard()); Map securitySchemes = agentCard.securitySchemes(); assertNotNull(securitySchemes); diff --git a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java index dfdbb9741..211f5e4f6 100644 --- a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java +++ b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java @@ -28,7 +28,6 @@ public class JsonMessages { "capabilities": { "streaming": true, "pushNotifications": true, - "stateTransitionHistory": false, "extendedAgentCard": false }, "securitySchemes": { @@ -340,7 +339,7 @@ public class JsonMessages { static final String SET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_REQUEST = """ { "jsonrpc":"2.0", - "method":"SetTaskPushNotificationConfig", + "method":"CreateTaskPushNotificationConfig", "params":{ "parent":"tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", "configId":"c295ea44-7543-4f78-b524-7a38915ad6e4", @@ -610,7 +609,6 @@ public class JsonMessages { "capabilities": { "streaming": true, "pushNotifications": true, - "stateTransitionHistory": false, "extendedAgentCard": true }, "securitySchemes": { @@ -691,7 +689,6 @@ public class JsonMessages { "capabilities": { "streaming": true, "pushNotifications": true, - "stateTransitionHistory": false, "extendedAgentCard": true }, "securitySchemes": { diff --git a/client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java b/client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java index 6513086da..a144ffbe4 100644 --- a/client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java +++ b/client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java @@ -269,10 +269,10 @@ private String buildListTasksQueryString(ListTasksParams request) { } @Override - public TaskPushNotificationConfig setTaskPushNotificationConfiguration(TaskPushNotificationConfig request, @Nullable ClientCallContext context) throws A2AClientException { + public TaskPushNotificationConfig createTaskPushNotificationConfiguration(TaskPushNotificationConfig request, @Nullable ClientCallContext context) throws A2AClientException { checkNotNullParam("request", request); - io.a2a.grpc.SetTaskPushNotificationConfigRequest.Builder builder - = io.a2a.grpc.SetTaskPushNotificationConfigRequest.newBuilder(); + io.a2a.grpc.CreateTaskPushNotificationConfigRequest.Builder builder + = io.a2a.grpc.CreateTaskPushNotificationConfigRequest.newBuilder(); builder.setConfig(ProtoUtils.ToProto.taskPushNotificationConfig(request)) .setParent("tasks/" + request.taskId()); if (request.pushNotificationConfig().id() != null) { diff --git a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java index c0c2360b0..f324f004e 100644 --- a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java +++ b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java @@ -121,8 +121,7 @@ public class JsonRestMessages { "documentationUrl": "https://docs.examplegeoservices.com/georoute-agent/api", "capabilities": { "streaming": true, - "pushNotifications": true, - "stateTransitionHistory": false + "pushNotifications": true }, "securitySchemes": { "google": { @@ -188,8 +187,7 @@ public class JsonRestMessages { "documentationUrl": "https://docs.examplegeoservices.com/georoute-agent/api", "capabilities": { "streaming": true, - "pushNotifications": true, - "stateTransitionHistory": false + "pushNotifications": true }, "securitySchemes": { "google": { @@ -255,8 +253,7 @@ public class JsonRestMessages { "documentationUrl": "https://docs.examplegeoservices.com/georoute-agent/api", "capabilities": { "streaming": true, - "pushNotifications": true, - "stateTransitionHistory": false + "pushNotifications": true }, "securitySchemes": { "google": { diff --git a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java index 879363d9c..04efb4eca 100644 --- a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java +++ b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java @@ -80,7 +80,6 @@ public class RestTransportTest { .capabilities(AgentCapabilities.builder() .streaming(true) .pushNotifications(true) - .stateTransitionHistory(true) .build()) .defaultInputModes(Collections.singletonList("text")) .defaultOutputModes(Collections.singletonList("text")) @@ -287,11 +286,11 @@ public void testSendMessageStreaming() throws Exception { } /** - * Test of setTaskPushNotificationConfiguration method, of class JSONRestTransport. + * Test of CreateTaskPushNotificationConfiguration method, of class JSONRestTransport. */ @Test - public void testSetTaskPushNotificationConfiguration() throws Exception { - log.info("Testing setTaskPushNotificationConfiguration"); + public void testCreateTaskPushNotificationConfiguration() throws Exception { + log.info("Testing CreateTaskPushNotificationConfiguration"); this.server.when( request() .withMethod("POST") @@ -312,7 +311,7 @@ public void testSetTaskPushNotificationConfiguration() throws Exception { .authentication( new AuthenticationInfo(Collections.singletonList("jwt"), null)) .build(), "tenant"); - TaskPushNotificationConfig taskPushNotificationConfig = client.setTaskPushNotificationConfiguration(pushedConfig, null); + TaskPushNotificationConfig taskPushNotificationConfig = client.createTaskPushNotificationConfiguration(pushedConfig, null); PushNotificationConfig pushNotificationConfig = taskPushNotificationConfig.pushNotificationConfig(); assertNotNull(pushNotificationConfig); assertEquals("https://example.com/callback", pushNotificationConfig.url()); diff --git a/client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java b/client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java index df95e9ffd..504e4c601 100644 --- a/client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java +++ b/client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java @@ -79,15 +79,15 @@ void sendMessageStreaming(MessageSendParams request, Consumer the type of the result value returned in successful responses */ -public abstract sealed class A2AResponse implements A2AMessage permits CancelTaskResponse, DeleteTaskPushNotificationConfigResponse, GetExtendedAgentCardResponse, GetTaskPushNotificationConfigResponse, GetTaskResponse, A2AErrorResponse, ListTaskPushNotificationConfigResponse, ListTasksResponse, SendMessageResponse, SendStreamingMessageResponse, SetTaskPushNotificationConfigResponse { +public abstract sealed class A2AResponse implements A2AMessage permits CancelTaskResponse, DeleteTaskPushNotificationConfigResponse, GetExtendedAgentCardResponse, GetTaskPushNotificationConfigResponse, GetTaskResponse, A2AErrorResponse, ListTaskPushNotificationConfigResponse, ListTasksResponse, SendMessageResponse, SendStreamingMessageResponse, CreateTaskPushNotificationConfigResponse { /** The JSON-RPC protocol version. */ protected String jsonrpc; diff --git a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SetTaskPushNotificationConfigRequest.java b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/CreateTaskPushNotificationConfigRequest.java similarity index 76% rename from jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SetTaskPushNotificationConfigRequest.java rename to jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/CreateTaskPushNotificationConfigRequest.java index c01e7c2f4..b9b8716be 100644 --- a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SetTaskPushNotificationConfigRequest.java +++ b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/CreateTaskPushNotificationConfigRequest.java @@ -16,12 +16,12 @@ *

* This class implements the JSON-RPC {@code tasks/pushNotificationConfig/set} method. * - * @see SetTaskPushNotificationConfigResponse for the response + * @see CreateTaskPushNotificationConfigResponse for the response * @see TaskPushNotificationConfig for the parameter structure * @see PushNotificationConfig for notification endpoint details * @see A2A Protocol Specification */ -public final class SetTaskPushNotificationConfigRequest extends NonStreamingJSONRPCRequest { +public final class CreateTaskPushNotificationConfigRequest extends NonStreamingJSONRPCRequest { /** * Constructs request with all parameters. @@ -30,7 +30,7 @@ public final class SetTaskPushNotificationConfigRequest extends NonStreamingJSON * @param id the request ID * @param params the request parameters */ - public SetTaskPushNotificationConfigRequest(String jsonrpc, Object id, TaskPushNotificationConfig params) { + public CreateTaskPushNotificationConfigRequest(String jsonrpc, Object id, TaskPushNotificationConfig params) { super(jsonrpc, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD, id, params); } @@ -40,7 +40,7 @@ public SetTaskPushNotificationConfigRequest(String jsonrpc, Object id, TaskPushN * @param id the request ID * @param taskPushConfig the task push notification configuration */ - public SetTaskPushNotificationConfigRequest(String id, TaskPushNotificationConfig taskPushConfig) { + public CreateTaskPushNotificationConfigRequest(String id, TaskPushNotificationConfig taskPushConfig) { this(null, id, taskPushConfig); } @@ -73,7 +73,7 @@ private Builder() { * @param jsonrpc the JSON-RPC version * @return this builder for method chaining */ - public SetTaskPushNotificationConfigRequest.Builder jsonrpc(String jsonrpc) { + public CreateTaskPushNotificationConfigRequest.Builder jsonrpc(String jsonrpc) { this.jsonrpc = jsonrpc; return this; } @@ -84,7 +84,7 @@ public SetTaskPushNotificationConfigRequest.Builder jsonrpc(String jsonrpc) { * @param id the request ID * @return this builder for method chaining */ - public SetTaskPushNotificationConfigRequest.Builder id(Object id) { + public CreateTaskPushNotificationConfigRequest.Builder id(Object id) { this.id = id; return this; } @@ -95,7 +95,7 @@ public SetTaskPushNotificationConfigRequest.Builder id(Object id) { * @param params the request parameters * @return this builder for method chaining */ - public SetTaskPushNotificationConfigRequest.Builder params(TaskPushNotificationConfig params) { + public CreateTaskPushNotificationConfigRequest.Builder params(TaskPushNotificationConfig params) { this.params = params; return this; } @@ -105,11 +105,11 @@ public SetTaskPushNotificationConfigRequest.Builder params(TaskPushNotificationC * * @return a new instance */ - public SetTaskPushNotificationConfigRequest build() { + public CreateTaskPushNotificationConfigRequest build() { if (id == null) { id = UUID.randomUUID().toString(); } - return new SetTaskPushNotificationConfigRequest(jsonrpc, id, params); + return new CreateTaskPushNotificationConfigRequest(jsonrpc, id, params); } } } diff --git a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SetTaskPushNotificationConfigResponse.java b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/CreateTaskPushNotificationConfigResponse.java similarity index 75% rename from jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SetTaskPushNotificationConfigResponse.java rename to jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/CreateTaskPushNotificationConfigResponse.java index 0c39b9713..e46aa7d2b 100644 --- a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SetTaskPushNotificationConfigResponse.java +++ b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/CreateTaskPushNotificationConfigResponse.java @@ -14,12 +14,12 @@ * If push notifications are not supported or an error occurs, the error field will contain * a {@link A2AError} (e.g., {@link PushNotificationNotSupportedError}). * - * @see SetTaskPushNotificationConfigRequest for the corresponding request + * @see CreateTaskPushNotificationConfigRequest for the corresponding request * @see TaskPushNotificationConfig for the configuration structure * @see PushNotificationNotSupportedError for the error when unsupported * @see A2A Protocol Specification */ -public final class SetTaskPushNotificationConfigResponse extends A2AResponse { +public final class CreateTaskPushNotificationConfigResponse extends A2AResponse { /** * Constructs response with all parameters. @@ -29,7 +29,7 @@ public final class SetTaskPushNotificationConfigResponse extends A2AResponse the type of the request parameters */ public abstract sealed class NonStreamingJSONRPCRequest extends A2ARequest permits GetTaskRequest, - CancelTaskRequest, SetTaskPushNotificationConfigRequest, GetTaskPushNotificationConfigRequest, + CancelTaskRequest, CreateTaskPushNotificationConfigRequest, GetTaskPushNotificationConfigRequest, SendMessageRequest, DeleteTaskPushNotificationConfigRequest, ListTaskPushNotificationConfigRequest, GetExtendedAgentCardRequest, ListTasksRequest { diff --git a/reference/jsonrpc/src/main/java/io/a2a/server/apps/quarkus/A2AServerRoutes.java b/reference/jsonrpc/src/main/java/io/a2a/server/apps/quarkus/A2AServerRoutes.java index 18e18a2f1..7990bd753 100644 --- a/reference/jsonrpc/src/main/java/io/a2a/server/apps/quarkus/A2AServerRoutes.java +++ b/reference/jsonrpc/src/main/java/io/a2a/server/apps/quarkus/A2AServerRoutes.java @@ -50,8 +50,8 @@ import io.a2a.jsonrpc.common.wrappers.SendMessageResponse; import io.a2a.jsonrpc.common.wrappers.SendStreamingMessageRequest; import io.a2a.jsonrpc.common.wrappers.SendStreamingMessageResponse; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigRequest; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigResponse; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigRequest; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigResponse; import io.a2a.jsonrpc.common.wrappers.SubscribeToTaskRequest; import io.a2a.server.ServerCallContext; import io.a2a.server.auth.UnauthenticatedUser; @@ -170,7 +170,7 @@ private A2AResponse processNonStreamingRequest(NonStreamingJSONRPCRequest if (request instanceof ListTasksRequest req) { return jsonRpcHandler.onListTasks(req, context); } - if (request instanceof SetTaskPushNotificationConfigRequest req) { + if (request instanceof CreateTaskPushNotificationConfigRequest req) { return jsonRpcHandler.setPushNotificationConfig(req, context); } if (request instanceof GetTaskPushNotificationConfigRequest req) { @@ -277,8 +277,8 @@ private static com.google.protobuf.MessageOrBuilder convertToProto(A2AResponse contextCaptor = ArgumentCaptor.forClass(ServerCallContext.class); @@ -364,7 +364,7 @@ public void testSetTaskPushNotificationConfig_MethodNameSetInContext() { routes.invokeJSONRPCHandler(jsonRpcRequest, mockRoutingContext); // Assert - verify(mockJsonRpcHandler).setPushNotificationConfig(any(SetTaskPushNotificationConfigRequest.class), + verify(mockJsonRpcHandler).setPushNotificationConfig(any(CreateTaskPushNotificationConfigRequest.class), contextCaptor.capture()); ServerCallContext capturedContext = contextCaptor.getValue(); assertNotNull(capturedContext); diff --git a/reference/rest/src/main/java/io/a2a/server/rest/quarkus/A2AServerRoutes.java b/reference/rest/src/main/java/io/a2a/server/rest/quarkus/A2AServerRoutes.java index 46d0d38e6..c5a485931 100644 --- a/reference/rest/src/main/java/io/a2a/server/rest/quarkus/A2AServerRoutes.java +++ b/reference/rest/src/main/java/io/a2a/server/rest/quarkus/A2AServerRoutes.java @@ -253,7 +253,7 @@ public void subscribeToTask(RoutingContext rc) { } @Route(regex = "^\\/(?[^\\/]*\\/?)tasks\\/(?[^/]+)\\/pushNotificationConfigs$", order = 1, methods = {Route.HttpMethod.POST}, consumes = {APPLICATION_JSON}, type = Route.HandlerType.BLOCKING) - public void setTaskPushNotificationConfiguration(@Body String body, RoutingContext rc) { + public void CreateTaskPushNotificationConfiguration(@Body String body, RoutingContext rc) { String taskId = rc.pathParam("taskId"); ServerCallContext context = createCallContext(rc, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); HTTPRestResponse response = null; @@ -261,7 +261,7 @@ public void setTaskPushNotificationConfiguration(@Body String body, RoutingConte if (taskId == null || taskId.isEmpty()) { response = jsonRestHandler.createErrorResponse(new InvalidParamsError("bad task id")); } else { - response = jsonRestHandler.setTaskPushNotificationConfiguration(taskId, body, extractTenant(rc), context); + response = jsonRestHandler.CreateTaskPushNotificationConfiguration(taskId, body, extractTenant(rc), context); } } catch (Throwable t) { response = jsonRestHandler.createErrorResponse(new InternalError(t.getMessage())); diff --git a/reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java b/reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java index 0f07b421a..9ef8f7c47 100644 --- a/reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java +++ b/reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java @@ -198,23 +198,23 @@ public void testResubscribeTask_MethodNameSetInContext() { } @Test - public void testSetTaskPushNotificationConfiguration_MethodNameSetInContext() { + public void testCreateTaskPushNotificationConfiguration_MethodNameSetInContext() { // Arrange when(mockRoutingContext.pathParam("taskId")).thenReturn("task123"); HTTPRestResponse mockHttpResponse = mock(HTTPRestResponse.class); when(mockHttpResponse.getStatusCode()).thenReturn(200); when(mockHttpResponse.getContentType()).thenReturn("application/json"); when(mockHttpResponse.getBody()).thenReturn("{}"); - when(mockRestHandler.setTaskPushNotificationConfiguration(anyString(), anyString(), anyString(), + when(mockRestHandler.CreateTaskPushNotificationConfiguration(anyString(), anyString(), anyString(), any(ServerCallContext.class))).thenReturn(mockHttpResponse); ArgumentCaptor contextCaptor = ArgumentCaptor.forClass(ServerCallContext.class); // Act - routes.setTaskPushNotificationConfiguration("{}", mockRoutingContext); + routes.CreateTaskPushNotificationConfiguration("{}", mockRoutingContext); // Assert - verify(mockRestHandler).setTaskPushNotificationConfiguration(eq("task123"), eq("{}"), anyString(), contextCaptor.capture()); + verify(mockRestHandler).CreateTaskPushNotificationConfiguration(eq("task123"), eq("{}"), anyString(), contextCaptor.capture()); ServerCallContext capturedContext = contextCaptor.getValue(); assertNotNull(capturedContext); assertEquals(SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD, capturedContext.getState().get(METHOD_NAME_KEY)); diff --git a/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java b/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java index 002acbafd..d087e6acc 100644 --- a/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java +++ b/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java @@ -690,7 +690,7 @@ private void startBackgroundConsumption() { } @Override - public TaskPushNotificationConfig onSetTaskPushNotificationConfig( + public TaskPushNotificationConfig onCreateTaskPushNotificationConfig( TaskPushNotificationConfig params, ServerCallContext context) throws A2AError { if (pushConfigStore == null) { throw new UnsupportedOperationError(); diff --git a/server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java b/server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java index 6d99fe399..639098967 100644 --- a/server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java +++ b/server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java @@ -39,7 +39,7 @@ Flow.Publisher onMessageSendStream( MessageSendParams params, ServerCallContext context) throws A2AError; - TaskPushNotificationConfig onSetTaskPushNotificationConfig( + TaskPushNotificationConfig onCreateTaskPushNotificationConfig( TaskPushNotificationConfig params, ServerCallContext context) throws A2AError; diff --git a/server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java b/server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java index ea5bbe797..70a8a6a97 100644 --- a/server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java +++ b/server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java @@ -50,7 +50,7 @@ public class AbstractA2ARequestHandlerTest { - protected static final AgentCard CARD = createAgentCard(true, true, true); + protected static final AgentCard CARD = createAgentCard(true, true); protected static final Task MINIMAL_TASK = Task.builder() .id("task-123") @@ -111,7 +111,7 @@ public void cleanup() { agentExecutorCancel = null; } - protected static AgentCard createAgentCard(boolean streaming, boolean pushNotifications, boolean stateTransitionHistory) { + protected static AgentCard createAgentCard(boolean streaming, boolean pushNotifications) { String preferredTransport = loadPreferredTransportFromProperties(); AgentCard.Builder builder = AgentCard.builder() .name("test-card") @@ -122,7 +122,6 @@ protected static AgentCard createAgentCard(boolean streaming, boolean pushNotifi .capabilities(AgentCapabilities.builder() .streaming(streaming) .pushNotifications(pushNotifications) - .stateTransitionHistory(stateTransitionHistory) .build()) .defaultInputModes(new ArrayList<>()) .defaultOutputModes(new ArrayList<>()) diff --git a/spec-grpc/src/main/java/io/a2a/grpc/A2A.java b/spec-grpc/src/main/java/io/a2a/grpc/A2A.java index 0fa06787b..6dc06f861 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/A2A.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/A2A.java @@ -247,10 +247,10 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_a2a_v1_DeleteTaskPushNotificationConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_descriptor; + internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_fieldAccessorTable; + internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_a2a_v1_SubscribeToTaskRequest_descriptor; static final @@ -361,172 +361,171 @@ public static void registerAllExtensions( ".a2a.v1.SecurityScheme:\0028\001B\024\n\022_documenta" + "tion_urlB\013\n\t_icon_urlJ\004\010\003\020\004J\004\010\016\020\017J\004\010\017\020\020\"" + "<\n\rAgentProvider\022\020\n\003url\030\001 \001(\tB\003\340A\002\022\031\n\014or" + - "ganization\030\002 \001(\tB\003\340A\002\"\233\002\n\021AgentCapabilit" + + "ganization\030\002 \001(\tB\003\340A\002\"\335\001\n\021AgentCapabilit" + "ies\022\026\n\tstreaming\030\001 \001(\010H\000\210\001\001\022\037\n\022push_noti" + "fications\030\002 \001(\010H\001\210\001\001\022*\n\nextensions\030\003 \003(\013" + - "2\026.a2a.v1.AgentExtension\022%\n\030state_transi" + - "tion_history\030\004 \001(\010H\002\210\001\001\022 \n\023extended_agen" + - "t_card\030\005 \001(\010H\003\210\001\001B\014\n\n_streamingB\025\n\023_push" + - "_notificationsB\033\n\031_state_transition_hist" + - "oryB\026\n\024_extended_agent_card\"m\n\016AgentExte" + - "nsion\022\013\n\003uri\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022" + - "\020\n\010required\030\003 \001(\010\022\'\n\006params\030\004 \001(\0132\027.goog" + - "le.protobuf.Struct\"\276\001\n\nAgentSkill\022\017\n\002id\030" + - "\001 \001(\tB\003\340A\002\022\021\n\004name\030\002 \001(\tB\003\340A\002\022\030\n\013descrip" + - "tion\030\003 \001(\tB\003\340A\002\022\021\n\004tags\030\004 \003(\tB\003\340A\002\022\020\n\010ex" + - "amples\030\005 \003(\t\022\023\n\013input_modes\030\006 \003(\t\022\024\n\014out" + - "put_modes\030\007 \003(\t\022\"\n\010security\030\010 \003(\0132\020.a2a." + - "v1.Security\"m\n\022AgentCardSignature\022\026\n\tpro" + - "tected\030\001 \001(\tB\003\340A\002\022\026\n\tsignature\030\002 \001(\tB\003\340A" + - "\002\022\'\n\006header\030\003 \001(\0132\027.google.protobuf.Stru" + - "ct\"v\n\032TaskPushNotificationConfig\022\021\n\004name" + - "\030\001 \001(\tB\003\340A\002\022E\n\030push_notification_config\030" + - "\002 \001(\0132\036.a2a.v1.PushNotificationConfigB\003\340" + - "A\002\"\032\n\nStringList\022\014\n\004list\030\001 \003(\t\"~\n\010Securi" + - "ty\022.\n\007schemes\030\001 \003(\0132\035.a2a.v1.Security.Sc" + - "hemesEntry\032B\n\014SchemesEntry\022\013\n\003key\030\001 \001(\t\022" + - "!\n\005value\030\002 \001(\0132\022.a2a.v1.StringList:\0028\001\"\361" + - "\002\n\016SecurityScheme\022?\n\027api_key_security_sc" + - "heme\030\001 \001(\0132\034.a2a.v1.APIKeySecurityScheme" + - "H\000\022C\n\031http_auth_security_scheme\030\002 \001(\0132\036." + - "a2a.v1.HTTPAuthSecuritySchemeH\000\022>\n\026oauth" + - "2_security_scheme\030\003 \001(\0132\034.a2a.v1.OAuth2S" + - "ecuritySchemeH\000\022N\n\037open_id_connect_secur" + - "ity_scheme\030\004 \001(\0132#.a2a.v1.OpenIdConnectS" + - "ecuritySchemeH\000\022?\n\024mtls_security_scheme\030" + - "\005 \001(\0132\037.a2a.v1.MutualTlsSecuritySchemeH\000" + - "B\010\n\006scheme\"U\n\024APIKeySecurityScheme\022\023\n\013de" + - "scription\030\001 \001(\t\022\025\n\010location\030\002 \001(\tB\003\340A\002\022\021" + - "\n\004name\030\003 \001(\tB\003\340A\002\"Y\n\026HTTPAuthSecuritySch" + - "eme\022\023\n\013description\030\001 \001(\t\022\023\n\006scheme\030\002 \001(\t" + - "B\003\340A\002\022\025\n\rbearer_format\030\003 \001(\t\"p\n\024OAuth2Se" + - "curityScheme\022\023\n\013description\030\001 \001(\t\022&\n\005flo" + - "ws\030\002 \001(\0132\022.a2a.v1.OAuthFlowsB\003\340A\002\022\033\n\023oau" + - "th2_metadata_url\030\003 \001(\t\"T\n\033OpenIdConnectS" + - "ecurityScheme\022\023\n\013description\030\001 \001(\t\022 \n\023op" + - "en_id_connect_url\030\002 \001(\tB\003\340A\002\".\n\027MutualTl" + - "sSecurityScheme\022\023\n\013description\030\001 \001(\t\"\330\001\n" + - "\nOAuthFlows\022@\n\022authorization_code\030\001 \001(\0132" + - "\".a2a.v1.AuthorizationCodeOAuthFlowH\000\022@\n" + - "\022client_credentials\030\002 \001(\0132\".a2a.v1.Clien" + - "tCredentialsOAuthFlowH\000\0222\n\013device_code\030\005" + - " \001(\0132\033.a2a.v1.DeviceCodeOAuthFlowH\000B\006\n\004f" + - "lowJ\004\010\003\020\004J\004\010\004\020\005\"\364\001\n\032AuthorizationCodeOAu" + - "thFlow\022\036\n\021authorization_url\030\001 \001(\tB\003\340A\002\022\026" + - "\n\ttoken_url\030\002 \001(\tB\003\340A\002\022\023\n\013refresh_url\030\003 " + - "\001(\t\022C\n\006scopes\030\004 \003(\0132..a2a.v1.Authorizati" + - "onCodeOAuthFlow.ScopesEntryB\003\340A\002\022\025\n\rpkce" + - "_required\030\005 \001(\010\032-\n\013ScopesEntry\022\013\n\003key\030\001 " + - "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\275\001\n\032ClientCredent" + - "ialsOAuthFlow\022\026\n\ttoken_url\030\001 \001(\tB\003\340A\002\022\023\n" + - "\013refresh_url\030\002 \001(\t\022C\n\006scopes\030\003 \003(\0132..a2a" + - ".v1.ClientCredentialsOAuthFlow.ScopesEnt" + - "ryB\003\340A\002\032-\n\013ScopesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + - "alue\030\002 \001(\t:\0028\001\"\326\001\n\023DeviceCodeOAuthFlow\022%" + - "\n\030device_authorization_url\030\001 \001(\tB\003\340A\002\022\026\n" + - "\ttoken_url\030\002 \001(\tB\003\340A\002\022\023\n\013refresh_url\030\003 \001" + - "(\t\022<\n\006scopes\030\004 \003(\0132\'.a2a.v1.DeviceCodeOA" + - "uthFlow.ScopesEntryB\003\340A\002\032-\n\013ScopesEntry\022" + - "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\257\001\n\022Send" + - "MessageRequest\022\016\n\006tenant\030\004 \001(\t\022%\n\007messag" + - "e\030\001 \001(\0132\017.a2a.v1.MessageB\003\340A\002\0227\n\rconfigu" + - "ration\030\002 \001(\0132 .a2a.v1.SendMessageConfigu" + - "ration\022)\n\010metadata\030\003 \001(\0132\027.google.protob" + - "uf.Struct\"c\n\016GetTaskRequest\022\016\n\006tenant\030\003 " + - "\001(\t\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\033\n\016history_length" + - "\030\002 \001(\005H\000\210\001\001B\021\n\017_history_length\"\265\002\n\020ListT" + - "asksRequest\022\016\n\006tenant\030\t \001(\t\022\022\n\ncontext_i" + - "d\030\001 \001(\t\022!\n\006status\030\002 \001(\0162\021.a2a.v1.TaskSta" + - "te\022\026\n\tpage_size\030\003 \001(\005H\000\210\001\001\022\022\n\npage_token" + - "\030\004 \001(\t\022\033\n\016history_length\030\005 \001(\005H\001\210\001\001\022:\n\026s" + - "tatus_timestamp_after\030\006 \001(\0132\032.google.pro" + - "tobuf.Timestamp\022\036\n\021include_artifacts\030\007 \001" + - "(\010H\002\210\001\001B\014\n\n_page_sizeB\021\n\017_history_length" + - "B\024\n\022_include_artifacts\"\204\001\n\021ListTasksResp" + - "onse\022 \n\005tasks\030\001 \003(\0132\014.a2a.v1.TaskB\003\340A\002\022\034" + - "\n\017next_page_token\030\002 \001(\tB\003\340A\002\022\026\n\tpage_siz" + - "e\030\003 \001(\005B\003\340A\002\022\027\n\ntotal_size\030\004 \001(\005B\003\340A\002\"1\n" + - "\021CancelTaskRequest\022\016\n\006tenant\030\002 \001(\t\022\014\n\004na" + - "me\030\001 \001(\t\"D\n$GetTaskPushNotificationConfi" + - "gRequest\022\016\n\006tenant\030\002 \001(\t\022\014\n\004name\030\001 \001(\t\"G" + - "\n\'DeleteTaskPushNotificationConfigReques" + - "t\022\016\n\006tenant\030\002 \001(\t\022\014\n\004name\030\001 \001(\t\"\234\001\n$SetT" + - "askPushNotificationConfigRequest\022\016\n\006tena" + - "nt\030\004 \001(\t\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\026\n\tconfig_" + - "id\030\002 \001(\tB\003\340A\002\0227\n\006config\030\003 \001(\0132\".a2a.v1.T" + - "askPushNotificationConfigB\003\340A\002\"6\n\026Subscr" + - "ibeToTaskRequest\022\016\n\006tenant\030\002 \001(\t\022\014\n\004name" + - "\030\001 \001(\t\"n\n%ListTaskPushNotificationConfig" + - "Request\022\016\n\006tenant\030\004 \001(\t\022\016\n\006parent\030\001 \001(\t\022" + - "\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"-" + - "\n\033GetExtendedAgentCardRequest\022\016\n\006tenant\030" + - "\001 \001(\t\"b\n\023SendMessageResponse\022\034\n\004task\030\001 \001" + - "(\0132\014.a2a.v1.TaskH\000\022\"\n\007message\030\002 \001(\0132\017.a2" + - "a.v1.MessageH\000B\t\n\007payload\"\321\001\n\016StreamResp" + - "onse\022\034\n\004task\030\001 \001(\0132\014.a2a.v1.TaskH\000\022\"\n\007me" + - "ssage\030\002 \001(\0132\017.a2a.v1.MessageH\000\0226\n\rstatus" + - "_update\030\003 \001(\0132\035.a2a.v1.TaskStatusUpdateE" + - "ventH\000\022:\n\017artifact_update\030\004 \001(\0132\037.a2a.v1" + - ".TaskArtifactUpdateEventH\000B\t\n\007payload\"v\n" + - "&ListTaskPushNotificationConfigResponse\022" + - "3\n\007configs\030\001 \003(\0132\".a2a.v1.TaskPushNotifi" + - "cationConfig\022\027\n\017next_page_token\030\002 \001(\t*\372\001" + - "\n\tTaskState\022\032\n\026TASK_STATE_UNSPECIFIED\020\000\022" + - "\030\n\024TASK_STATE_SUBMITTED\020\001\022\026\n\022TASK_STATE_" + - "WORKING\020\002\022\030\n\024TASK_STATE_COMPLETED\020\003\022\025\n\021T" + - "ASK_STATE_FAILED\020\004\022\030\n\024TASK_STATE_CANCELL" + - "ED\020\005\022\035\n\031TASK_STATE_INPUT_REQUIRED\020\006\022\027\n\023T" + - "ASK_STATE_REJECTED\020\007\022\034\n\030TASK_STATE_AUTH_" + - "REQUIRED\020\010*;\n\004Role\022\024\n\020ROLE_UNSPECIFIED\020\000" + - "\022\r\n\tROLE_USER\020\001\022\016\n\nROLE_AGENT\020\0022\276\016\n\nA2AS" + - "ervice\022}\n\013SendMessage\022\032.a2a.v1.SendMessa" + - "geRequest\032\033.a2a.v1.SendMessageResponse\"5" + - "\202\323\344\223\002/\"\r/message:send:\001*Z\033\"\026/{tenant}/me" + - "ssage:send:\001*\022\207\001\n\024SendStreamingMessage\022\032" + - ".a2a.v1.SendMessageRequest\032\026.a2a.v1.Stre" + - "amResponse\"9\202\323\344\223\0023\"\017/message:stream:\001*Z\035" + - "\"\030/{tenant}/message:stream:\001*0\001\022k\n\007GetTa" + - "sk\022\026.a2a.v1.GetTaskRequest\032\014.a2a.v1.Task" + - "\":\332A\004name\202\323\344\223\002-\022\017/{name=tasks/*}Z\032\022\030/{te" + - "nant}/{name=tasks/*}\022c\n\tListTasks\022\030.a2a." + - "v1.ListTasksRequest\032\031.a2a.v1.ListTasksRe" + - "sponse\"!\202\323\344\223\002\033\022\006/tasksZ\021\022\017/{tenant}/task" + - "s\022~\n\nCancelTask\022\031.a2a.v1.CancelTaskReque" + - "st\032\014.a2a.v1.Task\"G\202\323\344\223\002A\"\026/{name=tasks/*" + - "}:cancel:\001*Z$\"\037/{tenant}/{name=tasks/*}:" + - "cancel:\001*\022\224\001\n\017SubscribeToTask\022\036.a2a.v1.S" + - "ubscribeToTaskRequest\032\026.a2a.v1.StreamRes" + - "ponse\"G\202\323\344\223\002A\022\031/{name=tasks/*}:subscribe" + - "Z$\022\"/{tenant}/{name=tasks/*}:subscribe0\001" + - "\022\373\001\n\035SetTaskPushNotificationConfig\022,.a2a" + - ".v1.SetTaskPushNotificationConfigRequest" + - "\032\".a2a.v1.TaskPushNotificationConfig\"\207\001\332" + - "A\rparent,config\202\323\344\223\002q\")/{parent=tasks/*/" + - "pushNotificationConfigs}:\006configZ<\"2/{te" + - "nant}/{parent=tasks/*/pushNotificationCo" + - "nfigs}:\006config\022\341\001\n\035GetTaskPushNotificati" + - "onConfig\022,.a2a.v1.GetTaskPushNotificatio" + - "nConfigRequest\032\".a2a.v1.TaskPushNotifica" + - "tionConfig\"n\332A\004name\202\323\344\223\002a\022)/{name=tasks/" + - "*/pushNotificationConfigs/*}Z4\0222/{tenant" + - "}/{name=tasks/*/pushNotificationConfigs/" + - "*}\022\361\001\n\036ListTaskPushNotificationConfig\022-." + - "a2a.v1.ListTaskPushNotificationConfigReq" + - "uest\032..a2a.v1.ListTaskPushNotificationCo" + - "nfigResponse\"p\332A\006parent\202\323\344\223\002a\022)/{parent=" + - "tasks/*}/pushNotificationConfigsZ4\0222/{te" + - "nant}/{parent=tasks/*}/pushNotificationC" + - "onfigs\022\211\001\n\024GetExtendedAgentCard\022#.a2a.v1" + - ".GetExtendedAgentCardRequest\032\021.a2a.v1.Ag" + - "entCard\"9\202\323\344\223\0023\022\022/extendedAgentCardZ\035\022\033/" + - "{tenant}/extendedAgentCard\022\333\001\n DeleteTas" + - "kPushNotificationConfig\022/.a2a.v1.DeleteT" + - "askPushNotificationConfigRequest\032\026.googl" + - "e.protobuf.Empty\"n\332A\004name\202\323\344\223\002a*)/{name=" + - "tasks/*/pushNotificationConfigs/*}Z4*2/{" + - "tenant}/{name=tasks/*/pushNotificationCo" + - "nfigs/*}B7\n\013io.a2a.grpcB\003A2AP\001Z\030google.g" + - "olang.org/a2a/v1\252\002\006A2a.V1b\006proto3" + "2\026.a2a.v1.AgentExtension\022 \n\023extended_age" + + "nt_card\030\005 \001(\010H\002\210\001\001B\014\n\n_streamingB\025\n\023_pus" + + "h_notificationsB\026\n\024_extended_agent_cardJ" + + "\004\010\004\020\005\"m\n\016AgentExtension\022\013\n\003uri\030\001 \001(\t\022\023\n\013" + + "description\030\002 \001(\t\022\020\n\010required\030\003 \001(\010\022\'\n\006p" + + "arams\030\004 \001(\0132\027.google.protobuf.Struct\"\276\001\n" + + "\nAgentSkill\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\021\n\004name\030\002 \001" + + "(\tB\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\002\022\021\n\004tag" + + "s\030\004 \003(\tB\003\340A\002\022\020\n\010examples\030\005 \003(\t\022\023\n\013input_" + + "modes\030\006 \003(\t\022\024\n\014output_modes\030\007 \003(\t\022\"\n\010sec" + + "urity\030\010 \003(\0132\020.a2a.v1.Security\"m\n\022AgentCa" + + "rdSignature\022\026\n\tprotected\030\001 \001(\tB\003\340A\002\022\026\n\ts" + + "ignature\030\002 \001(\tB\003\340A\002\022\'\n\006header\030\003 \001(\0132\027.go" + + "ogle.protobuf.Struct\"v\n\032TaskPushNotifica" + + "tionConfig\022\021\n\004name\030\001 \001(\tB\003\340A\002\022E\n\030push_no" + + "tification_config\030\002 \001(\0132\036.a2a.v1.PushNot" + + "ificationConfigB\003\340A\002\"\032\n\nStringList\022\014\n\004li" + + "st\030\001 \003(\t\"~\n\010Security\022.\n\007schemes\030\001 \003(\0132\035." + + "a2a.v1.Security.SchemesEntry\032B\n\014SchemesE" + + "ntry\022\013\n\003key\030\001 \001(\t\022!\n\005value\030\002 \001(\0132\022.a2a.v" + + "1.StringList:\0028\001\"\361\002\n\016SecurityScheme\022?\n\027a" + + "pi_key_security_scheme\030\001 \001(\0132\034.a2a.v1.AP" + + "IKeySecuritySchemeH\000\022C\n\031http_auth_securi" + + "ty_scheme\030\002 \001(\0132\036.a2a.v1.HTTPAuthSecurit" + + "ySchemeH\000\022>\n\026oauth2_security_scheme\030\003 \001(" + + "\0132\034.a2a.v1.OAuth2SecuritySchemeH\000\022N\n\037ope" + + "n_id_connect_security_scheme\030\004 \001(\0132#.a2a" + + ".v1.OpenIdConnectSecuritySchemeH\000\022?\n\024mtl" + + "s_security_scheme\030\005 \001(\0132\037.a2a.v1.MutualT" + + "lsSecuritySchemeH\000B\010\n\006scheme\"U\n\024APIKeySe" + + "curityScheme\022\023\n\013description\030\001 \001(\t\022\025\n\010loc" + + "ation\030\002 \001(\tB\003\340A\002\022\021\n\004name\030\003 \001(\tB\003\340A\002\"Y\n\026H" + + "TTPAuthSecurityScheme\022\023\n\013description\030\001 \001" + + "(\t\022\023\n\006scheme\030\002 \001(\tB\003\340A\002\022\025\n\rbearer_format" + + "\030\003 \001(\t\"p\n\024OAuth2SecurityScheme\022\023\n\013descri" + + "ption\030\001 \001(\t\022&\n\005flows\030\002 \001(\0132\022.a2a.v1.OAut" + + "hFlowsB\003\340A\002\022\033\n\023oauth2_metadata_url\030\003 \001(\t" + + "\"T\n\033OpenIdConnectSecurityScheme\022\023\n\013descr" + + "iption\030\001 \001(\t\022 \n\023open_id_connect_url\030\002 \001(" + + "\tB\003\340A\002\".\n\027MutualTlsSecurityScheme\022\023\n\013des" + + "cription\030\001 \001(\t\"\330\001\n\nOAuthFlows\022@\n\022authori" + + "zation_code\030\001 \001(\0132\".a2a.v1.Authorization" + + "CodeOAuthFlowH\000\022@\n\022client_credentials\030\002 " + + "\001(\0132\".a2a.v1.ClientCredentialsOAuthFlowH" + + "\000\0222\n\013device_code\030\005 \001(\0132\033.a2a.v1.DeviceCo" + + "deOAuthFlowH\000B\006\n\004flowJ\004\010\003\020\004J\004\010\004\020\005\"\364\001\n\032Au" + + "thorizationCodeOAuthFlow\022\036\n\021authorizatio" + + "n_url\030\001 \001(\tB\003\340A\002\022\026\n\ttoken_url\030\002 \001(\tB\003\340A\002" + + "\022\023\n\013refresh_url\030\003 \001(\t\022C\n\006scopes\030\004 \003(\0132.." + + "a2a.v1.AuthorizationCodeOAuthFlow.Scopes" + + "EntryB\003\340A\002\022\025\n\rpkce_required\030\005 \001(\010\032-\n\013Sco" + + "pesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\"\275\001\n\032ClientCredentialsOAuthFlow\022\026\n\ttoken" + + "_url\030\001 \001(\tB\003\340A\002\022\023\n\013refresh_url\030\002 \001(\t\022C\n\006" + + "scopes\030\003 \003(\0132..a2a.v1.ClientCredentialsO" + + "AuthFlow.ScopesEntryB\003\340A\002\032-\n\013ScopesEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\326\001\n\023Dev" + + "iceCodeOAuthFlow\022%\n\030device_authorization" + + "_url\030\001 \001(\tB\003\340A\002\022\026\n\ttoken_url\030\002 \001(\tB\003\340A\002\022" + + "\023\n\013refresh_url\030\003 \001(\t\022<\n\006scopes\030\004 \003(\0132\'.a" + + "2a.v1.DeviceCodeOAuthFlow.ScopesEntryB\003\340" + + "A\002\032-\n\013ScopesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\"\257\001\n\022SendMessageRequest\022\016\n\006tena" + + "nt\030\004 \001(\t\022%\n\007message\030\001 \001(\0132\017.a2a.v1.Messa" + + "geB\003\340A\002\0227\n\rconfiguration\030\002 \001(\0132 .a2a.v1." + + "SendMessageConfiguration\022)\n\010metadata\030\003 \001" + + "(\0132\027.google.protobuf.Struct\"c\n\016GetTaskRe" + + "quest\022\016\n\006tenant\030\003 \001(\t\022\021\n\004name\030\001 \001(\tB\003\340A\002" + + "\022\033\n\016history_length\030\002 \001(\005H\000\210\001\001B\021\n\017_histor" + + "y_length\"\265\002\n\020ListTasksRequest\022\016\n\006tenant\030" + + "\t \001(\t\022\022\n\ncontext_id\030\001 \001(\t\022!\n\006status\030\002 \001(" + + "\0162\021.a2a.v1.TaskState\022\026\n\tpage_size\030\003 \001(\005H" + + "\000\210\001\001\022\022\n\npage_token\030\004 \001(\t\022\033\n\016history_leng" + + "th\030\005 \001(\005H\001\210\001\001\022:\n\026status_timestamp_after\030" + + "\006 \001(\0132\032.google.protobuf.Timestamp\022\036\n\021inc" + + "lude_artifacts\030\007 \001(\010H\002\210\001\001B\014\n\n_page_sizeB" + + "\021\n\017_history_lengthB\024\n\022_include_artifacts" + + "\"\204\001\n\021ListTasksResponse\022 \n\005tasks\030\001 \003(\0132\014." + + "a2a.v1.TaskB\003\340A\002\022\034\n\017next_page_token\030\002 \001(" + + "\tB\003\340A\002\022\026\n\tpage_size\030\003 \001(\005B\003\340A\002\022\027\n\ntotal_" + + "size\030\004 \001(\005B\003\340A\002\"1\n\021CancelTaskRequest\022\016\n\006" + + "tenant\030\002 \001(\t\022\014\n\004name\030\001 \001(\t\"D\n$GetTaskPus" + + "hNotificationConfigRequest\022\016\n\006tenant\030\002 \001" + + "(\t\022\014\n\004name\030\001 \001(\t\"G\n\'DeleteTaskPushNotifi" + + "cationConfigRequest\022\016\n\006tenant\030\002 \001(\t\022\014\n\004n" + + "ame\030\001 \001(\t\"\237\001\n\'CreateTaskPushNotification" + + "ConfigRequest\022\016\n\006tenant\030\004 \001(\t\022\023\n\006parent\030" + + "\001 \001(\tB\003\340A\002\022\026\n\tconfig_id\030\002 \001(\tB\003\340A\002\0227\n\006co" + + "nfig\030\003 \001(\0132\".a2a.v1.TaskPushNotification" + + "ConfigB\003\340A\002\"6\n\026SubscribeToTaskRequest\022\016\n" + + "\006tenant\030\002 \001(\t\022\014\n\004name\030\001 \001(\t\"n\n%ListTaskP" + + "ushNotificationConfigRequest\022\016\n\006tenant\030\004" + + " \001(\t\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022" + + "\022\n\npage_token\030\003 \001(\t\"-\n\033GetExtendedAgentC" + + "ardRequest\022\016\n\006tenant\030\001 \001(\t\"b\n\023SendMessag" + + "eResponse\022\034\n\004task\030\001 \001(\0132\014.a2a.v1.TaskH\000\022" + + "\"\n\007message\030\002 \001(\0132\017.a2a.v1.MessageH\000B\t\n\007p" + + "ayload\"\321\001\n\016StreamResponse\022\034\n\004task\030\001 \001(\0132" + + "\014.a2a.v1.TaskH\000\022\"\n\007message\030\002 \001(\0132\017.a2a.v" + + "1.MessageH\000\0226\n\rstatus_update\030\003 \001(\0132\035.a2a" + + ".v1.TaskStatusUpdateEventH\000\022:\n\017artifact_" + + "update\030\004 \001(\0132\037.a2a.v1.TaskArtifactUpdate" + + "EventH\000B\t\n\007payload\"v\n&ListTaskPushNotifi" + + "cationConfigResponse\0223\n\007configs\030\001 \003(\0132\"." + + "a2a.v1.TaskPushNotificationConfig\022\027\n\017nex" + + "t_page_token\030\002 \001(\t*\372\001\n\tTaskState\022\032\n\026TASK" + + "_STATE_UNSPECIFIED\020\000\022\030\n\024TASK_STATE_SUBMI" + + "TTED\020\001\022\026\n\022TASK_STATE_WORKING\020\002\022\030\n\024TASK_S" + + "TATE_COMPLETED\020\003\022\025\n\021TASK_STATE_FAILED\020\004\022" + + "\030\n\024TASK_STATE_CANCELLED\020\005\022\035\n\031TASK_STATE_" + + "INPUT_REQUIRED\020\006\022\027\n\023TASK_STATE_REJECTED\020" + + "\007\022\034\n\030TASK_STATE_AUTH_REQUIRED\020\010*;\n\004Role\022" + + "\024\n\020ROLE_UNSPECIFIED\020\000\022\r\n\tROLE_USER\020\001\022\016\n\n" + + "ROLE_AGENT\020\0022\304\016\n\nA2AService\022}\n\013SendMessa" + + "ge\022\032.a2a.v1.SendMessageRequest\032\033.a2a.v1." + + "SendMessageResponse\"5\202\323\344\223\002/\"\r/message:se" + + "nd:\001*Z\033\"\026/{tenant}/message:send:\001*\022\207\001\n\024S" + + "endStreamingMessage\022\032.a2a.v1.SendMessage" + + "Request\032\026.a2a.v1.StreamResponse\"9\202\323\344\223\0023\"" + + "\017/message:stream:\001*Z\035\"\030/{tenant}/message" + + ":stream:\001*0\001\022k\n\007GetTask\022\026.a2a.v1.GetTask" + + "Request\032\014.a2a.v1.Task\":\332A\004name\202\323\344\223\002-\022\017/{" + + "name=tasks/*}Z\032\022\030/{tenant}/{name=tasks/*" + + "}\022c\n\tListTasks\022\030.a2a.v1.ListTasksRequest" + + "\032\031.a2a.v1.ListTasksResponse\"!\202\323\344\223\002\033\022\006/ta" + + "sksZ\021\022\017/{tenant}/tasks\022~\n\nCancelTask\022\031.a" + + "2a.v1.CancelTaskRequest\032\014.a2a.v1.Task\"G\202" + + "\323\344\223\002A\"\026/{name=tasks/*}:cancel:\001*Z$\"\037/{te" + + "nant}/{name=tasks/*}:cancel:\001*\022\224\001\n\017Subsc" + + "ribeToTask\022\036.a2a.v1.SubscribeToTaskReque" + + "st\032\026.a2a.v1.StreamResponse\"G\202\323\344\223\002A\022\031/{na" + + "me=tasks/*}:subscribeZ$\022\"/{tenant}/{name" + + "=tasks/*}:subscribe0\001\022\201\002\n CreateTaskPush" + + "NotificationConfig\022/.a2a.v1.CreateTaskPu" + + "shNotificationConfigRequest\032\".a2a.v1.Tas" + + "kPushNotificationConfig\"\207\001\332A\rparent,conf" + + "ig\202\323\344\223\002q\")/{parent=tasks/*/pushNotificat" + + "ionConfigs}:\006configZ<\"2/{tenant}/{parent" + + "=tasks/*/pushNotificationConfigs}:\006confi" + + "g\022\341\001\n\035GetTaskPushNotificationConfig\022,.a2" + + "a.v1.GetTaskPushNotificationConfigReques" + + "t\032\".a2a.v1.TaskPushNotificationConfig\"n\332" + + "A\004name\202\323\344\223\002a\022)/{name=tasks/*/pushNotific" + + "ationConfigs/*}Z4\0222/{tenant}/{name=tasks" + + "/*/pushNotificationConfigs/*}\022\361\001\n\036ListTa" + + "skPushNotificationConfig\022-.a2a.v1.ListTa" + + "skPushNotificationConfigRequest\032..a2a.v1" + + ".ListTaskPushNotificationConfigResponse\"" + + "p\332A\006parent\202\323\344\223\002a\022)/{parent=tasks/*}/push" + + "NotificationConfigsZ4\0222/{tenant}/{parent" + + "=tasks/*}/pushNotificationConfigs\022\211\001\n\024Ge" + + "tExtendedAgentCard\022#.a2a.v1.GetExtendedA" + + "gentCardRequest\032\021.a2a.v1.AgentCard\"9\202\323\344\223" + + "\0023\022\022/extendedAgentCardZ\035\022\033/{tenant}/exte" + + "ndedAgentCard\022\333\001\n DeleteTaskPushNotifica" + + "tionConfig\022/.a2a.v1.DeleteTaskPushNotifi" + + "cationConfigRequest\032\026.google.protobuf.Em" + + "pty\"n\332A\004name\202\323\344\223\002a*)/{name=tasks/*/pushN" + + "otificationConfigs/*}Z4*2/{tenant}/{name" + + "=tasks/*/pushNotificationConfigs/*}B7\n\013i" + + "o.a2a.grpcB\003A2AP\001Z\030google.golang.org/a2a" + + "/v1\252\002\006A2a.V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -639,7 +638,7 @@ public static void registerAllExtensions( internal_static_a2a_v1_AgentCapabilities_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AgentCapabilities_descriptor, - new java.lang.String[] { "Streaming", "PushNotifications", "Extensions", "StateTransitionHistory", "ExtendedAgentCard", }); + new java.lang.String[] { "Streaming", "PushNotifications", "Extensions", "ExtendedAgentCard", }); internal_static_a2a_v1_AgentExtension_descriptor = getDescriptor().getMessageType(16); internal_static_a2a_v1_AgentExtension_fieldAccessorTable = new @@ -802,11 +801,11 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_DeleteTaskPushNotificationConfigRequest_descriptor, new java.lang.String[] { "Tenant", "Name", }); - internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_descriptor = + internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_descriptor = getDescriptor().getMessageType(39); - internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_fieldAccessorTable = new + internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_descriptor, + internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_descriptor, new java.lang.String[] { "Tenant", "Parent", "ConfigId", "Config", }); internal_static_a2a_v1_SubscribeToTaskRequest_descriptor = getDescriptor().getMessageType(40); diff --git a/spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java b/spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java index 0faa8f73d..522c9083b 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java @@ -201,35 +201,35 @@ io.a2a.grpc.StreamResponse> getSubscribeToTaskMethod() { return getSubscribeToTaskMethod; } - private static volatile io.grpc.MethodDescriptor getSetTaskPushNotificationConfigMethod; + private static volatile io.grpc.MethodDescriptor getCreateTaskPushNotificationConfigMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetTaskPushNotificationConfig", - requestType = io.a2a.grpc.SetTaskPushNotificationConfigRequest.class, + fullMethodName = SERVICE_NAME + '/' + "CreateTaskPushNotificationConfig", + requestType = io.a2a.grpc.CreateTaskPushNotificationConfigRequest.class, responseType = io.a2a.grpc.TaskPushNotificationConfig.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetTaskPushNotificationConfigMethod() { - io.grpc.MethodDescriptor getSetTaskPushNotificationConfigMethod; - if ((getSetTaskPushNotificationConfigMethod = A2AServiceGrpc.getSetTaskPushNotificationConfigMethod) == null) { + public static io.grpc.MethodDescriptor getCreateTaskPushNotificationConfigMethod() { + io.grpc.MethodDescriptor getCreateTaskPushNotificationConfigMethod; + if ((getCreateTaskPushNotificationConfigMethod = A2AServiceGrpc.getCreateTaskPushNotificationConfigMethod) == null) { synchronized (A2AServiceGrpc.class) { - if ((getSetTaskPushNotificationConfigMethod = A2AServiceGrpc.getSetTaskPushNotificationConfigMethod) == null) { - A2AServiceGrpc.getSetTaskPushNotificationConfigMethod = getSetTaskPushNotificationConfigMethod = - io.grpc.MethodDescriptor.newBuilder() + if ((getCreateTaskPushNotificationConfigMethod = A2AServiceGrpc.getCreateTaskPushNotificationConfigMethod) == null) { + A2AServiceGrpc.getCreateTaskPushNotificationConfigMethod = getCreateTaskPushNotificationConfigMethod = + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetTaskPushNotificationConfig")) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTaskPushNotificationConfig")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.a2a.grpc.SetTaskPushNotificationConfigRequest.getDefaultInstance())) + io.a2a.grpc.CreateTaskPushNotificationConfigRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.a2a.grpc.TaskPushNotificationConfig.getDefaultInstance())) - .setSchemaDescriptor(new A2AServiceMethodDescriptorSupplier("SetTaskPushNotificationConfig")) + .setSchemaDescriptor(new A2AServiceMethodDescriptorSupplier("CreateTaskPushNotificationConfig")) .build(); } } } - return getSetTaskPushNotificationConfigMethod; + return getCreateTaskPushNotificationConfigMethod; } private static volatile io.grpc.MethodDescriptor - * Set a push notification config for a task. + * Create a push notification config for a task. * */ - default void setTaskPushNotificationConfig(io.a2a.grpc.SetTaskPushNotificationConfigRequest request, + default void createTaskPushNotificationConfig(io.a2a.grpc.CreateTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetTaskPushNotificationConfigMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateTaskPushNotificationConfigMethod(), responseObserver); } /** @@ -636,13 +636,13 @@ public void subscribeToTask(io.a2a.grpc.SubscribeToTaskRequest request, /** *

-     * Set a push notification config for a task.
+     * Create a push notification config for a task.
      * 
*/ - public void setTaskPushNotificationConfig(io.a2a.grpc.SetTaskPushNotificationConfigRequest request, + public void createTaskPushNotificationConfig(io.a2a.grpc.CreateTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetTaskPushNotificationConfigMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getCreateTaskPushNotificationConfigMethod(), getCallOptions()), request, responseObserver); } /** @@ -776,12 +776,12 @@ public io.a2a.grpc.Task cancelTask(io.a2a.grpc.CancelTaskRequest request) throws /** *
-     * Set a push notification config for a task.
+     * Create a push notification config for a task.
      * 
*/ - public io.a2a.grpc.TaskPushNotificationConfig setTaskPushNotificationConfig(io.a2a.grpc.SetTaskPushNotificationConfigRequest request) throws io.grpc.StatusException { + public io.a2a.grpc.TaskPushNotificationConfig createTaskPushNotificationConfig(io.a2a.grpc.CreateTaskPushNotificationConfigRequest request) throws io.grpc.StatusException { return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getSetTaskPushNotificationConfigMethod(), getCallOptions(), request); + getChannel(), getCreateTaskPushNotificationConfigMethod(), getCallOptions(), request); } /** @@ -909,12 +909,12 @@ public java.util.Iterator subscribeToTask( /** *
-     * Set a push notification config for a task.
+     * Create a push notification config for a task.
      * 
*/ - public io.a2a.grpc.TaskPushNotificationConfig setTaskPushNotificationConfig(io.a2a.grpc.SetTaskPushNotificationConfigRequest request) { + public io.a2a.grpc.TaskPushNotificationConfig createTaskPushNotificationConfig(io.a2a.grpc.CreateTaskPushNotificationConfigRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetTaskPushNotificationConfigMethod(), getCallOptions(), request); + getChannel(), getCreateTaskPushNotificationConfigMethod(), getCallOptions(), request); } /** @@ -1023,13 +1023,13 @@ public com.google.common.util.concurrent.ListenableFuture canc /** *
-     * Set a push notification config for a task.
+     * Create a push notification config for a task.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture setTaskPushNotificationConfig( - io.a2a.grpc.SetTaskPushNotificationConfigRequest request) { + public com.google.common.util.concurrent.ListenableFuture createTaskPushNotificationConfig( + io.a2a.grpc.CreateTaskPushNotificationConfigRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetTaskPushNotificationConfigMethod(), getCallOptions()), request); + getChannel().newCall(getCreateTaskPushNotificationConfigMethod(), getCallOptions()), request); } /** @@ -1083,7 +1083,7 @@ public com.google.common.util.concurrent.ListenableFuture responseObserv serviceImpl.subscribeToTask((io.a2a.grpc.SubscribeToTaskRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_SET_TASK_PUSH_NOTIFICATION_CONFIG: - serviceImpl.setTaskPushNotificationConfig((io.a2a.grpc.SetTaskPushNotificationConfigRequest) request, + case METHODID_CREATE_TASK_PUSH_NOTIFICATION_CONFIG: + serviceImpl.createTaskPushNotificationConfig((io.a2a.grpc.CreateTaskPushNotificationConfigRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_TASK_PUSH_NOTIFICATION_CONFIG: @@ -1211,12 +1211,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser io.a2a.grpc.StreamResponse>( service, METHODID_SUBSCRIBE_TO_TASK))) .addMethod( - getSetTaskPushNotificationConfigMethod(), + getCreateTaskPushNotificationConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - io.a2a.grpc.SetTaskPushNotificationConfigRequest, + io.a2a.grpc.CreateTaskPushNotificationConfigRequest, io.a2a.grpc.TaskPushNotificationConfig>( - service, METHODID_SET_TASK_PUSH_NOTIFICATION_CONFIG))) + service, METHODID_CREATE_TASK_PUSH_NOTIFICATION_CONFIG))) .addMethod( getGetTaskPushNotificationConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1299,7 +1299,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListTasksMethod()) .addMethod(getCancelTaskMethod()) .addMethod(getSubscribeToTaskMethod()) - .addMethod(getSetTaskPushNotificationConfigMethod()) + .addMethod(getCreateTaskPushNotificationConfigMethod()) .addMethod(getGetTaskPushNotificationConfigMethod()) .addMethod(getListTaskPushNotificationConfigMethod()) .addMethod(getGetExtendedAgentCardMethod()) diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilities.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilities.java index 2e6c44ab8..84796af69 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilities.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilities.java @@ -165,33 +165,6 @@ public io.a2a.grpc.AgentExtensionOrBuilder getExtensionsOrBuilder( return extensions_.get(index); } - public static final int STATE_TRANSITION_HISTORY_FIELD_NUMBER = 4; - private boolean stateTransitionHistory_ = false; - /** - *
-   * Indicates if the agent provides a history of state transitions for a task.
-   * 
- * - * optional bool state_transition_history = 4; - * @return Whether the stateTransitionHistory field is set. - */ - @java.lang.Override - public boolean hasStateTransitionHistory() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-   * Indicates if the agent provides a history of state transitions for a task.
-   * 
- * - * optional bool state_transition_history = 4; - * @return The stateTransitionHistory. - */ - @java.lang.Override - public boolean getStateTransitionHistory() { - return stateTransitionHistory_; - } - public static final int EXTENDED_AGENT_CARD_FIELD_NUMBER = 5; private boolean extendedAgentCard_ = false; /** @@ -204,7 +177,7 @@ public boolean getStateTransitionHistory() { */ @java.lang.Override public boolean hasExtendedAgentCard() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** *
@@ -243,9 +216,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       output.writeMessage(3, extensions_.get(i));
     }
     if (((bitField0_ & 0x00000004) != 0)) {
-      output.writeBool(4, stateTransitionHistory_);
-    }
-    if (((bitField0_ & 0x00000008) != 0)) {
       output.writeBool(5, extendedAgentCard_);
     }
     getUnknownFields().writeTo(output);
@@ -270,10 +240,6 @@ public int getSerializedSize() {
         .computeMessageSize(3, extensions_.get(i));
     }
     if (((bitField0_ & 0x00000004) != 0)) {
-      size += com.google.protobuf.CodedOutputStream
-        .computeBoolSize(4, stateTransitionHistory_);
-    }
-    if (((bitField0_ & 0x00000008) != 0)) {
       size += com.google.protobuf.CodedOutputStream
         .computeBoolSize(5, extendedAgentCard_);
     }
@@ -304,11 +270,6 @@ public boolean equals(final java.lang.Object obj) {
     }
     if (!getExtensionsList()
         .equals(other.getExtensionsList())) return false;
-    if (hasStateTransitionHistory() != other.hasStateTransitionHistory()) return false;
-    if (hasStateTransitionHistory()) {
-      if (getStateTransitionHistory()
-          != other.getStateTransitionHistory()) return false;
-    }
     if (hasExtendedAgentCard() != other.hasExtendedAgentCard()) return false;
     if (hasExtendedAgentCard()) {
       if (getExtendedAgentCard()
@@ -339,11 +300,6 @@ public int hashCode() {
       hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER;
       hash = (53 * hash) + getExtensionsList().hashCode();
     }
-    if (hasStateTransitionHistory()) {
-      hash = (37 * hash) + STATE_TRANSITION_HISTORY_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
-          getStateTransitionHistory());
-    }
     if (hasExtendedAgentCard()) {
       hash = (37 * hash) + EXTENDED_AGENT_CARD_FIELD_NUMBER;
       hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
@@ -494,7 +450,6 @@ public Builder clear() {
         extensionsBuilder_.clear();
       }
       bitField0_ = (bitField0_ & ~0x00000004);
-      stateTransitionHistory_ = false;
       extendedAgentCard_ = false;
       return this;
     }
@@ -552,12 +507,8 @@ private void buildPartial0(io.a2a.grpc.AgentCapabilities result) {
         to_bitField0_ |= 0x00000002;
       }
       if (((from_bitField0_ & 0x00000008) != 0)) {
-        result.stateTransitionHistory_ = stateTransitionHistory_;
-        to_bitField0_ |= 0x00000004;
-      }
-      if (((from_bitField0_ & 0x00000010) != 0)) {
         result.extendedAgentCard_ = extendedAgentCard_;
-        to_bitField0_ |= 0x00000008;
+        to_bitField0_ |= 0x00000004;
       }
       result.bitField0_ |= to_bitField0_;
     }
@@ -606,9 +557,6 @@ public Builder mergeFrom(io.a2a.grpc.AgentCapabilities other) {
           }
         }
       }
-      if (other.hasStateTransitionHistory()) {
-        setStateTransitionHistory(other.getStateTransitionHistory());
-      }
       if (other.hasExtendedAgentCard()) {
         setExtendedAgentCard(other.getExtendedAgentCard());
       }
@@ -661,14 +609,9 @@ public Builder mergeFrom(
               }
               break;
             } // case 26
-            case 32: {
-              stateTransitionHistory_ = input.readBool();
-              bitField0_ |= 0x00000008;
-              break;
-            } // case 32
             case 40: {
               extendedAgentCard_ = input.readBool();
-              bitField0_ |= 0x00000010;
+              bitField0_ |= 0x00000008;
               break;
             } // case 40
             default: {
@@ -1112,62 +1055,6 @@ public io.a2a.grpc.AgentExtension.Builder addExtensionsBuilder(
       return extensionsBuilder_;
     }
 
-    private boolean stateTransitionHistory_ ;
-    /**
-     * 
-     * Indicates if the agent provides a history of state transitions for a task.
-     * 
- * - * optional bool state_transition_history = 4; - * @return Whether the stateTransitionHistory field is set. - */ - @java.lang.Override - public boolean hasStateTransitionHistory() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Indicates if the agent provides a history of state transitions for a task.
-     * 
- * - * optional bool state_transition_history = 4; - * @return The stateTransitionHistory. - */ - @java.lang.Override - public boolean getStateTransitionHistory() { - return stateTransitionHistory_; - } - /** - *
-     * Indicates if the agent provides a history of state transitions for a task.
-     * 
- * - * optional bool state_transition_history = 4; - * @param value The stateTransitionHistory to set. - * @return This builder for chaining. - */ - public Builder setStateTransitionHistory(boolean value) { - - stateTransitionHistory_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * Indicates if the agent provides a history of state transitions for a task.
-     * 
- * - * optional bool state_transition_history = 4; - * @return This builder for chaining. - */ - public Builder clearStateTransitionHistory() { - bitField0_ = (bitField0_ & ~0x00000008); - stateTransitionHistory_ = false; - onChanged(); - return this; - } - private boolean extendedAgentCard_ ; /** *
@@ -1179,7 +1066,7 @@ public Builder clearStateTransitionHistory() {
      */
     @java.lang.Override
     public boolean hasExtendedAgentCard() {
-      return ((bitField0_ & 0x00000010) != 0);
+      return ((bitField0_ & 0x00000008) != 0);
     }
     /**
      * 
@@ -1205,7 +1092,7 @@ public boolean getExtendedAgentCard() {
     public Builder setExtendedAgentCard(boolean value) {
 
       extendedAgentCard_ = value;
-      bitField0_ |= 0x00000010;
+      bitField0_ |= 0x00000008;
       onChanged();
       return this;
     }
@@ -1218,7 +1105,7 @@ public Builder setExtendedAgentCard(boolean value) {
      * @return This builder for chaining.
      */
     public Builder clearExtendedAgentCard() {
-      bitField0_ = (bitField0_ & ~0x00000010);
+      bitField0_ = (bitField0_ & ~0x00000008);
       extendedAgentCard_ = false;
       onChanged();
       return this;
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilitiesOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilitiesOrBuilder.java
index b084db7ee..05c90e4d2 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilitiesOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilitiesOrBuilder.java
@@ -92,25 +92,6 @@ public interface AgentCapabilitiesOrBuilder extends
   io.a2a.grpc.AgentExtensionOrBuilder getExtensionsOrBuilder(
       int index);
 
-  /**
-   * 
-   * Indicates if the agent provides a history of state transitions for a task.
-   * 
- * - * optional bool state_transition_history = 4; - * @return Whether the stateTransitionHistory field is set. - */ - boolean hasStateTransitionHistory(); - /** - *
-   * Indicates if the agent provides a history of state transitions for a task.
-   * 
- * - * optional bool state_transition_history = 4; - * @return The stateTransitionHistory. - */ - boolean getStateTransitionHistory(); - /** *
    * Indicates if the agent supports providing an extended agent card when authenticated.
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java
index 9ba0ba831..cb1e12880 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java
@@ -8,7 +8,7 @@
 /**
  * 
  * --8<-- [start:CancelTaskRequest]
- * Represents a request for the `tasks/cancel` method.
+ * Represents a request for the `CancelTask` method.
  * 
* * Protobuf type {@code a2a.v1.CancelTaskRequest} @@ -315,7 +315,7 @@ protected Builder newBuilderForType( /** *
    * --8<-- [start:CancelTaskRequest]
-   * Represents a request for the `tasks/cancel` method.
+   * Represents a request for the `CancelTask` method.
    * 
* * Protobuf type {@code a2a.v1.CancelTaskRequest} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SetTaskPushNotificationConfigRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequest.java similarity index 85% rename from spec-grpc/src/main/java/io/a2a/grpc/SetTaskPushNotificationConfigRequest.java rename to spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequest.java index 161a1b257..5f8143cb3 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/SetTaskPushNotificationConfigRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequest.java @@ -7,17 +7,17 @@ /** *
- * --8<-- [start:SetTaskPushNotificationConfigRequest]
- * Represents a request for the `tasks/pushNotificationConfig/set` method.
+ * --8<-- [start:CreateTaskPushNotificationConfigRequest]
+ * Represents a request for the `CreateTaskPushNotificationConfig` method.
  * 
* - * Protobuf type {@code a2a.v1.SetTaskPushNotificationConfigRequest} + * Protobuf type {@code a2a.v1.CreateTaskPushNotificationConfigRequest} */ @com.google.protobuf.Generated -public final class SetTaskPushNotificationConfigRequest extends +public final class CreateTaskPushNotificationConfigRequest extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:a2a.v1.SetTaskPushNotificationConfigRequest) - SetTaskPushNotificationConfigRequestOrBuilder { + // @@protoc_insertion_point(message_implements:a2a.v1.CreateTaskPushNotificationConfigRequest) + CreateTaskPushNotificationConfigRequestOrBuilder { private static final long serialVersionUID = 0L; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( @@ -26,13 +26,13 @@ public final class SetTaskPushNotificationConfigRequest extends /* minor= */ 33, /* patch= */ 1, /* suffix= */ "", - "SetTaskPushNotificationConfigRequest"); + "CreateTaskPushNotificationConfigRequest"); } - // Use SetTaskPushNotificationConfigRequest.newBuilder() to construct. - private SetTaskPushNotificationConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use CreateTaskPushNotificationConfigRequest.newBuilder() to construct. + private CreateTaskPushNotificationConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private SetTaskPushNotificationConfigRequest() { + private CreateTaskPushNotificationConfigRequest() { tenant_ = ""; parent_ = ""; configId_ = ""; @@ -40,15 +40,15 @@ private SetTaskPushNotificationConfigRequest() { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_descriptor; + return io.a2a.grpc.A2A.internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_fieldAccessorTable + return io.a2a.grpc.A2A.internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.a2a.grpc.SetTaskPushNotificationConfigRequest.class, io.a2a.grpc.SetTaskPushNotificationConfigRequest.Builder.class); + io.a2a.grpc.CreateTaskPushNotificationConfigRequest.class, io.a2a.grpc.CreateTaskPushNotificationConfigRequest.Builder.class); } private int bitField0_; @@ -291,10 +291,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof io.a2a.grpc.SetTaskPushNotificationConfigRequest)) { + if (!(obj instanceof io.a2a.grpc.CreateTaskPushNotificationConfigRequest)) { return super.equals(obj); } - io.a2a.grpc.SetTaskPushNotificationConfigRequest other = (io.a2a.grpc.SetTaskPushNotificationConfigRequest) obj; + io.a2a.grpc.CreateTaskPushNotificationConfigRequest other = (io.a2a.grpc.CreateTaskPushNotificationConfigRequest) obj; if (!getTenant() .equals(other.getTenant())) return false; @@ -333,44 +333,44 @@ public int hashCode() { return hash; } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom(byte[] data) + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom(java.io.InputStream input) + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -378,26 +378,26 @@ public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseDelimitedFrom(java.io.InputStream input) + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseDelimitedFrom( + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -410,7 +410,7 @@ public static io.a2a.grpc.SetTaskPushNotificationConfigRequest parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.a2a.grpc.SetTaskPushNotificationConfigRequest prototype) { + public static Builder newBuilder(io.a2a.grpc.CreateTaskPushNotificationConfigRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -427,30 +427,30 @@ protected Builder newBuilderForType( } /** *
-   * --8<-- [start:SetTaskPushNotificationConfigRequest]
-   * Represents a request for the `tasks/pushNotificationConfig/set` method.
+   * --8<-- [start:CreateTaskPushNotificationConfigRequest]
+   * Represents a request for the `CreateTaskPushNotificationConfig` method.
    * 
* - * Protobuf type {@code a2a.v1.SetTaskPushNotificationConfigRequest} + * Protobuf type {@code a2a.v1.CreateTaskPushNotificationConfigRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:a2a.v1.SetTaskPushNotificationConfigRequest) - io.a2a.grpc.SetTaskPushNotificationConfigRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:a2a.v1.CreateTaskPushNotificationConfigRequest) + io.a2a.grpc.CreateTaskPushNotificationConfigRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_descriptor; + return io.a2a.grpc.A2A.internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_fieldAccessorTable + return io.a2a.grpc.A2A.internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.a2a.grpc.SetTaskPushNotificationConfigRequest.class, io.a2a.grpc.SetTaskPushNotificationConfigRequest.Builder.class); + io.a2a.grpc.CreateTaskPushNotificationConfigRequest.class, io.a2a.grpc.CreateTaskPushNotificationConfigRequest.Builder.class); } - // Construct using io.a2a.grpc.SetTaskPushNotificationConfigRequest.newBuilder() + // Construct using io.a2a.grpc.CreateTaskPushNotificationConfigRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -484,17 +484,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_SetTaskPushNotificationConfigRequest_descriptor; + return io.a2a.grpc.A2A.internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_descriptor; } @java.lang.Override - public io.a2a.grpc.SetTaskPushNotificationConfigRequest getDefaultInstanceForType() { - return io.a2a.grpc.SetTaskPushNotificationConfigRequest.getDefaultInstance(); + public io.a2a.grpc.CreateTaskPushNotificationConfigRequest getDefaultInstanceForType() { + return io.a2a.grpc.CreateTaskPushNotificationConfigRequest.getDefaultInstance(); } @java.lang.Override - public io.a2a.grpc.SetTaskPushNotificationConfigRequest build() { - io.a2a.grpc.SetTaskPushNotificationConfigRequest result = buildPartial(); + public io.a2a.grpc.CreateTaskPushNotificationConfigRequest build() { + io.a2a.grpc.CreateTaskPushNotificationConfigRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -502,14 +502,14 @@ public io.a2a.grpc.SetTaskPushNotificationConfigRequest build() { } @java.lang.Override - public io.a2a.grpc.SetTaskPushNotificationConfigRequest buildPartial() { - io.a2a.grpc.SetTaskPushNotificationConfigRequest result = new io.a2a.grpc.SetTaskPushNotificationConfigRequest(this); + public io.a2a.grpc.CreateTaskPushNotificationConfigRequest buildPartial() { + io.a2a.grpc.CreateTaskPushNotificationConfigRequest result = new io.a2a.grpc.CreateTaskPushNotificationConfigRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - private void buildPartial0(io.a2a.grpc.SetTaskPushNotificationConfigRequest result) { + private void buildPartial0(io.a2a.grpc.CreateTaskPushNotificationConfigRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.tenant_ = tenant_; @@ -532,16 +532,16 @@ private void buildPartial0(io.a2a.grpc.SetTaskPushNotificationConfigRequest resu @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.a2a.grpc.SetTaskPushNotificationConfigRequest) { - return mergeFrom((io.a2a.grpc.SetTaskPushNotificationConfigRequest)other); + if (other instanceof io.a2a.grpc.CreateTaskPushNotificationConfigRequest) { + return mergeFrom((io.a2a.grpc.CreateTaskPushNotificationConfigRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(io.a2a.grpc.SetTaskPushNotificationConfigRequest other) { - if (other == io.a2a.grpc.SetTaskPushNotificationConfigRequest.getDefaultInstance()) return this; + public Builder mergeFrom(io.a2a.grpc.CreateTaskPushNotificationConfigRequest other) { + if (other == io.a2a.grpc.CreateTaskPushNotificationConfigRequest.getDefaultInstance()) return this; if (!other.getTenant().isEmpty()) { tenant_ = other.tenant_; bitField0_ |= 0x00000001; @@ -1063,23 +1063,23 @@ public io.a2a.grpc.TaskPushNotificationConfigOrBuilder getConfigOrBuilder() { return configBuilder_; } - // @@protoc_insertion_point(builder_scope:a2a.v1.SetTaskPushNotificationConfigRequest) + // @@protoc_insertion_point(builder_scope:a2a.v1.CreateTaskPushNotificationConfigRequest) } - // @@protoc_insertion_point(class_scope:a2a.v1.SetTaskPushNotificationConfigRequest) - private static final io.a2a.grpc.SetTaskPushNotificationConfigRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:a2a.v1.CreateTaskPushNotificationConfigRequest) + private static final io.a2a.grpc.CreateTaskPushNotificationConfigRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new io.a2a.grpc.SetTaskPushNotificationConfigRequest(); + DEFAULT_INSTANCE = new io.a2a.grpc.CreateTaskPushNotificationConfigRequest(); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest getDefaultInstance() { + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public SetTaskPushNotificationConfigRequest parsePartialFrom( + public CreateTaskPushNotificationConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1098,17 +1098,17 @@ public SetTaskPushNotificationConfigRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public io.a2a.grpc.SetTaskPushNotificationConfigRequest getDefaultInstanceForType() { + public io.a2a.grpc.CreateTaskPushNotificationConfigRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SetTaskPushNotificationConfigRequestOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequestOrBuilder.java similarity index 93% rename from spec-grpc/src/main/java/io/a2a/grpc/SetTaskPushNotificationConfigRequestOrBuilder.java rename to spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequestOrBuilder.java index c5a01418a..536c31416 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/SetTaskPushNotificationConfigRequestOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequestOrBuilder.java @@ -6,8 +6,8 @@ package io.a2a.grpc; @com.google.protobuf.Generated -public interface SetTaskPushNotificationConfigRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:a2a.v1.SetTaskPushNotificationConfigRequest) +public interface CreateTaskPushNotificationConfigRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:a2a.v1.CreateTaskPushNotificationConfigRequest) com.google.protobuf.MessageOrBuilder { /** diff --git a/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java index 8bfc24676..cb6914e0b 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java @@ -8,7 +8,7 @@ /** *
  * --8<-- [start:DeleteTaskPushNotificationConfigRequest]
- * Represents a request for the `tasks/pushNotificationConfig/delete` method.
+ * Represents a request for the `DeleteTaskPushNotificationConfig` method.
  * 
* * Protobuf type {@code a2a.v1.DeleteTaskPushNotificationConfigRequest} @@ -315,7 +315,7 @@ protected Builder newBuilderForType( /** *
    * --8<-- [start:DeleteTaskPushNotificationConfigRequest]
-   * Represents a request for the `tasks/pushNotificationConfig/delete` method.
+   * Represents a request for the `DeleteTaskPushNotificationConfig` method.
    * 
* * Protobuf type {@code a2a.v1.DeleteTaskPushNotificationConfigRequest} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java index 33395ab8d..76d9264a0 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java @@ -8,7 +8,7 @@ /** *
  * --8<-- [start:GetTaskRequest]
- * Represents a request for the `tasks/get` method.
+ * Represents a request for the `GetTask` method.
  * 
* * Protobuf type {@code a2a.v1.GetTaskRequest} @@ -365,7 +365,7 @@ protected Builder newBuilderForType( /** *
    * --8<-- [start:GetTaskRequest]
-   * Represents a request for the `tasks/get` method.
+   * Represents a request for the `GetTask` method.
    * 
* * Protobuf type {@code a2a.v1.GetTaskRequest} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigResponse.java b/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigResponse.java index 452ea2312..e057230c9 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigResponse.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigResponse.java @@ -8,7 +8,7 @@ /** *
  * --8<-- [start:ListTaskPushNotificationConfigResponse]
- * Represents a successful response for the `tasks/pushNotificationConfig/list`
+ * Represents a successful response for the `ListTaskPushNotificationConfig`
  * method.
  * 
* @@ -333,7 +333,7 @@ protected Builder newBuilderForType( /** *
    * --8<-- [start:ListTaskPushNotificationConfigResponse]
-   * Represents a successful response for the `tasks/pushNotificationConfig/list`
+   * Represents a successful response for the `ListTaskPushNotificationConfig`
    * method.
    * 
* diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequest.java index caaf9740e..943fc6067 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequest.java @@ -9,7 +9,7 @@ *
  * /////////// Request Messages ///////////
  * --8<-- [start:SendMessageRequest]
- * Represents a request for the `message/send` method.
+ * Represents a request for the `SendMessage` method.
  * 
* * Protobuf type {@code a2a.v1.SendMessageRequest} @@ -420,7 +420,7 @@ protected Builder newBuilderForType( *
    * /////////// Request Messages ///////////
    * --8<-- [start:SendMessageRequest]
-   * Represents a request for the `message/send` method.
+   * Represents a request for the `SendMessage` method.
    * 
* * Protobuf type {@code a2a.v1.SendMessageRequest} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentCapabilitiesMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentCapabilitiesMapper.java index 337ea8de6..a8216fec8 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentCapabilitiesMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentCapabilitiesMapper.java @@ -2,7 +2,6 @@ import org.mapstruct.CollectionMappingStrategy; import org.mapstruct.Mapper; -import org.mapstruct.Mapping; /** * Mapper between {@link io.a2a.spec.AgentCapabilities} and {@link io.a2a.grpc.AgentCapabilities}. diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/SetTaskPushNotificationConfigMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/CreateTaskPushNotificationConfigMapper.java similarity index 79% rename from spec-grpc/src/main/java/io/a2a/grpc/mapper/SetTaskPushNotificationConfigMapper.java rename to spec-grpc/src/main/java/io/a2a/grpc/mapper/CreateTaskPushNotificationConfigMapper.java index 2e0215bc1..428ea2846 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/SetTaskPushNotificationConfigMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/CreateTaskPushNotificationConfigMapper.java @@ -1,13 +1,13 @@ package io.a2a.grpc.mapper; -import io.a2a.grpc.SetTaskPushNotificationConfigRequest; +import io.a2a.grpc.CreateTaskPushNotificationConfigRequest; import io.a2a.spec.PushNotificationConfig; import io.a2a.spec.TaskPushNotificationConfig; import org.mapstruct.Mapper; import org.mapstruct.Mapping; /** - * MapStruct mapper for SetTaskPushNotificationConfigRequest → TaskPushNotificationConfig. + * MapStruct mapper for CreateTaskPushNotificationConfigRequest → TaskPushNotificationConfig. *

* Handles resource name parsing and ID override logic for creating push notification configs. *

@@ -21,37 +21,37 @@ * Compile-Time Safety: If the proto changes fields, MapStruct will fail to compile. */ @Mapper(config = A2AProtoMapperConfig.class, uses = {PushNotificationConfigMapper.class}) -public interface SetTaskPushNotificationConfigMapper { +public interface CreateTaskPushNotificationConfigMapper { - SetTaskPushNotificationConfigMapper INSTANCE = A2AMappers.getMapper(SetTaskPushNotificationConfigMapper.class); + CreateTaskPushNotificationConfigMapper INSTANCE = A2AMappers.getMapper(CreateTaskPushNotificationConfigMapper.class); /** - * Converts SetTaskPushNotificationConfigRequest to domain TaskPushNotificationConfig. + * Converts CreateTaskPushNotificationConfigRequest to domain TaskPushNotificationConfig. *

* Extracts taskId from parent resource name and maps PushNotificationConfig with * ID override from config_id field. * The tenant field is set to null as it's not present in the protobuf definition. * - * @param request the protobuf SetTaskPushNotificationConfigRequest + * @param request the protobuf CreateTaskPushNotificationConfigRequest * @return domain TaskPushNotificationConfig */ @Mapping(target = "taskId", expression = "java(extractTaskId(request))") @Mapping(target = "pushNotificationConfig", expression = "java(mapPushNotificationConfigWithId(request))") - TaskPushNotificationConfig fromProto(SetTaskPushNotificationConfigRequest request); + TaskPushNotificationConfig fromProto(CreateTaskPushNotificationConfigRequest request); /** - * Converts SetTaskPushNotificationConfigRequest to domain TaskPushNotificationConfig. + * Converts CreateTaskPushNotificationConfigRequest to domain TaskPushNotificationConfig. *

* Extracts taskId from parent resource name and maps PushNotificationConfig with * ID override from config_id field. * * @param config the domainTaskPushNotificationConfig - * @return proto SetTaskPushNotificationConfigRequest + * @return proto CreateTaskPushNotificationConfigRequest */ @Mapping(target = "parent", expression = "java(ResourceNameParser.defineTaskName(config.taskId()))") @Mapping(target = "configId", expression = "java(extractConfigId(config))") @Mapping(target = "config", expression = "java(mapPushNotificationConfig(config))") - SetTaskPushNotificationConfigRequest toProto(TaskPushNotificationConfig config); + CreateTaskPushNotificationConfigRequest toProto(TaskPushNotificationConfig config); /** * Extracts the task ID from the parent resource name. @@ -59,10 +59,10 @@ public interface SetTaskPushNotificationConfigMapper { * Format: "tasks/{task_id}" * Fallback: If parent is blank, extracts from config.name instead. * - * @param request the protobuf SetTaskPushNotificationConfigRequest + * @param request the protobuf CreateTaskPushNotificationConfigRequest * @return the extracted task ID */ - default String extractTaskId(SetTaskPushNotificationConfigRequest request) { + default String extractTaskId(CreateTaskPushNotificationConfigRequest request) { String parent = request.getParent(); if (parent == null || parent.isBlank()) { @@ -92,10 +92,10 @@ default String extractConfigId(TaskPushNotificationConfig config) { *

* The config_id from the request overrides the ID in the proto's PushNotificationConfig. * - * @param request the protobuf SetTaskPushNotificationConfigRequest + * @param request the protobuf CreateTaskPushNotificationConfigRequest * @return domain PushNotificationConfig with config_id injected */ - default PushNotificationConfig mapPushNotificationConfigWithId(SetTaskPushNotificationConfigRequest request) { + default PushNotificationConfig mapPushNotificationConfigWithId(CreateTaskPushNotificationConfigRequest request) { // Check if config and push_notification_config exist if (!request.hasConfig() || !request.getConfig().hasPushNotificationConfig() @@ -128,7 +128,7 @@ default PushNotificationConfig mapPushNotificationConfigWithId(SetTaskPushNotifi *

* The config_id from the request overrides the ID in the proto's PushNotificationConfig. * - * @param domain the protobuf SetTaskPushNotificationConfigRequest + * @param domain the protobuf CreateTaskPushNotificationConfigRequest * @return domain PushNotificationConfig with config_id injected */ default io.a2a.grpc.TaskPushNotificationConfig mapPushNotificationConfig(TaskPushNotificationConfig domain) { diff --git a/spec-grpc/src/main/java/io/a2a/grpc/utils/JSONRPCUtils.java b/spec-grpc/src/main/java/io/a2a/grpc/utils/JSONRPCUtils.java index 1692ae3a5..aac9f7d2b 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/utils/JSONRPCUtils.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/utils/JSONRPCUtils.java @@ -61,8 +61,8 @@ import io.a2a.jsonrpc.common.wrappers.SendMessageRequest; import io.a2a.jsonrpc.common.wrappers.SendMessageResponse; import io.a2a.jsonrpc.common.wrappers.SendStreamingMessageRequest; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigRequest; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigResponse; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigRequest; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigResponse; import io.a2a.jsonrpc.common.wrappers.SubscribeToTaskRequest; import io.a2a.spec.A2AError; import io.a2a.spec.ContentTypeNotSupportedError; @@ -220,9 +220,9 @@ private static A2ARequest parseMethodRequest(String version, Object id, Strin return new ListTasksRequest(version, id, ProtoUtils.FromProto.listTasksParams(builder)); } case SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD -> { - io.a2a.grpc.SetTaskPushNotificationConfigRequest.Builder builder = io.a2a.grpc.SetTaskPushNotificationConfigRequest.newBuilder(); + io.a2a.grpc.CreateTaskPushNotificationConfigRequest.Builder builder = io.a2a.grpc.CreateTaskPushNotificationConfigRequest.newBuilder(); parseRequestBody(paramsNode, builder, id); - return new SetTaskPushNotificationConfigRequest(version, id, ProtoUtils.FromProto.setTaskPushNotificationConfig(builder)); + return new CreateTaskPushNotificationConfigRequest(version, id, ProtoUtils.FromProto.CreateTaskPushNotificationConfig(builder)); } case GET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD -> { io.a2a.grpc.GetTaskPushNotificationConfigRequest.Builder builder = io.a2a.grpc.GetTaskPushNotificationConfigRequest.newBuilder(); @@ -304,7 +304,7 @@ public static A2AResponse parseResponseBody(String body, String method) throw case SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD -> { io.a2a.grpc.TaskPushNotificationConfig.Builder builder = io.a2a.grpc.TaskPushNotificationConfig.newBuilder(); parseRequestBody(paramsNode, builder, id); - return new SetTaskPushNotificationConfigResponse(id, ProtoUtils.FromProto.taskPushNotificationConfig(builder)); + return new CreateTaskPushNotificationConfigResponse(id, ProtoUtils.FromProto.taskPushNotificationConfig(builder)); } case GET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD -> { io.a2a.grpc.TaskPushNotificationConfig.Builder builder = io.a2a.grpc.TaskPushNotificationConfig.newBuilder(); @@ -350,7 +350,7 @@ public static A2AResponse parseError(JsonObject error, Object id, String meth return new ListTasksResponse(id, rpcError); } case SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD -> { - return new SetTaskPushNotificationConfigResponse(id, rpcError); + return new CreateTaskPushNotificationConfigResponse(id, rpcError); } case GET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD -> { return new GetTaskPushNotificationConfigResponse(id, rpcError); diff --git a/spec-grpc/src/main/java/io/a2a/grpc/utils/ProtoUtils.java b/spec-grpc/src/main/java/io/a2a/grpc/utils/ProtoUtils.java index b2941dc98..c8913a28f 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/utils/ProtoUtils.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/utils/ProtoUtils.java @@ -14,7 +14,7 @@ import io.a2a.grpc.mapper.MessageMapper; import io.a2a.grpc.mapper.MessageSendConfigurationMapper; import io.a2a.grpc.mapper.MessageSendParamsMapper; -import io.a2a.grpc.mapper.SetTaskPushNotificationConfigMapper; +import io.a2a.grpc.mapper.CreateTaskPushNotificationConfigMapper; import io.a2a.grpc.mapper.StreamResponseMapper; import io.a2a.grpc.mapper.TaskArtifactUpdateEventMapper; import io.a2a.grpc.mapper.TaskIdParamsMapper; @@ -71,8 +71,8 @@ public static io.a2a.grpc.SubscribeToTaskRequest subscribeToTaskRequest(TaskIdPa return TaskIdParamsMapper.INSTANCE.toProtoSubscribeToTaskRequest(params); } - public static io.a2a.grpc.SetTaskPushNotificationConfigRequest setTaskPushNotificationConfigRequest(TaskPushNotificationConfig config) { - return SetTaskPushNotificationConfigMapper.INSTANCE.toProto(config); + public static io.a2a.grpc.CreateTaskPushNotificationConfigRequest CreateTaskPushNotificationConfigRequest(TaskPushNotificationConfig config) { + return CreateTaskPushNotificationConfigMapper.INSTANCE.toProto(config); } public static io.a2a.grpc.GetTaskPushNotificationConfigRequest getTaskPushNotificationConfigRequest(GetTaskPushNotificationConfigParams params) { @@ -173,7 +173,7 @@ public static io.a2a.grpc.StreamResponse taskOrMessageStream(StreamingEventKind }; } - public static io.a2a.grpc.TaskPushNotificationConfig setTaskPushNotificationConfigResponse(TaskPushNotificationConfig config) { + public static io.a2a.grpc.TaskPushNotificationConfig CreateTaskPushNotificationConfigResponse(TaskPushNotificationConfig config) { return taskPushNotificationConfig(config); } @@ -231,11 +231,11 @@ public static MessageSendParams messageSendParams(io.a2a.grpc.SendMessageRequest return convert(() -> MessageSendParamsMapper.INSTANCE.fromProto(requestProto)); } - public static TaskPushNotificationConfig setTaskPushNotificationConfig(io.a2a.grpc.SetTaskPushNotificationConfigRequestOrBuilder config) { - io.a2a.grpc.SetTaskPushNotificationConfigRequest reqProto = config instanceof io.a2a.grpc.SetTaskPushNotificationConfigRequest - ? (io.a2a.grpc.SetTaskPushNotificationConfigRequest) config - : ((io.a2a.grpc.SetTaskPushNotificationConfigRequest.Builder) config).build(); - return convert(() -> SetTaskPushNotificationConfigMapper.INSTANCE.fromProto(reqProto)); + public static TaskPushNotificationConfig CreateTaskPushNotificationConfig(io.a2a.grpc.CreateTaskPushNotificationConfigRequestOrBuilder config) { + io.a2a.grpc.CreateTaskPushNotificationConfigRequest reqProto = config instanceof io.a2a.grpc.CreateTaskPushNotificationConfigRequest + ? (io.a2a.grpc.CreateTaskPushNotificationConfigRequest) config + : ((io.a2a.grpc.CreateTaskPushNotificationConfigRequest.Builder) config).build(); + return convert(() -> CreateTaskPushNotificationConfigMapper.INSTANCE.fromProto(reqProto)); } public static TaskPushNotificationConfig taskPushNotificationConfig(io.a2a.grpc.TaskPushNotificationConfigOrBuilder config) { diff --git a/spec-grpc/src/main/proto/a2a.proto b/spec-grpc/src/main/proto/a2a.proto index ccf37e6ab..0f701b6e8 100644 --- a/spec-grpc/src/main/proto/a2a.proto +++ b/spec-grpc/src/main/proto/a2a.proto @@ -81,8 +81,8 @@ service A2AService { }; } - // Set a push notification config for a task. - rpc SetTaskPushNotificationConfig(SetTaskPushNotificationConfigRequest) returns (TaskPushNotificationConfig) { + // Create a push notification config for a task. + rpc CreateTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest) returns (TaskPushNotificationConfig) { option (google.api.http) = { post: "/{parent=tasks/*/pushNotificationConfigs}" body: "config" @@ -480,8 +480,8 @@ message AgentCapabilities { optional bool push_notifications = 2; // A list of protocol extensions supported by the agent. repeated AgentExtension extensions = 3; - // Indicates if the agent provides a history of state transitions for a task. - optional bool state_transition_history = 4; + // Field 4 was previously used by state_transition_history capability. + reserved 4; // Indicates if the agent supports providing an extended agent card when authenticated. optional bool extended_agent_card = 5; } @@ -703,7 +703,7 @@ message DeviceCodeOAuthFlow { ///////////// Request Messages /////////// // --8<-- [start:SendMessageRequest] -// Represents a request for the `message/send` method. +// Represents a request for the `SendMessage` method. message SendMessageRequest { // Optional tenant, provided as a path parameter. string tenant = 4; @@ -717,7 +717,7 @@ message SendMessageRequest { // --8<-- [end:SendMessageRequest] // --8<-- [start:GetTaskRequest] -// Represents a request for the `tasks/get` method. +// Represents a request for the `GetTask` method. message GetTaskRequest { // Optional tenant, provided as a path parameter. string tenant = 3; @@ -772,7 +772,7 @@ message ListTasksResponse { // --8<-- [end:ListTasksResponse] // --8<-- [start:CancelTaskRequest] -// Represents a request for the `tasks/cancel` method. +// Represents a request for the `CancelTask` method. message CancelTaskRequest { // Optional tenant, provided as a path parameter. string tenant = 2; @@ -793,7 +793,7 @@ message GetTaskPushNotificationConfigRequest { // --8<-- [end:GetTaskPushNotificationConfigRequest] // --8<-- [start:DeleteTaskPushNotificationConfigRequest] -// Represents a request for the `tasks/pushNotificationConfig/delete` method. +// Represents a request for the `DeleteTaskPushNotificationConfig` method. message DeleteTaskPushNotificationConfigRequest { // Optional tenant, provided as a path parameter. string tenant = 2; @@ -803,9 +803,9 @@ message DeleteTaskPushNotificationConfigRequest { } // --8<-- [end:DeleteTaskPushNotificationConfigRequest] -// --8<-- [start:SetTaskPushNotificationConfigRequest] -// Represents a request for the `tasks/pushNotificationConfig/set` method. -message SetTaskPushNotificationConfigRequest { +// --8<-- [start:CreateTaskPushNotificationConfigRequest] +// Represents a request for the `CreateTaskPushNotificationConfig` method. +message CreateTaskPushNotificationConfigRequest { // Optional tenant, provided as a path parameter. string tenant = 4; // The parent task resource for this config. @@ -816,7 +816,7 @@ message SetTaskPushNotificationConfigRequest { // The configuration to create. TaskPushNotificationConfig config = 3 [(google.api.field_behavior) = REQUIRED]; } -// --8<-- [end:SetTaskPushNotificationConfigRequest] +// --8<-- [end:CreateTaskPushNotificationConfigRequest] // --8<-- [start:SubscribeToTaskRequest] message SubscribeToTaskRequest { @@ -877,7 +877,7 @@ message StreamResponse { // --8<-- [end:StreamResponse] // --8<-- [start:ListTaskPushNotificationConfigResponse] -// Represents a successful response for the `tasks/pushNotificationConfig/list` +// Represents a successful response for the `ListTaskPushNotificationConfig` // method. message ListTaskPushNotificationConfigResponse { // The list of push notification configurations. diff --git a/spec-grpc/src/test/java/io/a2a/grpc/utils/JSONRPCUtilsTest.java b/spec-grpc/src/test/java/io/a2a/grpc/utils/JSONRPCUtilsTest.java index 61506c88e..373f031eb 100644 --- a/spec-grpc/src/test/java/io/a2a/grpc/utils/JSONRPCUtilsTest.java +++ b/spec-grpc/src/test/java/io/a2a/grpc/utils/JSONRPCUtilsTest.java @@ -15,8 +15,8 @@ import io.a2a.jsonrpc.common.wrappers.A2ARequest; import io.a2a.jsonrpc.common.wrappers.GetTaskPushNotificationConfigRequest; import io.a2a.jsonrpc.common.wrappers.GetTaskPushNotificationConfigResponse; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigRequest; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigResponse; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigRequest; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigResponse; import io.a2a.spec.InvalidParamsError; import io.a2a.spec.JSONParseError; import io.a2a.spec.PushNotificationConfig; @@ -26,11 +26,11 @@ public class JSONRPCUtilsTest { @Test - public void testParseSetTaskPushNotificationConfigRequest_ValidProtoFormat() throws JsonProcessingException { + public void testParseCreateTaskPushNotificationConfigRequest_ValidProtoFormat() throws JsonProcessingException { String validRequest = """ { "jsonrpc": "2.0", - "method": "SetTaskPushNotificationConfig", + "method": "CreateTaskPushNotificationConfig", "id": "1", "params": { "parent": "tasks/task-123", @@ -52,11 +52,11 @@ public void testParseSetTaskPushNotificationConfigRequest_ValidProtoFormat() thr A2ARequest request = JSONRPCUtils.parseRequestBody(validRequest); assertNotNull(request); - assertInstanceOf(SetTaskPushNotificationConfigRequest.class, request); - SetTaskPushNotificationConfigRequest setRequest = (SetTaskPushNotificationConfigRequest) request; + assertInstanceOf(CreateTaskPushNotificationConfigRequest.class, request); + CreateTaskPushNotificationConfigRequest setRequest = (CreateTaskPushNotificationConfigRequest) request; assertEquals("2.0", setRequest.getJsonrpc()); assertEquals(1, setRequest.getId()); - assertEquals("SetTaskPushNotificationConfig", setRequest.getMethod()); + assertEquals("CreateTaskPushNotificationConfig", setRequest.getMethod()); TaskPushNotificationConfig config = setRequest.getParams(); assertNotNull(config); @@ -95,7 +95,7 @@ public void testParseMalformedJSON_ThrowsJsonSyntaxException() { String malformedRequest = """ { "jsonrpc": "2.0", - "method": "SetTaskPushNotificationConfig", + "method": "CreateTaskPushNotificationConfig", "params": { "parent": "tasks/task-123" """; // Missing closing braces @@ -111,7 +111,7 @@ public void testParseInvalidParams_ThrowsInvalidParamsJsonMappingException() { String invalidParamsRequest = """ { "jsonrpc": "2.0", - "method": "SetTaskPushNotificationConfig", + "method": "CreateTaskPushNotificationConfig", "id": "3", "params": "not_a_dict" } @@ -129,7 +129,7 @@ public void testParseInvalidProtoStructure_ThrowsInvalidParamsJsonMappingExcepti String invalidStructure = """ { "jsonrpc": "2.0", - "method": "SetTaskPushNotificationConfig", + "method": "CreateTaskPushNotificationConfig", "id": "4", "params": { "invalid_field": "value" @@ -142,7 +142,7 @@ public void testParseInvalidProtoStructure_ThrowsInvalidParamsJsonMappingExcepti () -> JSONRPCUtils.parseRequestBody(invalidStructure) ); assertEquals(4, exception.getId()); - assertEquals(ERROR_MESSAGE.formatted("invalid_field in message a2a.v1.SetTaskPushNotificationConfigRequest"), exception.getMessage()); + assertEquals(ERROR_MESSAGE.formatted("invalid_field in message a2a.v1.CreateTaskPushNotificationConfigRequest"), exception.getMessage()); } @Test @@ -262,7 +262,7 @@ public void testParseInvalidTypeWithValidId_PreservesId() throws Exception { } @Test - public void testGenerateSetTaskPushNotificationConfigResponse_Success() throws Exception { + public void testGenerateCreateTaskPushNotificationConfigResponse_Success() throws Exception { TaskPushNotificationConfig config = new TaskPushNotificationConfig( "task-123", PushNotificationConfig.builder() @@ -286,8 +286,8 @@ public void testGenerateSetTaskPushNotificationConfigResponse_Success() throws E } """; - SetTaskPushNotificationConfigResponse response = - (SetTaskPushNotificationConfigResponse) JSONRPCUtils.parseResponseBody(responseJson, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); + CreateTaskPushNotificationConfigResponse response = + (CreateTaskPushNotificationConfigResponse) JSONRPCUtils.parseResponseBody(responseJson, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); assertNotNull(response); assertEquals(1, response.getId()); @@ -335,8 +335,8 @@ public void testParseErrorResponse_InvalidParams() throws Exception { } """; - SetTaskPushNotificationConfigResponse response = - (SetTaskPushNotificationConfigResponse) JSONRPCUtils.parseResponseBody(errorResponse, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); + CreateTaskPushNotificationConfigResponse response = + (CreateTaskPushNotificationConfigResponse) JSONRPCUtils.parseResponseBody(errorResponse, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); assertNotNull(response); assertEquals(5, response.getId()); @@ -359,8 +359,8 @@ public void testParseErrorResponse_ParseError() throws Exception { } """; - SetTaskPushNotificationConfigResponse response = - (SetTaskPushNotificationConfigResponse) JSONRPCUtils.parseResponseBody(errorResponse, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); + CreateTaskPushNotificationConfigResponse response = + (CreateTaskPushNotificationConfigResponse) JSONRPCUtils.parseResponseBody(errorResponse, SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD); assertNotNull(response); assertEquals(6, response.getId()); diff --git a/spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java b/spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java index e0a67c9c8..2e3b412e0 100644 --- a/spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java +++ b/spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java @@ -55,7 +55,6 @@ public void convertAgentCard() { .capabilities(AgentCapabilities.builder() .streaming(true) .pushNotifications(true) - .stateTransitionHistory(true) .build()) .defaultInputModes(Collections.singletonList("text")) .defaultOutputModes(Collections.singletonList("text")) @@ -91,7 +90,6 @@ public void convertAgentCard() { .capabilities(AgentCapabilities.builder() .streaming(true) .pushNotifications(true) - .stateTransitionHistory(true) .build()) .defaultInputModes(Collections.singletonList("text")) .defaultOutputModes(Collections.singletonList("text")) diff --git a/spec/src/main/java/io/a2a/spec/A2AMethods.java b/spec/src/main/java/io/a2a/spec/A2AMethods.java index 636b0d81b..e270a7d91 100644 --- a/spec/src/main/java/io/a2a/spec/A2AMethods.java +++ b/spec/src/main/java/io/a2a/spec/A2AMethods.java @@ -24,7 +24,7 @@ public interface A2AMethods { /** Method name for sending a streaming message. */ String SEND_STREAMING_MESSAGE_METHOD = "SendStreamingMessage"; /** Method name for setting task push notification configuration. */ - String SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD = "SetTaskPushNotificationConfig"; + String SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD = "CreateTaskPushNotificationConfig"; /** Method name for subscribing to task events. */ String SUBSCRIBE_TO_TASK_METHOD = "SubscribeToTask"; diff --git a/spec/src/main/java/io/a2a/spec/AgentCapabilities.java b/spec/src/main/java/io/a2a/spec/AgentCapabilities.java index ae8fb6f01..da166a4e1 100644 --- a/spec/src/main/java/io/a2a/spec/AgentCapabilities.java +++ b/spec/src/main/java/io/a2a/spec/AgentCapabilities.java @@ -16,25 +16,21 @@ * waiting for task completion *

  • pushNotifications: Agent can send proactive notifications to clients * when task state changes, eliminating the need for polling
  • - *
  • stateTransitionHistory: Agent maintains and provides a complete history - * of all state transitions for tasks, useful for debugging and auditing
  • * *

    * Capabilities are declared in the {@link AgentCard} and are immutable for the lifetime * of the agent instance. This class uses the Builder pattern for construction. * - * @param streaming whether the agent supports streaming responses with incremental artifacts + * @param streaming whether the agent supports streaming responses with incremental artifacts * @param pushNotifications whether the agent supports push notifications for state changes - * @param stateTransitionHistory whether the agent maintains state transition history * @param extendedAgentCard whether the agent supports an extended agent card - * @param extensions list of custom extensions supported by the agent (optional) + * @param extensions list of custom extensions supported by the agent (optional) * @see AgentCard * @see AgentExtension * @see A2A Protocol Specification */ public record AgentCapabilities(boolean streaming, boolean pushNotifications, - boolean stateTransitionHistory, boolean extendedAgentCard, List extensions) { @@ -57,7 +53,6 @@ public static Builder builder() { * AgentCapabilities capabilities = AgentCapabilities.builder() * .streaming(true) * .pushNotifications(false) - * .stateTransitionHistory(false) * .build(); * }

    */ @@ -65,7 +60,6 @@ public static class Builder { private boolean streaming; private boolean pushNotifications; - private boolean stateTransitionHistory; private boolean extendedAgentCard; private List extensions; @@ -103,20 +97,6 @@ public Builder pushNotifications(boolean pushNotifications) { return this; } - /** - * Sets whether the agent maintains state transition history. - *

    - * When enabled, the agent tracks and provides a complete history - * of all state transitions for each task. - * - * @param stateTransitionHistory true if state history is maintained, false otherwise - * @return this builder for method chaining - */ - public Builder stateTransitionHistory(boolean stateTransitionHistory) { - this.stateTransitionHistory = stateTransitionHistory; - return this; - } - /** * Sets whether the agent supports an extended agent card. * state transition history. @@ -150,7 +130,7 @@ public Builder extensions(List extensions) { * @return a new AgentCapabilities instance */ public AgentCapabilities build() { - return new AgentCapabilities(streaming, pushNotifications, stateTransitionHistory, extendedAgentCard, extensions); + return new AgentCapabilities(streaming, pushNotifications, extendedAgentCard, extensions); } } } diff --git a/tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java b/tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java index 526b81ce5..599a0e12c 100644 --- a/tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java +++ b/tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java @@ -39,7 +39,6 @@ public AgentCard agentCard() { .capabilities(AgentCapabilities.builder() .streaming(true) .pushNotifications(true) - .stateTransitionHistory(true) .build()) .defaultInputModes(Collections.singletonList("text")) .defaultOutputModes(Collections.singletonList("text")) diff --git a/tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java b/tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java index 724b58613..ee05ea694 100644 --- a/tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java +++ b/tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java @@ -80,7 +80,7 @@ import io.a2a.spec.TextPart; import io.a2a.spec.TransportProtocol; import io.a2a.spec.UnsupportedOperationError; -import io.a2a.util.Utils; + import io.restassured.RestAssured; import io.restassured.config.ObjectMapperConfig; import io.restassured.specification.RequestSpecification; @@ -553,7 +553,7 @@ public void testSetPushNotificationSuccess() throws Exception { TaskPushNotificationConfig taskPushConfig = new TaskPushNotificationConfig( MINIMAL_TASK.id(), PushNotificationConfig.builder().id("c295ea44-7543-4f78-b524-7a38915ad6e4").url("http://example.com").build(), ""); - TaskPushNotificationConfig config = getClient().setTaskPushNotificationConfiguration(taskPushConfig); + TaskPushNotificationConfig config = getClient().createTaskPushNotificationConfiguration(taskPushConfig); assertEquals(MINIMAL_TASK.id(), config.taskId()); assertEquals("http://example.com", config.pushNotificationConfig().url()); assertEquals("c295ea44-7543-4f78-b524-7a38915ad6e4", config.pushNotificationConfig().id()); @@ -573,7 +573,7 @@ public void testGetPushNotificationSuccess() throws Exception { = new TaskPushNotificationConfig( MINIMAL_TASK.id(), PushNotificationConfig.builder().id("c295ea44-7543-4f78-b524-7a38915ad6e4").url("http://example.com").build(), ""); - TaskPushNotificationConfig setResult = getClient().setTaskPushNotificationConfiguration(taskPushConfig); + TaskPushNotificationConfig setResult = getClient().createTaskPushNotificationConfiguration(taskPushConfig); assertNotNull(setResult); TaskPushNotificationConfig config = getClient().getTaskPushNotificationConfiguration( @@ -624,7 +624,6 @@ public void testGetExtendedAgentCard() throws A2AClientException { assertEquals("http://example.com/docs", agentCard.documentationUrl()); assertTrue(agentCard.capabilities().pushNotifications()); assertTrue(agentCard.capabilities().streaming()); - assertTrue(agentCard.capabilities().stateTransitionHistory()); assertTrue(agentCard.capabilities().extendedAgentCard()); assertTrue(agentCard.skills().isEmpty()); } @@ -2056,7 +2055,6 @@ private AgentCard createTestAgentCard() { .capabilities(AgentCapabilities.builder() .streaming(true) .pushNotifications(true) - .stateTransitionHistory(true) .build()) .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) diff --git a/tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java b/tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java index 03ec3481b..f9dae8d19 100644 --- a/tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java +++ b/tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java @@ -46,7 +46,6 @@ public AgentCard agentCard() { .capabilities(AgentCapabilities.builder() .streaming(true) .pushNotifications(true) - .stateTransitionHistory(true) .extendedAgentCard(true) .build()) .defaultInputModes(Collections.singletonList("text")) diff --git a/transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java b/transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java index 408205aa2..ec6b678e6 100644 --- a/transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java +++ b/transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java @@ -159,7 +159,7 @@ public void cancelTask(io.a2a.grpc.CancelTaskRequest request, } @Override - public void setTaskPushNotificationConfig(io.a2a.grpc.SetTaskPushNotificationConfigRequest request, + public void createTaskPushNotificationConfig(io.a2a.grpc.CreateTaskPushNotificationConfigRequest request, StreamObserver responseObserver) { if (!getAgentCardInternal().capabilities().pushNotifications()) { handleError(responseObserver, new PushNotificationNotSupportedError()); @@ -168,8 +168,8 @@ public void setTaskPushNotificationConfig(io.a2a.grpc.SetTaskPushNotificationCon try { ServerCallContext context = createCallContext(responseObserver); - TaskPushNotificationConfig config = FromProto.setTaskPushNotificationConfig(request); - TaskPushNotificationConfig responseConfig = getRequestHandler().onSetTaskPushNotificationConfig(config, context); + TaskPushNotificationConfig config = FromProto.CreateTaskPushNotificationConfig(request); + TaskPushNotificationConfig responseConfig = getRequestHandler().onCreateTaskPushNotificationConfig(config, context); responseObserver.onNext(ToProto.taskPushNotificationConfig(responseConfig)); responseObserver.onCompleted(); } catch (A2AError e) { diff --git a/transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java b/transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java index 690d69a87..c56a45676 100644 --- a/transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java +++ b/transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java @@ -12,32 +12,10 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import jakarta.enterprise.inject.Instance; - import com.google.protobuf.Empty; import com.google.protobuf.Struct; -import io.a2a.grpc.AuthenticationInfo; -import io.a2a.grpc.CancelTaskRequest; -import io.a2a.grpc.DeleteTaskPushNotificationConfigRequest; -import io.a2a.grpc.GetTaskPushNotificationConfigRequest; -import io.a2a.grpc.GetTaskRequest; -import io.a2a.grpc.ListTaskPushNotificationConfigRequest; -import io.a2a.grpc.ListTaskPushNotificationConfigResponse; -import io.a2a.grpc.ListTasksRequest; -import io.a2a.grpc.ListTasksResponse; -import io.a2a.grpc.Message; -import io.a2a.grpc.Part; -import io.a2a.grpc.PushNotificationConfig; -import io.a2a.grpc.Role; -import io.a2a.grpc.SendMessageRequest; -import io.a2a.grpc.SendMessageResponse; -import io.a2a.grpc.SetTaskPushNotificationConfigRequest; -import io.a2a.grpc.StreamResponse; -import io.a2a.grpc.SubscribeToTaskRequest; -import io.a2a.grpc.Task; -import io.a2a.grpc.TaskPushNotificationConfig; -import io.a2a.grpc.TaskState; -import io.a2a.grpc.TaskStatus; + +import io.a2a.grpc.*; import io.a2a.server.ServerCallContext; import io.a2a.server.auth.UnauthenticatedUser; import io.a2a.server.events.EventConsumer; @@ -271,7 +249,7 @@ public void testGetPushNotificationConfigSuccess() throws Exception { @Test public void testPushNotificationsNotSupportedError() throws Exception { - AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(true, false, true); + AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(true, false); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, NAME); @@ -283,7 +261,7 @@ public void testOnGetPushNotificationNoPushNotifierConfig() throws Exception { // Create request handler without a push notifier DefaultRequestHandler requestHandler = new DefaultRequestHandler(executor, taskStore, queueManager, null, null, internalExecutor); - AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true, false); + AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); StreamRecorder streamRecorder = getTaskPushNotificationConfigRequest(handler, NAME); @@ -295,7 +273,7 @@ public void testOnSetPushNotificationNoPushNotifierConfig() throws Exception { // Create request handler without a push notifier DefaultRequestHandler requestHandler = DefaultRequestHandler.create( executor, taskStore, queueManager, null, null, internalExecutor); - AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true, false); + AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, NAME); @@ -595,7 +573,7 @@ public void testOnResubscribeExistingTaskSuccessMocks() throws Exception { @Test public void testStreamingNotSupportedError() throws Exception { - AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true, true); + AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); StreamRecorder streamRecorder = sendStreamingMessageRequest(handler); assertGrpcError(streamRecorder, Status.Code.INVALID_ARGUMENT); @@ -604,7 +582,7 @@ public void testStreamingNotSupportedError() throws Exception { @Test public void testStreamingNotSupportedErrorOnResubscribeToTask() throws Exception { // This test does not exist in the Python implementation - AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true, true); + AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); SubscribeToTaskRequest request = SubscribeToTaskRequest.newBuilder() .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) @@ -651,7 +629,7 @@ public void testListPushNotificationConfig() throws Exception { @Test public void testListPushNotificationConfigNotSupported() throws Exception { - AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(true, false, true); + AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(true, false); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); taskStore.save(AbstractA2ARequestHandlerTest.MINIMAL_TASK); agentExecutorExecute = (context, eventQueue) -> { @@ -723,7 +701,7 @@ public void testDeletePushNotificationConfig() throws Exception { @Test public void testDeletePushNotificationConfigNotSupported() throws Exception { - AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(true, false, true); + AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(true, false); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); taskStore.save(AbstractA2ARequestHandlerTest.MINIMAL_TASK); agentExecutorExecute = (context, eventQueue) -> { @@ -1164,14 +1142,14 @@ private StreamRecorder createTaskPushNotificationCon .setName(name) .setPushNotificationConfig(config) .build(); - SetTaskPushNotificationConfigRequest setRequest = SetTaskPushNotificationConfigRequest.newBuilder() + CreateTaskPushNotificationConfigRequest setRequest = CreateTaskPushNotificationConfigRequest.newBuilder() .setConfig(taskPushNotificationConfig) .setConfigId("config456") .setParent("tasks/" + MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); - handler.setTaskPushNotificationConfig(setRequest, streamRecorder); + handler.createTaskPushNotificationConfig(setRequest, streamRecorder); streamRecorder.awaitCompletion(5, TimeUnit.SECONDS); return streamRecorder; } diff --git a/transport/jsonrpc/src/main/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandler.java b/transport/jsonrpc/src/main/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandler.java index 2e1a1fdf0..a592bd55d 100644 --- a/transport/jsonrpc/src/main/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandler.java +++ b/transport/jsonrpc/src/main/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandler.java @@ -29,8 +29,8 @@ import io.a2a.jsonrpc.common.wrappers.SendMessageResponse; import io.a2a.jsonrpc.common.wrappers.SendStreamingMessageRequest; import io.a2a.jsonrpc.common.wrappers.SendStreamingMessageResponse; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigRequest; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigResponse; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigRequest; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigResponse; import io.a2a.jsonrpc.common.wrappers.SubscribeToTaskRequest; import io.a2a.server.AgentCardValidator; import io.a2a.server.ExtendedAgentCard; @@ -188,20 +188,20 @@ public GetTaskPushNotificationConfigResponse getPushNotificationConfig( } } - public SetTaskPushNotificationConfigResponse setPushNotificationConfig( - SetTaskPushNotificationConfigRequest request, ServerCallContext context) { + public CreateTaskPushNotificationConfigResponse setPushNotificationConfig( + CreateTaskPushNotificationConfigRequest request, ServerCallContext context) { if (!agentCard.capabilities().pushNotifications()) { - return new SetTaskPushNotificationConfigResponse(request.getId(), + return new CreateTaskPushNotificationConfigResponse(request.getId(), new PushNotificationNotSupportedError()); } try { TaskPushNotificationConfig config = - requestHandler.onSetTaskPushNotificationConfig(request.getParams(), context); - return new SetTaskPushNotificationConfigResponse(request.getId().toString(), config); + requestHandler.onCreateTaskPushNotificationConfig(request.getParams(), context); + return new CreateTaskPushNotificationConfigResponse(request.getId().toString(), config); } catch (A2AError e) { - return new SetTaskPushNotificationConfigResponse(request.getId(), e); + return new CreateTaskPushNotificationConfigResponse(request.getId(), e); } catch (Throwable t) { - return new SetTaskPushNotificationConfigResponse(request.getId(), new InternalError(t.getMessage())); + return new CreateTaskPushNotificationConfigResponse(request.getId(), new InternalError(t.getMessage())); } } diff --git a/transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java b/transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java index b43c28029..a14ef21bc 100644 --- a/transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java +++ b/transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java @@ -35,8 +35,8 @@ import io.a2a.jsonrpc.common.wrappers.SendMessageResponse; import io.a2a.jsonrpc.common.wrappers.SendStreamingMessageRequest; import io.a2a.jsonrpc.common.wrappers.SendStreamingMessageResponse; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigRequest; -import io.a2a.jsonrpc.common.wrappers.SetTaskPushNotificationConfigResponse; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigRequest; +import io.a2a.jsonrpc.common.wrappers.CreateTaskPushNotificationConfigResponse; import io.a2a.jsonrpc.common.wrappers.ListTasksRequest; import io.a2a.jsonrpc.common.wrappers.ListTasksResponse; import io.a2a.jsonrpc.common.wrappers.SubscribeToTaskRequest; @@ -690,8 +690,8 @@ public void testSetPushNotificationConfigSuccess() { PushNotificationConfig.builder().url("http://example.com") .id("c295ea44-7543-4f78-b524-7a38915ad6e4").build(), "tenant"); - SetTaskPushNotificationConfigRequest request = new SetTaskPushNotificationConfigRequest("1", taskPushConfig); - SetTaskPushNotificationConfigResponse response = handler.setPushNotificationConfig(request, callContext); + CreateTaskPushNotificationConfigRequest request = new CreateTaskPushNotificationConfigRequest("1", taskPushConfig); + CreateTaskPushNotificationConfigResponse response = handler.setPushNotificationConfig(request, callContext); TaskPushNotificationConfig taskPushConfigResult = new TaskPushNotificationConfig( MINIMAL_TASK.id(), PushNotificationConfig.builder().url("http://example.com") @@ -714,7 +714,7 @@ public void testGetPushNotificationConfigSuccess() { MINIMAL_TASK.id(), PushNotificationConfig.builder() .id("c295ea44-7543-4f78-b524-7a38915ad6e4").url("http://example.com").build(), "tenant"); - SetTaskPushNotificationConfigRequest request = new SetTaskPushNotificationConfigRequest("1", taskPushConfig); + CreateTaskPushNotificationConfigRequest request = new CreateTaskPushNotificationConfigRequest("1", taskPushConfig); handler.setPushNotificationConfig(request, callContext); GetTaskPushNotificationConfigRequest getRequest @@ -759,8 +759,8 @@ public void testOnMessageStreamNewMessageSendPushNotificationSuccess() throws Ex MINIMAL_TASK.id(), PushNotificationConfig.builder().id("c295ea44-7543-4f78-b524-7a38915ad6e4").url("http://example.com").build(), "tenant"); - SetTaskPushNotificationConfigRequest stpnRequest = new SetTaskPushNotificationConfigRequest("1", config); - SetTaskPushNotificationConfigResponse stpnResponse = handler.setPushNotificationConfig(stpnRequest, callContext); + CreateTaskPushNotificationConfigRequest stpnRequest = new CreateTaskPushNotificationConfigRequest("1", config); + CreateTaskPushNotificationConfigResponse stpnResponse = handler.setPushNotificationConfig(stpnRequest, callContext); assertNull(stpnResponse.getError()); Message msg = Message.builder(MESSAGE) @@ -1015,7 +1015,7 @@ public void onComplete() { @Test public void testStreamingNotSupportedError() { - AgentCard card = createAgentCard(false, true, true); + AgentCard card = createAgentCard(false, true); JSONRPCHandler handler = new JSONRPCHandler(card, requestHandler, internalExecutor); SendStreamingMessageRequest request = SendStreamingMessageRequest.builder() @@ -1067,7 +1067,7 @@ public void onComplete() { @Test public void testStreamingNotSupportedErrorOnResubscribeToTask() { // This test does not exist in the Python implementation - AgentCard card = createAgentCard(false, true, true); + AgentCard card = createAgentCard(false, true); JSONRPCHandler handler = new JSONRPCHandler(card, requestHandler, internalExecutor); SubscribeToTaskRequest request = new SubscribeToTaskRequest("1", new TaskIdParams(MINIMAL_TASK.id())); @@ -1113,7 +1113,7 @@ public void onComplete() { @Test public void testPushNotificationsNotSupportedError() { - AgentCard card = createAgentCard(true, false, true); + AgentCard card = createAgentCard(true, false); JSONRPCHandler handler = new JSONRPCHandler(card, requestHandler, internalExecutor); taskStore.save(MINIMAL_TASK); @@ -1125,10 +1125,10 @@ public void testPushNotificationsNotSupportedError() { .url("http://example.com") .build(), "tenant"); - SetTaskPushNotificationConfigRequest request = SetTaskPushNotificationConfigRequest.builder() + CreateTaskPushNotificationConfigRequest request = CreateTaskPushNotificationConfigRequest.builder() .params(config) .build(); - SetTaskPushNotificationConfigResponse response = handler.setPushNotificationConfig(request, callContext); + CreateTaskPushNotificationConfigResponse response = handler.setPushNotificationConfig(request, callContext); assertInstanceOf(PushNotificationNotSupportedError.class, response.getError()); } @@ -1137,7 +1137,7 @@ public void testOnGetPushNotificationNoPushNotifierConfig() { // Create request handler without a push notifier DefaultRequestHandler requestHandler = DefaultRequestHandler.create( executor, taskStore, queueManager, null, null, internalExecutor); - AgentCard card = createAgentCard(false, true, false); + AgentCard card = createAgentCard(false, true); JSONRPCHandler handler = new JSONRPCHandler(card, requestHandler, internalExecutor); taskStore.save(MINIMAL_TASK); @@ -1156,7 +1156,7 @@ public void testOnSetPushNotificationNoPushNotifierConfig() { // Create request handler without a push notifier DefaultRequestHandler requestHandler = DefaultRequestHandler.create( executor, taskStore, queueManager, null, null, internalExecutor); - AgentCard card = createAgentCard(false, true, false); + AgentCard card = createAgentCard(false, true); JSONRPCHandler handler = new JSONRPCHandler(card, requestHandler, internalExecutor); taskStore.save(MINIMAL_TASK); @@ -1169,10 +1169,10 @@ public void testOnSetPushNotificationNoPushNotifierConfig() { .url("http://example.com") .build(), "tenant"); - SetTaskPushNotificationConfigRequest request = SetTaskPushNotificationConfigRequest.builder() + CreateTaskPushNotificationConfigRequest request = CreateTaskPushNotificationConfigRequest.builder() .params(config) .build(); - SetTaskPushNotificationConfigResponse response = handler.setPushNotificationConfig(request, callContext); + CreateTaskPushNotificationConfigResponse response = handler.setPushNotificationConfig(request, callContext); assertInstanceOf(UnsupportedOperationError.class, response.getError()); assertEquals("This operation is not supported", response.getError().getMessage()); @@ -1248,7 +1248,7 @@ public void testDefaultRequestHandlerWithCustomComponents() { public void testOnMessageSendErrorHandling() { DefaultRequestHandler requestHandler = DefaultRequestHandler.create( executor, taskStore, queueManager, null, null, internalExecutor); - AgentCard card = createAgentCard(false, true, false); + AgentCard card = createAgentCard(false, true); JSONRPCHandler handler = new JSONRPCHandler(card, requestHandler, internalExecutor); taskStore.save(MINIMAL_TASK); @@ -1358,7 +1358,7 @@ public void testListPushNotificationConfig() { .url("http://example.com") .id(MINIMAL_TASK.id()) .build(), "tenant"); - SetTaskPushNotificationConfigRequest request = new SetTaskPushNotificationConfigRequest("1", taskPushConfig); + CreateTaskPushNotificationConfigRequest request = new CreateTaskPushNotificationConfigRequest("1", taskPushConfig); handler.setPushNotificationConfig(request, callContext); TaskPushNotificationConfig result = new TaskPushNotificationConfig( MINIMAL_TASK.id(), PushNotificationConfig.builder() @@ -1376,7 +1376,7 @@ public void testListPushNotificationConfig() { @Test public void testListPushNotificationConfigNotSupported() { - AgentCard card = createAgentCard(true, false, true); + AgentCard card = createAgentCard(true, false); JSONRPCHandler handler = new JSONRPCHandler(card, requestHandler, internalExecutor); taskStore.save(MINIMAL_TASK); agentExecutorExecute = (context, eventQueue) -> { @@ -1389,7 +1389,7 @@ public void testListPushNotificationConfigNotSupported() { .url("http://example.com") .id(MINIMAL_TASK.id()) .build(), "tenant"); - SetTaskPushNotificationConfigRequest request = new SetTaskPushNotificationConfigRequest("1", taskPushConfig); + CreateTaskPushNotificationConfigRequest request = new CreateTaskPushNotificationConfigRequest("1", taskPushConfig); handler.setPushNotificationConfig(request, callContext); ListTaskPushNotificationConfigRequest listRequest @@ -1453,7 +1453,7 @@ public void testDeletePushNotificationConfig() { .url("http://example.com") .id(MINIMAL_TASK.id()) .build(), "tenant"); - SetTaskPushNotificationConfigRequest request = new SetTaskPushNotificationConfigRequest("1", taskPushConfig); + CreateTaskPushNotificationConfigRequest request = new CreateTaskPushNotificationConfigRequest("1", taskPushConfig); handler.setPushNotificationConfig(request, callContext); DeleteTaskPushNotificationConfigRequest deleteRequest @@ -1468,7 +1468,7 @@ public void testDeletePushNotificationConfig() { @Test public void testDeletePushNotificationConfigNotSupported() { - AgentCard card = createAgentCard(true, false, true); + AgentCard card = createAgentCard(true, false); JSONRPCHandler handler = new JSONRPCHandler(card, requestHandler, internalExecutor); taskStore.save(MINIMAL_TASK); agentExecutorExecute = (context, eventQueue) -> { @@ -1481,7 +1481,7 @@ public void testDeletePushNotificationConfigNotSupported() { .url("http://example.com") .id(MINIMAL_TASK.id()) .build(), "tenant"); - SetTaskPushNotificationConfigRequest request = new SetTaskPushNotificationConfigRequest("1", taskPushConfig); + CreateTaskPushNotificationConfigRequest request = new CreateTaskPushNotificationConfigRequest("1", taskPushConfig); handler.setPushNotificationConfig(request, callContext); DeleteTaskPushNotificationConfigRequest deleteRequest @@ -1510,7 +1510,7 @@ public void testDeletePushNotificationConfigNoPushConfigStore() { .url("http://example.com") .id(MINIMAL_TASK.id()) .build(), "tenant"); - SetTaskPushNotificationConfigRequest request = new SetTaskPushNotificationConfigRequest("1", taskPushConfig); + CreateTaskPushNotificationConfigRequest request = new CreateTaskPushNotificationConfigRequest("1", taskPushConfig); handler.setPushNotificationConfig(request, callContext); DeleteTaskPushNotificationConfigRequest deleteRequest diff --git a/transport/rest/src/main/java/io/a2a/transport/rest/handler/RestHandler.java b/transport/rest/src/main/java/io/a2a/transport/rest/handler/RestHandler.java index 3ffb56c5f..c5b03b0db 100644 --- a/transport/rest/src/main/java/io/a2a/transport/rest/handler/RestHandler.java +++ b/transport/rest/src/main/java/io/a2a/transport/rest/handler/RestHandler.java @@ -161,15 +161,15 @@ public HTTPRestResponse cancelTask(String taskId, String tenant, ServerCallConte } } - public HTTPRestResponse setTaskPushNotificationConfiguration(String taskId, String body, String tenant, ServerCallContext context) { + public HTTPRestResponse CreateTaskPushNotificationConfiguration(String taskId, String body, String tenant, ServerCallContext context) { try { if (!agentCard.capabilities().pushNotifications()) { throw new PushNotificationNotSupportedError(); } - io.a2a.grpc.SetTaskPushNotificationConfigRequest.Builder builder = io.a2a.grpc.SetTaskPushNotificationConfigRequest.newBuilder(); + io.a2a.grpc.CreateTaskPushNotificationConfigRequest.Builder builder = io.a2a.grpc.CreateTaskPushNotificationConfigRequest.newBuilder(); parseRequestBody(body, builder); builder.setTenant(tenant); - TaskPushNotificationConfig result = requestHandler.onSetTaskPushNotificationConfig(ProtoUtils.FromProto.setTaskPushNotificationConfig(builder), context); + TaskPushNotificationConfig result = requestHandler.onCreateTaskPushNotificationConfig(ProtoUtils.FromProto.CreateTaskPushNotificationConfig(builder), context); return createSuccessResponse(201, io.a2a.grpc.TaskPushNotificationConfig.newBuilder(ProtoUtils.ToProto.taskPushNotificationConfig(result))); } catch (A2AError e) { return createErrorResponse(e); diff --git a/transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java b/transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java index 7d930415b..e77399ca4 100644 --- a/transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java +++ b/transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java @@ -224,7 +224,7 @@ public void testSendStreamingMessageSuccess() { @Test public void testSendStreamingMessageNotSupported() { - AgentCard card = createAgentCard(false, true, true); + AgentCard card = createAgentCard(false, true); RestHandler handler = new RestHandler(card, requestHandler, internalExecutor); String requestBody = """ @@ -263,7 +263,7 @@ public void testPushNotificationConfigSuccess() { } }""".formatted(MINIMAL_TASK.id(), MINIMAL_TASK.id()); - RestHandler.HTTPRestResponse response = handler.setTaskPushNotificationConfiguration( MINIMAL_TASK.id(), requestBody, "", callContext); + RestHandler.HTTPRestResponse response = handler.CreateTaskPushNotificationConfiguration( MINIMAL_TASK.id(), requestBody, "", callContext); Assertions.assertEquals(201, response.getStatusCode(), response.toString()); Assertions.assertEquals("application/json", response.getContentType()); @@ -272,7 +272,7 @@ public void testPushNotificationConfigSuccess() { @Test public void testPushNotificationConfigNotSupported() { - AgentCard card = createAgentCard(true, false, true); + AgentCard card = createAgentCard(true, false); RestHandler handler = new RestHandler(card, requestHandler, internalExecutor); String requestBody = """ @@ -284,7 +284,7 @@ public void testPushNotificationConfigNotSupported() { } """.formatted(MINIMAL_TASK.id()); - RestHandler.HTTPRestResponse response = handler.setTaskPushNotificationConfiguration(MINIMAL_TASK.id(), requestBody, "", callContext); + RestHandler.HTTPRestResponse response = handler.CreateTaskPushNotificationConfiguration(MINIMAL_TASK.id(), requestBody, "", callContext); Assertions.assertEquals(501, response.getStatusCode()); Assertions.assertTrue(response.getBody().contains("PushNotificationNotSupportedError")); @@ -310,7 +310,7 @@ public void testGetPushNotificationConfig() { } } }""".formatted(MINIMAL_TASK.id(), MINIMAL_TASK.id()); - RestHandler.HTTPRestResponse response = handler.setTaskPushNotificationConfiguration(MINIMAL_TASK.id(), createRequestBody, "", callContext); + RestHandler.HTTPRestResponse response = handler.CreateTaskPushNotificationConfiguration(MINIMAL_TASK.id(), createRequestBody, "", callContext); Assertions.assertEquals(201, response.getStatusCode(), response.toString()); Assertions.assertEquals("application/json", response.getContentType()); // Now get it