@mastra/core 0.19.0 → 0.19.1-alpha.0

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 (164) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/agent/agent.d.ts +2 -2
  3. package/dist/agent/agent.d.ts.map +1 -1
  4. package/dist/agent/index.cjs +11 -11
  5. package/dist/agent/index.js +2 -2
  6. package/dist/agent/input-processor/index.cjs +6 -6
  7. package/dist/agent/input-processor/index.js +1 -1
  8. package/dist/ai-tracing/index.cjs +32 -32
  9. package/dist/ai-tracing/index.js +1 -1
  10. package/dist/cache/index.cjs +3 -3
  11. package/dist/cache/index.js +1 -1
  12. package/dist/{chunk-4VNAMG7K.cjs → chunk-2C5AQMP5.cjs} +6 -6
  13. package/dist/{chunk-4VNAMG7K.cjs.map → chunk-2C5AQMP5.cjs.map} +1 -1
  14. package/dist/{chunk-JKLLXBOY.js → chunk-2EMOWXLL.js} +9 -9
  15. package/dist/{chunk-JKLLXBOY.js.map → chunk-2EMOWXLL.js.map} +1 -1
  16. package/dist/{chunk-EPMJYNEK.cjs → chunk-2F4RLQ5V.cjs} +4 -4
  17. package/dist/{chunk-EPMJYNEK.cjs.map → chunk-2F4RLQ5V.cjs.map} +1 -1
  18. package/dist/{chunk-HNBU4PI7.cjs → chunk-3I3NRXSD.cjs} +4 -4
  19. package/dist/{chunk-HNBU4PI7.cjs.map → chunk-3I3NRXSD.cjs.map} +1 -1
  20. package/dist/{chunk-SQQMX4VC.cjs → chunk-4PRV2Y55.cjs} +6 -6
  21. package/dist/{chunk-SQQMX4VC.cjs.map → chunk-4PRV2Y55.cjs.map} +1 -1
  22. package/dist/{chunk-7E4ESNZS.cjs → chunk-576KDLXN.cjs} +5 -5
  23. package/dist/{chunk-7E4ESNZS.cjs.map → chunk-576KDLXN.cjs.map} +1 -1
  24. package/dist/{chunk-PG6ZNDSR.cjs → chunk-57UPIDGK.cjs} +19 -19
  25. package/dist/{chunk-PG6ZNDSR.cjs.map → chunk-57UPIDGK.cjs.map} +1 -1
  26. package/dist/{chunk-5BQOHHCI.js → chunk-5QUE7HZF.js} +4 -4
  27. package/dist/{chunk-5BQOHHCI.js.map → chunk-5QUE7HZF.js.map} +1 -1
  28. package/dist/{chunk-CQ73JM2N.cjs → chunk-62I4SVWU.cjs} +10 -10
  29. package/dist/{chunk-CQ73JM2N.cjs.map → chunk-62I4SVWU.cjs.map} +1 -1
  30. package/dist/{chunk-COC64XPP.js → chunk-7CJKBCDL.js} +8 -8
  31. package/dist/{chunk-COC64XPP.js.map → chunk-7CJKBCDL.js.map} +1 -1
  32. package/dist/chunk-7J5DS33F.js +3 -0
  33. package/dist/chunk-7J5DS33F.js.map +1 -0
  34. package/dist/{chunk-RAXBZZKS.js → chunk-A7REAXWA.js} +3 -3
  35. package/dist/{chunk-RAXBZZKS.js.map → chunk-A7REAXWA.js.map} +1 -1
  36. package/dist/{chunk-DRVSEV5Y.cjs → chunk-BBTR6DPH.cjs} +8 -8
  37. package/dist/{chunk-DRVSEV5Y.cjs.map → chunk-BBTR6DPH.cjs.map} +1 -1
  38. package/dist/{chunk-FV3SA5TI.js → chunk-BMBWTBCL.js} +3 -3
  39. package/dist/{chunk-FV3SA5TI.js.map → chunk-BMBWTBCL.js.map} +1 -1
  40. package/dist/{chunk-NHJVMZIL.cjs → chunk-CC4KO56Z.cjs} +19 -19
  41. package/dist/{chunk-NHJVMZIL.cjs.map → chunk-CC4KO56Z.cjs.map} +1 -1
  42. package/dist/{chunk-N4PK4MOG.js → chunk-D2ZPF2AK.js} +4 -4
  43. package/dist/{chunk-N4PK4MOG.js.map → chunk-D2ZPF2AK.js.map} +1 -1
  44. package/dist/{chunk-3PQNUWJM.js → chunk-EQV2PPN2.js} +2 -4
  45. package/dist/chunk-EQV2PPN2.js.map +1 -0
  46. package/dist/chunk-FUVNHPNL.cjs +4 -0
  47. package/dist/chunk-FUVNHPNL.cjs.map +1 -0
  48. package/dist/{chunk-F6EJEELE.cjs → chunk-HJQ7ANDX.cjs} +6 -6
  49. package/dist/{chunk-F6EJEELE.cjs.map → chunk-HJQ7ANDX.cjs.map} +1 -1
  50. package/dist/{chunk-2GHLV754.cjs → chunk-HV5ND4KF.cjs} +4 -4
  51. package/dist/{chunk-2GHLV754.cjs.map → chunk-HV5ND4KF.cjs.map} +1 -1
  52. package/dist/{chunk-HQPFM22N.cjs → chunk-IB27A3HF.cjs} +16 -16
  53. package/dist/{chunk-HQPFM22N.cjs.map → chunk-IB27A3HF.cjs.map} +1 -1
  54. package/dist/{chunk-BCWRUNMS.cjs → chunk-K3UPABLX.cjs} +38 -38
  55. package/dist/{chunk-BCWRUNMS.cjs.map → chunk-K3UPABLX.cjs.map} +1 -1
  56. package/dist/{chunk-XG3SFWOH.js → chunk-KK5LUATU.js} +3 -3
  57. package/dist/{chunk-XG3SFWOH.js.map → chunk-KK5LUATU.js.map} +1 -1
  58. package/dist/{chunk-VWO3JJXC.js → chunk-LYRPXSHB.js} +4 -4
  59. package/dist/{chunk-VWO3JJXC.js.map → chunk-LYRPXSHB.js.map} +1 -1
  60. package/dist/{chunk-IAXAPVOP.js → chunk-M24QFL6S.js} +4 -4
  61. package/dist/{chunk-IAXAPVOP.js.map → chunk-M24QFL6S.js.map} +1 -1
  62. package/dist/{chunk-5HCVPQTD.js → chunk-M4AX46DS.js} +3 -3
  63. package/dist/{chunk-5HCVPQTD.js.map → chunk-M4AX46DS.js.map} +1 -1
  64. package/dist/{chunk-3WFH6YRI.js → chunk-M635OK6I.js} +4 -4
  65. package/dist/{chunk-3WFH6YRI.js.map → chunk-M635OK6I.js.map} +1 -1
  66. package/dist/{chunk-UTEH2LCJ.cjs → chunk-NLBX7Q47.cjs} +19 -19
  67. package/dist/{chunk-UTEH2LCJ.cjs.map → chunk-NLBX7Q47.cjs.map} +1 -1
  68. package/dist/{chunk-2DGWSOVQ.js → chunk-NMSLDMQ6.js} +3 -3
  69. package/dist/{chunk-2DGWSOVQ.js.map → chunk-NMSLDMQ6.js.map} +1 -1
  70. package/dist/{chunk-PJ6HF3KW.js → chunk-NVMKTP4N.js} +3 -3
  71. package/dist/{chunk-PJ6HF3KW.js.map → chunk-NVMKTP4N.js.map} +1 -1
  72. package/dist/{chunk-4BEHJSL6.js → chunk-QFKTSGBI.js} +3 -3
  73. package/dist/{chunk-4BEHJSL6.js.map → chunk-QFKTSGBI.js.map} +1 -1
  74. package/dist/{chunk-LZBVDMVQ.cjs → chunk-QMDJVXFQ.cjs} +19 -19
  75. package/dist/{chunk-LZBVDMVQ.cjs.map → chunk-QMDJVXFQ.cjs.map} +1 -1
  76. package/dist/{chunk-TIBULEK6.cjs → chunk-SZD4WTRW.cjs} +717 -275
  77. package/dist/chunk-SZD4WTRW.cjs.map +1 -0
  78. package/dist/{chunk-OBIF7QD5.js → chunk-T2CUZA2P.js} +3 -3
  79. package/dist/{chunk-OBIF7QD5.js.map → chunk-T2CUZA2P.js.map} +1 -1
  80. package/dist/{chunk-WHFNGECY.js → chunk-T3JFFQH2.js} +3 -2
  81. package/dist/chunk-T3JFFQH2.js.map +1 -0
  82. package/dist/{chunk-BUY5X7DT.js → chunk-TJHEGJNW.js} +4 -4
  83. package/dist/{chunk-BUY5X7DT.js.map → chunk-TJHEGJNW.js.map} +1 -1
  84. package/dist/{chunk-KTCBGNCZ.cjs → chunk-UU5L5GDY.cjs} +2 -4
  85. package/dist/chunk-UU5L5GDY.cjs.map +1 -0
  86. package/dist/{chunk-S7UXT3V4.cjs → chunk-WM4VQWOZ.cjs} +3 -2
  87. package/dist/chunk-WM4VQWOZ.cjs.map +1 -0
  88. package/dist/{chunk-RNIY63FP.cjs → chunk-WMGV4CS3.cjs} +59 -59
  89. package/dist/{chunk-RNIY63FP.cjs.map → chunk-WMGV4CS3.cjs.map} +1 -1
  90. package/dist/{chunk-5M6ZTQJN.js → chunk-X6PLOE2T.js} +717 -275
  91. package/dist/chunk-X6PLOE2T.js.map +1 -0
  92. package/dist/error/index.cjs +5 -5
  93. package/dist/error/index.d.ts +2 -1
  94. package/dist/error/index.d.ts.map +1 -1
  95. package/dist/error/index.js +1 -1
  96. package/dist/eval/index.cjs +3 -3
  97. package/dist/eval/index.js +1 -1
  98. package/dist/index.cjs +66 -66
  99. package/dist/index.js +15 -15
  100. package/dist/llm/index.cjs +5 -5
  101. package/dist/llm/index.d.ts +1 -0
  102. package/dist/llm/index.d.ts.map +1 -1
  103. package/dist/llm/index.js +1 -1
  104. package/dist/llm/model/gateway-resolver.d.ts +9 -0
  105. package/dist/llm/model/gateway-resolver.d.ts.map +1 -0
  106. package/dist/llm/model/gateways/base.d.ts +5 -4
  107. package/dist/llm/model/gateways/base.d.ts.map +1 -1
  108. package/dist/llm/model/gateways/index.d.ts +1 -0
  109. package/dist/llm/model/gateways/index.d.ts.map +1 -1
  110. package/dist/llm/model/gateways/models-dev.d.ts +3 -2
  111. package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
  112. package/dist/llm/model/gateways/netlify.d.ts +15 -0
  113. package/dist/llm/model/gateways/netlify.d.ts.map +1 -0
  114. package/dist/llm/model/openai-compatible.d.ts +8 -3
  115. package/dist/llm/model/openai-compatible.d.ts.map +1 -1
  116. package/dist/llm/model/provider-registry.generated.d.ts +8 -370
  117. package/dist/llm/model/provider-registry.generated.d.ts.map +1 -1
  118. package/dist/loop/index.cjs +2 -2
  119. package/dist/loop/index.js +1 -1
  120. package/dist/mastra/index.cjs +2 -2
  121. package/dist/mastra/index.js +1 -1
  122. package/dist/memory/index.cjs +4 -4
  123. package/dist/memory/index.js +1 -1
  124. package/dist/network/vNext/index.cjs +29 -29
  125. package/dist/network/vNext/index.js +2 -2
  126. package/dist/processors/index.cjs +10 -10
  127. package/dist/processors/index.js +1 -1
  128. package/dist/relevance/index.cjs +4 -4
  129. package/dist/relevance/index.js +1 -1
  130. package/dist/scores/index.cjs +9 -9
  131. package/dist/scores/index.js +2 -2
  132. package/dist/scores/scoreTraces/index.cjs +13 -13
  133. package/dist/scores/scoreTraces/index.js +4 -4
  134. package/dist/server/index.cjs +7 -7
  135. package/dist/server/index.js +2 -2
  136. package/dist/storage/index.cjs +25 -25
  137. package/dist/storage/index.js +4 -4
  138. package/dist/stream/index.cjs +4 -4
  139. package/dist/stream/index.js +1 -1
  140. package/dist/telemetry/index.cjs +7 -7
  141. package/dist/telemetry/index.js +1 -1
  142. package/dist/test-utils/llm-mock.cjs +2 -2
  143. package/dist/test-utils/llm-mock.js +1 -1
  144. package/dist/tts/index.cjs +2 -2
  145. package/dist/tts/index.js +1 -1
  146. package/dist/utils.cjs +17 -17
  147. package/dist/utils.js +1 -1
  148. package/dist/vector/index.cjs +4 -4
  149. package/dist/vector/index.js +1 -1
  150. package/dist/voice/index.cjs +4 -4
  151. package/dist/voice/index.js +1 -1
  152. package/dist/workflows/evented/index.cjs +10 -10
  153. package/dist/workflows/evented/index.js +1 -1
  154. package/dist/workflows/index.cjs +12 -12
  155. package/dist/workflows/index.js +1 -1
  156. package/dist/workflows/legacy/index.cjs +22 -22
  157. package/dist/workflows/legacy/index.js +1 -1
  158. package/package.json +1 -1
  159. package/dist/chunk-3PQNUWJM.js.map +0 -1
  160. package/dist/chunk-5M6ZTQJN.js.map +0 -1
  161. package/dist/chunk-KTCBGNCZ.cjs.map +0 -1
  162. package/dist/chunk-S7UXT3V4.cjs.map +0 -1
  163. package/dist/chunk-TIBULEK6.cjs.map +0 -1
  164. package/dist/chunk-WHFNGECY.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkRNIY63FP_cjs = require('../../chunk-RNIY63FP.cjs');
3
+ var chunkWMGV4CS3_cjs = require('../../chunk-WMGV4CS3.cjs');
4
4
  var chunkABJOUEVA_cjs = require('../../chunk-ABJOUEVA.cjs');
5
- var chunkCQ73JM2N_cjs = require('../../chunk-CQ73JM2N.cjs');
5
+ var chunk62I4SVWU_cjs = require('../../chunk-62I4SVWU.cjs');
6
6
  var chunkGPWMM745_cjs = require('../../chunk-GPWMM745.cjs');
7
7
  var chunk4L3P3PCP_cjs = require('../../chunk-4L3P3PCP.cjs');
8
8
  var chunkWVCEJBDR_cjs = require('../../chunk-WVCEJBDR.cjs');
@@ -105,7 +105,7 @@ var NewAgentNetwork = class extends chunk4L3P3PCP_cjs.MastraBase {
105
105
  format: "v2"
106
106
  });
107
107
  } else {
108
- const messageList = new chunkCQ73JM2N_cjs.MessageList({
108
+ const messageList = new chunk62I4SVWU_cjs.MessageList({
109
109
  threadId: thread?.id,
110
110
  resourceId: thread?.resourceId
111
111
  });
@@ -212,7 +212,7 @@ var NewAgentNetwork = class extends chunk4L3P3PCP_cjs.MastraBase {
212
212
 
213
213
  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.
214
214
  `;
215
- return new chunkRNIY63FP_cjs.Agent({
215
+ return new chunkWMGV4CS3_cjs.Agent({
216
216
  name: "routing-agent",
217
217
  instructions,
218
218
  model: this.#model,
@@ -228,7 +228,7 @@ var NewAgentNetwork = class extends chunk4L3P3PCP_cjs.MastraBase {
228
228
  resourceId
229
229
  }) {
230
230
  const networkWorkflow = this.createWorkflow({ runtimeContext });
231
- const finalStep = chunkRNIY63FP_cjs.createStep({
231
+ const finalStep = chunkWMGV4CS3_cjs.createStep({
232
232
  id: "final-step",
233
233
  inputSchema: networkWorkflow.outputSchema,
234
234
  outputSchema: networkWorkflow.outputSchema,
@@ -242,12 +242,12 @@ var NewAgentNetwork = class extends chunk4L3P3PCP_cjs.MastraBase {
242
242
  return inputData;
243
243
  }
244
244
  });
245
- const mainWorkflow = chunkRNIY63FP_cjs.createWorkflow({
245
+ const mainWorkflow = chunkWMGV4CS3_cjs.createWorkflow({
246
246
  id: "Agent-Network-Main-Workflow",
247
247
  inputSchema: zod.z.object({
248
248
  iteration: zod.z.number(),
249
249
  task: zod.z.string(),
250
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
250
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
251
251
  threadId: zod.z.string().optional(),
252
252
  threadResourceId: zod.z.string().optional()
253
253
  }),
@@ -287,7 +287,7 @@ var NewAgentNetwork = class extends chunk4L3P3PCP_cjs.MastraBase {
287
287
  resourceId
288
288
  }) {
289
289
  const networkWorkflow = this.createWorkflow({ runtimeContext });
290
- const finalStep = chunkRNIY63FP_cjs.createStep({
290
+ const finalStep = chunkWMGV4CS3_cjs.createStep({
291
291
  id: "final-step",
292
292
  inputSchema: networkWorkflow.outputSchema,
293
293
  outputSchema: networkWorkflow.outputSchema,
@@ -301,13 +301,13 @@ var NewAgentNetwork = class extends chunk4L3P3PCP_cjs.MastraBase {
301
301
  return inputData;
302
302
  }
303
303
  });
304
- const mainWorkflow = chunkRNIY63FP_cjs.createWorkflow({
304
+ const mainWorkflow = chunkWMGV4CS3_cjs.createWorkflow({
305
305
  id: "Agent-Network-Main-Workflow",
306
306
  inputSchema: zod.z.object({
307
307
  iteration: zod.z.number(),
308
308
  task: zod.z.string(),
309
309
  resourceId: zod.z.string(),
310
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
310
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
311
311
  result: zod.z.string().optional(),
312
312
  threadId: zod.z.string().optional(),
313
313
  threadResourceId: zod.z.string().optional(),
@@ -317,7 +317,7 @@ var NewAgentNetwork = class extends chunk4L3P3PCP_cjs.MastraBase {
317
317
  outputSchema: zod.z.object({
318
318
  task: zod.z.string(),
319
319
  resourceId: zod.z.string(),
320
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
320
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
321
321
  prompt: zod.z.string(),
322
322
  result: zod.z.string(),
323
323
  isComplete: zod.z.boolean().optional(),
@@ -351,12 +351,12 @@ var NewAgentNetwork = class extends chunk4L3P3PCP_cjs.MastraBase {
351
351
  createWorkflow({ runtimeContext }) {
352
352
  const runId = this.#mastra?.generateId() || crypto.randomUUID();
353
353
  const runtimeContextToUse = runtimeContext || new chunkGPWMM745_cjs.RuntimeContext();
354
- const routingStep = chunkRNIY63FP_cjs.createStep({
354
+ const routingStep = chunkWMGV4CS3_cjs.createStep({
355
355
  id: "routing-step",
356
356
  inputSchema: zod.z.object({
357
357
  task: zod.z.string(),
358
358
  resourceId: zod.z.string(),
359
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
359
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
360
360
  result: zod.z.string().optional(),
361
361
  iteration: zod.z.number(),
362
362
  threadId: zod.z.string().optional(),
@@ -367,7 +367,7 @@ var NewAgentNetwork = class extends chunk4L3P3PCP_cjs.MastraBase {
367
367
  outputSchema: zod.z.object({
368
368
  task: zod.z.string(),
369
369
  resourceId: zod.z.string(),
370
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
370
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
371
371
  prompt: zod.z.string(),
372
372
  result: zod.z.string(),
373
373
  isComplete: zod.z.boolean().optional(),
@@ -456,7 +456,7 @@ ${completionResult.object.finalResult}` : ""}
456
456
  const options = {
457
457
  output: zod.z.object({
458
458
  resourceId: zod.z.string(),
459
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
459
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
460
460
  prompt: zod.z.string(),
461
461
  selectionReason: zod.z.string()
462
462
  }),
@@ -481,12 +481,12 @@ ${completionResult.object.finalResult}` : ""}
481
481
  };
482
482
  }
483
483
  });
484
- const agentStep = chunkRNIY63FP_cjs.createStep({
484
+ const agentStep = chunkWMGV4CS3_cjs.createStep({
485
485
  id: "agent-step",
486
486
  inputSchema: zod.z.object({
487
487
  task: zod.z.string(),
488
488
  resourceId: zod.z.string(),
489
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
489
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
490
490
  prompt: zod.z.string(),
491
491
  result: zod.z.string(),
492
492
  isComplete: zod.z.boolean().optional(),
@@ -496,7 +496,7 @@ ${completionResult.object.finalResult}` : ""}
496
496
  outputSchema: zod.z.object({
497
497
  task: zod.z.string(),
498
498
  resourceId: zod.z.string(),
499
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
499
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
500
500
  result: zod.z.string(),
501
501
  isComplete: zod.z.boolean().optional(),
502
502
  iteration: zod.z.number()
@@ -617,12 +617,12 @@ ${completionResult.object.finalResult}` : ""}
617
617
  };
618
618
  }
619
619
  });
620
- const workflowStep = chunkRNIY63FP_cjs.createStep({
620
+ const workflowStep = chunkWMGV4CS3_cjs.createStep({
621
621
  id: "workflow-step",
622
622
  inputSchema: zod.z.object({
623
623
  task: zod.z.string(),
624
624
  resourceId: zod.z.string(),
625
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
625
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
626
626
  prompt: zod.z.string(),
627
627
  result: zod.z.string(),
628
628
  isComplete: zod.z.boolean().optional(),
@@ -632,7 +632,7 @@ ${completionResult.object.finalResult}` : ""}
632
632
  outputSchema: zod.z.object({
633
633
  task: zod.z.string(),
634
634
  resourceId: zod.z.string(),
635
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
635
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
636
636
  result: zod.z.string(),
637
637
  isComplete: zod.z.boolean().optional(),
638
638
  iteration: zod.z.number()
@@ -739,12 +739,12 @@ ${completionResult.object.finalResult}` : ""}
739
739
  };
740
740
  }
741
741
  });
742
- const toolStep = chunkRNIY63FP_cjs.createStep({
742
+ const toolStep = chunkWMGV4CS3_cjs.createStep({
743
743
  id: "toolStep",
744
744
  inputSchema: zod.z.object({
745
745
  task: zod.z.string(),
746
746
  resourceId: zod.z.string(),
747
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
747
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
748
748
  prompt: zod.z.string(),
749
749
  result: zod.z.string(),
750
750
  isComplete: zod.z.boolean().optional(),
@@ -754,7 +754,7 @@ ${completionResult.object.finalResult}` : ""}
754
754
  outputSchema: zod.z.object({
755
755
  task: zod.z.string(),
756
756
  resourceId: zod.z.string(),
757
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
757
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
758
758
  result: zod.z.string(),
759
759
  isComplete: zod.z.boolean().optional(),
760
760
  iteration: zod.z.number()
@@ -814,12 +814,12 @@ ${completionResult.object.finalResult}` : ""}
814
814
  };
815
815
  }
816
816
  });
817
- const finishStep = chunkRNIY63FP_cjs.createStep({
817
+ const finishStep = chunkWMGV4CS3_cjs.createStep({
818
818
  id: "finish-step",
819
819
  inputSchema: zod.z.object({
820
820
  task: zod.z.string(),
821
821
  resourceId: zod.z.string(),
822
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
822
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
823
823
  prompt: zod.z.string(),
824
824
  result: zod.z.string(),
825
825
  isComplete: zod.z.boolean().optional(),
@@ -841,12 +841,12 @@ ${completionResult.object.finalResult}` : ""}
841
841
  };
842
842
  }
843
843
  });
844
- const networkWorkflow = chunkRNIY63FP_cjs.createWorkflow({
844
+ const networkWorkflow = chunkWMGV4CS3_cjs.createWorkflow({
845
845
  id: "Agent-Network-Outer-Workflow",
846
846
  inputSchema: zod.z.object({
847
847
  task: zod.z.string(),
848
848
  resourceId: zod.z.string(),
849
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
849
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
850
850
  result: zod.z.string().optional(),
851
851
  iteration: zod.z.number(),
852
852
  threadId: zod.z.string().optional(),
@@ -857,7 +857,7 @@ ${completionResult.object.finalResult}` : ""}
857
857
  outputSchema: zod.z.object({
858
858
  task: zod.z.string(),
859
859
  resourceId: zod.z.string(),
860
- resourceType: chunkRNIY63FP_cjs.PRIMITIVE_TYPES,
860
+ resourceType: chunkWMGV4CS3_cjs.PRIMITIVE_TYPES,
861
861
  prompt: zod.z.string(),
862
862
  result: zod.z.string(),
863
863
  isComplete: zod.z.boolean().optional(),
@@ -1,6 +1,6 @@
1
- import { Agent, createStep, createWorkflow, PRIMITIVE_TYPES } from '../../chunk-JKLLXBOY.js';
1
+ import { Agent, createStep, createWorkflow, PRIMITIVE_TYPES } from '../../chunk-2EMOWXLL.js';
2
2
  import { EMITTER_SYMBOL } from '../../chunk-NLNKQD2T.js';
3
- import { MessageList } from '../../chunk-BUY5X7DT.js';
3
+ import { MessageList } from '../../chunk-TJHEGJNW.js';
4
4
  import { RuntimeContext } from '../../chunk-HLRWYUFN.js';
5
5
  import { MastraBase } from '../../chunk-BMVFEBPE.js';
6
6
  import { RegisteredLogger } from '../../chunk-BN2M4UK5.js';
@@ -1,44 +1,44 @@
1
1
  'use strict';
2
2
 
3
- var chunkRNIY63FP_cjs = require('../chunk-RNIY63FP.cjs');
3
+ var chunkWMGV4CS3_cjs = require('../chunk-WMGV4CS3.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "BatchPartsProcessor", {
8
8
  enumerable: true,
9
- get: function () { return chunkRNIY63FP_cjs.BatchPartsProcessor; }
9
+ get: function () { return chunkWMGV4CS3_cjs.BatchPartsProcessor; }
10
10
  });
11
11
  Object.defineProperty(exports, "LanguageDetector", {
12
12
  enumerable: true,
13
- get: function () { return chunkRNIY63FP_cjs.LanguageDetector; }
13
+ get: function () { return chunkWMGV4CS3_cjs.LanguageDetector; }
14
14
  });
15
15
  Object.defineProperty(exports, "ModerationProcessor", {
16
16
  enumerable: true,
17
- get: function () { return chunkRNIY63FP_cjs.ModerationProcessor; }
17
+ get: function () { return chunkWMGV4CS3_cjs.ModerationProcessor; }
18
18
  });
19
19
  Object.defineProperty(exports, "PIIDetector", {
20
20
  enumerable: true,
21
- get: function () { return chunkRNIY63FP_cjs.PIIDetector; }
21
+ get: function () { return chunkWMGV4CS3_cjs.PIIDetector; }
22
22
  });
23
23
  Object.defineProperty(exports, "PromptInjectionDetector", {
24
24
  enumerable: true,
25
- get: function () { return chunkRNIY63FP_cjs.PromptInjectionDetector; }
25
+ get: function () { return chunkWMGV4CS3_cjs.PromptInjectionDetector; }
26
26
  });
27
27
  Object.defineProperty(exports, "StructuredOutputProcessor", {
28
28
  enumerable: true,
29
- get: function () { return chunkRNIY63FP_cjs.StructuredOutputProcessor; }
29
+ get: function () { return chunkWMGV4CS3_cjs.StructuredOutputProcessor; }
30
30
  });
31
31
  Object.defineProperty(exports, "SystemPromptScrubber", {
32
32
  enumerable: true,
33
- get: function () { return chunkRNIY63FP_cjs.SystemPromptScrubber; }
33
+ get: function () { return chunkWMGV4CS3_cjs.SystemPromptScrubber; }
34
34
  });
35
35
  Object.defineProperty(exports, "TokenLimiterProcessor", {
36
36
  enumerable: true,
37
- get: function () { return chunkRNIY63FP_cjs.TokenLimiterProcessor; }
37
+ get: function () { return chunkWMGV4CS3_cjs.TokenLimiterProcessor; }
38
38
  });
39
39
  Object.defineProperty(exports, "UnicodeNormalizer", {
40
40
  enumerable: true,
41
- get: function () { return chunkRNIY63FP_cjs.UnicodeNormalizer; }
41
+ get: function () { return chunkWMGV4CS3_cjs.UnicodeNormalizer; }
42
42
  });
43
43
  //# sourceMappingURL=index.cjs.map
44
44
  //# sourceMappingURL=index.cjs.map
@@ -1,3 +1,3 @@
1
- export { BatchPartsProcessor, LanguageDetector, ModerationProcessor, PIIDetector, PromptInjectionDetector, StructuredOutputProcessor, SystemPromptScrubber, TokenLimiterProcessor, UnicodeNormalizer } from '../chunk-JKLLXBOY.js';
1
+ export { BatchPartsProcessor, LanguageDetector, ModerationProcessor, PIIDetector, PromptInjectionDetector, StructuredOutputProcessor, SystemPromptScrubber, TokenLimiterProcessor, UnicodeNormalizer } from '../chunk-2EMOWXLL.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkHNBU4PI7_cjs = require('../chunk-HNBU4PI7.cjs');
3
+ var chunk3I3NRXSD_cjs = require('../chunk-3I3NRXSD.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "CohereRelevanceScorer", {
8
8
  enumerable: true,
9
- get: function () { return chunkHNBU4PI7_cjs.CohereRelevanceScorer; }
9
+ get: function () { return chunk3I3NRXSD_cjs.CohereRelevanceScorer; }
10
10
  });
11
11
  Object.defineProperty(exports, "MastraAgentRelevanceScorer", {
12
12
  enumerable: true,
13
- get: function () { return chunkHNBU4PI7_cjs.MastraAgentRelevanceScorer; }
13
+ get: function () { return chunk3I3NRXSD_cjs.MastraAgentRelevanceScorer; }
14
14
  });
15
15
  Object.defineProperty(exports, "createSimilarityPrompt", {
16
16
  enumerable: true,
17
- get: function () { return chunkHNBU4PI7_cjs.createSimilarityPrompt; }
17
+ get: function () { return chunk3I3NRXSD_cjs.createSimilarityPrompt; }
18
18
  });
19
19
  //# sourceMappingURL=index.cjs.map
20
20
  //# sourceMappingURL=index.cjs.map
@@ -1,3 +1,3 @@
1
- export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-FV3SA5TI.js';
1
+ export { CohereRelevanceScorer, MastraAgentRelevanceScorer, createSimilarityPrompt } from '../chunk-BMBWTBCL.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,37 +1,37 @@
1
1
  'use strict';
2
2
 
3
- var chunkLZBVDMVQ_cjs = require('../chunk-LZBVDMVQ.cjs');
4
- var chunk2GHLV754_cjs = require('../chunk-2GHLV754.cjs');
3
+ var chunkQMDJVXFQ_cjs = require('../chunk-QMDJVXFQ.cjs');
4
+ var chunkHV5ND4KF_cjs = require('../chunk-HV5ND4KF.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "MastraScorer", {
9
9
  enumerable: true,
10
- get: function () { return chunkLZBVDMVQ_cjs.MastraScorer; }
10
+ get: function () { return chunkQMDJVXFQ_cjs.MastraScorer; }
11
11
  });
12
12
  Object.defineProperty(exports, "createScorer", {
13
13
  enumerable: true,
14
- get: function () { return chunkLZBVDMVQ_cjs.createScorer; }
14
+ get: function () { return chunkQMDJVXFQ_cjs.createScorer; }
15
15
  });
16
16
  Object.defineProperty(exports, "runExperiment", {
17
17
  enumerable: true,
18
- get: function () { return chunkLZBVDMVQ_cjs.runExperiment; }
18
+ get: function () { return chunkQMDJVXFQ_cjs.runExperiment; }
19
19
  });
20
20
  Object.defineProperty(exports, "saveScorePayloadSchema", {
21
21
  enumerable: true,
22
- get: function () { return chunk2GHLV754_cjs.saveScorePayloadSchema; }
22
+ get: function () { return chunkHV5ND4KF_cjs.saveScorePayloadSchema; }
23
23
  });
24
24
  Object.defineProperty(exports, "scoreResultSchema", {
25
25
  enumerable: true,
26
- get: function () { return chunk2GHLV754_cjs.scoreResultSchema; }
26
+ get: function () { return chunkHV5ND4KF_cjs.scoreResultSchema; }
27
27
  });
28
28
  Object.defineProperty(exports, "scoringExtractStepResultSchema", {
29
29
  enumerable: true,
30
- get: function () { return chunk2GHLV754_cjs.scoringExtractStepResultSchema; }
30
+ get: function () { return chunkHV5ND4KF_cjs.scoringExtractStepResultSchema; }
31
31
  });
32
32
  Object.defineProperty(exports, "scoringValueSchema", {
33
33
  enumerable: true,
34
- get: function () { return chunk2GHLV754_cjs.scoringValueSchema; }
34
+ get: function () { return chunkHV5ND4KF_cjs.scoringValueSchema; }
35
35
  });
36
36
  //# sourceMappingURL=index.cjs.map
37
37
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- export { MastraScorer, createScorer, runExperiment } from '../chunk-VWO3JJXC.js';
2
- export { saveScorePayloadSchema, scoreResultSchema, scoringExtractStepResultSchema, scoringValueSchema } from '../chunk-RAXBZZKS.js';
1
+ export { MastraScorer, createScorer, runExperiment } from '../chunk-LYRPXSHB.js';
2
+ export { saveScorePayloadSchema, scoreResultSchema, scoringExtractStepResultSchema, scoringValueSchema } from '../chunk-A7REAXWA.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkPG6ZNDSR_cjs = require('../../chunk-PG6ZNDSR.cjs');
4
- var chunk2GHLV754_cjs = require('../../chunk-2GHLV754.cjs');
5
- var chunkCQ73JM2N_cjs = require('../../chunk-CQ73JM2N.cjs');
6
- var chunkS7UXT3V4_cjs = require('../../chunk-S7UXT3V4.cjs');
3
+ var chunk57UPIDGK_cjs = require('../../chunk-57UPIDGK.cjs');
4
+ var chunkHV5ND4KF_cjs = require('../../chunk-HV5ND4KF.cjs');
5
+ var chunk62I4SVWU_cjs = require('../../chunk-62I4SVWU.cjs');
6
+ var chunkWM4VQWOZ_cjs = require('../../chunk-WM4VQWOZ.cjs');
7
7
  var pMap = require('p-map');
8
8
  var z = require('zod');
9
9
 
@@ -23,7 +23,7 @@ async function scoreTraces({
23
23
  const run = await workflow.createRunAsync();
24
24
  await run.start({ inputData: { targets, scorerName } });
25
25
  } catch (error) {
26
- const mastraError = new chunkS7UXT3V4_cjs.MastraError(
26
+ const mastraError = new chunkWM4VQWOZ_cjs.MastraError(
27
27
  {
28
28
  category: "SYSTEM",
29
29
  domain: "SCORER",
@@ -76,7 +76,7 @@ function normalizeMessageContent(content) {
76
76
  role: "user",
77
77
  parts: content.map((part) => ({ type: part.type, text: part.text }))
78
78
  };
79
- const converted = chunkCQ73JM2N_cjs.convertMessages(tempMessage).to("AIV4.UI");
79
+ const converted = chunk62I4SVWU_cjs.convertMessages(tempMessage).to("AIV4.UI");
80
80
  return converted[0]?.content || "";
81
81
  }
82
82
  function convertToUIMessage(message, createdAt) {
@@ -94,7 +94,7 @@ function convertToUIMessage(message, createdAt) {
94
94
  parts: message.content.map((part) => ({ type: part.type, text: part.text }))
95
95
  };
96
96
  }
97
- const converted = chunkCQ73JM2N_cjs.convertMessages(messageInput).to("AIV4.UI");
97
+ const converted = chunk62I4SVWU_cjs.convertMessages(messageInput).to("AIV4.UI");
98
98
  const result = converted[0];
99
99
  if (!result) {
100
100
  throw new Error("Failed to convert message");
@@ -234,7 +234,7 @@ function transformTraceToScorerInputAndOutput(trace) {
234
234
  }
235
235
 
236
236
  // src/scores/scoreTraces/scoreTracesWorkflow.ts
237
- var getTraceStep = chunkPG6ZNDSR_cjs.createStep({
237
+ var getTraceStep = chunk57UPIDGK_cjs.createStep({
238
238
  id: "__process-trace-scoring",
239
239
  inputSchema: z__default.default.object({
240
240
  targets: z__default.default.array(
@@ -255,7 +255,7 @@ var getTraceStep = chunkPG6ZNDSR_cjs.createStep({
255
255
  }
256
256
  const storage = mastra.getStorage();
257
257
  if (!storage) {
258
- const mastraError = new chunkS7UXT3V4_cjs.MastraError({
258
+ const mastraError = new chunkWM4VQWOZ_cjs.MastraError({
259
259
  id: "MASTRA_STORAGE_NOT_FOUND_FOR_TRACE_SCORING",
260
260
  domain: "STORAGE" /* STORAGE */,
261
261
  category: "SYSTEM" /* SYSTEM */,
@@ -272,7 +272,7 @@ var getTraceStep = chunkPG6ZNDSR_cjs.createStep({
272
272
  try {
273
273
  scorer = mastra.getScorerByName(inputData.scorerName);
274
274
  } catch (error) {
275
- const mastraError = new chunkS7UXT3V4_cjs.MastraError(
275
+ const mastraError = new chunkWM4VQWOZ_cjs.MastraError(
276
276
  {
277
277
  id: "MASTRA_SCORER_NOT_FOUND_FOR_TRACE_SCORING",
278
278
  domain: "SCORER" /* SCORER */,
@@ -294,7 +294,7 @@ var getTraceStep = chunkPG6ZNDSR_cjs.createStep({
294
294
  try {
295
295
  await runScorerOnTarget({ storage, scorer, target, tracingContext });
296
296
  } catch (error) {
297
- const mastraError = new chunkS7UXT3V4_cjs.MastraError(
297
+ const mastraError = new chunkWM4VQWOZ_cjs.MastraError(
298
298
  {
299
299
  id: "MASTRA_SCORER_FAILED_TO_RUN_SCORER_ON_TRACE",
300
300
  domain: "SCORER" /* SCORER */,
@@ -362,7 +362,7 @@ async function runScorerOnTarget({
362
362
  await attachScoreToSpan({ storage, span, scoreRecord: savedScoreRecord });
363
363
  }
364
364
  async function validateAndSaveScore({ storage, scorerResult }) {
365
- const payloadToSave = chunk2GHLV754_cjs.saveScorePayloadSchema.parse(scorerResult);
365
+ const payloadToSave = chunkHV5ND4KF_cjs.saveScorePayloadSchema.parse(scorerResult);
366
366
  const result = await storage.saveScore(payloadToSave);
367
367
  return result.score;
368
368
  }
@@ -404,7 +404,7 @@ async function attachScoreToSpan({
404
404
  updates: { links: [...existingLinks, link] }
405
405
  });
406
406
  }
407
- var scoreTracesWorkflow = chunkPG6ZNDSR_cjs.createWorkflow({
407
+ var scoreTracesWorkflow = chunk57UPIDGK_cjs.createWorkflow({
408
408
  id: "__batch-scoring-traces",
409
409
  inputSchema: z__default.default.object({
410
410
  targets: z__default.default.array(
@@ -1,7 +1,7 @@
1
- import { createStep, createWorkflow } from '../../chunk-5BQOHHCI.js';
2
- import { saveScorePayloadSchema } from '../../chunk-RAXBZZKS.js';
3
- import { convertMessages } from '../../chunk-BUY5X7DT.js';
4
- import { MastraError } from '../../chunk-WHFNGECY.js';
1
+ import { createStep, createWorkflow } from '../../chunk-5QUE7HZF.js';
2
+ import { saveScorePayloadSchema } from '../../chunk-A7REAXWA.js';
3
+ import { convertMessages } from '../../chunk-TJHEGJNW.js';
4
+ import { MastraError } from '../../chunk-T3JFFQH2.js';
5
5
  import pMap from 'p-map';
6
6
  import z from 'zod';
7
7
 
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkF6EJEELE_cjs = require('../chunk-F6EJEELE.cjs');
4
- var chunkS7UXT3V4_cjs = require('../chunk-S7UXT3V4.cjs');
3
+ var chunkHJQ7ANDX_cjs = require('../chunk-HJQ7ANDX.cjs');
4
+ var chunkWM4VQWOZ_cjs = require('../chunk-WM4VQWOZ.cjs');
5
5
  var chunk4L3P3PCP_cjs = require('../chunk-4L3P3PCP.cjs');
6
6
  var chunkEBVYYC2Q_cjs = require('../chunk-EBVYYC2Q.cjs');
7
7
 
8
8
  // src/server/auth.ts
9
9
  var _MastraAuthProvider_decorators, _init, _a;
10
- _MastraAuthProvider_decorators = [chunkF6EJEELE_cjs.InstrumentClass({
10
+ _MastraAuthProvider_decorators = [chunkHJQ7ANDX_cjs.InstrumentClass({
11
11
  prefix: "auth",
12
12
  excludeMethods: ["__setTools", "__setLogger", "__setTelemetry", "#log"]
13
13
  })];
@@ -39,7 +39,7 @@ exports.MastraAuthProvider = /*@__PURE__*/(_ => {
39
39
  function validateOptions(path, options) {
40
40
  const opts = options;
41
41
  if (opts.method === void 0) {
42
- throw new chunkS7UXT3V4_cjs.MastraError({
42
+ throw new chunkWM4VQWOZ_cjs.MastraError({
43
43
  id: "MASTRA_SERVER_API_INVALID_ROUTE_OPTIONS",
44
44
  text: `Invalid options for route "${path}", missing "method" property`,
45
45
  domain: "MASTRA_SERVER" /* MASTRA_SERVER */,
@@ -47,7 +47,7 @@ function validateOptions(path, options) {
47
47
  });
48
48
  }
49
49
  if (opts.handler === void 0 && opts.createHandler === void 0) {
50
- throw new chunkS7UXT3V4_cjs.MastraError({
50
+ throw new chunkWM4VQWOZ_cjs.MastraError({
51
51
  id: "MASTRA_SERVER_API_INVALID_ROUTE_OPTIONS",
52
52
  text: `Invalid options for route "${path}", you must define a "handler" or "createHandler" property`,
53
53
  domain: "MASTRA_SERVER" /* MASTRA_SERVER */,
@@ -55,7 +55,7 @@ function validateOptions(path, options) {
55
55
  });
56
56
  }
57
57
  if (opts.handler !== void 0 && opts.createHandler !== void 0) {
58
- throw new chunkS7UXT3V4_cjs.MastraError({
58
+ throw new chunkWM4VQWOZ_cjs.MastraError({
59
59
  id: "MASTRA_SERVER_API_INVALID_ROUTE_OPTIONS",
60
60
  text: `Invalid options for route "${path}", you can only define one of the following properties: "handler" or "createHandler"`,
61
61
  domain: "MASTRA_SERVER" /* MASTRA_SERVER */,
@@ -65,7 +65,7 @@ function validateOptions(path, options) {
65
65
  }
66
66
  function registerApiRoute(path, options) {
67
67
  if (path.startsWith("/api/")) {
68
- throw new chunkS7UXT3V4_cjs.MastraError({
68
+ throw new chunkWM4VQWOZ_cjs.MastraError({
69
69
  id: "MASTRA_SERVER_API_PATH_RESERVED",
70
70
  text: `Path must not start with "/api", it's reserved for internal API routes`,
71
71
  domain: "MASTRA_SERVER" /* MASTRA_SERVER */,
@@ -1,5 +1,5 @@
1
- import { InstrumentClass } from '../chunk-4BEHJSL6.js';
2
- import { MastraError } from '../chunk-WHFNGECY.js';
1
+ import { InstrumentClass } from '../chunk-QFKTSGBI.js';
2
+ import { MastraError } from '../chunk-T3JFFQH2.js';
3
3
  import { MastraBase } from '../chunk-BMVFEBPE.js';
4
4
  import { __decoratorStart, __decorateElement, __runInitializers } from '../chunk-3HXBPDKN.js';
5
5