@a2a-js/sdk 0.3.10 → 0.3.11

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.
@@ -1,6 +1,6 @@
1
- import { T as TransportFactory, C as ClientConfig, a as TransportProtocolName, b as Client, c as Transport, R as RequestOptions, S as SendMessageResult, A as A2AStreamEventData } from '../core-Ci-lR0jz.cjs';
2
- export { d as A2AClient, e as A2AClientOptions, g as AfterArgs, B as BeforeArgs, f as CallInterceptor, l as ClientCallContext, n as ClientCallContextKey, h as ClientCallInput, i as ClientCallResult, m as ContextUpdate, j as ServiceParameters, k as ServiceParametersUpdate, w as withA2AExtensions } from '../core-Ci-lR0jz.cjs';
3
- import { ae as AgentCard, x as MessageSendParams, $ as TaskPushNotificationConfig, a3 as GetTaskPushNotificationConfigParams, a7 as ListTaskPushNotificationConfigParams, a9 as DeleteTaskPushNotificationConfigParams, X as TaskQueryParams, ay as Task, Z as TaskIdParams, j as JSONRPCResponse } from '../extensions-DvruCIzw.cjs';
1
+ import { T as TransportFactory, C as ClientConfig, a as TransportProtocolName, b as Client, c as Transport, R as RequestOptions, S as SendMessageResult, A as A2AStreamEventData } from '../core-BHroNzI0.cjs';
2
+ export { d as A2AClient, e as A2AClientOptions, f as AfterArgs, B as BeforeArgs, g as CallInterceptor, h as ClientCallContext, i as ClientCallContextKey, j as ClientCallInput, k as ClientCallResult, l as ContextUpdate, m as ServiceParameters, n as ServiceParametersUpdate, w as withA2AExtensions } from '../core-BHroNzI0.cjs';
3
+ import { i as AgentCard, aj as MessageSendParams, aU as TaskPushNotificationConfig, U as GetTaskPushNotificationConfigParams, aa as ListTaskPushNotificationConfigParams, E as DeleteTaskPushNotificationConfigParams, aY as TaskQueryParams, aL as Task, aP as TaskIdParams, a8 as JSONRPCResponse } from '../extensions-APfrw8gz.cjs';
4
4
 
5
5
  interface HttpHeaders {
6
6
  [key: string]: string;
@@ -80,6 +80,10 @@ declare class DefaultAgentCardResolver implements AgentCardResolver {
80
80
  */
81
81
  resolve(baseUrl: string, path?: string): Promise<AgentCard>;
82
82
  private fetchImpl;
83
+ private normalizeAgentCard;
84
+ private isProtoAgentCard;
85
+ private hasProtoSecurity;
86
+ private hasProtoSecuritySchemes;
83
87
  }
84
88
  interface AgentCardResolver {
85
89
  /**
@@ -1,6 +1,6 @@
1
- import { T as TransportFactory, C as ClientConfig, a as TransportProtocolName, b as Client, c as Transport, R as RequestOptions, S as SendMessageResult, A as A2AStreamEventData } from '../core-BAzQJfA2.js';
2
- export { d as A2AClient, e as A2AClientOptions, g as AfterArgs, B as BeforeArgs, f as CallInterceptor, l as ClientCallContext, n as ClientCallContextKey, h as ClientCallInput, i as ClientCallResult, m as ContextUpdate, j as ServiceParameters, k as ServiceParametersUpdate, w as withA2AExtensions } from '../core-BAzQJfA2.js';
3
- import { ae as AgentCard, x as MessageSendParams, $ as TaskPushNotificationConfig, a3 as GetTaskPushNotificationConfigParams, a7 as ListTaskPushNotificationConfigParams, a9 as DeleteTaskPushNotificationConfigParams, X as TaskQueryParams, ay as Task, Z as TaskIdParams, j as JSONRPCResponse } from '../extensions-DvruCIzw.js';
1
+ import { T as TransportFactory, C as ClientConfig, a as TransportProtocolName, b as Client, c as Transport, R as RequestOptions, S as SendMessageResult, A as A2AStreamEventData } from '../core-NwQicv77.js';
2
+ export { d as A2AClient, e as A2AClientOptions, f as AfterArgs, B as BeforeArgs, g as CallInterceptor, h as ClientCallContext, i as ClientCallContextKey, j as ClientCallInput, k as ClientCallResult, l as ContextUpdate, m as ServiceParameters, n as ServiceParametersUpdate, w as withA2AExtensions } from '../core-NwQicv77.js';
3
+ import { i as AgentCard, aj as MessageSendParams, aU as TaskPushNotificationConfig, U as GetTaskPushNotificationConfigParams, aa as ListTaskPushNotificationConfigParams, E as DeleteTaskPushNotificationConfigParams, aY as TaskQueryParams, aL as Task, aP as TaskIdParams, a8 as JSONRPCResponse } from '../extensions-APfrw8gz.js';
4
4
 
5
5
  interface HttpHeaders {
6
6
  [key: string]: string;
@@ -80,6 +80,10 @@ declare class DefaultAgentCardResolver implements AgentCardResolver {
80
80
  */
81
81
  resolve(baseUrl: string, path?: string): Promise<AgentCard>;
82
82
  private fetchImpl;
83
+ private normalizeAgentCard;
84
+ private isProtoAgentCard;
85
+ private hasProtoSecurity;
86
+ private hasProtoSecuritySchemes;
83
87
  }
84
88
  interface AgentCardResolver {
85
89
  /**
@@ -28,7 +28,7 @@ import {
28
28
  Task,
29
29
  TaskPushNotificationConfig,
30
30
  ToProto
31
- } from "../chunk-U3QAVT4H.js";
31
+ } from "../chunk-2TNRJNPO.js";
32
32
  import "../chunk-UHZEIZLS.js";
33
33
 
34
34
  // src/client/transports/json_rpc_transport.ts
@@ -142,8 +142,8 @@ var JsonRpcTransport = class _JsonRpcTransport {
142
142
  }
143
143
  const rpcResponse = await httpResponse.json();
144
144
  if (rpcResponse.id !== requestId) {
145
- console.error(
146
- `CRITICAL: RPC response ID mismatch for method ${method}. Expected ${requestId}, got ${rpcResponse.id}.`
145
+ throw new Error(
146
+ `JSON-RPC response ID mismatch for method ${method}. Expected ${requestId}, got ${rpcResponse.id}.`
147
147
  );
148
148
  }
149
149
  if ("error" in rpcResponse) {
@@ -207,38 +207,31 @@ var JsonRpcTransport = class _JsonRpcTransport {
207
207
  if (!jsonData.trim()) {
208
208
  throw new Error("Attempted to process empty SSE event data.");
209
209
  }
210
+ let a2aStreamResponse;
210
211
  try {
211
- const sseJsonRpcResponse = JSON.parse(jsonData);
212
- const a2aStreamResponse = sseJsonRpcResponse;
213
- if (a2aStreamResponse.id !== originalRequestId) {
214
- console.warn(
215
- `SSE Event's JSON-RPC response ID mismatch. Client request ID: ${originalRequestId}, event response ID: ${a2aStreamResponse.id}.`
216
- );
217
- }
218
- if ("error" in a2aStreamResponse) {
219
- const err = a2aStreamResponse.error;
220
- throw new Error(
221
- `SSE event contained an error: ${err.message} (Code: ${err.code}) Data: ${JSON.stringify(err.data || {})}`,
222
- { cause: _JsonRpcTransport.mapToError(a2aStreamResponse) }
223
- );
224
- }
225
- if (!("result" in a2aStreamResponse) || typeof a2aStreamResponse.result === "undefined") {
226
- throw new Error(`SSE event JSON-RPC response is missing 'result' field. Data: ${jsonData}`);
227
- }
228
- return a2aStreamResponse.result;
212
+ a2aStreamResponse = JSON.parse(jsonData);
229
213
  } catch (e) {
230
- if (e instanceof Error && (e.message.startsWith("SSE event contained an error") || e.message.startsWith("SSE event JSON-RPC response is missing 'result' field"))) {
231
- throw e;
232
- }
233
- console.error(
234
- "Failed to parse SSE event data string or unexpected JSON-RPC structure:",
235
- jsonData,
236
- e
214
+ throw new Error(
215
+ `Failed to parse SSE event data: "${jsonData.substring(0, 100)}...". Original error: ${e instanceof Error && e.message || "Unknown error"}`,
216
+ { cause: e }
237
217
  );
218
+ }
219
+ if (a2aStreamResponse.id !== originalRequestId) {
238
220
  throw new Error(
239
- `Failed to parse SSE event data: "${jsonData.substring(0, 100)}...". Original error: ${e instanceof Error && e.message || "Unknown error"}`
221
+ `JSON-RPC response ID mismatch in SSE event. Expected ${originalRequestId}, got ${a2aStreamResponse.id}.`
222
+ );
223
+ }
224
+ if ("error" in a2aStreamResponse) {
225
+ const err = a2aStreamResponse.error;
226
+ throw new Error(
227
+ `SSE event contained an error: ${err.message} (Code: ${err.code}) Data: ${JSON.stringify(err.data || {})}`,
228
+ { cause: _JsonRpcTransport.mapToError(a2aStreamResponse) }
240
229
  );
241
230
  }
231
+ if (!("result" in a2aStreamResponse) || typeof a2aStreamResponse.result === "undefined") {
232
+ throw new Error(`SSE event JSON-RPC response is missing 'result' field. Data: ${jsonData}`);
233
+ }
234
+ return a2aStreamResponse.result;
242
235
  }
243
236
  static mapToError(response) {
244
237
  switch (response.error.code) {
@@ -729,7 +722,8 @@ var DefaultAgentCardResolver = class {
729
722
  if (!response.ok) {
730
723
  throw new Error(`Failed to fetch Agent Card from ${agentCardUrl}: ${response.status}`);
731
724
  }
732
- return await response.json();
725
+ const rawCard = await response.json();
726
+ return this.normalizeAgentCard(rawCard);
733
727
  }
734
728
  fetchImpl(...args) {
735
729
  if (this.options?.fetchImpl) {
@@ -737,6 +731,54 @@ var DefaultAgentCardResolver = class {
737
731
  }
738
732
  return fetch(...args);
739
733
  }
734
+ /*
735
+ * In the v0.3.0 specification, there was a structural drift between the JSON Schema data model
736
+ * and the Protobuf-based data model for AgentCards.
737
+ * The JSON Schema format uses a `"type"` discriminator (e.g., `{"type": "openIdConnect"}`),
738
+ * while the Protobuf JSON representation uses the `oneof` field name as the discriminator
739
+ * (e.g., `{"openIdConnectSecurityScheme": {...}}`).
740
+ *
741
+ * The A2A SDK internal logic expects the JSON Schema-based format. This fallback detection
742
+ * allows us to parse cards served by endpoints returning the Protobuf JSON structure by
743
+ * identifying the lack of the "type" field in security schemes or the presence of the
744
+ * "schemes" wrapper in security entries, and normalizing it before use.
745
+ */
746
+ normalizeAgentCard(card) {
747
+ if (this.isProtoAgentCard(card)) {
748
+ const parsedProto = AgentCard.fromJSON(card);
749
+ return FromProto.agentCard(parsedProto);
750
+ }
751
+ return card;
752
+ }
753
+ isProtoAgentCard(card) {
754
+ if (!card || typeof card !== "object") return false;
755
+ const c = card;
756
+ if (this.hasProtoSecurity(c.security)) return true;
757
+ if (this.hasProtoSecuritySchemes(c.securitySchemes)) return true;
758
+ if (Array.isArray(c.skills)) {
759
+ return c.skills.some(
760
+ (skill) => skill && typeof skill === "object" && this.hasProtoSecurity(skill.security)
761
+ );
762
+ }
763
+ return false;
764
+ }
765
+ hasProtoSecurity(securityArray) {
766
+ if (Array.isArray(securityArray) && securityArray.length > 0) {
767
+ const first = securityArray[0];
768
+ return first && typeof first === "object" && "schemes" in first;
769
+ }
770
+ return false;
771
+ }
772
+ hasProtoSecuritySchemes(securitySchemes) {
773
+ if (securitySchemes && typeof securitySchemes === "object") {
774
+ const schemes = Object.values(securitySchemes);
775
+ if (schemes.length > 0) {
776
+ const first = schemes[0];
777
+ return first && typeof first === "object" && !("type" in first);
778
+ }
779
+ }
780
+ return false;
781
+ }
740
782
  };
741
783
  var AgentCardResolver = {
742
784
  default: new DefaultAgentCardResolver()
@@ -1349,18 +1391,15 @@ var ClientFactory = class {
1349
1391
  ...additionalInterfaces.map((i) => i.transport)
1350
1392
  ];
1351
1393
  for (const transport of transportsByPreference) {
1352
- if (!urlsPerAgentTransports.has(transport)) {
1353
- continue;
1354
- }
1394
+ const url = urlsPerAgentTransports.get(transport);
1355
1395
  const factory = this.transportsByName.get(transport);
1356
- if (!factory) {
1357
- continue;
1396
+ if (factory && url) {
1397
+ return new Client(
1398
+ await factory.create(url, agentCard),
1399
+ agentCard,
1400
+ this.options.clientConfig
1401
+ );
1358
1402
  }
1359
- return new Client(
1360
- await factory.create(urlsPerAgentTransports.get(transport), agentCard),
1361
- agentCard,
1362
- this.options.clientConfig
1363
- );
1364
1403
  }
1365
1404
  throw new Error(
1366
1405
  "No compatible transport found, available transports: " + [...this.transportsByName.keys()].join()
@@ -1,6 +1,6 @@
1
1
  import * as grpc from '@grpc/grpc-js';
2
- import { c as Transport, R as RequestOptions, S as SendMessageResult, A as A2AStreamEventData, T as TransportFactory, a as TransportProtocolName } from '../../../core-Ci-lR0jz.cjs';
3
- import { ae as AgentCard, x as MessageSendParams, $ as TaskPushNotificationConfig, a3 as GetTaskPushNotificationConfigParams, a7 as ListTaskPushNotificationConfigParams, a9 as DeleteTaskPushNotificationConfigParams, X as TaskQueryParams, ay as Task, Z as TaskIdParams } from '../../../extensions-DvruCIzw.cjs';
2
+ import { c as Transport, R as RequestOptions, S as SendMessageResult, A as A2AStreamEventData, T as TransportFactory, a as TransportProtocolName } from '../../../core-BHroNzI0.cjs';
3
+ import { i as AgentCard, aj as MessageSendParams, aU as TaskPushNotificationConfig, U as GetTaskPushNotificationConfigParams, aa as ListTaskPushNotificationConfigParams, E as DeleteTaskPushNotificationConfigParams, aY as TaskQueryParams, aL as Task, aP as TaskIdParams } from '../../../extensions-APfrw8gz.cjs';
4
4
 
5
5
  interface GrpcTransportOptions {
6
6
  endpoint: string;
@@ -1,6 +1,6 @@
1
1
  import * as grpc from '@grpc/grpc-js';
2
- import { c as Transport, R as RequestOptions, S as SendMessageResult, A as A2AStreamEventData, T as TransportFactory, a as TransportProtocolName } from '../../../core-BAzQJfA2.js';
3
- import { ae as AgentCard, x as MessageSendParams, $ as TaskPushNotificationConfig, a3 as GetTaskPushNotificationConfigParams, a7 as ListTaskPushNotificationConfigParams, a9 as DeleteTaskPushNotificationConfigParams, X as TaskQueryParams, ay as Task, Z as TaskIdParams } from '../../../extensions-DvruCIzw.js';
2
+ import { c as Transport, R as RequestOptions, S as SendMessageResult, A as A2AStreamEventData, T as TransportFactory, a as TransportProtocolName } from '../../../core-NwQicv77.js';
3
+ import { i as AgentCard, aj as MessageSendParams, aU as TaskPushNotificationConfig, U as GetTaskPushNotificationConfigParams, aa as ListTaskPushNotificationConfigParams, E as DeleteTaskPushNotificationConfigParams, aY as TaskQueryParams, aL as Task, aP as TaskIdParams } from '../../../extensions-APfrw8gz.js';
4
4
 
5
5
  interface GrpcTransportOptions {
6
6
  endpoint: string;
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  FromProto,
13
13
  ToProto
14
- } from "../../../chunk-U3QAVT4H.js";
14
+ } from "../../../chunk-2TNRJNPO.js";
15
15
  import "../../../chunk-UHZEIZLS.js";
16
16
 
17
17
  // src/client/transports/grpc/grpc_transport.ts
@@ -1,4 +1,4 @@
1
- import { ae as AgentCard, x as MessageSendParams, S as SendMessageResponse, F as Message, ay as Task, aQ as TaskStatusUpdateEvent, aS as TaskArtifactUpdateEvent, $ as TaskPushNotificationConfig, b as SetTaskPushNotificationConfigResponse, Z as TaskIdParams, c as GetTaskPushNotificationConfigResponse, a7 as ListTaskPushNotificationConfigParams, k as ListTaskPushNotificationConfigResponse, a9 as DeleteTaskPushNotificationConfigParams, h as DeleteTaskPushNotificationConfigResponse, X as TaskQueryParams, G as GetTaskResponse, C as CancelTaskResponse, j as JSONRPCResponse, E as Extensions, a3 as GetTaskPushNotificationConfigParams, z as PushNotificationConfig } from './extensions-DvruCIzw.js';
1
+ import { i as AgentCard, aj as MessageSendParams, S as SendMessageResponse, ae as Message, aL as Task, b3 as TaskStatusUpdateEvent, aO as TaskArtifactUpdateEvent, aU as TaskPushNotificationConfig, b as SetTaskPushNotificationConfigResponse, aP as TaskIdParams, c as GetTaskPushNotificationConfigResponse, aa as ListTaskPushNotificationConfigParams, ad as ListTaskPushNotificationConfigResponse, E as DeleteTaskPushNotificationConfigParams, I as DeleteTaskPushNotificationConfigResponse, aY as TaskQueryParams, G as GetTaskResponse, C as CancelTaskResponse, a8 as JSONRPCResponse, M as Extensions, U as GetTaskPushNotificationConfigParams, az as PushNotificationConfig } from './extensions-APfrw8gz.cjs';
2
2
 
3
3
  type A2AStreamEventData = Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
4
4
  type SendMessageResult = Message | Task;
@@ -413,4 +413,4 @@ declare class Client {
413
413
 
414
414
  type TransportProtocolName = 'JSONRPC' | 'HTTP+JSON' | 'GRPC' | (string & {});
415
415
 
416
- export { type A2AStreamEventData as A, type BeforeArgs as B, type ClientConfig as C, type RequestOptions as R, type SendMessageResult as S, type TransportFactory as T, type TransportProtocolName as a, Client as b, type Transport as c, A2AClient as d, type A2AClientOptions as e, type CallInterceptor as f, type AfterArgs as g, type ClientCallInput as h, type ClientCallResult as i, ServiceParameters as j, type ServiceParametersUpdate as k, ClientCallContext as l, type ContextUpdate as m, ClientCallContextKey as n, withA2AExtensions as w };
416
+ export { type A2AStreamEventData as A, type BeforeArgs as B, type ClientConfig as C, type RequestOptions as R, type SendMessageResult as S, type TransportFactory as T, type TransportProtocolName as a, Client as b, type Transport as c, A2AClient as d, type A2AClientOptions as e, type AfterArgs as f, type CallInterceptor as g, ClientCallContext as h, ClientCallContextKey as i, type ClientCallInput as j, type ClientCallResult as k, type ContextUpdate as l, ServiceParameters as m, type ServiceParametersUpdate as n, withA2AExtensions as w };
@@ -1,4 +1,4 @@
1
- import { ae as AgentCard, x as MessageSendParams, S as SendMessageResponse, F as Message, ay as Task, aQ as TaskStatusUpdateEvent, aS as TaskArtifactUpdateEvent, $ as TaskPushNotificationConfig, b as SetTaskPushNotificationConfigResponse, Z as TaskIdParams, c as GetTaskPushNotificationConfigResponse, a7 as ListTaskPushNotificationConfigParams, k as ListTaskPushNotificationConfigResponse, a9 as DeleteTaskPushNotificationConfigParams, h as DeleteTaskPushNotificationConfigResponse, X as TaskQueryParams, G as GetTaskResponse, C as CancelTaskResponse, j as JSONRPCResponse, E as Extensions, a3 as GetTaskPushNotificationConfigParams, z as PushNotificationConfig } from './extensions-DvruCIzw.cjs';
1
+ import { i as AgentCard, aj as MessageSendParams, S as SendMessageResponse, ae as Message, aL as Task, b3 as TaskStatusUpdateEvent, aO as TaskArtifactUpdateEvent, aU as TaskPushNotificationConfig, b as SetTaskPushNotificationConfigResponse, aP as TaskIdParams, c as GetTaskPushNotificationConfigResponse, aa as ListTaskPushNotificationConfigParams, ad as ListTaskPushNotificationConfigResponse, E as DeleteTaskPushNotificationConfigParams, I as DeleteTaskPushNotificationConfigResponse, aY as TaskQueryParams, G as GetTaskResponse, C as CancelTaskResponse, a8 as JSONRPCResponse, M as Extensions, U as GetTaskPushNotificationConfigParams, az as PushNotificationConfig } from './extensions-APfrw8gz.js';
2
2
 
3
3
  type A2AStreamEventData = Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
4
4
  type SendMessageResult = Message | Task;
@@ -413,4 +413,4 @@ declare class Client {
413
413
 
414
414
  type TransportProtocolName = 'JSONRPC' | 'HTTP+JSON' | 'GRPC' | (string & {});
415
415
 
416
- export { type A2AStreamEventData as A, type BeforeArgs as B, type ClientConfig as C, type RequestOptions as R, type SendMessageResult as S, type TransportFactory as T, type TransportProtocolName as a, Client as b, type Transport as c, A2AClient as d, type A2AClientOptions as e, type CallInterceptor as f, type AfterArgs as g, type ClientCallInput as h, type ClientCallResult as i, ServiceParameters as j, type ServiceParametersUpdate as k, ClientCallContext as l, type ContextUpdate as m, ClientCallContextKey as n, withA2AExtensions as w };
416
+ export { type A2AStreamEventData as A, type BeforeArgs as B, type ClientConfig as C, type RequestOptions as R, type SendMessageResult as S, type TransportFactory as T, type TransportProtocolName as a, Client as b, type Transport as c, A2AClient as d, type A2AClientOptions as e, type AfterArgs as f, type CallInterceptor as g, ClientCallContext as h, ClientCallContextKey as i, type ClientCallInput as j, type ClientCallResult as k, type ContextUpdate as l, ServiceParameters as m, type ServiceParametersUpdate as n, withA2AExtensions as w };
@@ -2586,4 +2586,4 @@ declare const Extensions: {
2586
2586
  toServiceParameter: (value: Extensions) => string;
2587
2587
  };
2588
2588
 
2589
- export { type TaskPushNotificationConfig as $, type A2AError as A, type PushNotificationAuthenticationInfo as B, type CancelTaskResponse as C, type DeleteTaskPushNotificationConfigSuccessResponse as D, Extensions as E, type Message as F, type GetTaskResponse as G, type TextPart as H, type InvalidRequestError as I, type JSONRPCErrorResponse as J, type FilePart as K, type ListTaskPushNotificationConfigSuccessResponse as L, type MySchema as M, type FileWithBytes as N, type FileWithUri as O, type Part as P, type DataPart as Q, type SendStreamingMessageRequest as R, type SendMessageResponse as S, type TaskState as T, type UnsupportedOperationError as U, type MessageSendParams1 as V, type GetTaskRequest as W, type TaskQueryParams as X, type CancelTaskRequest as Y, type TaskIdParams as Z, type SetTaskPushNotificationConfigRequest as _, type SendStreamingMessageResponse as a, type OAuthFlows1 as a$, type PushNotificationConfig1 as a0, type GetTaskPushNotificationConfigRequest as a1, type TaskIdParams1 as a2, type GetTaskPushNotificationConfigParams as a3, type TaskResubscriptionRequest as a4, type TaskIdParams2 as a5, type ListTaskPushNotificationConfigRequest as a6, type ListTaskPushNotificationConfigParams as a7, type DeleteTaskPushNotificationConfigRequest as a8, type DeleteTaskPushNotificationConfigParams as a9, type TaskStatus as aA, type Message2 as aB, type ClientCredentialsOAuthFlow1 as aC, type DeleteTaskPushNotificationConfigParams1 as aD, type FileBase as aE, type AgentCard1 as aF, type GetTaskPushNotificationConfigSuccessResponse as aG, type TaskPushNotificationConfig1 as aH, type GetTaskSuccessResponse as aI, type Task1 as aJ, type ImplicitOAuthFlow1 as aK, type JSONRPCMessage as aL, type JSONRPCRequest as aM, type SendMessageSuccessResponse as aN, type Task2 as aO, type SendStreamingMessageSuccessResponse as aP, type TaskStatusUpdateEvent as aQ, type TaskStatus1 as aR, type TaskArtifactUpdateEvent as aS, type Artifact1 as aT, type SetTaskPushNotificationConfigSuccessResponse as aU, type TaskPushNotificationConfig2 as aV, type TaskPushNotificationConfig3 as aW, type JSONRPCSuccessResponse as aX, type ListTaskPushNotificationConfigParams1 as aY, type MessageSendConfiguration1 as aZ, type MessageSendParams2 as a_, type GetAuthenticatedExtendedCardRequest as aa, type APIKeySecurityScheme as ab, type AgentCapabilities as ac, type AgentExtension as ad, type AgentCard as ae, type AgentInterface as af, type AgentCapabilities1 as ag, type AgentProvider as ah, type HTTPAuthSecurityScheme as ai, type OAuth2SecurityScheme as aj, type OAuthFlows as ak, type AuthorizationCodeOAuthFlow as al, type ClientCredentialsOAuthFlow as am, type ImplicitOAuthFlow as an, type PasswordOAuthFlow as ao, type OpenIdConnectSecurityScheme as ap, type MutualTLSSecurityScheme as aq, type AgentCardSignature as ar, type AgentSkill as as, type AgentProvider1 as at, type Artifact as au, type AuthorizationCodeOAuthFlow1 as av, type JSONRPCError as aw, type CancelTaskSuccessResponse as ax, type Task as ay, type Message1 as az, type SetTaskPushNotificationConfigResponse as b, type PartBase as b0, type PasswordOAuthFlow1 as b1, type PushNotificationAuthenticationInfo1 as b2, type PushNotificationConfig2 as b3, type SecuritySchemeBase as b4, type TaskQueryParams1 as b5, type TaskStatus2 as b6, type GetTaskPushNotificationConfigResponse as c, type GetAuthenticatedExtendedCardSuccessResponse as d, type ExtensionURI as e, type A2ARequest as f, type SecurityScheme as g, type DeleteTaskPushNotificationConfigResponse as h, type GetAuthenticatedExtendedCardResponse as i, type JSONRPCResponse as j, type ListTaskPushNotificationConfigResponse as k, type TransportProtocol as l, type JSONParseError as m, type MethodNotFoundError as n, type InvalidParamsError as o, type InternalError as p, type TaskNotFoundError as q, type TaskNotCancelableError as r, type PushNotificationNotSupportedError as s, type ContentTypeNotSupportedError as t, type InvalidAgentResponseError as u, type AuthenticatedExtendedCardNotConfiguredError as v, type SendMessageRequest as w, type MessageSendParams as x, type MessageSendConfiguration as y, type PushNotificationConfig as z };
2589
+ export { type ImplicitOAuthFlow1 as $, type A2AError as A, type DataPart as B, type CancelTaskResponse as C, type DeleteTaskPushNotificationConfigSuccessResponse as D, type DeleteTaskPushNotificationConfigParams as E, type DeleteTaskPushNotificationConfigParams1 as F, type GetTaskResponse as G, type DeleteTaskPushNotificationConfigRequest as H, type DeleteTaskPushNotificationConfigResponse as I, type JSONRPCErrorResponse as J, type ExtensionURI as K, type ListTaskPushNotificationConfigSuccessResponse as L, Extensions as M, type FileBase as N, type FilePart as O, type FileWithBytes as P, type FileWithUri as Q, type GetAuthenticatedExtendedCardRequest as R, type SendMessageResponse as S, type GetAuthenticatedExtendedCardResponse as T, type GetTaskPushNotificationConfigParams as U, type GetTaskPushNotificationConfigRequest as V, type GetTaskPushNotificationConfigSuccessResponse as W, type GetTaskRequest as X, type GetTaskSuccessResponse as Y, type HTTPAuthSecurityScheme as Z, type ImplicitOAuthFlow as _, type SendStreamingMessageResponse as a, type TaskState as a$, type InternalError as a0, type InvalidAgentResponseError as a1, type InvalidParamsError as a2, type InvalidRequestError as a3, type JSONParseError as a4, type JSONRPCError as a5, type JSONRPCMessage as a6, type JSONRPCRequest as a7, type JSONRPCResponse as a8, type JSONRPCSuccessResponse as a9, type PushNotificationConfig1 as aA, type PushNotificationConfig2 as aB, type PushNotificationNotSupportedError as aC, type SecurityScheme as aD, type SecuritySchemeBase as aE, type SendMessageRequest as aF, type SendMessageSuccessResponse as aG, type SendStreamingMessageRequest as aH, type SendStreamingMessageSuccessResponse as aI, type SetTaskPushNotificationConfigRequest as aJ, type SetTaskPushNotificationConfigSuccessResponse as aK, type Task as aL, type Task1 as aM, type Task2 as aN, type TaskArtifactUpdateEvent as aO, type TaskIdParams as aP, type TaskIdParams1 as aQ, type TaskIdParams2 as aR, type TaskNotCancelableError as aS, type TaskNotFoundError as aT, type TaskPushNotificationConfig as aU, type TaskPushNotificationConfig1 as aV, type TaskPushNotificationConfig2 as aW, type TaskPushNotificationConfig3 as aX, type TaskQueryParams as aY, type TaskQueryParams1 as aZ, type TaskResubscriptionRequest as a_, type ListTaskPushNotificationConfigParams as aa, type ListTaskPushNotificationConfigParams1 as ab, type ListTaskPushNotificationConfigRequest as ac, type ListTaskPushNotificationConfigResponse as ad, type Message as ae, type Message1 as af, type Message2 as ag, type MessageSendConfiguration as ah, type MessageSendConfiguration1 as ai, type MessageSendParams as aj, type MessageSendParams1 as ak, type MessageSendParams2 as al, type MethodNotFoundError as am, type MutualTLSSecurityScheme as an, type MySchema as ao, type OAuth2SecurityScheme as ap, type OAuthFlows as aq, type OAuthFlows1 as ar, type OpenIdConnectSecurityScheme as as, type Part as at, type PartBase as au, type PasswordOAuthFlow as av, type PasswordOAuthFlow1 as aw, type PushNotificationAuthenticationInfo as ax, type PushNotificationAuthenticationInfo1 as ay, type PushNotificationConfig as az, type SetTaskPushNotificationConfigResponse as b, type TaskStatus as b0, type TaskStatus1 as b1, type TaskStatus2 as b2, type TaskStatusUpdateEvent as b3, type TextPart as b4, type TransportProtocol as b5, type UnsupportedOperationError as b6, type GetTaskPushNotificationConfigResponse as c, type GetAuthenticatedExtendedCardSuccessResponse as d, type A2ARequest as e, type APIKeySecurityScheme as f, type AgentCapabilities as g, type AgentCapabilities1 as h, type AgentCard as i, type AgentCard1 as j, type AgentCardSignature as k, type AgentExtension as l, type AgentInterface as m, type AgentProvider as n, type AgentProvider1 as o, type AgentSkill as p, type Artifact as q, type Artifact1 as r, type AuthenticatedExtendedCardNotConfiguredError as s, type AuthorizationCodeOAuthFlow as t, type AuthorizationCodeOAuthFlow1 as u, type CancelTaskRequest as v, type CancelTaskSuccessResponse as w, type ClientCredentialsOAuthFlow as x, type ClientCredentialsOAuthFlow1 as y, type ContentTypeNotSupportedError as z };
@@ -2586,4 +2586,4 @@ declare const Extensions: {
2586
2586
  toServiceParameter: (value: Extensions) => string;
2587
2587
  };
2588
2588
 
2589
- export { type TaskPushNotificationConfig as $, type A2AError as A, type PushNotificationAuthenticationInfo as B, type CancelTaskResponse as C, type DeleteTaskPushNotificationConfigSuccessResponse as D, Extensions as E, type Message as F, type GetTaskResponse as G, type TextPart as H, type InvalidRequestError as I, type JSONRPCErrorResponse as J, type FilePart as K, type ListTaskPushNotificationConfigSuccessResponse as L, type MySchema as M, type FileWithBytes as N, type FileWithUri as O, type Part as P, type DataPart as Q, type SendStreamingMessageRequest as R, type SendMessageResponse as S, type TaskState as T, type UnsupportedOperationError as U, type MessageSendParams1 as V, type GetTaskRequest as W, type TaskQueryParams as X, type CancelTaskRequest as Y, type TaskIdParams as Z, type SetTaskPushNotificationConfigRequest as _, type SendStreamingMessageResponse as a, type OAuthFlows1 as a$, type PushNotificationConfig1 as a0, type GetTaskPushNotificationConfigRequest as a1, type TaskIdParams1 as a2, type GetTaskPushNotificationConfigParams as a3, type TaskResubscriptionRequest as a4, type TaskIdParams2 as a5, type ListTaskPushNotificationConfigRequest as a6, type ListTaskPushNotificationConfigParams as a7, type DeleteTaskPushNotificationConfigRequest as a8, type DeleteTaskPushNotificationConfigParams as a9, type TaskStatus as aA, type Message2 as aB, type ClientCredentialsOAuthFlow1 as aC, type DeleteTaskPushNotificationConfigParams1 as aD, type FileBase as aE, type AgentCard1 as aF, type GetTaskPushNotificationConfigSuccessResponse as aG, type TaskPushNotificationConfig1 as aH, type GetTaskSuccessResponse as aI, type Task1 as aJ, type ImplicitOAuthFlow1 as aK, type JSONRPCMessage as aL, type JSONRPCRequest as aM, type SendMessageSuccessResponse as aN, type Task2 as aO, type SendStreamingMessageSuccessResponse as aP, type TaskStatusUpdateEvent as aQ, type TaskStatus1 as aR, type TaskArtifactUpdateEvent as aS, type Artifact1 as aT, type SetTaskPushNotificationConfigSuccessResponse as aU, type TaskPushNotificationConfig2 as aV, type TaskPushNotificationConfig3 as aW, type JSONRPCSuccessResponse as aX, type ListTaskPushNotificationConfigParams1 as aY, type MessageSendConfiguration1 as aZ, type MessageSendParams2 as a_, type GetAuthenticatedExtendedCardRequest as aa, type APIKeySecurityScheme as ab, type AgentCapabilities as ac, type AgentExtension as ad, type AgentCard as ae, type AgentInterface as af, type AgentCapabilities1 as ag, type AgentProvider as ah, type HTTPAuthSecurityScheme as ai, type OAuth2SecurityScheme as aj, type OAuthFlows as ak, type AuthorizationCodeOAuthFlow as al, type ClientCredentialsOAuthFlow as am, type ImplicitOAuthFlow as an, type PasswordOAuthFlow as ao, type OpenIdConnectSecurityScheme as ap, type MutualTLSSecurityScheme as aq, type AgentCardSignature as ar, type AgentSkill as as, type AgentProvider1 as at, type Artifact as au, type AuthorizationCodeOAuthFlow1 as av, type JSONRPCError as aw, type CancelTaskSuccessResponse as ax, type Task as ay, type Message1 as az, type SetTaskPushNotificationConfigResponse as b, type PartBase as b0, type PasswordOAuthFlow1 as b1, type PushNotificationAuthenticationInfo1 as b2, type PushNotificationConfig2 as b3, type SecuritySchemeBase as b4, type TaskQueryParams1 as b5, type TaskStatus2 as b6, type GetTaskPushNotificationConfigResponse as c, type GetAuthenticatedExtendedCardSuccessResponse as d, type ExtensionURI as e, type A2ARequest as f, type SecurityScheme as g, type DeleteTaskPushNotificationConfigResponse as h, type GetAuthenticatedExtendedCardResponse as i, type JSONRPCResponse as j, type ListTaskPushNotificationConfigResponse as k, type TransportProtocol as l, type JSONParseError as m, type MethodNotFoundError as n, type InvalidParamsError as o, type InternalError as p, type TaskNotFoundError as q, type TaskNotCancelableError as r, type PushNotificationNotSupportedError as s, type ContentTypeNotSupportedError as t, type InvalidAgentResponseError as u, type AuthenticatedExtendedCardNotConfiguredError as v, type SendMessageRequest as w, type MessageSendParams as x, type MessageSendConfiguration as y, type PushNotificationConfig as z };
2589
+ export { type ImplicitOAuthFlow1 as $, type A2AError as A, type DataPart as B, type CancelTaskResponse as C, type DeleteTaskPushNotificationConfigSuccessResponse as D, type DeleteTaskPushNotificationConfigParams as E, type DeleteTaskPushNotificationConfigParams1 as F, type GetTaskResponse as G, type DeleteTaskPushNotificationConfigRequest as H, type DeleteTaskPushNotificationConfigResponse as I, type JSONRPCErrorResponse as J, type ExtensionURI as K, type ListTaskPushNotificationConfigSuccessResponse as L, Extensions as M, type FileBase as N, type FilePart as O, type FileWithBytes as P, type FileWithUri as Q, type GetAuthenticatedExtendedCardRequest as R, type SendMessageResponse as S, type GetAuthenticatedExtendedCardResponse as T, type GetTaskPushNotificationConfigParams as U, type GetTaskPushNotificationConfigRequest as V, type GetTaskPushNotificationConfigSuccessResponse as W, type GetTaskRequest as X, type GetTaskSuccessResponse as Y, type HTTPAuthSecurityScheme as Z, type ImplicitOAuthFlow as _, type SendStreamingMessageResponse as a, type TaskState as a$, type InternalError as a0, type InvalidAgentResponseError as a1, type InvalidParamsError as a2, type InvalidRequestError as a3, type JSONParseError as a4, type JSONRPCError as a5, type JSONRPCMessage as a6, type JSONRPCRequest as a7, type JSONRPCResponse as a8, type JSONRPCSuccessResponse as a9, type PushNotificationConfig1 as aA, type PushNotificationConfig2 as aB, type PushNotificationNotSupportedError as aC, type SecurityScheme as aD, type SecuritySchemeBase as aE, type SendMessageRequest as aF, type SendMessageSuccessResponse as aG, type SendStreamingMessageRequest as aH, type SendStreamingMessageSuccessResponse as aI, type SetTaskPushNotificationConfigRequest as aJ, type SetTaskPushNotificationConfigSuccessResponse as aK, type Task as aL, type Task1 as aM, type Task2 as aN, type TaskArtifactUpdateEvent as aO, type TaskIdParams as aP, type TaskIdParams1 as aQ, type TaskIdParams2 as aR, type TaskNotCancelableError as aS, type TaskNotFoundError as aT, type TaskPushNotificationConfig as aU, type TaskPushNotificationConfig1 as aV, type TaskPushNotificationConfig2 as aW, type TaskPushNotificationConfig3 as aX, type TaskQueryParams as aY, type TaskQueryParams1 as aZ, type TaskResubscriptionRequest as a_, type ListTaskPushNotificationConfigParams as aa, type ListTaskPushNotificationConfigParams1 as ab, type ListTaskPushNotificationConfigRequest as ac, type ListTaskPushNotificationConfigResponse as ad, type Message as ae, type Message1 as af, type Message2 as ag, type MessageSendConfiguration as ah, type MessageSendConfiguration1 as ai, type MessageSendParams as aj, type MessageSendParams1 as ak, type MessageSendParams2 as al, type MethodNotFoundError as am, type MutualTLSSecurityScheme as an, type MySchema as ao, type OAuth2SecurityScheme as ap, type OAuthFlows as aq, type OAuthFlows1 as ar, type OpenIdConnectSecurityScheme as as, type Part as at, type PartBase as au, type PasswordOAuthFlow as av, type PasswordOAuthFlow1 as aw, type PushNotificationAuthenticationInfo as ax, type PushNotificationAuthenticationInfo1 as ay, type PushNotificationConfig as az, type SetTaskPushNotificationConfigResponse as b, type TaskStatus as b0, type TaskStatus1 as b1, type TaskStatus2 as b2, type TaskStatusUpdateEvent as b3, type TextPart as b4, type TransportProtocol as b5, type UnsupportedOperationError as b6, type GetTaskPushNotificationConfigResponse as c, type GetAuthenticatedExtendedCardSuccessResponse as d, type A2ARequest as e, type APIKeySecurityScheme as f, type AgentCapabilities as g, type AgentCapabilities1 as h, type AgentCard as i, type AgentCard1 as j, type AgentCardSignature as k, type AgentExtension as l, type AgentInterface as m, type AgentProvider as n, type AgentProvider1 as o, type AgentSkill as p, type Artifact as q, type Artifact1 as r, type AuthenticatedExtendedCardNotConfiguredError as s, type AuthorizationCodeOAuthFlow as t, type AuthorizationCodeOAuthFlow1 as u, type CancelTaskRequest as v, type CancelTaskSuccessResponse as w, type ClientCredentialsOAuthFlow as x, type ClientCredentialsOAuthFlow1 as y, type ContentTypeNotSupportedError as z };
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
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 './extensions-DvruCIzw.cjs';
2
- export { A as A2AError, f as A2ARequest, ab as APIKeySecurityScheme, ac as AgentCapabilities, ag as AgentCapabilities1, ae as AgentCard, aF as AgentCard1, ar as AgentCardSignature, ad as AgentExtension, af as AgentInterface, ah as AgentProvider, at as AgentProvider1, as as AgentSkill, au as Artifact, aT as Artifact1, v as AuthenticatedExtendedCardNotConfiguredError, al as AuthorizationCodeOAuthFlow, av as AuthorizationCodeOAuthFlow1, Y as CancelTaskRequest, ax as CancelTaskSuccessResponse, am as ClientCredentialsOAuthFlow, aC as ClientCredentialsOAuthFlow1, t as ContentTypeNotSupportedError, Q as DataPart, a9 as DeleteTaskPushNotificationConfigParams, aD as DeleteTaskPushNotificationConfigParams1, a8 as DeleteTaskPushNotificationConfigRequest, h as DeleteTaskPushNotificationConfigResponse, e as ExtensionURI, E as Extensions, aE as FileBase, K as FilePart, N as FileWithBytes, O as FileWithUri, aa as GetAuthenticatedExtendedCardRequest, i as GetAuthenticatedExtendedCardResponse, a3 as GetTaskPushNotificationConfigParams, a1 as GetTaskPushNotificationConfigRequest, aG as GetTaskPushNotificationConfigSuccessResponse, W as GetTaskRequest, aI as GetTaskSuccessResponse, ai as HTTPAuthSecurityScheme, an as ImplicitOAuthFlow, aK as ImplicitOAuthFlow1, p as InternalError, u as InvalidAgentResponseError, o as InvalidParamsError, I as InvalidRequestError, m as JSONParseError, aw as JSONRPCError, aL as JSONRPCMessage, aM as JSONRPCRequest, j as JSONRPCResponse, aX as JSONRPCSuccessResponse, a7 as ListTaskPushNotificationConfigParams, aY as ListTaskPushNotificationConfigParams1, a6 as ListTaskPushNotificationConfigRequest, k as ListTaskPushNotificationConfigResponse, F as Message, az as Message1, aB as Message2, y as MessageSendConfiguration, aZ as MessageSendConfiguration1, x as MessageSendParams, V as MessageSendParams1, a_ as MessageSendParams2, n as MethodNotFoundError, aq as MutualTLSSecurityScheme, M as MySchema, aj as OAuth2SecurityScheme, ak as OAuthFlows, a$ as OAuthFlows1, ap as OpenIdConnectSecurityScheme, P as Part, b0 as PartBase, ao as PasswordOAuthFlow, b1 as PasswordOAuthFlow1, B as PushNotificationAuthenticationInfo, b2 as PushNotificationAuthenticationInfo1, z as PushNotificationConfig, a0 as PushNotificationConfig1, b3 as PushNotificationConfig2, s as PushNotificationNotSupportedError, g as SecurityScheme, b4 as SecuritySchemeBase, w as SendMessageRequest, aN as SendMessageSuccessResponse, R as SendStreamingMessageRequest, aP as SendStreamingMessageSuccessResponse, _ as SetTaskPushNotificationConfigRequest, aU as SetTaskPushNotificationConfigSuccessResponse, ay as Task, aJ as Task1, aO as Task2, aS as TaskArtifactUpdateEvent, Z as TaskIdParams, a2 as TaskIdParams1, a5 as TaskIdParams2, r as TaskNotCancelableError, q as TaskNotFoundError, $ as TaskPushNotificationConfig, aH as TaskPushNotificationConfig1, aV as TaskPushNotificationConfig2, aW as TaskPushNotificationConfig3, X as TaskQueryParams, b5 as TaskQueryParams1, a4 as TaskResubscriptionRequest, T as TaskState, aA as TaskStatus, aR as TaskStatus1, b6 as TaskStatus2, aQ as TaskStatusUpdateEvent, H as TextPart, l as TransportProtocol, U as UnsupportedOperationError } from './extensions-DvruCIzw.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 './extensions-APfrw8gz.cjs';
2
+ export { A as A2AError, e as A2ARequest, f as APIKeySecurityScheme, g as AgentCapabilities, h as AgentCapabilities1, i as AgentCard, j as AgentCard1, k as AgentCardSignature, l as AgentExtension, m as AgentInterface, n as AgentProvider, o as AgentProvider1, p as AgentSkill, q as Artifact, r as Artifact1, s as AuthenticatedExtendedCardNotConfiguredError, t as AuthorizationCodeOAuthFlow, u as AuthorizationCodeOAuthFlow1, v as CancelTaskRequest, w as CancelTaskSuccessResponse, x as ClientCredentialsOAuthFlow, y as ClientCredentialsOAuthFlow1, z as ContentTypeNotSupportedError, B as DataPart, E as DeleteTaskPushNotificationConfigParams, F as DeleteTaskPushNotificationConfigParams1, H as DeleteTaskPushNotificationConfigRequest, I as DeleteTaskPushNotificationConfigResponse, K as ExtensionURI, M as Extensions, N as FileBase, O as FilePart, P as FileWithBytes, Q as FileWithUri, R as GetAuthenticatedExtendedCardRequest, T as GetAuthenticatedExtendedCardResponse, U as GetTaskPushNotificationConfigParams, V as GetTaskPushNotificationConfigRequest, W as GetTaskPushNotificationConfigSuccessResponse, X as GetTaskRequest, Y as GetTaskSuccessResponse, Z as HTTPAuthSecurityScheme, _ as ImplicitOAuthFlow, $ as ImplicitOAuthFlow1, a0 as InternalError, a1 as InvalidAgentResponseError, a2 as InvalidParamsError, a3 as InvalidRequestError, a4 as JSONParseError, a5 as JSONRPCError, a6 as JSONRPCMessage, a7 as JSONRPCRequest, a8 as JSONRPCResponse, a9 as JSONRPCSuccessResponse, aa as ListTaskPushNotificationConfigParams, ab as ListTaskPushNotificationConfigParams1, ac as ListTaskPushNotificationConfigRequest, ad as ListTaskPushNotificationConfigResponse, ae as Message, af as Message1, ag as Message2, ah as MessageSendConfiguration, ai as MessageSendConfiguration1, aj as MessageSendParams, ak as MessageSendParams1, al as MessageSendParams2, am as MethodNotFoundError, an as MutualTLSSecurityScheme, ao as MySchema, ap as OAuth2SecurityScheme, aq as OAuthFlows, ar as OAuthFlows1, as as OpenIdConnectSecurityScheme, at as Part, au as PartBase, av as PasswordOAuthFlow, aw as PasswordOAuthFlow1, ax as PushNotificationAuthenticationInfo, ay as PushNotificationAuthenticationInfo1, az as PushNotificationConfig, aA as PushNotificationConfig1, aB as PushNotificationConfig2, aC as PushNotificationNotSupportedError, aD as SecurityScheme, aE as SecuritySchemeBase, aF as SendMessageRequest, aG as SendMessageSuccessResponse, aH as SendStreamingMessageRequest, aI as SendStreamingMessageSuccessResponse, aJ as SetTaskPushNotificationConfigRequest, aK as SetTaskPushNotificationConfigSuccessResponse, aL as Task, aM as Task1, aN as Task2, aO as TaskArtifactUpdateEvent, aP as TaskIdParams, aQ as TaskIdParams1, aR as TaskIdParams2, aS as TaskNotCancelableError, aT as TaskNotFoundError, aU as TaskPushNotificationConfig, aV as TaskPushNotificationConfig1, aW as TaskPushNotificationConfig2, aX as TaskPushNotificationConfig3, aY as TaskQueryParams, aZ as TaskQueryParams1, a_ as TaskResubscriptionRequest, a$ as TaskState, b0 as TaskStatus, b1 as TaskStatus1, b2 as TaskStatus2, b3 as TaskStatusUpdateEvent, b4 as TextPart, b5 as TransportProtocol, b6 as UnsupportedOperationError } from './extensions-APfrw8gz.cjs';
3
3
 
4
4
  /**
5
5
  * Represents any valid JSON-RPC response defined in the A2A protocol.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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 './extensions-DvruCIzw.js';
2
- export { A as A2AError, f as A2ARequest, ab as APIKeySecurityScheme, ac as AgentCapabilities, ag as AgentCapabilities1, ae as AgentCard, aF as AgentCard1, ar as AgentCardSignature, ad as AgentExtension, af as AgentInterface, ah as AgentProvider, at as AgentProvider1, as as AgentSkill, au as Artifact, aT as Artifact1, v as AuthenticatedExtendedCardNotConfiguredError, al as AuthorizationCodeOAuthFlow, av as AuthorizationCodeOAuthFlow1, Y as CancelTaskRequest, ax as CancelTaskSuccessResponse, am as ClientCredentialsOAuthFlow, aC as ClientCredentialsOAuthFlow1, t as ContentTypeNotSupportedError, Q as DataPart, a9 as DeleteTaskPushNotificationConfigParams, aD as DeleteTaskPushNotificationConfigParams1, a8 as DeleteTaskPushNotificationConfigRequest, h as DeleteTaskPushNotificationConfigResponse, e as ExtensionURI, E as Extensions, aE as FileBase, K as FilePart, N as FileWithBytes, O as FileWithUri, aa as GetAuthenticatedExtendedCardRequest, i as GetAuthenticatedExtendedCardResponse, a3 as GetTaskPushNotificationConfigParams, a1 as GetTaskPushNotificationConfigRequest, aG as GetTaskPushNotificationConfigSuccessResponse, W as GetTaskRequest, aI as GetTaskSuccessResponse, ai as HTTPAuthSecurityScheme, an as ImplicitOAuthFlow, aK as ImplicitOAuthFlow1, p as InternalError, u as InvalidAgentResponseError, o as InvalidParamsError, I as InvalidRequestError, m as JSONParseError, aw as JSONRPCError, aL as JSONRPCMessage, aM as JSONRPCRequest, j as JSONRPCResponse, aX as JSONRPCSuccessResponse, a7 as ListTaskPushNotificationConfigParams, aY as ListTaskPushNotificationConfigParams1, a6 as ListTaskPushNotificationConfigRequest, k as ListTaskPushNotificationConfigResponse, F as Message, az as Message1, aB as Message2, y as MessageSendConfiguration, aZ as MessageSendConfiguration1, x as MessageSendParams, V as MessageSendParams1, a_ as MessageSendParams2, n as MethodNotFoundError, aq as MutualTLSSecurityScheme, M as MySchema, aj as OAuth2SecurityScheme, ak as OAuthFlows, a$ as OAuthFlows1, ap as OpenIdConnectSecurityScheme, P as Part, b0 as PartBase, ao as PasswordOAuthFlow, b1 as PasswordOAuthFlow1, B as PushNotificationAuthenticationInfo, b2 as PushNotificationAuthenticationInfo1, z as PushNotificationConfig, a0 as PushNotificationConfig1, b3 as PushNotificationConfig2, s as PushNotificationNotSupportedError, g as SecurityScheme, b4 as SecuritySchemeBase, w as SendMessageRequest, aN as SendMessageSuccessResponse, R as SendStreamingMessageRequest, aP as SendStreamingMessageSuccessResponse, _ as SetTaskPushNotificationConfigRequest, aU as SetTaskPushNotificationConfigSuccessResponse, ay as Task, aJ as Task1, aO as Task2, aS as TaskArtifactUpdateEvent, Z as TaskIdParams, a2 as TaskIdParams1, a5 as TaskIdParams2, r as TaskNotCancelableError, q as TaskNotFoundError, $ as TaskPushNotificationConfig, aH as TaskPushNotificationConfig1, aV as TaskPushNotificationConfig2, aW as TaskPushNotificationConfig3, X as TaskQueryParams, b5 as TaskQueryParams1, a4 as TaskResubscriptionRequest, T as TaskState, aA as TaskStatus, aR as TaskStatus1, b6 as TaskStatus2, aQ as TaskStatusUpdateEvent, H as TextPart, l as TransportProtocol, U as UnsupportedOperationError } from './extensions-DvruCIzw.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 './extensions-APfrw8gz.js';
2
+ export { A as A2AError, e as A2ARequest, f as APIKeySecurityScheme, g as AgentCapabilities, h as AgentCapabilities1, i as AgentCard, j as AgentCard1, k as AgentCardSignature, l as AgentExtension, m as AgentInterface, n as AgentProvider, o as AgentProvider1, p as AgentSkill, q as Artifact, r as Artifact1, s as AuthenticatedExtendedCardNotConfiguredError, t as AuthorizationCodeOAuthFlow, u as AuthorizationCodeOAuthFlow1, v as CancelTaskRequest, w as CancelTaskSuccessResponse, x as ClientCredentialsOAuthFlow, y as ClientCredentialsOAuthFlow1, z as ContentTypeNotSupportedError, B as DataPart, E as DeleteTaskPushNotificationConfigParams, F as DeleteTaskPushNotificationConfigParams1, H as DeleteTaskPushNotificationConfigRequest, I as DeleteTaskPushNotificationConfigResponse, K as ExtensionURI, M as Extensions, N as FileBase, O as FilePart, P as FileWithBytes, Q as FileWithUri, R as GetAuthenticatedExtendedCardRequest, T as GetAuthenticatedExtendedCardResponse, U as GetTaskPushNotificationConfigParams, V as GetTaskPushNotificationConfigRequest, W as GetTaskPushNotificationConfigSuccessResponse, X as GetTaskRequest, Y as GetTaskSuccessResponse, Z as HTTPAuthSecurityScheme, _ as ImplicitOAuthFlow, $ as ImplicitOAuthFlow1, a0 as InternalError, a1 as InvalidAgentResponseError, a2 as InvalidParamsError, a3 as InvalidRequestError, a4 as JSONParseError, a5 as JSONRPCError, a6 as JSONRPCMessage, a7 as JSONRPCRequest, a8 as JSONRPCResponse, a9 as JSONRPCSuccessResponse, aa as ListTaskPushNotificationConfigParams, ab as ListTaskPushNotificationConfigParams1, ac as ListTaskPushNotificationConfigRequest, ad as ListTaskPushNotificationConfigResponse, ae as Message, af as Message1, ag as Message2, ah as MessageSendConfiguration, ai as MessageSendConfiguration1, aj as MessageSendParams, ak as MessageSendParams1, al as MessageSendParams2, am as MethodNotFoundError, an as MutualTLSSecurityScheme, ao as MySchema, ap as OAuth2SecurityScheme, aq as OAuthFlows, ar as OAuthFlows1, as as OpenIdConnectSecurityScheme, at as Part, au as PartBase, av as PasswordOAuthFlow, aw as PasswordOAuthFlow1, ax as PushNotificationAuthenticationInfo, ay as PushNotificationAuthenticationInfo1, az as PushNotificationConfig, aA as PushNotificationConfig1, aB as PushNotificationConfig2, aC as PushNotificationNotSupportedError, aD as SecurityScheme, aE as SecuritySchemeBase, aF as SendMessageRequest, aG as SendMessageSuccessResponse, aH as SendStreamingMessageRequest, aI as SendStreamingMessageSuccessResponse, aJ as SetTaskPushNotificationConfigRequest, aK as SetTaskPushNotificationConfigSuccessResponse, aL as Task, aM as Task1, aN as Task2, aO as TaskArtifactUpdateEvent, aP as TaskIdParams, aQ as TaskIdParams1, aR as TaskIdParams2, aS as TaskNotCancelableError, aT as TaskNotFoundError, aU as TaskPushNotificationConfig, aV as TaskPushNotificationConfig1, aW as TaskPushNotificationConfig2, aX as TaskPushNotificationConfig3, aY as TaskQueryParams, aZ as TaskQueryParams1, a_ as TaskResubscriptionRequest, a$ as TaskState, b0 as TaskStatus, b1 as TaskStatus1, b2 as TaskStatus2, b3 as TaskStatusUpdateEvent, b4 as TextPart, b5 as TransportProtocol, b6 as UnsupportedOperationError } from './extensions-APfrw8gz.js';
3
3
 
4
4
  /**
5
5
  * Represents any valid JSON-RPC response defined in the A2A protocol.
@@ -2793,8 +2793,8 @@ function restHandler(options) {
2793
2793
  if (statusCode === HTTP_STATUS.NO_CONTENT) {
2794
2794
  res.end();
2795
2795
  } else {
2796
- if (!responseType) {
2797
- throw new Error("Bug: toJson serializer must be provided for non-204 responses.");
2796
+ if (!responseType || body === void 0) {
2797
+ throw new Error("Bug: toJson serializer and body must be provided for non-204 responses.");
2798
2798
  }
2799
2799
  res.json(responseType.toJSON(body));
2800
2800
  }
@@ -1,6 +1,6 @@
1
1
  import { Request, Express, RequestHandler, ErrorRequestHandler } from 'express';
2
- import { U as User, a as UnauthenticatedUser, A as A2ARequestHandler } from '../../a2a_request_handler-B3LxMq3P.cjs';
3
- import { ae as AgentCard } from '../../extensions-DvruCIzw.cjs';
2
+ import { a as User, U as UnauthenticatedUser, A as A2ARequestHandler } from '../../a2a_request_handler-BiphzMH4.cjs';
3
+ import { i as AgentCard } from '../../extensions-APfrw8gz.cjs';
4
4
 
5
5
  type UserBuilder = (req: Request) => Promise<User>;
6
6
  declare const UserBuilder: {
@@ -1,6 +1,6 @@
1
1
  import { Request, Express, RequestHandler, ErrorRequestHandler } from 'express';
2
- import { U as User, a as UnauthenticatedUser, A as A2ARequestHandler } from '../../a2a_request_handler-BuP9LgXH.js';
3
- import { ae as AgentCard } from '../../extensions-DvruCIzw.js';
2
+ import { a as User, U as UnauthenticatedUser, A as A2ARequestHandler } from '../../a2a_request_handler-C9bZITjN.js';
3
+ import { i as AgentCard } from '../../extensions-APfrw8gz.js';
4
4
 
5
5
  type UserBuilder = (req: Request) => Promise<User>;
6
6
  declare const UserBuilder: {
@@ -30,7 +30,7 @@ import {
30
30
  Task,
31
31
  TaskPushNotificationConfig,
32
32
  ToProto
33
- } from "../../chunk-U3QAVT4H.js";
33
+ } from "../../chunk-2TNRJNPO.js";
34
34
  import {
35
35
  A2AError
36
36
  } from "../../chunk-UHZEIZLS.js";
@@ -492,8 +492,8 @@ function restHandler(options) {
492
492
  if (statusCode === HTTP_STATUS.NO_CONTENT) {
493
493
  res.end();
494
494
  } else {
495
- if (!responseType) {
496
- throw new Error("Bug: toJson serializer must be provided for non-204 responses.");
495
+ if (!responseType || body === void 0) {
496
+ throw new Error("Bug: toJson serializer and body must be provided for non-204 responses.");
497
497
  }
498
498
  res.json(responseType.toJSON(body));
499
499
  }
@@ -1,8 +1,8 @@
1
1
  import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
2
  import * as grpc from '@grpc/grpc-js';
3
3
  import { UntypedServiceImplementation, handleUnaryCall, handleServerStreamingCall } from '@grpc/grpc-js';
4
- import { U as User, a as UnauthenticatedUser, A as A2ARequestHandler } from '../../a2a_request_handler-B3LxMq3P.cjs';
5
- import '../../extensions-DvruCIzw.cjs';
4
+ import { a as User, U as UnauthenticatedUser, A as A2ARequestHandler } from '../../a2a_request_handler-BiphzMH4.cjs';
5
+ import '../../extensions-APfrw8gz.cjs';
6
6
 
7
7
  /**
8
8
  * A generic empty message that you can re-use to avoid defining duplicated
@@ -1,8 +1,8 @@
1
1
  import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
2
  import * as grpc from '@grpc/grpc-js';
3
3
  import { UntypedServiceImplementation, handleUnaryCall, handleServerStreamingCall } from '@grpc/grpc-js';
4
- import { U as User, a as UnauthenticatedUser, A as A2ARequestHandler } from '../../a2a_request_handler-BuP9LgXH.js';
5
- import '../../extensions-DvruCIzw.js';
4
+ import { a as User, U as UnauthenticatedUser, A as A2ARequestHandler } from '../../a2a_request_handler-C9bZITjN.js';
5
+ import '../../extensions-APfrw8gz.js';
6
6
 
7
7
  /**
8
8
  * A generic empty message that you can re-use to avoid defining duplicated
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  FromProto,
16
16
  ToProto
17
- } from "../../chunk-U3QAVT4H.js";
17
+ } from "../../chunk-2TNRJNPO.js";
18
18
  import {
19
19
  A2AError
20
20
  } from "../../chunk-UHZEIZLS.js";
@@ -287,7 +287,6 @@ var ExecutionEventQueue = class {
287
287
  eventQueue = [];
288
288
  resolvePromise;
289
289
  stopped = false;
290
- boundHandleEvent;
291
290
  constructor(eventBus) {
292
291
  this.eventBus = eventBus;
293
292
  this.eventBus.on("event", this.handleEvent);
@@ -1,6 +1,6 @@
1
- import { F as Message, ay as Task, aQ as TaskStatusUpdateEvent, aS as TaskArtifactUpdateEvent, z as PushNotificationConfig, ae as AgentCard, x as MessageSendParams, X as TaskQueryParams, Z as TaskIdParams, $ as TaskPushNotificationConfig, a3 as GetTaskPushNotificationConfigParams, a7 as ListTaskPushNotificationConfigParams, a9 as DeleteTaskPushNotificationConfigParams, j as JSONRPCResponse, aw as JSONRPCError } from '../extensions-DvruCIzw.cjs';
2
- import { S as ServerCallContext, A as A2ARequestHandler } from '../a2a_request_handler-B3LxMq3P.cjs';
3
- export { a as UnauthenticatedUser, U as User } from '../a2a_request_handler-B3LxMq3P.cjs';
1
+ import { ae as Message, aL as Task, b3 as TaskStatusUpdateEvent, aO as TaskArtifactUpdateEvent, az as PushNotificationConfig, i as AgentCard, aj as MessageSendParams, aY as TaskQueryParams, aP as TaskIdParams, aU as TaskPushNotificationConfig, U as GetTaskPushNotificationConfigParams, aa as ListTaskPushNotificationConfigParams, E as DeleteTaskPushNotificationConfigParams, a8 as JSONRPCResponse, a5 as JSONRPCError } from '../extensions-APfrw8gz.cjs';
2
+ import { S as ServerCallContext, A as A2ARequestHandler } from '../a2a_request_handler-BiphzMH4.cjs';
3
+ export { U as UnauthenticatedUser, a as User } from '../a2a_request_handler-BiphzMH4.cjs';
4
4
 
5
5
  type AgentExecutionEvent = Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
6
6
  /**
@@ -141,7 +141,6 @@ declare class ExecutionEventQueue {
141
141
  private eventQueue;
142
142
  private resolvePromise?;
143
143
  private stopped;
144
- private boundHandleEvent;
145
144
  constructor(eventBus: ExecutionEventBus);
146
145
  private handleEvent;
147
146
  private handleFinished;
@@ -1,6 +1,6 @@
1
- import { F as Message, ay as Task, aQ as TaskStatusUpdateEvent, aS as TaskArtifactUpdateEvent, z as PushNotificationConfig, ae as AgentCard, x as MessageSendParams, X as TaskQueryParams, Z as TaskIdParams, $ as TaskPushNotificationConfig, a3 as GetTaskPushNotificationConfigParams, a7 as ListTaskPushNotificationConfigParams, a9 as DeleteTaskPushNotificationConfigParams, j as JSONRPCResponse, aw as JSONRPCError } from '../extensions-DvruCIzw.js';
2
- import { S as ServerCallContext, A as A2ARequestHandler } from '../a2a_request_handler-BuP9LgXH.js';
3
- export { a as UnauthenticatedUser, U as User } from '../a2a_request_handler-BuP9LgXH.js';
1
+ import { ae as Message, aL as Task, b3 as TaskStatusUpdateEvent, aO as TaskArtifactUpdateEvent, az as PushNotificationConfig, i as AgentCard, aj as MessageSendParams, aY as TaskQueryParams, aP as TaskIdParams, aU as TaskPushNotificationConfig, U as GetTaskPushNotificationConfigParams, aa as ListTaskPushNotificationConfigParams, E as DeleteTaskPushNotificationConfigParams, a8 as JSONRPCResponse, a5 as JSONRPCError } from '../extensions-APfrw8gz.js';
2
+ import { S as ServerCallContext, A as A2ARequestHandler } from '../a2a_request_handler-C9bZITjN.js';
3
+ export { U as UnauthenticatedUser, a as User } from '../a2a_request_handler-C9bZITjN.js';
4
4
 
5
5
  type AgentExecutionEvent = Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
6
6
  /**
@@ -141,7 +141,6 @@ declare class ExecutionEventQueue {
141
141
  private eventQueue;
142
142
  private resolvePromise?;
143
143
  private stopped;
144
- private boundHandleEvent;
145
144
  constructor(eventBus: ExecutionEventBus);
146
145
  private handleEvent;
147
146
  private handleFinished;
@@ -262,7 +262,6 @@ var ExecutionEventQueue = class {
262
262
  eventQueue = [];
263
263
  resolvePromise;
264
264
  stopped = false;
265
- boundHandleEvent;
266
265
  constructor(eventBus) {
267
266
  this.eventBus = eventBus;
268
267
  this.eventBus.on("event", this.handleEvent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a2a-js/sdk",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "description": "Server & Client SDK for Agent2Agent protocol",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -70,6 +70,8 @@
70
70
  "README.md"
71
71
  ],
72
72
  "devDependencies": {
73
+ "@betterer/cli": "^6.0.0-alpha.1",
74
+ "@betterer/typescript": "^6.0.0-alpha.1",
73
75
  "@bufbuild/buf": "^1.61.0",
74
76
  "@bufbuild/protobuf": "^2.10.2",
75
77
  "@cloudflare/vitest-pool-workers": "^0.12.5",
@@ -97,9 +99,9 @@
97
99
  "build": "tsup",
98
100
  "test": "vitest run",
99
101
  "test:edge": "vitest run --config vitest.edge.config.ts",
100
- "lint": "tsc --noEmit && npx eslint .",
102
+ "lint": "tsc --noEmit && npx eslint . --fix && betterer precommit",
103
+ "lint:ci": "tsc --noEmit && npx eslint . && betterer ci",
101
104
  "format:readme": "prettier --write ./README.md",
102
- "lint:fix": "npx eslint . --fix",
103
105
  "coverage": "vitest run --coverage",
104
106
  "generate": "curl https://raw.githubusercontent.com/google-a2a/A2A/refs/heads/main/specification/json/a2a.json > spec.json && node scripts/generateTypes.js && rm spec.json",
105
107
  "test-build": "esbuild ./dist/client/index.js ./dist/server/index.js ./dist/index.js --bundle --platform=neutral --outdir=dist/tmp-checks --outbase=./dist"