davinci-resolve-mcp 2.168.0 → 2.169.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,36 @@
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.169.0 — E112: round-trip QC is colour-aware
6
+
7
+ `verify_roundtrip` merged every generator leg out of the compare as "black",
8
+ so a fade-to-white that came back black — or a colour matte that lost its
9
+ colour — passed QC on geometry alone.
10
+
11
+ ### Added
12
+
13
+ - **`verify_roundtrip` compares generator colours.** An input leg carrying a
14
+ fill colour must come back on the same track over its span with the same
15
+ colour (±1/255), else `generator-colour` fails; `generatorColours` reports
16
+ the compare. Black-only turnovers compare nothing and stay silent.
17
+
18
+ ### Fixed
19
+
20
+ - **Resolve's own re-export of an authored colour reads back.** The FCP7
21
+ writer emits a Solid Color's colour as the FxPlug parameter `input_1`
22
+ (not Premiere's `fillcolor`); the walker now reads any RGB-valued
23
+ generator parameter. Live loop closed on 19.1.3.7: the E110 fade-to-white
24
+ turnover conformed, imported, rendered, re-exported, and verified
25
+ `pass: true` with both colours (white, and 128/64/191) compared — the
26
+ writer echoing the authored `EffectFiltersBA` is a second witness to the
27
+ blob layout. A black-for-white export fails as `generator-colour`.
28
+
29
+ ### Measured (filed in api-limitations)
30
+
31
+ - The XML importer ignores a `Dip to Color Dissolve`'s colour parameter:
32
+ white and red imported as byte-identical default blobs and rendered inert.
33
+ The dip colour stays GUI-only on 19.1.3.7 (E111).
34
+
5
35
  ## What's New in v2.168.0 — E110: Solid Color has a colour — fade-to-white and colour mattes author
6
36
 
7
37
  The one thing the black-leg machinery could not do was be anything but
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.168.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.169.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.168.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.169.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.168.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
15
+ > 本翻译对应 v2.169.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
16
16
 
17
17
  一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
18
18
 
@@ -313,7 +313,7 @@ equivalent, blocking full automation.
313
313
 
314
314
  - **Object:** `MediaPool`
315
315
  - **Signature:** `(filePath.xml) -> Timeline`
316
- - **Behavior:** Resolve's FCP7 XML importer HONOURS a generatoritem's `fillcolor` parameter (measured on Studio 19.1.3.7, E110): a Premiere-shaped Color Matte (effectid Color, category Matte) and a Solid Color generatoritem, both with <red>/<green>/<blue>/<alpha> 0..255 values, imported as Solid Color items and rendered Y81 U90 V240 (red) and Y41 U240 V110 (blue) — exact BT.601 limited-range values for a 640x360 timeline. EXPORT_FCP_7_XML writes the fillcolor back (same 0..255 channels). EXPORT_DRT carries the colour as a 55-byte <EffectFiltersBA> on the Sm2TiGenerator: 8-byte header (version 2, length 47), a fixed 20-byte prefix, a flag byte, then big-endian uint16 A R G B (0xffff = full) plus a pad word, then a second, black colour record; only the ARGB words differed between the red and blue captures. The default generator has an EMPTY EffectFiltersBA.
316
+ - **Behavior:** Resolve's FCP7 XML importer HONOURS a generatoritem's `fillcolor` parameter (measured on Studio 19.1.3.7, E110): a Premiere-shaped Color Matte (effectid Color, category Matte) and a Solid Color generatoritem, both with <red>/<green>/<blue>/<alpha> 0..255 values, imported as Solid Color items and rendered Y81 U90 V240 (red) and Y41 U240 V110 (blue) — exact BT.601 limited-range values for a 640x360 timeline. EXPORT_FCP_7_XML writes the fillcolor back (same 0..255 channels). EXPORT_DRT carries the colour as a 55-byte <EffectFiltersBA> on the Sm2TiGenerator: 8-byte header (version 2, length 47), a fixed 20-byte prefix, a flag byte, then big-endian uint16 A R G B (0xffff = full) plus a pad word, then a second, black colour record; only the ARGB words differed between the red and blue captures. The default generator has an EMPTY EffectFiltersBA. The same importer does NOT carry a TRANSITION's parameters: a `Dip to Color Dissolve` transitionitem with a white and with a red `color` parameter imported as `Dip To Color Dissolve` elements whose 37-byte EffectFiltersBA were byte-identical (defaults), and the transition rendered inert (luma flat through its window, the E66 law) — the dip colour stays GUI-only on 19.1.3.7 (measured, E111). The writer emits a Solid Color's colour as the FxPlug parameter `input_1` (effectid FxPlugWrapper:C18E8B62_…), not `fillcolor` — an authored EffectFiltersBA colour came back exactly (white, 128/64/191; E112).
317
317
  - **Workaround / current handling:** Author fade-to-white / colour mattes by placing a Solid Color generator with that blob (drp-format placeGenerator `color`, drt.assemble elements[].color) — or carry an XMEML generatoritem fillcolor through editorial.parse_interchange; the bridge authors the coloured leg.
318
318
  - **Tags:** xml, import, generator, colour, export, drt
319
319
 
package/install.py CHANGED
@@ -37,7 +37,7 @@ from src.utils.update_check import (
37
37
 
38
38
  # ─── Version ──────────────────────────────────────────────────────────────────
39
39
 
40
- VERSION = "2.168.0"
40
+ VERSION = "2.169.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.168.0",
3
+ "version": "2.169.0",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -905,7 +905,7 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
905
905
  if (!v.length) return [];
906
906
  const off = anchorOfSide(evts);
907
907
  return v
908
- .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) }))
908
+ .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 }))
909
909
  .sort((a, b) => a.track.localeCompare(b.track) || a.recIn - b.recIn);
910
910
  };
911
911
  // FADES (E94): BL legs on the input side and the Solid Color generators a
@@ -975,6 +975,30 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
975
975
 
976
976
  const a0 = norm(inputEvents);
977
977
  const b0 = norm(exportedEvents);
978
+ // GENERATOR COLOUR (E112): a black leg is only "black" by default — an
979
+ // XMEML fillcolor rides on it (fade-to-white, colour mattes; E110), and
980
+ // Resolve's FCP7 writer emits the colour back. Black legs still merge out
981
+ // of the pairwise geometry compare (their extents follow the picture), but
982
+ // every input leg that CARRIES a colour must find an exported leg on the
983
+ // same track overlapping its span with the same colour — a white fade that
984
+ // came back black is a conform error geometry alone cannot see.
985
+ const generatorColours = { compared: 0, mismatches: [] };
986
+ const colourKey = (c) => (c ? [c.r, c.g, c.b].map((v) => Math.round(v * 255)).join(',') : '0,0,0');
987
+ const colourTol = 1 / 255 + 1e-9;
988
+ const sameColour = (x, y) => ['r', 'g', 'b'].every((k) => Math.abs((x ? x[k] : 0) - (y ? y[k] : 0)) <= colourTol);
989
+ {
990
+ const inLegs = a0.filter((e) => isBlackSeg(e) && e.color);
991
+ const exLegs = b0.filter((e) => isBlackSeg(e));
992
+ for (const leg of inLegs) {
993
+ const partner = exLegs.find((x) => x.track === leg.track && x.recIn < leg.recOut && x.recOut > leg.recIn);
994
+ generatorColours.compared += 1;
995
+ if (!partner) {
996
+ generatorColours.mismatches.push({ kind: 'generator-colour', track: leg.track, record: [leg.recIn, leg.recOut], input: colourKey(leg.color), exported: null });
997
+ } else if (!sameColour(leg.color, partner.color)) {
998
+ generatorColours.mismatches.push({ kind: 'generator-colour', track: leg.track, record: [leg.recIn, leg.recOut], input: colourKey(leg.color), exported: colourKey(partner.color) });
999
+ }
1000
+ }
1001
+ }
978
1002
  const a = a0.filter((e) => !isBlackSeg(e));
979
1003
  const b = b0.filter((e) => !isBlackSeg(e));
980
1004
  const blackSegments = { input: a0.length - a.length, exported: b0.length - b.length };
@@ -1042,8 +1066,10 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
1042
1066
  }
1043
1067
  mismatches.push(...markers.mismatches);
1044
1068
  }
1069
+ mismatches.push(...generatorColours.mismatches);
1045
1070
  return {
1046
1071
  pass: mismatches.length === 0, pairs: n, srcOffsets, mismatches, markers,
1072
+ ...(generatorColours.compared ? { generatorColours } : {}),
1047
1073
  ...(markersNotInExport ? { markersNotInExport } : {}),
1048
1074
  ...(blackSegments.input || blackSegments.exported ? { blackSegments } : {}),
1049
1075
  ...(fadeReshapedBoundaries.length ? { fadeReshapedBoundaries } : {}),
@@ -297,8 +297,10 @@ export function parseOTIO(otio, opts = {}) {
297
297
  function xmemlFillColor(g) {
298
298
  const params = g && g.effect && g.effect.parameter ? (Array.isArray(g.effect.parameter) ? g.effect.parameter : [g.effect.parameter]) : [];
299
299
  for (const pm of params) {
300
- const pid = String(pm.parameterid || pm.name || '').trim().toLowerCase();
301
- if (pid !== 'fillcolor' || !pm.value || typeof pm.value !== 'object') continue;
300
+ // Premiere writes the matte colour as `fillcolor`; Resolve's OWN writer
301
+ // emits a Solid Color's colour as the FxPlug input parameter `input_1`
302
+ // (measured E112) — any RGB-valued generator parameter is the colour.
303
+ if (!pm.value || typeof pm.value !== 'object' || pm.value.red == null || pm.value.green == null || pm.value.blue == null) continue;
302
304
  const ch = (k) => { const v = Number(pm.value[k]); return Number.isFinite(v) ? Math.max(0, Math.min(255, v)) / 255 : 0; };
303
305
  const c = { r: ch('red'), g: ch('green'), b: ch('blue'), a: pm.value.alpha != null ? ch('alpha') : 1 };
304
306
  if (c.r === 0 && c.g === 0 && c.b === 0) return null; // black = the default leg
@@ -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 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; 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 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); 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.168.0"
90
+ VERSION = "2.169.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.168.0"
14
+ VERSION = "2.169.0"
15
15
 
16
16
  import base64
17
17
  import os
@@ -2813,7 +2813,18 @@ API_TRUTH: List[Dict[str, Any]] = [
2813
2813
  "A R G B (0xffff = full) plus a pad word, then a second, "
2814
2814
  "black colour record; only the ARGB words differed between "
2815
2815
  "the red and blue captures. The default generator has an "
2816
- "EMPTY EffectFiltersBA.",
2816
+ "EMPTY EffectFiltersBA. The same importer does NOT carry a "
2817
+ "TRANSITION's parameters: a `Dip to Color Dissolve` "
2818
+ "transitionitem with a white and with a red `color` "
2819
+ "parameter imported as `Dip To Color Dissolve` elements "
2820
+ "whose 37-byte EffectFiltersBA were byte-identical "
2821
+ "(defaults), and the transition rendered inert (luma flat "
2822
+ "through its window, the E66 law) — the dip colour stays "
2823
+ "GUI-only on 19.1.3.7 (measured, E111). The writer emits "
2824
+ "a Solid Color's colour as the FxPlug parameter `input_1` "
2825
+ "(effectid FxPlugWrapper:C18E8B62_…), not `fillcolor` — an "
2826
+ "authored EffectFiltersBA colour came back exactly (white, "
2827
+ "128/64/191; E112).",
2817
2828
  "recommended": "Author fade-to-white / colour mattes by placing a "
2818
2829
  "Solid Color generator with that blob "
2819
2830
  "(drp-format placeGenerator `color`, drt.assemble "