import { type TreeSitterParseCacheScope } from './tree-sitter.js';
import { type SourceIdentity } from './source-inline.js';
import type { ParsedFile } from './types.js';
/** Extraction contract stamped into graph, entity, atoms, and blob evidence. */
export declare const CODE_PARSER_VERSION: 4;
export interface ParserContext {
    repoRoot: string;
    /** @internal Invocation-scoped tree ownership shared by contract reads. */
    treeSitterParseCache?: TreeSitterParseCacheScope;
    /**
     * Resolve import specifiers against the filesystem. Default true.
     *
     * Set false when parsing a historical revision: resolution consults
     * `existsSync` and a memoized tsconfig against **today's** working tree, so
     * for a blob from an old commit it is wrong in both directions — files that
     * did not exist then now resolve, and files that did are gone. It is also
     * the expensive part of parsing, probing roughly two dozen candidate paths
     * per specifier, and nothing about entity identity reads the resolved paths.
     */
    resolveImports?: boolean;
    /**
     * Framework entry points that open a test block. Defaults to the recognizer's
     * `TEST_CALL_NAMES`, so the parser and the classifier never drift apart.
     */
    testBlockCalls?: readonly string[];
}
export interface CodeFileGuardrails {
    maxFileSizeBytes?: number;
    maxLines?: number;
    skipMinified?: boolean;
}
export interface ParseCodeContentGuardrails extends CodeFileGuardrails {
    /**
     * True byte length of `content`, when the caller already knows it (git
     * reports it in the `cat-file --batch` header). Defaults to the UTF-8 length
     * of the string.
     */
    byteSize?: number;
}
export interface ParsedCodeFileSuccess {
    kind: 'parsed';
    file: ParsedFile;
    /** Byte identity of a working-tree read; absent for in-memory/historical content. */
    sourceIdentity?: SourceIdentity;
}
export interface ParsedCodeFileSkipped {
    kind: 'skipped';
    reason: string;
}
export type ParseCodeFileResult = ParsedCodeFileSuccess | ParsedCodeFileSkipped | null;
export type StaticImportResolutionCapability = 'language-aware' | 'relative-specifier' | 'unsupported';
/**
 * Describe the static local-import evidence available to relationship queries.
 * This shares the exact branch selector used by `resolveImportPath`, so a
 * consumer cannot grow a second language allowlist that drifts from parsing.
 */
export declare function staticImportResolutionCapability(language: string, observedSpecifiers?: readonly string[]): StaticImportResolutionCapability;
export declare function resolveImportPath(language: string, context: ParserContext, filePath: string, specifier: string): string | undefined;
export declare function parseCodeFile(filePath: string, context: ParserContext, guardrails?: CodeFileGuardrails): Promise<ParseCodeFileResult>;
/**
 * Parse source that is already in memory, addressed by the path it *would*
 * occupy in the repository. `parseCodeFile` is this function plus a stat and a
 * read; keeping the byte-oriented guardrails here means a git blob (which has
 * no `stat`) goes through exactly the same size, line-count, and minified
 * checks as a working-tree file.
 *
 * `byteSize` lets a caller that already knows the true byte length (git
 * reports it in the `cat-file --batch` header) skip recomputing it; without it
 * the UTF-8 length of `content` is used.
 */
export declare function parseCodeContent(filePath: string, content: string, context: ParserContext, guardrails?: ParseCodeContentGuardrails): Promise<ParseCodeFileResult>;
