import { type Tool } from 'ai';
import type { AgentToolConfig } from '../spec/spec';
import type { ToolExecutionContext, ToolHandler } from '../types';
/**
 * Convert ContractSpec AgentToolConfig to AI SDK CoreTool.
 *
 * @param specTool - The tool configuration from AgentSpec
 * @param handler - The handler function for the tool
 * @param context - Partial context to inject into handler calls
 * @returns AI SDK CoreTool
 */
export declare function specToolToAISDKTool(specTool: AgentToolConfig, handler: ToolHandler, context?: Partial<ToolExecutionContext>): Tool<any, any>;
/**
 * Convert multiple ContractSpec tool configs to AI SDK tools.
 *
 * @param specTools - Array of tool configurations
 * @param handlers - Map of tool name to handler function
 * @param context - Partial context to inject into handler calls
 * @returns Record of AI SDK tools keyed by name
 */
export declare function specToolsToAISDKTools(specTools: AgentToolConfig[], handlers: Map<string, ToolHandler>, context?: Partial<ToolExecutionContext>): Record<string, Tool<any, any>>;
/**
 * Type-safe tool handler builder.
 *
 * @example
 * ```typescript
 * const handler = createToolHandler<{ query: string }>((input, ctx) => {
 *   return `Searched for: ${input.query}`;
 * });
 * ```
 */
export declare function createToolHandler<TInput = unknown, TOutput = string>(handler: (input: TInput, context: ToolExecutionContext) => Promise<TOutput> | TOutput): ToolHandler<TInput, TOutput>;
/**
 * Build a tool handlers map from an object.
 *
 * @example
 * ```typescript
 * const handlers = buildToolHandlers({
 *   search: async (input: { query: string }) => `Found: ${input.query}`,
 *   calculate: async (input: { a: number, b: number }) => `${input.a + input.b}`,
 * });
 * ```
 */
export declare function buildToolHandlers(handlersObj: Record<string, ToolHandler>): Map<string, ToolHandler>;
