@mastra/core 1.1.0-alpha.0 → 1.1.0-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/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-Z3XVFOTH.js → chunk-64LMKFD3.js} +4 -4
- package/dist/{chunk-Z3XVFOTH.js.map → chunk-64LMKFD3.js.map} +1 -1
- package/dist/{chunk-WBJMSOYD.cjs → chunk-66462UTX.cjs} +192 -140
- package/dist/chunk-66462UTX.cjs.map +1 -0
- package/dist/{chunk-N2FELMHU.cjs → chunk-BKUNHQZ4.cjs} +57 -24
- package/dist/chunk-BKUNHQZ4.cjs.map +1 -0
- package/dist/{chunk-DXTYXWYM.cjs → chunk-C6YO523J.cjs} +7 -7
- package/dist/{chunk-DXTYXWYM.cjs.map → chunk-C6YO523J.cjs.map} +1 -1
- package/dist/{chunk-OZFBUMI3.cjs → chunk-EZWVMAC6.cjs} +7 -7
- package/dist/{chunk-OZFBUMI3.cjs.map → chunk-EZWVMAC6.cjs.map} +1 -1
- package/dist/{chunk-ACEGVEZF.js → chunk-H4C5NORS.js} +66 -46
- package/dist/chunk-H4C5NORS.js.map +1 -0
- package/dist/{chunk-5VWOGZLE.js → chunk-HKD4NSHR.js} +49 -16
- package/dist/chunk-HKD4NSHR.js.map +1 -0
- package/dist/{chunk-3CXWVB55.cjs → chunk-IKS5Z56O.cjs} +39 -36
- package/dist/{chunk-3CXWVB55.cjs.map → chunk-IKS5Z56O.cjs.map} +1 -1
- package/dist/{chunk-YETWOFQL.js → chunk-KPIJA2R5.js} +21 -31
- package/dist/chunk-KPIJA2R5.js.map +1 -0
- package/dist/{chunk-XSRROONT.cjs → chunk-LMNHODU4.cjs} +5 -5
- package/dist/{chunk-XSRROONT.cjs.map → chunk-LMNHODU4.cjs.map} +1 -1
- package/dist/{chunk-ZZCLGEMJ.js → chunk-NVRAVZZM.js} +192 -139
- package/dist/chunk-NVRAVZZM.js.map +1 -0
- package/dist/{chunk-6FHHT22W.cjs → chunk-O7II2PSR.cjs} +44 -44
- package/dist/{chunk-6FHHT22W.cjs.map → chunk-O7II2PSR.cjs.map} +1 -1
- package/dist/{chunk-ARMHYWF5.js → chunk-QT56V3PE.js} +4 -4
- package/dist/{chunk-ARMHYWF5.js.map → chunk-QT56V3PE.js.map} +1 -1
- package/dist/{chunk-TV4DA7RI.cjs → chunk-RIPKI7ON.cjs} +21 -31
- package/dist/chunk-RIPKI7ON.cjs.map +1 -0
- package/dist/{chunk-5BEYS33K.js → chunk-RQGER4J4.js} +3 -3
- package/dist/{chunk-5BEYS33K.js.map → chunk-RQGER4J4.js.map} +1 -1
- package/dist/{chunk-REH5FX2O.js → chunk-SFICZTYL.js} +28 -25
- package/dist/chunk-SFICZTYL.js.map +1 -0
- package/dist/{chunk-CEYA6FNF.js → chunk-SJUNV5AS.js} +3 -3
- package/dist/{chunk-CEYA6FNF.js.map → chunk-SJUNV5AS.js.map} +1 -1
- package/dist/{chunk-ETSBNSRY.cjs → chunk-TO7IB5JE.cjs} +17 -9
- package/dist/chunk-TO7IB5JE.cjs.map +1 -0
- package/dist/{chunk-QGVPEZ5T.js → chunk-UJRSZGKO.js} +16 -8
- package/dist/chunk-UJRSZGKO.js.map +1 -0
- package/dist/{chunk-RFTFSXJY.cjs → chunk-YSFYUEEG.cjs} +72 -52
- package/dist/chunk-YSFYUEEG.cjs.map +1 -0
- package/dist/docs/README.md +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/SOURCE_MAP.json +271 -271
- package/dist/docs/agents/01-overview.md +2 -2
- package/dist/docs/evals/01-overview.md +5 -5
- package/dist/docs/mcp/01-overview.md +2 -2
- package/dist/docs/observability/01-overview.md +1 -1
- package/dist/docs/observability/03-overview.md +3 -3
- package/dist/docs/rag/01-overview.md +1 -1
- package/dist/docs/tools-mcp/01-mcp-overview.md +2 -2
- package/dist/docs/voice/01-overview.md +1 -1
- package/dist/docs/workflows/01-overview.md +5 -5
- package/dist/docs/workspace/01-overview.md +32 -29
- package/dist/docs/workspace/02-filesystem.md +13 -0
- package/dist/docs/workspace/03-sandbox.md +11 -4
- package/dist/docs/workspace/05-search.md +1 -1
- package/dist/docs/workspace/06-reference.md +304 -12
- package/dist/evals/index.cjs +20 -20
- 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/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +9 -9
- package/dist/llm/index.js +2 -2
- package/dist/llm/model/provider-types.generated.d.ts +6 -2
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +3 -3
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +11 -11
- package/dist/memory/index.js +1 -1
- package/dist/processors/index.cjs +40 -40
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-JZ6QRIVL.cjs +40 -0
- package/dist/{provider-registry-63ZEAPKK.cjs.map → provider-registry-JZ6QRIVL.cjs.map} +1 -1
- package/dist/provider-registry-SQTJTKSM.js +3 -0
- package/dist/{provider-registry-4RA5NQGH.js.map → provider-registry-SQTJTKSM.js.map} +1 -1
- package/dist/provider-registry.json +14 -6
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/constants.cjs +16 -16
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/agents/base.d.ts +17 -23
- package/dist/storage/domains/agents/base.d.ts.map +1 -1
- package/dist/storage/domains/agents/inmemory.d.ts +1 -1
- package/dist/storage/domains/agents/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +101 -101
- package/dist/storage/index.js +2 -2
- package/dist/storage/types.d.ts +53 -37
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.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/workspace/index.cjs +32 -32
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/skills/schemas.d.ts +17 -47
- package/dist/workspace/skills/schemas.d.ts.map +1 -1
- package/dist/workspace/skills/types.d.ts +4 -4
- package/dist/workspace/skills/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/llm/model/provider-types.generated.d.ts +6 -2
- package/dist/chunk-5VWOGZLE.js.map +0 -1
- package/dist/chunk-ACEGVEZF.js.map +0 -1
- package/dist/chunk-ETSBNSRY.cjs.map +0 -1
- package/dist/chunk-N2FELMHU.cjs.map +0 -1
- package/dist/chunk-QGVPEZ5T.js.map +0 -1
- package/dist/chunk-REH5FX2O.js.map +0 -1
- package/dist/chunk-RFTFSXJY.cjs.map +0 -1
- package/dist/chunk-TV4DA7RI.cjs.map +0 -1
- package/dist/chunk-WBJMSOYD.cjs.map +0 -1
- package/dist/chunk-YETWOFQL.js.map +0 -1
- package/dist/chunk-ZZCLGEMJ.js.map +0 -1
- package/dist/provider-registry-4RA5NQGH.js +0 -3
- package/dist/provider-registry-63ZEAPKK.cjs +0 -40
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk66462UTX_cjs = require('./chunk-66462UTX.cjs');
|
|
4
4
|
var chunk6FG6FU5Y_cjs = require('./chunk-6FG6FU5Y.cjs');
|
|
5
5
|
var chunkLJOQ7WYC_cjs = require('./chunk-LJOQ7WYC.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkYSFYUEEG_cjs = require('./chunk-YSFYUEEG.cjs');
|
|
7
7
|
var chunkIUODLQMU_cjs = require('./chunk-IUODLQMU.cjs');
|
|
8
8
|
var chunkZIEQA3YP_cjs = require('./chunk-ZIEQA3YP.cjs');
|
|
9
9
|
var chunkPM3UIIBK_cjs = require('./chunk-PM3UIIBK.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkLMNHODU4_cjs = require('./chunk-LMNHODU4.cjs');
|
|
11
11
|
var chunkKNPIRLQQ_cjs = require('./chunk-KNPIRLQQ.cjs');
|
|
12
12
|
var chunk6BJ7XHRH_cjs = require('./chunk-6BJ7XHRH.cjs');
|
|
13
13
|
var chunk4D4KB75Y_cjs = require('./chunk-4D4KB75Y.cjs');
|
|
@@ -1827,7 +1827,7 @@ var ProcessorRunner = class _ProcessorRunner {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
const { model: _model, ...rest } = result;
|
|
1829
1829
|
if (result.model) {
|
|
1830
|
-
const resolvedModel = await
|
|
1830
|
+
const resolvedModel = await chunkLMNHODU4_cjs.resolveModelConfig(result.model);
|
|
1831
1831
|
const isSupported = isSupportedLanguageModel(resolvedModel);
|
|
1832
1832
|
if (!isSupported) {
|
|
1833
1833
|
throw new chunk4U7ZLI36_cjs.MastraError({
|
|
@@ -12682,7 +12682,7 @@ var MastraScorer = class _MastraScorer {
|
|
|
12682
12682
|
}
|
|
12683
12683
|
});
|
|
12684
12684
|
}
|
|
12685
|
-
const resolvedModel = await
|
|
12685
|
+
const resolvedModel = await chunkLMNHODU4_cjs.resolveModelConfig(modelConfig, void 0, this.#mastra);
|
|
12686
12686
|
const judge = new Agent({
|
|
12687
12687
|
id: "judge",
|
|
12688
12688
|
name: "judge",
|
|
@@ -14242,17 +14242,19 @@ async function createNetworkLoop({
|
|
|
14242
14242
|
let input;
|
|
14243
14243
|
try {
|
|
14244
14244
|
input = JSON.parse(inputData.prompt);
|
|
14245
|
-
} catch
|
|
14246
|
-
const
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
domain: "AGENT_NETWORK" /* AGENT_NETWORK */,
|
|
14250
|
-
category: "USER" /* USER */,
|
|
14251
|
-
text: `Invalid task input: ${inputData.task}`
|
|
14252
|
-
},
|
|
14253
|
-
e
|
|
14245
|
+
} catch {
|
|
14246
|
+
const logger = mastra?.getLogger();
|
|
14247
|
+
logger?.warn(
|
|
14248
|
+
`Workflow execution step received invalid JSON prompt for workflow "${inputData.primitiveId}". Prompt was: "${inputData.prompt}". Returning error to routing agent for retry.`
|
|
14254
14249
|
);
|
|
14255
|
-
|
|
14250
|
+
return {
|
|
14251
|
+
task: inputData.task,
|
|
14252
|
+
primitiveId: inputData.primitiveId,
|
|
14253
|
+
primitiveType: inputData.primitiveType,
|
|
14254
|
+
result: `Error: The prompt provided for workflow "${inputData.primitiveId}" is not valid JSON. Received: "${inputData.prompt}". Workflows require a valid JSON string matching their input schema. Please provide the prompt as properly formatted JSON (e.g., {"key": "value"}).`,
|
|
14255
|
+
isComplete: false,
|
|
14256
|
+
iteration: inputData.iteration
|
|
14257
|
+
};
|
|
14256
14258
|
}
|
|
14257
14259
|
const stepId = generateId2({
|
|
14258
14260
|
idType: "step",
|
|
@@ -14539,17 +14541,18 @@ async function createNetworkLoop({
|
|
|
14539
14541
|
let inputDataToUse;
|
|
14540
14542
|
try {
|
|
14541
14543
|
inputDataToUse = JSON.parse(inputData.prompt);
|
|
14542
|
-
} catch
|
|
14543
|
-
|
|
14544
|
-
{
|
|
14545
|
-
id: "AGENT_NETWORK_TOOL_EXECUTION_STEP_INVALID_TASK_INPUT",
|
|
14546
|
-
domain: "AGENT_NETWORK" /* AGENT_NETWORK */,
|
|
14547
|
-
category: "USER" /* USER */,
|
|
14548
|
-
text: `Invalid task input: ${inputData.task}`
|
|
14549
|
-
},
|
|
14550
|
-
e
|
|
14544
|
+
} catch {
|
|
14545
|
+
logger?.warn(
|
|
14546
|
+
`Tool execution step received invalid JSON prompt for tool "${toolId}". Prompt was: "${inputData.prompt}". Returning error to routing agent for retry.`
|
|
14551
14547
|
);
|
|
14552
|
-
|
|
14548
|
+
return {
|
|
14549
|
+
task: inputData.task,
|
|
14550
|
+
primitiveId: inputData.primitiveId,
|
|
14551
|
+
primitiveType: inputData.primitiveType,
|
|
14552
|
+
result: `Error: The prompt provided for tool "${toolId}" is not valid JSON. Received: "${inputData.prompt}". Tools require a valid JSON string matching their input schema. Please provide the prompt as properly formatted JSON (e.g., {"key": "value"}).`,
|
|
14553
|
+
isComplete: false,
|
|
14554
|
+
iteration: inputData.iteration
|
|
14555
|
+
};
|
|
14553
14556
|
}
|
|
14554
14557
|
const toolCallId = generateId2({
|
|
14555
14558
|
idType: "step",
|
|
@@ -15752,7 +15755,7 @@ ${skillInstructions}`;
|
|
|
15752
15755
|
message: `Reference file "${referencePath}" not found in skill "${skillName}". Available references: ${availableRefs.join(", ") || "none"}`
|
|
15753
15756
|
};
|
|
15754
15757
|
}
|
|
15755
|
-
const result =
|
|
15758
|
+
const result = chunk66462UTX_cjs.extractLines(fullContent, startLine, endLine);
|
|
15756
15759
|
return {
|
|
15757
15760
|
success: true,
|
|
15758
15761
|
content: result.content,
|
|
@@ -15798,7 +15801,7 @@ ${skillInstructions}`;
|
|
|
15798
15801
|
message: `Script file "${scriptPath}" not found in skill "${skillName}". Available scripts: ${availableScripts.join(", ") || "none"}`
|
|
15799
15802
|
};
|
|
15800
15803
|
}
|
|
15801
|
-
const result =
|
|
15804
|
+
const result = chunk66462UTX_cjs.extractLines(fullContent, startLine, endLine);
|
|
15802
15805
|
return {
|
|
15803
15806
|
success: true,
|
|
15804
15807
|
content: result.content,
|
|
@@ -18457,7 +18460,7 @@ ${errorMessages}`,
|
|
|
18457
18460
|
*/
|
|
18458
18461
|
async resolveModelConfig(modelConfig, requestContext) {
|
|
18459
18462
|
try {
|
|
18460
|
-
return await
|
|
18463
|
+
return await chunkLMNHODU4_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
|
|
18461
18464
|
} catch (error) {
|
|
18462
18465
|
const mastraError = new chunk4U7ZLI36_cjs.MastraError({
|
|
18463
18466
|
id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
|
|
@@ -18834,7 +18837,7 @@ ${errorMessages}`,
|
|
|
18834
18837
|
if (!workspace) {
|
|
18835
18838
|
return convertedWorkspaceTools;
|
|
18836
18839
|
}
|
|
18837
|
-
const workspaceTools =
|
|
18840
|
+
const workspaceTools = chunk66462UTX_cjs.createWorkspaceTools(workspace);
|
|
18838
18841
|
if (Object.keys(workspaceTools).length > 0) {
|
|
18839
18842
|
this.logger.debug(`[Agent:${this.name}] - Adding workspace tools: ${Object.keys(workspaceTools).join(", ")}`, {
|
|
18840
18843
|
runId
|
|
@@ -19750,7 +19753,7 @@ ${errorMessages}`,
|
|
|
19750
19753
|
throw mastraError;
|
|
19751
19754
|
}
|
|
19752
19755
|
let headers;
|
|
19753
|
-
if (resolvedModel instanceof
|
|
19756
|
+
if (resolvedModel instanceof chunkLMNHODU4_cjs.ModelRouterLanguageModel) {
|
|
19754
19757
|
headers = resolvedModel.config?.headers;
|
|
19755
19758
|
}
|
|
19756
19759
|
return [
|
|
@@ -19796,7 +19799,7 @@ ${errorMessages}`,
|
|
|
19796
19799
|
throw mastraError;
|
|
19797
19800
|
}
|
|
19798
19801
|
let headers;
|
|
19799
|
-
if (model2 instanceof
|
|
19802
|
+
if (model2 instanceof chunkLMNHODU4_cjs.ModelRouterLanguageModel) {
|
|
19800
19803
|
headers = model2.config?.headers;
|
|
19801
19804
|
}
|
|
19802
19805
|
return {
|
|
@@ -23496,7 +23499,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
23496
23499
|
);
|
|
23497
23500
|
}
|
|
23498
23501
|
if (typeof config.embedder === "string") {
|
|
23499
|
-
this.embedder = new
|
|
23502
|
+
this.embedder = new chunkLMNHODU4_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
23500
23503
|
} else {
|
|
23501
23504
|
this.embedder = config.embedder;
|
|
23502
23505
|
}
|
|
@@ -23535,7 +23538,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
23535
23538
|
}
|
|
23536
23539
|
setEmbedder(embedder, embedderOptions) {
|
|
23537
23540
|
if (typeof embedder === "string") {
|
|
23538
|
-
this.embedder = new
|
|
23541
|
+
this.embedder = new chunkLMNHODU4_cjs.ModelRouterEmbeddingModel(embedder);
|
|
23539
23542
|
} else {
|
|
23540
23543
|
this.embedder = embedder;
|
|
23541
23544
|
}
|
|
@@ -23850,7 +23853,7 @@ var MockMemory = class extends MastraMemory {
|
|
|
23850
23853
|
} = {}) {
|
|
23851
23854
|
super({
|
|
23852
23855
|
name: "mock",
|
|
23853
|
-
storage: storage || new
|
|
23856
|
+
storage: storage || new chunkYSFYUEEG_cjs.InMemoryStore(),
|
|
23854
23857
|
options: {
|
|
23855
23858
|
workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : void 0,
|
|
23856
23859
|
lastMessages: enableMessageHistory ? 10 : void 0
|
|
@@ -24151,5 +24154,5 @@ exports.validateStepRequestContext = validateStepRequestContext;
|
|
|
24151
24154
|
exports.validateStepResumeData = validateStepResumeData;
|
|
24152
24155
|
exports.validateStepStateData = validateStepStateData;
|
|
24153
24156
|
exports.validateStepSuspendData = validateStepSuspendData;
|
|
24154
|
-
//# sourceMappingURL=chunk-
|
|
24155
|
-
//# sourceMappingURL=chunk-
|
|
24157
|
+
//# sourceMappingURL=chunk-IKS5Z56O.cjs.map
|
|
24158
|
+
//# sourceMappingURL=chunk-IKS5Z56O.cjs.map
|