@mastra/core 1.0.0-beta.8 → 1.0.0-beta.9
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 +57 -0
- package/dist/agent/agent.d.ts +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/index.d.ts +2 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts +2 -1
- package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
- package/dist/{chunk-Y7YCQDML.cjs → chunk-3DRGAKUH.cjs} +382 -13
- package/dist/chunk-3DRGAKUH.cjs.map +1 -0
- package/dist/{chunk-RWT3XPKO.js → chunk-4GLDYGNN.js} +3 -3
- package/dist/{chunk-RWT3XPKO.js.map → chunk-4GLDYGNN.js.map} +1 -1
- package/dist/{chunk-4GTU7MB2.js → chunk-7IMDJAYQ.js} +5 -5
- package/dist/{chunk-4GTU7MB2.js.map → chunk-7IMDJAYQ.js.map} +1 -1
- package/dist/{chunk-KBXFAF37.cjs → chunk-7S7TLMTS.cjs} +287 -10
- package/dist/chunk-7S7TLMTS.cjs.map +1 -0
- package/dist/{chunk-QHJ7YVNX.js → chunk-A4C3AGVS.js} +5 -5
- package/dist/{chunk-QHJ7YVNX.js.map → chunk-A4C3AGVS.js.map} +1 -1
- package/dist/{chunk-DMPHPHMU.js → chunk-APMPOYPI.js} +3 -3
- package/dist/{chunk-DMPHPHMU.js.map → chunk-APMPOYPI.js.map} +1 -1
- package/dist/{chunk-EDNHZZUP.js → chunk-ARSSSQQP.js} +69 -11
- package/dist/chunk-ARSSSQQP.js.map +1 -0
- package/dist/{chunk-6BYHQ52F.cjs → chunk-CKRWR5DS.cjs} +15 -15
- package/dist/{chunk-6BYHQ52F.cjs.map → chunk-CKRWR5DS.cjs.map} +1 -1
- package/dist/{chunk-SD2BDUJ6.cjs → chunk-DWB7SBVC.cjs} +23 -23
- package/dist/{chunk-SD2BDUJ6.cjs.map → chunk-DWB7SBVC.cjs.map} +1 -1
- package/dist/{chunk-VWC5AUOQ.cjs → chunk-EGXQVF75.cjs} +372 -6
- package/dist/chunk-EGXQVF75.cjs.map +1 -0
- package/dist/{chunk-QYNZAPFE.cjs → chunk-F77YTHXI.cjs} +4 -4
- package/dist/{chunk-QYNZAPFE.cjs.map → chunk-F77YTHXI.cjs.map} +1 -1
- package/dist/{chunk-6C2PU6J4.cjs → chunk-HSRQXO6F.cjs} +6 -6
- package/dist/{chunk-6C2PU6J4.cjs.map → chunk-HSRQXO6F.cjs.map} +1 -1
- package/dist/{chunk-YUXTDKYN.cjs → chunk-IISGCZJ4.cjs} +15 -15
- package/dist/{chunk-YUXTDKYN.cjs.map → chunk-IISGCZJ4.cjs.map} +1 -1
- package/dist/{chunk-SPIUKQDK.js → chunk-LB7UOP2X.js} +376 -7
- package/dist/chunk-LB7UOP2X.js.map +1 -0
- package/dist/{chunk-URBPEE67.js → chunk-MCRIVYUB.js} +3 -3
- package/dist/{chunk-URBPEE67.js.map → chunk-MCRIVYUB.js.map} +1 -1
- package/dist/{chunk-AZQMPE7G.cjs → chunk-MRFUISXC.cjs} +3 -3
- package/dist/{chunk-AZQMPE7G.cjs.map → chunk-MRFUISXC.cjs.map} +1 -1
- package/dist/{chunk-TLLXRG2Z.js → chunk-OEIVMCWX.js} +3 -3
- package/dist/{chunk-TLLXRG2Z.js.map → chunk-OEIVMCWX.js.map} +1 -1
- package/dist/{chunk-FNSFXWDN.js → chunk-PIHOAJTA.js} +2 -2
- package/dist/chunk-PIHOAJTA.js.map +1 -0
- package/dist/{chunk-ZUWJCGLM.js → chunk-QM5SRDJX.js} +4 -5
- package/dist/chunk-QM5SRDJX.js.map +1 -0
- package/dist/{chunk-7PXCGGMO.js → chunk-QTEIZ2XG.js} +3 -3
- package/dist/{chunk-7PXCGGMO.js.map → chunk-QTEIZ2XG.js.map} +1 -1
- package/dist/{chunk-Y5SFNZUK.cjs → chunk-RIG4JP3V.cjs} +11 -11
- package/dist/{chunk-Y5SFNZUK.cjs.map → chunk-RIG4JP3V.cjs.map} +1 -1
- package/dist/{chunk-GW7BNMGA.js → chunk-SLX3NVAC.js} +4 -4
- package/dist/{chunk-GW7BNMGA.js.map → chunk-SLX3NVAC.js.map} +1 -1
- package/dist/{chunk-TQB2HMEC.cjs → chunk-SVLMF4UZ.cjs} +44 -45
- package/dist/chunk-SVLMF4UZ.cjs.map +1 -0
- package/dist/{chunk-3EYBRHB2.cjs → chunk-UVM27J4A.cjs} +2 -2
- package/dist/chunk-UVM27J4A.cjs.map +1 -0
- package/dist/{chunk-QDIYYAA4.js → chunk-VQ3FTSRC.js} +371 -5
- package/dist/chunk-VQ3FTSRC.js.map +1 -0
- package/dist/{chunk-YBEW5YWC.cjs → chunk-VRFSEZBA.cjs} +6 -6
- package/dist/{chunk-YBEW5YWC.cjs.map → chunk-VRFSEZBA.cjs.map} +1 -1
- package/dist/{chunk-HP6TRJ2Q.cjs → chunk-XMT5T4F2.cjs} +111 -52
- package/dist/chunk-XMT5T4F2.cjs.map +1 -0
- package/dist/{chunk-HDMH5IDV.js → chunk-ZINZHEXZ.js} +282 -9
- package/dist/chunk-ZINZHEXZ.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 +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +11 -11
- package/dist/llm/index.js +3 -3
- 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-types.generated.d.ts +176 -1
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts +2 -2
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/types.d.ts +1 -0
- package/dist/loop/types.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +191 -5
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +6 -6
- package/dist/memory/index.js +1 -1
- package/dist/memory/memory.d.ts +6 -0
- package/dist/memory/memory.d.ts.map +1 -1
- package/dist/models-dev-23RN2WHG.js +3 -0
- package/dist/{models-dev-6GD3644V.js.map → models-dev-23RN2WHG.js.map} +1 -1
- package/dist/models-dev-EO3SUIY2.cjs +12 -0
- package/dist/{models-dev-IUQBXJSS.cjs.map → models-dev-EO3SUIY2.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 +4 -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-FM3IVY6C.js +3 -0
- package/dist/{provider-registry-A5QZFI2X.js.map → provider-registry-FM3IVY6C.js.map} +1 -1
- package/dist/provider-registry-Q6T32VC5.cjs +40 -0
- package/dist/{provider-registry-V32PGH6F.cjs.map → provider-registry-Q6T32VC5.cjs.map} +1 -1
- package/dist/provider-registry.json +368 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +1 -1
- package/dist/storage/base.d.ts +50 -2
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.d.ts +3 -1
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/domains/agents/base.d.ts +49 -0
- package/dist/storage/domains/agents/base.d.ts.map +1 -0
- package/dist/storage/domains/agents/index.d.ts +3 -0
- package/dist/storage/domains/agents/index.d.ts.map +1 -0
- package/dist/storage/domains/agents/inmemory.d.ts +22 -0
- package/dist/storage/domains/agents/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/index.d.ts +1 -0
- package/dist/storage/domains/index.d.ts.map +1 -1
- package/dist/storage/domains/operations/inmemory.d.ts.map +1 -1
- package/dist/storage/index.cjs +50 -34
- package/dist/storage/index.js +1 -1
- package/dist/storage/mock.d.ts +1 -0
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +82 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/base/output-format-handlers.d.ts +13 -0
- package/dist/stream/base/output-format-handlers.d.ts.map +1 -1
- package/dist/stream/index.cjs +15 -11
- package/dist/stream/index.d.ts +1 -1
- package/dist/stream/index.d.ts.map +1 -1
- package/dist/stream/index.js +2 -2
- package/dist/test-utils/llm-mock.cjs +10 -10
- package/dist/test-utils/llm-mock.js +3 -3
- package/dist/utils.cjs +22 -22
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +2 -2
- 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 +21 -21
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/workflow.d.ts +2 -2
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/llm/model/provider-types.generated.d.ts +176 -1
- package/dist/chunk-3EYBRHB2.cjs.map +0 -1
- package/dist/chunk-EDNHZZUP.js.map +0 -1
- package/dist/chunk-FNSFXWDN.js.map +0 -1
- package/dist/chunk-HDMH5IDV.js.map +0 -1
- package/dist/chunk-HP6TRJ2Q.cjs.map +0 -1
- package/dist/chunk-KBXFAF37.cjs.map +0 -1
- package/dist/chunk-QDIYYAA4.js.map +0 -1
- package/dist/chunk-SPIUKQDK.js.map +0 -1
- package/dist/chunk-TQB2HMEC.cjs.map +0 -1
- package/dist/chunk-VWC5AUOQ.cjs.map +0 -1
- package/dist/chunk-Y7YCQDML.cjs.map +0 -1
- package/dist/chunk-ZUWJCGLM.js.map +0 -1
- package/dist/models-dev-6GD3644V.js +0 -3
- package/dist/models-dev-IUQBXJSS.cjs +0 -12
- package/dist/provider-registry-A5QZFI2X.js +0 -3
- package/dist/provider-registry-V32PGH6F.cjs +0 -40
|
@@ -2,13 +2,13 @@
|
|
|
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 chunk7S7TLMTS_cjs = require('./chunk-7S7TLMTS.cjs');
|
|
6
|
+
var chunkVRFSEZBA_cjs = require('./chunk-VRFSEZBA.cjs');
|
|
7
|
+
var chunkCKRWR5DS_cjs = require('./chunk-CKRWR5DS.cjs');
|
|
8
|
+
var chunkIISGCZJ4_cjs = require('./chunk-IISGCZJ4.cjs');
|
|
9
9
|
var chunkMR7ZWBL6_cjs = require('./chunk-MR7ZWBL6.cjs');
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var chunkHSRQXO6F_cjs = require('./chunk-HSRQXO6F.cjs');
|
|
11
|
+
var chunkUVM27J4A_cjs = require('./chunk-UVM27J4A.cjs');
|
|
12
12
|
var chunkTWH4PTDG_cjs = require('./chunk-TWH4PTDG.cjs');
|
|
13
13
|
var chunk3JA6VPNM_cjs = require('./chunk-3JA6VPNM.cjs');
|
|
14
14
|
var chunkY24HI6ND_cjs = require('./chunk-Y24HI6ND.cjs');
|
|
@@ -1161,7 +1161,7 @@ var createTimeTravelExecutionParams = (params) => {
|
|
|
1161
1161
|
result = void 0;
|
|
1162
1162
|
}
|
|
1163
1163
|
if (result) {
|
|
1164
|
-
const formattedResult =
|
|
1164
|
+
const formattedResult = chunkHSRQXO6F_cjs.removeUndefinedValues(result);
|
|
1165
1165
|
stepResults[stepId] = formattedResult;
|
|
1166
1166
|
}
|
|
1167
1167
|
});
|
|
@@ -1596,7 +1596,7 @@ async function executeLoop(engine, params) {
|
|
|
1596
1596
|
const evalSpan = loopSpan?.createChildSpan({
|
|
1597
1597
|
type: "workflow_conditional_eval" /* WORKFLOW_CONDITIONAL_EVAL */,
|
|
1598
1598
|
name: `condition: '${entry.loopType}'`,
|
|
1599
|
-
input:
|
|
1599
|
+
input: chunkHSRQXO6F_cjs.selectFields(result.output, ["stepResult", "output.text", "output.object", "messages"]),
|
|
1600
1600
|
attributes: {
|
|
1601
1601
|
conditionIndex: iteration
|
|
1602
1602
|
},
|
|
@@ -2617,7 +2617,7 @@ async function executeStep(engine, params) {
|
|
|
2617
2617
|
runId,
|
|
2618
2618
|
resourceId,
|
|
2619
2619
|
workflowId,
|
|
2620
|
-
mastra: engine.mastra ?
|
|
2620
|
+
mastra: engine.mastra ? chunkUVM27J4A_cjs.wrapMastra(engine.mastra, { currentSpan: stepSpan }) : void 0,
|
|
2621
2621
|
requestContext,
|
|
2622
2622
|
inputData,
|
|
2623
2623
|
state: executionContext.state,
|
|
@@ -4394,7 +4394,7 @@ var Run = class {
|
|
|
4394
4394
|
format,
|
|
4395
4395
|
outputOptions
|
|
4396
4396
|
}) {
|
|
4397
|
-
const workflowSpan =
|
|
4397
|
+
const workflowSpan = chunkUVM27J4A_cjs.getOrCreateSpan({
|
|
4398
4398
|
type: "workflow_run" /* WORKFLOW_RUN */,
|
|
4399
4399
|
name: `workflow run: '${this.workflowId}'`,
|
|
4400
4400
|
input: inputData,
|
|
@@ -4889,7 +4889,7 @@ var Run = class {
|
|
|
4889
4889
|
requestContextToUse.set(key, value);
|
|
4890
4890
|
}
|
|
4891
4891
|
});
|
|
4892
|
-
const workflowSpan =
|
|
4892
|
+
const workflowSpan = chunkUVM27J4A_cjs.getOrCreateSpan({
|
|
4893
4893
|
type: "workflow_run" /* WORKFLOW_RUN */,
|
|
4894
4894
|
name: `workflow run: '${this.workflowId}'`,
|
|
4895
4895
|
input: resumeDataToUse,
|
|
@@ -5014,7 +5014,7 @@ var Run = class {
|
|
|
5014
5014
|
requestContextToUse.set(key, value);
|
|
5015
5015
|
}
|
|
5016
5016
|
}
|
|
5017
|
-
const workflowSpan =
|
|
5017
|
+
const workflowSpan = chunkUVM27J4A_cjs.getOrCreateSpan({
|
|
5018
5018
|
type: "workflow_run" /* WORKFLOW_RUN */,
|
|
5019
5019
|
name: `workflow run: '${this.workflowId}'`,
|
|
5020
5020
|
attributes: {
|
|
@@ -5119,7 +5119,7 @@ var Run = class {
|
|
|
5119
5119
|
requestContextToUse.set(key, value);
|
|
5120
5120
|
}
|
|
5121
5121
|
}
|
|
5122
|
-
const workflowSpan =
|
|
5122
|
+
const workflowSpan = chunkUVM27J4A_cjs.getOrCreateSpan({
|
|
5123
5123
|
type: "workflow_run" /* WORKFLOW_RUN */,
|
|
5124
5124
|
name: `workflow run: '${this.workflowId}'`,
|
|
5125
5125
|
input: inputData,
|
|
@@ -5430,7 +5430,7 @@ var ProcessorRunner = class {
|
|
|
5430
5430
|
requestContext
|
|
5431
5431
|
});
|
|
5432
5432
|
const mutations = messageList.stopRecording();
|
|
5433
|
-
if (result instanceof
|
|
5433
|
+
if (result instanceof chunkVRFSEZBA_cjs.MessageList) {
|
|
5434
5434
|
if (result !== messageList) {
|
|
5435
5435
|
throw new chunkTWH4PTDG_cjs.MastraError({
|
|
5436
5436
|
category: "USER",
|
|
@@ -5610,7 +5610,7 @@ var ProcessorRunner = class {
|
|
|
5610
5610
|
requestContext
|
|
5611
5611
|
});
|
|
5612
5612
|
let mutations;
|
|
5613
|
-
if (result instanceof
|
|
5613
|
+
if (result instanceof chunkVRFSEZBA_cjs.MessageList) {
|
|
5614
5614
|
if (result !== messageList) {
|
|
5615
5615
|
throw new chunkTWH4PTDG_cjs.MastraError({
|
|
5616
5616
|
category: "USER",
|
|
@@ -5731,7 +5731,7 @@ var ProcessorRunner = class {
|
|
|
5731
5731
|
requestContext
|
|
5732
5732
|
});
|
|
5733
5733
|
const mutations = messageList.stopRecording();
|
|
5734
|
-
if (result instanceof
|
|
5734
|
+
if (result instanceof chunkVRFSEZBA_cjs.MessageList) {
|
|
5735
5735
|
if (result !== messageList) {
|
|
5736
5736
|
throw new chunkTWH4PTDG_cjs.MastraError({
|
|
5737
5737
|
category: "USER",
|
|
@@ -6175,7 +6175,7 @@ function convertMastraChunkToAISDKv5({
|
|
|
6175
6175
|
if (mode === "generate") {
|
|
6176
6176
|
return {
|
|
6177
6177
|
type: "file",
|
|
6178
|
-
file: new
|
|
6178
|
+
file: new chunkVRFSEZBA_cjs.DefaultGeneratedFile({
|
|
6179
6179
|
data: chunk.payload.data,
|
|
6180
6180
|
mediaType: chunk.payload.mimeType
|
|
6181
6181
|
})
|
|
@@ -6183,7 +6183,7 @@ function convertMastraChunkToAISDKv5({
|
|
|
6183
6183
|
}
|
|
6184
6184
|
return {
|
|
6185
6185
|
type: "file",
|
|
6186
|
-
file: new
|
|
6186
|
+
file: new chunkVRFSEZBA_cjs.DefaultGeneratedFileWithType({
|
|
6187
6187
|
data: chunk.payload.data,
|
|
6188
6188
|
mediaType: chunk.payload.mimeType
|
|
6189
6189
|
})
|
|
@@ -6992,7 +6992,7 @@ function createLLMExecutionStep({
|
|
|
6992
6992
|
}
|
|
6993
6993
|
if (prepareStepResult.messages) {
|
|
6994
6994
|
const newMessages = prepareStepResult.messages;
|
|
6995
|
-
const newMessageList = new
|
|
6995
|
+
const newMessageList = new chunkVRFSEZBA_cjs.MessageList();
|
|
6996
6996
|
for (const message of newMessages) {
|
|
6997
6997
|
if (message.role === "system") {
|
|
6998
6998
|
newMessageList.addSystem(message);
|
|
@@ -7009,7 +7009,7 @@ function createLLMExecutionStep({
|
|
|
7009
7009
|
console.error("Error in prepareStep callback:", error);
|
|
7010
7010
|
}
|
|
7011
7011
|
}
|
|
7012
|
-
modelResult =
|
|
7012
|
+
modelResult = chunkUVM27J4A_cjs.executeWithContextSync({
|
|
7013
7013
|
span: modelSpanTracker?.getTracingContext()?.currentSpan,
|
|
7014
7014
|
fn: () => execute({
|
|
7015
7015
|
runId,
|
|
@@ -8122,6 +8122,7 @@ var MastraLLMVNext = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
8122
8122
|
requireToolApproval,
|
|
8123
8123
|
_internal,
|
|
8124
8124
|
agentId,
|
|
8125
|
+
agentName,
|
|
8125
8126
|
toolCallId,
|
|
8126
8127
|
requestContext,
|
|
8127
8128
|
methodType,
|
|
@@ -8149,6 +8150,8 @@ var MastraLLMVNext = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
8149
8150
|
messages: [...messageList.getSystemMessages(), ...messages]
|
|
8150
8151
|
},
|
|
8151
8152
|
attributes: {
|
|
8153
|
+
agentId,
|
|
8154
|
+
agentName,
|
|
8152
8155
|
model: firstModel.modelId,
|
|
8153
8156
|
provider: firstModel.provider,
|
|
8154
8157
|
streaming: true,
|
|
@@ -8183,6 +8186,7 @@ var MastraLLMVNext = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
8183
8186
|
modelSpanTracker,
|
|
8184
8187
|
requireToolApproval,
|
|
8185
8188
|
agentId,
|
|
8189
|
+
agentName,
|
|
8186
8190
|
requestContext,
|
|
8187
8191
|
methodType,
|
|
8188
8192
|
includeRawChunks,
|
|
@@ -8226,7 +8230,7 @@ var MastraLLMVNext = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
8226
8230
|
const remainingTokens = parseInt(props?.response?.headers?.["x-ratelimit-remaining-tokens"] ?? "", 10);
|
|
8227
8231
|
if (!isNaN(remainingTokens) && remainingTokens > 0 && remainingTokens < 2e3) {
|
|
8228
8232
|
this.logger.warn("Rate limit approaching, waiting 10 seconds", { runId });
|
|
8229
|
-
await
|
|
8233
|
+
await chunkHSRQXO6F_cjs.delay(10 * 1e3);
|
|
8230
8234
|
}
|
|
8231
8235
|
},
|
|
8232
8236
|
onFinish: async (props) => {
|
|
@@ -8540,7 +8544,7 @@ async function prepareMemoryStep({
|
|
|
8540
8544
|
);
|
|
8541
8545
|
}
|
|
8542
8546
|
} else {
|
|
8543
|
-
const messageList = new
|
|
8547
|
+
const messageList = new chunkVRFSEZBA_cjs.MessageList({
|
|
8544
8548
|
threadId: thread?.id,
|
|
8545
8549
|
resourceId: thread?.resourceId
|
|
8546
8550
|
});
|
|
@@ -9215,6 +9219,7 @@ ${completionResult?.object?.finalResult}` : ""}
|
|
|
9215
9219
|
mastra: agent.getMastraInstance(),
|
|
9216
9220
|
agent: {
|
|
9217
9221
|
resourceId: initData.threadResourceId || networkName,
|
|
9222
|
+
toolCallId,
|
|
9218
9223
|
threadId: initData.threadId
|
|
9219
9224
|
},
|
|
9220
9225
|
runId,
|
|
@@ -9600,7 +9605,7 @@ var AgentLegacyHandler = class {
|
|
|
9600
9605
|
if (process.env.NODE_ENV !== "test") {
|
|
9601
9606
|
this.capabilities.logger.debug(`[Agents:${this.capabilities.name}] - Starting generation`, { runId });
|
|
9602
9607
|
}
|
|
9603
|
-
const agentSpan =
|
|
9608
|
+
const agentSpan = chunkUVM27J4A_cjs.getOrCreateSpan({
|
|
9604
9609
|
type: "agent_run" /* AGENT_RUN */,
|
|
9605
9610
|
name: `agent run: '${this.capabilities.id}'`,
|
|
9606
9611
|
input: {
|
|
@@ -9654,7 +9659,7 @@ var AgentLegacyHandler = class {
|
|
|
9654
9659
|
methodType: methodType === "generate" ? "generateLegacy" : "streamLegacy",
|
|
9655
9660
|
memoryConfig
|
|
9656
9661
|
});
|
|
9657
|
-
let messageList = new
|
|
9662
|
+
let messageList = new chunkVRFSEZBA_cjs.MessageList({
|
|
9658
9663
|
threadId,
|
|
9659
9664
|
resourceId,
|
|
9660
9665
|
generateMessageId: this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),
|
|
@@ -9795,7 +9800,7 @@ var AgentLegacyHandler = class {
|
|
|
9795
9800
|
result: resToLog,
|
|
9796
9801
|
threadId
|
|
9797
9802
|
});
|
|
9798
|
-
const messageListResponses = new
|
|
9803
|
+
const messageListResponses = new chunkVRFSEZBA_cjs.MessageList({
|
|
9799
9804
|
threadId,
|
|
9800
9805
|
resourceId,
|
|
9801
9806
|
generateMessageId: this.capabilities.mastra?.generateId?.bind(this.capabilities.mastra),
|
|
@@ -12924,6 +12929,11 @@ var memoryDefaultOptions = {
|
|
|
12924
12929
|
}
|
|
12925
12930
|
};
|
|
12926
12931
|
var MastraMemory = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
12932
|
+
/**
|
|
12933
|
+
* Unique identifier for the memory instance.
|
|
12934
|
+
* If not provided, defaults to a static name 'default-memory'.
|
|
12935
|
+
*/
|
|
12936
|
+
id;
|
|
12927
12937
|
MAX_CONTEXT_TOKENS;
|
|
12928
12938
|
_storage;
|
|
12929
12939
|
vector;
|
|
@@ -12932,6 +12942,7 @@ var MastraMemory = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
12932
12942
|
#mastra;
|
|
12933
12943
|
constructor(config) {
|
|
12934
12944
|
super({ component: "MEMORY", name: config.name });
|
|
12945
|
+
this.id = config.id ?? config.name ?? "default-memory";
|
|
12935
12946
|
if (config.options) this.threadConfig = this.getMergedThreadConfig(config.options);
|
|
12936
12947
|
if (config.processors) {
|
|
12937
12948
|
throw new Error(
|
|
@@ -12982,7 +12993,7 @@ https://mastra.ai/en/docs/memory/semantic-recall`
|
|
|
12982
12993
|
);
|
|
12983
12994
|
}
|
|
12984
12995
|
if (typeof config.embedder === "string") {
|
|
12985
|
-
this.embedder = new
|
|
12996
|
+
this.embedder = new chunkCKRWR5DS_cjs.ModelRouterEmbeddingModel(config.embedder);
|
|
12986
12997
|
} else {
|
|
12987
12998
|
this.embedder = config.embedder;
|
|
12988
12999
|
}
|
|
@@ -13078,7 +13089,7 @@ https://mastra.ai/en/docs/memory/overview`
|
|
|
13078
13089
|
"The threads.generateTitle option has been moved. Use the top-level generateTitle option instead."
|
|
13079
13090
|
);
|
|
13080
13091
|
}
|
|
13081
|
-
const mergedConfig =
|
|
13092
|
+
const mergedConfig = chunkHSRQXO6F_cjs.deepMerge(this.threadConfig, config || {});
|
|
13082
13093
|
if (typeof config?.workingMemory === "object" && config.workingMemory?.schema && typeof mergedConfig.workingMemory === "object") {
|
|
13083
13094
|
mergedConfig.workingMemory.schema = config.workingMemory.schema;
|
|
13084
13095
|
}
|
|
@@ -13314,7 +13325,7 @@ var MockMemory = class extends MastraMemory {
|
|
|
13314
13325
|
} = {}) {
|
|
13315
13326
|
super({
|
|
13316
13327
|
name: "mock",
|
|
13317
|
-
storage: storage || new
|
|
13328
|
+
storage: storage || new chunk7S7TLMTS_cjs.InMemoryStore(),
|
|
13318
13329
|
options: {
|
|
13319
13330
|
workingMemory: enableWorkingMemory ? { enabled: true, template: workingMemoryTemplate } : void 0,
|
|
13320
13331
|
lastMessages: enableMessageHistory ? 10 : void 0
|
|
@@ -13828,7 +13839,7 @@ var SemanticRecall = class {
|
|
|
13828
13839
|
*/
|
|
13829
13840
|
formatCrossThreadMessages(messages, currentThreadId) {
|
|
13830
13841
|
let result = ``;
|
|
13831
|
-
const v1Messages = new
|
|
13842
|
+
const v1Messages = new chunkVRFSEZBA_cjs.MessageList().add(messages, "memory").get.all.v1();
|
|
13832
13843
|
let lastYmd = null;
|
|
13833
13844
|
for (const msg of v1Messages) {
|
|
13834
13845
|
const date = msg.createdAt;
|
|
@@ -14280,7 +14291,7 @@ var prepareToolsStepOutputSchema = z5.z.object({
|
|
|
14280
14291
|
var prepareMemoryStepOutputSchema = z5.z.object({
|
|
14281
14292
|
threadExists: z5.z.boolean(),
|
|
14282
14293
|
thread: storageThreadSchema.optional(),
|
|
14283
|
-
messageList: z5.z.instanceof(
|
|
14294
|
+
messageList: z5.z.instanceof(chunkVRFSEZBA_cjs.MessageList),
|
|
14284
14295
|
tripwire: z5.z.boolean().optional(),
|
|
14285
14296
|
tripwireReason: z5.z.string().optional()
|
|
14286
14297
|
});
|
|
@@ -14313,7 +14324,7 @@ function createPrepareMemoryStep({
|
|
|
14313
14324
|
outputSchema: prepareMemoryStepOutputSchema,
|
|
14314
14325
|
execute: async ({ tracingContext }) => {
|
|
14315
14326
|
const thread = threadFromArgs;
|
|
14316
|
-
const messageList = new
|
|
14327
|
+
const messageList = new chunkVRFSEZBA_cjs.MessageList({
|
|
14317
14328
|
threadId: thread?.id,
|
|
14318
14329
|
resourceId,
|
|
14319
14330
|
generateMessageId: capabilities.generateMessageId,
|
|
@@ -14465,6 +14476,7 @@ function createStreamStep({
|
|
|
14465
14476
|
requireToolApproval,
|
|
14466
14477
|
resumeContext,
|
|
14467
14478
|
agentId,
|
|
14479
|
+
agentName,
|
|
14468
14480
|
toolCallId,
|
|
14469
14481
|
methodType,
|
|
14470
14482
|
saveQueueManager,
|
|
@@ -14505,6 +14517,7 @@ function createStreamStep({
|
|
|
14505
14517
|
memory
|
|
14506
14518
|
},
|
|
14507
14519
|
agentId,
|
|
14520
|
+
agentName,
|
|
14508
14521
|
toolCallId,
|
|
14509
14522
|
methodType: modelMethodType
|
|
14510
14523
|
});
|
|
@@ -14531,6 +14544,7 @@ function createPrepareStreamWorkflow({
|
|
|
14531
14544
|
requireToolApproval,
|
|
14532
14545
|
resumeContext,
|
|
14533
14546
|
agentId,
|
|
14547
|
+
agentName,
|
|
14534
14548
|
toolCallId
|
|
14535
14549
|
}) {
|
|
14536
14550
|
const prepareToolsStep = createPrepareToolsStep({
|
|
@@ -14562,6 +14576,7 @@ function createPrepareStreamWorkflow({
|
|
|
14562
14576
|
requireToolApproval,
|
|
14563
14577
|
resumeContext,
|
|
14564
14578
|
agentId,
|
|
14579
|
+
agentName,
|
|
14565
14580
|
toolCallId,
|
|
14566
14581
|
methodType,
|
|
14567
14582
|
saveQueueManager,
|
|
@@ -15185,7 +15200,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15185
15200
|
*/
|
|
15186
15201
|
listTools({ requestContext = new chunkUVHSM2GU_cjs.RequestContext() } = {}) {
|
|
15187
15202
|
if (typeof this.#tools !== "function") {
|
|
15188
|
-
return
|
|
15203
|
+
return chunkHSRQXO6F_cjs.ensureToolProperties(this.#tools);
|
|
15189
15204
|
}
|
|
15190
15205
|
const result = this.#tools({ requestContext, mastra: this.#mastra });
|
|
15191
15206
|
return resolveMaybePromise(result, (tools) => {
|
|
@@ -15203,7 +15218,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15203
15218
|
this.logger.error(mastraError.toString());
|
|
15204
15219
|
throw mastraError;
|
|
15205
15220
|
}
|
|
15206
|
-
return
|
|
15221
|
+
return chunkHSRQXO6F_cjs.ensureToolProperties(tools);
|
|
15207
15222
|
});
|
|
15208
15223
|
}
|
|
15209
15224
|
/**
|
|
@@ -15235,7 +15250,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15235
15250
|
});
|
|
15236
15251
|
});
|
|
15237
15252
|
} else {
|
|
15238
|
-
llm = new
|
|
15253
|
+
llm = new chunkIISGCZJ4_cjs.MastraLLMV1({
|
|
15239
15254
|
model: resolvedModel,
|
|
15240
15255
|
mastra: this.#mastra,
|
|
15241
15256
|
options: { tracingPolicy: this.#options?.tracingPolicy }
|
|
@@ -15260,7 +15275,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15260
15275
|
*/
|
|
15261
15276
|
async resolveModelConfig(modelConfig, requestContext) {
|
|
15262
15277
|
try {
|
|
15263
|
-
return await
|
|
15278
|
+
return await chunkCKRWR5DS_cjs.resolveModelConfig(modelConfig, requestContext, this.#mastra);
|
|
15264
15279
|
} catch (error) {
|
|
15265
15280
|
const mastraError = new chunkTWH4PTDG_cjs.MastraError({
|
|
15266
15281
|
id: "AGENT_GET_MODEL_MISSING_MODEL_INSTANCE",
|
|
@@ -15466,7 +15481,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15466
15481
|
instructions
|
|
15467
15482
|
}) {
|
|
15468
15483
|
const llm = await this.getLLM({ requestContext, model });
|
|
15469
|
-
const normMessage = new
|
|
15484
|
+
const normMessage = new chunkVRFSEZBA_cjs.MessageList().add(message, "user").get.all.ui().at(-1);
|
|
15470
15485
|
if (!normMessage) {
|
|
15471
15486
|
throw new Error(`Could not generate title from input ${JSON.stringify(message)}`);
|
|
15472
15487
|
}
|
|
@@ -15489,7 +15504,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15489
15504
|
const systemInstructions = await this.resolveTitleInstructions(requestContext, instructions);
|
|
15490
15505
|
let text = "";
|
|
15491
15506
|
if (llm.getModel().specificationVersion === "v2") {
|
|
15492
|
-
const messageList = new
|
|
15507
|
+
const messageList = new chunkVRFSEZBA_cjs.MessageList().add(
|
|
15493
15508
|
[
|
|
15494
15509
|
{
|
|
15495
15510
|
role: "system",
|
|
@@ -15511,7 +15526,8 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15511
15526
|
requestContext,
|
|
15512
15527
|
tracingContext,
|
|
15513
15528
|
messageList,
|
|
15514
|
-
agentId: this.id
|
|
15529
|
+
agentId: this.id,
|
|
15530
|
+
agentName: this.name
|
|
15515
15531
|
});
|
|
15516
15532
|
text = await result.text;
|
|
15517
15533
|
} else {
|
|
@@ -15541,7 +15557,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15541
15557
|
async genTitle(userMessage, requestContext, tracingContext, model, instructions) {
|
|
15542
15558
|
try {
|
|
15543
15559
|
if (userMessage) {
|
|
15544
|
-
const normMessage = new
|
|
15560
|
+
const normMessage = new chunkVRFSEZBA_cjs.MessageList().add(userMessage, "user").get.all.ui().at(-1);
|
|
15545
15561
|
if (normMessage) {
|
|
15546
15562
|
return await this.generateTitleFromUserMessage({
|
|
15547
15563
|
message: normMessage,
|
|
@@ -15605,7 +15621,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15605
15621
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
15606
15622
|
requireApproval: toolObj.requireApproval
|
|
15607
15623
|
};
|
|
15608
|
-
const convertedToCoreTool =
|
|
15624
|
+
const convertedToCoreTool = chunkHSRQXO6F_cjs.makeCoreTool(toolObj, options);
|
|
15609
15625
|
convertedMemoryTools[toolName] = convertedToCoreTool;
|
|
15610
15626
|
}
|
|
15611
15627
|
}
|
|
@@ -15755,7 +15771,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15755
15771
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
15756
15772
|
requireApproval: tool.requireApproval
|
|
15757
15773
|
};
|
|
15758
|
-
return [k,
|
|
15774
|
+
return [k, chunkHSRQXO6F_cjs.makeCoreTool(tool, options)];
|
|
15759
15775
|
})
|
|
15760
15776
|
);
|
|
15761
15777
|
const assignedToolEntriesConverted = Object.fromEntries(
|
|
@@ -15804,7 +15820,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15804
15820
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
15805
15821
|
requireApproval: toolObj.requireApproval
|
|
15806
15822
|
};
|
|
15807
|
-
const convertedToCoreTool =
|
|
15823
|
+
const convertedToCoreTool = chunkHSRQXO6F_cjs.makeCoreTool(toolObj, options, "toolset");
|
|
15808
15824
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
15809
15825
|
}
|
|
15810
15826
|
}
|
|
@@ -15848,7 +15864,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
15848
15864
|
tracingPolicy: this.#options?.tracingPolicy,
|
|
15849
15865
|
requireApproval: tool.requireApproval
|
|
15850
15866
|
};
|
|
15851
|
-
const convertedToCoreTool =
|
|
15867
|
+
const convertedToCoreTool = chunkHSRQXO6F_cjs.makeCoreTool(rest, options, "client-tool");
|
|
15852
15868
|
toolsForRequest[toolName] = convertedToCoreTool;
|
|
15853
15869
|
}
|
|
15854
15870
|
}
|
|
@@ -16017,7 +16033,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16017
16033
|
tracingContext,
|
|
16018
16034
|
tracingPolicy: this.#options?.tracingPolicy
|
|
16019
16035
|
};
|
|
16020
|
-
convertedAgentTools[`agent-${agentName}`] =
|
|
16036
|
+
convertedAgentTools[`agent-${agentName}`] = chunkHSRQXO6F_cjs.makeCoreTool(toolObj, options);
|
|
16021
16037
|
}
|
|
16022
16038
|
}
|
|
16023
16039
|
return convertedAgentTools;
|
|
@@ -16175,7 +16191,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16175
16191
|
tracingContext,
|
|
16176
16192
|
tracingPolicy: this.#options?.tracingPolicy
|
|
16177
16193
|
};
|
|
16178
|
-
convertedWorkflowTools[`workflow-${workflowName}`] =
|
|
16194
|
+
convertedWorkflowTools[`workflow-${workflowName}`] = chunkHSRQXO6F_cjs.makeCoreTool(toolObj, options);
|
|
16179
16195
|
}
|
|
16180
16196
|
}
|
|
16181
16197
|
return convertedWorkflowTools;
|
|
@@ -16199,7 +16215,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16199
16215
|
let mastraProxy = void 0;
|
|
16200
16216
|
const logger = this.logger;
|
|
16201
16217
|
if (this.#mastra) {
|
|
16202
|
-
mastraProxy =
|
|
16218
|
+
mastraProxy = chunkHSRQXO6F_cjs.createMastraProxy({ mastra: this.#mastra, logger });
|
|
16203
16219
|
}
|
|
16204
16220
|
const assignedTools = await this.listAssignedTools({
|
|
16205
16221
|
runId,
|
|
@@ -16523,7 +16539,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16523
16539
|
const targetProvider = structuredOutputModel.provider;
|
|
16524
16540
|
const targetModelId = structuredOutputModel.modelId;
|
|
16525
16541
|
if (targetProvider.includes("openai") || targetModelId.includes("openai")) {
|
|
16526
|
-
if (
|
|
16542
|
+
if (chunkHSRQXO6F_cjs.isZodType(options.structuredOutput.schema) && targetModelId) {
|
|
16527
16543
|
const modelInfo = {
|
|
16528
16544
|
provider: targetProvider,
|
|
16529
16545
|
modelId: targetModelId,
|
|
@@ -16542,7 +16558,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16542
16558
|
}
|
|
16543
16559
|
const runId = options.runId || this.#mastra?.generateId() || crypto2.randomUUID();
|
|
16544
16560
|
const instructions = options.instructions || await this.getInstructions({ requestContext });
|
|
16545
|
-
const agentSpan =
|
|
16561
|
+
const agentSpan = chunkUVM27J4A_cjs.getOrCreateSpan({
|
|
16546
16562
|
type: "agent_run" /* AGENT_RUN */,
|
|
16547
16563
|
name: `agent run: '${this.id}'`,
|
|
16548
16564
|
input: options.messages,
|
|
@@ -16604,6 +16620,7 @@ var Agent = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
16604
16620
|
requireToolApproval: options.requireToolApproval,
|
|
16605
16621
|
resumeContext,
|
|
16606
16622
|
agentId: this.id,
|
|
16623
|
+
agentName: this.name,
|
|
16607
16624
|
toolCallId: options.toolCallId
|
|
16608
16625
|
});
|
|
16609
16626
|
const run = await executionWorkflow.createRun();
|
|
@@ -17369,6 +17386,45 @@ var AISDKV5OutputStream = class {
|
|
|
17369
17386
|
return this.#modelOutput.object;
|
|
17370
17387
|
}
|
|
17371
17388
|
};
|
|
17389
|
+
function escapeUnescapedControlCharsInJsonStrings(text) {
|
|
17390
|
+
let result = "";
|
|
17391
|
+
let inString = false;
|
|
17392
|
+
let i = 0;
|
|
17393
|
+
while (i < text.length) {
|
|
17394
|
+
const char = text[i];
|
|
17395
|
+
if (char === "\\" && i + 1 < text.length) {
|
|
17396
|
+
result += char + text[i + 1];
|
|
17397
|
+
i += 2;
|
|
17398
|
+
continue;
|
|
17399
|
+
}
|
|
17400
|
+
if (char === '"') {
|
|
17401
|
+
inString = !inString;
|
|
17402
|
+
result += char;
|
|
17403
|
+
i++;
|
|
17404
|
+
continue;
|
|
17405
|
+
}
|
|
17406
|
+
if (inString) {
|
|
17407
|
+
if (char === "\n") {
|
|
17408
|
+
result += "\\n";
|
|
17409
|
+
i++;
|
|
17410
|
+
continue;
|
|
17411
|
+
}
|
|
17412
|
+
if (char === "\r") {
|
|
17413
|
+
result += "\\r";
|
|
17414
|
+
i++;
|
|
17415
|
+
continue;
|
|
17416
|
+
}
|
|
17417
|
+
if (char === " ") {
|
|
17418
|
+
result += "\\t";
|
|
17419
|
+
i++;
|
|
17420
|
+
continue;
|
|
17421
|
+
}
|
|
17422
|
+
}
|
|
17423
|
+
result += char;
|
|
17424
|
+
i++;
|
|
17425
|
+
}
|
|
17426
|
+
return result;
|
|
17427
|
+
}
|
|
17372
17428
|
var BaseFormatHandler = class {
|
|
17373
17429
|
/**
|
|
17374
17430
|
* The original user-provided schema (Zod, JSON Schema, or AI SDK Schema).
|
|
@@ -17460,7 +17516,8 @@ ${z42__default.default.prettifyError(result.error)}
|
|
|
17460
17516
|
}
|
|
17461
17517
|
}
|
|
17462
17518
|
/**
|
|
17463
|
-
* Preprocesses accumulated text to handle LLMs that wrap JSON in code blocks
|
|
17519
|
+
* Preprocesses accumulated text to handle LLMs that wrap JSON in code blocks
|
|
17520
|
+
* and fix common JSON formatting issues like unescaped newlines in strings.
|
|
17464
17521
|
* Extracts content from the first complete valid ```json...``` code block or removes opening ```json prefix if no complete code block is found (streaming chunks).
|
|
17465
17522
|
* @param accumulatedText - Raw accumulated text from streaming
|
|
17466
17523
|
* @returns Processed text ready for JSON parsing
|
|
@@ -17481,6 +17538,7 @@ ${z42__default.default.prettifyError(result.error)}
|
|
|
17481
17538
|
processedText = processedText.replace(/^```json\s*\n?/, "");
|
|
17482
17539
|
}
|
|
17483
17540
|
}
|
|
17541
|
+
processedText = escapeUnescapedControlCharsInJsonStrings(processedText);
|
|
17484
17542
|
return processedText;
|
|
17485
17543
|
}
|
|
17486
17544
|
};
|
|
@@ -18263,7 +18321,7 @@ var MastraModelOutput = class extends chunkDGV2FWB4_cjs.MastraBase {
|
|
|
18263
18321
|
options.tracingContext,
|
|
18264
18322
|
self.#options.requestContext
|
|
18265
18323
|
);
|
|
18266
|
-
const outputText = self.messageList.get.response.aiV4.core().map((m) =>
|
|
18324
|
+
const outputText = self.messageList.get.response.aiV4.core().map((m) => chunkVRFSEZBA_cjs.MessageList.coreContentToString(m.content)).join("\n");
|
|
18267
18325
|
self.#delayedPromises.text.resolve(outputText);
|
|
18268
18326
|
self.#delayedPromises.finishReason.resolve(self.#finishReason);
|
|
18269
18327
|
if (chunk.payload.metadata) {
|
|
@@ -18890,6 +18948,7 @@ exports.WorkingMemory = WorkingMemory;
|
|
|
18890
18948
|
exports.augmentWithInit = augmentWithInit;
|
|
18891
18949
|
exports.cloneStep = cloneStep;
|
|
18892
18950
|
exports.cloneWorkflow = cloneWorkflow;
|
|
18951
|
+
exports.convertFullStreamChunkToMastra = convertFullStreamChunkToMastra;
|
|
18893
18952
|
exports.convertFullStreamChunkToUIMessageStream = convertFullStreamChunkToUIMessageStream;
|
|
18894
18953
|
exports.convertMastraChunkToAISDKv5 = convertMastraChunkToAISDKv5;
|
|
18895
18954
|
exports.createDeprecationProxy = createDeprecationProxy;
|
|
@@ -18912,5 +18971,5 @@ exports.validateStepInput = validateStepInput;
|
|
|
18912
18971
|
exports.validateStepResumeData = validateStepResumeData;
|
|
18913
18972
|
exports.validateStepStateData = validateStepStateData;
|
|
18914
18973
|
exports.validateStepSuspendData = validateStepSuspendData;
|
|
18915
|
-
//# sourceMappingURL=chunk-
|
|
18916
|
-
//# sourceMappingURL=chunk-
|
|
18974
|
+
//# sourceMappingURL=chunk-XMT5T4F2.cjs.map
|
|
18975
|
+
//# sourceMappingURL=chunk-XMT5T4F2.cjs.map
|