/**
 * KiroGraph Context Builder
 *
 * Implements hybrid search (exact name + semantic + full-text) to assemble
 * relevant code context for a given query.
 * Mirrors CodeGraph src/context/index.ts
 */
import type { Node, TaskContext } from '../types';
import type { GraphDatabase } from '../db/database';
import type { ReferenceResolver } from '../resolution/index';
import type { VectorManager } from '../vectors/index';
export interface ContextOptions {
    maxNodes?: number;
    maxCodeBlocks?: number;
    maxCodeBlockSize?: number;
    traversalDepth?: number;
}
export declare class ContextBuilder {
    private readonly db;
    private readonly resolver;
    private readonly vectors;
    private readonly projectRoot;
    constructor(db: GraphDatabase, resolver: ReferenceResolver, vectors: VectorManager, projectRoot: string);
    /**
     * Find relevant nodes for the given query using hybrid search.
     *
     * Pipeline:
     * 1. Extract symbol tokens from query
     * 2. Exact name lookup (priority: 'exact')
     * 3. Semantic search via VectorManager (priority: 'semantic')
     * 4. Full-text search fallback (priority: 'fts')
     * 5. Merge and deduplicate by node ID
     * 6. Resolve import nodes to their definitions via 'imports' edge
     * 7. Exclude 'import' and 'export' node kinds
     * 8. Priority-based trimming when exceeding maxNodes
     */
    findRelevantContext(query: string, opts?: ContextOptions): Promise<Node[]>;
    /**
     * Build a full TaskContext for the given task description.
     * Finds relevant nodes, gathers their edges and source snippets, and returns
     * the structured context used by MCP tools and the query API.
     */
    buildTaskContext(task: string, opts?: {
        maxNodes?: number;
        includeCode?: boolean;
    }): Promise<TaskContext>;
    private _readNodeSource;
    /**
     * Build a formatted context string for the given query.
     *
     * Each node is formatted as:
     *   [filePath:line] kind name
     *   ```
     *   {snippet}
     *   ```
     *
     * Returns NO_RESULTS_MESSAGE when no nodes are found.
     */
    build(query: string, opts?: ContextOptions): Promise<string>;
}
//# sourceMappingURL=index.d.ts.map