/**
 * What OCC can actually do here, right now.
 *
 * `health()` answers a different question and answers it correctly: which
 * features this build was compiled with. Every field it returns is a literal, so
 * a consumer's `if (!health().available)` guard is unreachable — and it has to
 * be, because a build manifest cannot fail.
 *
 * A probe is the runtime half. It touches the filesystem and shells out to git,
 * so it costs more than `health()` and is called deliberately rather than on
 * every startup — but nothing it reports is a compile-time constant, and every
 * field can come back false.
 *
 * It deliberately does **not** build an index. A probe that paid the cold-build
 * cost to tell you whether the cold build would work would be useless as a
 * pre-flight check.
 */
export interface OccProbeGit {
    /** The git binary answered at all. */
    available: boolean;
    version?: string;
    isRepository: boolean;
    /** Absent for an unborn repository — one with no commits yet. */
    head?: string;
    currentBranch?: string;
    /** Grafted history: entities older than the graft point cannot be attributed. */
    shallow: boolean;
    isDirty?: boolean;
}
export interface OccProbeEntityCache {
    /** Where a lineage cache for this repository would live. */
    directory: string;
    /** A cache entry exists and its identity matched this repository and these options. */
    present: boolean;
    /** It exists *and* covers the current head, so a session opens without walking. */
    fresh: boolean;
    indexedHead?: string;
    builtAt?: string;
    commitCount?: number;
    /**
     * The build behind this entry hit a bound.
     *
     * The point of surfacing it here rather than only on a live session: a host
     * can decide to raise bounds before paying for the session that would tell it
     * the same thing.
     */
    truncated?: boolean;
    schemaVersion?: number;
    occVersion?: string;
}
export interface OccProbeGrammarVersion {
    grammar: string;
    /** The tree-sitter parser ABI the vendored wasm was generated with. */
    abiVersion: number;
    /**
     * The grammar's own release version, from the `tree-sitter.json` metadata its
     * author declared at generation time. Absent for grammars generated before
     * that metadata existed — an absence of evidence, not version zero.
     */
    version?: string;
}
export interface OccProbeGrammars {
    /** Grammars that loaded, so their languages parse at the grammar tier. */
    loaded: string[];
    /**
     * Grammars OCC declares a language for but could not load, with the reason.
     *
     * A missing grammar is not an error — the language simply yields no entities —
     * but it is invisible without this, and a consumer seeing no Python entities
     * has no way to tell an empty repository from a broken install.
     */
    failed: {
        grammar: string;
        languages: string[];
        reason: 'missing-asset' | 'load-failed';
    }[];
    /**
     * ABI and upstream-version evidence for each loaded grammar.
     *
     * The vendored wasm files pin bytes, not provenance; this is the only runtime
     * record of how stale a grammar is. ABI also bounds what queries can compile:
     * a grammar below ABI 15 has no supertype tables, so supertype patterns like
     * `(expression)` fail against it with a node-name error.
     */
    versions: OccProbeGrammarVersion[];
}
export interface OccProbeDocumentParserFormat {
    format: 'docx' | 'pdf' | 'xlsx' | 'pptx' | 'odt' | 'ods' | 'odp';
    ready: boolean;
    dependencies: string[];
    failures: {
        module: string;
        message: string;
    }[];
}
export interface OccProbeDocumentParsers {
    /** False means the caller deliberately skipped parser loading. */
    checked: boolean;
    formats: OccProbeDocumentParserFormat[];
}
export interface OccProbe {
    repoRoot: string;
    git: OccProbeGit;
    entityCache: OccProbeEntityCache;
    grammars: OccProbeGrammars;
    documentParsers: OccProbeDocumentParsers;
    /**
     * Everything above that a caller would want to act on, in plain words.
     *
     * Empty means nothing is degraded. Non-empty is not the same as broken: a
     * shallow clone and a cold cache are both normal states that merely bound
     * what the answers can cover.
     */
    problems: string[];
}
export interface ProbeOptions {
    repoRoot?: string;
    /** Matches `CreateEntitySessionOptions.cacheDir`; `false` means no cache is used. */
    cacheDir?: string | false;
    /**
     * Load every vendored tree-sitter grammar to report which ones work. Default
     * true.
     *
     * With `documentParsers`, this is the part of a probe that costs more than a
     * stat, and it is not cheap: all fifteen grammars retain substantial
     * WebAssembly state, and the loader caches them for the life of the process
     * with no unload path. A host that probes one language at startup keeps all
     * of it. Pass `false` to skip the load — `loaded` and `failed` then come back
     * empty, which is an absence of information rather than a clean bill of
     * health.
     */
    grammars?: boolean;
    /**
     * Load document parser modules so native/runtime floors fail at startup
     * instead of on the first inspected file. Default true.
     *
     * Loading is the whole cost: it imports mammoth, pdf-parse, xlsx,
     * officeparser, and JSZip, which stay resident for the life of the process —
     * roughly half a second and 130 MB, dominating the rest of the probe. A host
     * that never inspects a document should pass `false`; `checked` then comes
     * back false, marking the answer as skipped rather than clean.
     */
    documentParsers?: boolean;
    signal?: AbortSignal;
}
export type DocumentParserModuleLoader = (specifier: string) => Promise<unknown>;
/** Load-only readiness check; it never opens or parses a document. */
export declare function probeDocumentParsers(loadModule?: DocumentParserModuleLoader, signal?: AbortSignal): Promise<OccProbeDocumentParsers>;
export declare function probe(options?: ProbeOptions): Promise<OccProbe>;
