Skip to content

feat(vn): let a finished project hand its media to VN for fine-grained editing - #160

Open
jiabinchen wants to merge 1 commit into
Utopai-Research:mainfrom
jiabinchen:feat/vn-editing
Open

jiabinchen wants to merge 1 commit into
Utopai-Research:mainfrom
jiabinchen:feat/vn-editing

Conversation

@jiabinchen

Copy link
Copy Markdown

Summary

PAI-Pro generates the raw material for a film — script, characters, locations, voices, storyboards, clips — and then stops at the canvas. This PR adds the missing last mile: an editing handoff to VN, so the generated media can be imported into a VN draft and finished with real editing tools.

The intent of the integration is simple: generate in PAI-Pro, then import into VN for fine-grained editing. It runs fully local — no CawCut account, no upload.

About VN

VN (download) is a cross-platform video editor for macOS, Windows, iOS, and Android. Its editor covers the work a generation canvas does not:

  • multi-track editing, picture-in-picture
  • text and subtitles, auto captions
  • music, effects, AI transitions
  • keyframes, speed curves, reverse, frame interpolation
  • voice change, image editing, and AI tools

CawCut publishes the cawcut CLI that writes VN's draft format directly. This PR vendors CawCut's cawcut-vn agent skill and wires it into PAI-Pro, so the agent can build a validated VN draft from a project's landed media and hand it to the app for that deeper edit.

What's included

  • Vendored skill — skills/cawcut-vn/ (SKILL.md + references/), taken from cawcut/skill v0.6.0. Registered in .claude-plugin/marketplace.json and the PROJECT_AGENT.md skills-routing table, so both Claude Code and Codex projects get it.
  • Handoff — story-to-video-workflow now closes a completed run with one choice: open the cut in VN, or inspect the Timeline first. Generation stays single-entry — VN hands media requests back through story-to-video-workflow, never straight to a capability skill.
  • Availability detection — before offering VN the agent runs cawcut vn status. "Open in VN" is offered only when VN is installed and meets the minimum version. On an unsupported platform (Linux — i.e. the Docker container) the agent says so and gives the host handoff instead of promising an open that cannot happen.
  • Docker — the image installs the cawcut CLI (npm install -g @ubnt/cawcut --ignore-scripts, so its postinstall can't shadow the bundled skill) and zip, so the container can build and pack a draft. It cannot open VN.
  • Docs — new docs/vn-editing.md (flow + the Docker docker cp handoff), linked from README, docs/skills.md, docs/setup.md, and the FAQ.

pai-pro-specific adaptations to the vendored skill

The skill is CawCut's; four small edits make it fit here (called out in a pai-pro adaptation section inside the SKILL.md, so a future re-sync from upstream is aware of them):

  1. Generation handoffs name story-to-video-workflow instead of the CawCut marketplace skills.
  2. Drafts are created inside the project (--dir), not the CLI's ~/Downloads default.
  3. Opening is gated on cawcut vn status / platform support (see phase 9).
  4. The question tool is mapped for both runtimes (AskUserQuestion → Codex request_user_input), noted in PROJECT_AGENT.md.

Verification

  • docker build --check . — no warnings.
  • server suite: 366 passing, 1 failing — the failure (require_background_hook.test.js) is pre-existing on main (reproduced there) and is a Node MODULE_TYPELESS_PACKAGE_JSON warning from the workspace root, unrelated to this change.
  • Internal doc links resolve.

Notes for reviewers

  • Per CONTRIBUTING's "new Skills" carve-out, flagging that this skill is authored and owned by CawCut (MIT, vendored with a version pin), not a community rewrite. Happy to adjust how it's vendored or noted.
  • Docker builds and packs a draft but cannot open it — VN is a macOS/Windows app. The host-side open is documented in docs/vn-editing.md (docker cp the .vn out, open it where VN is installed).
  • CLA will be signed.

@jiabinchen
jiabinchen marked this pull request as ready for review September 23, 2026 01:54
@jiabinchen

Copy link
Copy Markdown
Author

Hi @jeffliangf @Ruijian-Zha-Utopai,

I've just opened this PR to bridge the gap between PAI-Pro and VN Editor.

Why this matters: A significant number of VN users in our community have expressed a strong desire to combine PAI-Pro's powerful generative capabilities with VN's fine-grained timeline editing. This integration delivers exactly that—enabling a seamless "Generate in PAI-Pro, Finish in VN" workflow entirely locally.

We would love to know your thoughts on this integration. Also, please let us know:

  1. Your initial impression or intent regarding aligning with VN.
  2. Any specific requirements, architectural preferences, or testing scenarios we need to cooperate on during the review/contribution process.

Looking forward to your feedback! 🚀

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