import { z } from "zod"; import type { AgentTool } from "@kenkaiiii/gg-agent"; import { type ContextLimits } from "../core/context-limits.js"; import type { DeferredToolCatalog } from "../core/mcp/deferred-catalog.js"; declare const ToolSearchParams: z.ZodObject<{ query: z.ZodString; }, z.core.$strip>; /** Outcome of waiting for the MCP server behind a cached-only catalog entry. */ export interface CachedToolResolution { serverName: string; ok: boolean; error?: string; } /** * Discovery tool for the deferred MCP catalog. Matching tools are promoted * into the live toolset immediately — callable from the very next turn. * `onPromote` pushes onto the session's live tools array (the agent loop * re-reads it every turn). * * `resolveCached` settles entries that came from the on-disk catalog cache and * whose server has not connected yet: it waits for that connection so the model * learns *now* whether the capability really exists, instead of promoting a * tool that will fail on first call. Returns undefined for already-live tools. */ export declare function createToolSearchTool(catalog: DeferredToolCatalog, onPromote: (tools: AgentTool[]) => void, resolveCached?: (toolName: string) => Promise, limits?: ContextLimits): AgentTool; export {}; //# sourceMappingURL=tool-search.d.ts.map