@mastra/server 0.0.0-llamaindex-switch-core-20250424001624 → 0.0.0-main-test-20251105183450
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 +4494 -0
- package/LICENSE.md +11 -42
- package/README.md +45 -137
- package/dist/chunk-2PLXW4ZX.cjs +2777 -0
- package/dist/chunk-2PLXW4ZX.cjs.map +1 -0
- package/dist/chunk-46Z2KDQL.js +124 -0
- package/dist/chunk-46Z2KDQL.js.map +1 -0
- package/dist/{chunk-FV45V6WC.cjs → chunk-64ITUOXI.cjs} +3 -7
- package/dist/chunk-64ITUOXI.cjs.map +1 -0
- package/dist/{chunk-TRDNDNGQ.js → chunk-6QWQZI4Q.js} +4 -7
- package/dist/chunk-6QWQZI4Q.js.map +1 -0
- package/dist/chunk-73PAWDM5.js +83 -0
- package/dist/chunk-73PAWDM5.js.map +1 -0
- package/dist/chunk-A5SOZY5R.js +502 -0
- package/dist/chunk-A5SOZY5R.js.map +1 -0
- package/dist/chunk-AEVI2HIU.cjs +651 -0
- package/dist/chunk-AEVI2HIU.cjs.map +1 -0
- package/dist/chunk-ALOLTNSO.js +477 -0
- package/dist/chunk-ALOLTNSO.js.map +1 -0
- package/dist/chunk-B6NK4KI5.cjs +128 -0
- package/dist/chunk-B6NK4KI5.cjs.map +1 -0
- package/dist/chunk-BANGX6SC.cjs +200 -0
- package/dist/chunk-BANGX6SC.cjs.map +1 -0
- package/dist/chunk-BHQH5QXD.cjs +172 -0
- package/dist/chunk-BHQH5QXD.cjs.map +1 -0
- package/dist/chunk-BTWIR2B7.cjs +28 -0
- package/dist/chunk-BTWIR2B7.cjs.map +1 -0
- package/dist/chunk-DNUO33HF.js +129 -0
- package/dist/chunk-DNUO33HF.js.map +1 -0
- package/dist/chunk-GTZOYEAU.cjs +130 -0
- package/dist/chunk-GTZOYEAU.cjs.map +1 -0
- package/dist/chunk-GU4EWMZB.cjs +769 -0
- package/dist/chunk-GU4EWMZB.cjs.map +1 -0
- package/dist/chunk-IGOWG5V5.js +192 -0
- package/dist/chunk-IGOWG5V5.js.map +1 -0
- package/dist/chunk-JO2AZFJN.js +165 -0
- package/dist/chunk-JO2AZFJN.js.map +1 -0
- package/dist/chunk-JZ65BJ6H.cjs +678 -0
- package/dist/chunk-JZ65BJ6H.cjs.map +1 -0
- package/dist/{chunk-4JINXASC.js → chunk-KWH5QBXP.js} +7 -4
- package/dist/chunk-KWH5QBXP.js.map +1 -0
- package/dist/chunk-LF2ZLOFP.js +767 -0
- package/dist/chunk-LF2ZLOFP.js.map +1 -0
- package/dist/{chunk-Q6SHQECN.js → chunk-LPCK5MAF.js} +47 -13
- package/dist/chunk-LPCK5MAF.js.map +1 -0
- package/dist/chunk-LPM6BBAX.cjs +1043 -0
- package/dist/chunk-LPM6BBAX.cjs.map +1 -0
- package/dist/chunk-LWLSQ2W4.cjs +133 -0
- package/dist/chunk-LWLSQ2W4.cjs.map +1 -0
- package/dist/chunk-MMQIJZ2Q.cjs +23079 -0
- package/dist/chunk-MMQIJZ2Q.cjs.map +1 -0
- package/dist/chunk-O7I5CWRX.cjs +44 -0
- package/dist/chunk-O7I5CWRX.cjs.map +1 -0
- package/dist/chunk-PPMIB3FQ.cjs +88 -0
- package/dist/chunk-PPMIB3FQ.cjs.map +1 -0
- package/dist/chunk-PR4QN5HX.js +39 -0
- package/dist/chunk-PR4QN5HX.js.map +1 -0
- package/dist/chunk-QU6N55W6.cjs +256 -0
- package/dist/chunk-QU6N55W6.cjs.map +1 -0
- package/dist/chunk-R6OQFR47.js +630 -0
- package/dist/chunk-R6OQFR47.js.map +1 -0
- package/dist/chunk-RQK4FQUD.js +1012 -0
- package/dist/chunk-RQK4FQUD.js.map +1 -0
- package/dist/{chunk-M56ECCHK.cjs → chunk-S54HNARD.cjs} +22 -19
- package/dist/chunk-S54HNARD.cjs.map +1 -0
- package/dist/chunk-SHWNNZBL.js +254 -0
- package/dist/chunk-SHWNNZBL.js.map +1 -0
- package/dist/chunk-SIPNICB3.cjs +517 -0
- package/dist/chunk-SIPNICB3.cjs.map +1 -0
- package/dist/{chunk-L7XE5QTW.js → chunk-SZIFSF4T.js} +11 -2
- package/dist/chunk-SZIFSF4T.js.map +1 -0
- package/dist/chunk-TOCYBDP2.js +46 -0
- package/dist/chunk-TOCYBDP2.js.map +1 -0
- package/dist/chunk-UU7MMOP5.js +23039 -0
- package/dist/chunk-UU7MMOP5.js.map +1 -0
- package/dist/chunk-UXGQZUYZ.js +16 -0
- package/dist/chunk-UXGQZUYZ.js.map +1 -0
- package/dist/chunk-V5WWQN7P.cjs +18 -0
- package/dist/chunk-V5WWQN7P.cjs.map +1 -0
- package/dist/chunk-VYR3SAFM.js +658 -0
- package/dist/chunk-VYR3SAFM.js.map +1 -0
- package/dist/chunk-X6C7BUWN.cjs +48 -0
- package/dist/chunk-X6C7BUWN.cjs.map +1 -0
- package/dist/chunk-XXGID4PQ.cjs +485 -0
- package/dist/chunk-XXGID4PQ.cjs.map +1 -0
- package/dist/chunk-ZULZ2752.js +2774 -0
- package/dist/chunk-ZULZ2752.js.map +1 -0
- package/dist/dist-4MVGNSRL.cjs +1150 -0
- package/dist/dist-4MVGNSRL.cjs.map +1 -0
- package/dist/dist-FZYCV3VB.cjs +940 -0
- package/dist/dist-FZYCV3VB.cjs.map +1 -0
- package/dist/dist-G2BYZJOC.cjs +928 -0
- package/dist/dist-G2BYZJOC.cjs.map +1 -0
- package/dist/dist-P4MXBQ3U.cjs +16 -0
- package/dist/dist-P4MXBQ3U.cjs.map +1 -0
- package/dist/dist-PQZUVLPC.js +937 -0
- package/dist/dist-PQZUVLPC.js.map +1 -0
- package/dist/dist-R7WYX6LC.js +925 -0
- package/dist/dist-R7WYX6LC.js.map +1 -0
- package/dist/dist-RFMYFILX.cjs +764 -0
- package/dist/dist-RFMYFILX.cjs.map +1 -0
- package/dist/dist-X7XR3M3Z.js +1147 -0
- package/dist/dist-X7XR3M3Z.js.map +1 -0
- package/dist/dist-XVBSOGFK.js +761 -0
- package/dist/dist-XVBSOGFK.js.map +1 -0
- package/dist/dist-YREX2TJT.js +3 -0
- package/dist/dist-YREX2TJT.js.map +1 -0
- package/dist/index.cjs +6 -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 +5 -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 +32 -0
- package/dist/server/handlers/a2a.cjs.map +1 -0
- package/dist/server/handlers/a2a.d.ts +68 -0
- package/dist/server/handlers/a2a.d.ts.map +1 -0
- package/dist/server/handlers/a2a.js +3 -0
- package/dist/server/handlers/a2a.js.map +1 -0
- package/dist/server/handlers/agent-builder.cjs +84 -0
- package/dist/server/handlers/agent-builder.cjs.map +1 -0
- package/dist/server/handlers/agent-builder.d.ts +91 -0
- package/dist/server/handlers/agent-builder.d.ts.map +1 -0
- package/dist/server/handlers/agent-builder.js +3 -0
- package/dist/server/handlers/agent-builder.js.map +1 -0
- package/dist/server/handlers/agents.cjs +60 -10
- package/dist/server/handlers/agents.cjs.map +1 -0
- package/dist/server/handlers/agents.d.ts +194 -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/logs.cjs +9 -7
- 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 +34 -12
- package/dist/server/handlers/memory.cjs.map +1 -0
- package/dist/server/handlers/memory.d.ts +112 -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/observability.cjs +24 -0
- package/dist/server/handlers/observability.cjs.map +1 -0
- package/dist/server/handlers/observability.d.ts +49 -0
- package/dist/server/handlers/observability.d.ts.map +1 -0
- package/dist/server/handlers/observability.js +3 -0
- package/dist/server/handlers/observability.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 +152 -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/tools.cjs +12 -6
- package/dist/server/handlers/tools.cjs.map +1 -0
- package/dist/server/handlers/tools.d.ts +25 -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 +8 -2
- package/dist/server/handlers/utils.cjs.map +1 -0
- package/dist/server/handlers/utils.d.ts +8 -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/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 +10 -4
- package/dist/server/handlers/voice.cjs.map +1 -0
- package/dist/server/handlers/voice.d.ts +41 -3
- 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 +54 -16
- package/dist/server/handlers/workflows.cjs.map +1 -0
- package/dist/server/handlers/workflows.d.ts +94 -10
- 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 -26
- package/dist/server/handlers.cjs.map +1 -0
- package/dist/server/handlers.d.ts +12 -9
- package/dist/server/handlers.d.ts.map +1 -0
- package/dist/server/handlers.js +13 -9
- package/dist/server/handlers.js.map +1 -0
- package/dist/server/http-exception.d.ts +82 -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/dist/server/utils.d.ts +44 -0
- package/dist/server/utils.d.ts.map +1 -0
- package/dist/token-375W3LEI.cjs +64 -0
- package/dist/token-375W3LEI.cjs.map +1 -0
- package/dist/token-C3IMNCC4.js +62 -0
- package/dist/token-C3IMNCC4.js.map +1 -0
- package/dist/token-util-CV3RRG6K.cjs +9 -0
- package/dist/token-util-CV3RRG6K.cjs.map +1 -0
- package/dist/token-util-E5QO2RCL.js +7 -0
- package/dist/token-util-E5QO2RCL.js.map +1 -0
- package/package.json +46 -19
- package/dist/_tsup-dts-rollup.d.cts +0 -571
- package/dist/_tsup-dts-rollup.d.ts +0 -571
- package/dist/chunk-2FJURXCL.cjs +0 -213
- package/dist/chunk-3AHQ5RGN.js +0 -11
- package/dist/chunk-3EJZQ6TQ.js +0 -49
- package/dist/chunk-55HTWX4C.cjs +0 -93
- package/dist/chunk-5JNVY6DU.js +0 -120
- package/dist/chunk-5SWCVTNL.cjs +0 -5579
- package/dist/chunk-7IWQE76Z.cjs +0 -139
- package/dist/chunk-D3G23FP3.cjs +0 -126
- package/dist/chunk-FPIWDH5Y.cjs +0 -126
- package/dist/chunk-HCOPJZ4A.cjs +0 -164
- package/dist/chunk-LFOBHRFO.js +0 -305
- package/dist/chunk-OMN3UI6X.js +0 -5576
- package/dist/chunk-QN4KF3BH.cjs +0 -18
- package/dist/chunk-R4J7XQYU.js +0 -156
- package/dist/chunk-RBQASTUP.js +0 -203
- package/dist/chunk-RE6YL32K.js +0 -120
- package/dist/chunk-SKBVVI24.cjs +0 -54
- package/dist/chunk-TZK63M5N.cjs +0 -317
- package/dist/chunk-WTHDCRMY.js +0 -135
- package/dist/chunk-ZLBRQFDD.cjs +0 -13
- package/dist/index.d.cts +0 -1
- package/dist/server/handlers/agents.d.cts +0 -6
- package/dist/server/handlers/error.d.cts +0 -1
- package/dist/server/handlers/logs.d.cts +0 -3
- package/dist/server/handlers/memory.d.cts +0 -8
- package/dist/server/handlers/network.cjs +0 -22
- package/dist/server/handlers/network.d.cts +0 -4
- package/dist/server/handlers/network.d.ts +0 -4
- package/dist/server/handlers/network.js +0 -1
- package/dist/server/handlers/telemetry.cjs +0 -14
- package/dist/server/handlers/telemetry.d.cts +0 -2
- package/dist/server/handlers/telemetry.d.ts +0 -2
- package/dist/server/handlers/telemetry.js +0 -1
- package/dist/server/handlers/tools.d.cts +0 -4
- package/dist/server/handlers/utils.d.cts +0 -1
- package/dist/server/handlers/vector.d.cts +0 -6
- package/dist/server/handlers/voice.d.cts +0 -3
- package/dist/server/handlers/workflows.d.cts +0 -10
- package/dist/server/handlers.d.cts +0 -9
|
@@ -1,3 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Agent } from '@mastra/core/agent';
|
|
2
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
3
|
+
import type { Context } from '../types.js';
|
|
4
|
+
interface VoiceContext extends Context {
|
|
5
|
+
agentId?: string;
|
|
6
|
+
requestContext?: RequestContext;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Get available speakers for an agent
|
|
10
|
+
*/
|
|
11
|
+
export declare function getSpeakersHandler({ mastra, agentId, requestContext }: VoiceContext): Promise<{
|
|
12
|
+
voiceId: string;
|
|
13
|
+
}[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Generate speech from text
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateSpeechHandler({ mastra, agentId, body, requestContext, }: VoiceContext & {
|
|
18
|
+
body?: {
|
|
19
|
+
text?: string;
|
|
20
|
+
speakerId?: string;
|
|
21
|
+
};
|
|
22
|
+
}): Promise<NodeJS.ReadableStream>;
|
|
23
|
+
/**
|
|
24
|
+
* Transcribe speech to text
|
|
25
|
+
*/
|
|
26
|
+
export declare function transcribeSpeechHandler({ mastra, agentId, body, requestContext, }: VoiceContext & {
|
|
27
|
+
body?: {
|
|
28
|
+
audioData?: Buffer;
|
|
29
|
+
options?: Parameters<NonNullable<Agent['voice']>['listen']>[1];
|
|
30
|
+
};
|
|
31
|
+
}): Promise<{
|
|
32
|
+
text: string | void | NodeJS.ReadableStream;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Get available listeners for an agent
|
|
36
|
+
*/
|
|
37
|
+
export declare function getListenerHandler({ mastra, agentId, requestContext }: VoiceContext): Promise<{
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
}>;
|
|
40
|
+
export {};
|
|
41
|
+
//# 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,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKxC,UAAU,YAAa,SAAQ,OAAO;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,YAAY;;KAuBzF;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,EAC1C,MAAM,EACN,OAAO,EACP,IAAI,EACJ,cAAc,GACf,EAAE,YAAY,GAAG;IAChB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,kCAwCA;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,EAC5C,MAAM,EACN,OAAO,EACP,IAAI,EACJ,cAAc,GACf,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,cAAc,EAAE,EAAE,YAAY;;GAuBzF"}
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export { generateSpeechHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-
|
|
1
|
+
export { generateSpeechHandler, getListenerHandler, getSpeakersHandler, transcribeSpeechHandler } from '../../chunk-LPCK5MAF.js';
|
|
2
|
+
//# sourceMappingURL=voice.js.map
|
|
3
|
+
//# sourceMappingURL=voice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"voice.js"}
|
|
@@ -1,46 +1,84 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAEVI2HIU_cjs = require('../../chunk-AEVI2HIU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
Object.defineProperty(exports, "
|
|
7
|
+
Object.defineProperty(exports, "cancelWorkflowRunHandler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkAEVI2HIU_cjs.cancelWorkflowRunHandler; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "createWorkflowRunHandler", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkAEVI2HIU_cjs.createWorkflowRunHandler; }
|
|
10
14
|
});
|
|
11
15
|
Object.defineProperty(exports, "getWorkflowByIdHandler", {
|
|
12
16
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkAEVI2HIU_cjs.getWorkflowByIdHandler; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "getWorkflowRunByIdHandler", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkAEVI2HIU_cjs.getWorkflowRunByIdHandler; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "getWorkflowRunExecutionResultHandler", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkAEVI2HIU_cjs.getWorkflowRunExecutionResultHandler; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "listWorkflowRunsHandler", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkAEVI2HIU_cjs.listWorkflowRunsHandler; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "listWorkflowsHandler", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkAEVI2HIU_cjs.listWorkflowsHandler; }
|
|
14
34
|
});
|
|
15
|
-
Object.defineProperty(exports, "
|
|
35
|
+
Object.defineProperty(exports, "observeStreamLegacyWorkflowHandler", {
|
|
16
36
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkAEVI2HIU_cjs.observeStreamLegacyWorkflowHandler; }
|
|
18
38
|
});
|
|
19
|
-
Object.defineProperty(exports, "
|
|
39
|
+
Object.defineProperty(exports, "observeStreamVNextWorkflowHandler", {
|
|
20
40
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkAEVI2HIU_cjs.observeStreamVNextWorkflowHandler; }
|
|
22
42
|
});
|
|
23
|
-
Object.defineProperty(exports, "
|
|
43
|
+
Object.defineProperty(exports, "observeStreamWorkflowHandler", {
|
|
24
44
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkAEVI2HIU_cjs.observeStreamWorkflowHandler; }
|
|
26
46
|
});
|
|
27
47
|
Object.defineProperty(exports, "resumeAsyncWorkflowHandler", {
|
|
28
48
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkAEVI2HIU_cjs.resumeAsyncWorkflowHandler; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "resumeStreamWorkflowHandler", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return chunkAEVI2HIU_cjs.resumeStreamWorkflowHandler; }
|
|
30
54
|
});
|
|
31
55
|
Object.defineProperty(exports, "resumeWorkflowHandler", {
|
|
32
56
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkAEVI2HIU_cjs.resumeWorkflowHandler; }
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "sendWorkflowRunEventHandler", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () { return chunkAEVI2HIU_cjs.sendWorkflowRunEventHandler; }
|
|
34
62
|
});
|
|
35
63
|
Object.defineProperty(exports, "startAsyncWorkflowHandler", {
|
|
36
64
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkAEVI2HIU_cjs.startAsyncWorkflowHandler; }
|
|
38
66
|
});
|
|
39
67
|
Object.defineProperty(exports, "startWorkflowRunHandler", {
|
|
40
68
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkAEVI2HIU_cjs.startWorkflowRunHandler; }
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports, "streamLegacyWorkflowHandler", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () { return chunkAEVI2HIU_cjs.streamLegacyWorkflowHandler; }
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "streamVNextWorkflowHandler", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () { return chunkAEVI2HIU_cjs.streamVNextWorkflowHandler; }
|
|
42
78
|
});
|
|
43
|
-
Object.defineProperty(exports, "
|
|
79
|
+
Object.defineProperty(exports, "streamWorkflowHandler", {
|
|
44
80
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkAEVI2HIU_cjs.streamWorkflowHandler; }
|
|
46
82
|
});
|
|
83
|
+
//# sourceMappingURL=workflows.cjs.map
|
|
84
|
+
//# sourceMappingURL=workflows.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"workflows.cjs"}
|
|
@@ -1,10 +1,94 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { ReadableStream } from 'node:stream/web';
|
|
2
|
+
import type { RequestContext } from '@mastra/core/di';
|
|
3
|
+
import type { TracingOptions } from '@mastra/core/observability';
|
|
4
|
+
import type { WorkflowRuns } from '@mastra/core/storage';
|
|
5
|
+
import type { Workflow, WorkflowInfo, ChunkType, StreamEvent, WorkflowState } from '@mastra/core/workflows';
|
|
6
|
+
import type { Context } from '../types.js';
|
|
7
|
+
export interface WorkflowContext extends Context {
|
|
8
|
+
workflowId?: string;
|
|
9
|
+
runId?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function listWorkflowsHandler({ mastra }: WorkflowContext): Promise<Record<string, WorkflowInfo>>;
|
|
12
|
+
export declare function getWorkflowByIdHandler({ mastra, workflowId }: WorkflowContext): Promise<WorkflowInfo>;
|
|
13
|
+
export declare function getWorkflowRunByIdHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<Workflow['getWorkflowRunById']>>;
|
|
14
|
+
export declare function getWorkflowRunExecutionResultHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<WorkflowState>;
|
|
15
|
+
export declare function createWorkflowRunHandler({ mastra, workflowId, runId: prevRunId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
16
|
+
runId: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function startAsyncWorkflowHandler({ mastra, requestContext, workflowId, runId, inputData, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
19
|
+
inputData?: unknown;
|
|
20
|
+
requestContext?: RequestContext;
|
|
21
|
+
tracingOptions?: TracingOptions;
|
|
22
|
+
}): Promise<import("@mastra/core/workflows").WorkflowResult<any, any, any, any>>;
|
|
23
|
+
export declare function startWorkflowRunHandler({ mastra, requestContext, workflowId, runId, inputData, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
24
|
+
inputData?: unknown;
|
|
25
|
+
requestContext?: RequestContext;
|
|
26
|
+
tracingOptions?: TracingOptions;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
message: string;
|
|
29
|
+
}>;
|
|
30
|
+
export declare function streamWorkflowHandler({ mastra, requestContext, workflowId, runId, inputData, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
31
|
+
inputData?: unknown;
|
|
32
|
+
requestContext?: RequestContext;
|
|
33
|
+
tracingOptions?: TracingOptions;
|
|
34
|
+
}): Promise<ReadableStream<ChunkType>>;
|
|
35
|
+
export declare function streamLegacyWorkflowHandler({ mastra, requestContext, workflowId, runId, inputData, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
36
|
+
inputData?: unknown;
|
|
37
|
+
requestContext?: RequestContext;
|
|
38
|
+
tracingOptions?: TracingOptions;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
stream: ReadableStream<StreamEvent>;
|
|
41
|
+
getWorkflowState: () => Promise<import("@mastra/core/workflows").WorkflowResult<any, any, any, any>>;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function observeStreamLegacyWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream<StreamEvent>>;
|
|
44
|
+
export declare function observeStreamWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream<ChunkType>>;
|
|
45
|
+
export declare function streamVNextWorkflowHandler({ mastra, requestContext, workflowId, runId, inputData, closeOnSuspend, tracingOptions, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
46
|
+
inputData?: unknown;
|
|
47
|
+
requestContext?: RequestContext;
|
|
48
|
+
closeOnSuspend?: boolean;
|
|
49
|
+
tracingOptions?: TracingOptions;
|
|
50
|
+
}): Promise<ReadableStream<ChunkType>>;
|
|
51
|
+
export declare function observeStreamVNextWorkflowHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReadableStream<ChunkType>>;
|
|
52
|
+
export declare function resumeAsyncWorkflowHandler({ mastra, workflowId, runId, body, requestContext, tracingOptions, }: WorkflowContext & {
|
|
53
|
+
body: {
|
|
54
|
+
step: string | string[];
|
|
55
|
+
resumeData?: unknown;
|
|
56
|
+
};
|
|
57
|
+
requestContext?: RequestContext;
|
|
58
|
+
tracingOptions?: TracingOptions;
|
|
59
|
+
}): Promise<import("@mastra/core/workflows").WorkflowResult<any, any, any, any>>;
|
|
60
|
+
export declare function resumeWorkflowHandler({ mastra, workflowId, runId, body, requestContext, tracingOptions, }: WorkflowContext & {
|
|
61
|
+
body: {
|
|
62
|
+
step: string | string[];
|
|
63
|
+
resumeData?: unknown;
|
|
64
|
+
};
|
|
65
|
+
requestContext?: RequestContext;
|
|
66
|
+
tracingOptions?: TracingOptions;
|
|
67
|
+
}): Promise<{
|
|
68
|
+
message: string;
|
|
69
|
+
}>;
|
|
70
|
+
export declare function resumeStreamWorkflowHandler({ mastra, workflowId, runId, body, requestContext, tracingOptions, }: WorkflowContext & {
|
|
71
|
+
body: {
|
|
72
|
+
step: string | string[];
|
|
73
|
+
resumeData?: unknown;
|
|
74
|
+
};
|
|
75
|
+
requestContext?: RequestContext;
|
|
76
|
+
tracingOptions?: TracingOptions;
|
|
77
|
+
}): Promise<ReadableStream<ChunkType>>;
|
|
78
|
+
export declare function listWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, perPage, page, resourceId, }: WorkflowContext & {
|
|
79
|
+
fromDate?: Date;
|
|
80
|
+
toDate?: Date;
|
|
81
|
+
perPage?: number | false;
|
|
82
|
+
page?: number;
|
|
83
|
+
resourceId?: string;
|
|
84
|
+
}): Promise<WorkflowRuns>;
|
|
85
|
+
export declare function cancelWorkflowRunHandler({ mastra, workflowId, runId, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<{
|
|
86
|
+
message: string;
|
|
87
|
+
}>;
|
|
88
|
+
export declare function sendWorkflowRunEventHandler({ mastra, workflowId, runId, event, data, }: Pick<WorkflowContext, 'mastra' | 'workflowId' | 'runId'> & {
|
|
89
|
+
event: string;
|
|
90
|
+
data: unknown;
|
|
91
|
+
}): Promise<{
|
|
92
|
+
message: string;
|
|
93
|
+
}>;
|
|
94
|
+
//# 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,EAAmB,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5G,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxC,MAAM,WAAW,eAAgB,SAAQ,OAAO;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,oBAAoB,CAAC,EAAE,MAAM,EAAE,EAAE,eAAe,yCAWrE;AAkDD,wBAAsB,sBAAsB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,CAgB3G;AAED,wBAAsB,yBAAyB,CAAC,EAC9C,MAAM,EACN,UAAU,EACV,KAAK,GACN,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAC,CA0BhH;AAED,wBAAsB,oCAAoC,CAAC,EACzD,MAAM,EACN,UAAU,EACV,KAAK,GACN,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC,GAAG,OAAO,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,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 {
|
|
1
|
+
export { cancelWorkflowRunHandler, createWorkflowRunHandler, getWorkflowByIdHandler, getWorkflowRunByIdHandler, getWorkflowRunExecutionResultHandler, listWorkflowRunsHandler, listWorkflowsHandler, observeStreamLegacyWorkflowHandler, observeStreamVNextWorkflowHandler, observeStreamWorkflowHandler, resumeAsyncWorkflowHandler, resumeStreamWorkflowHandler, resumeWorkflowHandler, sendWorkflowRunEventHandler, startAsyncWorkflowHandler, startWorkflowRunHandler, streamLegacyWorkflowHandler, streamVNextWorkflowHandler, streamWorkflowHandler } from '../../chunk-R6OQFR47.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,50 +1,62 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
3
|
+
var chunkSIPNICB3_cjs = require('../chunk-SIPNICB3.cjs');
|
|
4
|
+
var chunkGTZOYEAU_cjs = require('../chunk-GTZOYEAU.cjs');
|
|
5
|
+
var chunkBANGX6SC_cjs = require('../chunk-BANGX6SC.cjs');
|
|
6
|
+
var chunkBHQH5QXD_cjs = require('../chunk-BHQH5QXD.cjs');
|
|
7
|
+
var chunkS54HNARD_cjs = require('../chunk-S54HNARD.cjs');
|
|
8
|
+
var chunkB6NK4KI5_cjs = require('../chunk-B6NK4KI5.cjs');
|
|
9
|
+
var chunkXXGID4PQ_cjs = require('../chunk-XXGID4PQ.cjs');
|
|
10
|
+
var chunkMMQIJZ2Q_cjs = require('../chunk-MMQIJZ2Q.cjs');
|
|
11
|
+
var chunkAEVI2HIU_cjs = require('../chunk-AEVI2HIU.cjs');
|
|
12
|
+
var chunkJZ65BJ6H_cjs = require('../chunk-JZ65BJ6H.cjs');
|
|
13
|
+
var chunkPPMIB3FQ_cjs = require('../chunk-PPMIB3FQ.cjs');
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
|
|
17
|
+
Object.defineProperty(exports, "memory", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkSIPNICB3_cjs.memory_exports; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "observability", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkGTZOYEAU_cjs.observability_exports; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "scores", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkBANGX6SC_cjs.scores_exports; }
|
|
28
|
+
});
|
|
15
29
|
Object.defineProperty(exports, "tools", {
|
|
16
30
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkBHQH5QXD_cjs.tools_exports; }
|
|
18
32
|
});
|
|
19
33
|
Object.defineProperty(exports, "vector", {
|
|
20
34
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkS54HNARD_cjs.vector_exports; }
|
|
22
36
|
});
|
|
23
37
|
Object.defineProperty(exports, "voice", {
|
|
24
38
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
26
|
-
});
|
|
27
|
-
Object.defineProperty(exports, "workflows", {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () { return chunkTZK63M5N_cjs.workflows_exports; }
|
|
39
|
+
get: function () { return chunkB6NK4KI5_cjs.voice_exports; }
|
|
30
40
|
});
|
|
31
|
-
Object.defineProperty(exports, "
|
|
41
|
+
Object.defineProperty(exports, "a2a", {
|
|
32
42
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkXXGID4PQ_cjs.a2a_exports; }
|
|
34
44
|
});
|
|
35
|
-
Object.defineProperty(exports, "
|
|
45
|
+
Object.defineProperty(exports, "agentBuilder", {
|
|
36
46
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkMMQIJZ2Q_cjs.agent_builder_exports; }
|
|
38
48
|
});
|
|
39
|
-
Object.defineProperty(exports, "
|
|
49
|
+
Object.defineProperty(exports, "workflows", {
|
|
40
50
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkAEVI2HIU_cjs.workflows_exports; }
|
|
42
52
|
});
|
|
43
|
-
Object.defineProperty(exports, "
|
|
53
|
+
Object.defineProperty(exports, "agents", {
|
|
44
54
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkJZ65BJ6H_cjs.agents_exports; }
|
|
46
56
|
});
|
|
47
|
-
Object.defineProperty(exports, "
|
|
57
|
+
Object.defineProperty(exports, "logs", {
|
|
48
58
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkPPMIB3FQ_cjs.logs_exports; }
|
|
50
60
|
});
|
|
61
|
+
//# sourceMappingURL=handlers.cjs.map
|
|
62
|
+
//# sourceMappingURL=handlers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"handlers.cjs"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
1
|
+
export * as agentBuilder from './handlers/agent-builder.js';
|
|
2
|
+
export * as agents from './handlers/agents.js';
|
|
3
|
+
export * as a2a from './handlers/a2a.js';
|
|
4
|
+
export * as logs from './handlers/logs.js';
|
|
5
|
+
export * as memory from './handlers/memory.js';
|
|
6
|
+
export * as observability from './handlers/observability.js';
|
|
7
|
+
export * as scores from './handlers/scores.js';
|
|
8
|
+
export * as tools from './handlers/tools.js';
|
|
9
|
+
export * as vector from './handlers/vector.js';
|
|
10
|
+
export * as voice from './handlers/voice.js';
|
|
11
|
+
export * as workflows from './handlers/workflows.js';
|
|
12
|
+
//# 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,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,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,9 +1,13 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
1
|
+
export { memory_exports as memory } from '../chunk-A5SOZY5R.js';
|
|
2
|
+
export { observability_exports as observability } from '../chunk-46Z2KDQL.js';
|
|
3
|
+
export { scores_exports as scores } from '../chunk-IGOWG5V5.js';
|
|
4
|
+
export { tools_exports as tools } from '../chunk-JO2AZFJN.js';
|
|
5
|
+
export { vector_exports as vector } from '../chunk-KWH5QBXP.js';
|
|
6
|
+
export { voice_exports as voice } from '../chunk-LPCK5MAF.js';
|
|
7
|
+
export { a2a_exports as a2a } from '../chunk-ALOLTNSO.js';
|
|
8
|
+
export { agent_builder_exports as agentBuilder } from '../chunk-UU7MMOP5.js';
|
|
9
|
+
export { workflows_exports as workflows } from '../chunk-R6OQFR47.js';
|
|
10
|
+
export { agents_exports as agents } from '../chunk-VYR3SAFM.js';
|
|
11
|
+
export { logs_exports as logs } from '../chunk-73PAWDM5.js';
|
|
12
|
+
//# sourceMappingURL=handlers.js.map
|
|
13
|
+
//# sourceMappingURL=handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"handlers.js"}
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
* If you want to use an unofficial status, use `UnofficialStatusCode`.
|
|
24
|
+
*/
|
|
25
|
+
export type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode;
|
|
26
|
+
/**
|
|
27
|
+
* Options for creating an `HTTPException`.
|
|
28
|
+
* @property res - Optional response object to use.
|
|
29
|
+
* @property message - Optional custom error message.
|
|
30
|
+
* @property cause - Optional cause of the error.
|
|
31
|
+
* @property stack - Optional stack trace for the error.
|
|
32
|
+
*/
|
|
33
|
+
type HTTPExceptionOptions = {
|
|
34
|
+
res?: Response;
|
|
35
|
+
message?: string;
|
|
36
|
+
cause?: unknown;
|
|
37
|
+
stack?: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* `HTTPException` must be used when a fatal error such as authentication failure occurs.
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://hono.dev/docs/api/exception}
|
|
43
|
+
*
|
|
44
|
+
* @param {StatusCode} status - status code of HTTPException
|
|
45
|
+
* @param {HTTPExceptionOptions} options - options of HTTPException
|
|
46
|
+
* @param {HTTPExceptionOptions["res"]} options.res - response of options of HTTPException
|
|
47
|
+
* @param {HTTPExceptionOptions["message"]} options.message - message of options of HTTPException
|
|
48
|
+
* @param {HTTPExceptionOptions["cause"]} options.cause - cause of options of HTTPException
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { HTTPException } from 'hono/http-exception'
|
|
53
|
+
*
|
|
54
|
+
* // ...
|
|
55
|
+
*
|
|
56
|
+
* app.post('/auth', async (c, next) => {
|
|
57
|
+
* // authentication
|
|
58
|
+
* if (authorized === false) {
|
|
59
|
+
* throw new HTTPException(401, { message: 'Custom error message' })
|
|
60
|
+
* }
|
|
61
|
+
* await next()
|
|
62
|
+
* })
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare class HTTPException extends Error {
|
|
66
|
+
readonly res?: Response;
|
|
67
|
+
readonly status: StatusCode;
|
|
68
|
+
/**
|
|
69
|
+
* Creates an instance of `HTTPException`.
|
|
70
|
+
* @param status - HTTP status code for the exception. Defaults to 500.
|
|
71
|
+
* @param options - Additional options for the exception.
|
|
72
|
+
*/
|
|
73
|
+
constructor(status?: StatusCode, options?: HTTPExceptionOptions);
|
|
74
|
+
/**
|
|
75
|
+
* Returns the response object associated with the exception.
|
|
76
|
+
* If a response object is not provided, a new response is created with the error message and status code.
|
|
77
|
+
* @returns The response object.
|
|
78
|
+
*/
|
|
79
|
+
getResponse(): Response;
|
|
80
|
+
}
|
|
81
|
+
export {};
|
|
82
|
+
//# 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,GAA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ra } 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"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { SystemMessage } from '@mastra/core/llm';
|
|
2
|
+
import type { Workflow, WorkflowInfo } from '@mastra/core/workflows';
|
|
3
|
+
export declare function getWorkflowInfo(workflow: Workflow): WorkflowInfo;
|
|
4
|
+
/**
|
|
5
|
+
* Workflow Registry for temporarily registering additional workflows
|
|
6
|
+
* that are not part of the user's Mastra instance (e.g., internal template workflows)
|
|
7
|
+
*/
|
|
8
|
+
export declare class WorkflowRegistry {
|
|
9
|
+
private static additionalWorkflows;
|
|
10
|
+
/**
|
|
11
|
+
* Register a workflow temporarily
|
|
12
|
+
*/
|
|
13
|
+
static registerTemporaryWorkflow(id: string, workflow: Workflow): void;
|
|
14
|
+
/**
|
|
15
|
+
* Register all workflows from map
|
|
16
|
+
*/
|
|
17
|
+
static registerTemporaryWorkflows(workflows: Record<string, Workflow>, mastra?: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Get a workflow by ID from the registry (returns undefined if not found)
|
|
20
|
+
*/
|
|
21
|
+
static getWorkflow(workflowId: string): Workflow | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Get all workflows from the registry
|
|
24
|
+
*/
|
|
25
|
+
static getAllWorkflows(): Record<string, Workflow>;
|
|
26
|
+
/**
|
|
27
|
+
* Clean up a temporary workflow
|
|
28
|
+
*/
|
|
29
|
+
static cleanupTemporaryWorkflow(workflowId: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Clean up all registered workflows
|
|
32
|
+
*/
|
|
33
|
+
static cleanup(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Check if a workflow ID is a valid agent-builder workflow
|
|
36
|
+
*/
|
|
37
|
+
static isAgentBuilderWorkflow(workflowId: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Get all registered temporary workflow IDs (for debugging)
|
|
40
|
+
*/
|
|
41
|
+
static getRegisteredWorkflowIds(): string[];
|
|
42
|
+
}
|
|
43
|
+
export declare function convertInstructionsToString(message: SystemMessage): string;
|
|
44
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/server/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAqB,QAAQ,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AA0BxF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAqBhE;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAgC;IAElE;;OAEG;IACH,MAAM,CAAC,yBAAyB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAItE;;OAEG;IACH,MAAM,CAAC,0BAA0B,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI;IAiB1F;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IAI5D;;OAEG;IACH,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;IAIlD;;OAEG;IACH,MAAM,CAAC,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAGzD;;OAEG;IACH,MAAM,CAAC,OAAO,IAAI,IAAI;IAKtB;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI1D;;OAEG;IACH,MAAM,CAAC,wBAAwB,IAAI,MAAM,EAAE;CAG5C;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAwB1E"}
|