import type Anthropic from '@anthropic-ai/sdk'; import type { ContentPart, MessageContent, ToolModelOutput } from '@use-crux/core'; /** Canonical representation decoded from an Anthropic `tool_result` content payload. */ export interface DecodedAnthropicToolResultContent { /** Joined text blocks used as deterministic fallback content. */ readonly text: string; /** Structured rich content when the Anthropic payload contained media blocks. */ readonly modelOutput?: ToolModelOutput; } /** * Decode Anthropic `tool_result` content into canonical text and optional rich output. * * Text-only results keep their string fallback. Rich image/PDF blocks are * reconstructed as `ToolModelOutput` content so a `toMessages()` / * `fromMessages()` round trip does not flatten media. */ export declare function decodeAnthropicToolResultContent(content: Anthropic.ToolResultBlockParam['content']): DecodedAnthropicToolResultContent; /** Decode one Anthropic image block source into canonical content. */ export declare function anthropicImageBlockToPart(source: Anthropic.ImageBlockParam['source']): ContentPart | undefined; /** Decode one Anthropic document block into canonical content. */ export declare function anthropicDocumentBlockToPart(block: Anthropic.DocumentBlockParam): ContentPart | undefined; /** Collapse text-only parts to string while preserving rich arrays. */ export declare function messageContentFromAnthropicParts(parts: readonly ContentPart[]): MessageContent;