@a2a-js/sdk 0.2.5 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,12 +21,25 @@ You can install the A2A SDK using either `npm`.
21
21
  npm install @a2a-js/sdk
22
22
  ```
23
23
 
24
+ ### For Server Usage
25
+
26
+ If you plan to use the A2A server functionality (A2AExpressApp), you'll also need to install Express as it's a peer dependency:
27
+
28
+ ```bash
29
+ npm install express
30
+ ```
31
+
24
32
  You can also find JavaScript samples [here](https://github.com/google-a2a/a2a-samples/tree/main/samples/js).
25
33
 
26
34
  ## A2A Server
27
35
 
28
36
  This directory contains a TypeScript server implementation for the Agent-to-Agent (A2A) communication protocol, built using Express.js.
29
37
 
38
+ **Note:** Express is a peer dependency for server functionality. Make sure to install it separately:
39
+ ```bash
40
+ npm install express
41
+ ```
42
+
30
43
  ### 1. Define Agent Card
31
44
 
32
45
  ```typescript
@@ -42,6 +55,7 @@ const movieAgentCard: AgentCard = {
42
55
  organization: "A2A Agents",
43
56
  url: "https://example.com/a2a-agents", // Added provider URL
44
57
  },
58
+ protocolVersion: "0.3.0", // A2A protocol this agent supports.
45
59
  version: "0.0.2", // Incremented version
46
60
  capabilities: {
47
61
  streaming: true, // Supports streaming
@@ -81,12 +95,12 @@ const movieAgentCard: AgentCard = {
81
95
  import {
82
96
  InMemoryTaskStore,
83
97
  TaskStore,
84
- A2AExpressApp,
85
98
  AgentExecutor,
86
99
  RequestContext,
87
100
  ExecutionEventBus,
88
101
  DefaultRequestHandler,
89
102
  } from "@a2a-js/sdk/server";
103
+ import { A2AExpressApp } from "@a2a-js/sdk/server/express";
90
104
 
91
105
  // 1. Define your agent's logic as a AgentExecutor
92
106
  class MyAgentExecutor implements AgentExecutor {
@@ -0,0 +1,17 @@
1
+ import { ac as AgentCard, w as MessageSendParams, B as Message, aw as Task, aO as TaskStatusUpdateEvent, aQ as TaskArtifactUpdateEvent, V as TaskQueryParams, X as TaskIdParams, Z as TaskPushNotificationConfig, a1 as GetTaskPushNotificationConfigParams, a5 as ListTaskPushNotificationConfigParams, a7 as DeleteTaskPushNotificationConfigParams } from './types-DNKcmF0f.js';
2
+
3
+ interface A2ARequestHandler {
4
+ getAgentCard(): Promise<AgentCard>;
5
+ getAuthenticatedExtendedAgentCard(): Promise<AgentCard>;
6
+ sendMessage(params: MessageSendParams): Promise<Message | Task>;
7
+ sendMessageStream(params: MessageSendParams): AsyncGenerator<Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent, void, undefined>;
8
+ getTask(params: TaskQueryParams): Promise<Task>;
9
+ cancelTask(params: TaskIdParams): Promise<Task>;
10
+ setTaskPushNotificationConfig(params: TaskPushNotificationConfig): Promise<TaskPushNotificationConfig>;
11
+ getTaskPushNotificationConfig(params: TaskIdParams | GetTaskPushNotificationConfigParams): Promise<TaskPushNotificationConfig>;
12
+ listTaskPushNotificationConfigs(params: ListTaskPushNotificationConfigParams): Promise<TaskPushNotificationConfig[]>;
13
+ deleteTaskPushNotificationConfig(params: DeleteTaskPushNotificationConfigParams): Promise<void>;
14
+ resubscribe(params: TaskIdParams): AsyncGenerator<Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent, void, undefined>;
15
+ }
16
+
17
+ export type { A2ARequestHandler as A };
@@ -0,0 +1,17 @@
1
+ import { ac as AgentCard, w as MessageSendParams, B as Message, aw as Task, aO as TaskStatusUpdateEvent, aQ as TaskArtifactUpdateEvent, V as TaskQueryParams, X as TaskIdParams, Z as TaskPushNotificationConfig, a1 as GetTaskPushNotificationConfigParams, a5 as ListTaskPushNotificationConfigParams, a7 as DeleteTaskPushNotificationConfigParams } from './types-DNKcmF0f.cjs';
2
+
3
+ interface A2ARequestHandler {
4
+ getAgentCard(): Promise<AgentCard>;
5
+ getAuthenticatedExtendedAgentCard(): Promise<AgentCard>;
6
+ sendMessage(params: MessageSendParams): Promise<Message | Task>;
7
+ sendMessageStream(params: MessageSendParams): AsyncGenerator<Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent, void, undefined>;
8
+ getTask(params: TaskQueryParams): Promise<Task>;
9
+ cancelTask(params: TaskIdParams): Promise<Task>;
10
+ setTaskPushNotificationConfig(params: TaskPushNotificationConfig): Promise<TaskPushNotificationConfig>;
11
+ getTaskPushNotificationConfig(params: TaskIdParams | GetTaskPushNotificationConfigParams): Promise<TaskPushNotificationConfig>;
12
+ listTaskPushNotificationConfigs(params: ListTaskPushNotificationConfigParams): Promise<TaskPushNotificationConfig[]>;
13
+ deleteTaskPushNotificationConfig(params: DeleteTaskPushNotificationConfigParams): Promise<void>;
14
+ resubscribe(params: TaskIdParams): AsyncGenerator<Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent, void, undefined>;
15
+ }
16
+
17
+ export type { A2ARequestHandler as A };
@@ -0,0 +1,207 @@
1
+ // src/server/error.ts
2
+ var A2AError = class _A2AError extends Error {
3
+ code;
4
+ data;
5
+ taskId;
6
+ // Optional task ID context
7
+ constructor(code, message, data, taskId) {
8
+ super(message);
9
+ this.name = "A2AError";
10
+ this.code = code;
11
+ this.data = data;
12
+ this.taskId = taskId;
13
+ }
14
+ /**
15
+ * Formats the error into a standard JSON-RPC error object structure.
16
+ */
17
+ toJSONRPCError() {
18
+ const errorObject = {
19
+ code: this.code,
20
+ message: this.message
21
+ };
22
+ if (this.data !== void 0) {
23
+ errorObject.data = this.data;
24
+ }
25
+ return errorObject;
26
+ }
27
+ // Static factory methods for common errors
28
+ static parseError(message, data) {
29
+ return new _A2AError(-32700, message, data);
30
+ }
31
+ static invalidRequest(message, data) {
32
+ return new _A2AError(-32600, message, data);
33
+ }
34
+ static methodNotFound(method) {
35
+ return new _A2AError(
36
+ -32601,
37
+ `Method not found: ${method}`
38
+ );
39
+ }
40
+ static invalidParams(message, data) {
41
+ return new _A2AError(-32602, message, data);
42
+ }
43
+ static internalError(message, data) {
44
+ return new _A2AError(-32603, message, data);
45
+ }
46
+ static taskNotFound(taskId) {
47
+ return new _A2AError(
48
+ -32001,
49
+ `Task not found: ${taskId}`,
50
+ void 0,
51
+ taskId
52
+ );
53
+ }
54
+ static taskNotCancelable(taskId) {
55
+ return new _A2AError(
56
+ -32002,
57
+ `Task not cancelable: ${taskId}`,
58
+ void 0,
59
+ taskId
60
+ );
61
+ }
62
+ static pushNotificationNotSupported() {
63
+ return new _A2AError(
64
+ -32003,
65
+ "Push Notification is not supported"
66
+ );
67
+ }
68
+ static unsupportedOperation(operation) {
69
+ return new _A2AError(
70
+ -32004,
71
+ `Unsupported operation: ${operation}`
72
+ );
73
+ }
74
+ static authenticatedExtendedCardNotConfigured() {
75
+ return new _A2AError(
76
+ -32007,
77
+ `Extended card not configured.`
78
+ );
79
+ }
80
+ };
81
+
82
+ // src/server/transports/jsonrpc_transport_handler.ts
83
+ var JsonRpcTransportHandler = class {
84
+ requestHandler;
85
+ constructor(requestHandler) {
86
+ this.requestHandler = requestHandler;
87
+ }
88
+ /**
89
+ * Handles an incoming JSON-RPC request.
90
+ * For streaming methods, it returns an AsyncGenerator of JSONRPCResult.
91
+ * For non-streaming methods, it returns a Promise of a single JSONRPCMessage (Result or ErrorResponse).
92
+ */
93
+ async handle(requestBody) {
94
+ let rpcRequest;
95
+ try {
96
+ if (typeof requestBody === "string") {
97
+ rpcRequest = JSON.parse(requestBody);
98
+ } else if (typeof requestBody === "object" && requestBody !== null) {
99
+ rpcRequest = requestBody;
100
+ } else {
101
+ throw A2AError.parseError("Invalid request body type.");
102
+ }
103
+ if (rpcRequest.jsonrpc !== "2.0" || !rpcRequest.method || typeof rpcRequest.method !== "string") {
104
+ throw A2AError.invalidRequest(
105
+ "Invalid JSON-RPC request structure."
106
+ );
107
+ }
108
+ } catch (error) {
109
+ const a2aError = error instanceof A2AError ? error : A2AError.parseError(error.message || "Failed to parse JSON request.");
110
+ return {
111
+ jsonrpc: "2.0",
112
+ id: typeof rpcRequest?.id !== "undefined" ? rpcRequest.id : null,
113
+ error: a2aError.toJSONRPCError()
114
+ };
115
+ }
116
+ const { method, id: requestId = null } = rpcRequest;
117
+ try {
118
+ if (method === "agent/getAuthenticatedExtendedCard") {
119
+ const result = await this.requestHandler.getAuthenticatedExtendedAgentCard();
120
+ return {
121
+ jsonrpc: "2.0",
122
+ id: requestId,
123
+ result
124
+ };
125
+ }
126
+ if (!rpcRequest.params) {
127
+ throw A2AError.invalidParams(`'params' is required for '${method}'`);
128
+ }
129
+ if (method === "message/stream" || method === "tasks/resubscribe") {
130
+ const params = rpcRequest.params;
131
+ const agentCard = await this.requestHandler.getAgentCard();
132
+ if (!agentCard.capabilities.streaming) {
133
+ throw A2AError.unsupportedOperation(`Method ${method} requires streaming capability.`);
134
+ }
135
+ const agentEventStream = method === "message/stream" ? this.requestHandler.sendMessageStream(params) : this.requestHandler.resubscribe(params);
136
+ return async function* jsonRpcEventStream() {
137
+ try {
138
+ for await (const event of agentEventStream) {
139
+ yield {
140
+ jsonrpc: "2.0",
141
+ id: requestId,
142
+ // Use the original request ID for all streamed responses
143
+ result: event
144
+ };
145
+ }
146
+ } catch (streamError) {
147
+ console.error(`Error in agent event stream for ${method} (request ${requestId}):`, streamError);
148
+ throw streamError;
149
+ }
150
+ }();
151
+ } else {
152
+ let result;
153
+ switch (method) {
154
+ case "message/send":
155
+ result = await this.requestHandler.sendMessage(rpcRequest.params);
156
+ break;
157
+ case "tasks/get":
158
+ result = await this.requestHandler.getTask(rpcRequest.params);
159
+ break;
160
+ case "tasks/cancel":
161
+ result = await this.requestHandler.cancelTask(rpcRequest.params);
162
+ break;
163
+ case "tasks/pushNotificationConfig/set":
164
+ result = await this.requestHandler.setTaskPushNotificationConfig(
165
+ rpcRequest.params
166
+ );
167
+ break;
168
+ case "tasks/pushNotificationConfig/get":
169
+ result = await this.requestHandler.getTaskPushNotificationConfig(
170
+ rpcRequest.params
171
+ );
172
+ break;
173
+ case "tasks/pushNotificationConfig/delete":
174
+ await this.requestHandler.deleteTaskPushNotificationConfig(
175
+ rpcRequest.params
176
+ );
177
+ result = null;
178
+ break;
179
+ case "tasks/pushNotificationConfig/list":
180
+ result = await this.requestHandler.listTaskPushNotificationConfigs(
181
+ rpcRequest.params
182
+ );
183
+ break;
184
+ default:
185
+ throw A2AError.methodNotFound(method);
186
+ }
187
+ return {
188
+ jsonrpc: "2.0",
189
+ id: requestId,
190
+ result
191
+ };
192
+ }
193
+ } catch (error) {
194
+ const a2aError = error instanceof A2AError ? error : A2AError.internalError(error.message || "An unexpected error occurred.");
195
+ return {
196
+ jsonrpc: "2.0",
197
+ id: requestId,
198
+ error: a2aError.toJSONRPCError()
199
+ };
200
+ }
201
+ }
202
+ };
203
+
204
+ export {
205
+ A2AError,
206
+ JsonRpcTransportHandler
207
+ };
@@ -1,4 +1,4 @@
1
- import { A as AgentCard, M as MessageSendParams, S as SendMessageResponse, a as Message, T as Task, b as TaskStatusUpdateEvent, c as TaskArtifactUpdateEvent, d as TaskPushNotificationConfig, e as SetTaskPushNotificationConfigResponse, f as TaskIdParams, G as GetTaskPushNotificationConfigResponse, g as TaskQueryParams, h as GetTaskResponse, C as CancelTaskResponse, J as JSONRPCResponse, i as JSONRPCErrorResponse } from '../types-CcBgkR2G.cjs';
1
+ import { ac as AgentCard, w as MessageSendParams, S as SendMessageResponse, B as Message, aw as Task, aO as TaskStatusUpdateEvent, aQ as TaskArtifactUpdateEvent, Z as TaskPushNotificationConfig, b as SetTaskPushNotificationConfigResponse, X as TaskIdParams, c as GetTaskPushNotificationConfigResponse, V as TaskQueryParams, G as GetTaskResponse, C as CancelTaskResponse, i as JSONRPCResponse, J as JSONRPCErrorResponse } from '../types-DNKcmF0f.cjs';
2
2
 
3
3
  type A2AStreamEventData = Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { A as AgentCard, M as MessageSendParams, S as SendMessageResponse, a as Message, T as Task, b as TaskStatusUpdateEvent, c as TaskArtifactUpdateEvent, d as TaskPushNotificationConfig, e as SetTaskPushNotificationConfigResponse, f as TaskIdParams, G as GetTaskPushNotificationConfigResponse, g as TaskQueryParams, h as GetTaskResponse, C as CancelTaskResponse, J as JSONRPCResponse, i as JSONRPCErrorResponse } from '../types-CcBgkR2G.js';
1
+ import { ac as AgentCard, w as MessageSendParams, S as SendMessageResponse, B as Message, aw as Task, aO as TaskStatusUpdateEvent, aQ as TaskArtifactUpdateEvent, Z as TaskPushNotificationConfig, b as SetTaskPushNotificationConfigResponse, X as TaskIdParams, c as GetTaskPushNotificationConfigResponse, V as TaskQueryParams, G as GetTaskResponse, C as CancelTaskResponse, i as JSONRPCResponse, J as JSONRPCErrorResponse } from '../types-DNKcmF0f.js';
2
2
 
3
3
  type A2AStreamEventData = Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
4
4
  /**
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { S as SendMessageResponse, k as SendStreamingMessageResponse, h as GetTaskResponse, C as CancelTaskResponse, e as SetTaskPushNotificationConfigResponse, G as GetTaskPushNotificationConfigResponse, i as JSONRPCErrorResponse } from './types-CcBgkR2G.cjs';
2
- export { l as A2AError, m as A2ARequest, a0 as APIKeySecurityScheme, a1 as AgentCapabilities, a3 as AgentCapabilities1, A as AgentCard, a2 as AgentExtension, a4 as AgentProvider, ae as AgentProvider1, ad as AgentSkill, af as Artifact, ay as Artifact1, a8 as AuthorizationCodeOAuthFlow, ag as AuthorizationCodeOAuthFlow1, V as CancelTaskRequest, ah as CancelTaskSuccessResponse, a9 as ClientCredentialsOAuthFlow, al as ClientCredentialsOAuthFlow1, x as ContentTypeNotSupportedError, N as DataPart, am as FileBase, H as FilePart, K as FileWithBytes, L as FileWithUri, Y as GetTaskPushNotificationConfigRequest, an as GetTaskPushNotificationConfigSuccessResponse, R as GetTaskRequest, ap as GetTaskSuccessResponse, a5 as HTTPAuthSecurityScheme, aa as ImplicitOAuthFlow, ar as ImplicitOAuthFlow1, t as InternalError, y as InvalidAgentResponseError, s as InvalidParamsError, I as InvalidRequestError, q as JSONParseError, j as JSONRPCError, as as JSONRPCMessage, at as JSONRPCRequest, J as JSONRPCResponse, aB as JSONRPCSuccessResponse, a as Message, ai as Message1, ak as Message2, B as MessageSendConfiguration, aC as MessageSendConfiguration1, M as MessageSendParams, Q as MessageSendParams1, aD as MessageSendParams2, r as MethodNotFoundError, p as MySchema, a6 as OAuth2SecurityScheme, a7 as OAuthFlows, aE as OAuthFlows1, ac as OpenIdConnectSecurityScheme, P as Part, aF as PartBase, ab as PasswordOAuthFlow, aG as PasswordOAuthFlow1, E as PushNotificationAuthenticationInfo, D as PushNotificationConfig, X as PushNotificationConfig1, aH as PushNotificationConfig2, w as PushNotificationNotSupportedError, n as SecurityScheme, aI as SecuritySchemeBase, z as SendMessageRequest, au as SendMessageSuccessResponse, O as SendStreamingMessageRequest, aw as SendStreamingMessageSuccessResponse, W as SetTaskPushNotificationConfigRequest, az as SetTaskPushNotificationConfigSuccessResponse, T as Task, aq as Task1, av as Task2, c as TaskArtifactUpdateEvent, f as TaskIdParams, Z as TaskIdParams1, $ as TaskIdParams2, aJ as TaskIdParams3, v as TaskNotCancelableError, u as TaskNotFoundError, d as TaskPushNotificationConfig, ao as TaskPushNotificationConfig1, aA as TaskPushNotificationConfig2, aK as TaskPushNotificationConfig3, g as TaskQueryParams, aL as TaskQueryParams1, _ as TaskResubscriptionRequest, o as TaskState, aj as TaskStatus, ax as TaskStatus1, aM as TaskStatus2, b as TaskStatusUpdateEvent, F as TextPart, U as UnsupportedOperationError } from './types-CcBgkR2G.cjs';
1
+ import { S as SendMessageResponse, a as SendStreamingMessageResponse, G as GetTaskResponse, C as CancelTaskResponse, b as SetTaskPushNotificationConfigResponse, c as GetTaskPushNotificationConfigResponse, L as ListTaskPushNotificationConfigSuccessResponse, D as DeleteTaskPushNotificationConfigSuccessResponse, d as GetAuthenticatedExtendedCardSuccessResponse, J as JSONRPCErrorResponse } from './types-DNKcmF0f.cjs';
2
+ export { A as A2AError, e as A2ARequest, a9 as APIKeySecurityScheme, aa as AgentCapabilities, ae as AgentCapabilities1, ac as AgentCard, aD as AgentCard1, ap as AgentCardSignature, ab as AgentExtension, ad as AgentInterface, af as AgentProvider, ar as AgentProvider1, aq as AgentSkill, as as Artifact, aR as Artifact1, u as AuthenticatedExtendedCardNotConfiguredError, aj as AuthorizationCodeOAuthFlow, at as AuthorizationCodeOAuthFlow1, W as CancelTaskRequest, av as CancelTaskSuccessResponse, ak as ClientCredentialsOAuthFlow, aA as ClientCredentialsOAuthFlow1, s as ContentTypeNotSupportedError, N as DataPart, a7 as DeleteTaskPushNotificationConfigParams, aB as DeleteTaskPushNotificationConfigParams1, a6 as DeleteTaskPushNotificationConfigRequest, g as DeleteTaskPushNotificationConfigResponse, aC as FileBase, F as FilePart, H as FileWithBytes, K as FileWithUri, a8 as GetAuthenticatedExtendedCardRequest, h as GetAuthenticatedExtendedCardResponse, a1 as GetTaskPushNotificationConfigParams, $ as GetTaskPushNotificationConfigRequest, aE as GetTaskPushNotificationConfigSuccessResponse, R as GetTaskRequest, aG as GetTaskSuccessResponse, ag as HTTPAuthSecurityScheme, al as ImplicitOAuthFlow, aI as ImplicitOAuthFlow1, o as InternalError, t as InvalidAgentResponseError, n as InvalidParamsError, I as InvalidRequestError, l as JSONParseError, au as JSONRPCError, aJ as JSONRPCMessage, aK as JSONRPCRequest, i as JSONRPCResponse, aV as JSONRPCSuccessResponse, a5 as ListTaskPushNotificationConfigParams, aW as ListTaskPushNotificationConfigParams1, a4 as ListTaskPushNotificationConfigRequest, j as ListTaskPushNotificationConfigResponse, B as Message, ax as Message1, az as Message2, x as MessageSendConfiguration, aX as MessageSendConfiguration1, w as MessageSendParams, Q as MessageSendParams1, aY as MessageSendParams2, m as MethodNotFoundError, ao as MutualTLSSecurityScheme, M as MySchema, ah as OAuth2SecurityScheme, ai as OAuthFlows, aZ as OAuthFlows1, an as OpenIdConnectSecurityScheme, P as Part, a_ as PartBase, am as PasswordOAuthFlow, a$ as PasswordOAuthFlow1, z as PushNotificationAuthenticationInfo, b0 as PushNotificationAuthenticationInfo1, y as PushNotificationConfig, _ as PushNotificationConfig1, b1 as PushNotificationConfig2, r as PushNotificationNotSupportedError, f as SecurityScheme, b2 as SecuritySchemeBase, v as SendMessageRequest, aL as SendMessageSuccessResponse, O as SendStreamingMessageRequest, aN as SendStreamingMessageSuccessResponse, Y as SetTaskPushNotificationConfigRequest, aS as SetTaskPushNotificationConfigSuccessResponse, aw as Task, aH as Task1, aM as Task2, aQ as TaskArtifactUpdateEvent, X as TaskIdParams, a0 as TaskIdParams1, a3 as TaskIdParams2, q as TaskNotCancelableError, p as TaskNotFoundError, Z as TaskPushNotificationConfig, aF as TaskPushNotificationConfig1, aT as TaskPushNotificationConfig2, aU as TaskPushNotificationConfig3, V as TaskQueryParams, b3 as TaskQueryParams1, a2 as TaskResubscriptionRequest, T as TaskState, ay as TaskStatus, aP as TaskStatus1, b4 as TaskStatus2, aO as TaskStatusUpdateEvent, E as TextPart, k as TransportProtocol, U as UnsupportedOperationError } from './types-DNKcmF0f.cjs';
3
3
 
4
4
  /**
5
5
  * Represents any valid JSON-RPC response defined in the A2A protocol.
6
6
  */
7
- type A2AResponse = SendMessageResponse | SendStreamingMessageResponse | GetTaskResponse | CancelTaskResponse | SetTaskPushNotificationConfigResponse | GetTaskPushNotificationConfigResponse | JSONRPCErrorResponse;
7
+ type A2AResponse = SendMessageResponse | SendStreamingMessageResponse | GetTaskResponse | CancelTaskResponse | SetTaskPushNotificationConfigResponse | GetTaskPushNotificationConfigResponse | ListTaskPushNotificationConfigSuccessResponse | DeleteTaskPushNotificationConfigSuccessResponse | GetAuthenticatedExtendedCardSuccessResponse | JSONRPCErrorResponse;
8
8
 
9
- export { type A2AResponse, CancelTaskResponse, GetTaskPushNotificationConfigResponse, GetTaskResponse, JSONRPCErrorResponse, SendMessageResponse, SendStreamingMessageResponse, SetTaskPushNotificationConfigResponse };
9
+ export { type A2AResponse, CancelTaskResponse, DeleteTaskPushNotificationConfigSuccessResponse, GetAuthenticatedExtendedCardSuccessResponse, GetTaskPushNotificationConfigResponse, GetTaskResponse, JSONRPCErrorResponse, ListTaskPushNotificationConfigSuccessResponse, SendMessageResponse, SendStreamingMessageResponse, SetTaskPushNotificationConfigResponse };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { S as SendMessageResponse, k as SendStreamingMessageResponse, h as GetTaskResponse, C as CancelTaskResponse, e as SetTaskPushNotificationConfigResponse, G as GetTaskPushNotificationConfigResponse, i as JSONRPCErrorResponse } from './types-CcBgkR2G.js';
2
- export { l as A2AError, m as A2ARequest, a0 as APIKeySecurityScheme, a1 as AgentCapabilities, a3 as AgentCapabilities1, A as AgentCard, a2 as AgentExtension, a4 as AgentProvider, ae as AgentProvider1, ad as AgentSkill, af as Artifact, ay as Artifact1, a8 as AuthorizationCodeOAuthFlow, ag as AuthorizationCodeOAuthFlow1, V as CancelTaskRequest, ah as CancelTaskSuccessResponse, a9 as ClientCredentialsOAuthFlow, al as ClientCredentialsOAuthFlow1, x as ContentTypeNotSupportedError, N as DataPart, am as FileBase, H as FilePart, K as FileWithBytes, L as FileWithUri, Y as GetTaskPushNotificationConfigRequest, an as GetTaskPushNotificationConfigSuccessResponse, R as GetTaskRequest, ap as GetTaskSuccessResponse, a5 as HTTPAuthSecurityScheme, aa as ImplicitOAuthFlow, ar as ImplicitOAuthFlow1, t as InternalError, y as InvalidAgentResponseError, s as InvalidParamsError, I as InvalidRequestError, q as JSONParseError, j as JSONRPCError, as as JSONRPCMessage, at as JSONRPCRequest, J as JSONRPCResponse, aB as JSONRPCSuccessResponse, a as Message, ai as Message1, ak as Message2, B as MessageSendConfiguration, aC as MessageSendConfiguration1, M as MessageSendParams, Q as MessageSendParams1, aD as MessageSendParams2, r as MethodNotFoundError, p as MySchema, a6 as OAuth2SecurityScheme, a7 as OAuthFlows, aE as OAuthFlows1, ac as OpenIdConnectSecurityScheme, P as Part, aF as PartBase, ab as PasswordOAuthFlow, aG as PasswordOAuthFlow1, E as PushNotificationAuthenticationInfo, D as PushNotificationConfig, X as PushNotificationConfig1, aH as PushNotificationConfig2, w as PushNotificationNotSupportedError, n as SecurityScheme, aI as SecuritySchemeBase, z as SendMessageRequest, au as SendMessageSuccessResponse, O as SendStreamingMessageRequest, aw as SendStreamingMessageSuccessResponse, W as SetTaskPushNotificationConfigRequest, az as SetTaskPushNotificationConfigSuccessResponse, T as Task, aq as Task1, av as Task2, c as TaskArtifactUpdateEvent, f as TaskIdParams, Z as TaskIdParams1, $ as TaskIdParams2, aJ as TaskIdParams3, v as TaskNotCancelableError, u as TaskNotFoundError, d as TaskPushNotificationConfig, ao as TaskPushNotificationConfig1, aA as TaskPushNotificationConfig2, aK as TaskPushNotificationConfig3, g as TaskQueryParams, aL as TaskQueryParams1, _ as TaskResubscriptionRequest, o as TaskState, aj as TaskStatus, ax as TaskStatus1, aM as TaskStatus2, b as TaskStatusUpdateEvent, F as TextPart, U as UnsupportedOperationError } from './types-CcBgkR2G.js';
1
+ import { S as SendMessageResponse, a as SendStreamingMessageResponse, G as GetTaskResponse, C as CancelTaskResponse, b as SetTaskPushNotificationConfigResponse, c as GetTaskPushNotificationConfigResponse, L as ListTaskPushNotificationConfigSuccessResponse, D as DeleteTaskPushNotificationConfigSuccessResponse, d as GetAuthenticatedExtendedCardSuccessResponse, J as JSONRPCErrorResponse } from './types-DNKcmF0f.js';
2
+ export { A as A2AError, e as A2ARequest, a9 as APIKeySecurityScheme, aa as AgentCapabilities, ae as AgentCapabilities1, ac as AgentCard, aD as AgentCard1, ap as AgentCardSignature, ab as AgentExtension, ad as AgentInterface, af as AgentProvider, ar as AgentProvider1, aq as AgentSkill, as as Artifact, aR as Artifact1, u as AuthenticatedExtendedCardNotConfiguredError, aj as AuthorizationCodeOAuthFlow, at as AuthorizationCodeOAuthFlow1, W as CancelTaskRequest, av as CancelTaskSuccessResponse, ak as ClientCredentialsOAuthFlow, aA as ClientCredentialsOAuthFlow1, s as ContentTypeNotSupportedError, N as DataPart, a7 as DeleteTaskPushNotificationConfigParams, aB as DeleteTaskPushNotificationConfigParams1, a6 as DeleteTaskPushNotificationConfigRequest, g as DeleteTaskPushNotificationConfigResponse, aC as FileBase, F as FilePart, H as FileWithBytes, K as FileWithUri, a8 as GetAuthenticatedExtendedCardRequest, h as GetAuthenticatedExtendedCardResponse, a1 as GetTaskPushNotificationConfigParams, $ as GetTaskPushNotificationConfigRequest, aE as GetTaskPushNotificationConfigSuccessResponse, R as GetTaskRequest, aG as GetTaskSuccessResponse, ag as HTTPAuthSecurityScheme, al as ImplicitOAuthFlow, aI as ImplicitOAuthFlow1, o as InternalError, t as InvalidAgentResponseError, n as InvalidParamsError, I as InvalidRequestError, l as JSONParseError, au as JSONRPCError, aJ as JSONRPCMessage, aK as JSONRPCRequest, i as JSONRPCResponse, aV as JSONRPCSuccessResponse, a5 as ListTaskPushNotificationConfigParams, aW as ListTaskPushNotificationConfigParams1, a4 as ListTaskPushNotificationConfigRequest, j as ListTaskPushNotificationConfigResponse, B as Message, ax as Message1, az as Message2, x as MessageSendConfiguration, aX as MessageSendConfiguration1, w as MessageSendParams, Q as MessageSendParams1, aY as MessageSendParams2, m as MethodNotFoundError, ao as MutualTLSSecurityScheme, M as MySchema, ah as OAuth2SecurityScheme, ai as OAuthFlows, aZ as OAuthFlows1, an as OpenIdConnectSecurityScheme, P as Part, a_ as PartBase, am as PasswordOAuthFlow, a$ as PasswordOAuthFlow1, z as PushNotificationAuthenticationInfo, b0 as PushNotificationAuthenticationInfo1, y as PushNotificationConfig, _ as PushNotificationConfig1, b1 as PushNotificationConfig2, r as PushNotificationNotSupportedError, f as SecurityScheme, b2 as SecuritySchemeBase, v as SendMessageRequest, aL as SendMessageSuccessResponse, O as SendStreamingMessageRequest, aN as SendStreamingMessageSuccessResponse, Y as SetTaskPushNotificationConfigRequest, aS as SetTaskPushNotificationConfigSuccessResponse, aw as Task, aH as Task1, aM as Task2, aQ as TaskArtifactUpdateEvent, X as TaskIdParams, a0 as TaskIdParams1, a3 as TaskIdParams2, q as TaskNotCancelableError, p as TaskNotFoundError, Z as TaskPushNotificationConfig, aF as TaskPushNotificationConfig1, aT as TaskPushNotificationConfig2, aU as TaskPushNotificationConfig3, V as TaskQueryParams, b3 as TaskQueryParams1, a2 as TaskResubscriptionRequest, T as TaskState, ay as TaskStatus, aP as TaskStatus1, b4 as TaskStatus2, aO as TaskStatusUpdateEvent, E as TextPart, k as TransportProtocol, U as UnsupportedOperationError } from './types-DNKcmF0f.js';
3
3
 
4
4
  /**
5
5
  * Represents any valid JSON-RPC response defined in the A2A protocol.
6
6
  */
7
- type A2AResponse = SendMessageResponse | SendStreamingMessageResponse | GetTaskResponse | CancelTaskResponse | SetTaskPushNotificationConfigResponse | GetTaskPushNotificationConfigResponse | JSONRPCErrorResponse;
7
+ type A2AResponse = SendMessageResponse | SendStreamingMessageResponse | GetTaskResponse | CancelTaskResponse | SetTaskPushNotificationConfigResponse | GetTaskPushNotificationConfigResponse | ListTaskPushNotificationConfigSuccessResponse | DeleteTaskPushNotificationConfigSuccessResponse | GetAuthenticatedExtendedCardSuccessResponse | JSONRPCErrorResponse;
8
8
 
9
- export { type A2AResponse, CancelTaskResponse, GetTaskPushNotificationConfigResponse, GetTaskResponse, JSONRPCErrorResponse, SendMessageResponse, SendStreamingMessageResponse, SetTaskPushNotificationConfigResponse };
9
+ export { type A2AResponse, CancelTaskResponse, DeleteTaskPushNotificationConfigSuccessResponse, GetAuthenticatedExtendedCardSuccessResponse, GetTaskPushNotificationConfigResponse, GetTaskResponse, JSONRPCErrorResponse, ListTaskPushNotificationConfigSuccessResponse, SendMessageResponse, SendStreamingMessageResponse, SetTaskPushNotificationConfigResponse };