/** * Git Worktree Manager — RFC-0005 * * Creates isolated workspaces for parallel or recoverable coding tasks. * * Goals: * - avoid branch conflicts * - preserve partial work * - allow reviewer agent to inspect diffs * - allow separate models to work on separate tasks */ import type { WorktreeInfo } from "../../packages/types/src/runtime-types.ts"; export interface WorktreeOptions { rootDir: string; baseBranch?: string; } export interface CreateWorktreeOptions { name: string; branch?: string; jobId?: string; taskId?: string; startPoint?: string; } export interface WorktreeDiff { file: string; status: "added" | "modified" | "deleted" | "renamed"; insertions?: number; deletions?: number; } export declare class WorktreeManager { private readonly rootDir; private readonly baseBranch; private readonly metaPath; constructor(options: WorktreeOptions); /** * Create a new worktree */ create(options: CreateWorktreeOptions): Promise; /** * List all worktrees */ list(): Promise; /** * Get worktree by name */ get(name: string): Promise; /** * Get worktree by job ID */ getByJob(jobId: string): Promise; /** * Remove a worktree */ remove(name: string, force?: boolean): Promise; /** * Prune stale worktrees */ prune(): Promise; /** * Get diff between worktree and base */ getDiff(worktreePath: string): Promise; /** * Get uncommitted changes */ getUncommitted(worktreePath: string): Promise; /** * Mark worktree as merged */ markMerged(name: string): Promise; /** * Execute git command */ private execGit; /** * Save worktree to metadata */ private saveWorktree; /** * Save all worktrees */ private saveAllWorktrees; /** * List worktrees synchronously */ private listSync; } //# sourceMappingURL=worktree.d.ts.map