import { z } from 'zod';
export declare const SCM_COMMIT_MESSAGE_MAX_LENGTH = 4096;
export declare const SCM_COMMIT_PATCH_MAX_COUNT = 256;
export declare const SCM_COMMIT_PATCH_MAX_LENGTH = 200000;
export declare const SCM_OPERATION_ERROR_CODES: {
    readonly NOT_REPOSITORY: "NOT_REPOSITORY";
    readonly INVALID_PATH: "INVALID_PATH";
    readonly INVALID_REQUEST: "INVALID_REQUEST";
    readonly COMMAND_FAILED: "COMMAND_FAILED";
    readonly CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
    readonly COMMIT_REQUIRED: "COMMIT_REQUIRED";
    readonly CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
    readonly REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
    readonly REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
    readonly REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
    readonly REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
    readonly REMOTE_REJECTED: "REMOTE_REJECTED";
    readonly REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
    readonly FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
    readonly BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
};
export type ScmOperationErrorCode = (typeof SCM_OPERATION_ERROR_CODES)[keyof typeof SCM_OPERATION_ERROR_CODES];
export declare const ScmOperationErrorCodeSchema: z.ZodEnum<{
    INVALID_REQUEST: "INVALID_REQUEST";
    NOT_REPOSITORY: "NOT_REPOSITORY";
    INVALID_PATH: "INVALID_PATH";
    COMMAND_FAILED: "COMMAND_FAILED";
    CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
    COMMIT_REQUIRED: "COMMIT_REQUIRED";
    CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
    REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
    REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
    REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
    REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
    REMOTE_REJECTED: "REMOTE_REJECTED";
    REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
    FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
    BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
}>;
export declare const ScmBackendIdSchema: z.ZodEnum<{
    git: "git";
    sapling: "sapling";
}>;
export type ScmBackendId = z.infer<typeof ScmBackendIdSchema>;
export declare const ScmRepoModeSchema: z.ZodEnum<{
    ".git": ".git";
    ".sl": ".sl";
}>;
export type ScmRepoMode = z.infer<typeof ScmRepoModeSchema>;
export declare const ScmBackendPreferenceSchema: z.ZodObject<{
    kind: z.ZodLiteral<"prefer">;
    backendId: z.ZodEnum<{
        git: "git";
        sapling: "sapling";
    }>;
}, z.core.$strip>;
export type ScmBackendPreference = z.infer<typeof ScmBackendPreferenceSchema>;
export declare const ScmDiffAreaSchema: z.ZodEnum<{
    included: "included";
    pending: "pending";
    both: "both";
}>;
export type ScmDiffArea = z.infer<typeof ScmDiffAreaSchema>;
export declare const ScmChangeSetModelSchema: z.ZodEnum<{
    index: "index";
    "working-copy": "working-copy";
}>;
export type ScmChangeSetModel = z.infer<typeof ScmChangeSetModelSchema>;
export declare const ScmCapabilitiesSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
    readStatus: z.ZodBoolean;
    readDiffFile: z.ZodBoolean;
    readDiffCommit: z.ZodBoolean;
    readLog: z.ZodBoolean;
    readBranches: z.ZodOptional<z.ZodBoolean>;
    readStash: z.ZodOptional<z.ZodBoolean>;
    writeInclude: z.ZodBoolean;
    writeExclude: z.ZodBoolean;
    writeDiscard: z.ZodOptional<z.ZodBoolean>;
    writeCommit: z.ZodBoolean;
    writeCommitPathSelection: z.ZodBoolean;
    writeCommitLineSelection: z.ZodBoolean;
    writeBackout: z.ZodBoolean;
    writeBranchCreate: z.ZodOptional<z.ZodBoolean>;
    writeBranchCheckout: z.ZodOptional<z.ZodBoolean>;
    writeRemoteFetch: z.ZodBoolean;
    writeRemotePull: z.ZodBoolean;
    writeRemotePush: z.ZodBoolean;
    writeRemotePublish: z.ZodOptional<z.ZodBoolean>;
    writeStash: z.ZodOptional<z.ZodBoolean>;
    worktreeCreate: z.ZodBoolean;
    changeSetModel: z.ZodEnum<{
        index: "index";
        "working-copy": "working-copy";
    }>;
    supportedDiffAreas: z.ZodArray<z.ZodEnum<{
        included: "included";
        pending: "pending";
        both: "both";
    }>>;
    operationLabels: z.ZodOptional<z.ZodObject<{
        commit: z.ZodOptional<z.ZodString>;
        include: z.ZodOptional<z.ZodString>;
        exclude: z.ZodOptional<z.ZodString>;
        backout: z.ZodOptional<z.ZodString>;
        fetch: z.ZodOptional<z.ZodString>;
        pull: z.ZodOptional<z.ZodString>;
        push: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>>;
export type ScmCapabilities = z.infer<typeof ScmCapabilitiesSchema>;
export declare const ScmEntryKindSchema: z.ZodEnum<{
    added: "added";
    modified: "modified";
    deleted: "deleted";
    renamed: "renamed";
    copied: "copied";
    untracked: "untracked";
    conflicted: "conflicted";
}>;
export type ScmEntryKind = z.infer<typeof ScmEntryKindSchema>;
export declare const ScmPathStatsSchema: z.ZodObject<{
    includedAdded: z.ZodNumber;
    includedRemoved: z.ZodNumber;
    pendingAdded: z.ZodNumber;
    pendingRemoved: z.ZodNumber;
    isBinary: z.ZodBoolean;
}, z.core.$strip>;
export type ScmPathStats = z.infer<typeof ScmPathStatsSchema>;
export declare const ScmWorkingEntrySchema: z.ZodObject<{
    path: z.ZodString;
    previousPath: z.ZodNullable<z.ZodString>;
    kind: z.ZodEnum<{
        added: "added";
        modified: "modified";
        deleted: "deleted";
        renamed: "renamed";
        copied: "copied";
        untracked: "untracked";
        conflicted: "conflicted";
    }>;
    includeStatus: z.ZodString;
    pendingStatus: z.ZodString;
    hasIncludedDelta: z.ZodBoolean;
    hasPendingDelta: z.ZodBoolean;
    stats: z.ZodObject<{
        includedAdded: z.ZodNumber;
        includedRemoved: z.ZodNumber;
        pendingAdded: z.ZodNumber;
        pendingRemoved: z.ZodNumber;
        isBinary: z.ZodBoolean;
    }, z.core.$strip>;
}, z.core.$strip>;
export type ScmWorkingEntry = z.infer<typeof ScmWorkingEntrySchema>;
export declare const ScmWorktreeSchema: z.ZodObject<{
    path: z.ZodString;
    branch: z.ZodNullable<z.ZodString>;
    isCurrent: z.ZodBoolean;
    isMain: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export type ScmWorktree = z.infer<typeof ScmWorktreeSchema>;
export declare const ScmWorkingSnapshotSchema: z.ZodObject<{
    projectKey: z.ZodString;
    fetchedAt: z.ZodNumber;
    repo: z.ZodObject<{
        isRepo: z.ZodBoolean;
        rootPath: z.ZodNullable<z.ZodString>;
        backendId: z.ZodNullable<z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>>;
        mode: z.ZodNullable<z.ZodEnum<{
            ".git": ".git";
            ".sl": ".sl";
        }>>;
        worktrees: z.ZodDefault<z.ZodArray<z.ZodObject<{
            path: z.ZodString;
            branch: z.ZodNullable<z.ZodString>;
            isCurrent: z.ZodBoolean;
            isMain: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>>>;
    }, z.core.$strip>;
    capabilities: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
        readStatus: z.ZodBoolean;
        readDiffFile: z.ZodBoolean;
        readDiffCommit: z.ZodBoolean;
        readLog: z.ZodBoolean;
        readBranches: z.ZodOptional<z.ZodBoolean>;
        readStash: z.ZodOptional<z.ZodBoolean>;
        writeInclude: z.ZodBoolean;
        writeExclude: z.ZodBoolean;
        writeDiscard: z.ZodOptional<z.ZodBoolean>;
        writeCommit: z.ZodBoolean;
        writeCommitPathSelection: z.ZodBoolean;
        writeCommitLineSelection: z.ZodBoolean;
        writeBackout: z.ZodBoolean;
        writeBranchCreate: z.ZodOptional<z.ZodBoolean>;
        writeBranchCheckout: z.ZodOptional<z.ZodBoolean>;
        writeRemoteFetch: z.ZodBoolean;
        writeRemotePull: z.ZodBoolean;
        writeRemotePush: z.ZodBoolean;
        writeRemotePublish: z.ZodOptional<z.ZodBoolean>;
        writeStash: z.ZodOptional<z.ZodBoolean>;
        worktreeCreate: z.ZodBoolean;
        changeSetModel: z.ZodEnum<{
            index: "index";
            "working-copy": "working-copy";
        }>;
        supportedDiffAreas: z.ZodArray<z.ZodEnum<{
            included: "included";
            pending: "pending";
            both: "both";
        }>>;
        operationLabels: z.ZodOptional<z.ZodObject<{
            commit: z.ZodOptional<z.ZodString>;
            include: z.ZodOptional<z.ZodString>;
            exclude: z.ZodOptional<z.ZodString>;
            backout: z.ZodOptional<z.ZodString>;
            fetch: z.ZodOptional<z.ZodString>;
            pull: z.ZodOptional<z.ZodString>;
            push: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    branch: z.ZodObject<{
        head: z.ZodNullable<z.ZodString>;
        upstream: z.ZodNullable<z.ZodString>;
        ahead: z.ZodNumber;
        behind: z.ZodNumber;
        detached: z.ZodBoolean;
    }, z.core.$strip>;
    stashCount: z.ZodOptional<z.ZodNumber>;
    hasConflicts: z.ZodBoolean;
    entries: z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        previousPath: z.ZodNullable<z.ZodString>;
        kind: z.ZodEnum<{
            added: "added";
            modified: "modified";
            deleted: "deleted";
            renamed: "renamed";
            copied: "copied";
            untracked: "untracked";
            conflicted: "conflicted";
        }>;
        includeStatus: z.ZodString;
        pendingStatus: z.ZodString;
        hasIncludedDelta: z.ZodBoolean;
        hasPendingDelta: z.ZodBoolean;
        stats: z.ZodObject<{
            includedAdded: z.ZodNumber;
            includedRemoved: z.ZodNumber;
            pendingAdded: z.ZodNumber;
            pendingRemoved: z.ZodNumber;
            isBinary: z.ZodBoolean;
        }, z.core.$strip>;
    }, z.core.$strip>>;
    totals: z.ZodObject<{
        includedFiles: z.ZodNumber;
        pendingFiles: z.ZodNumber;
        untrackedFiles: z.ZodNumber;
        includedAdded: z.ZodNumber;
        includedRemoved: z.ZodNumber;
        pendingAdded: z.ZodNumber;
        pendingRemoved: z.ZodNumber;
    }, z.core.$strip>;
}, z.core.$strip>;
export type ScmWorkingSnapshot = z.infer<typeof ScmWorkingSnapshotSchema>;
export declare const ScmRequestBaseSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type ScmRequestBase = z.infer<typeof ScmRequestBaseSchema>;
export declare const ScmBackendDescribeRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type ScmBackendDescribeRequest = z.infer<typeof ScmBackendDescribeRequestSchema>;
export declare const ScmBackendDescribeResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    backendId: z.ZodOptional<z.ZodEnum<{
        git: "git";
        sapling: "sapling";
    }>>;
    repoMode: z.ZodOptional<z.ZodEnum<{
        ".git": ".git";
        ".sl": ".sl";
    }>>;
    isRepo: z.ZodOptional<z.ZodBoolean>;
    capabilities: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
        readStatus: z.ZodBoolean;
        readDiffFile: z.ZodBoolean;
        readDiffCommit: z.ZodBoolean;
        readLog: z.ZodBoolean;
        readBranches: z.ZodOptional<z.ZodBoolean>;
        readStash: z.ZodOptional<z.ZodBoolean>;
        writeInclude: z.ZodBoolean;
        writeExclude: z.ZodBoolean;
        writeDiscard: z.ZodOptional<z.ZodBoolean>;
        writeCommit: z.ZodBoolean;
        writeCommitPathSelection: z.ZodBoolean;
        writeCommitLineSelection: z.ZodBoolean;
        writeBackout: z.ZodBoolean;
        writeBranchCreate: z.ZodOptional<z.ZodBoolean>;
        writeBranchCheckout: z.ZodOptional<z.ZodBoolean>;
        writeRemoteFetch: z.ZodBoolean;
        writeRemotePull: z.ZodBoolean;
        writeRemotePush: z.ZodBoolean;
        writeRemotePublish: z.ZodOptional<z.ZodBoolean>;
        writeStash: z.ZodOptional<z.ZodBoolean>;
        worktreeCreate: z.ZodBoolean;
        changeSetModel: z.ZodEnum<{
            index: "index";
            "working-copy": "working-copy";
        }>;
        supportedDiffAreas: z.ZodArray<z.ZodEnum<{
            included: "included";
            pending: "pending";
            both: "both";
        }>>;
        operationLabels: z.ZodOptional<z.ZodObject<{
            commit: z.ZodOptional<z.ZodString>;
            include: z.ZodOptional<z.ZodString>;
            exclude: z.ZodOptional<z.ZodString>;
            backout: z.ZodOptional<z.ZodString>;
            fetch: z.ZodOptional<z.ZodString>;
            pull: z.ZodOptional<z.ZodString>;
            push: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmBackendDescribeResponse = z.infer<typeof ScmBackendDescribeResponseSchema>;
export declare const ScmStatusSnapshotRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type ScmStatusSnapshotRequest = z.infer<typeof ScmStatusSnapshotRequestSchema>;
export declare const ScmStatusSnapshotResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    snapshot: z.ZodOptional<z.ZodObject<{
        projectKey: z.ZodString;
        fetchedAt: z.ZodNumber;
        repo: z.ZodObject<{
            isRepo: z.ZodBoolean;
            rootPath: z.ZodNullable<z.ZodString>;
            backendId: z.ZodNullable<z.ZodEnum<{
                git: "git";
                sapling: "sapling";
            }>>;
            mode: z.ZodNullable<z.ZodEnum<{
                ".git": ".git";
                ".sl": ".sl";
            }>>;
            worktrees: z.ZodDefault<z.ZodArray<z.ZodObject<{
                path: z.ZodString;
                branch: z.ZodNullable<z.ZodString>;
                isCurrent: z.ZodBoolean;
                isMain: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strip>>>;
        }, z.core.$strip>;
        capabilities: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
            readStatus: z.ZodBoolean;
            readDiffFile: z.ZodBoolean;
            readDiffCommit: z.ZodBoolean;
            readLog: z.ZodBoolean;
            readBranches: z.ZodOptional<z.ZodBoolean>;
            readStash: z.ZodOptional<z.ZodBoolean>;
            writeInclude: z.ZodBoolean;
            writeExclude: z.ZodBoolean;
            writeDiscard: z.ZodOptional<z.ZodBoolean>;
            writeCommit: z.ZodBoolean;
            writeCommitPathSelection: z.ZodBoolean;
            writeCommitLineSelection: z.ZodBoolean;
            writeBackout: z.ZodBoolean;
            writeBranchCreate: z.ZodOptional<z.ZodBoolean>;
            writeBranchCheckout: z.ZodOptional<z.ZodBoolean>;
            writeRemoteFetch: z.ZodBoolean;
            writeRemotePull: z.ZodBoolean;
            writeRemotePush: z.ZodBoolean;
            writeRemotePublish: z.ZodOptional<z.ZodBoolean>;
            writeStash: z.ZodOptional<z.ZodBoolean>;
            worktreeCreate: z.ZodBoolean;
            changeSetModel: z.ZodEnum<{
                index: "index";
                "working-copy": "working-copy";
            }>;
            supportedDiffAreas: z.ZodArray<z.ZodEnum<{
                included: "included";
                pending: "pending";
                both: "both";
            }>>;
            operationLabels: z.ZodOptional<z.ZodObject<{
                commit: z.ZodOptional<z.ZodString>;
                include: z.ZodOptional<z.ZodString>;
                exclude: z.ZodOptional<z.ZodString>;
                backout: z.ZodOptional<z.ZodString>;
                fetch: z.ZodOptional<z.ZodString>;
                pull: z.ZodOptional<z.ZodString>;
                push: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
        branch: z.ZodObject<{
            head: z.ZodNullable<z.ZodString>;
            upstream: z.ZodNullable<z.ZodString>;
            ahead: z.ZodNumber;
            behind: z.ZodNumber;
            detached: z.ZodBoolean;
        }, z.core.$strip>;
        stashCount: z.ZodOptional<z.ZodNumber>;
        hasConflicts: z.ZodBoolean;
        entries: z.ZodArray<z.ZodObject<{
            path: z.ZodString;
            previousPath: z.ZodNullable<z.ZodString>;
            kind: z.ZodEnum<{
                added: "added";
                modified: "modified";
                deleted: "deleted";
                renamed: "renamed";
                copied: "copied";
                untracked: "untracked";
                conflicted: "conflicted";
            }>;
            includeStatus: z.ZodString;
            pendingStatus: z.ZodString;
            hasIncludedDelta: z.ZodBoolean;
            hasPendingDelta: z.ZodBoolean;
            stats: z.ZodObject<{
                includedAdded: z.ZodNumber;
                includedRemoved: z.ZodNumber;
                pendingAdded: z.ZodNumber;
                pendingRemoved: z.ZodNumber;
                isBinary: z.ZodBoolean;
            }, z.core.$strip>;
        }, z.core.$strip>>;
        totals: z.ZodObject<{
            includedFiles: z.ZodNumber;
            pendingFiles: z.ZodNumber;
            untrackedFiles: z.ZodNumber;
            includedAdded: z.ZodNumber;
            includedRemoved: z.ZodNumber;
            pendingAdded: z.ZodNumber;
            pendingRemoved: z.ZodNumber;
        }, z.core.$strip>;
    }, z.core.$strip>>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmStatusSnapshotResponse = z.infer<typeof ScmStatusSnapshotResponseSchema>;
export declare const ScmDiffFileRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
    path: z.ZodString;
    area: z.ZodOptional<z.ZodEnum<{
        included: "included";
        pending: "pending";
        both: "both";
    }>>;
}, z.core.$strip>;
export type ScmDiffFileRequest = z.infer<typeof ScmDiffFileRequestSchema>;
export declare const ScmDiffFileResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    diff: z.ZodOptional<z.ZodString>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmDiffFileResponse = z.infer<typeof ScmDiffFileResponseSchema>;
export declare const ScmDiffCommitRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
    commit: z.ZodString;
}, z.core.$strip>;
export type ScmDiffCommitRequest = z.infer<typeof ScmDiffCommitRequestSchema>;
export declare const ScmDiffCommitResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    diff: z.ZodOptional<z.ZodString>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmDiffCommitResponse = z.infer<typeof ScmDiffCommitResponseSchema>;
export declare const ScmChangeApplyRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
    paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
    patch: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type ScmChangeApplyRequest = z.infer<typeof ScmChangeApplyRequestSchema>;
export declare const ScmChangeApplyResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    stdout: z.ZodOptional<z.ZodString>;
    stderr: z.ZodOptional<z.ZodString>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmChangeApplyResponse = z.infer<typeof ScmChangeApplyResponseSchema>;
export declare const ScmChangeDiscardEntrySchema: z.ZodObject<{
    path: z.ZodString;
    kind: z.ZodEnum<{
        added: "added";
        modified: "modified";
        deleted: "deleted";
        renamed: "renamed";
        copied: "copied";
        untracked: "untracked";
        conflicted: "conflicted";
    }>;
}, z.core.$strip>;
export type ScmChangeDiscardEntry = z.infer<typeof ScmChangeDiscardEntrySchema>;
export declare const ScmChangeDiscardRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
    entries: z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        kind: z.ZodEnum<{
            added: "added";
            modified: "modified";
            deleted: "deleted";
            renamed: "renamed";
            copied: "copied";
            untracked: "untracked";
            conflicted: "conflicted";
        }>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type ScmChangeDiscardRequest = z.infer<typeof ScmChangeDiscardRequestSchema>;
export declare const ScmChangeDiscardResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    stdout: z.ZodOptional<z.ZodString>;
    stderr: z.ZodOptional<z.ZodString>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmChangeDiscardResponse = z.infer<typeof ScmChangeDiscardResponseSchema>;
export declare const ScmCommitPatchSchema: z.ZodObject<{
    path: z.ZodString;
    patch: z.ZodString;
}, z.core.$strip>;
export type ScmCommitPatch = z.infer<typeof ScmCommitPatchSchema>;
export declare const ScmCommitCreateRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
    message: z.ZodString;
    scope: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
        kind: z.ZodLiteral<"all-pending">;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"paths">;
        include: z.ZodArray<z.ZodString>;
        exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>]>>;
    patches: z.ZodOptional<z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        patch: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
export type ScmCommitCreateRequest = z.infer<typeof ScmCommitCreateRequestSchema>;
export declare const ScmCommitCreateResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    commitSha: z.ZodOptional<z.ZodString>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmCommitCreateResponse = z.infer<typeof ScmCommitCreateResponseSchema>;
export declare function parseScmPatchPaths(patch: string): string[];
export declare function isScmPatchBoundToPath(path: string, patch: string): boolean;
export declare const ScmLogEntrySchema: z.ZodObject<{
    sha: z.ZodString;
    shortSha: z.ZodString;
    authorName: z.ZodString;
    authorEmail: z.ZodString;
    timestamp: z.ZodNumber;
    subject: z.ZodString;
    body: z.ZodString;
}, z.core.$strip>;
export type ScmLogEntry = z.infer<typeof ScmLogEntrySchema>;
export declare const ScmLogListRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
    limit: z.ZodOptional<z.ZodNumber>;
    skip: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type ScmLogListRequest = z.infer<typeof ScmLogListRequestSchema>;
export declare const ScmLogListResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    entries: z.ZodOptional<z.ZodArray<z.ZodObject<{
        sha: z.ZodString;
        shortSha: z.ZodString;
        authorName: z.ZodString;
        authorEmail: z.ZodString;
        timestamp: z.ZodNumber;
        subject: z.ZodString;
        body: z.ZodString;
    }, z.core.$strip>>>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmLogListResponse = z.infer<typeof ScmLogListResponseSchema>;
export declare const ScmCommitBackoutRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
    commit: z.ZodString;
}, z.core.$strip>;
export type ScmCommitBackoutRequest = z.infer<typeof ScmCommitBackoutRequestSchema>;
export declare const ScmCommitBackoutResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    stdout: z.ZodOptional<z.ZodString>;
    stderr: z.ZodOptional<z.ZodString>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmCommitBackoutResponse = z.infer<typeof ScmCommitBackoutResponseSchema>;
export declare const ScmRemoteRequestSchema: z.ZodObject<{
    cwd: z.ZodOptional<z.ZodString>;
    backendPreference: z.ZodOptional<z.ZodObject<{
        kind: z.ZodLiteral<"prefer">;
        backendId: z.ZodEnum<{
            git: "git";
            sapling: "sapling";
        }>;
    }, z.core.$strip>>;
    remote: z.ZodOptional<z.ZodString>;
    branch: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type ScmRemoteRequest = z.infer<typeof ScmRemoteRequestSchema>;
export declare const ScmRemoteResponseSchema: z.ZodObject<{
    success: z.ZodBoolean;
    stdout: z.ZodOptional<z.ZodString>;
    stderr: z.ZodOptional<z.ZodString>;
    error: z.ZodOptional<z.ZodString>;
    errorCode: z.ZodOptional<z.ZodEnum<{
        INVALID_REQUEST: "INVALID_REQUEST";
        NOT_REPOSITORY: "NOT_REPOSITORY";
        INVALID_PATH: "INVALID_PATH";
        COMMAND_FAILED: "COMMAND_FAILED";
        CHANGE_APPLY_FAILED: "CHANGE_APPLY_FAILED";
        COMMIT_REQUIRED: "COMMIT_REQUIRED";
        CONFLICTING_WORKTREE: "CONFLICTING_WORKTREE";
        REMOTE_AUTH_REQUIRED: "REMOTE_AUTH_REQUIRED";
        REMOTE_UPSTREAM_REQUIRED: "REMOTE_UPSTREAM_REQUIRED";
        REMOTE_NON_FAST_FORWARD: "REMOTE_NON_FAST_FORWARD";
        REMOTE_FF_ONLY_REQUIRED: "REMOTE_FF_ONLY_REQUIRED";
        REMOTE_REJECTED: "REMOTE_REJECTED";
        REMOTE_NOT_FOUND: "REMOTE_NOT_FOUND";
        FEATURE_UNSUPPORTED: "FEATURE_UNSUPPORTED";
        BACKEND_UNAVAILABLE: "BACKEND_UNAVAILABLE";
    }>>;
}, z.core.$strip>;
export type ScmRemoteResponse = z.infer<typeof ScmRemoteResponseSchema>;
export type ScmRemoteTarget = {
    remote: string;
    branch: string | null;
};
export declare function parseScmUpstreamRef(upstream: string | null | undefined): ScmRemoteTarget | null;
export declare function inferScmRemoteTarget(input: {
    upstream: string | null | undefined;
    head: string | null | undefined;
    defaultRemote?: string;
    allowHeadFallback?: boolean;
}): ScmRemoteTarget;
export type ScmRemoteMutationKind = 'push' | 'pull';
export type ScmRemoteMutationReason = 'conflicts_present' | 'upstream_required' | 'detached_head' | 'branch_behind_remote' | 'clean_worktree_required';
export type ScmRemoteMutationSnapshot = {
    hasConflicts: boolean;
    branch: Pick<ScmWorkingSnapshot['branch'], 'head' | 'upstream' | 'behind' | 'detached'>;
    totals: Pick<ScmWorkingSnapshot['totals'], 'includedFiles' | 'pendingFiles' | 'untrackedFiles'>;
};
export type ScmRemoteMutationPolicy = {
    requireUpstreamWhenNoExplicitTarget: boolean;
    requireActiveHead: boolean;
    blockPushOnConflicts: boolean;
    blockPushWhenBehind: boolean;
    requireCleanPull: boolean;
};
export type ScmRemoteMutationResult = {
    ok: true;
} | {
    ok: false;
    reason: ScmRemoteMutationReason;
};
export type ScmRemoteRequestNormalizationResult = {
    ok: true;
    request: {
        remote: string | undefined;
        branch: string | undefined;
    };
} | {
    ok: false;
    error: string;
};
export declare function normalizeScmRemoteRequest(request: Readonly<Pick<ScmRemoteRequest, 'remote' | 'branch'>>): ScmRemoteRequestNormalizationResult;
export declare function hasAnyPendingScmChanges(snapshot: Pick<ScmRemoteMutationSnapshot, 'totals'>): boolean;
export declare function evaluateScmRemoteMutationPolicy(input: {
    kind: ScmRemoteMutationKind;
    snapshot: ScmRemoteMutationSnapshot;
    hasExplicitTarget: boolean;
    policy: ScmRemoteMutationPolicy;
}): ScmRemoteMutationResult;
export type ScmOperationErrorCategory = 'repository' | 'path' | 'request' | 'command' | 'change' | 'commit' | 'worktree' | 'remote' | 'capability' | 'backend' | 'unknown';
export declare function classifyScmOperationErrorCode(errorCode: ScmOperationErrorCode | undefined): ScmOperationErrorCategory;
export declare function mapSaplingScmErrorCode(stderr: string): ScmOperationErrorCode;
export declare function mapGitScmErrorCode(stderr: string): ScmOperationErrorCode;
//# sourceMappingURL=scm.d.ts.map