WorktreeOutput
Type, in @jr2/orchestrator/src/worktree.ts. It is an export of @jr2/orchestrator, in the Effects group of the Authoring surface page.
type WorktreeOutput<S extends string = string> = WorktreeReady<S> | WorktreeRefused | Unknown | LaterOutcome;The output of a worktree(). unknown: its state exited while it ran, the cut did not end, its answer did not agree with its request, or the files of a Handoff were not carried (a Harness did not answer, or the carry passed its time, ADR-0080).
Forms: it is one of these objects.
Form 1:
outcome,reasonoutcome:"unknown"reason:string
Form 2:
outcome,slot,path,branch,head,found,staleoutcome:"ready"slot:Spath:WorktreePath<S>branch:string | nullThe branch of the cut, from git and the cut's record, never from the folder or HEAD.
nullwhen the Worktree is detached.head:stringThe tip of
branch(of the commit, when detached). Never HEAD.found:WorktreeFoundstale(optional):stringADR-0053's words when the remote did not answer. The cut used what the clone holds.
Form 3:
outcome,reasonoutcome:"refused"reason:string
Form 4:
outcome,reasonoutcome:"(a later outcome)"reason(optional):string