[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M698R1EDD4MXCMV1XC6M7RKN":3,"skill-same:01M698R1EDD4MXCMV1XC6M7RKN":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":41,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M698R1EDD4MXCMV1XC6M7RKN","crabbox",null,"Use the Crabbox wrapper for validation across Linux, macOS, Windows, and WSL2, including delegated Blacksmith Testbox proof. Report the actual provider and id.","openclaw\u002Fclawsweeper","openclaw","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F252820863?v=4","01M698P3FSAZ6B4R928ZF19KPT","01M698QZGH3RJX0DA5MQ7GXGVR",2004,"MIT","https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawsweeper\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcrabbox\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30],"macos","linux","windows","report","validation","use","Wrapper","provider","across","id","proof","blacksmith testbox","for","2026-11-10 10:12:30",false,"---\nname: crabbox\ndescription: Use the Crabbox wrapper for validation across Linux, macOS, Windows, and WSL2, including delegated Blacksmith Testbox proof. Report the actual provider and id.\n---\n\n# Crabbox\n\n## Provider Selection Contract\n\nProvider selection is configuration resolution, not testing policy. Run\n`crabbox config show` from the exact worktree being tested; a session may have\nstarted in another checkout whose repository config or skill text is stale. A\nrequest to \"use Crabbox\" does not authorize a provider override. When the user\ndoes not name a backend, omit `--provider` and preserve the resolved provider,\nincluding values supplied by user config or `CRABBOX_PROVIDER`.\n\nTest scope, expected duration, and hydration failures do not select a provider.\nOverride the resolved provider only when the user explicitly names a different\nbackend. If that provider cannot perform the requested test, report the blocker\ninstead of silently selecting another backend.\n\nUse the Crabbox wrapper for validation execution, environment lifecycle, sync,\nlogs\u002Fresults, cache inspection, and lease cleanup.\n\nCrabbox is the transport\u002Forchestration surface. The actual backend can be:\n\n- local Docker isolation: `provider=local-container`, lease ids like `cbx_...`\n- brokered AWS Crabbox: direct provider, `provider=aws`, lease ids like\n  `cbx_...`, `syncDelegated=false`\n- Blacksmith Testbox through Crabbox: delegated provider,\n  `provider=blacksmith-testbox`, ids like `tbx_...`, `syncDelegated=true`\n\nThe provider-specific sections below document capabilities and commands after\nconfiguration or an explicit user request has selected a backend. They are not\nprovider-selection policy. Their validation commands intentionally omit\n`--provider`; add it only to carry out an explicit user override of the resolved\nconfiguration.\n\nProvider identity must remain attached to a lease after creation. A lease\ncreated through the resolved configuration can keep using provider-neutral\ncommands while that configuration is unchanged. If the user explicitly\noverrode the provider, or the resolved configuration has changed since the\nlease was created, pass the provider reported by Crabbox to every later command\nthat targets that lease, including hydrate, rerun, desktop\u002FWebVNC, status,\ninspect, SSH, and stop. This preserves resource identity; it does not select a\nprovider for unrelated work.\n\nWhen the resolved configuration selects Blacksmith Testbox, or the user\nexplicitly requests it, do not describe the run as \"AWS Crabbox\". Report it as\nTestbox-through-Crabbox with the `tbx_...` id and Actions run.\n\nDirect AWS supports persistent leases, `--fresh-pr`, `--full-resync`,\nenvironment forwarding, capture\u002Fdownload, and provider-comparison workflows.\nBlacksmith Testbox provides a prepared CI environment and delegated broad\u002Fheavy\n`pnpm` gates. These capabilities do not override the resolved configuration.\n\n## First Checks\n\n- Run from the repo root. Crabbox sync mirrors the current checkout.\n- Check the wrapper and providers before Crabbox work:\n\n```sh\ncommand -v crabbox\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox --version\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --help | sed -n '1,120p'\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop launch --help\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc --help\n```\n\n- OpenClaw scripts prefer `..\u002Fcrabbox\u002Fbin\u002Fcrabbox` when present. The user PATH\n  shim can be stale.\n- Read `.crabbox.yaml`, then run `crabbox config show` from the repository root\n  before selecting a provider. The resolved provider can come from the user's\n  Crabbox config or environment as well as the repository file.\n- Omitting `--provider` means \"use the resolved configuration\". Pass it only\n  when the user explicitly requests a different backend, and report the\n  provider from Crabbox output rather than inferring it from bootstrap wording.\n- Treat `CRABBOX_PROVIDER` as part of that resolved provider configuration. The\n  provider reported by `crabbox config show` is authoritative; a hydration or\n  test failure is not permission to switch backends. Override it only when the\n  user explicitly names another provider.\n- Some package-manager wrappers insert a command delimiter before Crabbox\n  options. If the printed command looks like `crabbox run -- --provider ...`\n  or `crabbox run -- --no-hydrate ...`, call the trusted Crabbox binary\n  directly so lifecycle flags are parsed by Crabbox.\n- The brokered AWS default is a Linux developer image in `eu-west-1`; the repo\n  config pins hot `eu-west-1a\u002Fb\u002Fc` placement so Fast Snapshot Restore can apply.\n  If warmup drifts well past the minute-scale path, verify image promotion,\n  region\u002FAZ placement, and FSR state before blaming OpenClaw.\n- Targeted and broad `pnpm` gates both use the resolved provider. Test size does\n  not authorize a provider override.\n- Always report the provider field and id. Both local-container and direct\n  providers can use `cbx_...`, so the id prefix alone does not prove AWS;\n  `tbx_...` identifies Blacksmith Testbox through Crabbox. If the output only\n  says `blacksmith testbox list`, use `blacksmith testbox list --all` before\n  concluding no box exists.\n- If a warm direct-provider lease smells stale, retry with `--full-resync`\n  (alias `--fresh-sync`) before replacing the lease. This resets the remote\n  workdir, skips the fingerprint fast path, reseeds Git when possible, and\n  uploads the checkout from scratch.\n- For live\u002Fprovider bugs, use the configured secret workflow before downgrading\n  to mocks. Copy only the exact needed key into the remote process environment\n  for that one command. Do not print it, do not sync it as a repo file, and do\n  not leave it in remote shell history or logs. If no secret-safe injection path\n  is available, say true live provider auth is blocked instead of silently using\n  a fake key.\n- Targeted versus broad describes test scope only; it does not imply local,\n  remote, host, or container execution.\n- Do not treat unrelated inherited shell controls as operator intent. In\n  particular, `OPENCLAW_LOCAL_CHECK_MODE=throttled` from the local shell is not\n  permission to move broad `pnpm check:changed`, `pnpm test:changed`, full\n  `pnpm test`, or lint\u002Ftypecheck fan-out onto the laptop. This does not negate\n  provider-selection variables such as `CRABBOX_PROVIDER`, which are resolved\n  and reported by `crabbox config show`.\n- `OPENCLAW_LOCAL_CHECK_MODE=throttled|full` controls direct host execution; it\n  is separate from Crabbox provider selection and must not override the provider\n  reported by `crabbox config show`.\n\n## macOS And Windows Targets\n\nUse these only when the task needs an existing non-Linux host. OpenClaw Linux\nvalidation uses the resolved Crabbox configuration unless the user explicitly\nrequests another provider or target.\n\nNative Windows is available when the resolved provider supports that target.\nFor providers other than AWS, keep placement and capacity in their resolved\nconfiguration:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox warmup \\\n  --target windows \\\n  --windows-mode normal \\\n  --timing-json\n```\n\nAWS has a provider-specific placement requirement: the OpenClaw Windows\ndeveloper image and Docker cache are available in `us-west-2`, and native\nWindows leases must use on-demand capacity. After `crabbox config show` confirms\n`provider=aws` (or the user explicitly selects AWS), use:\n\n```sh\nCRABBOX_AWS_REGION=us-west-2 \\\nCRABBOX_CAPACITY_REGIONS=us-west-2 \\\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox warmup \\\n  --target windows \\\n  --windows-mode normal \\\n  --market on-demand \\\n  --timing-json\n```\n\nThe region variables pin both the AWS image lookup and the capacity candidate\nset because `warmup` does not expose a generic `--region` flag. These placement\nand market settings are AWS availability constraints applied after provider\nselection; they are not a reason to select AWS for other runs. If the user\nexplicitly requests AWS while `crabbox config show` resolves another provider,\nadd `--provider aws` to this command to carry out that explicit override.\n\nThe hydrate workflow assumes Docker should already be baked into Linux images\nand only installs it as a fallback. Do not add per-run Docker installs to proof\ncommands unless the image probe shows Docker is actually missing.\n\nWhen the user explicitly asks for brokered macOS runners, use Crabbox AWS\nmacOS only after confirming the deployed coordinator supports EC2 Mac host\nlifecycle\u002Fimage routes and the operator has AWS EC2 Mac Dedicated Host quota\nand IAM. Prefer `CRABBOX_HOST_ID` for a known Crabbox-managed Dedicated Host,\nor run the no-spend preflight first:\n\nThese administration commands specify AWS because they inspect or allocate an\nAWS EC2 Dedicated Host. The explicit provider is a billing and resource-scope\nsafety boundary, not a validation default.\n\n```sh\ncrabbox admin hosts quota --provider aws --target macos --region eu-west-1 --type mac2.metal --json\ncrabbox admin hosts allocate --provider aws --target macos --region eu-west-1 --type mac2.metal --dry-run --json\nCRABBOX_MACOS_TYPES=all scripts\u002Fmacos-host-region-preflight.sh\n```\n\nDo not silently substitute AWS macOS for normal OpenClaw Linux proof. Report\npaid-host blockers as quota, IAM, coordinator deployment, or host availability\ninstead of falling back to local macOS.\n\nCrabbox supports static SSH targets:\n\nThese commands specify `ssh` because the user-supplied static host selects that\ntransport explicitly; they do not establish an SSH preference for other runs.\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --provider ssh --target macos --static-host mac-studio.local -- xcodebuild test\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --provider ssh --target windows --windows-mode normal --static-host win-dev.local -- pwsh -NoProfile -Command \"dotnet test\"\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --provider ssh --target windows --windows-mode wsl2 --static-host win-dev.local -- pnpm test\n```\n\n- `target=macos` and `target=windows --windows-mode wsl2` use the POSIX SSH,\n  bash, Git, rsync, and tar contract.\n- Native Windows uses OpenSSH, PowerShell, Git, and tar; sync is manifest tar\n  archive transfer into `static.workRoot`. Direct native Windows runs support\n  `--script*`, `--env-from-profile`, `--preflight`, and PowerShell `--shell`.\n- `crabbox actions hydrate\u002Fregister` are Linux-only today; use plain\n  `crabbox run` loops for static macOS and Windows hosts.\n- Live proof needs a reachable, operator-managed SSH host. Without one, verify\n  with `..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --help`, config\u002Fflag tests, and the Crabbox\n  Go test suite.\n\n## Direct Brokered AWS Backend\n\nThis section applies only after the resolved configuration or an explicit user\nrequest selects direct AWS Crabbox.\n\nChanged gate:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --idle-timeout 90m \\\n  --ttl 240m \\\n  --timing-json \\\n  --shell -- \\\n  \"env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed\"\n```\n\nFull suite:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --idle-timeout 90m \\\n  --ttl 240m \\\n  --timing-json \\\n  --shell -- \\\n  \"env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test\"\n```\n\nFocused rerun:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --idle-timeout 90m \\\n  --ttl 240m \\\n  --timing-json \\\n  --shell -- \\\n  \"env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test \u003Cpath-or-filter>\"\n```\n\nRead the JSON summary. Useful fields:\n\n- `provider`: `aws`\n- `leaseId`: `cbx_...`\n- `syncDelegated`: `false`\n- `commandPhases`: populated when the command prints `CRABBOX_PHASE:\u003Cname>`\n- `commandMs` \u002F `totalMs`\n- `exitCode`\n\nCrabbox should stop one-shot AWS leases automatically after the run. Verify\ncleanup when a run fails, is interrupted, or the command output is unclear:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox list --provider aws\n```\n\nThe explicit provider keeps cleanup attached to the AWS lease recorded by the\nrun, including when AWS was a user-requested override of another configured\ndefault.\n\n## Blacksmith Testbox Through Crabbox\n\nThis section applies only after the resolved configuration or an explicit user\nrequest selects Blacksmith Testbox:\n\nA fresh Testbox requires a repository-specific workflow. Crabbox resolves it\nfrom `blacksmith.workflow`, falling back to `actions.workflow`; job and ref use\nthe equivalent Blacksmith values with Actions fallbacks. The workflow must\ncontain a `useblacksmith\u002Ftestbox`, `useblacksmith\u002Fbegin-testbox`, or\n`useblacksmith\u002Frun-testbox` step. Confirm both the effective config and the\nactual workflow before using the provider-neutral command below; nonempty\nfields alone do not prove that an ordinary Actions workflow is Testbox-capable.\n\nFor a local workflow path, validate it with:\n\n```sh\nrg -n 'useblacksmith\u002F(testbox|begin-testbox|run-testbox)' \u003Cworkflow-path>\n```\n\nFor a workflow name or id, inspect its YAML through GitHub before dispatch. Do\nnot guess a Testbox workflow from another repository.\n\nIf the user explicitly supplies a Blacksmith override, carry those exact values\non the command instead:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --provider blacksmith-testbox \\\n  --blacksmith-workflow \u003Crepository-workflow> \\\n  --timing-json -- \u003Ctest-command>\n```\n\nAdd `--blacksmith-org`, `--blacksmith-job`, and `--blacksmith-ref` only when the\nuser supplies those overrides. The explicit provider and workflow flags in this\nform implement the user's repository-specific selection; they are not defaults\nfor other runs.\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --idle-timeout 90m \\\n  --ttl 240m \\\n  --timing-json \\\n  -- \\\n  CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 pnpm check:changed\n```\n\nRead the JSON summary and the Testbox line. Useful fields:\n\n- `provider`: `blacksmith-testbox`\n- `leaseId`: `tbx_...`\n- `syncDelegated`: `true`\n- `syncPhases`: delegated\u002Fskipped because Blacksmith owns checkout\u002Fsync\n- Actions run URL\u002Fid from the Testbox output\n- `exitCode`\n\n`blacksmith testbox list` may hide hydrating or ready boxes. Use:\n\n```sh\nblacksmith testbox list --all\nblacksmith testbox status \u003Ctbx_id>\n```\n\n## Observability Flags\n\nUse these on debugging runs before inventing ad hoc logging:\n\n- `--preflight`: prints run context, workspace mode, SSH target, remote user\u002Fcwd,\n  and target-specific tool probes. Defaults cover `git`, `tar`, `node`, `npm`,\n  `corepack`, `pnpm`, `yarn`, `bun`, `docker`, plus POSIX\n  `sudo`\u002F`apt`\u002F`bubblewrap` and native Windows\n  `powershell`\u002F`execution_policy`\u002F`longpaths`\u002F`temp`\u002F`pwsh`. Add\n  `--preflight-tools node,bun,docker`, `CRABBOX_PREFLIGHT_TOOLS`, or repo\n  `run.preflightTools` to replace the list. `default` expands built-ins; `none`\n  prints only the workspace summary. Preflight is diagnostic only; install\n  toolchains through Actions hydration, images, devcontainer\u002FNix\u002Fmise\u002Fasdf, or\n  the run script. On `blacksmith-testbox`, this prints a delegated-unsupported\n  note because the workflow owns setup.\n- `CRABBOX_ENV_ALLOW=NAME,...`: forwards only listed local env vars for direct\n  providers and prints `set len=N secret=true` style summaries. On\n  `blacksmith-testbox`, env forwarding is unsupported; put secrets in the\n  Testbox workflow instead.\n- `--env-from-profile \u003Cfile>` plus `--allow-env NAME`: loads simple\n  `export NAME=value` \u002F `NAME=value` lines from a local profile without\n  executing it, then forwards only allowlisted names. `--allow-env` is\n  repeatable and comma-separated. Profile values override ambient allowlisted\n  env values for that run. Direct POSIX, WSL2, and native Windows runs are\n  supported; delegated providers are not. Crabbox probes the uploaded profile\n  remotely and prints redacted presence\u002Flength metadata before the command.\n- `--env-helper \u003Cname>`: with `--env-from-profile` on POSIX SSH targets,\n  persists `.crabbox\u002Fenv\u002F\u003Cname>` and `.crabbox\u002Fenv\u002F\u003Cname>.env` so follow-up\n  commands on the same lease can run through `.\u002F.crabbox\u002Fenv\u002F\u003Cname> \u003Ccommand>`.\n  Use only on leases you control; the profile stays until cleanup, lease reset,\n  or `--full-resync`.\n- `--script \u003Cfile>` \u002F `--script-stdin`: upload a local script into\n  `.crabbox\u002Fscripts\u002F` and execute it on the remote box. Shebang scripts execute\n  directly on POSIX; scripts without a shebang run through `bash`. Native\n  Windows uploads run through Windows PowerShell, and Crabbox appends `.ps1`\n  when needed. Arguments after `--` become script args.\n- `--fresh-pr owner\u002Frepo#123|URL|number`: skip dirty local sync and create a\n  fresh remote checkout of the GitHub PR. Bare numbers use the current repo's\n  GitHub origin. Add `--apply-local-patch` only when the current local\n  `git diff --binary HEAD` should be applied on top of that PR checkout.\n- `--full-resync` \u002F `--fresh-sync`: reset a stale direct-provider workdir\n  before syncing. Use after sync fingerprints look wrong, SSH times out before\n  sync, or rsync watchdog output suggests it. It is redundant with\n  `--fresh-pr`, incompatible with `--no-sync`, and unsupported by delegated\n  providers.\n- `--capture-stdout \u003Cpath>` \u002F `--capture-stderr \u003Cpath>`: write remote streams to\n  local files and keep binary\u002Fnoisy output out of retained logs. Parent\n  directories must already exist. These are direct-provider only.\n- `--capture-on-fail`: on non-zero direct-provider exits, downloads\n  `.crabbox\u002Fcaptures\u002F*.tar.gz` with `test-results`, `playwright-report`,\n  `coverage`, JUnit XML, and nearby logs. Treat as secret-bearing until reviewed.\n- `--keep-on-failure`: leave a failed one-shot lease alive for live debugging\n  until idle\u002FTTL expiry. Useful on direct providers and delegated one-shots.\n- `--timing-json`: final machine-readable timing. Add\n  `echo CRABBOX_PHASE:install`, `CRABBOX_PHASE:test`, etc. in long shell\n  commands; direct providers and Blacksmith Testbox both report them as\n  `commandPhases`.\n\nLive-provider debug template for the resolved direct-provider lease:\n\n```sh\nmkdir -p .crabbox\u002Flogs\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --preflight \\\n  --allow-env OPENAI_API_KEY,OPENAI_BASE_URL \\\n  --timing-json \\\n  --capture-stdout .crabbox\u002Flogs\u002Flive-provider.stdout.log \\\n  --capture-stderr .crabbox\u002Flogs\u002Flive-provider.stderr.log \\\n  --capture-on-fail \\\n  --shell -- \\\n  \"echo CRABBOX_PHASE:install; pnpm install --frozen-lockfile; echo CRABBOX_PHASE:test; pnpm test:live\"\n```\n\nDo not pass `--capture-*`, `--download`, `--checksum`, `--force-sync-large`, or\n`--sync-only` to delegated providers. Also do not pass `--script*`,\n`--fresh-pr`, `--full-resync`, or `--env-helper` there. Crabbox rejects these\nbecause the provider owns sync or command transport. `--keep-on-failure` is OK\nfor delegated one-shots when you need to inspect a failed lease.\n\n## Efficient Bug E2E Verification\n\nUse the smallest Crabbox lane that proves the reported user path, not just the\ntouched code. Aim for one after-fix E2E proof before commenting, closing, or\nopening a PR for a user-visible bug.\n\nWhen the user says \"test in Crabbox\", do not simply copy tests to the remote\nbox and run them there. Crabbox is for remote real-scenario proof: copy or\ninstall OpenClaw as the user would, run the same setup\u002Fupdate\u002FCLI\u002FGateway\u002FAPI\ncall that failed, and capture behavior from that entrypoint. For regressions or\nbug reports, prove the broken state first when feasible, then run the same\nscenario after the fix.\n\nPick the lane by symptom:\n\n- Docker\u002Fsetup\u002Finstall bug: build a package tarball and run the matching\n  `scripts\u002Fe2e\u002F*-docker.sh` or package script. This proves npm packaging,\n  install paths, runtime deps, config writes, and container behavior.\n- Provider\u002Fmodel\u002Fauth bug: prefer true live E2E. Use the configured secret\n  workflow, then inject the single needed key into Crabbox if needed. Scrub\n  unrelated provider env vars in the child command so interactive defaults do\n  not drift to another provider. If only a dummy key is used, label the proof\n  narrowly, e.g. \"UI\u002Finstall path only; live provider auth not exercised.\"\n- Channel delivery bug: use the channel Docker\u002Flive lane when available; include\n  setup, config, gateway start, send\u002Freceive or agent-turn proof, and redacted\n  logs.\n- Gateway\u002Fsession\u002Ftool bug: prefer an end-to-end CLI or Gateway RPC command that\n  creates real state and inspects the resulting files\u002FAPI output.\n- Pure parser\u002Fconfig bug: targeted tests may be enough, but still run a\n  Crabbox command when OS, package, Docker, secrets, or service lifecycle could\n  change behavior.\n\nEfficient flow:\n\n1. Reproduce or prove the pre-fix symptom from the real user-facing entrypoint\n   when feasible. If the issue cannot be reproduced, capture the exact command\n   and observed behavior instead.\n2. Patch locally and run narrow local tests for edit speed.\n3. Run one Crabbox E2E command that starts from the user-facing entrypoint:\n   package install, Docker setup, onboarding, channel add, gateway start, or\n   agent turn as appropriate.\n4. Record proof as: Testbox id, command, environment shape, redacted secret\n   source, and copied success\u002Ffailure output.\n5. If the issue says \"cannot reproduce\", ask for the missing config\u002Flog fields\n   that would distinguish the tested path from the reporter's path.\n\nKeep it efficient:\n\n- Reuse existing E2E scripts and helper assertions before writing ad hoc shell.\n- Use `--script \u003Cfile>` or `--script-stdin` for multi-line E2E commands instead\n  of quote-heavy `--shell` strings on direct SSH providers.\n- Use `--fresh-pr \u003Cpr>` when validating an upstream PR in isolation from the\n  local dirty tree. Add `--apply-local-patch` only when testing a local fixup on\n  top of that PR.\n- Use `--full-resync` before replacing a warmed direct-provider lease when the\n  remote workdir or sync fingerprint appears stale.\n- Use one-shot Crabbox for a single proof; use a reusable Testbox only when\n  several commands must share built images, installed packages, or live state.\n- Prefer `OPENCLAW_CURRENT_PACKAGE_TGZ` with Docker\u002Fpackage lanes when testing a\n  candidate tarball; prefer the repo's package helper instead of direct source\n  execution when the bug might be packaging\u002Finstall related.\n- Keep secrets redacted. It is fine to report key presence, source, and length;\n  never print secret values.\n- Include `--timing-json` on broad or flaky runs when command duration or sync\n  behavior matters.\n\nBefore\u002Fafter PR proof on delegated Testbox:\n\n- For PRs that should prove \"broken before, fixed after\", compare base and PR\n  on the same Testbox when practical. Fetch both refs, create detached temp\n  worktrees under `\u002Ftmp`, install in each, then run the same harness twice.\n- Do not checkout base\u002FPR refs in the synced repo root. Delegated Testbox sync\n  may leave the root dirty with local files; `git checkout` can abort or mix\n  proof state.\n- Temp harness files under `\u002Ftmp` do not resolve repo packages by default. Put\n  the harness inside the worktree, or in ESM use\n  `createRequire(path.join(process.cwd(), \"package.json\"))` before requiring\n  workspace deps such as `@lydell\u002Fnode-pty`.\n- For full-screen TUI\u002FCLI bugs, a PTY harness is stronger than helper-only\n  assertions. Use a real PTY, wait for visible lifecycle markers, send input,\n  then send control keys and assert process exit\u002Fstuck behavior.\n- When validating a rebased local branch before push, remember delegated sync\n  usually validates synced file content on a detached dirty checkout, not a\n  remote commit object. Record the local head SHA, changed files, Testbox id,\n  and final success markers; after pushing, ensure the pushed SHA has the same\n  file content.\n- If GitHub CI is still queued but the exact changed content passed Testbox\n  `pnpm check:changed`, `pnpm check:test-types`, and the real E2E proof, it is\n  reasonable to merge once required checks allow it. Note any still-running\n  unrelated shards in the proof comment instead of waiting forever.\n\nInteractive CLI\u002Fonboarding:\n\n- For full-screen or prompt-heavy CLI flows, run the target command inside tmux\n  on the Crabbox and drive it with `tmux send-keys`; capture proof with\n  `tmux capture-pane`, redacted through `sed`.\n- Prefer deterministic arrow navigation over search typing for Clack-style\n  searchable selects. Raw `send-keys -l openai` may not trigger filtering in a\n  tmux pane; inspect option order locally or on-box and send exact Down\u002FEnter\n  sequences.\n- Isolate mutable state with `OPENCLAW_STATE_DIR=$(mktemp -d)`. Plugin npm\n  installs live under that state dir (`npm\u002Fnode_modules\u002F...`), not under\n  `OPENCLAW_CONFIG_DIR`. Verify downloads by checking the state dir, package\n  lock, and installed package metadata.\n- To test automatic setup installs against local package artifacts, use\n  `OPENCLAW_ALLOW_PLUGIN_INSTALL_OVERRIDES=1` plus\n  `OPENCLAW_PLUGIN_INSTALL_OVERRIDES='{\"plugin-id\":\"npm-pack:\u002Ftmp\u002Fplugin.tgz\"}'`.\n  Pack with `npm pack`, set an isolated `OPENCLAW_STATE_DIR`, and verify the\n  package under `npm\u002Fnode_modules`. Overrides are test-only and must not be\n  treated as official\u002Ftrusted-source installs.\n- For OpenAI\u002FCodex onboarding proof, the useful markers are the UI line\n  `Installed Codex plugin`, `npm\u002Fnode_modules\u002F@openclaw\u002Fcodex`, and the\n  package-lock entry showing the bundled `@openai\u002Fcodex` dependency. A dummy\n  OpenAI-shaped key can prove only UI\u002Finstall behavior; it is not live auth.\n\n## Reuse And Keepalive\n\nFor most Crabbox calls, one-shot is enough. Use reuse only when you need\nmultiple manual commands on the same hydrated box.\n\nThe examples below assume the lease came from the still-current resolved\nconfiguration. For a lease created through an explicit provider override, add\n`--provider \u003Creported-provider>` to every reuse, inspection, and cleanup command\ninstead of relying on the id to recover its backend.\n\nIf Crabbox returns a reusable id or you intentionally keep a lease:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --id \u003Ccbx_id-or-slug> --no-sync --timing-json --shell -- \"pnpm test \u003Cpath>\"\n```\n\nStop boxes you created before handoff:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox stop \u003Cid-or-slug>\nblacksmith testbox stop --id \u003Ctbx_id>\n```\n\n## Interactive Desktop And WebVNC\n\nBefore using WebVNC, confirm the resolved provider supports both desktop and a\ncoordinator-backed WebVNC lease, and that broker login is configured. Crabbox\n0.39 WebVNC supports coordinator-backed Hetzner, AWS, and Azure desktop leases;\nthis capability list does not establish a provider preference. If the resolved\nprovider lacks WebVNC, do not switch providers: use native `crabbox vnc` on the\nsame provider when it supports that path, or report the capability blocker.\n\nWhen those preconditions hold, prefer WebVNC for human inspection because the\nbrowser portal can preload the lease VNC password and avoids a native VNC\nclient's copy\u002Fpaste\u002Fpassword dance. Use native `crabbox vnc` when the browser\nportal is unavailable or broken, or the user explicitly wants a local VNC\nclient.\n\nCommon desktop flow:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox warmup --desktop --browser --idle-timeout 60m --ttl 240m\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop launch --id \u003Ccbx_id-or-slug> --browser --url https:\u002F\u002Fexample.com --webvnc --open --take-control\n```\n\nUseful WebVNC commands:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc --id \u003Ccbx_id-or-slug> --open --take-control\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc daemon start --id \u003Ccbx_id-or-slug> --open --take-control\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc daemon status --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc daemon stop --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc status --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc reset --id \u003Ccbx_id-or-slug> --open --take-control\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop doctor --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop click --id \u003Ccbx_id-or-slug> --x 640 --y 420\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop paste --id \u003Ccbx_id-or-slug> --text \"user@example.com\"\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop key --id \u003Ccbx_id-or-slug> ctrl+l\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox artifacts collect --id \u003Ccbx_id-or-slug> --all --output artifacts\u002F\u003Cslug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox artifacts publish --dir artifacts\u002F\u003Cslug> --pr \u003Cnumber>\n```\n\n`desktop launch --webvnc --open` is usually the nicest one-shot: it starts the\nbrowser\u002Fapp inside the visible session, bridges the lease into the authenticated\nWebVNC portal, and opens the portal. Keep browsers windowed for human QA; use\n`--fullscreen` only for capture\u002Fvideo workflows.\nFor human handoff, include `--take-control` so the opened portal viewer gets\nkeyboard\u002Fmouse control automatically instead of landing as an observer.\n\nHuman handoff preflight:\n\n- Do not assume a visible desktop or launched browser means the repo CLI\u002Fapp is\n  installed, built, or on the interactive terminal's `PATH`.\n- Before handing WebVNC to a human tester, prove the expected command from the\n  same kept lease and from a neutral directory such as `~`.\n- If the handoff needs repo-local code, sync\u002Fbuild\u002Flink it explicitly on that\n  lease. Source-tree CLIs often need build output before a symlink works.\n- Prefer a real `command -v \u003Cexpected-command> && \u003Cexpected-command> --version`\n  check over a repo-root-only `pnpm ...` command.\n\nGeneric handoff repair pattern:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --id \u003Ccbx_id-or-slug> --full-resync --shell -- \\\n  \"set -euo pipefail\n   pnpm install --frozen-lockfile\n   pnpm build\n   sudo ln -sf \\\"\\$PWD\u002F\u003Ccli-entry>\\\" \u002Fusr\u002Flocal\u002Fbin\u002F\u003Cexpected-command>\n   cd ~\n   command -v \u003Cexpected-command>\n   \u003Cexpected-command> --version\"\n```\n\n## If Crabbox Fails\n\nKeep the fallback narrow. First decide whether the failure is Crabbox itself,\nthe brokered AWS lease, Blacksmith\u002FTestbox, repo hydration, sync, or the test\ncommand.\n\nFast checks:\n\n```sh\ncommand -v crabbox\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox --version\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --help | sed -n '1,140p'\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox doctor\ncommand -v blacksmith\nblacksmith --version\nblacksmith testbox list\n```\n\nCommon Crabbox-only failures:\n\n- Provider missing or old CLI: use `..\u002Fcrabbox\u002Fbin\u002Fcrabbox` from the sibling\n  repo, or update\u002Finstall Crabbox before retrying.\n- Local-container hydration rejects a configured Actions `uses` step: stay on\n  `provider=local-container`, add `--no-hydrate`, and perform the required\n  dependency setup inside the container command. For example:\n\n  ```sh\n  ..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --no-hydrate --timing-json --shell -- \\\n    \"corepack enable && pnpm install --frozen-lockfile && \u003Ccheck-command>\"\n  ```\n\n  This is a hydration transport workaround, not permission to run the broad\n  check on the host or silently select a remote provider.\n- Bad local config: inspect `.crabbox.yaml`, `crabbox config show`, and\n  `crabbox whoami`; preserve the resolved provider unless the user explicitly\n  requests another backend.\n- Slug\u002Fclaim confusion: use the raw `cbx_...` \u002F `tbx_...` id, or run one-shot\n  without `--id`.\n- Sync\u002Ftiming bug: add `--debug --timing-json`; capture the final JSON and the\n  printed Actions URL. Large sync warnings now include top source directories\n  by file count and a hint to update `.crabboxignore` \u002F `sync.exclude`; inspect\n  those before reaching for `--force-sync-large`. Quiet rsync watchdogs and SSH\n  timeouts now print `next_action=` hints; follow them, usually `--full-resync`\n  first and a fresh lease second.\n- Cleanup uncertainty: run `crabbox list` with the resolved configuration; for\n  explicitly selected Blacksmith runs, use `blacksmith testbox list` and stop\n  only boxes you created.\n- Testbox queued\u002Fcapacity pressure: do not retry repeatedly or switch providers.\n  Report the blocker and preserve the resolved provider.\n\nIf the resolved direct provider cannot dispatch, sync, attach, or stop, retry\nonce with `--debug` and `--timing-json` without changing providers:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --debug --timing-json -- \\\n  CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed\n```\n\nFull suite:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --debug --timing-json -- \\\n  CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test\n```\n\nAuth fallback, only when `blacksmith` says auth is missing:\n\n```sh\nblacksmith auth login --non-interactive --organization openclaw\n```\n\nRaw Blacksmith footguns:\n\n- Run from repo root. The CLI syncs the current directory.\n- Save the returned `tbx_...` id in the session.\n- Reuse that id for focused reruns; stop it before handoff.\n- Raw commit SHAs are not reliable `warmup --ref` refs; use a branch or tag.\n- Treat `blacksmith testbox list` as cleanup diagnostics, not a shared reusable\n  queue.\n\nIf the selected Blacksmith backend is down or quota-limited, do not keep probing\nit or switch providers. Report the delegated-provider outage.\n\n## Blacksmith Backend Notes\n\nCrabbox Blacksmith backend delegates setup to:\n\n- the organization reported by `crabbox config show`\n- a Testbox-capable `blacksmith.workflow` or `actions.workflow` in the target\n  repository\n- `blacksmith.job` \u002F `blacksmith.ref`, with `actions.job` \u002F `actions.ref`\n  fallbacks\n\nThe hydration workflow owns checkout, Node\u002Fpnpm setup, dependency install,\nsecrets, ready marker, and keepalive. Crabbox owns dispatch, sync, SSH command\nexecution, timing, logs\u002Fresults, and cleanup.\n\nMinimal configured Blacksmith-backed Crabbox run, from repo root. Do not use\nthis fresh-run form until the effective workflow is present and verified as\nTestbox-capable; supply the explicit user-provided workflow above or reuse an\nexisting Testbox id instead.\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --timing-json -- \\\n  CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test:changed\n```\n\nUse direct Blacksmith only when Crabbox is the broken layer and you are\nisolating a Crabbox bug. Prefer direct `blacksmith testbox list` for cleanup\ndiagnostics, not as a reusable work queue.\n\nImportant Blacksmith footguns:\n\n- Always run from repo root. The CLI syncs the current directory.\n- Raw commit SHAs are not reliable `warmup --ref` refs; use a branch or tag.\n- If auth is missing and browser auth is acceptable:\n\n```sh\nblacksmith auth login --non-interactive --organization openclaw\n```\n\n## Brokered AWS\n\nThis section applies only after the resolved configuration or an explicit user\nrequest selects AWS. Do not infer AWS from an omitted `--provider`.\n\nConfirm the selection first:\n\n```sh\ncrabbox config show\ncrabbox doctor\n```\n\nFor Linux, the repository configuration supplies the broker URL, developer\nimage, `eu-west-1` default region, capacity-region candidates, and\nspot-to-on-demand capacity policy. Do not repeat those values on every command;\nthe resolved configuration remains the source of truth. For native Windows,\nuse the `us-west-2` on-demand command in \"macOS And Windows Targets\" above. For\nbrokered macOS, complete the quota\u002FIAM and no-spend Dedicated Host preflight in\nthat section before allocation. If the user explicitly selects AWS over a\ndifferent resolved provider, add `--provider aws` to the AWS commands below.\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox warmup --idle-timeout 90m\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox actions hydrate --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --id \u003Ccbx_id-or-slug> --timing-json --shell -- \"env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed\"\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox stop \u003Ccbx_id-or-slug>\n```\n\nInstall\u002Fauth for owned Crabbox if needed. When configuration already resolves\nAWS and only broker auth is missing, omit `--provider` so login writes the token\nwithout changing provider selection:\n\n```sh\nbrew install openclaw\u002Ftap\u002Fcrabbox\ncrabbox login --url https:\u002F\u002Fcrabbox.openclaw.ai\n```\n\nIf the user explicitly wants AWS as their persisted user-config default, use\n`crabbox login --url https:\u002F\u002Fcrabbox.openclaw.ai --provider aws`. The provider\nflag writes both broker auth and `provider=aws`; it is a configuration change,\nnot merely credential scoping. Repository config or `CRABBOX_PROVIDER` may\nstill take higher precedence, so confirm the effective result with\n`crabbox config show` in the target worktree.\n\nNew users should self-resolve broker auth before anyone asks for AWS keys:\n\n```sh\ncrabbox config show\ncrabbox doctor\ncrabbox whoami\n```\n\n- If broker auth is missing, run `crabbox login --url https:\u002F\u002Fcrabbox.openclaw.ai`.\n  Add `--provider aws` only when the user also wants to persist AWS as their\n  user-config default.\n- If the CLI asks for `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or AWS\n  profile setup during normal OpenClaw validation, assume the agent selected\n  the wrong path. Use brokered `crabbox login` or an existing brokered lease\n  before asking the user for cloud credentials.\n- Ask for AWS keys only for explicit direct-provider\u002Faccount administration,\n  not for normal brokered OpenClaw proof.\n- Trusted automation that intentionally persists AWS as its default may use\n  `printf '%s' \"$CRABBOX_COORDINATOR_TOKEN\" | crabbox login --url https:\u002F\u002Fcrabbox.openclaw.ai --provider aws --token-stdin`.\n\nmacOS config lives at:\n\n```text\n~\u002FLibrary\u002FApplication Support\u002Fcrabbox\u002Fconfig.yaml\n```\n\nIt should include `broker.url` and `broker.token` for AWS lanes. Let the resolved\nconfig select the backend; override it only when the user explicitly requests a\ndifferent provider.\n\n### Interactive Desktop \u002F WebVNC\n\nFor human desktop demos, prefer `webvnc` over native `vnc` and keep the remote\ndesktop visible\u002Fwindowed. Do not fullscreen the remote browser or hide the XFCE\npanel\u002Fwindow chrome unless the explicit goal is video\u002Fcapture output. After\nlaunch, verify a screenshot shows the desktop panel plus browser title bar. If\nChrome is fullscreen, toggle it back with:\n\n```sh\ncrabbox run --id \u003Clease> --shell -- 'DISPLAY=:99 xdotool search --onlyvisible --class google-chrome windowactivate key F11'\n```\n\n## Diagnostics\n\n```sh\ncrabbox status --id \u003Cid-or-slug> --wait\ncrabbox inspect --id \u003Cid-or-slug> --json\ncrabbox sync-plan\ncrabbox history --limit 20\ncrabbox history --lease \u003Cid-or-slug>\ncrabbox attach \u003Crun_id>\ncrabbox events \u003Crun_id> --json\ncrabbox logs \u003Crun_id>\ncrabbox results \u003Crun_id>\ncrabbox cache stats --id \u003Cid-or-slug>\ncrabbox ssh --id \u003Cid-or-slug>\nblacksmith testbox list\n```\n\nUse `--debug` on `run` when measuring sync timing.\nUse `--timing-json` on warmup, hydrate, and run when comparing backends.\nUse `--market spot|on-demand` only on AWS warmup\u002Fone-shot runs.\n\n## Failure Triage\n\n- Crabbox cannot find provider: verify `..\u002Fcrabbox\u002Fbin\u002Fcrabbox --help` lists\n  the provider selected by `.crabbox.yaml`; update Crabbox before falling back.\n- Hydration stuck or failed: open the printed GitHub Actions run URL and inspect\n  the hydration step.\n- Sync failed: rerun with `--debug`; check changed-file count and whether the\n  checkout is dirty.\n- Command failed: rerun only the failing shard\u002Ffile first. Do not rerun a full\n  suite until the focused failure is understood.\n- Cleanup uncertain: `crabbox list` with the resolved configuration; for\n  explicitly selected Blacksmith runs, use `blacksmith testbox list` and stop\n  owned `tbx_...` leases you created.\n- Selected provider broken: report the provider-specific blocker; do not switch\n  providers unless the user explicitly requests the fallback.\n\n## Boundary\n\nDo not add OpenClaw-specific setup to Crabbox itself. Put repo setup in the\nhydration workflow and keep Crabbox generic around lease, sync, command\nexecution, logs\u002Fresults, timing, and cleanup.\n","# Crabbox\n\n## Provider Selection Contract\n\nProvider selection is configuration resolution, not testing policy. Run\n`crabbox config show` from the exact worktree being tested; a session may have\nstarted in another checkout whose repository config or skill text is stale. A\nrequest to \"use Crabbox\" does not authorize a provider override. When the user\ndoes not name a backend, omit `--provider` and preserve the resolved provider,\nincluding values supplied by user config or `CRABBOX_PROVIDER`.\n\nTest scope, expected duration, and hydration failures do not select a provider.\nOverride the resolved provider only when the user explicitly names a different\nbackend. If that provider cannot perform the requested test, report the blocker\ninstead of silently selecting another backend.\n\nUse the Crabbox wrapper for validation execution, environment lifecycle, sync,\nlogs\u002Fresults, cache inspection, and lease cleanup.\n\nCrabbox is the transport\u002Forchestration surface. The actual backend can be:\n\n- local Docker isolation: `provider=local-container`, lease ids like `cbx_...`\n- brokered AWS Crabbox: direct provider, `provider=aws`, lease ids like\n  `cbx_...`, `syncDelegated=false`\n- Blacksmith Testbox through Crabbox: delegated provider,\n  `provider=blacksmith-testbox`, ids like `tbx_...`, `syncDelegated=true`\n\nThe provider-specific sections below document capabilities and commands after\nconfiguration or an explicit user request has selected a backend. They are not\nprovider-selection policy. Their validation commands intentionally omit\n`--provider`; add it only to carry out an explicit user override of the resolved\nconfiguration.\n\nProvider identity must remain attached to a lease after creation. A lease\ncreated through the resolved configuration can keep using provider-neutral\ncommands while that configuration is unchanged. If the user explicitly\noverrode the provider, or the resolved configuration has changed since the\nlease was created, pass the provider reported by Crabbox to every later command\nthat targets that lease, including hydrate, rerun, desktop\u002FWebVNC, status,\ninspect, SSH, and stop. This preserves resource identity; it does not select a\nprovider for unrelated work.\n\nWhen the resolved configuration selects Blacksmith Testbox, or the user\nexplicitly requests it, do not describe the run as \"AWS Crabbox\". Report it as\nTestbox-through-Crabbox with the `tbx_...` id and Actions run.\n\nDirect AWS supports persistent leases, `--fresh-pr`, `--full-resync`,\nenvironment forwarding, capture\u002Fdownload, and provider-comparison workflows.\nBlacksmith Testbox provides a prepared CI environment and delegated broad\u002Fheavy\n`pnpm` gates. These capabilities do not override the resolved configuration.\n\n## First Checks\n\n- Run from the repo root. Crabbox sync mirrors the current checkout.\n- Check the wrapper and providers before Crabbox work:\n\n```sh\ncommand -v crabbox\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox --version\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --help | sed -n '1,120p'\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop launch --help\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc --help\n```\n\n- OpenClaw scripts prefer `..\u002Fcrabbox\u002Fbin\u002Fcrabbox` when present. The user PATH\n  shim can be stale.\n- Read `.crabbox.yaml`, then run `crabbox config show` from the repository root\n  before selecting a provider. The resolved provider can come from the user's\n  Crabbox config or environment as well as the repository file.\n- Omitting `--provider` means \"use the resolved configuration\". Pass it only\n  when the user explicitly requests a different backend, and report the\n  provider from Crabbox output rather than inferring it from bootstrap wording.\n- Treat `CRABBOX_PROVIDER` as part of that resolved provider configuration. The\n  provider reported by `crabbox config show` is authoritative; a hydration or\n  test failure is not permission to switch backends. Override it only when the\n  user explicitly names another provider.\n- Some package-manager wrappers insert a command delimiter before Crabbox\n  options. If the printed command looks like `crabbox run -- --provider ...`\n  or `crabbox run -- --no-hydrate ...`, call the trusted Crabbox binary\n  directly so lifecycle flags are parsed by Crabbox.\n- The brokered AWS default is a Linux developer image in `eu-west-1`; the repo\n  config pins hot `eu-west-1a\u002Fb\u002Fc` placement so Fast Snapshot Restore can apply.\n  If warmup drifts well past the minute-scale path, verify image promotion,\n  region\u002FAZ placement, and FSR state before blaming OpenClaw.\n- Targeted and broad `pnpm` gates both use the resolved provider. Test size does\n  not authorize a provider override.\n- Always report the provider field and id. Both local-container and direct\n  providers can use `cbx_...`, so the id prefix alone does not prove AWS;\n  `tbx_...` identifies Blacksmith Testbox through Crabbox. If the output only\n  says `blacksmith testbox list`, use `blacksmith testbox list --all` before\n  concluding no box exists.\n- If a warm direct-provider lease smells stale, retry with `--full-resync`\n  (alias `--fresh-sync`) before replacing the lease. This resets the remote\n  workdir, skips the fingerprint fast path, reseeds Git when possible, and\n  uploads the checkout from scratch.\n- For live\u002Fprovider bugs, use the configured secret workflow before downgrading\n  to mocks. Copy only the exact needed key into the remote process environment\n  for that one command. Do not print it, do not sync it as a repo file, and do\n  not leave it in remote shell history or logs. If no secret-safe injection path\n  is available, say true live provider auth is blocked instead of silently using\n  a fake key.\n- Targeted versus broad describes test scope only; it does not imply local,\n  remote, host, or container execution.\n- Do not treat unrelated inherited shell controls as operator intent. In\n  particular, `OPENCLAW_LOCAL_CHECK_MODE=throttled` from the local shell is not\n  permission to move broad `pnpm check:changed`, `pnpm test:changed`, full\n  `pnpm test`, or lint\u002Ftypecheck fan-out onto the laptop. This does not negate\n  provider-selection variables such as `CRABBOX_PROVIDER`, which are resolved\n  and reported by `crabbox config show`.\n- `OPENCLAW_LOCAL_CHECK_MODE=throttled|full` controls direct host execution; it\n  is separate from Crabbox provider selection and must not override the provider\n  reported by `crabbox config show`.\n\n## macOS And Windows Targets\n\nUse these only when the task needs an existing non-Linux host. OpenClaw Linux\nvalidation uses the resolved Crabbox configuration unless the user explicitly\nrequests another provider or target.\n\nNative Windows is available when the resolved provider supports that target.\nFor providers other than AWS, keep placement and capacity in their resolved\nconfiguration:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox warmup \\\n  --target windows \\\n  --windows-mode normal \\\n  --timing-json\n```\n\nAWS has a provider-specific placement requirement: the OpenClaw Windows\ndeveloper image and Docker cache are available in `us-west-2`, and native\nWindows leases must use on-demand capacity. After `crabbox config show` confirms\n`provider=aws` (or the user explicitly selects AWS), use:\n\n```sh\nCRABBOX_AWS_REGION=us-west-2 \\\nCRABBOX_CAPACITY_REGIONS=us-west-2 \\\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox warmup \\\n  --target windows \\\n  --windows-mode normal \\\n  --market on-demand \\\n  --timing-json\n```\n\nThe region variables pin both the AWS image lookup and the capacity candidate\nset because `warmup` does not expose a generic `--region` flag. These placement\nand market settings are AWS availability constraints applied after provider\nselection; they are not a reason to select AWS for other runs. If the user\nexplicitly requests AWS while `crabbox config show` resolves another provider,\nadd `--provider aws` to this command to carry out that explicit override.\n\nThe hydrate workflow assumes Docker should already be baked into Linux images\nand only installs it as a fallback. Do not add per-run Docker installs to proof\ncommands unless the image probe shows Docker is actually missing.\n\nWhen the user explicitly asks for brokered macOS runners, use Crabbox AWS\nmacOS only after confirming the deployed coordinator supports EC2 Mac host\nlifecycle\u002Fimage routes and the operator has AWS EC2 Mac Dedicated Host quota\nand IAM. Prefer `CRABBOX_HOST_ID` for a known Crabbox-managed Dedicated Host,\nor run the no-spend preflight first:\n\nThese administration commands specify AWS because they inspect or allocate an\nAWS EC2 Dedicated Host. The explicit provider is a billing and resource-scope\nsafety boundary, not a validation default.\n\n```sh\ncrabbox admin hosts quota --provider aws --target macos --region eu-west-1 --type mac2.metal --json\ncrabbox admin hosts allocate --provider aws --target macos --region eu-west-1 --type mac2.metal --dry-run --json\nCRABBOX_MACOS_TYPES=all scripts\u002Fmacos-host-region-preflight.sh\n```\n\nDo not silently substitute AWS macOS for normal OpenClaw Linux proof. Report\npaid-host blockers as quota, IAM, coordinator deployment, or host availability\ninstead of falling back to local macOS.\n\nCrabbox supports static SSH targets:\n\nThese commands specify `ssh` because the user-supplied static host selects that\ntransport explicitly; they do not establish an SSH preference for other runs.\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --provider ssh --target macos --static-host mac-studio.local -- xcodebuild test\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --provider ssh --target windows --windows-mode normal --static-host win-dev.local -- pwsh -NoProfile -Command \"dotnet test\"\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --provider ssh --target windows --windows-mode wsl2 --static-host win-dev.local -- pnpm test\n```\n\n- `target=macos` and `target=windows --windows-mode wsl2` use the POSIX SSH,\n  bash, Git, rsync, and tar contract.\n- Native Windows uses OpenSSH, PowerShell, Git, and tar; sync is manifest tar\n  archive transfer into `static.workRoot`. Direct native Windows runs support\n  `--script*`, `--env-from-profile`, `--preflight`, and PowerShell `--shell`.\n- `crabbox actions hydrate\u002Fregister` are Linux-only today; use plain\n  `crabbox run` loops for static macOS and Windows hosts.\n- Live proof needs a reachable, operator-managed SSH host. Without one, verify\n  with `..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --help`, config\u002Fflag tests, and the Crabbox\n  Go test suite.\n\n## Direct Brokered AWS Backend\n\nThis section applies only after the resolved configuration or an explicit user\nrequest selects direct AWS Crabbox.\n\nChanged gate:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --idle-timeout 90m \\\n  --ttl 240m \\\n  --timing-json \\\n  --shell -- \\\n  \"env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed\"\n```\n\nFull suite:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --idle-timeout 90m \\\n  --ttl 240m \\\n  --timing-json \\\n  --shell -- \\\n  \"env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test\"\n```\n\nFocused rerun:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --idle-timeout 90m \\\n  --ttl 240m \\\n  --timing-json \\\n  --shell -- \\\n  \"env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test \u003Cpath-or-filter>\"\n```\n\nRead the JSON summary. Useful fields:\n\n- `provider`: `aws`\n- `leaseId`: `cbx_...`\n- `syncDelegated`: `false`\n- `commandPhases`: populated when the command prints `CRABBOX_PHASE:\u003Cname>`\n- `commandMs` \u002F `totalMs`\n- `exitCode`\n\nCrabbox should stop one-shot AWS leases automatically after the run. Verify\ncleanup when a run fails, is interrupted, or the command output is unclear:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox list --provider aws\n```\n\nThe explicit provider keeps cleanup attached to the AWS lease recorded by the\nrun, including when AWS was a user-requested override of another configured\ndefault.\n\n## Blacksmith Testbox Through Crabbox\n\nThis section applies only after the resolved configuration or an explicit user\nrequest selects Blacksmith Testbox:\n\nA fresh Testbox requires a repository-specific workflow. Crabbox resolves it\nfrom `blacksmith.workflow`, falling back to `actions.workflow`; job and ref use\nthe equivalent Blacksmith values with Actions fallbacks. The workflow must\ncontain a `useblacksmith\u002Ftestbox`, `useblacksmith\u002Fbegin-testbox`, or\n`useblacksmith\u002Frun-testbox` step. Confirm both the effective config and the\nactual workflow before using the provider-neutral command below; nonempty\nfields alone do not prove that an ordinary Actions workflow is Testbox-capable.\n\nFor a local workflow path, validate it with:\n\n```sh\nrg -n 'useblacksmith\u002F(testbox|begin-testbox|run-testbox)' \u003Cworkflow-path>\n```\n\nFor a workflow name or id, inspect its YAML through GitHub before dispatch. Do\nnot guess a Testbox workflow from another repository.\n\nIf the user explicitly supplies a Blacksmith override, carry those exact values\non the command instead:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --provider blacksmith-testbox \\\n  --blacksmith-workflow \u003Crepository-workflow> \\\n  --timing-json -- \u003Ctest-command>\n```\n\nAdd `--blacksmith-org`, `--blacksmith-job`, and `--blacksmith-ref` only when the\nuser supplies those overrides. The explicit provider and workflow flags in this\nform implement the user's repository-specific selection; they are not defaults\nfor other runs.\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --idle-timeout 90m \\\n  --ttl 240m \\\n  --timing-json \\\n  -- \\\n  CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 pnpm check:changed\n```\n\nRead the JSON summary and the Testbox line. Useful fields:\n\n- `provider`: `blacksmith-testbox`\n- `leaseId`: `tbx_...`\n- `syncDelegated`: `true`\n- `syncPhases`: delegated\u002Fskipped because Blacksmith owns checkout\u002Fsync\n- Actions run URL\u002Fid from the Testbox output\n- `exitCode`\n\n`blacksmith testbox list` may hide hydrating or ready boxes. Use:\n\n```sh\nblacksmith testbox list --all\nblacksmith testbox status \u003Ctbx_id>\n```\n\n## Observability Flags\n\nUse these on debugging runs before inventing ad hoc logging:\n\n- `--preflight`: prints run context, workspace mode, SSH target, remote user\u002Fcwd,\n  and target-specific tool probes. Defaults cover `git`, `tar`, `node`, `npm`,\n  `corepack`, `pnpm`, `yarn`, `bun`, `docker`, plus POSIX\n  `sudo`\u002F`apt`\u002F`bubblewrap` and native Windows\n  `powershell`\u002F`execution_policy`\u002F`longpaths`\u002F`temp`\u002F`pwsh`. Add\n  `--preflight-tools node,bun,docker`, `CRABBOX_PREFLIGHT_TOOLS`, or repo\n  `run.preflightTools` to replace the list. `default` expands built-ins; `none`\n  prints only the workspace summary. Preflight is diagnostic only; install\n  toolchains through Actions hydration, images, devcontainer\u002FNix\u002Fmise\u002Fasdf, or\n  the run script. On `blacksmith-testbox`, this prints a delegated-unsupported\n  note because the workflow owns setup.\n- `CRABBOX_ENV_ALLOW=NAME,...`: forwards only listed local env vars for direct\n  providers and prints `set len=N secret=true` style summaries. On\n  `blacksmith-testbox`, env forwarding is unsupported; put secrets in the\n  Testbox workflow instead.\n- `--env-from-profile \u003Cfile>` plus `--allow-env NAME`: loads simple\n  `export NAME=value` \u002F `NAME=value` lines from a local profile without\n  executing it, then forwards only allowlisted names. `--allow-env` is\n  repeatable and comma-separated. Profile values override ambient allowlisted\n  env values for that run. Direct POSIX, WSL2, and native Windows runs are\n  supported; delegated providers are not. Crabbox probes the uploaded profile\n  remotely and prints redacted presence\u002Flength metadata before the command.\n- `--env-helper \u003Cname>`: with `--env-from-profile` on POSIX SSH targets,\n  persists `.crabbox\u002Fenv\u002F\u003Cname>` and `.crabbox\u002Fenv\u002F\u003Cname>.env` so follow-up\n  commands on the same lease can run through `.\u002F.crabbox\u002Fenv\u002F\u003Cname> \u003Ccommand>`.\n  Use only on leases you control; the profile stays until cleanup, lease reset,\n  or `--full-resync`.\n- `--script \u003Cfile>` \u002F `--script-stdin`: upload a local script into\n  `.crabbox\u002Fscripts\u002F` and execute it on the remote box. Shebang scripts execute\n  directly on POSIX; scripts without a shebang run through `bash`. Native\n  Windows uploads run through Windows PowerShell, and Crabbox appends `.ps1`\n  when needed. Arguments after `--` become script args.\n- `--fresh-pr owner\u002Frepo#123|URL|number`: skip dirty local sync and create a\n  fresh remote checkout of the GitHub PR. Bare numbers use the current repo's\n  GitHub origin. Add `--apply-local-patch` only when the current local\n  `git diff --binary HEAD` should be applied on top of that PR checkout.\n- `--full-resync` \u002F `--fresh-sync`: reset a stale direct-provider workdir\n  before syncing. Use after sync fingerprints look wrong, SSH times out before\n  sync, or rsync watchdog output suggests it. It is redundant with\n  `--fresh-pr`, incompatible with `--no-sync`, and unsupported by delegated\n  providers.\n- `--capture-stdout \u003Cpath>` \u002F `--capture-stderr \u003Cpath>`: write remote streams to\n  local files and keep binary\u002Fnoisy output out of retained logs. Parent\n  directories must already exist. These are direct-provider only.\n- `--capture-on-fail`: on non-zero direct-provider exits, downloads\n  `.crabbox\u002Fcaptures\u002F*.tar.gz` with `test-results`, `playwright-report`,\n  `coverage`, JUnit XML, and nearby logs. Treat as secret-bearing until reviewed.\n- `--keep-on-failure`: leave a failed one-shot lease alive for live debugging\n  until idle\u002FTTL expiry. Useful on direct providers and delegated one-shots.\n- `--timing-json`: final machine-readable timing. Add\n  `echo CRABBOX_PHASE:install`, `CRABBOX_PHASE:test`, etc. in long shell\n  commands; direct providers and Blacksmith Testbox both report them as\n  `commandPhases`.\n\nLive-provider debug template for the resolved direct-provider lease:\n\n```sh\nmkdir -p .crabbox\u002Flogs\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run \\\n  --preflight \\\n  --allow-env OPENAI_API_KEY,OPENAI_BASE_URL \\\n  --timing-json \\\n  --capture-stdout .crabbox\u002Flogs\u002Flive-provider.stdout.log \\\n  --capture-stderr .crabbox\u002Flogs\u002Flive-provider.stderr.log \\\n  --capture-on-fail \\\n  --shell -- \\\n  \"echo CRABBOX_PHASE:install; pnpm install --frozen-lockfile; echo CRABBOX_PHASE:test; pnpm test:live\"\n```\n\nDo not pass `--capture-*`, `--download`, `--checksum`, `--force-sync-large`, or\n`--sync-only` to delegated providers. Also do not pass `--script*`,\n`--fresh-pr`, `--full-resync`, or `--env-helper` there. Crabbox rejects these\nbecause the provider owns sync or command transport. `--keep-on-failure` is OK\nfor delegated one-shots when you need to inspect a failed lease.\n\n## Efficient Bug E2E Verification\n\nUse the smallest Crabbox lane that proves the reported user path, not just the\ntouched code. Aim for one after-fix E2E proof before commenting, closing, or\nopening a PR for a user-visible bug.\n\nWhen the user says \"test in Crabbox\", do not simply copy tests to the remote\nbox and run them there. Crabbox is for remote real-scenario proof: copy or\ninstall OpenClaw as the user would, run the same setup\u002Fupdate\u002FCLI\u002FGateway\u002FAPI\ncall that failed, and capture behavior from that entrypoint. For regressions or\nbug reports, prove the broken state first when feasible, then run the same\nscenario after the fix.\n\nPick the lane by symptom:\n\n- Docker\u002Fsetup\u002Finstall bug: build a package tarball and run the matching\n  `scripts\u002Fe2e\u002F*-docker.sh` or package script. This proves npm packaging,\n  install paths, runtime deps, config writes, and container behavior.\n- Provider\u002Fmodel\u002Fauth bug: prefer true live E2E. Use the configured secret\n  workflow, then inject the single needed key into Crabbox if needed. Scrub\n  unrelated provider env vars in the child command so interactive defaults do\n  not drift to another provider. If only a dummy key is used, label the proof\n  narrowly, e.g. \"UI\u002Finstall path only; live provider auth not exercised.\"\n- Channel delivery bug: use the channel Docker\u002Flive lane when available; include\n  setup, config, gateway start, send\u002Freceive or agent-turn proof, and redacted\n  logs.\n- Gateway\u002Fsession\u002Ftool bug: prefer an end-to-end CLI or Gateway RPC command that\n  creates real state and inspects the resulting files\u002FAPI output.\n- Pure parser\u002Fconfig bug: targeted tests may be enough, but still run a\n  Crabbox command when OS, package, Docker, secrets, or service lifecycle could\n  change behavior.\n\nEfficient flow:\n\n1. Reproduce or prove the pre-fix symptom from the real user-facing entrypoint\n   when feasible. If the issue cannot be reproduced, capture the exact command\n   and observed behavior instead.\n2. Patch locally and run narrow local tests for edit speed.\n3. Run one Crabbox E2E command that starts from the user-facing entrypoint:\n   package install, Docker setup, onboarding, channel add, gateway start, or\n   agent turn as appropriate.\n4. Record proof as: Testbox id, command, environment shape, redacted secret\n   source, and copied success\u002Ffailure output.\n5. If the issue says \"cannot reproduce\", ask for the missing config\u002Flog fields\n   that would distinguish the tested path from the reporter's path.\n\nKeep it efficient:\n\n- Reuse existing E2E scripts and helper assertions before writing ad hoc shell.\n- Use `--script \u003Cfile>` or `--script-stdin` for multi-line E2E commands instead\n  of quote-heavy `--shell` strings on direct SSH providers.\n- Use `--fresh-pr \u003Cpr>` when validating an upstream PR in isolation from the\n  local dirty tree. Add `--apply-local-patch` only when testing a local fixup on\n  top of that PR.\n- Use `--full-resync` before replacing a warmed direct-provider lease when the\n  remote workdir or sync fingerprint appears stale.\n- Use one-shot Crabbox for a single proof; use a reusable Testbox only when\n  several commands must share built images, installed packages, or live state.\n- Prefer `OPENCLAW_CURRENT_PACKAGE_TGZ` with Docker\u002Fpackage lanes when testing a\n  candidate tarball; prefer the repo's package helper instead of direct source\n  execution when the bug might be packaging\u002Finstall related.\n- Keep secrets redacted. It is fine to report key presence, source, and length;\n  never print secret values.\n- Include `--timing-json` on broad or flaky runs when command duration or sync\n  behavior matters.\n\nBefore\u002Fafter PR proof on delegated Testbox:\n\n- For PRs that should prove \"broken before, fixed after\", compare base and PR\n  on the same Testbox when practical. Fetch both refs, create detached temp\n  worktrees under `\u002Ftmp`, install in each, then run the same harness twice.\n- Do not checkout base\u002FPR refs in the synced repo root. Delegated Testbox sync\n  may leave the root dirty with local files; `git checkout` can abort or mix\n  proof state.\n- Temp harness files under `\u002Ftmp` do not resolve repo packages by default. Put\n  the harness inside the worktree, or in ESM use\n  `createRequire(path.join(process.cwd(), \"package.json\"))` before requiring\n  workspace deps such as `@lydell\u002Fnode-pty`.\n- For full-screen TUI\u002FCLI bugs, a PTY harness is stronger than helper-only\n  assertions. Use a real PTY, wait for visible lifecycle markers, send input,\n  then send control keys and assert process exit\u002Fstuck behavior.\n- When validating a rebased local branch before push, remember delegated sync\n  usually validates synced file content on a detached dirty checkout, not a\n  remote commit object. Record the local head SHA, changed files, Testbox id,\n  and final success markers; after pushing, ensure the pushed SHA has the same\n  file content.\n- If GitHub CI is still queued but the exact changed content passed Testbox\n  `pnpm check:changed`, `pnpm check:test-types`, and the real E2E proof, it is\n  reasonable to merge once required checks allow it. Note any still-running\n  unrelated shards in the proof comment instead of waiting forever.\n\nInteractive CLI\u002Fonboarding:\n\n- For full-screen or prompt-heavy CLI flows, run the target command inside tmux\n  on the Crabbox and drive it with `tmux send-keys`; capture proof with\n  `tmux capture-pane`, redacted through `sed`.\n- Prefer deterministic arrow navigation over search typing for Clack-style\n  searchable selects. Raw `send-keys -l openai` may not trigger filtering in a\n  tmux pane; inspect option order locally or on-box and send exact Down\u002FEnter\n  sequences.\n- Isolate mutable state with `OPENCLAW_STATE_DIR=$(mktemp -d)`. Plugin npm\n  installs live under that state dir (`npm\u002Fnode_modules\u002F...`), not under\n  `OPENCLAW_CONFIG_DIR`. Verify downloads by checking the state dir, package\n  lock, and installed package metadata.\n- To test automatic setup installs against local package artifacts, use\n  `OPENCLAW_ALLOW_PLUGIN_INSTALL_OVERRIDES=1` plus\n  `OPENCLAW_PLUGIN_INSTALL_OVERRIDES='{\"plugin-id\":\"npm-pack:\u002Ftmp\u002Fplugin.tgz\"}'`.\n  Pack with `npm pack`, set an isolated `OPENCLAW_STATE_DIR`, and verify the\n  package under `npm\u002Fnode_modules`. Overrides are test-only and must not be\n  treated as official\u002Ftrusted-source installs.\n- For OpenAI\u002FCodex onboarding proof, the useful markers are the UI line\n  `Installed Codex plugin`, `npm\u002Fnode_modules\u002F@openclaw\u002Fcodex`, and the\n  package-lock entry showing the bundled `@openai\u002Fcodex` dependency. A dummy\n  OpenAI-shaped key can prove only UI\u002Finstall behavior; it is not live auth.\n\n## Reuse And Keepalive\n\nFor most Crabbox calls, one-shot is enough. Use reuse only when you need\nmultiple manual commands on the same hydrated box.\n\nThe examples below assume the lease came from the still-current resolved\nconfiguration. For a lease created through an explicit provider override, add\n`--provider \u003Creported-provider>` to every reuse, inspection, and cleanup command\ninstead of relying on the id to recover its backend.\n\nIf Crabbox returns a reusable id or you intentionally keep a lease:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --id \u003Ccbx_id-or-slug> --no-sync --timing-json --shell -- \"pnpm test \u003Cpath>\"\n```\n\nStop boxes you created before handoff:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox stop \u003Cid-or-slug>\nblacksmith testbox stop --id \u003Ctbx_id>\n```\n\n## Interactive Desktop And WebVNC\n\nBefore using WebVNC, confirm the resolved provider supports both desktop and a\ncoordinator-backed WebVNC lease, and that broker login is configured. Crabbox\n0.39 WebVNC supports coordinator-backed Hetzner, AWS, and Azure desktop leases;\nthis capability list does not establish a provider preference. If the resolved\nprovider lacks WebVNC, do not switch providers: use native `crabbox vnc` on the\nsame provider when it supports that path, or report the capability blocker.\n\nWhen those preconditions hold, prefer WebVNC for human inspection because the\nbrowser portal can preload the lease VNC password and avoids a native VNC\nclient's copy\u002Fpaste\u002Fpassword dance. Use native `crabbox vnc` when the browser\nportal is unavailable or broken, or the user explicitly wants a local VNC\nclient.\n\nCommon desktop flow:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox warmup --desktop --browser --idle-timeout 60m --ttl 240m\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop launch --id \u003Ccbx_id-or-slug> --browser --url https:\u002F\u002Fexample.com --webvnc --open --take-control\n```\n\nUseful WebVNC commands:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc --id \u003Ccbx_id-or-slug> --open --take-control\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc daemon start --id \u003Ccbx_id-or-slug> --open --take-control\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc daemon status --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc daemon stop --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc status --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox webvnc reset --id \u003Ccbx_id-or-slug> --open --take-control\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop doctor --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop click --id \u003Ccbx_id-or-slug> --x 640 --y 420\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop paste --id \u003Ccbx_id-or-slug> --text \"user@example.com\"\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox desktop key --id \u003Ccbx_id-or-slug> ctrl+l\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox artifacts collect --id \u003Ccbx_id-or-slug> --all --output artifacts\u002F\u003Cslug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox artifacts publish --dir artifacts\u002F\u003Cslug> --pr \u003Cnumber>\n```\n\n`desktop launch --webvnc --open` is usually the nicest one-shot: it starts the\nbrowser\u002Fapp inside the visible session, bridges the lease into the authenticated\nWebVNC portal, and opens the portal. Keep browsers windowed for human QA; use\n`--fullscreen` only for capture\u002Fvideo workflows.\nFor human handoff, include `--take-control` so the opened portal viewer gets\nkeyboard\u002Fmouse control automatically instead of landing as an observer.\n\nHuman handoff preflight:\n\n- Do not assume a visible desktop or launched browser means the repo CLI\u002Fapp is\n  installed, built, or on the interactive terminal's `PATH`.\n- Before handing WebVNC to a human tester, prove the expected command from the\n  same kept lease and from a neutral directory such as `~`.\n- If the handoff needs repo-local code, sync\u002Fbuild\u002Flink it explicitly on that\n  lease. Source-tree CLIs often need build output before a symlink works.\n- Prefer a real `command -v \u003Cexpected-command> && \u003Cexpected-command> --version`\n  check over a repo-root-only `pnpm ...` command.\n\nGeneric handoff repair pattern:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --id \u003Ccbx_id-or-slug> --full-resync --shell -- \\\n  \"set -euo pipefail\n   pnpm install --frozen-lockfile\n   pnpm build\n   sudo ln -sf \\\"\\$PWD\u002F\u003Ccli-entry>\\\" \u002Fusr\u002Flocal\u002Fbin\u002F\u003Cexpected-command>\n   cd ~\n   command -v \u003Cexpected-command>\n   \u003Cexpected-command> --version\"\n```\n\n## If Crabbox Fails\n\nKeep the fallback narrow. First decide whether the failure is Crabbox itself,\nthe brokered AWS lease, Blacksmith\u002FTestbox, repo hydration, sync, or the test\ncommand.\n\nFast checks:\n\n```sh\ncommand -v crabbox\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox --version\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --help | sed -n '1,140p'\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox doctor\ncommand -v blacksmith\nblacksmith --version\nblacksmith testbox list\n```\n\nCommon Crabbox-only failures:\n\n- Provider missing or old CLI: use `..\u002Fcrabbox\u002Fbin\u002Fcrabbox` from the sibling\n  repo, or update\u002Finstall Crabbox before retrying.\n- Local-container hydration rejects a configured Actions `uses` step: stay on\n  `provider=local-container`, add `--no-hydrate`, and perform the required\n  dependency setup inside the container command. For example:\n\n  ```sh\n  ..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --no-hydrate --timing-json --shell -- \\\n    \"corepack enable && pnpm install --frozen-lockfile && \u003Ccheck-command>\"\n  ```\n\n  This is a hydration transport workaround, not permission to run the broad\n  check on the host or silently select a remote provider.\n- Bad local config: inspect `.crabbox.yaml`, `crabbox config show`, and\n  `crabbox whoami`; preserve the resolved provider unless the user explicitly\n  requests another backend.\n- Slug\u002Fclaim confusion: use the raw `cbx_...` \u002F `tbx_...` id, or run one-shot\n  without `--id`.\n- Sync\u002Ftiming bug: add `--debug --timing-json`; capture the final JSON and the\n  printed Actions URL. Large sync warnings now include top source directories\n  by file count and a hint to update `.crabboxignore` \u002F `sync.exclude`; inspect\n  those before reaching for `--force-sync-large`. Quiet rsync watchdogs and SSH\n  timeouts now print `next_action=` hints; follow them, usually `--full-resync`\n  first and a fresh lease second.\n- Cleanup uncertainty: run `crabbox list` with the resolved configuration; for\n  explicitly selected Blacksmith runs, use `blacksmith testbox list` and stop\n  only boxes you created.\n- Testbox queued\u002Fcapacity pressure: do not retry repeatedly or switch providers.\n  Report the blocker and preserve the resolved provider.\n\nIf the resolved direct provider cannot dispatch, sync, attach, or stop, retry\nonce with `--debug` and `--timing-json` without changing providers:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --debug --timing-json -- \\\n  CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed\n```\n\nFull suite:\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --debug --timing-json -- \\\n  CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test\n```\n\nAuth fallback, only when `blacksmith` says auth is missing:\n\n```sh\nblacksmith auth login --non-interactive --organization openclaw\n```\n\nRaw Blacksmith footguns:\n\n- Run from repo root. The CLI syncs the current directory.\n- Save the returned `tbx_...` id in the session.\n- Reuse that id for focused reruns; stop it before handoff.\n- Raw commit SHAs are not reliable `warmup --ref` refs; use a branch or tag.\n- Treat `blacksmith testbox list` as cleanup diagnostics, not a shared reusable\n  queue.\n\nIf the selected Blacksmith backend is down or quota-limited, do not keep probing\nit or switch providers. Report the delegated-provider outage.\n\n## Blacksmith Backend Notes\n\nCrabbox Blacksmith backend delegates setup to:\n\n- the organization reported by `crabbox config show`\n- a Testbox-capable `blacksmith.workflow` or `actions.workflow` in the target\n  repository\n- `blacksmith.job` \u002F `blacksmith.ref`, with `actions.job` \u002F `actions.ref`\n  fallbacks\n\nThe hydration workflow owns checkout, Node\u002Fpnpm setup, dependency install,\nsecrets, ready marker, and keepalive. Crabbox owns dispatch, sync, SSH command\nexecution, timing, logs\u002Fresults, and cleanup.\n\nMinimal configured Blacksmith-backed Crabbox run, from repo root. Do not use\nthis fresh-run form until the effective workflow is present and verified as\nTestbox-capable; supply the explicit user-provided workflow above or reuse an\nexisting Testbox id instead.\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --timing-json -- \\\n  CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test:changed\n```\n\nUse direct Blacksmith only when Crabbox is the broken layer and you are\nisolating a Crabbox bug. Prefer direct `blacksmith testbox list` for cleanup\ndiagnostics, not as a reusable work queue.\n\nImportant Blacksmith footguns:\n\n- Always run from repo root. The CLI syncs the current directory.\n- Raw commit SHAs are not reliable `warmup --ref` refs; use a branch or tag.\n- If auth is missing and browser auth is acceptable:\n\n```sh\nblacksmith auth login --non-interactive --organization openclaw\n```\n\n## Brokered AWS\n\nThis section applies only after the resolved configuration or an explicit user\nrequest selects AWS. Do not infer AWS from an omitted `--provider`.\n\nConfirm the selection first:\n\n```sh\ncrabbox config show\ncrabbox doctor\n```\n\nFor Linux, the repository configuration supplies the broker URL, developer\nimage, `eu-west-1` default region, capacity-region candidates, and\nspot-to-on-demand capacity policy. Do not repeat those values on every command;\nthe resolved configuration remains the source of truth. For native Windows,\nuse the `us-west-2` on-demand command in \"macOS And Windows Targets\" above. For\nbrokered macOS, complete the quota\u002FIAM and no-spend Dedicated Host preflight in\nthat section before allocation. If the user explicitly selects AWS over a\ndifferent resolved provider, add `--provider aws` to the AWS commands below.\n\n```sh\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox warmup --idle-timeout 90m\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox actions hydrate --id \u003Ccbx_id-or-slug>\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox run --id \u003Ccbx_id-or-slug> --timing-json --shell -- \"env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed\"\n..\u002Fcrabbox\u002Fbin\u002Fcrabbox stop \u003Ccbx_id-or-slug>\n```\n\nInstall\u002Fauth for owned Crabbox if needed. When configuration already resolves\nAWS and only broker auth is missing, omit `--provider` so login writes the token\nwithout changing provider selection:\n\n```sh\nbrew install openclaw\u002Ftap\u002Fcrabbox\ncrabbox login --url https:\u002F\u002Fcrabbox.openclaw.ai\n```\n\nIf the user explicitly wants AWS as their persisted user-config default, use\n`crabbox login --url https:\u002F\u002Fcrabbox.openclaw.ai --provider aws`. The provider\nflag writes both broker auth and `provider=aws`; it is a configuration change,\nnot merely credential scoping. Repository config or `CRABBOX_PROVIDER` may\nstill take higher precedence, so confirm the effective result with\n`crabbox config show` in the target worktree.\n\nNew users should self-resolve broker auth before anyone asks for AWS keys:\n\n```sh\ncrabbox config show\ncrabbox doctor\ncrabbox whoami\n```\n\n- If broker auth is missing, run `crabbox login --url https:\u002F\u002Fcrabbox.openclaw.ai`.\n  Add `--provider aws` only when the user also wants to persist AWS as their\n  user-config default.\n- If the CLI asks for `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, or AWS\n  profile setup during normal OpenClaw validation, assume the agent selected\n  the wrong path. Use brokered `crabbox login` or an existing brokered lease\n  before asking the user for cloud credentials.\n- Ask for AWS keys only for explicit direct-provider\u002Faccount administration,\n  not for normal brokered OpenClaw proof.\n- Trusted automation that intentionally persists AWS as its default may use\n  `printf '%s' \"$CRABBOX_COORDINATOR_TOKEN\" | crabbox login --url https:\u002F\u002Fcrabbox.openclaw.ai --provider aws --token-stdin`.\n\nmacOS config lives at:\n\n```text\n~\u002FLibrary\u002FApplication Support\u002Fcrabbox\u002Fconfig.yaml\n```\n\nIt should include `broker.url` and `broker.token` for AWS lanes. Let the resolved\nconfig select the backend; override it only when the user explicitly requests a\ndifferent provider.\n\n### Interactive Desktop \u002F WebVNC\n\nFor human desktop demos, prefer `webvnc` over native `vnc` and keep the remote\ndesktop visible\u002Fwindowed. Do not fullscreen the remote browser or hide the XFCE\npanel\u002Fwindow chrome unless the explicit goal is video\u002Fcapture output. After\nlaunch, verify a screenshot shows the desktop panel plus browser title bar. If\nChrome is fullscreen, toggle it back with:\n\n```sh\ncrabbox run --id \u003Clease> --shell -- 'DISPLAY=:99 xdotool search --onlyvisible --class google-chrome windowactivate key F11'\n```\n\n## Diagnostics\n\n```sh\ncrabbox status --id \u003Cid-or-slug> --wait\ncrabbox inspect --id \u003Cid-or-slug> --json\ncrabbox sync-plan\ncrabbox history --limit 20\ncrabbox history --lease \u003Cid-or-slug>\ncrabbox attach \u003Crun_id>\ncrabbox events \u003Crun_id> --json\ncrabbox logs \u003Crun_id>\ncrabbox results \u003Crun_id>\ncrabbox cache stats --id \u003Cid-or-slug>\ncrabbox ssh --id \u003Cid-or-slug>\nblacksmith testbox list\n```\n\nUse `--debug` on `run` when measuring sync timing.\nUse `--timing-json` on warmup, hydrate, and run when comparing backends.\nUse `--market spot|on-demand` only on AWS warmup\u002Fone-shot runs.\n\n## Failure Triage\n\n- Crabbox cannot find provider: verify `..\u002Fcrabbox\u002Fbin\u002Fcrabbox --help` lists\n  the provider selected by `.crabbox.yaml`; update Crabbox before falling back.\n- Hydration stuck or failed: open the printed GitHub Actions run URL and inspect\n  the hydration step.\n- Sync failed: rerun with `--debug`; check changed-file count and whether the\n  checkout is dirty.\n- Command failed: rerun only the failing shard\u002Ffile first. Do not rerun a full\n  suite until the focused failure is understood.\n- Cleanup uncertain: `crabbox list` with the resolved configuration; for\n  explicitly selected Blacksmith runs, use `blacksmith testbox list` and stop\n  owned `tbx_...` leases you created.\n- Selected provider broken: report the provider-specific blocker; do not switch\n  providers unless the user explicitly requests the fallback.\n\n## Boundary\n\nDo not add OpenClaw-specific setup to Crabbox itself. Put repo setup in the\nhydration workflow and keep Crabbox generic around lease, sync, command\nexecution, logs\u002Fresults, timing, and cleanup.\n",{"name":5,"description":7},"main","62e2a1922c4b58c6c10b5ea7282171f7603545b7",".agents\u002Fskills\u002Fcrabbox",323,"https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawsweeper","https:\u002F\u002Fclawsweeper.bot","https:\u002F\u002Fgithub.com\u002Fopenclaw","https:\u002F\u002Fopenclaw.ai","Your personal, open source AI assistant.","2026-11-15 01:18:01",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add openclaw\u002Fclawsweeper --skill crabbox",{"tool":52,"command":53},"bunx","bunx skills add openclaw\u002Fclawsweeper --skill crabbox",{"tool":55,"command":56},"pnpm","pnpm dlx skills add openclaw\u002Fclawsweeper --skill crabbox","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawsweeper\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcrabbox\u002FSKILL.md",true,[],[61],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":31},"01M698R35WC54MFGCJA69AYEW5","local-clawsweeper-review","Run local ClawSweeper exact-item or committed-range reviews without GitHub mutation.","https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fclawsweeper\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Flocal-clawsweeper-review\u002FSKILL.md",[],[68,69,70,71,72,73,74,75],"clawsweeper","review","local clawsweeper review","local","github","run","mutation","reviews"]