/** * Main checkout of a Git worktree. * * SpecWithCode runs threads in linked worktrees outside the project * (`~/.specwithcode//worktrees/*`), where no `.specweave/` is found by * walking up. A linked worktree's `.git` is a file whose `gitdir:` line points * into `
/.git/worktrees/`, so the main checkout (and the planning * root above it) can be found from that line alone. * * Sync `fs` only and no Git process: the hook launcher inlines the same logic * (`plugins/specweave/hooks/run.mjs`, `run-worker.mjs`) and a parity test keeps * the copies equal. * * @module utils/main-checkout */ /** * The main checkout of the linked worktree containing `dir`, or null when the * nearest `.git` is a directory (an ordinary checkout), a submodule link * (`.git/modules/`), unreadable, or absent. */ export declare function mainCheckoutOf(dir: string): string | null; /** Top of the linked worktree containing `dir` (the folder holding its `.git` file), or null. */ export declare function linkedWorktreeRoot(dir: string): string | null; /** * Where Git commands for work started in `startDir` run. Planning state may * resolve to the main checkout (`findEffectiveRoot`), but a thread's branch, * diff and pushes live in its own worktree. */ export declare function gitCheckoutFor(startDir: string, planningRoot: string): string; //# sourceMappingURL=main-checkout.d.ts.map