@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
54 lines • 2.27 kB
TypeScript
import type { RequestContext } from '../../di/index.js';
import type { SerializedError } from '../../error/index.js';
import type { PubSub } from '../../events/pubsub.js';
import type { ObservabilityContext } from '../../observability/index.js';
import type { DefaultExecutionEngine } from '../default.js';
import type { EntryExecutionResult, ExecutionContext, OutputWriter, RestartExecutionParams, SerializedStepFlowEntry, StepFlowEntry, StepResult, TimeTravelExecutionParams, WorkflowRunStatus } from '../types.js';
export interface PersistStepUpdateParams {
workflowId: string;
runId: string;
resourceId?: string;
stepResults: Record<string, StepResult<any, any, any, any>>;
serializedStepGraph: SerializedStepFlowEntry[];
executionContext: ExecutionContext;
workflowStatus: WorkflowRunStatus;
result?: Record<string, any>;
error?: SerializedError;
requestContext: RequestContext;
/**
* Tracing context for span continuity during suspend/resume.
* When provided, this will be persisted to the snapshot for use on resume.
*/
tracingContext?: {
traceId?: string;
spanId?: string;
parentSpanId?: string;
};
}
export declare function persistStepUpdate(engine: DefaultExecutionEngine, params: PersistStepUpdateParams): Promise<void>;
export interface ExecuteEntryParams extends ObservabilityContext {
workflowId: string;
runId: string;
resourceId?: string;
entry: StepFlowEntry;
prevStep: StepFlowEntry;
serializedStepGraph: SerializedStepFlowEntry[];
stepResults: Record<string, StepResult<any, any, any, any>>;
restart?: RestartExecutionParams;
timeTravel?: TimeTravelExecutionParams;
resume?: {
steps: string[];
stepResults: Record<string, StepResult<any, any, any, any>>;
resumePayload: any;
resumePath: number[];
};
executionContext: ExecutionContext;
pubsub: PubSub;
abortController: AbortController;
requestContext: RequestContext;
outputWriter?: OutputWriter;
disableScorers?: boolean;
perStep?: boolean;
}
export declare function executeEntry(engine: DefaultExecutionEngine, params: ExecuteEntryParams): Promise<EntryExecutionResult>;
//# sourceMappingURL=entry.d.ts.map