import { type CodeNodeType, type NormalizedSymbolKind, type ParsedImport, type ParsedSymbol } from './types.js';
/**
 * Minimal structural view of an index that context projection needs — both
 * `CodebaseIndex` and `CodebaseIndexSlim` satisfy it, so hosts holding either
 * can project without converting.
 */
export interface CodeContextSource {
    repoRoot: string;
    files: ReadonlyArray<{
        path: string;
        relativePath: string;
        language: string;
        symbols: ReadonlyArray<ParsedSymbol>;
        imports: ReadonlyArray<ParsedImport>;
    }>;
}
export interface CodeContextExport {
    name: string;
    kind: NormalizedSymbolKind;
    type: CodeNodeType;
    /** Graph node id when the index carries symbol→node linkage. */
    nodeId?: string;
    signature?: string;
    fullSignature?: string;
    returnType?: string;
    jsdoc?: string;
    containerName?: string;
    line: number;
}
export interface CodeContextLocalImport {
    /** Repo-relative, forward-slash path of the imported module. */
    resolvedPath: string;
    /** Local binding names introduced by the import. */
    bindings: string[];
}
export interface CodeContextFile {
    relativePath: string;
    language?: string;
    exports: CodeContextExport[];
    localImports: CodeContextLocalImport[];
    /** External package roots (`@scope/name` or the bare first segment), deduped. */
    externalDeps: string[];
}
export interface CodeContext {
    files: CodeContextFile[];
    /** relativePath → repo-relative resolved local import paths (files with none are omitted). */
    importGraph: Record<string, string[]>;
}
/**
 * Project an index down to the shape hosts typically feed to models or graph
 * views: per-file exported symbols, the local import graph, and external
 * dependency roots. Pure and synchronous — no filesystem access.
 */
export declare function buildCodeContext(index: CodeContextSource): CodeContext;
