/** * How a gateway-executed server-tool exchange is written onto the OpenAI chat * transcript so Anthropic, Google, and Responses lossless metadata survives * the synthetic tool turn. Loop orchestration lives in `server-tool-loop.ts`. */ import type { Reasoning } from "@velum-labs/routekit-contracts/protocol-ir"; import { type ResponsesReasoningState } from "./openai-chat-wire.js"; export type ServerToolTranscriptCall = { providerIndex?: number; id?: string; name?: string; arguments?: string; }; export type ServerToolTranscriptToolCall = { id: string; type: "function"; function: { name: string; arguments: string; }; }; export declare function canonicalServerToolReasoning(details: readonly Reasoning[] | undefined): Reasoning[]; export declare function nativeAnthropicServerToolReasoning(canonical: readonly Reasoning[]): Reasoning[]; export declare function serverToolAssistantMessage(input: { calls: readonly ServerToolTranscriptCall[]; stepContent: string | undefined; reasoningDetails?: readonly Reasoning[]; responsesReasoning?: ResponsesReasoningState; }): { assistant: Record; toolCalls: ServerToolTranscriptToolCall[]; };