/** * Encoding a tool result as the message that answers its call. * * Deliberately its own module with **type-only** imports: the tool loop uses * this encoder, and `./dispatch` imports zod at runtime for schema conversion. * Folding the two together would pull zod into the module graph of every host * that imports only `@juno-ai/bind/loop`, which today needs none of it. */ import type OpenAI from "openai"; import type { ToolResult } from "./tool.js"; /** * Encode a {@link ToolResult} as the `role:"tool"` message that answers a call. * * This is the encoding the loop itself synthesizes for a failed or refused * call, exported so a host's own results are shaped identically — a model that * sees `{"success":false,"kind":…,"error":…}` from the harness and something * else from the host has to learn two error formats in one transcript. * * `contentParts` and `suspend` are deliberately omitted: both are control * signals for the host, not text for the model. A host relaying multimodal * parts attaches them alongside this message. */ export declare function toolResultMessage(toolCallId: string, result: ToolResult): OpenAI.ChatCompletionToolMessageParam;