@mastra/core 1.18.0 → 1.18.1-alpha.1
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 +26 -0
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/{chunk-KLVNQDUR.cjs → chunk-2W7R236U.cjs} +3 -3
- package/dist/chunk-2W7R236U.cjs.map +1 -0
- package/dist/{chunk-V2NQOABM.cjs → chunk-5ANYSU2W.cjs} +9 -9
- package/dist/{chunk-V2NQOABM.cjs.map → chunk-5ANYSU2W.cjs.map} +1 -1
- package/dist/{chunk-KOTSKPTF.cjs → chunk-6R5PT6ZP.cjs} +5 -5
- package/dist/{chunk-KOTSKPTF.cjs.map → chunk-6R5PT6ZP.cjs.map} +1 -1
- package/dist/{chunk-LKZQG2ZZ.cjs → chunk-6VRSFFQ4.cjs} +7 -6
- package/dist/chunk-6VRSFFQ4.cjs.map +1 -0
- package/dist/{chunk-2M3HWTRI.js → chunk-7IE4K74P.js} +4 -4
- package/dist/{chunk-2M3HWTRI.js.map → chunk-7IE4K74P.js.map} +1 -1
- package/dist/{chunk-I4ZSA3XJ.js → chunk-7V3UNILV.js} +4 -4
- package/dist/{chunk-I4ZSA3XJ.js.map → chunk-7V3UNILV.js.map} +1 -1
- package/dist/{chunk-ZRLAR66M.js → chunk-AJZQPWAV.js} +59 -19
- package/dist/chunk-AJZQPWAV.js.map +1 -0
- package/dist/{chunk-XOBRMYFA.js → chunk-BZ2MSXOF.js} +3 -3
- package/dist/chunk-BZ2MSXOF.js.map +1 -0
- package/dist/{chunk-HRT662B6.js → chunk-EAJDF6UV.js} +12 -7
- package/dist/chunk-EAJDF6UV.js.map +1 -0
- package/dist/{chunk-PWFPYJGG.cjs → chunk-EXDBQKH4.cjs} +15 -15
- package/dist/{chunk-PWFPYJGG.cjs.map → chunk-EXDBQKH4.cjs.map} +1 -1
- package/dist/{chunk-GJ62FP5X.js → chunk-HQCBFWL2.js} +18 -35
- package/dist/chunk-HQCBFWL2.js.map +1 -0
- package/dist/{chunk-UPBMT3QM.js → chunk-JTJCFEIY.js} +8 -8
- package/dist/{chunk-UPBMT3QM.js.map → chunk-JTJCFEIY.js.map} +1 -1
- package/dist/{chunk-GJIN53S6.cjs → chunk-L2GYXPJJ.cjs} +9 -9
- package/dist/{chunk-GJIN53S6.cjs.map → chunk-L2GYXPJJ.cjs.map} +1 -1
- package/dist/{chunk-2H53MD2U.cjs → chunk-LVZKPNQO.cjs} +50 -50
- package/dist/{chunk-2H53MD2U.cjs.map → chunk-LVZKPNQO.cjs.map} +1 -1
- package/dist/{chunk-MJF7NZEF.js → chunk-OLHODPXN.js} +3 -3
- package/dist/{chunk-MJF7NZEF.js.map → chunk-OLHODPXN.js.map} +1 -1
- package/dist/{chunk-6Z4GSLLO.js → chunk-OTJAMDX5.js} +3 -3
- package/dist/{chunk-6Z4GSLLO.js.map → chunk-OTJAMDX5.js.map} +1 -1
- package/dist/{chunk-EKFG6JWW.js → chunk-PB3KXPNE.js} +8 -7
- package/dist/chunk-PB3KXPNE.js.map +1 -0
- package/dist/{chunk-TVZCMQTV.cjs → chunk-QADPCUBX.cjs} +83 -82
- package/dist/chunk-QADPCUBX.cjs.map +1 -0
- package/dist/{chunk-RTBZOGTO.js → chunk-QNNFMCSE.js} +3 -3
- package/dist/{chunk-RTBZOGTO.js.map → chunk-QNNFMCSE.js.map} +1 -1
- package/dist/{chunk-7GLVV6CZ.js → chunk-RF4TETYQ.js} +4 -4
- package/dist/{chunk-7GLVV6CZ.js.map → chunk-RF4TETYQ.js.map} +1 -1
- package/dist/{chunk-XQN3BKCI.js → chunk-UJX2TJIF.js} +3 -3
- package/dist/{chunk-XQN3BKCI.js.map → chunk-UJX2TJIF.js.map} +1 -1
- package/dist/{chunk-XQRTJIC7.cjs → chunk-VEP4CV7E.cjs} +32 -3
- package/dist/chunk-VEP4CV7E.cjs.map +1 -0
- package/dist/{chunk-K7AE4BHR.js → chunk-VMBWVH4B.js} +4 -3
- package/dist/chunk-VMBWVH4B.js.map +1 -0
- package/dist/{chunk-J47RNLSY.cjs → chunk-WLNT3YJ7.cjs} +95 -55
- package/dist/chunk-WLNT3YJ7.cjs.map +1 -0
- package/dist/{chunk-L3X22YTN.cjs → chunk-WMF4CWAL.cjs} +185 -185
- package/dist/{chunk-L3X22YTN.cjs.map → chunk-WMF4CWAL.cjs.map} +1 -1
- package/dist/{chunk-4FMKWOPC.js → chunk-X4Q4KB6C.js} +31 -4
- package/dist/chunk-X4Q4KB6C.js.map +1 -0
- package/dist/{chunk-RTXCZT3M.cjs → chunk-XDZOEUNU.cjs} +19 -36
- package/dist/chunk-XDZOEUNU.cjs.map +1 -0
- package/dist/{chunk-GXXNF6NF.cjs → chunk-XNBGNCVV.cjs} +15 -10
- package/dist/chunk-XNBGNCVV.cjs.map +1 -0
- package/dist/{chunk-ZVGS2O2W.cjs → chunk-YCT2YQDL.cjs} +6 -6
- package/dist/{chunk-ZVGS2O2W.cjs.map → chunk-YCT2YQDL.cjs.map} +1 -1
- package/dist/{chunk-ZQE2VUYD.cjs → chunk-YMPV2RMB.cjs} +7 -7
- package/dist/{chunk-ZQE2VUYD.cjs.map → chunk-YMPV2RMB.cjs.map} +1 -1
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +8 -18
- package/dist/docs/assets/SOURCE_MAP.json +254 -254
- package/dist/docs/references/docs-agents-overview.md +4 -4
- package/dist/docs/references/docs-agents-processors.md +1 -1
- package/dist/docs/references/{docs-observability-datasets-overview.md → docs-evals-datasets-overview.md} +12 -12
- package/dist/docs/references/{docs-observability-datasets-running-experiments.md → docs-evals-datasets-running-experiments.md} +9 -9
- package/dist/docs/references/docs-evals-overview.md +8 -9
- package/dist/docs/references/docs-memory-observational-memory.md +20 -11
- package/dist/docs/references/docs-memory-overview.md +4 -4
- package/dist/docs/references/docs-memory-semantic-recall.md +28 -19
- package/dist/docs/references/docs-memory-storage.md +4 -4
- package/dist/docs/references/docs-rag-chunking-and-embedding.md +2 -2
- package/dist/docs/references/docs-server-auth-composite-auth.md +1 -7
- package/dist/docs/references/docs-server-auth-custom-auth-provider.md +2 -4
- package/dist/docs/references/docs-server-auth-jwt.md +1 -1
- package/dist/docs/references/docs-server-auth-simple-auth.md +1 -7
- package/dist/docs/references/docs-server-custom-adapters.md +3 -1
- package/dist/docs/references/docs-server-custom-api-routes.md +1 -1
- package/dist/docs/references/docs-server-mastra-client.md +1 -3
- package/dist/docs/references/docs-server-mastra-server.md +8 -0
- package/dist/docs/references/docs-server-request-context.md +17 -17
- package/dist/docs/references/docs-streaming-events.md +1 -90
- package/dist/docs/references/docs-studio-auth.md +142 -0
- package/dist/docs/references/docs-studio-deployment.md +260 -0
- package/dist/docs/references/docs-studio-observability.md +98 -0
- package/dist/docs/references/docs-studio-overview.md +127 -0
- package/dist/docs/references/docs-workflows-agents-and-tools.md +7 -10
- package/dist/docs/references/docs-workflows-control-flow.md +1 -1
- package/dist/docs/references/docs-workflows-overview.md +12 -7
- package/dist/docs/references/docs-workflows-suspend-and-resume.md +1 -1
- package/dist/docs/references/guides-concepts-multi-agent-systems.md +4 -4
- package/dist/docs/references/reference-agents-agent.md +1 -1
- package/dist/docs/references/reference-configuration.md +4 -4
- package/dist/docs/references/reference-memory-observational-memory.md +1 -1
- package/dist/docs/references/reference-storage-cloudflare-d1.md +1 -1
- package/dist/docs/references/reference-storage-lance.md +1 -1
- package/dist/docs/references/reference-storage-upstash.md +1 -1
- package/dist/docs/references/reference.md +16 -14
- 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/harness.d.ts.map +1 -1
- package/dist/harness/index.cjs +13 -12
- package/dist/harness/index.cjs.map +1 -1
- package/dist/harness/index.js +8 -7
- package/dist/harness/index.js.map +1 -1
- 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/llm/model/aisdk/v5/model.d.ts +5 -0
- package/dist/llm/model/aisdk/v5/model.d.ts.map +1 -1
- package/dist/llm/model/aisdk/v6/model.d.ts +5 -0
- package/dist/llm/model/aisdk/v6/model.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +5 -13
- package/dist/loop/index.cjs +14 -14
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/validation.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +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-WD6XLSFC.cjs +12 -0
- package/dist/{models-dev-5WY37RVC.cjs.map → models-dev-WD6XLSFC.cjs.map} +1 -1
- package/dist/models-dev-XG4KIUFT.js +3 -0
- package/dist/{models-dev-Y2UFJEOO.js.map → models-dev-XG4KIUFT.js.map} +1 -1
- package/dist/netlify-FMBBUFKT.cjs +12 -0
- package/dist/{netlify-ADZQ5ZNY.cjs.map → netlify-FMBBUFKT.cjs.map} +1 -1
- package/dist/netlify-NDOVF45T.js +3 -0
- package/dist/{netlify-I4AUVRO2.js.map → netlify-NDOVF45T.js.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-KHXFOGCK.js +3 -0
- package/dist/{provider-registry-C7SZ5ZT4.js.map → provider-registry-KHXFOGCK.js.map} +1 -1
- package/dist/provider-registry-VUG7E4SG.cjs +40 -0
- package/dist/{provider-registry-I5RW3MEE.cjs.map → provider-registry-VUG7E4SG.cjs.map} +1 -1
- package/dist/provider-registry.json +14 -31
- 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/aisdk/v5/compat/prepare-tools.d.ts.map +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/tools/tool-builder/builder.d.ts.map +1 -1
- package/dist/utils.cjs +31 -23
- package/dist/utils.d.ts +10 -0
- package/dist/utils.d.ts.map +1 -1
- 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/dist/workflows/workflow.d.ts.map +1 -1
- package/dist/workspace/index.cjs +68 -68
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/workspace.d.ts +1 -0
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/llm/model/provider-types.generated.d.ts +5 -13
- package/dist/chunk-4FMKWOPC.js.map +0 -1
- package/dist/chunk-EKFG6JWW.js.map +0 -1
- package/dist/chunk-GJ62FP5X.js.map +0 -1
- package/dist/chunk-GXXNF6NF.cjs.map +0 -1
- package/dist/chunk-HRT662B6.js.map +0 -1
- package/dist/chunk-J47RNLSY.cjs.map +0 -1
- package/dist/chunk-K7AE4BHR.js.map +0 -1
- package/dist/chunk-KLVNQDUR.cjs.map +0 -1
- package/dist/chunk-LKZQG2ZZ.cjs.map +0 -1
- package/dist/chunk-RTXCZT3M.cjs.map +0 -1
- package/dist/chunk-TVZCMQTV.cjs.map +0 -1
- package/dist/chunk-XOBRMYFA.js.map +0 -1
- package/dist/chunk-XQRTJIC7.cjs.map +0 -1
- package/dist/chunk-ZRLAR66M.js.map +0 -1
- package/dist/docs/references/docs-observability-logging.md +0 -99
- package/dist/docs/references/docs-observability-overview.md +0 -70
- package/dist/docs/references/docs-observability-tracing-bridges-otel.md +0 -209
- package/dist/docs/references/docs-observability-tracing-exporters-arize.md +0 -272
- package/dist/docs/references/docs-observability-tracing-exporters-braintrust.md +0 -126
- package/dist/docs/references/docs-observability-tracing-exporters-cloud.md +0 -127
- package/dist/docs/references/docs-observability-tracing-exporters-datadog.md +0 -317
- package/dist/docs/references/docs-observability-tracing-exporters-default.md +0 -209
- package/dist/docs/references/docs-observability-tracing-exporters-laminar.md +0 -100
- package/dist/docs/references/docs-observability-tracing-exporters-langfuse.md +0 -213
- package/dist/docs/references/docs-observability-tracing-exporters-langsmith.md +0 -198
- package/dist/docs/references/docs-observability-tracing-exporters-otel.md +0 -476
- package/dist/docs/references/docs-observability-tracing-exporters-posthog.md +0 -148
- package/dist/docs/references/docs-observability-tracing-overview.md +0 -1112
- package/dist/models-dev-5WY37RVC.cjs +0 -12
- package/dist/models-dev-Y2UFJEOO.js +0 -3
- package/dist/netlify-ADZQ5ZNY.cjs +0 -12
- package/dist/netlify-I4AUVRO2.js +0 -3
- package/dist/provider-registry-C7SZ5ZT4.js +0 -3
- package/dist/provider-registry-I5RW3MEE.cjs +0 -40
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkZC4FJVJZ_cjs = require('./chunk-ZC4FJVJZ.cjs');
|
|
4
4
|
var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkXNBGNCVV_cjs = require('./chunk-XNBGNCVV.cjs');
|
|
6
|
+
var chunk5ANYSU2W_cjs = require('./chunk-5ANYSU2W.cjs');
|
|
7
7
|
var chunkANLO4VM2_cjs = require('./chunk-ANLO4VM2.cjs');
|
|
8
8
|
var chunkY3APFUXZ_cjs = require('./chunk-Y3APFUXZ.cjs');
|
|
9
9
|
var chunkCFMZZDO2_cjs = require('./chunk-CFMZZDO2.cjs');
|
|
10
10
|
var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var chunkQADPCUBX_cjs = require('./chunk-QADPCUBX.cjs');
|
|
12
|
+
var chunk6VRSFFQ4_cjs = require('./chunk-6VRSFFQ4.cjs');
|
|
13
13
|
var chunk6BJ7XHRH_cjs = require('./chunk-6BJ7XHRH.cjs');
|
|
14
14
|
var chunkOQDRPRKM_cjs = require('./chunk-OQDRPRKM.cjs');
|
|
15
|
-
var
|
|
15
|
+
var chunkVEP4CV7E_cjs = require('./chunk-VEP4CV7E.cjs');
|
|
16
16
|
var chunkBF7IH4JU_cjs = require('./chunk-BF7IH4JU.cjs');
|
|
17
17
|
var chunkKJBMTK5B_cjs = require('./chunk-KJBMTK5B.cjs');
|
|
18
18
|
var chunkAV4YSAZL_cjs = require('./chunk-AV4YSAZL.cjs');
|
|
@@ -643,10 +643,16 @@ function prepareToolsAndToolChoice({
|
|
|
643
643
|
activeTools,
|
|
644
644
|
targetVersion = "v2"
|
|
645
645
|
}) {
|
|
646
|
+
if (toolChoice === "none") {
|
|
647
|
+
return {
|
|
648
|
+
tools: void 0,
|
|
649
|
+
toolChoice: { type: "none" }
|
|
650
|
+
};
|
|
651
|
+
}
|
|
646
652
|
if (Object.keys(tools || {}).length === 0) {
|
|
647
653
|
return {
|
|
648
654
|
tools: void 0,
|
|
649
|
-
toolChoice:
|
|
655
|
+
toolChoice: void 0
|
|
650
656
|
};
|
|
651
657
|
}
|
|
652
658
|
const filteredTools = activeTools != null ? Object.entries(tools || {}).filter(([name]) => activeTools.includes(name)) : Object.entries(tools || {});
|
|
@@ -2073,7 +2079,7 @@ var ProcessorRunner = class _ProcessorRunner {
|
|
|
2073
2079
|
}
|
|
2074
2080
|
const { model: _model, ...rest } = result;
|
|
2075
2081
|
if (result.model) {
|
|
2076
|
-
const resolvedModel = await
|
|
2082
|
+
const resolvedModel = await chunkQADPCUBX_cjs.resolveModelConfig(result.model);
|
|
2077
2083
|
const isSupported = isSupportedLanguageModel(resolvedModel);
|
|
2078
2084
|
if (!isSupported) {
|
|
2079
2085
|
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
@@ -5499,7 +5505,7 @@ var createTimeTravelExecutionParams = (params) => {
|
|
|
5499
5505
|
result = void 0;
|
|
5500
5506
|
}
|
|
5501
5507
|
if (result) {
|
|
5502
|
-
const formattedResult =
|
|
5508
|
+
const formattedResult = chunkVEP4CV7E_cjs.removeUndefinedValues(result);
|
|
5503
5509
|
stepResults[stepId] = formattedResult;
|
|
5504
5510
|
}
|
|
5505
5511
|
});
|
|
@@ -6057,7 +6063,7 @@ async function executeLoop(engine, params) {
|
|
|
6057
6063
|
options: {
|
|
6058
6064
|
type: "workflow_conditional_eval" /* WORKFLOW_CONDITIONAL_EVAL */,
|
|
6059
6065
|
name: `condition: '${entry.loopType}'`,
|
|
6060
|
-
input:
|
|
6066
|
+
input: chunkVEP4CV7E_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
|
|
6061
6067
|
attributes: {
|
|
6062
6068
|
conditionIndex: iteration
|
|
6063
6069
|
},
|
|
@@ -8332,6 +8338,16 @@ function isToolStep(input) {
|
|
|
8332
8338
|
function isStepParams(input) {
|
|
8333
8339
|
return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof Agent) && !(input instanceof chunkAV4YSAZL_cjs.Tool);
|
|
8334
8340
|
}
|
|
8341
|
+
function findStepInGraph(graph, stepId) {
|
|
8342
|
+
for (const entry of graph) {
|
|
8343
|
+
if ("step" in entry && entry.step?.id === stepId) return entry;
|
|
8344
|
+
if ((entry.type === "conditional" || entry.type === "parallel") && "steps" in entry) {
|
|
8345
|
+
const found = findStepInGraph(entry.steps, stepId);
|
|
8346
|
+
if (found) return found;
|
|
8347
|
+
}
|
|
8348
|
+
}
|
|
8349
|
+
return void 0;
|
|
8350
|
+
}
|
|
8335
8351
|
function createStep(params, agentOrToolOptions) {
|
|
8336
8352
|
if (isAgent(params)) {
|
|
8337
8353
|
return createStepFromAgent(params, agentOrToolOptions);
|
|
@@ -9812,7 +9828,7 @@ var Workflow = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
9812
9828
|
const { input, ...steps } = context;
|
|
9813
9829
|
let finalSteps = {};
|
|
9814
9830
|
for (const step of Object.keys(steps)) {
|
|
9815
|
-
const stepGraph = serializedStepGraph
|
|
9831
|
+
const stepGraph = findStepInGraph(serializedStepGraph, step);
|
|
9816
9832
|
finalSteps[step] = steps[step];
|
|
9817
9833
|
if (stepGraph && stepGraph?.step?.component === "WORKFLOW") {
|
|
9818
9834
|
const stepResult = steps[step];
|
|
@@ -11358,7 +11374,7 @@ var MastraScorer = class _MastraScorer {
|
|
|
11358
11374
|
}
|
|
11359
11375
|
});
|
|
11360
11376
|
}
|
|
11361
|
-
const resolvedModel = await
|
|
11377
|
+
const resolvedModel = await chunkQADPCUBX_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
|
|
11362
11378
|
const judge = new Agent({
|
|
11363
11379
|
id: "judge",
|
|
11364
11380
|
name: "judge",
|
|
@@ -11589,7 +11605,7 @@ async function runDefaultCompletionCheck(agent, context, streamContext, abortSig
|
|
|
11589
11605
|
Primitives already executed: ${completedPrimitives.join(", ")}` : "";
|
|
11590
11606
|
const completionPrompt = `
|
|
11591
11607
|
The ${context.selectedPrimitive.type} ${context.selectedPrimitive.id} has contributed to the task.
|
|
11592
|
-
This is the result: ${
|
|
11608
|
+
This is the result: ${chunkVEP4CV7E_cjs.safeStringify(context.primitiveResult)}
|
|
11593
11609
|
|
|
11594
11610
|
${completedSection}
|
|
11595
11611
|
|
|
@@ -11685,7 +11701,7 @@ async function generateFinalResult(agent, context, streamContext, abortSignal, o
|
|
|
11685
11701
|
Original task: ${context.originalTask}
|
|
11686
11702
|
|
|
11687
11703
|
The ${context.selectedPrimitive.type} ${context.selectedPrimitive.id} produced this result:
|
|
11688
|
-
${
|
|
11704
|
+
${chunkVEP4CV7E_cjs.safeStringify(context.primitiveResult)}
|
|
11689
11705
|
|
|
11690
11706
|
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.
|
|
11691
11707
|
You should evaluate if the above result is comprehensive enough to accomplish the user's original task.
|
|
@@ -11743,7 +11759,7 @@ async function generateStructuredFinalResult(agent, context, structuredOutputOpt
|
|
|
11743
11759
|
Original task: ${context.originalTask}
|
|
11744
11760
|
|
|
11745
11761
|
The ${context.selectedPrimitive.type} ${context.selectedPrimitive.id} produced this result:
|
|
11746
|
-
${
|
|
11762
|
+
${chunkVEP4CV7E_cjs.safeStringify(context.primitiveResult)}
|
|
11747
11763
|
|
|
11748
11764
|
Based on the task and result above, generate a structured response according to the provided schema.
|
|
11749
11765
|
Use the conversation history and primitive results to craft the response.
|
|
@@ -12840,7 +12856,7 @@ function createLLMExecutionStep({
|
|
|
12840
12856
|
const convertedTools = {};
|
|
12841
12857
|
for (const [name, tool2] of Object.entries(currentStep.tools)) {
|
|
12842
12858
|
if (chunkAV4YSAZL_cjs.isMastraTool(tool2)) {
|
|
12843
|
-
convertedTools[name] =
|
|
12859
|
+
convertedTools[name] = chunkVEP4CV7E_cjs.makeCoreTool(
|
|
12844
12860
|
tool2,
|
|
12845
12861
|
{
|
|
12846
12862
|
name,
|
|
@@ -13047,7 +13063,7 @@ Analyse the suspended tools: ${JSON.stringify(suspendedTools)}, using the messag
|
|
|
13047
13063
|
}
|
|
13048
13064
|
});
|
|
13049
13065
|
let transportResolver;
|
|
13050
|
-
if (currentStep.model instanceof
|
|
13066
|
+
if (currentStep.model instanceof chunkQADPCUBX_cjs.ModelRouterLanguageModel) {
|
|
13051
13067
|
const routerModel = currentStep.model;
|
|
13052
13068
|
transportResolver = () => routerModel._getStreamTransport();
|
|
13053
13069
|
}
|
|
@@ -13937,7 +13953,8 @@ function createToolCallStep({
|
|
|
13937
13953
|
args.resourceId = _internal?.resourceId;
|
|
13938
13954
|
}
|
|
13939
13955
|
}
|
|
13940
|
-
const
|
|
13956
|
+
const rawResult = await tool2.execute(args, toolOptions);
|
|
13957
|
+
const result = chunkVEP4CV7E_cjs.ensureSerializable(rawResult);
|
|
13941
13958
|
if (tool2 && "onOutput" in tool2 && typeof tool2.onOutput === "function") {
|
|
13942
13959
|
try {
|
|
13943
13960
|
await tool2.onOutput({
|
|
@@ -14794,7 +14811,7 @@ var MastraLLMVNext = class extends chunkRO47SMI7_cjs.MastraBase {
|
|
|
14794
14811
|
const remainingTokens = parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"] ?? "", 10);
|
|
14795
14812
|
if (!isNaN(remainingTokens) && remainingTokens > 0 && remainingTokens < 2e3) {
|
|
14796
14813
|
this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
|
|
14797
|
-
await
|
|
14814
|
+
await chunkVEP4CV7E_cjs.delay(10 * 1e3);
|
|
14798
14815
|
}
|
|
14799
14816
|
},
|
|
14800
14817
|
onFinish: async (props) => {
|
|
@@ -18462,7 +18479,16 @@ function createMapResultsStep({
|
|
|
18462
18479
|
...modelId && { modelId }
|
|
18463
18480
|
});
|
|
18464
18481
|
}
|
|
18465
|
-
|
|
18482
|
+
const error = payload.error instanceof Error ? payload.error : new chunk4U7ZLI36_cjs.MastraError(
|
|
18483
|
+
{
|
|
18484
|
+
id: "AGENT_STREAM_ERROR",
|
|
18485
|
+
domain: "AGENT" /* AGENT */,
|
|
18486
|
+
category: "SYSTEM" /* SYSTEM */,
|
|
18487
|
+
details: { runId }
|
|
18488
|
+
},
|
|
18489
|
+
payload.error
|
|
18490
|
+
);
|
|
18491
|
+
agentSpan?.error({ error, endSpan: true });
|
|
18466
18492
|
return;
|
|
18467
18493
|
}
|
|
18468
18494
|
const aborted = options.abortSignal?.aborted;
|
|
@@ -18490,7 +18516,19 @@ function createMapResultsStep({
|
|
|
18490
18516
|
error: e,
|
|
18491
18517
|
runId
|
|
18492
18518
|
});
|
|
18519
|
+
const spanError = e instanceof Error ? e : new chunk4U7ZLI36_cjs.MastraError(
|
|
18520
|
+
{
|
|
18521
|
+
id: "AGENT_ON_FINISH_ERROR",
|
|
18522
|
+
domain: "AGENT" /* AGENT */,
|
|
18523
|
+
category: "SYSTEM" /* SYSTEM */,
|
|
18524
|
+
details: { runId }
|
|
18525
|
+
},
|
|
18526
|
+
e
|
|
18527
|
+
);
|
|
18528
|
+
agentSpan?.error({ error: spanError, endSpan: true });
|
|
18493
18529
|
}
|
|
18530
|
+
} else {
|
|
18531
|
+
agentSpan?.end();
|
|
18494
18532
|
}
|
|
18495
18533
|
await options?.onFinish?.({
|
|
18496
18534
|
...payload,
|
|
@@ -19858,7 +19896,7 @@ ${errorMessages}`,
|
|
|
19858
19896
|
*/
|
|
19859
19897
|
listTools({ requestContext = new chunk5WBEMKE2_cjs.RequestContext() } = {}) {
|
|
19860
19898
|
if (typeof this.#tools !== "function") {
|
|
19861
|
-
return
|
|
19899
|
+
return chunkVEP4CV7E_cjs.ensureToolProperties(this.#tools);
|
|
19862
19900
|
}
|
|
19863
19901
|
const result = this.#tools({
|
|
19864
19902
|
requestContext,
|
|
@@ -19879,7 +19917,7 @@ ${errorMessages}`,
|
|
|
19879
19917
|
this.logger.error(mastraError.toString());
|
|
19880
19918
|
throw mastraError;
|
|
19881
19919
|
}
|
|
19882
|
-
return
|
|
19920
|
+
return chunkVEP4CV7E_cjs.ensureToolProperties(tools);
|
|
19883
19921
|
});
|
|
19884
19922
|
}
|
|
19885
19923
|
/**
|
|
@@ -19928,7 +19966,7 @@ ${errorMessages}`,
|
|
|
19928
19966
|
});
|
|
19929
19967
|
});
|
|
19930
19968
|
} else {
|
|
19931
|
-
llm = new
|
|
19969
|
+
llm = new chunk6VRSFFQ4_cjs.MastraLLMV1({
|
|
19932
19970
|
model: modelInfo,
|
|
19933
19971
|
mastra: this.#mastra,
|
|
19934
19972
|
options: { tracingPolicy: this.#options?.tracingPolicy }
|
|
@@ -19954,7 +19992,7 @@ ${errorMessages}`,
|
|
|
19954
19992
|
*/
|
|
19955
19993
|
async resolveModelConfig(modelConfig, requestContext) {
|
|
19956
19994
|
try {
|
|
19957
|
-
return await
|
|
19995
|
+
return await chunkQADPCUBX_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
|
|
19958
19996
|
} catch (error) {
|
|
19959
19997
|
const mastraError = new chunk4U7ZLI36_cjs.MastraError({
|
|
19960
19998
|
id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
|
|
@@ -20443,7 +20481,7 @@ ${errorMessages}`,
|
|
|
20443
20481
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20444
20482
|
requireApproval: toolObj.requireApproval
|
|
20445
20483
|
};
|
|
20446
|
-
const convertedToCoreTool =
|
|
20484
|
+
const convertedToCoreTool = chunkVEP4CV7E_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
20447
20485
|
convertedMemoryTools[toolName] = convertedToCoreTool;
|
|
20448
20486
|
}
|
|
20449
20487
|
}
|
|
@@ -20472,7 +20510,7 @@ ${errorMessages}`,
|
|
|
20472
20510
|
if (!workspace) {
|
|
20473
20511
|
return convertedWorkspaceTools;
|
|
20474
20512
|
}
|
|
20475
|
-
const workspaceTools =
|
|
20513
|
+
const workspaceTools = chunkXNBGNCVV_cjs.createWorkspaceTools(workspace);
|
|
20476
20514
|
if (Object.keys(workspaceTools).length > 0) {
|
|
20477
20515
|
this.logger.debug(`[Agent:${this.name}] - Adding workspace tools: ${Object.keys(workspaceTools).join(", ")}`, {
|
|
20478
20516
|
runId
|
|
@@ -20495,7 +20533,7 @@ ${errorMessages}`,
|
|
|
20495
20533
|
requireApproval: toolObj.requireApproval,
|
|
20496
20534
|
workspace
|
|
20497
20535
|
};
|
|
20498
|
-
const convertedToCoreTool =
|
|
20536
|
+
const convertedToCoreTool = chunkVEP4CV7E_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
20499
20537
|
convertedWorkspaceTools[toolName] = convertedToCoreTool;
|
|
20500
20538
|
}
|
|
20501
20539
|
}
|
|
@@ -20526,7 +20564,7 @@ ${errorMessages}`,
|
|
|
20526
20564
|
if (!workspace?.skills) {
|
|
20527
20565
|
return convertedSkillTools;
|
|
20528
20566
|
}
|
|
20529
|
-
const skillTools =
|
|
20567
|
+
const skillTools = chunkXNBGNCVV_cjs.createSkillTools(workspace.skills);
|
|
20530
20568
|
if (Object.keys(skillTools).length > 0) {
|
|
20531
20569
|
this.logger.debug(`[Agent:${this.name}] - Adding skill tools: ${Object.keys(skillTools).join(", ")}`, {
|
|
20532
20570
|
runId
|
|
@@ -20550,7 +20588,7 @@ ${errorMessages}`,
|
|
|
20550
20588
|
// Skill tools never require approval
|
|
20551
20589
|
workspace
|
|
20552
20590
|
};
|
|
20553
|
-
const convertedToCoreTool =
|
|
20591
|
+
const convertedToCoreTool = chunkVEP4CV7E_cjs.makeCoreTool(toolObj, options, void 0, autoResumeSuspendedTools);
|
|
20554
20592
|
convertedSkillTools[toolName] = convertedToCoreTool;
|
|
20555
20593
|
}
|
|
20556
20594
|
}
|
|
@@ -20767,7 +20805,7 @@ ${errorMessages}`,
|
|
|
20767
20805
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20768
20806
|
requireApproval: tool2.requireApproval
|
|
20769
20807
|
};
|
|
20770
|
-
return [k,
|
|
20808
|
+
return [k, chunkVEP4CV7E_cjs.makeCoreTool(tool2, options, void 0, autoResumeSuspendedTools)];
|
|
20771
20809
|
})
|
|
20772
20810
|
);
|
|
20773
20811
|
const assignedToolEntriesConverted = Object.fromEntries(
|
|
@@ -20819,7 +20857,7 @@ ${errorMessages}`,
|
|
|
20819
20857
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20820
20858
|
requireApproval: toolObj.requireApproval
|
|
20821
20859
|
};
|
|
20822
|
-
const convertedToCoreTool =
|
|
20860
|
+
const convertedToCoreTool = chunkVEP4CV7E_cjs.makeCoreTool(toolObj, options, "toolset", autoResumeSuspendedTools);
|
|
20823
20861
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
20824
20862
|
}
|
|
20825
20863
|
}
|
|
@@ -20866,7 +20904,7 @@ ${errorMessages}`,
|
|
|
20866
20904
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
20867
20905
|
requireApproval: tool2.requireApproval
|
|
20868
20906
|
};
|
|
20869
|
-
const convertedToCoreTool =
|
|
20907
|
+
const convertedToCoreTool = chunkVEP4CV7E_cjs.makeCoreTool(toolRest, options, "client-tool", autoResumeSuspendedTools);
|
|
20870
20908
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
20871
20909
|
}
|
|
20872
20910
|
}
|
|
@@ -21139,10 +21177,7 @@ ${effectiveInstructions}`;
|
|
|
21139
21177
|
this.logger.error(`[Agent:${this.name}] - messageFilter error: ${filterError}`);
|
|
21140
21178
|
}
|
|
21141
21179
|
}
|
|
21142
|
-
const messagesForSubAgent = [
|
|
21143
|
-
...filteredContextMessages,
|
|
21144
|
-
{ role: "user", content: effectivePrompt }
|
|
21145
|
-
];
|
|
21180
|
+
const messagesForSubAgent = [{ role: "user", content: effectivePrompt }];
|
|
21146
21181
|
const subAgentPromptCreatedAt = /* @__PURE__ */ new Date();
|
|
21147
21182
|
if ((methodType === "generate" || methodType === "generateLegacy") && supportedLanguageModelSpecifications.includes(modelVersion)) {
|
|
21148
21183
|
const generateResult = resumeData ? await agent.resumeGenerate(resumeData, {
|
|
@@ -21151,6 +21186,7 @@ ${effectiveInstructions}`;
|
|
|
21151
21186
|
...chunkBF7IH4JU_cjs.resolveObservabilityContext(context ?? {}),
|
|
21152
21187
|
...effectiveInstructions && { instructions: effectiveInstructions },
|
|
21153
21188
|
...effectiveMaxSteps && { maxSteps: effectiveMaxSteps },
|
|
21189
|
+
context: filteredContextMessages,
|
|
21154
21190
|
...resourceId && threadId && !subAgentHasOwnMemoryConfig ? {
|
|
21155
21191
|
memory: {
|
|
21156
21192
|
resource: subAgentResourceId,
|
|
@@ -21163,6 +21199,7 @@ ${effectiveInstructions}`;
|
|
|
21163
21199
|
...chunkBF7IH4JU_cjs.resolveObservabilityContext(context ?? {}),
|
|
21164
21200
|
...effectiveInstructions && { instructions: effectiveInstructions },
|
|
21165
21201
|
...effectiveMaxSteps && { maxSteps: effectiveMaxSteps },
|
|
21202
|
+
context: filteredContextMessages,
|
|
21166
21203
|
...resourceId && threadId && !subAgentHasOwnMemoryConfig ? {
|
|
21167
21204
|
memory: {
|
|
21168
21205
|
resource: subAgentResourceId,
|
|
@@ -21224,7 +21261,8 @@ ${effectiveInstructions}`;
|
|
|
21224
21261
|
} else if (methodType === "generate" && modelVersion === "v1") {
|
|
21225
21262
|
const generateResult = await agent.generateLegacy(messagesForSubAgent, {
|
|
21226
21263
|
requestContext,
|
|
21227
|
-
...chunkBF7IH4JU_cjs.resolveObservabilityContext(context ?? {})
|
|
21264
|
+
...chunkBF7IH4JU_cjs.resolveObservabilityContext(context ?? {}),
|
|
21265
|
+
context: filteredContextMessages
|
|
21228
21266
|
});
|
|
21229
21267
|
result = { text: generateResult.text };
|
|
21230
21268
|
} else if ((methodType === "stream" || methodType === "streamLegacy") && supportedLanguageModelSpecifications.includes(modelVersion)) {
|
|
@@ -21234,6 +21272,7 @@ ${effectiveInstructions}`;
|
|
|
21234
21272
|
...chunkBF7IH4JU_cjs.resolveObservabilityContext(context ?? {}),
|
|
21235
21273
|
...effectiveInstructions && { instructions: effectiveInstructions },
|
|
21236
21274
|
...effectiveMaxSteps && { maxSteps: effectiveMaxSteps },
|
|
21275
|
+
context: filteredContextMessages,
|
|
21237
21276
|
...resourceId && threadId && !subAgentHasOwnMemoryConfig ? {
|
|
21238
21277
|
memory: {
|
|
21239
21278
|
resource: subAgentResourceId,
|
|
@@ -21248,6 +21287,7 @@ ${effectiveInstructions}`;
|
|
|
21248
21287
|
...chunkBF7IH4JU_cjs.resolveObservabilityContext(context ?? {}),
|
|
21249
21288
|
...effectiveInstructions && { instructions: effectiveInstructions },
|
|
21250
21289
|
...effectiveMaxSteps && { maxSteps: effectiveMaxSteps },
|
|
21290
|
+
context: filteredContextMessages,
|
|
21251
21291
|
...resourceId && threadId && !subAgentHasOwnMemoryConfig ? {
|
|
21252
21292
|
memory: {
|
|
21253
21293
|
resource: subAgentResourceId,
|
|
@@ -21529,7 +21569,7 @@ ${effectiveInstructions}`;
|
|
|
21529
21569
|
...observabilityContext,
|
|
21530
21570
|
tracingPolicy: this.#options?.tracingPolicy
|
|
21531
21571
|
};
|
|
21532
|
-
convertedAgentTools[`agent-${agentName}`] =
|
|
21572
|
+
convertedAgentTools[`agent-${agentName}`] = chunkVEP4CV7E_cjs.makeCoreTool(
|
|
21533
21573
|
toolObj,
|
|
21534
21574
|
options,
|
|
21535
21575
|
void 0,
|
|
@@ -21746,7 +21786,7 @@ ${effectiveInstructions}`;
|
|
|
21746
21786
|
...observabilityContext,
|
|
21747
21787
|
tracingPolicy: this.#options?.tracingPolicy
|
|
21748
21788
|
};
|
|
21749
|
-
convertedWorkflowTools[`workflow-${workflowName}`] =
|
|
21789
|
+
convertedWorkflowTools[`workflow-${workflowName}`] = chunkVEP4CV7E_cjs.makeCoreTool(
|
|
21750
21790
|
toolObj,
|
|
21751
21791
|
options,
|
|
21752
21792
|
void 0,
|
|
@@ -21778,7 +21818,7 @@ ${effectiveInstructions}`;
|
|
|
21778
21818
|
let mastraProxy = void 0;
|
|
21779
21819
|
const logger = this.logger;
|
|
21780
21820
|
if (this.#mastra) {
|
|
21781
|
-
mastraProxy =
|
|
21821
|
+
mastraProxy = chunkVEP4CV7E_cjs.createMastraProxy({ mastra: this.#mastra, logger });
|
|
21782
21822
|
}
|
|
21783
21823
|
const assignedTools = await this.listAssignedTools({
|
|
21784
21824
|
runId,
|
|
@@ -22030,7 +22070,7 @@ ${effectiveInstructions}`;
|
|
|
22030
22070
|
const resolvedModel = await this.resolveModelConfig(selection, requestContext);
|
|
22031
22071
|
this.assertSupportsPreparedModels(resolvedModel);
|
|
22032
22072
|
let headers;
|
|
22033
|
-
if (resolvedModel instanceof
|
|
22073
|
+
if (resolvedModel instanceof chunkQADPCUBX_cjs.ModelRouterLanguageModel) {
|
|
22034
22074
|
headers = resolvedModel.config?.headers;
|
|
22035
22075
|
}
|
|
22036
22076
|
return [
|
|
@@ -22063,7 +22103,7 @@ ${effectiveInstructions}`;
|
|
|
22063
22103
|
throw mastraError;
|
|
22064
22104
|
}
|
|
22065
22105
|
let headers;
|
|
22066
|
-
if (model instanceof
|
|
22106
|
+
if (model instanceof chunkQADPCUBX_cjs.ModelRouterLanguageModel) {
|
|
22067
22107
|
headers = model.config?.headers;
|
|
22068
22108
|
}
|
|
22069
22109
|
return {
|
|
@@ -22517,7 +22557,7 @@ ${effectiveInstructions}`;
|
|
|
22517
22557
|
const defaultOptions = await this.getDefaultOptions({
|
|
22518
22558
|
requestContext: options?.requestContext
|
|
22519
22559
|
});
|
|
22520
|
-
const mergedOptions =
|
|
22560
|
+
const mergedOptions = chunkVEP4CV7E_cjs.deepMerge(
|
|
22521
22561
|
defaultOptions,
|
|
22522
22562
|
options ?? {}
|
|
22523
22563
|
);
|
|
@@ -22587,7 +22627,7 @@ ${effectiveInstructions}`;
|
|
|
22587
22627
|
const defaultOptions = await this.getDefaultOptions({
|
|
22588
22628
|
requestContext: streamOptions?.requestContext
|
|
22589
22629
|
});
|
|
22590
|
-
const mergedOptions =
|
|
22630
|
+
const mergedOptions = chunkVEP4CV7E_cjs.deepMerge(
|
|
22591
22631
|
defaultOptions,
|
|
22592
22632
|
streamOptions ?? {}
|
|
22593
22633
|
);
|
|
@@ -22651,7 +22691,7 @@ ${effectiveInstructions}`;
|
|
|
22651
22691
|
const defaultOptions = await this.getDefaultOptions({
|
|
22652
22692
|
requestContext: streamOptions?.requestContext
|
|
22653
22693
|
});
|
|
22654
|
-
let mergedStreamOptions =
|
|
22694
|
+
let mergedStreamOptions = chunkVEP4CV7E_cjs.deepMerge(
|
|
22655
22695
|
defaultOptions,
|
|
22656
22696
|
streamOptions ?? {}
|
|
22657
22697
|
);
|
|
@@ -22716,7 +22756,7 @@ ${effectiveInstructions}`;
|
|
|
22716
22756
|
const defaultOptions = await this.getDefaultOptions({
|
|
22717
22757
|
requestContext: options?.requestContext
|
|
22718
22758
|
});
|
|
22719
|
-
const mergedOptions =
|
|
22759
|
+
const mergedOptions = chunkVEP4CV7E_cjs.deepMerge(
|
|
22720
22760
|
defaultOptions,
|
|
22721
22761
|
options ?? {}
|
|
22722
22762
|
);
|
|
@@ -24290,7 +24330,7 @@ var TokenLimiterProcessor = class _TokenLimiterProcessor {
|
|
|
24290
24330
|
return new TiktokenClass(this.customEncoding);
|
|
24291
24331
|
});
|
|
24292
24332
|
} else {
|
|
24293
|
-
this.encoderPromise =
|
|
24333
|
+
this.encoderPromise = chunkXNBGNCVV_cjs.getTiktoken();
|
|
24294
24334
|
}
|
|
24295
24335
|
}
|
|
24296
24336
|
return this.encoderPromise;
|
|
@@ -25185,7 +25225,7 @@ var ToolSearchProcessor = class {
|
|
|
25185
25225
|
minScore: options.search?.minScore ?? 0
|
|
25186
25226
|
};
|
|
25187
25227
|
this.ttl = options.ttl ?? 36e5;
|
|
25188
|
-
this.bm25Index = new
|
|
25228
|
+
this.bm25Index = new chunkXNBGNCVV_cjs.BM25Index({}, TOOL_SEARCH_TOKENIZE_OPTIONS);
|
|
25189
25229
|
this.indexTools();
|
|
25190
25230
|
if (this.ttl > 0) {
|
|
25191
25231
|
this.scheduleCleanup();
|
|
@@ -25967,7 +26007,7 @@ var WorkingMemory = class {
|
|
|
25967
26007
|
return messageList;
|
|
25968
26008
|
}
|
|
25969
26009
|
generateEmptyFromSchemaInternal(schema) {
|
|
25970
|
-
const result =
|
|
26010
|
+
const result = chunkVEP4CV7E_cjs.generateEmptyFromSchema(schema);
|
|
25971
26011
|
return Object.keys(result).length > 0 ? result : null;
|
|
25972
26012
|
}
|
|
25973
26013
|
getWorkingMemoryToolInstruction({
|
|
@@ -26612,7 +26652,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
26612
26652
|
);
|
|
26613
26653
|
}
|
|
26614
26654
|
if (typeof config.embedder === "string") {
|
|
26615
|
-
this.embedder = new
|
|
26655
|
+
this.embedder = new chunkQADPCUBX_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
26616
26656
|
} else {
|
|
26617
26657
|
this.embedder = config.embedder;
|
|
26618
26658
|
}
|
|
@@ -26625,7 +26665,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
26625
26665
|
}
|
|
26626
26666
|
if (config.embedder) {
|
|
26627
26667
|
if (typeof config.embedder === "string") {
|
|
26628
|
-
this.embedder = new
|
|
26668
|
+
this.embedder = new chunkQADPCUBX_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
26629
26669
|
} else {
|
|
26630
26670
|
this.embedder = config.embedder;
|
|
26631
26671
|
}
|
|
@@ -26665,7 +26705,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
26665
26705
|
}
|
|
26666
26706
|
setEmbedder(embedder, embedderOptions) {
|
|
26667
26707
|
if (typeof embedder === "string") {
|
|
26668
|
-
this.embedder = new
|
|
26708
|
+
this.embedder = new chunkQADPCUBX_cjs.ModelRouterEmbeddingModel(embedder);
|
|
26669
26709
|
} else {
|
|
26670
26710
|
this.embedder = embedder;
|
|
26671
26711
|
}
|
|
@@ -26762,7 +26802,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
26762
26802
|
"The threads.generateTitle option has been moved. Use the top-level generateTitle option instead."
|
|
26763
26803
|
);
|
|
26764
26804
|
}
|
|
26765
|
-
const mergedConfig =
|
|
26805
|
+
const mergedConfig = chunkVEP4CV7E_cjs.deepMerge(this.threadConfig, config || {});
|
|
26766
26806
|
if (typeof config?.workingMemory === "object" && config.workingMemory?.schema && typeof mergedConfig.workingMemory === "object") {
|
|
26767
26807
|
mergedConfig.workingMemory.schema = config.workingMemory.schema;
|
|
26768
26808
|
}
|
|
@@ -27114,7 +27154,7 @@ var MockMemory = class extends MastraMemory {
|
|
|
27114
27154
|
} = {}) {
|
|
27115
27155
|
super({
|
|
27116
27156
|
name: "mock",
|
|
27117
|
-
storage: storage || new
|
|
27157
|
+
storage: storage || new chunk5ANYSU2W_cjs.InMemoryStore(),
|
|
27118
27158
|
options: {
|
|
27119
27159
|
...options,
|
|
27120
27160
|
workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : options?.workingMemory,
|
|
@@ -27425,5 +27465,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
|
|
|
27425
27465
|
exports.validateStepResumeData = validateStepResumeData;
|
|
27426
27466
|
exports.validateStepStateData = validateStepStateData;
|
|
27427
27467
|
exports.validateStepSuspendData = validateStepSuspendData;
|
|
27428
|
-
//# sourceMappingURL=chunk-
|
|
27429
|
-
//# sourceMappingURL=chunk-
|
|
27468
|
+
//# sourceMappingURL=chunk-WLNT3YJ7.cjs.map
|
|
27469
|
+
//# sourceMappingURL=chunk-WLNT3YJ7.cjs.map
|