@mastra/core 1.32.0-alpha.3 → 1.32.0-alpha.4
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 +30 -0
- package/dist/agent/durable/index.cjs +22 -22
- package/dist/agent/durable/index.js +4 -4
- package/dist/agent/index.cjs +9 -9
- 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-4VYOBEPT.cjs → chunk-5J57XXWT.cjs} +29 -22
- package/dist/chunk-5J57XXWT.cjs.map +1 -0
- package/dist/{chunk-KMPDWFMV.js → chunk-5LFEKTKW.js} +3 -3
- package/dist/{chunk-KMPDWFMV.js.map → chunk-5LFEKTKW.js.map} +1 -1
- package/dist/{chunk-6A76JI5S.js → chunk-74VWZNIJ.js} +3 -3
- package/dist/{chunk-6A76JI5S.js.map → chunk-74VWZNIJ.js.map} +1 -1
- package/dist/{chunk-XGYB6VEV.js → chunk-75EPJWR4.js} +21 -11
- package/dist/chunk-75EPJWR4.js.map +1 -0
- package/dist/{chunk-MCOBK6VA.cjs → chunk-ADRMFY6S.cjs} +9 -9
- package/dist/{chunk-MCOBK6VA.cjs.map → chunk-ADRMFY6S.cjs.map} +1 -1
- package/dist/{chunk-FAELCC5F.cjs → chunk-AQ76QTTR.cjs} +59 -59
- package/dist/{chunk-FAELCC5F.cjs.map → chunk-AQ76QTTR.cjs.map} +1 -1
- package/dist/{chunk-SAIICI7H.cjs → chunk-CVUG676Y.cjs} +389 -389
- package/dist/{chunk-SAIICI7H.cjs.map → chunk-CVUG676Y.cjs.map} +1 -1
- package/dist/{chunk-HSAITG44.js → chunk-CXLJMMNS.js} +3 -3
- package/dist/{chunk-HSAITG44.js.map → chunk-CXLJMMNS.js.map} +1 -1
- package/dist/{chunk-CRMUTN3A.js → chunk-FLIEIN4W.js} +4 -4
- package/dist/{chunk-CRMUTN3A.js.map → chunk-FLIEIN4W.js.map} +1 -1
- package/dist/{chunk-LEGBLENH.js → chunk-HO6VPMZN.js} +6 -6
- package/dist/{chunk-LEGBLENH.js.map → chunk-HO6VPMZN.js.map} +1 -1
- package/dist/{chunk-SMR6DHFJ.js → chunk-IQVOBTY4.js} +3 -3
- package/dist/{chunk-SMR6DHFJ.js.map → chunk-IQVOBTY4.js.map} +1 -1
- package/dist/{chunk-KEDXZSM5.cjs → chunk-IUE5KFHI.cjs} +5 -5
- package/dist/{chunk-KEDXZSM5.cjs.map → chunk-IUE5KFHI.cjs.map} +1 -1
- package/dist/{chunk-EST7RKR7.cjs → chunk-K3JQID5H.cjs} +3 -3
- package/dist/{chunk-EST7RKR7.cjs.map → chunk-K3JQID5H.cjs.map} +1 -1
- package/dist/{chunk-CG6L7CTT.js → chunk-LBIDF2YJ.js} +16 -9
- package/dist/chunk-LBIDF2YJ.js.map +1 -0
- package/dist/{chunk-GPT5SQXO.js → chunk-NWF3HQEM.js} +3 -3
- package/dist/{chunk-GPT5SQXO.js.map → chunk-NWF3HQEM.js.map} +1 -1
- package/dist/{chunk-ESBDVN5F.cjs → chunk-OQGVZ27D.cjs} +7 -7
- package/dist/{chunk-ESBDVN5F.cjs.map → chunk-OQGVZ27D.cjs.map} +1 -1
- package/dist/{chunk-IFKB6ZQS.js → chunk-OQIQB4L5.js} +4 -4
- package/dist/{chunk-IFKB6ZQS.js.map → chunk-OQIQB4L5.js.map} +1 -1
- package/dist/{chunk-52UBCOSR.js → chunk-RHIJ2KER.js} +68 -60
- package/dist/chunk-RHIJ2KER.js.map +1 -0
- package/dist/{chunk-AYDHVBUD.cjs → chunk-RSSSVR6V.cjs} +7 -7
- package/dist/{chunk-AYDHVBUD.cjs.map → chunk-RSSSVR6V.cjs.map} +1 -1
- package/dist/{chunk-L53QFD2S.cjs → chunk-S55ONBEL.cjs} +224 -224
- package/dist/{chunk-L53QFD2S.cjs.map → chunk-S55ONBEL.cjs.map} +1 -1
- package/dist/{chunk-APBJDSFX.cjs → chunk-V2WXYYBV.cjs} +80 -72
- package/dist/chunk-V2WXYYBV.cjs.map +1 -0
- package/dist/{chunk-PQRH3PWI.cjs → chunk-Y7Y7XTC3.cjs} +30 -20
- package/dist/chunk-Y7Y7XTC3.cjs.map +1 -0
- package/dist/datasets/index.cjs +11 -11
- package/dist/datasets/index.js +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +177 -177
- package/dist/docs/references/docs-memory-observational-memory.md +3 -3
- package/dist/docs/references/reference-tools-mcp-client.md +32 -0
- package/dist/docs/references/reference-tools-mcp-server.md +64 -0
- package/dist/evals/index.cjs +6 -6
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +3 -3
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +9 -9
- package/dist/harness/index.cjs.map +1 -1
- package/dist/harness/index.js +7 -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 +20 -20
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/provider-types.generated.d.ts +19 -15
- 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.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/mastra-4NMQMNJS.js +3 -0
- package/dist/{mastra-P7D6XEYW.js.map → mastra-4NMQMNJS.js.map} +1 -1
- package/dist/mastra-VJJNUFUS.cjs +12 -0
- package/dist/{mastra-INQ6GNG4.cjs.map → mastra-VJJNUFUS.cjs.map} +1 -1
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.d.ts +33 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/memory/index.cjs +19 -19
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-FGWYMB42.cjs +12 -0
- package/dist/{models-dev-4MLGR5B2.cjs.map → models-dev-FGWYMB42.cjs.map} +1 -1
- package/dist/models-dev-TDWFZOD4.js +3 -0
- package/dist/{models-dev-BLHW7AM7.js.map → models-dev-TDWFZOD4.js.map} +1 -1
- package/dist/netlify-2WCEQODZ.js +3 -0
- package/dist/{netlify-O33IHBMM.js.map → netlify-2WCEQODZ.js.map} +1 -1
- package/dist/netlify-BMUCSHX6.cjs +12 -0
- package/dist/{netlify-CVSZUJTB.cjs.map → netlify-BMUCSHX6.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 +51 -51
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-PV3SULLN.js +3 -0
- package/dist/{provider-registry-QNY4B7KD.js.map → provider-registry-PV3SULLN.js.map} +1 -1
- package/dist/provider-registry-Z2KJ2LEC.cjs +44 -0
- package/dist/{provider-registry-JFMEYRW2.cjs.map → provider-registry-Z2KJ2LEC.cjs.map} +1 -1
- package/dist/provider-registry.json +60 -52
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/runner-4LIHTAFO.cjs +16 -0
- package/dist/{runner-QFYUIEKV.cjs.map → runner-4LIHTAFO.cjs.map} +1 -1
- package/dist/runner-PHF7QBVS.js +3 -0
- package/dist/{runner-CLVA3GWS.js.map → runner-PHF7QBVS.js.map} +1 -1
- package/dist/stream/index.cjs +11 -11
- 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/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/handlers/entry.d.ts.map +1 -1
- package/dist/workflows/index.cjs +28 -28
- package/dist/workflows/index.js +1 -1
- package/package.json +5 -5
- package/src/llm/model/provider-types.generated.d.ts +19 -15
- package/dist/chunk-4VYOBEPT.cjs.map +0 -1
- package/dist/chunk-52UBCOSR.js.map +0 -1
- package/dist/chunk-APBJDSFX.cjs.map +0 -1
- package/dist/chunk-CG6L7CTT.js.map +0 -1
- package/dist/chunk-PQRH3PWI.cjs.map +0 -1
- package/dist/chunk-XGYB6VEV.js.map +0 -1
- package/dist/mastra-INQ6GNG4.cjs +0 -12
- package/dist/mastra-P7D6XEYW.js +0 -3
- package/dist/models-dev-4MLGR5B2.cjs +0 -12
- package/dist/models-dev-BLHW7AM7.js +0 -3
- package/dist/netlify-CVSZUJTB.cjs +0 -12
- package/dist/netlify-O33IHBMM.js +0 -3
- package/dist/provider-registry-JFMEYRW2.cjs +0 -44
- package/dist/provider-registry-QNY4B7KD.js +0 -3
- package/dist/runner-CLVA3GWS.js +0 -3
- package/dist/runner-QFYUIEKV.cjs +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 1.32.0-alpha.4
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added `listResources()` and `readResource()` abstract methods to `MCPServerBase`, enabling MCP servers to expose app resources. These resources power interactive UI rendering (MCP Apps) in Studio and other consumers. ([#16004](https://github.com/mastra-ai/mastra/pull/16004))
|
|
8
|
+
|
|
9
|
+
- Added MCP Apps extension support (SEP-1865). MCPServer now accepts an `appResources` config to register interactive `ui://` HTML resources. MCPClient preserves full tool `_meta` (including `ui.resourceUri`) when converting MCP tools to Mastra tools. Both advertise the `io.modelcontextprotocol/ui` extension capability. ([#16004](https://github.com/mastra-ai/mastra/pull/16004))
|
|
10
|
+
|
|
11
|
+
**Example — MCPServer with app resources:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
const server = new MCPServer({
|
|
15
|
+
name: 'my-server',
|
|
16
|
+
tools: { myTool },
|
|
17
|
+
appResources: {
|
|
18
|
+
dashboard: {
|
|
19
|
+
name: 'Dashboard',
|
|
20
|
+
description: 'Interactive dashboard UI',
|
|
21
|
+
html: '<html>...</html>',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Fixed Observational Memory model resolution for user-defined gateways. Models such as `cloudflare/google/gemini-2.5-flash-lite` now resolve through registered gateways instead of failing with provider-config errors. Closes #13841. ([#16083](https://github.com/mastra-ai/mastra/pull/16083))
|
|
30
|
+
|
|
31
|
+
- Fix buildResumedBlockResult returning suspended instead of failed when a step throws after resume in a parallel or conditional block ([#14410](https://github.com/mastra-ai/mastra/pull/14410))
|
|
32
|
+
|
|
3
33
|
## 1.32.0-alpha.3
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkW7D53JMX_cjs = require('../../chunk-W7D53JMX.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkY7Y7XTC3_cjs = require('../../chunk-Y7Y7XTC3.cjs');
|
|
5
5
|
var chunkZCBG4ZQT_cjs = require('../../chunk-ZCBG4ZQT.cjs');
|
|
6
6
|
var chunkNAOSC6FH_cjs = require('../../chunk-NAOSC6FH.cjs');
|
|
7
7
|
var chunkHM6XXOV2_cjs = require('../../chunk-HM6XXOV2.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunkCVUG676Y_cjs = require('../../chunk-CVUG676Y.cjs');
|
|
9
9
|
var chunkGLBBBSS5_cjs = require('../../chunk-GLBBBSS5.cjs');
|
|
10
10
|
var chunkRJK2C4PL_cjs = require('../../chunk-RJK2C4PL.cjs');
|
|
11
11
|
var chunkCDN65CUN_cjs = require('../../chunk-CDN65CUN.cjs');
|
|
@@ -545,7 +545,7 @@ async function prepareForDurableExecution(options) {
|
|
|
545
545
|
threadExists = true;
|
|
546
546
|
requestContext.set("MastraMemory", { thread: threadObject, resourceId, memoryConfig: memoryConfig2 });
|
|
547
547
|
}
|
|
548
|
-
const { ProcessorRunner: ProcessorRunner2 } = await import('../../runner-
|
|
548
|
+
const { ProcessorRunner: ProcessorRunner2 } = await import('../../runner-4LIHTAFO.cjs');
|
|
549
549
|
const runner = new ProcessorRunner2({
|
|
550
550
|
inputProcessors,
|
|
551
551
|
outputProcessors,
|
|
@@ -595,7 +595,7 @@ async function prepareForDurableExecution(options) {
|
|
|
595
595
|
}
|
|
596
596
|
const memory = await typedAgent.getMemory({ requestContext });
|
|
597
597
|
const memoryConfig = execOptions?.memory?.options;
|
|
598
|
-
const saveQueueManager = memory ? new
|
|
598
|
+
const saveQueueManager = memory ? new chunkY7Y7XTC3_cjs.SaveQueueManager({
|
|
599
599
|
logger,
|
|
600
600
|
memory
|
|
601
601
|
}) : void 0;
|
|
@@ -956,7 +956,7 @@ function createDurableAgentStream(options) {
|
|
|
956
956
|
}
|
|
957
957
|
controller = null;
|
|
958
958
|
};
|
|
959
|
-
const output = new
|
|
959
|
+
const output = new chunkY7Y7XTC3_cjs.MastraModelOutput({
|
|
960
960
|
model,
|
|
961
961
|
stream,
|
|
962
962
|
messageList,
|
|
@@ -1188,7 +1188,7 @@ var BG_CHECK_STEP_ID = `${DurableStepIds.AGENTIC_EXECUTION}-bg-task-check`;
|
|
|
1188
1188
|
var bgCheckInputSchema = zod.z.any();
|
|
1189
1189
|
var bgCheckOutputSchema = zod.z.any();
|
|
1190
1190
|
function createDurableBackgroundTaskCheckStep() {
|
|
1191
|
-
return
|
|
1191
|
+
return chunkY7Y7XTC3_cjs.createStep({
|
|
1192
1192
|
id: BG_CHECK_STEP_ID,
|
|
1193
1193
|
inputSchema: bgCheckInputSchema,
|
|
1194
1194
|
outputSchema: bgCheckOutputSchema,
|
|
@@ -1317,7 +1317,7 @@ async function resolveRuntimeDependencies(options) {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
let saveQueueManager;
|
|
1319
1319
|
if (memory) {
|
|
1320
|
-
saveQueueManager = new
|
|
1320
|
+
saveQueueManager = new chunkY7Y7XTC3_cjs.SaveQueueManager({
|
|
1321
1321
|
logger: mastra?.getLogger?.(),
|
|
1322
1322
|
memory
|
|
1323
1323
|
});
|
|
@@ -1397,9 +1397,9 @@ async function resolveModelFromConfig(config, mastra) {
|
|
|
1397
1397
|
const requestContext = new chunkKF4FCWWL_cjs.RequestContext();
|
|
1398
1398
|
const modelConfigString = config.originalConfig ?? `${config.provider}/${config.modelId}`;
|
|
1399
1399
|
if (typeof modelConfigString === "string") {
|
|
1400
|
-
return await
|
|
1400
|
+
return await chunkCVUG676Y_cjs.resolveModelConfig(modelConfigString, requestContext, mastra);
|
|
1401
1401
|
}
|
|
1402
|
-
return await
|
|
1402
|
+
return await chunkCVUG676Y_cjs.resolveModelConfig(
|
|
1403
1403
|
modelConfigString,
|
|
1404
1404
|
requestContext,
|
|
1405
1405
|
mastra
|
|
@@ -1472,7 +1472,7 @@ var durableLLMOutputSchema = zod.z.object({
|
|
|
1472
1472
|
stepIndex: zod.z.number().optional()
|
|
1473
1473
|
});
|
|
1474
1474
|
function createDurableLLMExecutionStep(_options) {
|
|
1475
|
-
return
|
|
1475
|
+
return chunkY7Y7XTC3_cjs.createStep({
|
|
1476
1476
|
id: DurableStepIds.LLM_EXECUTION,
|
|
1477
1477
|
inputSchema: durableLLMInputSchema,
|
|
1478
1478
|
outputSchema: durableLLMOutputSchema,
|
|
@@ -1510,7 +1510,7 @@ function createDurableLLMExecutionStep(_options) {
|
|
|
1510
1510
|
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
1511
1511
|
try {
|
|
1512
1512
|
const model = !hasModelList ? resolvedModel : resolvedModelList?.find((m) => m.id === modelEntry.id)?.model ?? await resolveModelFromListEntry(modelEntry, mastra);
|
|
1513
|
-
if (!
|
|
1513
|
+
if (!chunkY7Y7XTC3_cjs.isSupportedLanguageModel(model)) {
|
|
1514
1514
|
const hint = model.__metadataOnly ? " The model could not be resolved from the run registry or Mastra instance." : "";
|
|
1515
1515
|
throw new Error(
|
|
1516
1516
|
`Unsupported model version: ${model.specificationVersion}. Model must implement doStream.${hint}`
|
|
@@ -1540,7 +1540,7 @@ function createDurableLLMExecutionStep(_options) {
|
|
|
1540
1540
|
await emitChunkEvent(pubsub, runId, data);
|
|
1541
1541
|
}
|
|
1542
1542
|
} : void 0;
|
|
1543
|
-
const runner = new
|
|
1543
|
+
const runner = new chunkY7Y7XTC3_cjs.ProcessorRunner({
|
|
1544
1544
|
inputProcessors: registryEntry.inputProcessors,
|
|
1545
1545
|
outputProcessors: registryEntry.outputProcessors ?? [],
|
|
1546
1546
|
errorProcessors: registryEntry.errorProcessors ?? [],
|
|
@@ -1588,7 +1588,7 @@ function createDurableLLMExecutionStep(_options) {
|
|
|
1588
1588
|
let usage = { inputTokens: 0, outputTokens: 0, totalTokens: 0 };
|
|
1589
1589
|
let responseMetadata = {};
|
|
1590
1590
|
modelSpanTracker?.startStep();
|
|
1591
|
-
const modelResult =
|
|
1591
|
+
const modelResult = chunkY7Y7XTC3_cjs.execute({
|
|
1592
1592
|
runId,
|
|
1593
1593
|
model: currentModel,
|
|
1594
1594
|
inputMessages,
|
|
@@ -1616,7 +1616,7 @@ function createDurableLLMExecutionStep(_options) {
|
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
1618
|
});
|
|
1619
|
-
const outputStream = new
|
|
1619
|
+
const outputStream = new chunkY7Y7XTC3_cjs.MastraModelOutput({
|
|
1620
1620
|
model: {
|
|
1621
1621
|
modelId: currentModel.modelId,
|
|
1622
1622
|
provider: currentModel.provider,
|
|
@@ -1797,7 +1797,7 @@ function createDurableLLMExecutionStep(_options) {
|
|
|
1797
1797
|
const registryEntry = globalRunRegistry.get(runId);
|
|
1798
1798
|
if (registryEntry?.errorProcessors?.length) {
|
|
1799
1799
|
try {
|
|
1800
|
-
const runner = new
|
|
1800
|
+
const runner = new chunkY7Y7XTC3_cjs.ProcessorRunner({
|
|
1801
1801
|
inputProcessors: registryEntry.inputProcessors ?? [],
|
|
1802
1802
|
outputProcessors: registryEntry.outputProcessors ?? [],
|
|
1803
1803
|
errorProcessors: registryEntry.errorProcessors,
|
|
@@ -1883,7 +1883,7 @@ async function flushMessagesBeforeSuspension({
|
|
|
1883
1883
|
}
|
|
1884
1884
|
}
|
|
1885
1885
|
function createDurableToolCallStep() {
|
|
1886
|
-
return
|
|
1886
|
+
return chunkY7Y7XTC3_cjs.createStep({
|
|
1887
1887
|
id: DurableStepIds.TOOL_CALL,
|
|
1888
1888
|
inputSchema: durableToolCallInputSchema,
|
|
1889
1889
|
outputSchema: durableToolCallOutputSchema,
|
|
@@ -2348,7 +2348,7 @@ var durableLLMMappingOutputSchema = zod.z.object({
|
|
|
2348
2348
|
processorRetryFeedback: zod.z.string().optional()
|
|
2349
2349
|
});
|
|
2350
2350
|
function createDurableLLMMappingStep() {
|
|
2351
|
-
return
|
|
2351
|
+
return chunkY7Y7XTC3_cjs.createStep({
|
|
2352
2352
|
id: DurableStepIds.LLM_MAPPING,
|
|
2353
2353
|
inputSchema: durableLLMMappingInputSchema,
|
|
2354
2354
|
outputSchema: durableLLMMappingOutputSchema,
|
|
@@ -2455,7 +2455,7 @@ function createDurableAgenticWorkflow(options) {
|
|
|
2455
2455
|
const toolCallStep = createDurableToolCallStep();
|
|
2456
2456
|
const llmMappingStep = createDurableLLMMappingStep();
|
|
2457
2457
|
const backgroundTaskCheckStep = createDurableBackgroundTaskCheckStep();
|
|
2458
|
-
const singleIterationWorkflow =
|
|
2458
|
+
const singleIterationWorkflow = chunkY7Y7XTC3_cjs.createWorkflow({
|
|
2459
2459
|
id: DurableStepIds.AGENTIC_EXECUTION,
|
|
2460
2460
|
inputSchema: iterationStateSchema,
|
|
2461
2461
|
outputSchema: iterationStateSchema,
|
|
@@ -2518,7 +2518,7 @@ function createDurableAgenticWorkflow(options) {
|
|
|
2518
2518
|
},
|
|
2519
2519
|
{ id: "update-iteration-state" }
|
|
2520
2520
|
).commit();
|
|
2521
|
-
return
|
|
2521
|
+
return chunkY7Y7XTC3_cjs.createWorkflow({
|
|
2522
2522
|
id: DurableStepIds.AGENTIC_LOOP,
|
|
2523
2523
|
inputSchema: durableAgenticInputSchema,
|
|
2524
2524
|
outputSchema: durableAgenticOutputSchema,
|
|
@@ -2561,7 +2561,7 @@ function createDurableAgenticWorkflow(options) {
|
|
|
2561
2561
|
const registryEntry = globalRunRegistry.get(state.runId);
|
|
2562
2562
|
if (registryEntry?.outputProcessors?.length) {
|
|
2563
2563
|
try {
|
|
2564
|
-
const { ProcessorRunner: ProcessorRunner2 } = await import('../../runner-
|
|
2564
|
+
const { ProcessorRunner: ProcessorRunner2 } = await import('../../runner-4LIHTAFO.cjs');
|
|
2565
2565
|
const runner = new ProcessorRunner2({
|
|
2566
2566
|
inputProcessors: registryEntry.inputProcessors ?? [],
|
|
2567
2567
|
outputProcessors: registryEntry.outputProcessors,
|
|
@@ -2659,7 +2659,7 @@ function createDurableAgenticWorkflow(options) {
|
|
|
2659
2659
|
scorer,
|
|
2660
2660
|
sampling
|
|
2661
2661
|
};
|
|
2662
|
-
|
|
2662
|
+
chunkY7Y7XTC3_cjs.runScorer({
|
|
2663
2663
|
runId: initData.runId,
|
|
2664
2664
|
scorerId: scorerKey,
|
|
2665
2665
|
scorerObject,
|
|
@@ -2692,7 +2692,7 @@ function createDurableAgenticWorkflow(options) {
|
|
|
2692
2692
|
}
|
|
2693
2693
|
|
|
2694
2694
|
// src/agent/durable/durable-agent.ts
|
|
2695
|
-
var DurableAgent = class extends
|
|
2695
|
+
var DurableAgent = class extends chunkY7Y7XTC3_cjs.Agent {
|
|
2696
2696
|
/** The wrapped agent */
|
|
2697
2697
|
#wrappedAgent;
|
|
2698
2698
|
/** Registry for per-run non-serializable state */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CachingPubSub } from '../../chunk-RRJNDPUT.js';
|
|
2
|
-
import { SaveQueueManager, MastraModelOutput, createStep, isSupportedLanguageModel, ProcessorRunner, execute, createWorkflow, runScorer, Agent } from '../../chunk-
|
|
2
|
+
import { SaveQueueManager, MastraModelOutput, createStep, isSupportedLanguageModel, ProcessorRunner, execute, createWorkflow, runScorer, Agent } from '../../chunk-75EPJWR4.js';
|
|
3
3
|
import { PUBSUB_SYMBOL } from '../../chunk-2QXNHEDL.js';
|
|
4
4
|
import { MessageList } from '../../chunk-4ROHEPMI.js';
|
|
5
5
|
import { EventEmitterPubSub } from '../../chunk-4E5FOY4E.js';
|
|
6
|
-
import { resolveModelConfig } from '../../chunk-
|
|
6
|
+
import { resolveModelConfig } from '../../chunk-HO6VPMZN.js';
|
|
7
7
|
import { InMemoryServerCache } from '../../chunk-CH66BRBG.js';
|
|
8
8
|
import { deepMerge } from '../../chunk-T7UICTBA.js';
|
|
9
9
|
import { createObservabilityContext } from '../../chunk-2NDJVX5U.js';
|
|
@@ -543,7 +543,7 @@ async function prepareForDurableExecution(options) {
|
|
|
543
543
|
threadExists = true;
|
|
544
544
|
requestContext.set("MastraMemory", { thread: threadObject, resourceId, memoryConfig: memoryConfig2 });
|
|
545
545
|
}
|
|
546
|
-
const { ProcessorRunner: ProcessorRunner2 } = await import('../../runner-
|
|
546
|
+
const { ProcessorRunner: ProcessorRunner2 } = await import('../../runner-PHF7QBVS.js');
|
|
547
547
|
const runner = new ProcessorRunner2({
|
|
548
548
|
inputProcessors,
|
|
549
549
|
outputProcessors,
|
|
@@ -2559,7 +2559,7 @@ function createDurableAgenticWorkflow(options) {
|
|
|
2559
2559
|
const registryEntry = globalRunRegistry.get(state.runId);
|
|
2560
2560
|
if (registryEntry?.outputProcessors?.length) {
|
|
2561
2561
|
try {
|
|
2562
|
-
const { ProcessorRunner: ProcessorRunner2 } = await import('../../runner-
|
|
2562
|
+
const { ProcessorRunner: ProcessorRunner2 } = await import('../../runner-PHF7QBVS.js');
|
|
2563
2563
|
const runner = new ProcessorRunner2({
|
|
2564
2564
|
inputProcessors: registryEntry.inputProcessors ?? [],
|
|
2565
2565
|
outputProcessors: registryEntry.outputProcessors,
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkY7Y7XTC3_cjs = require('../chunk-Y7Y7XTC3.cjs');
|
|
4
4
|
var chunkNAOSC6FH_cjs = require('../chunk-NAOSC6FH.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Agent", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkY7Y7XTC3_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "TripWire", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkY7Y7XTC3_cjs.TripWire; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "isDurableAgentLike", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkY7Y7XTC3_cjs.isDurableAgentLike; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "isSupportedLanguageModel", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkY7Y7XTC3_cjs.isSupportedLanguageModel; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "resolveThreadIdFromArgs", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkY7Y7XTC3_cjs.resolveThreadIdFromArgs; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkY7Y7XTC3_cjs.supportedLanguageModelSpecifications; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkY7Y7XTC3_cjs.tryGenerateWithJsonFallback; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "tryStreamWithJsonFallback", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkY7Y7XTC3_cjs.tryStreamWithJsonFallback; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "MessageList", {
|
|
41
41
|
enumerable: true,
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Agent, TripWire, isDurableAgentLike, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-
|
|
1
|
+
export { Agent, TripWire, isDurableAgentLike, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-75EPJWR4.js';
|
|
2
2
|
export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-4ROHEPMI.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/browser/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkY7Y7XTC3_cjs = require('../chunk-Y7Y7XTC3.cjs');
|
|
4
4
|
var chunk5ANWVE3P_cjs = require('../chunk-5ANWVE3P.cjs');
|
|
5
5
|
var chunkFCQNDFEW_cjs = require('../chunk-FCQNDFEW.cjs');
|
|
6
6
|
var chunk7GW2TQXP_cjs = require('../chunk-7GW2TQXP.cjs');
|
|
@@ -1191,7 +1191,7 @@ To fix this, either:
|
|
|
1191
1191
|
*/
|
|
1192
1192
|
getInputProcessors(configuredProcessors = []) {
|
|
1193
1193
|
const hasProcessor = configuredProcessors.some(
|
|
1194
|
-
(p) => !
|
|
1194
|
+
(p) => !chunkY7Y7XTC3_cjs.isProcessorWorkflow(p) && "id" in p && p.id === "browser-context"
|
|
1195
1195
|
);
|
|
1196
1196
|
if (hasProcessor) return [];
|
|
1197
1197
|
return [new BrowserContextProcessor()];
|
package/dist/browser/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isProcessorWorkflow } from '../chunk-
|
|
1
|
+
import { isProcessorWorkflow } from '../chunk-75EPJWR4.js';
|
|
2
2
|
export { BrowserCliHandler, browserCliHandler } from '../chunk-F4PWGVHW.js';
|
|
3
3
|
import { MastraBase } from '../chunk-WENZPAHS.js';
|
|
4
4
|
import { RegisteredLogger } from '../chunk-DBBWTK24.js';
|
package/dist/channels/index.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkY7Y7XTC3_cjs = require('../chunk-Y7Y7XTC3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "AgentChannels", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkY7Y7XTC3_cjs.AgentChannels; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "ChatChannelProcessor", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkY7Y7XTC3_cjs.ChatChannelProcessor; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "MastraStateAdapter", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkY7Y7XTC3_cjs.MastraStateAdapter; }
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=index.cjs.map
|
|
20
20
|
//# sourceMappingURL=index.cjs.map
|
package/dist/channels/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkAQ76QTTR_cjs = require('./chunk-AQ76QTTR.cjs');
|
|
4
|
+
var chunkRSSSVR6V_cjs = require('./chunk-RSSSVR6V.cjs');
|
|
5
5
|
var chunkVNYBKO6S_cjs = require('./chunk-VNYBKO6S.cjs');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
6
|
+
var chunkOQGVZ27D_cjs = require('./chunk-OQGVZ27D.cjs');
|
|
7
|
+
var chunkIUE5KFHI_cjs = require('./chunk-IUE5KFHI.cjs');
|
|
8
|
+
var chunkY7Y7XTC3_cjs = require('./chunk-Y7Y7XTC3.cjs');
|
|
9
9
|
var chunkSQXMPXUI_cjs = require('./chunk-SQXMPXUI.cjs');
|
|
10
10
|
var chunkHM6XXOV2_cjs = require('./chunk-HM6XXOV2.cjs');
|
|
11
11
|
var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
|
|
12
|
-
var
|
|
12
|
+
var chunkCVUG676Y_cjs = require('./chunk-CVUG676Y.cjs');
|
|
13
13
|
var chunkGLBBBSS5_cjs = require('./chunk-GLBBBSS5.cjs');
|
|
14
14
|
var chunkCDN65CUN_cjs = require('./chunk-CDN65CUN.cjs');
|
|
15
15
|
var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
|
|
@@ -137,7 +137,7 @@ var Mastra = class {
|
|
|
137
137
|
}
|
|
138
138
|
get datasets() {
|
|
139
139
|
if (!this.#datasets) {
|
|
140
|
-
this.#datasets = new
|
|
140
|
+
this.#datasets = new chunkOQGVZ27D_cjs.DatasetsManager(this);
|
|
141
141
|
}
|
|
142
142
|
return this.#datasets;
|
|
143
143
|
}
|
|
@@ -384,7 +384,7 @@ var Mastra = class {
|
|
|
384
384
|
this.#events[topic] = config?.events?.[topic] ?? [];
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
const workflowEventProcessor = new
|
|
387
|
+
const workflowEventProcessor = new chunkAQ76QTTR_cjs.WorkflowEventProcessor({ mastra: this });
|
|
388
388
|
const workflowEventCb = async (event, cb) => {
|
|
389
389
|
try {
|
|
390
390
|
await workflowEventProcessor.process(event, cb);
|
|
@@ -412,7 +412,7 @@ var Mastra = class {
|
|
|
412
412
|
this.#idGenerator = config?.idGenerator;
|
|
413
413
|
let storage = config?.storage;
|
|
414
414
|
if (storage) {
|
|
415
|
-
storage =
|
|
415
|
+
storage = chunkY7Y7XTC3_cjs.augmentWithInit(storage);
|
|
416
416
|
}
|
|
417
417
|
if (config?.observability) {
|
|
418
418
|
if (typeof config.observability.getDefaultInstance === "function") {
|
|
@@ -496,7 +496,7 @@ var Mastra = class {
|
|
|
496
496
|
}
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
-
for (const gateway of
|
|
499
|
+
for (const gateway of chunkCVUG676Y_cjs.defaultGateways) {
|
|
500
500
|
const key = gateway.getId();
|
|
501
501
|
if (!this.#gateways[key]) {
|
|
502
502
|
this.#gateways[key] = gateway;
|
|
@@ -545,7 +545,7 @@ var Mastra = class {
|
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
|
-
chunkMR7ZWBL6_cjs.registerHook("onScorerRun" /* ON_SCORER_RUN */,
|
|
548
|
+
chunkMR7ZWBL6_cjs.registerHook("onScorerRun" /* ON_SCORER_RUN */, chunkIUE5KFHI_cjs.createOnScorerHook(this));
|
|
549
549
|
this.#observability.setMastraContext({ mastra: this });
|
|
550
550
|
this.setLogger({ logger });
|
|
551
551
|
this.#ensureScheduler();
|
|
@@ -632,7 +632,7 @@ var Mastra = class {
|
|
|
632
632
|
text: "Workflow scheduler requires a storage adapter implementing the `schedules` domain (e.g. `@mastra/libsql`). The configured storage does not provide one."
|
|
633
633
|
});
|
|
634
634
|
}
|
|
635
|
-
const scheduler = new
|
|
635
|
+
const scheduler = new chunkY7Y7XTC3_cjs.WorkflowScheduler({
|
|
636
636
|
schedulesStore,
|
|
637
637
|
pubsub: this.#pubsub,
|
|
638
638
|
config: this.#schedulerConfig
|
|
@@ -682,7 +682,7 @@ var Mastra = class {
|
|
|
682
682
|
cron: cfg.cron,
|
|
683
683
|
timezone: cfg.timezone,
|
|
684
684
|
status: "active",
|
|
685
|
-
nextFireAt:
|
|
685
|
+
nextFireAt: chunkY7Y7XTC3_cjs.computeNextFireAt(cfg.cron, { timezone: cfg.timezone, after: now }),
|
|
686
686
|
createdAt: now,
|
|
687
687
|
updatedAt: now,
|
|
688
688
|
metadata: cfg.metadata
|
|
@@ -697,7 +697,7 @@ var Mastra = class {
|
|
|
697
697
|
if (!targetsEqual(existing.target, target)) patch.target = target;
|
|
698
698
|
if (!metadataEqual(existing.metadata, cfg.metadata)) patch.metadata = cfg.metadata;
|
|
699
699
|
if (cronChanged || timezoneChanged) {
|
|
700
|
-
patch.nextFireAt =
|
|
700
|
+
patch.nextFireAt = chunkY7Y7XTC3_cjs.computeNextFireAt(cfg.cron, { timezone: cfg.timezone, after: now });
|
|
701
701
|
}
|
|
702
702
|
if (Object.keys(patch).length > 0) {
|
|
703
703
|
await schedulesStore.updateSchedule(scheduleId, patch);
|
|
@@ -773,7 +773,7 @@ var Mastra = class {
|
|
|
773
773
|
const result = {};
|
|
774
774
|
for (const [agentKey, agent] of Object.entries(this.#agents ?? {})) {
|
|
775
775
|
const agentChannels = agent.getChannels();
|
|
776
|
-
if (agentChannels instanceof
|
|
776
|
+
if (agentChannels instanceof chunkY7Y7XTC3_cjs.AgentChannels) {
|
|
777
777
|
result[agentKey] = agentChannels;
|
|
778
778
|
}
|
|
779
779
|
}
|
|
@@ -891,7 +891,7 @@ var Mastra = class {
|
|
|
891
891
|
if (!agent) {
|
|
892
892
|
throw createUndefinedPrimitiveError("agent", agent, key);
|
|
893
893
|
}
|
|
894
|
-
if (
|
|
894
|
+
if (chunkY7Y7XTC3_cjs.isDurableAgentLike(agent)) {
|
|
895
895
|
const durableAgent = agent;
|
|
896
896
|
const underlyingAgent = durableAgent.agent;
|
|
897
897
|
const agentKey2 = key || durableAgent.id;
|
|
@@ -919,8 +919,8 @@ var Mastra = class {
|
|
|
919
919
|
return;
|
|
920
920
|
}
|
|
921
921
|
let mastraAgent;
|
|
922
|
-
if (
|
|
923
|
-
mastraAgent =
|
|
922
|
+
if (chunkRSSSVR6V_cjs.isToolLoopAgentLike(agent)) {
|
|
923
|
+
mastraAgent = chunkRSSSVR6V_cjs.toolLoopAgentToMastraAgent(agent, { fallbackName: key });
|
|
924
924
|
} else {
|
|
925
925
|
mastraAgent = agent;
|
|
926
926
|
}
|
|
@@ -2166,6 +2166,13 @@ var Mastra = class {
|
|
|
2166
2166
|
if (memoryRegistry[memoryKey]) {
|
|
2167
2167
|
return;
|
|
2168
2168
|
}
|
|
2169
|
+
memory.__registerMastra(this);
|
|
2170
|
+
if (!memory.hasOwnStorage) {
|
|
2171
|
+
const storage = this.getStorage();
|
|
2172
|
+
if (storage) {
|
|
2173
|
+
memory.setStorage(storage);
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2169
2176
|
memoryRegistry[memoryKey] = memory;
|
|
2170
2177
|
}
|
|
2171
2178
|
/**
|
|
@@ -2283,7 +2290,7 @@ var Mastra = class {
|
|
|
2283
2290
|
* ```
|
|
2284
2291
|
*/
|
|
2285
2292
|
setStorage(storage) {
|
|
2286
|
-
this.#storage =
|
|
2293
|
+
this.#storage = chunkY7Y7XTC3_cjs.augmentWithInit(storage);
|
|
2287
2294
|
this.#ensureBackgroundTaskManager();
|
|
2288
2295
|
this.#ensureScheduler();
|
|
2289
2296
|
}
|
|
@@ -2975,7 +2982,7 @@ var Mastra = class {
|
|
|
2975
2982
|
if (process.env.MASTRA_DEV !== "true" && process.env.MASTRA_DEV !== "1") {
|
|
2976
2983
|
return;
|
|
2977
2984
|
}
|
|
2978
|
-
import('./provider-registry-
|
|
2985
|
+
import('./provider-registry-Z2KJ2LEC.cjs').then(async ({ GatewayRegistry }) => {
|
|
2979
2986
|
const registry = GatewayRegistry.getInstance();
|
|
2980
2987
|
const customGateways = Object.values(this.#gateways || {});
|
|
2981
2988
|
registry.registerCustomGateways(customGateways);
|
|
@@ -3042,5 +3049,5 @@ var Mastra = class {
|
|
|
3042
3049
|
};
|
|
3043
3050
|
|
|
3044
3051
|
exports.Mastra = Mastra;
|
|
3045
|
-
//# sourceMappingURL=chunk-
|
|
3046
|
-
//# sourceMappingURL=chunk-
|
|
3052
|
+
//# sourceMappingURL=chunk-5J57XXWT.cjs.map
|
|
3053
|
+
//# sourceMappingURL=chunk-5J57XXWT.cjs.map
|