import type { Tool } from "ai";
import type { AiToolCallChatMessage, BrowserPlaywrightToolCallChatMessage, AiToolExecutionErrorCode, ToolName } from "@superblocksteam/library-shared/types";
import type { Clark } from "../state-machine/clark-fsm.js";
import type { buildTools } from "./tools.js";
type AppToolSet = Awaited<ReturnType<typeof buildTools>>;
type DynamicToolSet = {
    browser_playwright_action: Tool<BrowserPlaywrightToolCallChatMessage["args"]>;
};
type ToolSet = AppToolSet & DynamicToolSet;
type ToolInputMap = {
    [K in ToolName]: ToolSet[K] extends Tool<infer PARAMETERS> ? PARAMETERS : never;
};
type ToolArguments<N extends ToolName> = ToolInputMap[N];
/**
 * Generate a custom message for tool calls based on the tool name and arguments
 *
 * @param toolName - The name of the tool being called (can be runtime string)
 * @param toolArguments - The arguments passed to the tool
 * @param clark - Optional Clark context for looking up additional data
 */
export declare function getToolCallArguments<T extends ToolName>(toolName: T, toolArguments?: ToolArguments<T>, clark?: Clark): Promise<AiToolCallChatMessage["args"]>;
export declare function getToolOutput<T extends ToolName>(toolName: T, output: any): any;
export declare function getToolErrorCode(error: any): AiToolExecutionErrorCode | undefined;
export declare function getToolErrorMessage(error: any): string;
export {};
//# sourceMappingURL=tool-message-utils.d.ts.map