UNPKG

@mastra/core

Version:

Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.

84 lines 3.96 kB
import { z } from 'zod/v4'; import type { MastraBase } from '../../../base.js'; import type { MastraLLMVNext } from '../../../llm/model/model.loop.js'; import type { Mastra } from '../../../mastra/index.js'; import type { ErrorProcessorOrWorkflow, InputProcessorOrWorkflow, OutputProcessorOrWorkflow, ProcessorState } from '../../../processors/index.js'; import type { RequestContext } from '../../../request-context/index.js'; import type { Agent } from '../../agent.js'; import { MessageList } from '../../message-list/index.js'; import type { CreatedAgentSignal } from '../../signals.js'; import type { AgentExecuteOnFinishOptions } from '../../types.js'; export type AgentCapabilities = { agent: Agent<any, any, any, any>; agentName: string; logger: MastraBase['logger']; getMemory: Agent['getMemory']; getModel: Agent['getModel']; generateMessageId: Mastra['generateId']; mastra?: Mastra; _agentNetworkAppend?: boolean; convertTools: Agent['convertTools']; runInputProcessors: Agent['__runInputProcessors']; executeOnFinish: (args: AgentExecuteOnFinishOptions) => Promise<void>; outputProcessors?: OutputProcessorOrWorkflow[] | ((args: { requestContext: RequestContext; overrides?: OutputProcessorOrWorkflow[]; }) => Promise<OutputProcessorOrWorkflow[]> | OutputProcessorOrWorkflow[]); inputProcessors?: InputProcessorOrWorkflow[] | ((args: { requestContext: RequestContext; overrides?: InputProcessorOrWorkflow[]; }) => Promise<InputProcessorOrWorkflow[]> | InputProcessorOrWorkflow[]); llmRequestInputProcessors?: InputProcessorOrWorkflow[] | ((args: { requestContext: RequestContext; overrides?: InputProcessorOrWorkflow[]; }) => Promise<InputProcessorOrWorkflow[]> | InputProcessorOrWorkflow[]); errorProcessors?: ErrorProcessorOrWorkflow[] | ((args: { requestContext: RequestContext; overrides?: ErrorProcessorOrWorkflow[]; }) => Promise<ErrorProcessorOrWorkflow[]> | ErrorProcessorOrWorkflow[]); llm: MastraLLMVNext; }; export type CoreTool = { parameters: any; id?: string | undefined; description?: string | undefined; outputSchema?: any; execute?: (inputData: any, context: any) => any; toModelOutput?: (output: any) => any; type?: 'function' | 'provider-defined' | undefined; args?: Record<string, any> | undefined; }; export declare const storageThreadSchema: z.ZodObject<{ id: z.ZodString; title: z.ZodOptional<z.ZodString>; resourceId: z.ZodString; createdAt: z.ZodDate; updatedAt: z.ZodDate; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>; }, z.core.$strip>; export declare const prepareToolsStepOutputSchema: z.ZodObject<{ convertedTools: z.ZodRecord<z.ZodString, z.ZodAny>; }, z.core.$strip>; export declare const prepareMemoryStepOutputSchema: z.ZodObject<{ threadExists: z.ZodBoolean; thread: z.ZodOptional<z.ZodObject<{ id: z.ZodString; title: z.ZodOptional<z.ZodString>; resourceId: z.ZodString; createdAt: z.ZodDate; updatedAt: z.ZodDate; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>; }, z.core.$strip>>; messageList: z.ZodCustom<MessageList, MessageList>; processorStates: z.ZodCustom<Map<string, ProcessorState<undefined>>, Map<string, ProcessorState<undefined>>>; tripwire: z.ZodOptional<z.ZodObject<{ reason: z.ZodString; retry: z.ZodOptional<z.ZodBoolean>; metadata: z.ZodOptional<z.ZodUnknown>; processorId: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; initialSignalEchoes: z.ZodOptional<z.ZodArray<z.ZodCustom<CreatedAgentSignal, CreatedAgentSignal>>>; }, z.core.$strip>; export type PrepareMemoryStepOutput = z.infer<typeof prepareMemoryStepOutputSchema>; export type PrepareToolsStepOutput = z.infer<typeof prepareToolsStepOutputSchema>; //# sourceMappingURL=schema.d.ts.map