@mastra/core 0.9.3 → 0.9.4-alpha.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/a2a.d.ts +1 -0
- package/dist/a2a/index.cjs +79 -0
- package/dist/a2a/index.d.cts +780 -0
- package/dist/a2a/index.d.ts +780 -0
- package/dist/a2a/index.js +68 -0
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-37HZ77Z5.cjs → chunk-25XLNT54.cjs} +2 -2
- package/dist/{chunk-2PLTE53B.cjs → chunk-6SEZATEX.cjs} +3 -2
- package/dist/{chunk-XYP6MY7U.js → chunk-JIRLIXUC.js} +3 -2
- package/dist/{chunk-EYMLOJ2Q.js → chunk-S6OGHYA5.js} +1 -1
- package/dist/{chunk-SONEVGEJ.js → chunk-T5EDV4ZU.js} +1 -1
- package/dist/{chunk-QQFFJTJ4.cjs → chunk-UWRSG6F2.cjs} +2 -2
- package/dist/index.cjs +62 -62
- package/dist/index.js +7 -7
- package/dist/memory/index.cjs +4 -4
- package/dist/memory/index.js +1 -1
- package/dist/network/index.cjs +2 -2
- package/dist/network/index.js +1 -1
- package/dist/relevance/index.cjs +4 -4
- package/dist/relevance/index.js +1 -1
- package/dist/vector/libsql/index.cjs +3 -3
- package/dist/vector/libsql/index.js +1 -1
- package/dist/workflows/index.cjs +22 -22
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/vNext/index.cjs +2 -2
- package/dist/workflows/vNext/index.js +1 -1
- package/package.json +1 -1
- package/dist/{chunk-ITFMXU6H.cjs → chunk-R2ABCCZR.cjs} +1 -1
- package/dist/{chunk-R652KYQW.js → chunk-ZHCBQ7GF.js} +1 -1
package/a2a.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/a2a';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/a2a/types.ts
|
|
4
|
+
var ErrorCodeParseError = -32700;
|
|
5
|
+
var ErrorCodeInvalidRequest = -32600;
|
|
6
|
+
var ErrorCodeMethodNotFound = -32601;
|
|
7
|
+
var ErrorCodeInvalidParams = -32602;
|
|
8
|
+
var ErrorCodeInternalError = -32603;
|
|
9
|
+
var ErrorCodeTaskNotFound = -32001;
|
|
10
|
+
var ErrorCodeTaskNotCancelable = -32002;
|
|
11
|
+
var ErrorCodePushNotificationNotSupported = -32003;
|
|
12
|
+
var ErrorCodeUnsupportedOperation = -32004;
|
|
13
|
+
|
|
14
|
+
// src/a2a/error.ts
|
|
15
|
+
var A2AError = class _A2AError extends Error {
|
|
16
|
+
code;
|
|
17
|
+
data;
|
|
18
|
+
taskId;
|
|
19
|
+
// Optional task ID context
|
|
20
|
+
constructor(code, message, data, taskId) {
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = "A2AError";
|
|
23
|
+
this.code = code;
|
|
24
|
+
this.data = data;
|
|
25
|
+
this.taskId = taskId;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Formats the error into a standard JSON-RPC error object structure.
|
|
29
|
+
*/
|
|
30
|
+
toJSONRPCError() {
|
|
31
|
+
const errorObject = {
|
|
32
|
+
code: this.code,
|
|
33
|
+
message: this.message
|
|
34
|
+
};
|
|
35
|
+
if (this.data !== void 0) {
|
|
36
|
+
errorObject.data = this.data;
|
|
37
|
+
}
|
|
38
|
+
return errorObject;
|
|
39
|
+
}
|
|
40
|
+
// Static factory methods for common errors
|
|
41
|
+
static parseError(message, data) {
|
|
42
|
+
return new _A2AError(ErrorCodeParseError, message, data);
|
|
43
|
+
}
|
|
44
|
+
static invalidRequest(message, data) {
|
|
45
|
+
return new _A2AError(ErrorCodeInvalidRequest, message, data);
|
|
46
|
+
}
|
|
47
|
+
static methodNotFound(method) {
|
|
48
|
+
return new _A2AError(ErrorCodeMethodNotFound, `Method not found: ${method}`);
|
|
49
|
+
}
|
|
50
|
+
static invalidParams(message, data) {
|
|
51
|
+
return new _A2AError(ErrorCodeInvalidParams, message, data);
|
|
52
|
+
}
|
|
53
|
+
static internalError(message, data) {
|
|
54
|
+
return new _A2AError(ErrorCodeInternalError, message, data);
|
|
55
|
+
}
|
|
56
|
+
static taskNotFound(taskId) {
|
|
57
|
+
return new _A2AError(ErrorCodeTaskNotFound, `Task not found: ${taskId}`, void 0, taskId);
|
|
58
|
+
}
|
|
59
|
+
static taskNotCancelable(taskId) {
|
|
60
|
+
return new _A2AError(ErrorCodeTaskNotCancelable, `Task not cancelable: ${taskId}`, void 0, taskId);
|
|
61
|
+
}
|
|
62
|
+
static pushNotificationNotSupported() {
|
|
63
|
+
return new _A2AError(ErrorCodePushNotificationNotSupported, "Push Notification is not supported");
|
|
64
|
+
}
|
|
65
|
+
static unsupportedOperation(operation) {
|
|
66
|
+
return new _A2AError(ErrorCodeUnsupportedOperation, `Unsupported operation: ${operation}`);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
exports.A2AError = A2AError;
|
|
71
|
+
exports.ErrorCodeInternalError = ErrorCodeInternalError;
|
|
72
|
+
exports.ErrorCodeInvalidParams = ErrorCodeInvalidParams;
|
|
73
|
+
exports.ErrorCodeInvalidRequest = ErrorCodeInvalidRequest;
|
|
74
|
+
exports.ErrorCodeMethodNotFound = ErrorCodeMethodNotFound;
|
|
75
|
+
exports.ErrorCodeParseError = ErrorCodeParseError;
|
|
76
|
+
exports.ErrorCodePushNotificationNotSupported = ErrorCodePushNotificationNotSupported;
|
|
77
|
+
exports.ErrorCodeTaskNotCancelable = ErrorCodeTaskNotCancelable;
|
|
78
|
+
exports.ErrorCodeTaskNotFound = ErrorCodeTaskNotFound;
|
|
79
|
+
exports.ErrorCodeUnsupportedOperation = ErrorCodeUnsupportedOperation;
|