import { z } from 'zod';
/** Cache format version. A bump rebuilds persisted evidence, not lineage ids. */
export declare const ENTITY_CACHE_SCHEMA_VERSION = 4;
/**
 * Lineage ids are a public durable identity, independent from the replaceable
 * cache encoding. Cache V4 rebuilds parser/template evidence without renaming the same
 * observed births.
 */
export declare const ENTITY_LINEAGE_ID_VERSION = 1;
/** A code entity as it exists at one revision. */
/**
 * What an entity can be: a code symbol, or a data-format node.
 *
 * One union rather than two parallel record types, because lineage, diff,
 * blame, and history are identical for both — only the extraction differs.
 */
/**
 * Test blocks, which are entities but not declarations.
 *
 * In the dominant JS/TS style a test body is an anonymous callback passed to
 * `it(...)`, so it has no declared name and no `NormalizedSymbolKind` fits it.
 * Without a kind of its own, everything it calls attributes to the module and
 * reverse traversal cannot reach the test at all.
 */
export declare const EntityTestKindSchema: z.ZodEnum<{
    test: "test";
    test_suite: "test_suite";
}>;
export type EntityTestKind = z.infer<typeof EntityTestKindSchema>;
export declare const EntityKindSchema: z.ZodUnion<readonly [z.ZodEnum<{
    function: "function";
    file: "file";
    enum: "enum";
    type: "type";
    module: "module";
    class: "class";
    interface: "interface";
    variable: "variable";
    parameter: "parameter";
    method: "method";
    other: "other";
}>, z.ZodEnum<{
    object: "object";
    array: "array";
    "array-item": "array-item";
    property: "property";
    section: "section";
    table: "table";
    "array-table": "array-table";
    heading: "heading";
    row: "row";
    document: "document";
}>, z.ZodEnum<{
    test: "test";
    test_suite: "test_suite";
}>]>;
export type EntityKind = z.infer<typeof EntityKindSchema>;
export declare const EntitySourceSpanV2Schema: z.ZodObject<{
    version: z.ZodLiteral<2>;
    encoding: z.ZodLiteral<"utf8">;
    startLine: z.ZodNumber;
    startColumn: z.ZodNumber;
    endLine: z.ZodNumber;
    endColumn: z.ZodNumber;
    startByte: z.ZodNumber;
    endByte: z.ZodNumber;
    exact: z.ZodLiteral<true>;
}, z.core.$strip>;
export type EntitySourceSpanV2 = z.infer<typeof EntitySourceSpanV2Schema>;
export declare const EntitySyntaxEvidenceV2Schema: z.ZodObject<{
    version: z.ZodLiteral<2>;
    proof: z.ZodLiteral<"entity-cst-v2">;
    grammar: z.ZodString;
    grammarDigest: z.ZodString;
    manifestDigest: z.ZodString;
    primaryHash: z.ZodString;
    commentsElidedHash: z.ZodString;
    complete: z.ZodLiteral<true>;
}, z.core.$strip>;
export type EntitySyntaxEvidenceV2 = z.infer<typeof EntitySyntaxEvidenceV2Schema>;
export declare const EntitySignatureEvidenceV2Schema: z.ZodObject<{
    version: z.ZodLiteral<2>;
    proof: z.ZodLiteral<"entity-signature-cst-v2">;
    grammar: z.ZodString;
    grammarDigest: z.ZodString;
    manifestDigest: z.ZodString;
    hash: z.ZodString;
    complete: z.ZodLiteral<true>;
}, z.core.$strip>;
export type EntitySignatureEvidenceV2 = z.infer<typeof EntitySignatureEvidenceV2Schema>;
export declare const EntityRecordSchema: z.ZodObject<{
    name: z.ZodString;
    qualifiedName: z.ZodString;
    containerName: z.ZodOptional<z.ZodString>;
    kind: z.ZodUnion<readonly [z.ZodEnum<{
        function: "function";
        file: "file";
        enum: "enum";
        type: "type";
        module: "module";
        class: "class";
        interface: "interface";
        variable: "variable";
        parameter: "parameter";
        method: "method";
        other: "other";
    }>, z.ZodEnum<{
        object: "object";
        array: "array";
        "array-item": "array-item";
        property: "property";
        section: "section";
        table: "table";
        "array-table": "array-table";
        heading: "heading";
        row: "row";
        document: "document";
    }>, z.ZodEnum<{
        test: "test";
        test_suite: "test_suite";
    }>]>;
    relativePath: z.ZodString;
    startLine: z.ZodNumber;
    endLine: z.ZodNumber;
    signature: z.ZodOptional<z.ZodString>;
    isExported: z.ZodBoolean;
    ordinal: z.ZodNumber;
    declarationIndex: z.ZodNumber;
    spanExact: z.ZodBoolean;
    sourceSpan: z.ZodOptional<z.ZodObject<{
        version: z.ZodLiteral<2>;
        encoding: z.ZodLiteral<"utf8">;
        startLine: z.ZodNumber;
        startColumn: z.ZodNumber;
        endLine: z.ZodNumber;
        endColumn: z.ZodNumber;
        startByte: z.ZodNumber;
        endByte: z.ZodNumber;
        exact: z.ZodLiteral<true>;
    }, z.core.$strip>>;
    syntaxEvidence: z.ZodOptional<z.ZodObject<{
        version: z.ZodLiteral<2>;
        proof: z.ZodLiteral<"entity-cst-v2">;
        grammar: z.ZodString;
        grammarDigest: z.ZodString;
        manifestDigest: z.ZodString;
        primaryHash: z.ZodString;
        commentsElidedHash: z.ZodString;
        complete: z.ZodLiteral<true>;
    }, z.core.$strip>>;
    signatureEvidence: z.ZodOptional<z.ZodObject<{
        version: z.ZodLiteral<2>;
        proof: z.ZodLiteral<"entity-signature-cst-v2">;
        grammar: z.ZodString;
        grammarDigest: z.ZodString;
        manifestDigest: z.ZodString;
        hash: z.ZodString;
        complete: z.ZodLiteral<true>;
    }, z.core.$strip>>;
    hashes: z.ZodObject<{
        hashVersion: z.ZodNumber;
        algo: z.ZodEnum<{
            none: "none";
            lexer: "lexer";
            declaration: "declaration";
        }>;
        bodyHash: z.ZodString;
        exactBodyHash: z.ZodOptional<z.ZodString>;
        normalizedHash: z.ZodOptional<z.ZodString>;
        structuralHash: z.ZodOptional<z.ZodString>;
        signatureHash: z.ZodOptional<z.ZodString>;
        tokenCount: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>;
}, z.core.$strip>;
export type EntityRecord = z.infer<typeof EntityRecordSchema>;
/** Entities extracted from one blob, keyed in the cache by that blob's object id. */
export declare const BlobEntitiesSchema: z.ZodObject<{
    blobSha: z.ZodString;
    relativePath: z.ZodString;
    language: z.ZodString;
    hashVersion: z.ZodNumber;
    entities: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        qualifiedName: z.ZodString;
        containerName: z.ZodOptional<z.ZodString>;
        kind: z.ZodUnion<readonly [z.ZodEnum<{
            function: "function";
            file: "file";
            enum: "enum";
            type: "type";
            module: "module";
            class: "class";
            interface: "interface";
            variable: "variable";
            parameter: "parameter";
            method: "method";
            other: "other";
        }>, z.ZodEnum<{
            object: "object";
            array: "array";
            "array-item": "array-item";
            property: "property";
            section: "section";
            table: "table";
            "array-table": "array-table";
            heading: "heading";
            row: "row";
            document: "document";
        }>, z.ZodEnum<{
            test: "test";
            test_suite: "test_suite";
        }>]>;
        relativePath: z.ZodString;
        startLine: z.ZodNumber;
        endLine: z.ZodNumber;
        signature: z.ZodOptional<z.ZodString>;
        isExported: z.ZodBoolean;
        ordinal: z.ZodNumber;
        declarationIndex: z.ZodNumber;
        spanExact: z.ZodBoolean;
        sourceSpan: z.ZodOptional<z.ZodObject<{
            version: z.ZodLiteral<2>;
            encoding: z.ZodLiteral<"utf8">;
            startLine: z.ZodNumber;
            startColumn: z.ZodNumber;
            endLine: z.ZodNumber;
            endColumn: z.ZodNumber;
            startByte: z.ZodNumber;
            endByte: z.ZodNumber;
            exact: z.ZodLiteral<true>;
        }, z.core.$strip>>;
        syntaxEvidence: z.ZodOptional<z.ZodObject<{
            version: z.ZodLiteral<2>;
            proof: z.ZodLiteral<"entity-cst-v2">;
            grammar: z.ZodString;
            grammarDigest: z.ZodString;
            manifestDigest: z.ZodString;
            primaryHash: z.ZodString;
            commentsElidedHash: z.ZodString;
            complete: z.ZodLiteral<true>;
        }, z.core.$strip>>;
        signatureEvidence: z.ZodOptional<z.ZodObject<{
            version: z.ZodLiteral<2>;
            proof: z.ZodLiteral<"entity-signature-cst-v2">;
            grammar: z.ZodString;
            grammarDigest: z.ZodString;
            manifestDigest: z.ZodString;
            hash: z.ZodString;
            complete: z.ZodLiteral<true>;
        }, z.core.$strip>>;
        hashes: z.ZodObject<{
            hashVersion: z.ZodNumber;
            algo: z.ZodEnum<{
                none: "none";
                lexer: "lexer";
                declaration: "declaration";
            }>;
            bodyHash: z.ZodString;
            exactBodyHash: z.ZodOptional<z.ZodString>;
            normalizedHash: z.ZodOptional<z.ZodString>;
            structuralHash: z.ZodOptional<z.ZodString>;
            signatureHash: z.ZodOptional<z.ZodString>;
            tokenCount: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>;
    }, z.core.$strip>>;
    truncated: z.ZodBoolean;
    skippedReason: z.ZodOptional<z.ZodString>;
    provenance: z.ZodOptional<z.ZodObject<{
        parserName: z.ZodLiteral<"occ.code.parsers">;
        parserVersion: z.ZodNumber;
        parserTier: z.ZodEnum<{
            format: "format";
            "typescript-compiler": "typescript-compiler";
            "vue-sfc-typescript": "vue-sfc-typescript";
            "tree-sitter": "tree-sitter";
            "regex-fallback": "regex-fallback";
        }>;
        grammar: z.ZodOptional<z.ZodString>;
        syntaxStatus: z.ZodEnum<{
            valid: "valid";
            recovered: "recovered";
            unchecked: "unchecked";
        }>;
        syntaxErrorCount: z.ZodNumber;
        capabilities: z.ZodObject<{
            definitions: z.ZodEnum<{
                full: "full";
                partial: "partial";
                unavailable: "unavailable";
            }>;
            imports: z.ZodEnum<{
                full: "full";
                partial: "partial";
                unavailable: "unavailable";
            }>;
            calls: z.ZodEnum<{
                full: "full";
                partial: "partial";
                unavailable: "unavailable";
            }>;
            inheritance: z.ZodEnum<{
                full: "full";
                partial: "partial";
                unavailable: "unavailable";
            }>;
            exports: z.ZodEnum<{
                full: "full";
                partial: "partial";
                unavailable: "unavailable";
            }>;
            exactSpans: z.ZodEnum<{
                full: "full";
                partial: "partial";
                unavailable: "unavailable";
            }>;
            templateUses: z.ZodOptional<z.ZodEnum<{
                full: "full";
                partial: "partial";
                unavailable: "unavailable";
            }>>;
        }, z.core.$strip>;
        diagnostics: z.ZodArray<z.ZodObject<{
            message: z.ZodString;
            severity: z.ZodEnum<{
                error: "error";
                warning: "warning";
            }>;
            line: z.ZodOptional<z.ZodNumber>;
            column: z.ZodOptional<z.ZodNumber>;
            code: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
            source: z.ZodOptional<z.ZodString>;
            reason: z.ZodOptional<z.ZodEnum<{
                "checker-unavailable": "checker-unavailable";
                "dynamic-dispatch-refused": "dynamic-dispatch-refused";
                "parse-failed": "parse-failed";
                "resolver-join-miss": "resolver-join-miss";
                "vue-script-absent": "vue-script-absent";
                "vue-template-not-parsed": "vue-template-not-parsed";
                "vue-template-dynamic-component": "vue-template-dynamic-component";
                "vue-template-component-unresolved": "vue-template-component-unresolved";
                "vue-template-component-ambiguous": "vue-template-component-ambiguous";
                "vue-template-identifier-unresolved": "vue-template-identifier-unresolved";
                "vue-template-identifier-ambiguous": "vue-template-identifier-ambiguous";
                "vue-template-expression-parse-failed": "vue-template-expression-parse-failed";
                "vue-template-scope-unsupported": "vue-template-scope-unsupported";
                "vue-template-construct-unsupported": "vue-template-construct-unsupported";
            }>>;
            counts: z.ZodOptional<z.ZodObject<{
                hits: z.ZodNumber;
                misses: z.ZodNumber;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type BlobEntities = z.infer<typeof BlobEntitiesSchema>;
/**
 * Why the matcher believes two entities are the same entity. Ordered strongest
 * to weakest; the ladder in `lineage.ts` tries them in exactly this order and
 * stops at the first mutually unique result.
 */
export declare const LineageMatchReasonSchema: z.ZodEnum<{
    none: "none";
    similarity: "similarity";
    "exact-identity": "exact-identity";
    "git-rename-identity": "git-rename-identity";
    "content-hash": "content-hash";
    "normalized-hash": "normalized-hash";
    "structural-hash": "structural-hash";
    "signature-name": "signature-name";
    "qualified-name": "qualified-name";
}>;
export type LineageMatchReason = z.infer<typeof LineageMatchReasonSchema>;
/** Which candidate pool produced a match. */
export declare const LineagePoolSchema: z.ZodEnum<{
    none: "none";
    "same-path": "same-path";
    "git-rename": "git-rename";
    "cross-file": "cross-file";
}>;
export type LineagePool = z.infer<typeof LineagePoolSchema>;
/**
 * Persisted and current entity change kinds. `modified_cosmetic` is retained
 * only to decode historical evidence; current producers fail uncertain drift
 * closed as `modified` and never newly emit that arm.
 */
export declare const EntityChangeTypeSchema: z.ZodEnum<{
    added: "added";
    modified: "modified";
    deleted: "deleted";
    renamed: "renamed";
    modified_logic: "modified_logic";
    modified_cosmetic: "modified_cosmetic";
    moved: "moved";
    reordered: "reordered";
    orphan: "orphan";
}>;
export type EntityChangeType = z.infer<typeof EntityChangeTypeSchema>;
/**
 * Secondary facts, preserved so a classification never discards what a
 * lower-precedence rule would have reported. A rename that also changed logic
 * is `renamed` with `logicChanged: true`, not one fact at the expense of the
 * other.
 */
export declare const EntityChangeFlagsSchema: z.ZodObject<{
    pathChanged: z.ZodOptional<z.ZodBoolean>;
    nameChanged: z.ZodOptional<z.ZodBoolean>;
    containerChanged: z.ZodOptional<z.ZodBoolean>;
    kindChanged: z.ZodOptional<z.ZodBoolean>;
    bodyChanged: z.ZodOptional<z.ZodBoolean>;
    logicChanged: z.ZodOptional<z.ZodBoolean>;
    cosmeticOnly: z.ZodOptional<z.ZodBoolean>;
    orderChanged: z.ZodOptional<z.ZodBoolean>;
    signatureChanged: z.ZodOptional<z.ZodBoolean>;
    signatureEvidenceUnavailable: z.ZodOptional<z.ZodBoolean>;
    exportChanged: z.ZodOptional<z.ZodBoolean>;
    spanInexact: z.ZodOptional<z.ZodBoolean>;
    gitRenameApplied: z.ZodOptional<z.ZodBoolean>;
    ambiguityRefused: z.ZodOptional<z.ZodBoolean>;
    evidenceUnavailable: z.ZodOptional<z.ZodBoolean>;
    boundHit: z.ZodOptional<z.ZodBoolean>;
    birthAtWindowBoundary: z.ZodOptional<z.ZodBoolean>;
    semanticBasis: z.ZodOptional<z.ZodEnum<{
        "nontrivia-syntax-change": "nontrivia-syntax-change";
        "whitespace-significance-unverified": "whitespace-significance-unverified";
        "comment-only-change": "comment-only-change";
        "syntax-evidence-unavailable": "syntax-evidence-unavailable";
        "grammar-verification-refused": "grammar-verification-refused";
    }>>;
}, z.core.$strip>;
export type EntityChangeFlags = z.infer<typeof EntityChangeFlagsSchema>;
export declare const LineageEvidenceSchema: z.ZodObject<{
    pool: z.ZodEnum<{
        none: "none";
        "same-path": "same-path";
        "git-rename": "git-rename";
        "cross-file": "cross-file";
    }>;
    hashesComparable: z.ZodBoolean;
    bodyHashEqual: z.ZodOptional<z.ZodBoolean>;
    exactBodyHashEqual: z.ZodOptional<z.ZodBoolean>;
    normalizedHashEqual: z.ZodOptional<z.ZodBoolean>;
    structuralHashEqual: z.ZodOptional<z.ZodBoolean>;
    signatureHashEqual: z.ZodOptional<z.ZodBoolean>;
    signatureEvidenceEqual: z.ZodOptional<z.ZodBoolean>;
    similarity: z.ZodOptional<z.ZodNumber>;
    runnerUpSimilarity: z.ZodOptional<z.ZodNumber>;
    reverseRunnerUpSimilarity: z.ZodOptional<z.ZodNumber>;
    tiebreakSimilarity: z.ZodOptional<z.ZodNumber>;
    candidateCount: z.ZodNumber;
    gitRenameSimilarity: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type LineageEvidence = z.infer<typeof LineageEvidenceSchema>;
/** One step in an entity's life, recorded per commit. */
export declare const LineageEventSchema: z.ZodObject<{
    lineageId: z.ZodString;
    commit: z.ZodString;
    commitOrder: z.ZodNumber;
    authoredAt: z.ZodString;
    committedAt: z.ZodString;
    authorName: z.ZodString;
    authorEmail: z.ZodString;
    subject: z.ZodString;
    changeType: z.ZodEnum<{
        added: "added";
        modified: "modified";
        deleted: "deleted";
        renamed: "renamed";
        modified_logic: "modified_logic";
        modified_cosmetic: "modified_cosmetic";
        moved: "moved";
        reordered: "reordered";
        orphan: "orphan";
    }>;
    matchReason: z.ZodEnum<{
        none: "none";
        similarity: "similarity";
        "exact-identity": "exact-identity";
        "git-rename-identity": "git-rename-identity";
        "content-hash": "content-hash";
        "normalized-hash": "normalized-hash";
        "structural-hash": "structural-hash";
        "signature-name": "signature-name";
        "qualified-name": "qualified-name";
    }>;
    confidence: z.ZodNumber;
    previousName: z.ZodOptional<z.ZodString>;
    currentName: z.ZodOptional<z.ZodString>;
    previousQualifiedName: z.ZodOptional<z.ZodString>;
    currentQualifiedName: z.ZodOptional<z.ZodString>;
    previousContainerName: z.ZodOptional<z.ZodString>;
    currentContainerName: z.ZodOptional<z.ZodString>;
    previousPath: z.ZodOptional<z.ZodString>;
    currentPath: z.ZodOptional<z.ZodString>;
    previousKind: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
        function: "function";
        file: "file";
        enum: "enum";
        type: "type";
        module: "module";
        class: "class";
        interface: "interface";
        variable: "variable";
        parameter: "parameter";
        method: "method";
        other: "other";
    }>, z.ZodEnum<{
        object: "object";
        array: "array";
        "array-item": "array-item";
        property: "property";
        section: "section";
        table: "table";
        "array-table": "array-table";
        heading: "heading";
        row: "row";
        document: "document";
    }>, z.ZodEnum<{
        test: "test";
        test_suite: "test_suite";
    }>]>>;
    currentKind: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
        function: "function";
        file: "file";
        enum: "enum";
        type: "type";
        module: "module";
        class: "class";
        interface: "interface";
        variable: "variable";
        parameter: "parameter";
        method: "method";
        other: "other";
    }>, z.ZodEnum<{
        object: "object";
        array: "array";
        "array-item": "array-item";
        property: "property";
        section: "section";
        table: "table";
        "array-table": "array-table";
        heading: "heading";
        row: "row";
        document: "document";
    }>, z.ZodEnum<{
        test: "test";
        test_suite: "test_suite";
    }>]>>;
    previousStartLine: z.ZodOptional<z.ZodNumber>;
    currentStartLine: z.ZodOptional<z.ZodNumber>;
    previousEndLine: z.ZodOptional<z.ZodNumber>;
    currentEndLine: z.ZodOptional<z.ZodNumber>;
    previousSignature: z.ZodOptional<z.ZodString>;
    currentSignature: z.ZodOptional<z.ZodString>;
    previousOrdinal: z.ZodOptional<z.ZodNumber>;
    currentOrdinal: z.ZodOptional<z.ZodNumber>;
    previousIsExported: z.ZodOptional<z.ZodBoolean>;
    currentIsExported: z.ZodOptional<z.ZodBoolean>;
    previousBodyHash: z.ZodOptional<z.ZodString>;
    currentBodyHash: z.ZodOptional<z.ZodString>;
    previousExactBodyHash: z.ZodOptional<z.ZodString>;
    currentExactBodyHash: z.ZodOptional<z.ZodString>;
    previousStructuralHash: z.ZodOptional<z.ZodString>;
    currentStructuralHash: z.ZodOptional<z.ZodString>;
    previousSourceSpan: z.ZodOptional<z.ZodObject<{
        version: z.ZodLiteral<2>;
        encoding: z.ZodLiteral<"utf8">;
        startLine: z.ZodNumber;
        startColumn: z.ZodNumber;
        endLine: z.ZodNumber;
        endColumn: z.ZodNumber;
        startByte: z.ZodNumber;
        endByte: z.ZodNumber;
        exact: z.ZodLiteral<true>;
    }, z.core.$strip>>;
    currentSourceSpan: z.ZodOptional<z.ZodObject<{
        version: z.ZodLiteral<2>;
        encoding: z.ZodLiteral<"utf8">;
        startLine: z.ZodNumber;
        startColumn: z.ZodNumber;
        endLine: z.ZodNumber;
        endColumn: z.ZodNumber;
        startByte: z.ZodNumber;
        endByte: z.ZodNumber;
        exact: z.ZodLiteral<true>;
    }, z.core.$strip>>;
    previousSyntaxEvidence: z.ZodOptional<z.ZodObject<{
        version: z.ZodLiteral<2>;
        proof: z.ZodLiteral<"entity-cst-v2">;
        grammar: z.ZodString;
        grammarDigest: z.ZodString;
        manifestDigest: z.ZodString;
        primaryHash: z.ZodString;
        commentsElidedHash: z.ZodString;
        complete: z.ZodLiteral<true>;
    }, z.core.$strip>>;
    currentSyntaxEvidence: z.ZodOptional<z.ZodObject<{
        version: z.ZodLiteral<2>;
        proof: z.ZodLiteral<"entity-cst-v2">;
        grammar: z.ZodString;
        grammarDigest: z.ZodString;
        manifestDigest: z.ZodString;
        primaryHash: z.ZodString;
        commentsElidedHash: z.ZodString;
        complete: z.ZodLiteral<true>;
    }, z.core.$strip>>;
    previousSignatureEvidence: z.ZodOptional<z.ZodObject<{
        version: z.ZodLiteral<2>;
        proof: z.ZodLiteral<"entity-signature-cst-v2">;
        grammar: z.ZodString;
        grammarDigest: z.ZodString;
        manifestDigest: z.ZodString;
        hash: z.ZodString;
        complete: z.ZodLiteral<true>;
    }, z.core.$strip>>;
    currentSignatureEvidence: z.ZodOptional<z.ZodObject<{
        version: z.ZodLiteral<2>;
        proof: z.ZodLiteral<"entity-signature-cst-v2">;
        grammar: z.ZodString;
        grammarDigest: z.ZodString;
        manifestDigest: z.ZodString;
        hash: z.ZodString;
        complete: z.ZodLiteral<true>;
    }, z.core.$strip>>;
    evidence: z.ZodObject<{
        pool: z.ZodEnum<{
            none: "none";
            "same-path": "same-path";
            "git-rename": "git-rename";
            "cross-file": "cross-file";
        }>;
        hashesComparable: z.ZodBoolean;
        bodyHashEqual: z.ZodOptional<z.ZodBoolean>;
        exactBodyHashEqual: z.ZodOptional<z.ZodBoolean>;
        normalizedHashEqual: z.ZodOptional<z.ZodBoolean>;
        structuralHashEqual: z.ZodOptional<z.ZodBoolean>;
        signatureHashEqual: z.ZodOptional<z.ZodBoolean>;
        signatureEvidenceEqual: z.ZodOptional<z.ZodBoolean>;
        similarity: z.ZodOptional<z.ZodNumber>;
        runnerUpSimilarity: z.ZodOptional<z.ZodNumber>;
        reverseRunnerUpSimilarity: z.ZodOptional<z.ZodNumber>;
        tiebreakSimilarity: z.ZodOptional<z.ZodNumber>;
        candidateCount: z.ZodNumber;
        gitRenameSimilarity: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>;
    flags: z.ZodObject<{
        pathChanged: z.ZodOptional<z.ZodBoolean>;
        nameChanged: z.ZodOptional<z.ZodBoolean>;
        containerChanged: z.ZodOptional<z.ZodBoolean>;
        kindChanged: z.ZodOptional<z.ZodBoolean>;
        bodyChanged: z.ZodOptional<z.ZodBoolean>;
        logicChanged: z.ZodOptional<z.ZodBoolean>;
        cosmeticOnly: z.ZodOptional<z.ZodBoolean>;
        orderChanged: z.ZodOptional<z.ZodBoolean>;
        signatureChanged: z.ZodOptional<z.ZodBoolean>;
        signatureEvidenceUnavailable: z.ZodOptional<z.ZodBoolean>;
        exportChanged: z.ZodOptional<z.ZodBoolean>;
        spanInexact: z.ZodOptional<z.ZodBoolean>;
        gitRenameApplied: z.ZodOptional<z.ZodBoolean>;
        ambiguityRefused: z.ZodOptional<z.ZodBoolean>;
        evidenceUnavailable: z.ZodOptional<z.ZodBoolean>;
        boundHit: z.ZodOptional<z.ZodBoolean>;
        birthAtWindowBoundary: z.ZodOptional<z.ZodBoolean>;
        semanticBasis: z.ZodOptional<z.ZodEnum<{
            "nontrivia-syntax-change": "nontrivia-syntax-change";
            "whitespace-significance-unverified": "whitespace-significance-unverified";
            "comment-only-change": "comment-only-change";
            "syntax-evidence-unavailable": "syntax-evidence-unavailable";
            "grammar-verification-refused": "grammar-verification-refused";
        }>>;
    }, z.core.$strip>;
}, z.core.$strip>;
export type LineageEvent = z.infer<typeof LineageEventSchema>;
/** The live state of one lineage: where it is now and what it looks like. */
export declare const LineageHeadSchema: z.ZodObject<{
    lineageId: z.ZodString;
    record: z.ZodObject<{
        name: z.ZodString;
        qualifiedName: z.ZodString;
        containerName: z.ZodOptional<z.ZodString>;
        kind: z.ZodUnion<readonly [z.ZodEnum<{
            function: "function";
            file: "file";
            enum: "enum";
            type: "type";
            module: "module";
            class: "class";
            interface: "interface";
            variable: "variable";
            parameter: "parameter";
            method: "method";
            other: "other";
        }>, z.ZodEnum<{
            object: "object";
            array: "array";
            "array-item": "array-item";
            property: "property";
            section: "section";
            table: "table";
            "array-table": "array-table";
            heading: "heading";
            row: "row";
            document: "document";
        }>, z.ZodEnum<{
            test: "test";
            test_suite: "test_suite";
        }>]>;
        relativePath: z.ZodString;
        startLine: z.ZodNumber;
        endLine: z.ZodNumber;
        signature: z.ZodOptional<z.ZodString>;
        isExported: z.ZodBoolean;
        ordinal: z.ZodNumber;
        declarationIndex: z.ZodNumber;
        spanExact: z.ZodBoolean;
        sourceSpan: z.ZodOptional<z.ZodObject<{
            version: z.ZodLiteral<2>;
            encoding: z.ZodLiteral<"utf8">;
            startLine: z.ZodNumber;
            startColumn: z.ZodNumber;
            endLine: z.ZodNumber;
            endColumn: z.ZodNumber;
            startByte: z.ZodNumber;
            endByte: z.ZodNumber;
            exact: z.ZodLiteral<true>;
        }, z.core.$strip>>;
        syntaxEvidence: z.ZodOptional<z.ZodObject<{
            version: z.ZodLiteral<2>;
            proof: z.ZodLiteral<"entity-cst-v2">;
            grammar: z.ZodString;
            grammarDigest: z.ZodString;
            manifestDigest: z.ZodString;
            primaryHash: z.ZodString;
            commentsElidedHash: z.ZodString;
            complete: z.ZodLiteral<true>;
        }, z.core.$strip>>;
        signatureEvidence: z.ZodOptional<z.ZodObject<{
            version: z.ZodLiteral<2>;
            proof: z.ZodLiteral<"entity-signature-cst-v2">;
            grammar: z.ZodString;
            grammarDigest: z.ZodString;
            manifestDigest: z.ZodString;
            hash: z.ZodString;
            complete: z.ZodLiteral<true>;
        }, z.core.$strip>>;
        hashes: z.ZodObject<{
            hashVersion: z.ZodNumber;
            algo: z.ZodEnum<{
                none: "none";
                lexer: "lexer";
                declaration: "declaration";
            }>;
            bodyHash: z.ZodString;
            exactBodyHash: z.ZodOptional<z.ZodString>;
            normalizedHash: z.ZodOptional<z.ZodString>;
            structuralHash: z.ZodOptional<z.ZodString>;
            signatureHash: z.ZodOptional<z.ZodString>;
            tokenCount: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>;
    }, z.core.$strip>;
    birthCommit: z.ZodString;
    birthPath: z.ZodString;
    birthQualifiedName: z.ZodString;
    lastCommit: z.ZodString;
    lastCommitOrder: z.ZodNumber;
    eventCount: z.ZodNumber;
    birthAtWindowBoundary: z.ZodBoolean;
}, z.core.$strip>;
export type LineageHead = z.infer<typeof LineageHeadSchema>;
export declare const EntityDiagnosticCodeSchema: z.ZodEnum<{
    "inline-context-stale": "inline-context-stale";
    "parse-failed": "parse-failed";
    "grammar-verification-refused": "grammar-verification-refused";
    "commit-window-truncated": "commit-window-truncated";
    "commit-files-truncated": "commit-files-truncated";
    "blob-missing": "blob-missing";
    "blob-too-large": "blob-too-large";
    "blob-too-many-lines": "blob-too-many-lines";
    "blob-binary": "blob-binary";
    "blob-unsupported": "blob-unsupported";
    "blob-budget-exhausted": "blob-budget-exhausted";
    "entities-truncated": "entities-truncated";
    "entity-budget-exhausted": "entity-budget-exhausted";
    "event-budget-exhausted": "event-budget-exhausted";
    "cross-file-skipped": "cross-file-skipped";
    "similarity-skipped": "similarity-skipped";
    "ambiguity-refused": "ambiguity-refused";
    "lineage-accept-declined": "lineage-accept-declined";
    "evidence-unavailable": "evidence-unavailable";
    "shallow-history": "shallow-history";
    "unborn-repo": "unborn-repo";
    "merge-side-changes-skipped": "merge-side-changes-skipped";
    "index-unmerged": "index-unmerged";
    "index-visibility-hidden": "index-visibility-hidden";
    "cache-rebuilt": "cache-rebuilt";
    "cache-rewound": "cache-rewound";
    "history-rewritten": "history-rewritten";
}>;
export type EntityDiagnosticCode = z.infer<typeof EntityDiagnosticCodeSchema>;
export declare const EntityDiagnosticSchema: z.ZodObject<{
    code: z.ZodEnum<{
        "inline-context-stale": "inline-context-stale";
        "parse-failed": "parse-failed";
        "grammar-verification-refused": "grammar-verification-refused";
        "commit-window-truncated": "commit-window-truncated";
        "commit-files-truncated": "commit-files-truncated";
        "blob-missing": "blob-missing";
        "blob-too-large": "blob-too-large";
        "blob-too-many-lines": "blob-too-many-lines";
        "blob-binary": "blob-binary";
        "blob-unsupported": "blob-unsupported";
        "blob-budget-exhausted": "blob-budget-exhausted";
        "entities-truncated": "entities-truncated";
        "entity-budget-exhausted": "entity-budget-exhausted";
        "event-budget-exhausted": "event-budget-exhausted";
        "cross-file-skipped": "cross-file-skipped";
        "similarity-skipped": "similarity-skipped";
        "ambiguity-refused": "ambiguity-refused";
        "lineage-accept-declined": "lineage-accept-declined";
        "evidence-unavailable": "evidence-unavailable";
        "shallow-history": "shallow-history";
        "unborn-repo": "unborn-repo";
        "merge-side-changes-skipped": "merge-side-changes-skipped";
        "index-unmerged": "index-unmerged";
        "index-visibility-hidden": "index-visibility-hidden";
        "cache-rebuilt": "cache-rebuilt";
        "cache-rewound": "cache-rewound";
        "history-rewritten": "history-rewritten";
    }>;
    message: z.ZodString;
    commit: z.ZodOptional<z.ZodString>;
    relativePath: z.ZodOptional<z.ZodString>;
    blobSha: z.ZodOptional<z.ZodString>;
    grammar: z.ZodOptional<z.ZodString>;
    rung: z.ZodOptional<z.ZodEnum<{
        none: "none";
        similarity: "similarity";
        "exact-identity": "exact-identity";
        "git-rename-identity": "git-rename-identity";
        "content-hash": "content-hash";
        "normalized-hash": "normalized-hash";
        "structural-hash": "structural-hash";
        "signature-name": "signature-name";
        "qualified-name": "qualified-name";
    }>>;
    kept: z.ZodOptional<z.ZodNumber>;
    total: z.ZodOptional<z.ZodNumber>;
    limit: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type EntityDiagnostic = z.infer<typeof EntityDiagnosticSchema>;
/**
 * Whether a change altered structure, or `null` when that is not knowable.
 *
 * `null` is a real answer rather than a missing one: without complete,
 * compatible CST evidence OCC cannot distinguish unsupported drift from a
 * proved structural change, and reporting `false` would assert a semantic
 * no-op it has no evidence for.
 */
export declare function structuralChangeFrom(flags: EntityChangeFlags): boolean | null;
/**
 * Change kinds relevant to conservative attribution. An unproved `modified`
 * event is retained; only explicit historical cosmetic evidence and pure
 * reorderings are skipped.
 */
export declare const SEMANTIC_CHANGE_TYPES: ReadonlySet<EntityChangeType>;
/**
 * Every bound is enforced, and every bound that fires emits a diagnostic and
 * forces affected entities to `orphan` rather than `added` — a truncation must
 * never be able to look like a real code event.
 */
export interface EntityBounds {
    maxCommits: number;
    maxFilesPerCommit: number;
    maxBlobBytes: number;
    maxBlobLines: number;
    maxTotalBlobBytes: number;
    maxBatchBytes: number;
    maxEntitiesPerFile: number;
    maxEntitiesTotal: number;
    maxLiveEntities: number;
    maxLineageEvents: number;
    maxCrossFileCandidates: number;
    maxSimilarityCandidates: number;
}
export declare const DEFAULT_ENTITY_BOUNDS: EntityBounds;
/**
 * Acceptance thresholds for the similarity rung. Every number is a documented
 * gate rather than a tuned magic constant:
 *
 * - `similarityMin` 0.75 — below ~0.70 unrelated functions of the same shape
 *   family start colliding; above ~0.85 a genuine refactor is missed.
 * - `similarityMargin` 0.10 — overload families cluster within ~0.05 of each
 *   other, so a smaller gap cannot separate "one obvious successor" from "a
 *   family of siblings".
 * - `similarityMinTokens` 12 — a one-line accessor is ~11 shape tokens and
 *   every such accessor in a codebase is shape-identical, so below this
 *   structural similarity carries no information and must be refused.
 * - `similarityLengthRatioMin` 0.5 — a body that doubled or halved is a
 *   rewrite, not an edit.
 */
export interface LineageThresholds {
    similarityMin: number;
    similarityMargin: number;
    similarityMinTokens: number;
    similarityLengthRatioMin: number;
    shingleWidth: number;
}
export declare const DEFAULT_LINEAGE_THRESHOLDS: LineageThresholds;
/** Confidence attached to a match, by the rung that produced it. */
export declare const MATCH_CONFIDENCE: Readonly<Record<LineageMatchReason, number>>;
/**
 * Counters for behavioural assertions. Wall-clock timings are too noisy to
 * gate a build on; "a warm re-query parsed zero blobs" is not.
 */
export interface EntityCounters {
    gitInvocations: number;
    gitBytesRead: number;
    blobsRequested: number;
    blobsFromCache: number;
    blobsRead: number;
    blobsParsed: number;
    blobsSkipped: number;
    entitiesExtracted: number;
    commitsWalked: number;
    cacheHits: number;
    cacheMisses: number;
    cacheWrites: number;
    /**
     * Bytes deserialized from the persisted index entry.
     *
     * Reopening an unchanged index is pure deserialization, so this is the cost
     * of a warm start — and the only way to tell an entry that was skipped from
     * one that was read and discarded, since both answer identically.
     */
    cacheBytesRead: number;
    lineageComparisons: number;
    lineageMatches: number;
    lineageAcceptDeclines: number;
    similarityComparisons: number;
    ambiguitiesRefused: number;
}
export declare function createEntityCounters(): EntityCounters;
export declare function bumpCounter<K extends keyof EntityCounters>(counters: EntityCounters | undefined, key: K, by?: number): void;
/** One commit in the indexed window. */
export declare const EntityCommitRecordSchema: z.ZodObject<{
    sha: z.ZodString;
    parents: z.ZodArray<z.ZodString>;
    order: z.ZodNumber;
    authorName: z.ZodString;
    authorEmail: z.ZodString;
    authoredAt: z.ZodString;
    committedAt: z.ZodString;
    subject: z.ZodString;
    isMerge: z.ZodBoolean;
}, z.core.$strip>;
export type EntityCommitRecord = z.infer<typeof EntityCommitRecordSchema>;
/**
 * Repository identity, used to bind a cache to the repo it was built from.
 *
 * The first-parent root commit is stable across renames, relocation, and
 * remote changes, and differs between two unrelated repos that happen to share
 * a path. `--first-parent` keeps the walk linear so exactly one root is
 * reported, and avoids traversing the whole DAG.
 */
export declare const EntityRepoIdentitySchema: z.ZodObject<{
    rootCommit: z.ZodOptional<z.ZodString>;
    shallow: z.ZodBoolean;
    fallback: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type EntityRepoIdentity = z.infer<typeof EntityRepoIdentitySchema>;
export declare const ENTITY_TEST_REASON_SCHEMA: z.ZodObject<{
    code: z.ZodEnum<{
        "test-directory": "test-directory";
        "test-filename": "test-filename";
        "test-symbol-name": "test-symbol-name";
        "test-container": "test-container";
        "test-import": "test-import";
        "test-call": "test-call";
        "test-block": "test-block";
        "test-attribute": "test-attribute";
        "custom-directory": "custom-directory";
        "custom-pattern": "custom-pattern";
    }>;
    detail: z.ZodString;
    confidence: z.ZodNumber;
    source: z.ZodEnum<{
        symbol: "symbol";
        path: "path";
        content: "content";
        graph: "graph";
    }>;
}, z.core.$strip>;
/** How a cache open resolved against the current head. */
export declare const EntityIndexModeSchema: z.ZodEnum<{
    fresh: "fresh";
    unchanged: "unchanged";
    extended: "extended";
    rewound: "rewound";
    rebuilt: "rebuilt";
}>;
export type EntityIndexMode = z.infer<typeof EntityIndexModeSchema>;
export declare const EntityIndexStatusSchema: z.ZodObject<{
    mode: z.ZodEnum<{
        fresh: "fresh";
        unchanged: "unchanged";
        extended: "extended";
        rewound: "rewound";
        rebuilt: "rebuilt";
    }>;
    head: z.ZodOptional<z.ZodString>;
    commitsIndexed: z.ZodNumber;
    eventsRecorded: z.ZodNumber;
    lineageCount: z.ZodNumber;
    truncated: z.ZodBoolean;
    diagnostics: z.ZodArray<z.ZodObject<{
        code: z.ZodEnum<{
            "inline-context-stale": "inline-context-stale";
            "parse-failed": "parse-failed";
            "grammar-verification-refused": "grammar-verification-refused";
            "commit-window-truncated": "commit-window-truncated";
            "commit-files-truncated": "commit-files-truncated";
            "blob-missing": "blob-missing";
            "blob-too-large": "blob-too-large";
            "blob-too-many-lines": "blob-too-many-lines";
            "blob-binary": "blob-binary";
            "blob-unsupported": "blob-unsupported";
            "blob-budget-exhausted": "blob-budget-exhausted";
            "entities-truncated": "entities-truncated";
            "entity-budget-exhausted": "entity-budget-exhausted";
            "event-budget-exhausted": "event-budget-exhausted";
            "cross-file-skipped": "cross-file-skipped";
            "similarity-skipped": "similarity-skipped";
            "ambiguity-refused": "ambiguity-refused";
            "lineage-accept-declined": "lineage-accept-declined";
            "evidence-unavailable": "evidence-unavailable";
            "shallow-history": "shallow-history";
            "unborn-repo": "unborn-repo";
            "merge-side-changes-skipped": "merge-side-changes-skipped";
            "index-unmerged": "index-unmerged";
            "index-visibility-hidden": "index-visibility-hidden";
            "cache-rebuilt": "cache-rebuilt";
            "cache-rewound": "cache-rewound";
            "history-rewritten": "history-rewritten";
        }>;
        message: z.ZodString;
        commit: z.ZodOptional<z.ZodString>;
        relativePath: z.ZodOptional<z.ZodString>;
        blobSha: z.ZodOptional<z.ZodString>;
        grammar: z.ZodOptional<z.ZodString>;
        rung: z.ZodOptional<z.ZodEnum<{
            none: "none";
            similarity: "similarity";
            "exact-identity": "exact-identity";
            "git-rename-identity": "git-rename-identity";
            "content-hash": "content-hash";
            "normalized-hash": "normalized-hash";
            "structural-hash": "structural-hash";
            "signature-name": "signature-name";
            "qualified-name": "qualified-name";
        }>>;
        kept: z.ZodOptional<z.ZodNumber>;
        total: z.ZodOptional<z.ZodNumber>;
        limit: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type EntityIndexStatus = z.infer<typeof EntityIndexStatusSchema>;
