@mastra/core 1.23.0-alpha.1 → 1.23.0-alpha.2
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 +2 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +1 -1
- package/dist/channels/index.cjs +4 -4
- package/dist/channels/index.js +1 -1
- package/dist/{chunk-44L3XRON.js → chunk-2TDUGEDT.js} +3 -3
- package/dist/{chunk-44L3XRON.js.map → chunk-2TDUGEDT.js.map} +1 -1
- package/dist/{chunk-752IYVJ7.cjs → chunk-36LLU2AT.cjs} +7 -7
- package/dist/{chunk-752IYVJ7.cjs.map → chunk-36LLU2AT.cjs.map} +1 -1
- package/dist/{chunk-7L77UGLB.js → chunk-4G57YHET.js} +3 -3
- package/dist/{chunk-7L77UGLB.js.map → chunk-4G57YHET.js.map} +1 -1
- package/dist/{chunk-2ABXM7ZX.cjs → chunk-65AKRSZH.cjs} +6 -6
- package/dist/{chunk-2ABXM7ZX.cjs.map → chunk-65AKRSZH.cjs.map} +1 -1
- package/dist/{chunk-QTJXNO73.cjs → chunk-7F42JBBV.cjs} +17 -17
- package/dist/{chunk-QTJXNO73.cjs.map → chunk-7F42JBBV.cjs.map} +1 -1
- package/dist/{chunk-QWJTDFN4.cjs → chunk-ABQYDFUT.cjs} +84 -84
- package/dist/{chunk-QWJTDFN4.cjs.map → chunk-ABQYDFUT.cjs.map} +1 -1
- package/dist/{chunk-MM743DL3.cjs → chunk-ALMJLYZX.cjs} +47 -47
- package/dist/{chunk-MM743DL3.cjs.map → chunk-ALMJLYZX.cjs.map} +1 -1
- package/dist/{chunk-C7W22LW7.cjs → chunk-CSP3QF4S.cjs} +10 -10
- package/dist/{chunk-C7W22LW7.cjs.map → chunk-CSP3QF4S.cjs.map} +1 -1
- package/dist/{chunk-CW4IJO7Y.js → chunk-DSEZHQGM.js} +3 -3
- package/dist/{chunk-CW4IJO7Y.js.map → chunk-DSEZHQGM.js.map} +1 -1
- package/dist/{chunk-ZINYS2FM.js → chunk-ECMHIMEZ.js} +4 -4
- package/dist/{chunk-ZINYS2FM.js.map → chunk-ECMHIMEZ.js.map} +1 -1
- package/dist/{chunk-NPU3H2M6.js → chunk-EFIOOAHK.js} +4 -4
- package/dist/{chunk-NPU3H2M6.js.map → chunk-EFIOOAHK.js.map} +1 -1
- package/dist/{chunk-CBP34G7K.js → chunk-F34VD7VO.js} +8 -8
- package/dist/{chunk-CBP34G7K.js.map → chunk-F34VD7VO.js.map} +1 -1
- package/dist/{chunk-VW6KVZ5J.js → chunk-FGMFB2X5.js} +4 -4
- package/dist/{chunk-VW6KVZ5J.js.map → chunk-FGMFB2X5.js.map} +1 -1
- package/dist/{chunk-R2KKOX5U.js → chunk-GVK32BFO.js} +4 -4
- package/dist/{chunk-R2KKOX5U.js.map → chunk-GVK32BFO.js.map} +1 -1
- package/dist/{chunk-ASSX63NG.cjs → chunk-H27OFJUB.cjs} +185 -185
- package/dist/{chunk-ASSX63NG.cjs.map → chunk-H27OFJUB.cjs.map} +1 -1
- package/dist/{chunk-FDB7QXFM.cjs → chunk-HBIMPAQL.cjs} +51 -51
- package/dist/{chunk-FDB7QXFM.cjs.map → chunk-HBIMPAQL.cjs.map} +1 -1
- package/dist/{chunk-W232X652.cjs → chunk-HF4LXXL5.cjs} +3 -3
- package/dist/{chunk-W232X652.cjs.map → chunk-HF4LXXL5.cjs.map} +1 -1
- package/dist/{chunk-I4FNELWY.js → chunk-KKZ624PJ.js} +9 -9
- package/dist/{chunk-I4FNELWY.js.map → chunk-KKZ624PJ.js.map} +1 -1
- package/dist/{chunk-XJLVFBPN.js → chunk-KQP3MHIA.js} +4 -4
- package/dist/{chunk-XJLVFBPN.js.map → chunk-KQP3MHIA.js.map} +1 -1
- package/dist/{chunk-56OCTZBD.js → chunk-LRXYVNO2.js} +3 -3
- package/dist/{chunk-56OCTZBD.js.map → chunk-LRXYVNO2.js.map} +1 -1
- package/dist/{chunk-PND63X2U.js → chunk-N5AAEXN5.js} +8 -8
- package/dist/{chunk-PND63X2U.js.map → chunk-N5AAEXN5.js.map} +1 -1
- package/dist/{chunk-ZXVSOWZV.js → chunk-Q4TITKZD.js} +5 -5
- package/dist/{chunk-ZXVSOWZV.js.map → chunk-Q4TITKZD.js.map} +1 -1
- package/dist/{chunk-INA5PMVU.cjs → chunk-RNO432IS.cjs} +7 -7
- package/dist/{chunk-INA5PMVU.cjs.map → chunk-RNO432IS.cjs.map} +1 -1
- package/dist/{chunk-4T5MI4MY.cjs → chunk-TGN66Y5K.cjs} +16 -16
- package/dist/{chunk-4T5MI4MY.cjs.map → chunk-TGN66Y5K.cjs.map} +1 -1
- package/dist/{chunk-7HWDGEET.cjs → chunk-TLE44DVR.cjs} +3 -3
- package/dist/{chunk-7HWDGEET.cjs.map → chunk-TLE44DVR.cjs.map} +1 -1
- package/dist/{chunk-VBGSQQ6Z.cjs → chunk-UZOHTV72.cjs} +9 -9
- package/dist/{chunk-VBGSQQ6Z.cjs.map → chunk-UZOHTV72.cjs.map} +1 -1
- package/dist/{chunk-E4FZAE2V.js → chunk-WGSJXWWA.js} +3 -3
- package/dist/{chunk-E4FZAE2V.js.map → chunk-WGSJXWWA.js.map} +1 -1
- package/dist/{chunk-67H3I6U2.cjs → chunk-XDL2JJB7.cjs} +20 -20
- package/dist/{chunk-67H3I6U2.cjs.map → chunk-XDL2JJB7.cjs.map} +1 -1
- package/dist/{chunk-2GB3EFMQ.js → chunk-XHY3HI4A.js} +7 -7
- package/dist/{chunk-2GB3EFMQ.js.map → chunk-XHY3HI4A.js.map} +1 -1
- package/dist/{chunk-J5E6MWAL.cjs → chunk-YJF6IVFK.cjs} +3 -3
- package/dist/{chunk-J5E6MWAL.cjs.map → chunk-YJF6IVFK.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 +305 -305
- package/dist/evals/index.cjs +23 -23
- package/dist/evals/index.js +3 -3
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- 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 +20 -20
- 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/mastra-2UWRHJI2.js +3 -0
- package/dist/{mastra-VFBM63EH.js.map → mastra-2UWRHJI2.js.map} +1 -1
- package/dist/mastra-VZGJ3WQ7.cjs +12 -0
- package/dist/{mastra-PWENJ3CT.cjs.map → mastra-VZGJ3WQ7.cjs.map} +1 -1
- package/dist/memory/index.cjs +17 -17
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-5KR3WKM3.js +3 -0
- package/dist/{models-dev-LDOOABB3.js.map → models-dev-5KR3WKM3.js.map} +1 -1
- package/dist/models-dev-LBQVOPNM.cjs +12 -0
- package/dist/{models-dev-NK3HQWLN.cjs.map → models-dev-LBQVOPNM.cjs.map} +1 -1
- package/dist/netlify-7UYWYPR7.js +3 -0
- package/dist/{netlify-BD2Y34DD.js.map → netlify-7UYWYPR7.js.map} +1 -1
- package/dist/netlify-M3KHXKH6.cjs +12 -0
- package/dist/{netlify-M374SBKN.cjs.map → netlify-M3KHXKH6.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-PGMC3USM.cjs +40 -0
- package/dist/{provider-registry-YMGOMVKY.cjs.map → provider-registry-PGMC3USM.cjs.map} +1 -1
- package/dist/provider-registry-ZB6V7PBP.js +3 -0
- package/dist/{provider-registry-OX6F72LR.js.map → provider-registry-ZB6V7PBP.js.map} +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/constants.cjs +56 -56
- package/dist/storage/constants.js +1 -1
- package/dist/storage/index.cjs +160 -160
- package/dist/storage/index.js +2 -2
- 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 +4 -4
- package/dist/mastra-PWENJ3CT.cjs +0 -12
- package/dist/mastra-VFBM63EH.js +0 -3
- package/dist/models-dev-LDOOABB3.js +0 -3
- package/dist/models-dev-NK3HQWLN.cjs +0 -12
- package/dist/netlify-BD2Y34DD.js +0 -3
- package/dist/netlify-M374SBKN.cjs +0 -12
- package/dist/provider-registry-OX6F72LR.js +0 -3
- package/dist/provider-registry-YMGOMVKY.cjs +0 -40
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
|
|
4
3
|
var chunkHIC3WGQU_cjs = require('./chunk-HIC3WGQU.cjs');
|
|
5
4
|
var chunkT26CFBWF_cjs = require('./chunk-T26CFBWF.cjs');
|
|
6
|
-
var
|
|
5
|
+
var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
|
|
6
|
+
var chunkTGN66Y5K_cjs = require('./chunk-TGN66Y5K.cjs');
|
|
7
7
|
var chunkXB5NKHYR_cjs = require('./chunk-XB5NKHYR.cjs');
|
|
8
8
|
var chunkY3APFUXZ_cjs = require('./chunk-Y3APFUXZ.cjs');
|
|
9
9
|
var chunkCFMZZDO2_cjs = require('./chunk-CFMZZDO2.cjs');
|
|
10
10
|
var chunkOQDRPRKM_cjs = require('./chunk-OQDRPRKM.cjs');
|
|
11
11
|
var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var chunkABQYDFUT_cjs = require('./chunk-ABQYDFUT.cjs');
|
|
13
|
+
var chunkRNO432IS_cjs = require('./chunk-RNO432IS.cjs');
|
|
14
14
|
var chunk22FSGATE_cjs = require('./chunk-22FSGATE.cjs');
|
|
15
|
-
var
|
|
16
|
-
var chunkW6PDQCCN_cjs = require('./chunk-W6PDQCCN.cjs');
|
|
15
|
+
var chunkHF4LXXL5_cjs = require('./chunk-HF4LXXL5.cjs');
|
|
17
16
|
var chunkKJBMTK5B_cjs = require('./chunk-KJBMTK5B.cjs');
|
|
18
17
|
var chunkLDLHW3QN_cjs = require('./chunk-LDLHW3QN.cjs');
|
|
19
18
|
var chunkXB4FLS7A_cjs = require('./chunk-XB4FLS7A.cjs');
|
|
19
|
+
var chunkW6PDQCCN_cjs = require('./chunk-W6PDQCCN.cjs');
|
|
20
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');
|
|
@@ -2078,7 +2078,7 @@ var ProcessorRunner = class _ProcessorRunner {
|
|
|
2078
2078
|
}
|
|
2079
2079
|
const { model: _model, ...rest } = result;
|
|
2080
2080
|
if (result.model) {
|
|
2081
|
-
const resolvedModel = await
|
|
2081
|
+
const resolvedModel = await chunkABQYDFUT_cjs.resolveModelConfig(result.model);
|
|
2082
2082
|
const isSupported = isSupportedLanguageModel(resolvedModel);
|
|
2083
2083
|
if (!isSupported) {
|
|
2084
2084
|
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
@@ -6799,7 +6799,7 @@ var createTimeTravelExecutionParams = (params) => {
|
|
|
6799
6799
|
result = void 0;
|
|
6800
6800
|
}
|
|
6801
6801
|
if (result) {
|
|
6802
|
-
const formattedResult =
|
|
6802
|
+
const formattedResult = chunkHF4LXXL5_cjs.removeUndefinedValues(result);
|
|
6803
6803
|
stepResults[stepId] = formattedResult;
|
|
6804
6804
|
}
|
|
6805
6805
|
});
|
|
@@ -7357,7 +7357,7 @@ async function executeLoop(engine, params) {
|
|
|
7357
7357
|
options: {
|
|
7358
7358
|
type: "workflow_conditional_eval" /* WORKFLOW_CONDITIONAL_EVAL */,
|
|
7359
7359
|
name: `condition: '${entry.loopType}'`,
|
|
7360
|
-
input:
|
|
7360
|
+
input: chunkHF4LXXL5_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
|
|
7361
7361
|
attributes: {
|
|
7362
7362
|
conditionIndex: iteration
|
|
7363
7363
|
},
|
|
@@ -12813,7 +12813,7 @@ var MastraScorer = class _MastraScorer {
|
|
|
12813
12813
|
}
|
|
12814
12814
|
});
|
|
12815
12815
|
}
|
|
12816
|
-
const resolvedModel = await
|
|
12816
|
+
const resolvedModel = await chunkABQYDFUT_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
|
|
12817
12817
|
const judgeModel = resolvedModel.modelId;
|
|
12818
12818
|
const judge = new Agent({
|
|
12819
12819
|
id: "judge",
|
|
@@ -13044,7 +13044,7 @@ async function runDefaultCompletionCheck(agent, context, streamContext, abortSig
|
|
|
13044
13044
|
Primitives already executed: ${completedPrimitives.join(", ")}` : "";
|
|
13045
13045
|
const completionPrompt = `
|
|
13046
13046
|
The ${context.selectedPrimitive.type} ${context.selectedPrimitive.id} has contributed to the task.
|
|
13047
|
-
This is the result: ${
|
|
13047
|
+
This is the result: ${chunkHF4LXXL5_cjs.safeStringify(context.primitiveResult)}
|
|
13048
13048
|
|
|
13049
13049
|
${completedSection}
|
|
13050
13050
|
|
|
@@ -13140,7 +13140,7 @@ async function generateFinalResult(agent, context, streamContext, abortSignal, o
|
|
|
13140
13140
|
Original task: ${context.originalTask}
|
|
13141
13141
|
|
|
13142
13142
|
The ${context.selectedPrimitive.type} ${context.selectedPrimitive.id} produced this result:
|
|
13143
|
-
${
|
|
13143
|
+
${chunkHF4LXXL5_cjs.safeStringify(context.primitiveResult)}
|
|
13144
13144
|
|
|
13145
13145
|
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.
|
|
13146
13146
|
You should evaluate if the above result is comprehensive enough to accomplish the user's original task.
|
|
@@ -13198,7 +13198,7 @@ async function generateStructuredFinalResult(agent, context, structuredOutputOpt
|
|
|
13198
13198
|
Original task: ${context.originalTask}
|
|
13199
13199
|
|
|
13200
13200
|
The ${context.selectedPrimitive.type} ${context.selectedPrimitive.id} produced this result:
|
|
13201
|
-
${
|
|
13201
|
+
${chunkHF4LXXL5_cjs.safeStringify(context.primitiveResult)}
|
|
13202
13202
|
|
|
13203
13203
|
Based on the task and result above, generate a structured response according to the provided schema.
|
|
13204
13204
|
Use the conversation history and primitive results to craft the response.
|
|
@@ -14299,7 +14299,7 @@ function createLLMExecutionStep({
|
|
|
14299
14299
|
const convertedTools = {};
|
|
14300
14300
|
for (const [name, tool2] of Object.entries(currentStep.tools)) {
|
|
14301
14301
|
if (chunkLDLHW3QN_cjs.isMastraTool(tool2)) {
|
|
14302
|
-
convertedTools[name] =
|
|
14302
|
+
convertedTools[name] = chunkHF4LXXL5_cjs.makeCoreTool(
|
|
14303
14303
|
tool2,
|
|
14304
14304
|
{
|
|
14305
14305
|
name,
|
|
@@ -14521,7 +14521,7 @@ Analyse the suspended tools: ${JSON.stringify(suspendedTools)}, using the messag
|
|
|
14521
14521
|
}
|
|
14522
14522
|
});
|
|
14523
14523
|
let transportResolver;
|
|
14524
|
-
if (currentStep.model instanceof
|
|
14524
|
+
if (currentStep.model instanceof chunkABQYDFUT_cjs.ModelRouterLanguageModel) {
|
|
14525
14525
|
const routerModel = currentStep.model;
|
|
14526
14526
|
transportResolver = () => routerModel._getStreamTransport();
|
|
14527
14527
|
}
|
|
@@ -15420,7 +15420,7 @@ function createToolCallStep({
|
|
|
15420
15420
|
}
|
|
15421
15421
|
}
|
|
15422
15422
|
const rawResult = await tool2.execute(args, toolOptions);
|
|
15423
|
-
const result =
|
|
15423
|
+
const result = chunkHF4LXXL5_cjs.ensureSerializable(rawResult);
|
|
15424
15424
|
if (tool2 && "onOutput" in tool2 && typeof tool2.onOutput === "function") {
|
|
15425
15425
|
try {
|
|
15426
15426
|
await tool2.onOutput({
|
|
@@ -16280,7 +16280,7 @@ var MastraLLMVNext = class extends chunkDKK77FIJ_cjs.MastraBase {
|
|
|
16280
16280
|
const remainingTokens = parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"] ?? "", 10);
|
|
16281
16281
|
if (!isNaN(remainingTokens) && remainingTokens > 0 && remainingTokens < 2e3) {
|
|
16282
16282
|
this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
|
|
16283
|
-
await
|
|
16283
|
+
await chunkHF4LXXL5_cjs.delay(10 * 1e3);
|
|
16284
16284
|
}
|
|
16285
16285
|
},
|
|
16286
16286
|
onFinish: async (props) => {
|
|
@@ -21350,7 +21350,7 @@ ${errorMessages}`,
|
|
|
21350
21350
|
*/
|
|
21351
21351
|
listTools({ requestContext = new chunk5WBEMKE2_cjs.RequestContext() } = {}) {
|
|
21352
21352
|
if (typeof this.#tools !== "function") {
|
|
21353
|
-
return
|
|
21353
|
+
return chunkHF4LXXL5_cjs.ensureToolProperties(this.#tools);
|
|
21354
21354
|
}
|
|
21355
21355
|
const result = this.#tools({
|
|
21356
21356
|
requestContext,
|
|
@@ -21370,7 +21370,7 @@ ${errorMessages}`,
|
|
|
21370
21370
|
this.logger.trackException(mastraError);
|
|
21371
21371
|
throw mastraError;
|
|
21372
21372
|
}
|
|
21373
|
-
return
|
|
21373
|
+
return chunkHF4LXXL5_cjs.ensureToolProperties(tools);
|
|
21374
21374
|
});
|
|
21375
21375
|
}
|
|
21376
21376
|
/**
|
|
@@ -21418,7 +21418,7 @@ ${errorMessages}`,
|
|
|
21418
21418
|
});
|
|
21419
21419
|
});
|
|
21420
21420
|
} else {
|
|
21421
|
-
llm = new
|
|
21421
|
+
llm = new chunkRNO432IS_cjs.MastraLLMV1({
|
|
21422
21422
|
model: modelInfo,
|
|
21423
21423
|
mastra: this.#mastra,
|
|
21424
21424
|
options: { tracingPolicy: this.#options?.tracingPolicy }
|
|
@@ -21444,7 +21444,7 @@ ${errorMessages}`,
|
|
|
21444
21444
|
*/
|
|
21445
21445
|
async resolveModelConfig(modelConfig, requestContext) {
|
|
21446
21446
|
try {
|
|
21447
|
-
return await
|
|
21447
|
+
return await chunkABQYDFUT_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
|
|
21448
21448
|
} catch (error) {
|
|
21449
21449
|
const mastraError = new chunk4U7ZLI36_cjs.MastraError({
|
|
21450
21450
|
id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
|
|
@@ -21916,7 +21916,7 @@ ${errorMessages}`,
|
|
|
21916
21916
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
21917
21917
|
requireApproval: toolObj.requireApproval
|
|
21918
21918
|
};
|
|
21919
|
-
const convertedToCoreTool =
|
|
21919
|
+
const convertedToCoreTool = chunkHF4LXXL5_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
21920
21920
|
convertedMemoryTools[toolName] = convertedToCoreTool;
|
|
21921
21921
|
}
|
|
21922
21922
|
}
|
|
@@ -21969,7 +21969,7 @@ ${errorMessages}`,
|
|
|
21969
21969
|
requireApproval: toolObj.requireApproval,
|
|
21970
21970
|
workspace
|
|
21971
21971
|
};
|
|
21972
|
-
const convertedToCoreTool =
|
|
21972
|
+
const convertedToCoreTool = chunkHF4LXXL5_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
21973
21973
|
convertedWorkspaceTools[toolName] = convertedToCoreTool;
|
|
21974
21974
|
}
|
|
21975
21975
|
}
|
|
@@ -22010,7 +22010,7 @@ ${errorMessages}`,
|
|
|
22010
22010
|
...observabilityContext,
|
|
22011
22011
|
tracingPolicy: this.#options?.tracingPolicy
|
|
22012
22012
|
};
|
|
22013
|
-
convertedChannelTools[toolName] =
|
|
22013
|
+
convertedChannelTools[toolName] = chunkHF4LXXL5_cjs.makeCoreTool(
|
|
22014
22014
|
tool2,
|
|
22015
22015
|
options,
|
|
22016
22016
|
void 0,
|
|
@@ -22067,7 +22067,7 @@ ${errorMessages}`,
|
|
|
22067
22067
|
// Skill tools never require approval
|
|
22068
22068
|
workspace
|
|
22069
22069
|
};
|
|
22070
|
-
const convertedToCoreTool =
|
|
22070
|
+
const convertedToCoreTool = chunkHF4LXXL5_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
22071
22071
|
convertedSkillTools[toolName] = convertedToCoreTool;
|
|
22072
22072
|
}
|
|
22073
22073
|
}
|
|
@@ -22115,7 +22115,7 @@ ${errorMessages}`,
|
|
|
22115
22115
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
22116
22116
|
requireApproval: toolObj.requireApproval
|
|
22117
22117
|
};
|
|
22118
|
-
const convertedToCoreTool =
|
|
22118
|
+
const convertedToCoreTool = chunkHF4LXXL5_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
22119
22119
|
convertedBrowserTools[toolName] = convertedToCoreTool;
|
|
22120
22120
|
}
|
|
22121
22121
|
}
|
|
@@ -22348,7 +22348,7 @@ ${errorMessages}`,
|
|
|
22348
22348
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
22349
22349
|
requireApproval: tool2.requireApproval
|
|
22350
22350
|
};
|
|
22351
|
-
return [k,
|
|
22351
|
+
return [k, chunkHF4LXXL5_cjs.makeCoreTool(tool2, options, void 0, autoResumeSuspendedTools)];
|
|
22352
22352
|
})
|
|
22353
22353
|
);
|
|
22354
22354
|
const assignedToolEntriesConverted = Object.fromEntries(
|
|
@@ -22402,7 +22402,7 @@ ${errorMessages}`,
|
|
|
22402
22402
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
22403
22403
|
requireApproval: toolObj.requireApproval
|
|
22404
22404
|
};
|
|
22405
|
-
const convertedToCoreTool =
|
|
22405
|
+
const convertedToCoreTool = chunkHF4LXXL5_cjs.makeCoreTool(toolObj, options, "toolset", autoResumeSuspendedTools);
|
|
22406
22406
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
22407
22407
|
}
|
|
22408
22408
|
}
|
|
@@ -22447,7 +22447,7 @@ ${errorMessages}`,
|
|
|
22447
22447
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
22448
22448
|
requireApproval: tool2.requireApproval
|
|
22449
22449
|
};
|
|
22450
|
-
const convertedToCoreTool =
|
|
22450
|
+
const convertedToCoreTool = chunkHF4LXXL5_cjs.makeCoreTool(toolRest, options, "client-tool", autoResumeSuspendedTools);
|
|
22451
22451
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
22452
22452
|
}
|
|
22453
22453
|
}
|
|
@@ -23167,7 +23167,7 @@ ${effectiveInstructions}`;
|
|
|
23167
23167
|
...observabilityContext,
|
|
23168
23168
|
tracingPolicy: this.#options?.tracingPolicy
|
|
23169
23169
|
};
|
|
23170
|
-
convertedAgentTools[`agent-${agentName}`] =
|
|
23170
|
+
convertedAgentTools[`agent-${agentName}`] = chunkHF4LXXL5_cjs.makeCoreTool(
|
|
23171
23171
|
toolObj,
|
|
23172
23172
|
options,
|
|
23173
23173
|
void 0,
|
|
@@ -23388,7 +23388,7 @@ ${effectiveInstructions}`;
|
|
|
23388
23388
|
...observabilityContext,
|
|
23389
23389
|
tracingPolicy: this.#options?.tracingPolicy
|
|
23390
23390
|
};
|
|
23391
|
-
convertedWorkflowTools[`workflow-${workflowName}`] =
|
|
23391
|
+
convertedWorkflowTools[`workflow-${workflowName}`] = chunkHF4LXXL5_cjs.makeCoreTool(
|
|
23392
23392
|
toolObj,
|
|
23393
23393
|
options,
|
|
23394
23394
|
void 0,
|
|
@@ -23420,7 +23420,7 @@ ${effectiveInstructions}`;
|
|
|
23420
23420
|
let mastraProxy = void 0;
|
|
23421
23421
|
const logger = this.logger;
|
|
23422
23422
|
if (this.#mastra) {
|
|
23423
|
-
mastraProxy =
|
|
23423
|
+
mastraProxy = chunkHF4LXXL5_cjs.createMastraProxy({ mastra: this.#mastra, logger });
|
|
23424
23424
|
}
|
|
23425
23425
|
const assignedTools = await this.listAssignedTools({
|
|
23426
23426
|
runId,
|
|
@@ -23691,7 +23691,7 @@ ${effectiveInstructions}`;
|
|
|
23691
23691
|
const resolvedModel = await this.resolveModelConfig(selection, requestContext);
|
|
23692
23692
|
this.assertSupportsPreparedModels(resolvedModel);
|
|
23693
23693
|
let headers;
|
|
23694
|
-
if (resolvedModel instanceof
|
|
23694
|
+
if (resolvedModel instanceof chunkABQYDFUT_cjs.ModelRouterLanguageModel) {
|
|
23695
23695
|
headers = resolvedModel.config?.headers;
|
|
23696
23696
|
}
|
|
23697
23697
|
return [
|
|
@@ -23723,7 +23723,7 @@ ${effectiveInstructions}`;
|
|
|
23723
23723
|
throw mastraError;
|
|
23724
23724
|
}
|
|
23725
23725
|
let headers;
|
|
23726
|
-
if (model instanceof
|
|
23726
|
+
if (model instanceof chunkABQYDFUT_cjs.ModelRouterLanguageModel) {
|
|
23727
23727
|
headers = model.config?.headers;
|
|
23728
23728
|
}
|
|
23729
23729
|
return {
|
|
@@ -23784,7 +23784,7 @@ ${effectiveInstructions}`;
|
|
|
23784
23784
|
model: options.model
|
|
23785
23785
|
});
|
|
23786
23786
|
const resolvedModel = llm.getModel();
|
|
23787
|
-
const isGatewayModel = resolvedModel instanceof
|
|
23787
|
+
const isGatewayModel = resolvedModel instanceof chunkABQYDFUT_cjs.ModelRouterLanguageModel && resolvedModel.gatewayId === "mastra";
|
|
23788
23788
|
if (resourceId && threadFromArgs && !this.hasOwnMemory() && !isGatewayModel) {
|
|
23789
23789
|
this.logger.warn("No memory is configured but resourceId and threadId were passed in args", { agent: this.name });
|
|
23790
23790
|
}
|
|
@@ -24195,7 +24195,7 @@ ${effectiveInstructions}`;
|
|
|
24195
24195
|
const defaultOptions = await this.getDefaultOptions({
|
|
24196
24196
|
requestContext: options?.requestContext
|
|
24197
24197
|
});
|
|
24198
|
-
const mergedOptions =
|
|
24198
|
+
const mergedOptions = chunkHF4LXXL5_cjs.deepMerge(
|
|
24199
24199
|
defaultOptions,
|
|
24200
24200
|
options ?? {}
|
|
24201
24201
|
);
|
|
@@ -24266,7 +24266,7 @@ ${effectiveInstructions}`;
|
|
|
24266
24266
|
const defaultOptions = await this.getDefaultOptions({
|
|
24267
24267
|
requestContext: streamOptions?.requestContext
|
|
24268
24268
|
});
|
|
24269
|
-
const mergedOptions =
|
|
24269
|
+
const mergedOptions = chunkHF4LXXL5_cjs.deepMerge(
|
|
24270
24270
|
defaultOptions,
|
|
24271
24271
|
streamOptions ?? {}
|
|
24272
24272
|
);
|
|
@@ -24331,7 +24331,7 @@ ${effectiveInstructions}`;
|
|
|
24331
24331
|
const defaultOptions = await this.getDefaultOptions({
|
|
24332
24332
|
requestContext: streamOptions?.requestContext
|
|
24333
24333
|
});
|
|
24334
|
-
let mergedStreamOptions =
|
|
24334
|
+
let mergedStreamOptions = chunkHF4LXXL5_cjs.deepMerge(
|
|
24335
24335
|
defaultOptions,
|
|
24336
24336
|
streamOptions ?? {}
|
|
24337
24337
|
);
|
|
@@ -24397,7 +24397,7 @@ ${effectiveInstructions}`;
|
|
|
24397
24397
|
const defaultOptions = await this.getDefaultOptions({
|
|
24398
24398
|
requestContext: options?.requestContext
|
|
24399
24399
|
});
|
|
24400
|
-
const mergedOptions =
|
|
24400
|
+
const mergedOptions = chunkHF4LXXL5_cjs.deepMerge(
|
|
24401
24401
|
defaultOptions,
|
|
24402
24402
|
options ?? {}
|
|
24403
24403
|
);
|
|
@@ -27740,7 +27740,7 @@ var WorkingMemory = class {
|
|
|
27740
27740
|
return messageList;
|
|
27741
27741
|
}
|
|
27742
27742
|
generateEmptyFromSchemaInternal(schema) {
|
|
27743
|
-
const result =
|
|
27743
|
+
const result = chunkHF4LXXL5_cjs.generateEmptyFromSchema(schema);
|
|
27744
27744
|
return Object.keys(result).length > 0 ? result : null;
|
|
27745
27745
|
}
|
|
27746
27746
|
getWorkingMemoryToolInstruction({
|
|
@@ -28385,7 +28385,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
28385
28385
|
);
|
|
28386
28386
|
}
|
|
28387
28387
|
if (typeof config.embedder === "string") {
|
|
28388
|
-
this.embedder = new
|
|
28388
|
+
this.embedder = new chunkABQYDFUT_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
28389
28389
|
} else {
|
|
28390
28390
|
this.embedder = config.embedder;
|
|
28391
28391
|
}
|
|
@@ -28398,7 +28398,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
28398
28398
|
}
|
|
28399
28399
|
if (config.embedder) {
|
|
28400
28400
|
if (typeof config.embedder === "string") {
|
|
28401
|
-
this.embedder = new
|
|
28401
|
+
this.embedder = new chunkABQYDFUT_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
28402
28402
|
} else {
|
|
28403
28403
|
this.embedder = config.embedder;
|
|
28404
28404
|
}
|
|
@@ -28438,7 +28438,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
28438
28438
|
}
|
|
28439
28439
|
setEmbedder(embedder, embedderOptions) {
|
|
28440
28440
|
if (typeof embedder === "string") {
|
|
28441
|
-
this.embedder = new
|
|
28441
|
+
this.embedder = new chunkABQYDFUT_cjs.ModelRouterEmbeddingModel(embedder);
|
|
28442
28442
|
} else {
|
|
28443
28443
|
this.embedder = embedder;
|
|
28444
28444
|
}
|
|
@@ -28535,7 +28535,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
28535
28535
|
"The threads.generateTitle option has been moved. Use the top-level generateTitle option instead."
|
|
28536
28536
|
);
|
|
28537
28537
|
}
|
|
28538
|
-
const mergedConfig =
|
|
28538
|
+
const mergedConfig = chunkHF4LXXL5_cjs.deepMerge(this.threadConfig, config || {});
|
|
28539
28539
|
if (typeof config?.workingMemory === "object" && config.workingMemory?.schema && typeof mergedConfig.workingMemory === "object") {
|
|
28540
28540
|
mergedConfig.workingMemory.schema = config.workingMemory.schema;
|
|
28541
28541
|
}
|
|
@@ -28887,7 +28887,7 @@ var MockMemory = class extends MastraMemory {
|
|
|
28887
28887
|
} = {}) {
|
|
28888
28888
|
super({
|
|
28889
28889
|
name: "mock",
|
|
28890
|
-
storage: storage || new
|
|
28890
|
+
storage: storage || new chunkTGN66Y5K_cjs.InMemoryStore(),
|
|
28891
28891
|
options: {
|
|
28892
28892
|
...options,
|
|
28893
28893
|
workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : options?.workingMemory,
|
|
@@ -29204,5 +29204,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
|
|
|
29204
29204
|
exports.validateStepResumeData = validateStepResumeData;
|
|
29205
29205
|
exports.validateStepStateData = validateStepStateData;
|
|
29206
29206
|
exports.validateStepSuspendData = validateStepSuspendData;
|
|
29207
|
-
//# sourceMappingURL=chunk-
|
|
29208
|
-
//# sourceMappingURL=chunk-
|
|
29207
|
+
//# sourceMappingURL=chunk-ALMJLYZX.cjs.map
|
|
29208
|
+
//# sourceMappingURL=chunk-ALMJLYZX.cjs.map
|