Compare commits

...

2 Commits

2 changed files with 26 additions and 20 deletions

View File

@ -325,11 +325,11 @@ The operation enables real-time monitoring of task progress and can be used with
The operation MUST return a `Task` object as the first event in the stream, representing the current state of the task at the time of subscription. This prevents a potential loss of information between a call to `GetTask` and calling `SubscribeToTask`.
#### 3.1.7. Set or Update Push Notification Config
#### 3.1.7. Create Push Notification Config
<span id="75-taskspushnotificationconfigset"></span>
Creates or updates a push notification configuration for a task to receive asynchronous updates via webhook.
Creates a push notification configuration for a task to receive asynchronous updates via webhook.
**Inputs:**
@ -668,7 +668,7 @@ The A2A protocol provides three complementary mechanisms for clients to receive
- Client does not maintain persistent connection
- Asynchronous delivery, client must be reachable via HTTP
- Best for: Server-to-server integrations, long-running tasks, event-driven architectures
- Operations: Set ([Section 3.1.7](#75-taskspushnotificationconfigset)), Get ([Section 3.1.8](#76-taskspushnotificationconfigget)), List ([Section 3.1.9](#319-list-push-notification-configs)), Delete ([Section 3.1.10](#3110-delete-push-notification-config))
- Operations: Create ([Section 3.1.7](#75-taskspushnotificationconfigset)), Get ([Section 3.1.8](#76-taskspushnotificationconfigget)), List ([Section 3.1.9](#319-list-push-notification-configs)), Delete ([Section 3.1.10](#3110-delete-push-notification-config))
- Event types: TaskStatusUpdateEvent ([Section 4.2.1](#421-taskstatusupdateevent)), TaskArtifactUpdateEvent ([Section 4.2.2](#422-taskartifactupdateevent)), WebHook payloads ([Section 4.3](#43-push-notification-objects))
- Requires `AgentCard.capabilities.pushNotifications` to be `true`
- Regardless of the protocol binding being used by the agent, WebHook calls use plain HTTP and the JSON payloads as defined in the HTTP protocol binding
@ -1130,7 +1130,7 @@ When an agent supports multiple protocols, all supported protocols **MUST**:
| List tasks | `ListTasks` | `ListTasks` | `GET /v1/tasks` |
| Cancel task | `CancelTask` | `CancelTask` | `POST /v1/tasks/{id}:cancel` |
| Subscribe to task | `SubscribeToTask` | `SubscribeToTask` | `POST /v1/tasks/{id}:subscribe` |
| Set push notification config | `SetTaskPushNotificationConfig` | `SetTaskPushNotificationConfig` | `POST /v1/tasks/{id}/pushNotificationConfigs` |
| Create push notification config | `CreateTaskPushNotificationConfig` | `CreateTaskPushNotificationConfig` | `POST /v1/tasks/{id}/pushNotificationConfigs` |
| Get push notification config | `GetTaskPushNotificationConfig` | `GetTaskPushNotificationConfig` | `GET /v1/tasks/{id}/pushNotificationConfigs/{configId}` |
| List push notification configs | `ListTaskPushNotificationConfig` | `ListTaskPushNotificationConfig` | `GET /v1/tasks/{id}/pushNotificationConfigs` |
| Delete push notification config | `DeleteTaskPushNotificationConfig` | `DeleteTaskPushNotificationConfig` | `DELETE /v1/tasks/{id}/pushNotificationConfigs/{configId}` |
@ -2320,7 +2320,7 @@ Subscribes to a task stream for receiving updates on a task that is not in a ter
#### 9.4.7. Push Notification Configuration Methods
- `SetTaskPushNotificationConfig` - Set push notification configuration
- `CreateTaskPushNotificationConfig` - Create push notification configuration
- `GetTaskPushNotificationConfig` - Get push notification configuration
- `ListTaskPushNotificationConfig` - List push notification configurations
- `DeleteTaskPushNotificationConfig` - Delete push notification configuration
@ -2448,7 +2448,7 @@ service A2AService {
rpc ListTasks(ListTasksRequest) returns (ListTasksResponse);
rpc CancelTask(CancelTaskRequest) returns (Task);
rpc SubscribeToTask(SubscribeToTaskRequest) returns (stream StreamResponse);
rpc SetTaskPushNotificationConfig(SetTaskPushNotificationConfigRequest) returns (TaskPushNotificationConfig);
rpc CreateTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest) returns (TaskPushNotificationConfig);
rpc GetTaskPushNotificationConfig(GetTaskPushNotificationConfigRequest) returns (TaskPushNotificationConfig);
rpc ListTaskPushNotificationConfig(ListTaskPushNotificationConfigRequest) returns (ListTaskPushNotificationConfigResponse);
rpc DeleteTaskPushNotificationConfig(DeleteTaskPushNotificationConfigRequest) returns (google.protobuf.Empty);
@ -2538,14 +2538,14 @@ Subscribe to task updates via streaming. Returns `UnsupportedOperationError` if
**Response:** Server streaming [`StreamResponse`](#stream-response) objects.
#### 10.4.7. SetTaskPushNotificationConfig
#### 10.4.7. CreateTaskPushNotificationConfig
Creates a push notification configuration for a task.
**Request:**
```proto
--8<-- "specification/grpc/a2a.proto:SetTaskPushNotificationConfigRequest"
--8<-- "specification/grpc/a2a.proto:CreateTaskPushNotificationConfigRequest"
```
**Response:** See [`PushNotificationConfig`](#431-pushnotificationconfig) object definition.

View File

@ -5,6 +5,7 @@ package a2a.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
@ -61,14 +62,14 @@ service A2AService {
};
}
// Set a push notification config for a task.
rpc SetTaskPushNotificationConfig(SetTaskPushNotificationConfigRequest)
// Create a push notification config for a task.
rpc CreateTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest)
returns (TaskPushNotificationConfig) {
option (google.api.http) = {
post: "/v1/{parent=tasks/*/pushNotificationConfigs}"
body: "config"
body: "task_push_notification_config"
};
option (google.api.method_signature) = "parent,config";
option (google.api.method_signature) = "parent,task_push_notification_config";
}
// Get a push notification config for a task.
rpc GetTaskPushNotificationConfig(GetTaskPushNotificationConfigRequest)
@ -759,19 +760,24 @@ 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 `tasks/pushNotificationConfig/create` method.
message CreateTaskPushNotificationConfigRequest {
// The parent task resource for this config.
// Format: tasks/{task_id}
string parent = 1 [(google.api.field_behavior) = REQUIRED];
// The ID for the new config.
string config_id = 2 [(google.api.field_behavior) = REQUIRED];
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "a2a.v1/TaskPushNotificationConfig"
}
];
// The ID for the new config. Optional - server will generate if not provided.
string task_push_notification_config_id = 2;
// The configuration to create.
TaskPushNotificationConfig config = 3
TaskPushNotificationConfig task_push_notification_config = 3
[(google.api.field_behavior) = REQUIRED];
}
// --8<-- [end:SetTaskPushNotificationConfigRequest]
// --8<-- [end:CreateTaskPushNotificationConfigRequest]
// --8<-- [start:SubscribeToTaskRequest]
message SubscribeToTaskRequest {