export type AgentPromptAttachmentReadError = "read-failed" | "too-large" | "not-utf8"; export interface AgentPromptAttachment { name: string; type?: string; size?: number; text?: string; /** Length of the whole file when `text` holds only its head. */ totalChars?: number; readError?: AgentPromptAttachmentReadError; dataUrl?: string; } export declare function formatPromptWithAttachments(prompt: string, attachments: readonly AgentPromptAttachment[]): string; /** * Attachments come back from run metadata as untrusted JSON. Every field the * formatter reads must survive here with its type checked: dropping * `totalChars` sends a file's head as if it were the whole file, and dropping * `readError` turns an unreadable file into a filename with no explanation. */ export declare function promptAttachmentsFromMetadata(value: unknown): AgentPromptAttachment[]; export declare function escapePromptAttachmentAttribute(value: string): string;