import type { PortableTool } from "../portable-tool.js";
export declare const TOOL_SEARCH_TOOL_NAME: "tool_search";
export interface ToolSearchToolParams {
    query: string;
    maxResults?: number;
}
export declare const TOOL_SEARCH_TOOL_SCHEMA: {
    readonly type: "object";
    readonly properties: {
        readonly query: {
            readonly type: "string";
            readonly description: string;
        };
        readonly maxResults: {
            readonly type: "number";
            readonly description: "Maximum number of results to return (default: 5).";
        };
    };
    readonly required: readonly ["query"];
};
export interface DeferredToolInfo {
    name: string;
    description: string;
    /** Optional search hint for better discovery */
    searchHint?: string;
}
export interface ToolSearchOutput {
    matches: DeferredToolInfo[];
    query: string;
    totalDeferred: number;
}
/**
 * Host-provided deferred tool registry.
 * The host manages which tools are loaded vs deferred,
 * and handles activation when selected.
 */
export interface ToolSearchToolDeps {
    /**
     * Search deferred tools by query.
     * Supports "select:name" for direct activation and keyword search.
     */
    searchTools(query: string, options?: {
        maxResults?: number;
    }): Promise<ToolSearchOutput>;
    /**
     * Activate a deferred tool so it appears in subsequent turns.
     * Returns true if activation succeeded.
     */
    activateTool?(name: string): Promise<boolean>;
}
export interface ToolSearchCorpusEntry {
    name: string;
    description: string;
    searchHint?: string;
}
/**
 * Score a keyword query against a tool corpus (CC-aligned weights).
 * Query syntax: plain terms rank, "+term" is required (must appear in
 * name/description/searchHint). CJK terms match by substring.
 */
export declare function searchToolCorpus(entries: ToolSearchCorpusEntry[], query: string, maxResults: number): ToolSearchOutput;
export declare function createToolSearchTool(deps: ToolSearchToolDeps): PortableTool<ToolSearchToolParams>;
