/** * Canonical WrongStack messages/tools → OpenAI **Responses** API wire shapes. * * Used by the `openai-codex` family (ChatGPT backend). The Responses API takes * a flat `input` array of typed items rather than chat/completions `messages`: * - user text/image → { role:'user', content:[{type:'input_text'|'input_image', ...}] } * - assistant prose → { type:'message', role:'assistant', content:[{type:'output_text', ...}] } * - assistant tool call → { type:'function_call', call_id, name, arguments } * - tool result → { type:'function_call_output', call_id, output } * * `thinking` blocks are intentionally dropped from the input: replaying them * would require the opaque `reasoning.encrypted_content` blob (which we don't * persist), and omitting them — plus omitting function-call item ids — sidesteps * the Responses reasoning/tool-call pairing validation entirely. */ import type { Message, Tool } from '@wrongstack/core/types'; export interface ResponsesTool { type: 'function'; name: string; description: string; parameters: Record; strict: boolean; } export declare function toolsToResponses(tools: Tool[]): ResponsesTool[]; export declare function messagesToResponsesInput(messages: Message[]): Record[]; //# sourceMappingURL=to-responses.d.ts.map