@mastra/core 1.0.0-beta.6 → 1.0.0-beta.8
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 +195 -0
- package/dist/agent/agent-legacy.d.ts.map +1 -1
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +9 -9
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/index.cjs +3 -3
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/schema.d.ts +2 -1
- package/dist/agent/workflows/prepare-stream/schema.d.ts.map +1 -1
- package/dist/{chunk-NHNXIYDG.cjs → chunk-3EYBRHB2.cjs} +2 -2
- package/dist/chunk-3EYBRHB2.cjs.map +1 -0
- package/dist/{chunk-AQAIS7FH.cjs → chunk-3JA6VPNM.cjs} +2 -2
- package/dist/chunk-3JA6VPNM.cjs.map +1 -0
- package/dist/{chunk-WDRA4WKG.js → chunk-4GTU7MB2.js} +5 -5
- package/dist/{chunk-WDRA4WKG.js.map → chunk-4GTU7MB2.js.map} +1 -1
- package/dist/{chunk-S5FPOCQF.cjs → chunk-6BYHQ52F.cjs} +24 -24
- package/dist/{chunk-S5FPOCQF.cjs.map → chunk-6BYHQ52F.cjs.map} +1 -1
- package/dist/{chunk-RTROJFEU.cjs → chunk-6C2PU6J4.cjs} +8 -8
- package/dist/{chunk-RTROJFEU.cjs.map → chunk-6C2PU6J4.cjs.map} +1 -1
- package/dist/{chunk-6GOLI2EY.js → chunk-7PXCGGMO.js} +8 -12
- package/dist/chunk-7PXCGGMO.js.map +1 -0
- package/dist/chunk-AZQMPE7G.cjs +4981 -0
- package/dist/chunk-AZQMPE7G.cjs.map +1 -0
- package/dist/{chunk-HNHZGFZY.cjs → chunk-CZEJQSWB.cjs} +10 -2
- package/dist/chunk-CZEJQSWB.cjs.map +1 -0
- package/dist/{chunk-APMPOYPI.js → chunk-DMPHPHMU.js} +3 -3
- package/dist/{chunk-APMPOYPI.js.map → chunk-DMPHPHMU.js.map} +1 -1
- package/dist/{chunk-45NA5ZD3.js → chunk-EDNHZZUP.js} +160 -60
- package/dist/chunk-EDNHZZUP.js.map +1 -0
- package/dist/{chunk-LEZIKVRQ.js → chunk-F54IK3GJ.js} +2 -2
- package/dist/chunk-F54IK3GJ.js.map +1 -0
- package/dist/{chunk-FYP3AT6W.js → chunk-FNSFXWDN.js} +2 -2
- package/dist/chunk-FNSFXWDN.js.map +1 -0
- package/dist/{chunk-XY337TTF.js → chunk-GW7BNMGA.js} +4 -4
- package/dist/{chunk-XY337TTF.js.map → chunk-GW7BNMGA.js.map} +1 -1
- package/dist/{chunk-OPALPWAM.js → chunk-HDMH5IDV.js} +42 -5
- package/dist/chunk-HDMH5IDV.js.map +1 -0
- package/dist/{chunk-NN3NOFRU.cjs → chunk-HP6TRJ2Q.cjs} +207 -106
- package/dist/chunk-HP6TRJ2Q.cjs.map +1 -0
- package/dist/{chunk-3TKNXJES.cjs → chunk-KBXFAF37.cjs} +46 -6
- package/dist/chunk-KBXFAF37.cjs.map +1 -0
- package/dist/{chunk-7ZADRRDW.js → chunk-PK2A5WBG.js} +3 -3
- package/dist/chunk-PK2A5WBG.js.map +1 -0
- package/dist/{chunk-DXMSVGJ6.js → chunk-QDIYYAA4.js} +28 -59
- package/dist/chunk-QDIYYAA4.js.map +1 -0
- package/dist/{chunk-TARWUQG6.js → chunk-QHJ7YVNX.js} +8 -8
- package/dist/{chunk-TARWUQG6.js.map → chunk-QHJ7YVNX.js.map} +1 -1
- package/dist/{chunk-IWTMMUQY.cjs → chunk-QYNZAPFE.cjs} +4 -4
- package/dist/{chunk-IWTMMUQY.cjs.map → chunk-QYNZAPFE.cjs.map} +1 -1
- package/dist/{chunk-TS7B26US.js → chunk-RWT3XPKO.js} +3 -3
- package/dist/{chunk-TS7B26US.js.map → chunk-RWT3XPKO.js.map} +1 -1
- package/dist/{chunk-LDWBLENZ.cjs → chunk-SD2BDUJ6.cjs} +28 -32
- package/dist/chunk-SD2BDUJ6.cjs.map +1 -0
- package/dist/{chunk-NIUEWICQ.js → chunk-SPIUKQDK.js} +8 -8
- package/dist/{chunk-NIUEWICQ.js.map → chunk-SPIUKQDK.js.map} +1 -1
- package/dist/chunk-TLLXRG2Z.js +4959 -0
- package/dist/chunk-TLLXRG2Z.js.map +1 -0
- package/dist/{chunk-SVLMF4UZ.cjs → chunk-TQB2HMEC.cjs} +45 -44
- package/dist/chunk-TQB2HMEC.cjs.map +1 -0
- package/dist/{chunk-KZLP6TPJ.js → chunk-URBPEE67.js} +4 -4
- package/dist/{chunk-KZLP6TPJ.js.map → chunk-URBPEE67.js.map} +1 -1
- package/dist/{chunk-6J4NRNT2.cjs → chunk-VWC5AUOQ.cjs} +29 -60
- package/dist/chunk-VWC5AUOQ.cjs.map +1 -0
- package/dist/{chunk-4KUOSXJ7.cjs → chunk-Y5SFNZUK.cjs} +11 -11
- package/dist/{chunk-4KUOSXJ7.cjs.map → chunk-Y5SFNZUK.cjs.map} +1 -1
- package/dist/{chunk-OIMB2SNZ.cjs → chunk-Y7YCQDML.cjs} +14 -14
- package/dist/{chunk-OIMB2SNZ.cjs.map → chunk-Y7YCQDML.cjs.map} +1 -1
- package/dist/{chunk-VRFSEZBA.cjs → chunk-YBEW5YWC.cjs} +6 -6
- package/dist/{chunk-VRFSEZBA.cjs.map → chunk-YBEW5YWC.cjs.map} +1 -1
- package/dist/{chunk-SQAX4OW6.cjs → chunk-YUXTDKYN.cjs} +15 -15
- package/dist/{chunk-SQAX4OW6.cjs.map → chunk-YUXTDKYN.cjs.map} +1 -1
- package/dist/{chunk-RHTV5C5D.cjs → chunk-YWMMBIOM.cjs} +9 -9
- package/dist/{chunk-RHTV5C5D.cjs.map → chunk-YWMMBIOM.cjs.map} +1 -1
- package/dist/{chunk-WMAMOYRR.js → chunk-Z57R5WS4.js} +4 -4
- package/dist/{chunk-WMAMOYRR.js.map → chunk-Z57R5WS4.js.map} +1 -1
- package/dist/{chunk-QM5SRDJX.js → chunk-ZUWJCGLM.js} +5 -4
- package/dist/chunk-ZUWJCGLM.js.map +1 -0
- package/dist/evals/index.cjs +9 -9
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/evals/types.d.ts +19 -18
- package/dist/evals/types.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +15 -15
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/gateways/constants.d.ts.map +1 -1
- package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
- package/dist/llm/model/model.loop.d.ts +1 -1
- package/dist/llm/model/model.loop.d.ts.map +1 -1
- package/dist/llm/model/provider-options.d.ts +4 -1
- package/dist/llm/model/provider-options.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +12 -22
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
- package/dist/loop/workflows/stream.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +6 -6
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-6GD3644V.js +3 -0
- package/dist/{models-dev-F6MTIYTO.js.map → models-dev-6GD3644V.js.map} +1 -1
- package/dist/models-dev-IUQBXJSS.cjs +12 -0
- package/dist/{models-dev-XIVR5EJV.cjs.map → models-dev-IUQBXJSS.cjs.map} +1 -1
- package/dist/netlify-GXJ5D5DD.js +3 -0
- package/dist/{netlify-C2YBIK7A.js.map → netlify-GXJ5D5DD.js.map} +1 -1
- package/dist/netlify-KJLY3GFS.cjs +12 -0
- package/dist/{netlify-XWROOTP4.cjs.map → netlify-KJLY3GFS.cjs.map} +1 -1
- package/dist/observability/index.cjs +10 -10
- package/dist/observability/index.js +1 -1
- package/dist/observability/types/tracing.d.ts +18 -0
- package/dist/observability/types/tracing.d.ts.map +1 -1
- package/dist/processors/index.cjs +17 -17
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-A5QZFI2X.js +3 -0
- package/dist/{provider-registry-GRYJWVEM.js.map → provider-registry-A5QZFI2X.js.map} +1 -1
- package/dist/provider-registry-V32PGH6F.cjs +40 -0
- package/dist/{provider-registry-BXX7CA3H.cjs.map → provider-registry-V32PGH6F.cjs.map} +1 -1
- package/dist/provider-registry.json +24 -55
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +1 -1
- package/dist/storage/base.d.ts +22 -1
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/domains/scores/base.d.ts +2 -2
- package/dist/storage/domains/scores/base.d.ts.map +1 -1
- package/dist/storage/domains/scores/inmemory.d.ts +2 -2
- package/dist/storage/domains/scores/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +43 -31
- package/dist/storage/index.js +1 -1
- package/dist/storage/mock.d.ts +2 -2
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/storageWithInit.d.ts.map +1 -1
- package/dist/storage/utils.d.ts +38 -0
- package/dist/storage/utils.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/execute.d.ts +3 -2
- package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
- package/dist/stream/aisdk/v5/input.d.ts +4 -1
- package/dist/stream/aisdk/v5/input.d.ts.map +1 -1
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.js +2 -2
- package/dist/test-utils/llm-mock.cjs +13 -13
- package/dist/test-utils/llm-mock.cjs.map +1 -1
- package/dist/test-utils/llm-mock.js +6 -6
- package/dist/test-utils/llm-mock.js.map +1 -1
- package/dist/tools/index.cjs +2 -2
- package/dist/tools/index.js +1 -1
- package/dist/tools/stream.d.ts +17 -1
- package/dist/tools/stream.d.ts.map +1 -1
- package/dist/tools/types.d.ts +2 -2
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils.cjs +22 -22
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.js +1 -1
- package/dist/workflows/default.d.ts +2 -2
- package/dist/workflows/default.d.ts.map +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/evented/step-executor.d.ts.map +1 -1
- package/dist/workflows/handlers/control-flow.d.ts.map +1 -1
- package/dist/workflows/handlers/step.d.ts.map +1 -1
- package/dist/workflows/index.cjs +24 -20
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/step.d.ts +5 -5
- package/dist/workflows/step.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +1 -0
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/utils.d.ts +10 -1
- package/dist/workflows/utils.d.ts.map +1 -1
- package/dist/workflows/workflow.d.ts +1 -1
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/llm/model/provider-types.generated.d.ts +12 -22
- package/dist/chunk-3TKNXJES.cjs.map +0 -1
- package/dist/chunk-45NA5ZD3.js.map +0 -1
- package/dist/chunk-6GOLI2EY.js.map +0 -1
- package/dist/chunk-6J4NRNT2.cjs.map +0 -1
- package/dist/chunk-7ZADRRDW.js.map +0 -1
- package/dist/chunk-AQAIS7FH.cjs.map +0 -1
- package/dist/chunk-DXMSVGJ6.js.map +0 -1
- package/dist/chunk-FYP3AT6W.js.map +0 -1
- package/dist/chunk-HNHZGFZY.cjs.map +0 -1
- package/dist/chunk-LDWBLENZ.cjs.map +0 -1
- package/dist/chunk-LEZIKVRQ.js.map +0 -1
- package/dist/chunk-NHNXIYDG.cjs.map +0 -1
- package/dist/chunk-NN3NOFRU.cjs.map +0 -1
- package/dist/chunk-OPALPWAM.js.map +0 -1
- package/dist/chunk-QGWNF2QJ.cjs +0 -1697
- package/dist/chunk-QGWNF2QJ.cjs.map +0 -1
- package/dist/chunk-QM5SRDJX.js.map +0 -1
- package/dist/chunk-SVLMF4UZ.cjs.map +0 -1
- package/dist/chunk-T2UNO766.js +0 -1694
- package/dist/chunk-T2UNO766.js.map +0 -1
- package/dist/models-dev-F6MTIYTO.js +0 -3
- package/dist/models-dev-XIVR5EJV.cjs +0 -12
- package/dist/netlify-C2YBIK7A.js +0 -3
- package/dist/netlify-XWROOTP4.cjs +0 -12
- package/dist/provider-registry-BXX7CA3H.cjs +0 -40
- package/dist/provider-registry-GRYJWVEM.js +0 -3
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
var chunk4JKEUSCC_cjs = require('./chunk-4JKEUSCC.cjs');
|
|
4
4
|
var chunkABJOUEVA_cjs = require('./chunk-ABJOUEVA.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var chunkKBXFAF37_cjs = require('./chunk-KBXFAF37.cjs');
|
|
6
|
+
var chunkYBEW5YWC_cjs = require('./chunk-YBEW5YWC.cjs');
|
|
7
|
+
var chunk6BYHQ52F_cjs = require('./chunk-6BYHQ52F.cjs');
|
|
8
|
+
var chunkYUXTDKYN_cjs = require('./chunk-YUXTDKYN.cjs');
|
|
9
9
|
var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var chunk6C2PU6J4_cjs = require('./chunk-6C2PU6J4.cjs');
|
|
11
|
+
var chunk3EYBRHB2_cjs = require('./chunk-3EYBRHB2.cjs');
|
|
12
12
|
var chunkTWH4PTDG_cjs = require('./chunk-TWH4PTDG.cjs');
|
|
13
|
-
var
|
|
13
|
+
var chunk3JA6VPNM_cjs = require('./chunk-3JA6VPNM.cjs');
|
|
14
14
|
var chunkY24HI6ND_cjs = require('./chunk-Y24HI6ND.cjs');
|
|
15
15
|
var chunkUVHSM2GU_cjs = require('./chunk-UVHSM2GU.cjs');
|
|
16
16
|
var chunk4WQYXT2I_cjs = require('./chunk-4WQYXT2I.cjs');
|
|
@@ -1005,14 +1005,15 @@ async function validateStepResumeData({ resumeData, step }) {
|
|
|
1005
1005
|
}
|
|
1006
1006
|
async function validateStepSuspendData({
|
|
1007
1007
|
suspendData,
|
|
1008
|
-
step
|
|
1008
|
+
step,
|
|
1009
|
+
validateInputs
|
|
1009
1010
|
}) {
|
|
1010
1011
|
if (!suspendData) {
|
|
1011
1012
|
return { suspendData: void 0, validationError: void 0 };
|
|
1012
1013
|
}
|
|
1013
1014
|
let validationError;
|
|
1014
1015
|
const suspendSchema = step.suspendSchema;
|
|
1015
|
-
if (suspendSchema) {
|
|
1016
|
+
if (suspendSchema && validateInputs) {
|
|
1016
1017
|
const validatedSuspendData = await suspendSchema.safeParseAsync(suspendData);
|
|
1017
1018
|
if (!validatedSuspendData.success) {
|
|
1018
1019
|
const errors = getZodErrors(validatedSuspendData.error);
|
|
@@ -1024,6 +1025,28 @@ async function validateStepSuspendData({
|
|
|
1024
1025
|
}
|
|
1025
1026
|
return { suspendData, validationError };
|
|
1026
1027
|
}
|
|
1028
|
+
async function validateStepStateData({
|
|
1029
|
+
stateData,
|
|
1030
|
+
step,
|
|
1031
|
+
validateInputs
|
|
1032
|
+
}) {
|
|
1033
|
+
if (!stateData) {
|
|
1034
|
+
return { stateData: void 0, validationError: void 0 };
|
|
1035
|
+
}
|
|
1036
|
+
let validationError;
|
|
1037
|
+
const stateSchema = step.stateSchema;
|
|
1038
|
+
if (stateSchema && validateInputs) {
|
|
1039
|
+
const validatedStateData = await stateSchema.safeParseAsync(stateData);
|
|
1040
|
+
if (!validatedStateData.success) {
|
|
1041
|
+
const errors = getZodErrors(validatedStateData.error);
|
|
1042
|
+
const errorMessages = errors.map((e) => `- ${e.path?.join(".")}: ${e.message}`).join("\n");
|
|
1043
|
+
validationError = new Error("Step state data validation failed: \n" + errorMessages);
|
|
1044
|
+
} else {
|
|
1045
|
+
stateData = validatedStateData.data;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
return { stateData, validationError };
|
|
1049
|
+
}
|
|
1027
1050
|
function getResumeLabelsByStepId(resumeLabels, stepId) {
|
|
1028
1051
|
return Object.entries(resumeLabels).filter(([_, value]) => value.stepId === stepId).reduce(
|
|
1029
1052
|
(acc, [key, value]) => {
|
|
@@ -1138,7 +1161,7 @@ var createTimeTravelExecutionParams = (params) => {
|
|
|
1138
1161
|
result = void 0;
|
|
1139
1162
|
}
|
|
1140
1163
|
if (result) {
|
|
1141
|
-
const formattedResult =
|
|
1164
|
+
const formattedResult = chunk6C2PU6J4_cjs.removeUndefinedValues(result);
|
|
1142
1165
|
stepResults[stepId] = formattedResult;
|
|
1143
1166
|
}
|
|
1144
1167
|
});
|
|
@@ -1343,18 +1366,12 @@ async function executeConditional(engine, params) {
|
|
|
1343
1366
|
requestContext,
|
|
1344
1367
|
inputData: prevOutput,
|
|
1345
1368
|
state: executionContext.state,
|
|
1346
|
-
setState: (state) => {
|
|
1347
|
-
executionContext.state = state;
|
|
1348
|
-
},
|
|
1349
1369
|
retryCount: -1,
|
|
1350
1370
|
tracingContext: {
|
|
1351
1371
|
currentSpan: evalSpan
|
|
1352
1372
|
},
|
|
1353
1373
|
getInitData: () => stepResults?.input,
|
|
1354
1374
|
getStepResult: getStepResult.bind(null, stepResults),
|
|
1355
|
-
// TODO: this function shouldn't have suspend probably?
|
|
1356
|
-
suspend: async (_suspendPayload) => {
|
|
1357
|
-
},
|
|
1358
1375
|
bail: () => {
|
|
1359
1376
|
},
|
|
1360
1377
|
abort: () => {
|
|
@@ -1364,7 +1381,7 @@ async function executeConditional(engine, params) {
|
|
|
1364
1381
|
[chunkABJOUEVA_cjs.STREAM_FORMAT_SYMBOL]: executionContext.format,
|
|
1365
1382
|
engine: engine.getEngineContext(),
|
|
1366
1383
|
abortSignal: abortController?.signal,
|
|
1367
|
-
writer: new
|
|
1384
|
+
writer: new chunk3JA6VPNM_cjs.ToolStream(
|
|
1368
1385
|
{
|
|
1369
1386
|
prefix: "workflow-step",
|
|
1370
1387
|
callId: crypto2.randomUUID(),
|
|
@@ -1579,7 +1596,7 @@ async function executeLoop(engine, params) {
|
|
|
1579
1596
|
const evalSpan = loopSpan?.createChildSpan({
|
|
1580
1597
|
type: "workflow_conditional_eval" /* WORKFLOW_CONDITIONAL_EVAL */,
|
|
1581
1598
|
name: `condition: '${entry.loopType}'`,
|
|
1582
|
-
input:
|
|
1599
|
+
input: chunk6C2PU6J4_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
|
|
1583
1600
|
attributes: {
|
|
1584
1601
|
conditionIndex: iteration
|
|
1585
1602
|
},
|
|
@@ -1594,9 +1611,6 @@ async function executeLoop(engine, params) {
|
|
|
1594
1611
|
requestContext,
|
|
1595
1612
|
inputData: result.output,
|
|
1596
1613
|
state: executionContext.state,
|
|
1597
|
-
setState: (state) => {
|
|
1598
|
-
executionContext.state = state;
|
|
1599
|
-
},
|
|
1600
1614
|
retryCount: -1,
|
|
1601
1615
|
tracingContext: {
|
|
1602
1616
|
currentSpan: evalSpan
|
|
@@ -1604,8 +1618,6 @@ async function executeLoop(engine, params) {
|
|
|
1604
1618
|
iterationCount: iteration + 1,
|
|
1605
1619
|
getInitData: () => stepResults?.input,
|
|
1606
1620
|
getStepResult: getStepResult.bind(null, stepResults),
|
|
1607
|
-
suspend: async (_suspendPayload) => {
|
|
1608
|
-
},
|
|
1609
1621
|
bail: () => {
|
|
1610
1622
|
},
|
|
1611
1623
|
abort: () => {
|
|
@@ -1615,7 +1627,7 @@ async function executeLoop(engine, params) {
|
|
|
1615
1627
|
[chunkABJOUEVA_cjs.STREAM_FORMAT_SYMBOL]: executionContext.format,
|
|
1616
1628
|
engine: engine.getEngineContext(),
|
|
1617
1629
|
abortSignal: abortController?.signal,
|
|
1618
|
-
writer: new
|
|
1630
|
+
writer: new chunk3JA6VPNM_cjs.ToolStream(
|
|
1619
1631
|
{
|
|
1620
1632
|
prefix: "workflow-step",
|
|
1621
1633
|
callId: crypto2.randomUUID(),
|
|
@@ -2319,7 +2331,7 @@ async function executeSleep(engine, params) {
|
|
|
2319
2331
|
requestContext,
|
|
2320
2332
|
inputData: prevOutput,
|
|
2321
2333
|
state: executionContext.state,
|
|
2322
|
-
setState: (state) => {
|
|
2334
|
+
setState: async (state) => {
|
|
2323
2335
|
executionContext.state = state;
|
|
2324
2336
|
},
|
|
2325
2337
|
retryCount: -1,
|
|
@@ -2340,7 +2352,7 @@ async function executeSleep(engine, params) {
|
|
|
2340
2352
|
[chunkABJOUEVA_cjs.STREAM_FORMAT_SYMBOL]: executionContext.format,
|
|
2341
2353
|
engine: engine.getEngineContext(),
|
|
2342
2354
|
abortSignal: abortController?.signal,
|
|
2343
|
-
writer: new
|
|
2355
|
+
writer: new chunk3JA6VPNM_cjs.ToolStream(
|
|
2344
2356
|
{
|
|
2345
2357
|
prefix: "workflow-step",
|
|
2346
2358
|
callId: stepCallId,
|
|
@@ -2400,7 +2412,7 @@ async function executeSleepUntil(engine, params) {
|
|
|
2400
2412
|
requestContext,
|
|
2401
2413
|
inputData: prevOutput,
|
|
2402
2414
|
state: executionContext.state,
|
|
2403
|
-
setState: (state) => {
|
|
2415
|
+
setState: async (state) => {
|
|
2404
2416
|
executionContext.state = state;
|
|
2405
2417
|
},
|
|
2406
2418
|
retryCount: -1,
|
|
@@ -2421,7 +2433,7 @@ async function executeSleepUntil(engine, params) {
|
|
|
2421
2433
|
[chunkABJOUEVA_cjs.STREAM_FORMAT_SYMBOL]: executionContext.format,
|
|
2422
2434
|
engine: engine.getEngineContext(),
|
|
2423
2435
|
abortSignal: abortController?.signal,
|
|
2424
|
-
writer: new
|
|
2436
|
+
writer: new chunk3JA6VPNM_cjs.ToolStream(
|
|
2425
2437
|
{
|
|
2426
2438
|
prefix: "workflow-step",
|
|
2427
2439
|
callId: stepCallId,
|
|
@@ -2605,13 +2617,20 @@ async function executeStep(engine, params) {
|
|
|
2605
2617
|
runId,
|
|
2606
2618
|
resourceId,
|
|
2607
2619
|
workflowId,
|
|
2608
|
-
mastra: engine.mastra ?
|
|
2620
|
+
mastra: engine.mastra ? chunk3EYBRHB2_cjs.wrapMastra(engine.mastra, { currentSpan: stepSpan }) : void 0,
|
|
2609
2621
|
requestContext,
|
|
2610
2622
|
inputData,
|
|
2611
2623
|
state: executionContext.state,
|
|
2612
|
-
setState: (state) => {
|
|
2613
|
-
|
|
2614
|
-
|
|
2624
|
+
setState: async (state) => {
|
|
2625
|
+
const { stateData, validationError: stateValidationError } = await validateStepStateData({
|
|
2626
|
+
stateData: state,
|
|
2627
|
+
step,
|
|
2628
|
+
validateInputs: engine.options?.validateInputs ?? true
|
|
2629
|
+
});
|
|
2630
|
+
if (stateValidationError) {
|
|
2631
|
+
throw stateValidationError;
|
|
2632
|
+
}
|
|
2633
|
+
contextMutations.stateUpdate = stateData;
|
|
2615
2634
|
},
|
|
2616
2635
|
retryCount,
|
|
2617
2636
|
resumeData: resumeDataToUse,
|
|
@@ -2622,7 +2641,8 @@ async function executeStep(engine, params) {
|
|
|
2622
2641
|
suspend: async (suspendPayload, suspendOptions) => {
|
|
2623
2642
|
const { suspendData, validationError: suspendValidationError } = await validateStepSuspendData({
|
|
2624
2643
|
suspendData: suspendPayload,
|
|
2625
|
-
step
|
|
2644
|
+
step,
|
|
2645
|
+
validateInputs: engine.options?.validateInputs ?? true
|
|
2626
2646
|
});
|
|
2627
2647
|
if (suspendValidationError) {
|
|
2628
2648
|
throw suspendValidationError;
|
|
@@ -2671,7 +2691,7 @@ async function executeStep(engine, params) {
|
|
|
2671
2691
|
[chunkABJOUEVA_cjs.STREAM_FORMAT_SYMBOL]: executionContext.format,
|
|
2672
2692
|
engine: engine.getEngineContext(),
|
|
2673
2693
|
abortSignal: abortController?.signal,
|
|
2674
|
-
writer: new
|
|
2694
|
+
writer: new chunk3JA6VPNM_cjs.ToolStream(
|
|
2675
2695
|
{
|
|
2676
2696
|
prefix: "workflow-step",
|
|
2677
2697
|
callId: stepCallId,
|
|
@@ -2697,9 +2717,6 @@ async function executeStep(engine, params) {
|
|
|
2697
2717
|
const { result: durableResult } = stepRetryResult;
|
|
2698
2718
|
Object.assign(executionContext.suspendedPaths, durableResult.contextMutations.suspendedPaths);
|
|
2699
2719
|
Object.assign(executionContext.resumeLabels, durableResult.contextMutations.resumeLabels);
|
|
2700
|
-
if (durableResult.contextMutations.stateUpdate !== null) {
|
|
2701
|
-
executionContext.state = durableResult.contextMutations.stateUpdate;
|
|
2702
|
-
}
|
|
2703
2720
|
if (engine.requiresDurableContextSerialization() && durableResult.contextMutations.requestContextUpdate) {
|
|
2704
2721
|
requestContext.clear();
|
|
2705
2722
|
for (const [key, value] of Object.entries(durableResult.contextMutations.requestContextUpdate)) {
|
|
@@ -2757,7 +2774,10 @@ async function executeStep(engine, params) {
|
|
|
2757
2774
|
return {
|
|
2758
2775
|
result: stepResult,
|
|
2759
2776
|
stepResults: { [step.id]: stepResult },
|
|
2760
|
-
mutableContext: engine.buildMutableContext(
|
|
2777
|
+
mutableContext: engine.buildMutableContext({
|
|
2778
|
+
...executionContext,
|
|
2779
|
+
state: stepRetryResult.ok ? stepRetryResult.result.contextMutations.stateUpdate ?? executionContext.state : executionContext.state
|
|
2780
|
+
}),
|
|
2761
2781
|
requestContext: engine.serializeRequestContext(requestContext)
|
|
2762
2782
|
};
|
|
2763
2783
|
}
|
|
@@ -3105,7 +3125,7 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
3105
3125
|
* Apply mutable context changes back to the execution context.
|
|
3106
3126
|
*/
|
|
3107
3127
|
applyMutableContext(executionContext, mutableContext) {
|
|
3108
|
-
executionContext.state
|
|
3128
|
+
Object.assign(executionContext.state, mutableContext.state);
|
|
3109
3129
|
Object.assign(executionContext.suspendedPaths, mutableContext.suspendedPaths);
|
|
3110
3130
|
Object.assign(executionContext.resumeLabels, mutableContext.resumeLabels);
|
|
3111
3131
|
}
|
|
@@ -3231,10 +3251,11 @@ var DefaultExecutionEngine = class extends ExecutionEngine {
|
|
|
3231
3251
|
}
|
|
3232
3252
|
});
|
|
3233
3253
|
}
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3254
|
+
return {
|
|
3255
|
+
...result2,
|
|
3256
|
+
...lastOutput.result.status === "suspended" && params.outputOptions?.includeResumeLabels ? { resumeLabels: lastOutput.mutableContext.resumeLabels } : {},
|
|
3257
|
+
...params.outputOptions?.includeState ? { state: lastState } : {}
|
|
3258
|
+
};
|
|
3238
3259
|
}
|
|
3239
3260
|
}
|
|
3240
3261
|
const result = await this.fmtReturnValue(params.emitter, stepResults, lastOutput.result);
|
|
@@ -4068,7 +4089,7 @@ var Workflow = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
4068
4089
|
return stepRes?.status === "suspended";
|
|
4069
4090
|
});
|
|
4070
4091
|
if (res.state) {
|
|
4071
|
-
setState(res.state);
|
|
4092
|
+
await setState(res.state);
|
|
4072
4093
|
}
|
|
4073
4094
|
if (suspendedSteps?.length) {
|
|
4074
4095
|
for (const [stepName, stepResult] of suspendedSteps) {
|
|
@@ -4373,7 +4394,7 @@ var Run = class {
|
|
|
4373
4394
|
format,
|
|
4374
4395
|
outputOptions
|
|
4375
4396
|
}) {
|
|
4376
|
-
const workflowSpan =
|
|
4397
|
+
const workflowSpan = chunk3EYBRHB2_cjs.getOrCreateSpan({
|
|
4377
4398
|
type: "workflow_run" /* WORKFLOW_RUN */,
|
|
4378
4399
|
name: `workflow run: '${this.workflowId}'`,
|
|
4379
4400
|
input: inputData,
|
|
@@ -4868,7 +4889,7 @@ var Run = class {
|
|
|
4868
4889
|
requestContextToUse.set(key, value);
|
|
4869
4890
|
}
|
|
4870
4891
|
});
|
|
4871
|
-
const workflowSpan =
|
|
4892
|
+
const workflowSpan = chunk3EYBRHB2_cjs.getOrCreateSpan({
|
|
4872
4893
|
type: "workflow_run" /* WORKFLOW_RUN */,
|
|
4873
4894
|
name: `workflow run: '${this.workflowId}'`,
|
|
4874
4895
|
input: resumeDataToUse,
|
|
@@ -4993,7 +5014,7 @@ var Run = class {
|
|
|
4993
5014
|
requestContextToUse.set(key, value);
|
|
4994
5015
|
}
|
|
4995
5016
|
}
|
|
4996
|
-
const workflowSpan =
|
|
5017
|
+
const workflowSpan = chunk3EYBRHB2_cjs.getOrCreateSpan({
|
|
4997
5018
|
type: "workflow_run" /* WORKFLOW_RUN */,
|
|
4998
5019
|
name: `workflow run: '${this.workflowId}'`,
|
|
4999
5020
|
attributes: {
|
|
@@ -5098,7 +5119,7 @@ var Run = class {
|
|
|
5098
5119
|
requestContextToUse.set(key, value);
|
|
5099
5120
|
}
|
|
5100
5121
|
}
|
|
5101
|
-
const workflowSpan =
|
|
5122
|
+
const workflowSpan = chunk3EYBRHB2_cjs.getOrCreateSpan({
|
|
5102
5123
|
type: "workflow_run" /* WORKFLOW_RUN */,
|
|
5103
5124
|
name: `workflow run: '${this.workflowId}'`,
|
|
5104
5125
|
input: inputData,
|
|
@@ -5409,7 +5430,7 @@ var ProcessorRunner = class {
|
|
|
5409
5430
|
requestContext
|
|
5410
5431
|
});
|
|
5411
5432
|
const mutations = messageList.stopRecording();
|
|
5412
|
-
if (result instanceof
|
|
5433
|
+
if (result instanceof chunkYBEW5YWC_cjs.MessageList) {
|
|
5413
5434
|
if (result !== messageList) {
|
|
5414
5435
|
throw new chunkTWH4PTDG_cjs.MastraError({
|
|
5415
5436
|
category: "USER",
|
|
@@ -5589,7 +5610,7 @@ var ProcessorRunner = class {
|
|
|
5589
5610
|
requestContext
|
|
5590
5611
|
});
|
|
5591
5612
|
let mutations;
|
|
5592
|
-
if (result instanceof
|
|
5613
|
+
if (result instanceof chunkYBEW5YWC_cjs.MessageList) {
|
|
5593
5614
|
if (result !== messageList) {
|
|
5594
5615
|
throw new chunkTWH4PTDG_cjs.MastraError({
|
|
5595
5616
|
category: "USER",
|
|
@@ -5710,7 +5731,7 @@ var ProcessorRunner = class {
|
|
|
5710
5731
|
requestContext
|
|
5711
5732
|
});
|
|
5712
5733
|
const mutations = messageList.stopRecording();
|
|
5713
|
-
if (result instanceof
|
|
5734
|
+
if (result instanceof chunkYBEW5YWC_cjs.MessageList) {
|
|
5714
5735
|
if (result !== messageList) {
|
|
5715
5736
|
throw new chunkTWH4PTDG_cjs.MastraError({
|
|
5716
5737
|
category: "USER",
|
|
@@ -6154,7 +6175,7 @@ function convertMastraChunkToAISDKv5({
|
|
|
6154
6175
|
if (mode === "generate") {
|
|
6155
6176
|
return {
|
|
6156
6177
|
type: "file",
|
|
6157
|
-
file: new
|
|
6178
|
+
file: new chunkYBEW5YWC_cjs.DefaultGeneratedFile({
|
|
6158
6179
|
data: chunk.payload.data,
|
|
6159
6180
|
mediaType: chunk.payload.mimeType
|
|
6160
6181
|
})
|
|
@@ -6162,7 +6183,7 @@ function convertMastraChunkToAISDKv5({
|
|
|
6162
6183
|
}
|
|
6163
6184
|
return {
|
|
6164
6185
|
type: "file",
|
|
6165
|
-
file: new
|
|
6186
|
+
file: new chunkYBEW5YWC_cjs.DefaultGeneratedFileWithType({
|
|
6166
6187
|
data: chunk.payload.data,
|
|
6167
6188
|
mediaType: chunk.payload.mimeType
|
|
6168
6189
|
})
|
|
@@ -6278,18 +6299,39 @@ function convertMastraChunkToAISDKv5({
|
|
|
6278
6299
|
}
|
|
6279
6300
|
|
|
6280
6301
|
// src/stream/aisdk/v5/input.ts
|
|
6302
|
+
function isNumericId(id) {
|
|
6303
|
+
return /^\d+$/.test(id);
|
|
6304
|
+
}
|
|
6281
6305
|
var AISDKV5InputStream = class extends MastraModelInput {
|
|
6282
|
-
|
|
6306
|
+
#generateId;
|
|
6307
|
+
constructor({
|
|
6308
|
+
component,
|
|
6309
|
+
name,
|
|
6310
|
+
generateId: generateId3
|
|
6311
|
+
}) {
|
|
6283
6312
|
super({ component, name });
|
|
6313
|
+
this.#generateId = generateId3 ?? aiV5.generateId;
|
|
6284
6314
|
}
|
|
6285
6315
|
async transform({
|
|
6286
6316
|
runId,
|
|
6287
6317
|
stream,
|
|
6288
6318
|
controller
|
|
6289
6319
|
}) {
|
|
6320
|
+
const idMap = /* @__PURE__ */ new Map();
|
|
6290
6321
|
for await (const chunk of stream) {
|
|
6291
|
-
const
|
|
6322
|
+
const rawChunk = chunk;
|
|
6323
|
+
if (rawChunk.type === "stream-start") {
|
|
6324
|
+
idMap.clear();
|
|
6325
|
+
}
|
|
6326
|
+
const transformedChunk = convertFullStreamChunkToMastra(rawChunk, { runId });
|
|
6292
6327
|
if (transformedChunk) {
|
|
6328
|
+
if ((transformedChunk.type === "text-start" || transformedChunk.type === "text-delta" || transformedChunk.type === "text-end") && transformedChunk.payload?.id && isNumericId(transformedChunk.payload.id)) {
|
|
6329
|
+
const originalId = transformedChunk.payload.id;
|
|
6330
|
+
if (!idMap.has(originalId)) {
|
|
6331
|
+
idMap.set(originalId, this.#generateId());
|
|
6332
|
+
}
|
|
6333
|
+
transformedChunk.payload.id = idMap.get(originalId);
|
|
6334
|
+
}
|
|
6293
6335
|
controller.enqueue(transformedChunk);
|
|
6294
6336
|
}
|
|
6295
6337
|
}
|
|
@@ -6318,11 +6360,13 @@ function execute({
|
|
|
6318
6360
|
structuredOutput,
|
|
6319
6361
|
headers,
|
|
6320
6362
|
shouldThrowError,
|
|
6321
|
-
methodType
|
|
6363
|
+
methodType,
|
|
6364
|
+
generateId: generateId3
|
|
6322
6365
|
}) {
|
|
6323
6366
|
const v5 = new AISDKV5InputStream({
|
|
6324
6367
|
component: "LLM",
|
|
6325
|
-
name: model.modelId
|
|
6368
|
+
name: model.modelId,
|
|
6369
|
+
generateId: generateId3
|
|
6326
6370
|
});
|
|
6327
6371
|
const toolsAndToolChoice = prepareToolsAndToolChoice({
|
|
6328
6372
|
tools,
|
|
@@ -6948,7 +6992,7 @@ function createLLMExecutionStep({
|
|
|
6948
6992
|
}
|
|
6949
6993
|
if (prepareStepResult.messages) {
|
|
6950
6994
|
const newMessages = prepareStepResult.messages;
|
|
6951
|
-
const newMessageList = new
|
|
6995
|
+
const newMessageList = new chunkYBEW5YWC_cjs.MessageList();
|
|
6952
6996
|
for (const message of newMessages) {
|
|
6953
6997
|
if (message.role === "system") {
|
|
6954
6998
|
newMessageList.addSystem(message);
|
|
@@ -6965,7 +7009,7 @@ function createLLMExecutionStep({
|
|
|
6965
7009
|
console.error("Error in prepareStep callback:", error);
|
|
6966
7010
|
}
|
|
6967
7011
|
}
|
|
6968
|
-
modelResult =
|
|
7012
|
+
modelResult = chunk3EYBRHB2_cjs.executeWithContextSync({
|
|
6969
7013
|
span: modelSpanTracker?.getTracingContext()?.currentSpan,
|
|
6970
7014
|
fn: () => execute({
|
|
6971
7015
|
runId,
|
|
@@ -6980,6 +7024,7 @@ function createLLMExecutionStep({
|
|
|
6980
7024
|
structuredOutput,
|
|
6981
7025
|
headers,
|
|
6982
7026
|
methodType,
|
|
7027
|
+
generateId: _internal?.generateId,
|
|
6983
7028
|
onResult: ({
|
|
6984
7029
|
warnings: warningsFromStream,
|
|
6985
7030
|
request: requestFromStream,
|
|
@@ -7795,6 +7840,31 @@ function workflowLoopStream({
|
|
|
7795
7840
|
requestContext
|
|
7796
7841
|
});
|
|
7797
7842
|
if (executionResult.status !== "success") {
|
|
7843
|
+
if (executionResult.status === "failed") {
|
|
7844
|
+
let executionResultError = executionResult.error;
|
|
7845
|
+
if (typeof executionResult.error === "string") {
|
|
7846
|
+
const prependedErrorString = "Error: ";
|
|
7847
|
+
if (executionResult.error.startsWith(`${prependedErrorString}${prependedErrorString}`)) {
|
|
7848
|
+
executionResultError = executionResult.error.substring(
|
|
7849
|
+
`${prependedErrorString}${prependedErrorString}`.length
|
|
7850
|
+
);
|
|
7851
|
+
} else if (executionResult.error.startsWith(prependedErrorString)) {
|
|
7852
|
+
executionResultError = executionResult.error.substring(prependedErrorString.length);
|
|
7853
|
+
}
|
|
7854
|
+
}
|
|
7855
|
+
const error = chunkTWH4PTDG_cjs.getErrorFromUnknown(executionResultError, {
|
|
7856
|
+
fallbackMessage: "Unknown error in agent workflow stream"
|
|
7857
|
+
});
|
|
7858
|
+
controller.enqueue({
|
|
7859
|
+
type: "error",
|
|
7860
|
+
runId,
|
|
7861
|
+
from: "AGENT" /* AGENT */,
|
|
7862
|
+
payload: { error }
|
|
7863
|
+
});
|
|
7864
|
+
if (rest.options?.onError) {
|
|
7865
|
+
await rest.options?.onError?.({ error });
|
|
7866
|
+
}
|
|
7867
|
+
}
|
|
7798
7868
|
controller.close();
|
|
7799
7869
|
return;
|
|
7800
7870
|
}
|
|
@@ -8043,6 +8113,7 @@ var MastraLLMVNext = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
8043
8113
|
resourceId,
|
|
8044
8114
|
structuredOutput,
|
|
8045
8115
|
options,
|
|
8116
|
+
inputProcessors,
|
|
8046
8117
|
outputProcessors,
|
|
8047
8118
|
returnScorerData,
|
|
8048
8119
|
providerOptions,
|
|
@@ -8106,6 +8177,7 @@ var MastraLLMVNext = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
8106
8177
|
providerOptions,
|
|
8107
8178
|
_internal,
|
|
8108
8179
|
structuredOutput,
|
|
8180
|
+
inputProcessors,
|
|
8109
8181
|
outputProcessors,
|
|
8110
8182
|
returnScorerData,
|
|
8111
8183
|
modelSpanTracker,
|
|
@@ -8154,7 +8226,7 @@ var MastraLLMVNext = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
8154
8226
|
const remainingTokens = parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"] ?? "", 10);
|
|
8155
8227
|
if (!isNaN(remainingTokens) && remainingTokens > 0 && remainingTokens < 2e3) {
|
|
8156
8228
|
this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
|
|
8157
|
-
await
|
|
8229
|
+
await chunk6C2PU6J4_cjs.delay(10 * 1e3);
|
|
8158
8230
|
}
|
|
8159
8231
|
},
|
|
8160
8232
|
onFinish: async (props) => {
|
|
@@ -8176,7 +8248,9 @@ var MastraLLMVNext = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
8176
8248
|
totalTokens: props?.totalUsage?.totalTokens,
|
|
8177
8249
|
reasoningTokens: props?.totalUsage?.reasoningTokens,
|
|
8178
8250
|
cachedInputTokens: props?.totalUsage?.cachedInputTokens
|
|
8179
|
-
}
|
|
8251
|
+
},
|
|
8252
|
+
responseId: props?.response.id,
|
|
8253
|
+
responseModel: props?.response.modelId
|
|
8180
8254
|
}
|
|
8181
8255
|
});
|
|
8182
8256
|
try {
|
|
@@ -8466,7 +8540,7 @@ async function prepareMemoryStep({
|
|
|
8466
8540
|
);
|
|
8467
8541
|
}
|
|
8468
8542
|
} else {
|
|
8469
|
-
const messageList = new
|
|
8543
|
+
const messageList = new chunkYBEW5YWC_cjs.MessageList({
|
|
8470
8544
|
threadId: thread?.id,
|
|
8471
8545
|
resourceId: thread?.resourceId
|
|
8472
8546
|
});
|
|
@@ -9526,7 +9600,7 @@ var AgentLegacyHandler = class {
|
|
|
9526
9600
|
if (process.env.NODE_ENV !== "test") {
|
|
9527
9601
|
this.capabilities.logger.debug(`[Agents:${this.capabilities.name}] - Starting generation`, { runId });
|
|
9528
9602
|
}
|
|
9529
|
-
const agentSpan =
|
|
9603
|
+
const agentSpan = chunk3EYBRHB2_cjs.getOrCreateSpan({
|
|
9530
9604
|
type: "agent_run" /* AGENT_RUN */,
|
|
9531
9605
|
name: `agent run: '${this.capabilities.id}'`,
|
|
9532
9606
|
input: {
|
|
@@ -9534,6 +9608,7 @@ var AgentLegacyHandler = class {
|
|
|
9534
9608
|
},
|
|
9535
9609
|
attributes: {
|
|
9536
9610
|
agentId: this.capabilities.id,
|
|
9611
|
+
agentName: this.capabilities.name,
|
|
9537
9612
|
instructions: this.capabilities.convertInstructionsToString(instructions),
|
|
9538
9613
|
availableTools: [
|
|
9539
9614
|
...toolsets ? Object.keys(toolsets) : [],
|
|
@@ -9579,7 +9654,7 @@ var AgentLegacyHandler = class {
|
|
|
9579
9654
|
methodType: methodType === "generate" ? "generateLegacy" : "streamLegacy",
|
|
9580
9655
|
memoryConfig
|
|
9581
9656
|
});
|
|
9582
|
-
let messageList = new
|
|
9657
|
+
let messageList = new chunkYBEW5YWC_cjs.MessageList({
|
|
9583
9658
|
threadId,
|
|
9584
9659
|
resourceId,
|
|
9585
9660
|
generateMessageId: this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),
|
|
@@ -9720,7 +9795,7 @@ var AgentLegacyHandler = class {
|
|
|
9720
9795
|
result: resToLog,
|
|
9721
9796
|
threadId
|
|
9722
9797
|
});
|
|
9723
|
-
const messageListResponses = new
|
|
9798
|
+
const messageListResponses = new chunkYBEW5YWC_cjs.MessageList({
|
|
9724
9799
|
threadId,
|
|
9725
9800
|
resourceId,
|
|
9726
9801
|
generateMessageId: this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),
|
|
@@ -12101,7 +12176,7 @@ var BatchPartsProcessor = class {
|
|
|
12101
12176
|
const combinedText = textChunks.map((part) => part.type === "text-delta" ? part.payload.text : "").join("");
|
|
12102
12177
|
const combinedChunk = {
|
|
12103
12178
|
type: "text-delta",
|
|
12104
|
-
payload: { text: combinedText, id: "1" },
|
|
12179
|
+
payload: { text: combinedText, id: "text-1" },
|
|
12105
12180
|
runId: "1",
|
|
12106
12181
|
from: "AGENT" /* AGENT */
|
|
12107
12182
|
};
|
|
@@ -12788,6 +12863,9 @@ var isAugmentedSymbol = Symbol("isAugmented");
|
|
|
12788
12863
|
function augmentWithInit(storage) {
|
|
12789
12864
|
let hasInitialized = null;
|
|
12790
12865
|
const ensureInit = async () => {
|
|
12866
|
+
if (storage.disableInit) {
|
|
12867
|
+
return;
|
|
12868
|
+
}
|
|
12791
12869
|
if (!hasInitialized) {
|
|
12792
12870
|
hasInitialized = storage.init();
|
|
12793
12871
|
}
|
|
@@ -12904,7 +12982,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
12904
12982
|
);
|
|
12905
12983
|
}
|
|
12906
12984
|
if (typeof config.embedder === "string") {
|
|
12907
|
-
this.embedder = new
|
|
12985
|
+
this.embedder = new chunk6BYHQ52F_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
12908
12986
|
} else {
|
|
12909
12987
|
this.embedder = config.embedder;
|
|
12910
12988
|
}
|
|
@@ -13000,7 +13078,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
13000
13078
|
"The threads.generateTitle option has been moved. Use the top-level generateTitle option instead."
|
|
13001
13079
|
);
|
|
13002
13080
|
}
|
|
13003
|
-
const mergedConfig =
|
|
13081
|
+
const mergedConfig = chunk6C2PU6J4_cjs.deepMerge(this.threadConfig, config || {});
|
|
13004
13082
|
if (typeof config?.workingMemory === "object" && config.workingMemory?.schema && typeof mergedConfig.workingMemory === "object") {
|
|
13005
13083
|
mergedConfig.workingMemory.schema = config.workingMemory.schema;
|
|
13006
13084
|
}
|
|
@@ -13236,7 +13314,7 @@ var MockMemory = class extends MastraMemory {
|
|
|
13236
13314
|
} = {}) {
|
|
13237
13315
|
super({
|
|
13238
13316
|
name: "mock",
|
|
13239
|
-
storage: storage || new
|
|
13317
|
+
storage: storage || new chunkKBXFAF37_cjs.InMemoryStore(),
|
|
13240
13318
|
options: {
|
|
13241
13319
|
workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : void 0,
|
|
13242
13320
|
lastMessages: enableMessageHistory ? 10 : void 0
|
|
@@ -13750,7 +13828,7 @@ var SemanticRecall = class {
|
|
|
13750
13828
|
*/
|
|
13751
13829
|
formatCrossThreadMessages(messages, currentThreadId) {
|
|
13752
13830
|
let result = ``;
|
|
13753
|
-
const v1Messages = new
|
|
13831
|
+
const v1Messages = new chunkYBEW5YWC_cjs.MessageList().add(messages, "memory").get.all.v1();
|
|
13754
13832
|
let lastYmd = null;
|
|
13755
13833
|
for (const msg of v1Messages) {
|
|
13756
13834
|
const date = msg.createdAt;
|
|
@@ -14091,6 +14169,9 @@ function createMapResultsStep({
|
|
|
14091
14169
|
const structuredProcessor = new StructuredOutputProcessor(options.structuredOutput);
|
|
14092
14170
|
effectiveOutputProcessors = effectiveOutputProcessors ? [...effectiveOutputProcessors, structuredProcessor] : [structuredProcessor];
|
|
14093
14171
|
}
|
|
14172
|
+
const effectiveInputProcessors = options.inputProcessors || (capabilities.inputProcessors ? typeof capabilities.inputProcessors === "function" ? await capabilities.inputProcessors({
|
|
14173
|
+
requestContext: result.requestContext
|
|
14174
|
+
}) : capabilities.inputProcessors : []);
|
|
14094
14175
|
const messageList = memoryData.messageList;
|
|
14095
14176
|
const modelMethodType = getModelMethodFromAgentMethod(methodType);
|
|
14096
14177
|
const loopOptions = {
|
|
@@ -14157,6 +14238,7 @@ function createMapResultsStep({
|
|
|
14157
14238
|
abortSignal: options.abortSignal
|
|
14158
14239
|
},
|
|
14159
14240
|
structuredOutput: options.structuredOutput,
|
|
14241
|
+
inputProcessors: effectiveInputProcessors,
|
|
14160
14242
|
outputProcessors: effectiveOutputProcessors,
|
|
14161
14243
|
modelSettings: {
|
|
14162
14244
|
temperature: 0,
|
|
@@ -14198,7 +14280,7 @@ var prepareToolsStepOutputSchema = z5.z.object({
|
|
|
14198
14280
|
var prepareMemoryStepOutputSchema = z5.z.object({
|
|
14199
14281
|
threadExists: z5.z.boolean(),
|
|
14200
14282
|
thread: storageThreadSchema.optional(),
|
|
14201
|
-
messageList: z5.z.instanceof(
|
|
14283
|
+
messageList: z5.z.instanceof(chunkYBEW5YWC_cjs.MessageList),
|
|
14202
14284
|
tripwire: z5.z.boolean().optional(),
|
|
14203
14285
|
tripwireReason: z5.z.string().optional()
|
|
14204
14286
|
});
|
|
@@ -14231,7 +14313,7 @@ function createPrepareMemoryStep({
|
|
|
14231
14313
|
outputSchema: prepareMemoryStepOutputSchema,
|
|
14232
14314
|
execute: async ({ tracingContext }) => {
|
|
14233
14315
|
const thread = threadFromArgs;
|
|
14234
|
-
const messageList = new
|
|
14316
|
+
const messageList = new chunkYBEW5YWC_cjs.MessageList({
|
|
14235
14317
|
threadId: thread?.id,
|
|
14236
14318
|
resourceId,
|
|
14237
14319
|
generateMessageId: capabilities.generateMessageId,
|
|
@@ -14303,7 +14385,7 @@ function createPrepareMemoryStep({
|
|
|
14303
14385
|
title: thread.title,
|
|
14304
14386
|
memoryConfig,
|
|
14305
14387
|
resourceId,
|
|
14306
|
-
saveThread:
|
|
14388
|
+
saveThread: true
|
|
14307
14389
|
});
|
|
14308
14390
|
}
|
|
14309
14391
|
requestContext.set("MastraMemory", {
|
|
@@ -15103,7 +15185,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15103
15185
|
*/
|
|
15104
15186
|
listTools({ requestContext = new chunkUVHSM2GU_cjs.RequestContext() } = {}) {
|
|
15105
15187
|
if (typeof this.#tools !== "function") {
|
|
15106
|
-
return
|
|
15188
|
+
return chunk6C2PU6J4_cjs.ensureToolProperties(this.#tools);
|
|
15107
15189
|
}
|
|
15108
15190
|
const result = this.#tools({ requestContext, mastra: this.#mastra });
|
|
15109
15191
|
return resolveMaybePromise(result, (tools) => {
|
|
@@ -15121,7 +15203,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15121
15203
|
this.logger.error(mastraError.toString());
|
|
15122
15204
|
throw mastraError;
|
|
15123
15205
|
}
|
|
15124
|
-
return
|
|
15206
|
+
return chunk6C2PU6J4_cjs.ensureToolProperties(tools);
|
|
15125
15207
|
});
|
|
15126
15208
|
}
|
|
15127
15209
|
/**
|
|
@@ -15153,7 +15235,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15153
15235
|
});
|
|
15154
15236
|
});
|
|
15155
15237
|
} else {
|
|
15156
|
-
llm = new
|
|
15238
|
+
llm = new chunkYUXTDKYN_cjs.MastraLLMV1({
|
|
15157
15239
|
model: resolvedModel,
|
|
15158
15240
|
mastra: this.#mastra,
|
|
15159
15241
|
options: { tracingPolicy: this.#options?.tracingPolicy }
|
|
@@ -15178,7 +15260,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15178
15260
|
*/
|
|
15179
15261
|
async resolveModelConfig(modelConfig, requestContext) {
|
|
15180
15262
|
try {
|
|
15181
|
-
return await
|
|
15263
|
+
return await chunk6BYHQ52F_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
|
|
15182
15264
|
} catch (error) {
|
|
15183
15265
|
const mastraError = new chunkTWH4PTDG_cjs.MastraError({
|
|
15184
15266
|
id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
|
|
@@ -15384,7 +15466,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15384
15466
|
instructions
|
|
15385
15467
|
}) {
|
|
15386
15468
|
const llm = await this.getLLM({ requestContext, model });
|
|
15387
|
-
const normMessage = new
|
|
15469
|
+
const normMessage = new chunkYBEW5YWC_cjs.MessageList().add(message, "user").get.all.ui().at(-1);
|
|
15388
15470
|
if (!normMessage) {
|
|
15389
15471
|
throw new Error(`Could not generate title from input ${JSON.stringify(message)}`);
|
|
15390
15472
|
}
|
|
@@ -15407,7 +15489,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15407
15489
|
const systemInstructions = await this.resolveTitleInstructions(requestContext, instructions);
|
|
15408
15490
|
let text = "";
|
|
15409
15491
|
if (llm.getModel().specificationVersion === "v2") {
|
|
15410
|
-
const messageList = new
|
|
15492
|
+
const messageList = new chunkYBEW5YWC_cjs.MessageList().add(
|
|
15411
15493
|
[
|
|
15412
15494
|
{
|
|
15413
15495
|
role: "system",
|
|
@@ -15459,7 +15541,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15459
15541
|
async genTitle(userMessage, requestContext, tracingContext, model, instructions) {
|
|
15460
15542
|
try {
|
|
15461
15543
|
if (userMessage) {
|
|
15462
|
-
const normMessage = new
|
|
15544
|
+
const normMessage = new chunkYBEW5YWC_cjs.MessageList().add(userMessage, "user").get.all.ui().at(-1);
|
|
15463
15545
|
if (normMessage) {
|
|
15464
15546
|
return await this.generateTitleFromUserMessage({
|
|
15465
15547
|
message: normMessage,
|
|
@@ -15523,7 +15605,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15523
15605
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
15524
15606
|
requireApproval: toolObj.requireApproval
|
|
15525
15607
|
};
|
|
15526
|
-
const convertedToCoreTool =
|
|
15608
|
+
const convertedToCoreTool = chunk6C2PU6J4_cjs.makeCoreTool(toolObj, options);
|
|
15527
15609
|
convertedMemoryTools[toolName] = convertedToCoreTool;
|
|
15528
15610
|
}
|
|
15529
15611
|
}
|
|
@@ -15673,7 +15755,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15673
15755
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
15674
15756
|
requireApproval: tool.requireApproval
|
|
15675
15757
|
};
|
|
15676
|
-
return [k,
|
|
15758
|
+
return [k, chunk6C2PU6J4_cjs.makeCoreTool(tool, options)];
|
|
15677
15759
|
})
|
|
15678
15760
|
);
|
|
15679
15761
|
const assignedToolEntriesConverted = Object.fromEntries(
|
|
@@ -15722,7 +15804,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15722
15804
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
15723
15805
|
requireApproval: toolObj.requireApproval
|
|
15724
15806
|
};
|
|
15725
|
-
const convertedToCoreTool =
|
|
15807
|
+
const convertedToCoreTool = chunk6C2PU6J4_cjs.makeCoreTool(toolObj, options, "toolset");
|
|
15726
15808
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
15727
15809
|
}
|
|
15728
15810
|
}
|
|
@@ -15766,7 +15848,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15766
15848
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
15767
15849
|
requireApproval: tool.requireApproval
|
|
15768
15850
|
};
|
|
15769
|
-
const convertedToCoreTool =
|
|
15851
|
+
const convertedToCoreTool = chunk6C2PU6J4_cjs.makeCoreTool(rest, options, "client-tool");
|
|
15770
15852
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
15771
15853
|
}
|
|
15772
15854
|
}
|
|
@@ -15802,10 +15884,10 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15802
15884
|
subAgentThreadId: z5.z.string().describe("The thread ID of the agent").optional(),
|
|
15803
15885
|
subAgentResourceId: z5.z.string().describe("The resource ID of the agent").optional()
|
|
15804
15886
|
});
|
|
15805
|
-
const modelVersion = (await agent.getModel()).specificationVersion;
|
|
15887
|
+
const modelVersion = (await agent.getModel({ requestContext })).specificationVersion;
|
|
15806
15888
|
const toolObj = chunkY24HI6ND_cjs.createTool({
|
|
15807
15889
|
id: `agent-${agentName}`,
|
|
15808
|
-
description: `Agent: ${agentName}`,
|
|
15890
|
+
description: agent.getDescription() || `Agent: ${agentName}`,
|
|
15809
15891
|
inputSchema: agentInputSchema,
|
|
15810
15892
|
outputSchema: agentOutputSchema,
|
|
15811
15893
|
mastra: this.#mastra,
|
|
@@ -15935,7 +16017,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15935
16017
|
tracingContext,
|
|
15936
16018
|
tracingPolicy: this.#options?.tracingPolicy
|
|
15937
16019
|
};
|
|
15938
|
-
convertedAgentTools[`agent-${agentName}`] =
|
|
16020
|
+
convertedAgentTools[`agent-${agentName}`] = chunk6C2PU6J4_cjs.makeCoreTool(toolObj, options);
|
|
15939
16021
|
}
|
|
15940
16022
|
}
|
|
15941
16023
|
return convertedAgentTools;
|
|
@@ -15987,16 +16069,25 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15987
16069
|
threadId,
|
|
15988
16070
|
resourceId
|
|
15989
16071
|
});
|
|
15990
|
-
const run = await workflow.createRun();
|
|
16072
|
+
const run = await workflow.createRun({ runId });
|
|
15991
16073
|
const { initialState, inputData: workflowInputData } = inputData;
|
|
16074
|
+
const { resumeData, suspend } = context?.agent ?? {};
|
|
15992
16075
|
let result = void 0;
|
|
15993
16076
|
if (methodType === "generate" || methodType === "generateLegacy") {
|
|
15994
|
-
|
|
15995
|
-
|
|
15996
|
-
|
|
15997
|
-
|
|
15998
|
-
|
|
15999
|
-
|
|
16077
|
+
if (resumeData) {
|
|
16078
|
+
result = await run.resume({
|
|
16079
|
+
resumeData,
|
|
16080
|
+
requestContext,
|
|
16081
|
+
tracingContext: context?.tracingContext
|
|
16082
|
+
});
|
|
16083
|
+
} else {
|
|
16084
|
+
result = await run.start({
|
|
16085
|
+
inputData: workflowInputData,
|
|
16086
|
+
requestContext,
|
|
16087
|
+
tracingContext: context?.tracingContext,
|
|
16088
|
+
...initialState && { initialState }
|
|
16089
|
+
});
|
|
16090
|
+
}
|
|
16000
16091
|
} else if (methodType === "streamLegacy") {
|
|
16001
16092
|
const streamResult = run.streamLegacy({
|
|
16002
16093
|
inputData: workflowInputData,
|
|
@@ -16011,7 +16102,11 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16011
16102
|
}
|
|
16012
16103
|
result = await streamResult.getWorkflowState();
|
|
16013
16104
|
} else if (methodType === "stream") {
|
|
16014
|
-
const streamResult = run.
|
|
16105
|
+
const streamResult = resumeData ? run.resumeStream({
|
|
16106
|
+
resumeData,
|
|
16107
|
+
requestContext,
|
|
16108
|
+
tracingContext: context?.tracingContext
|
|
16109
|
+
}) : run.stream({
|
|
16015
16110
|
inputData: workflowInputData,
|
|
16016
16111
|
requestContext,
|
|
16017
16112
|
tracingContext: context?.tracingContext,
|
|
@@ -16032,10 +16127,12 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16032
16127
|
runId: run.runId
|
|
16033
16128
|
};
|
|
16034
16129
|
} else if (result?.status === "suspended") {
|
|
16035
|
-
|
|
16036
|
-
|
|
16037
|
-
|
|
16038
|
-
|
|
16130
|
+
const suspendedStep = result?.suspended?.[0]?.[0];
|
|
16131
|
+
const suspendPayload = result?.steps?.[suspendedStep]?.suspendPayload;
|
|
16132
|
+
if (suspendPayload?.__workflow_meta) {
|
|
16133
|
+
delete suspendPayload.__workflow_meta;
|
|
16134
|
+
}
|
|
16135
|
+
return suspend?.(suspendPayload);
|
|
16039
16136
|
} else {
|
|
16040
16137
|
return {
|
|
16041
16138
|
error: `Workflow should never reach this path, workflow returned no status`,
|
|
@@ -16078,7 +16175,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16078
16175
|
tracingContext,
|
|
16079
16176
|
tracingPolicy: this.#options?.tracingPolicy
|
|
16080
16177
|
};
|
|
16081
|
-
convertedWorkflowTools[`workflow-${workflowName}`] =
|
|
16178
|
+
convertedWorkflowTools[`workflow-${workflowName}`] = chunk6C2PU6J4_cjs.makeCoreTool(toolObj, options);
|
|
16082
16179
|
}
|
|
16083
16180
|
}
|
|
16084
16181
|
return convertedWorkflowTools;
|
|
@@ -16102,7 +16199,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16102
16199
|
let mastraProxy = void 0;
|
|
16103
16200
|
const logger = this.logger;
|
|
16104
16201
|
if (this.#mastra) {
|
|
16105
|
-
mastraProxy =
|
|
16202
|
+
mastraProxy = chunk6C2PU6J4_cjs.createMastraProxy({ mastra: this.#mastra, logger });
|
|
16106
16203
|
}
|
|
16107
16204
|
const assignedTools = await this.listAssignedTools({
|
|
16108
16205
|
runId,
|
|
@@ -16426,7 +16523,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16426
16523
|
const targetProvider = structuredOutputModel.provider;
|
|
16427
16524
|
const targetModelId = structuredOutputModel.modelId;
|
|
16428
16525
|
if (targetProvider.includes("openai") || targetModelId.includes("openai")) {
|
|
16429
|
-
if (
|
|
16526
|
+
if (chunk6C2PU6J4_cjs.isZodType(options.structuredOutput.schema) && targetModelId) {
|
|
16430
16527
|
const modelInfo = {
|
|
16431
16528
|
provider: targetProvider,
|
|
16432
16529
|
modelId: targetModelId,
|
|
@@ -16445,12 +16542,14 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16445
16542
|
}
|
|
16446
16543
|
const runId = options.runId || this.#mastra?.generateId() || crypto2.randomUUID();
|
|
16447
16544
|
const instructions = options.instructions || await this.getInstructions({ requestContext });
|
|
16448
|
-
const agentSpan =
|
|
16545
|
+
const agentSpan = chunk3EYBRHB2_cjs.getOrCreateSpan({
|
|
16449
16546
|
type: "agent_run" /* AGENT_RUN */,
|
|
16450
16547
|
name: `agent run: '${this.id}'`,
|
|
16451
16548
|
input: options.messages,
|
|
16452
16549
|
attributes: {
|
|
16453
16550
|
agentId: this.id,
|
|
16551
|
+
agentName: this.name,
|
|
16552
|
+
conversationId: threadFromArgs?.id,
|
|
16454
16553
|
instructions: this.#convertInstructionsToString(instructions)
|
|
16455
16554
|
},
|
|
16456
16555
|
metadata: {
|
|
@@ -16484,6 +16583,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16484
16583
|
getMemoryMessages: this.getMemoryMessages.bind(this),
|
|
16485
16584
|
runInputProcessors: this.__runInputProcessors.bind(this),
|
|
16486
16585
|
executeOnFinish: this.#executeOnFinish.bind(this),
|
|
16586
|
+
inputProcessors: async ({ requestContext: requestContext2 }) => this.listResolvedInputProcessors(requestContext2),
|
|
16487
16587
|
outputProcessors: async ({ requestContext: requestContext2 }) => this.listResolvedOutputProcessors(requestContext2),
|
|
16488
16588
|
llm
|
|
16489
16589
|
};
|
|
@@ -18163,7 +18263,7 @@ var MastraModelOutput = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
18163
18263
|
options.tracingContext,
|
|
18164
18264
|
self.#options.requestContext
|
|
18165
18265
|
);
|
|
18166
|
-
const outputText = self.messageList.get.response.aiV4.core().map((m) =>
|
|
18266
|
+
const outputText = self.messageList.get.response.aiV4.core().map((m) => chunkYBEW5YWC_cjs.MessageList.coreContentToString(m.content)).join("\n");
|
|
18167
18267
|
self.#delayedPromises.text.resolve(outputText);
|
|
18168
18268
|
self.#delayedPromises.finishReason.resolve(self.#finishReason);
|
|
18169
18269
|
if (chunk.payload.metadata) {
|
|
@@ -18810,6 +18910,7 @@ exports.tryGenerateWithJsonFallback = tryGenerateWithJsonFallback;
|
|
|
18810
18910
|
exports.tryStreamWithJsonFallback = tryStreamWithJsonFallback;
|
|
18811
18911
|
exports.validateStepInput = validateStepInput;
|
|
18812
18912
|
exports.validateStepResumeData = validateStepResumeData;
|
|
18913
|
+
exports.validateStepStateData = validateStepStateData;
|
|
18813
18914
|
exports.validateStepSuspendData = validateStepSuspendData;
|
|
18814
|
-
//# sourceMappingURL=chunk-
|
|
18815
|
-
//# sourceMappingURL=chunk-
|
|
18915
|
+
//# sourceMappingURL=chunk-HP6TRJ2Q.cjs.map
|
|
18916
|
+
//# sourceMappingURL=chunk-HP6TRJ2Q.cjs.map
|