How diffusionstudio/editor works
Diffusion Studio is a code-driven video editor built for both agents and people. The main workflow is: an agent or user opens a project folder, edits its JSX composition or manipulates the visual editor, then inspects media and renders the result. The web editor mounts compositions into an ECS-backed runtime; the desktop app exposes editing and media tools to agents through MCP and CLI interfaces. The README documents these product-level links; sampled source confirms the engine’s runtime systems and the desktop MCP server’s dispatch. Several subsystems are represented by their existing directories because their implementation files were not sampled.
Main entry points: create-engine.ts Editor engine · server.ts Desktop MCP server · main.ts Desktop application · generate.ts Project composition
Components 22
Project authoring
- Project composition
packages/jsx/src/generate.ts - Project files
apps/web/src/projects/fs.ts - Composition mount
packages/reconciler/src/document.ts
Visual editor
- Editor application
apps/web/src/app.tsx - Canvas and inspector
apps/web/src/components/canvas/canvas.tsx - Editor engine
apps/web/src/engine/create-engine.ts - Timeline controller
apps/web/src/engine/timeline/controller.ts
Media production
- Scene renderer
packages/runtime/src/systems/render.ts - Video export
packages/encoder/src/encoder.ts - Generative assets
apps/web/src/components/genai/use-generate-image.tsx - Object masking
apps/web/src/engine/object-mask/index.ts
Agent access
- CLI commands
apps/cli/src/index.ts - MCP tool catalog
packages/dapi/src/index.ts - Desktop MCP server
apps/desktop/src/dapi/server.ts - Agent chat host
packages/agent-chat/src/host/server.ts - Media inspection tools
packages/dapi/src/tools/media-segment.ts
Desktop services
- Desktop application
apps/desktop/src/main.ts - Desktop IPC bridge
apps/desktop/src/main-manager.ts - Project management
apps/desktop/src/projects.ts
Other components
- User
- Coding agent
- AI model services
Connections 28
- User → Project files: opens folder
README.md - Coding agent → CLI commands: issues commands
README.md - Coding agent → Desktop MCP server: uses MCP tools
README.md - CLI commands → MCP tool catalog: exposes same tools
README.md - Desktop MCP server → MCP tool catalog: serves catalog
apps/desktop/src/dapi/server.ts - Desktop MCP server → Media inspection tools: dispatches tools
- Coding agent → Agent chat host: chats with host
- User → Editor application: edits project
README.md - Project files → Project composition: stores source
README.md - Project composition → Composition mount: compiles and mounts
README.md - Composition mount → Editor engine: mounts into runtime
README.md - Editor application → Canvas and inspector: presents editor
- Canvas and inspector → Editor engine: edits scene
- Editor engine → Scene renderer: runs render system
apps/web/src/engine/create-engine.ts - Editor engine → Timeline controller: runs timeline system
apps/web/src/engine/create-engine.ts - Timeline controller → Editor engine: updates view state
apps/web/src/engine/timeline/controller.ts - Scene renderer → Video export: provides rendered frames
- Editor engine → Generative assets: composes generated assets
README.md - Generative assets → AI model services: requests generation
- Editor engine → Object masking: supports object masks
apps/web/src/engine/create-engine.ts - User → Desktop application: opens desktop app
README.md - Desktop application → Project management: handles project requests
apps/desktop/src/main.ts - Desktop application → Desktop IPC bridge: registers IPC handlers
apps/desktop/src/main.ts - Desktop IPC bridge → Desktop application: routes requests
apps/desktop/src/main-manager.ts - Desktop application → Desktop MCP server: starts MCP server
apps/desktop/src/main.ts - Desktop MCP server → Editor engine: invokes editor tools
- Coding agent → Media inspection tools: inspects footage
README.md - User → Video export: renders final video
README.md