/**
 * AgentWorktree — Manages git worktree lifecycle for spawned agents.
 *
 * Each agent works in an isolated git worktree so its file changes are
 * sandboxed from the main working tree.
 *
 * Lifecycle:
 *   create()  — create worktree + branch, return path
 *   merge()   — merge agent branch back to current branch, remove worktree
 *   cleanup() — remove worktree without merging (cancel/error path)
 */
export declare class AgentWorktree {
    private readonly git;
    constructor(cwd: string);
    /**
     * Create a new worktree for the given agent.
     * Returns the absolute path to the worktree directory.
     */
    create(agentId: string): Promise<string>;
    /**
     * Merge the agent's branch back into the current branch and remove the worktree.
     * Returns true if a merge was performed, false if no changes were found.
     */
    merge(agentId: string): Promise<boolean>;
    /**
     * Remove the worktree without merging (cancel/error path).
     */
    cleanup(agentId: string): Promise<void>;
    private _worktreePath;
    private _branchName;
    /**
     * Check whether the agent branch has any commits that differ from
     * the current branch (the main working tree HEAD).
     */
    private _hasChanges;
    /**
     * Force-remove a worktree directory.
     */
    private _removeWorktree;
    /**
     * Delete a branch (no-op if it doesn't exist).
     */
    private _deleteBranch;
}
//# sourceMappingURL=worktree.d.ts.map