import { type RepositoryIdentity } from "../repository-identity.ts";
export declare class MoveRefusedError extends Error {
    readonly code = "move_repository_mismatch";
    constructor(targetCwd: string, sourceCwd?: string);
}
/**
 * A folder that does not exist on this device. It has no repository identity either, but it is
 * told apart from a mismatch: only this device can say which, and the client words the two differently.
 */
declare class MoveTargetMissingError extends Error {
    readonly code = "workspace_missing";
    constructor(targetCwd: string);
}
/** What the folder is to the session's repository: a checkout of it, missing on this device, or anything else. */
type CheckoutVerdict = "same" | "missing" | "other";
/** `cwd` is resolved the way the import resolves it, so both steps read the identity of the same folder. */
export declare function checkoutVerdict(cwd: string, repository: RepositoryIdentity | undefined, read?: (dir: string) => Promise<RepositoryIdentity | undefined>): Promise<CheckoutVerdict>;
/** The refusal for a folder that is not a checkout of the session's repository. */
export declare const checkoutRefusal: (verdict: Exclude<CheckoutVerdict, "same">, targetCwd: string, sourceCwd?: string) => MoveRefusedError | MoveTargetMissingError;
export {};
//# sourceMappingURL=repository-check.d.ts.map