Commit Graph

2 Commits

Author SHA1 Message Date
Heggria
bccb40cc97 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.
2026-11-21 01:48:06 -08:00
VanJay
9124237a13 feat(deploy): add a local Docker Compose deployment (#577)
* feat(deploy): add a local Docker Compose deployment

Add deploy/ with a Dockerfile, a Compose file and a guide. The image is
built from the checkout and carries Node.js 26.11.1, Chromium,
FFmpeg/ffprobe and CJK fonts. Projects and exports live in a named
volume at MOTION_DATA_DIR=/data.

Add MOTION_BIND_HOST so the server can listen on an address other than
loopback. The default stays 127.0.0.1. The image sets 0.0.0.0 and
Compose publishes the port on the host's 127.0.0.1 only. The Host and
Origin checks in handler() are unchanged, so this adds no remote access.

Agents connect with `docker exec -i openmotion node
--experimental-strip-types mcp.ts`, which reuses the running service.

Known limit: the Studio's web browser tab cannot start Chromium with its
sandbox in an unprivileged container. Preview and export are unaffected.

* docs(deploy): record the x86_64 container validation

* fix(deploy): accept only loopback or wildcard bind addresses

MOTION_BIND_HOST accepted any IP address. With a specific interface
address the readiness probe and the URLs returned to Agents still used
127.0.0.1, so startup timed out and handoffs pointed at an address
nothing listened on. Accept 127.0.0.1, 0.0.0.0 and :: only.

Correct the access description in the deployment guide and the change
record: publishing the port on the host's loopback address is the
boundary. The Host and Origin checks protect a local browser from other
websites and are not authentication.

* fix(deploy): keep MCP connection commands inside the Docker workspace

* fix(deploy): preserve primary Skill onboarding for Docker connections

* fix(deploy): accept Docker discovery in Studio connection consumers

* test(studio): isolate page cleanup from tracking retries

---------

Co-authored-by: lefarcen <935902669@qq.com>
2026-11-18 17:54:27 +08:00