Repository navigation
docs(mocactl): define an sbx sandbox by what it is, with up as the common way in - #877
Conversation
…mmon way in Review follow-up to rossoctl#871 (evaline-ju): the help defined a sandbox by the `up` workflow, as a copy of a local git repository, but a sandbox needs no repository: `sbx create --template ID` makes one, and `run`, `put` and `proc` use it by ID; only `up`, `push` and `pull` need git. The definition now opens with the sandbox itself (a workspace on the sandbox service, made from a template, where the agent's commands run in isolated VMs), then `up` in a git repository, and ends with `create` for use without one. The top-level `mocactl sbx …` line no longer says "a remote copy of a repository". The help test follows the new wording. Refs rossoctl#599 Assisted-By: Claude Code Signed-off-by: Rong Chang <[email protected]>
evaline-ju
left a comment
There was a problem hiding this comment.
The sandbox is now defined independently of git, with up as the common way in. Two accuracy points on the new text: up can reuse a sandbox, and proc needs a lease+processes sandbox, which a default create isn't.
| (A bare \`mocactl\` session's tools run in a sandbox of moca's own server, SH_CONTROL_PLANE_URL: | ||
| these commands do not see it.)`; | ||
| export const SBX_ABOUT = `An sbx sandbox is a workspace on the sandbox service, made from a template, where your coding | ||
| agent's commands run in isolated VMs. In a git repository, \`mocactl sbx up\` creates one, copies |
There was a problem hiding this comment.
up creates or reuses the repo's sandbox (the SBX_USAGE line for up says "create or reuse its sandbox"). Suggest "creates or reuses one".
There was a problem hiding this comment.
Fixed in 4e00652: "mocactl sbx up creates or reuses one".
| in sync: \`mocactl sbx push\` sends later local edits, and \`mocactl sbx pull --apply\` applies the | ||
| agent's edits here as a patch. /workspace is kept between commands; the sandbox ends after a period | ||
| without use (7 days by default). Without a repository, \`mocactl sbx create --template ID\` makes | ||
| one, and \`run\`, \`put\` and \`proc\` use it by ID. (A bare \`mocactl\` session's tools run in a |
There was a problem hiding this comment.
create makes a per-exec sandbox by default, and proc is "lease+processes only", so proc doesn't work by ID on a default create. Either drop proc here or mention --mode lease+processes. Also, --template is optional (the default template is used), so mocactl sbx create alone reads more accurately.
There was a problem hiding this comment.
Fixed in 4e00652: it now reads "mocactl sbx create makes one (from the default template, or --template ID), and run and put use it by ID; proc needs one made with --mode lease+processes".
…cesses Review follow-up (evaline-ju): `up` creates or reuses the repository's sandbox, as its usage line says; and a default `create` is per-exec, where `proc` doesn't work, so the definition now says `run` and `put` use it by ID and `proc` needs one made with `--mode lease+processes`. `--template` is optional, so it reads `mocactl sbx create` (the default template, or `--template ID`). Refs rossoctl#599 Assisted-By: Claude Code Signed-off-by: Rong Chang <[email protected]>
Refs #599. A follow-up to #871, from evaline-ju's review there (
packages/mocactl/src/sbx/cli.ts:93), which came in after it merged.What changed and why
SBX_ABOUT, printed beforemocactl sbx --helpand a baremocactl sbx, defined a sandbox by theupworkflow: "a copy of a local git repository on the sandbox service". A sandbox needs no repository:mocactl sbx create --template IDmakes one, andrun,putandprocuse it by ID; onlyup,pushandpullneed git. It now opens with the sandbox itself, in the review's wording: "a workspace on the sandbox service, made from a template, where your coding agent's commands run in isolated VMs". Then comesup, "in a git repository", as the common way in, with the rest of the text as before (whatup,pushandpullcopy, Bob's local tools, the lifetime). It ends with the way in without a repository: "mocactl sbx create --template IDmakes one, andrun,putandprocuse it by ID".mocactl --help'smocactl sbx …row said "a remote copy of a repository for your agent"; it now says "workspaces in isolated VMs for your agent".SBX_ABOUTsays the same.Tests
packages/mocactl/test/sbx-cli.test.ts: the definition test checks the new opening,up"in a git repository", and thecreate --template IDsentence; the other assertions are unchanged.packages/mocactl:tsc --noEmitis clean; the full suite passes (2098 passed, 4 skipped); prettier is clean.Every commit is signed off (DCO).
Assisted-By: Claude Code