import * as _conveniencepro_ctp_core from '@conveniencepro/ctp-core'; import { ToolRegistry, ToolDefinition, ToolFunction, ToolParams, ToolResult, ToolRegistryEntry } from '@conveniencepro/ctp-core'; /** * Create a new tool registry */ declare function createRegistry(): ToolRegistry; /** * Get or create the global registry */ declare function getGlobalRegistry(): ToolRegistry; /** * Reset the global registry (useful for testing) */ declare function resetGlobalRegistry(): void; /** * Register a tool in the global registry */ declare function registerTool>(definition: ToolDefinition, fn: ToolFunction): void; /** * Execute a tool from the global registry */ declare function executeTool>(id: string, params: ToolParams): Promise>; /** * Get a tool from the global registry */ declare function getTool(id: string): ToolRegistryEntry | undefined; /** * Check if a tool exists in the global registry */ declare function hasTool(id: string): boolean; /** * List all tools in the global registry */ declare function listTools(): string[]; /** * Get all definitions from the global registry */ declare function getAllDefinitions(): ToolDefinition[]; /** * Batch execution request */ interface BatchRequest { id: string; toolId: string; params: ToolParams; } /** * Batch execution result */ interface BatchResult> { id: string; toolId: string; result: ToolResult; } /** * Execute multiple tools in parallel */ declare function executeBatch(requests: BatchRequest[], registry?: ToolRegistry): Promise; /** * Execute tools sequentially (for dependent operations) */ declare function executeSequential(requests: BatchRequest[], registry?: ToolRegistry): Promise; /** * Fluent builder for creating tools */ declare class ToolBuilder> { private definition; private implementation?; /** * Set the tool ID */ id(id: string): this; /** * Set the tool name */ name(name: string): this; /** * Set the tool description */ description(description: string): this; /** * Set the tool category */ category(category: string): this; /** * Add tags */ tags(...tags: string[]): this; /** * Set HTTP method */ method(method: 'GET' | 'POST'): this; /** * Add a parameter */ param(param: _conveniencepro_ctp_core.ParameterSchema): this; /** * Set output description */ output(description: string): this; /** * Set example */ example(input: Record, output: Record): this; /** * Set the implementation function */ implement(fn: ToolFunction): this; /** * Build and register the tool */ register(registry?: ToolRegistry): ToolDefinition; /** * Build without registering (for testing) */ build(): { definition: ToolDefinition; fn: ToolFunction; }; } /** * Create a new tool builder */ declare function tool>(): ToolBuilder; export { type BatchRequest, type BatchResult, ToolBuilder, createRegistry, executeBatch, executeSequential, executeTool, getAllDefinitions, getGlobalRegistry, getTool, hasTool, listTools, registerTool, resetGlobalRegistry, tool };