UNPKG

@mastra/core

Version:
16 lines 991 B
import type { DatasetItemToolMock } from '../storage/types.js'; import type { TrajectoryStep } from './types.js'; /** * Walk trajectory steps in order, collecting tool/MCP-tool calls as item-level * tool mocks. Nested children of non-tool container steps (e.g. workflow steps) * are walked depth-first so the mock order mirrors the recorded call order. * * A tool-call step's OWN children are NOT collected: for a delegated sub-agent, * those children are the sub-agent's internal tool calls (e.g. `lookupBalance` * under `agent-balanceAgent`). Those run inside the sub-agent and never reach * the target agent's tool-mock matcher, so a mock for them can never be served. * We only collect top-level calls the target agent itself makes — including the * sub-agent delegation call, which mocks the sub-agent's whole response. */ export declare function collectToolMocks(steps: TrajectoryStep[] | undefined): DatasetItemToolMock[]; //# sourceMappingURL=collect-tool-mocks.d.ts.map