import { type Static, Type } from "typebox"; import type { ExtensionAPI, ToolDefinition, ToolInfo, ToolNamespace } from "../../core/extensions/types.ts"; export declare const TOOL_SEARCH_TOOL_NAME = "tool_search"; export declare const DEFAULT_TOOL_SEARCH_LIMIT = 8; export interface ToolSearchDocument { name: string; text: string; } export interface ToolSearchMatch { name: string; score: number; } export interface ToolRanker { rank(query: string, documents: readonly ToolSearchDocument[], limit: number): ToolSearchMatch[]; } export declare function tokenize(text: string): string[]; export declare function createToolSearchDocument(tool: Pick, namespace?: ToolNamespace): ToolSearchDocument; export declare class Bm25Ranker implements ToolRanker { private readonly k1; private readonly b; constructor(options?: { k1?: number; b?: number; }); rank(query: string, documents: readonly ToolSearchDocument[], limit: number): ToolSearchMatch[]; } export declare const toolSearchSchema: Type.TObject<{ query: Type.TString; limit: Type.TOptional; }>; export type ToolSearchInput = Static; export interface ToolSearchToolDetails { loaded: string[]; } export interface ToolSearchToolOptions { tools?: Pick; } export declare function isToolSearchTool(tool: Pick): boolean; export declare function createToolSearchDescription(_sources?: readonly ToolNamespace[]): string; export declare function createToolSearchToolDefinition(options?: ToolSearchToolOptions): ToolDefinition; //# sourceMappingURL=tool.d.ts.map