UNPKG

@mastra/core

Version:

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

25 lines 1.01 kB
import type { AgentBackgroundConfig, BackgroundTaskManagerConfig, ToolBackgroundConfig } from './types.js'; export interface ResolvedBackgroundConfig { runInBackground: boolean; timeoutMs: number; maxRetries: number; } /** * Resolves whether a tool call should run in the background, and with what config. * * Resolution order (highest to lowest priority): * 1. LLM per-call override (`_background` field in tool args) * 2. Agent-level backgroundTasks.tools config * 3. Tool-level background config * 4. Default: foreground * * Strips the `_background` field from args (mutates the args object). */ export declare function resolveBackgroundConfig({ llmBgOverrides, toolName, toolConfig, agentConfig, managerConfig, }: { llmBgOverrides: Record<string, unknown>; toolName: string; toolConfig?: ToolBackgroundConfig; agentConfig?: AgentBackgroundConfig; managerConfig?: BackgroundTaskManagerConfig; }): ResolvedBackgroundConfig; //# sourceMappingURL=resolve-config.d.ts.map