import { ToolCallRequest, HistoryItem, AnthropicAssistantData } from "../history.ts"; export type AssistantMessage = { role: "assistant"; content: string; reasoningContent?: string | null; openai?: { encryptedReasoningContent?: string | null; reasoningId?: string; }; anthropic?: AnthropicAssistantData; toolCall?: ToolCallRequest; tokenUsage: number; outputTokens: number; }; export type UserMessage = { role: "user"; content: string; }; export type ToolOutputMessage = { role: "tool-output"; content: string; toolCall: ToolCallRequest; }; export type FileToolMessage = { role: "file-tool-output"; content: string; toolCall: ToolCallRequest; path: string; }; export type ToolRejectMessage = { role: "tool-reject"; toolCall: ToolCallRequest; }; export type ToolErrorMessage = { role: "tool-error"; toolCallId: string; toolName: string; error: string; }; export type ToolMalformedMessage = { role: "tool-malformed"; toolCallId: string; toolName?: string; arguments?: string; error: string; }; export type FileOutdatedMessage = { role: "file-outdated"; toolCall: ToolCallRequest; }; export type FileUnreadableMessage = { role: "file-unreadable"; path: string; toolCall: ToolCallRequest; }; export type LlmIR = AssistantMessage | UserMessage | ToolOutputMessage | FileToolMessage | ToolRejectMessage | ToolErrorMessage | ToolMalformedMessage | FileOutdatedMessage | FileUnreadableMessage | FileToolMessage; export type OutputIR = AssistantMessage | ToolMalformedMessage; export type AgentResult = { success: true; output: OutputIR[]; } | { success: false; requestError: string; curl: string; }; export declare function outputToHistory(output: OutputIR[]): HistoryItem[]; export declare function toLlmIR(history: HistoryItem[]): Array;