/**
 * Tool Registry — Central metadata catalog for all NodeBench MCP tools.
 *
 * Every tool gets: category, tags (for hybrid search), quickRef (what to do next),
 * relatedTools, and phase (which methodology phase it belongs to).
 *
 * The progressive disclosure system uses this to:
 * 1. Score tools by relevance (hybrid: keyword + tag + category matching)
 * 2. Append quickRefs to every tool response (so agents always know what to do next)
 * 3. Build tool chains (recommended sequences for common workflows)
 */
export interface ToolQuickRef {
    /** 1-2 sentence guidance on what to do after calling this tool */
    nextAction: string;
    /** Tools commonly used after this one */
    nextTools: string[];
    /** Which methodology to consult for full guidance */
    methodology?: string;
    /** Short tip for effective use */
    tip?: string;
}
export interface ToolRegistryEntry {
    name: string;
    category: string;
    tags: string[];
    quickRef: ToolQuickRef;
    /** Where this tool sits in a typical workflow: research, implement, test, verify, ship */
    phase: "research" | "implement" | "test" | "verify" | "ship" | "meta" | "utility";
    /** Recommended model tier: low=Haiku, medium=Sonnet, high=Opus. Used for cost-aware routing. */
    complexity?: "low" | "medium" | "high";
}
/** Map of tool name → registry entry for O(1) lookup */
export declare const TOOL_REGISTRY: Map<string, ToolRegistryEntry>;
/** All registry entries as array */
export declare const ALL_REGISTRY_ENTRIES: ToolRegistryEntry[];
/** Get quick ref for a tool, with fallback for unregistered tools */
export declare function getQuickRef(toolName: string): ToolQuickRef | null;
/**
 * Compatibility helper for older callers that expect a "related tools" list.
 * The current registry models this through quickRef.nextTools.
 */
export declare function computeRelatedTools(toolName: string): string[];
/** Get all tools in a category */
export declare function getToolsByCategory(category: string): ToolRegistryEntry[];
/**
 * Return only registry entries whose category is in the selected domains.
 * Avoids iterating over all 338 metadata entries when only a subset of
 * domains is active (e.g. default preset = 28 domains).
 */
export declare function getFilteredRegistry(selectedDomains: string[]): ToolRegistryEntry[];
/** Get all tools in a workflow phase */
export declare function getToolsByPhase(phase: ToolRegistryEntry["phase"]): ToolRegistryEntry[];
/** Get the recommended model complexity tier for a tool */
export declare function getToolComplexity(toolName: string): "low" | "medium" | "high";
import type { McpToolAnnotations } from "../types.js";
/**
 * Convert snake_case tool name to Title Case for the MCP `title` annotation.
 * e.g. "get_daily_brief_summary" → "Get Daily Brief Summary"
 */
export declare function toolNameToTitle(toolName: string): string;
/**
 * Get MCP security annotations for a tool.
 * Resolution order:
 *   1. Per-tool override (TOOL_ANNOTATION_OVERRIDES)
 *   2. Category default (CATEGORY_ANNOTATIONS)
 *   3. Name-prefix inference (inferAnnotationsFromPrefix)
 * Each layer merges on top of the previous.
 */
export declare function getToolAnnotations(toolName: string): McpToolAnnotations;
export interface SearchResult {
    name: string;
    description: string;
    category: string;
    score: number;
    /** Human-readable breakdown of why this tool matched */
    matchReasons: string[];
    quickRef: ToolQuickRef;
    phase: string;
    tags: string[];
}
export type SearchMode = "hybrid" | "fuzzy" | "regex" | "prefix" | "semantic" | "exact" | "dense" | "embedding";
/** Tokenize text into lowercase words (alpha + underscore only) */
export declare function tokenize(text: string): string[];
export declare function buildDenseIndex(): {
    vectors: Map<string, Map<string, number>>;
    idf: Map<string, number>;
};
/** Inject the DB accessor — called once from index.ts at startup. */
export declare function _setDbAccessor(accessor: () => any): void;
/**
 * Mine co-occurrence patterns from tool_call_log.
 * Returns a map of toolName → [most co-occurring tools] based on session adjacency.
 *
 * Approach: for each session, pull the ordered tool sequence, then count
 * pairs within a sliding window of 5 calls. O(n) per session, no self-join.
 */
export declare function getCooccurrenceEdges(): Map<string, string[]>;
/** Reset co-occurrence cache — for testing only. */
export declare function _resetCooccurrenceCache(): void;
/** Inject co-occurrence edges directly — for testing only. */
export declare function _setCooccurrenceForTesting(edges: Map<string, string[]>): void;
/** Override wRRF weights — for ablation testing only.
 *  Allows comparing paper's α_A=1.5,α_T=1.0,K=60 vs our α_T=1.0,α_D=0.6,K=20. */
export declare function _setWrrfParamsForTesting(params: {
    alphaT?: number;
    alphaD?: number;
    k?: number;
}): void;
/** Restore default wRRF weights — for ablation testing only. */
export declare function _resetWrrfParamsForTesting(): void;
/**
 * Multi-modal hybrid search engine with Agent-as-a-Graph bipartite retrieval.
 *
 * Search modes (all run in parallel, scores merged):
 * - **keyword**: Exact and partial word matching on name, tags, description, category
 * - **fuzzy**: Levenshtein distance for typo tolerance (e.g., "verifiy" → "verify")
 * - **n-gram**: Trigram similarity for partial word overlap (e.g., "screen" → "screenshot")
 * - **prefix**: Matches tool names starting with query words (e.g., "cap" → "capture_*")
 * - **semantic**: Synonym expansion using curated map (e.g., "check" → also "verify", "validate")
 * - **TF-IDF**: Rare tags score higher than common ones
 * - **regex**: Pass a regex pattern to match against tool names/descriptions
 * - **bigram**: Two-word phrase matching (e.g., "quality gate" matched as phrase)
 * - **domain boost**: Related categories get boosted when top results cluster
 * - **embedding**: Neural embedding with type-specific wRRF (tool α_T + domain α_D nodes)
 * - **graph traversal**: Upward traversal from tools → domains → sibling tools
 * - **trace edges**: Execution co-occurrence mining from tool_call_log (dynamic graph edges)
 *
 * Graph architecture based on arxiv:2511.18194 (Agent-as-a-Graph).
 */
export declare function hybridSearch(query: string, tools: Array<{
    name: string;
    description: string;
}>, options?: {
    category?: string;
    phase?: string;
    limit?: number;
    mode?: SearchMode;
    /** If true, includes matchReasons in results explaining why each tool matched */
    explain?: boolean;
    /** Pre-computed query embedding vector for semantic search (passed from async caller) */
    embeddingQueryVec?: Float32Array;
    /** If true, search ALL_REGISTRY_ENTRIES (full 175-tool registry) regardless of loaded preset.
     *  Needed for dynamic loading: discover_tools must find unloaded tools to suggest load_toolset. */
    searchFullRegistry?: boolean;
    /** Ablation flags: disable individual strategies to measure their contribution */
    ablation?: {
        disableSynonyms?: boolean;
        disableFuzzy?: boolean;
        disableTagCoverage?: boolean;
        disableTfIdf?: boolean;
        disableNgram?: boolean;
        disableBigram?: boolean;
        disableDense?: boolean;
        disableDomainBoost?: boolean;
        disableTraceEdges?: boolean;
        disablePrefix?: boolean;
        disableEmbedding?: boolean;
    };
}): SearchResult[];
/** Available search modes for discover_tools */
export declare const SEARCH_MODES: SearchMode[];
export interface WorkflowChain {
    name: string;
    description: string;
    steps: Array<{
        tool: string;
        action: string;
    }>;
}
/** Pre-built workflow chains for common tasks */
export declare const WORKFLOW_CHAINS: Record<string, WorkflowChain>;
