import type { WorktreeInfo } from './types.js'; /** A failed isolated task must leave a recovery trail a developer can act on immediately. */ export declare function preservedWorktreeNotice(info: WorktreeInfo): string; export declare function isGitRepo(cwd: string): Promise; /** * Which repository, if any, a workspace's git commands would act on. * * `rev-parse` walks upwards, so a directory with no repository of its own answers for whichever * ancestor has one. Reported from a real setup: a session in ~/dev/suggest, which has no .git at * all, was offered the git tools because ~/dev is a repository — so a commit from that session * would have been a commit in ~/dev, a tree holding every other project on the machine. * * The user's words were "the project has no linked git", and they were right. The cost is not the * tokens; it is that `git_commit` in a workspace with no repository of its own reaches outside it. */ export interface GitScope { /** Whether any repository answers for this directory. */ isRepo: boolean; /** The repository's root, if there is one. */ root: string | null; /** * Whether that root is the workspace or inside it. * * False means the repository encloses the workspace: its history, its other projects and its * remote are all outside what was opened, and a write to it is a write outside the workspace. */ ownedByWorkspace: boolean; } export declare function gitScope(cwd: string): Promise; /** * Worktree creation changes Git state, so it follows the same ownership boundary as Koneck's Git * tools. `git rev-parse` alone is deliberately insufficient: it also answers for a repository * several directories above the workspace the developer opened. */ export declare function hasWorkspaceOwnedGitRepo(cwd: string): Promise; export declare function getCurrentBranch(cwd: string): Promise; export declare function createWorktree(cwd: string, label: string): Promise; export declare function removeWorktree(info: WorktreeInfo): Promise; export declare function mergeWorktree(info: WorktreeInfo, message: string): Promise; export declare function listWorktrees(cwd: string): Promise; //# sourceMappingURL=worktree.d.ts.map