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
| Property | Type |
|---|---|
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
| Property | Type |
|---|---|
binding | string |
branch | string |
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
| Parameter | Type |
|---|---|
request | WorktreeRequest |
metadata | RunMetadata |
deps | ProvisionWorktreeDependencies |
Returns
Promise<Worktree>