Skip to content

Official Codebase of 3DCodeVerse

Python

setup.sh brings agy, claude-code and codex to their latest release; no other version checks

gaoypengdfa1a5a2c7dd
diff --git a/README.md b/README.md
index 2de861ca..e0bc89c1 100644
--- a/README.md
+++ b/README.md
@@ -84,15 +84,14 @@ languages). Full guide: [harness/docs/INSTALL.md](harness/docs/INSTALL.md).
```bash
cd harness
-bash setup.sh # pip install -e . + runtime_js + headless Chrome, then `3dcode doctor`
-curl -fsSL https://antigravity.google/cli/install.sh | bash # agy → ~/.local/bin (`agy update` to upgrade)
-export GEMINI_API_KEYS="key1,key2" # agy runs in Gemini-API mode on this key pool
-3dcode doctor # every row OK or WARN; a FAIL row says what to fix
+bash setup.sh # pip install -e . + runtime_js + headless Chrome + the agy / claude-code / codex CLIs at their latest, then `3dcode doctor`
+export GEMINI_API_KEYS="key1,key2" # agy runs in Gemini-API mode on this key pool
+3dcode doctor # every row OK or WARN; a FAIL row says what to fix
3dcode make "a classic park bench" --track static_object --language threejs
-3dcode gallery serve # browse every run at http://127.0.0.1:8765/
+3dcode gallery serve # browse every run at http://127.0.0.1:8765/
```
-Optional generators: `npm i -g @anthropic-ai/claude-code @openai/codex`, then `--generator claude-code:<model>`
+The optional generators claude-code and codex use your local subscriptions: `--generator claude-code:<model>`
or `--generator codex:<model>`. Tracks, languages and costs per track: [harness/README.md](harness/README.md) and
[harness/docs/RUNBOOK.md](harness/docs/RUNBOOK.md); evaluation: [eval/README.md](eval/README.md).
diff --git a/harness/CLAUDE.md b/harness/CLAUDE.md
index 3b2b960f..1fe0c1f2 100644
--- a/harness/CLAUDE.md
+++ b/harness/CLAUDE.md
@@ -67,13 +67,12 @@ push, with `set -o pipefail` so a `| tail` cannot swallow a red exit. The versi
(`spatial.node.run_node(three_hook=True)`) — `NODE_PATH` alone does not work;
that hook is `module.registerHooks` on node ≥ 22.15, `module.register` below.
The `graphics` track renders with moderngl (d3d12 GPU context, llvmpipe fallback).
-- CLIs: `agy` 1.4.12 (Antigravity; gemini-cli was deleted in D103, 2026-10-13) — runs ONLY in
+- CLIs: `agy` (Antigravity; gemini-cli was deleted in D103, 2026-10-13) — runs ONLY in
Gemini-API mode (Gemini models only, keys required; no subscription sign-in): one key from the
- shared pool, a per-session HOME carrying `modelProvider: gemini` + the 3dcode MCP server, priced. `codex` 0.166 (MCP needs
- `default_tools_approval_mode="approve"`) and `claude` 2.1.317 run on local subscriptions: test
- lightly. No Anthropic/OpenAI API keys here. All three re-verified live 2026-11-03 (D115) — after an
- upgrade (`agy update`; `npm i -g @anthropic-ai/claude-code @openai/codex`) run
- `pytest -m live tests/agents tests/skills/test_live_discovery.py`.
+ shared pool, a per-session HOME carrying `modelProvider: gemini` + the 3dcode MCP server, priced. `codex` (MCP needs
+ `default_tools_approval_mode="approve"`) and `claude` run on local subscriptions: test
+ lightly. No Anthropic/OpenAI API keys here. `setup.sh` keeps all three at their latest release
+ (`--no-clis` skips); no version is pinned or required — `doctor` prints what it found (owner, 2026-11-03; D115).
- DEFAULT generator: `agy:gemini-4-argon` (D103, 2026-10-13; `gemini-cli:gemini-3.7-flash` before); planner and
captioner default to `gemini:gemini-4-argon` too.
`gemini-3.7-flash` stays the cheap API model (single-shot / economy, flash judge — lenient; needs
diff --git a/harness/README.md b/harness/README.md
index 6106cfb1..1532740f 100644
--- a/harness/README.md
+++ b/harness/README.md
@@ -74,13 +74,13 @@ Design laws, the full package map and what each stage does: `docs/ARCHITECTURE.m
`ruff` run locally before every push. See `docs/INSTALL.md` §2.1.
```bash
-bash setup.sh # python package + runtime_js + headless Chrome + doctor (idempotent; see docs/INSTALL.md)
+bash setup.sh # python package + runtime_js + headless Chrome + the agy / claude / codex CLIs at their latest + doctor
# ...or by hand:
pip install -e '.[all,dev]' # entry points: 3dcodeverse, 3dcode
(cd runtime_js && npm ci) # [email protected] + puppeteer 24 (chrome → ~/.cache/puppeteer)
-curl -fsSL https://antigravity.google/cli/install.sh | bash # agy 1.4.12, the default generator's CLI (`agy update` later)
-export GEMINI_API_KEYS="key1,key2" # agy runs in Gemini-API mode on this key pool (docs/INSTALL.md §8)
-npm i -g @anthropic-ai/claude-code @openai/codex # optional generators claude-code / codex (local subscriptions)
+curl -fsSL https://antigravity.google/cli/install.sh | bash # agy, the default generator's CLI (`agy update` later)
+npm i -g @anthropic-ai/claude-code@latest @openai/codex@latest # optional generators claude-code / codex (local subscriptions)
+export GEMINI_API_KEYS="key1,key2" # agy runs in Gemini-API mode on this key pool (docs/INSTALL.md §8)
3dcode doctor
3dcode make "a mid-century wooden dining chair" --track static_object --language blender
3dcode make "a kitchen cabinet with one door and a drawer" --track articulated_object --language urdf_blender
diff --git a/harness/docs/INSTALL.md b/harness/docs/INSTALL.md
index 3ed65285..ee2ed89e 100644
--- a/harness/docs/INSTALL.md
+++ b/harness/docs/INSTALL.md
@@ -26,28 +26,33 @@ Once installed, read `docs/RUNBOOK.md` (how to run), `docs/ARCHITECTURE.md`
git clone <repo> 3dcodeverse && cd 3dcodeverse
python3 -m venv .venv && source .venv/bin/activate # see §3 — a distro python3 is
# PEP 668 and pip will refuse it
-bash harness/setup.sh # python + node deps + chrome + doctor
+bash harness/setup.sh # python + node deps + chrome + the agy / claude / codex CLIs + doctor
```
`setup.sh` is idempotent — it checks the interpreter versions, runs
`pip install -e 'harness[all,dev]'`, runs `npm ci` in `runtime_js/` **only when the
-lockfile actually moved**, makes sure puppeteer's Chrome is downloaded, and
-finishes by printing `3dcodeverse doctor`. Useful flags:
-`--extras cad,urdf`, `--python /path/to/python`, `--no-node`, `--no-chrome`,
-`--no-doctor`, `--no-gpu`, `--force-npm`, `--help`.
+lockfile actually moved**, makes sure puppeteer's Chrome is downloaded, brings the three
+coding-agent CLIs to their latest release (§8.2: `agy update`, or Google's installer when there
+is no agy; `npm i -g` for claude and codex whenever the installed npm version differs from the
+registry's `latest`), and finishes by printing `3dcodeverse doctor`. Useful flags:
+`--extras cad,urdf`, `--python /path/to/python`, `--no-python`, `--no-node`, `--no-chrome`,
+`--no-clis`, `--no-doctor`, `--no-gpu`, `--force-npm`, `--help`.
The manual equivalent:
```bash
pip install -e 'harness[all,dev]'
cd harness/runtime_js && npm ci && npx puppeteer browsers install chrome && cd ..
+curl -fsSL https://antigravity.google/cli/install.sh | bash # agy (later: `agy update`)
+npm i -g @anthropic-ai/claude-code@latest @openai/codex@latest # the optional generators
3dcodeverse doctor
```
> **Running installs on a busy box.** `npm ci` deletes `node_modules/` before
> re-creating it, and `pip install -e` rewrites the entry points. If benches or
-> renders are running against this checkout, use `setup.sh` (which skips `npm ci`
-> when the lockfile is unchanged) or wait for them to finish.
+> renders are running against this checkout, use `setup.sh --no-clis` (it skips `npm ci`
+> when the lockfile is unchanged, and `--no-clis` leaves the generators' CLIs alone) or
+> wait for them to finish.
---
@@ -383,22 +388,23 @@ Gemini keys (§8.1): one key from the harness's own pool per session, the 3dcode
Gemini list price — no sign-in, no non-Gemini model. Without keys an agy session fails at once
(doctor row `agy gemini keys`). The other two are needed only when you name them.
+`setup.sh` brings all three to their latest release on every run (`--no-clis` skips it): agy
+through its own `agy update` — or, when there is no agy at all, Google's checksum-verified
+installer into `~/.local/bin`, which also adds that directory to your shell profile — and the
+two npm globals whenever the installed version differs from the registry's `latest`. A claude
+or codex installed another way (a native installer, Homebrew) is left to its own updater.
+Nothing pins a version; the closing `doctor` prints the three it found. By hand:
+
```bash
-# agy — the Antigravity CLI (1.4.12 here): Google's installer, checksum-verified, into ~/.local/bin
-curl -fsSL https://antigravity.google/cli/install.sh | bash # later upgrades: `agy update`
-# the other two are npm globals (re-run the same line to upgrade)
-npm i -g @anthropic-ai/claude-code # claude (2.1.317 here)
-npm i -g @openai/codex # codex (0.166.0 here)
-agy --version && claude --version && codex --version
+curl -fsSL https://antigravity.google/cli/install.sh | bash # agy; later: `agy update`
+npm i -g @anthropic-ai/claude-code@latest @openai/codex@latest # claude, codex
+agy --version && claude --version && codex --version # 1.4.12 / 2.1.317 / 0.166.0 here (2026-11-03)
```
`claude` and `codex` authenticate against your local subscription
(their own `login` flows) — test lightly. The harness handles the per-CLI quirks for you
(agy's per-session API-mode HOME, codex's MCP approval mode); what each one is and why it must
-not be undone: `docs/RUNBOOK.md` §3. No version is pinned: the harness drives each CLI through
-its print / JSON interface, and the check after an upgrade is one small real session per CLI plus
-the skill-discovery probe — `pytest -m live tests/agents tests/skills/test_live_discovery.py`
-(last run 2026-11-03 on the versions above, D115).
+not be undone: `docs/RUNBOOK.md` §3.
The spatial MCP server itself is the `mcp` extra (§4); check it with
`python -m codeverse3d.spatial.mcp_server --workspace <ws> --list`.
@@ -615,7 +621,8 @@ cleanup. On this machine `eval/bench/out/` is read-only reference material
Uninstalling does not touch `~/.config/3dcodeverse/config.yaml`,
`~/.config/astra3d/gemini_keys.env` or the globally installed CLIs — remove
-those by hand (`npm rm -g @anthropic-ai/claude-code @openai/codex`; agy: `rm ~/.local/bin/agy`).
+those by hand (`npm rm -g @anthropic-ai/claude-code @openai/codex`; agy: `rm ~/.local/bin/agy`
+and the `# Added by Antigravity CLI installer` PATH lines in `~/.bashrc` / `~/.profile`).
---
@@ -630,5 +637,5 @@ those by hand (`npm rm -g @anthropic-ai/claude-code @openai/codex`; agy: `rm ~/.
| Chrome (puppeteer) | 148.0.7778.97 (+ headless-shell) | `~/.cache/puppeteer` |
| Blender | 5.2.2 LTS (build 2026-09-15; installed 2026-10-14, sha256-verified) | `~/.local/bin/blender-5.2` → `~/tools/blender-5.2.2-linux-x64` (any directory: the wrapper's `BLENDER_HOME`) |
| git | 2.53.0 | `/usr/bin/git` |
-| agy / claude / codex | 1.4.12 / 2.1.317 / 0.166.0 (the latest releases on 2026-11-03; re-verified live, D115) | `~/.local/bin/agy` · npm global (`~/miniconda3/bin`) |
+| agy / claude / codex | 1.4.12 / 2.1.317 / 0.166.0 (the latest releases on 2026-11-03, D115; `setup.sh` keeps them there) | `~/.local/bin/agy` · npm global (`~/miniconda3/bin`) |
| GPU (Chrome WebGL) | ANGLE · D3D12 · NVIDIA GeForce RTX 5090 Laptop GPU · OpenGL ES 3.1 | via `--use-angle=gl-egl` + Mesa d3d12 |
diff --git a/harness/setup.sh b/harness/setup.sh
index 64b698d6..ede0fe8b 100755
--- a/harness/setup.sh
+++ b/harness/setup.sh
@@ -5,7 +5,10 @@
#
# Does, in order: version checks (python 3.13, node >= 20.6) -> `pip install -e
# harness[<extras>]` -> `npm ci` in runtime_js *only when the lockfile moved* ->
-# puppeteer chrome download (no-op when cached) -> `3dcodeverse doctor`.
+# puppeteer chrome download (no-op when cached) -> the coding-agent CLIs at their
+# latest release (`agy update`, or the installer when there is no agy; claude + codex via
+# `npm i -g` whenever the installed npm version differs from the registry's `latest`) ->
+# `3dcodeverse doctor`.
# Re-running is safe: every step is a no-op when it is already satisfied.
# Full guide: docs/INSTALL.md
set -euo pipefail
@@ -25,6 +28,7 @@ EXTRAS="all,dev"
DO_PYTHON=1
DO_NODE=1
DO_CHROME=1
+DO_CLIS=1
DO_DOCTOR=1
FORCE_NPM=0
DOCTOR_ARGS=()
@@ -38,6 +42,8 @@ usage: setup.sh [options]
--no-python skip the pip install step
--no-node skip `npm ci` in runtime_js
--no-chrome skip the puppeteer chrome download
+ --no-clis skip the coding-agent CLIs: agy update (or Google's installer: ~/.local/bin/agy
+ + a PATH line in your shell profile), claude + codex via `npm i -g`
--no-doctor skip the final `3dcodeverse doctor`
--force-npm run `npm ci` even when node_modules looks up to date
(WARNING: npm ci deletes node_modules first — do not use
@@ -56,6 +62,7 @@ while [ $# -gt 0 ]; do
--no-python) DO_PYTHON=0; shift ;;
--no-node) DO_NODE=0; shift ;;
--no-chrome) DO_CHROME=0; shift ;;
+ --no-clis) DO_CLIS=0; shift ;;
--no-doctor) DO_DOCTOR=0; shift ;;
--force-npm) FORCE_NPM=1; shift ;;
--no-gpu) DOCTOR_ARGS+=(--no-gpu); shift ;;
@@ -162,6 +169,61 @@ else
step "runtime_js (skipped: no usable node, or --no-node)"
fi
+# ------------------------------------------------------------- coding-agent CLIs
+# The generators are vendor CLIs (docs/INSTALL.md §8.2): agy is the default generator's
+# (D103), claude and codex are optional. Each is brought to its vendor's latest release on
+# every run — agy by its own updater (its installer when there is no binary at all), the two
+# npm globals whenever the installed version differs from the registry's `latest`. A claude
+# or codex that is on PATH but not an npm global (a native installer, Homebrew) is left to
+# its own updater. Nothing pins a version; the closing doctor prints the three it found.
+AGY_INSTALLER="https://antigravity.google/cli/install.sh"
+if [ "$DO_CLIS" -eq 1 ]; then
+ step "coding-agent CLIs at their latest (agy, claude, codex)"
+ AGY="$(command -v agy 2>/dev/null || true)"
+ if [ -z "$AGY" ] && [ -x "${HOME:-}/.local/bin/agy" ]; then # installed; this shell has not re-read its profile
+ AGY="${HOME:-}/.local/bin/agy"
+ export PATH="${HOME:-}/.local/bin:$PATH"
+ info "agy is at $AGY but not on this shell's PATH — open a new shell after this"
+ fi
+ if [ -n "$AGY" ]; then
+ "$AGY" update || info "agy update failed (offline?) — keeping $("$AGY" --version 2>/dev/null || echo '?')"
+ elif command -v curl >/dev/null 2>&1; then
+ info "agy not found — running the Antigravity installer ($AGY_INSTALLER -> ~/.local/bin/agy + a PATH line in your shell profile)"
+ if curl -fsSL "$AGY_INSTALLER" | bash; then
+ export PATH="${HOME:-}/.local/bin:$PATH" # for the closing doctor
+ else
+ info "agy install failed — install it by hand (docs/INSTALL.md §8.2)"
+ fi
+ else
+ info "agy not found and no curl — install it by hand (docs/INSTALL.md §8.2)"
+ fi
+ if command -v npm >/dev/null 2>&1; then
+ for pkg in @anthropic-ai/claude-code @openai/codex; do
+ bin="${pkg##*/}"; bin="${bin%-code}" # the binaries: claude, codex
+ # `npm ls` prints `<path>:<name>@<version>[:<realpath>]`; keep the version field only
+ # (`--no-json`: a `json=true` in the user's npm config would turn both listings into JSON)
+ have="$(npm ls -g --depth=0 --long --parseable --no-json 2>/dev/null | sed -n "s|^[^:]*:$pkg@\([^:]*\).*$|\1|p" | head -n1 || true)"
+ if [ -z "$have" ] && command -v "$bin" >/dev/null 2>&1; then
+ info "$pkg $(command -v "$bin") is not an npm install — left to its own updater"
+ continue
+ fi
+ latest="$(npm view "$pkg" version --no-json --fetch-retries=0 2>/dev/null || true)"
+ if [ -z "$latest" ]; then
+ info "$pkg ${have:-not installed} (npm registry unreachable — left as is)"
+ elif [ "$have" = "$latest" ]; then
+ info "$pkg $have (latest)"
+ else
+ info "$pkg ${have:-not installed} -> $latest"
+ npm install -g "$pkg@$latest" || info "$pkg install failed — install it by hand (docs/INSTALL.md §8.2)"
+ fi
+ done
+ else
+ info "npm not found — claude and codex not installed (optional generators)"
+ fi
+else
+ step "coding-agent CLIs (skipped: --no-clis)"
+fi
+
# ----------------------------------------------------------------------- doctor
if [ "$DO_DOCTOR" -eq 1 ]; then
step "3dcodeverse doctor"
diff --git a/harness/tests/install/test_docs.py b/harness/tests/install/test_docs.py
index 94b5d13b..9faf1c1a 100644
--- a/harness/tests/install/test_docs.py
+++ b/harness/tests/install/test_docs.py
@@ -335,7 +335,7 @@ def test_setup_verifies_the_interpreter_it_installed_into(tmp_path) -> None:
env = dict(os.environ, PATH=f"{fake}{os.pathsep}{os.environ['PATH']}")
proc = subprocess.run(
- ["bash", str(SETUP), "--python", str(py), "--no-node", "--no-chrome", "--no-gpu", "--no-python"],
+ ["bash", str(SETUP), "--python", str(py), "--no-node", "--no-chrome", "--no-gpu", "--no-python", "--no-clis"],
capture_output=True, text=True, timeout=300, env=env)
assert "WRONG_INSTALL_ON_PATH" not in proc.stdout + proc.stderr, (
"setup.sh verified the 3dcodeverse first on PATH instead of the --python interpreter")
@@ -354,7 +354,7 @@ def test_setup_names_the_remedy_when_the_interpreter_has_no_pip(tmp_path) -> Non
f'exec {sys.executable} "$@"\n')
nopip.chmod(0o755)
- proc = subprocess.run(["bash", str(SETUP), "--python", str(nopip), "--no-node", "--no-chrome", "--no-doctor"],
+ proc = subprocess.run(["bash", str(SETUP), "--python", str(nopip), "--no-node", "--no-chrome", "--no-clis", "--no-doctor"],
capture_output=True, text=True, timeout=300)
out = proc.stdout + proc.stderr
assert proc.returncode != 0, "a python that cannot pip must not look like a successful install"