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.

Merge main while preserving OpenMotion names and theme-aware icons

bone3deep1962-collabd513ead51817
diff --cc .codex-plugin/plugin.json
index 32ed59ec,19568698..244a93fd
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@@ -6,7 -6,11 +6,11 @@@
"mcpServers": "./.mcp.json",
"requires_local_executor": true,
"interface": {
- "displayName": "OpenDesign",
- "shortDescription": "制作、复刻和编辑 Motion 视频",
+ "displayName": "OpenMotion",
- "shortDescription": "用 OpenMotion 制作、复刻和编辑视频"
++ "shortDescription": "用 OpenMotion 制作、复刻和编辑视频",
+ "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 --cc .github/workflows/ci.yml
index 498e3114,d2b97e6b..9e0d6abe
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@@ -138,9 -138,11 +138,11 @@@ jobs
npm run build:tracking
node --experimental-strip-types --test tests/tracking.test.ts
- name: Validate standalone installation and packaging
- run: node --experimental-strip-types --test tests/diagnostics.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/editor-urls.test.ts tests/workspace-studio.test.ts tests/sync.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.ts tests/readme-resources.test.ts tests/motion-design-remix.test.ts
+ run: node --experimental-strip-types --test tests/diagnostics.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/public-names.test.ts tests/mcp-runtime.test.ts tests/mcp-upgrade.test.ts tests/preview.test.ts tests/editor-urls.test.ts tests/workspace-studio.test.ts tests/sync.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.ts tests/readme-resources.test.ts tests/motion-design-remix.test.ts
- name: Studio regression
run: npm run test:studio -- --maxWorkers=2
+ - name: Built-in template playback regression
+ run: node --experimental-strip-types --test tests/decision-tree.test.ts
- name: Build phase-one ZIP and exercise all public tools
run: |
npm run package:phase1
diff --cc docs/agent-adapters.md
index 2cfbc718,ebefeb08..92e5c24c
--- a/docs/agent-adapters.md
+++ b/docs/agent-adapters.md
@@@ -85,7 -85,11 +85,11 @@@ 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` 不用于新适配器缓存;本轮不改变旧安装器行为。
+独立验证使用临时 `CODEX_HOME` / `CLAUDE_CONFIG_DIR`,安装后读取宿主实际解析的启动配置,检查工具和 `openmotion_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 --cc mcp.ts
index eb85b685,d0d42aaf..57d4600f
--- a/mcp.ts
+++ b/mcp.ts
@@@ -1,6 -1,5 +1,6 @@@
+import { publicToolName, legacyToolName, publicToolResult } from './shared/public-names.mjs';
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';
@@@ -29,9 -28,13 +29,13 @@@ function trackingFor(store: WorkspaceSt
}
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;
+ const name = legacyToolName(message?.params?.name);
if (message?.jsonrpc !== '2.0' || message.id === undefined || message.method !== 'tools/call'
|| registry.profile !== 'phase1' || !(toolNames as readonly unknown[]).includes(name)) return invokeRpc(message, store, registry, connection);
const tracking = await trackingFor(store), started = performance.now(), callId = crypto.randomUUID();
@@@ -54,7 -57,10 +58,10 @@@ async function invokeRpc(message: any,
if (!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: 'openmotion', title: 'OpenMotion', 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. OpenMotion wraps Hyperframes Studio and its renderer. Only for tasks that require working in the editor or authoring a project, call openmotion_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 openmotion_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 openmotion_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 OpenMotion 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.' });
++ return result({ protocolVersion, capabilities: { tools: {}, ...(registry.profile === 'phase1' ? { resources: {} } : {}) }, serverInfo: { name: 'openmotion', title: 'OpenMotion', 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. OpenMotion wraps Hyperframes Studio and its renderer. Only for tasks that require working in the editor or authoring a project, call openmotion_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 openmotion_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 openmotion_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 OpenMotion 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 --cc scripts/export-adapters.ts
index 155a74d1,69ad3dc6..0d6777bf
--- a/scripts/export-adapters.ts
+++ b/scripts/export-adapters.ts
@@@ -101,12 -101,12 +101,12 @@@ export async function exportAdapters(ru
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: manifestDescription ?? 'OpenDesign Motion with the shared local MCP runtime.',
+ const manifest = { name: 'openmotion', version: pkg.version,
+ description: manifestDescription ?? 'OpenMotion 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: 'OpenMotion', shortDescription: manifestShortDescription ?? 'OpenMotion 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);
++ interface: { ...runtimeInterface, displayName: 'OpenMotion', shortDescription: manifestShortDescription ?? 'OpenMotion production with the shared local runtime.' } } : manifest);
+ text('.mcp.json', host === 'codex' ? { mcpServers: { openmotion: info.transport } } : integrationConfig(info, 'mcp').text);
}
const directory = path.join(output, host, 'openmotion');
for (const file of files) {
diff --cc tests/adapters.test.ts
index 0880a296,300a0643..c95ed7e7
--- a/tests/adapters.test.ts
+++ b/tests/adapters.test.ts
@@@ -53,14 -52,23 +53,23 @@@ test('local adapters share one runtime
}
if (host === 'codex') {
assert.equal(manifest.requires_local_executor, true);
- assert.equal(manifest.interface.displayName, 'OpenDesign');
+ assert.equal(manifest.interface.displayName, 'OpenMotion');
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' },
+ assert.deepEqual(marketplace.plugins[0], { name: 'openmotion', source: { source: 'local', path: './openmotion' },
policy: { installation: 'AVAILABLE', authentication: 'ON_INSTALL' }, category: 'Productivity' });
}
- assert.equal(await readFile(path.join(plugin, 'skills/motion-production/SKILL.md'), 'utf8'), await readFile(path.join(source, 'skills/motion-production/SKILL.md'), 'utf8'));
+ assert.equal(await readFile(path.join(plugin, 'skills/openmotion-production/SKILL.md'), 'utf8'), await readFile(path.join(source, 'skills/openmotion-production/SKILL.md'), 'utf8'));
for (const filename of ['AGENTS.md', 'CLAUDE.md', 'docs/README.md', 'docs/product/architecture.md']) {
assert.equal(await readFile(path.join(plugin, filename), 'utf8'), await readFile(path.join(source, filename), 'utf8'));
}
diff --cc tests/mcp.test.ts
index 4bdd6129,8829c64b..34c1bbe2
--- a/tests/mcp.test.ts
+++ b/tests/mcp.test.ts
@@@ -13,11 -14,16 +14,19 @@@ test('actual MCP stdio exposes exactly
const 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));
+ assert.equal(responses[0].result.serverInfo.name, 'openmotion');
+ assert.equal(responses[0].result.serverInfo.title, 'OpenMotion');
+ 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.ok(responses[1].result.tools.every((tool: any) => tool.title.startsWith('OpenMotion · ')));
+ assert.ok(responses[1].result.tools.every((tool: any) => tool.name.startsWith('openmotion_')));
assert.match(responses[2].result.content[0].text, /MCP_TOOL_NOT_EXPOSED/);
assert.match(responses[3].result.content[0].text, /INVALID_ARGUMENT/);
assert.deepEqual(await store.get(), before);