import type { ActionEntry } from "./production-agent.js"; export declare const TOOL_SEARCH_ACTION_NAME = "tool-search"; type ToolSearchArgs = { query?: unknown; queries?: unknown; names?: unknown; limit?: unknown; includeSchemas?: unknown; readOnlyOnly?: unknown; }; type ToolParameterSummary = { name: string; type?: string; required: boolean; description?: string; enum?: string[]; }; type ToolSearchResult = { name: string; kind: "action" | "mcp"; source?: string; description: string; score: number; callable: boolean; planAvailability: "read" | "conditional" | "act-only"; parameters: ToolParameterSummary[]; }; type ToolSearchOptions = { defaultLimit?: number; maxLimit?: number; }; export declare function createToolSearchEntry(getRegistry: () => Record, options?: ToolSearchOptions): ActionEntry; export declare function attachToolSearch(registry: Record, options?: ToolSearchOptions): Record; export declare function filterActionsForAgentDiscovery(registry: Record, context?: import("../action.js").ActionRunContext): Promise>; type ToolSearchOutput = { query: string; totalTools: number; count: number; repeated?: boolean; message?: string; results: ToolSearchResult[]; suggestions?: Array<{ name: string; description: string; }>; }; /** * One call may carry several capability queries and exact names; every match * loads on the same next step. Each query keeps its own repeat guard. */ export declare function searchToolRegistry(registry: Record, args?: ToolSearchArgs, options?: ToolSearchOptions): ToolSearchOutput; export declare function searchToolRegistryForRequest(registry: Record, args?: ToolSearchArgs, options?: ToolSearchOptions, context?: import("../action.js").ActionRunContext): Promise>; /** * Whether a search names anything to look for. A menu search (no query, * queries or names) only lists, so a caller that grants tools from a search * result must not grant from it. Reads the lists exactly as the search does, * so a form the search accepts is never read as a menu search. */ export declare function isTargetedToolSearch(args: object): boolean; /** Callable matches of a targeted search; empty for a menu or an error. */ export declare function extractToolSearchResultNames(value: unknown): string[]; /** * The tools a search made callable lead its stored result. Replayed history * clips a result mid-object, and the loaded list must outlive that clip, so it * is read before the rest of the object is parsed. */ export declare function withLoadedToolNames(output: T, names: string[]): { loadedForNextStep: string[]; } & T; /** * Tools a stored tool-search result made callable. `[]` means it loaded * nothing, which includes a failed or interrupted search (not an object); * `null` means it is a search result that cannot be read, clipped or corrupt. */ export declare function readLoadedToolNames(content: string): string[] | null; export {};