Skip to content

Add OpenFilm MiniApp - #73

Open
cristinamadureira353-svg wants to merge 1 commit into
MiniMax-AI:mainfrom
cristinamadureira353-svg:add-openfilm-miniapp
Open

cristinamadureira353-svg wants to merge 1 commit into
MiniMax-AI:mainfrom
cristinamadureira353-svg:add-openfilm-miniapp

Conversation

@cristinamadureira353-svg

@cristinamadureira353-svg cristinamadureira353-svg commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Add OpenFilm MiniApp

What and why

OpenFilm is an open-source video editor with an agent chat — original repository: https://github.com/openfilm/openfilm. This package puts the OpenFilm desktop interface inside MiniMax Code as a MiniApp: the Studio editor with the desktop chat column and local agents, not only the plain web Studio.

The desktop app is Electron, and a MiniApp can only be a page + a Node process, so the Electron window itself cannot be embedded. What this package does instead is serve the desktop app's own page and replace the Electron native bridge (window.openfilmNative) with an HTTP one:

  • apps/desktop/shell/bridge.ts never imports electron — it only consumes window.openfilmNative, so the built shell/dist can be served as-is with a small injected bridge (miniapp/client/bridge-web.js).
  • The desktop main-process handlers are plain Node (chat-ipc.mjs, local-agents-ipc.mjs, skills-ipc.mjs, agent-roster.mjs, agents.mjs, agent-usage.mjs, app-report.mjs — none of them imports electron). They are registered against an HTTP ipcMain shim, so chat, local agents, skills and Settings → Agents run the desktop app's real code.
  • Agent events go over SSE; the fake webContents.send() forwards to it. Studio's /api/* and its WebSocket event stream are proxied same-origin, with the key attached on the server side only.

@openfilm/desktop is not published to npm, so desktop mode needs a local clone of openfilm/openfilm and one pnpm --filter @openfilm/desktop build:shell. Without it the panel falls back to the plain web Studio (no chat column). This is documented in the README.

Also included: opens the most recent project on launch (project switching then happens inside OpenFilm itself — no extra chrome of our own), an agent-callable endpoint that launches/activates the installed desktop app, a concurrent-boot lock (two panels start one Studio), and a dispose that closes local agent sessions, ends SSE streams, and quits only the Studio this instance spawned.

Security

  • Loopback authentication is left to the Host (MiniMax Code 3.1.2+): no token logic in this package, and no secrets in HTML, client JavaScript, logs, or error responses.
  • Durable state lives under context.dataDir (openfilm-studio/). The user's own desktop Studio home is never taken over.
  • BYOK keys are sealed with AES-256-GCM using a local 0600 master key in that state directory (the desktop app uses the OS keychain; they are not shared).
  • The user's real OpenFilm studio.json and .film/id files are only read, never written by the panel itself.

Testing

Environment: MiniMax Code desktop on macOS (Apple Silicon), Node 22, OpenFilm 0.2.5, an openfilm/openfilm clone with build:shell run.

  • npm run check — this package: OK, 0 errors, 0 warnings (other warnings in the output belong to existing packages).
  • Acceptance script (37 checks, all passing): Studio boot, project tree (5 groups, no stale entries), desktop page served, desktop IPC (hello, local-agents:list, prefs), real chat:load sessions, agent roster (11 agents), skills/MCP channels, SSE, web fallback, missing-shell error, two instances racing (one spawned, one reused, a single Studio process), and dispose with an open SSE stream (does not hang; no Studio left behind).
  • Manual in MiniMax Code: the desktop page renders with the chat column and real conversation history; project switching works; the preview actually draws frames (it used to sit on "drawing the first frame" because the film bridge only talks to the editor origin); Settings → Agents shows Codex (connected, ChatGPT account), Claude Code (not installed), BYOK and MiniMax Code.
  • desktop:local-agents:probe for Codex starts a real ACP session (@agentclientprotocol/codex-acp 1.13.1); Claude Code correctly reports not-installed.

Not exercised: a full agent turn end to end (it would spend the user's agent quota and modify a real project) — only the ACP probe was run. Windows/Linux are untested (some paths use open, pbcopy, ps). Native file pickers and screen capture return null by design.

Notes for the reviewer

  • OpenFilm is open source (https://github.com/openfilm/openfilm). This package does not copy or vendor any of that code; it drives OpenFilm at runtime (the desktop handlers are imported from the user's clone). The original author has authorized this packaging and public sharing (see NOTICE.md).
  • miniapp.config.local.json is gitignored: machine-specific overrides (repo path, which desktop app to launch, legacy state home) stay out of the package.
  • Root README rows were added in both languages.

Run OpenFilm inside MiniMax Code with the desktop interface: the Studio
editor plus the desktop chat column and local agents, by serving the
desktop page and bridging window.openfilmNative over HTTP, reusing the
desktop app's own Node handlers (chat, local agents, skills, roster).

- desktopMode with web-Studio fallback when the OpenFilm clone/shell
  build is unavailable
- project switcher, desktop-app launcher, concurrent-boot lock,
  dispose that closes agents, SSE streams and only our own Studio
- state under context.dataDir; no secrets in pages or logs
- README (en/zh-CN), LICENSE, root README rows

Validated: npm run check (this package OK, 0 errors 0 warnings);
32-check acceptance covering boot, tree, desktop IPC, roster, SSE,
web fallback, missing shell, concurrent boot and dispose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant