UNPKG

@mastra/core

Version:
29 lines 1.52 kB
import type { LanguageModelV2Prompt } from '../../_types/@ai-sdk_provider-v5/dist/index.d.ts'; import type { AgentBackgroundConfig, BackgroundTaskManager } from '../../background-tasks/index.js'; export interface InjectBackgroundTaskPromptOptions { /** Current LLM input messages — returned untouched when injection is skipped. */ inputMessages: LanguageModelV2Prompt; /** * Active background-task manager. When absent the helper is a no-op so the * caller does not need to gate the helper themselves. */ backgroundTaskManager?: BackgroundTaskManager; /** Tools available on the current step. Required for prompt generation. */ tools?: Record<string, { background?: any; description?: string; }>; /** Agent-level background-task configuration. */ agentBackgroundConfig?: AgentBackgroundConfig; } /** * Append `generateBackgroundTaskSystemPrompt(...)` output to the leading * system message of an LLM prompt. Returns the messages unchanged when there * is no background-task manager, no tools, or the prompt generator returns * `undefined` (no eligible tools). * * Both the regular agentic loop and the durable workflow call this helper at * the same injection point to keep behaviour identical. */ export declare function injectBackgroundTaskPrompt({ inputMessages, backgroundTaskManager, tools, agentBackgroundConfig, }: InjectBackgroundTaskPromptOptions): LanguageModelV2Prompt; //# sourceMappingURL=inject-background-task-prompt.d.ts.map