@artinet/sdk 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/LICENSE +21 -0
- package/README.md +618 -0
- package/dist/client/a2a-client.d.ts +99 -0
- package/dist/client/a2a-client.d.ts.map +1 -0
- package/dist/client/a2a-client.js +171 -0
- package/dist/client/a2a-client.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/interfaces/client.d.ts +19 -0
- package/dist/client/interfaces/client.d.ts.map +1 -0
- package/dist/client/interfaces/client.js +2 -0
- package/dist/client/interfaces/client.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/server/a2a-server.d.ts +144 -0
- package/dist/server/a2a-server.d.ts.map +1 -0
- package/dist/server/a2a-server.js +384 -0
- package/dist/server/a2a-server.js.map +1 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +9 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/interfaces/context.d.ts +41 -0
- package/dist/server/interfaces/context.d.ts.map +1 -0
- package/dist/server/interfaces/context.js +2 -0
- package/dist/server/interfaces/context.js.map +1 -0
- package/dist/server/interfaces/params.d.ts +72 -0
- package/dist/server/interfaces/params.d.ts.map +1 -0
- package/dist/server/interfaces/params.js +3 -0
- package/dist/server/interfaces/params.js.map +1 -0
- package/dist/server/interfaces/server.d.ts +34 -0
- package/dist/server/interfaces/server.d.ts.map +1 -0
- package/dist/server/interfaces/server.js +2 -0
- package/dist/server/interfaces/server.js.map +1 -0
- package/dist/server/interfaces/store.d.ts +30 -0
- package/dist/server/interfaces/store.d.ts.map +1 -0
- package/dist/server/interfaces/store.js +2 -0
- package/dist/server/interfaces/store.js.map +1 -0
- package/dist/server/lib/express-server.d.ts +13 -0
- package/dist/server/lib/express-server.d.ts.map +1 -0
- package/dist/server/lib/express-server.js +51 -0
- package/dist/server/lib/express-server.js.map +1 -0
- package/dist/server/lib/json-middleware.d.ts +19 -0
- package/dist/server/lib/json-middleware.d.ts.map +1 -0
- package/dist/server/lib/json-middleware.js +180 -0
- package/dist/server/lib/json-middleware.js.map +1 -0
- package/dist/server/lib/state.d.ts +28 -0
- package/dist/server/lib/state.d.ts.map +1 -0
- package/dist/server/lib/state.js +108 -0
- package/dist/server/lib/state.js.map +1 -0
- package/dist/server/lib/storage/file.d.ts +62 -0
- package/dist/server/lib/storage/file.d.ts.map +1 -0
- package/dist/server/lib/storage/file.js +148 -0
- package/dist/server/lib/storage/file.js.map +1 -0
- package/dist/server/lib/storage/memory.d.ts +21 -0
- package/dist/server/lib/storage/memory.d.ts.map +1 -0
- package/dist/server/lib/storage/memory.js +40 -0
- package/dist/server/lib/storage/memory.js.map +1 -0
- package/dist/transport/index.d.ts +5 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +5 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/rpc/parser.d.ts +12 -0
- package/dist/transport/rpc/parser.d.ts.map +1 -0
- package/dist/transport/rpc/parser.js +37 -0
- package/dist/transport/rpc/parser.js.map +1 -0
- package/dist/transport/rpc/rpc-client.d.ts +77 -0
- package/dist/transport/rpc/rpc-client.d.ts.map +1 -0
- package/dist/transport/rpc/rpc-client.js +182 -0
- package/dist/transport/rpc/rpc-client.js.map +1 -0
- package/dist/transport/streaming/event-stream.d.ts +22 -0
- package/dist/transport/streaming/event-stream.d.ts.map +1 -0
- package/dist/transport/streaming/event-stream.js +79 -0
- package/dist/transport/streaming/event-stream.js.map +1 -0
- package/dist/transport/streaming/stream.d.ts +42 -0
- package/dist/transport/streaming/stream.d.ts.map +1 -0
- package/dist/transport/streaming/stream.js +128 -0
- package/dist/transport/streaming/stream.js.map +1 -0
- package/dist/types/extended-schema.d.ts +52 -0
- package/dist/types/extended-schema.d.ts.map +1 -0
- package/dist/types/extended-schema.js +7 -0
- package/dist/types/extended-schema.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/schema.d.ts +729 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +23 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/utils/common/constants.d.ts +6 -0
- package/dist/utils/common/constants.d.ts.map +1 -0
- package/dist/utils/common/constants.js +28 -0
- package/dist/utils/common/constants.js.map +1 -0
- package/dist/utils/common/errors.d.ts +26 -0
- package/dist/utils/common/errors.d.ts.map +1 -0
- package/dist/utils/common/errors.js +59 -0
- package/dist/utils/common/errors.js.map +1 -0
- package/dist/utils/common/utils.d.ts +30 -0
- package/dist/utils/common/utils.d.ts.map +1 -0
- package/dist/utils/common/utils.js +67 -0
- package/dist/utils/common/utils.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logging/log.d.ts +30 -0
- package/dist/utils/logging/log.d.ts.map +1 -0
- package/dist/utils/logging/log.js +58 -0
- package/dist/utils/logging/log.js.map +1 -0
- package/dist/utils/logging/logger.d.ts +16 -0
- package/dist/utils/logging/logger.d.ts.map +1 -0
- package/dist/utils/logging/logger.js +38 -0
- package/dist/utils/logging/logger.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { AgentCard, TaskSendParams, TaskQueryParams, // Used by get, resubscribe
|
|
2
|
+
TaskIdParams, // Used by cancel, getTaskPushNotificationConfig
|
|
3
|
+
TaskPushNotificationConfig, Task, TaskArtifactUpdateEvent, TaskStatusUpdateEvent } from "../types/extended-schema.js";
|
|
4
|
+
import type { Client } from "./interfaces/client.js";
|
|
5
|
+
/**
|
|
6
|
+
* A2AClient is the main client class for interacting with Agent2Agent (A2A) protocol-compliant services.
|
|
7
|
+
* It provides methods for sending tasks, retrieving statuses, canceling operations, and handling streaming responses.
|
|
8
|
+
*/
|
|
9
|
+
export declare class A2AClient implements Client {
|
|
10
|
+
private baseUrl;
|
|
11
|
+
private cachedAgentCard;
|
|
12
|
+
private customHeaders;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new A2AClient instance.
|
|
15
|
+
* @param baseUrl The base URL for the A2A server.
|
|
16
|
+
* @param headers Optional custom headers to include in all requests.
|
|
17
|
+
*/
|
|
18
|
+
constructor(baseUrl: URL | string, headers?: Record<string, string>);
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves the AgentCard from the A2A server.
|
|
21
|
+
* Caches the result after the first successful fetch.
|
|
22
|
+
* @returns A promise resolving to the AgentCard.
|
|
23
|
+
*/
|
|
24
|
+
agentCard(): Promise<AgentCard>;
|
|
25
|
+
/**
|
|
26
|
+
* Refreshes the cached AgentCard by fetching it again from the server.
|
|
27
|
+
* @returns A promise resolving to the updated AgentCard.
|
|
28
|
+
*/
|
|
29
|
+
refreshAgentCard(): Promise<AgentCard>;
|
|
30
|
+
/**
|
|
31
|
+
* Sends a task request to the agent (non-streaming).
|
|
32
|
+
* @param params The parameters for the tasks/send method.
|
|
33
|
+
* @returns A promise resolving to the Task object or null.
|
|
34
|
+
*/
|
|
35
|
+
sendTask(params: TaskSendParams): Promise<Task | null>;
|
|
36
|
+
/**
|
|
37
|
+
* Sends a task and returns a subscription to status and artifact updates.
|
|
38
|
+
* @param params Task parameters for the request
|
|
39
|
+
* @returns An AsyncIterable that yields TaskStatusUpdateEvent or TaskArtifactUpdateEvent payloads.
|
|
40
|
+
*/
|
|
41
|
+
sendTaskSubscribe(params: TaskSendParams): AsyncIterable<TaskStatusUpdateEvent | TaskArtifactUpdateEvent>;
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves the current state of a task.
|
|
44
|
+
* @param params The parameters for the tasks/get method.
|
|
45
|
+
* @returns A promise resolving to the Task object or null.
|
|
46
|
+
*/
|
|
47
|
+
getTask(params: TaskQueryParams): Promise<Task | null>;
|
|
48
|
+
/**
|
|
49
|
+
* Cancels a currently running task.
|
|
50
|
+
* @param params The parameters for the tasks/cancel method.
|
|
51
|
+
* @returns A promise resolving to the updated Task object (usually canceled state) or null.
|
|
52
|
+
*/
|
|
53
|
+
cancelTask(params: TaskIdParams): Promise<Task | null>;
|
|
54
|
+
/**
|
|
55
|
+
* Sets or updates the push notification config for a task.
|
|
56
|
+
* @param params The parameters for the tasks/pushNotification/set method (which is TaskPushNotificationConfig).
|
|
57
|
+
* @returns A promise resolving to the confirmed TaskPushNotificationConfig or null.
|
|
58
|
+
*/
|
|
59
|
+
setTaskPushNotification(params: TaskPushNotificationConfig): Promise<TaskPushNotificationConfig | null>;
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves the currently configured push notification config for a task.
|
|
62
|
+
* @param params The parameters for the tasks/pushNotification/get method.
|
|
63
|
+
* @returns A promise resolving to the TaskPushNotificationConfig or null.
|
|
64
|
+
*/
|
|
65
|
+
getTaskPushNotification(params: TaskIdParams): Promise<TaskPushNotificationConfig | null>;
|
|
66
|
+
/**
|
|
67
|
+
* Resubscribes to an existing task's update stream.
|
|
68
|
+
* @param params Parameters identifying the task to resubscribe to
|
|
69
|
+
* @returns An AsyncIterable that yields TaskStatusUpdateEvent or TaskArtifactUpdateEvent payloads.
|
|
70
|
+
*/
|
|
71
|
+
resubscribeTask(params: TaskQueryParams): AsyncIterable<TaskStatusUpdateEvent | TaskArtifactUpdateEvent>;
|
|
72
|
+
/**
|
|
73
|
+
* Checks if the server supports a specific capability based on the agent card.
|
|
74
|
+
* @param capability The capability to check (e.g., 'streaming', 'pushNotifications').
|
|
75
|
+
* @returns A promise resolving to true if the capability is supported.
|
|
76
|
+
*/
|
|
77
|
+
supports(capability: "streaming" | "pushNotifications" | "stateTransitionHistory"): Promise<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* Sets custom headers to be included in all requests.
|
|
80
|
+
* @param headers A record of header name/value pairs.
|
|
81
|
+
*/
|
|
82
|
+
setHeaders(headers: Record<string, string>): void;
|
|
83
|
+
/**
|
|
84
|
+
* Adds a single custom header to be included in all requests.
|
|
85
|
+
* @param name The header name.
|
|
86
|
+
* @param value The header value.
|
|
87
|
+
*/
|
|
88
|
+
addHeader(name: string, value: string): void;
|
|
89
|
+
/**
|
|
90
|
+
* Removes a custom header.
|
|
91
|
+
* @param name The header name to remove.
|
|
92
|
+
*/
|
|
93
|
+
removeHeader(name: string): void;
|
|
94
|
+
/**
|
|
95
|
+
* Clears all custom headers.
|
|
96
|
+
*/
|
|
97
|
+
clearHeaders(): void;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=a2a-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a2a-client.d.ts","sourceRoot":"","sources":["../../src/client/a2a-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,SAAS,EAQT,cAAc,EACd,eAAe,EAAE,2BAA2B;AAC5C,YAAY,EAAE,gDAAgD;AAC9D,0BAA0B,EAQ1B,IAAI,EACJ,uBAAuB,EACvB,qBAAqB,EAGtB,MAAM,6BAA6B,CAAC;AAWrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD;;;GAGG;AACH,qBAAa,SAAU,YAAW,MAAM;IACtC,OAAO,CAAC,OAAO,CAAM;IACrB,OAAO,CAAC,eAAe,CAA0B;IACjD,OAAO,CAAC,aAAa,CAA8B;IAEnD;;;;OAIG;gBACS,OAAO,EAAE,GAAG,GAAG,MAAM,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;IAKvE;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC;IAyCrC;;;OAGG;IACG,gBAAgB,IAAI,OAAO,CAAC,SAAS,CAAC;IAK5C;;;;OAIG;IACG,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAS5D;;;;OAIG;IACH,iBAAiB,CACf,MAAM,EAAE,cAAc,GACrB,aAAa,CAAC,qBAAqB,GAAG,uBAAuB,CAAC;IAOjE;;;;OAIG;IACG,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAS5D;;;;OAIG;IACG,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAS5D;;;;OAIG;IACG,uBAAuB,CAC3B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;IAO7C;;;;OAIG;IACG,uBAAuB,CAC3B,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC;IAO7C;;;;OAIG;IACH,eAAe,CACb,MAAM,EAAE,eAAe,GACtB,aAAa,CAAC,qBAAqB,GAAG,uBAAuB,CAAC;IAOjE;;;;OAIG;IACG,QAAQ,CACZ,UAAU,EAAE,WAAW,GAAG,mBAAmB,GAAG,wBAAwB,GACvE,OAAO,CAAC,OAAO,CAAC;IA4BnB;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAIjD;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAI5C;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIhC;;OAEG;IACH,YAAY,IAAI,IAAI;CAGrB"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// Import RPC client helpers
|
|
2
|
+
import { executeJsonRpcRequest, executeGetRequest, } from "../transport/rpc/rpc-client.js";
|
|
3
|
+
import { executeStreamEvents } from "../transport/streaming/event-stream.js";
|
|
4
|
+
import { logError } from "../utils/logging/log.js";
|
|
5
|
+
import { INTERNAL_ERROR } from "../utils/common/errors.js";
|
|
6
|
+
/**
|
|
7
|
+
* A2AClient is the main client class for interacting with Agent2Agent (A2A) protocol-compliant services.
|
|
8
|
+
* It provides methods for sending tasks, retrieving statuses, canceling operations, and handling streaming responses.
|
|
9
|
+
*/
|
|
10
|
+
export class A2AClient {
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new A2AClient instance.
|
|
13
|
+
* @param baseUrl The base URL for the A2A server.
|
|
14
|
+
* @param headers Optional custom headers to include in all requests.
|
|
15
|
+
*/
|
|
16
|
+
constructor(baseUrl, headers = {}) {
|
|
17
|
+
this.cachedAgentCard = null;
|
|
18
|
+
this.customHeaders = {};
|
|
19
|
+
this.baseUrl = typeof baseUrl === "string" ? new URL(baseUrl) : baseUrl;
|
|
20
|
+
this.customHeaders = headers;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the AgentCard from the A2A server.
|
|
24
|
+
* Caches the result after the first successful fetch.
|
|
25
|
+
* @returns A promise resolving to the AgentCard.
|
|
26
|
+
*/
|
|
27
|
+
async agentCard() {
|
|
28
|
+
if (this.cachedAgentCard) {
|
|
29
|
+
return this.cachedAgentCard;
|
|
30
|
+
}
|
|
31
|
+
// Standard location for agent cards
|
|
32
|
+
const wellKnownUrl = new URL("/.well-known/agent.json", this.baseUrl);
|
|
33
|
+
try {
|
|
34
|
+
try {
|
|
35
|
+
const card = await executeGetRequest(wellKnownUrl, this.customHeaders, "agent card (well-known)");
|
|
36
|
+
this.cachedAgentCard = card;
|
|
37
|
+
return this.cachedAgentCard;
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
const fallbackUrl = new URL("/agent-card", this.baseUrl);
|
|
41
|
+
const fallbackCard = await executeGetRequest(fallbackUrl, this.customHeaders, "agent card (fallback)");
|
|
42
|
+
this.cachedAgentCard = fallbackCard;
|
|
43
|
+
return this.cachedAgentCard;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
logError("A2AClient:agentCard", "Failed to fetch or parse agent card:", error);
|
|
48
|
+
throw INTERNAL_ERROR(`Could not retrieve agent card: ${error instanceof Error ? error.message : String(error)}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Refreshes the cached AgentCard by fetching it again from the server.
|
|
53
|
+
* @returns A promise resolving to the updated AgentCard.
|
|
54
|
+
*/
|
|
55
|
+
async refreshAgentCard() {
|
|
56
|
+
this.cachedAgentCard = null;
|
|
57
|
+
return this.agentCard();
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Sends a task request to the agent (non-streaming).
|
|
61
|
+
* @param params The parameters for the tasks/send method.
|
|
62
|
+
* @returns A promise resolving to the Task object or null.
|
|
63
|
+
*/
|
|
64
|
+
async sendTask(params) {
|
|
65
|
+
return await executeJsonRpcRequest(this.baseUrl, "tasks/send", params, this.customHeaders);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Sends a task and returns a subscription to status and artifact updates.
|
|
69
|
+
* @param params Task parameters for the request
|
|
70
|
+
* @returns An AsyncIterable that yields TaskStatusUpdateEvent or TaskArtifactUpdateEvent payloads.
|
|
71
|
+
*/
|
|
72
|
+
sendTaskSubscribe(params) {
|
|
73
|
+
return executeStreamEvents(this.baseUrl, "tasks/sendSubscribe", params, this.customHeaders);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Retrieves the current state of a task.
|
|
77
|
+
* @param params The parameters for the tasks/get method.
|
|
78
|
+
* @returns A promise resolving to the Task object or null.
|
|
79
|
+
*/
|
|
80
|
+
async getTask(params) {
|
|
81
|
+
return await executeJsonRpcRequest(this.baseUrl, "tasks/get", params, this.customHeaders);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Cancels a currently running task.
|
|
85
|
+
* @param params The parameters for the tasks/cancel method.
|
|
86
|
+
* @returns A promise resolving to the updated Task object (usually canceled state) or null.
|
|
87
|
+
*/
|
|
88
|
+
async cancelTask(params) {
|
|
89
|
+
return await executeJsonRpcRequest(this.baseUrl, "tasks/cancel", params, this.customHeaders);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Sets or updates the push notification config for a task.
|
|
93
|
+
* @param params The parameters for the tasks/pushNotification/set method (which is TaskPushNotificationConfig).
|
|
94
|
+
* @returns A promise resolving to the confirmed TaskPushNotificationConfig or null.
|
|
95
|
+
*/
|
|
96
|
+
async setTaskPushNotification(params) {
|
|
97
|
+
return await executeJsonRpcRequest(this.baseUrl, "tasks/pushNotification/set", params, this.customHeaders);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Retrieves the currently configured push notification config for a task.
|
|
101
|
+
* @param params The parameters for the tasks/pushNotification/get method.
|
|
102
|
+
* @returns A promise resolving to the TaskPushNotificationConfig or null.
|
|
103
|
+
*/
|
|
104
|
+
async getTaskPushNotification(params) {
|
|
105
|
+
return await executeJsonRpcRequest(this.baseUrl, "tasks/pushNotification/get", params, this.customHeaders);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Resubscribes to an existing task's update stream.
|
|
109
|
+
* @param params Parameters identifying the task to resubscribe to
|
|
110
|
+
* @returns An AsyncIterable that yields TaskStatusUpdateEvent or TaskArtifactUpdateEvent payloads.
|
|
111
|
+
*/
|
|
112
|
+
resubscribeTask(params) {
|
|
113
|
+
return executeStreamEvents(this.baseUrl, "tasks/resubscribe", params, this.customHeaders);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Checks if the server supports a specific capability based on the agent card.
|
|
117
|
+
* @param capability The capability to check (e.g., 'streaming', 'pushNotifications').
|
|
118
|
+
* @returns A promise resolving to true if the capability is supported.
|
|
119
|
+
*/
|
|
120
|
+
async supports(capability) {
|
|
121
|
+
try {
|
|
122
|
+
const card = await this.agentCard();
|
|
123
|
+
if (!card.capabilities) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
switch (capability) {
|
|
127
|
+
case "streaming":
|
|
128
|
+
return !!card.capabilities.streaming;
|
|
129
|
+
case "pushNotifications":
|
|
130
|
+
return !!card.capabilities.pushNotifications;
|
|
131
|
+
case "stateTransitionHistory":
|
|
132
|
+
return !!card.capabilities.stateTransitionHistory;
|
|
133
|
+
default:
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
logError("A2AClient:supports", `Failed to determine support for capability '${capability}':`, error);
|
|
139
|
+
return false; // Assume not supported if card fetch fails
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Sets custom headers to be included in all requests.
|
|
144
|
+
* @param headers A record of header name/value pairs.
|
|
145
|
+
*/
|
|
146
|
+
setHeaders(headers) {
|
|
147
|
+
this.customHeaders = { ...headers };
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Adds a single custom header to be included in all requests.
|
|
151
|
+
* @param name The header name.
|
|
152
|
+
* @param value The header value.
|
|
153
|
+
*/
|
|
154
|
+
addHeader(name, value) {
|
|
155
|
+
this.customHeaders[name] = value;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Removes a custom header.
|
|
159
|
+
* @param name The header name to remove.
|
|
160
|
+
*/
|
|
161
|
+
removeHeader(name) {
|
|
162
|
+
delete this.customHeaders[name];
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Clears all custom headers.
|
|
166
|
+
*/
|
|
167
|
+
clearHeaders() {
|
|
168
|
+
this.customHeaders = {};
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=a2a-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a2a-client.js","sourceRoot":"","sources":["../../src/client/a2a-client.ts"],"names":[],"mappings":"AA6BA,4BAA4B;AAC5B,OAAO,EACL,qBAAq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aAAa,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,IAAY,EAAE,KAAa;QACnC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IACnC,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,IAAY;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,YAAY;QACV,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TaskPushNotificationConfig, TaskArtifactUpdateEvent, TaskIdParams, Task } from "../../types/extended-schema.js";
|
|
2
|
+
import type { AgentCard, TaskQueryParams, TaskSendParams, TaskStatusUpdateEvent } from "../../types/extended-schema.js";
|
|
3
|
+
export interface Client {
|
|
4
|
+
agentCard(): Promise<AgentCard>;
|
|
5
|
+
refreshAgentCard(): Promise<AgentCard>;
|
|
6
|
+
sendTask(params: TaskSendParams): Promise<Task | null>;
|
|
7
|
+
sendTaskSubscribe(params: TaskSendParams): AsyncIterable<TaskStatusUpdateEvent | TaskArtifactUpdateEvent>;
|
|
8
|
+
getTask(params: TaskQueryParams): Promise<Task | null>;
|
|
9
|
+
cancelTask(params: TaskIdParams): Promise<Task | null>;
|
|
10
|
+
setTaskPushNotification(params: TaskPushNotificationConfig): Promise<TaskPushNotificationConfig | null>;
|
|
11
|
+
getTaskPushNotification(params: TaskIdParams): Promise<TaskPushNotificationConfig | null>;
|
|
12
|
+
resubscribeTask(params: TaskQueryParams): AsyncIterable<TaskStatusUpdateEvent | TaskArtifactUpdateEvent>;
|
|
13
|
+
supports(capability: "streaming" | "pushNotifications" | "stateTransitionHistory"): Promise<boolean>;
|
|
14
|
+
setHeaders(headers: Record<string, string>): void;
|
|
15
|
+
addHeader(name: string, value: string): void;
|
|
16
|
+
removeHeader(name: string): void;
|
|
17
|
+
clearHeaders(): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client/interfaces/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,YAAY,EACZ,IAAI,EACL,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,cAAc,EACd,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,MAAM;IACrB,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,gBAAgB,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACvD,iBAAiB,CACf,MAAM,EAAE,cAAc,GACrB,aAAa,CAAC,qBAAqB,GAAG,uBAAuB,CAAC,CAAC;IAClE,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACvD,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACvD,uBAAuB,CACrB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAC;IAC9C,uBAAuB,CACrB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAC;IAC9C,eAAe,CACb,MAAM,EAAE,eAAe,GACtB,aAAa,CAAC,qBAAqB,GAAG,uBAAuB,CAAC,CAAC;IAClE,QAAQ,CACN,UAAU,EAAE,WAAW,GAAG,mBAAmB,GAAG,wBAAwB,GACvE,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAClD,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,YAAY,IAAI,IAAI,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/client/interfaces/client.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import express, { Response } from "express";
|
|
2
|
+
import { CorsOptions } from "cors";
|
|
3
|
+
import http from "http";
|
|
4
|
+
import type { AgentCard, Task, Message, SendTaskStreamingRequest, TaskResubscriptionRequest } from "../types/index.js";
|
|
5
|
+
import { TaskStore, TaskAndHistory } from "./interfaces/store.js";
|
|
6
|
+
import { TaskHandler, TaskContext } from "./interfaces/context.js";
|
|
7
|
+
import { A2AServerParams, JSONRPCServerType } from "./interfaces/params.js";
|
|
8
|
+
import { Server } from "./interfaces/server.js";
|
|
9
|
+
/**
|
|
10
|
+
* Implements an A2A protocol compliant server using Express.
|
|
11
|
+
* Handles task creation, streaming, cancellation and more.
|
|
12
|
+
* Uses Jayson for JSON-RPC handling.
|
|
13
|
+
*/
|
|
14
|
+
export declare class A2AServer implements Server {
|
|
15
|
+
private taskHandler;
|
|
16
|
+
private taskStore;
|
|
17
|
+
private corsOptions;
|
|
18
|
+
private basePath;
|
|
19
|
+
private port;
|
|
20
|
+
private rpcServer;
|
|
21
|
+
private serverInstance;
|
|
22
|
+
private activeCancellations;
|
|
23
|
+
private activeStreams;
|
|
24
|
+
/** The agent card representing this server */
|
|
25
|
+
card: AgentCard;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the base path for the server
|
|
28
|
+
*/
|
|
29
|
+
getBasePath(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Returns the CORS options for the server
|
|
32
|
+
*/
|
|
33
|
+
getCorsOptions(): CorsOptions;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the agent card for the server
|
|
36
|
+
*/
|
|
37
|
+
getCard(): AgentCard;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the task store
|
|
40
|
+
*/
|
|
41
|
+
getTaskStore(): TaskStore;
|
|
42
|
+
/**
|
|
43
|
+
* Returns the task handler
|
|
44
|
+
*/
|
|
45
|
+
getTaskHandler(): TaskHandler;
|
|
46
|
+
/**
|
|
47
|
+
* Returns the set of active cancellations
|
|
48
|
+
*/
|
|
49
|
+
getActiveCancellations(): Set<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the map of active streams
|
|
52
|
+
*/
|
|
53
|
+
getActiveStreams(): Map<string, Response[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the port number
|
|
56
|
+
*/
|
|
57
|
+
getPort(): number;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the JSON-RPC server
|
|
60
|
+
*/
|
|
61
|
+
getRpcServer(): JSONRPCServerType;
|
|
62
|
+
/**
|
|
63
|
+
* Returns the server instance
|
|
64
|
+
*/
|
|
65
|
+
getServerInstance(): http.Server | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Returns a task context for the specified task and messages
|
|
68
|
+
*/
|
|
69
|
+
getTaskContext(task: Task, userMessage: Message, history: Message[]): TaskContext;
|
|
70
|
+
/**
|
|
71
|
+
* Returns the default agent card
|
|
72
|
+
*/
|
|
73
|
+
defaultAgentCard(): AgentCard;
|
|
74
|
+
/**
|
|
75
|
+
* Creates a new A2AServer.
|
|
76
|
+
* @param handler The task handler function that will process tasks
|
|
77
|
+
* @param options Options for configuring the server
|
|
78
|
+
*/
|
|
79
|
+
constructor(params: A2AServerParams);
|
|
80
|
+
/**
|
|
81
|
+
* Starts the Express server listening on the specified port.
|
|
82
|
+
* @returns The running Express application instance.
|
|
83
|
+
*/
|
|
84
|
+
start(): express.Express;
|
|
85
|
+
/**
|
|
86
|
+
* Stops the server and closes all connections.
|
|
87
|
+
* @returns A promise that resolves when the server is stopped.
|
|
88
|
+
*/
|
|
89
|
+
stop(): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Handles task cancellation
|
|
92
|
+
* @param data Task and history data
|
|
93
|
+
* @param res Response object
|
|
94
|
+
*/
|
|
95
|
+
onCancel(data: TaskAndHistory, res: Response): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Handles cleanup when a task stream ends
|
|
98
|
+
* @param taskId The task ID
|
|
99
|
+
* @param res Response object
|
|
100
|
+
*/
|
|
101
|
+
onEnd(taskId: string, res: Response): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Handles the tasks/sendSubscribe method.
|
|
104
|
+
* @param req The SendTaskRequest object
|
|
105
|
+
* @param res The Express Response object
|
|
106
|
+
*/
|
|
107
|
+
handleTaskSendSubscribe(req: SendTaskStreamingRequest, res: Response): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Handles the tasks/resubscribe method.
|
|
110
|
+
* @param req The TaskResubscriptionRequest object
|
|
111
|
+
* @param res The Express Response object
|
|
112
|
+
*/
|
|
113
|
+
handleTaskResubscribe(req: TaskResubscriptionRequest, res: Response): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Adds a response stream to the tracking map for a task.
|
|
116
|
+
* @param taskId The task ID
|
|
117
|
+
* @param res The response stream
|
|
118
|
+
*/
|
|
119
|
+
addStreamForTask(taskId: string, res: Response): void;
|
|
120
|
+
/**
|
|
121
|
+
* Removes a response stream from the tracking map for a task.
|
|
122
|
+
* @param taskId The task ID
|
|
123
|
+
* @param res The response stream
|
|
124
|
+
*/
|
|
125
|
+
removeStreamForTask(taskId: string, res: Response): void;
|
|
126
|
+
/**
|
|
127
|
+
* Initializes the default agent card
|
|
128
|
+
*/
|
|
129
|
+
static defaultAgentCard(): AgentCard;
|
|
130
|
+
/**
|
|
131
|
+
* Creates a TaskContext object for a task handler.
|
|
132
|
+
* @param task The task
|
|
133
|
+
* @param userMessage The user message
|
|
134
|
+
* @param history The message history
|
|
135
|
+
* @returns A TaskContext object
|
|
136
|
+
*/
|
|
137
|
+
createTaskContext(task: Task, userMessage: Message, history: Message[]): TaskContext;
|
|
138
|
+
/**
|
|
139
|
+
* Closes any active streams for a task.
|
|
140
|
+
* @param taskId The task ID
|
|
141
|
+
*/
|
|
142
|
+
closeStreamsForTask(taskId: string): void;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=a2a-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a2a-server.d.ts","sourceRoot":"","sources":["../../src/server/a2a-server.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,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