import { VowelActionDefinition, VowelRoute } from '../types'; import { RouterAdapter } from '../types/types'; /** * Tool execution context */ export interface ToolContext { /** Router adapter for navigation */ router?: RouterAdapter; /** Available routes */ routes?: VowelRoute[]; /** Current path */ currentPath?: string; } /** * Tool handler function */ export type ToolHandler = (params: T, context: ToolContext) => Promise | any; /** * Tool definition with handler */ export interface Tool { /** Tool definition for AI */ definition: VowelActionDefinition; /** Execution handler */ handler: ToolHandler; } /** * Tool execution result */ export interface ToolResult { success: boolean; message?: string; data?: any; result?: any; response?: string; error?: string; } /** * Options for ToolManager */ export interface ToolManagerOptions { /** Whether to register navigation tools (navigate, getCurrentPageContext, listRoutes). * Defaults to true for backwards compatibility. Set to false when no navigationAdapter * is provided so the AI doesn't see navigation tools it can't use. */ enableNavigation?: boolean; } /** * Tool Manager class * Manages registration and execution of tools for the voice agent */ export declare class ToolManager { private tools; private options; constructor(options?: ToolManagerOptions); /** * Register a tool */ registerTool(name: string, definition: VowelActionDefinition, handler: ToolHandler): void; /** * Register multiple tools at once */ registerTools(tools: Record): void; /** * Unregister a tool */ unregisterTool(name: string): void; /** * Check if a tool is registered */ hasTool(name: string): boolean; /** * Get all tool definitions for AI configuration */ getToolDefinitions(): Record; /** * Execute a tool */ executeTool(name: string, params: any, context: ToolContext): Promise; /** * Get list of registered tool names */ getToolNames(): string[]; /** * Register all default tools */ private registerDefaultTools; /** * Extract routes from router adapter */ private extractRoutesFromRouter; } //# sourceMappingURL=ToolManager.d.ts.map