Documentation
¶
Index ¶
- func CollaborationCommands(runtime shared.Runtime, factory func(string) (CollaborationOperations, error)) []*cobra.Command
- func NewAbort(runtime shared.Runtime, deps AbortDependencies) *cobra.Command
- func NewActive(runtime shared.Runtime, deps worktreerun.ActiveDependencies) *cobra.Command
- func NewAdopt(runtime shared.Runtime, ...) *cobra.Command
- func NewBackfill(runtime shared.Runtime, ...) *cobra.Command
- func NewCheckpointFetch(...) *cobra.Command
- func NewCleanup(runtime shared.Runtime, deps CleanupDependencies) *cobra.Command
- func NewCorrectIdentity(environment shared.Runtime, ...) *cobra.Command
- func NewCreate(environment shared.Runtime, dependencies CreateDependencies) *cobra.Command
- func NewEnd(runtime shared.Runtime, ...) *cobra.Command
- func NewGC(runtime shared.Runtime, deps GCDependencies) *cobra.Command
- func NewGuard(environment shared.Runtime, ...) *cobra.Command
- func NewInfo(runtime shared.Runtime, ...) *cobra.Command
- func NewLand(runtime shared.Runtime, operations MergeOperations, bindings MergeBindings) *cobra.Command
- func NewList(runtime shared.Runtime, ...) *cobra.Command
- func NewMarker(runtime shared.Runtime, operations MarkerOperations) *cobra.Command
- func NewMerge(runtime shared.Runtime, operations MergeOperations, bindings MergeBindings) *cobra.Command
- func NewOrphans(runtime shared.Runtime, ...) *cobra.Command
- func NewOwn(operations OwnOperations) *cobra.Command
- func NewReceipt(deps ReceiptDependencies) *cobra.Command
- func NewRelocate(environment shared.Runtime, dependencies RelocateDependencies) *cobra.Command
- func NewRename(environment shared.Runtime, dependencies RenameDependencies) *cobra.Command
- func NewRescue(runtime shared.Runtime, ops RescueOperations) *cobra.Command
- func NewRetire(runtime shared.Runtime, deps RetireDependencies) *cobra.Command
- func NewSet(environment shared.Runtime, ...) *cobra.Command
- func NewSummary(runtime shared.Runtime, ...) *cobra.Command
- func NewWorkLog(environment shared.Runtime, operations JournalOperations, ...) *cobra.Command
- type AbortDependencies
- type CleanupDependencies
- type CollaborationOperations
- type CreateDependencies
- type GCDependencies
- type InventoryProgress
- type JournalAdmission
- type JournalOperations
- type MarkerOperations
- type MergeBindings
- type MergeOperations
- type OwnOperations
- type ReceiptDependencies
- type RelocateDependencies
- type RenameDependencies
- type RescueOperations
- type RetireDependencies
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollaborationCommands ¶
func CollaborationCommands(runtime shared.Runtime, factory func(string) (CollaborationOperations, error)) []*cobra.Command
CollaborationCommands constructs worktree collaboration verbs with lazy flags.
func NewActive ¶
func NewActive(runtime shared.Runtime, deps worktreerun.ActiveDependencies) *cobra.Command
NewActive constructs compact local and cross-machine overlap preflight.
func NewAdopt ¶
func NewAdopt(runtime shared.Runtime, operation func(context.Context, worktrees.AdoptOptions) ([]worktrees.AdoptResult, error), admit func(*cobra.Command, bool) (func(), error)) *cobra.Command
NewAdopt constructs the worktree adopt command.
func NewBackfill ¶
func NewBackfill(runtime shared.Runtime, operation func(context.Context, worktrees.BackfillOptions) ([]worktrees.BackfillResult, error)) *cobra.Command
NewBackfill constructs the worktree backfill command.
func NewCheckpointFetch ¶
func NewCheckpointFetch(fetch func(context.Context, worktrees.FetchRemoteCheckpointOptions) (worktrees.RemoteCheckpointFetchResult, error)) *cobra.Command
NewCheckpointFetch constructs the worktree journal command. NewCheckpointFetch constructs the checkpoint retrieval command.
func NewCleanup ¶
func NewCleanup(runtime shared.Runtime, deps CleanupDependencies) *cobra.Command
func NewCorrectIdentity ¶
func NewCorrectIdentity(environment shared.Runtime, correct func(worktrees.CorrectExecutionIdentityOptions) (worktrees.ExecutionIdentityCorrectionResult, error), admit JournalAdmission, initiator func(*cobra.Command) string) *cobra.Command
NewCorrectIdentity constructs the worktree journal command.
func NewCreate ¶
func NewCreate(environment shared.Runtime, dependencies CreateDependencies) *cobra.Command
NewCreate constructs the managed worktree creation command.
func NewGuard ¶
func NewGuard(environment shared.Runtime, inspect func(context.Context, string, worktrees.GuardOptions) (worktrees.GuardResult, error), isTerminal func(any) bool) *cobra.Command
NewGuard constructs the checkout policy inspection command.
func NewInfo ¶
func NewInfo(runtime shared.Runtime, inspect func(context.Context, worktreerun.InfoRequest) (worktreerun.InfoDocument, error)) *cobra.Command
NewInfo constructs the redacted inspection command.
func NewLand ¶
func NewLand(runtime shared.Runtime, operations MergeOperations, bindings MergeBindings) *cobra.Command
func NewList ¶
func NewList(runtime shared.Runtime, list func(context.Context, worktrees.ListOptions) (worktrees.ListOutcome, error)) *cobra.Command
NewList constructs the worktree inventory list command.
func NewMerge ¶
func NewMerge(runtime shared.Runtime, operations MergeOperations, bindings MergeBindings) *cobra.Command
func NewOrphans ¶
func NewOrphans(runtime shared.Runtime, operation func(context.Context, worktrees.OrphanOptions) (worktrees.OrphanReport, error)) *cobra.Command
NewOrphans constructs the worktree orphans command.
func NewOwn ¶
func NewOwn(operations OwnOperations) *cobra.Command
func NewReceipt ¶
func NewReceipt(deps ReceiptDependencies) *cobra.Command
NewReceipt constructs verification evidence commands without importing the executable.
func NewRelocate ¶
func NewRelocate(environment shared.Runtime, dependencies RelocateDependencies) *cobra.Command
NewRelocate constructs a managed checkout relocation command.
func NewRename ¶
func NewRename(environment shared.Runtime, dependencies RenameDependencies) *cobra.Command
NewRename constructs a managed checkout recycle command.
func NewSet ¶
func NewSet(environment shared.Runtime, steer func(context.Context, worktrees.LogSteerOptions) (worktrees.LogVerbResult, error)) *cobra.Command
NewSet constructs the worktree journal command.
func NewSummary ¶
func NewSummary(runtime shared.Runtime, list func(context.Context, worktrees.ListOptions) (worktrees.ListOutcome, error)) *cobra.Command
NewSummary constructs the worktree inventory summary command.
func NewWorkLog ¶
func NewWorkLog(environment shared.Runtime, operations JournalOperations, admit JournalAdmission) *cobra.Command
NewWorkLog constructs the worktree journal command.
Types ¶
type AbortDependencies ¶
type CleanupDependencies ¶
type CleanupDependencies struct {
Run func(context.Context, worktrees.CleanupOptions) (worktrees.CleanupOutcome, error)
Shells func(context.Context, worktrees.RetireShellsOptions) (worktrees.RetireShellsOutcome, error)
Recover func(context.Context, worktrees.RetiredStageRecoveryOptions) (worktrees.RetiredStageRecoveryOutcome, error)
Progress func(*cobra.Command, bool) InventoryProgress
// Root applies its existing fatal-release-leak policy; remote engine outcomes
// remain authoritative and are never reconstructed by this CLI adapter.
Release func(*cobra.Command, string, string) bool
}
type CollaborationOperations ¶
type CollaborationOperations interface {
Join(context.Context, string) (worktreecollab.State, error)
Leave(context.Context, string) (worktreecollab.State, error)
Take(context.Context, string, string, bool, string) (worktreecollab.State, error)
Transfer(context.Context, string, string) (worktreecollab.State, error)
Send(context.Context, string, string, []string, string) (worktreecollab.SendReceipt, bool, error)
Inbox(context.Context, string) (worktreecollab.InboxView, error)
Ack(context.Context, string, string) (uint64, error)
}
CollaborationOperations is the custody and messaging authority used by commands. The existing worktreecollab.Service implements these operations.
type CreateDependencies ¶
type CreateDependencies struct {
Run func(context.Context, []string, worktrees.CreateOptions) ([]worktrees.CreateResult, error)
OriginSlug func(context.Context, string) (string, error)
PrepareLog func(string, string, worktrees.WorkLogOptions) (worktrees.WorkLogOptions, error)
RegisteredIdentity func() (worktrees.AgentIdentity, bool)
BeforeCreate func(string, []string) error
Claim func(*cobra.Command, bool, string, string) worktreerun.RemoteClaimOutcome
AfterCreate func(*cobra.Command, string, []worktrees.CreateResult)
}
type GCDependencies ¶
type InventoryProgress ¶
type InventoryProgress struct {
Report func(worktrees.ListProgress)
Finish func()
}
type JournalAdmission ¶
type JournalOperations ¶
type JournalOperations struct {
Load func(context.Context, worktrees.LoadWorkLogOptions) (worktrees.WorkLogView, error)
Show func(context.Context, string, string) (worktrees.WorkLogView, worktrees.LocalWorkLogProjection, error)
Init func(context.Context, worktrees.LogInitOptions) (worktrees.LogVerbResult, error)
Steer func(context.Context, worktrees.LogSteerOptions) (worktrees.LogVerbResult, error)
Checkpoint func(context.Context, worktrees.LogCheckpointOptions) (worktrees.LogVerbResult, error)
Refresh func(context.Context, worktrees.LogRefreshOptions) (worktrees.LogVerbResult, error)
Integrate func(context.Context, worktrees.LogIntegrateOptions) (worktrees.LogVerbResult, error)
Handoff func(context.Context, worktrees.LogHandoffOptions) (worktrees.LogVerbResult, error)
Recover func(context.Context, worktrees.LogRecoverOptions) (worktrees.LogVerbResult, error)
Finalize func(context.Context, worktrees.LogFinalizeOptions) (worktrees.LogVerbResult, error)
Sync func(context.Context, worktrees.LogSyncOptions) (worktrees.LogVerbResult, error)
Archive func(context.Context, worktrees.LogArchiveOptions) (worktrees.LogVerbResult, error)
}
type MarkerOperations ¶
type MarkerOperations struct {
Run func(context.Context, checkoutsetup.MarkerRequest) ([]checkoutsetup.MarkerOutcome, error)
Version func() string
}
type MergeBindings ¶
type MergeBindings struct {
Admission JournalAdmission
Initiator func(*cobra.Command) string
Discovery func(*cobra.Command, string)
Quiet func(*cobra.Command)
Landing func(*cobra.Command, string) *cobra.Command
RefusePaths func(string, []string) error
RefuseReceipt func(string, string) error
LaneRequest func(string, string, string, bool) orchestrate.LaneGuardRequest
ReleaseLane func(string, orchestrate.WorktreeMergeReceipt)
CheckoutUpdated func(io.Writer) func(context.Context, orchestrate.CheckoutUpdate)
}
type MergeOperations ¶
type MergeOperations struct {
AcknowledgeAbsorbedConflict func(ctx context.Context, options orchestrate.WorktreeMergeAbsorbedConflictAcknowledgementOptions) (orchestrate.WorktreeMergeAbsorbedConflictAcknowledgement, error)
AcknowledgeLandedMergeFailure func(ctx context.Context, options orchestrate.WorktreeMergeLandedFailureAcknowledgementOptions) (orchestrate.WorktreeMergeLandedFailureAcknowledgement, error)
AcknowledgeMissingWorktreeMergeCleanup func(ctx context.Context, options orchestrate.WorktreeMergeMissingCleanupAcknowledgementOptions) (orchestrate.WorktreeMergeMissingCleanupAcknowledgement, error)
AcknowledgeRetiredPrepareCandidate func(ctx context.Context, options orchestrate.WorktreeMergeRetiredPrepareCandidateAcknowledgementOptions) (retiredcandidateack.Acknowledgement, error)
AcknowledgeRetiredPublication func(ctx context.Context, options orchestrate.WorktreeMergeRetiredPublicationAcknowledgementOptions) (orchestrate.WorktreeMergeRetiredPublicationAcknowledgement, error)
AcknowledgeStrandedPullRequestLanding func(ctx context.Context, options orchestrate.WorktreeMergeStrandedLandingAcknowledgementOptions) (orchestrate.WorktreeMergeStrandedLandingAcknowledgement, error)
AcknowledgeUnpublishedValidationFailure func(ctx context.Context, options orchestrate.WorktreeMergeUnpublishedValidationFailureAcknowledgementOptions) (orchestrate.WorktreeMergeUnpublishedValidationFailureAcknowledgement, error)
AcknowledgeWorktreeMergeReceiptCollision func(ctx context.Context, options orchestrate.WorktreeMergeReceiptCollisionAcknowledgementOptions) (orchestrate.WorktreeMergeReceiptCollisionAcknowledgement, error)
AdoptPublishedWorktreeMergeCandidate func(ctx context.Context, options orchestrate.WorktreeMergePublishedCandidateAdoptionOptions) (orchestrate.WorktreeMergePublishedCandidateAdoption, error)
CorrectValidationFailedSelfSupersession func(ctx context.Context, options orchestrate.WorktreeMergeSelfSupersessionCorrectionOptions) (orchestrate.WorktreeMergeSelfSupersessionCorrection, error)
LandWorktreeMerge func(ctx context.Context, options orchestrate.WorktreeMergeLandOptions) (orchestrate.WorktreeMergeReceipt, error)
PeekWorktreeMergeReceipt func(projectsRoot, input string) (orchestrate.WorktreeMergeReceipt, error)
PeekWorktreeMergeValidationDeferral func(ctx context.Context, projectsRoot string, sources []string, target string, requestedRoute orchestrate.WorktreeMergeRoute, validateLocally, allowUnfenced bool, directCIPullRequest ...string) (bool, error)
PrepareConflictWorktreeMergeReplacement func(ctx context.Context, options orchestrate.WorktreeMergeConflictCandidateRefreshOptions) (result orchestrate.WorktreeMergeConflictCandidateRefresh, retErr error)
PreparePublishedValidationFailureForwardRepair func(ctx context.Context, options orchestrate.WorktreeMergePublishedForwardRepairOptions) (result orchestrate.WorktreeMergePublishedForwardRepair, retErr error)
PrepareValidationFailedWorktreeMergeSeal func(ctx context.Context, options orchestrate.WorktreeMergeValidationFailureSealOptions) (orchestrate.WorktreeMergeValidationFailureSeal, error)
PrepareWorktreeMerge func(ctx context.Context, options orchestrate.WorktreeMergePrepareOptions) (preparedReceipt orchestrate.WorktreeMergeReceipt, prepareErr error)
PrepareWorktreeMergeRevert func(ctx context.Context, projectsRoot, input string, timeout time.Duration, retry int) (orchestrate.WorktreeMergeReceipt, error)
ResumeWorktreeMerge func(ctx context.Context, options orchestrate.WorktreeMergeLandOptions) (orchestrate.WorktreeMergeReceipt, error)
RunWorktreeMerge func(ctx context.Context, prepare orchestrate.WorktreeMergePrepareOptions, land orchestrate.WorktreeMergeLandOptions) (orchestrate.WorktreeMergeReceipt, error)
SupersedeValidationFailedWorktreeMerge func(ctx context.Context, options orchestrate.WorktreeMergeValidationFailureSupersessionOptions) (orchestrate.WorktreeMergeValidationFailureSupersession, error)
}
func DefaultMergeOperations ¶
func DefaultMergeOperations() MergeOperations
type OwnOperations ¶
type OwnOperations struct {
Admission JournalAdmission
Record func(checkoutsetup.OwnershipRequest) (checkoutsetup.OwnershipResult, error)
}
type ReceiptDependencies ¶
type ReceiptDependencies struct {
Compose func(graduation.EvidencePaths) ([]byte, error)
Observe func(context.Context, graduation.RemoteTargetRequest) ([]byte, error)
}
ReceiptDependencies supplies reusable evidence operations to the receipt command.
type RelocateDependencies ¶
type RelocateDependencies struct {
Run func(context.Context, worktrees.RelocateOptions) (worktrees.RelocateOutcome, error)
Admit func(*cobra.Command, bool) (worktrees.AgentIdentity, func(), error)
AfterApply func(*cobra.Command, []worktrees.RelocateResult)
StartProgress func(io.Writer, string) func()
}
type RenameDependencies ¶
type RenameDependencies struct {
Run func(context.Context, worktrees.RenameOptions) (worktrees.RenameOutcome, error)
Admit func(*cobra.Command, bool) (worktrees.AgentIdentity, func(), error)
AfterApply func(*cobra.Command, string, []worktrees.RenameResult)
}
type RescueOperations ¶
type RescueOperations struct {
Inspect func(context.Context, string, canonicalrescue.Options) (canonicalrescue.Report, error)
Capture func(context.Context, canonicalrescue.Report) (canonicalrescue.Report, error)
Push func(context.Context, canonicalrescue.Report, string) (canonicalrescue.Report, error)
Restore func(context.Context, canonicalrescue.Report, bool) (canonicalrescue.Report, error)
ScanLocal func(string) ([]discover.Repo, error)
}
type RetireDependencies ¶
type RetireDependencies struct {
Run func(context.Context, worktrees.RetireOptions) (worktrees.RetireResult, error)
Admit func(*cobra.Command, bool) (worktrees.AgentIdentity, func(), error)
CheckOwnership func(context.Context, string, string) error
ReleaseWhenComplete func(*cobra.Command, string, string) bool
}
Source Files
¶
- abort.go
- abort_render.go
- active.go
- adoption.go
- adoption_render.go
- cleanup.go
- cleanup_render.go
- collaboration.go
- create.go
- create_render.go
- end.go
- end_render.go
- gc.go
- gc_render.go
- guard.go
- guard_render.go
- info.go
- inventory.go
- inventory_render.go
- journal.go
- journal_input.go
- journal_render.go
- marker.go
- merge.go
- merge_dependencies.go
- movement.go
- movement_render.go
- own.go
- receipt.go
- rescue.go
- rescue_render.go
- retire.go