@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.
- package/dist/{a2a_request_handler-BuP9LgXH.d.ts → a2a_request_handler-BiphzMH4.d.cts} +2 -2
- package/dist/{a2a_request_handler-B3LxMq3P.d.cts → a2a_request_handler-C9bZITjN.d.ts} +2 -2
- package/dist/{chunk-U3QAVT4H.js → chunk-2TNRJNPO.js} +694 -694
- package/dist/client/index.cjs +1327 -1288
- package/dist/client/index.d.cts +7 -3
- package/dist/client/index.d.ts +7 -3
- package/dist/client/index.js +79 -40
- package/dist/client/transports/grpc/index.d.cts +2 -2
- package/dist/client/transports/grpc/index.d.ts +2 -2
- package/dist/client/transports/grpc/index.js +1 -1
- package/dist/{core-BAzQJfA2.d.ts → core-BHroNzI0.d.cts} +2 -2
- package/dist/{core-Ci-lR0jz.d.cts → core-NwQicv77.d.ts} +2 -2
- package/dist/{extensions-DvruCIzw.d.cts → extensions-APfrw8gz.d.cts} +1 -1
- package/dist/{extensions-DvruCIzw.d.ts → extensions-APfrw8gz.d.ts} +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/server/express/index.cjs +2 -2
- package/dist/server/express/index.d.cts +2 -2
- package/dist/server/express/index.d.ts +2 -2
- package/dist/server/express/index.js +3 -3
- package/dist/server/grpc/index.d.cts +2 -2
- package/dist/server/grpc/index.d.ts +2 -2
- package/dist/server/grpc/index.js +1 -1
- package/dist/server/index.cjs +0 -1
- package/dist/server/index.d.cts +3 -4
- package/dist/server/index.d.ts +3 -4
- package/dist/server/index.js +0 -1
- package/package.json +5 -3
package/dist/client/index.d.cts
CHANGED
|
@@ -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-
|
|
2
|
-
export { d as A2AClient, e as A2AClientOptions,
|
|
3
|
-
import {
|
|
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
|
/**
|
package/dist/client/index.d.ts
CHANGED
|
@@ -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-
|
|
2
|
-
export { d as A2AClient, e as A2AClientOptions,
|
|
3
|
-
import {
|
|
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
|
/**
|
package/dist/client/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
Task,
|
|
29
29
|
TaskPushNotificationConfig,
|
|
30
30
|
ToProto
|
|
31
|
-
} from "../chunk-
|
|
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
|
-
|
|
146
|
-
`
|
|
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
|
-
|
|
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
|
-
|
|
231
|
-
|
|
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
|
-
`
|
|
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
|
-
|
|
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
|
-
|
|
1353
|
-
continue;
|
|
1354
|
-
}
|
|
1394
|
+
const url = urlsPerAgentTransports.get(transport);
|
|
1355
1395
|
const factory = this.transportsByName.get(transport);
|
|
1356
|
-
if (
|
|
1357
|
-
|
|
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-
|
|
3
|
-
import {
|
|
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-
|
|
3
|
-
import {
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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 {
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
2
|
-
export { A as A2AError,
|
|
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-
|
|
2
|
-
export { A as A2AError,
|
|
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 {
|
|
3
|
-
import {
|
|
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 {
|
|
3
|
-
import {
|
|
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-
|
|
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 {
|
|
5
|
-
import '../../extensions-
|
|
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 {
|
|
5
|
-
import '../../extensions-
|
|
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
|
package/dist/server/index.cjs
CHANGED
package/dist/server/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as ServerCallContext, A as A2ARequestHandler } from '../a2a_request_handler-
|
|
3
|
-
export {
|
|
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;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as ServerCallContext, A as A2ARequestHandler } from '../a2a_request_handler-
|
|
3
|
-
export {
|
|
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;
|
package/dist/server/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a2a-js/sdk",
|
|
3
|
-
"version": "0.3.
|
|
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"
|