The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.
TypeScript agent-skillsagentic-aiai-agentsai-videobyokclaude-codecodexdeepseek-harnessdsh-plugingenerative-ailocal-firstmcpmotionmotion-graphicsmultimodalopenmotionreverse-engineeringvideo-editingvideo-generationworkbuddy
merge: integrate current Motion base and preserve history availability
罗高d0a6c1342ac8
diff --cc docs/editor-fork.mdindex a6a29d20,359691a5..f86af06d--- a/docs/editor-fork.md+++ b/docs/editor-fork.md@@@ -6,25 -6,21 +6,25 @@@## 功能与集成边界- 原版组件负责 Compositions、Assets、Code、Catalog、Preview、Design、Layers、Renders、Variables 和 Blur。素材上传与预览、跨工程素材、画布编辑、音视频属性、关键帧、缓动、时间轴、保存、撤销与 WebMCP 沿用上游实现。布局继续由原生 Dock 管理拖动、分组、缩放、关闭、最大化和按工程持久化,不按屏宽强制合并面板。+ The Motion host now exposes an MVP editor. `StudioHost.mvpEditor` gates product entry points without deleting native editing, source, history or MCP services. The root route resolves the active project before mounting `ArtifactViewer`; home, conversation and browser-tab components are not mounted. `WorkspaceFrame` lists searchable projects, waits for pending saves before switching, and opens the project drawer on demand, including embedded views.- OpenDesign 的 `WorkspaceFrame` 放在原生 App 外,负责通用导航和会话列表;`MotionSessionFrame` 将会话与浏览器顶格并列。完整原生 App(包括工程顶栏)放在浏览器 Artifact Tab 内;原生 `AppFrame` 仅向外层注册保存与写入门禁,不再用 `EditorFrame` 组织会话。浏览器关闭、恢复不会重挂载编辑器;跨工程则等待保存并整页重建,避免复用原生全局状态。全局工具(Agent、模型设置、主题、语言)位于侧栏,导航折叠在会话顶部;无全局面包屑顶栏。工程工具包括工程名、保存、模板、历史、预览、布局和导出。会话名与工程名分开。详见 [会话与 Artifact 浏览器](project-workspace.md)。+ The visible panels are Compositions, Assets, Catalog, Preview, Design, Layers, Renders and Timeline. `Dock.Root` uses fixed positions and `motion.mvp.dock.v1` preferences; resizing dividers and restoring their sizes remain supported. Panel close/move/reset controls and layout presets are hidden. Preview alone supports temporary expansion within the editor. The allowed-panel list also rejects programmatic reopening of excluded panels.- 「预览」是常驻恢复入口:关闭后显示「打开预览」,重新打开回到两侧面板之间,时间轴回到整行底部。恢复时也会退出其他面板的最大化状态。「布局」菜单可以切换所有面板、应用代码创作/专注预览预设或恢复默认布局;这些操作直接调用同一 Dock,不建立第二套布局状态。+ The header retains rename, transient save/error status, templates, undo/redo and native export. Save status is not a history action and disappears when idle. The sidebar footer keeps theme/language. Integration/model setup, Capture, Inspector toggle, version history and preview/slideshow controls are hidden. Existing native history and Agent version APIs remain unchanged.- 「历史」与项目旁的保存状态均可打开「版本历史」面板。该面板使用原生 `/api/projects/:id/history` 列表、checkpoint、pin 和 restore;支持查看修改文件、筛选保留版本、保留当前版本和恢复历史版本。保存状态读取原生待保存队列;恢复前等待保存并 checkpoint,恢复后重新加载编辑会话。恢复本身产生一条新记录,原来的修改仍在历史中,可继续通过原生撤销/重做操作。渲染或写入冲突期间禁用版本写操作。+ The inspector retains text, font, size, color, three alignments, solid fill, opacity, geometry and Ask Agent. Advanced animation/style controls, recording, rotation, variables and blur are hidden. Opening an authored project must not remove its existing animations, gradients, effects or styles. Canvas selection, drag, resize, crop, text editing and context actions remain; canvas snapping stays enabled without guide/grid controls.- 「版本历史」Tab 是本地新增的 UI,所调用的历史、撤销/重做、保留与恢复服务来自 Hyperframes;没有另建版本数据存储。+ Timeline editing, snapping, zoom/Fit, imports, track visibility, clip clipboard/delete/split and clip/range Ask Agent remain. Generation/image replacement, advanced clip tools, lower undo/redo, keyframes, linked/ripple controls and beats are hidden; thumbnails stay enabled. Keyboard editing and native save/reload guards remain in place.- Undo/redo availability is filtered by the workspace host using history metadata and readable native blob/aside files, without loading media contents. Missing contents, pruned steps and known later file conflicts disable the matching timeline button; keyboard shortcuts do not dispatch an unavailable step. Adding media can still be undone and redone through the native aside store. Native execution retains its final validation for concurrent changes and I/O failures. This does not change history budgets, pin behavior or MCP retained-version storage.++Undo/redo availability is filtered by the workspace host using history metadata and readable native blob/aside files, without loading media contents. Missing contents, pruned steps and known later file conflicts disable the matching visible undo/redo control; keyboard shortcuts do not dispatch an unavailable step. Adding media can still be undone and redone through the native aside store. Native execution retains its final validation for concurrent changes and I/O failures. This does not change history budgets, pin behavior or MCP retained-version storage.++Hosts passing a custom `editHistory` handle to `useEditHistoryActions` must supply `canUndo` and `canRedo` from their history view, alongside the step functions. `usePersistentEditHistory` already supplies these flags.+The sidebar language menu offers English, Simplified Chinese, Japanese, Korean, German, French, Russian, Spanish, Brazilian Portuguese, Italian and Turkish. The first launch still defaults to Simplified Chinese; `motion.studio.locale` stores the preference in browser localStorage and synchronizes it between same-origin windows. Unsupported or removed preferences fall back to Chinese. `studio/src/i18n/messages.ts` owns the supported languages, English message keys, dictionaries, interpolation and locale-aware plural forms; `I18n.tsx` provides the React context and Intl date/number formatting. Missing messages fall back to the English source.- Localization covers editor labels, tooltips, placeholders, empty/error states and the embedded MCP/template dialog. The DOM fragment updates bound labels in place, preserving the selected client, searches and live media. Switching language does not remount the editor, change Dock layout, modify property values or translate authored text, project/template titles, source paths and protocol identifiers. Property sections receive English source titles and translate them only for display, so duplicate translations cannot change their internal IDs. README/Skill/installer translations, third-party template descriptions, copied Agent instructions and long connection guides are outside this interface change. New locale dictionaries include machine-translated text; automated key/placeholder checks do not replace native-speaker review.+ Localization covers editor labels, tooltips, placeholders, empty/error states and the embedded MCP/template dialog. The DOM fragment updates bound labels in place, preserving the selected client, searches and live media. Switching language does not remount the editor, change Dock layout, modify property values or translate authored text, project/template titles, source paths and protocol identifiers. Property sections receive English source titles and translate them only for display, so duplicate translations cannot change their internal IDs. README/Skill/installer translations, third-party template descriptions, copied Agent instructions and long connection guides are outside this interface change. MVP audit additions live in `mvp-zh-CN.json` and currently cover Chinese/English; the other nine locales retain English fallback for these additions, while their shared vocabulary remains intact. New locale dictionaries include machine-translated text; automated key/placeholder checks do not replace native-speaker review.- 顶栏 Export、合成列表 Render 和 Renders 面板均使用原版渲染队列,保留格式、分辨率、帧率、质量、取消、进度、历史、预览与下载。一期插件 `motion_export_request` 仍提供独立的后台快照渲染,供 Agent 使用;不会替代界面的原生导出。+ Header Export and the Renders panel continue using the native render queue, retaining MP4/MOV/WebM, resolution, frame rate, quality, cancellation, progress, render history and download. Composition-row render actions and GPU controls are hidden. 一期插件 `motion_export_request` 仍提供独立的后台快照渲染,供 Agent 使用;不会替代界面的原生导出。品牌宿主隐藏上游桌面下载推广与反馈邀约,相关上游组件仍保留在源码中。Studio 的原生暗色/浅色偏好由 `hf-studio-ui-preferences` 管理;`data-theme="paper"` 为浅色,无属性为暗色。设计系统变量映射到这一机制,不再使用第二套编辑器主题状态。diff --cc docs/product/architecture.mdindex 4c9dff80,a05d5295..fd9d679a--- a/docs/product/architecture.md+++ b/docs/product/architecture.md@@@ -151,8 -228,8 +228,8 @@@ flowchart L| 导出快照与验证 | 固定 revision、预期规格、真实 MP4、校验报告 | 证明该次导出的结果;后续编辑不能沿用旧文件的验证结论 |- **工程真源:** HTML、CSS、JS、媒体和 Studio manifest 位于各自工程目录。新会话 ID、产物 ID 和工程 ID 分离;`projects.json` 原子保存两个索引、产物归属和当前选择。旧工程按原 ID 兼容为会话,需求继续在 `sessions/<sessionId>.json`,通过会话 HTTP 接口及一期 `motion_get_project` 暴露(旧 design_get_session 为内部兼容),独立于视频内容 revision。Agent 每次写入前读取当前工程与 revision。一个原生服务进程按 projectId 分发多个工程;页面固定自己的工程,其他会话的打开操作不会替换它。工程状态请求也携带 projectId;未知工程和冲突身份拒绝处理。-- **历史真源:** Studio 原生历史服务记录版本、checkpoint、pin 与 restore,宿主只呈现 UI,不另建版本库。恢复前等待保存并创建 checkpoint,完成后重新加载编辑会话;后续历史保留,恢复操作可以撤销。+- **History authority:** Native Studio history owns file revisions, checkpoints, pins and restores; the host does not create a parallel Studio history store. The workspace host only offers undo/redo steps whose required contents are readable and whose recorded files have no known later conflict. Unavailable steps disable the matching toolbar button and do not dispatch a shortcut mutation. Native execution still validates current files before writing, since files can change after the availability check. Restores wait for pending saves and create a checkpoint before reloading the editing session; subsequent history remains available subject to native retention and content availability.- - **界面状态:** 浏览器 Tabs、左右面板与宽度按会话保存;关闭 Tab 不删除产物。原生 Dock 按工程保存,主题沿用 Studio 偏好;语言单独保存为 `motion.studio.locale`,均不写入影片源文件。+ - **UI state:** The MVP project drawer has transient open state; fixed Dock sizes persist per project under a separate key, so old free-layout preferences cannot reopen excluded panels. Theme and `motion.studio.locale` remain independent of project source files. Legacy browser preferences are retained but unused by the MVP route.- **参考数据:** 模板原始目录、封面和热度快照与用户工程分开。热度按模板 ID、视频地址和原帖身份匹配;同源片段不累加查看量。- **导出输入:** 后台任务使用不可变快照并记录期望规格;后续编辑不改变该任务的本地输入。远程媒体需要稳定复现时先导入本地。- **后台与编辑器启动:** 仅导出启动后台服务,不初始化或补写当前工程;冷启动套模板直接创建选中的模板工程。Studio starts when the Agent calls preview for an existing project, including the automatic handoff after production HTML is ready; the existing background service is reused. 健康检查区分服务 `ready` 与 `editorReady`,不靠自动替换 expectedRevision 消除冲突。