import type { ClientToolsConfig } from "@elevenlabs/client"; import type { ClientTool, ClientTools } from "./types.js"; type ClientToolEntry = ClientToolsConfig["clientTools"][string]; /** * Creates a fresh clientTools object by merging option-provided tools with * hook-registered tools from the registry. Throws if a hook-registered tool * name conflicts with an option-provided tool. */ export declare function buildClientTools(optionTools: Record | undefined, registry: Map): Record; export declare function ConversationClientToolsProvider({ children, }: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element; /** * Registers a named client tool with the nearest `ConversationProvider`. * The tool is available during any active conversation and is automatically * unregistered when the component unmounts. * * The handler always reflects the latest closure value (ref pattern), * so it is safe to reference component state or props without listing * them as dependencies. * * @typeParam TTools - An interface mapping tool names to function signatures. * @typeParam TName - The specific tool name (inferred from the first argument). * @param name - The tool name (must match the name configured on the agent). * @param handler - The function invoked when the agent calls this tool. * * @example * ```tsx * type Tools = { * get_weather: (params: { city: string }) => string; * set_volume: (params: { level: number }) => void; * }; * * useConversationClientTool("get_weather", (params) => { * return `Weather in ${params.city} is sunny.`; * }); * ``` */ export declare function useConversationClientTool, TName extends string & keyof TTools = string & keyof TTools>(name: TName, handler: TTools[TName]): void; export {}; //# sourceMappingURL=ConversationClientTools.d.ts.map