import type { ChatCompletionMessageParam, ChatCompletionMessageFunctionToolCall } from 'openai/resources/chat'; import type { ChatCompletionContentPart } from 'openai/resources/chat'; export type ChatCompletionToolCallExtraContent = { google?: { thought_signature?: string; }; } & Record; export type ChatCompletionToolCallWithExtraContent = ChatCompletionMessageFunctionToolCall & { extra_content?: ChatCompletionToolCallExtraContent; }; interface ChatStateEntry { instructions: string | undefined; storageId: string | undefined; messages: ChatCompletionMessageParam[]; } export declare class CompletionsChatState { private chats; createChat(chatId: string, instructions?: string, storageId?: string, history?: ChatCompletionMessageParam[]): void; getChat(chatId: string): ChatStateEntry | null; appendUserMessage(chatId: string, content: ChatCompletionContentPart[]): void; appendAssistantMessage(chatId: string, content: string): void; appendToolCallMessages(chatId: string, toolCalls: ChatCompletionToolCallWithExtraContent[], reasoningContent?: string, content?: string): void; appendToolResult(chatId: string, toolCallId: string, content: string): void; getMessages(chatId: string): ChatCompletionMessageParam[]; /** * Replaces every recorded thought_signature in the chat's assistant * tool-call turns with the given marker. Recovery path for providers that * reject a previously-issued signature on replay ("Corrupted thought * signature"): downgrading to the documented validator-bypass marker lets * the conversation continue without the rejected signatures. */ replaceThoughtSignatures(chatId: string, marker: string): void; deleteChat(chatId: string): void; } export {};