@mastra/inngest 1.8.6-alpha.0 → 1.8.6-alpha.1

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,5 +1,18 @@
1
1
  # @mastra/inngest
2
2
 
3
+ ## 1.8.6-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix durable agents losing the caller's request context after the first iteration. ([#21125](https://github.com/mastra-ai/mastra/pull/21125))
8
+
9
+ `prepareForDurableExecution` snapshots the caller's `RequestContext` onto the workflow input as `requestContextEntries`, and steps that rebuild the model and tools from the Mastra instance restore the context from that snapshot. The snapshot was dropped when iteration state was rebuilt and was never forwarded to the LLM step, so from the second iteration on, dynamic `model`, `tools`, `memory` and `workspace` resolvers ran against an empty context and silently fell back to defaults. This affected every path that cannot use the in-process run registry: Inngest workers, recovered runs, and evicted registry entries.
10
+
11
+ The snapshot is now declared on the iteration state and LLM step input schemas, carried forward by `createBaseIterationStateUpdate`, and forwarded by the `map-to-llm-input` step in both the core and Inngest durable agentic workflows.
12
+
13
+ - Updated dependencies [[`b8ce7ec`](https://github.com/mastra-ai/mastra/commit/b8ce7ec96e39343c6c2f36d12d68a9ad816c09f7), [`a3a3624`](https://github.com/mastra-ai/mastra/commit/a3a3624f646b98e409424d8defccbd334da9e8b8), [`6246914`](https://github.com/mastra-ai/mastra/commit/62469146636911f3cbbe0880bd011c6a897a59a7), [`3f73c07`](https://github.com/mastra-ai/mastra/commit/3f73c076727e8c36b4fff7a1b40290fb68957fa8), [`7c1ebb1`](https://github.com/mastra-ai/mastra/commit/7c1ebb15690c4b3f0eabb19077cf8af573311e57), [`32980a3`](https://github.com/mastra-ai/mastra/commit/32980a3e2413d0274ac244d32c37d910edc13f00), [`4bcdfaf`](https://github.com/mastra-ai/mastra/commit/4bcdfaf0eac3199d7cb171b0a19a92c9c341eea4), [`af4636a`](https://github.com/mastra-ai/mastra/commit/af4636a74463275d71c1d13a38f7d2b738f128bf), [`a463cdf`](https://github.com/mastra-ai/mastra/commit/a463cdf1c95c3059e70f0bff27959e8558bb899d), [`0ea6b80`](https://github.com/mastra-ai/mastra/commit/0ea6b8001408ce02b56e8be0536b0fd8cbaf8ad2)]:
14
+ - @mastra/core@1.58.0-alpha.11
15
+
3
16
  ## 1.8.6-alpha.0
4
17
 
5
18
  ### Patch Changes
@@ -29,6 +29,7 @@ export declare function createInngestDurableAgenticWorkflow(options: InngestDura
29
29
  state: any;
30
30
  messageId: string;
31
31
  agentName?: string | undefined;
32
+ requestContextEntries?: Record<string, any> | undefined;
32
33
  agentSpanData?: any;
33
34
  modelSpanData?: any;
34
35
  stepIndex?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"create-inngest-agentic-workflow.d.ts","sourceRoot":"","sources":["../../src/durable-agent/create-inngest-agentic-workflow.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA2BvC;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACnD,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAuCD,oCAAoC;AACpC,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AAEX,wBAAgB,mCAAmC,CAAC,OAAO,EAAE,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuXhG"}
1
+ {"version":3,"file":"create-inngest-agentic-workflow.d.ts","sourceRoot":"","sources":["../../src/durable-agent/create-inngest-agentic-workflow.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA+BvC;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACnD,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAuCD,oCAAoC;AACpC,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AAEX,wBAAgB,mCAAmC,CAAC,OAAO,EAAE,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA0XhG"}
package/dist/index.cjs CHANGED
@@ -102,6 +102,7 @@ const durableAgenticInputSchema = zod.z.object({
102
102
  options: zod.z.any(),
103
103
  state: zod.z.any(),
104
104
  messageId: zod.z.string(),
105
+ requestContextEntries: zod.z.record(zod.z.string(), zod.z.any()).optional(),
105
106
  agentSpanData: zod.z.any().optional(),
106
107
  modelSpanData: zod.z.any().optional(),
107
108
  stepIndex: zod.z.number().optional()
@@ -167,6 +168,7 @@ function createInngestDurableAgenticWorkflow(options) {
167
168
  options: state.options,
168
169
  state: state.state,
169
170
  messageId: state.messageId,
171
+ requestContextEntries: state.requestContextEntries,
170
172
  agentSpanData: state.agentSpanData,
171
173
  modelSpanData: state.modelSpanData,
172
174
  stepIndex: state.stepIndex