WorkspaceSpec
Type, in @jr2/orchestrator/src/workspace.ts. The signature of an export, or a type that it names, names this type. The Authoring surface page lists each export. This type is not an export of @jr2/orchestrator, so a workflow module does not import it by name.
type WorkspaceSpec = {
branch: string;
workGroup?: number;
reviewSha?: string;
};What the spec of a workspace() returns: the branch that the Workspace works on, and two optional fields. jr2 calls spec with the run input when the run enters the Workspace.
Fields
branch:stringThe branch that the Workspace works on: each Repo Slot gets a Worktree for it, at
/work/<slot>/<branch>, with each/in the branch written as-. Required, and notdefault, which is the directory of the clone. Your Machine decides its name.workGroup(optional):numberThe group id that owns the files in
/work. With it, the Sandbox Image and the User Container can both write those files when they run as different users. Default: 2000. Set it to a group id that the User Container's sessions already have, for example when a root sshd builds their groups from/etc/group. A non-negative integer.reviewSha(optional):stringA commit to check out in a second, detached Worktree beside each branch Worktree, for a reviewer:
/work/<slot>/<branch>-review. The body gets its paths asworkspace.review.