@artinet/sdk 0.5.2 → 0.5.4
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 +20 -1
- package/README.md +69 -89
- package/dist/client/a2a-client.js +25 -7
- package/dist/client/a2a-client.js.map +1 -1
- package/dist/server/a2a-server.js +51 -241
- package/dist/server/a2a-server.js.map +1 -1
- package/dist/server/interfaces/params.js.map +1 -1
- package/dist/server/interfaces/store.js +16 -0
- package/dist/server/interfaces/store.js.map +1 -1
- package/dist/server/lib/express-server.js +211 -2
- package/dist/server/lib/express-server.js.map +1 -1
- package/dist/server/lib/middleware/a2a-methods.js +61 -24
- package/dist/server/lib/middleware/a2a-methods.js.map +1 -1
- package/dist/server/lib/middleware/factory.js +6 -6
- package/dist/server/lib/middleware/factory.js.map +1 -1
- package/dist/server/lib/state.js +44 -72
- package/dist/server/lib/state.js.map +1 -1
- package/dist/server/lib/storage/memory.js.map +1 -1
- package/dist/server/lib/update/base.js +109 -0
- package/dist/server/lib/update/base.js.map +1 -0
- package/dist/services/a2a/index.js +3 -0
- package/dist/services/a2a/index.js.map +1 -0
- package/dist/services/a2a/repository.js +160 -0
- package/dist/services/a2a/repository.js.map +1 -0
- package/dist/services/a2a/service.js +247 -0
- package/dist/services/a2a/service.js.map +1 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/manager.js +61 -0
- package/dist/services/manager.js.map +1 -0
- package/dist/services/mcp/index.js +2 -0
- package/dist/services/mcp/index.js.map +1 -0
- package/dist/services/mcp/service.js +75 -0
- package/dist/services/mcp/service.js.map +1 -0
- package/dist/transport/rpc/parser.js +2 -1
- package/dist/transport/rpc/parser.js.map +1 -1
- package/dist/transport/rpc/rpc-client.js.map +1 -1
- package/dist/transport/streaming/stream.js +19 -36
- package/dist/transport/streaming/stream.js.map +1 -1
- package/dist/types/client/a2a-client.d.ts +21 -7
- package/dist/types/client/a2a-client.d.ts.map +1 -1
- package/dist/types/express.js +2 -0
- package/dist/types/express.js.map +1 -0
- package/dist/types/extended-schema.js +1 -1
- package/dist/types/extended-schema.js.map +1 -1
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/schemas/a2a/auth/auth.js +2 -0
- package/dist/types/schemas/a2a/auth/auth.js.map +1 -0
- package/dist/types/schemas/a2a/auth/base.js +2 -0
- package/dist/types/schemas/a2a/auth/base.js.map +1 -0
- package/dist/types/schemas/a2a/auth/index.js +4 -0
- package/dist/types/schemas/a2a/auth/index.js.map +1 -0
- package/dist/types/schemas/a2a/auth/oauth.js +2 -0
- package/dist/types/schemas/a2a/auth/oauth.js.map +1 -0
- package/dist/types/schemas/a2a/error.js +45 -0
- package/dist/types/schemas/a2a/error.js.map +1 -0
- package/dist/types/schemas/a2a/index.js +8 -0
- package/dist/types/schemas/a2a/index.js.map +1 -0
- package/dist/types/schemas/a2a/message.js +2 -0
- package/dist/types/schemas/a2a/message.js.map +1 -0
- package/dist/types/schemas/a2a/notification.js +2 -0
- package/dist/types/schemas/a2a/notification.js.map +1 -0
- package/dist/types/schemas/a2a/parameters.js +2 -0
- package/dist/types/schemas/a2a/parameters.js.map +1 -0
- package/dist/types/schemas/a2a/ref.js +25 -0
- package/dist/types/schemas/a2a/ref.js.map +1 -0
- package/dist/types/schemas/a2a/rpc.js +2 -0
- package/dist/types/schemas/a2a/rpc.js.map +1 -0
- package/dist/types/schemas/a2a/task.js +16 -0
- package/dist/types/schemas/a2a/task.js.map +1 -0
- package/dist/types/schemas/index.js +2 -0
- package/dist/types/schemas/index.js.map +1 -0
- package/dist/types/server/a2a-server.d.ts +9 -20
- package/dist/types/server/a2a-server.d.ts.map +1 -1
- package/dist/types/server/interfaces/params.d.ts +11 -11
- package/dist/types/server/interfaces/params.d.ts.map +1 -1
- package/dist/types/server/interfaces/server.d.ts +4 -4
- package/dist/types/server/interfaces/server.d.ts.map +1 -1
- package/dist/types/server/interfaces/store.d.ts +6 -1
- package/dist/types/server/interfaces/store.d.ts.map +1 -1
- package/dist/types/server/lib/express-server.d.ts +49 -1
- package/dist/types/server/lib/express-server.d.ts.map +1 -1
- package/dist/types/server/lib/middleware/a2a-methods.d.ts.map +1 -1
- package/dist/types/server/lib/middleware/factory.d.ts +2 -2
- package/dist/types/server/lib/middleware/factory.d.ts.map +1 -1
- package/dist/types/server/lib/state.d.ts +7 -15
- package/dist/types/server/lib/state.d.ts.map +1 -1
- package/dist/types/server/lib/storage/memory.d.ts.map +1 -1
- package/dist/types/server/lib/update/base.d.ts +21 -0
- package/dist/types/server/lib/update/base.d.ts.map +1 -0
- package/dist/types/services/a2a/index.d.ts +3 -0
- package/dist/types/services/a2a/index.d.ts.map +1 -0
- package/dist/types/services/a2a/repository.d.ts +77 -0
- package/dist/types/services/a2a/repository.d.ts.map +1 -0
- package/dist/types/services/a2a/repository.js +2 -0
- package/dist/types/services/a2a/repository.js.map +1 -0
- package/dist/types/services/a2a/service.d.ts +45 -0
- package/dist/types/services/a2a/service.d.ts.map +1 -0
- package/dist/types/services/a2a/service.js +2 -0
- package/dist/types/services/a2a/service.js.map +1 -0
- package/dist/types/services/context.js +29 -0
- package/dist/types/services/context.js.map +1 -0
- package/dist/types/services/dispatcher.js +33 -0
- package/dist/types/services/dispatcher.js.map +1 -0
- package/dist/types/services/index.d.ts +2 -0
- package/dist/types/services/index.d.ts.map +1 -0
- package/dist/types/services/index.js +9 -0
- package/dist/types/services/index.js.map +1 -0
- package/dist/types/services/manager.d.ts +44 -0
- package/dist/types/services/manager.d.ts.map +1 -0
- package/dist/types/services/manager.js +2 -0
- package/dist/types/services/manager.js.map +1 -0
- package/dist/types/services/mcp/index.d.ts +2 -0
- package/dist/types/services/mcp/index.d.ts.map +1 -0
- package/dist/types/services/mcp/service.d.ts +30 -0
- package/dist/types/services/mcp/service.d.ts.map +1 -0
- package/dist/types/services/mcp/service.js +8 -0
- package/dist/types/services/mcp/service.js.map +1 -0
- package/dist/types/services/protocol.js +31 -0
- package/dist/types/services/protocol.js.map +1 -0
- package/dist/types/services/service.js +2 -0
- package/dist/types/services/service.js.map +1 -0
- package/dist/types/transform.js +35 -0
- package/dist/types/transform.js.map +1 -0
- package/dist/types/transport/rpc/parser.d.ts.map +1 -1
- package/dist/types/transport/rpc/rpc-client.d.ts.map +1 -1
- package/dist/types/transport/streaming/stream.d.ts +6 -5
- package/dist/types/transport/streaming/stream.d.ts.map +1 -1
- package/dist/types/types/client.d.ts +26 -9
- package/dist/types/types/client.d.ts.map +1 -1
- package/dist/types/types/express.d.ts +66 -0
- package/dist/types/types/express.d.ts.map +1 -0
- package/dist/types/types/extended-schema.d.ts +88 -33
- package/dist/types/types/extended-schema.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/proxy.d.ts +4 -5
- package/dist/types/types/proxy.d.ts.map +1 -1
- package/dist/types/types/schemas/a2a/auth/auth.d.ts +80 -0
- package/dist/types/types/schemas/a2a/auth/auth.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth/base.d.ts +16 -0
- package/dist/types/types/schemas/a2a/auth/base.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth/index.d.ts +4 -0
- package/dist/types/types/schemas/a2a/auth/index.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/auth/oauth.d.ts +124 -0
- package/dist/types/types/schemas/a2a/auth/oauth.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/error.d.ts +75 -0
- package/dist/types/types/schemas/a2a/error.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/index.d.ts +220 -0
- package/dist/types/types/schemas/a2a/index.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/message.d.ts +90 -0
- package/dist/types/types/schemas/a2a/message.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/notification.d.ts +87 -0
- package/dist/types/types/schemas/a2a/notification.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/parameters.d.ts +188 -0
- package/dist/types/types/schemas/a2a/parameters.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/ref.d.ts +2057 -0
- package/dist/types/types/schemas/a2a/ref.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/rpc.d.ts +104 -0
- package/dist/types/types/schemas/a2a/rpc.d.ts.map +1 -0
- package/dist/types/types/schemas/a2a/task.d.ts +252 -0
- package/dist/types/types/schemas/a2a/task.d.ts.map +1 -0
- package/dist/types/types/schemas/index.d.ts +2 -0
- package/dist/types/types/schemas/index.d.ts.map +1 -0
- package/dist/types/types/services/a2a/repository.d.ts +85 -0
- package/dist/types/types/services/a2a/repository.d.ts.map +1 -0
- package/dist/types/types/services/a2a/service.d.ts +29 -0
- package/dist/types/types/services/a2a/service.d.ts.map +1 -0
- package/dist/types/types/services/context.d.ts +167 -0
- package/dist/types/types/services/context.d.ts.map +1 -0
- package/dist/types/types/services/dispatcher.d.ts +20 -0
- package/dist/types/types/services/dispatcher.d.ts.map +1 -0
- package/dist/types/types/services/index.d.ts +9 -0
- package/dist/types/types/services/index.d.ts.map +1 -0
- package/dist/types/types/services/manager.d.ts +42 -0
- package/dist/types/types/services/manager.d.ts.map +1 -0
- package/dist/types/types/services/mcp/service.d.ts +57 -0
- package/dist/types/types/services/mcp/service.d.ts.map +1 -0
- package/dist/types/types/services/protocol.d.ts +30 -0
- package/dist/types/types/services/protocol.d.ts.map +1 -0
- package/dist/types/types/services/service.d.ts +35 -0
- package/dist/types/types/services/service.d.ts.map +1 -0
- package/dist/types/types/transform.d.ts +61 -0
- package/dist/types/types/transform.d.ts.map +1 -0
- package/dist/types/utils/api/register.d.ts.map +1 -1
- package/dist/types/utils/common/constants.d.ts +4 -4
- package/dist/types/utils/common/constants.d.ts.map +1 -1
- package/dist/types/utils/common/errors.d.ts +19 -15
- package/dist/types/utils/common/errors.d.ts.map +1 -1
- package/dist/types/utils/common/utils.d.ts +2 -13
- package/dist/types/utils/common/utils.d.ts.map +1 -1
- package/dist/types/utils/deployment/task-wrapper.d.ts +5 -6
- package/dist/types/utils/deployment/task-wrapper.d.ts.map +1 -1
- package/dist/types/utils/deployment/test-deployment.d.ts +2 -2
- package/dist/types/utils/deployment/test-deployment.d.ts.map +1 -1
- package/dist/types/utils/logging/log.d.ts.map +1 -1
- package/dist/utils/api/register.js +1 -3
- package/dist/utils/api/register.js.map +1 -1
- package/dist/utils/common/constants.js +37 -24
- package/dist/utils/common/constants.js.map +1 -1
- package/dist/utils/common/errors.js +20 -9
- package/dist/utils/common/errors.js.map +1 -1
- package/dist/utils/common/utils.js +5 -27
- package/dist/utils/common/utils.js.map +1 -1
- package/dist/utils/deployment/agents.js.map +1 -1
- package/dist/utils/deployment/task-wrapper.js +3 -3
- package/dist/utils/deployment/task-wrapper.js.map +1 -1
- package/dist/utils/deployment/test-deployment.js +3 -4
- package/dist/utils/deployment/test-deployment.js.map +1 -1
- package/dist/utils/logging/log.js.map +1 -1
- package/package.json +9 -5
- package/dist/types/context.js +0 -2
- package/dist/types/context.js.map +0 -1
- package/dist/types/schema.js +0 -23
- package/dist/types/schema.js.map +0 -1
- package/dist/types/types/context.d.ts +0 -41
- package/dist/types/types/context.d.ts.map +0 -1
- package/dist/types/types/schema.d.ts +0 -694
- package/dist/types/types/schema.d.ts.map +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BaseExecutionContext } from "../types/services/context.js";
|
|
2
|
+
import { AgentCard } from "../types/index.js";
|
|
3
|
+
import { ServiceDispatcher } from "../types/services/dispatcher.js";
|
|
4
|
+
import { Protocol } from "../types/services/protocol.js";
|
|
5
|
+
import { Service } from "../types/services/service.js";
|
|
6
|
+
import { ManagerInterface, ManagerOptions } from "../types/services/manager.js";
|
|
7
|
+
/**
|
|
8
|
+
* @description The service manager class.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ServiceManager extends ServiceDispatcher implements ManagerInterface {
|
|
11
|
+
/**
|
|
12
|
+
* @description The agent card.
|
|
13
|
+
* @type {AgentCard}
|
|
14
|
+
*/
|
|
15
|
+
readonly card: AgentCard;
|
|
16
|
+
/**
|
|
17
|
+
* @description The constructor.
|
|
18
|
+
* @param {ManagerOptions} params The service manager params.
|
|
19
|
+
*/
|
|
20
|
+
constructor(params: ManagerOptions);
|
|
21
|
+
/**
|
|
22
|
+
* @description Creates a request context.
|
|
23
|
+
* @param {T} req The request.
|
|
24
|
+
* @returns {T} The request context.
|
|
25
|
+
*/
|
|
26
|
+
createRequestContext<T extends BaseExecutionContext>(req: T): T;
|
|
27
|
+
/**
|
|
28
|
+
* @description Gets the agent card.
|
|
29
|
+
* @returns {AgentCard} The agent card.
|
|
30
|
+
*/
|
|
31
|
+
getCard(): AgentCard;
|
|
32
|
+
/**
|
|
33
|
+
* @description Gets a service by protocol.
|
|
34
|
+
* @param {Protocol} protocol The protocol.
|
|
35
|
+
* @returns {Service} The service.
|
|
36
|
+
*/
|
|
37
|
+
getService(protocol: Protocol): Service | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* @description Stops the manager.
|
|
40
|
+
* @returns {Promise<void>} The promise.
|
|
41
|
+
*/
|
|
42
|
+
destroy(): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src/services/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEhF;;GAEG;AACH,qBAAa,cACX,SAAQ,iBACR,YAAW,gBAAgB;IAE3B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB;;;OAGG;gBACS,MAAM,EAAE,cAAc;IAKlC;;;;OAIG;IACH,oBAAoB,CAAC,CAAC,SAAS,oBAAoB,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;IAc/D;;;OAGG;IACH,OAAO,IAAI,SAAS;IAIpB;;;;OAIG;IACH,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS;IAInD;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAK/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../src/types/services/manager.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/mcp/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { McpServer, ToolCallback } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
3
|
+
import { Protocol } from "../../types/services/protocol.js";
|
|
4
|
+
import { ExecutionContext, MCPExecutionContext } from "../../types/services/context.js";
|
|
5
|
+
import { AgentSkill } from "../../types/index.js";
|
|
6
|
+
import { Implementation } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
+
import { ServerOptions } from "@modelcontextprotocol/sdk/server/index.js";
|
|
8
|
+
import { AgentEngine } from "../../types/services/context.js";
|
|
9
|
+
import { ZodRawShape } from "zod";
|
|
10
|
+
import { MCPTool, MCPServiceInterface } from "../../types/services/mcp/service.js";
|
|
11
|
+
export declare class MCPService<T extends StreamableHTTPServerTransport = StreamableHTTPServerTransport> extends McpServer implements MCPServiceInterface {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly protocol: Protocol.MCP;
|
|
14
|
+
readonly engine: AgentEngine;
|
|
15
|
+
constructor({ serverInfo, engine, options, skills, }: {
|
|
16
|
+
serverInfo: Implementation;
|
|
17
|
+
engine: AgentEngine;
|
|
18
|
+
skills?: AgentSkill[];
|
|
19
|
+
options?: ServerOptions;
|
|
20
|
+
});
|
|
21
|
+
initialize(skills: AgentSkill[]): void;
|
|
22
|
+
execute({ executionContext, }: {
|
|
23
|
+
executionContext: ExecutionContext<MCPExecutionContext>;
|
|
24
|
+
engine: AgentEngine;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
stop(): Promise<void>;
|
|
27
|
+
static mcpFactory<Args extends MCPExecutionContext = MCPExecutionContext>(engine: AgentEngine): (args: Args["params"]) => Promise<string>;
|
|
28
|
+
static skillToTool<Args extends ZodRawShape = ZodRawShape>(skill: AgentSkill, argShape: Args, agentHandler: (...args: Parameters<ToolCallback<Args>>) => Promise<string>): MCPTool<Args>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/mcp/service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACb,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAEL,cAAc,EACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC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+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/types/services/mcp/service.ts"],"names":[],"mappings":"AAKA,OAAO,CAAkB,MAAM,KAAK,CAAC;AAKrC;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description The protocol enum.
|
|
3
|
+
*/
|
|
4
|
+
export var Protocol;
|
|
5
|
+
(function (Protocol) {
|
|
6
|
+
/**
|
|
7
|
+
* @description The A2A protocol.
|
|
8
|
+
*/
|
|
9
|
+
Protocol["A2A"] = "a2a";
|
|
10
|
+
/**
|
|
11
|
+
* @description The MCP protocol.
|
|
12
|
+
*/
|
|
13
|
+
Protocol["MCP"] = "mcp";
|
|
14
|
+
/**
|
|
15
|
+
* @description The ACP protocol.
|
|
16
|
+
*/
|
|
17
|
+
Protocol["ACP"] = "acp";
|
|
18
|
+
/**
|
|
19
|
+
* @description The CHAT protocol.
|
|
20
|
+
*/
|
|
21
|
+
Protocol["CHAT"] = "chat";
|
|
22
|
+
/**
|
|
23
|
+
* @description The NLWeb protocol.
|
|
24
|
+
*/
|
|
25
|
+
Protocol["NLWEB"] = "nlweb";
|
|
26
|
+
/**
|
|
27
|
+
* @description The custom protocol for user-defined services.
|
|
28
|
+
*/
|
|
29
|
+
Protocol["CUSTOM"] = "custom";
|
|
30
|
+
})(Protocol || (Protocol = {}));
|
|
31
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/types/services/protocol.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,QAyBX;AAzBD,WAAY,QAAQ;IAClB;;OAEG;IACH,uBAAW,CAAA;IACX;;OAEG;IACH,uBAAW,CAAA;IACX;;OAEG;IACH,uBAAW,CAAA;IACX;;OAEG;IACH,yBAAa,CAAA;IACb;;OAEG;IACH,2BAAe,CAAA;IACf;;OAEG;IACH,6BAAiB,CAAA;AACnB,CAAC,EAzBW,QAAQ,KAAR,QAAQ,QAyBnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/types/services/service.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-safe object key transformation utilities using built-in TypeScript utility types
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Runtime function to transform object keys based on configuration
|
|
6
|
+
* Uses the TransformKeys utility type for return type inference
|
|
7
|
+
*/
|
|
8
|
+
export function transformKeys(obj, config) {
|
|
9
|
+
const result = {};
|
|
10
|
+
// Process each property in the original object
|
|
11
|
+
for (const key in obj) {
|
|
12
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
13
|
+
const newKeyName = config[key];
|
|
14
|
+
if (typeof newKeyName === "string") {
|
|
15
|
+
// Rename the key
|
|
16
|
+
result[newKeyName] = obj[key];
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
// Keep original key
|
|
20
|
+
result[key] = obj[key];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Utility to create a type-safe rename configuration with better intellisense
|
|
28
|
+
* The returned function preserves literal string types
|
|
29
|
+
*/
|
|
30
|
+
export function createRenameConfig() {
|
|
31
|
+
return function (config) {
|
|
32
|
+
return config;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../src/types/transform.ts"],"names":[],"mappings":"AAAA;;GAEG;AAkCH;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,GAAM,EACN,MAAc;IAEd,MAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,+CAA+C;IAC/C,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;YACnD,MAAM,UAAU,GAAG,MAAM,CAAC,GAAmB,CAAC,CAAC;YAE/C,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;gBACnC,iBAAiB;gBACjB,MAAM,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;YAChC,CAAC;iBAAM,CAAC;gBACN,oBAAoB;gBACpB,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAkC,CAAC;AAC5C,CAAC;AAYD;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAA0C,MAAc;QAC7D,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../src/transport/rpc/parser.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../src/transport/rpc/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAI/E;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAqC5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-client.d.ts","sourceRoot":"","sources":["../../../../src/transport/rpc/rpc-client.ts"],"names":[],"mappings":"AAUA,OAAO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AG,CAAC,QAAQ,CAAC,CAAC,CAAC,CA+CrC;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EACxC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,CAAC,CAAC,CA2BZ;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,SAAS,UAAU,EACtB,GAAG,SAAS,eAAe,EAE3B,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,EACrB,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,EACrB,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACpC,YAAY,GAAE,kBAAkB,GAAG,mBAAwC,GAC1E,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CASrC;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,GAAG,EAAE,GAAG,EACR,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACpC,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,CAAC,CAAC,CAGZ"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Response } from "express";
|
|
2
|
-
import { JSONRPCError } from "../../types/
|
|
3
|
-
import { TaskEvent } from "../../types/extended-schema.js";
|
|
2
|
+
import { JSONRPCError } from "../../types/index.js";
|
|
3
|
+
import { TaskEvent, UpdateEvent } from "../../types/extended-schema.js";
|
|
4
4
|
import { TaskStore, TaskAndHistory } from "../../server/interfaces/store.js";
|
|
5
|
-
import { TaskContext,
|
|
5
|
+
import { AgentEngine, ExecutionContext, TaskContext, A2AExecutionContext } from "../../types/index.js";
|
|
6
|
+
import { SendStreamingMessageRequest, TaskResubscriptionRequest } from "../../types/index.js";
|
|
6
7
|
/**
|
|
7
8
|
* Sets up a Server-Sent Events stream with appropriate headers
|
|
8
9
|
* and initializes tracking for the stream.
|
|
@@ -21,7 +22,7 @@ export declare function setupSseStream(res: Response, taskId: string, initialSta
|
|
|
21
22
|
* @param reqId The request ID
|
|
22
23
|
* @param eventData The event data to send
|
|
23
24
|
*/
|
|
24
|
-
export declare function sendSSEEvent(res: Response, update:
|
|
25
|
+
export declare function sendSSEEvent(res: Response, id: string, update: UpdateEvent): void;
|
|
25
26
|
/**
|
|
26
27
|
* Sends a Server-Sent Event with error data.
|
|
27
28
|
* @param res The Express Response object
|
|
@@ -37,5 +38,5 @@ export declare function sendSSEError(res: Response, error: JSONRPCError<any, any
|
|
|
37
38
|
* @param context The task context
|
|
38
39
|
* @param initialData The initial task data
|
|
39
40
|
*/
|
|
40
|
-
export declare function processTaskStream(taskStore: TaskStore,
|
|
41
|
+
export declare function processTaskStream<T extends A2AExecutionContext<SendStreamingMessageRequest | TaskResubscriptionRequest>>(context: TaskContext, taskStore: TaskStore, engine: AgentEngine, res: Response, taskId: string, initialData: TaskAndHistory, onCancel: (context: TaskContext, data: TaskAndHistory, res: Response) => Promise<void>, onEnd: (taskId: string, res: Response) => Promise<void>, executionContext: ExecutionContext<T>): Promise<void>;
|
|
41
42
|
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../src/transport/streaming/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../src/transport/streaming/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,YAAY,EAAmB,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE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|
|
|
1
|
-
import { TaskPushNotificationConfig,
|
|
2
|
-
import type { AgentCard, TaskQueryParams,
|
|
1
|
+
import { TaskPushNotificationConfig, TaskIdParams, Task } from "./extended-schema.js";
|
|
2
|
+
import type { AgentCard, TaskQueryParams, MessageSendParams, Message, UpdateEvent } from "./extended-schema.js";
|
|
3
3
|
/**
|
|
4
4
|
* @interface Client
|
|
5
5
|
* @description Defines the standard contract for an A2A (Agent-to-Agent) client implementation.
|
|
@@ -27,19 +27,36 @@ export interface Client {
|
|
|
27
27
|
refreshAgentCard(): Promise<AgentCard>;
|
|
28
28
|
/**
|
|
29
29
|
* @description Sends a task request to the agent server.
|
|
30
|
-
* @param {
|
|
30
|
+
* @param {MessageSendParams} params Parameters required to send the task, including the task definition and metadata.
|
|
31
31
|
* @returns {Promise<Task | null>} A promise that resolves with the initial Task object representing the submitted task, or null if the submission failed.
|
|
32
32
|
* @async
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
sendMessage(params: MessageSendParams): Promise<Message | Task | null>;
|
|
35
35
|
/**
|
|
36
|
+
* @deprecated Use sendMessage instead.
|
|
37
|
+
* @description Sends a task request to the agent server.
|
|
38
|
+
* @param {MessageSendParams} params Parameters required to send the task, including the task definition and metadata.
|
|
39
|
+
* @returns {Promise<Task | null>} A promise that resolves with the initial Task object representing the submitted task, or null if the submission failed.
|
|
40
|
+
* @async
|
|
41
|
+
*/
|
|
42
|
+
sendTask(params: MessageSendParams): Promise<Message | Task | null>;
|
|
43
|
+
/**
|
|
44
|
+
* @description Sends a task request and subscribes to real-time updates (status changes, artifact updates) for that task.
|
|
45
|
+
* This uses a streaming connection if available.
|
|
46
|
+
* @param {MessageSendParams} params Parameters required to send the task.
|
|
47
|
+
* @returns {AsyncIterable<UpdateEvent>} An async iterable that yields task status and artifact updates.
|
|
48
|
+
* @async
|
|
49
|
+
*/
|
|
50
|
+
sendStreamingMessage(params: MessageSendParams): AsyncIterable<UpdateEvent>;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated Use sendStreamingMessage instead.
|
|
36
53
|
* @description Sends a task request and subscribes to real-time updates (status changes, artifact updates) for that task.
|
|
37
54
|
* This uses a streaming connection if available.
|
|
38
|
-
* @param {
|
|
39
|
-
* @returns {AsyncIterable<
|
|
55
|
+
* @param {MessageSendParams} params Parameters required to send the task.
|
|
56
|
+
* @returns {AsyncIterable<UpdateEvent>} An async iterable that yields task status and artifact updates.
|
|
40
57
|
* @async
|
|
41
58
|
*/
|
|
42
|
-
sendTaskSubscribe(params:
|
|
59
|
+
sendTaskSubscribe(params: MessageSendParams): AsyncIterable<UpdateEvent>;
|
|
43
60
|
/**
|
|
44
61
|
* @description Retrieves the current state of a specific task by its ID.
|
|
45
62
|
* @param {TaskQueryParams} params Parameters containing the task ID to query.
|
|
@@ -74,10 +91,10 @@ export interface Client {
|
|
|
74
91
|
* @description Resubscribes to updates for an existing task, potentially after a connection drop or client restart.
|
|
75
92
|
* This allows resuming the stream of status and artifact updates.
|
|
76
93
|
* @param {TaskQueryParams} params Parameters containing the task ID to resubscribe to.
|
|
77
|
-
* @returns {AsyncIterable<
|
|
94
|
+
* @returns {AsyncIterable<UpdateEvent>} An async iterable that yields task status and artifact updates.
|
|
78
95
|
* @async
|
|
79
96
|
*/
|
|
80
|
-
resubscribeTask(params: TaskQueryParams): AsyncIterable<
|
|
97
|
+
resubscribeTask(params: TaskQueryParams): AsyncIterable<UpdateEvent>;
|
|
81
98
|
/**
|
|
82
99
|
* @description Checks if the agent server supports a specific capability.
|
|
83
100
|
* @param {"streaming" | "pushNotifications" | "stateTransitionHistory"} capability The capability to check for.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/types/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/types/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC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AAa,CAAC,WAAW,CAAC,CAAC;IAErE;;;;;OAKG;IACH,QAAQ,CACN,UAAU,EAAE,WAAW,GAAG,mBAAmB,GAAG,wBAAwB,GACvE,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;;OAKG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAElD;;;;;OAKG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7C;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IACH,YAAY,IAAI,IAAI,CAAC;CACtB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
import http from "http";
|
|
3
|
+
import { CorsOptions } from "cors";
|
|
4
|
+
import { ManagerOptions } from "./services/manager.js";
|
|
5
|
+
import { Protocol } from "./services/protocol.js";
|
|
6
|
+
import { Service } from "./services/service.js";
|
|
7
|
+
/**
|
|
8
|
+
* @description The express server options.
|
|
9
|
+
*/
|
|
10
|
+
export interface ExpressServerOptions extends Omit<ManagerOptions, "services"> {
|
|
11
|
+
/**
|
|
12
|
+
* @description The services.
|
|
13
|
+
* @type {Partial<Record<Protocol, Service>>}
|
|
14
|
+
*/
|
|
15
|
+
services?: Partial<Record<Protocol, Service>>;
|
|
16
|
+
/**
|
|
17
|
+
* @description The app.
|
|
18
|
+
* @type {express.Express}
|
|
19
|
+
*/
|
|
20
|
+
app?: express.Express;
|
|
21
|
+
/**
|
|
22
|
+
* @description The cors options.
|
|
23
|
+
* @type {CorsOptions}
|
|
24
|
+
*/
|
|
25
|
+
corsOptions?: CorsOptions;
|
|
26
|
+
/**
|
|
27
|
+
* @description The base path.
|
|
28
|
+
* @type {string}
|
|
29
|
+
*/
|
|
30
|
+
basePath?: string;
|
|
31
|
+
/**
|
|
32
|
+
* @description The fallback path.
|
|
33
|
+
* @type {string}
|
|
34
|
+
*/
|
|
35
|
+
fallbackPath?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @description The register.
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
*/
|
|
40
|
+
register?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* @description The port.
|
|
43
|
+
* @type {number}
|
|
44
|
+
*/
|
|
45
|
+
port?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @description The express server interface.
|
|
49
|
+
*/
|
|
50
|
+
export interface ExpressServerInterface {
|
|
51
|
+
/**
|
|
52
|
+
* @description Gets the app.
|
|
53
|
+
* @returns {express.Express} The app.
|
|
54
|
+
*/
|
|
55
|
+
getApp(): express.Express;
|
|
56
|
+
/**
|
|
57
|
+
* @description Starts the server.
|
|
58
|
+
* @returns {Promise<http.Server>} The server.
|
|
59
|
+
*/
|
|
60
|
+
start(): Promise<http.Server>;
|
|
61
|
+
/**
|
|
62
|
+
* @description Stops the server.
|
|
63
|
+
*/
|
|
64
|
+
stop(): Promise<void>;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=express.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../../src/types/express.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IAC5E;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9C;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAC1B;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
|
|
@@ -3,54 +3,106 @@
|
|
|
3
3
|
* These are extensions to the standard A2A protocol defined by Google:
|
|
4
4
|
* @see https://github.com/google/A2A/blob/main/samples/js/src/schema.ts
|
|
5
5
|
*/
|
|
6
|
-
import type { TaskStatusUpdateEvent, TaskArtifactUpdateEvent, TaskStatus,
|
|
6
|
+
import type { TaskStatusUpdateEvent, TaskArtifactUpdateEvent, TaskStatus, A2ARequest, JSONRPCRequest, JSONRPCResponse, AgentCard, FileWithBytes, FileWithUri, Task, Message, MessageSendConfiguration } from "./schemas/a2a/index.js";
|
|
7
|
+
import { ExecutionContext, executionContextConfig } from "./services/context.js";
|
|
8
|
+
import { Transformed } from "./transform.js";
|
|
9
|
+
import { AgentEngine } from "./services/index.js";
|
|
7
10
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
11
|
+
* Represents the content of a file, either as base64 encoded bytes or a URI.
|
|
12
|
+
* @description Ensures that either 'bytes' or 'uri' is provided, but not both. (Note: This constraint is informational in TypeScript types).
|
|
10
13
|
*/
|
|
14
|
+
export type FileContent = FileWithBytes | FileWithUri;
|
|
11
15
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
16
|
+
* Represents the possible types of events that can be yielded by a TaskHandler.
|
|
17
|
+
* @description Either a partial TaskStatus (without the server-managed timestamp)
|
|
18
|
+
* or a complete Artifact object.
|
|
19
|
+
*/
|
|
20
|
+
export type TaskEvent = TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
|
|
21
|
+
/**
|
|
22
|
+
* Represents the possible types of updates that can be yielded by a TaskHandler.
|
|
23
|
+
* @description Either a Message, Task, TaskStatusUpdateEvent, or TaskArtifactUpdateEvent.
|
|
24
|
+
*/
|
|
25
|
+
export type UpdateEvent = Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated use UpdateEvent instead
|
|
28
|
+
* Represents the possible types of updates a TaskHandler can yield.
|
|
29
|
+
* Either a partial TaskStatus (without the server-managed timestamp)
|
|
30
|
+
* or a complete Artifact object.
|
|
14
31
|
*/
|
|
15
|
-
export
|
|
32
|
+
export type TaskYieldUpdate = UpdateEvent;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated This interface will be removed in the future. Use TaskStatus instead.
|
|
35
|
+
* Represents the possible types of updates that can be yielded by a TaskHandler.
|
|
36
|
+
* Either a partial TaskStatus (without the server-managed timestamp)
|
|
37
|
+
* or a complete Artifact object.
|
|
38
|
+
*/
|
|
39
|
+
export type ExtendedTaskStatusUpdate = Omit<TaskStatus, "timestamp">;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated This interface will be removed in the future. Use ExecutionContext instead.
|
|
42
|
+
* Context object provided to the TaskHandler.
|
|
43
|
+
* Contains the information needed for the handler to process the task.
|
|
44
|
+
*/
|
|
45
|
+
export interface TaskContext extends Transformed<Omit<ExecutionContext, "getRequestParams" | "protocol">, typeof executionContextConfig> {
|
|
16
46
|
/**
|
|
17
|
-
* The
|
|
47
|
+
* The context ID of the task.
|
|
18
48
|
*/
|
|
19
|
-
|
|
49
|
+
contextId: string;
|
|
20
50
|
/**
|
|
21
|
-
*
|
|
51
|
+
* The current state of the task when the handler is invoked or resumed.
|
|
52
|
+
* This is a snapshot - the latest state may need to be reloaded during async operations.
|
|
22
53
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
54
|
+
task: Task;
|
|
55
|
+
/**
|
|
56
|
+
* The specific user message that triggered this handler invocation or resumption.
|
|
57
|
+
*/
|
|
58
|
+
userMessage: Message;
|
|
59
|
+
/**
|
|
60
|
+
* Function to check if cancellation has been requested for this task.
|
|
61
|
+
* Handlers should check this periodically during long-running operations.
|
|
62
|
+
* @returns True if cancellation has been requested, false otherwise.
|
|
63
|
+
*/
|
|
64
|
+
isCancelled(): boolean;
|
|
30
65
|
/**
|
|
31
|
-
* The
|
|
66
|
+
* The message history associated with the task up to the point the handler is invoked.
|
|
32
67
|
*/
|
|
33
|
-
|
|
68
|
+
history: Message[];
|
|
34
69
|
/**
|
|
35
|
-
*
|
|
70
|
+
* @description The latest user message that triggered this handler invocation or resumption.
|
|
71
|
+
* @note It's unclear whether this is necessary as userMessage already exists
|
|
36
72
|
*/
|
|
37
|
-
|
|
73
|
+
latestUserMessage?: Message;
|
|
74
|
+
/**
|
|
75
|
+
* The configuration for the task.
|
|
76
|
+
*/
|
|
77
|
+
configuration?: MessageSendConfiguration;
|
|
38
78
|
}
|
|
39
79
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
80
|
+
* Defines the signature for a task handler function.
|
|
81
|
+
*
|
|
82
|
+
* Handlers are implemented as async generators. They receive context about the
|
|
83
|
+
* task and the triggering message. They perform work and yield status
|
|
84
|
+
* or artifact updates (TaskYieldUpdate). The server consumes these yields,
|
|
85
|
+
* updates the task state in the store, and streams events if applicable.
|
|
86
|
+
*
|
|
87
|
+
* @param context The TaskContext object containing task details and state.
|
|
88
|
+
* @yields Updates to the task's status or artifacts.
|
|
89
|
+
* @returns Optionally returns the final complete Task object (needed for non-streaming 'message/send').
|
|
90
|
+
* If void is returned, the server uses the last known state after processing all yields.
|
|
43
91
|
*/
|
|
44
|
-
export type
|
|
45
|
-
export type TaskEvent = TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
|
|
92
|
+
export type TaskHandler = AgentEngine;
|
|
46
93
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
|
|
94
|
+
* @description This interface will be removed in the future. Use A2AContext instead.
|
|
95
|
+
* Represents the parameters for an A2A request.
|
|
96
|
+
*/
|
|
97
|
+
export type A2AContext = Pick<A2ARequest, "params">;
|
|
98
|
+
/**
|
|
99
|
+
* @description This interface will be removed in the future. Use A2AContext instead.
|
|
100
|
+
* Represents the parameters for an A2A request.
|
|
101
|
+
*/
|
|
102
|
+
export type RequestParams = Required<A2AContext>;
|
|
103
|
+
/**
|
|
104
|
+
* @description Represents the parameters for an A2A request.
|
|
50
105
|
*/
|
|
51
|
-
export type TaskYieldUpdate = Omit<TaskStatus, "timestamp"> | Artifact;
|
|
52
|
-
export type ExtendedTaskStatusUpdate = Omit<TaskStatus, "timestamp">;
|
|
53
|
-
export type RequestParams = Required<Pick<A2ARequest, "params">>["params"];
|
|
54
106
|
export interface ServerDeploymentRequestParams {
|
|
55
107
|
/**
|
|
56
108
|
* The name of the server
|
|
@@ -113,7 +165,10 @@ export interface TestServerDeploymentRequest extends JSONRPCRequest {
|
|
|
113
165
|
*/
|
|
114
166
|
params: ServerDeploymentRequestParams;
|
|
115
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* @description Represents the response for a server deployment request.
|
|
170
|
+
*/
|
|
116
171
|
export type ServerDeploymentResponse = JSONRPCResponse<ServerDeploymentSuccessResponseParams>;
|
|
117
|
-
export * from "./
|
|
118
|
-
export type { A2AError as A2AErrorType } from "./
|
|
172
|
+
export * from "./schemas/a2a/index.js";
|
|
173
|
+
export type { A2AError as A2AErrorType } from "./schemas/a2a/index.js";
|
|
119
174
|
//# sourceMappingURL=extended-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extended-schema.d.ts","sourceRoot":"","sources":["../../../src/types/extended-schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"extended-schema.d.ts","sourceRoot":"","sources":["../../../src/types/extended-schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACV,UAAU,EACV,cAAc,EACd,eAAe,EACf,SAAS,EACT,aAAa,EACb,WAAW,EACX,IAAI,EACJ,OAAO,EACP,wBAAwB,EACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,WAAW,CAAC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,qBAAqB,GAAG,uBAAuB,CAAC;AAExE;;;GAGG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,IAAI,GACJ,qBAAqB,GACrB,uBAAuB,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,WACf,SAAQ,WAAW,CACjB,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,UAAU,CAAC,EACvD,OAAO,sB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AW,2BAA4B,SAAQ,cAAc;IACjE;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,MAAM,EAAE,6BAA6B,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAClC,eAAe,CAAC,qCAAqC,CAAC,CAAC;AAEzD,cAAc,wBAAwB,CAAC;AACvC,YAAY,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TaskHandler } from "./context.js";
|
|
1
|
+
import { UpdateEvent, TaskHandler } from "./extended-schema.js";
|
|
3
2
|
import { Client } from "./client.js";
|
|
4
3
|
/**
|
|
5
4
|
* Represents a proxy function for sending task yield updates.
|
|
6
5
|
* This function is typically provided by the host environment to allow
|
|
7
6
|
* an agent to communicate updates about its task execution.
|
|
8
|
-
* @param
|
|
7
|
+
* @param updateEvent - The update object yielded by the task.
|
|
9
8
|
* @returns A promise that resolves when the update has been processed.
|
|
10
9
|
*/
|
|
11
|
-
export type TaskProxy = (
|
|
10
|
+
export type TaskProxy = (updateEvent: UpdateEvent) => Promise<void>;
|
|
12
11
|
/**
|
|
13
12
|
* Properties for the TaskManager function.
|
|
14
13
|
*/
|
|
15
14
|
export interface TaskManagerProps {
|
|
16
15
|
/**
|
|
17
16
|
* The core task-handling generator function of an agent.
|
|
18
|
-
* This function takes a `TaskContext` and yields `
|
|
17
|
+
* This function takes a `TaskContext` and yields `UpdateEvent` objects,
|
|
19
18
|
* eventually returning a `Task` or void.
|
|
20
19
|
*/
|
|
21
20
|
taskHandler: TaskHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../../src/types/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../../src/types/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/C;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE1E;;;;GAIG;AAEH,MAAM,WAAW,WACf,SAAQ,IAAI,CACV,MAAM,EACJ,mBAAmB,GACnB,SAAS,GACT,YAAY,GACZ,yBAAyB,GACzB,yBAAyB,GACzB,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