@mastra/core 1.10.0-alpha.0 → 1.10.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 +101 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-XR7S7UTE.cjs → chunk-7AHCLTZZ.cjs} +9 -9
- package/dist/{chunk-XR7S7UTE.cjs.map → chunk-7AHCLTZZ.cjs.map} +1 -1
- package/dist/{chunk-MFCX5BRG.cjs → chunk-BCSVBOAN.cjs} +48 -48
- package/dist/{chunk-MFCX5BRG.cjs.map → chunk-BCSVBOAN.cjs.map} +1 -1
- package/dist/{chunk-GSJHPR6I.js → chunk-DIKRJVK6.js} +4 -4
- package/dist/{chunk-GSJHPR6I.js.map → chunk-DIKRJVK6.js.map} +1 -1
- package/dist/{chunk-7MGIUUDZ.cjs → chunk-E6I5LBDM.cjs} +5 -5
- package/dist/{chunk-7MGIUUDZ.cjs.map → chunk-E6I5LBDM.cjs.map} +1 -1
- package/dist/{chunk-5TZ46R7O.js → chunk-FT5Q6XTK.js} +3 -3
- package/dist/{chunk-5TZ46R7O.js.map → chunk-FT5Q6XTK.js.map} +1 -1
- package/dist/{chunk-KJOX2DBM.cjs → chunk-GCRPNAAR.cjs} +3 -3
- package/dist/{chunk-KJOX2DBM.cjs.map → chunk-GCRPNAAR.cjs.map} +1 -1
- package/dist/{chunk-GCDI7NB2.js → chunk-GTA5BKXZ.js} +7 -7
- package/dist/{chunk-GCDI7NB2.js.map → chunk-GTA5BKXZ.js.map} +1 -1
- package/dist/{chunk-S6TBWSUM.cjs → chunk-HAIQ57YB.cjs} +6 -6
- package/dist/{chunk-S6TBWSUM.cjs.map → chunk-HAIQ57YB.cjs.map} +1 -1
- package/dist/{chunk-TSY5TYQ2.cjs → chunk-HNYQITSV.cjs} +7 -7
- package/dist/{chunk-TSY5TYQ2.cjs.map → chunk-HNYQITSV.cjs.map} +1 -1
- package/dist/{chunk-PQB5LKUM.js → chunk-HQA3IBLZ.js} +4 -4
- package/dist/{chunk-PQB5LKUM.js.map → chunk-HQA3IBLZ.js.map} +1 -1
- package/dist/{chunk-YASKIGYS.js → chunk-NUZWQA4J.js} +3 -3
- package/dist/{chunk-YASKIGYS.js.map → chunk-NUZWQA4J.js.map} +1 -1
- package/dist/{chunk-QB7IB4TB.cjs → chunk-OOTLMVNN.cjs} +7 -7
- package/dist/{chunk-QB7IB4TB.cjs.map → chunk-OOTLMVNN.cjs.map} +1 -1
- package/dist/{chunk-F7LS4MGT.js → chunk-PDJCIONR.js} +5 -5
- package/dist/{chunk-F7LS4MGT.js.map → chunk-PDJCIONR.js.map} +1 -1
- package/dist/{chunk-TJBG4QLZ.cjs → chunk-PP4G2TZZ.cjs} +10 -10
- package/dist/{chunk-TJBG4QLZ.cjs.map → chunk-PP4G2TZZ.cjs.map} +1 -1
- package/dist/{chunk-22MLBFNK.js → chunk-SBBWRNZA.js} +3 -3
- package/dist/{chunk-22MLBFNK.js.map → chunk-SBBWRNZA.js.map} +1 -1
- package/dist/{chunk-XPHVLEQH.js → chunk-TJIFNVPX.js} +4 -4
- package/dist/{chunk-XPHVLEQH.js.map → chunk-TJIFNVPX.js.map} +1 -1
- package/dist/{chunk-TFCENZRY.cjs → chunk-XJNQHPBJ.cjs} +14 -14
- package/dist/{chunk-TFCENZRY.cjs.map → chunk-XJNQHPBJ.cjs.map} +1 -1
- package/dist/{chunk-35M33EPI.js → chunk-YC6Z75K2.js} +7 -7
- package/dist/{chunk-35M33EPI.js.map → chunk-YC6Z75K2.js.map} +1 -1
- package/dist/{chunk-BY3JCNLJ.cjs → chunk-Z2X5VTYJ.cjs} +49 -49
- package/dist/{chunk-BY3JCNLJ.cjs.map → chunk-Z2X5VTYJ.cjs.map} +1 -1
- package/dist/{chunk-G5Q4NE5J.js → chunk-ZBU6P4JV.js} +4 -4
- package/dist/{chunk-G5Q4NE5J.js.map → chunk-ZBU6P4JV.js.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 +174 -174
- 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 +4 -4
- package/dist/harness/index.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +6 -6
- package/dist/llm/index.js +1 -1
- 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/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +42 -42
- package/dist/processors/index.js +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/index.cjs +64 -64
- 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 +23 -23
- 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 +25 -25
- package/dist/workflows/index.js +1 -1
- package/package.json +7 -7
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
var chunkRQ56ZSIR_cjs = require('./chunk-RQ56ZSIR.cjs');
|
|
4
4
|
var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
|
|
5
5
|
var chunkMEMYFFOL_cjs = require('./chunk-MEMYFFOL.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunk7AHCLTZZ_cjs = require('./chunk-7AHCLTZZ.cjs');
|
|
7
7
|
var chunkYZMSJKAK_cjs = require('./chunk-YZMSJKAK.cjs');
|
|
8
8
|
var chunkZIEQA3YP_cjs = require('./chunk-ZIEQA3YP.cjs');
|
|
9
9
|
var chunkPM3UIIBK_cjs = require('./chunk-PM3UIIBK.cjs');
|
|
10
10
|
var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var chunkPP4G2TZZ_cjs = require('./chunk-PP4G2TZZ.cjs');
|
|
12
|
+
var chunkOOTLMVNN_cjs = require('./chunk-OOTLMVNN.cjs');
|
|
13
13
|
var chunk6BJ7XHRH_cjs = require('./chunk-6BJ7XHRH.cjs');
|
|
14
14
|
var chunkOQDRPRKM_cjs = require('./chunk-OQDRPRKM.cjs');
|
|
15
|
-
var
|
|
15
|
+
var chunkGCRPNAAR_cjs = require('./chunk-GCRPNAAR.cjs');
|
|
16
16
|
var chunk4UOWNFAL_cjs = require('./chunk-4UOWNFAL.cjs');
|
|
17
|
+
var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
|
|
17
18
|
var chunkKJBMTK5B_cjs = require('./chunk-KJBMTK5B.cjs');
|
|
18
19
|
var chunkM26GEN4C_cjs = require('./chunk-M26GEN4C.cjs');
|
|
19
20
|
var chunk5WBEMKE2_cjs = require('./chunk-5WBEMKE2.cjs');
|
|
20
|
-
var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
|
|
21
21
|
var chunk4WQYXT2I_cjs = require('./chunk-4WQYXT2I.cjs');
|
|
22
22
|
var chunkRO47SMI7_cjs = require('./chunk-RO47SMI7.cjs');
|
|
23
23
|
var chunk7XAECHYL_cjs = require('./chunk-7XAECHYL.cjs');
|
|
@@ -2004,7 +2004,7 @@ var ProcessorRunner = class _ProcessorRunner {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
const { model: _model, ...rest } = result;
|
|
2006
2006
|
if (result.model) {
|
|
2007
|
-
const resolvedModel = await
|
|
2007
|
+
const resolvedModel = await chunkPP4G2TZZ_cjs.resolveModelConfig(result.model);
|
|
2008
2008
|
const isSupported = isSupportedLanguageModel(resolvedModel);
|
|
2009
2009
|
if (!isSupported) {
|
|
2010
2010
|
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
@@ -5073,7 +5073,7 @@ async function validateStepInput({
|
|
|
5073
5073
|
}) {
|
|
5074
5074
|
let inputData = prevOutput;
|
|
5075
5075
|
let validationError;
|
|
5076
|
-
if (validateInputs &&
|
|
5076
|
+
if (validateInputs && chunkGCRPNAAR_cjs.isZodType(step.inputSchema)) {
|
|
5077
5077
|
const inputSchema = step.inputSchema;
|
|
5078
5078
|
const validatedInput = await inputSchema.safeParseAsync(prevOutput);
|
|
5079
5079
|
if (!validatedInput.success) {
|
|
@@ -5102,7 +5102,7 @@ async function validateStepResumeData({ resumeData, step }) {
|
|
|
5102
5102
|
}
|
|
5103
5103
|
let validationError;
|
|
5104
5104
|
const resumeSchema = step.resumeSchema;
|
|
5105
|
-
if (resumeSchema &&
|
|
5105
|
+
if (resumeSchema && chunkGCRPNAAR_cjs.isZodType(resumeSchema)) {
|
|
5106
5106
|
const validatedResumeData = await resumeSchema.safeParseAsync(resumeData);
|
|
5107
5107
|
if (!validatedResumeData.success) {
|
|
5108
5108
|
const errors = getZodErrors(validatedResumeData.error);
|
|
@@ -5133,7 +5133,7 @@ async function validateStepSuspendData({
|
|
|
5133
5133
|
}
|
|
5134
5134
|
let validationError;
|
|
5135
5135
|
const suspendSchema = step.suspendSchema;
|
|
5136
|
-
if (suspendSchema && validateInputs &&
|
|
5136
|
+
if (suspendSchema && validateInputs && chunkGCRPNAAR_cjs.isZodType(suspendSchema)) {
|
|
5137
5137
|
const validatedSuspendData = await suspendSchema.safeParseAsync(suspendData);
|
|
5138
5138
|
if (!validatedSuspendData.success) {
|
|
5139
5139
|
const errors = getZodErrors(validatedSuspendData.error);
|
|
@@ -5164,7 +5164,7 @@ async function validateStepStateData({
|
|
|
5164
5164
|
}
|
|
5165
5165
|
let validationError;
|
|
5166
5166
|
const stateSchema = step.stateSchema;
|
|
5167
|
-
if (stateSchema && validateInputs &&
|
|
5167
|
+
if (stateSchema && validateInputs && chunkGCRPNAAR_cjs.isZodType(stateSchema)) {
|
|
5168
5168
|
const validatedStateData = await stateSchema.safeParseAsync(stateData);
|
|
5169
5169
|
if (!validatedStateData.success) {
|
|
5170
5170
|
const errors = getZodErrors(validatedStateData.error);
|
|
@@ -5183,7 +5183,7 @@ async function validateStepRequestContext({
|
|
|
5183
5183
|
}) {
|
|
5184
5184
|
let validationError;
|
|
5185
5185
|
const requestContextSchema = step.requestContextSchema;
|
|
5186
|
-
if (requestContextSchema && validateInputs &&
|
|
5186
|
+
if (requestContextSchema && validateInputs && chunkGCRPNAAR_cjs.isZodType(requestContextSchema)) {
|
|
5187
5187
|
const contextValues = requestContext?.all ?? {};
|
|
5188
5188
|
const validatedRequestContext = await requestContextSchema.safeParseAsync(contextValues);
|
|
5189
5189
|
if (!validatedRequestContext.success) {
|
|
@@ -5319,7 +5319,7 @@ var createTimeTravelExecutionParams = (params) => {
|
|
|
5319
5319
|
result = void 0;
|
|
5320
5320
|
}
|
|
5321
5321
|
if (result) {
|
|
5322
|
-
const formattedResult =
|
|
5322
|
+
const formattedResult = chunkGCRPNAAR_cjs.removeUndefinedValues(result);
|
|
5323
5323
|
stepResults[stepId] = formattedResult;
|
|
5324
5324
|
}
|
|
5325
5325
|
});
|
|
@@ -5877,7 +5877,7 @@ async function executeLoop(engine, params) {
|
|
|
5877
5877
|
options: {
|
|
5878
5878
|
type: "workflow_conditional_eval" /* WORKFLOW_CONDITIONAL_EVAL */,
|
|
5879
5879
|
name: `condition: '${entry.loopType}'`,
|
|
5880
|
-
input:
|
|
5880
|
+
input: chunkGCRPNAAR_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
|
|
5881
5881
|
attributes: {
|
|
5882
5882
|
conditionIndex: iteration
|
|
5883
5883
|
},
|
|
@@ -9809,7 +9809,7 @@ var Run = class {
|
|
|
9809
9809
|
}
|
|
9810
9810
|
async _validateInput(inputData) {
|
|
9811
9811
|
let inputDataToUse = inputData;
|
|
9812
|
-
if (this.validateInputs && this.inputSchema &&
|
|
9812
|
+
if (this.validateInputs && this.inputSchema && chunkGCRPNAAR_cjs.isZodType(this.inputSchema)) {
|
|
9813
9813
|
const validatedInputData = await this.inputSchema.safeParseAsync(inputData);
|
|
9814
9814
|
if (!validatedInputData.success) {
|
|
9815
9815
|
const errors = getZodErrors(validatedInputData.error);
|
|
@@ -9823,7 +9823,7 @@ var Run = class {
|
|
|
9823
9823
|
let initialStateToUse = initialState;
|
|
9824
9824
|
if (this.validateInputs) {
|
|
9825
9825
|
let stateSchema = this.stateSchema;
|
|
9826
|
-
if (stateSchema &&
|
|
9826
|
+
if (stateSchema && chunkGCRPNAAR_cjs.isZodType(stateSchema)) {
|
|
9827
9827
|
const validatedInitialState = await stateSchema.safeParseAsync(initialState);
|
|
9828
9828
|
if (!validatedInitialState.success) {
|
|
9829
9829
|
const errors = getZodErrors(validatedInitialState.error);
|
|
@@ -9837,7 +9837,7 @@ var Run = class {
|
|
|
9837
9837
|
return initialStateToUse;
|
|
9838
9838
|
}
|
|
9839
9839
|
async _validateRequestContext(requestContext) {
|
|
9840
|
-
if (this.validateInputs && this.requestContextSchema &&
|
|
9840
|
+
if (this.validateInputs && this.requestContextSchema && chunkGCRPNAAR_cjs.isZodType(this.requestContextSchema)) {
|
|
9841
9841
|
const contextValues = requestContext?.all ?? {};
|
|
9842
9842
|
const validatedRequestContext = await this.requestContextSchema.safeParseAsync(contextValues);
|
|
9843
9843
|
if (!validatedRequestContext.success) {
|
|
@@ -9851,7 +9851,7 @@ var Run = class {
|
|
|
9851
9851
|
}
|
|
9852
9852
|
async _validateResumeData(resumeData, suspendedStep) {
|
|
9853
9853
|
let resumeDataToUse = resumeData;
|
|
9854
|
-
if (suspendedStep && suspendedStep.resumeSchema && this.validateInputs &&
|
|
9854
|
+
if (suspendedStep && suspendedStep.resumeSchema && this.validateInputs && chunkGCRPNAAR_cjs.isZodType(suspendedStep.resumeSchema)) {
|
|
9855
9855
|
const resumeSchema = suspendedStep.resumeSchema;
|
|
9856
9856
|
const validatedResumeData = await resumeSchema.safeParseAsync(resumeData);
|
|
9857
9857
|
if (!validatedResumeData.success) {
|
|
@@ -9864,7 +9864,7 @@ var Run = class {
|
|
|
9864
9864
|
}
|
|
9865
9865
|
async _validateTimetravelInputData(inputData, step) {
|
|
9866
9866
|
let inputDataToUse = inputData;
|
|
9867
|
-
if (step && step.inputSchema && this.validateInputs &&
|
|
9867
|
+
if (step && step.inputSchema && this.validateInputs && chunkGCRPNAAR_cjs.isZodType(step.inputSchema)) {
|
|
9868
9868
|
const inputSchema = step.inputSchema;
|
|
9869
9869
|
const validatedInputData = await inputSchema.safeParseAsync(inputData);
|
|
9870
9870
|
if (!validatedInputData.success) {
|
|
@@ -11111,7 +11111,7 @@ var MastraScorer = class _MastraScorer {
|
|
|
11111
11111
|
}
|
|
11112
11112
|
});
|
|
11113
11113
|
}
|
|
11114
|
-
const resolvedModel = await
|
|
11114
|
+
const resolvedModel = await chunkPP4G2TZZ_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
|
|
11115
11115
|
const judge = new Agent({
|
|
11116
11116
|
id: "judge",
|
|
11117
11117
|
name: "judge",
|
|
@@ -12634,7 +12634,7 @@ Analyse the suspended tools: ${JSON.stringify(suspendedTools)}, using the messag
|
|
|
12634
12634
|
}
|
|
12635
12635
|
});
|
|
12636
12636
|
let transportResolver;
|
|
12637
|
-
if (currentStep.model instanceof
|
|
12637
|
+
if (currentStep.model instanceof chunkPP4G2TZZ_cjs.ModelRouterLanguageModel) {
|
|
12638
12638
|
const routerModel = currentStep.model;
|
|
12639
12639
|
transportResolver = () => routerModel._getStreamTransport();
|
|
12640
12640
|
}
|
|
@@ -14457,7 +14457,7 @@ var MastraLLMVNext = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
14457
14457
|
const remainingTokens = parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"] ?? "", 10);
|
|
14458
14458
|
if (!isNaN(remainingTokens) && remainingTokens > 0 && remainingTokens < 2e3) {
|
|
14459
14459
|
this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
|
|
14460
|
-
await
|
|
14460
|
+
await chunkGCRPNAAR_cjs.delay(10 * 1e3);
|
|
14461
14461
|
}
|
|
14462
14462
|
},
|
|
14463
14463
|
onFinish: async (props) => {
|
|
@@ -18621,7 +18621,7 @@ var Agent = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
18621
18621
|
* Throws an error if validation fails.
|
|
18622
18622
|
*/
|
|
18623
18623
|
async #validateRequestContext(requestContext) {
|
|
18624
|
-
if (this.#requestContextSchema &&
|
|
18624
|
+
if (this.#requestContextSchema && chunkGCRPNAAR_cjs.isZodType(this.#requestContextSchema)) {
|
|
18625
18625
|
const contextValues = requestContext?.all ?? {};
|
|
18626
18626
|
const validatedRequestContext = await this.#requestContextSchema.safeParseAsync(contextValues);
|
|
18627
18627
|
if (!validatedRequestContext.success) {
|
|
@@ -19353,7 +19353,7 @@ ${errorMessages}`,
|
|
|
19353
19353
|
*/
|
|
19354
19354
|
listTools({ requestContext = new chunk5WBEMKE2_cjs.RequestContext() } = {}) {
|
|
19355
19355
|
if (typeof this.#tools !== "function") {
|
|
19356
|
-
return
|
|
19356
|
+
return chunkGCRPNAAR_cjs.ensureToolProperties(this.#tools);
|
|
19357
19357
|
}
|
|
19358
19358
|
const result = this.#tools({
|
|
19359
19359
|
requestContext,
|
|
@@ -19374,7 +19374,7 @@ ${errorMessages}`,
|
|
|
19374
19374
|
this.logger.error(mastraError.toString());
|
|
19375
19375
|
throw mastraError;
|
|
19376
19376
|
}
|
|
19377
|
-
return
|
|
19377
|
+
return chunkGCRPNAAR_cjs.ensureToolProperties(tools);
|
|
19378
19378
|
});
|
|
19379
19379
|
}
|
|
19380
19380
|
/**
|
|
@@ -19406,7 +19406,7 @@ ${errorMessages}`,
|
|
|
19406
19406
|
});
|
|
19407
19407
|
});
|
|
19408
19408
|
} else {
|
|
19409
|
-
llm = new
|
|
19409
|
+
llm = new chunkOOTLMVNN_cjs.MastraLLMV1({
|
|
19410
19410
|
model: resolvedModel,
|
|
19411
19411
|
mastra: this.#mastra,
|
|
19412
19412
|
options: { tracingPolicy: this.#options?.tracingPolicy }
|
|
@@ -19431,7 +19431,7 @@ ${errorMessages}`,
|
|
|
19431
19431
|
*/
|
|
19432
19432
|
async resolveModelConfig(modelConfig, requestContext) {
|
|
19433
19433
|
try {
|
|
19434
|
-
return await
|
|
19434
|
+
return await chunkPP4G2TZZ_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
|
|
19435
19435
|
} catch (error) {
|
|
19436
19436
|
const mastraError = new chunk4U7ZLI36_cjs.MastraError({
|
|
19437
19437
|
id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
|
|
@@ -19815,7 +19815,7 @@ ${errorMessages}`,
|
|
|
19815
19815
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
19816
19816
|
requireApproval: toolObj.requireApproval
|
|
19817
19817
|
};
|
|
19818
|
-
const convertedToCoreTool =
|
|
19818
|
+
const convertedToCoreTool = chunkGCRPNAAR_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
19819
19819
|
convertedMemoryTools[toolName] = convertedToCoreTool;
|
|
19820
19820
|
}
|
|
19821
19821
|
}
|
|
@@ -19865,7 +19865,7 @@ ${errorMessages}`,
|
|
|
19865
19865
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
19866
19866
|
requireApproval: toolObj.requireApproval
|
|
19867
19867
|
};
|
|
19868
|
-
const convertedToCoreTool =
|
|
19868
|
+
const convertedToCoreTool = chunkGCRPNAAR_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
19869
19869
|
convertedWorkspaceTools[toolName] = convertedToCoreTool;
|
|
19870
19870
|
}
|
|
19871
19871
|
}
|
|
@@ -19918,7 +19918,7 @@ ${errorMessages}`,
|
|
|
19918
19918
|
requireApproval: false
|
|
19919
19919
|
// Skill tools never require approval
|
|
19920
19920
|
};
|
|
19921
|
-
const convertedToCoreTool =
|
|
19921
|
+
const convertedToCoreTool = chunkGCRPNAAR_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
19922
19922
|
convertedSkillTools[toolName] = convertedToCoreTool;
|
|
19923
19923
|
}
|
|
19924
19924
|
}
|
|
@@ -20131,7 +20131,7 @@ ${errorMessages}`,
|
|
|
20131
20131
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20132
20132
|
requireApproval: tool2.requireApproval
|
|
20133
20133
|
};
|
|
20134
|
-
return [k,
|
|
20134
|
+
return [k, chunkGCRPNAAR_cjs.makeCoreTool(tool2, options, void 0, autoResumeSuspendedTools)];
|
|
20135
20135
|
})
|
|
20136
20136
|
);
|
|
20137
20137
|
const assignedToolEntriesConverted = Object.fromEntries(
|
|
@@ -20182,7 +20182,7 @@ ${errorMessages}`,
|
|
|
20182
20182
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20183
20183
|
requireApproval: toolObj.requireApproval
|
|
20184
20184
|
};
|
|
20185
|
-
const convertedToCoreTool =
|
|
20185
|
+
const convertedToCoreTool = chunkGCRPNAAR_cjs.makeCoreTool(toolObj, options, "toolset", autoResumeSuspendedTools);
|
|
20186
20186
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
20187
20187
|
}
|
|
20188
20188
|
}
|
|
@@ -20228,7 +20228,7 @@ ${errorMessages}`,
|
|
|
20228
20228
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20229
20229
|
requireApproval: tool2.requireApproval
|
|
20230
20230
|
};
|
|
20231
|
-
const convertedToCoreTool =
|
|
20231
|
+
const convertedToCoreTool = chunkGCRPNAAR_cjs.makeCoreTool(toolRest, options, "client-tool", autoResumeSuspendedTools);
|
|
20232
20232
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
20233
20233
|
}
|
|
20234
20234
|
}
|
|
@@ -20830,7 +20830,7 @@ ${effectiveInstructions}`;
|
|
|
20830
20830
|
...observabilityContext,
|
|
20831
20831
|
tracingPolicy: this.#options?.tracingPolicy
|
|
20832
20832
|
};
|
|
20833
|
-
convertedAgentTools[`agent-${agentName}`] =
|
|
20833
|
+
convertedAgentTools[`agent-${agentName}`] = chunkGCRPNAAR_cjs.makeCoreTool(
|
|
20834
20834
|
toolObj,
|
|
20835
20835
|
options,
|
|
20836
20836
|
void 0,
|
|
@@ -21024,7 +21024,7 @@ ${effectiveInstructions}`;
|
|
|
21024
21024
|
...observabilityContext,
|
|
21025
21025
|
tracingPolicy: this.#options?.tracingPolicy
|
|
21026
21026
|
};
|
|
21027
|
-
convertedWorkflowTools[`workflow-${workflowName}`] =
|
|
21027
|
+
convertedWorkflowTools[`workflow-${workflowName}`] = chunkGCRPNAAR_cjs.makeCoreTool(
|
|
21028
21028
|
toolObj,
|
|
21029
21029
|
options,
|
|
21030
21030
|
void 0,
|
|
@@ -21056,7 +21056,7 @@ ${effectiveInstructions}`;
|
|
|
21056
21056
|
let mastraProxy = void 0;
|
|
21057
21057
|
const logger = this.logger;
|
|
21058
21058
|
if (this.#mastra) {
|
|
21059
|
-
mastraProxy =
|
|
21059
|
+
mastraProxy = chunkGCRPNAAR_cjs.createMastraProxy({ mastra: this.#mastra, logger });
|
|
21060
21060
|
}
|
|
21061
21061
|
const assignedTools = await this.listAssignedTools({
|
|
21062
21062
|
runId,
|
|
@@ -21318,7 +21318,7 @@ ${effectiveInstructions}`;
|
|
|
21318
21318
|
throw mastraError;
|
|
21319
21319
|
}
|
|
21320
21320
|
let headers;
|
|
21321
|
-
if (resolvedModel instanceof
|
|
21321
|
+
if (resolvedModel instanceof chunkPP4G2TZZ_cjs.ModelRouterLanguageModel) {
|
|
21322
21322
|
headers = resolvedModel.config?.headers;
|
|
21323
21323
|
}
|
|
21324
21324
|
return [
|
|
@@ -21364,7 +21364,7 @@ ${effectiveInstructions}`;
|
|
|
21364
21364
|
throw mastraError;
|
|
21365
21365
|
}
|
|
21366
21366
|
let headers;
|
|
21367
|
-
if (model2 instanceof
|
|
21367
|
+
if (model2 instanceof chunkPP4G2TZZ_cjs.ModelRouterLanguageModel) {
|
|
21368
21368
|
headers = model2.config?.headers;
|
|
21369
21369
|
}
|
|
21370
21370
|
return {
|
|
@@ -21422,7 +21422,7 @@ ${effectiveInstructions}`;
|
|
|
21422
21422
|
const targetProvider = structuredOutputModel.provider;
|
|
21423
21423
|
const targetModelId = structuredOutputModel.modelId;
|
|
21424
21424
|
if (targetProvider.includes("openai") || targetModelId.includes("openai")) {
|
|
21425
|
-
if (
|
|
21425
|
+
if (chunkGCRPNAAR_cjs.isZodType(options.structuredOutput.schema) && targetModelId) {
|
|
21426
21426
|
const modelInfo = {
|
|
21427
21427
|
provider: targetProvider,
|
|
21428
21428
|
modelId: targetModelId,
|
|
@@ -21835,7 +21835,7 @@ ${effectiveInstructions}`;
|
|
|
21835
21835
|
const defaultOptions = await this.getDefaultOptions({
|
|
21836
21836
|
requestContext: options?.requestContext
|
|
21837
21837
|
});
|
|
21838
|
-
const mergedOptions =
|
|
21838
|
+
const mergedOptions = chunkGCRPNAAR_cjs.deepMerge(
|
|
21839
21839
|
defaultOptions,
|
|
21840
21840
|
options ?? {}
|
|
21841
21841
|
);
|
|
@@ -21899,7 +21899,7 @@ ${effectiveInstructions}`;
|
|
|
21899
21899
|
const defaultOptions = await this.getDefaultOptions({
|
|
21900
21900
|
requestContext: streamOptions?.requestContext
|
|
21901
21901
|
});
|
|
21902
|
-
const mergedOptions =
|
|
21902
|
+
const mergedOptions = chunkGCRPNAAR_cjs.deepMerge(
|
|
21903
21903
|
defaultOptions,
|
|
21904
21904
|
streamOptions ?? {}
|
|
21905
21905
|
);
|
|
@@ -21957,7 +21957,7 @@ ${effectiveInstructions}`;
|
|
|
21957
21957
|
const defaultOptions = await this.getDefaultOptions({
|
|
21958
21958
|
requestContext: streamOptions?.requestContext
|
|
21959
21959
|
});
|
|
21960
|
-
let mergedStreamOptions =
|
|
21960
|
+
let mergedStreamOptions = chunkGCRPNAAR_cjs.deepMerge(
|
|
21961
21961
|
defaultOptions,
|
|
21962
21962
|
streamOptions ?? {}
|
|
21963
21963
|
);
|
|
@@ -22031,7 +22031,7 @@ ${effectiveInstructions}`;
|
|
|
22031
22031
|
const defaultOptions = await this.getDefaultOptions({
|
|
22032
22032
|
requestContext: options?.requestContext
|
|
22033
22033
|
});
|
|
22034
|
-
const mergedOptions =
|
|
22034
|
+
const mergedOptions = chunkGCRPNAAR_cjs.deepMerge(
|
|
22035
22035
|
defaultOptions,
|
|
22036
22036
|
options ?? {}
|
|
22037
22037
|
);
|
|
@@ -25435,7 +25435,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
25435
25435
|
);
|
|
25436
25436
|
}
|
|
25437
25437
|
if (typeof config.embedder === "string") {
|
|
25438
|
-
this.embedder = new
|
|
25438
|
+
this.embedder = new chunkPP4G2TZZ_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
25439
25439
|
} else {
|
|
25440
25440
|
this.embedder = config.embedder;
|
|
25441
25441
|
}
|
|
@@ -25474,7 +25474,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
25474
25474
|
}
|
|
25475
25475
|
setEmbedder(embedder, embedderOptions) {
|
|
25476
25476
|
if (typeof embedder === "string") {
|
|
25477
|
-
this.embedder = new
|
|
25477
|
+
this.embedder = new chunkPP4G2TZZ_cjs.ModelRouterEmbeddingModel(embedder);
|
|
25478
25478
|
} else {
|
|
25479
25479
|
this.embedder = embedder;
|
|
25480
25480
|
}
|
|
@@ -25570,7 +25570,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
25570
25570
|
"The threads.generateTitle option has been moved. Use the top-level generateTitle option instead."
|
|
25571
25571
|
);
|
|
25572
25572
|
}
|
|
25573
|
-
const mergedConfig =
|
|
25573
|
+
const mergedConfig = chunkGCRPNAAR_cjs.deepMerge(this.threadConfig, config || {});
|
|
25574
25574
|
if (typeof config?.workingMemory === "object" && config.workingMemory?.schema && typeof mergedConfig.workingMemory === "object") {
|
|
25575
25575
|
mergedConfig.workingMemory.schema = config.workingMemory.schema;
|
|
25576
25576
|
}
|
|
@@ -25920,7 +25920,7 @@ var MockMemory = class extends MastraMemory {
|
|
|
25920
25920
|
} = {}) {
|
|
25921
25921
|
super({
|
|
25922
25922
|
name: "mock",
|
|
25923
|
-
storage: storage || new
|
|
25923
|
+
storage: storage || new chunk7AHCLTZZ_cjs.InMemoryStore(),
|
|
25924
25924
|
options: {
|
|
25925
25925
|
workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : void 0,
|
|
25926
25926
|
lastMessages: enableMessageHistory ? 10 : void 0
|
|
@@ -26230,5 +26230,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
|
|
|
26230
26230
|
exports.validateStepResumeData = validateStepResumeData;
|
|
26231
26231
|
exports.validateStepStateData = validateStepStateData;
|
|
26232
26232
|
exports.validateStepSuspendData = validateStepSuspendData;
|
|
26233
|
-
//# sourceMappingURL=chunk-
|
|
26234
|
-
//# sourceMappingURL=chunk-
|
|
26233
|
+
//# sourceMappingURL=chunk-BCSVBOAN.cjs.map
|
|
26234
|
+
//# sourceMappingURL=chunk-BCSVBOAN.cjs.map
|