@mastra/dsql 1.5.0-alpha.0 → 1.5.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.cjs CHANGED
@@ -3795,7 +3795,7 @@ var WorkflowsDSQL = class WorkflowsDSQL extends _mastra_core_storage.WorkflowsSt
3795
3795
  async dangerouslyClearAll() {
3796
3796
  await this.#db.clearTable({ tableName: _mastra_core_storage.TABLE_WORKFLOW_SNAPSHOT });
3797
3797
  }
3798
- async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext }) {
3798
+ async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state }) {
3799
3799
  try {
3800
3800
  const { result: context } = await withRetry(async () => {
3801
3801
  return this.#db.client.tx(async (t) => {
@@ -3824,6 +3824,7 @@ var WorkflowsDSQL = class WorkflowsDSQL extends _mastra_core_storage.WorkflowsSt
3824
3824
  snapshot = typeof existingSnapshot === "string" ? JSON.parse(existingSnapshot) : existingSnapshot;
3825
3825
  }
3826
3826
  snapshot.context[stepId] = result;
3827
+ if (state !== void 0) snapshot.context.__state = state;
3827
3828
  snapshot.requestContext = {
3828
3829
  ...snapshot.requestContext,
3829
3830
  ...requestContext