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