@mastra/core
Version:
34 lines • 2.19 kB
TypeScript
import type { Agent } from '../agent/agent.js';
import type { AgentExecutionOptions } from '../agent/agent.types.js';
import type { SubAgent } from '../agent/subagent.js';
import type { AgentStreamOptions } from '../agent/types.js';
import type { MastraScorers } from '../evals/index.js';
import type { StandardSchemaWithJSON } from '../schema/index.js';
import type { DynamicArgument } from '../types/index.js';
import type { ExecuteFunction, Step } from './step.js';
import type { DefaultEngineType, MappingConfig, StepMetadata, ToolStep } from './types.js';
export type AgentStepOptions<TOUTPUT> = Omit<AgentExecutionOptions<TOUTPUT> & AgentStreamOptions, 'format' | 'tracingContext' | 'requestContext' | 'abortSignal' | 'context' | 'onStepFinish' | 'output' | 'experimental_output' | 'resourceId' | 'threadId' | 'scorers'>;
export declare function createStepFromAgent<TStepId extends string, TStepOutput>(params: SubAgent<TStepId, any> | Agent<TStepId, any, any>, agentOrToolOptions?: AgentStepOptions<TStepOutput> & {
structuredOutput?: {
schema: StandardSchemaWithJSON<TStepOutput>;
};
retries?: number;
scorers?: DynamicArgument<MastraScorers>;
metadata?: StepMetadata;
}): Step<TStepId, unknown, {
prompt: string;
}, TStepOutput, unknown, unknown, DefaultEngineType>;
export declare function createStepFromTool<TStepInput, TSuspend, TResume, TStepOutput>(params: ToolStep<TStepInput, TSuspend, TResume, TStepOutput, any>, toolOpts?: {
retries?: number;
scorers?: DynamicArgument<MastraScorers>;
metadata?: StepMetadata;
}): Step<string, any, TStepInput, TStepOutput, TResume, TSuspend, DefaultEngineType>;
/**
* Builds a runnable step from a `.map()` mapping config or mapping function.
*
* The interpretation of a `{ type: 'mapping' }` graph entry lives in
* `runMappingEntry` (shared with the engines' declarative-entry dispatch);
* this factory just wraps it in a step shell.
*/
export declare function createMappingStep(id: string, mappingConfig: MappingConfig | ExecuteFunction<any, any, any, any, any, DefaultEngineType>): Step<string, any, any, any, any, any, DefaultEngineType>;
//# sourceMappingURL=step-factories.d.ts.map