Skip to content

WorktreeOutput ​

Type, in @jr2/orchestrator/src/worktree.ts. It is an export of @jr2/orchestrator, in the Effects group of the Authoring surface page.

ts
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, reason

    • outcome: "unknown"
    • reason: string
  • Form 2: outcome, slot, path, branch, head, found, stale

    • outcome: "ready"

    • slot: S

    • path: WorktreePath<S>

    • branch: string | null

      The branch of the cut, from git and the cut's record, never from the folder or HEAD. null when the Worktree is detached.

    • head: string

      The tip of branch (of the commit, when detached). Never HEAD.

    • found: WorktreeFound

    • stale (optional): string

      ADR-0053's words when the remote did not answer. The cut used what the clone holds.

  • Form 3: outcome, reason

    • outcome: "refused"
    • reason: string
  • Form 4: outcome, reason

    • outcome: "(a later outcome)"
    • reason (optional): string

The docs of Kit version 0.8.0. Each page is also at its .md URL.