@mastra/core 1.31.0-alpha.4 → 1.31.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 (132) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/dist/agent/durable/index.cjs +22 -22
  3. package/dist/agent/durable/index.js +4 -4
  4. package/dist/agent/index.cjs +9 -9
  5. package/dist/agent/index.js +1 -1
  6. package/dist/browser/index.cjs +2 -2
  7. package/dist/browser/index.js +1 -1
  8. package/dist/channels/index.cjs +4 -4
  9. package/dist/channels/index.js +1 -1
  10. package/dist/{chunk-2J3YSWHO.cjs → chunk-3LHTPHZP.cjs} +59 -59
  11. package/dist/{chunk-2J3YSWHO.cjs.map → chunk-3LHTPHZP.cjs.map} +1 -1
  12. package/dist/{chunk-UADG5CCD.js → chunk-43WNQPFP.js} +4 -4
  13. package/dist/{chunk-UADG5CCD.js.map → chunk-43WNQPFP.js.map} +1 -1
  14. package/dist/{chunk-W6E5CCSB.js → chunk-53NCBZKI.js} +4 -4
  15. package/dist/{chunk-W6E5CCSB.js.map → chunk-53NCBZKI.js.map} +1 -1
  16. package/dist/{chunk-WRJUVUIZ.cjs → chunk-5B6LXG5O.cjs} +389 -389
  17. package/dist/{chunk-WRJUVUIZ.cjs.map → chunk-5B6LXG5O.cjs.map} +1 -1
  18. package/dist/{chunk-GB2U2Y3P.js → chunk-5QMK4T3X.js} +3 -3
  19. package/dist/{chunk-GB2U2Y3P.js.map → chunk-5QMK4T3X.js.map} +1 -1
  20. package/dist/{chunk-BLU4IC6F.cjs → chunk-6MVINWPK.cjs} +14 -14
  21. package/dist/{chunk-BLU4IC6F.cjs.map → chunk-6MVINWPK.cjs.map} +1 -1
  22. package/dist/{chunk-7LKPZXDM.js → chunk-7AX25YLX.js} +4 -4
  23. package/dist/{chunk-7LKPZXDM.js.map → chunk-7AX25YLX.js.map} +1 -1
  24. package/dist/{chunk-QABIZQB7.js → chunk-BME3IGZD.js} +3 -3
  25. package/dist/{chunk-QABIZQB7.js.map → chunk-BME3IGZD.js.map} +1 -1
  26. package/dist/{chunk-CDS2VUE2.cjs → chunk-DNNICOYK.cjs} +20 -20
  27. package/dist/{chunk-CDS2VUE2.cjs.map → chunk-DNNICOYK.cjs.map} +1 -1
  28. package/dist/{chunk-VR5VNHNZ.js → chunk-FAPA556P.js} +8 -8
  29. package/dist/{chunk-VR5VNHNZ.js.map → chunk-FAPA556P.js.map} +1 -1
  30. package/dist/{chunk-AUQH3O4N.js → chunk-HAU2MDSW.js} +4 -4
  31. package/dist/{chunk-AUQH3O4N.js.map → chunk-HAU2MDSW.js.map} +1 -1
  32. package/dist/{chunk-3734AUDT.js → chunk-J72QZMTT.js} +6 -6
  33. package/dist/{chunk-3734AUDT.js.map → chunk-J72QZMTT.js.map} +1 -1
  34. package/dist/{chunk-IFC3YAVV.cjs → chunk-JH7D3XKB.cjs} +19 -19
  35. package/dist/{chunk-IFC3YAVV.cjs.map → chunk-JH7D3XKB.cjs.map} +1 -1
  36. package/dist/{chunk-XBCX5E3N.js → chunk-KXI7J3FZ.js} +3 -3
  37. package/dist/chunk-KXI7J3FZ.js.map +1 -0
  38. package/dist/{chunk-UCSM3GWM.js → chunk-LD7UCH6D.js} +3 -3
  39. package/dist/{chunk-UCSM3GWM.js.map → chunk-LD7UCH6D.js.map} +1 -1
  40. package/dist/{chunk-YBNPB36J.cjs → chunk-OSMMAURN.cjs} +9 -9
  41. package/dist/{chunk-YBNPB36J.cjs.map → chunk-OSMMAURN.cjs.map} +1 -1
  42. package/dist/{chunk-WDCXTDRR.cjs → chunk-SI6NWTR2.cjs} +7 -7
  43. package/dist/{chunk-WDCXTDRR.cjs.map → chunk-SI6NWTR2.cjs.map} +1 -1
  44. package/dist/{chunk-EE2UB4VX.js → chunk-TRVPCCVP.js} +3 -3
  45. package/dist/{chunk-EE2UB4VX.js.map → chunk-TRVPCCVP.js.map} +1 -1
  46. package/dist/{chunk-PBKTHAF5.cjs → chunk-TSGU2S4P.cjs} +5 -5
  47. package/dist/{chunk-PBKTHAF5.cjs.map → chunk-TSGU2S4P.cjs.map} +1 -1
  48. package/dist/{chunk-HTAWEZ7M.cjs → chunk-TUZTUFQO.cjs} +3 -3
  49. package/dist/{chunk-HTAWEZ7M.cjs.map → chunk-TUZTUFQO.cjs.map} +1 -1
  50. package/dist/{chunk-2CAB6LW3.cjs → chunk-V4RZ4FO4.cjs} +224 -224
  51. package/dist/{chunk-2CAB6LW3.cjs.map → chunk-V4RZ4FO4.cjs.map} +1 -1
  52. package/dist/{chunk-GUYKZ5U2.cjs → chunk-VWZ44FD3.cjs} +7 -7
  53. package/dist/{chunk-GUYKZ5U2.cjs.map → chunk-VWZ44FD3.cjs.map} +1 -1
  54. package/dist/{chunk-AVBQJTYL.cjs → chunk-W7C7RY6I.cjs} +3 -3
  55. package/dist/chunk-W7C7RY6I.cjs.map +1 -0
  56. package/dist/{chunk-JS344OAI.js → chunk-X6ETALRU.js} +9 -9
  57. package/dist/{chunk-JS344OAI.js.map → chunk-X6ETALRU.js.map} +1 -1
  58. package/dist/datasets/index.cjs +17 -17
  59. package/dist/datasets/index.js +2 -2
  60. package/dist/docs/SKILL.md +1 -1
  61. package/dist/docs/assets/SOURCE_MAP.json +203 -203
  62. package/dist/docs/references/docs-agents-adding-voice.md +14 -13
  63. package/dist/docs/references/docs-voice-overview.md +66 -0
  64. package/dist/docs/references/docs-voice-speech-to-speech.md +45 -1
  65. package/dist/docs/references/reference.md +1 -0
  66. package/dist/evals/index.cjs +6 -6
  67. package/dist/evals/index.js +2 -2
  68. package/dist/evals/scoreTraces/index.cjs +3 -3
  69. package/dist/evals/scoreTraces/index.js +1 -1
  70. package/dist/harness/index.cjs +7 -7
  71. package/dist/harness/index.js +5 -5
  72. package/dist/index.cjs +2 -2
  73. package/dist/index.js +1 -1
  74. package/dist/llm/index.cjs +20 -20
  75. package/dist/llm/index.js +5 -5
  76. package/dist/loop/index.cjs +14 -14
  77. package/dist/loop/index.js +1 -1
  78. package/dist/mastra/index.cjs +2 -2
  79. package/dist/mastra/index.js +1 -1
  80. package/dist/mastra-JCF3EDEH.js +3 -0
  81. package/dist/{mastra-4ITVIM3P.js.map → mastra-JCF3EDEH.js.map} +1 -1
  82. package/dist/mastra-R4MQZGKL.cjs +12 -0
  83. package/dist/{mastra-AJ5FVVJV.cjs.map → mastra-R4MQZGKL.cjs.map} +1 -1
  84. package/dist/memory/index.cjs +19 -19
  85. package/dist/memory/index.js +1 -1
  86. package/dist/models-dev-KZS6GJRC.js +3 -0
  87. package/dist/{models-dev-IPZ3ZBDT.js.map → models-dev-KZS6GJRC.js.map} +1 -1
  88. package/dist/models-dev-QVOQXYGC.cjs +12 -0
  89. package/dist/{models-dev-26D6O63V.cjs.map → models-dev-QVOQXYGC.cjs.map} +1 -1
  90. package/dist/netlify-2O6B3H7A.cjs +12 -0
  91. package/dist/{netlify-PK7PYQ7D.cjs.map → netlify-2O6B3H7A.cjs.map} +1 -1
  92. package/dist/netlify-IWBQ6YNZ.js +3 -0
  93. package/dist/{netlify-HN66KZY4.js.map → netlify-IWBQ6YNZ.js.map} +1 -1
  94. package/dist/processor-provider/index.cjs +10 -10
  95. package/dist/processor-provider/index.js +1 -1
  96. package/dist/processors/index.cjs +49 -49
  97. package/dist/processors/index.js +1 -1
  98. package/dist/provider-registry-2OT653BC.cjs +44 -0
  99. package/dist/{provider-registry-43OJC4SQ.cjs.map → provider-registry-2OT653BC.cjs.map} +1 -1
  100. package/dist/provider-registry-Z7LJZZQR.js +3 -0
  101. package/dist/{provider-registry-5SZ7C4YH.js.map → provider-registry-Z7LJZZQR.js.map} +1 -1
  102. package/dist/relevance/index.cjs +3 -3
  103. package/dist/relevance/index.js +1 -1
  104. package/dist/runner-2MI65OOJ.js +3 -0
  105. package/dist/{runner-OHTFIP4Q.js.map → runner-2MI65OOJ.js.map} +1 -1
  106. package/dist/runner-CDSZZZQS.cjs +16 -0
  107. package/dist/{runner-2UOLTUSW.cjs.map → runner-CDSZZZQS.cjs.map} +1 -1
  108. package/dist/storage/index.cjs +61 -61
  109. package/dist/storage/index.js +2 -2
  110. package/dist/stream/index.cjs +11 -11
  111. package/dist/stream/index.js +1 -1
  112. package/dist/tool-loop-agent/index.cjs +4 -4
  113. package/dist/tool-loop-agent/index.js +1 -1
  114. package/dist/vector/index.cjs +7 -7
  115. package/dist/vector/index.js +1 -1
  116. package/dist/workflows/evented/index.cjs +10 -10
  117. package/dist/workflows/evented/index.js +1 -1
  118. package/dist/workflows/index.cjs +24 -24
  119. package/dist/workflows/index.js +1 -1
  120. package/package.json +9 -9
  121. package/dist/chunk-AVBQJTYL.cjs.map +0 -1
  122. package/dist/chunk-XBCX5E3N.js.map +0 -1
  123. package/dist/mastra-4ITVIM3P.js +0 -3
  124. package/dist/mastra-AJ5FVVJV.cjs +0 -12
  125. package/dist/models-dev-26D6O63V.cjs +0 -12
  126. package/dist/models-dev-IPZ3ZBDT.js +0 -3
  127. package/dist/netlify-HN66KZY4.js +0 -3
  128. package/dist/netlify-PK7PYQ7D.cjs +0 -12
  129. package/dist/provider-registry-43OJC4SQ.cjs +0 -44
  130. package/dist/provider-registry-5SZ7C4YH.js +0 -3
  131. package/dist/runner-2UOLTUSW.cjs +0 -16
  132. package/dist/runner-OHTFIP4Q.js +0 -3
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkBLU4IC6F_cjs = require('./chunk-BLU4IC6F.cjs');
3
+ var chunk6MVINWPK_cjs = require('./chunk-6MVINWPK.cjs');
4
4
  var chunkZCBG4ZQT_cjs = require('./chunk-ZCBG4ZQT.cjs');
5
- var chunkHTAWEZ7M_cjs = require('./chunk-HTAWEZ7M.cjs');
5
+ var chunkTUZTUFQO_cjs = require('./chunk-TUZTUFQO.cjs');
6
6
  var chunk6K4BQ2JS_cjs = require('./chunk-6K4BQ2JS.cjs');
7
7
  var chunkIBQB7RSW_cjs = require('./chunk-IBQB7RSW.cjs');
8
8
  var chunkYGD6CZV4_cjs = require('./chunk-YGD6CZV4.cjs');
@@ -62,7 +62,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
62
62
  let suspended;
63
63
  let bailed;
64
64
  const startedAt = Date.now();
65
- const { inputData, validationError } = await chunkBLU4IC6F_cjs.validateStepInput({
65
+ const { inputData, validationError } = await chunk6MVINWPK_cjs.validateStepInput({
66
66
  prevOutput: typeof params.foreachIdx === "number" ? params.input?.[params.foreachIdx] : params.input,
67
67
  step,
68
68
  validateInputs: params.validateInputs ?? true
@@ -95,7 +95,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
95
95
  const stepOutput = await chunkYGD6CZV4_cjs.executeWithContext({
96
96
  span: params.tracingContext?.currentSpan,
97
97
  fn: () => step.execute(
98
- chunkBLU4IC6F_cjs.createDeprecationProxy(
98
+ chunk6MVINWPK_cjs.createDeprecationProxy(
99
99
  {
100
100
  workflowId: params.workflowId,
101
101
  runId,
@@ -110,9 +110,9 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
110
110
  resumeData: params.resumeData,
111
111
  suspendData: suspendDataToUse,
112
112
  getInitData: () => stepResults?.input,
113
- getStepResult: chunkBLU4IC6F_cjs.getStepResult.bind(this, stepResults),
113
+ getStepResult: chunk6MVINWPK_cjs.getStepResult.bind(this, stepResults),
114
114
  suspend: async (suspendPayload, suspendOptions) => {
115
- const { suspendData, validationError: validationError2 } = await chunkBLU4IC6F_cjs.validateStepSuspendData({
115
+ const { suspendData, validationError: validationError2 } = await chunk6MVINWPK_cjs.validateStepSuspendData({
116
116
  suspendData: suspendPayload,
117
117
  step,
118
118
  validateInputs: params.validateInputs ?? true
@@ -165,7 +165,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
165
165
  },
166
166
  {
167
167
  paramName: "runCount",
168
- deprecationMessage: chunkBLU4IC6F_cjs.runCountDeprecationMessage,
168
+ deprecationMessage: chunk6MVINWPK_cjs.runCountDeprecationMessage,
169
169
  logger: this.logger
170
170
  }
171
171
  )
@@ -238,7 +238,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
238
238
  // Preserve TripWire data as plain object for proper serialization
239
239
  // Important: Check `error` not `errorInstance` because getErrorFromUnknown
240
240
  // converts the error and loses the prototype chain
241
- tripwire: error instanceof chunkBLU4IC6F_cjs.TripWire ? {
241
+ tripwire: error instanceof chunk6MVINWPK_cjs.TripWire ? {
242
242
  reason: error.message,
243
243
  retry: error.options?.retry,
244
244
  metadata: error.options?.metadata,
@@ -296,7 +296,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
296
296
  const callId = crypto.randomUUID();
297
297
  const outputWriter = this.createOutputWriter(runId);
298
298
  return condition(
299
- chunkBLU4IC6F_cjs.createDeprecationProxy(
299
+ chunk6MVINWPK_cjs.createDeprecationProxy(
300
300
  {
301
301
  workflowId,
302
302
  runId,
@@ -307,7 +307,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
307
307
  retryCount,
308
308
  resumeData,
309
309
  getInitData: () => stepResults?.input,
310
- getStepResult: chunkBLU4IC6F_cjs.getStepResult.bind(this, stepResults),
310
+ getStepResult: chunk6MVINWPK_cjs.getStepResult.bind(this, stepResults),
311
311
  bail: (_result) => {
312
312
  throw new Error("Not implemented");
313
313
  },
@@ -334,7 +334,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
334
334
  },
335
335
  {
336
336
  paramName: "runCount",
337
- deprecationMessage: chunkBLU4IC6F_cjs.runCountDeprecationMessage,
337
+ deprecationMessage: chunk6MVINWPK_cjs.runCountDeprecationMessage,
338
338
  logger: this.logger
339
339
  }
340
340
  )
@@ -354,7 +354,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
354
354
  const callId = crypto.randomUUID();
355
355
  const outputWriter = this.createOutputWriter(runId);
356
356
  return await step.fn(
357
- chunkBLU4IC6F_cjs.createDeprecationProxy(
357
+ chunk6MVINWPK_cjs.createDeprecationProxy(
358
358
  {
359
359
  workflowId: params.workflowId,
360
360
  runId,
@@ -368,7 +368,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
368
368
  retryCount,
369
369
  resumeData: params.resumeData,
370
370
  getInitData: () => stepResults?.input,
371
- getStepResult: chunkBLU4IC6F_cjs.getStepResult.bind(this, stepResults),
371
+ getStepResult: chunk6MVINWPK_cjs.getStepResult.bind(this, stepResults),
372
372
  suspend: async (_suspendPayload) => {
373
373
  throw new Error("Not implemented");
374
374
  },
@@ -397,7 +397,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
397
397
  },
398
398
  {
399
399
  paramName: "runCount",
400
- deprecationMessage: chunkBLU4IC6F_cjs.runCountDeprecationMessage,
400
+ deprecationMessage: chunk6MVINWPK_cjs.runCountDeprecationMessage,
401
401
  logger: this.logger
402
402
  }
403
403
  )
@@ -421,7 +421,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
421
421
  const callId = crypto.randomUUID();
422
422
  const outputWriter = this.createOutputWriter(runId);
423
423
  const result = await step.fn(
424
- chunkBLU4IC6F_cjs.createDeprecationProxy(
424
+ chunk6MVINWPK_cjs.createDeprecationProxy(
425
425
  {
426
426
  workflowId: params.workflowId,
427
427
  runId,
@@ -435,7 +435,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
435
435
  retryCount,
436
436
  resumeData: params.resumeData,
437
437
  getInitData: () => stepResults?.input,
438
- getStepResult: chunkBLU4IC6F_cjs.getStepResult.bind(this, stepResults),
438
+ getStepResult: chunk6MVINWPK_cjs.getStepResult.bind(this, stepResults),
439
439
  suspend: async (_suspendPayload) => {
440
440
  throw new Error("Not implemented");
441
441
  },
@@ -464,7 +464,7 @@ var StepExecutor = class extends chunkFCQNDFEW_cjs.MastraBase {
464
464
  },
465
465
  {
466
466
  paramName: "runCount",
467
- deprecationMessage: chunkBLU4IC6F_cjs.runCountDeprecationMessage,
467
+ deprecationMessage: chunk6MVINWPK_cjs.runCountDeprecationMessage,
468
468
  logger: this.logger
469
469
  }
470
470
  )
@@ -483,7 +483,7 @@ function isTripwireChunk(chunk) {
483
483
  }
484
484
  function createTripWireFromChunk(chunk) {
485
485
  const { payload } = chunk;
486
- return new chunkBLU4IC6F_cjs.TripWire(
486
+ return new chunk6MVINWPK_cjs.TripWire(
487
487
  payload.reason || "Agent tripwire triggered",
488
488
  {
489
489
  retry: payload.retry,
@@ -784,7 +784,7 @@ async function processWorkflowForEach({
784
784
  const workflowsStore2 = await mastra.getStorage()?.getStore("workflows");
785
785
  const updatedOutput = [...currentResult.output];
786
786
  for (const suspIdx of indicesToResume) {
787
- updatedOutput[suspIdx] = chunkHTAWEZ7M_cjs.createPendingMarker();
787
+ updatedOutput[suspIdx] = chunkTUZTUFQO_cjs.createPendingMarker();
788
788
  }
789
789
  await workflowsStore2?.updateWorkflowResults({
790
790
  workflowName: workflowId,
@@ -2102,7 +2102,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
2102
2102
  runId
2103
2103
  }) ?? { context: {} };
2104
2104
  const nestedWorkflow = step.step;
2105
- const timeTravelParams = chunkBLU4IC6F_cjs.createTimeTravelExecutionParams({
2105
+ const timeTravelParams = chunk6MVINWPK_cjs.createTimeTravelExecutionParams({
2106
2106
  steps: timeTravel.steps.slice(1),
2107
2107
  inputData: timeTravel.inputData,
2108
2108
  resumeData: timeTravel.resumeData,
@@ -2202,7 +2202,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
2202
2202
  for (const [key, value] of Object.entries(requestContext)) {
2203
2203
  rc.set(key, value);
2204
2204
  }
2205
- const { resumeData: timeTravelResumeData, validationError: timeTravelResumeValidationError } = await chunkBLU4IC6F_cjs.validateStepResumeData({
2205
+ const { resumeData: timeTravelResumeData, validationError: timeTravelResumeValidationError } = await chunk6MVINWPK_cjs.validateStepResumeData({
2206
2206
  resumeData: timeTravel?.stepResults[step.step.id]?.status === "suspended" ? timeTravel?.resumeData : void 0,
2207
2207
  step: step.step
2208
2208
  });
@@ -3023,7 +3023,7 @@ var WorkflowEventProcessor = class extends EventProcessor {
3023
3023
 
3024
3024
  // src/workflows/evented/workflow.ts
3025
3025
  function cloneWorkflow(workflow, opts) {
3026
- const wf = new chunkBLU4IC6F_cjs.Workflow({
3026
+ const wf = new chunk6MVINWPK_cjs.Workflow({
3027
3027
  id: opts.id,
3028
3028
  inputSchema: workflow.inputSchema,
3029
3029
  outputSchema: workflow.outputSchema,
@@ -3052,16 +3052,16 @@ function cloneStep(step, opts) {
3052
3052
  };
3053
3053
  }
3054
3054
  function isAgent(input) {
3055
- return input instanceof chunkBLU4IC6F_cjs.Agent;
3055
+ return input instanceof chunk6MVINWPK_cjs.Agent;
3056
3056
  }
3057
3057
  function isToolStep(input) {
3058
3058
  return input instanceof chunkM4KUR53T_cjs.Tool;
3059
3059
  }
3060
3060
  function isStepParams(input) {
3061
- return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof chunkBLU4IC6F_cjs.Agent) && !(input instanceof chunkM4KUR53T_cjs.Tool);
3061
+ return input !== null && typeof input === "object" && "id" in input && "execute" in input && !(input instanceof chunk6MVINWPK_cjs.Agent) && !(input instanceof chunkM4KUR53T_cjs.Tool);
3062
3062
  }
3063
3063
  function isProcessor(obj) {
3064
- return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof chunkBLU4IC6F_cjs.Agent) && !(obj instanceof chunkM4KUR53T_cjs.Tool) && (typeof obj.processInput === "function" || typeof obj.processInputStep === "function" || typeof obj.processOutputStream === "function" || typeof obj.processOutputResult === "function" || typeof obj.processOutputStep === "function");
3064
+ return obj !== null && typeof obj === "object" && "id" in obj && typeof obj.id === "string" && !(obj instanceof chunk6MVINWPK_cjs.Agent) && !(obj instanceof chunkM4KUR53T_cjs.Tool) && (typeof obj.processInput === "function" || typeof obj.processInputStep === "function" || typeof obj.processOutputStream === "function" || typeof obj.processOutputResult === "function" || typeof obj.processOutputStep === "function");
3065
3065
  }
3066
3066
  function areProcessorMessageArraysEqual(before, after) {
3067
3067
  if (before === after) {
@@ -3137,7 +3137,7 @@ async function processAgentStream(params) {
3137
3137
  }
3138
3138
  }
3139
3139
  if (streamFormat !== "legacy") {
3140
- await chunkBLU4IC6F_cjs.forwardAgentStreamChunk({ writer, chunk });
3140
+ await chunk6MVINWPK_cjs.forwardAgentStreamChunk({ writer, chunk });
3141
3141
  }
3142
3142
  }
3143
3143
  try {
@@ -3195,7 +3195,7 @@ function createStepFromAgent(params, agentOrToolOptions) {
3195
3195
  };
3196
3196
  const llm = await params.getLLM({ requestContext });
3197
3197
  const modelInfo = llm.getModel();
3198
- const isV2Model = chunkBLU4IC6F_cjs.isSupportedLanguageModel(modelInfo);
3198
+ const isV2Model = chunk6MVINWPK_cjs.isSupportedLanguageModel(modelInfo);
3199
3199
  let structuredResult = null;
3200
3200
  const handleFinish = (result) => {
3201
3201
  const resultWithObject = result;
@@ -3362,8 +3362,8 @@ function createStepFromProcessor(processor) {
3362
3362
  return {
3363
3363
  id: `processor:${processor.id}`,
3364
3364
  description: processor.name ?? `Processor ${processor.id}`,
3365
- inputSchema: chunkXB4FLS7A_cjs.toStandardSchema(chunkBLU4IC6F_cjs.ProcessorStepSchema),
3366
- outputSchema: chunkXB4FLS7A_cjs.toStandardSchema(chunkBLU4IC6F_cjs.ProcessorStepOutputSchema),
3365
+ inputSchema: chunkXB4FLS7A_cjs.toStandardSchema(chunk6MVINWPK_cjs.ProcessorStepSchema),
3366
+ outputSchema: chunkXB4FLS7A_cjs.toStandardSchema(chunk6MVINWPK_cjs.ProcessorStepOutputSchema),
3367
3367
  execute: async ({ inputData, requestContext, ...obsFields }) => {
3368
3368
  const observabilityContext = chunkIBQB7RSW_cjs.resolveObservabilityContext(obsFields);
3369
3369
  const input = inputData;
@@ -3399,7 +3399,7 @@ function createStepFromProcessor(processor) {
3399
3399
  abortSignal
3400
3400
  } = input;
3401
3401
  const abort = (reason, options) => {
3402
- throw new chunkBLU4IC6F_cjs.TripWire(reason || `Tripwire triggered by ${processor.id}`, options, processor.id);
3402
+ throw new chunk6MVINWPK_cjs.TripWire(reason || `Tripwire triggered by ${processor.id}`, options, processor.id);
3403
3403
  };
3404
3404
  const initialMessageId = messageId;
3405
3405
  let currentMessageId = messageId;
@@ -3422,10 +3422,10 @@ function createStepFromProcessor(processor) {
3422
3422
  ...retryCount !== void 0 ? { retryCount } : {}
3423
3423
  };
3424
3424
  case "inputStep": {
3425
- const summarizedModel = chunkBLU4IC6F_cjs.summarizeProcessorModelForSpan(model);
3426
- const summarizedTools = chunkBLU4IC6F_cjs.summarizeProcessorToolsForSpan(tools);
3427
- const summarizedToolChoice = chunkBLU4IC6F_cjs.summarizeToolChoiceForSpan(toolChoice, tools);
3428
- const summarizedActiveTools = chunkBLU4IC6F_cjs.summarizeActiveToolsForSpan(activeTools, tools);
3425
+ const summarizedModel = chunk6MVINWPK_cjs.summarizeProcessorModelForSpan(model);
3426
+ const summarizedTools = chunk6MVINWPK_cjs.summarizeProcessorToolsForSpan(tools);
3427
+ const summarizedToolChoice = chunk6MVINWPK_cjs.summarizeToolChoiceForSpan(toolChoice, tools);
3428
+ const summarizedActiveTools = chunk6MVINWPK_cjs.summarizeActiveToolsForSpan(activeTools, tools);
3429
3429
  return {
3430
3430
  messages: messages ?? [],
3431
3431
  ...systemMessages ? { systemMessages } : {},
@@ -3439,7 +3439,7 @@ function createStepFromProcessor(processor) {
3439
3439
  };
3440
3440
  }
3441
3441
  case "outputResult": {
3442
- const summarizedResult = chunkBLU4IC6F_cjs.summarizeProcessorResultForSpan(outputResult ?? defaultOutputResult);
3442
+ const summarizedResult = chunk6MVINWPK_cjs.summarizeProcessorResultForSpan(outputResult ?? defaultOutputResult);
3443
3443
  return {
3444
3444
  messages: messages ?? [],
3445
3445
  ...summarizedResult ? { result: summarizedResult } : {},
@@ -3483,25 +3483,25 @@ function createStepFromProcessor(processor) {
3483
3483
  output.messageId = payload.messageId;
3484
3484
  }
3485
3485
  if (payload.model !== void 0 && payload.model !== model) {
3486
- const summarizedModel = chunkBLU4IC6F_cjs.summarizeProcessorModelForSpan(payload.model);
3486
+ const summarizedModel = chunk6MVINWPK_cjs.summarizeProcessorModelForSpan(payload.model);
3487
3487
  if (summarizedModel) {
3488
3488
  output.model = summarizedModel;
3489
3489
  }
3490
3490
  }
3491
3491
  if (payload.tools !== void 0 && payload.tools !== tools) {
3492
- const summarizedTools = chunkBLU4IC6F_cjs.summarizeProcessorToolsForSpan(payload.tools);
3492
+ const summarizedTools = chunk6MVINWPK_cjs.summarizeProcessorToolsForSpan(payload.tools);
3493
3493
  if (summarizedTools) {
3494
3494
  output.tools = summarizedTools;
3495
3495
  }
3496
3496
  }
3497
3497
  if (payload.toolChoice !== void 0 && payload.toolChoice !== toolChoice) {
3498
- const summarizedToolChoice = chunkBLU4IC6F_cjs.summarizeToolChoiceForSpan(payload.toolChoice, payload.tools ?? tools);
3498
+ const summarizedToolChoice = chunk6MVINWPK_cjs.summarizeToolChoiceForSpan(payload.toolChoice, payload.tools ?? tools);
3499
3499
  if (summarizedToolChoice) {
3500
3500
  output.toolChoice = summarizedToolChoice;
3501
3501
  }
3502
3502
  }
3503
3503
  if (payload.activeTools !== void 0 && payload.activeTools !== activeTools) {
3504
- const summarizedActiveTools = chunkBLU4IC6F_cjs.summarizeActiveToolsForSpan(payload.activeTools, payload.tools ?? tools);
3504
+ const summarizedActiveTools = chunk6MVINWPK_cjs.summarizeActiveToolsForSpan(payload.activeTools, payload.tools ?? tools);
3505
3505
  if (summarizedActiveTools) {
3506
3506
  output.activeTools = summarizedActiveTools;
3507
3507
  }
@@ -3546,7 +3546,7 @@ function createStepFromProcessor(processor) {
3546
3546
  if (processorStates) {
3547
3547
  let ps = processorStates.get(processor.id);
3548
3548
  if (!ps) {
3549
- ps = new chunkBLU4IC6F_cjs.ProcessorState();
3549
+ ps = new chunk6MVINWPK_cjs.ProcessorState();
3550
3550
  processorStates.set(processor.id, ps);
3551
3551
  }
3552
3552
  processorState = ps.customState;
@@ -3597,7 +3597,7 @@ function createStepFromProcessor(processor) {
3597
3597
  processorSpan?.end({ output: buildProcessorSpanOutput(result) });
3598
3598
  return result;
3599
3599
  } catch (error) {
3600
- if (error instanceof chunkBLU4IC6F_cjs.TripWire) {
3600
+ if (error instanceof chunk6MVINWPK_cjs.TripWire) {
3601
3601
  processorSpan?.end({ output: { tripwire: error.message } });
3602
3602
  } else {
3603
3603
  processorSpan?.error({ error, endSpan: true });
@@ -3640,7 +3640,7 @@ function createStepFromProcessor(processor) {
3640
3640
  systemMessages: result.getAllSystemMessages()
3641
3641
  };
3642
3642
  } else if (Array.isArray(result)) {
3643
- chunkBLU4IC6F_cjs.ProcessorRunner.applyMessagesToMessageList(
3643
+ chunk6MVINWPK_cjs.ProcessorRunner.applyMessagesToMessageList(
3644
3644
  result,
3645
3645
  passThrough.messageList,
3646
3646
  idsBeforeProcessing,
@@ -3650,7 +3650,7 @@ function createStepFromProcessor(processor) {
3650
3650
  return { ...passThrough, messages: result };
3651
3651
  } else if (result && "messages" in result && "systemMessages" in result) {
3652
3652
  const typedResult = result;
3653
- chunkBLU4IC6F_cjs.ProcessorRunner.applyMessagesToMessageList(
3653
+ chunk6MVINWPK_cjs.ProcessorRunner.applyMessagesToMessageList(
3654
3654
  typedResult.messages,
3655
3655
  passThrough.messageList,
3656
3656
  idsBeforeProcessing,
@@ -3698,13 +3698,13 @@ function createStepFromProcessor(processor) {
3698
3698
  messageId: currentMessageId,
3699
3699
  rotateResponseMessageId: rotateCurrentResponseMessageId
3700
3700
  });
3701
- const validatedResult = await chunkBLU4IC6F_cjs.ProcessorRunner.validateAndFormatProcessInputStepResult(result, {
3701
+ const validatedResult = await chunk6MVINWPK_cjs.ProcessorRunner.validateAndFormatProcessInputStepResult(result, {
3702
3702
  messageList: passThrough.messageList,
3703
3703
  processor,
3704
3704
  stepNumber: stepNumber ?? 0
3705
3705
  });
3706
3706
  if (validatedResult.messages) {
3707
- chunkBLU4IC6F_cjs.ProcessorRunner.applyMessagesToMessageList(
3707
+ chunk6MVINWPK_cjs.ProcessorRunner.applyMessagesToMessageList(
3708
3708
  validatedResult.messages,
3709
3709
  passThrough.messageList,
3710
3710
  idsBeforeProcessing,
@@ -3761,7 +3761,7 @@ function createStepFromProcessor(processor) {
3761
3761
  delete mutableState[spanKey];
3762
3762
  }
3763
3763
  } catch (error) {
3764
- if (error instanceof chunkBLU4IC6F_cjs.TripWire) {
3764
+ if (error instanceof chunk6MVINWPK_cjs.TripWire) {
3765
3765
  processorSpan2?.end({ output: { tripwire: error.message } });
3766
3766
  } else {
3767
3767
  processorSpan2?.error({ error, endSpan: true });
@@ -3812,7 +3812,7 @@ function createStepFromProcessor(processor) {
3812
3812
  systemMessages: result.getAllSystemMessages()
3813
3813
  };
3814
3814
  } else if (Array.isArray(result)) {
3815
- chunkBLU4IC6F_cjs.ProcessorRunner.applyMessagesToMessageList(
3815
+ chunk6MVINWPK_cjs.ProcessorRunner.applyMessagesToMessageList(
3816
3816
  result,
3817
3817
  passThrough.messageList,
3818
3818
  idsBeforeProcessing,
@@ -3822,7 +3822,7 @@ function createStepFromProcessor(processor) {
3822
3822
  return { ...passThrough, messages: result };
3823
3823
  } else if (result && "messages" in result && "systemMessages" in result) {
3824
3824
  const typedResult = result;
3825
- chunkBLU4IC6F_cjs.ProcessorRunner.applyMessagesToMessageList(
3825
+ chunk6MVINWPK_cjs.ProcessorRunner.applyMessagesToMessageList(
3826
3826
  typedResult.messages,
3827
3827
  passThrough.messageList,
3828
3828
  idsBeforeProcessing,
@@ -3884,7 +3884,7 @@ function createStepFromProcessor(processor) {
3884
3884
  systemMessages: result.getAllSystemMessages()
3885
3885
  };
3886
3886
  } else if (Array.isArray(result)) {
3887
- chunkBLU4IC6F_cjs.ProcessorRunner.applyMessagesToMessageList(
3887
+ chunk6MVINWPK_cjs.ProcessorRunner.applyMessagesToMessageList(
3888
3888
  result,
3889
3889
  passThrough.messageList,
3890
3890
  idsBeforeProcessing,
@@ -3894,7 +3894,7 @@ function createStepFromProcessor(processor) {
3894
3894
  return { ...passThrough, messages: result };
3895
3895
  } else if (result && "messages" in result && "systemMessages" in result) {
3896
3896
  const typedResult = result;
3897
- chunkBLU4IC6F_cjs.ProcessorRunner.applyMessagesToMessageList(
3897
+ chunk6MVINWPK_cjs.ProcessorRunner.applyMessagesToMessageList(
3898
3898
  typedResult.messages,
3899
3899
  passThrough.messageList,
3900
3900
  idsBeforeProcessing,
@@ -3938,7 +3938,7 @@ function createWorkflow(params) {
3938
3938
  executionEngine
3939
3939
  });
3940
3940
  }
3941
- var EventedWorkflow = class extends chunkBLU4IC6F_cjs.Workflow {
3941
+ var EventedWorkflow = class extends chunk6MVINWPK_cjs.Workflow {
3942
3942
  constructor(params) {
3943
3943
  super(params);
3944
3944
  this.engineType = "evented";
@@ -4012,7 +4012,7 @@ var EventedWorkflow = class extends chunkBLU4IC6F_cjs.Workflow {
4012
4012
  return run;
4013
4013
  }
4014
4014
  };
4015
- var EventedRun = class extends chunkBLU4IC6F_cjs.Run {
4015
+ var EventedRun = class extends chunk6MVINWPK_cjs.Run {
4016
4016
  constructor(params) {
4017
4017
  super(params);
4018
4018
  this.serializedStepGraph = params.serializedStepGraph;
@@ -4224,7 +4224,7 @@ var EventedRun = class extends chunkBLU4IC6F_cjs.Run {
4224
4224
  }
4225
4225
  }
4226
4226
  });
4227
- this.streamOutput = new chunkBLU4IC6F_cjs.WorkflowRunOutput({
4227
+ this.streamOutput = new chunk6MVINWPK_cjs.WorkflowRunOutput({
4228
4228
  runId: this.runId,
4229
4229
  workflowId: this.workflowId,
4230
4230
  stream
@@ -4290,7 +4290,7 @@ var EventedRun = class extends chunkBLU4IC6F_cjs.Run {
4290
4290
  }
4291
4291
  }
4292
4292
  });
4293
- this.streamOutput = new chunkBLU4IC6F_cjs.WorkflowRunOutput({
4293
+ this.streamOutput = new chunk6MVINWPK_cjs.WorkflowRunOutput({
4294
4294
  runId: this.runId,
4295
4295
  workflowId: this.workflowId,
4296
4296
  stream
@@ -4523,7 +4523,7 @@ function isExecutableStep(step) {
4523
4523
  }
4524
4524
 
4525
4525
  // src/workflows/evented/execution-engine.ts
4526
- var EventedExecutionEngine = class extends chunkBLU4IC6F_cjs.ExecutionEngine {
4526
+ var EventedExecutionEngine = class extends chunk6MVINWPK_cjs.ExecutionEngine {
4527
4527
  eventProcessor;
4528
4528
  constructor({
4529
4529
  mastra,
@@ -4563,7 +4563,7 @@ var EventedExecutionEngine = class extends chunkBLU4IC6F_cjs.ExecutionEngine {
4563
4563
  await ack?.();
4564
4564
  await pubsub.unsubscribe("workflows-finish", finishCb);
4565
4565
  if (event.type === "workflow.fail" && event.data.stepResults) {
4566
- event.data.stepResults = chunkBLU4IC6F_cjs.hydrateSerializedStepErrors(event.data.stepResults);
4566
+ event.data.stepResults = chunk6MVINWPK_cjs.hydrateSerializedStepErrors(event.data.stepResults);
4567
4567
  }
4568
4568
  resolveResult(event.data);
4569
4569
  return;
@@ -4645,7 +4645,7 @@ var EventedExecutionEngine = class extends chunkBLU4IC6F_cjs.ExecutionEngine {
4645
4645
  const { __state: _removedState, ...stepResultsWithoutTopLevelState } = resultData.stepResults ?? {};
4646
4646
  const cleanStepResults = {};
4647
4647
  for (const [stepId, stepResult] of Object.entries(stepResultsWithoutTopLevelState)) {
4648
- cleanStepResults[stepId] = chunkBLU4IC6F_cjs.cleanStepResult(stepResult);
4648
+ cleanStepResults[stepId] = chunk6MVINWPK_cjs.cleanStepResult(stepResult);
4649
4649
  }
4650
4650
  let callbackArg;
4651
4651
  if (resultData.prevResult.status === "failed") {
@@ -4762,5 +4762,5 @@ exports.cloneStep = cloneStep;
4762
4762
  exports.cloneWorkflow = cloneWorkflow;
4763
4763
  exports.createStep = createStep;
4764
4764
  exports.createWorkflow = createWorkflow;
4765
- //# sourceMappingURL=chunk-2J3YSWHO.cjs.map
4766
- //# sourceMappingURL=chunk-2J3YSWHO.cjs.map
4765
+ //# sourceMappingURL=chunk-3LHTPHZP.cjs.map
4766
+ //# sourceMappingURL=chunk-3LHTPHZP.cjs.map