import { type PlainTextToolCallBlock } from "./payload.js"; /** Resolves model-emitted tool names to the exact names allowed by the provider request. */ export type ToolCallRepairNameResolver = (rawName: string, allowedToolNames: Set) => string | null; /** Builds a provider-native tool-call block from a repaired plain-text payload. */ export type PromotedPlainTextToolCallBlockFactory = (block: PlainTextToolCallBlock, resolvedName: string) => Record; /** Controls when standalone assistant text may be rewritten as tool-call content. */ export type PlainTextToolCallPromotionOptions = { allowedStopReasons?: ReadonlySet; allowedToolNames: Set; createToolCallBlock: PromotedPlainTextToolCallBlockFactory; isRetainableNonTextBlock?: (block: Record) => boolean; message: unknown; requireAssistantRole?: boolean; resolveToolName?: ToolCallRepairNameResolver; }; /** Extracts candidate standalone tool-call text while rejecting mixed unsafe content. */ export declare function extractStandalonePlainTextToolCallText(params: { allowOtherNonTextBlocks?: boolean; allowedStopReasons?: ReadonlySet; isRetainableNonTextBlock?: (block: Record) => boolean; message: unknown; requireAssistantRole?: boolean; }): string | undefined; /** Promotes standalone plain-text tool-call messages into provider-native content blocks. */ export declare function promoteStandalonePlainTextToolCallMessage(options: PlainTextToolCallPromotionOptions): Record | undefined;