import { type CodeDocQuery, type CodeDocResult, type ReadCodeDocsOptions } from '../doc.js';
import { type CodePatternOptions, type CodePatternResult } from '../rules.js';
import { type ReadCodeSourceQuery } from '../source.js';
import type { OnProgress } from '../../progress-event.js';
import type { CodeQuerySession } from '../session.js';
import type { SymbolHashLineageResolution, SymbolKeyQuery, TypeScriptCheckerMode } from '../types.js';
import type { TestRecognitionConfig } from '../tests.js';
import type { CodeFileGuardrails } from '../parsers.js';
import type { OccBlobLineageResultV2, ResolveBlobLineageInput, ResolveBlobLineageOptions } from './blob-lineage.js';
import type { EntityHotspotResult, EntityHotspotRuntimeOptions } from './hotspots.js';
import type { EntityCochangeResult, EntityCochangeRuntimeOptions } from './cochange.js';
import type { EntityDriftResult, EntityDriftRuntimeOptions } from './drift.js';
import type { CaptureEntityAnchorResult, EntityAnchorCaptureHandle, VerifyEntityAnchorsResult, VerifyEntityAnchorsRuntimeOptions } from './anchor-verify.js';
import type { EntityDriftForDocumentsResult, EntityDriftForDocumentsRuntimeOptions } from './document-drift.js';
import type { EntityBounds, LineageThresholds } from './types.js';
import type { OccEntityBlameRuntimeOptions, OccEntityBlameResult, OccEntityContextManyResult, OccEntityContextManyOptions, OccEntityContextRuntimeOptions, OccEntityContextResult, OccEntityDiffRuntimeOptions, OccEntityDiffResult, OccEntityFreshness, OccEntityHistoryRuntimeOptions, OccEntityHistoryResult, OccEntityImpactOptions, OccEntityImpactResult, OccEntityIndexStatus, OccEntityQuery, OccEntityRef, OccEntitySearchOptions, OccEntitySearchResult, OccEntitySourceOptions, OccEntitySourceResult, OccEntityStats } from './api-types.js';
export interface OccEntityIntelligenceSession {
    search(query: string, options?: OccEntitySearchOptions): OccEntityRef[];
    /** Search with measured freshness, index evidence, and result-limit honesty. */
    searchDetailed(query: string, options?: OccEntitySearchOptions): Promise<OccEntitySearchResult>;
    doc(query: CodeDocQuery, options?: ReadCodeDocsOptions): Promise<CodeDocResult>;
    /** Read one symbol body with measured freshness and coverage honesty. */
    source(query: ReadCodeSourceQuery, options?: OccEntitySourceOptions): Promise<OccEntitySourceResult>;
    /** Read-only ast-grep pattern/rule matching over the live code index. */
    pattern(options: CodePatternOptions): Promise<CodePatternResult>;
    hotspots(options?: EntityHotspotRuntimeOptions): Promise<EntityHotspotResult>;
    cochange(query?: OccEntityQuery, options?: EntityCochangeRuntimeOptions): Promise<EntityCochangeResult>;
    drift(options?: EntityDriftRuntimeOptions): Promise<EntityDriftResult>;
    /** Evaluate caller-held Markdown against a supplied commit without reading document bytes from disk. */
    driftForDocuments(options: EntityDriftForDocumentsRuntimeOptions): Promise<EntityDriftForDocumentsResult>;
    /**
     * Capture one entity as a verifiable memory anchor, from one session
     * snapshot — identity, hashes, and the commit pairing all come from the same
     * generation, so a concurrent edit cannot split the tuple. `baseCommit` is
     * present only when capture proved the pairing against the committed head
     * record; a dirty or unindexed state degrades to an expected-only anchor.
     */
    anchor(handle: EntityAnchorCaptureHandle, options?: {
        signal?: AbortSignal;
    }): Promise<CaptureEntityAnchorResult>;
    /** Verify caller-held anchors against lineage evidence and live hashes. OCC stores nothing. */
    verifyAnchors(options: VerifyEntityAnchorsRuntimeOptions): Promise<VerifyEntityAnchorsResult>;
    resolveSuccessor(query: SymbolKeyQuery, expectedBodyHash: string): SymbolHashLineageResolution;
    diff(options: OccEntityDiffRuntimeOptions): Promise<OccEntityDiffResult>;
    resolveBlobLineage(input: ResolveBlobLineageInput, options?: ResolveBlobLineageOptions): Promise<OccBlobLineageResultV2>;
    impact(query: OccEntityQuery, options?: OccEntityImpactOptions): Promise<OccEntityImpactResult>;
    blame(options: OccEntityBlameRuntimeOptions): Promise<OccEntityBlameResult>;
    history(query: OccEntityQuery, options?: OccEntityHistoryRuntimeOptions): Promise<OccEntityHistoryResult>;
    context(query: OccEntityQuery, options?: OccEntityContextRuntimeOptions): Promise<OccEntityContextResult>;
    contextMany(queries: readonly OccEntityQuery[], options?: OccEntityContextManyOptions): Promise<OccEntityContextManyResult>;
    /**
     * Whether the index behind this session is complete.
     *
     * The only way a caller can tell an empty answer that is a fact about the
     * repository from one that is a fact about OCC's bounds.
     */
    status(): OccEntityIndexStatus;
    /**
     * Whether this session still describes the repository in front of it.
     *
     * Cheap by construction so a long-lived host can afford to ask before every
     * request: one `rev-parse` for the head, and an optional stat sweep for the
     * working tree.
     */
    freshness(options?: {
        signal?: AbortSignal;
        workingTree?: boolean;
    }): Promise<OccEntityFreshness>;
    stats(): OccEntityStats;
    refresh(options?: {
        signal?: AbortSignal;
        onProgress?: OnProgress;
    }): Promise<void>;
    /**
     * Apply an authoritative working-tree changed-file list without probing HEAD
     * or sweeping the full manifest. Use `refresh()` after history moves.
     */
    update(changedFiles: readonly string[], options?: {
        signal?: AbortSignal;
        onProgress?: OnProgress;
    }): Promise<void>;
    dispose(): Promise<void> | void;
}
export interface CreateEntitySessionOptions {
    repoRoot: string;
    /** Where the lineage cache lives; `false` keeps it in memory only. */
    cacheDir?: string | false;
    excludeDir?: string[];
    bounds?: EntityBounds;
    thresholds?: LineageThresholds;
    guardrails?: CodeFileGuardrails;
    tests?: TestRecognitionConfig;
    tokenizer?: string;
    /** TypeScript semantic-resolution policy. Defaults to `preferred`. */
    typescriptChecker?: TypeScriptCheckerMode;
    /** Include data-format entities (JSON, YAML, TOML, CSV, Markdown). Default true. */
    formats?: boolean;
    head?: string;
    /** Cancels construction only; operation methods take their own signals. */
    signal?: AbortSignal;
    /**
     * Phase events for the code index build and the commit walk.
     *
     * Construction is the expensive part of this API — queries against a built
     * index are effectively instant — so a host that cannot show what it is
     * waiting on has no way to distinguish slow from hung.
     */
    onProgress?: OnProgress;
    /** Reuse an index that has already been built rather than building another. */
    codeSession?: CodeQuerySession;
}
export declare function createEntitySession(options: CreateEntitySessionOptions): Promise<OccEntityIntelligenceSession>;
