import { z } from 'zod';
export declare const GitCaptureObjectIdSchema: z.ZodString;
export type GitCaptureObjectId = z.infer<typeof GitCaptureObjectIdSchema>;
export declare const GitCaptureObjectFormatSchema: z.ZodEnum<{
    sha1: "sha1";
    sha256: "sha256";
}>;
export type GitCaptureObjectFormat = z.infer<typeof GitCaptureObjectFormatSchema>;
export declare const GitCapturePathV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    encoding: z.ZodLiteral<"utf8">;
    value: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    encoding: z.ZodLiteral<"base64">;
    value: z.ZodString;
}, z.core.$strip>], "encoding">;
export type GitCapturePathV1 = z.infer<typeof GitCapturePathV1Schema>;
export declare const GitCaptureHeaderV1Schema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"header">;
    sourceSystem: z.ZodLiteral<"git">;
    requestedRef: z.ZodString;
    resolvedHead: z.ZodString;
    objectFormat: z.ZodEnum<{
        sha1: "sha1";
        sha256: "sha256";
    }>;
    gitVersion: z.ZodString;
    shallow: z.ZodBoolean;
    partialClone: z.ZodBoolean;
    replaceRefCount: z.ZodNumber;
    graftsPresent: z.ZodBoolean;
    provenance: z.ZodObject<{
        instrument: z.ZodObject<{
            name: z.ZodLiteral<"occ.git.capture">;
            version: z.ZodLiteral<1>;
        }, z.core.$strip>;
        occVersion: z.ZodString;
        nodeVersion: z.ZodString;
    }, z.core.$strip>;
    limits: z.ZodObject<{
        maxCommits: z.ZodNullable<z.ZodNumber>;
        maxChanges: z.ZodNullable<z.ZodNumber>;
        maxTreeEntries: z.ZodNullable<z.ZodNumber>;
        batchSize: z.ZodNumber;
        maxRecordBytes: z.ZodNumber;
        timeoutMs: z.ZodNumber;
    }, z.core.$strip>;
    policy: z.ZodObject<{
        history: z.ZodLiteral<"all-reachable">;
        order: z.ZodLiteral<"parents-before-children">;
        deltas: z.ZodLiteral<"per-parent-raw-no-renames">;
        tree: z.ZodLiteral<"pinned-head-recursive">;
        replacements: z.ZodLiteral<"disabled">;
        grafts: z.ZodLiteral<"disabled">;
        lazyFetch: z.ZodLiteral<"disabled">;
    }, z.core.$strip>;
}, z.core.$strip>;
export type GitCaptureHeaderV1 = z.infer<typeof GitCaptureHeaderV1Schema>;
export declare const GitCaptureActorV1Schema: z.ZodObject<{
    name: z.ZodString;
    email: z.ZodString;
    time: z.ZodString;
}, z.core.$strip>;
export type GitCaptureActorV1 = z.infer<typeof GitCaptureActorV1Schema>;
export declare const GitCaptureCommitV1Schema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"commit">;
    commitOid: z.ZodString;
    treeOid: z.ZodString;
    parentOids: z.ZodArray<z.ZodString>;
    author: z.ZodObject<{
        name: z.ZodString;
        email: z.ZodString;
        time: z.ZodString;
    }, z.core.$strip>;
    committer: z.ZodObject<{
        name: z.ZodString;
        email: z.ZodString;
        time: z.ZodString;
    }, z.core.$strip>;
    message: z.ZodString;
    messageEncoding: z.ZodNullable<z.ZodString>;
    messageDecodeStatus: z.ZodEnum<{
        decoded: "decoded";
        replacement: "replacement";
    }>;
    identDecodeStatus: z.ZodEnum<{
        decoded: "decoded";
        replacement: "replacement";
    }>;
}, z.core.$strip>;
export type GitCaptureCommitV1 = z.infer<typeof GitCaptureCommitV1Schema>;
export declare const GitCaptureDeltaStartV1Schema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    commitOid: z.ZodString;
    parentOid: z.ZodNullable<z.ZodString>;
    parentIndex: z.ZodNullable<z.ZodNumber>;
    type: z.ZodLiteral<"delta-start">;
}, z.core.$strip>;
export type GitCaptureDeltaStartV1 = z.infer<typeof GitCaptureDeltaStartV1Schema>;
export declare const GitCaptureChangeV1Schema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    commitOid: z.ZodString;
    parentOid: z.ZodNullable<z.ZodString>;
    parentIndex: z.ZodNullable<z.ZodNumber>;
    type: z.ZodLiteral<"change">;
    status: z.ZodString;
    oldMode: z.ZodString;
    newMode: z.ZodString;
    oldObjectId: z.ZodOptional<z.ZodString>;
    newObjectId: z.ZodOptional<z.ZodString>;
    path: z.ZodDiscriminatedUnion<[z.ZodObject<{
        encoding: z.ZodLiteral<"utf8">;
        value: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        encoding: z.ZodLiteral<"base64">;
        value: z.ZodString;
    }, z.core.$strip>], "encoding">;
}, z.core.$strip>;
export type GitCaptureChangeV1 = z.infer<typeof GitCaptureChangeV1Schema>;
export declare const GitCaptureDeltaEndV1Schema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    commitOid: z.ZodString;
    parentOid: z.ZodNullable<z.ZodString>;
    parentIndex: z.ZodNullable<z.ZodNumber>;
    type: z.ZodLiteral<"delta-end">;
    changeCount: z.ZodNumber;
    complete: z.ZodBoolean;
    empty: z.ZodNullable<z.ZodBoolean>;
}, z.core.$strip>;
export type GitCaptureDeltaEndV1 = z.infer<typeof GitCaptureDeltaEndV1Schema>;
export declare const GitCaptureTreeEntryV1Schema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"tree-entry">;
    mode: z.ZodString;
    objectType: z.ZodEnum<{
        blob: "blob";
        commit: "commit";
    }>;
    objectId: z.ZodString;
    size: z.ZodNullable<z.ZodNumber>;
    path: z.ZodDiscriminatedUnion<[z.ZodObject<{
        encoding: z.ZodLiteral<"utf8">;
        value: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        encoding: z.ZodLiteral<"base64">;
        value: z.ZodString;
    }, z.core.$strip>], "encoding">;
}, z.core.$strip>;
export type GitCaptureTreeEntryV1 = z.infer<typeof GitCaptureTreeEntryV1Schema>;
export declare const GitCaptureDiagnosticCodeSchema: z.ZodEnum<{
    "shallow-repository": "shallow-repository";
    "history-limit": "history-limit";
    "change-limit": "change-limit";
    "tree-limit": "tree-limit";
    "git-command-failed": "git-command-failed";
    "malformed-git-output": "malformed-git-output";
}>;
export type GitCaptureDiagnosticCode = z.infer<typeof GitCaptureDiagnosticCodeSchema>;
export declare const GitCaptureDiagnosticV1Schema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"diagnostic">;
    severity: z.ZodEnum<{
        error: "error";
        warning: "warning";
    }>;
    code: z.ZodEnum<{
        "shallow-repository": "shallow-repository";
        "history-limit": "history-limit";
        "change-limit": "change-limit";
        "tree-limit": "tree-limit";
        "git-command-failed": "git-command-failed";
        "malformed-git-output": "malformed-git-output";
    }>;
    message: z.ZodString;
    limit: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type GitCaptureDiagnosticV1 = z.infer<typeof GitCaptureDiagnosticV1Schema>;
export declare const GitCaptureFooterV1Schema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"footer">;
    complete: z.ZodBoolean;
    coverage: z.ZodObject<{
        history: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
            failed: "failed";
        }>;
        deltas: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
            failed: "failed";
        }>;
        tree: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
            failed: "failed";
        }>;
    }, z.core.$strip>;
    counts: z.ZodObject<{
        commits: z.ZodNumber;
        parentDeltas: z.ZodNumber;
        emptyParentDeltas: z.ZodNumber;
        changes: z.ZodNumber;
        treeEntries: z.ZodNumber;
        diagnostics: z.ZodNumber;
    }, z.core.$strip>;
}, z.core.$strip>;
export type GitCaptureFooterV1 = z.infer<typeof GitCaptureFooterV1Schema>;
export declare const GitCaptureEventV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"header">;
    sourceSystem: z.ZodLiteral<"git">;
    requestedRef: z.ZodString;
    resolvedHead: z.ZodString;
    objectFormat: z.ZodEnum<{
        sha1: "sha1";
        sha256: "sha256";
    }>;
    gitVersion: z.ZodString;
    shallow: z.ZodBoolean;
    partialClone: z.ZodBoolean;
    replaceRefCount: z.ZodNumber;
    graftsPresent: z.ZodBoolean;
    provenance: z.ZodObject<{
        instrument: z.ZodObject<{
            name: z.ZodLiteral<"occ.git.capture">;
            version: z.ZodLiteral<1>;
        }, z.core.$strip>;
        occVersion: z.ZodString;
        nodeVersion: z.ZodString;
    }, z.core.$strip>;
    limits: z.ZodObject<{
        maxCommits: z.ZodNullable<z.ZodNumber>;
        maxChanges: z.ZodNullable<z.ZodNumber>;
        maxTreeEntries: z.ZodNullable<z.ZodNumber>;
        batchSize: z.ZodNumber;
        maxRecordBytes: z.ZodNumber;
        timeoutMs: z.ZodNumber;
    }, z.core.$strip>;
    policy: z.ZodObject<{
        history: z.ZodLiteral<"all-reachable">;
        order: z.ZodLiteral<"parents-before-children">;
        deltas: z.ZodLiteral<"per-parent-raw-no-renames">;
        tree: z.ZodLiteral<"pinned-head-recursive">;
        replacements: z.ZodLiteral<"disabled">;
        grafts: z.ZodLiteral<"disabled">;
        lazyFetch: z.ZodLiteral<"disabled">;
    }, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"commit">;
    commitOid: z.ZodString;
    treeOid: z.ZodString;
    parentOids: z.ZodArray<z.ZodString>;
    author: z.ZodObject<{
        name: z.ZodString;
        email: z.ZodString;
        time: z.ZodString;
    }, z.core.$strip>;
    committer: z.ZodObject<{
        name: z.ZodString;
        email: z.ZodString;
        time: z.ZodString;
    }, z.core.$strip>;
    message: z.ZodString;
    messageEncoding: z.ZodNullable<z.ZodString>;
    messageDecodeStatus: z.ZodEnum<{
        decoded: "decoded";
        replacement: "replacement";
    }>;
    identDecodeStatus: z.ZodEnum<{
        decoded: "decoded";
        replacement: "replacement";
    }>;
}, z.core.$strip>, z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    commitOid: z.ZodString;
    parentOid: z.ZodNullable<z.ZodString>;
    parentIndex: z.ZodNullable<z.ZodNumber>;
    type: z.ZodLiteral<"delta-start">;
}, z.core.$strip>, z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    commitOid: z.ZodString;
    parentOid: z.ZodNullable<z.ZodString>;
    parentIndex: z.ZodNullable<z.ZodNumber>;
    type: z.ZodLiteral<"change">;
    status: z.ZodString;
    oldMode: z.ZodString;
    newMode: z.ZodString;
    oldObjectId: z.ZodOptional<z.ZodString>;
    newObjectId: z.ZodOptional<z.ZodString>;
    path: z.ZodDiscriminatedUnion<[z.ZodObject<{
        encoding: z.ZodLiteral<"utf8">;
        value: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        encoding: z.ZodLiteral<"base64">;
        value: z.ZodString;
    }, z.core.$strip>], "encoding">;
}, z.core.$strip>, z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    commitOid: z.ZodString;
    parentOid: z.ZodNullable<z.ZodString>;
    parentIndex: z.ZodNullable<z.ZodNumber>;
    type: z.ZodLiteral<"delta-end">;
    changeCount: z.ZodNumber;
    complete: z.ZodBoolean;
    empty: z.ZodNullable<z.ZodBoolean>;
}, z.core.$strip>, z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"tree-entry">;
    mode: z.ZodString;
    objectType: z.ZodEnum<{
        blob: "blob";
        commit: "commit";
    }>;
    objectId: z.ZodString;
    size: z.ZodNullable<z.ZodNumber>;
    path: z.ZodDiscriminatedUnion<[z.ZodObject<{
        encoding: z.ZodLiteral<"utf8">;
        value: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        encoding: z.ZodLiteral<"base64">;
        value: z.ZodString;
    }, z.core.$strip>], "encoding">;
}, z.core.$strip>, z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"diagnostic">;
    severity: z.ZodEnum<{
        error: "error";
        warning: "warning";
    }>;
    code: z.ZodEnum<{
        "shallow-repository": "shallow-repository";
        "history-limit": "history-limit";
        "change-limit": "change-limit";
        "tree-limit": "tree-limit";
        "git-command-failed": "git-command-failed";
        "malformed-git-output": "malformed-git-output";
    }>;
    message: z.ZodString;
    limit: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>, z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    type: z.ZodLiteral<"footer">;
    complete: z.ZodBoolean;
    coverage: z.ZodObject<{
        history: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
            failed: "failed";
        }>;
        deltas: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
            failed: "failed";
        }>;
        tree: z.ZodEnum<{
            partial: "partial";
            complete: "complete";
            failed: "failed";
        }>;
    }, z.core.$strip>;
    counts: z.ZodObject<{
        commits: z.ZodNumber;
        parentDeltas: z.ZodNumber;
        emptyParentDeltas: z.ZodNumber;
        changes: z.ZodNumber;
        treeEntries: z.ZodNumber;
        diagnostics: z.ZodNumber;
    }, z.core.$strip>;
}, z.core.$strip>], "type">;
export type GitCaptureEventV1 = z.infer<typeof GitCaptureEventV1Schema>;
export declare const GitCaptureRequestV1Schema: z.ZodObject<{
    repoPath: z.ZodString;
    ref: z.ZodString;
    maxCommits: z.ZodOptional<z.ZodNumber>;
    maxChanges: z.ZodOptional<z.ZodNumber>;
    maxTreeEntries: z.ZodOptional<z.ZodNumber>;
    batchSize: z.ZodOptional<z.ZodNumber>;
    maxRecordBytes: z.ZodOptional<z.ZodNumber>;
    timeoutMs: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type GitCaptureRequestV1 = z.infer<typeof GitCaptureRequestV1Schema>;
export interface GitCaptureOptions extends GitCaptureRequestV1 {
    signal?: AbortSignal;
}
export type GitCaptureErrorCode = 'invalid-options' | 'invalid-ref' | 'git-missing' | 'git-failed' | 'timeout' | 'malformed-output';
export declare class GitCaptureError extends Error {
    readonly code: GitCaptureErrorCode;
    constructor(code: GitCaptureErrorCode, message: string, options?: {
        cause?: unknown;
    });
}
/**
 * Stream a source-body-free, physical capture of one pinned Git commit and
 * every commit reachable from it. The stream is backpressure-aware and keeps
 * only a bounded commit batch plus the commit-to-tree coordinate map in memory.
 */
export declare function captureGitRepository(input: GitCaptureOptions): AsyncGenerator<GitCaptureEventV1>;
