UNPKG

@mastra/core

Version:
20 lines • 1.1 kB
import type { Mastra } from '../../mastra/index.js'; import type { AgentStepEntry } from '../types.js'; import type { EntryExecuteContext } from './types.js'; /** * Returns the agent to run through `streamLegacy()`. v1 models have no durable * execution path, and a durable wrapper's inherited `streamLegacy()` would skip * the wrapped agent's own config (processors, memory, tools), so a wrapper is * unwrapped to the agent it wraps. Warns because the step runs non-durably. */ export declare function resolveLegacyAgent<T>(agent: T, mastra?: Mastra): T; /** * Runs a declarative `agent` entry: resolves the agent (inline handle, else the * Mastra registry), streams the prompt through it, forwards stream chunks, and * returns either the structured output or `{ text }`. * * `ctx` is the step execute context (the same object a plain step's `execute` * receives). `mastra` defaults to `ctx.mastra` when omitted. */ export declare function runAgentEntry(entry: AgentStepEntry, ctx: EntryExecuteContext, mastra?: Mastra): Promise<unknown>; //# sourceMappingURL=run-agent-entry.d.ts.map