@mastra/core 0.10.8 → 0.10.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.
Files changed (93) hide show
  1. package/dist/agent/index.cjs +4 -4
  2. package/dist/agent/index.d.cts +8 -8
  3. package/dist/agent/index.d.ts +8 -8
  4. package/dist/agent/index.js +2 -2
  5. package/dist/{base-DVVTzIQy.d.cts → base-B_y9sMg0.d.cts} +1 -1
  6. package/dist/{base-B_WEJuiR.d.cts → base-Bu9IeyHt.d.cts} +48 -15
  7. package/dist/{base-BbdvunNJ.d.ts → base-ClrXcCRx.d.ts} +1 -1
  8. package/dist/{base-DnSegjq5.d.ts → base-D6PagN3X.d.ts} +48 -15
  9. package/dist/base.d.cts +2 -2
  10. package/dist/base.d.ts +2 -2
  11. package/dist/bundler/index.d.cts +2 -2
  12. package/dist/bundler/index.d.ts +2 -2
  13. package/dist/{chunk-V73Z32LN.js → chunk-5S3K64EU.js} +1 -1
  14. package/dist/{chunk-2D7NOO7S.cjs → chunk-6Y4UL5Z6.cjs} +11 -0
  15. package/dist/{chunk-QZ3VZRUU.cjs → chunk-7H2GET5Z.cjs} +6 -2
  16. package/dist/{chunk-YXQF4U4L.js → chunk-7XQIPES3.js} +5 -1
  17. package/dist/{chunk-CHBIZNA3.cjs → chunk-CWXF3ZG4.cjs} +31 -9
  18. package/dist/{chunk-GKCO24Z4.cjs → chunk-CZGP56Y3.cjs} +2 -2
  19. package/dist/{chunk-WTTYHREJ.js → chunk-HM4AOWTY.js} +1 -1
  20. package/dist/{chunk-DO5R43AJ.js → chunk-JQOMTERC.js} +11 -1
  21. package/dist/{chunk-FBURVKXA.js → chunk-O7YOEBDC.js} +220 -41
  22. package/dist/{chunk-E4A4XDDG.cjs → chunk-SO4GUX3Q.cjs} +221 -42
  23. package/dist/{chunk-EYJXFYUH.cjs → chunk-SUF6QXSI.cjs} +70 -40
  24. package/dist/{chunk-QIQOR45O.js → chunk-VMIMBLH4.js} +31 -9
  25. package/dist/{chunk-U2LC4K7N.cjs → chunk-X73RHIY2.cjs} +2 -2
  26. package/dist/{chunk-WK3SHUOG.js → chunk-Y2FKASKG.js} +61 -31
  27. package/dist/deployer/index.d.cts +2 -2
  28. package/dist/deployer/index.d.ts +2 -2
  29. package/dist/eval/index.d.cts +6 -6
  30. package/dist/eval/index.d.ts +6 -6
  31. package/dist/index.cjs +22 -22
  32. package/dist/index.d.cts +5 -5
  33. package/dist/index.d.ts +5 -5
  34. package/dist/index.js +7 -7
  35. package/dist/integration/index.d.cts +10 -10
  36. package/dist/integration/index.d.ts +10 -10
  37. package/dist/llm/index.d.cts +6 -6
  38. package/dist/llm/index.d.ts +6 -6
  39. package/dist/logger/index.cjs +8 -4
  40. package/dist/logger/index.d.cts +2 -2
  41. package/dist/logger/index.d.ts +2 -2
  42. package/dist/logger/index.js +1 -1
  43. package/dist/{logger-CpL0z5v_.d.cts → logger-B8XXh6ya.d.cts} +2 -1
  44. package/dist/{logger-DtVDdb81.d.ts → logger-Bpa2oLL4.d.ts} +2 -1
  45. package/dist/mastra/index.cjs +2 -2
  46. package/dist/mastra/index.d.cts +4 -4
  47. package/dist/mastra/index.d.ts +4 -4
  48. package/dist/mastra/index.js +1 -1
  49. package/dist/mcp/index.d.cts +8 -8
  50. package/dist/mcp/index.d.ts +8 -8
  51. package/dist/memory/index.cjs +4 -4
  52. package/dist/memory/index.d.cts +6 -6
  53. package/dist/memory/index.d.ts +6 -6
  54. package/dist/memory/index.js +1 -1
  55. package/dist/network/index.cjs +2 -2
  56. package/dist/network/index.d.cts +6 -6
  57. package/dist/network/index.d.ts +6 -6
  58. package/dist/network/index.js +1 -1
  59. package/dist/network/vNext/index.cjs +37 -23
  60. package/dist/network/vNext/index.d.cts +8 -8
  61. package/dist/network/vNext/index.d.ts +8 -8
  62. package/dist/network/vNext/index.js +26 -12
  63. package/dist/relevance/index.cjs +4 -4
  64. package/dist/relevance/index.d.cts +8 -8
  65. package/dist/relevance/index.d.ts +8 -8
  66. package/dist/relevance/index.js +1 -1
  67. package/dist/server/index.d.cts +7 -7
  68. package/dist/server/index.d.ts +7 -7
  69. package/dist/storage/index.cjs +2 -2
  70. package/dist/storage/index.d.cts +7 -7
  71. package/dist/storage/index.d.ts +7 -7
  72. package/dist/storage/index.js +1 -1
  73. package/dist/telemetry/index.d.cts +6 -6
  74. package/dist/telemetry/index.d.ts +6 -6
  75. package/dist/tools/index.d.cts +9 -9
  76. package/dist/tools/index.d.ts +9 -9
  77. package/dist/tts/index.d.cts +2 -2
  78. package/dist/tts/index.d.ts +2 -2
  79. package/dist/utils.d.cts +3 -3
  80. package/dist/utils.d.ts +3 -3
  81. package/dist/vector/index.d.cts +2 -2
  82. package/dist/vector/index.d.ts +2 -2
  83. package/dist/voice/index.d.cts +6 -6
  84. package/dist/voice/index.d.ts +6 -6
  85. package/dist/workflows/index.cjs +10 -10
  86. package/dist/workflows/index.d.cts +34 -13
  87. package/dist/workflows/index.d.ts +34 -13
  88. package/dist/workflows/index.js +1 -1
  89. package/dist/workflows/legacy/index.cjs +22 -22
  90. package/dist/workflows/legacy/index.d.cts +11 -11
  91. package/dist/workflows/legacy/index.d.ts +11 -11
  92. package/dist/workflows/legacy/index.js +1 -1
  93. package/package.json +4 -4
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkE4A4XDDG_cjs = require('../../chunk-E4A4XDDG.cjs');
3
+ var chunkSO4GUX3Q_cjs = require('../../chunk-SO4GUX3Q.cjs');
4
4
  var chunkBB6DPGIV_cjs = require('../../chunk-BB6DPGIV.cjs');
5
- var chunkEYJXFYUH_cjs = require('../../chunk-EYJXFYUH.cjs');
5
+ var chunkSUF6QXSI_cjs = require('../../chunk-SUF6QXSI.cjs');
6
6
  var chunkP3Q73CAW_cjs = require('../../chunk-P3Q73CAW.cjs');
7
7
  var chunkZIZ3CVHN_cjs = require('../../chunk-ZIZ3CVHN.cjs');
8
8
  var chunkLABUWBKX_cjs = require('../../chunk-LABUWBKX.cjs');
@@ -144,7 +144,7 @@ var NewAgentNetwork = class extends chunkP3Q73CAW_cjs.MastraBase {
144
144
 
145
145
  Keep in mind that the user only sees the final result of the task. When reviewing completion, you should know that the user will not see the intermediate results.
146
146
  `;
147
- return new chunkEYJXFYUH_cjs.Agent({
147
+ return new chunkSUF6QXSI_cjs.Agent({
148
148
  name: "routing-agent",
149
149
  instructions,
150
150
  model: this.#model,
@@ -156,7 +156,7 @@ var NewAgentNetwork = class extends chunkP3Q73CAW_cjs.MastraBase {
156
156
  maxIterations
157
157
  }) {
158
158
  const networkWorkflow = this.createWorkflow({ runtimeContext });
159
- const finalStep = chunkE4A4XDDG_cjs.createStep({
159
+ const finalStep = chunkSO4GUX3Q_cjs.createStep({
160
160
  id: "final-step",
161
161
  inputSchema: networkWorkflow.outputSchema,
162
162
  outputSchema: networkWorkflow.outputSchema,
@@ -170,7 +170,7 @@ var NewAgentNetwork = class extends chunkP3Q73CAW_cjs.MastraBase {
170
170
  return inputData;
171
171
  }
172
172
  });
173
- const mainWorkflow = chunkE4A4XDDG_cjs.createWorkflow({
173
+ const mainWorkflow = chunkSO4GUX3Q_cjs.createWorkflow({
174
174
  id: "Agent-Network-Main-Workflow",
175
175
  inputSchema: zod.z.object({
176
176
  iteration: zod.z.number(),
@@ -207,7 +207,7 @@ var NewAgentNetwork = class extends chunkP3Q73CAW_cjs.MastraBase {
207
207
  resourceId
208
208
  }) {
209
209
  const networkWorkflow = this.createWorkflow({ runtimeContext });
210
- const finalStep = chunkE4A4XDDG_cjs.createStep({
210
+ const finalStep = chunkSO4GUX3Q_cjs.createStep({
211
211
  id: "final-step",
212
212
  inputSchema: networkWorkflow.outputSchema,
213
213
  outputSchema: networkWorkflow.outputSchema,
@@ -221,7 +221,7 @@ var NewAgentNetwork = class extends chunkP3Q73CAW_cjs.MastraBase {
221
221
  return inputData;
222
222
  }
223
223
  });
224
- const mainWorkflow = chunkE4A4XDDG_cjs.createWorkflow({
224
+ const mainWorkflow = chunkSO4GUX3Q_cjs.createWorkflow({
225
225
  id: "Agent-Network-Main-Workflow",
226
226
  inputSchema: zod.z.object({
227
227
  iteration: zod.z.number(),
@@ -231,7 +231,8 @@ var NewAgentNetwork = class extends chunkP3Q73CAW_cjs.MastraBase {
231
231
  result: zod.z.string().optional(),
232
232
  threadId: zod.z.string().optional(),
233
233
  threadResourceId: zod.z.string().optional(),
234
- isOneOff: zod.z.boolean()
234
+ isOneOff: zod.z.boolean(),
235
+ verboseIntrospection: zod.z.boolean()
235
236
  }),
236
237
  outputSchema: zod.z.object({
237
238
  task: zod.z.string(),
@@ -270,14 +271,15 @@ var NewAgentNetwork = class extends chunkP3Q73CAW_cjs.MastraBase {
270
271
  iteration: 0,
271
272
  threadResourceId: resourceId,
272
273
  threadId,
273
- isOneOff: false
274
+ isOneOff: false,
275
+ verboseIntrospection: true
274
276
  }
275
277
  });
276
278
  }
277
279
  createWorkflow({ runtimeContext }) {
278
280
  const runId = crypto.randomUUID();
279
281
  const runtimeContextToUse = runtimeContext || new chunkLABUWBKX_cjs.RuntimeContext();
280
- const routingStep = chunkE4A4XDDG_cjs.createStep({
282
+ const routingStep = chunkSO4GUX3Q_cjs.createStep({
281
283
  id: "routing-step",
282
284
  inputSchema: zod.z.object({
283
285
  task: zod.z.string(),
@@ -287,7 +289,8 @@ var NewAgentNetwork = class extends chunkP3Q73CAW_cjs.MastraBase {
287
289
  iteration: zod.z.number(),
288
290
  threadId: zod.z.string().optional(),
289
291
  threadResourceId: zod.z.string().optional(),
290
- isOneOff: zod.z.boolean()
292
+ isOneOff: zod.z.boolean(),
293
+ verboseIntrospection: zod.z.boolean()
291
294
  }),
292
295
  outputSchema: zod.z.object({
293
296
  task: zod.z.string(),
@@ -344,7 +347,7 @@ var NewAgentNetwork = class extends chunkP3Q73CAW_cjs.MastraBase {
344
347
  {
345
348
  role: "assistant",
346
349
  content: `
347
- ${inputData.isOneOff ? "You are executing just one primitive based on the user task" : "You will be calling just *one* primitive at a time to accomplish the user task"}
350
+ ${inputData.isOneOff ? "You are executing just one primitive based on the user task. Make sure to pick the primitive that is the best suited to accomplish the whole task. Primitives that execute only part of the task should be avoided." : "You will be calling just *one* primitive at a time to accomplish the user task, every call to you is one decision in the process of accomplishing the user task. Make sure to pick primitives that are the best suited to accomplish the whole task. Completeness is the highest priority."}
348
351
 
349
352
  The user has given you the following task:
350
353
  ${inputData.task}
@@ -361,6 +364,8 @@ ${completionResult.object.finalResult}` : ""}
361
364
  "prompt": string,
362
365
  "selectionReason": string
363
366
  }
367
+
368
+ The 'selectionReason' property should explain why you picked the primitive${inputData.verboseIntrospection ? ", as well as why the other primitives were not picked." : "."}
364
369
  `
365
370
  }
366
371
  ],
@@ -387,7 +392,7 @@ ${completionResult.object.finalResult}` : ""}
387
392
  };
388
393
  }
389
394
  });
390
- const agentStep = chunkE4A4XDDG_cjs.createStep({
395
+ const agentStep = chunkSO4GUX3Q_cjs.createStep({
391
396
  id: "agent-step",
392
397
  inputSchema: zod.z.object({
393
398
  task: zod.z.string(),
@@ -485,7 +490,7 @@ ${completionResult.object.finalResult}` : ""}
485
490
  };
486
491
  }
487
492
  });
488
- const workflowStep = chunkE4A4XDDG_cjs.createStep({
493
+ const workflowStep = chunkSO4GUX3Q_cjs.createStep({
489
494
  id: "workflow-step",
490
495
  inputSchema: zod.z.object({
491
496
  task: zod.z.string(),
@@ -532,7 +537,7 @@ ${completionResult.object.finalResult}` : ""}
532
537
  ...toolData
533
538
  });
534
539
  const run = wf.createRun();
535
- const { stream } = run.stream({
540
+ const { stream, getWorkflowState } = run.stream({
536
541
  inputData: input,
537
542
  runtimeContext: runtimeContextToUse
538
543
  });
@@ -571,10 +576,16 @@ ${completionResult.object.finalResult}` : ""}
571
576
  break;
572
577
  }
573
578
  }
579
+ let runSuccess = true;
574
580
  const runResult = await streamPromise.promise;
581
+ const workflowState = await getWorkflowState();
582
+ if (workflowState.status === "failed") {
583
+ runSuccess = false;
584
+ }
575
585
  const finalResult = JSON.stringify({
576
586
  runId: run.runId,
577
- runResult
587
+ runResult,
588
+ runSuccess
578
589
  });
579
590
  const memory = await this.getMemory({ runtimeContext: runtimeContext || new chunkLABUWBKX_cjs.RuntimeContext() });
580
591
  const initData = await getInitData();
@@ -602,7 +613,7 @@ ${completionResult.object.finalResult}` : ""}
602
613
  };
603
614
  }
604
615
  });
605
- const toolStep = chunkE4A4XDDG_cjs.createStep({
616
+ const toolStep = chunkSO4GUX3Q_cjs.createStep({
606
617
  id: "toolStep",
607
618
  inputSchema: zod.z.object({
608
619
  task: zod.z.string(),
@@ -654,7 +665,7 @@ ${completionResult.object.finalResult}` : ""}
654
665
  id: crypto.randomUUID(),
655
666
  type: "text",
656
667
  role: "assistant",
657
- content: { parts: [{ type: "text", text: finalResult }], format: 2 },
668
+ content: { parts: [{ type: "text", text: JSON.stringify(finalResult) }], format: 2 },
658
669
  createdAt: /* @__PURE__ */ new Date(),
659
670
  threadId: initData.threadId || runId,
660
671
  resourceId: initData.threadResourceId || this.name
@@ -672,7 +683,7 @@ ${completionResult.object.finalResult}` : ""}
672
683
  };
673
684
  }
674
685
  });
675
- const finishStep = chunkE4A4XDDG_cjs.createStep({
686
+ const finishStep = chunkSO4GUX3Q_cjs.createStep({
676
687
  id: "finish-step",
677
688
  inputSchema: zod.z.object({
678
689
  task: zod.z.string(),
@@ -699,7 +710,7 @@ ${completionResult.object.finalResult}` : ""}
699
710
  };
700
711
  }
701
712
  });
702
- const networkWorkflow = chunkE4A4XDDG_cjs.createWorkflow({
713
+ const networkWorkflow = chunkSO4GUX3Q_cjs.createWorkflow({
703
714
  id: "Agent-Network-Outer-Workflow",
704
715
  inputSchema: zod.z.object({
705
716
  task: zod.z.string(),
@@ -709,7 +720,8 @@ ${completionResult.object.finalResult}` : ""}
709
720
  iteration: zod.z.number(),
710
721
  threadId: zod.z.string().optional(),
711
722
  threadResourceId: zod.z.string().optional(),
712
- isOneOff: zod.z.boolean()
723
+ isOneOff: zod.z.boolean(),
724
+ verboseIntrospection: zod.z.boolean()
713
725
  }),
714
726
  outputSchema: zod.z.object({
715
727
  task: zod.z.string(),
@@ -804,7 +816,8 @@ ${completionResult.object.finalResult}` : ""}
804
816
  iteration: 0,
805
817
  threadId,
806
818
  threadResourceId: resourceId,
807
- isOneOff: true
819
+ isOneOff: true,
820
+ verboseIntrospection: true
808
821
  }
809
822
  });
810
823
  if (result.status === "failed") {
@@ -850,7 +863,8 @@ ${completionResult.object.finalResult}` : ""}
850
863
  iteration: 0,
851
864
  threadResourceId: resourceId,
852
865
  threadId,
853
- isOneOff: true
866
+ isOneOff: true,
867
+ verboseIntrospection: true
854
868
  }
855
869
  });
856
870
  }
@@ -1,22 +1,22 @@
1
1
  import 'stream/web';
2
2
  import '../../types-Bo1uigWx.cjs';
3
- export { N as NewAgentNetwork } from '../../base-B_WEJuiR.cjs';
3
+ export { N as NewAgentNetwork } from '../../base-Bu9IeyHt.cjs';
4
4
  import 'zod';
5
- import '../../base-DVVTzIQy.cjs';
5
+ import '../../base-B_y9sMg0.cjs';
6
6
  import '../../runtime-context/index.cjs';
7
7
  import 'ai';
8
- import '../../logger-CpL0z5v_.cjs';
8
+ import '../../logger-B8XXh6ya.cjs';
9
9
  import '../../error/index.cjs';
10
10
  import 'stream';
11
11
  import 'json-schema';
12
- import '../../tts/index.cjs';
13
- import '@opentelemetry/api';
14
- import '@opentelemetry/sdk-trace-base';
15
- import '../../vector/index.cjs';
16
- import '../../vector/filter/index.cjs';
17
12
  import 'sift';
13
+ import '@opentelemetry/api';
18
14
  import 'xstate';
19
15
  import 'node:events';
16
+ import '../../vector/index.cjs';
17
+ import '../../vector/filter/index.cjs';
18
+ import '@opentelemetry/sdk-trace-base';
19
+ import '../../tts/index.cjs';
20
20
  import 'node:http';
21
21
  import 'hono';
22
22
  import 'events';
@@ -1,22 +1,22 @@
1
1
  import 'stream/web';
2
2
  import '../../types-Bo1uigWx.js';
3
- export { N as NewAgentNetwork } from '../../base-DnSegjq5.js';
3
+ export { N as NewAgentNetwork } from '../../base-D6PagN3X.js';
4
4
  import 'zod';
5
- import '../../base-BbdvunNJ.js';
5
+ import '../../base-ClrXcCRx.js';
6
6
  import '../../runtime-context/index.js';
7
7
  import 'ai';
8
- import '../../logger-DtVDdb81.js';
8
+ import '../../logger-Bpa2oLL4.js';
9
9
  import '../../error/index.js';
10
10
  import 'stream';
11
11
  import 'json-schema';
12
- import '../../tts/index.js';
13
- import '@opentelemetry/api';
14
- import '@opentelemetry/sdk-trace-base';
15
- import '../../vector/index.js';
16
- import '../../vector/filter/index.js';
17
12
  import 'sift';
13
+ import '@opentelemetry/api';
18
14
  import 'xstate';
19
15
  import 'node:events';
16
+ import '../../vector/index.js';
17
+ import '../../vector/filter/index.js';
18
+ import '@opentelemetry/sdk-trace-base';
19
+ import '../../tts/index.js';
20
20
  import 'node:http';
21
21
  import 'hono';
22
22
  import 'events';
@@ -1,6 +1,6 @@
1
- import { createStep, createWorkflow } from '../../chunk-FBURVKXA.js';
1
+ import { createStep, createWorkflow } from '../../chunk-O7YOEBDC.js';
2
2
  import { EMITTER_SYMBOL } from '../../chunk-Y7D2JLKS.js';
3
- import { Agent } from '../../chunk-WK3SHUOG.js';
3
+ import { Agent } from '../../chunk-Y2FKASKG.js';
4
4
  import { MastraBase } from '../../chunk-5IEKR756.js';
5
5
  import { RegisteredLogger } from '../../chunk-5YDTZN2X.js';
6
6
  import { RuntimeContext } from '../../chunk-SGGPJWRQ.js';
@@ -229,7 +229,8 @@ var NewAgentNetwork = class extends MastraBase {
229
229
  result: z.string().optional(),
230
230
  threadId: z.string().optional(),
231
231
  threadResourceId: z.string().optional(),
232
- isOneOff: z.boolean()
232
+ isOneOff: z.boolean(),
233
+ verboseIntrospection: z.boolean()
233
234
  }),
234
235
  outputSchema: z.object({
235
236
  task: z.string(),
@@ -268,7 +269,8 @@ var NewAgentNetwork = class extends MastraBase {
268
269
  iteration: 0,
269
270
  threadResourceId: resourceId,
270
271
  threadId,
271
- isOneOff: false
272
+ isOneOff: false,
273
+ verboseIntrospection: true
272
274
  }
273
275
  });
274
276
  }
@@ -285,7 +287,8 @@ var NewAgentNetwork = class extends MastraBase {
285
287
  iteration: z.number(),
286
288
  threadId: z.string().optional(),
287
289
  threadResourceId: z.string().optional(),
288
- isOneOff: z.boolean()
290
+ isOneOff: z.boolean(),
291
+ verboseIntrospection: z.boolean()
289
292
  }),
290
293
  outputSchema: z.object({
291
294
  task: z.string(),
@@ -342,7 +345,7 @@ var NewAgentNetwork = class extends MastraBase {
342
345
  {
343
346
  role: "assistant",
344
347
  content: `
345
- ${inputData.isOneOff ? "You are executing just one primitive based on the user task" : "You will be calling just *one* primitive at a time to accomplish the user task"}
348
+ ${inputData.isOneOff ? "You are executing just one primitive based on the user task. Make sure to pick the primitive that is the best suited to accomplish the whole task. Primitives that execute only part of the task should be avoided." : "You will be calling just *one* primitive at a time to accomplish the user task, every call to you is one decision in the process of accomplishing the user task. Make sure to pick primitives that are the best suited to accomplish the whole task. Completeness is the highest priority."}
346
349
 
347
350
  The user has given you the following task:
348
351
  ${inputData.task}
@@ -359,6 +362,8 @@ ${completionResult.object.finalResult}` : ""}
359
362
  "prompt": string,
360
363
  "selectionReason": string
361
364
  }
365
+
366
+ The 'selectionReason' property should explain why you picked the primitive${inputData.verboseIntrospection ? ", as well as why the other primitives were not picked." : "."}
362
367
  `
363
368
  }
364
369
  ],
@@ -530,7 +535,7 @@ ${completionResult.object.finalResult}` : ""}
530
535
  ...toolData
531
536
  });
532
537
  const run = wf.createRun();
533
- const { stream } = run.stream({
538
+ const { stream, getWorkflowState } = run.stream({
534
539
  inputData: input,
535
540
  runtimeContext: runtimeContextToUse
536
541
  });
@@ -569,10 +574,16 @@ ${completionResult.object.finalResult}` : ""}
569
574
  break;
570
575
  }
571
576
  }
577
+ let runSuccess = true;
572
578
  const runResult = await streamPromise.promise;
579
+ const workflowState = await getWorkflowState();
580
+ if (workflowState.status === "failed") {
581
+ runSuccess = false;
582
+ }
573
583
  const finalResult = JSON.stringify({
574
584
  runId: run.runId,
575
- runResult
585
+ runResult,
586
+ runSuccess
576
587
  });
577
588
  const memory = await this.getMemory({ runtimeContext: runtimeContext || new RuntimeContext() });
578
589
  const initData = await getInitData();
@@ -652,7 +663,7 @@ ${completionResult.object.finalResult}` : ""}
652
663
  id: randomUUID(),
653
664
  type: "text",
654
665
  role: "assistant",
655
- content: { parts: [{ type: "text", text: finalResult }], format: 2 },
666
+ content: { parts: [{ type: "text", text: JSON.stringify(finalResult) }], format: 2 },
656
667
  createdAt: /* @__PURE__ */ new Date(),
657
668
  threadId: initData.threadId || runId,
658
669
  resourceId: initData.threadResourceId || this.name
@@ -707,7 +718,8 @@ ${completionResult.object.finalResult}` : ""}
707
718
  iteration: z.number(),
708
719
  threadId: z.string().optional(),
709
720
  threadResourceId: z.string().optional(),
710
- isOneOff: z.boolean()
721
+ isOneOff: z.boolean(),
722
+ verboseIntrospection: z.boolean()
711
723
  }),
712
724
  outputSchema: z.object({
713
725
  task: z.string(),
@@ -802,7 +814,8 @@ ${completionResult.object.finalResult}` : ""}
802
814
  iteration: 0,
803
815
  threadId,
804
816
  threadResourceId: resourceId,
805
- isOneOff: true
817
+ isOneOff: true,
818
+ verboseIntrospection: true
806
819
  }
807
820
  });
808
821
  if (result.status === "failed") {
@@ -848,7 +861,8 @@ ${completionResult.object.finalResult}` : ""}
848
861
  iteration: 0,
849
862
  threadResourceId: resourceId,
850
863
  threadId,
851
- isOneOff: true
864
+ isOneOff: true,
865
+ verboseIntrospection: true
852
866
  }
853
867
  });
854
868
  }
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkGKCO24Z4_cjs = require('../chunk-GKCO24Z4.cjs');
3
+ var chunkCZGP56Y3_cjs = require('../chunk-CZGP56Y3.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "CohereRelevanceScorer", {
8
8
  enumerable: true,
9
- get: function () { return chunkGKCO24Z4_cjs.CohereRelevanceScorer; }
9
+ get: function () { return chunkCZGP56Y3_cjs.CohereRelevanceScorer; }
10
10
  });
11
11
  Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
12
12
  enumerable: true,
13
- get: function () { return chunkGKCO24Z4_cjs.MastraAgentRelevanceScorer; }
13
+ get: function () { return chunkCZGP56Y3_cjs.MastraAgentRelevanceScorer; }
14
14
  });
15
15
  Object.defineProperty(exports, "createSimilarityPrompt", {
16
16
  enumerable: true,
17
- get: function () { return chunkGKCO24Z4_cjs.createSimilarityPrompt; }
17
+ get: function () { return chunkCZGP56Y3_cjs.createSimilarityPrompt; }
18
18
  });
@@ -1,21 +1,21 @@
1
- import { bD as MastraLanguageModel } from '../base-B_WEJuiR.cjs';
2
- import '../base-DVVTzIQy.cjs';
1
+ import { aY as MastraLanguageModel } from '../base-Bu9IeyHt.cjs';
2
+ import '../base-B_y9sMg0.cjs';
3
3
  import 'ai';
4
4
  import 'zod';
5
- import '../logger-CpL0z5v_.cjs';
5
+ import '../logger-B8XXh6ya.cjs';
6
6
  import '../error/index.cjs';
7
7
  import 'stream';
8
8
  import 'json-schema';
9
- import '../tts/index.cjs';
10
- import '@opentelemetry/api';
11
- import '@opentelemetry/sdk-trace-base';
12
- import '../vector/index.cjs';
13
- import '../vector/filter/index.cjs';
14
9
  import '../types-Bo1uigWx.cjs';
15
10
  import 'sift';
16
11
  import '../runtime-context/index.cjs';
12
+ import '@opentelemetry/api';
17
13
  import 'xstate';
18
14
  import 'node:events';
15
+ import '../vector/index.cjs';
16
+ import '../vector/filter/index.cjs';
17
+ import '../tts/index.cjs';
18
+ import '@opentelemetry/sdk-trace-base';
19
19
  import 'node:http';
20
20
  import 'hono';
21
21
  import 'stream/web';
@@ -1,21 +1,21 @@
1
- import { bD as MastraLanguageModel } from '../base-DnSegjq5.js';
2
- import '../base-BbdvunNJ.js';
1
+ import { aY as MastraLanguageModel } from '../base-D6PagN3X.js';
2
+ import '../base-ClrXcCRx.js';
3
3
  import 'ai';
4
4
  import 'zod';
5
- import '../logger-DtVDdb81.js';
5
+ import '../logger-Bpa2oLL4.js';
6
6
  import '../error/index.js';
7
7
  import 'stream';
8
8
  import 'json-schema';
9
- import '../tts/index.js';
10
- import '@opentelemetry/api';
11
- import '@opentelemetry/sdk-trace-base';
12
- import '../vector/index.js';
13
- import '../vector/filter/index.js';
14
9
  import '../types-Bo1uigWx.js';
15
10
  import 'sift';
16
11
  import '../runtime-context/index.js';
12
+ import '@opentelemetry/api';
17
13
  import 'xstate';
18
14
  import 'node:events';
15
+ import '../vector/index.js';
16
+ import '../vector/filter/index.js';
17
+ import '../tts/index.js';
18
+ import '@opentelemetry/sdk-trace-base';
19
19
  import 'node:http';
20
20
  import 'hono';
21
21
  import 'stream/web';
@@ -1 +1 @@
1
- export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-V73Z32LN.js';
1
+ export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-5S3K64EU.js';
@@ -1,24 +1,24 @@
1
1
  import { Handler, Context, MiddlewareHandler } from 'hono';
2
2
  import { DescribeRouteOptions } from 'hono-openapi';
3
- import { i as Methods, M as Mastra, j as ApiRoute, k as MastraAuthConfig } from '../base-B_WEJuiR.cjs';
4
- export { l as ContextWithMastra, m as MastraAuthProvider, n as MastraAuthProviderOptions } from '../base-B_WEJuiR.cjs';
3
+ import { i as Methods, M as Mastra, j as ApiRoute, k as MastraAuthConfig } from '../base-Bu9IeyHt.cjs';
4
+ export { l as ContextWithMastra, m as MastraAuthProvider, n as MastraAuthProviderOptions } from '../base-Bu9IeyHt.cjs';
5
5
  import 'ai';
6
- import '../base-DVVTzIQy.cjs';
6
+ import '../base-B_y9sMg0.cjs';
7
7
  import '@opentelemetry/api';
8
- import '../logger-CpL0z5v_.cjs';
8
+ import '../logger-B8XXh6ya.cjs';
9
9
  import '../error/index.cjs';
10
10
  import 'stream';
11
11
  import '@opentelemetry/sdk-trace-base';
12
12
  import 'zod';
13
13
  import 'json-schema';
14
- import '../tts/index.cjs';
15
- import '../vector/index.cjs';
16
- import '../vector/filter/index.cjs';
17
14
  import '../types-Bo1uigWx.cjs';
18
15
  import 'sift';
19
16
  import '../runtime-context/index.cjs';
20
17
  import 'xstate';
21
18
  import 'node:events';
19
+ import '../vector/index.cjs';
20
+ import '../vector/filter/index.cjs';
21
+ import '../tts/index.cjs';
22
22
  import 'node:http';
23
23
  import 'stream/web';
24
24
  import 'events';
@@ -1,24 +1,24 @@
1
1
  import { Handler, Context, MiddlewareHandler } from 'hono';
2
2
  import { DescribeRouteOptions } from 'hono-openapi';
3
- import { i as Methods, M as Mastra, j as ApiRoute, k as MastraAuthConfig } from '../base-DnSegjq5.js';
4
- export { l as ContextWithMastra, m as MastraAuthProvider, n as MastraAuthProviderOptions } from '../base-DnSegjq5.js';
3
+ import { i as Methods, M as Mastra, j as ApiRoute, k as MastraAuthConfig } from '../base-D6PagN3X.js';
4
+ export { l as ContextWithMastra, m as MastraAuthProvider, n as MastraAuthProviderOptions } from '../base-D6PagN3X.js';
5
5
  import 'ai';
6
- import '../base-BbdvunNJ.js';
6
+ import '../base-ClrXcCRx.js';
7
7
  import '@opentelemetry/api';
8
- import '../logger-DtVDdb81.js';
8
+ import '../logger-Bpa2oLL4.js';
9
9
  import '../error/index.js';
10
10
  import 'stream';
11
11
  import '@opentelemetry/sdk-trace-base';
12
12
  import 'zod';
13
13
  import 'json-schema';
14
- import '../tts/index.js';
15
- import '../vector/index.js';
16
- import '../vector/filter/index.js';
17
14
  import '../types-Bo1uigWx.js';
18
15
  import 'sift';
19
16
  import '../runtime-context/index.js';
20
17
  import 'xstate';
21
18
  import 'node:events';
19
+ import '../vector/index.js';
20
+ import '../vector/filter/index.js';
21
+ import '../tts/index.js';
22
22
  import 'node:http';
23
23
  import 'stream/web';
24
24
  import 'events';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkF2WMR75C_cjs = require('../chunk-F2WMR75C.cjs');
4
- var chunkCHBIZNA3_cjs = require('../chunk-CHBIZNA3.cjs');
4
+ var chunkCWXF3ZG4_cjs = require('../chunk-CWXF3ZG4.cjs');
5
5
  var chunkQQ5K5TZE_cjs = require('../chunk-QQ5K5TZE.cjs');
6
6
 
7
7
  // src/storage/mock.ts
@@ -136,7 +136,7 @@ var MockStore = class extends chunkF2WMR75C_cjs.MastraStorage {
136
136
  const key = message.id;
137
137
  this.data.mastra_messages[key] = message;
138
138
  }
139
- const list = new chunkCHBIZNA3_cjs.MessageList().add(messages, "memory");
139
+ const list = new chunkCWXF3ZG4_cjs.MessageList().add(messages, "memory");
140
140
  if (format === `v2`) return list.get.all.v2();
141
141
  return list.get.all.v1();
142
142
  }
@@ -1,21 +1,21 @@
1
- import { o as MastraStorage, p as TABLE_NAMES, q as StorageColumn, r as StorageThreadType, s as StorageResourceType, t as MastraMessageV2, u as StorageGetMessagesArg, v as MastraMessageV1, E as EvalRow, w as WorkflowRuns, x as WorkflowRun, P as PaginationInfo } from '../base-B_WEJuiR.cjs';
2
- export { z as LegacyWorkflowRun, y as LegacyWorkflowRuns, B as PaginationArgs, D as StorageGetTracesArg, G as TABLE_EVALS, H as TABLE_MESSAGES, K as TABLE_RESOURCES, O as TABLE_SCHEMAS, I as TABLE_THREADS, J as TABLE_TRACES, F as TABLE_WORKFLOW_SNAPSHOT } from '../base-B_WEJuiR.cjs';
3
- import { T as Trace } from '../base-DVVTzIQy.cjs';
1
+ import { o as MastraStorage, p as TABLE_NAMES, q as StorageColumn, r as StorageThreadType, s as StorageResourceType, t as MastraMessageV2, u as StorageGetMessagesArg, v as MastraMessageV1, E as EvalRow, w as WorkflowRuns, x as WorkflowRun, P as PaginationInfo } from '../base-Bu9IeyHt.cjs';
2
+ export { z as LegacyWorkflowRun, y as LegacyWorkflowRuns, B as PaginationArgs, D as StorageGetTracesArg, G as TABLE_EVALS, H as TABLE_MESSAGES, K as TABLE_RESOURCES, O as TABLE_SCHEMAS, I as TABLE_THREADS, J as TABLE_TRACES, F as TABLE_WORKFLOW_SNAPSHOT } from '../base-Bu9IeyHt.cjs';
3
+ import { T as Trace } from '../base-B_y9sMg0.cjs';
4
4
  import 'ai';
5
5
  import 'zod';
6
- import '../logger-CpL0z5v_.cjs';
6
+ import '../logger-B8XXh6ya.cjs';
7
7
  import '../error/index.cjs';
8
8
  import 'stream';
9
9
  import 'json-schema';
10
- import '../tts/index.cjs';
11
- import '../vector/index.cjs';
12
- import '../vector/filter/index.cjs';
13
10
  import '../types-Bo1uigWx.cjs';
14
11
  import 'sift';
15
12
  import '../runtime-context/index.cjs';
16
13
  import '@opentelemetry/api';
17
14
  import 'xstate';
18
15
  import 'node:events';
16
+ import '../vector/index.cjs';
17
+ import '../vector/filter/index.cjs';
18
+ import '../tts/index.cjs';
19
19
  import 'node:http';
20
20
  import 'hono';
21
21
  import 'stream/web';
@@ -1,21 +1,21 @@
1
- import { o as MastraStorage, p as TABLE_NAMES, q as StorageColumn, r as StorageThreadType, s as StorageResourceType, t as MastraMessageV2, u as StorageGetMessagesArg, v as MastraMessageV1, E as EvalRow, w as WorkflowRuns, x as WorkflowRun, P as PaginationInfo } from '../base-DnSegjq5.js';
2
- export { z as LegacyWorkflowRun, y as LegacyWorkflowRuns, B as PaginationArgs, D as StorageGetTracesArg, G as TABLE_EVALS, H as TABLE_MESSAGES, K as TABLE_RESOURCES, O as TABLE_SCHEMAS, I as TABLE_THREADS, J as TABLE_TRACES, F as TABLE_WORKFLOW_SNAPSHOT } from '../base-DnSegjq5.js';
3
- import { T as Trace } from '../base-BbdvunNJ.js';
1
+ import { o as MastraStorage, p as TABLE_NAMES, q as StorageColumn, r as StorageThreadType, s as StorageResourceType, t as MastraMessageV2, u as StorageGetMessagesArg, v as MastraMessageV1, E as EvalRow, w as WorkflowRuns, x as WorkflowRun, P as PaginationInfo } from '../base-D6PagN3X.js';
2
+ export { z as LegacyWorkflowRun, y as LegacyWorkflowRuns, B as PaginationArgs, D as StorageGetTracesArg, G as TABLE_EVALS, H as TABLE_MESSAGES, K as TABLE_RESOURCES, O as TABLE_SCHEMAS, I as TABLE_THREADS, J as TABLE_TRACES, F as TABLE_WORKFLOW_SNAPSHOT } from '../base-D6PagN3X.js';
3
+ import { T as Trace } from '../base-ClrXcCRx.js';
4
4
  import 'ai';
5
5
  import 'zod';
6
- import '../logger-DtVDdb81.js';
6
+ import '../logger-Bpa2oLL4.js';
7
7
  import '../error/index.js';
8
8
  import 'stream';
9
9
  import 'json-schema';
10
- import '../tts/index.js';
11
- import '../vector/index.js';
12
- import '../vector/filter/index.js';
13
10
  import '../types-Bo1uigWx.js';
14
11
  import 'sift';
15
12
  import '../runtime-context/index.js';
16
13
  import '@opentelemetry/api';
17
14
  import 'xstate';
18
15
  import 'node:events';
16
+ import '../vector/index.js';
17
+ import '../vector/filter/index.js';
18
+ import '../tts/index.js';
19
19
  import 'node:http';
20
20
  import 'hono';
21
21
  import 'stream/web';
@@ -1,6 +1,6 @@
1
1
  import { MastraStorage } from '../chunk-FL5SZ2XU.js';
2
2
  export { MastraStorage } from '../chunk-FL5SZ2XU.js';
3
- import { MessageList } from '../chunk-QIQOR45O.js';
3
+ import { MessageList } from '../chunk-VMIMBLH4.js';
4
4
  export { TABLE_EVALS, TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCHEMAS, TABLE_THREADS, TABLE_TRACES, TABLE_WORKFLOW_SNAPSHOT } from '../chunk-TC2SCOTE.js';
5
5
 
6
6
  // src/storage/mock.ts