Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(deploy): route production commands to GCP
ni3ac2ff2f4d4748
diff --git a/docs/build.md b/docs/build.mdindex cd635e22c..854508514 100644--- a/docs/build.md+++ b/docs/build.md@@ -12,6 +12,8 @@ touching the build pipeline.| `npm run build:gcp` | The **full pre-deploy build**, in the load-bearing order: `check:conflicts` → `check:browser-graph` → `ensure:avatar-studio` → build info snapshot → `build:chat` → `npm run build` (the vite build wipes `dist/`, so everything that writes into `dist/` comes after it) → UMD library build (`build:lib:full`) → `publish:lib` (mirrors the library into `dist/`) → `build:info` → `check:dist` → `check:pages`. Run this, not bare `npm run build`, before deploying: `check:dist` fails without the published library bundle. || `npm run deploy:gcp` | The **production deploy**: `check:dist` + `check:pages` + `db:check` gates → `gcloud builds submit` (Docker image via `server/cloudbuild.yaml`) → Cloud Run (`three-ws-api`, `us-central1`) → CDN cache purge → `smoke:prod` sweep of the live site. Run `npm run build:gcp` first so `dist/` is complete (see [CI parity](#ci-parity)). || `npm run deploy:gcp:full` | `build:gcp` + `deploy:gcp` in one command. |+| `npm run deploy` | Provider-neutral production alias for `deploy:gcp:full`. It never invokes Vercel. |+| `npm run build:production` | Full local reproduction build retained from the pre-GCP orchestrator. || `npm run build:vercel` | Legacy full-build orchestrator (`scripts/build-vercel.mjs`) from the Vercel era — runs the gate suite, bundles the API with esbuild, and builds every sub-package. **Not on the Cloud Run deploy path**; kept for full local reproduction (see [the trap](#the-esbuild-overwrite-trap)). || `npm run clean` | `rm -rf dist/* dist-lib/*`. || `npm run check:dist` | Asserts the published `agent-3d` library bundle + `dist-lib` mirror exist, the version matches `package.json`, and a short list of critical static pages resolves in `dist/` (`scripts/check-dist.mjs`). The full page sweep against the `vercel.json` route table is `npm run check:pages` (`scripts/check-pages.mjs`). |diff --git a/package.json b/package.jsonindex 91344e0c1..a15b7a714 100644--- a/package.json+++ b/package.json@@ -326,7 +326,8 @@"deps:chat": "cd chat && node scripts/ensure-deps.mjs","build:avatar-studio": "npm run build --prefix character-studio","build:fast": "npm run build",- "build:vercel": "node scripts/build-vercel.mjs",+ "build:production": "node scripts/build-vercel.mjs",+ "build:vercel": "npm run build:production","apply:r2-cors": "node scripts/set-r2-cors.mjs || echo '[apply:r2-cors] skipped (missing creds or transient failure — see build log)'","build:all": "npm run build:chat && (npm run build & npm run build:lib & wait)","release:lib": "npm run build:lib && npm run publish:lib",@@ -397,7 +398,7 @@"event:watch": "node scripts/event-watch.mjs","event:capacity": "node scripts/play-capacity-smoke.mjs","event:failover": "node --env-file=.env scripts/event-dependency-failover.mjs",- "deploy": "npm run build:all && npm run check:dist && vercel --local-config vercel.json --prod",+ "deploy": "npm run deploy:gcp:full","feedback:repro": "node --env-file-if-exists=.env.local scripts/feedback-repro.mjs","test:agent-vitals": "node --test packages/agent-vitals/test/*.test.js","test:witness": "node --test packages/witness/test/*.test.js",diff --git a/tests/deployment-target.test.js b/tests/deployment-target.test.jsnew file mode 100644index 000000000..558a45a5b--- /dev/null+++ b/tests/deployment-target.test.js@@ -0,0 +1,30 @@+import { readFileSync } from 'node:fs';++import { describe, expect, it } from 'vitest';++const packageJson = JSON.parse(+ readFileSync(new URL('../package.json', import.meta.url), 'utf8'),+);+const routeManifest = JSON.parse(+ readFileSync(new URL('../vercel.json', import.meta.url), 'utf8'),+);++describe('production deployment target', () => {+ it('routes the generic deploy command through the guarded GCP pipeline', () => {+ expect(packageJson.scripts.deploy).toBe('npm run deploy:gcp:full');+ expect(packageJson.scripts.deploy).not.toContain('vercel');+ });++ it('keeps automatic Vercel Git deployments disabled', () => {+ expect(routeManifest.git?.deploymentEnabled).toBe(false);+ });++ it('gives the legacy full-build orchestrator a provider-neutral command', () => {+ expect(packageJson.scripts['build:production']).toBe(+ 'node scripts/build-vercel.mjs',+ );+ expect(packageJson.scripts['build:vercel']).toBe(+ 'npm run build:production',+ );+ });+});