Files
openmotion/deploy
Tom Huang 216e12abfe feat(super-agent): add Super Agent workspace, Artifact Viewer, unified resource hub, and Agent Runtimes (#808)
* feat(super-agent): add Super Agent workspace, Artifact Viewer, and unified resource hub

* fix(super-agent): align merge with main and mode composer controls

* wip(super-agent): save local Super Agent updates before merging origin/main

* feat(super-agent): add cloud share, game handoff, browser annotations, review fixes, and UI craft guidelines

* feat(arch): add cross-platform MCP hub, desktop shell, batch/triggers, and unified Web Publish

Implement OpenMotion's cross-platform MCP-first architecture and desktop packaging:
- Streamable HTTP MCP gateway (/mcp) with scoped Bearer tokens and unified Stdio/HTTP dispatch
- Multi-runtime Agent routing (local-direct, outbound local-bridge with macOS/Linux/Windows scripts, remote-service)
- Shared Batch Content Optimization and webhook/schedule Trigger engine across HTTP, MCP, and Super Agent
- Generalized HTML Web Publish service (design, game, motion, and standalone html targets) with shared Studio WebPublishPopover and Design Deploy compatibility facade
- Standalone Electron desktop shell (desktop/) for macOS, Windows, and Linux with multi-platform icon pipeline, WebGL splash/OpenDesign sign-in flow, auto-updater, and diagnostic export
- Static asset compression/caching (editor-server.ts), bounded LRU lifecycle helpers, and visibility-aware polling
- Comprehensive unit, HTTP, MCP, performance, and desktop test suites

* docs(arch): add cross-platform MCP architecture guide and interactive boundary map

Document the five-layer cross-platform MCP architecture, desktop packaging boundaries, batch/trigger automation, and generalized HTML Web Publish pipeline in docs/cross-platform-mcp-architecture.md and docs/architecture-map.html.

* fix(ci): schedule new backend tests, fix WorkspaceStore import, and harden Codex/runtime shutdown

* feat(super-agent): refine Artifact Viewer, CodeViewer styles, runtime/share handlers, and tests

* fix(ci): resolve remaining gitleaks, WebMCP tracking, i18n, menuStyle, and tokenGate checks

* chore(ci): remove accidental node_modules symlink from worktree commit

* fix(tracking): register motion_cloud_share tool and openmotion_cloud_share actions

* fix(account): avoid treating plain-text HTTP 403 prose as structured error code

* feat(super-agent): refine artifact viewer toolbar, game presentation, and cloud share trigger

* test(package): exercise openmotion_cloud_share in packaged phase1 smoke E2E

* fix(cloud-share): rotate file identity on entry path change and allow stop after project deletion

* test(e2e): verify MCP web deploy, game lifecycle, and fix preview asset CSP

* fix(super-agent): add persistent live progress dock and Continue recovery UX

* fix(design): allow sandboxed preview CORS fetches and preserve top-row preview thumbnails

* feat(super-agent): refine WebPublishPopover and ArtifactBrowserPane styles and tests

* fix(bridge,ci): forward workingDir to bridge/remote runtimes, sync standalone Codex events, and align tracking/CI suites

* fix(ci): keep 1800ms active-project polling in useWorkspace and update MCP tool count to 36

* fix(web-publish,server): stop prior slug on new_link, allow deleted-project unpublish/status, avoid bfcache SSE socket exhaustion, and await active turn cleanup

* chore(distribution): raise default npm package budget to 26 MiB

Baseline main is already at 23.69 MiB compressed (98.7% of the previous 24 MiB
budget after Game Studio assets), and adding Super Agent, Artifact Viewer,
WebPublish, Local Agent discovery/bridge, and 10-locale i18n adds +0.38 MiB
compressed with no new offline media (24.06 MiB total).

Update MAX_BYTES in .github/scripts/npm-package-size.py and document the 26 MiB
budget in CONTRIBUTING.md.

* feat(super-agent): add Game Studio Super Agent mode, masonry showcase, and artifact viewer enhancements
2026-11-23 11:29:48 +08:00
..

Docker deployment

Run OpenMotion in a container on the machine you work on. The image is built from this checkout and contains Node.js, Chromium, FFmpeg/ffprobe and CJK fonts, so the host needs only Docker.

This is a local deployment: the Studio is opened from the same machine at http://127.0.0.1:4173. Access from another machine is not supported yet.

Start

cd deploy
cp .env.example .env
docker compose build
docker compose up -d

Open http://127.0.0.1:4173.

Projects, exports and settings are stored in the openmotion_data volume, mounted at /data (MOTION_DATA_DIR); the OpenDesign account sign-in stays in the same volume under /data/account (MOTION_ACCOUNT_DIR). docker compose down keeps the volume; docker compose down -v deletes it together with every project in it.

Connect an Agent

Install the primary OpenMotion Skill in your host Agent using the standard Quick Start command:

npx skills add nexu-io/openmotion --skill openmotion

This installs Agent guidance. Reuse the running container for the application; do not install a second runtime on the host. Complete the Skill's onboarding in the current Agent after its actual MCP connection is verified.

The MCP server is a stdio process. Start it inside the running container so it shares the Studio's data directory and service:

The Studio's MCP · Connect Agent page detects this Compose deployment. Its copied commands and downloaded configurations run docker exec from the host, preserving the container's workspace and runtime. Use those instructions for Codex, Claude Code, DeepSeek Harness or another stdio client; do not run container paths such as /app/mcp.ts directly on the host. The Agent setup instruction and Connection guide also retain this Docker installation.

{
  "mcpServers": {
    "openmotion": {
      "command": "docker",
      "args": ["exec", "-i", "openmotion", "node", "--experimental-strip-types", "mcp.ts"]
    }
  }
}

Paths passed to MCP tools are container paths. To import local media with openmotion_import_assets, mount the folder into the container and pass the mounted path.

Compose sets MOTION_CONTAINER_NAME=openmotion to match container_name. If you rename the container, update both values so the generated host commands enter the right container. When running the image without Compose, set MOTION_CONTAINER_NAME to the actual container name to enable these commands.

Settings

Variable Default Purpose
OPENMOTION_PORT 4173 Port on the host's 127.0.0.1 and inside the container. Both sides use the same value so returned URLs open on the host.
OPENMOTION_MEM_LIMIT 4g Container memory limit. Rendering runs Chromium and FFmpeg.
DO_NOT_TRACK empty Set to 1 to disable analytics.

How access is restricted

The container sets MOTION_BIND_HOST=0.0.0.0 so Docker can publish the port, and Compose publishes it on the host's 127.0.0.1 only. That loopback publication is what keeps other machines out. Keep it: do not change the ports entry to another interface or to 0.0.0.0.

The server also rejects requests whose Host header is not localhost, 127.0.0.1 or [::1], and writes that do not come from its own origin. These checks protect a browser on this machine from other websites. They are not authentication: a client that is not a browser can send any Host and Origin, and the Studio has no sign-in.

MOTION_BIND_HOST accepts 127.0.0.1 (default), 0.0.0.0 and ::. A specific interface address is rejected, because the readiness probe and the URLs returned to Agents use 127.0.0.1.

Known limits

  • The web browser tab inside the Studio starts Chromium with its sandbox, which is not available to an unprivileged container. Video preview and export are not affected.
  • Linux is not a pinned native runtime target; the image uses Debian's Chromium and FFmpeg instead of the versions in scripts/runtime-lock.json.

Cloud deployment (docker-compose.cloud.yml)

To deploy OpenMotion as a cloud or team control plane behind a TLS reverse proxy:

  1. Set MOTION_PUBLIC_ORIGIN (and optional MOTION_ALLOWED_HOSTS) in deploy/.env.
  2. Start with docker compose -f docker-compose.cloud.yml up -d.
  3. Generate scoped Streamable HTTP MCP tokens (om_mcp_*) in Settings -> Local Agents -> Runtimes & Cloud Bridge for remote Agents, or generate bridge tokens (om_brg_*) so macOS, Windows, and Linux workstations connect local Agents outbound over SSE.