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
fix: provide theme-aware Codex and MCP brand icons
罗高c5df400f01e0
diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.jsonindex edbf9b31..19568698 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -7,6 +7,10 @@"requires_local_executor": true,"interface": {"displayName": "OpenDesign",- "shortDescription": "制作、复刻和编辑 Motion 视频"+ "shortDescription": "制作、复刻和编辑 Motion 视频",+ "composerIcon": "./docs/readme/opendesign-symbol-auto.svg",+ "composerIconDark": "./docs/readme/opendesign-symbol-dark.svg",+ "logo": "./docs/readme/opendesign-symbol-auto.svg",+ "logoDark": "./docs/readme/opendesign-symbol-dark.svg"}}diff --git a/docs/agent-adapters.md b/docs/agent-adapters.mdindex a2981658..ebefeb08 100644--- a/docs/agent-adapters.md+++ b/docs/agent-adapters.md@@ -85,6 +85,10 @@ Codex 声明 `requires_local_executor`;两家原生插件均引用同一外置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, while an invalid manifest (a non-object manifest or interface, or an empty/non-string `description` or `interface.shortDescription`) is rejected with a clear error before any adapter is written. 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 plugin icons are configured by `interface.logo`, `logoDark`, `composerIcon` and `composerIconDark` in `.codex-plugin/plugin.json`. Generated Codex adapters preserve the runtime interface and include its square brand symbols under `docs/readme/`. Direct MCP connections, including npm setup, receive the same light/dark symbols as embedded `serverInfo.icons` when negotiating protocol `2025-11-25`; older protocol responses omit icons. Icon rendering and placement depend on the host. Updating source metadata does not refresh an already installed plugin or an existing MCP connection.++The default plugin logo/composer SVG also switches its fill through `prefers-color-scheme`. This supports host surfaces that use only the default logo, including the local-MCP row of the Codex plugin detail page; dedicated dark-logo fields remain available for surfaces that select them explicitly.+独立验证使用临时 `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/product/architecture.md b/docs/product/architecture.mdindex 44a6d2a8..18e6d345 100644--- a/docs/product/architecture.md+++ b/docs/product/architecture.md@@ -40,6 +40,8 @@ Model Gateway remains a shared media-generation backend for MCP, using local CodThe public product name is **OpenMotion**. README pages place the centered logo above the cover and retain a plain-text OpenMotion heading before the introduction. The cover and footer share the same identity. OpenMotion is on `main` in `nexu-io/openmotion`; daily development branches from the latest `origin/main` and PRs target `main`, following the [shared branch rules](../../AGENTS.md#development-branches-and-pull-requests); the `motion` plugin identifier and environment variables remain compatible. The public workflow is reference → analysis and reconstruction → brand adaptation → multimodal generation → editing and rendering. It emphasizes editable HTML video, BYOA / BYOK, presenter stories, editable projects and the Motion.md community. English, Simplified Chinese and Japanese READMEs share examples, media and stable section anchors. README localization is maintained independently of the Studio interface, which currently supports eleven languages.+Codex plugin metadata and generated adapters provide the existing brand symbol in light/dark variants. Direct MCP initialization advertises the same embedded icons with protocol `2025-11-25`, without a remote asset fetch; earlier protocol revisions omit icons. Host rendering and refresh remain separate from package and protocol validation; see [adapter metadata](../agent-adapters.md#codex--claude-code).+“任何视频”是工作流的创作范围表述,不保证任意输入的获取、解析、还原度或传播结果。参考获取与媒体分析依赖宿主工具和用户材料,生成效果依赖模型配置,成片需按参考、简报与实际视听结果审阅。README 的发布部分明确区分当前 MP4 手动交接与规划中的平台连接、排期和反馈。外部产品来源和比较统一放在 README 最后的 Acknowledgements,技术依赖与具体出处仍保留在专题和源文件中。AI 剪辑的当前路径是:用户提供素材、脚本或确认的时间码,外部 Agent 根据选段、删改、排序、字幕、声画与节奏要求修改真实工程,用户在 Studio 预览并继续调整;自动语音理解仍取决于宿主工具与输入材料。对外介绍以 OpenMotion 本身与创作者的完整工作流为主,Hyperframes 作为技术来源在文末致谢,具体依赖继续在技术专题中准确记录。独立应用是首要产品身份,外部 Agent 通过 Skills、MCP 和固定版本 CLI 操作同一份本地工程;应用可连接多种客户端,当前不内置聊天 Agent 运行器。核心原则是人和 Agent 共用作品、经验沉淀为规范和模板、源文件可检查与可延续。仓库已采用 [Apache-2.0](../../LICENSE),保留上游组件与字体声明;这取代此前“统一许可证待确认”的过时状态,依据见 2026-11-06 的公开记录。diff --git a/docs/readme/ASSETS.md b/docs/readme/ASSETS.mdindex 06b9f29b..81656681 100644--- a/docs/readme/ASSETS.md+++ b/docs/readme/ASSETS.md@@ -39,6 +39,8 @@ The local agent gallery and setup buttons use client marks from the [source icon| Bundled template frames | Product Promo, NYT Graph and Decision Tree remain available through the [editable-template index](../../library/templates/README.md); their original projects, posters and [notices](../../template-library/NOTICE.md) are unchanged. || Contributor wall | Local 23-avatar [snapshot](contributors/manifest.json), captured from the GitHub contributors API on 2026-11-09. Includes repository history; profile links remain external, image bytes are local. || [OpenDesign symbol](opendesign-symbol.svg) | Unmodified upstream [CDN asset](https://r.open-design.ai/files/1257306170d14488e993cb1f97b86aad8840a3f866f1978e0fd24b9a3c7832d8); retained for provenance, not used as a newly designed OpenMotion mark. SHA-256: `1257306170d14488e993cb1f97b86aad8840a3f866f1978e0fd24b9a3c7832d8`. |+| [Dark-background symbol](opendesign-symbol-dark.svg) | The same upstream symbol with fill changed to `#ffffff` for dark backgrounds; geometry unchanged. The Codex plugin and MCP metadata use these square light/dark symbols, matching the symbol in the OpenMotion wordmark. |+| [Automatic-theme symbol](opendesign-symbol-auto.svg) | The same symbol with an embedded `prefers-color-scheme` rule: dark gray by default and pure white on dark backgrounds. Used by the plugin's default logo/composer icon so host surfaces that omit the separate dark logo still adapt. Geometry unchanged. |All README images have descriptive alternative text. Artwork, product evidence and reference works are labeled separately. Preserve reference previews and authors rather than repainting their content for brand consistency.diff --git a/docs/readme/opendesign-symbol-auto.svg b/docs/readme/opendesign-symbol-auto.svgnew file mode 100644index 00000000..0387716c--- /dev/null+++ b/docs/readme/opendesign-symbol-auto.svg@@ -0,0 +1,5 @@+<svg width="291" height="291" viewBox="0 0 291 291" fill="none" xmlns="http://www.w3.org/2000/svg">+<style>@media (prefers-color-scheme: dark) { path { fill: #ffffff; } }</style>+<path fill-rule="evenodd" clip-rule="evenodd" d="M145.5 0C225.857 0 291 65.1426 291 145.5C291 225.857 225.857 291 145.5 291H19.3581C8.64385 291 0.000681982 282.358 0.000616442 271.644C0.000417939 239.193 1.50624e-09 174.523 0 145.5C0 65.1426 65.1426 5.2069e-06 145.5 0ZM145.501 29.1004C81.2147 29.1004 29.1004 81.2147 29.1004 145.501C29.1005 209.786 81.2147 261.9 145.501 261.9C209.786 261.9 261.9 209.786 261.9 145.501C261.9 81.2147 209.786 29.1004 145.501 29.1004Z" fill="#202020"/>+<path d="M137.934 215.04L94.3119 100.247C92.9002 96.5317 96.5286 92.8895 100.219 94.3172L215.067 138.749C219.793 140.578 218.491 147.633 213.427 147.633H146.769V213.4C146.769 218.499 139.744 219.804 137.934 215.04Z" fill="#202020"/>+</svg>diff --git a/docs/readme/opendesign-symbol-dark.svg b/docs/readme/opendesign-symbol-dark.svgnew file mode 100644index 00000000..225deb0c--- /dev/null+++ b/docs/readme/opendesign-symbol-dark.svg@@ -0,0 +1,4 @@+<svg width="291" height="291" viewBox="0 0 291 291" fill="none" xmlns="http://www.w3.org/2000/svg">+<path fill-rule="evenodd" clip-rule="evenodd" d="M145.5 0C225.857 0 291 65.1426 291 145.5C291 225.857 225.857 291 145.5 291H19.3581C8.64385 291 0.000681982 282.358 0.000616442 271.644C0.000417939 239.193 1.50624e-09 174.523 0 145.5C0 65.1426 65.1426 5.2069e-06 145.5 0ZM145.501 29.1004C81.2147 29.1004 29.1004 81.2147 29.1004 145.501C29.1005 209.786 81.2147 261.9 145.501 261.9C209.786 261.9 261.9 209.786 261.9 145.501C261.9 81.2147 209.786 29.1004 145.501 29.1004Z" fill="#ffffff"/>+<path d="M137.934 215.04L94.3119 100.247C92.9002 96.5317 96.5286 92.8895 100.219 94.3172L215.067 138.749C219.793 140.578 218.491 147.633 213.427 147.633H146.769V213.4C146.769 218.499 139.744 219.804 137.934 215.04Z" fill="#ffffff"/>+</svg>diff --git a/mcp.ts b/mcp.tsindex 9cb3aad6..d0d42aaf 100644--- a/mcp.ts+++ b/mcp.ts@@ -1,5 +1,5 @@import { createInterface } from 'node:readline';-import { statSync } from 'node:fs';+import { readFileSync, statSync } from 'node:fs';import { fileURLToPath } from 'node:url';import { WorkspaceStore } from './workspace.ts';import { ensureService, VERSION } from './preview.ts';@@ -28,6 +28,10 @@ function trackingFor(store: WorkspaceStore) {}const runtimeRoot = fileURLToPath(new URL('./', import.meta.url));const runtimeDirectory = statSync(runtimeRoot);+const serverIcons = ['light', 'dark'].map(theme => ({+ src: 'data:image/svg+xml;base64,' + readFileSync(new URL(`./docs/readme/opendesign-symbol${theme === 'dark' ? '-dark' : ''}.svg`, import.meta.url)).toString('base64'),+ mimeType: 'image/svg+xml', sizes: ['any'], theme,+}));export async function rpc(message: any, store = new WorkspaceStore(), registry = releaseRegistry, connection?: { selection: Selection }) {const name = message?.params?.name;@@ -53,7 +57,10 @@ async function invokeRpc(message: any, store: WorkspaceStore, registry: ReturnTyif (!message || message.jsonrpc !== '2.0' || typeof message.method !== 'string') return { jsonrpc: '2.0', id: message?.id ?? null, error: { code: -32600, message: 'Invalid request' } };if (message.id === undefined) return null;const result = (value: unknown) => ({ jsonrpc: '2.0', id: message.id, result: value });- if (message.method === 'initialize') return result({ protocolVersion: ['2024-11-05', '2025-03-26', '2025-06-18', '2025-11-25'].includes(message.params?.protocolVersion) ? message.params.protocolVersion : '2025-11-25', capabilities: { tools: {}, ...(registry.profile === 'phase1' ? { resources: {} } : {}) }, serverInfo: { name: 'motion', version: VERSION }, instructions: registry.instructions ?? workflowEntryGuide + ' Load only references needed by the current task and reuse already loaded documentId/contentHash. Reuse saved decisions for small edits. Motion wraps Hyperframes Studio and its renderer. Only for tasks that require working in the editor or authoring a project, call motion_open_preview, read its pinned authoringGuide and open previewUrl with the host built-in browser before reporting it opened. Author native HTML compositions with seekable GSAP timelines, never custom shot JSON or canvas recording. Read motion_get_project before source edits and pass its revision as expectedRevision; inspect lint/timeline afterwards. Only when the user scope includes export/final delivery, query any applicable existing export to avoid duplicate jobs and export the inspected revision in the background, wait for completed, then call motion_verify_export with that job ID/revision and the brief audio policy. Separately inspect final visuals, sound and actual player playback before claiming full verification. MCP previewUrl defaults to embed=1; preserve its query and hash. Use sessionUrl or embedded=false only for the full OpenDesign workspace. Do not restart the host Agent or ask users to start a terminal server.' });+ if (message.method === 'initialize') {+ const protocolVersion = ['2024-11-05', '2025-03-26', '2025-06-18', '2025-11-25'].includes(message.params?.protocolVersion) ? message.params.protocolVersion : '2025-11-25';+ return result({ protocolVersion, capabilities: { tools: {}, ...(registry.profile === 'phase1' ? { resources: {} } : {}) }, serverInfo: { name: 'motion', version: VERSION, ...(protocolVersion === '2025-11-25' ? { icons: serverIcons } : {}) }, instructions: registry.instructions ?? workflowEntryGuide + ' Load only references needed by the current task and reuse already loaded documentId/contentHash. Reuse saved decisions for small edits. Motion wraps Hyperframes Studio and its renderer. Only for tasks that require working in the editor or authoring a project, call motion_open_preview, read its pinned authoringGuide and open previewUrl with the host built-in browser before reporting it opened. Author native HTML compositions with seekable GSAP timelines, never custom shot JSON or canvas recording. Read motion_get_project before source edits and pass its revision as expectedRevision; inspect lint/timeline afterwards. Only when the user scope includes export/final delivery, query any applicable existing export to avoid duplicate jobs and export the inspected revision in the background, wait for completed, then call motion_verify_export with that job ID/revision and the brief audio policy. Separately inspect final visuals, sound and actual player playback before claiming full verification. MCP previewUrl defaults to embed=1; preserve its query and hash. Use sessionUrl or embedded=false only for the full OpenDesign workspace. Do not restart the host Agent or ask users to start a terminal server.' });+ }if (message.method === 'ping') return result({});if (registry.profile === 'phase1' && message.method === 'resources/list') return result({ resources: workflowResources() });if (registry.profile === 'phase1' && message.method === 'resources/read') {diff --git a/scripts/distribution.ts b/scripts/distribution.tsindex dddf3f1e..c61969e4 100644--- a/scripts/distribution.ts+++ b/scripts/distribution.ts@@ -442,7 +442,7 @@ export const distributionDocuments = ['docs/usage.md', 'docs/motion-md.md', 'docs/motion-md.zh-CN.md','docs/collections/README.md', 'docs/collections/README.zh-CN.md','docs/examples/product-launch.MOTION.md', 'docs/examples/product-launch.MOTION.zh-CN.md',- 'docs/readme/ASSETS.md', 'docs/readme/opendesign-symbol.svg',+ 'docs/readme/ASSETS.md', 'docs/readme/opendesign-symbol.svg', 'docs/readme/opendesign-symbol-dark.svg', 'docs/readme/opendesign-symbol-auto.svg','docs/readme/reverse-engineering-cover.md','docs/readme/cover-reverse-engineering.png', 'docs/readme/cover-reverse-engineering-v2.png','docs/readme/collaboration-concept-v2.png',diff --git a/scripts/export-adapters.ts b/scripts/export-adapters.tsindex 5d518b37..69ad3dc6 100644--- a/scripts/export-adapters.ts+++ b/scripts/export-adapters.ts@@ -105,7 +105,7 @@ export async function exportAdapters(runtimePath: string, dataPath: string, outpdescription: manifestDescription ?? '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: manifestShortDescription ?? 'Motion production with the shared local runtime.' } } : manifest);+ interface: { ...runtimeInterface, displayName: 'OpenDesign', shortDescription: manifestShortDescription ?? '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/scripts/package-npm.mjs b/scripts/package-npm.mjsindex 6c323899..a8147d9b 100644--- a/scripts/package-npm.mjs+++ b/scripts/package-npm.mjs@@ -12,6 +12,8 @@ import { checkReleaseVersion, releaseTemplateEnvironment } from './release-versiconst root = fileURLToPath(new URL('../', import.meta.url));// GitHub serves the full showcase. npm ships the application and its technical documentation.function isShowcaseAsset(file) {+ // Plugin and MCP branding reads these symbols from the installed application.+ if (/^docs\/readme\/opendesign-symbol(?:-dark|-auto)?\.svg$/.test(file)) return false;return /^(?:examples|library)\//.test(file) || file.startsWith('docs/readme/');}diff --git a/tests/adapters.test.ts b/tests/adapters.test.tsindex 606f55f7..300a0643 100644--- a/tests/adapters.test.ts+++ b/tests/adapters.test.ts@@ -54,6 +54,15 @@ test('local adapters share one runtime, launch outside its cwd and preserve prevassert.equal(manifest.requires_local_executor, true);assert.equal(manifest.interface.displayName, 'OpenDesign');assert.equal(manifest.interface.shortDescription, sourceManifest.interface.shortDescription);+ for (const field of ['logo', 'logoDark', 'composerIcon', 'composerIconDark']) {+ const filename = manifest.interface[field];+ assert.equal(filename, sourceManifest.interface[field]);+ const icon = await readFile(path.join(plugin, filename), 'utf8');+ assert.equal(icon, await readFile(path.join(source, filename), 'utf8'));+ assert.match(icon, /viewBox="0 0 291 291"/);+ assert.match(icon, field.endsWith('Dark') ? /fill="#ffffff"/ : /fill="#202020"/);+ if (!field.endsWith('Dark')) assert.match(icon, /@media \(prefers-color-scheme: dark\)/);+ }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' },diff --git a/tests/mcp.test.ts b/tests/mcp.test.tsindex 886b86c3..8829c64b 100644--- a/tests/mcp.test.ts+++ b/tests/mcp.test.ts@@ -1,6 +1,7 @@import test from 'node:test';import assert from 'node:assert/strict';import { spawnSync } from 'node:child_process';+import { readFileSync } from 'node:fs';import { fixture } from './fixtures.ts';test('actual MCP stdio exposes exactly phase-one tools and rejects hidden writes without side effects', () => fixture(async store => {@@ -13,6 +14,14 @@ test('actual MCP stdio exposes exactly phase-one tools and rejects hidden writesconst child = spawnSync(process.execPath, ['--experimental-strip-types', 'mcp.ts'], { input: messages.map(m => JSON.stringify({ jsonrpc: '2.0', ...m })).join('\n') + '\n', encoding: 'utf8', env: { ...process.env, MOTION_DATA_DIR: store.directory }, timeout: 10_000 });assert.equal(child.status, 0, child.stderr);const responses = child.stdout.trim().split('\n').map(line => JSON.parse(line));+ const icons = responses[0].result.serverInfo.icons;+ assert.deepEqual(icons.map((icon: any) => icon.theme), ['light', 'dark']);+ for (const icon of icons) {+ assert.equal(icon.mimeType, 'image/svg+xml');+ assert.deepEqual(icon.sizes, ['any']);+ const filename = `../docs/readme/opendesign-symbol${icon.theme === 'dark' ? '-dark' : ''}.svg`;+ assert.equal(icon.src, 'data:image/svg+xml;base64,' + readFileSync(new URL(filename, import.meta.url)).toString('base64'));+ }assert.equal(responses[1].result.tools.length, 11);assert.ok(responses[1].result.tools.every((tool: any) => tool.name.startsWith('motion_')));assert.match(responses[2].result.content[0].text, /MCP_TOOL_NOT_EXPOSED/);@@ -20,6 +29,15 @@ test('actual MCP stdio exposes exactly phase-one tools and rejects hidden writesassert.deepEqual(await store.get(), before);}));+test('MCP branding retains compatibility with protocol revisions before icon support', () => fixture(async store => {+ const { rpc } = await import('../mcp.ts');+ for (const protocolVersion of ['2024-11-05', '2025-03-26', '2025-06-18']) {+ const response: any = await rpc({ jsonrpc: '2.0', id: 1, method: 'initialize', params: { protocolVersion } }, store);+ assert.equal(response.result.protocolVersion, protocolVersion);+ assert.equal(response.result.serverInfo.icons, undefined);+ }+}));+test('workflow sections are read-only and expose native production instructions', () => fixture(async store => {const { callTool } = await import('../mcp.ts');const before = await store.get();diff --git a/tests/npm-package.test.ts b/tests/npm-package.test.tsindex 4ff2001f..7c30a9f1 100644--- a/tests/npm-package.test.ts+++ b/tests/npm-package.test.ts@@ -86,6 +86,11 @@ test('test npm artifacts contain their application, locked manifest and no bundlassert.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);+ const pluginInterface = (await json(path.join(application, '.codex-plugin/plugin.json'))).interface;+ for (const field of ['logo', 'logoDark', 'composerIcon', 'composerIconDark']) {+ const filename = pluginInterface[field];+ assert.equal(await readFile(path.join(application, filename), 'utf8'), await readFile(filename, 'utf8'));+ }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);