@artinet/sdk 0.3.2 → 0.4.3
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 +58 -0
- package/dist/server/a2a-server.js +29 -16
- package/dist/server/a2a-server.js.map +1 -1
- package/dist/server/lib/express-server.js +2 -10
- package/dist/server/lib/express-server.js.map +1 -1
- package/dist/server/lib/middleware/a2a-methods.js +8 -8
- package/dist/server/lib/middleware/a2a-methods.js.map +1 -1
- package/dist/server/lib/state.js +3 -3
- package/dist/server/lib/state.js.map +1 -1
- package/dist/transport/rpc/parser.js +5 -3
- package/dist/transport/rpc/parser.js.map +1 -1
- package/dist/types/client/a2a-client.d.ts.map +1 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/client/interfaces/client.d.ts.map +1 -0
- package/dist/types/extended-schema.js.map +1 -1
- package/dist/types/index.d.ts +5 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/schema.js.map +1 -1
- package/dist/{server → types/server}/a2a-server.d.ts +5 -0
- package/dist/types/server/a2a-server.d.ts.map +1 -0
- package/dist/types/server/index.d.ts.map +1 -0
- package/dist/types/server/interfaces/context.d.ts.map +1 -0
- package/dist/types/server/interfaces/params.d.ts.map +1 -0
- package/dist/{server → types/server}/interfaces/server.d.ts +1 -0
- package/dist/types/server/interfaces/server.d.ts.map +1 -0
- package/dist/types/server/interfaces/store.d.ts.map +1 -0
- package/dist/{server → types/server}/lib/express-server.d.ts +0 -2
- package/dist/types/server/lib/express-server.d.ts.map +1 -0
- package/dist/types/server/lib/json-middleware.d.ts.map +1 -0
- package/dist/types/server/lib/middleware/a2a-methods.d.ts.map +1 -0
- package/dist/types/server/lib/middleware/factory.d.ts.map +1 -0
- package/dist/{server → types/server}/lib/state.d.ts +1 -1
- package/dist/types/server/lib/state.d.ts.map +1 -0
- package/dist/types/server/lib/storage/file.d.ts.map +1 -0
- package/dist/types/server/lib/storage/memory.d.ts.map +1 -0
- package/dist/types/transport/index.d.ts.map +1 -0
- package/dist/types/transport/rpc/parser.d.ts.map +1 -0
- package/dist/types/transport/rpc/rpc-client.d.ts.map +1 -0
- package/dist/types/transport/streaming/event-stream.d.ts.map +1 -0
- package/dist/types/transport/streaming/stream.d.ts.map +1 -0
- package/dist/types/{extended-schema.d.ts → types/extended-schema.d.ts} +67 -1
- package/dist/types/types/extended-schema.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/{schema.d.ts → types/schema.d.ts} +56 -91
- package/dist/types/types/schema.d.ts.map +1 -0
- package/dist/types/utils/api/register.d.ts.map +1 -0
- package/dist/types/utils/common/constants.d.ts.map +1 -0
- package/dist/types/utils/common/errors.d.ts +26 -0
- package/dist/types/utils/common/errors.d.ts.map +1 -0
- package/dist/types/utils/common/utils.d.ts.map +1 -0
- package/dist/types/utils/deployment/bundler.d.ts +11 -0
- package/dist/types/utils/deployment/bundler.d.ts.map +1 -0
- package/dist/types/utils/deployment/task-wrapper.d.ts +39 -0
- package/dist/types/utils/deployment/task-wrapper.d.ts.map +1 -0
- package/dist/types/utils/deployment/test-deployment.d.ts +23 -0
- package/dist/types/utils/deployment/test-deployment.d.ts.map +1 -0
- package/dist/{utils → types/utils}/index.d.ts +3 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/logging/log.d.ts.map +1 -0
- package/dist/types/utils/logging/logger.d.ts.map +1 -0
- package/dist/utils/common/errors.js.map +1 -1
- package/dist/utils/common/utils.js +7 -7
- package/dist/utils/common/utils.js.map +1 -1
- package/dist/utils/deployment/bundler.js +48 -0
- package/dist/utils/deployment/bundler.js.map +1 -0
- package/dist/utils/deployment/task-wrapper.js +58 -0
- package/dist/utils/deployment/task-wrapper.js.map +1 -0
- package/dist/utils/deployment/test-deployment.js +61 -0
- package/dist/utils/deployment/test-deployment.js.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +6 -4
- package/dist/client/a2a-client.d.ts.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/interfaces/client.d.ts.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/server/a2a-server.d.ts.map +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/interfaces/context.d.ts.map +0 -1
- package/dist/server/interfaces/params.d.ts.map +0 -1
- package/dist/server/interfaces/server.d.ts.map +0 -1
- package/dist/server/interfaces/store.d.ts.map +0 -1
- package/dist/server/lib/express-server.d.ts.map +0 -1
- package/dist/server/lib/json-middleware.d.ts.map +0 -1
- package/dist/server/lib/middleware/a2a-methods.d.ts.map +0 -1
- package/dist/server/lib/middleware/factory.d.ts.map +0 -1
- package/dist/server/lib/state.d.ts.map +0 -1
- package/dist/server/lib/storage/file.d.ts.map +0 -1
- package/dist/server/lib/storage/memory.d.ts.map +0 -1
- package/dist/transport/index.d.ts.map +0 -1
- package/dist/transport/rpc/parser.d.ts.map +0 -1
- package/dist/transport/rpc/rpc-client.d.ts.map +0 -1
- package/dist/transport/streaming/event-stream.d.ts.map +0 -1
- package/dist/transport/streaming/stream.d.ts.map +0 -1
- package/dist/types/extended-schema.d.ts.map +0 -1
- package/dist/types/schema.d.ts.map +0 -1
- package/dist/utils/api/register.d.ts.map +0 -1
- package/dist/utils/common/constants.d.ts.map +0 -1
- package/dist/utils/common/errors.d.ts +0 -26
- package/dist/utils/common/errors.d.ts.map +0 -1
- package/dist/utils/common/utils.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/logging/log.d.ts.map +0 -1
- package/dist/utils/logging/logger.d.ts.map +0 -1
- /package/dist/{client → types/client}/a2a-client.d.ts +0 -0
- /package/dist/{client → types/client}/index.d.ts +0 -0
- /package/dist/{client → types/client}/interfaces/client.d.ts +0 -0
- /package/dist/{server → types/server}/index.d.ts +0 -0
- /package/dist/{server → types/server}/interfaces/context.d.ts +0 -0
- /package/dist/{server → types/server}/interfaces/params.d.ts +0 -0
- /package/dist/{server → types/server}/interfaces/store.d.ts +0 -0
- /package/dist/{server → types/server}/lib/json-middleware.d.ts +0 -0
- /package/dist/{server → types/server}/lib/middleware/a2a-methods.d.ts +0 -0
- /package/dist/{server → types/server}/lib/middleware/factory.d.ts +0 -0
- /package/dist/{server → types/server}/lib/storage/file.d.ts +0 -0
- /package/dist/{server → types/server}/lib/storage/memory.d.ts +0 -0
- /package/dist/{transport → types/transport}/index.d.ts +0 -0
- /package/dist/{transport → types/transport}/rpc/parser.d.ts +0 -0
- /package/dist/{transport → types/transport}/rpc/rpc-client.d.ts +0 -0
- /package/dist/{transport → types/transport}/streaming/event-stream.d.ts +0 -0
- /package/dist/{transport → types/transport}/streaming/stream.d.ts +0 -0
- /package/dist/{utils → types/utils}/api/register.d.ts +0 -0
- /package/dist/{utils → types/utils}/common/constants.d.ts +0 -0
- /package/dist/{utils → types/utils}/common/utils.d.ts +0 -0
- /package/dist/{utils → types/utils}/logging/log.d.ts +0 -0
- /package/dist/{utils → types/utils}/logging/logger.d.ts +0 -0
|
@@ -24,5 +24,5 @@ export declare function updateState(taskStore: TaskStore, current: TaskAndHistor
|
|
|
24
24
|
* @param metadata Optional metadata
|
|
25
25
|
* @returns The task and history
|
|
26
26
|
*/
|
|
27
|
-
export declare function loadState(taskStore: TaskStore, taskId: string, message: Message, sessionId?: string, metadata?: Record<string, unknown>
|
|
27
|
+
export declare function loadState(taskStore: TaskStore, taskId: string, message: Message, sessionId?: string, metadata?: Record<string, unknown>): Promise<TaskAndHistory>;
|
|
28
28
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/server/lib/state.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,OAAO,EACP,eAAe,EAChB,MAAM,gCAAgC,CAAC;AACxC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ources":["../../../../../src/server/lib/storage/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAMtE;;;GAGG;AACH,qBAAa,SAAU,YAAW,SAAS;IACzC,OAAO,CAAC,OAAO,CAAS;IAExB;;;OAGG;gBACS,OAAO,EAAE,MAAM;IAI3B;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAIvB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAI1B;;;OAGG;YACW,aAAa;IAa3B;;;;;OAKG;YACW,aAAa;IAY3B;;;;OAIG;YACW,YAAY;IAc1B;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAW5B;;;;OAIG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IA4C1D;;;;OAIG;IACG,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../../../src/server/lib/storage/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtE;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,SAAS;IACjD,OAAO,CAAC,KAAK,CAA0C;IAEvD;;;;OAIG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAa1D;;;;OAIG;IACG,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAShD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transport/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../src/transport/rpc/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGjE;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAmC5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc-client.d.ts","sourceRoot":"","sources":["../../../../src/transport/rpc/rpc-client.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,UAAU,EACX,MAAM,gCAAgC,CAAC;AAIxC;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,SAAS,UAAU,EACzD,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,EACrB,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,EACrB,SAAS,GAAE,MAAM,GAAG,MAAiB,GACpC,cAAc,CAOhB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,SAAS,UAAU,EAC7D,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,QAAQ,CAAC,CAsBnB;AAED;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,GAAG,EACR,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACnC,OAAO,CAAC,QAAQ,CAAC,CAiBnB;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,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,iBAAiB,CACrC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,cAAc,EAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,EAChE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,GACtD,OAAO,CAAC,IAAI,CAAC,CA+Ef"}
|
|
@@ -3,12 +3,13 @@
|
|
|
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 {
|
|
6
|
+
import type { TaskStatusUpdateEvent, TaskArtifactUpdateEvent, TaskStatus, Artifact, A2ARequest, JSONRPCRequest, JSONRPCResponse, AgentCard, JSONRPCMessage, JSONRPCError } from "./schema.js";
|
|
7
7
|
/**
|
|
8
8
|
* Improved JSON-RPC Response types using discriminated unions
|
|
9
9
|
* These provide better type safety than the standard optional field approach
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
|
+
* @deprecated Use JSONRPCResponse instead
|
|
12
13
|
* Represents a successful JSON-RPC response with a result.
|
|
13
14
|
*/
|
|
14
15
|
export interface JSONRPCSuccessResponse<R = any> extends JSONRPCMessage {
|
|
@@ -22,6 +23,7 @@ export interface JSONRPCSuccessResponse<R = any> extends JSONRPCMessage {
|
|
|
22
23
|
error?: never;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
26
|
+
* @deprecated Use JSONRPCResponse instead
|
|
25
27
|
* Represents an error JSON-RPC response.
|
|
26
28
|
*/
|
|
27
29
|
export interface JSONRPCErrorResponse<E = any> extends JSONRPCMessage {
|
|
@@ -35,6 +37,7 @@ export interface JSONRPCErrorResponse<E = any> extends JSONRPCMessage {
|
|
|
35
37
|
result?: never;
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
40
|
+
* @deprecated Use JSONRPCResponse instead
|
|
38
41
|
* Combined JSON-RPC response type as a discriminated union.
|
|
39
42
|
* This ensures a response is either a success with a result, or an error.
|
|
40
43
|
*/
|
|
@@ -48,6 +51,69 @@ export type TaskEvent = TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
|
|
|
48
51
|
export type TaskYieldUpdate = Omit<TaskStatus, "timestamp"> | Artifact;
|
|
49
52
|
export type ExtendedTaskStatusUpdate = Omit<TaskStatus, "timestamp">;
|
|
50
53
|
export type RequestParams = Required<Pick<A2ARequest, "params">>["params"];
|
|
54
|
+
export interface ServerDeploymentRequestParams {
|
|
55
|
+
/**
|
|
56
|
+
* The name of the server
|
|
57
|
+
*/
|
|
58
|
+
name: string;
|
|
59
|
+
/**
|
|
60
|
+
* The agent card of the server
|
|
61
|
+
*/
|
|
62
|
+
agentCard: AgentCard;
|
|
63
|
+
/**
|
|
64
|
+
* The minified code of the server
|
|
65
|
+
*/
|
|
66
|
+
code: string;
|
|
67
|
+
/**
|
|
68
|
+
* The NPM dependencies of the server
|
|
69
|
+
*/
|
|
70
|
+
dependencies?: string[];
|
|
71
|
+
}
|
|
72
|
+
export interface BaseServerDeploymentResponseParams {
|
|
73
|
+
/**
|
|
74
|
+
* The deployment ID
|
|
75
|
+
*/
|
|
76
|
+
deploymentId: string;
|
|
77
|
+
/**
|
|
78
|
+
* Whether the deployment was successful
|
|
79
|
+
*/
|
|
80
|
+
success: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface ServerDeploymentSuccessResponseParams extends BaseServerDeploymentResponseParams {
|
|
83
|
+
/**
|
|
84
|
+
* The name of the server
|
|
85
|
+
*/
|
|
86
|
+
name: string;
|
|
87
|
+
/**
|
|
88
|
+
* The URL of the server
|
|
89
|
+
*/
|
|
90
|
+
url: string;
|
|
91
|
+
/**
|
|
92
|
+
* The base path of the server
|
|
93
|
+
*/
|
|
94
|
+
basePath: string;
|
|
95
|
+
}
|
|
96
|
+
export interface ServerDeploymentRequest extends JSONRPCRequest {
|
|
97
|
+
/**
|
|
98
|
+
* The method name
|
|
99
|
+
*/
|
|
100
|
+
method: "/deploy";
|
|
101
|
+
/**
|
|
102
|
+
* The parameters
|
|
103
|
+
*/
|
|
104
|
+
params: ServerDeploymentRequestParams;
|
|
105
|
+
}
|
|
106
|
+
export interface TestServerDeploymentRequest extends JSONRPCRequest {
|
|
107
|
+
/**
|
|
108
|
+
* The method name
|
|
109
|
+
*/
|
|
110
|
+
method: "/test/deploy";
|
|
111
|
+
/**
|
|
112
|
+
* The parameters
|
|
113
|
+
*/
|
|
114
|
+
params: ServerDeploymentRequestParams;
|
|
115
|
+
}
|
|
116
|
+
export type ServerDeploymentResponse = JSONRPCResponse<ServerDeploymentSuccessResponseParams>;
|
|
51
117
|
export * from "./schema.js";
|
|
52
118
|
export type { A2AError as A2AErrorType } from "./schema.js";
|
|
53
119
|
//# sourceMappingURL=extended-schema.d.ts.map
|
|
@@ -0,0 +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,QAAQ,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,SAAS,EACT,cAAc,EACd,YAAY,EACb,MAAM,aAAa,CAAC;AAErB;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,cAAc;IACrE;;OAEG;IACH,MAAM,EAAE,CAAC,CAAC;IAEV;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,cAAc;IACnE;;OAEG;IACH,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ACvC;AAED,MAAM,WAAW,2BAA4B,SAAQ,cAAc;IACjE;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,MAAM,EAAE,6BAA6B,CAAC;CACvC;AAED,MAAM,MAAM,wBAAwB,GAClC,eAAe,CAAC,qCAAqC,CAAC,CAAC;AAEzD,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface JSONRPCMessageIdentifier {
|
|
5
5
|
/**
|
|
6
|
-
* Request identifier. Can be a string, number
|
|
6
|
+
* Request identifier. Can be a string, number.
|
|
7
7
|
* Responses must have the same ID as the request they relate to.
|
|
8
|
-
* Notifications (requests without an expected response) should omit the ID
|
|
8
|
+
* Notifications (requests without an expected response) should omit the ID.
|
|
9
9
|
*/
|
|
10
|
-
id?: number | string
|
|
10
|
+
id?: number | string;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Base interface for all JSON-RPC messages (Requests and Responses).
|
|
@@ -30,16 +30,15 @@ export interface JSONRPCRequest extends JSONRPCMessage {
|
|
|
30
30
|
*/
|
|
31
31
|
method: string;
|
|
32
32
|
/**
|
|
33
|
-
* Parameters for the method. Can be a structured object, an array, or
|
|
33
|
+
* Parameters for the method. Can be a structured object, an array, or omitted.
|
|
34
34
|
* Specific request interfaces will define the exact type.
|
|
35
|
-
* @default null
|
|
36
35
|
*/
|
|
37
36
|
params?: unknown;
|
|
38
37
|
}
|
|
39
38
|
/**
|
|
40
39
|
* Represents a JSON-RPC error object.
|
|
41
40
|
*/
|
|
42
|
-
export interface JSONRPCError<Data = unknown
|
|
41
|
+
export interface JSONRPCError<Data = unknown, Code = number> {
|
|
43
42
|
/**
|
|
44
43
|
* A number indicating the error type that occurred.
|
|
45
44
|
*/
|
|
@@ -49,27 +48,24 @@ export interface JSONRPCError<Data = unknown | null, Code = number> {
|
|
|
49
48
|
*/
|
|
50
49
|
message: string;
|
|
51
50
|
/**
|
|
52
|
-
*
|
|
53
|
-
* @default null
|
|
51
|
+
* Additional data about the error.
|
|
54
52
|
*/
|
|
55
|
-
data
|
|
53
|
+
data: Data;
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
58
56
|
* Represents a JSON-RPC response object.
|
|
59
57
|
*/
|
|
60
|
-
export interface JSONRPCResponse<R = unknown
|
|
58
|
+
export interface JSONRPCResponse<R = unknown, E = unknown> extends JSONRPCMessage {
|
|
61
59
|
/**
|
|
62
60
|
* The result of the method invocation. Required on success.
|
|
63
|
-
* Should be
|
|
64
|
-
* @default null
|
|
61
|
+
* Should be omitted if an error occurred.
|
|
65
62
|
*/
|
|
66
63
|
result?: R;
|
|
67
64
|
/**
|
|
68
65
|
* An error object if an error occurred during the request. Required on failure.
|
|
69
|
-
* Should be
|
|
70
|
-
* @default null
|
|
66
|
+
* Should be omitted if the request was successful.
|
|
71
67
|
*/
|
|
72
|
-
error?: JSONRPCError<E
|
|
68
|
+
error?: JSONRPCError<E>;
|
|
73
69
|
}
|
|
74
70
|
/**
|
|
75
71
|
* Represents the state of a task within the A2A protocol.
|
|
@@ -85,10 +81,9 @@ export interface AgentAuthentication {
|
|
|
85
81
|
*/
|
|
86
82
|
schemes: string[];
|
|
87
83
|
/**
|
|
88
|
-
* Credentials for authentication. Can be a string (e.g., token) or
|
|
89
|
-
* @default null
|
|
84
|
+
* Credentials for authentication. Can be a string (e.g., token) or omitted if not required initially.
|
|
90
85
|
*/
|
|
91
|
-
credentials?: string
|
|
86
|
+
credentials?: string;
|
|
92
87
|
}
|
|
93
88
|
/**
|
|
94
89
|
* Describes the capabilities of an agent.
|
|
@@ -120,9 +115,8 @@ export interface AgentProvider {
|
|
|
120
115
|
organization: string;
|
|
121
116
|
/**
|
|
122
117
|
* URL associated with the agent provider.
|
|
123
|
-
* @default null
|
|
124
118
|
*/
|
|
125
|
-
url?: string
|
|
119
|
+
url?: string;
|
|
126
120
|
}
|
|
127
121
|
/**
|
|
128
122
|
* Defines a specific skill or capability offered by an agent.
|
|
@@ -138,29 +132,24 @@ export interface AgentSkill {
|
|
|
138
132
|
name: string;
|
|
139
133
|
/**
|
|
140
134
|
* Optional description of the skill.
|
|
141
|
-
* @default null
|
|
142
135
|
*/
|
|
143
|
-
description?: string
|
|
136
|
+
description?: string;
|
|
144
137
|
/**
|
|
145
138
|
* Optional list of tags associated with the skill for categorization.
|
|
146
|
-
* @default null
|
|
147
139
|
*/
|
|
148
|
-
tags?: string[]
|
|
140
|
+
tags?: string[];
|
|
149
141
|
/**
|
|
150
142
|
* Optional list of example inputs or use cases for the skill.
|
|
151
|
-
* @default null
|
|
152
143
|
*/
|
|
153
|
-
examples?: string[]
|
|
144
|
+
examples?: string[];
|
|
154
145
|
/**
|
|
155
146
|
* Optional list of input modes supported by this skill, overriding agent defaults.
|
|
156
|
-
* @default null
|
|
157
147
|
*/
|
|
158
|
-
inputModes?: string[]
|
|
148
|
+
inputModes?: string[];
|
|
159
149
|
/**
|
|
160
150
|
* Optional list of output modes supported by this skill, overriding agent defaults.
|
|
161
|
-
* @default null
|
|
162
151
|
*/
|
|
163
|
-
outputModes?: string[]
|
|
152
|
+
outputModes?: string[];
|
|
164
153
|
}
|
|
165
154
|
/**
|
|
166
155
|
* Represents the metadata card for an agent, describing its properties and capabilities.
|
|
@@ -172,36 +161,32 @@ export interface AgentCard {
|
|
|
172
161
|
name: string;
|
|
173
162
|
/**
|
|
174
163
|
* An optional description of the agent.
|
|
175
|
-
* @default null
|
|
176
164
|
*/
|
|
177
|
-
description?: string
|
|
165
|
+
description?: string;
|
|
178
166
|
/**
|
|
179
167
|
* The base URL endpoint for interacting with the agent.
|
|
180
168
|
*/
|
|
181
169
|
url: string;
|
|
182
170
|
/**
|
|
183
171
|
* Information about the provider of the agent.
|
|
184
|
-
* @default null
|
|
185
172
|
*/
|
|
186
|
-
provider?: AgentProvider
|
|
173
|
+
provider?: AgentProvider;
|
|
187
174
|
/**
|
|
188
175
|
* The version identifier for the agent or its API.
|
|
189
176
|
*/
|
|
190
177
|
version: string;
|
|
191
178
|
/**
|
|
192
179
|
* An optional URL pointing to the agent's documentation.
|
|
193
|
-
* @default null
|
|
194
180
|
*/
|
|
195
|
-
documentationUrl?: string
|
|
181
|
+
documentationUrl?: string;
|
|
196
182
|
/**
|
|
197
183
|
* The capabilities supported by the agent.
|
|
198
184
|
*/
|
|
199
185
|
capabilities: AgentCapabilities;
|
|
200
186
|
/**
|
|
201
187
|
* Authentication details required to interact with the agent.
|
|
202
|
-
* @default null
|
|
203
188
|
*/
|
|
204
|
-
authentication?: AgentAuthentication
|
|
189
|
+
authentication?: AgentAuthentication;
|
|
205
190
|
/**
|
|
206
191
|
* Default input modes supported by the agent (e.g., 'text', 'file', 'json').
|
|
207
192
|
* @default ["text"]
|
|
@@ -220,22 +205,20 @@ export interface AgentCard {
|
|
|
220
205
|
export interface FileContentBase {
|
|
221
206
|
/**
|
|
222
207
|
* Optional name of the file.
|
|
223
|
-
* @default null
|
|
224
208
|
*/
|
|
225
|
-
name?: string
|
|
209
|
+
name?: string;
|
|
226
210
|
/**
|
|
227
211
|
* Optional MIME type of the file content.
|
|
228
|
-
* @default null
|
|
229
212
|
*/
|
|
230
|
-
mimeType?: string
|
|
213
|
+
mimeType?: string;
|
|
231
214
|
/**
|
|
232
215
|
* File content encoded as a Base64 string. Use this OR `uri`.
|
|
233
216
|
*/
|
|
234
|
-
bytes?: string
|
|
217
|
+
bytes?: string;
|
|
235
218
|
/**
|
|
236
219
|
* URI pointing to the file content. Use this OR `bytes`.
|
|
237
220
|
*/
|
|
238
|
-
uri?: string
|
|
221
|
+
uri?: string;
|
|
239
222
|
}
|
|
240
223
|
export type FileContentBytes = FileContentBase & {
|
|
241
224
|
bytes: string;
|
|
@@ -263,7 +246,7 @@ export interface TextPart {
|
|
|
263
246
|
/**
|
|
264
247
|
* Optional metadata associated with this text part.
|
|
265
248
|
*/
|
|
266
|
-
metadata?: Record<string, unknown
|
|
249
|
+
metadata?: Record<string, unknown>;
|
|
267
250
|
}
|
|
268
251
|
/**
|
|
269
252
|
* Represents a part of a message containing file content.
|
|
@@ -280,7 +263,7 @@ export interface FilePart {
|
|
|
280
263
|
/**
|
|
281
264
|
* Optional metadata associated with this file part.
|
|
282
265
|
*/
|
|
283
|
-
metadata?: Record<string, unknown
|
|
266
|
+
metadata?: Record<string, unknown>;
|
|
284
267
|
}
|
|
285
268
|
/**
|
|
286
269
|
* Represents a part of a message containing structured data (JSON).
|
|
@@ -297,7 +280,7 @@ export interface DataPart {
|
|
|
297
280
|
/**
|
|
298
281
|
* Optional metadata associated with this data part.
|
|
299
282
|
*/
|
|
300
|
-
metadata?: Record<string, unknown
|
|
283
|
+
metadata?: Record<string, unknown>;
|
|
301
284
|
}
|
|
302
285
|
/**
|
|
303
286
|
* Represents a single part of a multi-part message. Can be text, file, or data.
|
|
@@ -309,14 +292,12 @@ export type Part = TextPart | FilePart | DataPart;
|
|
|
309
292
|
export interface Artifact {
|
|
310
293
|
/**
|
|
311
294
|
* Optional name for the artifact.
|
|
312
|
-
* @default null
|
|
313
295
|
*/
|
|
314
|
-
name?: string
|
|
296
|
+
name?: string;
|
|
315
297
|
/**
|
|
316
298
|
* Optional description of the artifact.
|
|
317
|
-
* @default null
|
|
318
299
|
*/
|
|
319
|
-
description?: string
|
|
300
|
+
description?: string;
|
|
320
301
|
/**
|
|
321
302
|
* The constituent parts of the artifact.
|
|
322
303
|
*/
|
|
@@ -328,19 +309,16 @@ export interface Artifact {
|
|
|
328
309
|
index?: number;
|
|
329
310
|
/**
|
|
330
311
|
* Optional flag indicating if this artifact content should append to previous content (for streaming).
|
|
331
|
-
* @default null
|
|
332
312
|
*/
|
|
333
|
-
append?: boolean
|
|
313
|
+
append?: boolean;
|
|
334
314
|
/**
|
|
335
315
|
* Optional metadata associated with the artifact.
|
|
336
|
-
* @default null
|
|
337
316
|
*/
|
|
338
|
-
metadata?: Record<string, unknown
|
|
317
|
+
metadata?: Record<string, unknown>;
|
|
339
318
|
/**
|
|
340
319
|
* Optional flag indicating if this is the last chunk of data for this artifact (for streaming).
|
|
341
|
-
* @default null
|
|
342
320
|
*/
|
|
343
|
-
lastChunk?: boolean
|
|
321
|
+
lastChunk?: boolean;
|
|
344
322
|
}
|
|
345
323
|
/**
|
|
346
324
|
* Represents a message exchanged between a user and an agent.
|
|
@@ -356,9 +334,8 @@ export interface Message {
|
|
|
356
334
|
parts: Part[];
|
|
357
335
|
/**
|
|
358
336
|
* Optional metadata associated with the message.
|
|
359
|
-
* @default null
|
|
360
337
|
*/
|
|
361
|
-
metadata?: Record<string, unknown
|
|
338
|
+
metadata?: Record<string, unknown>;
|
|
362
339
|
}
|
|
363
340
|
/**
|
|
364
341
|
* Represents the status of a task at a specific point in time.
|
|
@@ -370,9 +347,8 @@ export interface TaskStatus {
|
|
|
370
347
|
state: TaskState;
|
|
371
348
|
/**
|
|
372
349
|
* An optional message associated with the current status (e.g., progress update, final response).
|
|
373
|
-
* @default null
|
|
374
350
|
*/
|
|
375
|
-
message?: Message
|
|
351
|
+
message?: Message;
|
|
376
352
|
/**
|
|
377
353
|
* The timestamp when this status was recorded (ISO 8601 format).
|
|
378
354
|
* @format date-time
|
|
@@ -389,23 +365,20 @@ export interface Task {
|
|
|
389
365
|
id: string;
|
|
390
366
|
/**
|
|
391
367
|
* Optional identifier for the session this task belongs to.
|
|
392
|
-
* @default null
|
|
393
368
|
*/
|
|
394
|
-
sessionId?: string
|
|
369
|
+
sessionId?: string;
|
|
395
370
|
/**
|
|
396
371
|
* The current status of the task.
|
|
397
372
|
*/
|
|
398
373
|
status: TaskStatus;
|
|
399
374
|
/**
|
|
400
375
|
* Optional list of artifacts associated with the task (e.g., outputs, intermediate files).
|
|
401
|
-
* @default null
|
|
402
376
|
*/
|
|
403
|
-
artifacts?: Artifact[]
|
|
377
|
+
artifacts?: Artifact[];
|
|
404
378
|
/**
|
|
405
379
|
* Optional metadata associated with the task.
|
|
406
|
-
* @default null
|
|
407
380
|
*/
|
|
408
|
-
metadata?: Record<string, unknown
|
|
381
|
+
metadata?: Record<string, unknown>;
|
|
409
382
|
}
|
|
410
383
|
/**
|
|
411
384
|
* Represents the history of messages exchanged within a task's session.
|
|
@@ -436,9 +409,8 @@ export interface TaskStatusUpdateEvent {
|
|
|
436
409
|
final?: boolean;
|
|
437
410
|
/**
|
|
438
411
|
* Optional metadata associated with this update event.
|
|
439
|
-
* @default null
|
|
440
412
|
*/
|
|
441
|
-
metadata?: Record<string, unknown
|
|
413
|
+
metadata?: Record<string, unknown>;
|
|
442
414
|
}
|
|
443
415
|
/**
|
|
444
416
|
* Represents an artifact update event for a task, typically used in streaming scenarios.
|
|
@@ -459,9 +431,8 @@ export interface TaskArtifactUpdateEvent {
|
|
|
459
431
|
final?: boolean;
|
|
460
432
|
/**
|
|
461
433
|
* Optional metadata associated with this update event.
|
|
462
|
-
* @default null
|
|
463
434
|
*/
|
|
464
|
-
metadata?: Record<string, unknown
|
|
435
|
+
metadata?: Record<string, unknown>;
|
|
465
436
|
}
|
|
466
437
|
export type TaskUpdateEvent = TaskStatusUpdateEvent;
|
|
467
438
|
/** Error code for JSON Parse Error (-32700). Invalid JSON was received by the server. */
|
|
@@ -497,7 +468,7 @@ export type ErrorCodeUnsupportedOperation = typeof ErrorCodeUnsupportedOperation
|
|
|
497
468
|
* use other codes within the valid JSON-RPC ranges.
|
|
498
469
|
*/
|
|
499
470
|
export type KnownErrorCode = typeof ErrorCodeParseError | typeof ErrorCodeInvalidRequest | typeof ErrorCodeMethodNotFound | typeof ErrorCodeInvalidParams | typeof ErrorCodeInternalError | typeof ErrorCodeTaskNotFound | typeof ErrorCodeTaskNotCancelable | typeof ErrorCodePushNotificationNotSupported | typeof ErrorCodeUnsupportedOperation;
|
|
500
|
-
export type A2AError = JSONRPCError<unknown
|
|
471
|
+
export type A2AError = JSONRPCError<unknown, KnownErrorCode | number>;
|
|
501
472
|
/**
|
|
502
473
|
* Authentication information, potentially including additional properties beyond the standard ones.
|
|
503
474
|
* (Note: Schema allows additional properties).
|
|
@@ -520,9 +491,8 @@ export interface PushNotificationConfig {
|
|
|
520
491
|
token?: string;
|
|
521
492
|
/**
|
|
522
493
|
* Optional authentication details needed by the agent to call the notification URL.
|
|
523
|
-
* @default null
|
|
524
494
|
*/
|
|
525
|
-
authentication?: AuthenticationInfo
|
|
495
|
+
authentication?: AuthenticationInfo;
|
|
526
496
|
}
|
|
527
497
|
/**
|
|
528
498
|
* Represents the push notification information associated with a specific task ID.
|
|
@@ -556,19 +526,16 @@ export interface TaskSendParams {
|
|
|
556
526
|
message: Message;
|
|
557
527
|
/**
|
|
558
528
|
* Optional pushNotification information for receiving notifications about this task. Requires agent capability.
|
|
559
|
-
* @default null
|
|
560
529
|
*/
|
|
561
|
-
pushNotification?: PushNotificationConfig
|
|
530
|
+
pushNotification?: PushNotificationConfig;
|
|
562
531
|
/**
|
|
563
532
|
* Optional parameter to specify how much message history to include in the response.
|
|
564
|
-
* @default null
|
|
565
533
|
*/
|
|
566
|
-
historyLength?: number
|
|
534
|
+
historyLength?: number;
|
|
567
535
|
/**
|
|
568
536
|
* Optional metadata associated with sending this message.
|
|
569
|
-
* @default null
|
|
570
537
|
*/
|
|
571
|
-
metadata?: Record<string, unknown
|
|
538
|
+
metadata?: Record<string, unknown>;
|
|
572
539
|
}
|
|
573
540
|
/**
|
|
574
541
|
* Basic parameters used for task ID operations.
|
|
@@ -581,9 +548,8 @@ export interface TaskIdParams {
|
|
|
581
548
|
id: string;
|
|
582
549
|
/**
|
|
583
550
|
* Optional metadata to include with the operation.
|
|
584
|
-
* @default null
|
|
585
551
|
*/
|
|
586
|
-
metadata?: Record<string, unknown
|
|
552
|
+
metadata?: Record<string, unknown>;
|
|
587
553
|
}
|
|
588
554
|
/**
|
|
589
555
|
* Parameters used for querying task-related information by ID.
|
|
@@ -592,9 +558,8 @@ export interface TaskIdParams {
|
|
|
592
558
|
export interface TaskQueryParams extends TaskIdParams {
|
|
593
559
|
/**
|
|
594
560
|
* Optional history length to retrieve for the task.
|
|
595
|
-
* @default null
|
|
596
561
|
*/
|
|
597
|
-
historyLength?: number
|
|
562
|
+
historyLength?: number;
|
|
598
563
|
}
|
|
599
564
|
/**
|
|
600
565
|
* Request to send a message/initiate a task.
|
|
@@ -691,32 +656,32 @@ export interface SendTaskStreamingRequest extends JSONRPCRequest {
|
|
|
691
656
|
* Response to a `tasks/send` request.
|
|
692
657
|
* Contains the Task object or an error.
|
|
693
658
|
*/
|
|
694
|
-
export type SendTaskResponse = JSONRPCResponse<Task
|
|
659
|
+
export type SendTaskResponse = JSONRPCResponse<Task, A2AError>;
|
|
695
660
|
/**
|
|
696
661
|
* Response to a streaming task operation, either through `tasks/sendSubscribe` or a subscription.
|
|
697
662
|
* Contains a TaskStatusUpdateEvent, TaskArtifactUpdateEvent, or an error.
|
|
698
663
|
*/
|
|
699
|
-
export type SendTaskStreamingResponse = JSONRPCResponse<TaskStatusUpdateEvent | TaskArtifactUpdateEvent
|
|
664
|
+
export type SendTaskStreamingResponse = JSONRPCResponse<TaskStatusUpdateEvent | TaskArtifactUpdateEvent, A2AError>;
|
|
700
665
|
/**
|
|
701
666
|
* Response to a `tasks/get` request. Contains the Task object or an error.
|
|
702
667
|
*/
|
|
703
|
-
export type GetTaskResponse = JSONRPCResponse<Task
|
|
668
|
+
export type GetTaskResponse = JSONRPCResponse<Task, A2AError>;
|
|
704
669
|
/**
|
|
705
670
|
* Response to a `tasks/cancel` request. Contains the updated Task object (usually with 'canceled' state) or an error.
|
|
706
671
|
*/
|
|
707
|
-
export type CancelTaskResponse = JSONRPCResponse<Task
|
|
672
|
+
export type CancelTaskResponse = JSONRPCResponse<Task, A2AError>;
|
|
708
673
|
/**
|
|
709
674
|
* Response to a `tasks/getHistory` request. Contains the TaskHistory object or an error.
|
|
710
675
|
*/
|
|
711
|
-
export type GetTaskHistoryResponse = JSONRPCResponse<TaskHistory
|
|
676
|
+
export type GetTaskHistoryResponse = JSONRPCResponse<TaskHistory, A2AError>;
|
|
712
677
|
/**
|
|
713
678
|
* Response to a `tasks/pushNotification/set` request. Contains the confirmed TaskPushNotificationConfig or an error.
|
|
714
679
|
*/
|
|
715
|
-
export type SetTaskPushNotificationResponse = JSONRPCResponse<TaskPushNotificationConfig
|
|
680
|
+
export type SetTaskPushNotificationResponse = JSONRPCResponse<TaskPushNotificationConfig, A2AError>;
|
|
716
681
|
/**
|
|
717
682
|
* Response to a `tasks/pushNotification/get` request. Contains the TaskPushNotificationConfig or an error.
|
|
718
683
|
*/
|
|
719
|
-
export type GetTaskPushNotificationResponse = JSONRPCResponse<TaskPushNotificationConfig
|
|
684
|
+
export type GetTaskPushNotificationResponse = JSONRPCResponse<TaskPushNotificationConfig, A2AError>;
|
|
720
685
|
/**
|
|
721
686
|
* Represents any valid request defined in the A2A protocol.
|
|
722
687
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/types/schema.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,wBAAwB;IAC9D;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,IAAI,GAAG,OAAO,EAAE,IAAI,GAAG,MAAM;IACzD;;OAEG;IACH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 -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/utils/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAE5E,eAAO,MAAM,cAAc,EAAE,eAM5B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAW3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAM9B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,SAAS,EAAwC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NextFunction, Request, Response } from "express";
|
|
2
|
+
import { A2AErrorType, TaskYieldUpdate } from "../../types/extended-schema.js";
|
|
3
|
+
export declare class SystemError<ErrorData = unknown, C extends number = number> extends Error implements A2AErrorType {
|
|
4
|
+
code: C;
|
|
5
|
+
data: ErrorData;
|
|
6
|
+
constructor(message: string, code: C, data: ErrorData);
|
|
7
|
+
}
|
|
8
|
+
export declare const PARSE_ERROR: <ErrorData = unknown>(data: ErrorData) => SystemError<ErrorData, -32700>;
|
|
9
|
+
export declare const METHOD_NOT_FOUND: <ErrorData = unknown>(data: ErrorData) => SystemError<ErrorData, -32601>;
|
|
10
|
+
export declare const INVALID_REQUEST: <ErrorData = unknown>(data: ErrorData) => SystemError<ErrorData, -32600>;
|
|
11
|
+
export declare const INVALID_PARAMS: <ErrorData = unknown>(data: ErrorData) => SystemError<ErrorData, -32602>;
|
|
12
|
+
export declare const INTERNAL_ERROR: <ErrorData = unknown>(data: ErrorData) => SystemError<ErrorData, -32603>;
|
|
13
|
+
export declare const TASK_NOT_FOUND: <ErrorData = unknown>(data: ErrorData) => SystemError<ErrorData, -32001>;
|
|
14
|
+
export declare const TASK_NOT_CANCELABLE: <ErrorData = unknown>(data: ErrorData) => SystemError<ErrorData, -32002>;
|
|
15
|
+
export declare const UNSUPPORTED_OPERATION: <ErrorData = unknown>(data: ErrorData) => SystemError<ErrorData, -32004>;
|
|
16
|
+
export declare const PUSH_NOTIFICATION_NOT_SUPPORTED: <ErrorData = unknown>(data: ErrorData) => SystemError<ErrorData, -32003>;
|
|
17
|
+
export declare const FAILED_UPDATE: (message: string) => TaskYieldUpdate;
|
|
18
|
+
/**
|
|
19
|
+
* Express error handler middleware.
|
|
20
|
+
*/
|
|
21
|
+
export type ErrorHandler = (err: Error, req: Request, res: Response, next: NextFunction) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Express error handler middleware.
|
|
24
|
+
*/
|
|
25
|
+
export declare function errorHandler(err: Error, req: Request, res: Response, next: NextFunction): void;
|
|
26
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/utils/common/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EACL,YAAY,EAUZ,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAIxC,qBAAa,WAAW,CAAC,SAAS,GAAG,OAAO,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,CACrE,SAAQ,KACR,YAAW,YAAY;IAEvB,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,SAAS,CAAC;gBAEJ,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS;CAOtD;AAED,eAAO,MAAM,WAAW,GAAI,SAAS,GAAG,OAAO,EAAE,MAAM,SAAS,mCAK7D,CAAC;AAEJ,eAAO,MAAM,gBAAgB,GAAI,SAAS,GAAG,OAAO,EAAE,MAAM,SAAS,mCAKlE,CAAC;AAEJ,eAAO,MAAM,eAAe,GAAI,SAAS,GAAG,OAAO,EAAE,MAAM,SAAS,mCAKjE,CAAC;AAEJ,eAAO,MAAM,cAAc,GAAI,SAAS,GAAG,OAAO,EAAE,MAAM,SAAS,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