@a2a-js/sdk 0.2.4 → 0.3.0

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
@@ -81,12 +94,12 @@ const movieAgentCard: AgentCard = {
81
94
  import {
82
95
  InMemoryTaskStore,
83
96
  TaskStore,
84
- A2AExpressApp,
85
97
  AgentExecutor,
86
98
  RequestContext,
87
99
  ExecutionEventBus,
88
100
  DefaultRequestHandler,
89
101
  } from "@a2a-js/sdk/server";
102
+ import { A2AExpressApp } from "@a2a-js/sdk/server/express";
90
103
 
91
104
  // 1. Define your agent's logic as a AgentExecutor
92
105
  class MyAgentExecutor implements AgentExecutor {
@@ -182,7 +195,7 @@ class MyAgentExecutor implements AgentExecutor {
182
195
  artifact: {
183
196
  artifactId: "artifact-1",
184
197
  name: "artifact-1",
185
- parts: [{ text: `Task ${context.task.id} completed.` }],
198
+ parts: [{ kind: "text", text: `Task ${taskId} completed.` }],
186
199
  },
187
200
  append: false, // Each emission is a complete file snapshot
188
201
  lastChunk: true, // True for this file artifact
@@ -24,21 +24,25 @@ __export(client_exports, {
24
24
  module.exports = __toCommonJS(client_exports);
25
25
 
26
26
  // src/client/client.ts
27
- var A2AClient = class {
27
+ var A2AClient = class _A2AClient {
28
28
  agentBaseUrl;
29
+ agentCardPath;
29
30
  agentCardPromise;
31
+ static DEFAULT_AGENT_CARD_PATH = ".well-known/agent.json";
30
32
  requestIdCounter = 1;
31
33
  serviceEndpointUrl;
32
34
  // To be populated from AgentCard after fetching
33
35
  /**
34
36
  * Constructs an A2AClient instance.
35
37
  * It initiates fetching the agent card from the provided agent baseUrl.
36
- * The Agent Card is expected at `${agentBaseUrl}/.well-known/agent.json`.
38
+ * The Agent Card is fetched from a path relative to the agentBaseUrl, which defaults to '.well-known/agent.json'.
37
39
  * The `url` field from the Agent Card will be used as the RPC service endpoint.
38
- * @param agentBaseUrl The base URL of the A2A agent (e.g., https://agent.example.com).
40
+ * @param agentBaseUrl The base URL of the A2A agent (e.g., https://agent.example.com)
41
+ * @param agentCardPath path to the agent card, defaults to .well-known/agent.json
39
42
  */
40
- constructor(agentBaseUrl) {
43
+ constructor(agentBaseUrl, agentCardPath = _A2AClient.DEFAULT_AGENT_CARD_PATH) {
41
44
  this.agentBaseUrl = agentBaseUrl.replace(/\/$/, "");
45
+ this.agentCardPath = agentCardPath.replace(/^\//, "");
42
46
  this.agentCardPromise = this._fetchAndCacheAgentCard();
43
47
  }
44
48
  /**
@@ -47,7 +51,7 @@ var A2AClient = class {
47
51
  * @returns A Promise that resolves to the AgentCard.
48
52
  */
49
53
  async _fetchAndCacheAgentCard() {
50
- const agentCardUrl = `${this.agentBaseUrl}/.well-known/agent.json`;
54
+ const agentCardUrl = `${this.agentBaseUrl}/${this.agentCardPath}`;
51
55
  try {
52
56
  const response = await fetch(agentCardUrl, {
53
57
  headers: { "Accept": "application/json" }
@@ -71,13 +75,13 @@ var A2AClient = class {
71
75
  * If an `agentBaseUrl` is provided, it fetches the card from that specific URL.
72
76
  * Otherwise, it returns the card fetched and cached during client construction.
73
77
  * @param agentBaseUrl Optional. The base URL of the agent to fetch the card from.
78
+ * @param agentCardPath path to the agent card, defaults to .well-known/agent.json
74
79
  * If provided, this will fetch a new card, not use the cached one from the constructor's URL.
75
80
  * @returns A Promise that resolves to the AgentCard.
76
81
  */
77
- async getAgentCard(agentBaseUrl) {
82
+ async getAgentCard(agentBaseUrl, agentCardPath = _A2AClient.DEFAULT_AGENT_CARD_PATH) {
78
83
  if (agentBaseUrl) {
79
- const specificAgentBaseUrl = agentBaseUrl.replace(/\/$/, "");
80
- const agentCardUrl = `${specificAgentBaseUrl}/.well-known/agent.json`;
84
+ const agentCardUrl = `${agentBaseUrl.replace(/\/$/, "")}/${agentCardPath.replace(/^\//, "")}`;
81
85
  const response = await fetch(agentCardUrl, {
82
86
  headers: { "Accept": "application/json" }
83
87
  });
@@ -133,7 +137,7 @@ var A2AClient = class {
133
137
  errorBodyText = await httpResponse.text();
134
138
  const errorJson = JSON.parse(errorBodyText);
135
139
  if (!errorJson.jsonrpc && errorJson.error) {
136
- throw new Error(`RPC error for ${method}: ${errorJson.error.message} (Code: ${errorJson.error.code}, HTTP Status: ${httpResponse.status}) Data: ${JSON.stringify(errorJson.error.data)}`);
140
+ throw new Error(`RPC error for ${method}: ${errorJson.error.message} (Code: ${errorJson.error.code}, HTTP Status: ${httpResponse.status}) Data: ${JSON.stringify(errorJson.error.data || {})}`);
137
141
  } else if (!errorJson.jsonrpc) {
138
142
  throw new Error(`HTTP error for ${method}! Status: ${httpResponse.status} ${httpResponse.statusText}. Response: ${errorBodyText}`);
139
143
  }
@@ -371,7 +375,7 @@ var A2AClient = class {
371
375
  }
372
376
  if (this.isErrorResponse(a2aStreamResponse)) {
373
377
  const err = a2aStreamResponse.error;
374
- throw new Error(`SSE event contained an error: ${err.message} (Code: ${err.code}) Data: ${JSON.stringify(err.data)}`);
378
+ throw new Error(`SSE event contained an error: ${err.message} (Code: ${err.code}) Data: ${JSON.stringify(err.data || {})}`);
375
379
  }
376
380
  if (!("result" in a2aStreamResponse) || typeof a2aStreamResponse.result === "undefined") {
377
381
  throw new Error(`SSE event JSON-RPC response is missing 'result' field. Data: ${jsonData}`);
@@ -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
  /**
@@ -6,17 +6,20 @@ type A2AStreamEventData = Message | Task | TaskStatusUpdateEvent | TaskArtifactU
6
6
  */
7
7
  declare class A2AClient {
8
8
  private agentBaseUrl;
9
+ private agentCardPath;
9
10
  private agentCardPromise;
11
+ private static readonly DEFAULT_AGENT_CARD_PATH;
10
12
  private requestIdCounter;
11
13
  private serviceEndpointUrl?;
12
14
  /**
13
15
  * Constructs an A2AClient instance.
14
16
  * It initiates fetching the agent card from the provided agent baseUrl.
15
- * The Agent Card is expected at `${agentBaseUrl}/.well-known/agent.json`.
17
+ * The Agent Card is fetched from a path relative to the agentBaseUrl, which defaults to '.well-known/agent.json'.
16
18
  * The `url` field from the Agent Card will be used as the RPC service endpoint.
17
- * @param agentBaseUrl The base URL of the A2A agent (e.g., https://agent.example.com).
19
+ * @param agentBaseUrl The base URL of the A2A agent (e.g., https://agent.example.com)
20
+ * @param agentCardPath path to the agent card, defaults to .well-known/agent.json
18
21
  */
19
- constructor(agentBaseUrl: string);
22
+ constructor(agentBaseUrl: string, agentCardPath?: string);
20
23
  /**
21
24
  * Fetches the Agent Card from the agent's well-known URI and caches its service endpoint URL.
22
25
  * This method is called by the constructor.
@@ -28,10 +31,11 @@ declare class A2AClient {
28
31
  * If an `agentBaseUrl` is provided, it fetches the card from that specific URL.
29
32
  * Otherwise, it returns the card fetched and cached during client construction.
30
33
  * @param agentBaseUrl Optional. The base URL of the agent to fetch the card from.
34
+ * @param agentCardPath path to the agent card, defaults to .well-known/agent.json
31
35
  * If provided, this will fetch a new card, not use the cached one from the constructor's URL.
32
36
  * @returns A Promise that resolves to the AgentCard.
33
37
  */
34
- getAgentCard(agentBaseUrl?: string): Promise<AgentCard>;
38
+ getAgentCard(agentBaseUrl?: string, agentCardPath?: string): Promise<AgentCard>;
35
39
  /**
36
40
  * Gets the RPC service endpoint URL. Ensures the agent card has been fetched first.
37
41
  * @returns A Promise that resolves to the service endpoint URL string.
@@ -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
  /**
@@ -6,17 +6,20 @@ type A2AStreamEventData = Message | Task | TaskStatusUpdateEvent | TaskArtifactU
6
6
  */
7
7
  declare class A2AClient {
8
8
  private agentBaseUrl;
9
+ private agentCardPath;
9
10
  private agentCardPromise;
11
+ private static readonly DEFAULT_AGENT_CARD_PATH;
10
12
  private requestIdCounter;
11
13
  private serviceEndpointUrl?;
12
14
  /**
13
15
  * Constructs an A2AClient instance.
14
16
  * It initiates fetching the agent card from the provided agent baseUrl.
15
- * The Agent Card is expected at `${agentBaseUrl}/.well-known/agent.json`.
17
+ * The Agent Card is fetched from a path relative to the agentBaseUrl, which defaults to '.well-known/agent.json'.
16
18
  * The `url` field from the Agent Card will be used as the RPC service endpoint.
17
- * @param agentBaseUrl The base URL of the A2A agent (e.g., https://agent.example.com).
19
+ * @param agentBaseUrl The base URL of the A2A agent (e.g., https://agent.example.com)
20
+ * @param agentCardPath path to the agent card, defaults to .well-known/agent.json
18
21
  */
19
- constructor(agentBaseUrl: string);
22
+ constructor(agentBaseUrl: string, agentCardPath?: string);
20
23
  /**
21
24
  * Fetches the Agent Card from the agent's well-known URI and caches its service endpoint URL.
22
25
  * This method is called by the constructor.
@@ -28,10 +31,11 @@ declare class A2AClient {
28
31
  * If an `agentBaseUrl` is provided, it fetches the card from that specific URL.
29
32
  * Otherwise, it returns the card fetched and cached during client construction.
30
33
  * @param agentBaseUrl Optional. The base URL of the agent to fetch the card from.
34
+ * @param agentCardPath path to the agent card, defaults to .well-known/agent.json
31
35
  * If provided, this will fetch a new card, not use the cached one from the constructor's URL.
32
36
  * @returns A Promise that resolves to the AgentCard.
33
37
  */
34
- getAgentCard(agentBaseUrl?: string): Promise<AgentCard>;
38
+ getAgentCard(agentBaseUrl?: string, agentCardPath?: string): Promise<AgentCard>;
35
39
  /**
36
40
  * Gets the RPC service endpoint URL. Ensures the agent card has been fetched first.
37
41
  * @returns A Promise that resolves to the service endpoint URL string.
@@ -1,19 +1,23 @@
1
1
  // src/client/client.ts
2
- var A2AClient = class {
2
+ var A2AClient = class _A2AClient {
3
3
  agentBaseUrl;
4
+ agentCardPath;
4
5
  agentCardPromise;
6
+ static DEFAULT_AGENT_CARD_PATH = ".well-known/agent.json";
5
7
  requestIdCounter = 1;
6
8
  serviceEndpointUrl;
7
9
  // To be populated from AgentCard after fetching
8
10
  /**
9
11
  * Constructs an A2AClient instance.
10
12
  * It initiates fetching the agent card from the provided agent baseUrl.
11
- * The Agent Card is expected at `${agentBaseUrl}/.well-known/agent.json`.
13
+ * The Agent Card is fetched from a path relative to the agentBaseUrl, which defaults to '.well-known/agent.json'.
12
14
  * The `url` field from the Agent Card will be used as the RPC service endpoint.
13
- * @param agentBaseUrl The base URL of the A2A agent (e.g., https://agent.example.com).
15
+ * @param agentBaseUrl The base URL of the A2A agent (e.g., https://agent.example.com)
16
+ * @param agentCardPath path to the agent card, defaults to .well-known/agent.json
14
17
  */
15
- constructor(agentBaseUrl) {
18
+ constructor(agentBaseUrl, agentCardPath = _A2AClient.DEFAULT_AGENT_CARD_PATH) {
16
19
  this.agentBaseUrl = agentBaseUrl.replace(/\/$/, "");
20
+ this.agentCardPath = agentCardPath.replace(/^\//, "");
17
21
  this.agentCardPromise = this._fetchAndCacheAgentCard();
18
22
  }
19
23
  /**
@@ -22,7 +26,7 @@ var A2AClient = class {
22
26
  * @returns A Promise that resolves to the AgentCard.
23
27
  */
24
28
  async _fetchAndCacheAgentCard() {
25
- const agentCardUrl = `${this.agentBaseUrl}/.well-known/agent.json`;
29
+ const agentCardUrl = `${this.agentBaseUrl}/${this.agentCardPath}`;
26
30
  try {
27
31
  const response = await fetch(agentCardUrl, {
28
32
  headers: { "Accept": "application/json" }
@@ -46,13 +50,13 @@ var A2AClient = class {
46
50
  * If an `agentBaseUrl` is provided, it fetches the card from that specific URL.
47
51
  * Otherwise, it returns the card fetched and cached during client construction.
48
52
  * @param agentBaseUrl Optional. The base URL of the agent to fetch the card from.
53
+ * @param agentCardPath path to the agent card, defaults to .well-known/agent.json
49
54
  * If provided, this will fetch a new card, not use the cached one from the constructor's URL.
50
55
  * @returns A Promise that resolves to the AgentCard.
51
56
  */
52
- async getAgentCard(agentBaseUrl) {
57
+ async getAgentCard(agentBaseUrl, agentCardPath = _A2AClient.DEFAULT_AGENT_CARD_PATH) {
53
58
  if (agentBaseUrl) {
54
- const specificAgentBaseUrl = agentBaseUrl.replace(/\/$/, "");
55
- const agentCardUrl = `${specificAgentBaseUrl}/.well-known/agent.json`;
59
+ const agentCardUrl = `${agentBaseUrl.replace(/\/$/, "")}/${agentCardPath.replace(/^\//, "")}`;
56
60
  const response = await fetch(agentCardUrl, {
57
61
  headers: { "Accept": "application/json" }
58
62
  });
@@ -108,7 +112,7 @@ var A2AClient = class {
108
112
  errorBodyText = await httpResponse.text();
109
113
  const errorJson = JSON.parse(errorBodyText);
110
114
  if (!errorJson.jsonrpc && errorJson.error) {
111
- throw new Error(`RPC error for ${method}: ${errorJson.error.message} (Code: ${errorJson.error.code}, HTTP Status: ${httpResponse.status}) Data: ${JSON.stringify(errorJson.error.data)}`);
115
+ throw new Error(`RPC error for ${method}: ${errorJson.error.message} (Code: ${errorJson.error.code}, HTTP Status: ${httpResponse.status}) Data: ${JSON.stringify(errorJson.error.data || {})}`);
112
116
  } else if (!errorJson.jsonrpc) {
113
117
  throw new Error(`HTTP error for ${method}! Status: ${httpResponse.status} ${httpResponse.statusText}. Response: ${errorBodyText}`);
114
118
  }
@@ -346,7 +350,7 @@ var A2AClient = class {
346
350
  }
347
351
  if (this.isErrorResponse(a2aStreamResponse)) {
348
352
  const err = a2aStreamResponse.error;
349
- throw new Error(`SSE event contained an error: ${err.message} (Code: ${err.code}) Data: ${JSON.stringify(err.data)}`);
353
+ throw new Error(`SSE event contained an error: ${err.message} (Code: ${err.code}) Data: ${JSON.stringify(err.data || {})}`);
350
354
  }
351
355
  if (!("result" in a2aStreamResponse) || typeof a2aStreamResponse.result === "undefined") {
352
356
  throw new Error(`SSE event JSON-RPC response is missing 'result' field. Data: ${jsonData}`);
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 };