import type { NativeToolCall, ProviderId, ToolChoice, ToolDefinition } from "../types.js"; import { parseToolArguments } from "./tool-wire/argument-repair.js"; export { repairConcatenatedToolArguments } from "./tool-wire/argument-repair.js"; export { parseToolArguments }; export type { NativeToolCall, ToolChoice, ToolDefinition }; export type ToolDialect = "openai" | "anthropic" | "gemini" | "ollama" | "none"; export type ToolCallingMode = "auto" | "native" | "text"; export declare const MAX_TOOL_ARG_BYTES: number; export declare function toWireName(canonical: string): string; export declare function toSnakeWireName(canonical: string): string; export declare function registeredCanonicalForWire(wire: string): string | undefined; export declare function registerWireName(canonical: string, wire?: string): void; export declare function registerWireNamesFor(canonical: string): string; export declare function sanitizeToolName(raw: string): string; export declare function fromWireName(wire: string): string | undefined; export declare function syntheticToolCallId(index: number): string; export declare function isToolsUnsupportedError(error: unknown): boolean; export declare function mapToolChoiceToOpenAi(choice: ToolChoice | undefined): unknown; export declare function mapToolChoiceToAnthropic(choice: ToolChoice | undefined): unknown; export declare function mapToolChoiceToGemini(choice: ToolChoice | undefined): { mode: string; allowedFunctionNames?: string[]; }; export declare function textOnlyKey(provider: ProviderId, model: string): string; export declare function markTextOnlyModel(provider: ProviderId, model: string): void; export declare function isTextOnlyModel(provider: ProviderId, model: string): boolean; export declare function clearTextOnlyModels(): void; export interface OpenAiToolCallAccumulator { id?: string; name?: string; arguments: string; argumentsMode?: "fragments" | "snapshots" | undefined; } export interface AccumulateToolCallDeltaResult { index: number; id?: string | undefined; name?: string | undefined; nameBecameKnown: boolean; argumentsBytes: number; } export declare function accumulateOpenAiToolCallDelta(state: Map, entry: { index?: number; id?: string; type?: string; function?: { name?: string; arguments?: string | Record; }; }): AccumulateToolCallDeltaResult; export declare function finalizeOpenAiToolCalls(state: Map): NativeToolCall[]; export declare function parseOpenAiMessageToolCalls(toolCalls: Array<{ id?: string; type?: string; function?: { name?: string; arguments?: string; }; }> | undefined): NativeToolCall[];