@mastra/dynamodb 1.4.0 → 1.4.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.
package/dist/index.js CHANGED
@@ -2621,7 +2621,7 @@ var WorkflowStorageDynamoDB = class extends WorkflowsStorage {
2621
2621
  const jitter = Math.random() * backoff * .5;
2622
2622
  await new Promise((resolve) => setTimeout(resolve, backoff + jitter));
2623
2623
  }
2624
- async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext }) {
2624
+ async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state }) {
2625
2625
  for (let attempt = 0; attempt < MAX_RETRIES; attempt++) try {
2626
2626
  const existingRecord = await this.service.entities.workflow_snapshot.get({
2627
2627
  entity: "workflow_snapshot",
@@ -2650,6 +2650,7 @@ var WorkflowStorageDynamoDB = class extends WorkflowsStorage {
2650
2650
  previousUpdatedAt = existingRecord.data.updatedAt;
2651
2651
  }
2652
2652
  snapshot.context[stepId] = result;
2653
+ if (state !== void 0) snapshot.context.__state = state;
2653
2654
  snapshot.requestContext = {
2654
2655
  ...snapshot.requestContext,
2655
2656
  ...requestContext