import type { ContentPart, ImageContentPart } from "./types"; /** * Returns true when a tool result carries the MCP `isError: true` flag. * Used by both the live tool loop and the replay path so a tool that * successfully returns `{ isError: true, content: [...] }` is treated the * same as one that threw. */ export declare function isToolResultError(result: unknown): boolean; export declare function extractToolResultParts(result: unknown): ContentPart[]; /** * Convenience wrapper used by `toolLoop` and `messageFormat`: returns a string * for text-only results and a `ContentPart[]` when any non-text part (currently * just images) is present. */ export declare function toolResultToContent(result: unknown): string | ContentPart[]; /** * Split a tool-message `content` field into joined text + image parts. Used by * providers (OpenAI, Gemini) that can't carry image bytes inside their tool * role and must forward them as a synthetic follow-up user turn. */ export declare function partitionToolContent(content: string | ContentPart[]): { text: string; imageParts: ImageContentPart[]; isString: boolean; }; /** Header text introducing image bytes that follow a tool result. */ export declare function toolImageFollowupHeader(toolName: string | undefined, count: number): string; //# sourceMappingURL=toolResultParts.d.ts.map