@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
59 lines • 2.28 kB
TypeScript
import type { RequestContext } from '../../di/index.js';
import type { PubSub } from '../../events/pubsub.js';
import type { ObservabilityContext } from '../../observability/index.js';
import type { DefaultExecutionEngine } from '../default.js';
import type { ExecuteFunction } from '../step.js';
import type { DefaultEngineType, ExecutionContext, OutputWriter, SerializedStepFlowEntry, StepFlowEntry, StepResult } from '../types.js';
export interface ExecuteSleepParams extends ObservabilityContext {
workflowId: string;
runId: string;
serializedStepGraph: SerializedStepFlowEntry[];
entry: {
type: 'sleep';
id: string;
duration?: number;
fn?: ExecuteFunction<any, any, any, any, any, DefaultEngineType>;
};
prevStep: StepFlowEntry;
prevOutput: any;
stepResults: Record<string, StepResult<any, any, any, any>>;
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;
}
export declare function executeSleep(engine: DefaultExecutionEngine, params: ExecuteSleepParams): Promise<void>;
export interface ExecuteSleepUntilParams extends ObservabilityContext {
workflowId: string;
runId: string;
serializedStepGraph: SerializedStepFlowEntry[];
entry: {
type: 'sleepUntil';
id: string;
date?: Date;
fn?: ExecuteFunction<any, any, any, any, any, DefaultEngineType>;
};
prevStep: StepFlowEntry;
prevOutput: any;
stepResults: Record<string, StepResult<any, any, any, any>>;
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;
}
export declare function executeSleepUntil(engine: DefaultExecutionEngine, params: ExecuteSleepUntilParams): Promise<void>;
//# sourceMappingURL=sleep.d.ts.map