/** * Worktree Manager for Hari Seldon * * Manages the lifecycle of git worktrees for parallel agent execution. */ import { BranchManager } from './branch-manager.js'; import type { Worktree, WorktreeStatus, WorktreeConfig, WorktreeInstructions, WorktreeAllocationResult } from '../types.js'; export declare class WorktreeManager { private readonly config; private readonly branchManager; private readonly repoPath; private readonly logger; private worktrees; constructor(repoPath: string, config: WorktreeConfig); /** * Initialize the worktree manager */ initialize(): Promise; /** * Sync in-memory state with actual git worktrees */ syncWorktrees(): Promise; /** * Create a new worktree for a task */ create(taskId: string, baseBranch?: string): Promise; /** * Assign a worktree to an agent */ assign(worktreeId: string, agentId: string): Promise; /** * Mark worktree as active (agent is using it) */ activate(worktreeId: string): Promise; /** * Release a worktree (task completed) */ release(worktreeId: string): Promise; /** * Remove a worktree */ remove(worktreeId: string, deleteBranch?: boolean): Promise; /** * Get worktree by ID */ get(worktreeId: string): Worktree | undefined; /** * Get worktree by task ID */ getByTaskId(taskId: string): Worktree | undefined; /** * List all worktrees */ list(): Worktree[]; /** * List worktrees by status */ listByStatus(status: WorktreeStatus): Worktree[]; /** * Generate instructions for an agent to use a worktree */ generateInstructions(worktree: Worktree): WorktreeInstructions; /** * Allocate a worktree for a task (create + assign + generate instructions) */ allocate(taskId: string, agentId: string): Promise; /** * Cleanup stale worktrees */ cleanup(): Promise; /** * Get the branch manager for advanced operations */ getBranchManager(): BranchManager; } //# sourceMappingURL=manager.d.ts.map