import { type Message, type MessagePart, type ToolResultPart } from "../types.js"; import type { ChatStreamState, StreamingToolCall, StreamingToolResult } from "./chat-stream-handler.js"; import type { RuntimeGenerateToolResult, RuntimeToolSet } from "./runtime-tool-types.js"; export { getToolResultError } from "../../tool/result.js"; export declare function createToolResultMessage(toolCallId: string, toolName: string, result: unknown, providerExecuted?: boolean): Message; export declare function createToolErrorMessage(toolCallId: string, toolName: string, error: string): Message; export declare function getProviderExecutedToolNames(runtimeTools: RuntimeToolSet | undefined): string[]; export declare function collectFinalStreamToolResults(state: Pick): Map; export declare function collectPersistedToolResults(messages: Message[]): Map; export declare function collectGeneratedToolResults(toolResults: RuntimeGenerateToolResult[] | undefined): Map; export declare function hasSubstantiveAssistantText(text: string | undefined): boolean; export declare function isClientRecoverablePlaceholderToolCall(toolCall: Pick): boolean; export declare function shouldOmitRecoverablePlaceholderToolCall(state: Pick, toolCall: Pick): boolean; export declare function shouldContinueAfterStreamStep(state: Pick & Partial>, options?: { recoverInterruptedToolCalls?: boolean; }): boolean; export declare function captureStreamedToolCallInput(toolCall: Pick): { args: Record; inputText?: string; parseError?: string; }; export declare function isStreamedToolCallIncomplete(toolCall: Pick): boolean; export declare function isInterruptedClientToolCall(toolCall: Pick): boolean; export declare function isRecoverablePlaceholderToolCall(toolCall: Pick): boolean; export type StreamedToolCallMaterialization = { readonly kind: "complete"; readonly part: MessagePart; } | { readonly kind: "parse-error"; readonly part: MessagePart; readonly parseError: string; } | { readonly kind: "incomplete"; readonly part: MessagePart; readonly partialArgumentsLength: number; readonly partialArgumentsPreview: string; }; export declare function materializeStreamedToolCall(tc: StreamingToolCall): StreamedToolCallMaterialization; export declare function isToolResultPart(part: MessagePart): part is ToolResultPart; //# sourceMappingURL=tool-result-continuation.d.ts.map