mirror of
https://github.com/nexu-io/openmotion.git
synced 2026-12-02 19:10:05 +08:00
* feat(game-static-play): add 274-template R2 zip packaging, cookieless static play deploy, and verification pipeline * feat(game-skill): port 21-section OpenGame skill with dual-mode workflow and fast-play path * feat(onboarding): upgrade Cloud MCP install guide and add shared OpenGame prompt builders * feat(game-catalog): sync 274 official templates, 4 kits, downloads manifest, and game contract * feat(cloud-mcp): add read-only game catalog, free asset search, guest catalog API, redirects, and Docker packaging * feat(opengame): enable Stage 1 Game Studio routing, feature flags, and analytics * feat(opengame): add Stage 1 market, multi-client modal, Cursor HTTP fix, SuperAgent prompt, and i18n * fix(opengame): align nullable GameCardWithMeta fields and add opengame-catalog MCP capability * test(mcp-onboarding): update registered public tool count from 22 to 24 for Stage 1 game tools * chore(game-catalog): register 26 verified live R2 in-repo template bundles in game-downloads.json * fix(opengame): address Stage 1 review feedback and failing CI lanes - Send no play URL when GAME_PLAY_PUBLIC_ORIGIN is unset instead of a main-site path that no route serves; Studio falls back to bundled in-repo templates - Keep legacy-host 301 redirects on the configured origin for network-path inputs - Correct the BlenderKit page host in the asset search allowlist - Reuse the shared withdrawn list, TOP earning tag, curated order and comparator in Studio - Remove the unused shared prompt module; the shipped builders stay covered by Studio tests - Drop the blurred launch backdrop and the in-dialog copy notices in favour of Toasts - Describe the shipped read-only Game Studio boundary and 24-tool MCP contract in the architecture - Schedule the game skill and static play suites in CI and budget the three OpenGame events * fix(game-static-play): retry stalled template bundle downloads before failing the run * fix(game-asset-search): size the pagination cursor limit for every supported query A 200-unit query with non-ASCII, control or lone-surrogate characters produced a cursor longer than the 512-character limit, so nextCursor was rejected by both the decoder and the public schema. Share one limit derived from the worst-case JSON/base64url expansion and add a round-trip test for maximum-length queries. * fix(game-asset-search): accept BlenderKit pages on www.blendkit.com and guide licence checks www.blenderkit.com now redirects to www.blendkit.com and the upstream catalog returns that host, so requiring www.blenderkit.com dropped every BlenderKit result. Restore the live host, pin a real upstream row in tests, and tell Agents to confirm the licence on the source page when a source omits it. * fix(deploy): forward game play origin and legacy redirect hosts to the API deploy/.env.example and deploy/k8s/configmap.yaml declared GAME_PLAY_PUBLIC_ORIGIN and APP_REDIRECT_FROM_HOSTS, but neither the compose api service nor the reference api Deployment passed them to the process. Wire both and assert that every reference ConfigMap key is read by a workload. * Address review: keep legacy-host writes, enforce play-origin isolation, share catalog constants - Legacy-host redirects answer GET/HEAD with 301 and every other method with 308, so MCP and API writes keep their method and body. - parseConfig rejects a GAME_PLAY_PUBLIC_ORIGIN that is not https (loopback http excepted), carries a path, or shares or sits under the APP_PUBLIC_ORIGIN host. - The template id pattern, bundle key prefix, withdrawn set and TOP tag predicate live in shared/game-contract.ts; static play, deploy/verify scripts and the catalog service reuse them and the shared bundle URL builder. - Remove unused game-contract and model-catalog exports. - Update the MCP contract, AGENTS.md, README and docs to the 24-name phase-one surface and document the read-only OpenGame tools and guest catalog routes. * fix(game-static-play): make the full play-site upload resumable Upload through the S3 SDK instead of one aws CLI process per file, skip objects whose ETag already matches the local MD5, retry each request with backoff, and write assets before entry pages and the manifest. Give large bundle downloads time for a slow link. Record the provisioned bucket, domain and remaining header rule in the runbook. * feat(game-static-play): harden live play verification and add manual R2 publish workflow * fix(opengame): raise prompt/remix maxLength for >4k OG-13 test and reset notes on target change * fix(mcp): register resources/templates/list handler for Codex MCP compliance * chore(game-catalog): register uploaded tidebreaker bundle for 274/274 R2 CDN parity --------- Co-authored-by: heggria <bshengtao@gmail.com>
167 lines
7.3 KiB
Plaintext
167 lines
7.3 KiB
Plaintext
# OpenMotion local Docker Compose configuration (AUTH_MODE=dev, MODEL_GATEWAY_MODE=mock).
|
|
# Copy to deploy/.env before customizing: `cp deploy/.env.example deploy/.env`
|
|
# NEVER commit deploy/.env or real credentials to Git.
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Local container image tags & host loopback ports
|
|
# -----------------------------------------------------------------------------
|
|
OPENMOTION_API_IMAGE=openmotion-api:local
|
|
OPENMOTION_WORKER_MEDIA_IMAGE=openmotion-worker-media:local
|
|
OPENMOTION_WORKER_RENDER_IMAGE=openmotion-worker-render:local
|
|
OPENMOTION_CATALOG_SYNC_IMAGE=openmotion-catalog-sync:local
|
|
|
|
OPENMOTION_PORT=4173
|
|
PORT=4173
|
|
POSTGRES_PORT=5432
|
|
S3_API_PORT=9000
|
|
S3_CONSOLE_PORT=9001
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Core service settings (must match src/infra/config.ts)
|
|
# -----------------------------------------------------------------------------
|
|
NODE_ENV=development
|
|
APP_PUBLIC_ORIGIN=http://127.0.0.1:4173
|
|
# Optional comma-separated legacy hostnames that 301-redirect to APP_PUBLIC_ORIGIN (e.g. app.open-design.ai).
|
|
APP_REDIRECT_FROM_HOSTS=
|
|
# Optional cookie-less preview origin (e.g. https://preview.openmotion.example.com).
|
|
# Leave empty for single-host local Docker Compose development.
|
|
PREVIEW_PUBLIC_ORIGIN=
|
|
# Optional cookie-less static playable game domain (distinct host from APP_PUBLIC_ORIGIN, zero main-site cookies).
|
|
# Official game templates resolve to ${GAME_PLAY_PUBLIC_ORIGIN}/games/<id>/index.html.
|
|
GAME_PLAY_PUBLIC_ORIGIN=
|
|
PREVIEW_TOKEN_TTL_SEC=900
|
|
LOG_LEVEL=info
|
|
PG_POOL_MAX=20
|
|
WORKER_PG_POOL_MAX=10
|
|
REDIS_MAXMEMORY=512mb
|
|
REDIS_CACHE_URL=
|
|
REDIS_CACHE_TTL_SEC=3600
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Local PostgreSQL & RustFS S3-compatible object storage (synthetic dev defaults)
|
|
# -----------------------------------------------------------------------------
|
|
POSTGRES_DB=openmotion
|
|
POSTGRES_USER=openmotion
|
|
POSTGRES_PASSWORD=openmotion_local_dev
|
|
|
|
S3_PUBLIC_ENDPOINT=http://127.0.0.1:9000
|
|
S3_REGION=us-east-1
|
|
S3_BUCKET=openmotion
|
|
S3_ACCESS_KEY_ID=openmotion
|
|
S3_SECRET_ACCESS_KEY=openmotion_local_dev
|
|
S3_FORCE_PATH_STYLE=true
|
|
S3_PRESIGN_PUT_TTL_SEC=900
|
|
S3_PRESIGN_GET_TTL_SEC=300
|
|
S3_PRESIGN_CACHE_WINDOW_SEC=3600
|
|
S3_CORS_ALLOWED_ORIGINS=
|
|
CATALOG_SYNC_FETCH_REMOTE=true
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Auth & Remote MCP (local dev bypass; production MUST use AUTH_MODE=oidc)
|
|
# -----------------------------------------------------------------------------
|
|
AUTH_MODE=dev
|
|
ALLOW_INSECURE_DEV_AUTH=false
|
|
DEV_WORKSPACE_ID=00000000-0000-4000-8000-000000000001
|
|
DEV_USER_ID=00000000-0000-4000-8000-000000000002
|
|
DEV_PAT=om_pat_devlocal_000000000000000000000000
|
|
TRUST_PROXY_HOPS=1
|
|
|
|
# Required only when AUTH_MODE=oidc (replace with real values outside Git).
|
|
# For OpenDesign / Vela Better Auth OIDC, set:
|
|
# OIDC_ISSUER=https://amr-api.open-design.ai/api/auth
|
|
# OIDC_CLIENT_SECRET=<first-party secret> (used for client_secret_post and HS256 ID tokens when disableJwtPlugin=true)
|
|
# MCP_OAUTH_MODE=proxy (recommended when upstream IdP disables DCR/refresh tokens)
|
|
# SESSION_SECRET=CHANGE_ME_SESSION_SECRET_MIN_32_CHARS
|
|
# OIDC_ISSUER=https://auth.example.com
|
|
# OIDC_CLIENT_ID=CHANGE_ME_OIDC_CLIENT_ID
|
|
# OIDC_CLIENT_SECRET=CHANGE_ME_OIDC_CLIENT_SECRET
|
|
# OIDC_CALLBACK_URL=http://127.0.0.1:4173/auth/callback
|
|
SESSION_SECRET=
|
|
OIDC_ISSUER=
|
|
OIDC_CLIENT_ID=
|
|
OIDC_CLIENT_SECRET=
|
|
OIDC_CALLBACK_URL=
|
|
OIDC_SCOPES=openid profile email
|
|
OIDC_CLAIM_SUB=sub
|
|
OIDC_CLAIM_EMAIL=email
|
|
OIDC_CLAIM_NAME=name
|
|
OIDC_CLAIM_WORKSPACE=
|
|
|
|
MCP_OAUTH_MODE=proxy
|
|
MCP_OAUTH_ISSUER=
|
|
# Maximum MCP JSON-RPC request body size in bytes (10 MiB)
|
|
MCP_MAX_BODY_BYTES=10485760
|
|
# MCP OAuth DCR accepts any public HTTPS redirect host (DNS name, no IP literal), loopback HTTP and
|
|
# RFC 8252 native app schemes; the consent page always shows the redirect host.
|
|
# Comma-separated verified HTTPS hosts (`*.` wildcards allowed): their redirects skip the consent-page
|
|
# warning, and they are the only HTTPS browser Origins accepted on `/mcp`. A value replaces the built-in
|
|
# list (chatgpt.com, *.openai.com, claude.ai, claude.com, *.anthropic.com, cursor.com, *.cursor.sh,
|
|
# vscode.dev, github.dev, *.open-design.ai), so include every default you still need.
|
|
OAUTH_DCR_ALLOWED_HTTPS_HOSTS=
|
|
# Comma-separated HTTPS hosts to block. New registrations are rejected; already registered clients with a
|
|
# blocked redirect host lose authorize, code exchange and refresh. Issued access tokens expire within an hour.
|
|
OAUTH_DCR_BLOCKED_HTTPS_HOSTS=
|
|
OAUTH_DCR_RATE_LIMIT_PER_MIN=30
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Unified OpenDesign Model Gateway & AMR Identity (defaults to local mock fixtures)
|
|
# Set MODEL_GATEWAY_MODE=opendesign and supply OPENDESIGN_INTERNAL_API_TOKEN for live AMR calls.
|
|
# -----------------------------------------------------------------------------
|
|
MODEL_GATEWAY_MODE=mock
|
|
OPENDESIGN_API_URL=https://amr-api.open-design.ai
|
|
OPENDESIGN_LINK_URL=https://amr-link.open-design.ai
|
|
# OpenDesign web console opened by account/plan links (point non-production environments at their own console).
|
|
OPENDESIGN_CONSOLE_URL=https://open-design.ai/cloud
|
|
# OPENDESIGN_INTERNAL_API_TOKEN=CHANGE_ME_AMR_CLOUD_INTERNAL_API_TOKEN
|
|
OPENDESIGN_INTERNAL_API_TOKEN=
|
|
OPENDESIGN_S2S_API_KEY=
|
|
AMR_IDENTITY_CACHE_TTL_SEC=60
|
|
OPENDESIGN_ASR_URL=
|
|
OPENDESIGN_BILLING_SYNC_ENABLED=true
|
|
ALLOW_DOH_FAKEIP_FALLBACK=false
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Worker tuning & local container resource limits
|
|
# On hosts with >= 8 GiB Docker/Colima VM RAM, raise RENDER_SHM_SIZE=1g and
|
|
# RENDER_MEM_LIMIT=4g for long or 1080p/4K exports.
|
|
# -----------------------------------------------------------------------------
|
|
MEDIA_CONCURRENCY=20
|
|
RENDER_CONCURRENCY=1
|
|
RENDER_CAPTURE_WORKERS=auto
|
|
BLOB_GC_GRACE_SECONDS=604800
|
|
HISTORY_COALESCE_WINDOW_MS=4000
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Cloud Web Observability (Sentry DSN injected into Studio HTML at runtime)
|
|
# Leave SENTRY_WEB_DSN empty to disable web Sentry reporting completely.
|
|
# -----------------------------------------------------------------------------
|
|
SENTRY_WEB_DSN=
|
|
SENTRY_ENVIRONMENT=development
|
|
SENTRY_RELEASE=
|
|
SENTRY_TRACES_SAMPLE_RATE=0.1
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Cloud Web Telemetry (PostHog + optional Tracert dual-reporting)
|
|
# PostHog stays disabled unless OPENMOTION_TRACKING_ENABLED=1 and a public phc_* token
|
|
# (OPENMOTION_POSTHOG_TOKEN or OPENMOTION_POSTHOG_KEY) are set.
|
|
# Tracert web reporting stays disabled unless OPENMOTION_TRACERT_SPM_A is set
|
|
# (OPENMOTION_TRACERT_ENDPOINT is optional; omit to use the SDK default collector).
|
|
# Self-hosted deployments with neither configured emit zero telemetry.
|
|
# Honors OPENMOTION_TELEMETRY=0 and DO_NOT_TRACK=1 opt-outs.
|
|
# -----------------------------------------------------------------------------
|
|
OPENMOTION_TRACKING_ENABLED=0
|
|
# Set to 1 to temporarily bypass the cloud browser event allowlist during diagnostics.
|
|
OPENMOTION_CLOUD_TRACKING_FULL=
|
|
OPENMOTION_POSTHOG_TOKEN=
|
|
OPENMOTION_POSTHOG_HOST=https://us.i.posthog.com
|
|
OPENMOTION_TRACKING_INSTALLATION_ID=
|
|
OPENMOTION_TRACERT_SPM_A=
|
|
OPENMOTION_TRACERT_ENDPOINT=
|
|
|
|
API_MEM_LIMIT=1g
|
|
MEDIA_MEM_LIMIT=1g
|
|
MEDIA_TMP_SIZE=1g
|
|
RENDER_MEM_LIMIT=2g
|
|
RENDER_SHM_SIZE=512m
|
|
RENDER_TMP_SIZE=2g
|