import OpenAI from "openai"; import type Anthropic from "@anthropic-ai/sdk"; import type { ReplContext } from "./types.js"; /** * OpenAI agent turn — mirrors the Anthropic loop in agent.ts but speaks the * OpenAI Chat Completions API (official `openai` SDK). * * History stays canonical in Anthropic block format on context.messages; we * translate to OpenAI messages on the way in and store OpenAI output back as * Anthropic blocks on the way out, so users can switch providers mid-session. */ type ChatMessage = OpenAI.Chat.Completions.ChatCompletionMessageParam; /** * Translate the canonical Anthropic-format history + system prompt into the * flat OpenAI chat message array. */ export declare function historyToOpenAI(systemPrompt: string, messages: Anthropic.MessageParam[]): ChatMessage[]; export declare function runOpenAiTurn(userMessage: string, context: ReplContext): Promise; export {}; //# sourceMappingURL=openaiAgent.d.ts.map