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
Align ZIP validation workflows with the OpenMotion package layout
bone3deep1962-collabaf755bcdd7f8
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 9e0d6abe..5df64a46 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -146,7 +146,7 @@ jobs:- name: Build phase-one ZIP and exercise all public toolsrun: |npm run package:phase1- archive="$PWD/dist/motion-$(node -p "require('./package.json').version")-phase1.zip"+ archive="$PWD/dist/openmotion-$(node -p "require('./package.json').version")-phase1.zip"node tests/phase1-package.mjs "$archive" "$PWD/.artifacts/phase1-package-e2e"- name: Build immutable standalone artifactsenv:diff --git a/.github/workflows/motion-candidate.yml b/.github/workflows/motion-candidate.ymlindex eeead8c9..cf8a23f0 100644--- a/.github/workflows/motion-candidate.yml+++ b/.github/workflows/motion-candidate.yml@@ -108,7 +108,7 @@ jobs:node --experimental-strip-types --test tests/tracking.test.ts tests/install.test.ts tests/npm-installer.test.ts tests/native-runtime.test.ts tests/npm-package.test.ts tests/test-package.test.ts tests/source-install.test.ts tests/bootstrap.test.ts tests/mcp-registry.test.ts tests/mcp-runtime.test.ts tests/mcp-upgrade.test.ts tests/preview.test.ts tests/phase1.test.ts tests/preview-handoff.test.ts tests/adapters.test.ts tests/package.test.ts tests/recreate-measure.test.ts tests/workflow.test.ts tests/catalog.test.ts tests/prism-templates.test.ts tests/extension-boundary.test.ts tests/connections.test.ts tests/install-guide.test.tsnpm run test:studio -- --maxWorkers=2npm run package:phase1- archive="$PWD/dist/motion-$(node -p "require('./package.json').version")-phase1.zip"+ archive="$PWD/dist/openmotion-$(node -p "require('./package.json').version")-phase1.zip"node tests/phase1-package.mjs "$archive" "$RUNNER_TEMP/phase1-e2e"- name: Build the final application tgz once and scan both archivesenv:diff --git a/docs/mcp-phase1-tools.md b/docs/mcp-phase1-tools.mdindex 28cbe04a..c5405ce9 100644--- a/docs/mcp-phase1-tools.md+++ b/docs/mcp-phase1-tools.md@@ -109,7 +109,7 @@ The open editor also shows these restore refusals through its shared dismissible## 注册、构建与兼容- shared/mcp-profiles.json 是11项唯一公开清单,shared/mcp-release.json 默认 phase1;mcpRegistry 同时控制发现与调用,禁止运行时环境变量扩大列表。新增/缺失实现由构建完整性检查拦截。-- npm run package:phase1 构建 Studio 并生成 dist/motion-0.6.2-phase1.zip;npm run package:plugin 默认也沿用 phase1。该插件 ZIP 不带原生 Node/浏览器/FFmpeg:使用支持的本机 Node、首次安装锁定依赖,FFmpeg/ffprobe 需本机可用。+- npm run package:phase1 构建 Studio 并生成 dist/openmotion-0.6.3-phase1.zip;npm run package:plugin 默认也沿用 phase1。该插件 ZIP 不带原生 Node/浏览器/FFmpeg:使用支持的本机 Node、首次安装锁定依赖,FFmpeg/ffprobe 需本机可用。- 四宿主薄适配器从同一运行时导出,scope.json 记录 profile,复制上述5个 Skill;不另维护 allowlist。数据目录放在 runtime/插件缓存之外。资源指导通过本地文件或 resources/list、resources/read 取得,不另增加 workflow Tool。- 完整原生测试包的 build <target> <beta-version> [phase1|legacy] 使用同表检查并写 release.json;本次不声称重新制作/验收各平台原生安装包。- Internal compatibility handlers and explicit legacy development builds remain separate; hidden calls return MCP_TOOL_NOT_EXPOSED in phase-one packages. Existing supported phase-one calls continue across compatible updates. Newly added Tools, changed discovery metadata and Skills require host refresh before use.@@ -156,7 +156,7 @@ Protocol 1 preserves existing request/response shapes and semantics. New Tools a| openmotion_restore_version | v5恢复v3产生v6并保留v4/v5;历史音视频;中断恢复及外部第三种内容保护 | tests/phase1.test.ts || openmotion_export_cancel | 排队取消、运行中确认停止、跨项目拒绝、已完成不改状态、旧结果保留 | tests/phase1.test.ts、tests/phase1-runtime.test.ts、tests/phase1-package.mjs |-复测命令:后端 `node --experimental-strip-types --test --test-concurrency=1 tests/*.test.ts`;实际包 `node tests/phase1-package.mjs /absolute/path/motion-0.6.2-phase1.zip /absolute/path/evidence`。完整测试包和四宿主真实模型任务另行验收。+复测命令:后端 `node --experimental-strip-types --test --test-concurrency=1 tests/*.test.ts`;实际包 `node tests/phase1-package.mjs /absolute/path/openmotion-0.6.3-phase1.zip /absolute/path/evidence`。完整测试包和四宿主真实模型任务另行验收。### 测试代码与CI范围diff --git a/docs/usage.md b/docs/usage.mdindex f4c9f547..abf8d7a2 100644--- a/docs/usage.md+++ b/docs/usage.md@@ -209,7 +209,7 @@ npm run package:plugin`npm run dev` 先构建编辑器再启动服务;只改前端后可运行 `npm run build:studio` 并刷新页面。`npm run test:studio` 运行上游单元/DOM 回归与宿主集成测试;`npm run typecheck:studio` 检查前端类型;`npm run design:check` 检查主题变量与对比度。`check` 校验清单、版本、锁定依赖、技能入口、服务 TypeScript 语法及设计规范。测试覆盖原生源文件共享、并发 revision、路径隔离、旧工程迁移、Studio 编辑数据快照、真实 stdio MCP、原生 Studio HTTP 接口、完整目录与同源版本、封面筛选、短指令与参数化指南、三个官方模板的打开/编辑/切换/保留和带音轨的真实 MP4 渲染。没有 FFmpeg 或 Chrome 的机器会跳过渲染集成测试;PR CI 的 phase1-package-e2e 独立任务安装 Chromium、FFmpeg/ffprobe,重新构建并隔离安装真实ZIP,自动跑全部11个Tool;依赖缺失或测试失败直接标红,日志与MP4证据保留14天。合并阻断须同时启用main的必需状态检查,配置与边界见[测试覆盖](mcp-phase1-tools.md#测试代码与ci范围)。-打包产物为 `dist/motion-0.6.2-phase1.zip`,包含编辑器构建产物、设计系统与字体许可、原生模板、完整目录与已校验封面、技能、lockfile、AGENTS.md、CLAUDE.md 和产品文档,排除个人媒体、草稿、node_modules 和原生程序。`bash scripts/install-motion.command` 可注册并安装本地插件,并按 Codex 实际解析的启动配置验证 MCP 握手;它不会重启 Codex。代码改动和打包不会自动替换用户已安装的插件版本。+打包产物为 `dist/openmotion-0.6.3-phase1.zip`,包含编辑器构建产物、设计系统与字体许可、原生模板、完整目录与已校验封面、技能、lockfile、AGENTS.md、CLAUDE.md 和产品文档,排除个人媒体、草稿、node_modules 和原生程序。`bash scripts/install-motion.command` 可注册并安装本地插件,并按 Codex 实际解析的启动配置验证 MCP 握手;它不会重启 Codex。代码改动和打包不会自动替换用户已安装的插件版本。主要实现:`hyperframes.ts` 管理锁定的上游 CLI 与 Studio 进程;`workspace.ts` 管理原生文件、迁移和快照;`server.ts` 提供薄壳与后台任务;`mcp.ts` 向 Agent 暴露工具;`template-library.ts` 创建官方模板的可编辑副本,`template-catalog.ts` 提供完整参考目录及热度;`editor-server.ts` 提供自有编辑器资源并流式转发原生 API;`studio/src/motion/` 是我们的界面入口,`web/design-system/` 是共享设计规范。`shared/legacy.ts` 仅用于读取旧版工程。diff --git a/tests/phase1-package.mjs b/tests/phase1-package.mjsindex 3e9e675c..c16ac963 100644--- a/tests/phase1-package.mjs+++ b/tests/phase1-package.mjs@@ -11,10 +11,19 @@ const archive=process.argv[2];assert.ok(path.isAbsolute(archive));const work=await realpath(await mkdtemp(path.join(tmpdir(),'om-phase1-package-')));const evidence=process.argv[3]?path.resolve(process.argv[3]):path.join(work,'evidence');await mkdir(evidence,{recursive:true});const extracted=path.join(work,'extracted');await mkdir(extracted);-assert.equal(spawnSync('unzip',['-q',archive,'-d',extracted]).status,0);-const root=path.join(extracted,'motion'),data=path.join(work,'user-data');+const extraction=spawnSync('unzip',['-q',archive,'-d',extracted],{encoding:'utf8'});+assert.equal(extraction.status,0,extraction.error?.message??extraction.stderr);+const root=path.join(extracted,'openmotion'),data=path.join(work,'user-data');const expected=['openmotion_list_templates','openmotion_get_template','openmotion_create_project','openmotion_open_preview','openmotion_import_assets','openmotion_get_project','openmotion_edit_project','openmotion_export_request','openmotion_list_versions','openmotion_restore_version','openmotion_export_cancel'];-assert.deepEqual((await readdir(path.join(root,'skills'))).sort(),['openmotion-director','openmotion-production','openmotion-recreate','openmotion-template-to-video','openmotion-video-to-template']);+const canonicalSkills=['openmotion-director','openmotion-production','openmotion-recreate','openmotion-template-to-video','openmotion-video-to-template'];+const legacySkills=canonicalSkills.map(name=>name.replace(/^openmotion-/,'motion-'));+assert.deepEqual((await readdir(path.join(root,'skills'))).sort(),[...canonicalSkills,...legacySkills].sort());+for(const [index,name] of legacySkills.entries()){+ const alias=await readFile(path.join(root,'skills',name,'SKILL.md'),'utf8');+ assert.match(alias,/disable-model-invocation: true/);+ assert.ok(alias.includes('../'+canonicalSkills[index]+'/SKILL.md'));+ assert.match(await readFile(path.join(root,'skills',name,'agents/openai.yaml'),'utf8'),/allow_implicit_invocation: false/);+}assert.equal(JSON.parse(await readFile(path.join(root,'shared/mcp-release.json'))).profile,'phase1');await assert.rejects(stat(path.join(root,'node_modules')),{code:'ENOENT'});const version=JSON.parse(await readFile(path.join(root,'package.json'))).version;