import { type ReactNode } from 'react';
import { type ClientTool, type ClientToolExecuteContext } from '../types';
export type ClientToolMap = Map<string, ClientTool>;
export declare function ClientToolsProvider({ tools, children }: {
    tools: ClientToolMap;
    children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
/** Returns the full registered client-tool map. */
export declare function useClientToolMap(): ClientToolMap;
/** Builds a name → tool lookup, ignoring duplicates (first wins). */
export declare function buildClientToolMap(tools?: ClientTool[]): ClientToolMap;
/** Serializable tool definitions sent to the chat endpoint as `clientTools`. */
export declare function serializeClientTools(tools?: ClientTool[]): {
    name: string;
    description: string;
    parameters: Record<string, unknown>;
}[];
export type ClientToolResult = {
    success: true;
    result: unknown;
} | {
    success: false;
    error: string;
};
/** Executes a client tool, normalizing the outcome into a result envelope. */
export declare function runClientTool(tool: ClientTool, input: unknown, context: ClientToolExecuteContext): Promise<ClientToolResult>;
interface ClientToolCallProps {
    tool: ClientTool;
    part: {
        state?: string;
        input?: any;
        output?: any;
        errorText?: string;
        toolCallId: string;
    };
}
/** Compact card rendered for a client-tool call, driven by host-provided copy. */
export declare function ClientToolCall({ tool, part }: ClientToolCallProps): import("react/jsx-runtime").JSX.Element;
export {};
