MCP: Performance (#199) #213

Merged
crowmaki merged 2 commits from issue-199-mcp-performance into main 2026-10-14 06:51:17 +00:00
Owner

Closes #199. Part of #157.

A harness can now set up the dialogue timing that drives Shots. Each tool wraps an existing ApiImpl command. Edits land in the undo log with their usual labels, except import and Bounce, which core does not make undoable.

Tools

  • read_performance: a Scene's Performance with its version, Line marks (units), the previous version's marks (ghost), every version and whether it is off. It is null when the Scene has none. The audio blob id and waveform are left out because a harness can't use them.
  • import_performance: imports an audio file (absolute path) over a run of Lines, or over all of them, and auto-places the marks.
  • set_performance_mark / rerun_performance_auto_placement: change the marks of the Scene's newest version. They take a sceneId, because only the newest version can be edited.
  • bounce_performance: bounces the Cut into a new version. Returns holeLineIds and the Performance.
  • set_performance_off: switches the Performance off and on. A Scene without a Performance is refused.

The server instructions now say what a Bounce is and how a Performance affects its Shots.

Tests

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

  • Import, then read back the Performance and its marks.
  • Moving a mark and rerunning auto-placement change the read, with their undo labels.
  • Bounce makes a new version, both carried forward and from a circled Take.
  • Switching off and on round-trips, with its undo labels.

It also covers the refusals: a relative path, and marks or the off/on switch on a Scene without a Performance.

The ffmpeg lavfi code the tests repeated is now one helper, common::mcp::lavfi.

The full cargo test passes.

Closes #199. Part of #157. A harness can now set up the dialogue timing that drives Shots. Each tool wraps an existing `ApiImpl` command. Edits land in the undo log with their usual labels, except import and Bounce, which core does not make undoable. ## Tools - `read_performance`: a Scene's Performance with its version, Line marks (units), the previous version's marks (ghost), every version and whether it is off. It is `null` when the Scene has none. The audio blob id and waveform are left out because a harness can't use them. - `import_performance`: imports an audio file (absolute path) over a run of Lines, or over all of them, and auto-places the marks. - `set_performance_mark` / `rerun_performance_auto_placement`: change the marks of the Scene's newest version. They take a `sceneId`, because only the newest version can be edited. - `bounce_performance`: bounces the Cut into a new version. Returns `holeLineIds` and the Performance. - `set_performance_off`: switches the Performance off and on. A Scene without a Performance is refused. The server instructions now say what a Bounce is and how a Performance affects its Shots. ## Tests `src-tauri/tests/mcp_performance.rs` covers each acceptance criterion: - Import, then read back the Performance and its marks. - Moving a mark and rerunning auto-placement change the read, with their undo labels. - Bounce makes a new version, both carried forward and from a circled Take. - Switching off and on round-trips, with its undo labels. It also covers the refusals: a relative path, and marks or the off/on switch on a Scene without a Performance. The ffmpeg `lavfi` code the tests repeated is now one helper, `common::mcp::lavfi`. The full `cargo test` passes.
read_performance reads a Scene's Performance with its Line marks, its
versions and whether it is off, leaving out the audio blob and waveform.
import_performance imports an audio file over a run of Lines, or all of
them. set_performance_mark and rerun_performance_auto_placement change
the marks of the Scene's newest version. bounce_performance bounces the
Cut into a new version and reports its holes. set_performance_off
switches the Performance off and on.

The server instructions say what a Bounce is and what a Performance
does to its Shots.
set_performance_off refuses a Scene without a Performance instead of
recording an edit that changes nothing a harness can read. The off and
on switches are checked against their undo labels, and a Bounce of a
circled Take is tested, with the Take named as its source.

set_performance_mark's index and atMs say their real bounds, and the
tools that resolve a Scene's Performance first share one idiom. The
read_coverage doc line goes back on coverage().

The ffmpeg lavfi boilerplate the tests repeated moves into
common::mcp::lavfi.
crowmaki deleted branch issue-199-mcp-performance 2026-10-14 06:51:17 +00:00
Sign in to join this conversation.
No description provided.