MCP: Cut and Edit package (#200) #214

Merged
crowmaki merged 2 commits from issue-200-mcp-cut into main 2026-10-14 07:20:43 +00:00
Owner

Closes #200. Part of #157.

A harness can now shape the rough cut and hand it to Resolve. Each tool wraps an existing ApiImpl command. Line assignment lands in the undo log with its usual labels ("Assign line to 1B", "Reset line to default").

Tools

  • read_animatic: a Scene's Animatic. It has each Line's timing, the Shots over it and the Shot it plays from (overridden when assigned by hand). Each stretch of the Cut comes with its Shot and the circled Take it plays, or else a Board, Playblast or "no coverage" slate. The Performance's audio blob id is left out.
  • assign_cut_line: assigns a Line (with its dual dialogue partner) to a Shot over it, or resets it when shotId is absent. Returns read_animatic for the Line's Scene.
  • export_edit_package: exports every non-NG Take, or with circledOnly only the circled ones. Returns folder, clips, unchanged, setAside and timelines, the absolute paths of the timeline files written. folder must be absolute. When absent, the export goes to the folder the Project remembers. sceneIds defaults to every production Scene. When the client sends a progress token, each file goes out as a progress notification (done of total, named), with a last one at the total.

Core

The export result didn't list the timeline files, so EditPackageOutcome (and its DTO and bindings.ts) now has timelines: per-Scene ones in script order, then the whole film's. The UI could show them too. A new studio-core test checks the list.

Tests

src-tauri/tests/mcp_cut.rs covers each acceptance criterion:

  • The Animatic read reflects an assignment and a reset, with their undo labels.
  • Export returns a folder and timeline paths that exist on disk under it. Circled only exports just the circled Take.
  • Progress notifications arrive during export, with one token, rising progress, one total, and a last report at the total.

It also covers: the Animatic playing a circled Take, refusing a Shot that doesn't cover the Line, refusing a relative folder, and reusing the remembered folder (with an error before any export).

The full cargo test passes, and so does npm run check.

Known limits

If the client cancels an export request, the export still runs to the end in the background, as it does in the UI.

Closes #200. Part of #157. A harness can now shape the rough cut and hand it to Resolve. Each tool wraps an existing `ApiImpl` command. Line assignment lands in the undo log with its usual labels ("Assign line to 1B", "Reset line to default"). ## Tools - `read_animatic`: a Scene's Animatic. It has each Line's timing, the Shots over it and the Shot it plays from (`overridden` when assigned by hand). Each stretch of the Cut comes with its Shot and the circled Take it plays, or else a Board, Playblast or "no coverage" slate. The Performance's audio blob id is left out. - `assign_cut_line`: assigns a Line (with its dual dialogue partner) to a Shot over it, or resets it when `shotId` is absent. Returns `read_animatic` for the Line's Scene. - `export_edit_package`: exports every non-NG Take, or with `circledOnly` only the circled ones. Returns `folder`, `clips`, `unchanged`, `setAside` and `timelines`, the absolute paths of the timeline files written. `folder` must be absolute. When absent, the export goes to the folder the Project remembers. `sceneIds` defaults to every production Scene. When the client sends a progress token, each file goes out as a progress notification (`done` of `total`, named), with a last one at the total. ## Core The export result didn't list the timeline files, so `EditPackageOutcome` (and its DTO and `bindings.ts`) now has `timelines`: per-Scene ones in script order, then the whole film's. The UI could show them too. A new `studio-core` test checks the list. ## Tests `src-tauri/tests/mcp_cut.rs` covers each acceptance criterion: - The Animatic read reflects an assignment and a reset, with their undo labels. - Export returns a folder and timeline paths that exist on disk under it. Circled only exports just the circled Take. - Progress notifications arrive during export, with one token, rising progress, one total, and a last report at the total. It also covers: the Animatic playing a circled Take, refusing a Shot that doesn't cover the Line, refusing a relative folder, and reusing the remembered folder (with an error before any export). The full `cargo test` passes, and so does `npm run check`. ## Known limits If the client cancels an export request, the export still runs to the end in the background, as it does in the UI.
read_animatic reads a Scene's Animatic: each Line's timing, the Shots
over it and the one it plays from, and each stretch of the Cut with its
Shot and the circled Take it plays, leaving out the Performance's audio
blob. assign_cut_line assigns a Line to a Shot over it, or resets it,
and returns the Animatic.

export_edit_package exports to a given folder or the one the Project
remembers, for every production Scene unless told which, and returns
the folder and the timeline files written. The export outcome now lists
those timeline paths, so the UI could show them too. With a progress
token, export progress goes out as MCP progress notifications.
Export sends a last progress notification at its total, since each report
names the file about to be written. The descriptions say which circled Take
the Animatic plays and that a Complex shot plays its Playblast. line() returns
an error instead of panicking, and the export helper is export_package.
crowmaki deleted branch issue-200-mcp-cut 2026-10-14 07:20:43 +00:00
Sign in to join this conversation.
No description provided.