import type { Tool, ToolDefinition, ToolExecuteOptions, ToolResult } from '../types/tools.js'; import type { ContractVerificationResult, ContractVerifierOptions } from '../runtime/tools/contract-verifier.js'; /** * ToolRegistry - Central registry for all tools available to the LLM. * Manages registration, discovery, and execution of tools. */ export declare class ToolRegistry { private tools; /** Register a tool. Throws if a tool with the same name is already registered. */ register(tool: Tool): void; /** * Register a tool after running contract verification. * * If verification finds error-level violations the tool is NOT registered * and an error is thrown listing all violations. This implements "fail closed" * semantics: invalid tools cannot enter the registry. * * Warn-level violations are collected and returned so callers can surface them * without blocking registration. * * @param tool - The tool to register. * @param opts - Optional verifier options (strictness overrides). * @returns The full ContractVerificationResult so callers can inspect warnings. * @throws If the tool has any error-level contract violations. */ registerWithContract(tool: Tool, opts?: ContractVerifierOptions): ContractVerificationResult; /** * Run contract verification on a single registered tool without re-registering. * * @param name - The tool name to verify. * @param opts - Optional verifier options. * @returns The verification result, or undefined if the tool is not registered. */ verifyContract(name: string, opts?: ContractVerifierOptions): ContractVerificationResult | undefined; /** * Run contract verification on all registered tools. * * @param opts - Optional verifier options. * @returns Map of tool name → ContractVerificationResult for every registered tool. */ verifyAllContracts(opts?: ContractVerifierOptions): Map; /** Returns the ToolDefinition array formatted for LLM function calling. */ getToolDefinitions(): ToolDefinition[]; /** * Execute a named tool with the given arguments. Wraps errors in ToolResult. * * `opts.signal` is an additive pass-through to * `tool.execute`, only tools that opt in (exec, fetch) read it. Callers * that don't have a cancellation signal (the common case) omit `opts`. */ execute(callId: string, name: string, args: Record, opts?: ToolExecuteOptions): Promise; /** Returns true if a tool with the given name is registered. */ has(name: string): boolean; /** Returns all registered tools. */ list(): Tool[]; } //# sourceMappingURL=registry.d.ts.map