@mastra/core 1.23.0-alpha.4 → 1.23.0-alpha.5
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 +8 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/base.cjs +2 -2
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +1 -1
- package/dist/browser/index.cjs +6 -6
- package/dist/browser/index.js +3 -3
- package/dist/bundler/index.cjs +2 -2
- package/dist/bundler/index.js +1 -1
- package/dist/cache/index.cjs +3 -3
- package/dist/cache/index.js +1 -1
- package/dist/channels/index.cjs +4 -4
- package/dist/channels/index.js +1 -1
- package/dist/{chunk-CIV5MFO6.cjs → chunk-25EDFTQD.cjs} +4 -4
- package/dist/{chunk-CIV5MFO6.cjs.map → chunk-25EDFTQD.cjs.map} +1 -1
- package/dist/{chunk-K6W2C7PA.js → chunk-3APK6ZID.js} +3 -3
- package/dist/{chunk-K6W2C7PA.js.map → chunk-3APK6ZID.js.map} +1 -1
- package/dist/{chunk-YRDMMXBW.cjs → chunk-47RKHZIP.cjs} +34 -2
- package/dist/chunk-47RKHZIP.cjs.map +1 -0
- package/dist/{chunk-JK5YBBUS.cjs → chunk-4W26D7S6.cjs} +13 -13
- package/dist/chunk-4W26D7S6.cjs.map +1 -0
- package/dist/{chunk-7273BIRR.js → chunk-6UQKQBIB.js} +3 -3
- package/dist/{chunk-7273BIRR.js.map → chunk-6UQKQBIB.js.map} +1 -1
- package/dist/{chunk-G5WUD7SF.js → chunk-72EQLBZY.js} +3 -3
- package/dist/{chunk-G5WUD7SF.js.map → chunk-72EQLBZY.js.map} +1 -1
- package/dist/{chunk-C3G6OQ52.cjs → chunk-7DONY7OL.cjs} +10 -11
- package/dist/chunk-7DONY7OL.cjs.map +1 -0
- package/dist/{chunk-HBO2PK7W.cjs → chunk-7GW2TQXP.cjs} +4 -3
- package/dist/chunk-7GW2TQXP.cjs.map +1 -0
- package/dist/{chunk-74IXDLKF.cjs → chunk-7STIIXEL.cjs} +3 -3
- package/dist/{chunk-74IXDLKF.cjs.map → chunk-7STIIXEL.cjs.map} +1 -1
- package/dist/{chunk-44P7C37G.js → chunk-BMS7MLQV.js} +31 -3
- package/dist/chunk-BMS7MLQV.js.map +1 -0
- package/dist/{chunk-GEI2HTYE.js → chunk-C77V6J36.js} +3 -3
- package/dist/{chunk-GEI2HTYE.js.map → chunk-C77V6J36.js.map} +1 -1
- package/dist/{chunk-ANFGVHG2.cjs → chunk-DAQ4JZQA.cjs} +4 -4
- package/dist/{chunk-ANFGVHG2.cjs.map → chunk-DAQ4JZQA.cjs.map} +1 -1
- package/dist/{chunk-M3LRSDLL.js → chunk-DBBWTK24.js} +4 -3
- package/dist/chunk-DBBWTK24.js.map +1 -0
- package/dist/{chunk-JSG6FULW.cjs → chunk-DO4JBKMT.cjs} +109 -110
- package/dist/chunk-DO4JBKMT.cjs.map +1 -0
- package/dist/{chunk-PGXL3YYH.js → chunk-EG3UGEUZ.js} +4 -4
- package/dist/{chunk-PGXL3YYH.js.map → chunk-EG3UGEUZ.js.map} +1 -1
- package/dist/{chunk-KRDAO5BB.js → chunk-EXORPYDN.js} +3 -3
- package/dist/{chunk-KRDAO5BB.js.map → chunk-EXORPYDN.js.map} +1 -1
- package/dist/{chunk-DKK77FIJ.cjs → chunk-FCQNDFEW.cjs} +7 -7
- package/dist/chunk-FCQNDFEW.cjs.map +1 -0
- package/dist/{chunk-SQXNHM6M.cjs → chunk-FSHOQBGF.cjs} +28 -28
- package/dist/{chunk-SQXNHM6M.cjs.map → chunk-FSHOQBGF.cjs.map} +1 -1
- package/dist/{chunk-3EXOZA2Y.js → chunk-HQXVBGBM.js} +3 -3
- package/dist/{chunk-3EXOZA2Y.js.map → chunk-HQXVBGBM.js.map} +1 -1
- package/dist/{chunk-UUVQS3OG.js → chunk-HWAEQSOO.js} +12 -12
- package/dist/{chunk-UUVQS3OG.js.map → chunk-HWAEQSOO.js.map} +1 -1
- package/dist/{chunk-OF675HEC.cjs → chunk-I4YMMVQ3.cjs} +4 -4
- package/dist/{chunk-OF675HEC.cjs.map → chunk-I4YMMVQ3.cjs.map} +1 -1
- package/dist/{chunk-C264FG5X.js → chunk-I6XSSR4Z.js} +8 -8
- package/dist/{chunk-C264FG5X.js.map → chunk-I6XSSR4Z.js.map} +1 -1
- package/dist/{chunk-JAAICSXU.cjs → chunk-JF3WPB75.cjs} +32 -32
- package/dist/{chunk-JAAICSXU.cjs.map → chunk-JF3WPB75.cjs.map} +1 -1
- package/dist/{chunk-R577LMHJ.cjs → chunk-JJFGNYVY.cjs} +7 -7
- package/dist/{chunk-R577LMHJ.cjs.map → chunk-JJFGNYVY.cjs.map} +1 -1
- package/dist/{chunk-MISEF5LK.js → chunk-JNXWDPCZ.js} +6 -6
- package/dist/chunk-JNXWDPCZ.js.map +1 -0
- package/dist/{chunk-AQUKI2MV.js → chunk-L2MCWEEX.js} +6 -6
- package/dist/{chunk-AQUKI2MV.js.map → chunk-L2MCWEEX.js.map} +1 -1
- package/dist/{chunk-6VIWRHC3.js → chunk-QIJFD7ZC.js} +5 -5
- package/dist/{chunk-6VIWRHC3.js.map → chunk-QIJFD7ZC.js.map} +1 -1
- package/dist/{chunk-7QI6WHSE.js → chunk-QRK2HWHI.js} +8 -8
- package/dist/{chunk-7QI6WHSE.js.map → chunk-QRK2HWHI.js.map} +1 -1
- package/dist/{chunk-KCVSVDQ2.js → chunk-QYQSXRFZ.js} +13 -14
- package/dist/chunk-QYQSXRFZ.js.map +1 -0
- package/dist/{chunk-T26CFBWF.cjs → chunk-RAD2NM47.cjs} +4 -4
- package/dist/{chunk-T26CFBWF.cjs.map → chunk-RAD2NM47.cjs.map} +1 -1
- package/dist/{chunk-NBOTSCZC.js → chunk-TG46FM6X.js} +4 -4
- package/dist/{chunk-NBOTSCZC.js.map → chunk-TG46FM6X.js.map} +1 -1
- package/dist/{chunk-Y67VWDR7.cjs → chunk-TKH2A57J.cjs} +185 -185
- package/dist/{chunk-Y67VWDR7.cjs.map → chunk-TKH2A57J.cjs.map} +1 -1
- package/dist/{chunk-DBN5B2LH.cjs → chunk-UENWRQLR.cjs} +18 -18
- package/dist/{chunk-DBN5B2LH.cjs.map → chunk-UENWRQLR.cjs.map} +1 -1
- package/dist/{chunk-ZOLIH66J.cjs → chunk-V7AX2MSJ.cjs} +20 -20
- package/dist/{chunk-ZOLIH66J.cjs.map → chunk-V7AX2MSJ.cjs.map} +1 -1
- package/dist/{chunk-Z2IR7J5I.js → chunk-VO6R5RZT.js} +8 -9
- package/dist/chunk-VO6R5RZT.js.map +1 -0
- package/dist/{chunk-DNW46JHP.js → chunk-WENZPAHS.js} +4 -4
- package/dist/chunk-WENZPAHS.js.map +1 -0
- package/dist/{chunk-HIC3WGQU.cjs → chunk-X6CDTXAM.cjs} +11 -11
- package/dist/{chunk-HIC3WGQU.cjs.map → chunk-X6CDTXAM.cjs.map} +1 -1
- package/dist/{chunk-CHY6AP6N.cjs → chunk-XFLQVMNH.cjs} +26 -26
- package/dist/{chunk-CHY6AP6N.cjs.map → chunk-XFLQVMNH.cjs.map} +1 -1
- package/dist/{chunk-OFABGAOY.cjs → chunk-XZCYFQ4N.cjs} +64 -65
- package/dist/chunk-XZCYFQ4N.cjs.map +1 -0
- package/dist/{chunk-LBL7GNPF.cjs → chunk-YR7XRMDN.cjs} +10 -10
- package/dist/{chunk-LBL7GNPF.cjs.map → chunk-YR7XRMDN.cjs.map} +1 -1
- package/dist/{chunk-XGUUUEE4.js → chunk-Z34TVGNZ.js} +4 -4
- package/dist/{chunk-XGUUUEE4.js.map → chunk-Z34TVGNZ.js.map} +1 -1
- package/dist/{chunk-EHBTASCW.js → chunk-Z63F3XHK.js} +5 -6
- package/dist/chunk-Z63F3XHK.js.map +1 -0
- package/dist/{chunk-KJDRVBAH.cjs → chunk-Z67JQNEH.cjs} +11 -11
- package/dist/{chunk-KJDRVBAH.cjs.map → chunk-Z67JQNEH.cjs.map} +1 -1
- package/dist/{chunk-QVTTP5HC.js → chunk-ZCBMZ24O.js} +3 -3
- package/dist/{chunk-QVTTP5HC.js.map → chunk-ZCBMZ24O.js.map} +1 -1
- package/dist/{chunk-NMO7ITAY.js → chunk-ZHYPWNWS.js} +5 -5
- package/dist/{chunk-NMO7ITAY.js.map → chunk-ZHYPWNWS.js.map} +1 -1
- package/dist/{chunk-B7JN64YW.cjs → chunk-ZUN5CMDY.cjs} +86 -86
- package/dist/{chunk-B7JN64YW.cjs.map → chunk-ZUN5CMDY.cjs.map} +1 -1
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/deployer/index.cjs +2 -2
- package/dist/deployer/index.js +1 -1
- package/dist/docs/SKILL.md +2 -2
- package/dist/docs/assets/SOURCE_MAP.json +499 -499
- package/dist/docs/references/reference-templates-overview.md +88 -14
- package/dist/evals/index.cjs +23 -23
- package/dist/evals/index.js +3 -3
- package/dist/evals/scoreTraces/index.cjs +7 -7
- package/dist/evals/scoreTraces/index.js +3 -3
- package/dist/harness/index.cjs +13 -13
- package/dist/harness/index.js +7 -7
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +20 -20
- package/dist/llm/index.js +5 -5
- package/dist/logger/default-logger.d.ts +1 -1
- package/dist/logger/default-logger.d.ts.map +1 -1
- package/dist/logger/index.cjs +12 -12
- package/dist/logger/index.js +2 -2
- package/dist/loop/index.cjs +14 -14
- package/dist/loop/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/mastra-O4WWP6N5.js +3 -0
- package/dist/{mastra-5WYO5ZWG.js.map → mastra-O4WWP6N5.js.map} +1 -1
- package/dist/mastra-VHS7LVQG.cjs +12 -0
- package/dist/{mastra-LIISVKXT.cjs.map → mastra-VHS7LVQG.cjs.map} +1 -1
- package/dist/mcp/index.cjs +4 -4
- package/dist/mcp/index.js +2 -2
- package/dist/memory/index.cjs +17 -17
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-3IPTEPRM.cjs +12 -0
- package/dist/{models-dev-GD4LL56A.cjs.map → models-dev-3IPTEPRM.cjs.map} +1 -1
- package/dist/models-dev-4W7JQVWR.js +3 -0
- package/dist/{models-dev-CJ7IIPNG.js.map → models-dev-4W7JQVWR.js.map} +1 -1
- package/dist/netlify-FZBGNFDI.js +3 -0
- package/dist/{netlify-PMGHRONJ.js.map → netlify-FZBGNFDI.js.map} +1 -1
- package/dist/netlify-XT32D45G.cjs +12 -0
- package/dist/{netlify-6V7UBVTK.cjs.map → netlify-XT32D45G.cjs.map} +1 -1
- package/dist/observability/context-storage.cjs +28 -14
- package/dist/observability/context-storage.cjs.map +1 -1
- package/dist/observability/context-storage.d.ts.map +1 -1
- package/dist/observability/context-storage.js +28 -1
- package/dist/observability/context-storage.js.map +1 -1
- package/dist/observability/index.cjs +26 -10
- package/dist/observability/index.js +1 -1
- package/dist/observability/utils.d.ts +27 -0
- package/dist/observability/utils.d.ts.map +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +44 -44
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-AWL2JDVF.js +3 -0
- package/dist/{provider-registry-JV46DWD7.js.map → provider-registry-AWL2JDVF.js.map} +1 -1
- package/dist/provider-registry-X5PBSJ2G.cjs +40 -0
- package/dist/{provider-registry-U26G7C4O.cjs.map → provider-registry-X5PBSJ2G.cjs.map} +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/server/index.cjs +5 -5
- package/dist/server/index.js +2 -2
- package/dist/storage/constants.cjs +56 -56
- package/dist/storage/constants.js +1 -1
- package/dist/storage/index.cjs +286 -286
- package/dist/storage/index.js +3 -3
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/test-utils/llm-mock.cjs +4 -4
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/tts/index.cjs +2 -2
- package/dist/tts/index.js +1 -1
- package/dist/utils.cjs +25 -25
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +9 -9
- package/dist/vector/index.js +2 -2
- package/dist/voice/index.cjs +6 -6
- package/dist/voice/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +24 -24
- package/dist/workflows/index.js +1 -1
- package/dist/workspace/index.cjs +68 -68
- package/dist/workspace/index.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-2DKOLMVJ.js +0 -28
- package/dist/chunk-2DKOLMVJ.js.map +0 -1
- package/dist/chunk-44P7C37G.js.map +0 -1
- package/dist/chunk-C3G6OQ52.cjs.map +0 -1
- package/dist/chunk-D5FMOLQZ.cjs +0 -32
- package/dist/chunk-D5FMOLQZ.cjs.map +0 -1
- package/dist/chunk-DKK77FIJ.cjs.map +0 -1
- package/dist/chunk-DNW46JHP.js.map +0 -1
- package/dist/chunk-EHBTASCW.js.map +0 -1
- package/dist/chunk-HBO2PK7W.cjs.map +0 -1
- package/dist/chunk-JK5YBBUS.cjs.map +0 -1
- package/dist/chunk-JSG6FULW.cjs.map +0 -1
- package/dist/chunk-KCVSVDQ2.js.map +0 -1
- package/dist/chunk-M3LRSDLL.js.map +0 -1
- package/dist/chunk-MISEF5LK.js.map +0 -1
- package/dist/chunk-OFABGAOY.cjs.map +0 -1
- package/dist/chunk-YRDMMXBW.cjs.map +0 -1
- package/dist/chunk-Z2IR7J5I.js.map +0 -1
- package/dist/mastra-5WYO5ZWG.js +0 -3
- package/dist/mastra-LIISVKXT.cjs +0 -12
- package/dist/models-dev-CJ7IIPNG.js +0 -3
- package/dist/models-dev-GD4LL56A.cjs +0 -12
- package/dist/netlify-6V7UBVTK.cjs +0 -12
- package/dist/netlify-PMGHRONJ.js +0 -3
- package/dist/provider-registry-JV46DWD7.js +0 -3
- package/dist/provider-registry-U26G7C4O.cjs +0 -40
package/dist/logger/index.cjs
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDAQ4JZQA_cjs = require('../chunk-DAQ4JZQA.cjs');
|
|
4
|
+
var chunk7GW2TQXP_cjs = require('../chunk-7GW2TQXP.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "DualLogger", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkDAQ4JZQA_cjs.DualLogger; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "LoggerTransport", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkDAQ4JZQA_cjs.LoggerTransport; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "MultiLogger", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkDAQ4JZQA_cjs.MultiLogger; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "createCustomTransport", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkDAQ4JZQA_cjs.createCustomTransport; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "noopLogger", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkDAQ4JZQA_cjs.noopLogger; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "ConsoleLogger", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk7GW2TQXP_cjs.ConsoleLogger; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "LogLevel", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk7GW2TQXP_cjs.LogLevel; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "MastraLogger", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunk7GW2TQXP_cjs.MastraLogger; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "RegisteredLogger", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunk7GW2TQXP_cjs.RegisteredLogger; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "createLogger", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk7GW2TQXP_cjs.createLogger; }
|
|
47
47
|
});
|
|
48
48
|
//# sourceMappingURL=index.cjs.map
|
|
49
49
|
//# sourceMappingURL=index.cjs.map
|
package/dist/logger/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DualLogger, LoggerTransport, MultiLogger, createCustomTransport, noopLogger } from '../chunk-
|
|
2
|
-
export { ConsoleLogger, LogLevel, MastraLogger, RegisteredLogger, createLogger } from '../chunk-
|
|
1
|
+
export { DualLogger, LoggerTransport, MultiLogger, createCustomTransport, noopLogger } from '../chunk-C77V6J36.js';
|
|
2
|
+
export { ConsoleLogger, LogLevel, MastraLogger, RegisteredLogger, createLogger } from '../chunk-DBBWTK24.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/loop/index.cjs
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDO4JBKMT_cjs = require('../chunk-DO4JBKMT.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "createScorer", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkDO4JBKMT_cjs.createScorer; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "formatCheckFeedback", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkDO4JBKMT_cjs.formatCheckFeedback; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "formatCompletionFeedback", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkDO4JBKMT_cjs.formatCompletionFeedback; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "formatStreamCompletionFeedback", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkDO4JBKMT_cjs.formatStreamCompletionFeedback; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "formatValidationFeedback", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkDO4JBKMT_cjs.formatValidationFeedback; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "generateFinalResult", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkDO4JBKMT_cjs.generateFinalResult; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "generateStructuredFinalResult", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkDO4JBKMT_cjs.generateStructuredFinalResult; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "loop", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkDO4JBKMT_cjs.loop; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "runChecks", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkDO4JBKMT_cjs.runChecks; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "runCompletionScorers", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkDO4JBKMT_cjs.runCompletionScorers; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "runDefaultCompletionCheck", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkDO4JBKMT_cjs.runDefaultCompletionCheck; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "runStreamCompletionScorers", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkDO4JBKMT_cjs.runStreamCompletionScorers; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "runValidation", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkDO4JBKMT_cjs.runValidation; }
|
|
58
58
|
});
|
|
59
59
|
//# sourceMappingURL=index.cjs.map
|
|
60
60
|
//# sourceMappingURL=index.cjs.map
|
package/dist/loop/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createScorer, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation } from '../chunk-
|
|
1
|
+
export { createScorer, formatCheckFeedback, formatCompletionFeedback, formatStreamCompletionFeedback, formatValidationFeedback, generateFinalResult, generateStructuredFinalResult, loop, runChecks, runCompletionScorers, runDefaultCompletionCheck, runStreamCompletionScorers, runValidation } from '../chunk-QYQSXRFZ.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/mastra/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXFLQVMNH_cjs = require('../chunk-XFLQVMNH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Mastra", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkXFLQVMNH_cjs.Mastra; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/mastra/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-O4WWP6N5.js"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkV7AX2MSJ_cjs = require('./chunk-V7AX2MSJ.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "MastraGateway", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkV7AX2MSJ_cjs.MastraGateway; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=mastra-VHS7LVQG.cjs.map
|
|
12
|
+
//# sourceMappingURL=mastra-VHS7LVQG.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mastra-VHS7LVQG.cjs"}
|
package/dist/mcp/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk4U7ZLI36_cjs = require('../chunk-4U7ZLI36.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkFCQNDFEW_cjs = require('../chunk-FCQNDFEW.cjs');
|
|
5
|
+
var chunk7GW2TQXP_cjs = require('../chunk-7GW2TQXP.cjs');
|
|
6
6
|
var crypto = require('crypto');
|
|
7
7
|
var slugify = require('@sindresorhus/slugify');
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
10
10
|
|
|
11
11
|
var slugify__default = /*#__PURE__*/_interopDefault(slugify);
|
|
12
12
|
|
|
13
|
-
var MCPServerBase = class extends
|
|
13
|
+
var MCPServerBase = class extends chunkFCQNDFEW_cjs.MastraBase {
|
|
14
14
|
/** Tracks if the server ID has been definitively set. */
|
|
15
15
|
idWasSet = false;
|
|
16
16
|
/** The display name of the MCP server. */
|
|
@@ -123,7 +123,7 @@ var MCPServerBase = class extends chunkDKK77FIJ_cjs.MastraBase {
|
|
|
123
123
|
* @param config Configuration options for the MCP server, including metadata.
|
|
124
124
|
*/
|
|
125
125
|
constructor(config) {
|
|
126
|
-
super({ component:
|
|
126
|
+
super({ component: chunk7GW2TQXP_cjs.RegisteredLogger.MCP_SERVER, name: config.name });
|
|
127
127
|
this.name = config.name;
|
|
128
128
|
this.version = config.version;
|
|
129
129
|
if (config.id) {
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MastraError } from '../chunk-FJEVLHJT.js';
|
|
2
|
-
import { MastraBase } from '../chunk-
|
|
3
|
-
import { RegisteredLogger } from '../chunk-
|
|
2
|
+
import { MastraBase } from '../chunk-WENZPAHS.js';
|
|
3
|
+
import { RegisteredLogger } from '../chunk-DBBWTK24.js';
|
|
4
4
|
import { randomUUID } from 'crypto';
|
|
5
5
|
import slugify from '@sindresorhus/slugify';
|
|
6
6
|
|
package/dist/memory/index.cjs
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDO4JBKMT_cjs = require('../chunk-DO4JBKMT.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "MastraMemory", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkDO4JBKMT_cjs.MastraMemory; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "MemoryProcessor", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkDO4JBKMT_cjs.MemoryProcessor; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "MockMemory", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkDO4JBKMT_cjs.MockMemory; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "SYSTEM_REMINDER_END_TAG", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkDO4JBKMT_cjs.SYSTEM_REMINDER_END_TAG; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "SYSTEM_REMINDER_START_TAG", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkDO4JBKMT_cjs.SYSTEM_REMINDER_START_TAG; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "WORKING_MEMORY_END_TAG", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkDO4JBKMT_cjs.WORKING_MEMORY_END_TAG; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "WORKING_MEMORY_START_TAG", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkDO4JBKMT_cjs.WORKING_MEMORY_START_TAG; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "extractWorkingMemoryContent", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkDO4JBKMT_cjs.extractWorkingMemoryContent; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "extractWorkingMemoryTags", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkDO4JBKMT_cjs.extractWorkingMemoryTags; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "getThreadOMMetadata", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkDO4JBKMT_cjs.getThreadOMMetadata; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "isObservationalMemoryEnabled", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkDO4JBKMT_cjs.isObservationalMemoryEnabled; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "memoryDefaultOptions", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkDO4JBKMT_cjs.memoryDefaultOptions; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "parseMemoryRequestContext", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkDO4JBKMT_cjs.parseMemoryRequestContext; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "removeSystemReminderTags", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkDO4JBKMT_cjs.removeSystemReminderTags; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "removeWorkingMemoryTags", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkDO4JBKMT_cjs.removeWorkingMemoryTags; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "setThreadOMMetadata", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkDO4JBKMT_cjs.setThreadOMMetadata; }
|
|
70
70
|
});
|
|
71
71
|
//# sourceMappingURL=index.cjs.map
|
|
72
72
|
//# sourceMappingURL=index.cjs.map
|
package/dist/memory/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MastraMemory, MemoryProcessor, MockMemory, SYSTEM_REMINDER_END_TAG, SYSTEM_REMINDER_START_TAG, WORKING_MEMORY_END_TAG, WORKING_MEMORY_START_TAG, extractWorkingMemoryContent, extractWorkingMemoryTags, getThreadOMMetadata, isObservationalMemoryEnabled, memoryDefaultOptions, parseMemoryRequestContext, removeSystemReminderTags, removeWorkingMemoryTags, setThreadOMMetadata } from '../chunk-
|
|
1
|
+
export { MastraMemory, MemoryProcessor, MockMemory, SYSTEM_REMINDER_END_TAG, SYSTEM_REMINDER_START_TAG, WORKING_MEMORY_END_TAG, WORKING_MEMORY_START_TAG, extractWorkingMemoryContent, extractWorkingMemoryTags, getThreadOMMetadata, isObservationalMemoryEnabled, memoryDefaultOptions, parseMemoryRequestContext, removeSystemReminderTags, removeWorkingMemoryTags, setThreadOMMetadata } from '../chunk-QYQSXRFZ.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkTKH2A57J_cjs = require('./chunk-TKH2A57J.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "ModelsDevGateway", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkTKH2A57J_cjs.ModelsDevGateway; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=models-dev-3IPTEPRM.cjs.map
|
|
12
|
+
//# sourceMappingURL=models-dev-3IPTEPRM.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"models-dev-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"models-dev-3IPTEPRM.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"models-dev-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"models-dev-4W7JQVWR.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"netlify-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"netlify-FZBGNFDI.js"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkZ67JQNEH_cjs = require('./chunk-Z67JQNEH.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "NetlifyGateway", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkZ67JQNEH_cjs.NetlifyGateway; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=netlify-XT32D45G.cjs.map
|
|
12
|
+
//# sourceMappingURL=netlify-XT32D45G.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"netlify-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"netlify-XT32D45G.cjs"}
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk47RKHZIP_cjs = require('../chunk-47RKHZIP.cjs');
|
|
4
|
+
var async_hooks = require('async_hooks');
|
|
4
5
|
|
|
6
|
+
var spanContextStorage = new async_hooks.AsyncLocalStorage();
|
|
7
|
+
function getCurrentSpan() {
|
|
8
|
+
return spanContextStorage.getStore();
|
|
9
|
+
}
|
|
10
|
+
chunk47RKHZIP_cjs.setCurrentSpanResolver(getCurrentSpan);
|
|
11
|
+
chunk47RKHZIP_cjs.setExecuteWithContext(executeWithContext);
|
|
12
|
+
chunk47RKHZIP_cjs.setExecuteWithContextSync(executeWithContextSync);
|
|
13
|
+
async function executeWithContext(params) {
|
|
14
|
+
const { span, fn } = params;
|
|
15
|
+
const wrappedFn = span ? () => spanContextStorage.run(span, fn) : fn;
|
|
16
|
+
if (span?.executeInContext) {
|
|
17
|
+
return span.executeInContext(wrappedFn);
|
|
18
|
+
}
|
|
19
|
+
return wrappedFn();
|
|
20
|
+
}
|
|
21
|
+
function executeWithContextSync(params) {
|
|
22
|
+
const { span, fn } = params;
|
|
23
|
+
const wrappedFn = span ? () => spanContextStorage.run(span, fn) : fn;
|
|
24
|
+
if (span?.executeInContextSync) {
|
|
25
|
+
return span.executeInContextSync(wrappedFn);
|
|
26
|
+
}
|
|
27
|
+
return wrappedFn();
|
|
28
|
+
}
|
|
5
29
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
get: function () { return chunkD5FMOLQZ_cjs.executeWithContext; }
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(exports, "executeWithContextSync", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunkD5FMOLQZ_cjs.executeWithContextSync; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "getCurrentSpan", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunkD5FMOLQZ_cjs.getCurrentSpan; }
|
|
18
|
-
});
|
|
30
|
+
exports.executeWithContext = executeWithContext;
|
|
31
|
+
exports.executeWithContextSync = executeWithContextSync;
|
|
32
|
+
exports.getCurrentSpan = getCurrentSpan;
|
|
19
33
|
//# sourceMappingURL=context-storage.cjs.map
|
|
20
34
|
//# sourceMappingURL=context-storage.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"context-storage.cjs"}
|
|
1
|
+
{"version":3,"sources":["../../src/observability/context-storage.ts"],"names":["AsyncLocalStorage","setCurrentSpanResolver","setExecuteWithContext","setExecuteWithContextSync"],"mappings":";;;;;AAUA,IAAM,kBAAA,GAAqB,IAAIA,6BAAA,EAA2B;AAMnD,SAAS,cAAA,GAAsC;AACpD,EAAA,OAAO,mBAAmB,QAAA,EAAS;AACrC;AAEAC,wCAAA,CAAuB,cAAc,CAAA;AACrCC,uCAAA,CAAsB,kBAAkB,CAAA;AACxCC,2CAAA,CAA0B,sBAAsB,CAAA;AAqBhD,eAAsB,mBAAsB,MAAA,EAA8D;AACxG,EAAA,MAAM,EAAE,IAAA,EAAM,EAAA,EAAG,GAAI,MAAA;AAGrB,EAAA,MAAM,YAAY,IAAA,GAAO,MAAM,mBAAmB,GAAA,CAAI,IAAA,EAAM,EAAE,CAAA,GAAI,EAAA;AAElE,EAAA,IAAI,MAAM,gBAAA,EAAkB;AAC1B,IAAA,OAAO,IAAA,CAAK,iBAAiB,SAAS,CAAA;AAAA,EACxC;AAEA,EAAA,OAAO,SAAA,EAAU;AACnB;AAqBO,SAAS,uBAA0B,MAAA,EAA4C;AACpF,EAAA,MAAM,EAAE,IAAA,EAAM,EAAA,EAAG,GAAI,MAAA;AAGrB,EAAA,MAAM,YAAY,IAAA,GAAO,MAAM,mBAAmB,GAAA,CAAI,IAAA,EAAM,EAAE,CAAA,GAAI,EAAA;AAElE,EAAA,IAAI,MAAM,oBAAA,EAAsB;AAC9B,IAAA,OAAO,IAAA,CAAK,qBAAqB,SAAS,CAAA;AAAA,EAC5C;AAEA,EAAA,OAAO,SAAA,EAAU;AACnB","file":"context-storage.cjs","sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks';\n\nimport type { AnySpan } from './types';\nimport { setCurrentSpanResolver, setExecuteWithContext, setExecuteWithContextSync } from './utils';\n\n/**\n * Ambient storage for the current span. Populated by executeWithContext/executeWithContextSync\n * so that infrastructure code (e.g. DualLogger) can resolve the active span without\n * being passed it explicitly.\n */\nconst spanContextStorage = new AsyncLocalStorage<AnySpan>();\n\n/**\n * Returns the current span from AsyncLocalStorage, if one is active.\n * Used by DualLogger to forward logs to a span-correlated loggerVNext.\n */\nexport function getCurrentSpan(): AnySpan | undefined {\n return spanContextStorage.getStore();\n}\n\nsetCurrentSpanResolver(getCurrentSpan);\nsetExecuteWithContext(executeWithContext);\nsetExecuteWithContextSync(executeWithContextSync);\n\n/**\n * Execute an async function within the span's tracing context if available.\n * Falls back to direct execution if no span exists.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under the\n * current span in the external tracing system.\n *\n * @param span - The span to use as context (or undefined to execute without context)\n * @param fn - The async function to execute\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = await executeWithContext(llmSpan, async () =>\n * model.generateText(args)\n * );\n * ```\n */\nexport async function executeWithContext<T>(params: { span?: AnySpan; fn: () => Promise<T> }): Promise<T> {\n const { span, fn } = params;\n\n // Wrap fn so the span is available via getCurrentSpan() inside the async context.\n const wrappedFn = span ? () => spanContextStorage.run(span, fn) : fn;\n\n if (span?.executeInContext) {\n return span.executeInContext(wrappedFn);\n }\n\n return wrappedFn();\n}\n\n/**\n * Execute a synchronous function within the span's tracing context if available.\n * Falls back to direct execution if no span exists.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under the\n * current span in the external tracing system.\n *\n * @param span - The span to use as context (or undefined to execute without context)\n * @param fn - The synchronous function to execute\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = executeWithContextSync(llmSpan, () =>\n * model.streamText(args)\n * );\n * ```\n */\nexport function executeWithContextSync<T>(params: { span?: AnySpan; fn: () => T }): T {\n const { span, fn } = params;\n\n // Wrap fn so the span is available via getCurrentSpan() inside the sync context.\n const wrappedFn = span ? () => spanContextStorage.run(span, fn) : fn;\n\n if (span?.executeInContextSync) {\n return span.executeInContextSync(wrappedFn);\n }\n\n return wrappedFn();\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-storage.d.ts","sourceRoot":"","sources":["../../src/observability/context-storage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAUvC;;;GAGG;AACH,wBAAgB,cAAc,IAAI,OAAO,GAAG,SAAS,CAEpD;
|
|
1
|
+
{"version":3,"file":"context-storage.d.ts","sourceRoot":"","sources":["../../src/observability/context-storage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAUvC;;;GAGG;AACH,wBAAgB,cAAc,IAAI,OAAO,GAAG,SAAS,CAEpD;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAWxG;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,CAWpF"}
|
|
@@ -1,3 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
import { setCurrentSpanResolver, setExecuteWithContext, setExecuteWithContextSync } from '../chunk-BMS7MLQV.js';
|
|
2
|
+
import { AsyncLocalStorage } from 'async_hooks';
|
|
3
|
+
|
|
4
|
+
var spanContextStorage = new AsyncLocalStorage();
|
|
5
|
+
function getCurrentSpan() {
|
|
6
|
+
return spanContextStorage.getStore();
|
|
7
|
+
}
|
|
8
|
+
setCurrentSpanResolver(getCurrentSpan);
|
|
9
|
+
setExecuteWithContext(executeWithContext);
|
|
10
|
+
setExecuteWithContextSync(executeWithContextSync);
|
|
11
|
+
async function executeWithContext(params) {
|
|
12
|
+
const { span, fn } = params;
|
|
13
|
+
const wrappedFn = span ? () => spanContextStorage.run(span, fn) : fn;
|
|
14
|
+
if (span?.executeInContext) {
|
|
15
|
+
return span.executeInContext(wrappedFn);
|
|
16
|
+
}
|
|
17
|
+
return wrappedFn();
|
|
18
|
+
}
|
|
19
|
+
function executeWithContextSync(params) {
|
|
20
|
+
const { span, fn } = params;
|
|
21
|
+
const wrappedFn = span ? () => spanContextStorage.run(span, fn) : fn;
|
|
22
|
+
if (span?.executeInContextSync) {
|
|
23
|
+
return span.executeInContextSync(wrappedFn);
|
|
24
|
+
}
|
|
25
|
+
return wrappedFn();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { executeWithContext, executeWithContextSync, getCurrentSpan };
|
|
2
29
|
//# sourceMappingURL=context-storage.js.map
|
|
3
30
|
//# sourceMappingURL=context-storage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"context-storage.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/observability/context-storage.ts"],"names":[],"mappings":";;;AAUA,IAAM,kBAAA,GAAqB,IAAI,iBAAA,EAA2B;AAMnD,SAAS,cAAA,GAAsC;AACpD,EAAA,OAAO,mBAAmB,QAAA,EAAS;AACrC;AAEA,sBAAA,CAAuB,cAAc,CAAA;AACrC,qBAAA,CAAsB,kBAAkB,CAAA;AACxC,yBAAA,CAA0B,sBAAsB,CAAA;AAqBhD,eAAsB,mBAAsB,MAAA,EAA8D;AACxG,EAAA,MAAM,EAAE,IAAA,EAAM,EAAA,EAAG,GAAI,MAAA;AAGrB,EAAA,MAAM,YAAY,IAAA,GAAO,MAAM,mBAAmB,GAAA,CAAI,IAAA,EAAM,EAAE,CAAA,GAAI,EAAA;AAElE,EAAA,IAAI,MAAM,gBAAA,EAAkB;AAC1B,IAAA,OAAO,IAAA,CAAK,iBAAiB,SAAS,CAAA;AAAA,EACxC;AAEA,EAAA,OAAO,SAAA,EAAU;AACnB;AAqBO,SAAS,uBAA0B,MAAA,EAA4C;AACpF,EAAA,MAAM,EAAE,IAAA,EAAM,EAAA,EAAG,GAAI,MAAA;AAGrB,EAAA,MAAM,YAAY,IAAA,GAAO,MAAM,mBAAmB,GAAA,CAAI,IAAA,EAAM,EAAE,CAAA,GAAI,EAAA;AAElE,EAAA,IAAI,MAAM,oBAAA,EAAsB;AAC9B,IAAA,OAAO,IAAA,CAAK,qBAAqB,SAAS,CAAA;AAAA,EAC5C;AAEA,EAAA,OAAO,SAAA,EAAU;AACnB","file":"context-storage.js","sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks';\n\nimport type { AnySpan } from './types';\nimport { setCurrentSpanResolver, setExecuteWithContext, setExecuteWithContextSync } from './utils';\n\n/**\n * Ambient storage for the current span. Populated by executeWithContext/executeWithContextSync\n * so that infrastructure code (e.g. DualLogger) can resolve the active span without\n * being passed it explicitly.\n */\nconst spanContextStorage = new AsyncLocalStorage<AnySpan>();\n\n/**\n * Returns the current span from AsyncLocalStorage, if one is active.\n * Used by DualLogger to forward logs to a span-correlated loggerVNext.\n */\nexport function getCurrentSpan(): AnySpan | undefined {\n return spanContextStorage.getStore();\n}\n\nsetCurrentSpanResolver(getCurrentSpan);\nsetExecuteWithContext(executeWithContext);\nsetExecuteWithContextSync(executeWithContextSync);\n\n/**\n * Execute an async function within the span's tracing context if available.\n * Falls back to direct execution if no span exists.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under the\n * current span in the external tracing system.\n *\n * @param span - The span to use as context (or undefined to execute without context)\n * @param fn - The async function to execute\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = await executeWithContext(llmSpan, async () =>\n * model.generateText(args)\n * );\n * ```\n */\nexport async function executeWithContext<T>(params: { span?: AnySpan; fn: () => Promise<T> }): Promise<T> {\n const { span, fn } = params;\n\n // Wrap fn so the span is available via getCurrentSpan() inside the async context.\n const wrappedFn = span ? () => spanContextStorage.run(span, fn) : fn;\n\n if (span?.executeInContext) {\n return span.executeInContext(wrappedFn);\n }\n\n return wrappedFn();\n}\n\n/**\n * Execute a synchronous function within the span's tracing context if available.\n * Falls back to direct execution if no span exists.\n *\n * When a bridge is configured, this enables auto-instrumented operations\n * (HTTP requests, database queries, etc.) to be properly nested under the\n * current span in the external tracing system.\n *\n * @param span - The span to use as context (or undefined to execute without context)\n * @param fn - The synchronous function to execute\n * @returns The result of the function execution\n *\n * @example\n * ```typescript\n * const result = executeWithContextSync(llmSpan, () =>\n * model.streamText(args)\n * );\n * ```\n */\nexport function executeWithContextSync<T>(params: { span?: AnySpan; fn: () => T }): T {\n const { span, fn } = params;\n\n // Wrap fn so the span is available via getCurrentSpan() inside the sync context.\n const wrappedFn = span ? () => spanContextStorage.run(span, fn) : fn;\n\n if (span?.executeInContextSync) {\n return span.executeInContextSync(wrappedFn);\n }\n\n return wrappedFn();\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkB4OOPFD3_cjs = require('../chunk-B4OOPFD3.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk47RKHZIP_cjs = require('../chunk-47RKHZIP.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -43,39 +43,55 @@ Object.defineProperty(exports, "wrapMastra", {
|
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "EntityType", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk47RKHZIP_cjs.EntityType; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "InternalSpans", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk47RKHZIP_cjs.InternalSpans; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "SpanType", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunk47RKHZIP_cjs.SpanType; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "TracingEventType", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunk47RKHZIP_cjs.TracingEventType; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "executeWithContext", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return chunk47RKHZIP_cjs.executeWithContext; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "executeWithContextSync", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return chunk47RKHZIP_cjs.executeWithContextSync; }
|
|
59
67
|
});
|
|
60
68
|
Object.defineProperty(exports, "getEntityTypeForSpan", {
|
|
61
69
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunk47RKHZIP_cjs.getEntityTypeForSpan; }
|
|
63
71
|
});
|
|
64
72
|
Object.defineProperty(exports, "getOrCreateSpan", {
|
|
65
73
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunk47RKHZIP_cjs.getOrCreateSpan; }
|
|
67
75
|
});
|
|
68
76
|
Object.defineProperty(exports, "getRootExportSpan", {
|
|
69
77
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunk47RKHZIP_cjs.getRootExportSpan; }
|
|
71
79
|
});
|
|
72
80
|
Object.defineProperty(exports, "resolveCurrentSpan", {
|
|
73
81
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunk47RKHZIP_cjs.resolveCurrentSpan; }
|
|
75
83
|
});
|
|
76
84
|
Object.defineProperty(exports, "setCurrentSpanResolver", {
|
|
77
85
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunk47RKHZIP_cjs.setCurrentSpanResolver; }
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "setExecuteWithContext", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () { return chunk47RKHZIP_cjs.setExecuteWithContext; }
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "setExecuteWithContextSync", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function () { return chunk47RKHZIP_cjs.setExecuteWithContextSync; }
|
|
79
95
|
});
|
|
80
96
|
//# sourceMappingURL=index.cjs.map
|
|
81
97
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { DEFAULT_BLOCKED_LABELS, NoOpObservability, SamplingStrategyType, createObservabilityContext, noOpLoggerContext, noOpMetricsContext, noOpTracingContext, resolveObservabilityContext, wrapMastra } from '../chunk-ZHMULBPD.js';
|
|
2
|
-
export { EntityType, InternalSpans, SpanType, TracingEventType, getEntityTypeForSpan, getOrCreateSpan, getRootExportSpan, resolveCurrentSpan, setCurrentSpanResolver } from '../chunk-
|
|
2
|
+
export { EntityType, InternalSpans, SpanType, TracingEventType, executeWithContext, executeWithContextSync, getEntityTypeForSpan, getOrCreateSpan, getRootExportSpan, resolveCurrentSpan, setCurrentSpanResolver, setExecuteWithContext, setExecuteWithContextSync } from '../chunk-BMS7MLQV.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -9,6 +9,32 @@ import { EntityType, SpanType } from './types/index.js';
|
|
|
9
9
|
import type { Span, GetOrCreateSpanOptions, AnySpan } from './types/index.js';
|
|
10
10
|
export declare function setCurrentSpanResolver(resolver: (() => AnySpan | undefined) | undefined): void;
|
|
11
11
|
export declare function resolveCurrentSpan(): AnySpan | undefined;
|
|
12
|
+
type ExecuteWithContextFn = <T>(params: {
|
|
13
|
+
span?: AnySpan;
|
|
14
|
+
fn: () => Promise<T>;
|
|
15
|
+
}) => Promise<T>;
|
|
16
|
+
type ExecuteWithContextSyncFn = <T>(params: {
|
|
17
|
+
span?: AnySpan;
|
|
18
|
+
fn: () => T;
|
|
19
|
+
}) => T;
|
|
20
|
+
export declare function setExecuteWithContext(impl: ExecuteWithContextFn): void;
|
|
21
|
+
export declare function setExecuteWithContextSync(impl: ExecuteWithContextSyncFn): void;
|
|
22
|
+
/**
|
|
23
|
+
* Execute an async function within a span's tracing context.
|
|
24
|
+
* Falls back to direct execution if no context-storage implementation is registered or no span exists.
|
|
25
|
+
*/
|
|
26
|
+
export declare function executeWithContext<T>(params: {
|
|
27
|
+
span?: AnySpan;
|
|
28
|
+
fn: () => Promise<T>;
|
|
29
|
+
}): Promise<T>;
|
|
30
|
+
/**
|
|
31
|
+
* Execute a sync function within a span's tracing context.
|
|
32
|
+
* Falls back to direct execution if no context-storage implementation is registered or no span exists.
|
|
33
|
+
*/
|
|
34
|
+
export declare function executeWithContextSync<T>(params: {
|
|
35
|
+
span?: AnySpan;
|
|
36
|
+
fn: () => T;
|
|
37
|
+
}): T;
|
|
12
38
|
/**
|
|
13
39
|
* Creates or gets a child span from existing tracing context or starts a new trace.
|
|
14
40
|
* This helper consolidates the common pattern of creating spans that can either be:
|
|
@@ -36,4 +62,5 @@ export declare function getEntityTypeForSpan(span: {
|
|
|
36
62
|
entityType?: string | null;
|
|
37
63
|
spanType?: SpanType | string | null;
|
|
38
64
|
}): EntityType | undefined;
|
|
65
|
+
export {};
|
|
39
66
|
//# sourceMappingURL=utils.d.ts.map
|