import { z } from "zod"; import type { AgentTool } from "@kenkaiiii/gg-agent"; /** * search_tools — meta-tool. With ~85+ named tools the agent can wind up * scanning the system prompt to remember a tool's exact name; this is * a token-cheap shortcut: pass a query, get back the top matches with * their one-line descriptions. * * The factory receives a *getter* so we can reflect over the live tool * registry as it stands at agent-construction time. We avoid a circular * import by accepting the tool list directly. */ declare const SearchToolsParams: z.ZodObject<{ query: z.ZodString; limit: z.ZodOptional; }, z.core.$strip>; export interface SearchableTool { name: string; description: string; } /** * Score a tool against a query. Higher = better match. Pure function so the * algorithm can be tuned + tested without booting the agent. * * Heuristic: * +5 per query word that appears in the tool name * +1 per query word that appears in the description * +3 if the query is a substring of the name * normalize: lowercase, strip non-alphanumerics */ export declare function scoreToolMatch(query: string, tool: SearchableTool): number; export declare function createSearchToolsTool(getTools: () => SearchableTool[]): AgentTool; export {}; //# sourceMappingURL=search-tools.d.ts.map