Documentation
¶
Index ¶
- type LifecycleManager
- func (m *LifecycleManager) Adopt(ctx context.Context, cardID string) error
- func (m *LifecycleManager) BranchContext(ctx context.Context, cardID, path string) string
- func (m *LifecycleManager) BranchName(cardID string) string
- func (m *LifecycleManager) ExistingOrBase(ctx context.Context, request LifecycleRequest) (string, error)
- func (m *LifecycleManager) Prepare(ctx context.Context, request LifecycleRequest) (string, error)
- func (m *LifecycleManager) Remove(_ string, _ bool) error
- func (m *LifecycleManager) WorktreePath(cardID string) string
- type LifecycleReason
- type LifecycleRequest
- type Manager
- func (m *Manager) BranchName(cardID string) string
- func (m *Manager) Create(cardID string, branchName string) (string, error)
- func (m *Manager) Get(cardID string) (string, bool)
- func (m *Manager) ListActive() []string
- func (m *Manager) Remove(cardID string, force bool) error
- func (m *Manager) SetupSymlinks(worktreePath string) error
- func (m *Manager) WorktreePath(cardID string) string
- type RunResult
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LifecycleManager ¶ added in v0.13.0
type LifecycleManager struct {
BaseRepo string
WorktreesBase string
ExecutorType string
Config rules.WorktreeConfig
// contains filtered or unexported fields
}
LifecycleManager implements the opt-in lifecycle contract. The older Manager remains intentionally untouched for configurations without worktree.
func NewLifecycleManager ¶ added in v0.13.0
func NewLifecycleManager(baseRepo, worktreesDir, executorType string, config rules.WorktreeConfig) (*LifecycleManager, error)
func (*LifecycleManager) Adopt ¶ added in v0.13.0
func (m *LifecycleManager) Adopt(ctx context.Context, cardID string) error
Adopt is an explicit administrator preflight. It only writes a verified ownership record and never renames, resets, cleans, or prepares source.
func (*LifecycleManager) BranchContext ¶ added in v0.13.2
func (m *LifecycleManager) BranchContext(ctx context.Context, cardID, path string) string
BranchContext reports checkout drift to the executor without changing source, rewriting the expected branch, or turning branch inspection into a run gate. The caller has already selected and verified this worktree's ownership.
func (*LifecycleManager) BranchName ¶ added in v0.13.0
func (m *LifecycleManager) BranchName(cardID string) string
func (*LifecycleManager) ExistingOrBase ¶ added in v0.13.0
func (m *LifecycleManager) ExistingOrBase(ctx context.Context, request LifecycleRequest) (string, error)
ExistingOrBase deliberately performs no create, hook, link, setup, prune, repair, or record mutation. It is used by safe stop actions.
func (*LifecycleManager) Prepare ¶ added in v0.13.0
func (m *LifecycleManager) Prepare(ctx context.Context, request LifecycleRequest) (string, error)
Prepare creates or verifies a worktree, then runs only the configured materialization, sharing, and preparation phases within the caller deadline.
func (*LifecycleManager) Remove ¶ added in v0.13.0
func (m *LifecycleManager) Remove(_ string, _ bool) error
Remove intentionally does not implement a second Done-retirement path. The validated direct cleanup rule introduced by #67 remains responsible for retirement when lifecycle configuration is enabled.
func (*LifecycleManager) WorktreePath ¶ added in v0.13.0
func (m *LifecycleManager) WorktreePath(cardID string) string
type LifecycleReason ¶ added in v0.13.0
type LifecycleReason string
const ( LifecycleCreate LifecycleReason = "create" LifecycleReuse LifecycleReason = "reuse" )
type LifecycleRequest ¶ added in v0.13.0
type LifecycleRequest struct {
CardID string
BoardID string
Reason LifecycleReason
}
type Manager ¶
type Manager struct {
BaseRepo string
WorktreesBase string
SetupCommand string
ExecutorType string
Runner Runner
// contains filtered or unexported fields
}