import { z } from 'zod';
/** Canonical digest used by atoms and coordinate verification. */
export declare const GIT_SPAN_DIGEST_ALGORITHM: "sha256-lf-span-v1";
export declare const DEFAULT_GIT_COORDINATE_VERIFICATION_OPTIONS: Readonly<{
    maxRequests: 10000;
    maxBlobBytes: 2097152;
    maxBlobLines: 25000;
    maxTotalBlobBytes: 268435456;
    maxBatchBytes: 33554432;
}>;
export declare const GitCoordinateCoverageV1Schema: z.ZodEnum<{
    partial: "partial";
    unavailable: "unavailable";
    complete: "complete";
}>;
export type GitCoordinateCoverageV1 = z.infer<typeof GitCoordinateCoverageV1Schema>;
export declare const GitCoordinateSourceSpanV1Schema: z.ZodObject<{
    start_line: z.ZodNumber;
    end_line: z.ZodNumber;
    exact: z.ZodBoolean;
}, z.core.$strict>;
export type GitCoordinateSourceSpanV1 = z.infer<typeof GitCoordinateSourceSpanV1Schema>;
export declare const GitNativeCoordinateV1Schema: z.ZodObject<{
    oid: z.ZodString;
    path: z.ZodString;
    span: z.ZodObject<{
        start_line: z.ZodNumber;
        end_line: z.ZodNumber;
        exact: z.ZodBoolean;
    }, z.core.$strict>;
    span_digest: z.ZodString;
}, z.core.$strict>;
export type GitNativeCoordinateV1 = z.infer<typeof GitNativeCoordinateV1Schema>;
export declare const GitCoordinateVerificationRequestV1Schema: z.ZodObject<{
    request_id: z.ZodString;
    coordinate: z.ZodObject<{
        oid: z.ZodString;
        path: z.ZodString;
        span: z.ZodObject<{
            start_line: z.ZodNumber;
            end_line: z.ZodNumber;
            exact: z.ZodBoolean;
        }, z.core.$strict>;
        span_digest: z.ZodString;
    }, z.core.$strict>;
}, z.core.$strict>;
export type GitCoordinateVerificationRequestV1 = z.infer<typeof GitCoordinateVerificationRequestV1Schema>;
export declare const GitCoordinateVerificationDiagnosticV1Schema: z.ZodObject<{
    code: z.ZodEnum<{
        "blob-too-large": "blob-too-large";
        "blob-too-many-lines": "blob-too-many-lines";
        "oid-format-mismatch": "oid-format-mismatch";
        "missing-object": "missing-object";
        "not-a-blob": "not-a-blob";
        "total-blob-budget-exhausted": "total-blob-budget-exhausted";
        "content-unavailable": "content-unavailable";
        "binary-blob": "binary-blob";
        "invalid-utf8": "invalid-utf8";
        "span-out-of-range": "span-out-of-range";
        "span-digest-mismatch": "span-digest-mismatch";
        "ref-path-missing": "ref-path-missing";
        "ref-object-mismatch": "ref-object-mismatch";
    }>;
    message: z.ZodString;
    limit: z.ZodOptional<z.ZodNumber>;
    actual: z.ZodOptional<z.ZodNumber>;
}, z.core.$strict>;
export type GitCoordinateVerificationDiagnosticV1 = z.infer<typeof GitCoordinateVerificationDiagnosticV1Schema>;
export declare const GitCoordinateVerificationHeaderV1Schema: z.ZodObject<{
    schema_version: z.ZodLiteral<1>;
    type: z.ZodLiteral<"header">;
    requested_ref: z.ZodNullable<z.ZodString>;
    resolved_ref: z.ZodNullable<z.ZodString>;
    object_format: z.ZodEnum<{
        sha1: "sha1";
        sha256: "sha256";
    }>;
    request_count: z.ZodNumber;
    unique_object_count: z.ZodNumber;
    limits: z.ZodObject<{
        max_requests: z.ZodNumber;
        max_blob_bytes: z.ZodNumber;
        max_blob_lines: z.ZodNumber;
        max_total_blob_bytes: z.ZodNumber;
        max_batch_bytes: z.ZodNumber;
    }, z.core.$strict>;
    provenance: z.ZodObject<{
        instrument: z.ZodLiteral<"occ.code.coordinate-verify">;
        instrument_version: z.ZodLiteral<1>;
        occ_version: z.ZodString;
        node_version: z.ZodString;
        acquisition: z.ZodLiteral<"git-cat-file">;
        source_bodies: z.ZodLiteral<"omitted">;
        span_digest: z.ZodLiteral<"sha256-lf-span-v1">;
    }, z.core.$strict>;
}, z.core.$strict>;
export type GitCoordinateVerificationHeaderV1 = z.infer<typeof GitCoordinateVerificationHeaderV1Schema>;
export declare const GitCoordinateVerificationResultV1Schema: z.ZodObject<{
    schema_version: z.ZodLiteral<1>;
    type: z.ZodLiteral<"result">;
    request_index: z.ZodNumber;
    request_id: z.ZodString;
    coordinate: z.ZodObject<{
        oid: z.ZodString;
        path: z.ZodString;
        span: z.ZodObject<{
            start_line: z.ZodNumber;
            end_line: z.ZodNumber;
            exact: z.ZodBoolean;
        }, z.core.$strict>;
        span_digest: z.ZodString;
    }, z.core.$strict>;
    status: z.ZodEnum<{
        unavailable: "unavailable";
        verified: "verified";
        mismatch: "mismatch";
    }>;
    actual_span_digest: z.ZodNullable<z.ZodString>;
    ref_oid: z.ZodNullable<z.ZodString>;
    checks: z.ZodObject<{
        object: z.ZodEnum<{
            unavailable: "unavailable";
            verified: "verified";
            mismatch: "mismatch";
        }>;
        span: z.ZodEnum<{
            unavailable: "unavailable";
            verified: "verified";
            mismatch: "mismatch";
        }>;
        ref_binding: z.ZodEnum<{
            unavailable: "unavailable";
            verified: "verified";
            mismatch: "mismatch";
            "not-requested": "not-requested";
        }>;
    }, z.core.$strict>;
    diagnostics: z.ZodArray<z.ZodObject<{
        code: z.ZodEnum<{
            "blob-too-large": "blob-too-large";
            "blob-too-many-lines": "blob-too-many-lines";
            "oid-format-mismatch": "oid-format-mismatch";
            "missing-object": "missing-object";
            "not-a-blob": "not-a-blob";
            "total-blob-budget-exhausted": "total-blob-budget-exhausted";
            "content-unavailable": "content-unavailable";
            "binary-blob": "binary-blob";
            "invalid-utf8": "invalid-utf8";
            "span-out-of-range": "span-out-of-range";
            "span-digest-mismatch": "span-digest-mismatch";
            "ref-path-missing": "ref-path-missing";
            "ref-object-mismatch": "ref-object-mismatch";
        }>;
        message: z.ZodString;
        limit: z.ZodOptional<z.ZodNumber>;
        actual: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strict>>;
}, z.core.$strict>;
export type GitCoordinateVerificationResultV1 = z.infer<typeof GitCoordinateVerificationResultV1Schema>;
export declare const GitCoordinateVerificationFooterV1Schema: z.ZodObject<{
    schema_version: z.ZodLiteral<1>;
    type: z.ZodLiteral<"footer">;
    complete: z.ZodBoolean;
    coverage: z.ZodObject<{
        requests: z.ZodEnum<{
            partial: "partial";
            unavailable: "unavailable";
            complete: "complete";
        }>;
        objects: z.ZodEnum<{
            partial: "partial";
            unavailable: "unavailable";
            complete: "complete";
        }>;
        spans: z.ZodEnum<{
            partial: "partial";
            unavailable: "unavailable";
            complete: "complete";
        }>;
        ref_bindings: z.ZodEnum<{
            partial: "partial";
            unavailable: "unavailable";
            complete: "complete";
        }>;
    }, z.core.$strict>;
    counts: z.ZodObject<{
        requests: z.ZodNumber;
        verified: z.ZodNumber;
        mismatched: z.ZodNumber;
        unavailable: z.ZodNumber;
        unique_objects_read: z.ZodNumber;
        blob_bytes_read: z.ZodNumber;
    }, z.core.$strict>;
}, z.core.$strict>;
export type GitCoordinateVerificationFooterV1 = z.infer<typeof GitCoordinateVerificationFooterV1Schema>;
export declare const GitCoordinateVerificationEventV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    schema_version: z.ZodLiteral<1>;
    type: z.ZodLiteral<"header">;
    requested_ref: z.ZodNullable<z.ZodString>;
    resolved_ref: z.ZodNullable<z.ZodString>;
    object_format: z.ZodEnum<{
        sha1: "sha1";
        sha256: "sha256";
    }>;
    request_count: z.ZodNumber;
    unique_object_count: z.ZodNumber;
    limits: z.ZodObject<{
        max_requests: z.ZodNumber;
        max_blob_bytes: z.ZodNumber;
        max_blob_lines: z.ZodNumber;
        max_total_blob_bytes: z.ZodNumber;
        max_batch_bytes: z.ZodNumber;
    }, z.core.$strict>;
    provenance: z.ZodObject<{
        instrument: z.ZodLiteral<"occ.code.coordinate-verify">;
        instrument_version: z.ZodLiteral<1>;
        occ_version: z.ZodString;
        node_version: z.ZodString;
        acquisition: z.ZodLiteral<"git-cat-file">;
        source_bodies: z.ZodLiteral<"omitted">;
        span_digest: z.ZodLiteral<"sha256-lf-span-v1">;
    }, z.core.$strict>;
}, z.core.$strict>, z.ZodObject<{
    schema_version: z.ZodLiteral<1>;
    type: z.ZodLiteral<"result">;
    request_index: z.ZodNumber;
    request_id: z.ZodString;
    coordinate: z.ZodObject<{
        oid: z.ZodString;
        path: z.ZodString;
        span: z.ZodObject<{
            start_line: z.ZodNumber;
            end_line: z.ZodNumber;
            exact: z.ZodBoolean;
        }, z.core.$strict>;
        span_digest: z.ZodString;
    }, z.core.$strict>;
    status: z.ZodEnum<{
        unavailable: "unavailable";
        verified: "verified";
        mismatch: "mismatch";
    }>;
    actual_span_digest: z.ZodNullable<z.ZodString>;
    ref_oid: z.ZodNullable<z.ZodString>;
    checks: z.ZodObject<{
        object: z.ZodEnum<{
            unavailable: "unavailable";
            verified: "verified";
            mismatch: "mismatch";
        }>;
        span: z.ZodEnum<{
            unavailable: "unavailable";
            verified: "verified";
            mismatch: "mismatch";
        }>;
        ref_binding: z.ZodEnum<{
            unavailable: "unavailable";
            verified: "verified";
            mismatch: "mismatch";
            "not-requested": "not-requested";
        }>;
    }, z.core.$strict>;
    diagnostics: z.ZodArray<z.ZodObject<{
        code: z.ZodEnum<{
            "blob-too-large": "blob-too-large";
            "blob-too-many-lines": "blob-too-many-lines";
            "oid-format-mismatch": "oid-format-mismatch";
            "missing-object": "missing-object";
            "not-a-blob": "not-a-blob";
            "total-blob-budget-exhausted": "total-blob-budget-exhausted";
            "content-unavailable": "content-unavailable";
            "binary-blob": "binary-blob";
            "invalid-utf8": "invalid-utf8";
            "span-out-of-range": "span-out-of-range";
            "span-digest-mismatch": "span-digest-mismatch";
            "ref-path-missing": "ref-path-missing";
            "ref-object-mismatch": "ref-object-mismatch";
        }>;
        message: z.ZodString;
        limit: z.ZodOptional<z.ZodNumber>;
        actual: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strict>>;
}, z.core.$strict>, z.ZodObject<{
    schema_version: z.ZodLiteral<1>;
    type: z.ZodLiteral<"footer">;
    complete: z.ZodBoolean;
    coverage: z.ZodObject<{
        requests: z.ZodEnum<{
            partial: "partial";
            unavailable: "unavailable";
            complete: "complete";
        }>;
        objects: z.ZodEnum<{
            partial: "partial";
            unavailable: "unavailable";
            complete: "complete";
        }>;
        spans: z.ZodEnum<{
            partial: "partial";
            unavailable: "unavailable";
            complete: "complete";
        }>;
        ref_bindings: z.ZodEnum<{
            partial: "partial";
            unavailable: "unavailable";
            complete: "complete";
        }>;
    }, z.core.$strict>;
    counts: z.ZodObject<{
        requests: z.ZodNumber;
        verified: z.ZodNumber;
        mismatched: z.ZodNumber;
        unavailable: z.ZodNumber;
        unique_objects_read: z.ZodNumber;
        blob_bytes_read: z.ZodNumber;
    }, z.core.$strict>;
}, z.core.$strict>], "type">;
export type GitCoordinateVerificationEventV1 = z.infer<typeof GitCoordinateVerificationEventV1Schema>;
export declare const GitCoordinateVerificationOptionsSchema: z.ZodObject<{
    repoPath: z.ZodString;
    ref: z.ZodOptional<z.ZodString>;
    maxRequests: z.ZodDefault<z.ZodNumber>;
    maxBlobBytes: z.ZodDefault<z.ZodNumber>;
    maxBlobLines: z.ZodDefault<z.ZodNumber>;
    maxTotalBlobBytes: z.ZodDefault<z.ZodNumber>;
    maxBatchBytes: z.ZodDefault<z.ZodNumber>;
}, z.core.$strict>;
export type GitCoordinateVerificationOptions = z.input<typeof GitCoordinateVerificationOptionsSchema> & {
    signal?: AbortSignal;
};
/** Hash one already LF-normalized span without retaining it in a receipt. */
export declare function computeGitSpanDigest(spanSource: string): string;
/** Select a one-based inclusive line span and normalize line separators to LF. */
export declare function selectGitCoordinateSpan(source: string, span: Pick<GitCoordinateSourceSpanV1, 'start_line' | 'end_line'>): {
    source: string;
    lineCount: number;
} | undefined;
/**
 * Verify immutable Git coordinates without checking out a revision or emitting
 * source. A mismatch is a complete negative observation; unavailable means OCC
 * could not perform the requested check.
 */
export declare function verifyGitCoordinates(requests: AsyncIterable<GitCoordinateVerificationRequestV1> | Iterable<GitCoordinateVerificationRequestV1>, input: GitCoordinateVerificationOptions): AsyncGenerator<GitCoordinateVerificationEventV1>;
export declare const GitCoordinateVerificationBatchV1Schema: z.ZodObject<{
    header: z.ZodObject<{
        schema_version: z.ZodLiteral<1>;
        type: z.ZodLiteral<"header">;
        requested_ref: z.ZodNullable<z.ZodString>;
        resolved_ref: z.ZodNullable<z.ZodString>;
        object_format: z.ZodEnum<{
            sha1: "sha1";
            sha256: "sha256";
        }>;
        request_count: z.ZodNumber;
        unique_object_count: z.ZodNumber;
        limits: z.ZodObject<{
            max_requests: z.ZodNumber;
            max_blob_bytes: z.ZodNumber;
            max_blob_lines: z.ZodNumber;
            max_total_blob_bytes: z.ZodNumber;
            max_batch_bytes: z.ZodNumber;
        }, z.core.$strict>;
        provenance: z.ZodObject<{
            instrument: z.ZodLiteral<"occ.code.coordinate-verify">;
            instrument_version: z.ZodLiteral<1>;
            occ_version: z.ZodString;
            node_version: z.ZodString;
            acquisition: z.ZodLiteral<"git-cat-file">;
            source_bodies: z.ZodLiteral<"omitted">;
            span_digest: z.ZodLiteral<"sha256-lf-span-v1">;
        }, z.core.$strict>;
    }, z.core.$strict>;
    results: z.ZodArray<z.ZodObject<{
        schema_version: z.ZodLiteral<1>;
        type: z.ZodLiteral<"result">;
        request_index: z.ZodNumber;
        request_id: z.ZodString;
        coordinate: z.ZodObject<{
            oid: z.ZodString;
            path: z.ZodString;
            span: z.ZodObject<{
                start_line: z.ZodNumber;
                end_line: z.ZodNumber;
                exact: z.ZodBoolean;
            }, z.core.$strict>;
            span_digest: z.ZodString;
        }, z.core.$strict>;
        status: z.ZodEnum<{
            unavailable: "unavailable";
            verified: "verified";
            mismatch: "mismatch";
        }>;
        actual_span_digest: z.ZodNullable<z.ZodString>;
        ref_oid: z.ZodNullable<z.ZodString>;
        checks: z.ZodObject<{
            object: z.ZodEnum<{
                unavailable: "unavailable";
                verified: "verified";
                mismatch: "mismatch";
            }>;
            span: z.ZodEnum<{
                unavailable: "unavailable";
                verified: "verified";
                mismatch: "mismatch";
            }>;
            ref_binding: z.ZodEnum<{
                unavailable: "unavailable";
                verified: "verified";
                mismatch: "mismatch";
                "not-requested": "not-requested";
            }>;
        }, z.core.$strict>;
        diagnostics: z.ZodArray<z.ZodObject<{
            code: z.ZodEnum<{
                "blob-too-large": "blob-too-large";
                "blob-too-many-lines": "blob-too-many-lines";
                "oid-format-mismatch": "oid-format-mismatch";
                "missing-object": "missing-object";
                "not-a-blob": "not-a-blob";
                "total-blob-budget-exhausted": "total-blob-budget-exhausted";
                "content-unavailable": "content-unavailable";
                "binary-blob": "binary-blob";
                "invalid-utf8": "invalid-utf8";
                "span-out-of-range": "span-out-of-range";
                "span-digest-mismatch": "span-digest-mismatch";
                "ref-path-missing": "ref-path-missing";
                "ref-object-mismatch": "ref-object-mismatch";
            }>;
            message: z.ZodString;
            limit: z.ZodOptional<z.ZodNumber>;
            actual: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strict>>;
    }, z.core.$strict>>;
    footer: z.ZodObject<{
        schema_version: z.ZodLiteral<1>;
        type: z.ZodLiteral<"footer">;
        complete: z.ZodBoolean;
        coverage: z.ZodObject<{
            requests: z.ZodEnum<{
                partial: "partial";
                unavailable: "unavailable";
                complete: "complete";
            }>;
            objects: z.ZodEnum<{
                partial: "partial";
                unavailable: "unavailable";
                complete: "complete";
            }>;
            spans: z.ZodEnum<{
                partial: "partial";
                unavailable: "unavailable";
                complete: "complete";
            }>;
            ref_bindings: z.ZodEnum<{
                partial: "partial";
                unavailable: "unavailable";
                complete: "complete";
            }>;
        }, z.core.$strict>;
        counts: z.ZodObject<{
            requests: z.ZodNumber;
            verified: z.ZodNumber;
            mismatched: z.ZodNumber;
            unavailable: z.ZodNumber;
            unique_objects_read: z.ZodNumber;
            blob_bytes_read: z.ZodNumber;
        }, z.core.$strict>;
    }, z.core.$strict>;
}, z.core.$strict>;
export type GitCoordinateVerificationBatchV1 = z.infer<typeof GitCoordinateVerificationBatchV1Schema>;
/** Collect through EOF and cross-check a whole coordinate-verification run. */
export declare function collectGitCoordinateVerificationBatch(events: AsyncIterable<unknown> | Iterable<unknown>): Promise<GitCoordinateVerificationBatchV1>;
