@mastra/core
Version:
26 lines • 1.5 kB
TypeScript
import type { LanguageModelV2Prompt } from '../../_types/@ai-sdk_provider@2.0.5/dist/index.js';
import type { AgentBackgroundConfig, BackgroundTaskManager, BackgroundPromptTool } 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, BackgroundPromptTool>;
/** 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