Skip to content

steps/workspaces ​

Provision a repository worktree outside workflow code.

Wrap steps in a factory-owned "use step" file. Never call them directly from a workflow.

Interfaces ​

ProvisionWorktreeDependencies ​

Injectable registry and ownership operations used while provisioning a worktree.

Properties ​

PropertyType
readOwner?(runId) => Promise<OwnerState>
sql?RegistrySql
withLock?<T>(runId, action) => Promise<T>

WorktreeRequest ​

The binding and branch used to provision a run's worktree.

Properties ​

PropertyType
bindingstring
branchstring

Functions ​

provisionWorktree() ​

ts
function provisionWorktree(
   request, 
   metadata, 
deps): Promise<Worktree>;

Create or reuse a worktree for this run and prepare its files and dependencies.

Parameters ​

ParameterType
requestWorktreeRequest
metadataRunMetadata
depsProvisionWorktreeDependencies

Returns ​

Promise<Worktree>

Released under the MIT License.