feat: Support for multiple pushNotification config per task (#738)
- Support for list pushNotificationConfig for task - Support for delete pushNotificationConfig - Get pushNotificationConfig by id or by task - update protos to use PushNotificationConfig --------- Co-authored-by: a2a-bot <a2a-bot@google.com>
This commit is contained in:
parent
94a3a00282
commit
f355d3e922
@ -705,11 +705,69 @@ Sets or updates the push notification configuration for a specified task. This a
|
||||
|
||||
Retrieves the current push notification configuration for a specified task. Requires the server to have `AgentCard.capabilities.pushNotifications: true`.
|
||||
|
||||
- **Request `params` type**: [`TaskIdParams`](#741-taskidparams-object-for-taskscancel-and-taskspushnotificationconfigget)
|
||||
- **Request `params` type**: [`GetTaskPushNotificationConfigParams`](#761-gettaskpushnotificationconfigparams-object-taskspushnotificationconfigget) | [`TaskIdParams`](#741-taskidparams-object-for-taskscancel-and-taskspushnotificationconfigget)
|
||||
_(Note: TaskIdParams type is deprecated for this method. Use GetTaskPushNotificationConfigParams instead.)_
|
||||
- **Response `result` type (on success)**: [`TaskPushNotificationConfig`](#610-taskpushnotificationconfig-object) (The current push notification configuration for the task. Server may return an error if no push notification configuration is associated with the task).
|
||||
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`PushNotificationNotSupportedError`](#82-a2a-specific-errors), [`TaskNotFoundError`](#82-a2a-specific-errors)).
|
||||
|
||||
### 7.7. `tasks/resubscribe`
|
||||
#### 7.6.1. `GetTaskPushNotificationConfigParams` Object (`tasks/pushNotificationConfig/get`)
|
||||
|
||||
A object for fetching the push notification configuration for a task.
|
||||
|
||||
```ts { .no-copy }
|
||||
--8<-- "types/src/types.ts:GetTaskPushNotificationConfigParams"
|
||||
```
|
||||
|
||||
| Field Name | Type | Required | Description |
|
||||
| :--------- | :-------------------- | :------- | :------------------------- |
|
||||
| `id` | `string` | Yes | The ID of the task. |
|
||||
| `pushNotificationConfigId` | `string` | No | Push notification configuration id. Server will return one of the associated configurations if config id is not specified |
|
||||
| `metadata` | `Record<string, any>` | No | Request-specific metadata. |
|
||||
|
||||
### 7.7. `tasks/pushNotificationConfig/list`
|
||||
|
||||
Retrieves the associated push notification configurations for a specified task. Requires the server to have `AgentCard.capabilities.pushNotifications: true`.
|
||||
|
||||
- **Request `params` type**: [`ListTaskPushNotificationConfigParams`](#771-listtaskpushnotificationconfigparams-object-taskspushnotificationconfiglist)
|
||||
- **Response `result` type (on success)**: [`TaskPushNotificationConfig[]`](#610-taskpushnotificationconfig-object) (The push notification configurations associated with the task.).
|
||||
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`PushNotificationNotSupportedError`](#82-a2a-specific-errors), [`TaskNotFoundError`](#82-a2a-specific-errors)).
|
||||
|
||||
#### 7.7.1. `ListTaskPushNotificationConfigParams` Object (`tasks/pushNotificationConfig/list`)
|
||||
|
||||
A object for fetching the push notification configurations for a task.
|
||||
|
||||
```ts { .no-copy }
|
||||
--8<-- "types/src/types.ts:ListTaskPushNotificationConfigRequest"
|
||||
```
|
||||
|
||||
| Field Name | Type | Required | Description |
|
||||
| :--------- | :-------------------- | :------- | :------------------------- |
|
||||
| `id` | `string` | Yes | The ID of the task. |
|
||||
| `metadata` | `Record<string, any>` | No | Request-specific metadata. |
|
||||
|
||||
### 7.8. `tasks/pushNotificationConfig/delete`
|
||||
|
||||
Deletes an associated push notification configuration for a task. Requires the server to have `AgentCard.capabilities.pushNotifications: true`.
|
||||
|
||||
- **Request `params` type**: [`DeleteTaskPushNotificationConfigParams`](#781-deletetaskpushnotificationconfigparams-object-taskspushnotificationconfigdelete)
|
||||
- **Response `result` type (on success)**: [`null`]
|
||||
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`PushNotificationNotSupportedError`](#82-a2a-specific-errors), [`TaskNotFoundError`](#82-a2a-specific-errors)).
|
||||
|
||||
#### 7.8.1. `DeleteTaskPushNotificationConfigParams` Object (`tasks/pushNotificationConfig/delete`)
|
||||
|
||||
A object for deleting an associated push notification configuration for a task.
|
||||
|
||||
```ts { .no-copy }
|
||||
--8<-- "types/src/types.ts:DeleteTaskPushNotificationConfigParams"
|
||||
```
|
||||
|
||||
| Field Name | Type | Required | Description |
|
||||
| :--------- | :-------------------- | :------- | :------------------------- |
|
||||
| `id` | `string` | Yes | The ID of the task. |
|
||||
| `pushNotificationConfigId` | `string` | Yes | Push notification configuration id |
|
||||
| `metadata` | `Record<string, any>` | No | Request-specific metadata. |
|
||||
|
||||
### 7.9. `tasks/resubscribe`
|
||||
|
||||
Allows a client to reconnect to an SSE stream for an ongoing task after a previous connection (from `message/stream` or an earlier `tasks/resubscribe`) was interrupted. Requires the server to have `AgentCard.capabilities.streaming: true`.
|
||||
|
||||
@ -724,7 +782,7 @@ The purpose is to resume receiving _subsequent_ updates. The server's behavior r
|
||||
- Standard HTTP error code (e.g., 4xx, 5xx).
|
||||
- The HTTP body MAY contain a standard `JSONRPCResponse` with an `error` object. Failures can occur if the task is no longer active, doesn't exist, or streaming is not supported/enabled for it.
|
||||
|
||||
### 7.8. `agent/authenticatedExtendedCard`
|
||||
### 7.10. `agent/authenticatedExtendedCard`
|
||||
|
||||
Retrieves a potentially more detailed version of the Agent Card after the client has authenticated. This endpoint is available only if `AgentCard.supportsAuthenticatedExtendedCard` is `true`. This is an HTTP GET endpoint, not a JSON-RPC method.
|
||||
|
||||
@ -741,11 +799,11 @@ Retrieves a potentially more detailed version of the Agent Card after the client
|
||||
|
||||
Clients retrieving this authenticated card **SHOULD** replace their cached public Agent Card with the content received from this endpoint for the duration of their authenticated session or until the card's version changes.
|
||||
|
||||
#### 7.8.1. `AuthenticatedExtendedCardParams` Object
|
||||
#### 7.10.1. `AuthenticatedExtendedCardParams` Object
|
||||
|
||||
This endpoint does not use JSON-RPC `params`. Any parameters would be included as HTTP query parameters if needed (though none are defined by the standard).
|
||||
|
||||
#### 7.8.2. `AuthenticatedExtendedCardResponse` Object
|
||||
#### 7.10.2. `AuthenticatedExtendedCardResponse` Object
|
||||
|
||||
The successful response body is a JSON object conforming to the `AgentCard` interface.
|
||||
|
||||
|
||||
@ -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/protobuf/empty.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
@ -17,12 +18,12 @@ option java_package = "com.google.a2a.v1";
|
||||
// A2AService defines the gRPC version of the A2A protocol. This has a slightly
|
||||
// different shape than the JSONRPC version to better conform to AIP-127,
|
||||
// where appropriate. The nouns are AgentCard, Message, Task and
|
||||
// TaskPushNotification.
|
||||
// TaskPushNotificationConfig.
|
||||
// - Messages are not a standard resource so there is no get/delete/update/list
|
||||
// interface, only a send and stream custom methods.
|
||||
// - Tasks have a get interface and custom cancel and subscribe methods.
|
||||
// - TaskPushNotification are a resource whose parent is a task. They have get,
|
||||
// list and create methods.
|
||||
// - TaskPushNotificationConfig are a resource whose parent is a task.
|
||||
// They have get, list and create methods.
|
||||
// - AgentCard is a static resource with only a get method.
|
||||
// fields are not present as they don't comply with AIP rules, and the
|
||||
// optional history_length on the get task method is not present as it also
|
||||
@ -72,27 +73,27 @@ service A2AService {
|
||||
}
|
||||
|
||||
// Set a push notification config for a task.
|
||||
rpc CreateTaskPushNotification(CreateTaskPushNotificationRequest)
|
||||
rpc CreateTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest)
|
||||
returns (TaskPushNotificationConfig) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/{parent=task/*/pushNotifications}"
|
||||
post: "/v1/{parent=task/*/pushNotificationConfigs}"
|
||||
body: "config"
|
||||
};
|
||||
option (google.api.method_signature) = "parent,config";
|
||||
}
|
||||
// Get a push notification config for a task.
|
||||
rpc GetTaskPushNotification(GetTaskPushNotificationRequest)
|
||||
rpc GetTaskPushNotificationConfig(GetTaskPushNotificationConfigRequest)
|
||||
returns (TaskPushNotificationConfig) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/{name=tasks/*/pushNotifications/*}"
|
||||
get: "/v1/{name=tasks/*/pushNotificationConfigs/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// Get a list of push notifications configured for a task.
|
||||
rpc ListTaskPushNotification(ListTaskPushNotificationRequest)
|
||||
returns (ListTaskPushNotificationResponse) {
|
||||
rpc ListTaskPushNotificationConfig(ListTaskPushNotificationConfigRequest)
|
||||
returns (ListTaskPushNotificationConfigResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/{parent=tasks/*}/pushNotifications"
|
||||
get: "/v1/{parent=tasks/*}/pushNotificationConfigs"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
@ -102,6 +103,14 @@ service A2AService {
|
||||
get: "/v1/card"
|
||||
};
|
||||
}
|
||||
// Delete a push notification config for a task.
|
||||
rpc DeleteTaskPushNotificationConfig(DeleteTaskPushNotificationConfigRequest)
|
||||
returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1/{name=tasks/*/pushNotificationConfig/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
}
|
||||
|
||||
///////// Data Model ////////////
|
||||
@ -413,7 +422,7 @@ message AgentSkill {
|
||||
}
|
||||
|
||||
message TaskPushNotificationConfig {
|
||||
// name=tasks/{id}/pushNotifications/{id}
|
||||
// name=tasks/{id}/pushNotificationConfigs/{id}
|
||||
string name = 1;
|
||||
PushNotificationConfig push_notification_config = 2;
|
||||
}
|
||||
@ -553,12 +562,17 @@ message CancelTaskRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message GetTaskPushNotificationRequest {
|
||||
// name=tasks/{id}/pushNotifications/{push_id}
|
||||
message GetTaskPushNotificationConfigRequest {
|
||||
// name=tasks/{id}/pushNotificationConfigs/{push_id}
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message CreateTaskPushNotificationRequest {
|
||||
message DeleteTaskPushNotificationConfigRequest {
|
||||
// name=tasks/{id}/pushNotificationConfigs/{push_id}
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message CreateTaskPushNotificationConfigRequest {
|
||||
// The task resource for this config.
|
||||
// Format: tasks/{id}
|
||||
string parent = 1 [
|
||||
@ -575,7 +589,7 @@ message TaskSubscriptionRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message ListTaskPushNotificationRequest {
|
||||
message ListTaskPushNotificationConfigRequest {
|
||||
// parent=tasks/{id}
|
||||
string parent = 1;
|
||||
// For AIP-158 these fields are present. Usually not used/needed.
|
||||
@ -583,10 +597,11 @@ message ListTaskPushNotificationRequest {
|
||||
// If unspecified, all configs will be returned.
|
||||
int32 page_size = 2;
|
||||
|
||||
// A page token, received from a previous `ListTaskPushNotificationRequest
|
||||
// call. Provide this to retrieve the subsequent page.
|
||||
// A page token received from a previous
|
||||
// ListTaskPushNotificationConfigRequest call.
|
||||
// Provide this to retrieve the subsequent page.
|
||||
// When paginating, all other parameters provided to
|
||||
// `ListTaskPushNotificationRequest` must match the call that provided
|
||||
// `ListTaskPushNotificationConfigRequest` must match the call that provided
|
||||
// the page token.
|
||||
string page_token = 3;
|
||||
}
|
||||
@ -622,7 +637,7 @@ message StreamResponse {
|
||||
}
|
||||
}
|
||||
|
||||
message ListTaskPushNotificationResponse {
|
||||
message ListTaskPushNotificationConfigResponse {
|
||||
repeated TaskPushNotificationConfig configs = 1;
|
||||
// A token, which can be sent as `page_token` to retrieve the next page.
|
||||
// If this field is omitted, there are no subsequent pages.
|
||||
|
||||
@ -60,6 +60,12 @@
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/TaskResubscriptionRequest"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/ListTaskPushNotificationConfigRequest"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/DeleteTaskPushNotificationConfigRequest"
|
||||
}
|
||||
],
|
||||
"description": "A2A supported request types"
|
||||
@ -526,6 +532,99 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"DeleteTaskPushNotificationConfigParams": {
|
||||
"description": "Parameters for removing pushNotificationConfiguration associated with a Task",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "Task id.",
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"additionalProperties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"pushNotificationConfigId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"pushNotificationConfigId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"DeleteTaskPushNotificationConfigRequest": {
|
||||
"description": "JSON-RPC request model for the 'tasks/pushNotificationConfig/delete' method.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "An identifier established by the Client that MUST contain a String, Number.\nNumbers SHOULD NOT contain fractional parts.",
|
||||
"type": [
|
||||
"string",
|
||||
"integer"
|
||||
]
|
||||
},
|
||||
"jsonrpc": {
|
||||
"const": "2.0",
|
||||
"description": "Specifies the version of the JSON-RPC protocol. MUST be exactly \"2.0\".",
|
||||
"type": "string"
|
||||
},
|
||||
"method": {
|
||||
"const": "tasks/pushNotificationConfig/delete",
|
||||
"description": "A String containing the name of the method to be invoked.",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/DeleteTaskPushNotificationConfigParams",
|
||||
"description": "A Structured value that holds the parameter values to be used during the invocation of the method."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"jsonrpc",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"DeleteTaskPushNotificationConfigResponse": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/JSONRPCErrorResponse"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/DeleteTaskPushNotificationConfigSuccessResponse"
|
||||
}
|
||||
],
|
||||
"description": "JSON-RPC response for the 'tasks/pushNotificationConfig/delete' method."
|
||||
},
|
||||
"DeleteTaskPushNotificationConfigSuccessResponse": {
|
||||
"description": "JSON-RPC success response model for the 'tasks/pushNotificationConfig/delete' method.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "An identifier established by the Client that MUST contain a String, Number.\nNumbers SHOULD NOT contain fractional parts.",
|
||||
"type": [
|
||||
"string",
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"jsonrpc": {
|
||||
"const": "2.0",
|
||||
"description": "Specifies the version of the JSON-RPC protocol. MUST be exactly \"2.0\".",
|
||||
"type": "string"
|
||||
},
|
||||
"result": {
|
||||
"description": "The result object on success.",
|
||||
"type": "null"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"jsonrpc",
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FileBase": {
|
||||
"description": "Represents the base entity for FileParts",
|
||||
"properties": {
|
||||
@ -613,6 +712,26 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GetTaskPushNotificationConfigParams": {
|
||||
"description": "Parameters for fetching a pushNotificationConfiguration associated with a Task",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "Task id.",
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"additionalProperties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"pushNotificationConfigId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"GetTaskPushNotificationConfigRequest": {
|
||||
"description": "JSON-RPC request model for the 'tasks/pushNotificationConfig/get' method.",
|
||||
"properties": {
|
||||
@ -634,8 +753,15 @@
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/TaskIdParams",
|
||||
"description": "A Structured value that holds the parameter values to be used during the invocation of the method."
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TaskIdParams"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/GetTaskPushNotificationConfigParams"
|
||||
}
|
||||
],
|
||||
"description": "A Structured value that holds the parameter values to be used during the invocation of the method.\nTaskIdParams type is deprecated for this method"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@ -1115,6 +1241,98 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ListTaskPushNotificationConfigParams": {
|
||||
"description": "Parameters for getting list of pushNotificationConfigurations associated with a Task",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "Task id.",
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"additionalProperties": {},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ListTaskPushNotificationConfigRequest": {
|
||||
"description": "JSON-RPC request model for the 'tasks/pushNotificationConfig/list' method.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "An identifier established by the Client that MUST contain a String, Number.\nNumbers SHOULD NOT contain fractional parts.",
|
||||
"type": [
|
||||
"string",
|
||||
"integer"
|
||||
]
|
||||
},
|
||||
"jsonrpc": {
|
||||
"const": "2.0",
|
||||
"description": "Specifies the version of the JSON-RPC protocol. MUST be exactly \"2.0\".",
|
||||
"type": "string"
|
||||
},
|
||||
"method": {
|
||||
"const": "tasks/pushNotificationConfig/list",
|
||||
"description": "A String containing the name of the method to be invoked.",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/ListTaskPushNotificationConfigParams",
|
||||
"description": "A Structured value that holds the parameter values to be used during the invocation of the method."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"jsonrpc",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ListTaskPushNotificationConfigResponse": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/JSONRPCErrorResponse"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/ListTaskPushNotificationConfigSuccessResponse"
|
||||
}
|
||||
],
|
||||
"description": "JSON-RPC response for the 'tasks/pushNotificationConfig/list' method."
|
||||
},
|
||||
"ListTaskPushNotificationConfigSuccessResponse": {
|
||||
"description": "JSON-RPC success response model for the 'tasks/pushNotificationConfig/list' method.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "An identifier established by the Client that MUST contain a String, Number.\nNumbers SHOULD NOT contain fractional parts.",
|
||||
"type": [
|
||||
"string",
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"jsonrpc": {
|
||||
"const": "2.0",
|
||||
"description": "Specifies the version of the JSON-RPC protocol. MUST be exactly \"2.0\".",
|
||||
"type": "string"
|
||||
},
|
||||
"result": {
|
||||
"description": "The result object on success.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/TaskPushNotificationConfig"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"jsonrpc",
|
||||
"result"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"Message": {
|
||||
"description": "Represents a single message exchanged between user and agent.",
|
||||
"properties": {
|
||||
|
||||
21
types/package-lock.json
generated
21
types/package-lock.json
generated
@ -9,6 +9,10 @@
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"typescript-json-schema": "^0.65.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.5.3",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support": {
|
||||
@ -329,6 +333,22 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
|
||||
"integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
@ -395,7 +415,6 @@
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
|
||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"generate": "./node_modules/.bin/typescript-json-schema tsconfig.json \"*\" --defaultNumberType integer --required > ../specification/json/a2a.json"
|
||||
"generate": "./node_modules/.bin/typescript-json-schema tsconfig.json \"*\" --defaultNumberType integer --required > ../specification/json/a2a.json",
|
||||
"prettier": "prettier src/types.ts --write"
|
||||
},
|
||||
"author": "",
|
||||
"description": "A2A Types",
|
||||
@ -11,6 +12,7 @@
|
||||
"typescript-json-schema": "^0.65.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.5.3",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -233,6 +233,25 @@ export interface TaskQueryParams extends TaskIdParams {
|
||||
}
|
||||
// --8<-- [end:TaskQueryParams]
|
||||
|
||||
// --8<-- [start:GetTaskPushNotificationConfigParams]
|
||||
/** Parameters for fetching a pushNotificationConfiguration associated with a Task */
|
||||
export interface GetTaskPushNotificationConfigParams extends TaskIdParams {
|
||||
pushNotificationConfigId?: string;
|
||||
}
|
||||
// --8<-- [end:GetTaskPushNotificationConfigParams]
|
||||
|
||||
// --8<-- [start:ListTaskPushNotificationConfigParams]
|
||||
/** Parameters for getting list of pushNotificationConfigurations associated with a Task */
|
||||
export interface ListTaskPushNotificationConfigParams extends TaskIdParams {}
|
||||
// --8<-- [end:ListTaskPushNotificationConfigParams]
|
||||
|
||||
// --8<-- [start:DeleteTaskPushNotificationConfigParams]
|
||||
/** Parameters for removing pushNotificationConfiguration associated with a Task */
|
||||
export interface DeleteTaskPushNotificationConfigParams extends TaskIdParams {
|
||||
pushNotificationConfigId: string;
|
||||
}
|
||||
// --8<-- [end:DeleteTaskPushNotificationConfigParams]
|
||||
|
||||
// --8<-- [start:MessageSendConfiguration]
|
||||
/**Configuration for the send message request. */
|
||||
export interface MessageSendConfiguration {
|
||||
@ -869,8 +888,10 @@ export interface GetTaskPushNotificationConfigRequest extends JSONRPCRequest {
|
||||
id: number | string;
|
||||
/** A String containing the name of the method to be invoked. */
|
||||
method: "tasks/pushNotificationConfig/get";
|
||||
/** A Structured value that holds the parameter values to be used during the invocation of the method. */
|
||||
params: TaskIdParams;
|
||||
/** A Structured value that holds the parameter values to be used during the invocation of the method.
|
||||
* TaskIdParams type is deprecated for this method
|
||||
*/
|
||||
params: GetTaskPushNotificationConfigParams | TaskIdParams;
|
||||
}
|
||||
// --8<-- [end:GetTaskPushNotificationConfigRequest]
|
||||
|
||||
@ -907,6 +928,73 @@ export interface TaskResubscriptionRequest extends JSONRPCRequest {
|
||||
}
|
||||
// --8<-- [end:TaskResubscriptionRequest]
|
||||
|
||||
// --8<-- [start:ListTaskPushNotificationConfigRequest]
|
||||
/**
|
||||
* JSON-RPC request model for the 'tasks/pushNotificationConfig/list' method.
|
||||
*/
|
||||
export interface ListTaskPushNotificationConfigRequest extends JSONRPCRequest {
|
||||
id: number | string;
|
||||
/** A String containing the name of the method to be invoked. */
|
||||
method: "tasks/pushNotificationConfig/list";
|
||||
/** A Structured value that holds the parameter values to be used during the invocation of the method. */
|
||||
params: ListTaskPushNotificationConfigParams;
|
||||
}
|
||||
// --8<-- [end:ListTaskPushNotificationConfigRequest]
|
||||
|
||||
// --8<-- [start:ListTaskPushNotificationConfigSuccessResponse]
|
||||
/**
|
||||
* JSON-RPC success response model for the 'tasks/pushNotificationConfig/list' method.
|
||||
*/
|
||||
export interface ListTaskPushNotificationConfigSuccessResponse
|
||||
extends JSONRPCSuccessResponse {
|
||||
/** The result object on success. */
|
||||
result: TaskPushNotificationConfig[];
|
||||
}
|
||||
// --8<-- [end:ListTaskPushNotificationConfigSuccessResponse]
|
||||
|
||||
// --8<-- [start:ListTaskPushNotificationConfigResponse]
|
||||
/**
|
||||
* JSON-RPC response for the 'tasks/pushNotificationConfig/list' method.
|
||||
*/
|
||||
export type ListTaskPushNotificationConfigResponse =
|
||||
| ListTaskPushNotificationConfigSuccessResponse
|
||||
| JSONRPCErrorResponse;
|
||||
// --8<-- [end:ListTaskPushNotificationConfigResponse]
|
||||
|
||||
// --8<-- [start:DeleteTaskPushNotificationConfigRequest]
|
||||
/**
|
||||
* JSON-RPC request model for the 'tasks/pushNotificationConfig/delete' method.
|
||||
*/
|
||||
export interface DeleteTaskPushNotificationConfigRequest
|
||||
extends JSONRPCRequest {
|
||||
id: number | string;
|
||||
/** A String containing the name of the method to be invoked. */
|
||||
method: "tasks/pushNotificationConfig/delete";
|
||||
/** A Structured value that holds the parameter values to be used during the invocation of the method. */
|
||||
params: DeleteTaskPushNotificationConfigParams;
|
||||
}
|
||||
// --8<-- [end:DeleteTaskPushNotificationConfigRequest]
|
||||
|
||||
// --8<-- [start:DeleteTaskPushNotificationConfigSuccessResponse]
|
||||
/**
|
||||
* JSON-RPC success response model for the 'tasks/pushNotificationConfig/delete' method.
|
||||
*/
|
||||
export interface DeleteTaskPushNotificationConfigSuccessResponse
|
||||
extends JSONRPCSuccessResponse {
|
||||
/** The result object on success. */
|
||||
result: null;
|
||||
}
|
||||
// --8<-- [end:DeleteTaskPushNotificationConfigSuccessResponse]
|
||||
|
||||
// --8<-- [start:DeleteTaskPushNotificationConfigResponse]
|
||||
/**
|
||||
* JSON-RPC response for the 'tasks/pushNotificationConfig/delete' method.
|
||||
*/
|
||||
export type DeleteTaskPushNotificationConfigResponse =
|
||||
| DeleteTaskPushNotificationConfigSuccessResponse
|
||||
| JSONRPCErrorResponse;
|
||||
// --8<-- [end:DeleteTaskPushNotificationConfigResponse]
|
||||
|
||||
// --8<-- [start:A2ARequest]
|
||||
/**
|
||||
* A2A supported request types
|
||||
@ -918,7 +1006,9 @@ export type A2ARequest =
|
||||
| CancelTaskRequest
|
||||
| SetTaskPushNotificationConfigRequest
|
||||
| GetTaskPushNotificationConfigRequest
|
||||
| TaskResubscriptionRequest;
|
||||
| TaskResubscriptionRequest
|
||||
| ListTaskPushNotificationConfigRequest
|
||||
| DeleteTaskPushNotificationConfigRequest;
|
||||
// --8<-- [end:A2ARequest]
|
||||
|
||||
// --8<-- [start:JSONParseError]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user