davinci-resolve-mcp 2.155.0 → 2.156.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 +16 -0
- package/README.md +1 -1
- package/README.zh-CN.md +2 -2
- package/install.py +1 -1
- package/package.json +1 -1
- package/resolve-advanced/server/author-interchange.mjs +89 -52
- package/resolve-advanced/server/tools/editorial.mjs +1 -1
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
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.156.0 — the QC loop learns audio; the verify surface is complete
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **`editorial.verify_roundtrip` is audio-aware.** Declared audio events
|
|
10
|
+
compare pairwise through the same machinery as video — record, source,
|
|
11
|
+
retime, and fade-window excusal — with audio mismatches tagged
|
|
12
|
+
`trackType: 'audio'`, AAF channel legs deduped, and BL/silence legs merged
|
|
13
|
+
out. A video-only turnover whose re-export carries audio (the A1
|
|
14
|
+
convenience mirror this bridge authors) reports `audio.compared: false`
|
|
15
|
+
informationally instead of failing. Live loop verified: an explicit A2 leg
|
|
16
|
+
round-trips through `EXPORT_OTIO` at exact geometry.
|
|
17
|
+
- With markers (v2.147), fades (v2.153), retimes (v2.154), and now audio,
|
|
18
|
+
the round-trip QC surface covers every structure the conform bridge
|
|
19
|
+
authors.
|
|
20
|
+
|
|
5
21
|
## What's New in v2.155.0 — Premiere transitions land properly: centered spans and fades
|
|
6
22
|
|
|
7
23
|
### Fixed
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
6
6
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
7
7
|
[](docs/reference/api-coverage.md)
|
|
8
8
|
[-blue.svg)](#server-modes)
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 简体中文
|
|
4
4
|
|
|
5
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
6
6
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
7
7
|
[](docs/reference/api-coverage.md)
|
|
8
8
|
[-blue.svg)](#服务器模式)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://www.python.org/downloads/)
|
|
13
13
|
[](https://opensource.org/licenses/MIT)
|
|
14
14
|
|
|
15
|
-
> 本翻译对应 v2.
|
|
15
|
+
> 本翻译对应 v2.156.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.
|
|
40
|
+
VERSION = "2.156.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
|
@@ -838,16 +838,21 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
|
|
|
838
838
|
// before the D event — a pairing placeholder, never a rendered clip, and
|
|
839
839
|
// no export reproduces it.
|
|
840
840
|
const vids = (evts) => evts.filter((e) => /^V\d*$/.test(String(e.track)) && e.recIn != null && e.recOut != null && e.recOut > e.recIn);
|
|
841
|
-
const
|
|
841
|
+
const audsOf = (evts) => evts.filter((e) => /^A\d*$/.test(String(e.track)) && e.recIn != null && e.recOut != null && e.recOut > e.recIn);
|
|
842
|
+
const anchorOfSide = (evts) => {
|
|
842
843
|
const v = vids(evts);
|
|
844
|
+
if (v.length) return Math.min(...v.map((e) => e.recIn));
|
|
845
|
+
const au = audsOf(evts);
|
|
846
|
+
return au.length ? Math.min(...au.map((e) => e.recIn)) : 0;
|
|
847
|
+
};
|
|
848
|
+
const norm = (evts, pick = vids) => {
|
|
849
|
+
const v = pick(evts);
|
|
843
850
|
if (!v.length) return [];
|
|
844
|
-
const off =
|
|
851
|
+
const off = anchorOfSide(evts);
|
|
845
852
|
return v
|
|
846
853
|
.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) }))
|
|
847
854
|
.sort((a, b) => a.track.localeCompare(b.track) || a.recIn - b.recIn);
|
|
848
855
|
};
|
|
849
|
-
const a0 = norm(inputEvents);
|
|
850
|
-
const b0 = norm(exportedEvents);
|
|
851
856
|
// FADES (E94): BL legs on the input side and the Solid Color generators a
|
|
852
857
|
// fade conform authors for them are the same thing — BLACK. Black segments
|
|
853
858
|
// are synthesized filler whose extents follow from the picture boundaries,
|
|
@@ -857,60 +862,91 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
|
|
|
857
862
|
// start-at-cut reshaping), so an edge within an input junction's fade
|
|
858
863
|
// window is excused — and reported, not silently absorbed.
|
|
859
864
|
const isBlackSeg = (e) => /^(bl|black|solid color)$/.test(e.source);
|
|
860
|
-
const
|
|
861
|
-
const
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
const inOff = rawVids.length ? Math.min(...rawVids.map((e) => e.recIn)) : 0;
|
|
865
|
-
const junctions = inputEvents
|
|
866
|
-
.filter((e) => /^V\d*$/.test(String(e.track)) && e.recIn != null && e.transition && e.transition.duration > 0)
|
|
867
|
-
.map((e) => ({ frame: e.recIn - inOff, d: e.transition.duration }));
|
|
868
|
-
const inFadeWindow = (edgeIn, edgeExp) => junctions.some(
|
|
869
|
-
(j) => Math.abs(edgeIn - j.frame) <= j.d && Math.abs(edgeExp - edgeIn) <= j.d,
|
|
870
|
-
);
|
|
865
|
+
const inAnchor = anchorOfSide(inputEvents);
|
|
866
|
+
const junctionsFor = (trackRe) => inputEvents
|
|
867
|
+
.filter((e) => trackRe.test(String(e.track)) && e.recIn != null && e.transition && e.transition.duration > 0)
|
|
868
|
+
.map((e) => ({ frame: e.recIn - inAnchor, d: e.transition.duration }));
|
|
871
869
|
const fadeReshapedBoundaries = [];
|
|
872
870
|
const mismatches = [];
|
|
873
|
-
if (a.length !== b.length) mismatches.push({ kind: 'count', input: a.length, exported: b.length });
|
|
874
871
|
const srcOffsets = {};
|
|
875
|
-
const
|
|
876
|
-
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
const
|
|
882
|
-
|
|
883
|
-
const
|
|
884
|
-
|
|
885
|
-
if (
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
872
|
+
const comparePairs = (a, b, junctions, trackType) => {
|
|
873
|
+
const tt = trackType === 'audio' ? { trackType: 'audio' } : {};
|
|
874
|
+
const inFadeWindow = (edgeIn, edgeExp) => junctions.some(
|
|
875
|
+
(j) => Math.abs(edgeIn - j.frame) <= j.d && Math.abs(edgeExp - edgeIn) <= j.d,
|
|
876
|
+
);
|
|
877
|
+
if (a.length !== b.length) mismatches.push({ kind: 'count', ...tt, input: a.length, exported: b.length });
|
|
878
|
+
const n = Math.min(a.length, b.length);
|
|
879
|
+
for (let i = 0; i < n; i += 1) {
|
|
880
|
+
const x = a[i], y = b[i];
|
|
881
|
+
if (x.track !== y.track) { mismatches.push({ kind: 'track', ...tt, at: i, input: x.track, exported: y.track }); continue; }
|
|
882
|
+
if (x.source !== y.source) { mismatches.push({ kind: 'source', ...tt, at: i, input: x.source, exported: y.source }); continue; }
|
|
883
|
+
const inBad = Math.abs(x.recIn - y.recIn) > recTol;
|
|
884
|
+
const outBad = Math.abs(x.recOut - y.recOut) > recTol;
|
|
885
|
+
if (inBad || outBad) {
|
|
886
|
+
const inExcused = !inBad || inFadeWindow(x.recIn, y.recIn);
|
|
887
|
+
const outExcused = !outBad || inFadeWindow(x.recOut, y.recOut);
|
|
888
|
+
if (inExcused && outExcused) {
|
|
889
|
+
fadeReshapedBoundaries.push({ at: i, ...tt, source: x.source, input: [x.recIn, x.recOut], exported: [y.recIn, y.recOut] });
|
|
890
|
+
} else {
|
|
891
|
+
mismatches.push({ kind: 'record', ...tt, at: i, input: [x.recIn, x.recOut], exported: [y.recIn, y.recOut] });
|
|
892
|
+
continue;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
// RETIMES (E95): a conform that lost its retime is a wrong timeline
|
|
896
|
+
// that record/source geometry alone cannot catch (the record extent is
|
|
897
|
+
// unchanged; only the playback rate is). Resolve's EXPORT_OTIO carries
|
|
898
|
+
// an authored Sm2TimeMap back as LinearTimeWarp (measured live: 50%
|
|
899
|
+
// in → time_scalar 0.5 out), so a speed/reverse mismatch is real drift.
|
|
900
|
+
if (Math.abs((x.speed ?? 100) - (y.speed ?? 100)) > 0.5 || x.reverse !== y.reverse) {
|
|
901
|
+
mismatches.push({
|
|
902
|
+
kind: 'retime', ...tt, at: i, source: x.source,
|
|
903
|
+
input: { speed: x.speed, reverse: x.reverse },
|
|
904
|
+
exported: { speed: y.speed, reverse: y.reverse },
|
|
905
|
+
});
|
|
889
906
|
continue;
|
|
890
907
|
}
|
|
908
|
+
// A fade-reshaped head trims record AND source together (source stays
|
|
909
|
+
// record-aligned), so the per-source constant offset is fitted net of
|
|
910
|
+
// the record shift — otherwise a source cut both plain and faded would
|
|
911
|
+
// read as a source-frames drift.
|
|
912
|
+
const off = (y.srcIn - (y.recIn - x.recIn)) - x.srcIn;
|
|
913
|
+
if (srcOffsets[x.source] === undefined) srcOffsets[x.source] = off;
|
|
914
|
+
else if (Math.abs(off - srcOffsets[x.source]) > srcTol) {
|
|
915
|
+
mismatches.push({ kind: 'source-frames', ...tt, at: i, source: x.source, expectedOffset: srcOffsets[x.source], gotOffset: off });
|
|
916
|
+
}
|
|
891
917
|
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
918
|
+
return n;
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
const a0 = norm(inputEvents);
|
|
922
|
+
const b0 = norm(exportedEvents);
|
|
923
|
+
const a = a0.filter((e) => !isBlackSeg(e));
|
|
924
|
+
const b = b0.filter((e) => !isBlackSeg(e));
|
|
925
|
+
const blackSegments = { input: a0.length - a.length, exported: b0.length - b.length };
|
|
926
|
+
const n = comparePairs(a, b, junctionsFor(/^V\d*$/), 'video');
|
|
927
|
+
|
|
928
|
+
// AUDIO (E97): compared only when the INPUT declares audio events — a
|
|
929
|
+
// video-only turnover legitimately re-exports with audio (the A1
|
|
930
|
+
// convenience mirror), which is reported informationally, never failed.
|
|
931
|
+
// AAF channel legs dedupe (same track/source/range arrives once per
|
|
932
|
+
// channel); BL/silence legs merge out like video black.
|
|
933
|
+
const dedupeAud = (list) => {
|
|
934
|
+
const seen = new Set();
|
|
935
|
+
return list.filter((e) => {
|
|
936
|
+
const k = `${e.track}|${e.source}|${e.recIn}|${e.recOut}|${e.srcIn}`;
|
|
937
|
+
if (seen.has(k)) return false;
|
|
938
|
+
seen.add(k);
|
|
939
|
+
return true;
|
|
940
|
+
});
|
|
941
|
+
};
|
|
942
|
+
const aa = dedupeAud(norm(inputEvents, audsOf).filter((e) => !isBlackSeg(e)));
|
|
943
|
+
const ba = dedupeAud(norm(exportedEvents, audsOf).filter((e) => !isBlackSeg(e)));
|
|
944
|
+
let audio;
|
|
945
|
+
if (aa.length) {
|
|
946
|
+
audio = { input: aa.length, exported: ba.length, compared: true };
|
|
947
|
+
comparePairs(aa, ba, junctionsFor(/^A\d*$/), 'audio');
|
|
948
|
+
} else if (ba.length) {
|
|
949
|
+
audio = { input: 0, exported: ba.length, compared: false, note: 'export-only audio (A1 convenience mirror) — not compared' };
|
|
914
950
|
}
|
|
915
951
|
// MARKERS (E88): compare track-'MARKER' pseudo-events, min-anchored to
|
|
916
952
|
// each side's own VIDEO record origin like everything else. When the
|
|
@@ -948,5 +984,6 @@ export function verifyRoundtrip(inputEvents, exportedEvents, opts = {}) {
|
|
|
948
984
|
...(markersNotInExport ? { markersNotInExport } : {}),
|
|
949
985
|
...(blackSegments.input || blackSegments.exported ? { blackSegments } : {}),
|
|
950
986
|
...(fadeReshapedBoundaries.length ? { fadeReshapedBoundaries } : {}),
|
|
987
|
+
...(audio ? { audio } : {}),
|
|
951
988
|
};
|
|
952
989
|
}
|
|
@@ -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 + AAF via pyaaf2 + PRPROJ via gunzip+XML → normalized events incl. span-explicit transitions and BL fade legs; 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 .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/replaced/new/gone + timing flags), conform_manifest (per-event assert: source resolved/handles/retime/reverse/TC-base), 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; 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 + AAF via pyaaf2 + PRPROJ via gunzip+XML → normalized events incl. span-explicit transitions and BL fade legs; 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 .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/replaced/new/gone + timing flags), conform_manifest (per-event assert: source resolved/handles/retime/reverse/TC-base), 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 (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).',
|
|
90
90
|
async handler({ action, args }) {
|
|
91
91
|
if (action === 'parse_interchange') {
|
|
92
92
|
const p = parseSchema.parse(args);
|
package/src/granular/common.py
CHANGED
|
@@ -87,7 +87,7 @@ if not logging.getLogger().handlers:
|
|
|
87
87
|
handlers=[logging.StreamHandler()],
|
|
88
88
|
)
|
|
89
89
|
|
|
90
|
-
VERSION = "2.
|
|
90
|
+
VERSION = "2.156.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()}")
|