Documentation
¶
Overview ¶
Package worktrees provides Git worktree isolation for multi-agent sessions.
Index ¶
- type WorktreeInfo
- type WorktreeManager
- func (m *WorktreeManager) Cleanup() error
- func (m *WorktreeManager) CreateForAgent(agentName string) (*WorktreeInfo, error)
- func (m *WorktreeManager) GetWorktreeForAgent(agentName string) (*WorktreeInfo, error)
- func (m *WorktreeManager) ListWorktrees() ([]*WorktreeInfo, error)
- func (m *WorktreeManager) MergeBack(agentName string) error
- func (m *WorktreeManager) RemoveWorktree(agentName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorktreeInfo ¶
type WorktreeInfo struct {
AgentName string `json:"agent_name"`
Path string `json:"path"`
BranchName string `json:"branch_name"`
SessionID string `json:"session_id"`
Created bool `json:"created"`
Error string `json:"error,omitempty"`
}
WorktreeInfo contains information about an agent's worktree
type WorktreeManager ¶
type WorktreeManager struct {
// contains filtered or unexported fields
}
WorktreeManager manages Git worktrees for agent isolation
func NewManager ¶
func NewManager(projectPath, session string) *WorktreeManager
NewManager creates a new WorktreeManager
func (*WorktreeManager) Cleanup ¶
func (m *WorktreeManager) Cleanup() error
Cleanup removes all worktrees for the current session
func (*WorktreeManager) CreateForAgent ¶
func (m *WorktreeManager) CreateForAgent(agentName string) (*WorktreeInfo, error)
CreateForAgent creates a new worktree for the specified agent
func (*WorktreeManager) GetWorktreeForAgent ¶
func (m *WorktreeManager) GetWorktreeForAgent(agentName string) (*WorktreeInfo, error)
GetWorktreeForAgent returns worktree information for a specific agent
func (*WorktreeManager) ListWorktrees ¶
func (m *WorktreeManager) ListWorktrees() ([]*WorktreeInfo, error)
ListWorktrees returns information about all worktrees for the current session
func (*WorktreeManager) MergeBack ¶
func (m *WorktreeManager) MergeBack(agentName string) error
MergeBack merges an agent's worktree changes back to the main branch
func (*WorktreeManager) RemoveWorktree ¶
func (m *WorktreeManager) RemoveWorktree(agentName string) error
RemoveWorktree removes a specific agent's worktree
Click to show internal directories.
Click to hide internal directories.