/** * ToolSearch tool: load full tool schemas on demand. * * Auto-registered when `deferredTools.enabled` is true. The model uses this * tool to discover and load tools that appear by name in the * `_available_tools` slot but whose schemas are not yet in the agent's * tools array. * * Once a tool is loaded, it persists in the agent's tools array for the * rest of the session and can be called normally. */ import { Type, type Static } from 'typebox'; import type { CortexTool } from '../../tool-contract.js'; import type { ToolContentDetails } from '../../types.js'; import type { DeferredToolRegistry } from './registry.js'; export declare const TOOL_SEARCH_TOOL_NAME = "ToolSearch"; export declare const ToolSearchParams: Type.TObject<{ query: Type.TString; max_results: Type.TOptional; }>; export type ToolSearchParamsType = Static; export interface ToolSearchDetails { query: string; loaded: string[]; alreadyAvailable: string[]; notFound: string[]; totalDeferred: number; } export interface ToolSearchToolConfig { /** The deferred tool registry shared with CortexAgent. */ registry: DeferredToolRegistry; /** * Called after the registry is updated. The agent uses this to refresh * its tools array (so the newly discovered tools appear in the next API * call) and update the `_available_tools` slot. */ onAfterDiscovery: () => void; } export declare function createToolSearchTool(config: ToolSearchToolConfig): CortexTool>; //# sourceMappingURL=index.d.ts.map