import { CatalogTransform } from '../catalog.transform.js'; import { NextToolHandler, TransformRegistry } from '../transform.interface.js'; import { Tool } from '../../tool.js'; import { ExecutionContext } from '../../types.js'; import { SearchTransformOptions } from './types.js'; export declare abstract class BaseSearchTransform extends CatalogTransform { protected readonly options: Required; protected rawTools: Map; private cachedTransformedList; private lastCatalogHash; private registry; private readonly rebuilds; constructor(options?: SearchTransformOptions); onRegister(registry: TransformRegistry): void; /** * Resolves a tool for the `call_tool` proxy and for filtering search results. * * Goes through the server's resolution chain so downstream authorization transforms * still apply. When no server is attached (standalone use), there is no chain to * consult and the locally indexed catalog is the complete picture. */ private readonly resolveThroughChain; /** * Reshapes the catalog: replaces raw tools with search_tools, call_tool, * and any tools explicitly designated as always visible. */ protected applyTransform(tools: Tool[], context?: ExecutionContext): Promise; private rebuildCatalog; /** * Resolves this transform's own synthetic meta-tools. * * Everything else defers to the rest of the chain. There is deliberately no * fallback to `rawTools`: re-resolving a tool the chain declined would let a * caller reach tools that a downstream authorization transform filtered out. */ resolveTool(name: string, next: NextToolHandler, context?: ExecutionContext): Promise; private computeCatalogHash; /** * Creates the synthetic search tool. * Can be overridden by subclasses. */ protected createSearchTool(): Tool; /** Whether search queries are regular expressions rather than keywords. */ protected queryIsPattern(): boolean; /** * Creates the synthetic call tool. * Can be overridden by subclasses. */ protected createCallTool(): Tool; /** * Diagnostic access to the raw indexed tools. */ getRawTools(): Map; /** * Diagnostic access to transform options. */ getOptions(): Readonly>; protected abstract updateIndex(tools: Tool[], hash: string): Promise | void; protected abstract search(query: string, limit: number): Promise; } //# sourceMappingURL=base-search.transform.d.ts.map