Files
openmotion/tracking
open-design-crew[bot] aee63c56ac merge(cloud): promote feat/cloud-container-p1 to main (#932)
* feat(cloud): add P1 database schema, migrations, contracts, and shared infrastructure

Establish the Wave 2A container-first cloud foundation:
- Add Drizzle ORM, pg, AWS S3 SDK, ioredis, BullMQ, and promote locked Hono, MCP server, Zod, Sharp, and Jose dependencies while removing @powerformer/vela-cli.
- Define all 5 PostgreSQL schema domains (24 tables) with Drizzle SQL migrations and atomic CAS refcount + two-phase GC helpers.
- Add shared contracts (auth scopes/roles, errors, events, BullMQ jobs, storage) and infrastructure modules (config with production dev-auth safety latch, redacting logger, dual-client StorageService with canonical CORS, RedisEventBus/HotTextCache/RateLimiter, QueueService, ShutdownCoordinator).
- Extract shared/version.ts, shared/browser-executable.ts, shared/project-validation.ts, and add scripts/init-s3.ts plus deterministic unit tests.

* fix(cloud): address verifier findings in auth scopes, BullMQ jobIds, CAS metadata merge, and S3 CORS

- Enforce strict scope check in hasScope() without role-based privilege escalation.
- Replace colon separators in BullMQ render_thumbnail custom jobId with double underscores (BullMQ v5 rejects ':').
- Guard against null metadata in CAS refcount delta normalization and upsert conflict updates so PostgreSQL JSONB never turns objects into arrays.
- Restrict S3 CORS loopback sibling aliases to loopback APP_PUBLIC_ORIGIN values only, preventing localhost leakage in production.
- Add regression unit tests covering all four fixes.

* feat(deploy): add multi-target cloud Dockerfile, Compose stack, and K8s/KEDA manifests

Implement Wave 2B-5 container and Kubernetes deployment baseline for P1 cloud refactor:
- Single multi-target deploy/Dockerfile (node:26.11.1-bookworm-slim) with api, worker-media, worker-render, and catalog-sync targets, shared /app/fonts/ catalog parity across api and worker-render, and zero Chromium/FFmpeg binaries on api.
- Local-prod parity deploy/docker-compose.yml and deploy/.env.example with Postgres 17, Redis 7 (noeviction), MinIO + s3-init CORS bootstrap, db-migrate, catalog-sync, read-only rootfs api/workers, and configurable RENDER_SHM_SIZE/RENDER_MEM_LIMIT.
- Kubernetes, KEDA ScaledObject (BullMQ render-export, minReplicaCount=0, cooldownPeriod=300), PodSecurity restricted manifests, least-privilege secret projection (zero OPENDESIGN/OIDC/SESSION_SECRET in worker-render), and default-deny NetworkPolicy under deploy/k8s/.
- Updated deploy/README.md for Streamable HTTP /mcp and K8s/KEDA deployment, plus cleaned .dockerignore.

* feat(cloud): add catalog CAS sync, zero-copy cloning, welcome bootstrap, and catalog routes

Implement Wave 2B-1 (catalog-cas) for the P1 cloud container refactor:
- scripts/sync-catalog-cas.ts: idempotent CLI ingestion of built-in templates (including GSAP relative rewrite and openmotion-welcome shared assets) and repository catalog templates into S3 catalog/blobs/{sha256} and Postgres catalog_templates + catalog_template_files with optional media metadata, supporting --dry-run, --limit, --builtin-only, --repo-only, --template, and --fetch-remote
- src/services/catalog-service.ts: CatalogPort and CatalogService providing PG-backed listing/search/detail, presigned GET asset resolution, PG-only HEAD metadata lookup, and O(1) zero-copy template cloning with blob_scope='catalog' (zero S3 copies, zero workspace_blobs writes)
- src/services/welcome-bootstrap.ts: idempotent per-workspace ensureWelcomeProject using SELECT ... FOR UPDATE and workspaces.welcome_bootstrapped_at
- src/routes/catalog.ts: Hono catalog sub-router with 302 presigned GET, PG-only HEAD, inline guide serving, and AuthContext/workspace-isolated clone endpoints
- tests/cloud/catalog-cas.test.ts: deterministic unit tests using real Drizzle ORM against an in-memory PG mock, in-memory S3 mock, and real repository fixtures

* fix(deploy): address verifier findings in MinIO healthcheck, Dockerfile runtime files, KEDA scaling, and OIDC/ASR config

Resolve all 4 audit findings from verifier review:
- Switch MinIO healthcheck in deploy/docker-compose.yml to ['CMD', 'mc', 'ready', 'local'] (ubi-micro image lacks curl).
- Copy template-library.ts, library/design/, library/skills/, and scripts/zip.mjs into deploy/Dockerfile prod-base and remove the duplicate vendor copy from catalog-sync (keeping library/templates/catalog/ excluded from prod-base).
- Set KEDA minReplicaCount: 1 to avoid BullMQ v5 prioritized ZSET scale-from-zero deadlock, omit spec.replicas on worker-render-deployment.yaml, align KEDA auth comments, and include openmotion-keda-redis-auth template in deploy/k8s/secret.example.yaml.
- Align OIDC_CALLBACK_URL to /auth/callback and wire optional OPENDESIGN_ASR_URL across configmap.yaml, api-deployment.yaml, and worker-media-deployment.yaml.

* feat(cloud): add asset library, export service, and media/render workers

Implements Wave 2B-4 (assets-workers) for P1 cloud containerization:
- AssetLibraryService and Hono asset routes: presigned upload tickets (including companion font license staging keys), ownership-validated upload confirm, SSRF-hardened public URL import, CRUD/versioning, atomic sorted-sha256 CAS refcount decrements on hard delete, direct PG HEAD metadata, and 302 presigned GET downloads/thumbnails.
- ExportService and Hono export routes: O(1) locked snapshot freeze including studio-manual-edits.json and studio-motion.json, single-active-export enforcement via partial unique index, Redis SSE progress, cancellation via om:cancel:{jobId}, direct PG HEAD metadata, and 302 presigned downloads.
- Unified worker entrypoint (WORKER_ROLE=media|render) with ShutdownCoordinator drain: media-ingest (upload_commit, url_fetch, SDR PNG stripping, sharp thumbnails, offloaded Studio probe/thumbnail/waveform/loudness/freeze-frame/read jobs), media-generate (remote_id persisted before polling, attempts: 1), two-phase blob-gc (deleting blobs, thumbnails, and derived prefixes), and render-export (strictly allowlisted secret-stripping render-env.ts, studio render parity script injection, isolated hyperframes execution, verify-export, health heartbeat, and unconditional /tmp cleanup).
- Deterministic unit tests covering assets/exports CAS, media workers/GC, and render env stripping/parity/cleanup.

* fix(catalog): support mounted sub-router prefixes in wildcard source routes

Match templates/:id/source/* and template-source/:id/* by path segments while validating the captured template ID and optional basePath suffix so mounting createCatalogRoutes with basePath='' under /api or /motion-api works cleanly and preserves traversal rejection.

* feat(cloud): add auth, Streamable HTTP MCP, and unified OpenDesign model gateway

Implement Wave 2B-2 cloud auth, remote Streamable HTTP /mcp, and unified platform model gateway:

- Auth layer (src/auth/**): dual-mode AUTH_MODE=oidc|dev Hono middleware, PG-authoritative browser sessions (auth_sessions + optional Redis cache + HttpOnly/SameSite=Lax/Secure cookies + CSRF Origin checks), OIDC Authorization Code + PKCE + jose JWKS verification, SHA-256 PAT lifecycle with strict non-escalating scopes, OAuth 2.1 proxy/delegated endpoints (RFC 9728, RFC 8414, RFC 7591 DCR, PKCE S256, token rotation, RFC 7009 revoke), and strict Bearer-only /mcp enforcement.
- Streamable HTTP /mcp (src/mcp/**, shared/*, .mcp.json): @modelcontextprotocol/server@2.4.0 stateless per-request execution with Redis-backed owner-bound Mcp-Session-Id state (24h TTL) and RedisEventBus SSE channel, 10 MiB body limit, all 22 registered openmotion_* domain tools with explicit P2 gating (FEATURE_DEFERRED_P2 / 501), 3-way cloud openmotion_import_assets (prepare_upload/upload_ticket, SSRF-hardened url, zero-copy library_asset CAS refcount++), cloud-safe engine resource resolution, and Streamable HTTP + legacy stdio union transport in shared/integration.ts.
- Unified Platform Model Gateway (src/services/*, src/routes/{models,account}.ts): direct S2S OpenDesignModelGateway (zero vela-cli, zero BYOK secret storage), deterministic FFmpeg-decodable MockModelGateway (PNG/MP4/WAV), and /motion-api/{models,account}/* Hono routes.
- Tests (tests/cloud/{auth-oidc-dev,mcp-http,model-gateway}.test.ts): ephemeral node:crypto keys only.

* fix(cloud): address verifier-2 findings in snapshot CLI, SSRF, font uploads, and worker concurrency

Addresses all 4 findings from #33:
- Switch defaultRenderCompositionThumbnail to hyperframes@0.9.7 snapshot subcommand (--at, --no-end, optional --composition id, --json) with sharp resize and forward allowlisted payload.settings onto hyperframes render CLI args.
- Strip trailing FQDN dots in validatePublicImportUrl and safePublicHttpsFetchToFile before SSRF host/IP checks.
- Detect font binaries (wOF2/wOFF/OTTO/TTF) in project_asset upload_commit to bypass ffprobe/thumbnailing and promote font + companion license directly to CAS and project_files; explicitly reject project_archive in upload_commit.
- Lock parent projects row FOR UPDATE before project_files refcount overwrite calculations, roll back failed url_fetch queue dispatches (job + idempotency_receipts), map upstream cancelled generation state to cancelled, and prevent duplicate failed SSE events.

* Harden cloud import URL SSRF checks and OAuth redirect validation

Normalize trailing-dot hostnames and reject single-label, loopback,
and .localhost/.local/.internal/.home.arpa destinations in
validatePublicImportUrl, and disallow userinfo in OAuth redirect URIs.
Add regression tests covering all trailing-dot and single-label SSRF
bypass patterns.

* Fix OAuth refresh race, consent CSRF, OIDC workspace validation, and import rollback

- Require atomic revokeOAuthTokenById() success during OAuth 2.1 refresh_token
  rotation so concurrent refresh requests cannot mint duplicate token pairs.
- Require single-use consent_token whenever auth cache is configured on
  POST /oauth/authorize to prevent CSRF bypass when omitted.
- Validate requestedWorkspaceId as UUID (400 INVALID_ARGUMENT) and enforce
  403 WORKSPACE_FORBIDDEN for unowned workspaces (including brand-new users)
  in OidcService.verifyBearerJwt().
- Roll back upload_tickets processing state and mark queued media_ingest jobs
  failed on BullMQ enqueue failure in CloudImportAssetsService, skipping
  completed idempotency_receipts when all items fail enqueue so retries succeed.
- Apply P2 pre-validation gating and asset read formatting consistently to the
  openmotion_assets compatibility alias alongside openmotion_assets_use.
- Add regression tests covering all four fixes.

* feat(cloud): implement diskless Studio router and cloud workspace/version services

Add Wave 2B-3 cloud workspace, project files, unified PG version/history, archive ZIP, asset names, and work rounds services backed strictly by PostgreSQL, S3 CAS, HotTextCache, and RedisEventBus with zero local projectDir disk writes.

Implement the Option B diskless Studio Hono router atop @hyperframes/{core,parsers,lint,studio-server} (pure virtual-FS preview bundler, linter, info, timeline, DOM/GSAP AST mutations, direct PG-metadata HEAD responses, 302 presigned binary redirects with Cache-Control and Vary, unified PG history, render/media queue dispatch, container font catalog, SSE events, and product /motion-api routers) with deterministic unit tests.

* fix(cloud): address Wave 2B-3 preview, version numbering, runtime, render, RBAC, and Studio route review findings

Resolve all 6 review findings on diskless Studio and cloud workspace services:
- Accept root-relative gsapBaseUrl in preview-bundler and pass revision signature (not raw HTML) to previewEtag so GET /preview and /preview/comp/* return 200 with valid ETags.
- Compute nextVersionNumber monotonically via COALESCE(MAX(version_number), 0) inside FOR UPDATE transactions across commitChanges, checkpoint, and restoreVersion to prevent uq_project_versions_number collisions after undo.
- Serve pre-built browser runtime IIFE from @hyperframes/core/runtime-script on GET /api/runtime.js.
- Align render routes with worker-render resultJson (bytes/outputName), failed status mapping, composition/variables input, ?download=1 attachment disposition, and Drizzle cause.code 23505 handling.
- Enforce RBAC role and PAT scope checks across all Studio and /motion-api routes and add workspaceId defense-in-depth predicates on history and session updates.
- Answer HEAD directly on thumbnail/image-thumbnail routes, accept PUT /selection with { selection }, handle GET /api/open-in-desktop, and support multi-file uploads with ?dir and w320 thumbnail spec.

* feat(cloud): wire stateless API entrypoint, retire legacy backend, align CI and tests

Complete Wave 2C-1 cloud container backend integration:
- Add stateless Hono API server entrypoint (src/entrypoints/api.ts) exporting createApiApp(deps), serveStaticAsset, and startApiServer with ShutdownCoordinator graceful shutdown, health probes (/api/health/live, /api/health/ready, /api/health), dual-mode OIDC/dev auth + OAuth 2.1 routes, bounded first-access WelcomeBootstrapService, Streamable HTTP /mcp with Bearer-only auth and all 22 domain tools wired to real services, catalog/product/diskless-Studio routes, explicit 501 FEATURE_DEFERRED_P2 endpoints, read-only GSAP/design-system/MCP-UI assets, and SPA fallback.
- Wire PlatformModelGateway into src/entrypoints/worker.ts for media workers and slim server.ts to delegate to src/entrypoints/api.ts.
- Retire legacy local filesystem, stdio MCP, desktop browser/daemon, BYOK provider, and npm-packaging backend modules; decouple retained and P2 modules while keeping all deploy/Dockerfile COPY targets and shared/provider-registry.ts intact.
- Update package.json scripts and resolve package-lock.json (@emnapi/wasi-threads@1.2.3) so npm ci succeeds cleanly.
- Update scripts/check.ts (HTTP .mcp.json + recursive src/**/*.ts stripTypeScriptTypes check), .github/maintainability/knip.json, CI/release workflows, README source links, and retained backend tests.
- Add end-to-end tests/cloud/api-integration.test.ts verifying createApiApp() across health probes, auth/MCP Bearer isolation, welcome bootstrap, projects/Studio/MCP editing, models/catalog/P2 501 routes, and static/SPA routing.

* feat(studio): wire Cloud P1 Studio UI, Streamable HTTP MCP handbook and architecture docs

Retire local-only host UI (embedded WebBrowser, local Codex AssetChat/conversations polling, Local Agents CLI launcher, and BYOK API-key/BaseURL settings forms) and wire Studio to the container-first Cloud P1 backend:

- Account & Auth: wire OIDC sign-in/out, AUTH_MODE=dev local dev indicator, workspace switcher, and Personal Access Token (PAT) lifecycle management using ODUI components and floating Toasts.
- Unified OpenDesign Model Gateway: replace BYOK provider configuration with unified gateway status, MODEL_GATEWAY_MODE=mock banner, catalog sync, and workspace default selection while preserving open-design-ui registry consumers and studio-native-controls.json compliance.
- Cloud Transfers & Resilience: implement 3-step presigned S3 upload flow (tickets -> PUT -> confirm), remote-worker heartbeat polling via /api/environment/ffmpeg, and graceful 501 FEATURE_DEFERRED_P2 states across Design Studio, Brand Kit capture, ASR transcription, and Review Comments.
- Streamable HTTP MCP Handbook & i18n: switch McpConnectionPage, AgentConnectionDialog, mcpCapabilities, and shared/integration.ts to Streamable HTTP /mcp (OAuth 2.1 + PAT, ChatGPT Cloud on public HTTPS, 3-way cloud openmotion_import_assets, all 22 domain tools) with synchronized translations across all 10 non-English locales and updated tests.
- Docs & Guidelines: update docs/product/architecture.md, AGENTS.md, and CLAUDE.md for the container-first Hono/Postgres/Redis/S3 CAS architecture and Streamable HTTP MCP boundaries.

* fix(cloud): address Wave 2C-1 review findings (auth, optimistic lock, cache, CI tests)

Address all 4 review findings from Wave 2C-1 backend verification (#47):
- Mount authWithWelcome middleware on /api/media-jobs/* in src/entrypoints/api.ts so Studio /api/media-jobs/:jobId/progress receives AuthContext.
- Enforce expectedRevision and expectedVersionId optimistic concurrency validation on assetNames-only and metadata-only openmotion_edit_project MCP calls, forwarding expectedRevision to AssetNamesService.updateAssetNames.
- Wire authCache into createPlatformModelGateway(config, { opendesign: { cache: authCache } }) and deduplicate handleTranscriptsRoute in src/entrypoints/api.ts.
- Fix tests/release-workflows.test.mjs, tests/tracking-device.test.ts, tests/tracking-task-ledger.test.ts, tests/hosted-template-catalog.test.ts, tests/registry.test.ts, tests/dsh-distribution.test.ts, and tests/ci-scope.test.mjs; remove obsolete legacy tests (tests/brand-story-tracking.test.ts, tests/vision-runtime-native.test.mjs, tests/dsh-integration.test.ts) and remove LFS-dependent tests/library-install.test.mjs from the non-LFS ci.yml cloud job (retained in motion-candidate.yml).
- Add regression tests in tests/cloud/api-integration.test.ts covering /api/media-jobs/* auth, assetNames-only VERSION_CONFLICT enforcement, and OpenDesignModelGateway authCache reuse.

* fix(studio,docs): align PAT scopes, API routes, locales, and architecture spec

Follow up on Cloud Phase 1 Studio & docs review findings:
- Align AccountSettings PAT scope names and authMethod values with src/contracts/auth.ts, omit explicit scopes on PAT creation so the server intersects DEFAULT_PAT_SCOPES with workspace role, and parse flat CreatedPatResult responses.
- Route motionApi session/mode calls to /motion-api instead of removed /design-api and fetch server version in ResourceSettings from /api/health.
- Fill all newly added Cloud Phase 1 i18n keys across all 9 remaining non-English locales (ja, ko, de, fr, ru, es, pt-BR, it, tr) in mcp-ui.json, settings-ui.json, and transcript-ui.json.
- Align docs/product/architecture.md with actual studio/build output path, Drizzle schema table names, S3 CAS keyspaces, and /api/projects/:id/files/* route.

* fix(cloud,deps): refresh lockfile for Node 26.11.1, declare @hyperframes/lint, decouple onboarding scripts

- Promote already-locked @hyperframes/lint@0.9.7 to direct dependencies in package.json (imported by src/studio/engine/lint-project.ts).
- Regenerate package-lock.json inside node:26.11.1-bookworm-slim (npm 11.20.0) so optional wasm32 transitive deps (@emnapi/runtime, bundled @emnapi/core) match deploy/Dockerfile and CI.
- Replace removed ../workspace.ts dynamic imports in scripts/codex-host-handoff.mjs and scripts/install-onboarding.mjs with a local defaultDataDirectory() helper preserving MOTION_DATA_DIR / Application Support / .motion-data semantics for live callers (scripts/install-guide.mjs, tests/install-guide.test.ts, integrations/dsh/install.ts).

Verified npm ci and npm ci --omit=dev inside node:26.11.1-bookworm-slim, npm ci on host Node 24.13.0, npm run check, tsc -p tsconfig.cloud.json --noEmit, and tests/install-guide.test.ts (13/13).

* fix(build,docker): disable Studio sourcemaps by default in container build

Allow toggling Studio Vite sourcemaps via STUDIO_SOURCEMAP (defaulting to true for local/CI builds) and default ARG STUDIO_SOURCEMAP=false in deploy/Dockerfile deps-build stage. Prevents Rollup heap OOM on 4 GiB Docker/Colima VMs and omits public .js.map files from production container images.

Verified npm run typecheck:studio, STUDIO_SOURCEMAP=false npm run build:studio (0 .map files), docker buildx build --check --target api -f deploy/Dockerfile ., and npm run check.

* fix(deploy): switch local Docker Compose S3 service from MinIO to RustFS

Replace unavailable minio/minio image in deploy/docker-compose.yml with multi-arch Apache-2.0 rustfs/rustfs:1.0.6, configuring RUSTFS_* env vars and /health/ready healthcheck. Update local S3 references in deploy/README.md, deploy/.env.example, and docs/product/architecture.md to RustFS locally (S3/R2 in cloud).

Verified docker compose -f deploy/docker-compose.yml config --quiet, motion-scan.mjs privacyFindings (0), and git diff --check.

* fix(mcp,worker-media): wire project targetPath and snapshot commits for cloud asset imports

- Compute deterministic projectPath-validated targetPath (fonts/<safe> for fonts, assets/imported/<ticketId-or-jobId>.<ext> for media) in src/mcp/import-assets.ts during prepare_upload (stored on upload_tickets.target_path), upload_ticket import, and url import, and include optional targetPath/expectedSha256 on urlFetchPayloadSchema.
- In src/workers/media-ingest.ts (purpose=project_asset), recompute canonical projects.revision inside the FOR UPDATE project transaction, advance monotonic versionNumber and history seq, insert project_versions, project_version_files, and project_history_entries with sorted workspace CAS refcount deltas, and publish the updated project revision on om:project:{wid}:{pid}.
- In handleUrlFetchJob, promote as project_asset when both targetProjectId and targetPath are set while preserving library_asset for HTTP /motion-api/assets/import-url, and verify expectedSha256 when provided.
- Add deterministic end-to-end integration test covering CloudImportAssetsService (prepare_upload + upload_ticket image/font + url) -> validateMediaIngestPayload -> handleUploadCommitJob / handleUrlFetchJob.

Verified tsc -p tsconfig.cloud.json --noEmit, tsc -p tsconfig.backend.json --noEmit, tests/cloud/*.test.ts (87/87 pass), npm run check, and git diff --check.

* fix(api,routes): complete Studio UI <-> cloud backend wiring parity

- Mount POST /motion-api/preview/open in src/routes/projects.ts (authenticated under /motion-api/preview/*) returning top-level ok/activeId/projectId/projectTitle/revision/sessionId/exportJob.
- Align WorkspaceStatus and ProjectCatalog shapes across GET /motion-api/project/status, POST /motion-api/projects, POST /motion-api/projects/:id/open, PATCH /motion-api/projects/:id, POST/PATCH /motion-api/sessions, POST /motion-api/sessions/:id/open, POST /motion-api/sessions/:id/artifacts, POST /motion-api/sessions/:id/messages, and POST /motion-api/templates/:id/open (accepting optional expectedRevision/expectedProjectId/instruction in cloneBodySchema and idempotent caller session id + instruction alias in WorkspaceService).
- Mount POST /motion-api/phase1/call delegating to mcpDispatcher.dispatch (mapping isError to structured HTTP 400/403/404/409/501 responses), include top-level currentVersionId on openmotion_get_project, and support sort/update/import_to_project in openmotion_assets_use.
- Align GenerationJob serialization with shared/gateway.ts (numeric epoch timestamps, model object, assets/libraryAssets/saveToLibrary) and mount GET /motion-api/generations, POST /motion-api/generations/:id/cancel, GET/PUT/POST /motion-api/tracking/preferences, and GET /motion-api/health.
- Add end-to-end Studio wiring parity regression tests in tests/cloud/api-integration.test.ts.

Verified tsc -p tsconfig.cloud.json --noEmit, tsc -p tsconfig.backend.json --noEmit, tests/cloud/*.test.ts (88/88 pass), npm run check, and git diff --check.

* feat(cloud): add Mark-and-Sweep CAS GC, window-aligned presigned GET URLs, and preview proxy writer

Implements Feishu review optimizations c3, c4, and c1 (writer half):
- c3 (CAS GC): Replace ref_count-only deletion in src/db/cas.ts and
  src/workers/blob-gc.ts with authoritative SQL Mark-and-Sweep verifying
  NOT EXISTS across project_files, project_version_files, asset_versions,
  and active upload_tickets (state IN ('issued','uploaded','processing')),
  raise default grace period to 7 days (604800s), add self-healing
  reconcileDriftedBlobRefCounts() at sweep start, and guard
  finalizeBlobDeletion with live-reference NOT EXISTS checks.
- c4 (Presigned GET caching): Align StorageService.presignGet signingDate
  to fixed UTC cache windows (default 3600s, expiresIn >= 2x window) with
  public/private immutable ResponseCacheControl for immutable CAS keys
  while preserving opt-out and backward compatibility.
- c1 (Preview proxy writer): Add generate_preview_proxy job contract and
  colon-free jobId builder (proxy__<wid>__<sha256>), non-blocking
  best-effort enqueue after upload_commit/url_fetch, and idempotent
  FFmpeg/Sharp transcoding to derived/{sha256}/proxy.{mp4,webp,m4a} with
  frozen workspace_blobs.metadata.previewProxy persistence and /tmp cleanup.
- Tests: Add deterministic regression tests in tests/cloud/infra-db.test.ts
  and tests/cloud/worker-media.test.ts covering c3, c4, and c1.

* feat(worker-media): wire QueueService into media-ingest and presign cache window in worker runtime

Pass QueueService into processMediaIngestJob inside startMediaWorker so
upload_commit and url_fetch automatically enqueue generate_preview_proxy
jobs, and forward optional S3_PRESIGN_CACHE_WINDOW_SEC to StorageService.

* feat(cloud): add preview origin isolation, proxy track serving, and edit-window coalescing

Implement Feishu architecture review optimizations (c1 reader, c2, c5) and unified P1 config defaults:
- Config (src/infra/config.ts): raise BLOB_GC_GRACE_SECONDS default to 604800 (7d), add S3_PRESIGN_CACHE_WINDOW_SEC (3600), PREVIEW_PUBLIC_ORIGIN, PREVIEW_TOKEN_TTL_SEC (900), and HISTORY_COALESCE_WINDOW_MS (4000).
- Cookie-less preview subdomain isolation (c5): add timing-safe HMAC-SHA256 project-scoped preview tokens (src/auth/preview-token.ts), Preview Host Isolation middleware in src/entrypoints/api.ts blocking non-preview/mutating routes with 403 PREVIEW_ORIGIN_ISOLATED and ignoring cookies, POST /api/projects/:id/preview-token, previewOrigin in /__hyperframes_config, S3 CORS origin wiring, and dedicated K8s Ingress/ConfigMap rules.
- Dual-track preview proxy reader (c1): serve ready workspace_blobs.metadata.previewProxy on GET/HEAD /api/projects/:id/preview/* with X-OpenMotion-Media-Track: proxy, ?original=1/?raw=1 bypass, and seamless fallback to original CAS blobs.
- High-frequency edit-window coalescing (c2): coalesce rapid interactive Studio edits within HISTORY_COALESCE_WINDOW_MS via delta project_version_files upserts/deletes and exact sorted CAS refcount deltas while preserving immutability for export-referenced, pinned, checkpoint, restore, redo-branched, MCP/agent, and post-window versions; document Option 1 (S3 manifest.json) as P2 scaling path in docs/product/architecture.md.
- Add deterministic cloud regression tests across api-integration, studio-diskless, and version-optimistic-lock suites.

* fix(cloud): support versioned GSAP plugin paths and align Compose GC grace default

- Strip optional gsap@<version>/(dist/) prefix under /api/vendor/gsap/* in src/studio/routes/lint-selection-system.ts and restrict resolved files to safe JS/map filenames so /api/vendor/gsap/gsap@3.15.0/dist/MotionPathPlugin.min.js returns 200 while blocking package.json/traversal paths.
- Update BLOB_GC_GRACE_SECONDS default in deploy/docker-compose.yml from 86400 to 604800 to match src/infra/config.ts, K8s ConfigMap, and deploy docs.
- Add regression assertions in tests/cloud/api-integration.test.ts for versioned GSAP plugin serving (main & preview origins) and traversal rejection.

* feat(auth): support HS256 OIDC ID tokens and RFC 9207 iss verification for OpenDesign

Allow OidcService to authenticate against Better Auth / Vela OIDC providers that omit jwks_uri (disableJwtPlugin: true) and sign ID tokens with HS256 using OIDC_CLIENT_SECRET. Enforces strict algorithm-confusion guards, optional RFC 9207 iss verification on /auth/callback, error-state cleanup, and keeps Bearer JWT verification restricted to asymmetric JWKS.

* fix(ci): eliminate cloud gitleaks false positives and install FFmpeg for cloud tests (#773)

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* fix(studio): refresh history from project SSE events (#772)

Co-authored-by: lefarcen <935902669@qq.com>

* fix(cloud): hydrate template cloning and enable CORS on project-local preview media (#769)

* fix(cloud): wire template cloning on sessions/projects and hydrate catalog LFS blobs

* fix(cloud): set crossorigin=anonymous on project-local preview media for S3 302 audio

* fix(cloud): address PR review feedback on template creation and catalog sync

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* feat(studio): add client-side browser export with cloud original media fallback (#762)

* feat(studio): add client-side browser export with cloud original media fallback

* fix(studio): auto-select live html capture for delayed layers

* ci: allowlist false-positive cloud fixtures in gitleaks

* ci: install ffmpeg for cloud media worker tests

* fix(studio): address browser export isolation, capture, opacity, composition, and audio rate reviews

Address all 7 inline review threads on PR #762:

- Gate browser export on the currently open composition (openComposition) for both explicit engine='browser' and the persisted toggle, falling back to the server render path for other compositions, and disable the panel toggle when another composition is selected.
- Preserve cookie-less preview origin isolation (PREVIEW_PUBLIC_ORIGIN): reject cross-origin/opaque-sandbox preview iframes in preflight, runBrowserExport, and RenderQueue, and remove the unsafe app-origin preview fallback in resolveIsolatablePreviewUrl while preserving same-origin pathname and ?variables query overrides.
- Auto-select snapdom-live for animated HTML layers regardless of start time (including start: 0 keyframed, CSS/Web-animated, and initially hidden elements) and stop double-applying keyframe opacity/transforms over live seeked DOM captures.
- Convert timeline playDuration to source-buffer duration (playDuration * rate, clamped to maxSourceSpan) when scheduling AudioBufferSourceNode.start for non-1x playbackRate clips.
- Add unit regressions and real headless Chromium verification for 2x/0.5x OfflineAudioContext duration and snapdom-live zero-start fade / single-opacity compositing.

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* feat(studio): add scoped cross-origin preview bridge (#774)

Co-authored-by: lefarcen <935902669@qq.com>

* ci(deploy): add GHCR multi-target image workflow and wire missing API K8s env keys (#771)

* ci(deploy): add GHCR multi-target image workflow and wire missing API K8s env keys

* ci(deploy): harden container-images workflow per PR review

- Add .dockerignore and LICENSE to push path filters so all Dockerfile inputs trigger rebuilds
- Gate :latest promotion to manual workflow_dispatch on refs/heads/main after the 'standalone' CI check passes
- Guard both jobs to nexu-io/openmotion and derive the lowercased GHCR owner and OCI source URL from GitHub context
- Collapse the four target builds into a strategy.matrix.include job with isolated per-target GHA cache scopes

* ci(deploy): gate :latest on latest ci.yml standalone run

Replace the any-success check-runs count in prepare with a check against
the latest Motion standalone checks (ci.yml) run on main for the exact
commit SHA, failing closed if any matching run is active or if the most
recent run or its latest standalone job did not succeed.

* [OPEND-5496] feat(studio): integrate cross-origin picker and playback (#777)

* feat(studio): connect preview bridge to element picker

* feat(studio): add cross-origin preview playback

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] fix(studio): restore cloud history, element probes and scene playback (#784)

* feat(studio): connect preview bridge to element picker

* feat(studio): add cross-origin preview playback

* fix(studio): synchronize cloud undo and redo with restored files

* fix(studio): expose source element availability on cloud routes

* fix(studio): mount preview scripts with their composition scene

* fix(studio): accept element operations sent by the editor

---------

Co-authored-by: lefarcen <935902669@qq.com>

* feat(cloud): add @openmotion/observability web Sentry monitoring and sourcemap pipeline (#763)

* feat(cloud): add @openmotion/observability web Sentry monitoring and sourcemap pipeline

* refactor(observability): make Sentry lazy-loaded, drop FSL vite plugin, add usage guide

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* [OPEND-5496] fix(studio): restore cloud history, animated edits and scene posters (#786)

* feat(studio): connect preview bridge to element picker

* feat(studio): add cross-origin preview playback

* fix(studio): synchronize cloud undo and redo with restored files

* fix(studio): expose source element availability on cloud routes

* fix(studio): mount preview scripts with their composition scene

* fix(studio): accept element operations sent by the editor

* fix(studio): render and restore cloud versions in history

* fix(studio): persist animated title drags in scene templates

* fix(studio): render scene posters and await queued thumbnails

* test(cloud): await diskless history fixture responses

* fix(studio): deliver cloud file and history changes across clients

* fix(studio): persist edits from scoped isolated preview picks

* fix(studio): retain implicit animation endpoints during path drags

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] feat(studio): deliver isolated canvas edits and uninterrupted preview renewal (#797)

* feat(studio): connect preview bridge to element picker

* feat(studio): add cross-origin preview playback

* fix(studio): synchronize cloud undo and redo with restored files

* fix(studio): expose source element availability on cloud routes

* fix(studio): mount preview scripts with their composition scene

* fix(studio): accept element operations sent by the editor

* fix(studio): render and restore cloud versions in history

* fix(studio): persist animated title drags in scene templates

* fix(studio): render scene posters and await queued thumbnails

* test(cloud): await diskless history fixture responses

* fix(studio): deliver cloud file and history changes across clients

* fix(studio): persist edits from scoped isolated preview picks

* fix(studio): retain implicit animation endpoints during path drags

* feat(studio): edit isolated previews and renew project asset access in place

* fix(studio): restore the runtime position after a disconnected preview expires

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] perf(studio): reuse preview builds and keep canvas drags responsive (#799)

* feat(studio): connect preview bridge to element picker

* feat(studio): add cross-origin preview playback

* fix(studio): synchronize cloud undo and redo with restored files

* fix(studio): expose source element availability on cloud routes

* fix(studio): mount preview scripts with their composition scene

* fix(studio): accept element operations sent by the editor

* fix(studio): render and restore cloud versions in history

* fix(studio): persist animated title drags in scene templates

* fix(studio): render scene posters and await queued thumbnails

* test(cloud): await diskless history fixture responses

* fix(studio): deliver cloud file and history changes across clients

* fix(studio): persist edits from scoped isolated preview picks

* fix(studio): retain implicit animation endpoints during path drags

* feat(studio): edit isolated previews and renew project asset access in place

* fix(studio): restore the runtime position after a disconnected preview expires

* perf(studio): share revision-scoped preview builds and spread lease renewals

* fix(studio): keep canvas drag positions visible until the save settles

* fix(preview): recover isolated frames after temporary build pressure

* fix(studio): translate the preview capacity notice in every locale

---------

Co-authored-by: lefarcen <935902669@qq.com>

* feat(cloud): close media direct/multipart/instant upload, sprite/waveform pipeline, MCP ingest placeholders, optimization hints, and streaming export (#800)

* feat(cloud): close media direct/multipart/instant upload, sprite/waveform pipeline, MCP ingest placeholders, and streaming export

* feat(studio): surface non-blocking background media optimization status across sidebar and timeline

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* [OPEND-5496] feat(studio): restore editing controls in isolated previews (#802)

* feat(studio): connect timeline, layer selection and inline text across preview origins

* fix(studio): support legacy clip identities and verify isolated edit revisions

* test(studio): verify scoped variable editing without loading source resources

---------

Co-authored-by: lefarcen <935902669@qq.com>

* fix(cloud): hydrate referenced media only on worker-render, bound portrait/low-bitrate proxy bloat, and skip SVG media_probe (#804)

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* perf(studio): open projects without blocking on workspace hydration (#807)

Co-authored-by: lefarcen <935902669@qq.com>

* feat(cloud): align auth with AMR internal identity, project grants, and DCR hardening (#770)

* feat(cloud): align auth with AMR internal identity, project grants, and DCR hardening

Implement OpenMotion Cloud Login & Remote MCP authorization alignment on top of feat/cloud-container-p1:

- Add AMR internal identity client (<=60s cache keyed by authUserId + externalWorkspaceId), AMR workspace/member projection, 401 auth_required on banned/deleting/deleted/revoked accounts, and 503 auth_unavailable on AMR unreachability without clearing sessions/drafts.
- Switch OpenDesign downstream gateway calls from Authorization: Bearer to x-internal-token + x-workspace-* 4-tuple headers and /api/internal/billing/summary/:appUserId.
- Add project_grants table, projects.owner_user_id, auto-grant on agent project creation, GET/POST/DELETE /motion-api/projects/:id/grants, and enforce project-level agent access across project files, exports, project asset uploads/imports, media generation jobs, and archive exports (keeping preview_token isolated).
- Harden OAuth 2.1 DCR with redirect_uri allowlist (loopback + configured HTTPS hosts), per-IP rate limiting (429), hourly unused-client cleanup, RFC 9207 iss parameter, enhanced consent UI with switch-account (prompt=login), and Connected Apps revocation UI.
- Add Studio A01/A03 draft preservation & 401/503 auth recovery bar, per-project Agent Access dialog, structured request audit logging, and remove requires_local_executor from Streamable HTTP Codex plugin manifest.

* fix(cloud): enforce project grants on template clone, MCP asset import & media jobs, add RFC 9207 iss on deny, and fix Studio/gitleaks checks

---------

Co-authored-by: heggria <bshengtao@gmail.com>

* Promote validated cloud branch merges to default test (#813)

Co-authored-by: lefarcen <935902669@qq.com>

* Return the complete cloud MCP template catalog (#814)

Co-authored-by: lefarcen <935902669@qq.com>

* Reduce redundant workspace reads in idle and background tabs (#817)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Reduce startup requests and downloads for project links (#818)

* Reduce avoidable project entry requests and eager downloads

* Present the first usable frame without waiting for soundtrack buffering

* Open existing Studio projects in a single guarded activation

* Open the project workspace independently of preview media

* Show authored clip names while timeline media loads

* Reduce project startup reads and idle workspace requests

---------

Co-authored-by: lefarcen <935902669@qq.com>

* Restore isolated Studio editing and derive timeline previews from source media (#827)

Co-authored-by: lefarcen <935902669@qq.com>

* ci(cloud-test): add gated Orbit cluster-pull publication for feat/cloud-container-p1 (#822)

* ci(cloud-test): add gated Orbit cluster-pull publication for feat/cloud-container-p1

* fix(ci): publish full SHA image tags, read ORBIT_API_URL from vars, and schedule sync tests

* Advance isolated edit preconditions across acknowledged local writes (#831)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Reduce Studio edit traffic and complete composition canvas drops (#832)

* [OPEND-5496] Reuse Studio preview code and complete composition canvas drops

* Reuse keyframe reads during layout changes and hydrate promoted previews

* Refresh keyframes once when a timing edit reloads the preview

---------

Co-authored-by: lefarcen <935902669@qq.com>

* Preserve video poster paths when copying nested composition clips (#835)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Guide remote agent transcription and fix caption retries (#833)

* [OPEND-5496] Describe client-side transcription in remote MCP discovery

* [OPEND-5496] Replay remote caption commands with their original results

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Share clip move semantics between Studio and remote MCP (#845)

* Share single-clip move semantics between Studio and remote MCP

* Plan the optimistic drag and durable move from the same start

* Reconcile clip animations in one move and document the cloud command

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Avoid unchanged composition reads after timeline edits (#836)

* Reuse the active composition source when refreshing its poster

* Cover opening and reopening the cloud motion catalog

* Reuse unchanged composition keyframes after scoped edits

* Publish selection transitions once and consume pending history refreshes

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Step shared project history and name edits at commit (#846)

* Step shared project history and name edits at commit

* Preserve one project history entry across a Studio gesture

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Unify Studio and remote project editing rules (#850)

* Document the shared project editing contract

* [OPEND-5496] Share project editing commands across Studio and remote MCP

* Commit timeline track and paint order together for legacy and current clips

* Narrow command failures in both backend compiler configurations

* Fix reconnect, caption roots and whole-path drag parity found in browser acceptance

* Exercise isolated pointer deltas and playhead mode in the preview bridge

* Keep ripple deletion on its authored lane and preserve locked track controls

* Respect attribute selector indices when pasting beside a source element

* Preserve authored zero-duration holds during canvas drags

---------

Co-authored-by: lefarcen <935902669@qq.com>

* ci(cloud-test): publish Orbit cluster-pull releases via /api/automation/v1/publications (#857)

* Read cloud Motion templates from published Prism content (#859)

* Import the published Prism Motion catalog into cloud project services

* Expose editable Motion templates and safely reuse template clone requests

* Verify that a template handoff carries its session request identity

* Remove scheduled Prism imports and keep the original contributor catalog workflow

* Read Prism Motion on demand with stale-while-revalidate caching

* Serve Studio gallery pages from the cached CMS publication

* Read built-in template sources lazily in the cloud API

* Prepare only the selected published template before cloning

* Document request-driven CMS reads and preserve clone types

* Reject conflicting lengths during shared template downloads

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Fix isolated canvas saves in compositions with dynamic animation targets (#867)

* Keep dynamic letter animations independent from canvas layer moves

* Cover isolated welcome canvas moves through the batch save route

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Keep rapid history actions ordered and avoid unrelated preview reloads (#872)

* Serialize cloud history inputs and return the next steps with each restore

* Scope history preview reloads and animation reads to affected sources

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Avoid unrelated reads when selecting items in the editor (#870)

* Keep canvas selection and focus changes from refreshing unrelated editor data

* Refresh worker availability when Studio becomes visible

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Keep video and audio rows separated during track moves (#874)

* Reflow all timeline display rows together when moving clips across lanes

* Keep implicit text above authored tracks when rebuilding display lanes

* Exclude the local Studio dependency link from source control

* Verify authored lane and compacted host rows after a move

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Keep timeline trims visible while the isolated preview refreshes (#873)

* Keep released clip trims visible while the isolated preview catches up

* Preserve source in-points when a trim only changes timing

* Exclude the local Studio dependency link from source control

* Keep timeline moves visible while isolated preview snapshots refresh

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Apply concurrent Studio and MCP editing intents to current project content (#882)

* Reapply stable-target editing intents to current project source

* Submit isolated canvas gestures to the shared project edit executor

* Verify stable canvas identities before applying stale editing intents

* Reconcile Studio projections when an edit commits on a newer source

* Guard stale stacking snapshots and cover generated welcome template identities

* Protect open source drafts and verify concurrent Studio edit receipts

* Document the project source and read-only playback boundary

* chore: ensure PR CI

---------

Co-authored-by: lefarcen <935902669@qq.com>
Co-authored-by: open-design-crew[bot] <4197780+open-design-crew[bot]@users.noreply.github.com>

* Serve Motion templates without waiting for the CMS on first access (#863)

* Serve the current template catalog while the initial CMS download runs

* Distinguish unpublished catalog availability from missing templates

* chore: ensure PR CI

---------

Co-authored-by: lefarcen <935902669@qq.com>
Co-authored-by: open-design-crew[bot] <4197780+open-design-crew[bot]@users.noreply.github.com>

* [OPEND-5496] Restore the Motion effects component catalog and project installation (#875)

* Serve and install the pinned motion component registry in cloud Studio

* Mount effect fragments from nested scenes and expose installation through MCP

---------

Co-authored-by: lefarcen <935902669@qq.com>

* fix(cloud): allow bundled vendor dist paths in preview, archive, and render (#879)

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* feat(studio): unify editor asset loading and add client-side composition thumbnails (#884)

* feat(studio): unify editor asset loading and add client-side composition thumbnails

Unify initial editor asset readiness across file tree, timeline, active composition media, and bounded client-side timeline composition thumbnail capture, while fixing repeated fallback tiles on cloud HTML composition strips.

- Gate workspace interaction and global hotkeys behind a single debounced loading overlay with monotonic progress, bounded retries, 4xx fast-fail, 8s skip escape hatch, and post-unlock non-blocking failure toasts with in-place retry.
- Filter decorative avatars/logos/insets out of cloud fallback posters and render clean non-repeating single-title fallback strips instead of tiled icons.
- Capture real multi-frame composition filmstrips in the browser via a serialized offscreen iframe (@zumer/snapdom + direct canvas/WebGL preserveDrawingBuffer fast-path), persisted in IndexedDB and served from an in-memory LRU cache across switches.
- Integrate up to 4 playhead-nearest uncached composition clips into the initial loading gate with a 4.5s timeout ceiling, streaming remaining clips progressively in a priority queue (interaction > gate > visible > overscan) and caching project file trees via stale-while-revalidate.

* fix(studio): bound HEAD probes, ref-count thumbnail URLs, and drop overlay backdrop blur

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* merge(cloud): sync feat/cloud-container-p1 with main (74a3d1e79, #808 reverted) (#865)

* Fix OpenDesign sign-in handoff, Free/Go media guidance and Codex discovery (#704)

* Wait for the service's authorization expiry before cancelling OpenDesign sign-in

OpenMotion killed the connector ten minutes after a sign-in started, but the
account service keeps a device authorization open for fifteen minutes and the
connector already waits for that expiry. Killing it early made the connector
cancel an authorization the user was still completing in the browser, so a
sign-in finished in minutes 10-15 failed and had to be repeated.

Keep a 16-minute backstop only, so the service's own expiry decides.

* Open the subscription page in the sign-in browser with an account intent

Manage subscription and Upgrade to Plus were plain links inside Studio. When an
Agent host shows Studio in its own browser, they opened there, while the
connector had signed the user in through the system default browser, so
OpenDesign asked the user to sign in again before upgrading. Nothing checked
that the browser held the same account, so a purchase could land on another
account.

The local service now builds the entry-tagged dashboard address, requests a
one-time account intent with the installation's control key for a confirmed
production sign-in, and opens /login?intentId=... in the system default
browser. The console then confirms the account before continuing to the plan
page. Without an intent the plain dashboard opens; when no browser can be
launched, Studio opens the returned link itself.

* Report Free and Go accounts as not including media whatever their balance

Free and Go plans entitle text models only; account credits never unlock media
models on them. The hint reported not-included only for a non-positive
balance, so a new account with a signup grant or a Go subscriber with its
allowance got unknown. Agents then skipped the Go upgrade guidance and sent a
user who had just bought Go back to the generic setup page.

Free and Go now report not-included regardless of balance; hasBalance is still
returned for balance messages.

* Accept Codex in media discovery and document its image route

Settings lets users pick Codex for images, but openmotion_media_use rejected
provider=codex with invalid_enum, so an Agent following that choice failed to
list Codex models. Discovery (inspect, reference, models) now accepts Codex and
returns a Codex provider guide. Project-direct generate still does not accept
Codex and now says to use openmotion_assets_use with codex:image-generation,
which already supports it.

* Keep a subscription link when the fallback popup is blocked

The fallback opened the subscription page only after the local service
replied, when browsers no longer treat the click as a user gesture.
A blocked popup now leaves a Continue in browser link next to the
button. The standalone button and link keep their content width.

* Restore Explore template and Skill shortcuts (#707)

* Restore Explore library shortcuts

Reuse the template and Skill library routes from the Explore shelves. Enlarge the template library title and add a matching close control to the Skills page.

* Match Explore shortcut and library heading styles

Restore the compact text treatment for Explore shortcuts, align the library headings, and remove the GitHub star link from the template library header.

* Enlarge and add icons to Explore shortcuts

* Set Explore shortcut labels to 13 pixels

* Restore Skills focus only when closing the library

* Clarify which library header shows the GitHub badge

---------

Co-authored-by: fengcao <fengcao@Mac.lan>
Co-authored-by: fengcao <fengcao@fengcaodeMacBook-Pro.local>

* Add creative preview cards and audiovisual continuity guidance (#708)

* feat: add creative preview cards and audiovisual continuity guidance

* test: schedule storyboard card coverage in standalone CI

* fix: preserve storyboard previews on rerender

---------

Co-authored-by: bone3deep1962-collab <bone3deep1962@gmail.com>

* feat(settings): show account plan guides and sign in in place on the OpenDesign provider (#709)

* feat(settings): reuse account plan guides on the OpenDesign provider

The OpenDesign provider detail now shows the same guides as the account
page: signed-out people see the multimodal sign-in card, Free and Go
accounts see the upgrade-to-Plus card. Other states keep the account
callout. The model list below is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(settings): load plan and reload providers after sign-in on the OpenDesign provider

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(settings): let the billing refresh win after sign-in completes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(settings): sign in in place on the OpenDesign provider

Sign-in progress (browser authorization, code, cancel, retry) now stays on
the provider page instead of jumping to the account page. The account page
and the provider share useAccountSignIn and AccountStatus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(settings): sign in in place before the account summary loads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: zhanghuihua <zhanghuihua@huihuideMacBook-Pro.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Refine workspace navigation and settings shortcuts (#711)

* Refine appearance and Brand Kit navigation

Show theme choices directly in the account menu. Move the Brand Kit shortcut into the Explore navigation beside Skills.

* Remove redundant controls from primary navigation pages

Use the shared header to navigate between media studios, the API directory, and MCP onboarding. Keep contextual back actions for scene landings and host-managed views.

* Restore the Brand Kit shortcut in the header

Return Brand Kit to the palette action beside Assets and remove its Explore masthead shortcut.

* Return to the originating page from contextual navigation

* Embed MCP setup in Settings and extend media breadcrumbs

* Unify return controls for Explore spotlight destinations

* Open the Explore image spotlight in Design Studio

* Move the settings back control into the sidebar

* Label the settings back button

* Restore the original API page navigation

---------

Co-authored-by: fengcao <fengcao@Mac.lan>
Co-authored-by: fengcao <fengcao@fengcaodeMacBook-Pro.local>

* feat(studio): show the 3D Studio like the other technique studios (#715)

The 3D Studio page now uses the same layout as the Explainer Studio:
a hero with the featured Skill cover, the Skills search, a template
shelf and the 3D Creative Skills. The hero shows "Coming soon" in place
of the create button while 3D generation is pending.

The template shelf filters by the localized 3D animation tag instead of
searching "3D", which also matched templates whose ids contain "3d".

Co-authored-by: zhanghuihua <zhanghuihua@huihuideMacBook-Pro.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Refresh the Black Friday reference collection (#714)

Co-authored-by: Q-baobao <Q-baobao@users.noreply.github.com>

* fix(studio): refine MCP client branding and hero motion (#717)

Co-authored-by: open-design-crew[bot] <299007234+open-design-crew[bot]@users.noreply.github.com>

* Show design templates on the Design Studio landing (#718)

* Fix OpenDesign sign-in connector setup on Homebrew Node and explain failures (#716)

* Find npm for the OpenDesign connector on Homebrew Node and report why preparation failed

Packaged installations omit the connector, so the service installs it with npm on
first sign-in. The npm path was derived as `<execPath>/../lib/node_modules/npm`.
`process.execPath` is the resolved binary, so a Homebrew Node reports its Cellar
directory, where npm lives under `libexec`; npm never started, every attempt
failed within ~70 ms as `connector_unavailable`, and the cause was discarded.

- Move connector discovery and installation to gateway/account-connector.ts.
  npm is looked up via `npm_execpath`, beside Node (including Homebrew's
  libexec layout), then by following `npm` on PATH.
- Classify failures as npm_missing, install_failed or start_failed. The local
  log keeps the npm output; telemetry adds only `connector_problem`.
- The account summary carries a manual command that installs into the private
  `<data>/account/runtime` directory, which the next Retry finds without a
  restart and regardless of the service's PATH, replacing the `npm -g` advice.
- The npm installer prepares the connector during setup, while the terminal's
  npm and proxy settings are available; failures stay non-fatal.

* Show the sign-in component failure with Retry and a copyable install command

When the connector is unavailable the account panel now offers Retry instead of
"Sign in again" and shows the install command in a copyable block below the
reason, using design-system tokens.

* Address review: bound installer preparation, shell-safe command, reuse code block

- The installer prepares the connector before host registration, so a host
  starting the service cannot run a second npm into the same directory, and
  stops after 60 seconds; the service installs it at sign-in otherwise.
- The manual command single-quotes the directory on POSIX shells.
- An explicit OPENMOTION_ACCOUNT_CLI path gets no install command, since the
  private installation would not be used.
- A data directory that cannot be created is reported as install_failed.
- The panel reuses the shared code block and a Copy command button, as the
  Agent settings do, instead of a new style.
- Test the failure telemetry against the event schema.

* Use a neutral install path in the account panel test

The release content scan rejects home-directory paths in source.

* Ask to check the configured connector path instead of offering a hidden command

When OPENMOTION_ACCOUNT_CLI names the connector, the summary omits the install
command, so the failure message no longer refers to one.

---------

Co-authored-by: heggria <bshengtao@gmail.com>

* feat(studio): refine creative nav menus, model links, and Motion new project card (#719)

Co-authored-by: 范桢 <fanzhen@refly.ai>

* feat(studio): give the Sound Studio a home with a banner and audio templates (#726)

* feat(studio): give the Sound Studio a home with a banner and audio templates

The Sound Studio entry now opens a home page laid out like the 3D Studio:
a page-level back button, an intro banner with a featured template, and
an audio template grid. Each template card shows its type, duration,
recommended model and prompt; "Use prompt" opens the generation page
with the prompt filled in, and "Generate audio" opens it directly.

The top-nav Audio entry keeps the existing generation page. The two
entries shared one route, so the home uses `home=1`
(`?page=sound&home=1`); other studios are unchanged.

Templates add four repository-owned clips (two example scores, interface
cues and flight effects). Cues and effects are re-encoded to AAC and
posters resized to 800px WebP, adding about 575 KB to the Studio build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(studio): add more Sound Studio templates

Adds eight sound templates synthesized for this page (ambient pad,
notification chime, success sound, interface tap, transition whoosh,
title impact, tension riser, keyboard typing) and two narration
templates, bringing the home to 16 templates. Each clip is generated
in code and owned by the project; covers are gradient waveform images.
Together they add about 390 KB to the Studio build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(studio): open the same generation page as the top-nav Audio menu

After #719 the top-nav Audio entry opens the scene's generation page
(`?page=create`). Generate audio and Use prompt on the Sound Studio home
now open that page too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(studio): list only templates with an audio preview on the Sound Studio home

Narration templates have no preview yet, so the home shows the 13 music
and sound-effect templates. The Text to speech example on the generation
page is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(distribution): ship the Sound Studio template previews

The packaged Studio rejects unregistered media. Register the
fingerprinted template audio used offline by the Sound Studio home
alongside the welcome soundtrack, and assert that it ships.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: zhanghuihua <zhanghuihua@Mac.lan>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix(studio): keep loaded task details scrollable (#727)

Co-authored-by: Guotongjia <guotongjia@refly.ai>

* [OPEND-5528] Restore Motion Studio catalog browsing and direct template details (#725)

Add the full Motion Studio catalog and direct editor entry. Restore the last available project from Explore and open templates in their existing detail views. Preserve the blank-project card from main and share industry ordering across the two shelves.

* Apply selected Design Studio interaction updates (#728)

Co-authored-by: fengcao <fengcao@fengcaodeMacBook-Pro.local>

* [OPEND-5490] feat(cinema): dynamic video parameters, ticked duration slider, and native audio toggle (#695)

* [OPEND-5490] feat(cinema): derive video duration options from capabilities.durations

* test(studio): scope duration option lookup to the active listbox

* feat(cinema): add slider duration picker, quick parameter cards, and Seedance native audio toggle

* fix(cinema): pass wan-2.7 audio flag, polish defaults, and guard video refs

---------

Co-authored-by: Codex <codex@openai.com>

* fix(media): enforce OpenDesign parameter contracts, CLI errors, and first-frame references (#732)

* fix(media): enforce OpenDesign parameter contracts, CLI errors, and first-frame references

- Validate paired aspect_ratio/resolution and mutually exclusive size/output parameters for OpenDesign account and Cloud image models even when capabilities.profiles are absent.
- Classify local vela CLI flag errors without HTTP status codes as invalid_request instead of misreporting network or sign-in failures.
- Expose maxInputImages on OpenDesign account video models and forward first-frame images via `vela video gen --first-frame`.
- Enforce the 2 MiB OpenDesign reference image upload limit before queueing account or Cloud media jobs.
- Reset draft.parameters on model or modality switches in AssetComposer, and restrict reference pickers and "Use as reference" / "Edit as new version" actions to image assets.
- Update provider/assets/architecture documentation and add backend and Studio regression tests.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* docs(mcp): align FAQ, schemas, and docs with account first-frame and 2 MiB limit

- Update the MCP Connect reference-image FAQ and all 10 locale translations in studio/src/i18n/mcp-ui.json to reflect OpenDesign account first-frame video support (one image) and the 2 MiB upload limit.
- Propagate the 2 MiB OpenDesign reference image upload limit (while keeping 20 MB for other local adapters) to shared/phase1-tools.ts, mcp-tools.ts, docs/model-gateway.md, and skills/openmotion-media/references/jobs.md.
- Extend tests/mcp-onboarding.test.ts to verify the updated FAQ and schema copy.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

---------

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* chore(media): host Skill cover WebP posters and remove bundled copies (#701)

* chore(media): host Skill cover WebP posters and remove bundled copies

* fix(tests,docs): align packaging assertions and storage docs with hosted Skill posters

* feat(studio): add Black Friday top banner and Pricing entry with attribution (#731)

* feat(studio): add Black Friday top banner and Pricing header entry

* feat(tracking): attribute Black Friday banner and Pricing entry clicks

Add od_origin/od_entry_source/od_entry_id/od_entry_at and UTM fields to the
banner and header Pricing links, report the banner impression and the
claim/close/Pricing clicks with campaign_id and the click's entry_id, and use
design-system tokens for the Pricing icon colors and header radii.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(studio): localize the Black Friday banner and bound its campaign window

Move banner and Pricing campaign copy into campaign-ui.json for all supported
locales, show the campaign only until 2026-12-05 00:00 Beijing time, keep a
dismissed banner hidden for the rest of the local day, and re-check the window
and day each minute so open pages update without reloading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(studio): keep the countdown day unit out of one-letter messages

The one-letter "d" message translated to German "T", which the reverse
lookup then matched for the editor's T inset label. Use a descriptive key and
keep English "d" in code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(tracking): send the AMR-registered OpenMotion entry source

AMR drops an attribution whose od_entry_source is not registered, entry id
included. Send openmotion_manage_subscription for the banner and header Pricing
links and tell them apart by utm_medium and the click event's entry_id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(studio): start the Black Friday campaign at 2026-11-21 18:00 Beijing time

The banner, the Pricing 50% OFF badge and the campaign fields on links and
events start at 2026-11-21 18:00 +08:00 and still end at 2026-12-05 00:00.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: hazel-ye <80680199+hazel-ye@users.noreply.github.com>
Co-authored-by: zhanghuihua <zhanghuihua@Mac.lan>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(studio): unify image creation with fixed OpenDesign models and image features (#734)

* feat(studio): unify image creation with fixed OpenDesign models and image features

- Image menu and creation page list a fixed model set (OpenDesign models first,
  Codex Image last), with provider then model pickers.
- Open background removal, relight and character consistency as image scenes,
  following the measured OpenDesign image model capabilities: per-model
  reference limits, GPT Image 2.6 quality and transparent background, Seedream
  sizes, and a 2 MiB reference limit.
- The OpenDesign account submits image jobs the connector cannot express
  (transparent background, several references) to the same media API with its
  control key, so signed-in users get the same features as an API key.
- Transparent results preview on a checkerboard; remove the creation page back
  arrow; add missing translations.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix(studio): address PR #734 review feedback on library BYOK preservation, featureMode scope, MCP handbook, and architecture docs

---------

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* feat(audio): rebuild Sound Studio workbench, inline voice auditions, and playback dock (#739)

* feat(audio): rebuild Sound Studio workbench, inline voice auditions, and playback dock

- Add the 7-tab Audio / Sound Studio workbench (live Music, Sound effects, and Text to speech tabs alongside capability-preview upcoming tabs) with dedicated top navigation dropdown and route separation.
- Add inline voice auditions (bundled Kokoro-82M Apache-2.0 and BytePlus Vivi samples plus official ElevenLabs preview URLs), unified live generation/asset stream rows, interactive waveforms, and cross-tab Recreate hydration.
- Refine the bottom audio player dock into a compact single-row playback controller with click-to-locate and inline voice playback without opening the full dock; hide redundant Advanced JSON panels for built-in models and place Custom voice ID inline inside the Voice section.
- Expose built-in OpenDesign account audio fallbacks and fal ElevenLabs Sound Effects v2 generation options with full i18n and unit test coverage.

* fix(audio): hide raw JSON advanced panel for OpenDesign Cloud music models

* fix(studio): resolve i18n key collisions and register Sound Studio CSS in token gate

* fix(release): validate template and Skill index entries (#721)

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* feat(video): add Video Mega Menu and video features (camera control, multi-shot, native audio) (#738)

* feat(video): add Video Mega Menu and video features (camera control, multi-shot, native audio)

* fix(video): lock native-audio toggle with explicit note and add video feature MCP handbook scenarios

---------

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* [OPEND-5521] Add Cinema Studio template gallery and generation presets (#729)

* Add Cinema Studio template browsing and generation drafts

* fix(studio): complete Cinema help translations and restore shelf heading

---------

Co-authored-by: qiqi <qiqi@qiqideMBP.lan>

* fix(i18n): remove colliding New key in sound-studio-ui so New badges render as 新 in zh-CN (#741)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* fix(studio): unify Explore cover fallbacks and action feedback (#730)

* Unify Explore cover fallbacks and action feedback

* Polish Explore template actions and section headings

* Remove provider logos from Explore model headings

* Refine Explore selection, attribution, and cover actions

* Use a neutral panel for the Explore footer

---------

Co-authored-by: open-design-crew[bot] <299007234+open-design-crew[bot]@users.noreply.github.com>

* fix(plugin): localize Codex plugin manifest and Skill catalog descriptions to English (#740)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* fix(media): tighten OpenDesign sign-in and Go-to-Plus upgrade handoff (#742)

Ensure multimodal onboarding, narrow-panel deep-linking, and post-checkout recovery work end to end across Gateway, Studio, and Skills:

- Compute the recommended openmotion_open_preview entry in media inspect settingsHandoff (agent_media_upgrade_go, agent_media_upgrade_free, agent_media_signed_out, agent_media_key_rejected) and filter rejected keys out of models discovery.
- Exclude Free/Go accounts (mediaEntitlement=not-included) from media capabilities while keeping account.available intact for text models.
- Deep-link account setup entries to provider=account so narrow (<=680px) embedded panels open directly on the OpenDesign sign-in / Upgrade to Plus guide.
- Align MCP handbook prompts, previewHandoff instructions, and openmotion-media Skill guidance with in-place OpenDesign sign-in and Upgrade to Plus, stopping agent_media_handbook from shadowing specific entries.
- Add checkout-return focus/visibility billing refresh, inline billing-unavailable retry, contextual low-balance and rejected-key handling, and a monotonic billing request guard with Go->Plus model catalogue sync.

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* Keep Design template feedback inside the detail dialog (#743)

Co-authored-by: fengcao <fengcao@Mac.lan>

* fix(studio): streamline provider hierarchy, verified media capabilities, and model editing (#760)

* fix(studio): streamline model provider detail hierarchy and catalog toolbar

Separate connection status from inline capability metadata in the provider header, compact the configured OpenDesign account callout into a balanced horizontal banner with a secondary manage action, replace cryptic icon-only sort controls with a labeled sort selector, hide redundant ungrouped headers and unfiltered count rows, deduplicate identical model titles/IDs, highlight active default models, and sort configured providers ahead of unconfigured ones.

* fix(studio): promote modality tabs and unify provider header and filter menu

Fold configured paid OpenDesign account identity, capitalized plan badge and manage action directly into the provider header instead of showing a redundant card, promote model modalities into segmented tabs with live counts above search, merge sorting under the single Filter menu with human-readable Default order, and pin active default models to the top of default order.

* fix(studio): remove redundant model filter menu, use Text modality label and unify segmented toolbar

Drop the over-granular model filter/sort dropdown in favor of modality segmented tabs and search, rename the text model modality to Text (文本 in zh-CN) without affecting General display language or editor text layers, remove the duplicate total count beside Models when tabs are visible, and pair the raised segmented control with the search field on a single aligned row.

* fix(studio): show verified media capabilities, streamline model editor and unify provider hierarchy

- Replace non-executable LLM capability/input/token-limit controls in ModelEditor with directly visible model types (when editable), structured schema-backed default parameters and collapsed raw JSON fallback.
- Hide the model edit menu on managed OpenDesign account and local Codex rows, and render verified read-only media capability hints derived from provider metadata and shared generation options (gracefully omitted when absent).
- Unify multimodal model rows to two lines with one recognizable product name on managed providers and informative inline endpoint IDs on BYOK/API providers.
- Pin and badge Official channels (OpenDesign account and OpenDesign Cloud API) together in the sidebar, sink setupRequired presets without empty Models sections, replace generic Built-in provider subtitles with accurate role/protocol labels, compact the local Agent status bar without duplicate sync/search controls, and disclose non-media protocol limits on Anthropic/Google connections.

* fix(studio): remove redundant clear-filters bar under model search

* fix(studio): define provider header badge rules for tokenGate and align byok browser selector

* fix(studio): preserve numeric/text drafts, re-check choice requires and align provider docs

---------

Co-authored-by: bone3deep1962-collab <bone3deep1962@gmail.com>

* Polish account sign-in and separate subscription settings (#761)

* Polish the OpenDesign account sign-in guide

* Separate account and subscription settings content

* Share the sign-in card across account settings

* Space the account model card heading and description

* Verify checkout return from subscription settings

* Match the OpenDesign sign-in mark to the button ink

---------

Co-authored-by: open-design-crew[bot] <299007234+open-design-crew[bot]@users.noreply.github.com>

* Polish Explore cards and workspace navigation (#744)

Refine Explore and template discovery, align workspace navigation and breadcrumbs, and localize the six 3D motion card descriptions.

* docs(media-kit): cite the Brand Kit mission line instead of a README anchor (#679)

The citable facts table supported its mission row with a README anchor.
`README.md` has no `everyone-can-be-a-creator` heading or explicit anchor, and
it no longer states that mission anywhere, so the citation pointed at a
resolving section that does not contain what the row claims. Changing the
anchor to another README section only moved the dead reference.

`packages/design-system/brand/BRANDKIT.md` states the mission directly
("Everyone can be an AI video editor. Everyone can be a creator." in English
and Chinese), which is what the row paraphrases, so the evidence column now
points there. The row text and the "product direction, not a reach guarantee"
qualifier are unchanged.

Validation: the linked file exists at that relative path from `docs/`, and
`npm run check` passes.

* docs(skills): count the three holiday sale recipes in the Library total (#678)

`docs/skills.md` said there were one hundred and one canonical Library names
and listed five named Skills plus 96 single-style recipes, which adds up to
101. The tree has held 104 since the holiday sale Skills landed:
`openmotion-sale-carousel`, `openmotion-sale-countdown` and
`openmotion-sale-promo` are all present under `library/skills/` and the same
document already describes them.

Correct the total to 104 and name the sale recipes in the enumeration, keeping
the 96 single-style recipe count that still holds (5 + 3 + 96 = 104).
Validation: `library/skills` contains 104 directories, all canonical
`openmotion-*` names; `npm run check` passes.

* docs(mcp): point the merge gate at the checks CI actually emits (#677)

The phase-one E2E section said CI produces a `phase1-package-e2e` check
context and asked maintainers to make it a required status check. No job has
that name: the test runs inside the `distribution` lane
(`ci.yml`, `node tests/phase1-package.mjs "$archive" "$PWD/.artifacts/phase1-package-e2e"`),
and the only required aggregate is `standalone`, whose `needs` list is the
seven lanes.

The same paragraph also still named a pre-parallelisation `assemble` check,
and the local-testing paragraph said the E2E task runs "all 11 tools" while
the phase-one profile has served 18 names since the Skills tools were added.

Describe the step by where it actually runs, point the branch-protection
advice at `standalone` and the lanes it aggregates, and correct the tool
count to 18. Validation: `npm run check` passes; `ci.yml` job names are
template-library, maintainability, checks, platform-reliability, studio,
distribution-browser, distribution and standalone; `shared/mcp-profiles.json`
phase1.tools has 18 entries and `tests/phase1-package.mjs` asserts that list.

* Simplify Explore cards and community actions (#766)

Refine Explore card descriptions and remove redundant labels.

Align community Skill and prompt actions while preserving their destinations.

* fix(studio): unify Explore and Studio entry routes into Image/Video/Audio editors (#778)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* Remove redundant 2K HD output entry from Image mega menu (#779)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* feat(game-studio): add Game Studio with local game service and MCP game tools (#767)

* feat(game-studio): add Game Studio tab, local game service and MCP game tools

Game Studio page with template waterfall, My games sidebar, landscape/portrait choice and
auto-open of Agent-created drafts; local game projects service with rooms, playtest,
simulate and cover capture; openmotion_game_* MCP tools; openmotion-game handbook ported
from the MIT higgsfield-ai/skills handbook; coop-3d and arcade-2d starter kits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(game-studio): register game tools, dedupe handbook provenance, fix search and code reload

Register the openmotion_game_* tools in MCP counts, onboarding scenarios and tracking
dimensions; keep them out of WebMCP. Move the shared MIT provenance note to PROVENANCE.md.
Studio search now matches localized titles, and the Code tab reloads its source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(game-studio): harden game service and fix invite copy and code fullscreen

Case-insensitive reserved paths and request-id saves; sandbox CSP for game documents;
WebSocket fragment count, time and buffer limits; AST-based determinism check;
single-player start for playtest and cover capture; atomic batch writes with rollback.
Studio: clipboard-write for embedded games and Code-tab fullscreen on the stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(game-studio): trim KayKit characters below 1 MiB for the storage policy

Keep 12 common clips per character (meshes, skin and bones unchanged) so Knight.glb and
Mage.glb stay ordinary Git files; update the character README and the 3D handbook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(game-studio): hand drafts to the user's Agent; derive the WebSocket test nonce

Drafts show "Waiting for your Agent" until the Agent sets building. The draft page offers
Copy instruction and Open in Codex (prefill only) with the full instruction: game id, brief
and steps. GET /api/games/:id/handoff returns it for any workspace draft, including drafts
created elsewhere and remixes; creation now includes the portrait layout in the instruction.
Tests derive the RFC 6455 sample nonce at runtime so release scanning stays strict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(game-studio): spin the detail status only while the Agent is building

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(game-studio): exercise all twelve game tools in the packaged MCP smoke test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(game-studio): vendor acorn so packaged builds can run the game rules sandbox

Packaged builds ship without node_modules, so openmotion_game_simulate failed with
"Cannot find module 'acorn'". Ship acorn 8.19.0 (MIT, license in the file header) under
shared/vendor and import it relatively. Verified in a node_modules-free copy of the phase1
file list: create plus reference simulation wins at tick 809.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(game-studio): resolve browser and trailer dependencies from the host runtime root

Packaged builds install npm dependencies under the data directory, so playtest, cover
capture and trailer recording failed with "Cannot find module 'puppeteer-core'" and the
trailer looked for HyperFrames in the plugin folder. Server and phase1 hosts now pass their
runtime root; puppeteer, HyperFrames checks, the trailer's Phase1Service and render queue
use it (source checkouts fall back to the plugin root). Verified in a node_modules-free
phase1 file copy: playtest, cover, simulate, publish and a trailer through ready.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(game-studio): isolate catalog entries, smoke-test solo logic and run the game suite in CI

Review follow-ups:
- The catalog skips and reports a game folder it cannot read (an orphan or malformed
  game.json) instead of failing GET /api/games; create and remix remove their folder when
  a step fails, so a partial create no longer leaves an orphan.
- Validation runs the bounded logic.js smoke check for every game with rules. Single-player
  games follow validateAction as live play does, the loop stops when the game ends, and a
  kit game missing logic.js is reported. Room checks stay multiplayer-only.
- tests/game-projects.test.ts runs in the Distribution browser lane (Chrome and native
  export cases skip themselves when unavailable) and leaves the unscheduled list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(game-studio): stabilize scrolling and animate build indicator

* fix(game-studio): validate runtime before browser discovery

Resolve the requested runtime dependencies before detecting Chrome so missing-runtime diagnostics remain deterministic on Linux. Preserve all tests and emit failed Game Studio assertions as GitHub check annotations.

* fix(game-studio): stop waiting for network silence during capture

Wait for the document load and visible canvas while retaining room, startup and runtime assertions. Add a real polling regression that reproduces the 20-second navigation timeout and verifies successful background responses during capture.

---------

Co-authored-by: zhanghuihua <zhanghuihua@huihuideMacBook-Pro.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zhanghuihua <zhanghuihua@Mac.lan>
Co-authored-by: stevenguotj <stevenguotj@stevengotjdeMBP.lan>

* feat(settings): show the lowest multimodal price beside the account plan guides (#782)

* feat(settings): lead the account plan note with the lowest multimodal price

Replace the 'Annual offer · 30% off' note beside the sign-in and Free/Go upgrade
guides with the lowest price that includes multimodal generation: Plus billed
yearly at $14/mo, and that Free and Go do not include it. Price read from
open-design.ai/pricing on 2026-11-21; Studio receives no price from Prism or AMR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(reviews): account offer screenshots for signed-out, Free and Go (mock account data)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(settings): keep only the price in the account plan note

Drop the 'Plus, billed yearly. Not in Free or Go.' detail so the note reads
just 'Multimodal from $14/mo'; the offer detail is now optional. Refresh the
signed-out, Free and Go screenshots (mock account data).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style(settings): show the plan note in the warning tone on the Free and Go guides too

Match the signed-out callout so the multimodal price reads the same on every
guide; the colour now comes from the shared design-system rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: zhanghuihua <zhanghuihua@Mac.lan>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zhanghuihua <zhanghuihua@huihuideMacBook-Pro.local>

* feat(studio): justified Generations feed, in-place unblur placeholders & unified playstyle labels (#785)

* feat(studio): justified modality-native Generations feed, in-place unblur placeholders, unified playstyle labels

* fix(studio): remove Upload button and lock Generations feed to AI-generated assets

---------

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* fix(gateway): expand and harden Local Agent model discovery across all 29 CLIs (#789)

- Add ACP discovery for Antigravity, Gemini CLI, Copilot CLI, DeepSeek Harness (with isolated temporary session patch), Hermes, Devin, Grok Build, CodeBuddy, Qoder, Reasonix, Cline and IBM Bob, plus companion binary/config fallbacks for Mistral Vibe and Amp
- Prefer ACP configOptions over legacy availableModels, support async config_option_update notifications, extract per-model reasoning levels (thought_level, thinking and _meta.reasoningEfforts), detect -32000 auth errors and delete probe sessions when supported
- Discover Codex models via fast paginated app-server model/list with debug models fallback, Claude Code via non-prompt stdio control_request initialize with alias fallback, and Pi via RPC get_available_models with --list-models fallback
- Fix CLI line, Pi table and --help choice parsers to handle tab/column layouts, carriage-return spinners, display labels and Claude [1m] suffixes, and forward --effort when advertised

* feat(scenario): add dual-mode Workflows workspace, shared Assets, and MCP write-back (#781)

* Add scenario workflows foundation, Design asset import and Wave 1 contracts

Implement the Wave 1 scenario workflow contracts, shared domain service,
Design Studio binary asset import, ZIP bundle exporter and Studio boundary
files while preserving the 22 public MCP tools:

- Shared browser-safe contracts in shared/scenarios.ts, shared/scenario-runs.ts
  and shared/scenario-content.ts covering all five scenarios, 21 scenario
  commands, starter HTML recipes, idempotent HTML image embedding, localized
  social drafting and Agent handoff builders.
- Design Studio binary asset import via DesignProjects.importBinaryFile(),
  openmotion_design_edit action=import_asset, POST /api/design/projects/:id/import-asset
  and designClient.importAsset().
- Domain service (gateway/scenario-runs.ts), ZIP bundle builder
  (gateway/scenario-bundle.ts) and HTTP download route (gateway/scenario-http.ts),
  wired under openmotion_assets_use action=scenario with tracking schema parity.
- Studio scenario client, scenarioCovers.ts, stepContract.ts and ODUI-compliant
  boundary stubs for parallel Wave 2 UI implementation.
- Node test coverage in tests/scenario-content.test.ts, tests/scenario-runs.test.ts,
  tests/scenario-bundle.test.ts and tests/design-import-asset.test.ts registered
  in .github/workflows/ci.yml.

* Implement scenario workflow step workbenches and unit tests

- Add reusable BindingSlot with pool picker, chip removal and drag-and-drop
- Implement BriefStep with dynamic brief fields, debounced autosave, revisions, downstream prompt seeding, AI influencer script editor, Gemini 4 Neon rail/availability and Black Friday discount badge
- Implement WebPageStep with starter/template/existing project creation, live viewport preview, live HTML slot targeting, single and chained Embed all, and design version previews
- Implement MediaStep (image, video, audio) and MotionPanel with scene/audio tabs, catalog model picker, offscreen-pausing video, offline provider-setup recovery with upload/workspace import, and Motion project creation/linking
- Implement SocialPackStep with offline drafting, regeneration variants, character/title limit counters, hashtags, media reordering and token-only live card previews
- Implement ExportHubStep with step overview, pool readiness checks, ZIP bundle export with persistent download card and Agent handoff actions
- Wire StepRouter with token-only opaque steps.css and add Vitest suites for all five step workbenches

* Implement scenario workflow shell, shared asset pool, and run state

Add useScenarioRun state hook with auto-resume, lazy run creation, optimistic revision conflict recovery, visibility-aware job polling, and window focus refresh. Implement ScenarioCard, ScenarioHub, ScenarioHeader, ScenarioStepper, PoolItemPreview, AssetPoolPanel, IterationHistory, StepExportMenu, ScenarioWorkspace, opaque token-only scenario.css, and Studio unit tests.

* Wire scenario workflow navigation, routing, MCP handbook, 10-locale i18n and docs

Implements Worker D integration for end-to-end scenario workflows:
- Routing & URLs: scenario/scenarios pages with category, run UUID, and step validation plus breadcrumb labels
- Top nav & Explore: Workflows split tab with 3-column mega menu, ExploreSpotlight primary workflow CTAs + 5th AI Influencer slide, ScenarioHighlights rail, CapabilityIndex Workflows column, landing cross-links, and WorkspaceFrame host wiring
- MCP handbook: scenario-workflows capability (preserving exact 22 phase-1 tool union), scenario-black-friday and design-embed-assets recipes, and setup-prefixed Black Friday handoff
- 10-locale i18n: scenario-ui.json (526 keys x 10 locales covering shared/scenarios.ts plus all scenario-shell and scenario-steps UI keys), studio-navigation-ui.json, and mcp-ui.json updates
- Docs & tests: mcp-phase1-tools.md, product architecture, scenario-workflows.md guide, openmotion-design SKILL note, and full Vitest + Node MCP test coverage

* Register scenario stylesheets in tokenGate and complete 10-locale i18n coverage

- Register scenarioNavigation.css, scenario.css and steps.css in
  studio/src/styles/tokenGate.test.ts and define the four remaining
  token-only scenario CSS classes (.om-scenario-host,
  .om-scenario-header-category, .om-scenario-step-tab-title,
  .om-scenario-history--empty).
- Add the missing 'Download started' translation across all 10 non-English
  locales in studio/src/i18n/scenario-ui.json for 100% 10-locale coverage.

* Fix Scenario Workflows Wave 3 E2E and visual findings

- Treat full content-step selection as an unfiltered export bundle so README.md and unattached uploaded pool files are included
- Auto-activate newly saved iterations in ScenarioRuns.addIteration while preserving promote for older versions
- Suppress duplicate raw error toasts on SCENARIO_CONFLICT after useScenarioRun displays the localized conflict notice
- Map raw step statuses, pool kinds, job states, and copy tone/promo code labels through localized UI keys across all 10 locales
- Restore light/dark Explore hero CTA contrast hierarchy and make the Workflows mega menu compact so the footer is visible without clipping at 1440x900
- Stack the scenario step header vertically below 767px to avoid squeezing the step title on mobile viewports

* fix(scenario): replace alarming export-hub step warning stack with calm readiness hint

* feat(scenario): replace intimidating brief form with guided fill-in-the-blanks prompt composer

* polish(scenario): auto-size inline blank pills snugly to text content

* feat(scenario): add guided page composer, filter layouts, and codify workflow UX rules

* Enhance scenario workflows with semantic step colors, icons, and unified composers

Add consistent semantic color-coding and richer icons across the scenario
workflow shell and every step workbench without removing any capability:

- ScenarioStepper & ScenarioWorkspace: add step-type color accents (brief,
  image, web-page, video, audio, social-pack, export-hub), flow connectors,
  live progress bar, tinted step header badge, Step N / M pill, and next-step
  icon cues.
- ScenarioHeader, ScenarioCard & AssetPoolPanel: color-code category pills,
  step preview chips, shared asset pool header/filter chips, and asset kind
  badges using existing packages/design-system tokens.
- MediaStep, SocialPackStep, WebPageStep, BriefStep, MotionPanel, BindingSlot
  & ExportHubStep: unify Media and Social steps into single composer cards
  matching Brief and WebPage, render official PlatformIcon glyphs for social
  channels, add colored section/slot/stat icons, and remove redundant orphan
  toolbars while preserving all generation, upload, embed, edit, compare,
  MCP handoff, and ZIP export actions.
- Update studio/src/i18n/scenario-ui.json across all 10 non-English locales.

* Refine scenario workflows layout, controls, and dual-track MCP write-back

- Refine input and Select dropdown borders across design-system adapter/application CSS and workflow steps, eliminating thick stacked outlines and clipped option borders
- Flatten nested wireframes and unify top chrome, stepper, step composers, and open canvas sections with plain consumer-product terminology and 10-locale translations
- Add desktop drag-resizer, keyboard/double-click reset, persistence, and collapse/reopen toggle with auto-expand on pick for the right Shared assets sidebar
- Add StepCapabilityBar for in-step direct image/video generation alongside run-bound MCP write-back prompts and window focus/visibility sync across creation steps
- Consolidate workflow export actions into the header and Shared assets sidebar and fix backend text-ref type narrowing in scenario bundle generation

* feat(scenario): add dual-mode Agent mode, preview stage, draft history, and polish UX

Add Step-by-step and Agent mode workspace views with grouped Skills pipeline, concise MCP prompt generation, visual preview stage, draft history dialog, selective Assets import/export, 10-locale i18n coverage, and tokenGate CSS fixes.

* fix(i18n): remove duplicate base-dictionary overrides from scenario-ui.json

Drop duplicate '{count} selected' and 'Copied. Paste into your Agent.' entries from scenario-ui.json so ProjectArchives and TemplateLibraryDialog retain their canonical translations.

* feat(scenario): add stage preview artwork, refine Agent Teams UX and disclosure styling

* fix(scenario): address PR #781 review feedback across steps, templates, HTML embed and side-effect mutations

---------

Co-authored-by: pftom <pftom@pftomdeMacBook-Pro.local>

* fix(studio): deduplicate mega-menu features, add Expand image, and complete 10-locale translations (#791)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* Share one OpenDesign sign-in across all workspaces on a computer (#787)

* Share one OpenDesign sign-in across all workspaces on a computer

Each data directory used to keep its own connector credentials, so a Studio
opened on its own and an Agent host started with another MOTION_DATA_DIR,
installation or channel signed in separately. The account (credentials,
session, model catalogue and private connector) now lives in one per-user
directory; MOTION_ACCOUNT_DIR overrides it and temporary workspaces stay
isolated. An existing workspace sign-in moves there once. Cached plan and
catalogue are tied to the key and session they were read for, and the shared
connector installation runs npm once under a process lock.

* Keep connectors per workspace and never resurrect a signed-out account

Connector versions differ between channels, so each workspace keeps its own
runtime and a workspace signed in through the shared account prepares it on
first use. A legacy sign-in moves only into a shared directory that has never
held an account, under a process lock, and the same directory reached through
another spelling is recognised by device and inode. Temporary-directory checks
resolve Windows short names, and a catalogue read for an older session is not
written over a newer one.

* Bring along a workspace sign-in made after the shared account's last change

A shared directory that was signed out earlier no longer discards a newer
sign-in another workspace made with an earlier release; only sign-ins older
than the shared directory's last sign-in, cancel or sign-out are dropped.

* Make legacy account migration atomic, align storage docs, and avoid personal paths in tests

- Stage legacy account files to temporary paths with 0600 permissions before renaming them into the shared directory, rolling back any committed file on failure so the workspace keeps its only copy and no shared marker is left behind.
- Add regression tests covering copy failures on both empty shared directories and directories with an existing sign-out marker.
- Replace personal-path-shaped strings in sharedAccountDirectory tests with synthetic paths to satisfy the release source privacy scan.
- Update model-gateway, provider-settings, architecture and account skill docs to separate workspace-local account/runtime from the per-user account directory.

* feat(studio): Image 4K Upscale hero tile, Video Omni reference cleanup, and streamlined Generations header (#793)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* feat(studio): match image and video features by model capabilities instead of ID allowlists (#796)

* feat(studio): match image and video features by model capabilities instead of ID allowlists

* test: fold model-capabilities tests into scheduled generation-options suite

---------

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* fix(i18n): align zh-CN image & video playstyle terminology with mainstream usage (#798)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* [OPEND-5572] feat(sound-studio): redesign waveforms, live playback flow, voice cards and audio track library (#794)

* feat(sound-studio): redesign waveforms, live playback flow, voice cards and audio track library

- Extract real 128-bucket PCM audio waveforms with noise gating and smoothing on probe and playback decode
- Redesign Sound Studio waveforms into pixel-crisp 1:1 SVG bars with generous horizontal breathing room, pointer-capture drag scrubbing, monochrome played progress, accent needle, and 60/120fps direct-DOM living playback flow
- Redesign Speech voice selector into clean typographic studio cards with authentic localized timbre traits, isolated inline auditioning, balanced featured grids for large catalogs, and single-column layout for single-voice models
- Refine Audio track library filtering, server-side audioKind queries, voice metadata display, overflow actions, and bottom player dock polish across dark and light themes

* fix(sound-studio): preserve cross-tab starter drafts and persist resolved audioKind

- Route Music, SFX, and Speech starter Use actions through selectSoundTab/reuseInScene with the target draft and resolved SFX model parameters so draftKey transitions never drop prompts or SFX settings
- Persist resolved audioKind on audio AssetVersion records during generation (using model id, mode, modelId, and label) and uploads, keeping id-only inference as legacy fallback across gateway filtering and Sound Studio UI
- Add regression tests covering cross-tab starter handoff and opaque model ID audioKind classification

* fix(sound-studio): split structured vs advanced JSON params on draftKey transitions

- Split persisted or cross-tab draft.parameters via parameterDraftFromParams using the model's structured generationOptions fields so schema-less BYOK raw JSON keys stay in advanced and never leak into ParameterDraft.values
- Seed parameterDrafts once per draftKey transition rather than on local SoundComposer handleParamChange updates
- Add regression test verifying editing and clearing raw JSON on a schema-less BYOK audio model

---------

Co-authored-by: bone3deep1962-collab <bone3deep1962@gmail.com>

* feat(studio): align image & video playstyle naming across EN and all 10 locales (#801)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* Polish image editor controls and creation guides (#795)

* Polish image editor controls and creation guides

* Center the relight guide artwork and refine its title

---------

Co-authored-by: fengcao <fengcao@fengcaodeMacBook-Pro.local>
Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* feat(studio): guide users from coming soon surfaces

Merge PR #803 after all CI checks passed and review threads were resolved.

* fix(studio): polish image/video forms, multi-shot defaults, workflow badge and mega-menu transitions (#806)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* fix(i18n): complete 9-locale studio navigation translations, prune superseded keys and guard against overrides (#809)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* perf(studio): decouple main shell from parser barrel and settings center (#805)

* perf(studio): decouple main shell from parser barrel and settings center

Extract three tiny helper modules so the Studio entry shell no longer
pulls @hyperframes/parsers (and its AST/HTML parser dependency tree) or
SettingsCenter through incidental imports:

- Move escapeRegex from utils/sourcePatcher.ts to utils/regex.ts and
  update WorkspaceSearch.tsx (preserving re-export in sourcePatcher.ts)
- Move getHistoryShortcutLabel from utils/studioHelpers.ts to
  utils/historyShortcuts.ts and update TimelineHistoryButtons.tsx
  (preserving re-export in studioHelpers.ts)
- Move settingsCenterSections and settingsSectionLabel from
  motion/SettingsCenter.tsx to motion/settingsMeta.ts and update
  WorkspaceBreadcrumb.tsx
- Add studio/src/shellBoundary.test.ts to guard main.tsx and
  WorkspaceBreadcrumb.tsx against static dependency regressions

Verified with studio build: removes all @babel/parser, recast, esprima,
acorn, cssomnom, linkedom, and @hyperframes/parsers barrel modules from
the entry index chunk (-1,176 kB raw / -319 kB gzip) while moving them
back into the lazy-loaded App editor chunk with zero behavior change.

* test(studio): parse shell boundary imports with TypeScript AST and resolve .js swaps

Address review feedback on studio/src/shellBoundary.test.ts:
- Replace the regex import scanner with TypeScript AST parsing via
  ts.createSourceFile so side-effect imports (e.g. import "pkg") are
  never swallowed by subsequent statements while type-only imports and
  exports are still ignored accurately
- Resolve bundler .js/.jsx/.mjs/.cjs relative specifiers to their
  backing .ts/.tsx/.mts/.cts modules when the exact path does not exist
- Add regression assertions covering side-effect imports, inline
  type-only specifiers, and .js -> .ts/.tsx resolution

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* fix(skills): preserve template compositions under dense briefs and partial previews (#815)

* fix(skills): preserve template compositions under dense briefs and partial previews

* refactor(skills): decouple single-owner edit/source rules and multimodal adaptation

* docs(skill): align bottom adaptation link with conditional read scope

* fix(prompts): restore zh-CN delivery suffix matched by catalog test

* docs(skills): list template/adaptation in same-source section table

---------

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* feat(studio): unify image/video studio layout, creation hero, provider picker and default quality (#816)

Co-authored-by: Awek-015 <zhouhaoran@refly.ai>

* feat(studio): extract workspace route registry and lazy-load all studio pages (#811)

* feat(studio): extract workspace route registry and lazy-load all studio pages

Phase 2 of the progressive Studio routing and lazy-loading refactor:
decouples route registration and page surface rendering from WorkspaceFrame
while preserving existing query URLs and KeepAlive behavior.

- Add studio/src/router/lazyPages.ts wrapping all 17 workspace pages and
  overlays with lazyWithChunkReload (plus LAZY_PAGE_MODULE_PATHS and a
  test preload helper)
- Add studio/src/router/routeRegistry.ts centralizing route metadata,
  keepAlive policy (editor/explore/assets), tracking pages, and arrivals
- Add studio/src/router/RouteViewport.tsx and OverlayLayer.tsx with
  Suspense + SettingsSurfaceBoundary isolation, and slim WorkspaceFrame.tsx
  down into a pure App Shell
- Pin base: '/' in studio/vite.config.ts for nested route readiness
- Strengthen studio/src/shellBoundary.test.ts with positive traversal
  controls (from #805 review follow-up), lazy-page static import guards,
  and routeRegistry unit coverage
- Document routing boundaries in docs/routing.md and align AGENTS.md,
  CLAUDE.md, CONTRIBUTING.md, CONTRIBUTING.zh-CN.md, and docs/README.md

Build impact (npm run build:studio):
- Entry index-*.js: 8,558.83 kB -> 7,237.40 kB (-1,321.43 kB / -15.4%)
- Entry index-*.js gzip: 2,650.91 kB -> 2,242.38 kB (-408.53 kB / -15.4%)
- Cumulative vs pre-Phase-1 main: -2,497.49 kB raw (-25.7%)

* fix(studio): eliminate lazy route transition flashes and missing shared CSS

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* perf(studio): lazy-load i18n dictionaries by locale and add governance checks (#820)

* perf(studio): lazy-load i18n dictionaries by locale and add governance checks

* fix(studio): emit numeric delta hashes for i18n keys to avoid gitleaks false positives

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* feat(studio): integrate React Router Data Router, KeepAliveOutlet, useBlocker guard, and SPA route fallback (#821)

* feat(studio): integrate React Router Data Router, KeepAliveOutlet, useBlocker guard, and SPA route fallback

* fix(studio): map SPA pathnames, await router navigation commits, localize blocker error, and schedule spa-routes CI

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* feat(studio): add LegacyQueryRedirect and migrate standalone routes to semantic paths (Phase 4a) (#825)

* feat(studio): add LegacyQueryRedirect and migrate standalone routes to semantic paths (Phase 4a)

* chore: ensure PR CI

* fix(studio): guard semantic standalone paths against retained-session artifact redirect

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>
Co-authored-by: open-design-crew[bot] <4197780+open-design-crew[bot]@users.noreply.github.com>

* feat(studio): migrate creative studios domain routes to semantic paths (Phase 4b) (#826)

* feat(studio): migrate creative studios domain routes to semantic paths (Phase 4b)

* fix(studio): make ScenarioHub scrollable inside .om-explore-host

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* feat(studio): migrate core workspace routes and shared URL contracts to semantic paths (Phase 4c) (#829)

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* chore(studio): add routing CI boundary gates, finalize docs, and align browser E2E scripts (Phase 5) (#830)

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* fix(studio): fix Game Studio trailer editor URL and /editor/:projectId fallback sync (#834)

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* fix(http): use one sanitised rule for download disposition headers (#623)

Download responses built the header in five places. Studio's render download and the shared studio host stripped quotes and non-ASCII from the plain parameter, but the diagnostics, integration-guide, asset, brand-kit and project-archive downloads did not, and the two sanitised sites disagreed on the delimiter set: one escaped ! alongside '()* and the other did not.

Node rejects CRLF with ERR_INVALID_CHAR, so this was never response splitting, but a bare quote passed straight through into a header value. Add shared/http-header.ts with the reasoning and route every site through it, including the render download, which keeps its portable OpenMotion<extension> plain name through the helper's override.

The override is sanitised inside the helper, so passing a plain name explicitly cannot bypass the rule. RFC 5987 attr-char technically allows !, and the shared encoder escapes the whole delimiter set anyway: percent-encoding an allowed character stays valid, and one predictable rule is easier to trust than a per-site choice.

Two sites still built their own header when this change first landed: the scenario bundle download ran a second sanitizer over the plain name and the Design Studio project download interpolated the raw name with only quotes removed. Both now use attachmentDisposition, with the scenario caller defaulting its name first, so no download response keeps a private rule that can drift from the shared one.

Covered by a unit test for the sanitiser and encoder, including an explicit override and the attr-char rationale, and by the server suite. The scenario bundle, scenario run, design project and archive suites run in CI; locally they need FFmpeg, symlink privileges and the refreshed dependency tree this checkout does not carry.

Validation:
- node --experimental-strip-types --test tests/server.test.ts
- npm run check
- node --test tests/ci-scope.test.mjs

* docs(mcp): name the public media tool and correct the caching it describes (#680)

The provider documentation still named `openmotion_asset_models`, a tool that is
not part of the public contract. It also described the `models` read as returning
cached advisory hints, which it does not: `gateway/media-use.ts` returns only
providers, catalogues and the setup flag from that branch, while the
`mediaEntitlement`, plan and balance hints come from `action=inspect`.

Both sentences now name `openmotion_media_use(action=models)` and say what it
does: it reads the provider model catalogue without refreshing billing or
exposing balances, with `refresh=true` refreshing that catalogue. The advisory
hints stay attributed to ordinary gateway status and `action=inspect`.

Validation:
- npm run check
- no `openmotion_asset_models` reference remains in the two files

* fix(tracking): join feedback events with an opaque minted id (#674)

The feedback card asks the user to rate a render, and the four feedback events
could not be joined to the render that prompted them: `studioUsageProperties`
copies only the keys the event registry declares, and none of them declared an
identifier.

The first attempt registered `render_id: 'uuid'` and forwarded `job.id`. That
value is the server render job id, shaped `<project>_2026-11-10_10-00-00`, so
the `uuid` rule rejected every real value and the join stayed broken while the
test passed on a synthetic id. That id also embeds the project id and a
timestamp, which the tracking contract deliberately keeps in the browser, so
widening the rule to `code` was not an option.

`requestStudioFeedback` now mints an opaque uuid for each prompt and forwards
that, so `shown`, `dismissed`, `interview_click` and `feedback` for one render
share a join key that carries nothing about the project. `useRenderQueue` no
longer passes the server job id, the trigger ignores a caller-supplied id, and
`tracking/README.md` describes the retained value as a browser-minted
identifier rather than a render-job id.

Validation:
- `npx vitest run --config studio/vitest.config.ts studio/src/components/feedback/feedbackTrigger.test.ts`
  passes, including a new case asserting a caller-supplied job id is replaced.
- `tests/studio-tracking.test.ts` keeps the four-event uuid assertion green and
  adds the negative case that a `<project>_<timestamp>` id is dropped, which is
  why the rule stays `uuid`.
- `npm run typecheck:studio` and `npm run check` pass.

One pre-existing failure remains in `tests/studio-tracking.test.ts` on Windows
and is unrelated: the audio producer scan matches
`file.endsWith('/audioFxTelemetry.ts')` while the glob returns backslash
separators, so the `audio_fx_*` events are never collected. A clean checkout
gives the same six passing and one failing.

* fix(transcript): drop WebVTT cue tags when importing subtitles (#692)

* fix(transcript): drop WebVTT cue tags when importing subtitles

Importing a WebVTT file with voice, style or karaoke tags printed the tags
as caption text, e.g. "<v Alice>Hello <i>there</i></v>". Cue span tags are
markup in WebVTT, so they are removed before the character references are
read. SRT stays plain text.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(transcript): strip only WebVTT's own cue tags and skip tag-only cues

Review follow-up: a cue that held nothing but tags made the whole import
fail, and any "<...>" span was removed, including literal text such as
"price < 10 and size > 5".

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix…

* ci(security): bind cloud-test promote job to orbit-cloud-test environment (#868)

* ci(security): add CODEOWNERS for workflows, deploy definitions, release scripts, and lockfiles (#869)

* fix(studio): restore timeline composition filmstrips under preview origin isolation (#892)

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* feat(studio): add visual feedback when applying example prompts (#896)

* feat(studio): add visual feedback when applying example prompts

* fix(studio): consume pending prompt feedback on initial composer mount

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* [OPEND-5496] Refresh cloud version history from project events (#897)

* fix(cloud): notify history subscribers when a version is pinned

* fix(studio): refresh open history from project events

* fix(studio): acknowledge event streams after subscriptions are ready

* fix(infra): await the shared Redis subscription acknowledgement

* fix(studio): use project events for cloud-backed Vite sessions

* fix(studio): read history once during development mount replay

---------

Co-authored-by: lefarcen <935902669@qq.com>

* Scope animation reads to compositions changed by canvas saves (#887)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Decouple peer timeline updates from preview rendering (#900)

* Decouple peer timeline edits from preview rendering and rebind verified timing changes

* Keep timeline identities independent of preview write capabilities

* Reuse the active peer source read for its composition poster

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Save and synchronize versioned project text patches (#894)

* feat(cloud): save and synchronize versioned project text patches

* fix(cloud): preserve authored markup and pin paged project file reads

* fix(cloud): group continuous edits and batch version reference updates

* fix(studio): preserve active source IME input across save receipts

* Keep source baselines and text drafts recoverable after save failures

---------

Co-authored-by: lefarcen <935902669@qq.com>

* fix(studio): distinguish discarded patches from unsaved drafts (#903)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Bound catalog overlay duration at the drop position (#904)

* fix(studio): bound undated catalog overlays at the drop position

* fix(studio): honor the editable clip minimum for short overlay tails

---------

Co-authored-by: lefarcen <935902669@qq.com>

* Show split clips from edit-core before the save completes (#907)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Keep verified canvas edits in the mounted preview (#905)

* Update verified canvas presentation edits in place

* Keep the first drag of a static canvas element in place

---------

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Keep the visible preview when peers edit unrelated HTML (#906)

* Scope peer preview refresh to the compiled HTML dependencies

* Retain preview dependencies across verified in-place edits

---------

Co-authored-by: lefarcen <935902669@qq.com>

* Recognize a reaped process during Linux cancellation checks (#909)

Co-authored-by: lefarcen <935902669@qq.com>

* Paint isolated inspector styles before cloud persistence completes (#908)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Show confirmed peer styles while scripted previews rebuild (#910)

* Show confirmed peer styles while scripted previews rebuild

* Recognize compiler-stamped identities on the first scripted edit

* Reuse the first poster read for scripted peer feedback

* Load the compiler ID helper only on an initial scripted peer edit

---------

Co-authored-by: lefarcen <935902669@qq.com>

* Share authored source reads among composition posters (#912)

Co-authored-by: lefarcen <935902669@qq.com>

* Accept proxy-weakened ETags when reading a versioned source (#914)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Make a catalog drop one undoable project edit (#911)

* [OPEND-5496] Commit catalog placement and dependencies as one edit

* [OPEND-5496] Localize the atomic placement example in all Studio locales

* [OPEND-5496] Preserve overlay placement for pristine preinstalled components

---------

Co-authored-by: lefarcen <935902669@qq.com>

* Warm timeline editing commands after the project becomes interactive (#915)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Capture timeline thumbnails inside each clip (#913)

* Sample selector filmstrips inside their visible clips

* Key selector filmstrips by their settled time window

---------

Co-authored-by: lefarcen <935902669@qq.com>

* Reuse confirmed local edits for composition posters (#916)

Co-authored-by: lefarcen <935902669@qq.com>

* Keep static preview scope for numeric CSS colors (#917)

Co-authored-by: lefarcen <935902669@qq.com>

* fix(ci): retry transient Orbit publication failures (#902)

Co-authored-by: lefarcen <935902669@qq.com>

* Preserve canvas selection while its source version is pending (#918)

Co-authored-by: lefarcen <935902669@qq.com>

* Correlate unavailable AMR identity checks with classified diagnostics (#919)

Co-authored-by: lefarcen <935902669@qq.com>

* Project canvas selection bounds through the live preview viewport (#920)

Co-authored-by: lefarcen <935902669@qq.com>

* perf(cloud): slim Explore initial bundle and optimize preview data plane (#898)

* perf(cloud): slim Explore initial bundle and optimize preview data plane

Reduce Explore initial load weight and cloud preview DB/cache overhead:

- Decouple main.tsx shell from editor-only MotionStudioHost, playerStore,
  thumbnailPageLifecycle, @hyperframes/* runtime imports, and idle @mcp-b/global
  polyfill loading; keep full MotionEditorHost inside the lazy editor chunk.
- Split Shell/Explore CSS from Editor CSS (components.css -> shellPrimitives.css,
  design-system studio-shell.css / studio-editor.css, lazy skills.css & assets.css).
- Compress Studio UI fonts to WOFF2 (Albert Sans & IBM Plex Mono) while retaining
  TTF compatibility for welcome template packaging.
- Bundle the 13 Explore/Showcase WebP posters into same-origin /editor-assets,
  add fetchPriority="high" to eager hero images, and cache archived preview MP4
  blobs in useSkillPreview.
- Combine ProjectFilesService.getFile into a single LEFT JOIN query and add
  0-query presignResolvedFileGet + hasFile, cutting preview binary asset lookups
  from 6 PG queries to 1 (workspace) or 2 (catalog).
- Switch preview HTML responses to Cache-Control: private, no-cache (retaining
  no-store on 404/500/503), inject preconnect hints + ETag/304 into SPA index.html,
  and enable public CDN caching (public, max-age=300, s-maxage=300; Vary: Origin)
  for public template catalog assets.

* test(cloud): use synthetic preview origin in SPA preconnect test

* fix(studio): restore direct StudioApp lazy export and address review feedback

* fix(studio): mount lazy MotionEditorHost from ArtifactViewer to keep App.tsx Node-safe

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* [OPEND-5496] Preserve consecutive canvas gestures during save (#921)

* Keep successive canvas drags responsive while their saves settle

* Keep gesture save imports independent of viewport geometry

---------

Co-authored-by: lefarcen <935902669@qq.com>

* Serve preview bridge bytes from a verified immutable filename (#923)

Co-authored-by: lefarcen <935902669@qq.com>

* [OPEND-5496] Keep Welcome canvas and audio moves in the mounted preview (#922)

* Bind approved position updates to the active preview document

* Verify author-declared preview updates against the loaded scripts

* Apply confirmed audio moves to the current preview document

* Confirm complete source deltas for supported live edits on both clients

* Use the actual queued file revision when rebinding media timing

* Reject delayed clip lists from before an in-place timing edit

* Exercise consecutive scripted layout edits and bounded media rebinding

* Preserve immediate peer styles while an unverified edit rebuilds

---------

Co-authored-by: lefarcen <935902669@qq.com>

* perf(studio): accelerate isolated timeline composition filmstrip capture (#901)

* perf(studio): accelerate isolated timeline composition filmstrip capture

* fix(studio): fall back to projectRevision for scripted compositions and subscribe to cache revision updates

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* fix(studio): keep the untouched frame boundary when trimming (#927)

Co-authored-by: lefarcen <935902669@qq.com>

* feat(cloud): gate Phase 2 Studio surfaces and exclude game assets from Docker images (#890)

* feat(cloud): gate Phase 2 Studio surfaces and exclude game assets from Docker images

* test(studio): update cloud CaptionsPanel SRT import test for hidden Auto captions tab

* docs(cloud): align architecture matrix and MCP FAQ with Cloud P1 feature gates

* fix(studio): hide Auto captions in TimelineCaptionsMenu when Cloud P1 ASR is disabled

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>

* fix(cloud): harden OAuth refresh reuse, agent project visibility and console URL (#924)

* fix(cloud): revoke a connection when a rotated refresh token is replayed

A refresh token presented again after rotation means one copy leaked, and
the server cannot tell the attacker from the client (RFC 9700 4.14.2).
Replaying a rotated, unexpired refresh token now revokes every live token
of that user and client, so a thief who rotated first loses access too.
Project grants are kept; the user only reauthorizes the client.

Only rotation counts: explicit revocation (RFC 7009 revoke and disconnect)
now also clears the row's refresh hash, so a stale token from before a
disconnect cannot revoke the user's new connection. Replays within 30
seconds of the rotation (concurrent refreshes losing the race) still only
fail with invalid_grant and leave the winner's pair valid.

* fix(cloud): make the OpenDesign console URL configurable

The account summary always returned the production console, so test
environments sent plan and billing links to production. Add
OPENDESIGN_CONSOLE_URL (default unchanged) and wire it through the
configmap, API deployment, compose file and env example.

* fix(cloud): hide ungranted projects and their sessions from OAuth agents

Project grants blocked reads and writes, but OAuth agents could still list
ungranted project titles and IDs through the workspace catalog (MCP
openmotion_get_project, REST /motion-api/projects and /motion-api/sessions)
and read a session's conversation through /motion-api/sessions/:id.

For OAuth agents:
- The catalog keeps only granted projects and sessions holding one of
  them; active project and artifact fall back to a granted one.
- Session detail filters artifacts; sessions whose projects are all
  ungranted return SESSION_NOT_FOUND for detail, rename, open and message
  append, and cannot receive a new (auto-granted) project or template
  clone, which would otherwise expose their conversation.
- Opening a session never picks an ungranted project for the agent; one
  the agent names explicitly still fails with PROJECT_GRANT_REQUIRED.
- Sessions without projects stay addressable by ID so agents can create a
  session and then add an artifact.

Browser sessions and PATs are unchanged.

---------

Co-authored-by: heggria <bshengtao@gmail.com>

* [OPEND-5496] Paint only the latest confirmed timeline timing (#929)

Co-authored-by: lefarcen <935902669@qq.com>

---------

Co-authored-by: mrcfps <mrc@powerformer.com>
Co-authored-by: open-design-crew[bot] <299007234+open-design-crew[bot]@users.noreply.github.com>
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
Co-authored-by: lefarcen <935902669@qq.com>
Co-authored-by: heggria <bshengtao@gmail.com>
Co-authored-by: open-design-crew[bot] <4197780+open-design-crew[bot]@users.noreply.github.com>
Co-authored-by: fengcao <fengcao@Mac.lan>
Co-authored-by: fengcao <fengcao@fengcaodeMacBook-Pro.local>
Co-authored-by: MasonJJ <jinmeihong@refly.ai>
Co-authored-by: bone3deep1962-collab <bone3deep1962@gmail.com>
Co-authored-by: huihui-crypto <huihuazhanghuihua@gmail.com>
Co-authored-by: zhanghuihua <zhanghuihua@huihuideMacBook-Pro.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Q-baobao <62229240+Q-baobao@users.noreply.github.com>
Co-authored-by: Q-baobao <Q-baobao@users.noreply.github.com>
Co-authored-by: 范桢 <fanzhen@refly.ai>
Co-authored-by: zhanghuihua <zhanghuihua@Mac.lan>
Co-authored-by: Guotongjia <guotongjia@refly.ai>
Co-authored-by: Ray Xi <2667192167@qq.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Haoran Zhou <81698998+Awek-015@users.noreply.github.com>
Co-authored-by: Awek-015 <zhouhaoran@refly.ai>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: hazel-ye <80680199+hazel-ye@users.noreply.github.com>
Co-authored-by: qiqi <qiqi@qiqideMBP.lan>
Co-authored-by: fengcao-op <z201117024@163.com>
Co-authored-by: Dery Ferdika <114888155+DeryFerd@users.noreply.github.com>
Co-authored-by: stevenguotj <stevenguotj@stevengotjdeMBP.lan>
Co-authored-by: Tom Huang <1043269994@qq.com>
Co-authored-by: pftom <pftom@pftomdeMacBook-Pro.local>
Co-authored-by: HEOJUNFO <100739943+HEOJUNFO@users.noreply.github.com>
Co-authored-by: stevenguotj <stevenguotj@users.noreply.github.com>
2026-11-24 12:53:20 +08:00
..

OpenMotion tracking

Catalog guide pages emit template_guide_interaction through the existing Studio transport and privacy preference. template_id always identifies the page being used, with a fresh view_id; actions are shown, edit, chapter, reference, reset, copy, open_editor, download, document and source. Document toggles include expanded; source links record intent. Download results distinguish browser_save_requested from fetch_failed, and never confirm disk persistence. Editor entry reports intent separately from its result. shown requires at least half of the preview visible for one continuous foreground second. Edits report only title or accent, never their values. Copy and editor actions report success, failure or manual fallback separately. The embedding parent pins the template identity and validates the closed event fields. This measures interaction and handoff, not user acceptance, export or reference-recreation completion. Local tests do not establish production collection.

An explicit-event package shared by the standalone MCP runtime and Motion Studio. It has no runtime dependencies. The application consumes its TypeScript sources; npm run build:tracking emits JavaScript and declarations for a local npm pack from this directory. The package remains private; this change does not publish it.

For new events, start with the integration guide and agent task template.

Reporting and user control

Reporting is on by default in every application environment and version, including stable releases, test/prerelease packages and local builds, into the existing OpenDesign project (420348). Application version and environment remain event properties; they do not disable collection. DEV packages retain their separate installation/data directories and template routing. OM events carry product=openmotion; OM reports must filter by that property, and shared-project reports must distinguish OM from other products. The project's public, write-only token and ingestion host are distributed in shared/tracking-config.json; it contains no read/admin credentials and is never included in the browser bundle. Users do not need to supply a key or opt-in flag.

Users can turn collection off in Studio's Privacy settings → Share usage data. This preference is persisted under the installation's data directory and applies to both MCP and Studio, including already-running processes and future restarts. Disabling clears pending queues and aborts in-flight delivery; accepted events cannot be recalled. A filesystem watcher propagates preference changes, and each enqueue/flush also checks the saved preference. Corrupt preference files fail closed. Re-enabling resumes collection of new events in MCP and Studio without restarting. Events discarded while disabled are not buffered or replayed.

OPENMOTION_TELEMETRY=0 (also false/off) or DO_NOT_TRACK=1 forces all collection off and locks the Studio switch. Restart services after changing launch environment variables. Browser Do Not Track suppresses browser collection. The environment override takes priority over the saved preference.

For another collector, supply both OPENMOTION_POSTHOG_HOST and OPENMOTION_POSTHOG_KEY. Partial or invalid configuration fails closed. Custom collectors default to zero-IP mode; OPENMOTION_GEOIP=1 requires that collector to discard IP after enrichment. Never supply a personal phx_ API key.

Keep the OM-only receiver transformation active while geo-enabled clients report to this shared project. Before removing it, stop OM collection or switch those clients to zero-IP mode. Do not revoke the shared OpenDesign token as an OM rollback.

Use OPENMOTION_TRACKING_ENV=test and a UUID in OPENMOTION_TRACKING_TEST_RUN_ID for isolated ingestion checks; filter these records out of product dashboards. Normal environments are production and development. Node/Vitest tests suppress collection unless explicitly given a test run ID; CI also forces collection off. No test should silently report into production funnels. Marked live-ingestion checks use env=test with any application version. Deterministic checks use fake senders and extracted stable/test/local packages without external requests.

Studio retrieves only an enabled flag and submits semantic events to the same-origin /motion-api/tracking endpoint. The server validates the complete batch, rejects identity/source/credential overrides, and adds trusted common fields before posting to PostHog /batch/. Browser Do Not Track suppresses browser collection. Network reporting is asynchronous, with a bounded timeout; local business results never wait for PostHog. A collector receipt confirms acceptance, not queryable ingestion.

Event producers and closed property schemas live together in events.ts. Studio's typed API and the service's browser-admission registry are derived from that definition; server-side validation remains mandatory. Studio configuration loading retries transient failures with bounded backoff, stays disabled until confirmed, and never treats a valid opt-out as a retryable failure. Callers can inspect local queue/configuration statuses and a content-free status snapshot; see diagnostics and retry semantics.

North-star evidence and task ledger

The runtime now records a local export task ledger before returning an accepted export request. Each export keeps its task ID, project, optional work-round ID, acceptance time, explicit deadline, terminal time and observed outcome. A worker terminal result updates the same ledger and emits task_terminal; unknown or cancelled results remain separate from success. An export whose worker vanished or whose deadline passed is reconciled once with outcome unknown, so its accepted entry also gets a terminal time and the same event; whichever caller closes the task (the worker tick or a status read) states that evidence. A tick never reconciles an export this process is still rendering, and a worker whose job was closed that way does not restate its terminal outcome. The ledger is installation-local, atomic and does not contain prompts, source content or credentials.

Host run boundaries use the existing work-round ID returned by openmotion_open_preview(action=begin). The MCP boundary emits host_run_started and host_state_changed; a host-reported visible preview with verified content emits host_preview_observed and host_run_delivered. A verified technical export can also close the same run with host_run_delivered. A failed or cancelled export emits the corresponding host terminal event. These events do not claim a run boundary when the host did not provide a work-round ID.

Video generation, editing and export conversion

work_generation_stage records started, generated, edited and exported with the same work_id, project_id and installation identity. The native work round owns the occurrence times. A deterministic event ID per work/stage deduplicates retry delivery, and work mutations use a cross-process lock.

  • started is emitted when a generation work round begins, before authoring. Export-only playback sets generation:false.
  • generated is emitted by openmotion_open_preview(action=complete_generation) immediately after the Agent produces the requested native video artifact. This action reads the current artifact, checks its version, authored content change, duration and native lint, and records completion independently of saving, preview or export. Direct filesystem authoring follows the same path.
  • edited is the first successful manual content edit or history step in Studio after generation. It is associated using the event's project and occurrence time. Project/asset renames, failed changes, Agent writes and asset-manager-only operations are excluded. The built-in project emits its fixed project identity alongside managed project UUIDs.
  • exported is the first successful export of that work. MCP uses the job's frozen work identity. Studio binds the most recent generated round of the same project when accepting a render and observes the persisted native completion in the backend, including when the tab closes. An unfinished newer generation prevents borrowing an earlier completion.

Subsequent manual adjustments remain part of the same generated work until another generation round begins. A completed export keeps its original work even when another round starts. Generation version/revision identify the original completed artifact. Existing editor-save and asset-generation events retain their own meanings.

For an observation date D in Asia/Shanghai, the daily cohort contains installations that began a generation on D-1. Each attempt has 24 hours from its start. Distinct installations with a generated artifact divide by distinct initiating installations. Distinct installations that subsequently edited the same generated work divide by generated installations. Export conversion uses that same denominator. Editing is optional for export. Weekly sets are unioned across seven start-date cohorts before division.

Historical clients and work rounds without this protocol remain unavailable. The report should show “暂无数据” for uncovered dates and mixed-coverage weeks. Empty generated denominators mean no eligible sample. Generation failures with observed starts can yield a genuine 0% generation rate. Deployment of new clients and confirmation of event collection establish the reporting coverage date.

Quality evidence is explicit. Technical export, preview visibility and recorded content review each emit check_required and check_completed with a version, checklist, checker type and bounded evidence reference. A technical export check does not assert visual or human acceptance. Queue workers emit queue_snapshot at most once per minute and worker_heartbeat with bounded counts. Confirmed correctness incidents and recovery evidence use incident_confirmed and recovery_recorded; ordinary task failures are not incidents.

Identity, properties and privacy

account_sign_in_result reports each finished OpenDesign connector attempt with source_product=openmotion, source_detail=openmotion_editor_login, and an entry_id / entry_occurred_at pair created when the editor starts sign-in. Attempts replaced within that sign-in retain the entry pair while their attempt_id changes. A new explicit sign-in creates a new entry pair. Success is reported only after the connector completes credential acceptance and the local account setup finishes; browser opening or approval alone is not success. Successful completion also reports the confirmed account ID as amr_user_id, so account counts can deduplicate across installations and join AMR account facts. Failures and cancellations omit that ID. The existing collection controls apply; distinct_id remains the installation ID, without identify/alias or person merging. Email, names, activation URLs, authorization codes and credentials are omitted. A connector_unavailable failure adds connector_problem: npm_missing (no npm was found to install the connector), install_failed (npm could not install it) or start_failed (the installed connector did not run). npm output stays local. These fields describe the local OM result; AMR handoff attribution is separate.

The account and subscription settings' Manage subscription action, and the Free / Go plan card's Upgrade to Plus action, carry od_origin=openmotion, od_entry_source=openmotion_manage_subscription, and a fresh od_entry_id / UTC od_entry_at for each click. The local service builds that page address and opens it in the system browser through a one-time account intent (/login?intentId=…) when it can. The two actions share that registered entry source; their ui_click elements (manage_subscription and view_plans) tell them apart. A dedicated upgrade source needs AMR to register it first. The page address retains billing=plan and contains no account, installation or credential data. AMR must accept the OpenMotion origin and entry source in its attribution validation before these parameters can reach its subscription/payment events.

The Black Friday banner above the application header and the header Pricing entry link to the website Pricing page (open-design.ai/[zh/]pricing/) with od_origin=openmotion, od_entry_source=openmotion_manage_subscription (the OpenMotion source AMR already accepts; an unregistered source would drop the whole attribution), a fresh od_entry_id / UTC od_entry_at per click, and utm_source=openmotion, utm_medium=banner|header, utm_campaign=black_friday_2026. The Pricing page keeps an inbound od_entry_id / od_entry_source as the first touch through checkout. OpenMotion reports surface_view (area=campaign_banner, element=banner) once per page load while the banner is shown, and ui_click for claim_offer and close_banner (area=campaign_banner) and open_pricing (area=header), each with campaign_id=black_friday_2026. The two link clicks also send entry_id, equal to that click's od_entry_id, so a click joins the Pricing visit and payment. utm_medium and the click's element tell the banner and the header entry apart; dedicated entry sources need AMR to register them first. The campaign shows from 2026-11-21 18:00 until 2026-12-05 00:00 Beijing time. Outside that window the banner is hidden, the Pricing entry has no badge, links omit utm_campaign and clicks omit campaign_id. A dismissed banner stays hidden for the rest of the visitor's local day and returns the next day.

One random installation_id UUID is persisted atomically in tracking/identity.json under each owned data directory, outside projects and versioned application caches. Different data directories remain separate installations.

Device-level analytics uses an OS-provided stable identifier: IOPlatformUUID on macOS, the 64-bit MachineGuid registry value on Windows, and machine-id on Linux. A bounded, lazy read runs only when enabled tracking sends a batch. The identifier is never persisted, logged or transmitted: HMAC-SHA256 uses it as the key with the fixed OpenMotion-specific openmotion:device:v1 namespace and platform. Only the resulting omd_ hash is sent as device_id, with device_id_source=platform. It is independent of project, data directory, app version and host. MCP, Studio and worker events on one OS device share this device hash. PostHog distinct_id continues to use the persisted installation_id, preserving each installation's historical analytics identity across upgrade. Different data directories remain separate analytics identities even when their device hash is the same. No identify/alias or person-profile migration is performed.

Unreadable, invalid or unsupported platform identifiers produce device_id=unknown and device_id_source=unavailable, never an installation UUID presented as a device. Device counts must filter device_id_source=platform and count distinct device_id, not distinct_id or person IDs. Unknown events are a separate coverage measure, not one device. Historical events without this marker used directory UUIDs in the device field; this change does not backfill them as measured devices.

Native PostHog unique-user charts and person-based funnels/retention continue to measure installations. Filtering by device source alone does not turn them into device-level analyses; those need explicit aggregation by device_id. For example:

SELECT uniqExact(properties.device_id) AS active_devices
FROM events
WHERE timestamp >= now() - INTERVAL 2 DAY
  AND properties.product = 'openmotion'
  AND properties.device_id_source = 'platform'

This measures OS-device identities, not people or immutable physical hardware. Shared machines count once, a person on two machines counts twice, cloned OS identifiers can collide, and an OS reinstall can change Windows/Linux identifiers. Device context contains no account identity, MAC address, raw platform identifier or probabilistic fingerprint. The package can initialize an identity with a validated source label. The npm installer accepts --utm-source NAME: an explicit install updates the saved source, while an upgrade without the flag preserves the existing source. The installation ID remains unchanged across both operations, and an omitted source remains null for a new installation.

Common fields include schema/product/app version, environment, entrypoint/runtime, platform/architecture, OS/version, runtime locale, device IANA timezone and UTC offset (east of UTC is positive). After OpenDesign's existing GeoIP transformation, the OM-only transformation matches product=openmotion, derives country/first-level region/geographic timezone and removes raw IP, precise GeoIP and person-location updates before storage. The transformation has both an event filter and a source-code guard; non-OM events pass through unchanged. Existing OpenDesign transformations and the project's global IP setting are unchanged. Lookup failures leave geographic fields unknown. GeoIP describes the observable network egress; VPNs/proxies can change it. Device timezone is a separate setting. Network intermediaries still see the connection address. Operators must keep the OM transformation enabled after GeoIP; it is a receiver requirement, not a guarantee enforced by a public capture token. The earlier standalone OM project's test data is retained and is not migrated or deleted. Custom zero-IP mode retains the fixed address 0.0.0.0, because a null property is replaced with the request IP. OM requests no person profiles and emits no autocapture or session replay; other OpenDesign producers retain their own settings. Upstream engine telemetry stays disabled.

Runtime and TypeScript event contracts whitelist required fields, enums, UUIDs and bounded counts. No prompts, messages, source files, URLs, local paths, titles, raw exceptions or credentials are accepted. Safe error categories are explicitly mapped. The sole bounded free-text exception is the settled template-search keyword, described below; it does not enable text on other event fields. All retries retain the original event UUID/timestamp and PostHog $insert_id. Bounded numeric rules also preserve fractional timings, playback rates and signed audio/geometry measurements; non-finite or out-of-range values are rejected.

Host Agent attribution

Every event has host_agent and host_agent_source. Known declared clients map to codex, deepseek (DeepSeek Harness/DSH), claude, cursor, opencode, gemini, workbuddy or chatgpt; another declared client maps to other. Missing evidence is unknown, never inferred from an installed executable, model provider, browser user agent or the last caller of a shared backend. mcp_client_name is included only for a bounded implementation identifier; mcp_client_version is the client's declared numeric version, not a verified host-application version. DSH currently declares its MCP adapter version.

The stdio runtime captures initialize.params.clientInfo per connection and also recognizes standard per-request io.modelcontextprotocol/clientInfo metadata. An absent declaration can fall back to OPENMOTION_HOST_AGENT, CODEX_THREAD_ID or CLAUDECODE=1 in that MCP process, labeled launch_environment. Environment values and thread IDs themselves are never reported. Client metadata is self-declared analytics context, not authenticated identity or an entitlement.

The calling context follows domain operations and is persisted on export jobs for the worker. Editor handoffs receive an opaque tracking_context query token; the local service associates it with that opener for at most 24 hours and 256 live contexts, in memory only. The browser submits the token to its same-origin collector and cannot supply host properties in an event. Repeated handoffs retain their connection's token, project navigation preserves it, and another client cannot replace an existing association. A manually opened, expired, evicted or restarted page context reports unknown. No global last-used-host attribution is used. These tokens are metadata references, not authorization credentials.

Provider-settings handoffs (openmotion_open_preview with target=providers) emit the MCP-only provider_setup_opened event on successful stdio MCP calls and append the validated entry_from parameter (agent_providers by default, or agent_media_signed_out, agent_media_upgrade_free, agent_media_upgrade_go, agent_media_balance_low, agent_media_key_rejected, agent_media_handbook) to the returned previewUrl. WebMCP/non-MCP HTTP calls neither emit provider_setup_opened nor attach entry_from to previewUrl, keeping funnel denominators and numerators aligned. Studio Settings propagates only recognized entry_from values onto Settings page_view and Settings ui_click events (including account sign-in and manage-subscription clicks) while inside Settings, and clears entry_from when navigating out of Settings (including to brand-kit, mcp, assets, skills, or the editor). Unknown entry values are rejected with INVALID_ARGUMENT on MCP calls, while Studio drops unrecognized URL entry_from values; neither side accepts prompts, account IDs or credentials.

The research sources are the supported MCP lifecycle, Codex's MCP client and DSH's client declaration.

Brand-story discovery and reuse

The opt-in brandStoriesPreview=1 template-library surface reuses the existing Studio transport, closed registry and installation-wide privacy controls. It does not add an SDK, identity, endpoint or automatic production-statistics refresh. template_series_* areas describe curated template brand series; they are distinct from the Brand Kit page's brand_* areas and catalogue IDs.

Question / signal Event and tuple Reporting unit
Was a series card seen? surface_view / template_series_card / card At least 50% visible for one uninterrupted second, visible tab, uncovered library; once per list result set and series. Returning from detail does not count it again.
Which entry opened it? ui_click / template_series_card / open_detail One activation, with a fresh series_view_id; opening need not imply a qualified prior exposure.
Did posting history appear? surface_view / template_series_detail / detail Once per series view when its native dialog is open, visible and uncovered.
Which work was inspected? surface_view / template_series_work / detail Initial selected work and each actual selected-work change; returning from an overlaid detail does not add one. It means visible selection, not video load or completed viewing.
What helped browsing and learning? ui_click / template_series_detail Intentional select_work, select_chapter, filter_option, browse_timeline, expand_learning, compare_brands, open_detail, view_repository or close_detail handlers. Same-work activation is a no-op; drag reports once on release. Hover and video progress are not formal analytics.
Was an instruction copied? ui_click / template_series_detail / start_use and existing template_instruction_copy_result One copy_attempt_id joins click and result. clipboard_written is success; manual_fallback_shown is manual recovery, failed means instruction preparation failed. Recreate-and-submit remains a distinct template_action/instruction_kind.
Was motion.md handed to the browser? ui_click / template_series_detail / download_guide and existing resource_download_result One download_attempt_id; browser_save_requested does not prove a file reached disk, fetch_failed carries only a bounded error code.

Every series signal carries an opaque, deterministic 64-bit catalogue-label hash (series_id, not a display name), result-set UUID series_list_id, entry series_placement=discovery|top100, one-based series_position, series_rank and series_work_count. Position counts template and series cards, excluding the intro; rank counts series cards only. Search, sort and filter counts capture the list at entry. A changed search/filter/sort receives its own list ID, reused on return to the same result set within one library visit. A new library visit starts new IDs. Renaming a catalogue label changes its series identity; this is not a user ID.

Discovery carries ranking_policy=works59-ctr41-v1 and ranking_snapshot=ctr-20261118-v2; TOP100 carries catalog-v1 and no popularity snapshot. These identify the shipped rule and fixed input, not a live rank service. They do not change the confirmed sampling or 10–14-template spacing.

Work signals use existing template_id with the one-based series_work_position within the opened collection’s chronology, regardless of its in-dialog purpose filter. Chapter clicks use one-based chapter_index, never chapter text/timestamps. Learning sections use adapt|habits; browse intent uses browse_method=arrow|drag and optional direction=previous|next. Purposes reuse the bounded catalogue filter_value slug. Names, titles, notes, instructions, URLs, raw errors and private materials are not sent. Authoring scenes without a series-view context do not report these actions.

Opening a work's full detail reports the ordinary detail view exactly once, with its own detail_view_id plus the same series attribution and series_surface=template_detail. It does not manufacture a template_card click. Direct timeline actions use series_surface=timeline without inventing a template detail view. Existing detail copy/download/instruction/link signals inherit the series source, including subsequent related/previous/next details until closed. Ordinary catalogue entries retain their existing fields and meaning.

For series CTR, join qualified card exposure to later open_detail by collection identity, entry and series_list_id under the agreed analysis window. Copy intent, copy result, browser download handoff and completed creation are separate stages; these events do not prove that a user sent a prompt or produced a usable video. Exclude env=test and test-run UUIDs from production analysis. The review proxy on 56820 deliberately disables collection; marked ingestion tests use a separate backend/data directory. Deterministic coverage lives in brandStoryTracking.test.ts, TemplateLibraryDialog.test.tsx, tracking.test.ts and tests/brand-story-tracking.test.ts.

Implemented signals and limits

  • All registered phase-one stdio tools: accepted start and observed finish, including early-return catalog tools, the two negotiated presentation tools, input rejection, partial import and idempotent replay.
  • Installer acquisition boundaries: installation_started is emitted when setup begins and installation_result only after registration, onboarding persistence and Skill installation complete. Both events carry the selected host_product; the result carries outcome=success. A rolled-back setup does not emit a success result. The installer accepts --utm-source; explicit installs update the saved source, untagged upgrades preserve it, and the installation ID stays stable.
  • All twenty-three page WebMCP tools: webmcp_tool_started and webmcp_tool_finished, correlated by a fresh call_id per invocation, with the public tool_name, transport=webmcp, observed outcome and bounded duration_ms. These are browser-call measurements, separate from stdio MCP events and committed business results; a replayed call is still a call. Structured error replies and thrown failures count as failed calls, even when their applied effect is uncertain. Explicit aborts count as cancelled; missing or malformed replies count as unknown. A late abort does not turn a successful reply into a cancelled operation. Arguments, results, handles, paths and raw errors are excluded. Host Agent fields retain their existing page-handoff meaning; the transport marker does not identify the calling browser agent.
  • Tool dimensions: mcp_tool_started/finished and webmcp_tool_started/finished carry allowlisted actions for assets, media discovery, preview, export request, archive and project management. Preview also has target. Missing actions mean open for preview and request for export; invalid values are omitted. A failed call can carry error_code and schema-declared invalid_field and validation_rule, with array indices collapsed and unknown keys bucketed. Both stdio asset names still use tool_name=motion_assets; WebMCP uses the original public name. Older events may omit these dimensions. To measure read, filter product=openmotion, exclude env=test, select the appropriate *_tool_finished event and action=read: count distinct call_id for observed calls, divide successful calls (outcome=success) by all observed calls for success rate, and aggregate duration_ms (e.g. median/p95) for latency. Stdio rejected inputs have accepted=false and no start event; use finished events for the denominator, or filter accepted=true explicitly when measuring accepted executions only. Each invocation, including replay, is a new call. Browser and stdio are separate transports; do not sum starts and finishes or add domain-result events to call counts. This measures observed call outcomes, not paid generation completion, human media acceptance or guaranteed billing usage.
  • For MCP exports, use export_request_result to measure submission and join its job_id to export_result for the one terminal worker record. A failed terminal job has a bounded failure_stage and error_code, including interrupted or expired jobs. Polling success means the read worked. Studio UI exports use their existing separate pipeline.
  • asset_import_result includes requested, added, reused and failed item counts when a batch result is available. asset_import_item_failure reports one count per allowlisted failure category per committed request. Sum its failed_count to break down item failures, keeping it separate from call-level outcomes.
  • WebMCP registration: webmcp_registration_result records one result per attempted tool registration (success, failure or cancelled), including validation/duplicate refusals and teardown cancellation. Use this event for registration counts; existing native/polyfill and registration-error events remain diagnostic signals. A disabled tool preference or absent modelContext makes no tool-registration attempt. The existing consent, Do Not Track, configuration retry and best-effort delivery policies apply to all three events.
  • Domain results: create/open/edit/import/restore and export request/cancel. Replayed operations do not manufacture additional domain completions. Preview returned by a tool does not imply the host opened it.
  • Worker export terminal state, after render and available technical verification; it is distinct from queue acceptance and does not assert human content acceptance.
  • Studio project readiness and load outcome, plus project-sidebar creation/switching.
  • Motion editor exports started from the Studio UI: one studio_export_request_result per start attempt (accepted or rejected with a safe code) and one studio_export_result per accepted render when that tab observes its terminal state, joined by a browser-minted export_id. These renders run in the editor's own pipeline and never reach the worker export_result, which stays MCP-only.
  • Motion editor manual edits: one studio_edit_result per committed history entry, emitted where Studio claims the entry, with a closed edit_kind and the surface the gesture started on. Coalesced claims of one entry report once. Writes dispatched by an in-page Agent tool are skipped; MCP edits never reach this path. Project rename and asset rename/delete report from their own commit points, and save failures report outcome=failure with a status class only.
  • Undo/redo outcomes, UI asset imports (counts, entry point, safe category), notices actually shown (missing FFmpeg, external file conflict, unreachable project) and editor intent clicks through ui_click with page_name=studio; theme, language and privacy-settings choices made in the settings center use area settings. ui_click.option carries the chosen value of a control with a small fixed set.
  • UI export events carry video_duration_bucket for the composition being rendered; the request event and studio_load_result carry clip_count_bucket, asset_count_bucket and composition_count_bucket. They are read from what the editor already holds in memory at that moment and report unknown otherwise: at load the timeline and file tree have usually not arrived, so the load values are mostly unknown and the export request is the reliable reading. No raw duration, count or file size is sent.
  • Explore, the top creative navigation and the creative Studios (studio/src/motion/exploreTracking.ts): one page_view per arrival on Explore (page_name=explore, with explore_community and medium), the Motion, Design and Cinema Studio template landings and the Design image, Cinema and Sound forms (page_name=creative_studio, with studio_id, scene_id and landing) and a model overview (model_overview). Filter and tab changes inside Explore are clicks, not further views. Clicks use areas creative_nav (reported with the page the navigation is shown on), explore_tabs, explore_spotlight, explore_featured, explore_feed, explore_collection, capability_index, studio_bar and model_overview. A generation submitted from a Studio form reports asset_generation_submit_result with page_name=creative_studio and the Studio, scene and model (model_provider + model_id split from the catalogue key; custom providers send neither). Other destinations are catalogue ids accepted only as slugs; prompts, example copy and model labels are never fields. The Design Studio template landing reports studio_id=design, landing=true. Category changes report studio_bar/scene_tab with scene_id and template opens report studio_bar/open_template with both scene_id and template_id. The Motion Studio banner's editor button reports studio_bar/open_editor with studio_id=motion. The Motion Studio template shelf reuses studio_bar/category_select, load_more, view_all_templates and open_template. Explore Design template cards and their Try buttons report explore_collection/open_template with their Design scenario and template IDs. The Explore banner's editor button retains explore_spotlight/slide_action for the first Motion slide. A Cinema template card uses studio_bar/try_prompt with its template_id, scene_id and zero-based position. Opening a template prepares a draft. Generation submission is counted separately.
  • Model hubs (page=model-hub): one page_view with page_name=model_hub, hub_id and signed_in once the sign-in state is known; clicks in areas hub_header, hub_hero, hub_videos, hub_video_detail and hub_availability carry hub_id, hub_video_id (catalogue id), signed_in and, for scene filters, a filter_value slug. Video titles, creators, post links and search text are never fields.
  • The template gallery shared with the website (web/template-gallery.ts, shown in the connection dialog): copy click and the actual copy result, preview open, use, category change and one search per query, through ui_click area templates and template_instruction_copy_result. template_id is the catalogue id and is accepted only as a slug; a non-matching id is omitted and the event still sent. Titles, authors and URLs are never fields. When the workspace catalogue records the template a project was created from, the same id is added to studio_load_result and both UI export events.
  • Editor events carry project_scope; project_id is sent only when the Studio project id is a UUID. The built-in local project (id project) reports project_scope=default and no id; names and titles are never sent.
  • All 78 retained Studio event names are registered in studio-events.ts and included in the same derived browser admission registry: startup/preview/render/performance, editor interaction, feedback/desktop, save/error/transaction, SDK, WebMCP status and audio FX. Existing trackEvent and trackStudioEvent callers use the OpenMotion transport. Their adapter removes private fields before queueing; upstream tokens, transports and automatic experiment enrollment remain disabled. Feature visibility and SDK gates do not change: hidden feedback, desktop and audio-FX features emit only when their existing producer actually runs.
  • Manual import/export recovery uses studio_io_action and studio_io_result, joined by one random attempt_id per intentional action. The Studio-only beginStudioIo helper reports at most one result; automatic reads and background render updates do not create actions. Import counts cover only the files selected in that attempt, and a subsequent listing failure does not turn confirmed imports into failed imports. A successful render recheck means the query succeeded, even when state_after=failed. An inaccessible file is failure/unavailable; a network result that cannot confirm availability is unknown/unknown. Opening a new window is success with delivery_status=opened; a blocked popup is failure with delivery_status=popup_blocked. Passing a download to the browser reports outcome=unknown, file_status=available and delivery_status=browser_save_requested; it does not confirm a saved file. Only fixed actions, outcomes, statuses and aggregate counts are allowed: no project/task identity, file names, paths, content or full error messages.
  • The editor's template library reports with the names of the shared OpenMotion tracking sheet, so its funnel lines up with the website's: surface_view for the library, a gallery card, a template's detail and the instruction to copy; ui_click areas template_card, template_detail, template_instruction and template_discovery; template_search_result, template_filter_result and resource_download_result. A template is identified by template_id only (a bounded slug); titles, authors and URLs are never fields. placement says how a detail was reached: catalog, related, random (Surprise me) or navigation (previous/next). detail_view_id, copy_attempt_id, download_attempt_id and search_id are random UUIDs that tie a click to its result. Recreate and Recreate-and-submit report start_use with template_action and copy that same instruction; the instruction panel has no Copy control of its own, so no separate copy click is reported. Every copy reports template_instruction_copy_result, and only clipboard_written is a successful copy. host_product names the instruction variant that was copied (the library builds the Codex one), not the client the user later pastes it into. A category or filter option is sent as a lowercase slug of the stable catalogue value and omitted when it cannot be reduced to one. template_search_result.search_keyword is the one free-text field in the registry: the settled search-box value, trimmed and capped at 100 characters, sent once per keyword 500 ms after typing stops and never per keystroke. A card impression (template_card / card) is reported once the card has been at least half visible for one unbroken second and is not covered by the detail, once per search, filter and sort combination, so click-through per card can be read. Hover, scroll depth, autoplay and video progress are not reported. These events carry no project fields yet. Library exposure records the actual dialog opening, including pending or failed catalog loads; it omits result_count because that count is not known at opening. Loading retries and locale changes do not create another opening. Instruction exposure waits until at least 1% of its text enters the viewport in a visible tab, once per detail view. Recreate and Recreate-and-submit carry the same copy_attempt_id on their start_use click and copy result; Open-and-edit has no copy attempt. library_view_id identifies an opening, discovery_id groups search and recovery activity (reset on reopening or after 30 minutes of inactivity), and result_set_id names the results for the current search, filter and sort context. A search can also settle when submitted or used, but not during IME composition. Recovery exposure requires the expanded panel to intersect a visible viewport. template_search_handoff_result tracks an instruction copy attempt with a fixed source kind and status. A manual-copy fallback remains distinct from clipboard_written. In the library, the reference entry emits surface_view with element=reference once per result set when at least half of the button is visible for one second, or when clicked sooner. Count distinct result_set_id on this view and the corresponding reference click for entry click-through. Reference source changes, opening the local file picker and copy attempts use ui_click with the fixed source_kind. A selected file produces one studio_asset_import_result with entry_point=template_reference and outcome=success|failure|unknown. Cancelling the picker produces no import result. Unknown uploads do not count as failures. Events from the home entry carry reference_entry=library_home; search recovery keeps its existing attribution. Using the home action does not emit a search. File names, paths, asset and version IDs, reference links, descriptions and contact details are excluded from these events. Copying a request does not confirm Agent execution. Template request intake is not exposed. The enhanced handoff detail reuses the same click/copy-result events rather than skipping them because its layout flag is active. Clipboard failure reports manual_fallback_shown, and editable-project preparation reports open_edit. The isolated local review entry disables collection without removing those instrumentation calls. Project/source continuation remains a separate gap.

The adapter preserves fixed actions, counts, booleans and safe catalog/control identifiers. It drops messages/stacks, file paths, selectors, composition/block names, free-text feedback, breadcrumb text and arbitrary error names. Feedback retains has_comment, rating, an opaque browser-minted identifier for the prompt and fixed question/answer categories; resolver mismatches become per-kind counts, and attempt rollups retain total attempts and distinct-operation counts without raw JSON keys. Audio parameter numbers are bounded; string parameters retain only a fixed engine-catalog value_category and value_kind=category. Custom effect/preset/parameter identifiers become other. Unknown event names are ignored. Invalid required fields prevent the event from being queued; optional invalid fields are omitted. The server still rejects unknown fields and forged common properties rather than applying this adapter.

Coverage follows the existing producers; it does not invent new product actions. Installer/integration/resource-read events, actual WebMCP tool-execution outcomes, every successful editor save/import gesture and human review/adoption results still need their own confirmed completion semantics. WebMCP status signals and save-failure/blocked signals are not those missing success/result events. Worker origin is worker; its caller's host context is persisted, while a full request-to-worker operation context is not. Pending cancellation has a cancel result but no worker completion because no worker claimed it. Editor UI coverage has known gaps: a render whose tab reloads before it finishes, or whose cancel the server never confirmed, has a request result but no terminal result; caption and beat undo stacks, keyboard playback, frame stepping and source-editor saves are not reported; edit_kind is derived from Studio's fixed history labels, so an unmapped label reports other. Turning sharing off is itself not reported, because the preference applies before the event could be sent.

The compatibility adapter bounds initialization-waiting calls at 64. The queue is process-local: 64 events, batches of 16, one in-flight request, a one-day TTL and retry backoff capped at one minute. Disabling aborts and drops pending data; shutdown drains for at most two seconds. Crashes, queue overflow, page termination or permanent collector rejection may lose events. Add durable delivery if product decisions require guaranteed counts. Public ingest tokens are not read/admin keys, but forged events and quota abuse still require collector-side rate limiting and monitoring; this package is not an anti-fraud boundary.

AI asset generation

The shared model gateway owns three worker events for Studio and MCP. Each carries modality (image, video, or audio); speech and music both use audio.

Event Emission point Additional fields
media_generation_requested A generation submission reaches the gateway with a recognized modality, before validation and routing. None
media_generation_submitted The gateway persists a new queued job. Replaying its idempotency key returns the original job. job_id
media_generation_result The gateway persists a completed, failed, cancelled or interrupted job. Interrupted workers produce a failed result. job_id, job_state, asset_count

Count distinct anonymous installations per modality and window, and distinct submitted jobs. Attribute results to the original submission date. A job succeeds when it completes with at least one saved asset. The success rate divides those jobs by all submitted jobs, including cancelled, failed and unresolved jobs at the report cutoff. Inspect, list and status calls do not enter this cohort. A local save retry can update the terminal result for the same job. Use the latest result per job at the report cutoff. It does not add a model request or submission. Count outputs saved to the workspace library or project once per output. Generation uses the existing telemetry preference and installation identity.

Studio recovery keeps request acknowledgement separate from execution outcome. An uncertain export receipt reports studio_export_request_result.outcome=unknown; a later identity-matched lookup can report one terminal result with the same browser export_id. Progress loss, cancelling and an inactive unknown record never produce a failed or cancelled terminal event. studio_asset_import_result retains its entry-point categories and reports confirmed failure, unknown and pending counts separately; unknown/pending items are not counted as failed. The manual reload_editor recovery action records only an unknown handoff outcome, not confirmed recovery.

Template detail handoff coverage

The approved detail is enabled from the normal template-library entry. The legacy templateHandoffPreview=0 compatibility switch can restore the previous detail for a session; no query parameter is needed for the new flow.

Question Event and trigger Join and deduplication
Did someone inspect related options? surface_view for template_related/related after its first eligible card impression; template_card/card for each related card At least 50% visible for one uninterrupted second in a visible tab; once per source detail and card. Related cards and clicks include source_template_id, target template_id, source detail_view_id and displayed position.
Was guidance or help used? ui_click: view_guide, back_to_template, view_full_page, handoff_help, copy_color, close_detail; surface_view template_guide/guide when the same-dialog guide opens The current template and detail-view UUID; a help opening counts once per opening, not per pointer move. Color clicks never carry a color value.
Did editable handoff resolve and open? ui_click/start_use for open_edit, followed by template_project_result on observed create, reconcile or open completion The click and results share the stable operation_id for the guarded request; fresh handoff_attempt_id per operation attempt; captured initiating detail; confirmed project UUID only.

Studio no longer emits back_to_project after removing the button. The event registry still accepts it from older Studio versions.

Create-stage success means the preparation call resolved to an exact project, including recovery of the same request; it is not a count of newly created projects. An interrupted response is unknown; an authoritative empty lookup is not_found; a failed lookup remains unknown. Opening is successful only when the project-opening callback confirms it. Retrying an existing project never emits another create result. retry_template_project, check_template_project and open_prepared_project distinguish explicit recovery intents. An opening callback is not evidence that a particular content version became visible or that the user approved it; those downstream outcomes remain separate. Editor save-guard rejection occurs before creation and reports a confirmed failure, not an uncertain server result. An authoritative empty reconciliation enables retry with the same request ID. Pending request identities are retained in bounded session storage so reopening the library checks that request before creating; completed requests are removed from the pending list. Unavailable storage cannot guarantee retention after a reload.

Existing copy semantics remain: clipboard_written is the only successful copy, and manual fallback is not success. No event claims that an external Agent received the copied instruction, created a film, or exported it. Exact copy-to-Agent-to-work provenance is not added by this change; do not infer adoption or output rates from copying. No titles, material names, instructions, color values, URLs or raw errors are admitted. Existing consent, browser admission and product=openmotion filtering remain in force. UI tests use fake senders; live readback requires env=test and an isolated test-run UUID.