davinci-resolve-mcp 2.176.0 → 2.178.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  Release history for the DaVinci Resolve MCP Server. The latest release is summarized in the root README; older entries live here to keep the README focused.
4
4
 
5
+ ## What's New in v2.178.0 — E124: the manifest and the changelist know a compound when they see one
6
+
7
+ ### Fixed
8
+
9
+ - **`conform_manifest` names a compound clipitem.** Resolve's XML writer
10
+ collapses a compound to one media-less item (E121); the manifest failed it
11
+ as "no resolved path". It now fails by NAME with the remedy — map the
12
+ compound's name to a flattened media file, or turn over as OTIO, where
13
+ nested Stacks flatten (E120) — and resolves like any source once mapped.
14
+ - **`turnover_changelist` reports a compound collapse once.** The same
15
+ compound seen flattened in one cut (OTIO) and collapsed in the other
16
+ (XML) read as a replacement plus a gone cut. It is now
17
+ `compound_collapsed` / `compound_expanded` (name, track, positions,
18
+ inner cut count) and its cuts leave the pairing; a collapsed compound of
19
+ another name over those cuts stays a real replacement.
20
+
21
+ ## What's New in v2.177.0 — E123: round-trip QC is compound-aware; flattening keeps the junctions
22
+
23
+ ### Added
24
+
25
+ - **`verify_roundtrip` understands the two writers' compound forms.**
26
+ Resolve's OTIO writer flattens a compound's inner cuts (E120) while its
27
+ FCP7 writer collapses the compound to one media-less clipitem (E121), so
28
+ verifying flattened input cuts against an XML re-export read as count and
29
+ source drift. An exported compound whose span covers input cuts flattened
30
+ FROM that same compound now leaves the pairwise compare and is reported
31
+ in `compoundsCollapsedInExport` (name, track, span, inner cut count). A
32
+ collapsed compound over cuts that did not come from it stays drift.
33
+
34
+ ### Verified
35
+
36
+ - Flattening keeps the junctions: an inner dissolve inside a nested Stack
37
+ and a transition INTO the compound both author at their flattened
38
+ positions — the bridge places both and drops none.
39
+
5
40
  ## What's New in v2.176.0 — E122: frame QC never scores a compound clip as a false red
6
41
 
7
42
  ### Fixed
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [简体中文](README.zh-CN.md)
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.176.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.178.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-36%20(353%20full)-blue.svg)](#server-modes)
package/README.zh-CN.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md) | 简体中文
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.176.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.178.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-36%20(353%20full)-blue.svg)](#服务器模式)
@@ -12,7 +12,7 @@
12
12
  [![Python](https://img.shields.io/badge/python-3.10+-green.svg)](https://www.python.org/downloads/)
13
13
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
14
14
 
15
- > 本翻译对应 v2.176.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
15
+ > 本翻译对应 v2.178.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
16
16
 
17
17
  一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
18
18
 
package/install.py CHANGED
@@ -37,7 +37,7 @@ from src.utils.update_check import (
37
37
 
38
38
  # ─── Version ──────────────────────────────────────────────────────────────────
39
39
 
40
- VERSION = "2.176.0"
40
+ VERSION = "2.178.0"
41
41
  # Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
42
42
  # Resolve's scripting bridge loads into newer interpreters on recent builds
43
43
  # (Python 3.14 verified against Resolve Studio 20.3.2). Older Resolve builds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davinci-resolve-mcp",
3
- "version": "2.176.0",
3
+ "version": "2.178.0",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -925,7 +925,7 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
925
925
  if (!v.length) return [];
926
926
  const off = anchorOfSide(evts);
927
927
  return v
928
- .map((e) => ({ track: canonTrack(e.track), source: mapSource(canonSource(e.source)), recIn: e.recIn - off, recOut: e.recOut - off, srcIn: e.srcIn ?? 0, speed: e.speed ?? 100, reverse: Boolean(e.reverse), color: e.color && typeof e.color === 'object' ? { r: Number(e.color.r) || 0, g: Number(e.color.g) || 0, b: Number(e.color.b) || 0 } : null }))
928
+ .map((e) => ({ track: canonTrack(e.track), source: mapSource(canonSource(e.source)), recIn: e.recIn - off, recOut: e.recOut - off, srcIn: e.srcIn ?? 0, speed: e.speed ?? 100, reverse: Boolean(e.reverse), color: e.color && typeof e.color === 'object' ? { r: Number(e.color.r) || 0, g: Number(e.color.g) || 0, b: Number(e.color.b) || 0 } : null, compound: e.compound || null, fromCompound: e.fromCompound || null }))
929
929
  .sort((a, b) => a.track.localeCompare(b.track) || a.recIn - b.recIn);
930
930
  };
931
931
  // FADES (E94): BL legs on the input side and the Solid Color generators a
@@ -1029,8 +1029,25 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
1029
1029
  }
1030
1030
  }
1031
1031
  }
1032
- const a = a0.filter((e) => !isBlackSeg(e));
1033
- const b = b0.filter((e) => !isBlackSeg(e));
1032
+ // COMPOUNDS COLLAPSED BY THE EXPORT (E123): Resolve's FCP7 writer flattens
1033
+ // a compound to one media-less clipitem (E121) while an OTIO turnover
1034
+ // flattens the compound's inner cuts (E120). An exported compound whose
1035
+ // span covers input cuts flattened FROM that same compound is not drift —
1036
+ // the export simply cannot show the inside. Those cuts and the collapsed
1037
+ // item leave the pairwise compare and the result names the compound.
1038
+ const compoundsCollapsedInExport = [];
1039
+ const collapsedIn = new Set();
1040
+ const collapsedEx = new Set();
1041
+ for (const ex of b0) {
1042
+ if (!ex.compound) continue;
1043
+ const inner = a0.filter((e) => e.fromCompound && canonSource(e.fromCompound) === canonSource(ex.compound) && e.track === ex.track && e.recIn < ex.recOut && e.recOut > ex.recIn);
1044
+ if (!inner.length) continue;
1045
+ compoundsCollapsedInExport.push({ name: ex.compound, track: ex.track, record: [ex.recIn, ex.recOut], innerCuts: inner.length });
1046
+ for (const e of inner) collapsedIn.add(e);
1047
+ collapsedEx.add(ex);
1048
+ }
1049
+ const a = a0.filter((e) => !isBlackSeg(e) && !collapsedIn.has(e));
1050
+ const b = b0.filter((e) => !isBlackSeg(e) && !collapsedEx.has(e));
1034
1051
  const blackSegments = { input: a0.length - a.length, exported: b0.length - b.length };
1035
1052
  const n = comparePairs(a, b, junctionsFor(/^V\d*$/), 'video');
1036
1053
 
@@ -1101,6 +1118,7 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
1101
1118
  pass: mismatches.length === 0, pairs: n, srcOffsets, mismatches, markers,
1102
1119
  ...(generatorColours.compared ? { generatorColours } : {}),
1103
1120
  ...(generatorColourNotInExport ? { generatorColourNotInExport } : {}),
1121
+ ...(compoundsCollapsedInExport.length ? { compoundsCollapsedInExport } : {}),
1104
1122
  ...(markersNotInExport ? { markersNotInExport } : {}),
1105
1123
  ...(blackSegments.input || blackSegments.exported ? { blackSegments } : {}),
1106
1124
  ...(fadeReshapedBoundaries.length ? { fadeReshapedBoundaries } : {}),
@@ -738,8 +738,29 @@ function pairEvents(oldEvents, newEvents, recTol = 1) {
738
738
  */
739
739
  export function diffChangelist(oldEvents, newEvents, opts = {}) {
740
740
  const recTol = opts.recTolerance ?? 1;
741
- const P = pairEvents(oldEvents, newEvents, recTol);
742
741
  const changes = [];
742
+ // COMPOUND FORMS (E124): a compound is one collapsed item in an XML cut
743
+ // (`compound`) and its flattened inner cuts in an OTIO cut (`fromCompound`).
744
+ // The same compound in both forms is not a replacement plus a gone cut —
745
+ // it is reported once as compound_collapsed / compound_expanded and its
746
+ // cuts leave the pairing.
747
+ const skipOld = new Set(), skipNew = new Set();
748
+ const sameName = (a, b) => String(a || '').toLowerCase() === String(b || '').toLowerCase();
749
+ for (const ne of newEvents) {
750
+ if (!ne.compound) continue;
751
+ const inner = oldEvents.filter((oe) => oe.fromCompound && sameName(oe.fromCompound, ne.compound) && oe.track === ne.track && oe.recIn < ne.recOut && oe.recOut > ne.recIn);
752
+ if (!inner.length) continue;
753
+ inner.forEach((oe) => skipOld.add(oe)); skipNew.add(ne);
754
+ changes.push({ kind: 'compound_collapsed', name: ne.compound, track: ne.track, oldRecIn: Math.min(...inner.map((o) => o.recIn)), newRecIn: ne.recIn, innerCuts: inner.length });
755
+ }
756
+ for (const oe of oldEvents) {
757
+ if (!oe.compound || skipOld.has(oe)) continue;
758
+ const inner = newEvents.filter((ne) => ne.fromCompound && sameName(ne.fromCompound, oe.compound) && ne.track === oe.track && ne.recIn < oe.recOut && ne.recOut > oe.recIn);
759
+ if (!inner.length) continue;
760
+ inner.forEach((ne) => skipNew.add(ne)); skipOld.add(oe);
761
+ changes.push({ kind: 'compound_expanded', name: oe.compound, track: oe.track, oldRecIn: oe.recIn, newRecIn: Math.min(...inner.map((n) => n.recIn)), innerCuts: inner.length });
762
+ }
763
+ const P = pairEvents(oldEvents.filter((e) => !skipOld.has(e)), newEvents.filter((e) => !skipNew.has(e)), recTol);
743
764
 
744
765
  for (const { oe, ne } of P.pairs) {
745
766
  const deltas = {};
@@ -889,6 +910,14 @@ export function conformManifest(events, resolution = {}, opts = {}) {
889
910
  rows.push({ index: e.index, source: e.source, track: e.track, pass: blPass, checks });
890
911
  continue;
891
912
  }
913
+ if (e.compound && !(res.path || res.online)) {
914
+ // A compound clipitem (Resolve's XML writer collapses a compound to one
915
+ // media-less item, E121) has no flat source unless the resolution maps
916
+ // its name to a flattened file — say so instead of "no resolved path".
917
+ add('source_resolved', false, `compound clip "${e.compound}" — the XML carries no inner content; map its name to a flattened media file, or turn over as OTIO (nested Stacks flatten)`);
918
+ rows.push({ index: e.index, source: e.source, track: e.track, pass: false, compound: e.compound, checks });
919
+ continue;
920
+ }
892
921
  add('source_resolved', res.online !== false && !!(res.path || res.online), res.online === false ? 'offline' : res.path ? undefined : 'no resolved path');
893
922
  // Handles — and transition-handle starvation (a dissolve needs handle ≥ half its duration each side).
894
923
  const needHandle = Math.max(minHandle, e.transition ? Math.ceil((e.transition.duration || 0) / 2) : 0);
@@ -86,7 +86,7 @@ const markerSchema = z.object({
86
86
  export const editorialTool = {
87
87
  name: 'editorial',
88
88
  description:
89
- 'Editorial integrity (Cluster E) — turnover interchange → normalized events → changelist + conform manifest with TIMING silent-lie guards (flattened retime / dropped J/L-cut audio / framerate-pulldown slip / reverse dropped / transition-handle starvation → flag, skip-not-fake). Report-only (gate: review). Actions: parse_interchange (EDL/OTIO/XMEML natively — incl. Resolve-written OTIO generator clips (a Solid Color is a Clip with a NULL media_reference; it walks as a BL leg with generatorName, and an OTIO GeneratorReference carries its colour) and nested OTIO Stacks (compound clips — Resolve\'s writer nests them with a trim window) FLATTEN into record time with fromCompound on each cut, so Resolve\'s own OTIO exports re-conform (its FCP7 XML writer flattens a compound to ONE media-less clipitem instead — tagged `compound`, which the bridge drops with a reason in unresolvedCompounds unless the sourceMap maps the compound name to a flattened media file), Resolve-written FCP7 -1 junction edges (paired in record order) + Solid Color / Color Matte generators carrying their `fillcolor` (BL legs with `color` → fade-to-white and colour mattes author, E110), XMEML audio-track transitionitems as audio cross-fades on numbered lanes A/A2/…, and CMX FROM/TO CLIP NAME comments over the generic AX reel — + AAF via pyaaf2 (flat sound/picture slots number A/A2/… and V/V2/… in slot order so separate beds keep their lanes; NestedScope layers keep layer numbering) + PRPROJ via gunzip+XML → normalized events incl. span-explicit transitions, BL fade legs, and freezes as zero-speed events (OTIO FreezeFrame, XMEML timeremap 0, PrProj in==out, AAF 0% motion effects); for AAF/PRPROJ pass the file PATH as content; AAF also returns per-sequence startTimecode/startFrame — build the timeline at THAT start, not the Resolve 01:00:00:00 default — and per-clip `geometry` for Avid transform effects), list_sequences (ONE offline picker entry point across xml/edl/otio/drt/drp/aaf/prproj → [{id,name,eventCount}], plus startTimecode/startFrame for AAF), convert_to_interchange (author OTIO/EDL/DRT Resolve CAN import from events or a parsed source; the EDL target writes CMX transition pairs incl. BL fades — the .prproj→Resolve conform bridge, no Premiere needed; editorial timing/transitions survive and per-clip effects/color do not. SPEED/REVERSE survive on the otio (LinearTimeWarp) and edl (M2) targets ONLY — this FLAT drt target flattens every retime to 100% forward and returns `flattened`/`flattenedCount` naming each event that lost one (`flattened` is always present on `drt`, empty when there were none); for a .drt that AUTHORS retimes/dissolves/multi-track/audio, use drt.assemble_from_interchange), turnover_changelist (diff old vs new → moved/retimed/trimmed/replaced/new/gone PLUS the junction diff: transition_added/transition_dropped/transition_changed with fade in/out or dissolve, outgoing/incoming, span and duration/type/pre-roll deltas — zero-length CMX carrier lines and the BL legs that carry fades fold into the junction diff instead of reading as gone/new sources; events pair by closest record position, consumed once, so a source cut twice at two speeds compares instance to instance; + timing flags incl. transition_dropped and dropped_split_audio on any A-track), conform_manifest (per-event assert: source resolved/handles/retime/reverse/TC-base; BL-aware — black legs need no source, fades no black-side handles, and a fade-out tail requirement lands on the picture source), marker_roundtrip (markers with provenance tags), verify_roundtrip (input events vs re-export events -> pass/mismatches + fitted per-source TC offsets + marker compare w/ markersNotInExport honesty flag; FADE-AWARE: BL/Solid-Color legs merge out as blackSegments and fade-window boundary reshapes are excused into fadeReshapedBoundaries instead of failing; RETIME-AWARE: speed/reverse compare pairwise — EXPORT_OTIO carries an authored Sm2TimeMap back as LinearTimeWarp (measured), so a flattened/lost retime fails as drift geometry alone cannot catch; AUDIO-AWARE: declared audio events compare (a video-only export such as EXPORT_EDL flags audioNotInExport instead of failing) (channel legs deduped, mismatches tagged trackType audio) while the mirrored-A1 export of a video-only turnover stays informational; COLOUR-AWARE: an input generator leg carrying a fillcolor (fade-to-white, colour matte) must come back on the same track over its span with the same colour — Resolve\'s FCP7 writer emits it — else generator-colour fails (generatorColours reports the compare) — pass exportedFormat: an OTIO/EDL re-export cannot carry colour (measured) and reports generatorColourNotInExport instead of failing; the conform QC loop-closer). Offline (AAF needs pyaaf2; live AAF/DRP import is on the Python davinci-resolve MCP).',
89
+ 'Editorial integrity (Cluster E) — turnover interchange → normalized events → changelist + conform manifest with TIMING silent-lie guards (flattened retime / dropped J/L-cut audio / framerate-pulldown slip / reverse dropped / transition-handle starvation → flag, skip-not-fake). Report-only (gate: review). Actions: parse_interchange (EDL/OTIO/XMEML natively — incl. Resolve-written OTIO generator clips (a Solid Color is a Clip with a NULL media_reference; it walks as a BL leg with generatorName, and an OTIO GeneratorReference carries its colour) and nested OTIO Stacks (compound clips — Resolve\'s writer nests them with a trim window) FLATTEN into record time with fromCompound on each cut, so Resolve\'s own OTIO exports re-conform (its FCP7 XML writer flattens a compound to ONE media-less clipitem instead — tagged `compound`, which the bridge drops with a reason in unresolvedCompounds unless the sourceMap maps the compound name to a flattened media file), Resolve-written FCP7 -1 junction edges (paired in record order) + Solid Color / Color Matte generators carrying their `fillcolor` (BL legs with `color` → fade-to-white and colour mattes author, E110), XMEML audio-track transitionitems as audio cross-fades on numbered lanes A/A2/…, and CMX FROM/TO CLIP NAME comments over the generic AX reel — + AAF via pyaaf2 (flat sound/picture slots number A/A2/… and V/V2/… in slot order so separate beds keep their lanes; NestedScope layers keep layer numbering) + PRPROJ via gunzip+XML → normalized events incl. span-explicit transitions, BL fade legs, and freezes as zero-speed events (OTIO FreezeFrame, XMEML timeremap 0, PrProj in==out, AAF 0% motion effects); for AAF/PRPROJ pass the file PATH as content; AAF also returns per-sequence startTimecode/startFrame — build the timeline at THAT start, not the Resolve 01:00:00:00 default — and per-clip `geometry` for Avid transform effects), list_sequences (ONE offline picker entry point across xml/edl/otio/drt/drp/aaf/prproj → [{id,name,eventCount}], plus startTimecode/startFrame for AAF), convert_to_interchange (author OTIO/EDL/DRT Resolve CAN import from events or a parsed source; the EDL target writes CMX transition pairs incl. BL fades — the .prproj→Resolve conform bridge, no Premiere needed; editorial timing/transitions survive and per-clip effects/color do not. SPEED/REVERSE survive on the otio (LinearTimeWarp) and edl (M2) targets ONLY — this FLAT drt target flattens every retime to 100% forward and returns `flattened`/`flattenedCount` naming each event that lost one (`flattened` is always present on `drt`, empty when there were none); for a .drt that AUTHORS retimes/dissolves/multi-track/audio, use drt.assemble_from_interchange), turnover_changelist (diff old vs new → moved/retimed/trimmed/replaced/new/gone PLUS the junction diff: transition_added/transition_dropped/transition_changed with fade in/out or dissolve, outgoing/incoming, span and duration/type/pre-roll deltas — zero-length CMX carrier lines and the BL legs that carry fades fold into the junction diff instead of reading as gone/new sources; events pair by closest record position, consumed once, so a source cut twice at two speeds compares instance to instance; + timing flags incl. transition_dropped and dropped_split_audio on any A-track; a compound seen collapsed in one cut and flattened in the other reports compound_collapsed/compound_expanded once, never replaced+gone), conform_manifest (per-event assert: source resolved/handles/retime/reverse/TC-base; BL-aware — black legs need no source, fades no black-side handles, and a fade-out tail requirement lands on the picture source; a compound clipitem fails source_resolved by NAME with the remedy — map it to a flattened file or turn over as OTIO), marker_roundtrip (markers with provenance tags), verify_roundtrip (input events vs re-export events -> pass/mismatches + fitted per-source TC offsets + marker compare w/ markersNotInExport honesty flag; FADE-AWARE: BL/Solid-Color legs merge out as blackSegments and fade-window boundary reshapes are excused into fadeReshapedBoundaries instead of failing; RETIME-AWARE: speed/reverse compare pairwise — EXPORT_OTIO carries an authored Sm2TimeMap back as LinearTimeWarp (measured), so a flattened/lost retime fails as drift geometry alone cannot catch; AUDIO-AWARE: declared audio events compare (a video-only export such as EXPORT_EDL flags audioNotInExport instead of failing) (channel legs deduped, mismatches tagged trackType audio) while the mirrored-A1 export of a video-only turnover stays informational; COLOUR-AWARE: an input generator leg carrying a fillcolor (fade-to-white, colour matte) must come back on the same track over its span with the same colour — Resolve\'s FCP7 writer emits it — else generator-colour fails (generatorColours reports the compare) — pass exportedFormat: an OTIO/EDL re-export cannot carry colour (measured) and reports generatorColourNotInExport instead of failing; COMPOUND-AWARE: an XML re-export that collapsed a compound to one clipitem over cuts the input flattened from that compound reports compoundsCollapsedInExport instead of count/source drift; the conform QC loop-closer). Offline (AAF needs pyaaf2; live AAF/DRP import is on the Python davinci-resolve MCP).',
90
90
  async handler({ action, args }) {
91
91
  if (action === 'parse_interchange') {
92
92
  const p = parseSchema.parse(args);
@@ -87,7 +87,7 @@ if not logging.getLogger().handlers:
87
87
  handlers=[logging.StreamHandler()],
88
88
  )
89
89
 
90
- VERSION = "2.176.0"
90
+ VERSION = "2.178.0"
91
91
  logger = logging.getLogger("davinci-resolve-mcp")
92
92
  logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
93
93
  logger.info(f"Detected platform: {get_platform()}")
package/src/server.py CHANGED
@@ -11,7 +11,7 @@ Usage:
11
11
  python src/server.py --full # Start the 353-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "2.176.0"
14
+ VERSION = "2.178.0"
15
15
 
16
16
  import base64
17
17
  import os