import type { CodeSymbol } from "../types.js";
export type ContextLevel = "L0" | "L1" | "L2" | "L3";
interface SymbolCompact {
    id: string;
    name: string;
    kind: string;
    file: string;
    start_line: number;
    signature?: string;
    docstring?: string;
}
interface FileSummary {
    path: string;
    language: string;
    exports: string[];
    symbol_count: number;
}
interface DirectoryOverview {
    path: string;
    file_count: number;
    symbol_count: number;
    top_files: string[];
}
export interface AssembleContextResult {
    symbols?: CodeSymbol[];
    compact_symbols?: SymbolCompact[];
    file_summaries?: FileSummary[];
    directory_overview?: DirectoryOverview[];
    level: ContextLevel;
    total_tokens: number;
    truncated: boolean;
    result_count: number;
}
export interface KnowledgeMapModule {
    path: string;
    symbol_count: number;
}
export interface KnowledgeMapEdge {
    from: string;
    to: string;
}
export interface CircularDep {
    cycle: string[];
    length: number;
}
export interface KnowledgeMap {
    modules: KnowledgeMapModule[];
    edges: KnowledgeMapEdge[];
    circular_deps: CircularDep[];
}
/**
 * Assemble a context window of relevant code for a query.
 * Uses BM25 search to find the most relevant symbols and accumulates
 * them until the token budget is reached.
 *
 * Levels:
 *   L0 = full source (default)
 *   L1 = signatures + docstrings only (~5-10x more symbols per budget)
 *   L2 = file-level summaries (export lists)
 *   L3 = directory overview (file counts + top files)
 */
export declare function assembleContext(repo: string, query: string, tokenBudget?: number, level?: ContextLevel, rerank?: boolean): Promise<AssembleContextResult>;
/**
 * Build a module dependency map for a repository.
 * Parses import statements from each file's symbols to discover edges.
 * Optionally filters to modules matching a focus path.
 */
export declare function getKnowledgeMap(repo: string, focus?: string, depth?: number, outputFormat?: "json" | "mermaid"): Promise<KnowledgeMap | {
    mermaid: string;
}>;
export {};
//# sourceMappingURL=context-tools.d.ts.map