@mastra/core 1.21.0-alpha.2 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-DGX6FWSX.cjs → chunk-3FASTXAM.cjs} +83 -83
- package/dist/{chunk-DGX6FWSX.cjs.map → chunk-3FASTXAM.cjs.map} +1 -1
- package/dist/{chunk-J2CBK7QL.cjs → chunk-4ALVPSUM.cjs} +7 -7
- package/dist/{chunk-J2CBK7QL.cjs.map → chunk-4ALVPSUM.cjs.map} +1 -1
- package/dist/{chunk-AJB745SL.js → chunk-56RUNELD.js} +3 -3
- package/dist/{chunk-AJB745SL.js.map → chunk-56RUNELD.js.map} +1 -1
- package/dist/{chunk-QTLGELHE.cjs → chunk-5WJWEAD2.cjs} +5 -5
- package/dist/{chunk-QTLGELHE.cjs.map → chunk-5WJWEAD2.cjs.map} +1 -1
- package/dist/{chunk-YF5TQNL3.cjs → chunk-63ZXVPM5.cjs} +10 -10
- package/dist/{chunk-YF5TQNL3.cjs.map → chunk-63ZXVPM5.cjs.map} +1 -1
- package/dist/{chunk-PZG4R64R.cjs → chunk-6ZRIEGLG.cjs} +5 -5
- package/dist/{chunk-PZG4R64R.cjs.map → chunk-6ZRIEGLG.cjs.map} +1 -1
- package/dist/{chunk-UQHC7ELQ.js → chunk-7ONDK22Y.js} +10 -10
- package/dist/{chunk-UQHC7ELQ.js.map → chunk-7ONDK22Y.js.map} +1 -1
- package/dist/{chunk-6BIGXDKX.js → chunk-CSD7PXFP.js} +5 -5
- package/dist/{chunk-6BIGXDKX.js.map → chunk-CSD7PXFP.js.map} +1 -1
- package/dist/{chunk-OPR6DNSN.js → chunk-F3T776ZA.js} +9 -9
- package/dist/{chunk-OPR6DNSN.js.map → chunk-F3T776ZA.js.map} +1 -1
- package/dist/{chunk-246GELHA.js → chunk-HFH7JKN3.js} +4 -4
- package/dist/{chunk-246GELHA.js.map → chunk-HFH7JKN3.js.map} +1 -1
- package/dist/{chunk-2YKXARRF.js → chunk-IZNWC32Y.js} +4 -4
- package/dist/{chunk-2YKXARRF.js.map → chunk-IZNWC32Y.js.map} +1 -1
- package/dist/{chunk-EKR6FZOG.js → chunk-KXITWMFN.js} +3 -3
- package/dist/{chunk-EKR6FZOG.js.map → chunk-KXITWMFN.js.map} +1 -1
- package/dist/{chunk-NHWPIKUM.js → chunk-KYIYBC6A.js} +4 -4
- package/dist/{chunk-NHWPIKUM.js.map → chunk-KYIYBC6A.js.map} +1 -1
- package/dist/{chunk-67X7ZYMH.js → chunk-NHWDBHFY.js} +3 -3
- package/dist/{chunk-67X7ZYMH.js.map → chunk-NHWDBHFY.js.map} +1 -1
- package/dist/{chunk-ZLBAC3BN.cjs → chunk-NT2E64KG.cjs} +6 -6
- package/dist/{chunk-ZLBAC3BN.cjs.map → chunk-NT2E64KG.cjs.map} +1 -1
- package/dist/{chunk-V2MOZKZ2.cjs → chunk-OBXLCUSC.cjs} +9 -9
- package/dist/{chunk-V2MOZKZ2.cjs.map → chunk-OBXLCUSC.cjs.map} +1 -1
- package/dist/{chunk-Q63LQZN5.cjs → chunk-P2JYPYF6.cjs} +17 -17
- package/dist/{chunk-Q63LQZN5.cjs.map → chunk-P2JYPYF6.cjs.map} +1 -1
- package/dist/{chunk-ZRP4BAK4.js → chunk-QYCMMBOV.js} +4 -4
- package/dist/{chunk-ZRP4BAK4.js.map → chunk-QYCMMBOV.js.map} +1 -1
- package/dist/{chunk-MBWY7AOA.cjs → chunk-TDTG2WDG.cjs} +7 -7
- package/dist/{chunk-MBWY7AOA.cjs.map → chunk-TDTG2WDG.cjs.map} +1 -1
- package/dist/{chunk-DRWYPRD7.cjs → chunk-TLEMLJH7.cjs} +45 -45
- package/dist/{chunk-DRWYPRD7.cjs.map → chunk-TLEMLJH7.cjs.map} +1 -1
- package/dist/{chunk-7CSQG6IA.cjs → chunk-UBRTW3SO.cjs} +3 -3
- package/dist/chunk-UBRTW3SO.cjs.map +1 -0
- package/dist/{chunk-WICDXZLH.cjs → chunk-UDRSF2TK.cjs} +51 -51
- package/dist/{chunk-WICDXZLH.cjs.map → chunk-UDRSF2TK.cjs.map} +1 -1
- package/dist/{chunk-CDO4JQEO.cjs → chunk-UOJUR3HB.cjs} +185 -185
- package/dist/{chunk-CDO4JQEO.cjs.map → chunk-UOJUR3HB.cjs.map} +1 -1
- package/dist/{chunk-2WUDN6HI.js → chunk-WG4GNZZZ.js} +3 -3
- package/dist/{chunk-2WUDN6HI.js.map → chunk-WG4GNZZZ.js.map} +1 -1
- package/dist/{chunk-PSGEUNAH.js → chunk-WI4KUV2M.js} +4 -4
- package/dist/{chunk-PSGEUNAH.js.map → chunk-WI4KUV2M.js.map} +1 -1
- package/dist/{chunk-L3QX2IX7.js → chunk-Z5ABABPJ.js} +8 -8
- package/dist/{chunk-L3QX2IX7.js.map → chunk-Z5ABABPJ.js.map} +1 -1
- package/dist/{chunk-ELDEBCZS.js → chunk-ZEZNT32H.js} +3 -3
- package/dist/chunk-ZEZNT32H.js.map +1 -0
- package/dist/{chunk-OMKFSCBO.cjs → chunk-ZTC3TLFM.cjs} +3 -3
- package/dist/{chunk-OMKFSCBO.cjs.map → chunk-ZTC3TLFM.cjs.map} +1 -1
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +195 -195
- package/dist/evals/index.cjs +5 -5
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +3 -3
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +9 -9
- package/dist/harness/index.js +6 -6
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +16 -16
- package/dist/llm/index.js +5 -5
- 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/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-ARAO7S6W.cjs +12 -0
- package/dist/{models-dev-NB7CKJAS.cjs.map → models-dev-ARAO7S6W.cjs.map} +1 -1
- package/dist/models-dev-IF67OFXR.js +3 -0
- package/dist/{models-dev-PGMVTTO7.js.map → models-dev-IF67OFXR.js.map} +1 -1
- package/dist/netlify-G5DNBXIP.js +3 -0
- package/dist/{netlify-3BL6W3LY.js.map → netlify-G5DNBXIP.js.map} +1 -1
- package/dist/netlify-XPEVGT6A.cjs +12 -0
- package/dist/{netlify-NFMAID4M.cjs.map → netlify-XPEVGT6A.cjs.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-MQVQ6NJP.js +3 -0
- package/dist/{provider-registry-CHVK2YJI.js.map → provider-registry-MQVQ6NJP.js.map} +1 -1
- package/dist/provider-registry-ZAJJQN5I.cjs +40 -0
- package/dist/{provider-registry-A6OIBOAB.cjs.map → provider-registry-ZAJJQN5I.cjs.map} +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/index.cjs +74 -74
- package/dist/storage/index.js +1 -1
- 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/utils.cjs +25 -25
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +7 -7
- package/dist/vector/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/package.json +9 -9
- package/dist/chunk-7CSQG6IA.cjs.map +0 -1
- package/dist/chunk-ELDEBCZS.js.map +0 -1
- package/dist/models-dev-NB7CKJAS.cjs +0 -12
- package/dist/models-dev-PGMVTTO7.js +0 -3
- package/dist/netlify-3BL6W3LY.js +0 -3
- package/dist/netlify-NFMAID4M.cjs +0 -12
- package/dist/provider-registry-A6OIBOAB.cjs +0 -40
- package/dist/provider-registry-CHVK2YJI.js +0 -3
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkYPMF3QLA_cjs = require('./chunk-YPMF3QLA.cjs');
|
|
3
4
|
var chunkX7SJO3JJ_cjs = require('./chunk-X7SJO3JJ.cjs');
|
|
4
5
|
var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
|
|
5
|
-
var
|
|
6
|
-
var chunkV2MOZKZ2_cjs = require('./chunk-V2MOZKZ2.cjs');
|
|
6
|
+
var chunkOBXLCUSC_cjs = require('./chunk-OBXLCUSC.cjs');
|
|
7
7
|
var chunkUWYGTSWV_cjs = require('./chunk-UWYGTSWV.cjs');
|
|
8
8
|
var chunkY3APFUXZ_cjs = require('./chunk-Y3APFUXZ.cjs');
|
|
9
9
|
var chunkCFMZZDO2_cjs = require('./chunk-CFMZZDO2.cjs');
|
|
10
|
-
var chunkOQDRPRKM_cjs = require('./chunk-OQDRPRKM.cjs');
|
|
11
10
|
var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var chunk3FASTXAM_cjs = require('./chunk-3FASTXAM.cjs');
|
|
12
|
+
var chunkTDTG2WDG_cjs = require('./chunk-TDTG2WDG.cjs');
|
|
14
13
|
var chunk22FSGATE_cjs = require('./chunk-22FSGATE.cjs');
|
|
15
|
-
var
|
|
14
|
+
var chunkOQDRPRKM_cjs = require('./chunk-OQDRPRKM.cjs');
|
|
15
|
+
var chunkZTC3TLFM_cjs = require('./chunk-ZTC3TLFM.cjs');
|
|
16
16
|
var chunkW6PDQCCN_cjs = require('./chunk-W6PDQCCN.cjs');
|
|
17
|
-
var chunkDLBIUFZL_cjs = require('./chunk-DLBIUFZL.cjs');
|
|
18
17
|
var chunkKJBMTK5B_cjs = require('./chunk-KJBMTK5B.cjs');
|
|
19
18
|
var chunkLDLHW3QN_cjs = require('./chunk-LDLHW3QN.cjs');
|
|
20
19
|
var chunkXB4FLS7A_cjs = require('./chunk-XB4FLS7A.cjs');
|
|
20
|
+
var chunkDLBIUFZL_cjs = require('./chunk-DLBIUFZL.cjs');
|
|
21
21
|
var chunk5WBEMKE2_cjs = require('./chunk-5WBEMKE2.cjs');
|
|
22
22
|
var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
|
|
23
23
|
var chunkC5WSRMJD_cjs = require('./chunk-C5WSRMJD.cjs');
|
|
@@ -2077,7 +2077,7 @@ var ProcessorRunner = class _ProcessorRunner {
|
|
|
2077
2077
|
}
|
|
2078
2078
|
const { model: _model, ...rest } = result;
|
|
2079
2079
|
if (result.model) {
|
|
2080
|
-
const resolvedModel = await
|
|
2080
|
+
const resolvedModel = await chunk3FASTXAM_cjs.resolveModelConfig(result.model);
|
|
2081
2081
|
const isSupported = isSupportedLanguageModel(resolvedModel);
|
|
2082
2082
|
if (!isSupported) {
|
|
2083
2083
|
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
@@ -5503,7 +5503,7 @@ var createTimeTravelExecutionParams = (params) => {
|
|
|
5503
5503
|
result = void 0;
|
|
5504
5504
|
}
|
|
5505
5505
|
if (result) {
|
|
5506
|
-
const formattedResult =
|
|
5506
|
+
const formattedResult = chunkZTC3TLFM_cjs.removeUndefinedValues(result);
|
|
5507
5507
|
stepResults[stepId] = formattedResult;
|
|
5508
5508
|
}
|
|
5509
5509
|
});
|
|
@@ -6061,7 +6061,7 @@ async function executeLoop(engine, params) {
|
|
|
6061
6061
|
options: {
|
|
6062
6062
|
type: "workflow_conditional_eval" /* WORKFLOW_CONDITIONAL_EVAL */,
|
|
6063
6063
|
name: `condition: '${entry.loopType}'`,
|
|
6064
|
-
input:
|
|
6064
|
+
input: chunkZTC3TLFM_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
|
|
6065
6065
|
attributes: {
|
|
6066
6066
|
conditionIndex: iteration
|
|
6067
6067
|
},
|
|
@@ -11517,7 +11517,7 @@ var MastraScorer = class _MastraScorer {
|
|
|
11517
11517
|
}
|
|
11518
11518
|
});
|
|
11519
11519
|
}
|
|
11520
|
-
const resolvedModel = await
|
|
11520
|
+
const resolvedModel = await chunk3FASTXAM_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
|
|
11521
11521
|
const judgeModel = resolvedModel.modelId;
|
|
11522
11522
|
const judge = new Agent({
|
|
11523
11523
|
id: "judge",
|
|
@@ -11748,7 +11748,7 @@ async function runDefaultCompletionCheck(agent, context, streamContext, abortSig
|
|
|
11748
11748
|
Primitives already executed: ${completedPrimitives.join(", ")}` : "";
|
|
11749
11749
|
const completionPrompt = `
|
|
11750
11750
|
The ${context.selectedPrimitive.type} ${context.selectedPrimitive.id} has contributed to the task.
|
|
11751
|
-
This is the result: ${
|
|
11751
|
+
This is the result: ${chunkZTC3TLFM_cjs.safeStringify(context.primitiveResult)}
|
|
11752
11752
|
|
|
11753
11753
|
${completedSection}
|
|
11754
11754
|
|
|
@@ -11844,7 +11844,7 @@ async function generateFinalResult(agent, context, streamContext, abortSignal, o
|
|
|
11844
11844
|
Original task: ${context.originalTask}
|
|
11845
11845
|
|
|
11846
11846
|
The ${context.selectedPrimitive.type} ${context.selectedPrimitive.id} produced this result:
|
|
11847
|
-
${
|
|
11847
|
+
${chunkZTC3TLFM_cjs.safeStringify(context.primitiveResult)}
|
|
11848
11848
|
|
|
11849
11849
|
IMPORTANT: If the above result is from an AGENT PRIMITIVE and it is a suitable final result itself considering the original task, then finalResult should be an empty string or undefined.
|
|
11850
11850
|
You should evaluate if the above result is comprehensive enough to accomplish the user's original task.
|
|
@@ -11902,7 +11902,7 @@ async function generateStructuredFinalResult(agent, context, structuredOutputOpt
|
|
|
11902
11902
|
Original task: ${context.originalTask}
|
|
11903
11903
|
|
|
11904
11904
|
The ${context.selectedPrimitive.type} ${context.selectedPrimitive.id} produced this result:
|
|
11905
|
-
${
|
|
11905
|
+
${chunkZTC3TLFM_cjs.safeStringify(context.primitiveResult)}
|
|
11906
11906
|
|
|
11907
11907
|
Based on the task and result above, generate a structured response according to the provided schema.
|
|
11908
11908
|
Use the conversation history and primitive results to craft the response.
|
|
@@ -13002,7 +13002,7 @@ function createLLMExecutionStep({
|
|
|
13002
13002
|
const convertedTools = {};
|
|
13003
13003
|
for (const [name, tool2] of Object.entries(currentStep.tools)) {
|
|
13004
13004
|
if (chunkLDLHW3QN_cjs.isMastraTool(tool2)) {
|
|
13005
|
-
convertedTools[name] =
|
|
13005
|
+
convertedTools[name] = chunkZTC3TLFM_cjs.makeCoreTool(
|
|
13006
13006
|
tool2,
|
|
13007
13007
|
{
|
|
13008
13008
|
name,
|
|
@@ -13214,7 +13214,7 @@ Analyse the suspended tools: ${JSON.stringify(suspendedTools)}, using the messag
|
|
|
13214
13214
|
}
|
|
13215
13215
|
});
|
|
13216
13216
|
let transportResolver;
|
|
13217
|
-
if (currentStep.model instanceof
|
|
13217
|
+
if (currentStep.model instanceof chunk3FASTXAM_cjs.ModelRouterLanguageModel) {
|
|
13218
13218
|
const routerModel = currentStep.model;
|
|
13219
13219
|
transportResolver = () => routerModel._getStreamTransport();
|
|
13220
13220
|
}
|
|
@@ -14110,7 +14110,7 @@ function createToolCallStep({
|
|
|
14110
14110
|
}
|
|
14111
14111
|
}
|
|
14112
14112
|
const rawResult = await tool2.execute(args, toolOptions);
|
|
14113
|
-
const result =
|
|
14113
|
+
const result = chunkZTC3TLFM_cjs.ensureSerializable(rawResult);
|
|
14114
14114
|
if (tool2 && "onOutput" in tool2 && typeof tool2.onOutput === "function") {
|
|
14115
14115
|
try {
|
|
14116
14116
|
await tool2.onOutput({
|
|
@@ -14970,7 +14970,7 @@ var MastraLLMVNext = class extends chunkC5WSRMJD_cjs.MastraBase {
|
|
|
14970
14970
|
const remainingTokens = parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"] ?? "", 10);
|
|
14971
14971
|
if (!isNaN(remainingTokens) && remainingTokens > 0 && remainingTokens < 2e3) {
|
|
14972
14972
|
this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
|
|
14973
|
-
await
|
|
14973
|
+
await chunkZTC3TLFM_cjs.delay(10 * 1e3);
|
|
14974
14974
|
}
|
|
14975
14975
|
},
|
|
14976
14976
|
onFinish: async (props) => {
|
|
@@ -19997,7 +19997,7 @@ ${errorMessages}`,
|
|
|
19997
19997
|
*/
|
|
19998
19998
|
listTools({ requestContext = new chunk5WBEMKE2_cjs.RequestContext() } = {}) {
|
|
19999
19999
|
if (typeof this.#tools !== "function") {
|
|
20000
|
-
return
|
|
20000
|
+
return chunkZTC3TLFM_cjs.ensureToolProperties(this.#tools);
|
|
20001
20001
|
}
|
|
20002
20002
|
const result = this.#tools({
|
|
20003
20003
|
requestContext,
|
|
@@ -20017,7 +20017,7 @@ ${errorMessages}`,
|
|
|
20017
20017
|
this.logger.trackException(mastraError);
|
|
20018
20018
|
throw mastraError;
|
|
20019
20019
|
}
|
|
20020
|
-
return
|
|
20020
|
+
return chunkZTC3TLFM_cjs.ensureToolProperties(tools);
|
|
20021
20021
|
});
|
|
20022
20022
|
}
|
|
20023
20023
|
/**
|
|
@@ -20065,7 +20065,7 @@ ${errorMessages}`,
|
|
|
20065
20065
|
});
|
|
20066
20066
|
});
|
|
20067
20067
|
} else {
|
|
20068
|
-
llm = new
|
|
20068
|
+
llm = new chunkTDTG2WDG_cjs.MastraLLMV1({
|
|
20069
20069
|
model: modelInfo,
|
|
20070
20070
|
mastra: this.#mastra,
|
|
20071
20071
|
options: { tracingPolicy: this.#options?.tracingPolicy }
|
|
@@ -20091,7 +20091,7 @@ ${errorMessages}`,
|
|
|
20091
20091
|
*/
|
|
20092
20092
|
async resolveModelConfig(modelConfig, requestContext) {
|
|
20093
20093
|
try {
|
|
20094
|
-
return await
|
|
20094
|
+
return await chunk3FASTXAM_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
|
|
20095
20095
|
} catch (error) {
|
|
20096
20096
|
const mastraError = new chunk4U7ZLI36_cjs.MastraError({
|
|
20097
20097
|
id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
|
|
@@ -20563,7 +20563,7 @@ ${errorMessages}`,
|
|
|
20563
20563
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20564
20564
|
requireApproval: toolObj.requireApproval
|
|
20565
20565
|
};
|
|
20566
|
-
const convertedToCoreTool =
|
|
20566
|
+
const convertedToCoreTool = chunkZTC3TLFM_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
20567
20567
|
convertedMemoryTools[toolName] = convertedToCoreTool;
|
|
20568
20568
|
}
|
|
20569
20569
|
}
|
|
@@ -20613,7 +20613,7 @@ ${errorMessages}`,
|
|
|
20613
20613
|
requireApproval: toolObj.requireApproval,
|
|
20614
20614
|
workspace
|
|
20615
20615
|
};
|
|
20616
|
-
const convertedToCoreTool =
|
|
20616
|
+
const convertedToCoreTool = chunkZTC3TLFM_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
20617
20617
|
convertedWorkspaceTools[toolName] = convertedToCoreTool;
|
|
20618
20618
|
}
|
|
20619
20619
|
}
|
|
@@ -20666,7 +20666,7 @@ ${errorMessages}`,
|
|
|
20666
20666
|
// Skill tools never require approval
|
|
20667
20667
|
workspace
|
|
20668
20668
|
};
|
|
20669
|
-
const convertedToCoreTool =
|
|
20669
|
+
const convertedToCoreTool = chunkZTC3TLFM_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
20670
20670
|
convertedSkillTools[toolName] = convertedToCoreTool;
|
|
20671
20671
|
}
|
|
20672
20672
|
}
|
|
@@ -20899,7 +20899,7 @@ ${errorMessages}`,
|
|
|
20899
20899
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20900
20900
|
requireApproval: tool2.requireApproval
|
|
20901
20901
|
};
|
|
20902
|
-
return [k,
|
|
20902
|
+
return [k, chunkZTC3TLFM_cjs.makeCoreTool(tool2, options, void 0, autoResumeSuspendedTools)];
|
|
20903
20903
|
})
|
|
20904
20904
|
);
|
|
20905
20905
|
const assignedToolEntriesConverted = Object.fromEntries(
|
|
@@ -20953,7 +20953,7 @@ ${errorMessages}`,
|
|
|
20953
20953
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20954
20954
|
requireApproval: toolObj.requireApproval
|
|
20955
20955
|
};
|
|
20956
|
-
const convertedToCoreTool =
|
|
20956
|
+
const convertedToCoreTool = chunkZTC3TLFM_cjs.makeCoreTool(toolObj, options, "toolset", autoResumeSuspendedTools);
|
|
20957
20957
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
20958
20958
|
}
|
|
20959
20959
|
}
|
|
@@ -20998,7 +20998,7 @@ ${errorMessages}`,
|
|
|
20998
20998
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20999
20999
|
requireApproval: tool2.requireApproval
|
|
21000
21000
|
};
|
|
21001
|
-
const convertedToCoreTool =
|
|
21001
|
+
const convertedToCoreTool = chunkZTC3TLFM_cjs.makeCoreTool(toolRest, options, "client-tool", autoResumeSuspendedTools);
|
|
21002
21002
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
21003
21003
|
}
|
|
21004
21004
|
}
|
|
@@ -21680,7 +21680,7 @@ ${effectiveInstructions}`;
|
|
|
21680
21680
|
...observabilityContext,
|
|
21681
21681
|
tracingPolicy: this.#options?.tracingPolicy
|
|
21682
21682
|
};
|
|
21683
|
-
convertedAgentTools[`agent-${agentName}`] =
|
|
21683
|
+
convertedAgentTools[`agent-${agentName}`] = chunkZTC3TLFM_cjs.makeCoreTool(
|
|
21684
21684
|
toolObj,
|
|
21685
21685
|
options,
|
|
21686
21686
|
void 0,
|
|
@@ -21901,7 +21901,7 @@ ${effectiveInstructions}`;
|
|
|
21901
21901
|
...observabilityContext,
|
|
21902
21902
|
tracingPolicy: this.#options?.tracingPolicy
|
|
21903
21903
|
};
|
|
21904
|
-
convertedWorkflowTools[`workflow-${workflowName}`] =
|
|
21904
|
+
convertedWorkflowTools[`workflow-${workflowName}`] = chunkZTC3TLFM_cjs.makeCoreTool(
|
|
21905
21905
|
toolObj,
|
|
21906
21906
|
options,
|
|
21907
21907
|
void 0,
|
|
@@ -21933,7 +21933,7 @@ ${effectiveInstructions}`;
|
|
|
21933
21933
|
let mastraProxy = void 0;
|
|
21934
21934
|
const logger = this.logger;
|
|
21935
21935
|
if (this.#mastra) {
|
|
21936
|
-
mastraProxy =
|
|
21936
|
+
mastraProxy = chunkZTC3TLFM_cjs.createMastraProxy({ mastra: this.#mastra, logger });
|
|
21937
21937
|
}
|
|
21938
21938
|
const assignedTools = await this.listAssignedTools({
|
|
21939
21939
|
runId,
|
|
@@ -22185,7 +22185,7 @@ ${effectiveInstructions}`;
|
|
|
22185
22185
|
const resolvedModel = await this.resolveModelConfig(selection, requestContext);
|
|
22186
22186
|
this.assertSupportsPreparedModels(resolvedModel);
|
|
22187
22187
|
let headers;
|
|
22188
|
-
if (resolvedModel instanceof
|
|
22188
|
+
if (resolvedModel instanceof chunk3FASTXAM_cjs.ModelRouterLanguageModel) {
|
|
22189
22189
|
headers = resolvedModel.config?.headers;
|
|
22190
22190
|
}
|
|
22191
22191
|
return [
|
|
@@ -22217,7 +22217,7 @@ ${effectiveInstructions}`;
|
|
|
22217
22217
|
throw mastraError;
|
|
22218
22218
|
}
|
|
22219
22219
|
let headers;
|
|
22220
|
-
if (model instanceof
|
|
22220
|
+
if (model instanceof chunk3FASTXAM_cjs.ModelRouterLanguageModel) {
|
|
22221
22221
|
headers = model.config?.headers;
|
|
22222
22222
|
}
|
|
22223
22223
|
return {
|
|
@@ -22673,7 +22673,7 @@ ${effectiveInstructions}`;
|
|
|
22673
22673
|
const defaultOptions = await this.getDefaultOptions({
|
|
22674
22674
|
requestContext: options?.requestContext
|
|
22675
22675
|
});
|
|
22676
|
-
const mergedOptions =
|
|
22676
|
+
const mergedOptions = chunkZTC3TLFM_cjs.deepMerge(
|
|
22677
22677
|
defaultOptions,
|
|
22678
22678
|
options ?? {}
|
|
22679
22679
|
);
|
|
@@ -22744,7 +22744,7 @@ ${effectiveInstructions}`;
|
|
|
22744
22744
|
const defaultOptions = await this.getDefaultOptions({
|
|
22745
22745
|
requestContext: streamOptions?.requestContext
|
|
22746
22746
|
});
|
|
22747
|
-
const mergedOptions =
|
|
22747
|
+
const mergedOptions = chunkZTC3TLFM_cjs.deepMerge(
|
|
22748
22748
|
defaultOptions,
|
|
22749
22749
|
streamOptions ?? {}
|
|
22750
22750
|
);
|
|
@@ -22809,7 +22809,7 @@ ${effectiveInstructions}`;
|
|
|
22809
22809
|
const defaultOptions = await this.getDefaultOptions({
|
|
22810
22810
|
requestContext: streamOptions?.requestContext
|
|
22811
22811
|
});
|
|
22812
|
-
let mergedStreamOptions =
|
|
22812
|
+
let mergedStreamOptions = chunkZTC3TLFM_cjs.deepMerge(
|
|
22813
22813
|
defaultOptions,
|
|
22814
22814
|
streamOptions ?? {}
|
|
22815
22815
|
);
|
|
@@ -22875,7 +22875,7 @@ ${effectiveInstructions}`;
|
|
|
22875
22875
|
const defaultOptions = await this.getDefaultOptions({
|
|
22876
22876
|
requestContext: options?.requestContext
|
|
22877
22877
|
});
|
|
22878
|
-
const mergedOptions =
|
|
22878
|
+
const mergedOptions = chunkZTC3TLFM_cjs.deepMerge(
|
|
22879
22879
|
defaultOptions,
|
|
22880
22880
|
options ?? {}
|
|
22881
22881
|
);
|
|
@@ -26190,7 +26190,7 @@ var WorkingMemory = class {
|
|
|
26190
26190
|
return messageList;
|
|
26191
26191
|
}
|
|
26192
26192
|
generateEmptyFromSchemaInternal(schema) {
|
|
26193
|
-
const result =
|
|
26193
|
+
const result = chunkZTC3TLFM_cjs.generateEmptyFromSchema(schema);
|
|
26194
26194
|
return Object.keys(result).length > 0 ? result : null;
|
|
26195
26195
|
}
|
|
26196
26196
|
getWorkingMemoryToolInstruction({
|
|
@@ -26835,7 +26835,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
26835
26835
|
);
|
|
26836
26836
|
}
|
|
26837
26837
|
if (typeof config.embedder === "string") {
|
|
26838
|
-
this.embedder = new
|
|
26838
|
+
this.embedder = new chunk3FASTXAM_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
26839
26839
|
} else {
|
|
26840
26840
|
this.embedder = config.embedder;
|
|
26841
26841
|
}
|
|
@@ -26848,7 +26848,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
26848
26848
|
}
|
|
26849
26849
|
if (config.embedder) {
|
|
26850
26850
|
if (typeof config.embedder === "string") {
|
|
26851
|
-
this.embedder = new
|
|
26851
|
+
this.embedder = new chunk3FASTXAM_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
26852
26852
|
} else {
|
|
26853
26853
|
this.embedder = config.embedder;
|
|
26854
26854
|
}
|
|
@@ -26888,7 +26888,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
26888
26888
|
}
|
|
26889
26889
|
setEmbedder(embedder, embedderOptions) {
|
|
26890
26890
|
if (typeof embedder === "string") {
|
|
26891
|
-
this.embedder = new
|
|
26891
|
+
this.embedder = new chunk3FASTXAM_cjs.ModelRouterEmbeddingModel(embedder);
|
|
26892
26892
|
} else {
|
|
26893
26893
|
this.embedder = embedder;
|
|
26894
26894
|
}
|
|
@@ -26985,7 +26985,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
26985
26985
|
"The threads.generateTitle option has been moved. Use the top-level generateTitle option instead."
|
|
26986
26986
|
);
|
|
26987
26987
|
}
|
|
26988
|
-
const mergedConfig =
|
|
26988
|
+
const mergedConfig = chunkZTC3TLFM_cjs.deepMerge(this.threadConfig, config || {});
|
|
26989
26989
|
if (typeof config?.workingMemory === "object" && config.workingMemory?.schema && typeof mergedConfig.workingMemory === "object") {
|
|
26990
26990
|
mergedConfig.workingMemory.schema = config.workingMemory.schema;
|
|
26991
26991
|
}
|
|
@@ -27337,7 +27337,7 @@ var MockMemory = class extends MastraMemory {
|
|
|
27337
27337
|
} = {}) {
|
|
27338
27338
|
super({
|
|
27339
27339
|
name: "mock",
|
|
27340
|
-
storage: storage || new
|
|
27340
|
+
storage: storage || new chunkOBXLCUSC_cjs.InMemoryStore(),
|
|
27341
27341
|
options: {
|
|
27342
27342
|
...options,
|
|
27343
27343
|
workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : options?.workingMemory,
|
|
@@ -27648,5 +27648,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
|
|
|
27648
27648
|
exports.validateStepResumeData = validateStepResumeData;
|
|
27649
27649
|
exports.validateStepStateData = validateStepStateData;
|
|
27650
27650
|
exports.validateStepSuspendData = validateStepSuspendData;
|
|
27651
|
-
//# sourceMappingURL=chunk-
|
|
27652
|
-
//# sourceMappingURL=chunk-
|
|
27651
|
+
//# sourceMappingURL=chunk-TLEMLJH7.cjs.map
|
|
27652
|
+
//# sourceMappingURL=chunk-TLEMLJH7.cjs.map
|