@mastra/inngest 1.8.1 → 1.8.2-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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { InngestPubSub, InngestWorkflow, collectInngestFunctions } from './chunk-6AX2K2MQ.js';
2
- export { InngestExecutionEngine, InngestPubSub, InngestRun, InngestWorkflow, connect } from './chunk-6AX2K2MQ.js';
1
+ import { InngestPubSub, InngestWorkflow, collectInngestFunctions } from './chunk-YGGGKCAH.js';
2
+ export { InngestExecutionEngine, InngestPubSub, InngestRun, InngestWorkflow, connect } from './chunk-YGGGKCAH.js';
3
3
  import { MessageList, Agent, TripWire } from '@mastra/core/agent';
4
4
  import { MastraError, ErrorDomain, ErrorCategory } from '@mastra/core/error';
5
5
  import { InternalSpans, EntityType, SpanType } from '@mastra/core/observability';
@@ -351,7 +351,7 @@ function createInngestAgent(options) {
351
351
  inputData: workflowInput,
352
352
  runId,
353
353
  resourceId: workflowInput.state?.resourceId,
354
- requestContext: {},
354
+ requestContext: workflowInput.requestContextEntries ?? {},
355
355
  tracingOptions
356
356
  }
357
357
  });
@@ -478,9 +478,9 @@ function createInngestAgent(options) {
478
478
  finalizeGlobalRegistry();
479
479
  }
480
480
  },
481
- onError: async (error) => {
481
+ onError: async (errorArg) => {
482
482
  try {
483
- await streamOptions?.onError?.(error);
483
+ await streamOptions?.onError?.(errorArg);
484
484
  } finally {
485
485
  finalizeGlobalRegistry();
486
486
  }
@@ -603,9 +603,9 @@ function createInngestAgent(options) {
603
603
  finalizeResumeRegistry();
604
604
  }
605
605
  },
606
- onError: async (error) => {
606
+ onError: async (errorArg) => {
607
607
  try {
608
- await resumeOptions?.onError?.(error);
608
+ await resumeOptions?.onError?.(errorArg);
609
609
  } finally {
610
610
  finalizeResumeRegistry();
611
611
  }
@@ -636,7 +636,7 @@ function createInngestAgent(options) {
636
636
  initialState: snapshot?.value ?? {},
637
637
  runId,
638
638
  resourceId: resumeOptions?.resourceId,
639
- requestContext: {},
639
+ requestContext: snapshot?.requestContext ?? {},
640
640
  stepResults: snapshot?.context,
641
641
  resume: {
642
642
  steps,