Skip to content

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.

Fix Motion plugin discovery and production routing

qindong2f0aa516d1a6
diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json
index c4049c54..edbf9b31 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "motion",
"version": "0.6.3",
- "description": "Create, animate, edit, preview, and export motion graphics and motion videos in OpenMotion, including template-based creation and reference video recreation. 用于制作动效视频、Motion 视频、动画和参考视频复刻。",
+ "description": "Plan, create, animate, edit, preview, and export motion graphics and motion videos in OpenMotion, including original videos on a user-supplied topic, template-based creation and reference video recreation. 用于构思和制作 motion 视频、动效视频、动画、赛事回顾、科普讲解和参考视频复刻。",
"skills": "./skills/",
"mcpServers": "./.mcp.json",
"requires_local_executor": true,
diff --git a/docs/agent-adapters.md b/docs/agent-adapters.md
index dcf64018..93bf9239 100644
--- a/docs/agent-adapters.md
+++ b/docs/agent-adapters.md
@@ -83,6 +83,8 @@ claude plugin list --json
Codex 声明 `requires_local_executor`;两家原生插件均引用同一外置 Node、bootstrap、MCP 入口和数据目录。marketplace 位于各自插件 ZIP 外,原生安装使用生成的 `codex/` 或 `claude/` 目录。同名旧 `motion-local`、`openmotion-test` 或手动 MCP 已启用时,先核对、选择一个连接,避免重复加载。
+Generated Codex and Claude plugin descriptions reuse the selected runtime's `.codex-plugin/plugin.json` discovery description, and Codex also retains its short description. Older runtimes without that manifest retain the generic adapter description. The five Skills carry their own intent descriptions across plugin and npm installation paths. Regenerate adapters after updating this metadata and refresh the host's discovery as described in [installation and recovery](npm-installation.md#missing-mcp-tools-or-a-failed-connection).
+
独立验证使用临时 `CODEX_HOME` / `CLAUDE_CONFIG_DIR`,安装后读取宿主实际解析的启动配置,检查工具和 `motion_get_project.dataDirectory`。卸载仅移除薄入口,保留外置运行时和用户数据。旧自带服务源码的 `check-installed-mcp.mjs` / `resolve-installed.mjs` 不用于新适配器缓存;本轮不改变旧安装器行为。
For an npm-managed installation, the installed `scripts/npm-installer.mjs diagnose --host HOST --home HOME` reuses the transport probe with that installation's launcher, host configuration and expected data directory; it does not inspect an assumed plugin cache. Missing/disabled registration, startup errors, invalid protocol output, version/tool mismatches and a different workspace are reported separately. Its independent probe cannot observe every active host session or reconnect a closed chat transport. Follow [connection diagnosis and recovery](npm-installation.md#missing-mcp-tools-or-a-failed-connection), then verify the original project through the real host MCP connection.
diff --git a/docs/skills.md b/docs/skills.md
index e0193f28..b2b11218 100644
--- a/docs/skills.md
+++ b/docs/skills.md
@@ -35,6 +35,8 @@ The current five-route, eleven-Tool contract, editor-first handoff, requested-ex
专业入口可由宿主 Skill 自动匹配、用户指定或准确模板指引直接选中,只读取共享 context 后继续,不返回 production 重做选路。局部创作/声音重新设计/创作品质审片由 director 承接;按既定决定修改、替换已选音乐、技术检查和仅导出由 production 承接;仅脚本或审片停在当前范围;共享质量参考不会要求重启 director 的完整创作流程。Skills 是同一 Agent 的文档,不是相互递归执行的独立进程。
+Original motion-video requests on a user-supplied topic, including esports recaps and explainers, use motion-director. Its discovery description covers both creation and concept-only requests. Shared context directs the Agent to discover the host's Motion tools and promptly disclose missing or failed connections, including during planning. Planning can finish without a project mutation, and production continues through the host MCP connection. Reading guidance and an independent CLI probe each have their own evidence scope. Skill matching remains the host model's decision. See [the official Skill discovery guidance](https://developers.openai.com/plugins/build/skills#write-skillmd).
+
## 同源文档接口
本地文件和 MCP 返回同一份全文。注册表在 `shared/workflow.ts`,一期分发以下五条路线。Skill 名称与目录统一;既有 workflow 短 ID 保持兼容,不增加同义 Skill 入口:
diff --git a/scripts/export-adapters.ts b/scripts/export-adapters.ts
index 09caae86..1fae8da1 100644
--- a/scripts/export-adapters.ts
+++ b/scripts/export-adapters.ts
@@ -34,6 +34,8 @@ export async function exportAdapters(runtimePath: string, dataPath: string, outp
try { await access(filename); return true; }
catch (error) { if ((error as NodeJS.ErrnoException).code === 'ENOENT') return false; throw error; }
};
+ const manifestFile = path.join(runtime, '.codex-plugin/plugin.json');
+ const runtimeManifest = await exists(manifestFile) ? JSON.parse(await readFile(manifestFile, 'utf8')) : null;
const profileFile = path.join(runtime, 'shared/mcp-release.json');
const mcpProfile = await exists(profileFile) ? JSON.parse(await readFile(profileFile, 'utf8')).profile : 'legacy';
assert(['legacy', 'phase1'].includes(mcpProfile), 'Invalid runtime MCP release profile.');
@@ -87,9 +89,11 @@ export async function exportAdapters(runtimePath: string, dataPath: string, outp
text('icon.svg', `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#282828" stroke="none">${filmIcon}</svg>\n`);
}
else {
- const manifest = { name: 'motion', version: pkg.version, description: 'OpenDesign Motion with the shared local MCP runtime.', author: { name: 'OpenDesign' }, skills: './skills/', mcpServers: './.mcp.json' };
+ const manifest = { name: 'motion', version: pkg.version,
+ description: runtimeManifest?.description ?? 'OpenDesign Motion with the shared local MCP runtime.',
+ author: { name: 'OpenDesign' }, skills: './skills/', mcpServers: './.mcp.json' };
text(`.${host}-plugin/plugin.json`, host === 'codex' ? { ...manifest, requires_local_executor: true,
- interface: { displayName: 'OpenDesign', shortDescription: 'Motion production with the shared local runtime.' } } : manifest);
+ interface: { displayName: 'OpenDesign', shortDescription: runtimeManifest?.interface?.shortDescription ?? 'Motion production with the shared local runtime.' } } : manifest);
text('.mcp.json', host === 'codex' ? { mcpServers: { motion: info.transport } } : integrationConfig(info, 'mcp').text);
}
const directory = path.join(output, host, 'openmotion');
diff --git a/skills/motion-director/SKILL.md b/skills/motion-director/SKILL.md
index 296976e7..b377b567 100644
--- a/skills/motion-director/SKILL.md
+++ b/skills/motion-director/SKILL.md
@@ -1,6 +1,6 @@
---
name: motion-director
-description: 为产品宣传片、功能演示、品牌片与动态图形负责原创构思、动态叙事、动作编排、声音叙事、大幅重编及创作品质审片。已有工程中重新设计局部动作或声画关系也适用,画面锁定时仅展开声音创作;按既定决定执行文字/素材/音轨替换、技术检查或导出使用 motion-production。可编辑模板适配走 motion-template-to-video,参考视频重建本次作品走 motion-recreate,交付可复用模板走 motion-video-to-template。
+description: Plan and create original motion videos and motion graphics with OpenMotion. Use for “做一个 motion 视频”、动效视频、动画短片、先构思视频怎么呈现, including esports recaps, explainers, product demos and brand films. Also use for narrative, motion or sound redesign and creative review. Execute established edits/exports with motion-production, editable templates with motion-template-to-video, reference reconstruction with motion-recreate and reusable templates with motion-video-to-template. Repository development does not trigger video production.
metadata:
version: "1.5.5"
---
@@ -9,6 +9,8 @@ metadata:
## 职责与目标
+Use OpenMotion for an original video on the user's topic, including a request to discuss its presentation first. Apply the shared context's capability discovery and connection guidance when starting the task. A concept-only request ends with the requested creative plan. Once the user asks to build it, continue with the confirmed plan through the connected Motion tools.
+
以 Motion 导演的视角负责本片的动态叙事、镜头衔接、状态延续与声画关系的整体编排。根据产品事实、受众和传播目的选择表达方式。
目标是让时间、运动、剪辑与声音承担表达、情绪或注意力组织的职责。Motion 感来自经过设计的变化与节奏,不等于运动量、镜头速度或特效数量。准确性、可读性与用户目的仍须成立。
diff --git a/skills/motion-production/references/context.md b/skills/motion-production/references/context.md
index 4598b953..489e4e6c 100644
--- a/skills/motion-production/references/context.md
+++ b/skills/motion-production/references/context.md
@@ -15,7 +15,9 @@ Agent 结合当前目标、保持项与工程状态选择本轮入口;工程
通过 npm 安装的平铺 Skill 可读取入口旁的 `openmotion-install.json`:`runtimeRoot` 指向应用和共享 `docs/`,不要从当前工程猜测服务路径。完整包或薄插件仍按其 `scope.json.runtimeRoot` / 已注册启动配置定位;五个入口的相对参考保持同一技能目录布局。
-If Motion tools are unavailable, apply the [connection diagnosis and recovery rules](production.md#tool-transport-and-workspace-readiness) before creating or importing work. Use the installed host/home identity, retain the actual connection error and verify recovery through a real host MCP read; a separate CLI probe cannot confirm the current chat connection.
+For a video task, identify OpenMotion as the intended execution path in the first relevant response. Discover the host's connected Motion tools, using its tool search when discovery is lazy. Reading a Skill establishes workflow guidance. Report actual tool use only after a host MCP call. A concept-only request may finish with a plan without creating a project. When the user proceeds to production, reuse that plan and use the connected tools for the project and editable preview.
+
+If Motion tools are unavailable or fail, disclose the connection status and recovery action as soon as it is observed, including during planning. Apply the [connection diagnosis and recovery rules](production.md#tool-transport-and-workspace-readiness) before creating or importing work. Use the installed host/home identity, retain the actual connection error and verify recovery through a real host MCP read. A separate CLI probe cannot confirm the current chat connection. Continue independent planning within the requested scope while connection recovery is pending.
## 先补齐阅读缺口,再执行当前范围
diff --git a/tests/adapters.test.ts b/tests/adapters.test.ts
index 16d97ee6..a54f519f 100644
--- a/tests/adapters.test.ts
+++ b/tests/adapters.test.ts
@@ -14,6 +14,7 @@ test('local adapters share one runtime, launch outside its cwd and preserve prev
const directory = await realpath(await mkdtemp(path.join(tmpdir(), "motion adapters ' $(literal) ")));
try {
const data = path.join(directory, 'user projects'), output = path.join(directory, 'export');
+ const sourceManifest = JSON.parse(await readFile(path.join(source, '.codex-plugin/plugin.json'), 'utf8'));
const exported = await exportAdapters(source, data, output);
assert.deepEqual(exported.hosts, ['codex', 'claude', 'workbuddy', 'deepseek']);
for (const host of exported.hosts) {
@@ -22,7 +23,7 @@ test('local adapters share one runtime, launch outside its cwd and preserve prev
assert.equal(await readFile(path.join(output, host, 'openmotion/remix-icon-LICENSE.txt'), 'utf8'), await readFile(path.join(source, 'web/design-system/remix-icon-LICENSE.txt'), 'utf8'));
const { readdir } = await import('node:fs/promises');
assert.deepEqual((await readdir(path.join(output, host, 'openmotion/skills'))).sort(), ['motion-director', 'motion-production', 'motion-recreate', 'motion-template-to-video', 'motion-video-to-template']);
- for (const skill of ['motion-template-to-video', 'motion-video-to-template']) {
+ for (const skill of ['motion-director', 'motion-template-to-video', 'motion-video-to-template']) {
assert.equal(await readFile(path.join(output, host, 'openmotion/skills', skill, 'SKILL.md'), 'utf8'), await readFile(path.join(source, 'skills', skill, 'SKILL.md'), 'utf8'));
}
for (const name of ['SKILL.md', 'references/rebuild.md', 'references/verify.md', 'scripts/measure_frame.mjs']) {
@@ -47,10 +48,12 @@ test('local adapters share one runtime, launch outside its cwd and preserve prev
assert.equal(existsSync(path.join(plugin, '.workbuddy-plugin')), false);
} else {
assert.equal(manifest.mcpServers, './.mcp.json'); assert.equal(manifest.name, 'motion');
+ assert.equal(manifest.description, sourceManifest.description, 'Thin plugins must preserve the runtime discovery description');
}
if (host === 'codex') {
assert.equal(manifest.requires_local_executor, true);
assert.equal(manifest.interface.displayName, 'OpenDesign');
+ assert.equal(manifest.interface.shortDescription, sourceManifest.interface.shortDescription);
assert.deepEqual(config, launch);
const marketplace = JSON.parse(await readFile(path.join(output, host, '.agents/plugins/marketplace.json'), 'utf8'));
assert.deepEqual(marketplace.plugins[0], { name: 'motion', source: { source: 'local', path: './openmotion' },
@@ -111,6 +114,9 @@ test('bundled runtime adapters preserve the Node preload and launch with a minim
const exported = spawnSync(node, ['--experimental-strip-types', path.join(runtime, 'scripts/export-adapters.ts'), runtime, data, output], { cwd: tmpdir(), encoding: 'utf8', timeout: 10_000 });
assert.equal(exported.status, 0, exported.stderr);
assert.equal(JSON.parse(exported.stdout).hosts.length, 4);
+ const legacyManifest = JSON.parse(await readFile(path.join(output, 'codex/openmotion/.codex-plugin/plugin.json'), 'utf8'));
+ assert.equal(legacyManifest.description, 'OpenDesign Motion with the shared local MCP runtime.');
+ assert.equal(legacyManifest.interface.shortDescription, 'Motion production with the shared local runtime.');
for (const host of ['codex', 'claude', 'workbuddy']) {
const config = JSON.parse(await readFile(path.join(output, host, 'openmotion', host === 'workbuddy' ? 'mcp.json' : '.mcp.json'), 'utf8')).mcpServers.motion;
assert.equal(config.command, node);
diff --git a/tests/npm-package.test.ts b/tests/npm-package.test.ts
index f128c555..627b00df 100644
--- a/tests/npm-package.test.ts
+++ b/tests/npm-package.test.ts
@@ -69,6 +69,8 @@ test('test npm artifacts contain their application, locked manifest and no bundl
assert.equal((await json(path.join(application, 'package.json'))).version, version);
assert.equal((await json(path.join(application, 'shared/template-config.json'))).environment, 'dev');
assert.equal((await json(path.join(application, '.codex-plugin/plugin.json'))).version, version);
+ assert.equal((await json(path.join(application, '.codex-plugin/plugin.json'))).description,
+ (await json('.codex-plugin/plugin.json')).description);
assert.equal((await json(path.join(application, 'package-lock.json'))).packages[''].version, version);
assert.equal((await json(path.join(installer, 'package/package.json'))).version, version);
assert.equal((await json(path.join(installer, 'package/package.json'))).private, false);
@@ -87,6 +89,9 @@ test('test npm artifacts contain their application, locked manifest and no bundl
for (const host of ['codex', 'claude', 'deepseek', 'workbuddy']) assert(help.includes(host), host);
await readFile(path.join(installer, 'package/LICENSE'));
assert.deepEqual((await readdir(path.join(application, 'skills'))).sort(), [...phase1Skills].sort());
+ for (const document of ['skills/motion-director/SKILL.md', 'skills/motion-production/references/context.md']) {
+ assert.equal(await readFile(path.join(application, document), 'utf8'), await readFile(document, 'utf8'));
+ }
assert.equal(await sha256(path.join(application, 'package-lock.json')), release.locks.npm);
assert.equal(await sha256(path.join(application, 'scripts/runtime-lock.json')), release.locks.native);
const entries = await runFile('tar', ['-tf', built.application]);