@mastra/core
Version:
17 lines • 1.02 kB
TypeScript
import type { StepResult, WorkflowRunState } from '../workflows/index.js';
export declare function createEmptyWorkflowSnapshot(runId: string): WorkflowRunState;
/**
* A step's stored result with a new write of it merged in: per element when both outputs are
* arrays (foreach iterations written one at a time, or pending markers resetting elements),
* otherwise the new result. A failed foreach keeps its first failure. Foreach child run ids from
* both are kept.
*/
export declare function mergeStepResult(existingResult: StepResult<any, any, any, any> | undefined, result: StepResult<any, any, any, any>): StepResult<any, any, any, any>;
export declare function mergeWorkflowStepResult({ snapshot, stepId, result, requestContext, state, }: {
snapshot: WorkflowRunState;
stepId: string;
result: StepResult<any, any, any, any>;
requestContext: Record<string, any>;
state?: Record<string, any>;
}): Record<string, StepResult<any, any, any, any>>;
//# sourceMappingURL=workflow-snapshot.d.ts.map