@mastra/server 0.0.0-mcp-changeset-20250707162621 → 0.0.0-memory-system-message-error-20250813233316
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/LICENSE.md +11 -42
- package/dist/{chunk-2SLFAFTR.cjs → chunk-4CEZIJWJ.cjs} +16 -14
- package/dist/chunk-4CEZIJWJ.cjs.map +1 -0
- package/dist/{chunk-4D66QEKC.js → chunk-4MQU6AJN.js} +5 -3
- package/dist/chunk-4MQU6AJN.js.map +1 -0
- package/dist/{chunk-CCGRCYWJ.cjs → chunk-4QSNRCOT.cjs} +4 -2
- package/dist/chunk-4QSNRCOT.cjs.map +1 -0
- package/dist/{chunk-RHSWAXKB.cjs → chunk-4US5W7PH.cjs} +26 -24
- package/dist/chunk-4US5W7PH.cjs.map +1 -0
- package/dist/{chunk-BK4XT6EG.js → chunk-5AKR33BI.js} +88 -25
- package/dist/chunk-5AKR33BI.js.map +1 -0
- package/dist/{chunk-MEGCYGBU.js → chunk-7FHF55WA.js} +39 -37
- package/dist/chunk-7FHF55WA.js.map +1 -0
- package/dist/{chunk-2KZFMI6P.cjs → chunk-7NADHFD2.cjs} +2 -0
- package/dist/chunk-7NADHFD2.cjs.map +1 -0
- package/dist/{chunk-QGX47B5D.cjs → chunk-BED2O446.cjs} +11 -9
- package/dist/chunk-BED2O446.cjs.map +1 -0
- package/dist/{chunk-H7DMHBKY.js → chunk-BUOJL3MN.js} +36 -5
- package/dist/chunk-BUOJL3MN.js.map +1 -0
- package/dist/{chunk-LF7P5PLR.js → chunk-CY4TP3FK.js} +3 -1
- package/dist/chunk-CY4TP3FK.js.map +1 -0
- package/dist/{chunk-LZ3VJXSO.cjs → chunk-EBNIUZRY.cjs} +102 -36
- package/dist/chunk-EBNIUZRY.cjs.map +1 -0
- package/dist/{chunk-WNVFNNWN.js → chunk-G7NVCO5M.js} +5 -3
- package/dist/chunk-G7NVCO5M.js.map +1 -0
- package/dist/chunk-GX25CWC7.cjs +588 -0
- package/dist/chunk-GX25CWC7.cjs.map +1 -0
- package/dist/{chunk-KHZKYUNR.js → chunk-HWHKM67I.js} +6 -4
- package/dist/chunk-HWHKM67I.js.map +1 -0
- package/dist/{chunk-G7KH752Y.cjs → chunk-ILCWPBYQ.cjs} +9 -7
- package/dist/chunk-ILCWPBYQ.cjs.map +1 -0
- package/dist/{chunk-JMLYCXMK.cjs → chunk-JGVY3KWV.cjs} +47 -45
- package/dist/chunk-JGVY3KWV.cjs.map +1 -0
- package/dist/{chunk-GHC4YV6R.js → chunk-JNWFG7JP.js} +107 -135
- package/dist/chunk-JNWFG7JP.js.map +1 -0
- package/dist/{chunk-SDPGVWQJ.cjs → chunk-KXNFZXLG.cjs} +108 -136
- package/dist/chunk-KXNFZXLG.cjs.map +1 -0
- package/dist/chunk-L7YG7WQH.js +151 -0
- package/dist/chunk-L7YG7WQH.js.map +1 -0
- package/dist/{chunk-LI436ITD.cjs → chunk-LRUH33B4.cjs} +39 -37
- package/dist/chunk-LRUH33B4.cjs.map +1 -0
- package/dist/{chunk-LCM566I4.js → chunk-MMROOK5J.js} +2 -0
- package/dist/chunk-MMROOK5J.js.map +1 -0
- package/dist/{chunk-7TP2LX5L.cjs → chunk-NCS2OXX6.cjs} +20 -18
- package/dist/chunk-NCS2OXX6.cjs.map +1 -0
- package/dist/{chunk-FRVBFMO2.cjs → chunk-O4I563YW.cjs} +24 -22
- package/dist/chunk-O4I563YW.cjs.map +1 -0
- package/dist/{chunk-RSEO4XPX.js → chunk-OW4FX5TS.js} +3 -1
- package/dist/chunk-OW4FX5TS.js.map +1 -0
- package/dist/{chunk-MLKGABMK.js → chunk-PZ5AY32C.js} +2 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/{chunk-75ZPJI57.cjs → chunk-Q7SFCCGT.cjs} +2 -0
- package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
- package/dist/{chunk-PZQDCRPV.cjs → chunk-RE4RPXT2.cjs} +4 -2
- package/dist/chunk-RE4RPXT2.cjs.map +1 -0
- package/dist/chunk-RQQNZZAI.cjs +159 -0
- package/dist/chunk-RQQNZZAI.cjs.map +1 -0
- package/dist/{chunk-B2PAS2IB.cjs → chunk-S37KCGOR.cjs} +114 -82
- package/dist/chunk-S37KCGOR.cjs.map +1 -0
- package/dist/{chunk-RG473F6Y.js → chunk-SQ7KKIH3.js} +5 -3
- package/dist/chunk-SQ7KKIH3.js.map +1 -0
- package/dist/{chunk-5PQQ42EZ.js → chunk-UVOSITKU.js} +6 -4
- package/dist/chunk-UVOSITKU.js.map +1 -0
- package/dist/{chunk-CRCR3ZUK.js → chunk-Y3J45CVZ.js} +6 -4
- package/dist/chunk-Y3J45CVZ.js.map +1 -0
- package/dist/{chunk-LRCAAFUA.js → chunk-YS66MFDY.js} +7 -5
- package/dist/chunk-YS66MFDY.js.map +1 -0
- package/dist/chunk-ZKJZQN24.js +571 -0
- package/dist/chunk-ZKJZQN24.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/server/a2a/protocol.d.ts +8 -0
- package/dist/server/a2a/protocol.d.ts.map +1 -0
- package/dist/server/a2a/store.cjs +25 -0
- package/dist/server/a2a/store.cjs.map +1 -0
- package/dist/server/a2a/store.d.ts +14 -0
- package/dist/server/a2a/store.d.ts.map +1 -0
- package/dist/server/a2a/store.js +23 -0
- package/dist/server/a2a/store.js.map +1 -0
- package/dist/server/a2a/tasks.d.ts +20 -0
- package/dist/server/a2a/tasks.d.ts.map +1 -0
- package/dist/server/handlers/a2a.cjs +13 -11
- package/dist/server/handlers/a2a.cjs.map +1 -0
- package/dist/server/handlers/a2a.d.ts +68 -6
- package/dist/server/handlers/a2a.d.ts.map +1 -0
- package/dist/server/handlers/a2a.js +3 -1
- package/dist/server/handlers/a2a.js.map +1 -0
- package/dist/server/handlers/agents.cjs +21 -7
- package/dist/server/handlers/agents.cjs.map +1 -0
- package/dist/server/handlers/agents.d.ts +90 -6
- package/dist/server/handlers/agents.d.ts.map +1 -0
- package/dist/server/handlers/agents.js +3 -1
- package/dist/server/handlers/agents.js.map +1 -0
- package/dist/server/handlers/error.cjs +4 -2
- package/dist/server/handlers/error.cjs.map +1 -0
- package/dist/server/handlers/error.d.ts +2 -1
- package/dist/server/handlers/error.d.ts.map +1 -0
- package/dist/server/handlers/error.js +3 -1
- package/dist/server/handlers/error.js.map +1 -0
- package/dist/server/handlers/legacyWorkflows.cjs +13 -11
- package/dist/server/handlers/legacyWorkflows.cjs.map +1 -0
- package/dist/server/handlers/legacyWorkflows.d.ts +59 -10
- package/dist/server/handlers/legacyWorkflows.d.ts.map +1 -0
- package/dist/server/handlers/legacyWorkflows.js +3 -1
- package/dist/server/handlers/legacyWorkflows.js.map +1 -0
- package/dist/server/handlers/logs.cjs +6 -4
- package/dist/server/handlers/logs.cjs.map +1 -0
- package/dist/server/handlers/logs.d.ts +34 -3
- package/dist/server/handlers/logs.d.ts.map +1 -0
- package/dist/server/handlers/logs.js +3 -1
- package/dist/server/handlers/logs.js.map +1 -0
- package/dist/server/handlers/memory.cjs +39 -9
- package/dist/server/handlers/memory.cjs.map +1 -0
- package/dist/server/handlers/memory.d.ts +119 -8
- package/dist/server/handlers/memory.d.ts.map +1 -0
- package/dist/server/handlers/memory.js +3 -1
- package/dist/server/handlers/memory.js.map +1 -0
- package/dist/server/handlers/network.cjs +7 -5
- package/dist/server/handlers/network.cjs.map +1 -0
- package/dist/server/handlers/network.d.ts +50 -4
- package/dist/server/handlers/network.d.ts.map +1 -0
- package/dist/server/handlers/network.js +3 -1
- package/dist/server/handlers/network.js.map +1 -0
- package/dist/server/handlers/scores.cjs +32 -0
- package/dist/server/handlers/scores.cjs.map +1 -0
- package/dist/server/handlers/scores.d.ts +49 -0
- package/dist/server/handlers/scores.d.ts.map +1 -0
- package/dist/server/handlers/scores.js +3 -0
- package/dist/server/handlers/scores.js.map +1 -0
- package/dist/server/handlers/telemetry.cjs +5 -3
- package/dist/server/handlers/telemetry.cjs.map +1 -0
- package/dist/server/handlers/telemetry.d.ts +32 -2
- package/dist/server/handlers/telemetry.d.ts.map +1 -0
- package/dist/server/handlers/telemetry.js +3 -1
- package/dist/server/handlers/telemetry.js.map +1 -0
- package/dist/server/handlers/tools.cjs +7 -5
- package/dist/server/handlers/tools.cjs.map +1 -0
- package/dist/server/handlers/tools.d.ts +21 -4
- package/dist/server/handlers/tools.d.ts.map +1 -0
- package/dist/server/handlers/tools.js +3 -1
- package/dist/server/handlers/tools.js.map +1 -0
- package/dist/server/handlers/utils.cjs +4 -2
- package/dist/server/handlers/utils.cjs.map +1 -0
- package/dist/server/handlers/utils.d.ts +2 -1
- package/dist/server/handlers/utils.d.ts.map +1 -0
- package/dist/server/handlers/utils.js +3 -1
- package/dist/server/handlers/utils.js.map +1 -0
- package/dist/server/handlers/vNextNetwork.cjs +25 -23
- package/dist/server/handlers/vNextNetwork.cjs.map +1 -0
- package/dist/server/handlers/vNextNetwork.d.ts +179 -6
- package/dist/server/handlers/vNextNetwork.d.ts.map +1 -0
- package/dist/server/handlers/vNextNetwork.js +6 -4
- package/dist/server/handlers/vNextNetwork.js.map +1 -0
- package/dist/server/handlers/vector.cjs +9 -7
- package/dist/server/handlers/vector.cjs.map +1 -0
- package/dist/server/handlers/vector.d.ts +51 -6
- package/dist/server/handlers/vector.d.ts.map +1 -0
- package/dist/server/handlers/vector.js +3 -1
- package/dist/server/handlers/vector.js.map +1 -0
- package/dist/server/handlers/voice.cjs +7 -5
- package/dist/server/handlers/voice.cjs.map +1 -0
- package/dist/server/handlers/voice.d.ts +39 -4
- package/dist/server/handlers/voice.d.ts.map +1 -0
- package/dist/server/handlers/voice.js +3 -1
- package/dist/server/handlers/voice.js.map +1 -0
- package/dist/server/handlers/workflows.cjs +21 -15
- package/dist/server/handlers/workflows.cjs.map +1 -0
- package/dist/server/handlers/workflows.d.ts +88 -14
- package/dist/server/handlers/workflows.d.ts.map +1 -0
- package/dist/server/handlers/workflows.js +3 -1
- package/dist/server/handlers/workflows.js.map +1 -0
- package/dist/server/handlers.cjs +38 -31
- package/dist/server/handlers.cjs.map +1 -0
- package/dist/server/handlers.d.ts +13 -11
- package/dist/server/handlers.d.ts.map +1 -0
- package/dist/server/handlers.js +14 -11
- package/dist/server/handlers.js.map +1 -0
- package/dist/server/http-exception.d.ts +87 -0
- package/dist/server/http-exception.d.ts.map +1 -0
- package/dist/server/types.d.ts +10 -0
- package/dist/server/types.d.ts.map +1 -0
- package/package.json +22 -10
- package/dist/_tsup-dts-rollup.d.cts +0 -1078
- package/dist/_tsup-dts-rollup.d.ts +0 -1078
- package/dist/chunk-DN7K6FJK.cjs +0 -251
- package/dist/chunk-MKLYEKEF.js +0 -241
- package/dist/index.d.cts +0 -1
- package/dist/server/handlers/a2a.d.cts +0 -6
- package/dist/server/handlers/agents.d.cts +0 -6
- package/dist/server/handlers/error.d.cts +0 -1
- package/dist/server/handlers/legacyWorkflows.d.cts +0 -10
- package/dist/server/handlers/logs.d.cts +0 -3
- package/dist/server/handlers/memory.d.cts +0 -8
- package/dist/server/handlers/network.d.cts +0 -4
- package/dist/server/handlers/telemetry.d.cts +0 -2
- package/dist/server/handlers/tools.d.cts +0 -4
- package/dist/server/handlers/utils.d.cts +0 -1
- package/dist/server/handlers/vNextNetwork.d.cts +0 -6
- package/dist/server/handlers/vector.d.cts +0 -6
- package/dist/server/handlers/voice.d.cts +0 -4
- package/dist/server/handlers/workflows.d.cts +0 -14
- package/dist/server/handlers.d.cts +0 -11
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4US5W7PH_cjs = require('../../chunk-4US5W7PH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "generateSpeechHandler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk4US5W7PH_cjs.generateSpeechHandler; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "getListenerHandler", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk4US5W7PH_cjs.getListenerHandler; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "getSpeakersHandler", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk4US5W7PH_cjs.getSpeakersHandler; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "transcribeSpeechHandler", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk4US5W7PH_cjs.transcribeSpeechHandler; }
|
|
22
22
|
});
|
|
23
|
+
//# sourceMappingURL=voice.cjs.map
|
|
24
|
+
//# sourceMappingURL=voice.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"voice.cjs"}
|
|
@@ -1,4 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { Agent } from '@mastra/core/agent';
|
|
2
|
+
import type { Context } from '../types.js';
|
|
3
|
+
interface VoiceContext extends Context {
|
|
4
|
+
agentId?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Get available speakers for an agent
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSpeakersHandler({ mastra, agentId }: VoiceContext): Promise<{
|
|
10
|
+
voiceId: string;
|
|
11
|
+
}[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Generate speech from text
|
|
14
|
+
*/
|
|
15
|
+
export declare function generateSpeechHandler({ mastra, agentId, body, }: VoiceContext & {
|
|
16
|
+
body?: {
|
|
17
|
+
text?: string;
|
|
18
|
+
speakerId?: string;
|
|
19
|
+
};
|
|
20
|
+
}): Promise<NodeJS.ReadableStream>;
|
|
21
|
+
/**
|
|
22
|
+
* Transcribe speech to text
|
|
23
|
+
*/
|
|
24
|
+
export declare function transcribeSpeechHandler({ mastra, agentId, body, }: VoiceContext & {
|
|
25
|
+
body?: {
|
|
26
|
+
audioData?: Buffer;
|
|
27
|
+
options?: Parameters<NonNullable<Agent['voice']>['listen']>[1];
|
|
28
|
+
};
|
|
29
|
+
}): Promise<{
|
|
30
|
+
text: string | void | NodeJS.ReadableStream;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Get available listeners for an agent
|
|
34
|
+
*/
|
|
35
|
+
export declare function getListenerHandler({ mastra, agentId }: VoiceContext): Promise<{
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=voice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/voice.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKxC,UAAU,YAAa,SAAQ,OAAO;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,YAAY;;KAuBzE;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,EAC1C,MAAM,EACN,OAAO,EACP,IAAI,GACL,EAAE,YAAY,GAAG;IAChB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,kCAgCA;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,EAC5C,MAAM,EACN,OAAO,EACP,IAAI,GACL,EAAE,YAAY,GAAG;IAChB,IAAI,CAAC,EAAE;QACL,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAChE,CAAC;CACH;;GA+BA;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,YAAY;;GAuBzE"}
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { generateSpeechHandler, getListenerHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-
|
|
1
|
+
export { generateSpeechHandler, getListenerHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-HWHKM67I.js';
|
|
2
|
+
//# sourceMappingURL=voice.js.map
|
|
3
|
+
//# sourceMappingURL=voice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"voice.js"}
|
|
@@ -1,62 +1,68 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkS37KCGOR_cjs = require('../../chunk-S37KCGOR.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "cancelWorkflowRunHandler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkS37KCGOR_cjs.cancelWorkflowRunHandler; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "createWorkflowRunHandler", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkS37KCGOR_cjs.createWorkflowRunHandler; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "getWorkflowByIdHandler", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkS37KCGOR_cjs.getWorkflowByIdHandler; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "getWorkflowRunByIdHandler", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkS37KCGOR_cjs.getWorkflowRunByIdHandler; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "getWorkflowRunExecutionResultHandler", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkS37KCGOR_cjs.getWorkflowRunExecutionResultHandler; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "getWorkflowRunsHandler", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkS37KCGOR_cjs.getWorkflowRunsHandler; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "getWorkflowsHandler", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkS37KCGOR_cjs.getWorkflowsHandler; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "resumeAsyncWorkflowHandler", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkS37KCGOR_cjs.resumeAsyncWorkflowHandler; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "resumeWorkflowHandler", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkS37KCGOR_cjs.resumeWorkflowHandler; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "sendWorkflowRunEventHandler", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkS37KCGOR_cjs.sendWorkflowRunEventHandler; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "startAsyncWorkflowHandler", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkS37KCGOR_cjs.startAsyncWorkflowHandler; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "startWorkflowRunHandler", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkS37KCGOR_cjs.startWorkflowRunHandler; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "streamVNextWorkflowHandler", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return chunkS37KCGOR_cjs.streamVNextWorkflowHandler; }
|
|
54
58
|
});
|
|
55
59
|
Object.defineProperty(exports, "streamWorkflowHandler", {
|
|
56
60
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkS37KCGOR_cjs.streamWorkflowHandler; }
|
|
58
62
|
});
|
|
59
63
|
Object.defineProperty(exports, "watchWorkflowHandler", {
|
|
60
64
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkS37KCGOR_cjs.watchWorkflowHandler; }
|
|
62
66
|
});
|
|
67
|
+
//# sourceMappingURL=workflows.cjs.map
|
|
68
|
+
//# sourceMappingURL=workflows.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"workflows.cjs"}
|
|
@@ -1,14 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { ReadableStream } from 'node:stream/web';
|
|
2
|
+
import type { RuntimeContext } from '@mastra/core/di';
|
|
3
|
+
import type { WorkflowRuns } from '@mastra/core/storage';
|
|
4
|
+
import type { Workflow, SerializedStepFlowEntry, WatchEvent } from '@mastra/core/workflows';
|
|
5
|
+
import type { Context } from '../types.js';
|
|
6
|
+
interface WorkflowContext extends Context {
|
|
7
|
+
workflowId?: string;
|
|
8
|
+
runId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function getWorkflowsHandler({ mastra }: WorkflowContext): Promise<any>;
|
|
11
|
+
type SerializedStep = {
|
|
12
|
+
id: string;
|
|
13
|
+
description: string;
|
|
14
|
+
inputSchema: string | undefined;
|
|
15
|
+
outputSchema: string | undefined;
|
|
16
|
+
resumeSchema: string | undefined;
|
|
17
|
+
suspendSchema: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<{
|
|
20
|
+
steps: Record<string, SerializedStep>;
|
|
21
|
+
allSteps: Record<string, SerializedStep>;
|
|
22
|
+
name: string | undefined;
|
|
23
|
+
description: string | undefined;
|
|
24
|
+
stepGraph: SerializedStepFlowEntry[];
|
|
25
|
+
inputSchema: string | undefined;
|
|
26
|
+
outputSchema: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export declare function getWorkflowRunByIdHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<Workflow['getWorkflowRunById']>>;
|
|
29
|
+
export declare function getWorkflowRunExecutionResultHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<WatchEvent['payload']['workflowState']>;
|
|
30
|
+
export declare function createWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
31
|
+
runId: string;
|
|
32
|
+
}>;
|
|
33
|
+
export declare function startAsyncWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
34
|
+
inputData?: unknown;
|
|
35
|
+
runtimeContext?: RuntimeContext;
|
|
36
|
+
}): Promise<import("@mastra/core").WorkflowResult<import("zod").ZodType<any, import("zod").ZodTypeDef, any>, import("@mastra/core").Step<string, any, any, any, any, any>[]>>;
|
|
37
|
+
export declare function startWorkflowRunHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
38
|
+
inputData?: unknown;
|
|
39
|
+
runtimeContext?: RuntimeContext;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
message: string;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function watchWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream<string>>;
|
|
44
|
+
export declare function streamWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
45
|
+
inputData?: unknown;
|
|
46
|
+
runtimeContext?: RuntimeContext;
|
|
47
|
+
}): Promise<{
|
|
48
|
+
stream: ReadableStream<import("@mastra/core").StreamEvent>;
|
|
49
|
+
getWorkflowState: () => Promise<import("@mastra/core").WorkflowResult<import("zod").ZodType<any, import("zod").ZodTypeDef, any>, import("@mastra/core").Step<string, any, any, any, any, any>[]>>;
|
|
50
|
+
}>;
|
|
51
|
+
export declare function streamVNextWorkflowHandler({ mastra, runtimeContext, workflowId, runId, inputData, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
52
|
+
inputData?: unknown;
|
|
53
|
+
runtimeContext?: RuntimeContext;
|
|
54
|
+
}): Promise<import("@mastra/core").MastraWorkflowStream>;
|
|
55
|
+
export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
56
|
+
body: {
|
|
57
|
+
step: string | string[];
|
|
58
|
+
resumeData?: unknown;
|
|
59
|
+
};
|
|
60
|
+
runtimeContext?: RuntimeContext;
|
|
61
|
+
}): Promise<import("@mastra/core").WorkflowResult<import("zod").ZodType<any, import("zod").ZodTypeDef, any>, import("@mastra/core").Step<string, any, any, any, any, any>[]>>;
|
|
62
|
+
export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, runtimeContext, }: WorkflowContext & {
|
|
63
|
+
body: {
|
|
64
|
+
step: string | string[];
|
|
65
|
+
resumeData?: unknown;
|
|
66
|
+
};
|
|
67
|
+
runtimeContext?: RuntimeContext;
|
|
68
|
+
}): Promise<{
|
|
69
|
+
message: string;
|
|
70
|
+
}>;
|
|
71
|
+
export declare function getWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: WorkflowContext & {
|
|
72
|
+
fromDate?: Date;
|
|
73
|
+
toDate?: Date;
|
|
74
|
+
limit?: number;
|
|
75
|
+
offset?: number;
|
|
76
|
+
resourceId?: string;
|
|
77
|
+
}): Promise<WorkflowRuns>;
|
|
78
|
+
export declare function cancelWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
79
|
+
message: string;
|
|
80
|
+
}>;
|
|
81
|
+
export declare function sendWorkflowRunEventHandler({ mastra, workflowId, runId, event, data, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
82
|
+
event: string;
|
|
83
|
+
data: unknown;
|
|
84
|
+
}): Promise<{
|
|
85
|
+
message: string;
|
|
86
|
+
}>;
|
|
87
|
+
export {};
|
|
88
|
+
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,uBAAuB,EAAE,UA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,KAAK,GACN,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC;;GA8B1D;AAED,wBAAsB,2BAA2B,CAAC,EAChD,MAAM,EACN,UAAU,EACV,KAAK,EACL,KAAK,EACL,IAAI,GACL,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC,GAAG;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;;GA8BA"}
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { cancelWorkflowRunHandler, createWorkflowRunHandler, getWorkflowByIdHandler, getWorkflowRunByIdHandler, getWorkflowRunExecutionResultHandler, getWorkflowRunsHandler, getWorkflowsHandler, resumeAsyncWorkflowHandler, resumeWorkflowHandler, sendWorkflowRunEventHandler, startAsyncWorkflowHandler, startWorkflowRunHandler, streamWorkflowHandler, watchWorkflowHandler } from '../../chunk-
|
|
1
|
+
export { cancelWorkflowRunHandler, createWorkflowRunHandler, getWorkflowByIdHandler, getWorkflowRunByIdHandler, getWorkflowRunExecutionResultHandler, getWorkflowRunsHandler, getWorkflowsHandler, resumeAsyncWorkflowHandler, resumeWorkflowHandler, sendWorkflowRunEventHandler, startAsyncWorkflowHandler, startWorkflowRunHandler, streamVNextWorkflowHandler, streamWorkflowHandler, watchWorkflowHandler } from '../../chunk-BUOJL3MN.js';
|
|
2
|
+
//# sourceMappingURL=workflows.js.map
|
|
3
|
+
//# sourceMappingURL=workflows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"workflows.js"}
|
package/dist/server/handlers.cjs
CHANGED
|
@@ -1,60 +1,67 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
3
|
+
var chunk4US5W7PH_cjs = require('../chunk-4US5W7PH.cjs');
|
|
4
|
+
var chunkS37KCGOR_cjs = require('../chunk-S37KCGOR.cjs');
|
|
5
|
+
var chunkGX25CWC7_cjs = require('../chunk-GX25CWC7.cjs');
|
|
6
|
+
var chunk4CEZIJWJ_cjs = require('../chunk-4CEZIJWJ.cjs');
|
|
7
|
+
var chunkRQQNZZAI_cjs = require('../chunk-RQQNZZAI.cjs');
|
|
8
|
+
var chunkILCWPBYQ_cjs = require('../chunk-ILCWPBYQ.cjs');
|
|
9
|
+
var chunkO4I563YW_cjs = require('../chunk-O4I563YW.cjs');
|
|
10
|
+
var chunkNCS2OXX6_cjs = require('../chunk-NCS2OXX6.cjs');
|
|
11
|
+
var chunkKXNFZXLG_cjs = require('../chunk-KXNFZXLG.cjs');
|
|
12
|
+
var chunkEBNIUZRY_cjs = require('../chunk-EBNIUZRY.cjs');
|
|
13
|
+
var chunkJGVY3KWV_cjs = require('../chunk-JGVY3KWV.cjs');
|
|
14
|
+
var chunkBED2O446_cjs = require('../chunk-BED2O446.cjs');
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "voice", {
|
|
18
19
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunk4US5W7PH_cjs.voice_exports; }
|
|
20
21
|
});
|
|
21
|
-
Object.defineProperty(exports, "
|
|
22
|
+
Object.defineProperty(exports, "workflows", {
|
|
22
23
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkS37KCGOR_cjs.workflows_exports; }
|
|
24
25
|
});
|
|
25
|
-
Object.defineProperty(exports, "
|
|
26
|
+
Object.defineProperty(exports, "memory", {
|
|
26
27
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkGX25CWC7_cjs.memory_exports; }
|
|
28
29
|
});
|
|
29
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "network", {
|
|
30
31
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunk4CEZIJWJ_cjs.network_exports; }
|
|
32
33
|
});
|
|
33
|
-
Object.defineProperty(exports, "
|
|
34
|
+
Object.defineProperty(exports, "scores", {
|
|
34
35
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkRQQNZZAI_cjs.scores_exports; }
|
|
36
37
|
});
|
|
37
|
-
Object.defineProperty(exports, "
|
|
38
|
+
Object.defineProperty(exports, "telemetry", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return chunkILCWPBYQ_cjs.telemetry_exports; }
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "tools", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return chunkO4I563YW_cjs.tools_exports; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "vector", {
|
|
38
47
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkNCS2OXX6_cjs.vector_exports; }
|
|
40
49
|
});
|
|
41
50
|
Object.defineProperty(exports, "a2a", {
|
|
42
51
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkKXNFZXLG_cjs.a2a_exports; }
|
|
44
53
|
});
|
|
45
54
|
Object.defineProperty(exports, "agents", {
|
|
46
55
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkEBNIUZRY_cjs.agents_exports; }
|
|
48
57
|
});
|
|
49
58
|
Object.defineProperty(exports, "legacyWorkflows", {
|
|
50
59
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkJGVY3KWV_cjs.legacyWorkflows_exports; }
|
|
52
61
|
});
|
|
53
62
|
Object.defineProperty(exports, "logs", {
|
|
54
63
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
56
|
-
});
|
|
57
|
-
Object.defineProperty(exports, "memory", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
get: function () { return chunkDN7K6FJK_cjs.memory_exports; }
|
|
64
|
+
get: function () { return chunkBED2O446_cjs.logs_exports; }
|
|
60
65
|
});
|
|
66
|
+
//# sourceMappingURL=handlers.cjs.map
|
|
67
|
+
//# sourceMappingURL=handlers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"handlers.cjs"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
1
|
+
export * as agents from './handlers/agents.js';
|
|
2
|
+
export * as a2a from './handlers/a2a.js';
|
|
3
|
+
export * as legacyWorkflows from './handlers/legacyWorkflows.js';
|
|
4
|
+
export * as logs from './handlers/logs.js';
|
|
5
|
+
export * as memory from './handlers/memory.js';
|
|
6
|
+
export * as network from './handlers/network.js';
|
|
7
|
+
export * as scores from './handlers/scores.js';
|
|
8
|
+
export * as telemetry from './handlers/telemetry.js';
|
|
9
|
+
export * as tools from './handlers/tools.js';
|
|
10
|
+
export * as vector from './handlers/vector.js';
|
|
11
|
+
export * as voice from './handlers/voice.js';
|
|
12
|
+
export * as workflows from './handlers/workflows.js';
|
|
13
|
+
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/server/handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC"}
|
package/dist/server/handlers.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
1
|
+
export { voice_exports as voice } from '../chunk-HWHKM67I.js';
|
|
2
|
+
export { workflows_exports as workflows } from '../chunk-BUOJL3MN.js';
|
|
3
|
+
export { memory_exports as memory } from '../chunk-ZKJZQN24.js';
|
|
4
|
+
export { network_exports as network } from '../chunk-Y3J45CVZ.js';
|
|
5
|
+
export { scores_exports as scores } from '../chunk-L7YG7WQH.js';
|
|
6
|
+
export { telemetry_exports as telemetry } from '../chunk-SQ7KKIH3.js';
|
|
7
|
+
export { tools_exports as tools } from '../chunk-YS66MFDY.js';
|
|
8
|
+
export { vector_exports as vector } from '../chunk-G7NVCO5M.js';
|
|
9
|
+
export { a2a_exports as a2a } from '../chunk-JNWFG7JP.js';
|
|
10
|
+
export { agents_exports as agents } from '../chunk-5AKR33BI.js';
|
|
11
|
+
export { legacyWorkflows_exports as legacyWorkflows } from '../chunk-UVOSITKU.js';
|
|
12
|
+
export { logs_exports as logs } from '../chunk-4MQU6AJN.js';
|
|
13
|
+
//# sourceMappingURL=handlers.js.map
|
|
14
|
+
//# sourceMappingURL=handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"handlers.js"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* This module provides the `HTTPException` class.
|
|
4
|
+
*/
|
|
5
|
+
type InfoStatusCode = 100 | 101 | 102 | 103;
|
|
6
|
+
type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
|
|
7
|
+
type DeprecatedStatusCode = 305 | 306;
|
|
8
|
+
type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308;
|
|
9
|
+
type ClientErrorStatusCode = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451;
|
|
10
|
+
type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
|
|
11
|
+
/**
|
|
12
|
+
* `UnofficialStatusCode` can be used to specify an unofficial status code.
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* app.get('/unknown', (c) => {
|
|
17
|
+
* return c.text("Unknown Error", 520 as UnofficialStatusCode)
|
|
18
|
+
* })
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export type UnofficialStatusCode = -1;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
* Use `UnofficialStatusCode` instead.
|
|
25
|
+
*/
|
|
26
|
+
export type UnOfficalStatusCode = UnofficialStatusCode;
|
|
27
|
+
/**
|
|
28
|
+
* If you want to use an unofficial status, use `UnofficialStatusCode`.
|
|
29
|
+
*/
|
|
30
|
+
export type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode;
|
|
31
|
+
/**
|
|
32
|
+
* Options for creating an `HTTPException`.
|
|
33
|
+
* @property res - Optional response object to use.
|
|
34
|
+
* @property message - Optional custom error message.
|
|
35
|
+
* @property cause - Optional cause of the error.
|
|
36
|
+
* @property stack - Optional stack trace for the error.
|
|
37
|
+
*/
|
|
38
|
+
type HTTPExceptionOptions = {
|
|
39
|
+
res?: Response;
|
|
40
|
+
message?: string;
|
|
41
|
+
cause?: unknown;
|
|
42
|
+
stack?: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* `HTTPException` must be used when a fatal error such as authentication failure occurs.
|
|
46
|
+
*
|
|
47
|
+
* @see {@link https://hono.dev/docs/api/exception}
|
|
48
|
+
*
|
|
49
|
+
* @param {StatusCode} status - status code of HTTPException
|
|
50
|
+
* @param {HTTPExceptionOptions} options - options of HTTPException
|
|
51
|
+
* @param {HTTPExceptionOptions["res"]} options.res - response of options of HTTPException
|
|
52
|
+
* @param {HTTPExceptionOptions["message"]} options.message - message of options of HTTPException
|
|
53
|
+
* @param {HTTPExceptionOptions["cause"]} options.cause - cause of options of HTTPException
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* import { HTTPException } from 'hono/http-exception'
|
|
58
|
+
*
|
|
59
|
+
* // ...
|
|
60
|
+
*
|
|
61
|
+
* app.post('/auth', async (c, next) => {
|
|
62
|
+
* // authentication
|
|
63
|
+
* if (authorized === false) {
|
|
64
|
+
* throw new HTTPException(401, { message: 'Custom error message' })
|
|
65
|
+
* }
|
|
66
|
+
* await next()
|
|
67
|
+
* })
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare class HTTPException extends Error {
|
|
71
|
+
readonly res?: Response;
|
|
72
|
+
readonly status: StatusCode;
|
|
73
|
+
/**
|
|
74
|
+
* Creates an instance of `HTTPException`.
|
|
75
|
+
* @param status - HTTP status code for the exception. Defaults to 500.
|
|
76
|
+
* @param options - Additional options for the exception.
|
|
77
|
+
*/
|
|
78
|
+
constructor(status?: StatusCode, options?: HTTPExceptionOptions);
|
|
79
|
+
/**
|
|
80
|
+
* Returns the response object associated with the exception.
|
|
81
|
+
* If a response object is not provided, a new response is created with the error message and status code.
|
|
82
|
+
* @returns The response object.
|
|
83
|
+
*/
|
|
84
|
+
getResponse(): Response;
|
|
85
|
+
}
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=http-exception.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-exception.d.ts","sourceRoot":"","sources":["../../src/server/http-exception.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,KAAK,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAC5C,KAAK,iBAAiB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AACnF,KAAK,oBAAoB,GAAG,GAAG,GAAG,GAAG,CAAC;AACtC,KAAK,kBAAkB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,oBAAoB,GAAG,GAAG,GAAG,GAAG,CAAC;AACzF,KAAK,qBAAqB,GACtB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAC;AACR,KAAK,qBAAqB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7F;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,CAAC;AAEtC;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,iBAAiB,GACjB,kBAAkB,GAClB,qBAAqB,GACrB,qBAAqB,GACrB,oBAAoB,CAAC;AAEzB;;;;;;GAMG;AACH,KAAK,oBAAoB,GAAG;IAC1B,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAE5B;;;;OAIG;gBACS,MAAM,GAAE,UAAgB,EAAE,OAAO,CAAC,EAAE,oBAAoB;IAOpE;;;;OAIG;IACH,WAAW,IAAI,QAAQ;CAYxB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MastraError } from '@mastra/core/error';
|
|
2
|
+
import type { Mastra } from '@mastra/core/mastra';
|
|
3
|
+
export interface ApiError extends MastraError {
|
|
4
|
+
message: string;
|
|
5
|
+
status?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface Context {
|
|
8
|
+
mastra: Mastra;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,WAAW,QAAS,SAAQ,WAAW;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|