@mastra/inngest 0.0.0-fix-writer-workflow-resumestream-20251022161252 → 0.0.0-fix-multi-modal-for-cloud-20251028082043

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,43 @@
1
1
  # @mastra/inngest
2
2
 
3
- ## 0.0.0-fix-writer-workflow-resumestream-20251022161252
3
+ ## 0.0.0-fix-multi-modal-for-cloud-20251028082043
4
+
5
+ ### Major Changes
6
+
7
+ - Removed old tracing code based on OpenTelemetry ([#9237](https://github.com/mastra-ai/mastra/pull/9237))
8
+
9
+ ### Minor Changes
10
+
11
+ - Update peer dependencies to match core package version bump (1.0.0) ([#9237](https://github.com/mastra-ai/mastra/pull/9237))
12
+
13
+ - Update peer dependencies to match core package version bump (0.22.1) ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
14
+
15
+ - Update peer dependencies to match core package version bump (0.22.3) ([#9153](https://github.com/mastra-ai/mastra/pull/9153))
4
16
 
5
17
  ### Patch Changes
6
18
 
7
- - Updated dependencies [[`92b18cd`](https://github.com/mastra-ai/mastra/commit/92b18cd443bbfd1194c7f8aea727ef1f8cf1db2d)]:
8
- - @mastra/core@0.0.0-fix-writer-workflow-resumestream-20251022161252
19
+ - Deprecate `runCount` parameter in favor of `retryCount` for better naming clarity. The name `runCount` was misleading as it doesn't represent the total number of times a step has run, but rather the number of retry attempts made for a step. ([#9153](https://github.com/mastra-ai/mastra/pull/9153))
20
+
21
+ `runCount` is available in `execute()` functions and methods that interact with the step execution. This also applies to condition functions and loop condition functions that use this parameter. If your code uses `runCount`, change the name to `retryCount`.
22
+
23
+ Here's an example migration:
24
+
25
+ ```diff
26
+ const myStep = createStep({
27
+ // Rest of step...
28
+ - execute: async ({ runCount, ...params }) => {
29
+ + execute: async ({ retryCount, ...params }) => {
30
+ // ... rest of your logic
31
+ }
32
+ });
33
+ ```
34
+
35
+ - Fix Inngest workflow tests by adding missing imports and updating middleware path. ([#9259](https://github.com/mastra-ai/mastra/pull/9259))
36
+
37
+ - Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
38
+
39
+ - Updated dependencies [[`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394), [`6c049d9`](https://github.com/mastra-ai/mastra/commit/6c049d94063fdcbd5b81c4912a2bf82a92c9cc0b), [`9e1911d`](https://github.com/mastra-ai/mastra/commit/9e1911db2b4db85e0e768c3f15e0d61e319869f6), [`ebac155`](https://github.com/mastra-ai/mastra/commit/ebac15564a590117db7078233f927a7e28a85106), [`9d819d5`](https://github.com/mastra-ai/mastra/commit/9d819d54b61481639f4008e4694791bddf187edd), [`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`c576fc0`](https://github.com/mastra-ai/mastra/commit/c576fc0b100b2085afded91a37c97a0ea0ec09c7), [`57d157f`](https://github.com/mastra-ai/mastra/commit/57d157f0b163a95c3e6c9eae31bdb11d1bfc64f9), [`d78b38d`](https://github.com/mastra-ai/mastra/commit/d78b38d898fce285260d3bbb4befade54331617f), [`cfae733`](https://github.com/mastra-ai/mastra/commit/cfae73394f4920635e6c919c8e95ff9a0788e2e5), [`e3dfda7`](https://github.com/mastra-ai/mastra/commit/e3dfda7b11bf3b8c4bb55637028befb5f387fc74), [`f0f8f12`](https://github.com/mastra-ai/mastra/commit/f0f8f125c308f2d0fd36942ef652fd852df7522f), [`d36cfbb`](https://github.com/mastra-ai/mastra/commit/d36cfbbb6565ba5f827883cc9bb648eb14befdc1), [`53d927c`](https://github.com/mastra-ai/mastra/commit/53d927cc6f03bff33655b7e2b788da445a08731d), [`bda6370`](https://github.com/mastra-ai/mastra/commit/bda637009360649aaf579919e7873e33553c273e), [`c7f1f7d`](https://github.com/mastra-ai/mastra/commit/c7f1f7d24f61f247f018cc2d1f33bf63212959a7), [`2c4438b`](https://github.com/mastra-ai/mastra/commit/2c4438b87817ab7eed818c7990fef010475af1a3), [`fa8409b`](https://github.com/mastra-ai/mastra/commit/fa8409bc39cfd8ba6643b9db5269b90b22e2a2f7), [`173c535`](https://github.com/mastra-ai/mastra/commit/173c535c0645b0da404fe09f003778f0b0d4e019)]:
40
+ - @mastra/core@0.0.0-fix-multi-modal-for-cloud-20251028082043
9
41
 
10
42
  ## 0.17.0
11
43
 
package/dist/index.cjs CHANGED
@@ -272,7 +272,7 @@ var InngestRun = class extends workflows.Run {
272
272
  let streamOutput;
273
273
  const stream$1 = new web.ReadableStream({
274
274
  async start(controller) {
275
- const unwatch = self.watch(async ({ type, from = ChunkFrom.WORKFLOW, payload }) => {
275
+ const unwatch = self.watch(async ({ type, from = stream.ChunkFrom.WORKFLOW, payload }) => {
276
276
  controller.enqueue({
277
277
  type,
278
278
  runId: self.runId,
@@ -695,7 +695,7 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
695
695
  });
696
696
  return result;
697
697
  }
698
- async fmtReturnValue(executionSpan, emitter, stepResults, lastOutput, error) {
698
+ async fmtReturnValue(emitter, stepResults, lastOutput, error) {
699
699
  const base = {
700
700
  status: lastOutput.status,
701
701
  steps: stepResults
@@ -749,7 +749,6 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
749
749
  });
750
750
  base.suspended = suspendedStepIds;
751
751
  }
752
- executionSpan?.end();
753
752
  return base;
754
753
  }
755
754
  // async executeSleep({ id, duration }: { id: string; duration: number }): Promise<void> {
@@ -781,45 +780,55 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
781
780
  if (fn) {
782
781
  const stepCallId = crypto.randomUUID();
783
782
  duration = await this.inngestStep.run(`workflow.${workflowId}.sleep.${entry.id}`, async () => {
784
- return await fn({
785
- runId,
786
- workflowId,
787
- mastra: this.mastra,
788
- runtimeContext,
789
- inputData: prevOutput,
790
- state: executionContext.state,
791
- setState: (state) => {
792
- executionContext.state = state;
793
- },
794
- runCount: -1,
795
- tracingContext: {
796
- currentSpan: sleepSpan
797
- },
798
- getInitData: () => stepResults?.input,
799
- getStepResult: workflows.getStepResult.bind(this, stepResults),
800
- // TODO: this function shouldn't have suspend probably?
801
- suspend: async (_suspendPayload) => {
802
- },
803
- bail: () => {
804
- },
805
- abort: () => {
806
- abortController?.abort();
807
- },
808
- [_constants.EMITTER_SYMBOL]: emitter,
809
- // TODO: add streamVNext support
810
- [_constants.STREAM_FORMAT_SYMBOL]: executionContext.format,
811
- engine: { step: this.inngestStep },
812
- abortSignal: abortController?.signal,
813
- writer: new tools.ToolStream(
783
+ return await fn(
784
+ workflows.createDeprecationProxy(
814
785
  {
815
- prefix: "workflow-step",
816
- callId: stepCallId,
817
- name: "sleep",
818
- runId
786
+ runId,
787
+ workflowId,
788
+ mastra: this.mastra,
789
+ runtimeContext,
790
+ inputData: prevOutput,
791
+ state: executionContext.state,
792
+ setState: (state) => {
793
+ executionContext.state = state;
794
+ },
795
+ runCount: -1,
796
+ retryCount: -1,
797
+ tracingContext: {
798
+ currentSpan: sleepSpan
799
+ },
800
+ getInitData: () => stepResults?.input,
801
+ getStepResult: workflows.getStepResult.bind(this, stepResults),
802
+ // TODO: this function shouldn't have suspend probably?
803
+ suspend: async (_suspendPayload) => {
804
+ },
805
+ bail: () => {
806
+ },
807
+ abort: () => {
808
+ abortController?.abort();
809
+ },
810
+ [_constants.EMITTER_SYMBOL]: emitter,
811
+ // TODO: add streamVNext support
812
+ [_constants.STREAM_FORMAT_SYMBOL]: executionContext.format,
813
+ engine: { step: this.inngestStep },
814
+ abortSignal: abortController?.signal,
815
+ writer: new tools.ToolStream(
816
+ {
817
+ prefix: "workflow-step",
818
+ callId: stepCallId,
819
+ name: "sleep",
820
+ runId
821
+ },
822
+ writableStream
823
+ )
819
824
  },
820
- writableStream
825
+ {
826
+ paramName: "runCount",
827
+ deprecationMessage: workflows.runCountDeprecationMessage,
828
+ logger: this.logger
829
+ }
821
830
  )
822
- });
831
+ );
823
832
  });
824
833
  sleepSpan?.update({
825
834
  attributes: {
@@ -862,45 +871,55 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
862
871
  if (fn) {
863
872
  date = await this.inngestStep.run(`workflow.${workflowId}.sleepUntil.${entry.id}`, async () => {
864
873
  const stepCallId = crypto.randomUUID();
865
- return await fn({
866
- runId,
867
- workflowId,
868
- mastra: this.mastra,
869
- runtimeContext,
870
- inputData: prevOutput,
871
- state: executionContext.state,
872
- setState: (state) => {
873
- executionContext.state = state;
874
- },
875
- runCount: -1,
876
- tracingContext: {
877
- currentSpan: sleepUntilSpan
878
- },
879
- getInitData: () => stepResults?.input,
880
- getStepResult: workflows.getStepResult.bind(this, stepResults),
881
- // TODO: this function shouldn't have suspend probably?
882
- suspend: async (_suspendPayload) => {
883
- },
884
- bail: () => {
885
- },
886
- abort: () => {
887
- abortController?.abort();
888
- },
889
- [_constants.EMITTER_SYMBOL]: emitter,
890
- [_constants.STREAM_FORMAT_SYMBOL]: executionContext.format,
891
- // TODO: add streamVNext support
892
- engine: { step: this.inngestStep },
893
- abortSignal: abortController?.signal,
894
- writer: new tools.ToolStream(
874
+ return await fn(
875
+ workflows.createDeprecationProxy(
895
876
  {
896
- prefix: "workflow-step",
897
- callId: stepCallId,
898
- name: "sleep",
899
- runId
877
+ runId,
878
+ workflowId,
879
+ mastra: this.mastra,
880
+ runtimeContext,
881
+ inputData: prevOutput,
882
+ state: executionContext.state,
883
+ setState: (state) => {
884
+ executionContext.state = state;
885
+ },
886
+ runCount: -1,
887
+ retryCount: -1,
888
+ tracingContext: {
889
+ currentSpan: sleepUntilSpan
890
+ },
891
+ getInitData: () => stepResults?.input,
892
+ getStepResult: workflows.getStepResult.bind(this, stepResults),
893
+ // TODO: this function shouldn't have suspend probably?
894
+ suspend: async (_suspendPayload) => {
895
+ },
896
+ bail: () => {
897
+ },
898
+ abort: () => {
899
+ abortController?.abort();
900
+ },
901
+ [_constants.EMITTER_SYMBOL]: emitter,
902
+ [_constants.STREAM_FORMAT_SYMBOL]: executionContext.format,
903
+ // TODO: add streamVNext support
904
+ engine: { step: this.inngestStep },
905
+ abortSignal: abortController?.signal,
906
+ writer: new tools.ToolStream(
907
+ {
908
+ prefix: "workflow-step",
909
+ callId: stepCallId,
910
+ name: "sleep",
911
+ runId
912
+ },
913
+ writableStream
914
+ )
900
915
  },
901
- writableStream
916
+ {
917
+ paramName: "runCount",
918
+ deprecationMessage: workflows.runCountDeprecationMessage,
919
+ logger: this.logger
920
+ }
902
921
  )
903
- });
922
+ );
904
923
  });
905
924
  if (date && !(date instanceof Date)) {
906
925
  date = new Date(date);
@@ -1235,7 +1254,13 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
1235
1254
  suspend: async (suspendPayload, suspendOptions) => {
1236
1255
  executionContext.suspendedPaths[step.id] = executionContext.executionPath;
1237
1256
  if (suspendOptions?.resumeLabel) {
1238
- executionContext.resumeLabels[suspendOptions.resumeLabel] = step.id;
1257
+ const resumeLabel = Array.isArray(suspendOptions.resumeLabel) ? suspendOptions.resumeLabel : [suspendOptions.resumeLabel];
1258
+ for (const label of resumeLabel) {
1259
+ executionContext.resumeLabels[label] = {
1260
+ stepId: step.id,
1261
+ foreachIndex: executionContext.foreachIndex
1262
+ };
1263
+ }
1239
1264
  }
1240
1265
  suspended = { payload: suspendPayload };
1241
1266
  },
@@ -1463,47 +1488,57 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
1463
1488
  tracingPolicy: this.options?.tracingPolicy
1464
1489
  });
1465
1490
  try {
1466
- const result = await cond({
1467
- runId,
1468
- workflowId,
1469
- mastra: this.mastra,
1470
- runtimeContext,
1471
- runCount: -1,
1472
- inputData: prevOutput,
1473
- state: executionContext.state,
1474
- setState: (state) => {
1475
- executionContext.state = state;
1476
- },
1477
- tracingContext: {
1478
- currentSpan: evalSpan
1479
- },
1480
- getInitData: () => stepResults?.input,
1481
- getStepResult: workflows.getStepResult.bind(this, stepResults),
1482
- // TODO: this function shouldn't have suspend probably?
1483
- suspend: async (_suspendPayload) => {
1484
- },
1485
- bail: () => {
1486
- },
1487
- abort: () => {
1488
- abortController.abort();
1489
- },
1490
- [_constants.EMITTER_SYMBOL]: emitter,
1491
- [_constants.STREAM_FORMAT_SYMBOL]: executionContext.format,
1492
- // TODO: add streamVNext support
1493
- engine: {
1494
- step: this.inngestStep
1495
- },
1496
- abortSignal: abortController.signal,
1497
- writer: new tools.ToolStream(
1491
+ const result = await cond(
1492
+ workflows.createDeprecationProxy(
1498
1493
  {
1499
- prefix: "workflow-step",
1500
- callId: crypto.randomUUID(),
1501
- name: "conditional",
1502
- runId
1494
+ runId,
1495
+ workflowId,
1496
+ mastra: this.mastra,
1497
+ runtimeContext,
1498
+ runCount: -1,
1499
+ retryCount: -1,
1500
+ inputData: prevOutput,
1501
+ state: executionContext.state,
1502
+ setState: (state) => {
1503
+ executionContext.state = state;
1504
+ },
1505
+ tracingContext: {
1506
+ currentSpan: evalSpan
1507
+ },
1508
+ getInitData: () => stepResults?.input,
1509
+ getStepResult: workflows.getStepResult.bind(this, stepResults),
1510
+ // TODO: this function shouldn't have suspend probably?
1511
+ suspend: async (_suspendPayload) => {
1512
+ },
1513
+ bail: () => {
1514
+ },
1515
+ abort: () => {
1516
+ abortController.abort();
1517
+ },
1518
+ [_constants.EMITTER_SYMBOL]: emitter,
1519
+ [_constants.STREAM_FORMAT_SYMBOL]: executionContext.format,
1520
+ // TODO: add streamVNext support
1521
+ engine: {
1522
+ step: this.inngestStep
1523
+ },
1524
+ abortSignal: abortController.signal,
1525
+ writer: new tools.ToolStream(
1526
+ {
1527
+ prefix: "workflow-step",
1528
+ callId: crypto.randomUUID(),
1529
+ name: "conditional",
1530
+ runId
1531
+ },
1532
+ writableStream
1533
+ )
1503
1534
  },
1504
- writableStream
1535
+ {
1536
+ paramName: "runCount",
1537
+ deprecationMessage: workflows.runCountDeprecationMessage,
1538
+ logger: this.logger
1539
+ }
1505
1540
  )
1506
- });
1541
+ );
1507
1542
  evalSpan?.end({
1508
1543
  output: result,
1509
1544
  attributes: {
@@ -1547,7 +1582,6 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
1547
1582
  suspendedPaths: executionContext.suspendedPaths,
1548
1583
  resumeLabels: executionContext.resumeLabels,
1549
1584
  retryConfig: executionContext.retryConfig,
1550
- executionSpan: executionContext.executionSpan,
1551
1585
  state: executionContext.state
1552
1586
  },
1553
1587
  emitter,