/** * Text-Generation Runtime Message Converter * * Converts between veryfront's internal Message format and the current * text-generation runtime message format. * * @module ai/agent/runtime/text-generation-runtime-message-converter */ import type { TextGenerationRuntimeMessage } from "./text-generation-runtime-message-types.js"; import { type Message } from "../types.js"; /** * How a converted prompt will reach the model. * * `requireInternetReachableAttachments` says whether the runtime that receives * this prompt fetches attachment URLs from its own network — every remote * provider does, and a `server-local` runtime does not. Defaulting to `true` * keeps the check on for the common case; callers holding the runtime turn it * off (`src/agent/runtime/index.ts`). */ export interface TextGenerationRuntimeConversionOptions { requireInternetReachableAttachments?: boolean; } /** * Convert a veryfront Message to the current text-generation runtime message format. */ export declare function convertToTextGenerationRuntimeMessage(msg: Message, options?: { providerExecutedToolCallIds?: Set; } & TextGenerationRuntimeConversionOptions): TextGenerationRuntimeMessage; /** * Convert an array of veryfront Messages to the current text-generation runtime message format. */ export declare function convertToTextGenerationRuntimeMessages(messages: Message[], options?: TextGenerationRuntimeConversionOptions): TextGenerationRuntimeMessage[]; /** * Convert messages for a provider request. * * Some providers reject assistant-prefill transcripts and require the prompt to * end at user/tool input. Persisted runtime history may temporarily end with an * assistant-only continuation message between streamed tool steps, so trim that * replay-only tail at the provider boundary without changing stored history. */ export declare function convertToTextGenerationRuntimeRequestMessages(messages: Message[], options?: TextGenerationRuntimeConversionOptions): TextGenerationRuntimeMessage[]; //# sourceMappingURL=text-generation-runtime-message-converter.d.ts.map