davinci-resolve-mcp 2.192.0 → 2.194.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 +64 -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/editorial.mjs +194 -7
- package/resolve-advanced/server/prproj.mjs +12 -2
- package/resolve-advanced/server/tools/editorial.mjs +5 -2
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,70 @@
|
|
|
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.194.0 — E142: a cut re-aligned inside a dissolve is the same picture
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **A cut re-aligned inside an unchanged dissolve is the same picture.**
|
|
10
|
+
Premiere keeps a fractional dissolve alignment (its cut sat 12 frames into a
|
|
11
|
+
46-frame span); Resolve's conform re-centres it (23). The dissolve covers
|
|
12
|
+
the same record frames from the same media either way, but the changelist
|
|
13
|
+
read each one as a `moved` incoming plus a `trimmed` outgoing. When a
|
|
14
|
+
transition's span is unchanged and the cut inside it moved with the
|
|
15
|
+
incoming's source-in and the outgoing's source-out sliding by the same
|
|
16
|
+
delta (scaled by the clip's speed for a retimed clip, read through a TC
|
|
17
|
+
rebase), the pair folds into ONE `junction_realigned` — a consequence, not
|
|
18
|
+
an edit — both sides count as retained, and the junction diff no longer
|
|
19
|
+
reports the pre-roll change as a second fact. A dissolve whose span moved,
|
|
20
|
+
or a cut whose source did not slide with it, stays a real move.
|
|
21
|
+
- **Two labels of one transition family are a relabel.** `Cross Dissolve
|
|
22
|
+
(Legacy)` in Premiere and `Cross Dissolve` in Resolve are the same effect;
|
|
23
|
+
they now land in `transitionRelabels` instead of `transition_changed`. A
|
|
24
|
+
different family (a push, a wipe) is still a type change.
|
|
25
|
+
- **Shape `equivalent`.** A diff whose only changes are consequences (junctions
|
|
26
|
+
re-aligned, labels) now says so, with a note, instead of `edit`.
|
|
27
|
+
|
|
28
|
+
On the real reel (Premiere REEL_02 pix-lock vs the Resolve conform): 206 of
|
|
29
|
+
228 cuts retained (189 before), 9 junctions re-aligned, 10 relabels, one real
|
|
30
|
+
move (a dissolve whose span moved), one real transition change, 19 trims on
|
|
31
|
+
the eye-matched files, the second mix track, the reversed tail leader and
|
|
32
|
+
frozen black — symmetric in both directions.
|
|
33
|
+
|
|
34
|
+
## What's New in v2.193.0 — E141: relink-aware changelist
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- **`turnover_changelist` is relink-aware.** A real offline→online turnover
|
|
39
|
+
(the Premiere REEL_02 pix-lock against the Resolve conform of the same reel)
|
|
40
|
+
paired 15 of 228 cuts: the offline media was named `… 4K-2K … .mov`
|
|
41
|
+
(proxies) where the online cut used `… 4K … .mov` (masters) and `.mp4`
|
|
42
|
+
became `.mov`, so 203 identical cuts read as `replaced`. Now `sourceAliases`
|
|
43
|
+
(`{from,to}` exact or `{pattern,replace}` regex) rename old sources before
|
|
44
|
+
pairing, and a systematic rename is INFERRED from unpaired cuts that share
|
|
45
|
+
a record window — adopted only when one-to-one both ways and either
|
|
46
|
+
recurring or clearly the same name (LCS similarity ≥ 0.6), so a different
|
|
47
|
+
shot dropped into the same window stays `replaced`. The result reports
|
|
48
|
+
every alias with its cut count, similarity and whether it was inferred.
|
|
49
|
+
- **A per-source timecode rebase is not N trims.** Masters carry a different
|
|
50
|
+
timecode base than the proxies: the same cuts read as `trimmed` by one
|
|
51
|
+
constant shift. When one shift is a source's dominant story (≥2 cuts and
|
|
52
|
+
more than half of its differing cuts) the compare reads old through it and
|
|
53
|
+
reports it in `sourceTcOffsets`; a cut that still differs is a real trim on
|
|
54
|
+
top of the rebase, with the pre-rebase window kept in its deltas. A source
|
|
55
|
+
whose cuts each shift by a different amount (an eye-matched re-conform onto
|
|
56
|
+
other media) stays trims — measured: two of seven cuts sharing a shift is a
|
|
57
|
+
coincidence, not a base.
|
|
58
|
+
- **Premiere synthetic items name themselves.** A Universal Counting Leader
|
|
59
|
+
or Black Video has no file: its `Media` writes a bare numeric id as the
|
|
60
|
+
path and the human name in `<Title>`. They now read by title and carry
|
|
61
|
+
`generatorName`, so they pair with the online cut's generators by name
|
|
62
|
+
instead of reporting a numeric id replaced.
|
|
63
|
+
|
|
64
|
+
On the real reel: 189 of 228 cuts retained (was 15), 16 aliases inferred, one
|
|
65
|
+
source rebased by 47745 frames, symmetric in both directions; what remains is
|
|
66
|
+
the conform's own story — 27 trims, 10 junctions moved inside dissolves, the
|
|
67
|
+
online reel's second mix track, its reversed tail leader and frozen black.
|
|
68
|
+
|
|
5
69
|
## What's New in v2.192.0 — E140: a .drt retime decodes to its speed
|
|
6
70
|
|
|
7
71
|
### Added
|
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.194.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.194.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
|
@@ -837,7 +837,15 @@ function pairEvents(oldEvents, newEvents, recTol = 1) {
|
|
|
837
837
|
|
|
838
838
|
/**
|
|
839
839
|
* Diff two normalized event lists → a SHAPE verdict (identical|subset|superset|edit, E138)
|
|
840
|
-
* plus per-event {kind: moved|retimed|trimmed|replaced|new|gone}
|
|
840
|
+
* plus per-event {kind: moved|retimed|trimmed|replaced|new|gone}; RELINK-aware (E141):
|
|
841
|
+
* opts.sourceAliases ({from,to} | {pattern,replace}) rename old sources first, a
|
|
842
|
+
* systematic rename is inferred from same-window unpaired cuts (opts.inferAliases
|
|
843
|
+
* !== false) and reported in sourceAliases, and a constant per-source source-window
|
|
844
|
+
* shift witnessed on ≥2 cuts is a TC rebase (sourceTcOffsets), not trims. A cut moved
|
|
845
|
+
* INSIDE an unchanged dissolve span with both source windows sliding by the same delta
|
|
846
|
+
* is one junction_realigned (E142) — a consequence — and two labels of one transition
|
|
847
|
+
* family are a relabel (transitionRelabels), so a picture-identical conform reads
|
|
848
|
+
* shape 'equivalent'.
|
|
841
849
|
* PLUS per-junction {kind: transition_added|transition_dropped|transition_changed}
|
|
842
850
|
* (fade 'in'/'out' or null for a dissolve). Zero-length carrier lines and the
|
|
843
851
|
* black legs that carry fades fold into the junction diff instead of reading
|
|
@@ -847,7 +855,94 @@ function pairEvents(oldEvents, newEvents, recTol = 1) {
|
|
|
847
855
|
* @param {Array} newEvents
|
|
848
856
|
* @param {{recTolerance?:number}} [opts]
|
|
849
857
|
*/
|
|
858
|
+
// ── RELINK awareness (E141) ────────────────────────────────────────────
|
|
859
|
+
// A real offline→online turnover (Premiere REEL_02 → the Resolve conform of
|
|
860
|
+
// the same reel) paired 15 of 228 cuts: the offline media was named
|
|
861
|
+
// "… 4K-2K … .mov" (proxies) where the online cut used "… 4K … .mov"
|
|
862
|
+
// (masters) and ".mp4" became ".mov", so 203 identical cuts read as
|
|
863
|
+
// `replaced`; and the masters carry a different timecode base, so the same
|
|
864
|
+
// cuts read as `trimmed` by a constant per-source shift. Neither is an edit.
|
|
865
|
+
const normalizeAliases = (list) => (Array.isArray(list) ? list : []).map((a) => {
|
|
866
|
+
if (!a || typeof a !== 'object') throw new Error('sourceAliases: each entry is {from,to} or {pattern,replace}');
|
|
867
|
+
if (a.pattern != null) return { pattern: String(a.pattern), replace: String(a.replace ?? ''), re: new RegExp(a.pattern, a.flags || 'g'), inferred: false };
|
|
868
|
+
if (a.from != null && a.to != null) return { from: String(a.from), to: String(a.to), inferred: false };
|
|
869
|
+
throw new Error('sourceAliases: each entry is {from,to} or {pattern,replace}');
|
|
870
|
+
});
|
|
871
|
+
const aliasSource = (src, aliases) => {
|
|
872
|
+
let s = String(src ?? '');
|
|
873
|
+
for (const a of aliases) {
|
|
874
|
+
if (a.re) s = s.replace(a.re, a.replace);
|
|
875
|
+
else if (s === a.from) s = a.to;
|
|
876
|
+
}
|
|
877
|
+
return s;
|
|
878
|
+
};
|
|
879
|
+
const applyAliases = (events, aliases) => (aliases.length
|
|
880
|
+
? events.map((e) => { const s = aliasSource(e.source, aliases); return s === String(e.source ?? '') ? e : { ...e, source: s, aliasedFrom: e.source }; })
|
|
881
|
+
: events);
|
|
882
|
+
// Longest-common-subsequence ratio, case-insensitive: 1 = identical names.
|
|
883
|
+
function nameSimilarity(a, b) {
|
|
884
|
+
const x = String(a || '').toLowerCase(), y = String(b || '').toLowerCase();
|
|
885
|
+
if (!x.length || !y.length) return 0;
|
|
886
|
+
let prev = new Array(y.length + 1).fill(0);
|
|
887
|
+
for (let i = 1; i <= x.length; i++) {
|
|
888
|
+
const cur = new Array(y.length + 1).fill(0);
|
|
889
|
+
for (let j = 1; j <= y.length; j++) cur[j] = x[i - 1] === y[j - 1] ? prev[j - 1] + 1 : Math.max(prev[j], cur[j - 1]);
|
|
890
|
+
prev = cur;
|
|
891
|
+
}
|
|
892
|
+
return (2 * prev[y.length]) / (x.length + y.length);
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Infer a systematic RENAME from the cuts a first pass could not pair: an
|
|
896
|
+
* unpaired old cut and an unpaired new cut on the same track with the same
|
|
897
|
+
* record window are the same cut under two names. An alias is adopted when
|
|
898
|
+
* the mapping is one-to-one both ways and either recurs (≥2 cuts) or the two
|
|
899
|
+
* names are clearly the same name (LCS similarity ≥ 0.6) — a genuinely
|
|
900
|
+
* different shot dropped into the same window is neither.
|
|
901
|
+
*/
|
|
902
|
+
function inferSourceAliases(P, recTol) {
|
|
903
|
+
const cands = new Map(); // from -> Map(to -> count)
|
|
904
|
+
const usedNew = new Set();
|
|
905
|
+
for (const oe of P.unmatchedOld) {
|
|
906
|
+
const hit = P.unmatchedNew.find((ne) => !usedNew.has(ne) && ne.track === oe.track
|
|
907
|
+
&& Math.abs((ne.recIn ?? 0) - (oe.recIn ?? 0)) <= recTol && Math.abs((ne.recOut ?? 0) - (oe.recOut ?? 0)) <= recTol);
|
|
908
|
+
if (!hit) continue;
|
|
909
|
+
usedNew.add(hit);
|
|
910
|
+
const from = String(oe.source ?? ''), to = String(hit.source ?? '');
|
|
911
|
+
if (from === to) continue;
|
|
912
|
+
if (!cands.has(from)) cands.set(from, new Map());
|
|
913
|
+
cands.get(from).set(to, (cands.get(from).get(to) || 0) + 1);
|
|
914
|
+
}
|
|
915
|
+
const claimed = new Map(); // to -> from
|
|
916
|
+
const out = [];
|
|
917
|
+
for (const [from, tos] of cands) {
|
|
918
|
+
if (tos.size !== 1) continue;
|
|
919
|
+
const [to, count] = [...tos][0];
|
|
920
|
+
if (claimed.has(to) && claimed.get(to) !== from) continue;
|
|
921
|
+
const similarity = Math.round(nameSimilarity(from, to) * 1000) / 1000;
|
|
922
|
+
if (count >= 2 || similarity >= 0.6) { claimed.set(to, from); out.push({ from, to, cuts: count, similarity, inferred: true }); }
|
|
923
|
+
}
|
|
924
|
+
// A 'to' claimed by two different 'from's is ambiguous — drop both.
|
|
925
|
+
const toCounts = new Map(); for (const a of out) toCounts.set(a.to, (toCounts.get(a.to) || 0) + 1);
|
|
926
|
+
return out.filter((a) => toCounts.get(a.to) === 1);
|
|
927
|
+
}
|
|
928
|
+
|
|
850
929
|
export function diffChangelist(oldEvents, newEvents, opts = {}) {
|
|
930
|
+
const explicit = normalizeAliases(opts.sourceAliases);
|
|
931
|
+
let aliases = explicit;
|
|
932
|
+
let result = diffChangelistOnce(applyAliases(oldEvents, aliases), newEvents, opts);
|
|
933
|
+
if (opts.inferAliases !== false) {
|
|
934
|
+
const inferred = inferSourceAliases(result.__P, opts.recTolerance ?? 1);
|
|
935
|
+
if (inferred.length) {
|
|
936
|
+
aliases = [...explicit, ...inferred];
|
|
937
|
+
result = diffChangelistOnce(applyAliases(oldEvents, aliases), newEvents, opts);
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
const { __P, ...out } = result;
|
|
941
|
+
out.sourceAliases = aliases.map((a) => (a.re ? { pattern: a.pattern, replace: a.replace, inferred: false } : { from: a.from, to: a.to, inferred: Boolean(a.inferred), ...(a.cuts != null ? { cuts: a.cuts, similarity: a.similarity } : {}) }));
|
|
942
|
+
return out;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
function diffChangelistOnce(oldEvents, newEvents, opts = {}) {
|
|
851
946
|
const recTol = opts.recTolerance ?? 1;
|
|
852
947
|
const changes = [];
|
|
853
948
|
// COMPOUND FORMS (E124): a compound is one collapsed item in an XML cut
|
|
@@ -873,10 +968,41 @@ export function diffChangelist(oldEvents, newEvents, opts = {}) {
|
|
|
873
968
|
}
|
|
874
969
|
const P = pairEvents(oldEvents.filter((e) => !skipOld.has(e)), newEvents.filter((e) => !skipNew.has(e)), recTol);
|
|
875
970
|
|
|
971
|
+
// TC REBASE (E141): when every differing cut of a source shifts its source
|
|
972
|
+
// window by the SAME amount in and out, the media was relinked to a copy
|
|
973
|
+
// with a different timecode base (offline proxies at 0, masters at their
|
|
974
|
+
// camera TC) — not N trims. A shift witnessed on ≥2 cuts of a source is
|
|
975
|
+
// that source's offset; the compare below reads old through it, and a cut
|
|
976
|
+
// that still differs is a real trim on top of the rebase.
|
|
977
|
+
const shiftTally = new Map(), differing = new Map();
|
|
978
|
+
for (const { oe, ne } of P.pairs) {
|
|
979
|
+
if ([oe.srcIn, oe.srcOut, ne.srcIn, ne.srcOut].some((v) => v == null)) continue;
|
|
980
|
+
const dIn = ne.srcIn - oe.srcIn, dOut = ne.srcOut - oe.srcOut;
|
|
981
|
+
if (dIn === 0 && dOut === 0) continue;
|
|
982
|
+
const key = String(ne.source ?? '');
|
|
983
|
+
differing.set(key, (differing.get(key) || 0) + 1);
|
|
984
|
+
if (dIn === 0 || dIn !== dOut) continue;
|
|
985
|
+
if (!shiftTally.has(key)) shiftTally.set(key, new Map());
|
|
986
|
+
shiftTally.get(key).set(dIn, (shiftTally.get(key).get(dIn) || 0) + 1);
|
|
987
|
+
}
|
|
988
|
+
// A rebase is the source's DOMINANT story: the same shift on ≥2 cuts AND
|
|
989
|
+
// on more than half of the cuts whose windows differ at all. A source whose
|
|
990
|
+
// cuts each shift by a different amount (an eye-matched re-conform onto
|
|
991
|
+
// other media — measured: two of seven cuts happened to share a shift) is
|
|
992
|
+
// trims, not a base change.
|
|
993
|
+
const tcOffsets = new Map();
|
|
994
|
+
for (const [source, tally] of shiftTally) {
|
|
995
|
+
const [offset, cuts] = [...tally].sort((a, b) => b[1] - a[1])[0];
|
|
996
|
+
if (cuts >= 2 && cuts > (differing.get(source) || 0) / 2) tcOffsets.set(source, { source, offset, cuts, rebased: 0 });
|
|
997
|
+
}
|
|
998
|
+
|
|
876
999
|
const retained = [];
|
|
877
1000
|
for (const { oe, ne } of P.pairs) {
|
|
878
1001
|
const deltas = {};
|
|
879
1002
|
let kind = 'unchanged';
|
|
1003
|
+
const tc = tcOffsets.get(String(ne.source ?? ''));
|
|
1004
|
+
const off = tc ? tc.offset : 0;
|
|
1005
|
+
const oIn = oe.srcIn == null ? null : oe.srcIn + off, oOut = oe.srcOut == null ? null : oe.srcOut + off;
|
|
880
1006
|
if (Math.abs((oe.speed ?? 100) - (ne.speed ?? 100)) > 0.01 || Boolean(oe.reverse) !== Boolean(ne.reverse)) {
|
|
881
1007
|
kind = 'retimed';
|
|
882
1008
|
deltas.speed = { old: oe.speed, new: ne.speed };
|
|
@@ -884,9 +1010,11 @@ export function diffChangelist(oldEvents, newEvents, opts = {}) {
|
|
|
884
1010
|
} else if (Math.abs((oe.recIn ?? 0) - (ne.recIn ?? 0)) > recTol) {
|
|
885
1011
|
kind = 'moved';
|
|
886
1012
|
deltas.recIn = { old: oe.recIn, new: ne.recIn };
|
|
887
|
-
} else if ((
|
|
1013
|
+
} else if ((oIn ?? null) !== (ne.srcIn ?? null) || (oOut ?? null) !== (ne.srcOut ?? null)) {
|
|
888
1014
|
kind = 'trimmed';
|
|
889
|
-
deltas.src = { old: [
|
|
1015
|
+
deltas.src = { old: [oIn, oOut], new: [ne.srcIn, ne.srcOut], ...(off ? { tcOffset: off, oldBeforeRebase: [oe.srcIn, oe.srcOut] } : {}) };
|
|
1016
|
+
} else if (off && ((oe.srcIn ?? null) !== (ne.srcIn ?? null))) {
|
|
1017
|
+
tc.rebased += 1;
|
|
890
1018
|
}
|
|
891
1019
|
if (kind !== 'unchanged') changes.push({ kind, source: ne.source, track: ne.track, oldRecIn: oe.recIn, newRecIn: ne.recIn, deltas });
|
|
892
1020
|
else retained.push(ne);
|
|
@@ -904,10 +1032,60 @@ export function diffChangelist(oldEvents, newEvents, opts = {}) {
|
|
|
904
1032
|
}
|
|
905
1033
|
}
|
|
906
1034
|
|
|
1035
|
+
// JUNCTION REALIGN (E142): a cut that moved INSIDE an unchanged dissolve
|
|
1036
|
+
// span, with the incoming's source in and the outgoing's source out
|
|
1037
|
+
// sliding by the same amount, shows the identical picture — the dissolve
|
|
1038
|
+
// covers the same record frames from the same media either way. Premiere
|
|
1039
|
+
// keeps a fractional alignment (its cut sat 12 frames into a 46-frame
|
|
1040
|
+
// span); Resolve's conform re-centred it (23). Measured on a real reel: 9
|
|
1041
|
+
// of 10 residual 'moved' cuts were this, the tenth a real edit (its span
|
|
1042
|
+
// moved too). Fold each into one junction_realigned — a consequence, not
|
|
1043
|
+
// an edit — and let the junction diff read the pre-roll change as the
|
|
1044
|
+
// same fact.
|
|
1045
|
+
const realigned = new Set();
|
|
1046
|
+
const pairAtIn = (recIn, track) => P.pairs.find((pr) => pr.oe.track === track && pr.oe.recIn === recIn);
|
|
1047
|
+
const pairAtOut = (recOut, track) => P.pairs.find((pr) => pr.oe.track === track && pr.oe.recOut === recOut);
|
|
1048
|
+
for (const ot of P.old.transitions) {
|
|
1049
|
+
const nt = P.new.transitions.find((t) => t.track === ot.track && Math.abs(t.start - ot.start) <= recTol && Math.abs(t.end - ot.end) <= recTol);
|
|
1050
|
+
if (!nt) continue;
|
|
1051
|
+
const delta = nt.junction - ot.junction;
|
|
1052
|
+
if (!delta) continue;
|
|
1053
|
+
const inc = pairAtIn(ot.junction, ot.track), out = pairAtOut(ot.junction, ot.track);
|
|
1054
|
+
if (!inc || inc.ne.recIn !== nt.junction) continue;
|
|
1055
|
+
// The source slides by the cut delta at the clip's speed (a retimed
|
|
1056
|
+
// incoming at 80% slides 6 source frames for an 8-frame cut move —
|
|
1057
|
+
// measured on the reel's V3 fade-in); a TC-rebased outgoing is read
|
|
1058
|
+
// through its offset.
|
|
1059
|
+
const slide = (ev) => Math.round(delta * ((ev.speed ?? 100) / 100));
|
|
1060
|
+
const near = (a, b) => a != null && b != null && Math.abs(a - b) <= 1;
|
|
1061
|
+
const offOf = (ev) => (tcOffsets.get(String(ev.source ?? '')) ? tcOffsets.get(String(ev.source ?? '')).offset : 0);
|
|
1062
|
+
const incOk = near(inc.ne.srcIn - (inc.oe.srcIn + offOf(inc.ne)), slide(inc.ne)) && near(inc.ne.srcOut, inc.oe.srcOut + offOf(inc.ne));
|
|
1063
|
+
const outOk = !out || (out.ne.recOut === nt.junction
|
|
1064
|
+
&& near(out.ne.srcOut - (out.oe.srcOut + offOf(out.ne)), slide(out.ne))
|
|
1065
|
+
&& near(out.ne.srcIn, out.oe.srcIn == null ? null : out.oe.srcIn + offOf(out.ne)));
|
|
1066
|
+
if (!incOk || !outOk) continue;
|
|
1067
|
+
const isMoveOfInc = (c) => c.kind === 'moved' && c.track === ot.track && c.oldRecIn === inc.oe.recIn && c.newRecIn === inc.ne.recIn;
|
|
1068
|
+
const isTrimOfOut = (c) => out && c.kind === 'trimmed' && c.track === ot.track && c.oldRecIn === out.oe.recIn && c.newRecIn === out.ne.recIn;
|
|
1069
|
+
const before = changes.length;
|
|
1070
|
+
for (let i = changes.length - 1; i >= 0; i--) if (isMoveOfInc(changes[i]) || isTrimOfOut(changes[i])) changes.splice(i, 1);
|
|
1071
|
+
if (changes.length === before && !P.pairs.includes(inc)) continue;
|
|
1072
|
+
realigned.add(`${nt.track}|${nt.junction}`);
|
|
1073
|
+
// Both sides show the same picture: they are retained cuts, not edits.
|
|
1074
|
+
for (const pr of [inc, out]) if (pr && !retained.includes(pr.ne)) retained.push(pr.ne);
|
|
1075
|
+
changes.push({
|
|
1076
|
+
kind: 'junction_realigned', track: ot.track, oldRecIn: ot.junction, newRecIn: nt.junction, delta,
|
|
1077
|
+
span: [nt.start, nt.end], outgoing: nt.outgoing, incoming: nt.incoming, type: nt.type, duration: nt.duration,
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
|
|
907
1081
|
// Junction diff: a transition is identified by what it joins (track,
|
|
908
1082
|
// outgoing, incoming, fade side) and pairs with the closest junction; only
|
|
909
1083
|
// its SHAPE (duration / type / pre-roll) makes a change — a junction that
|
|
910
|
-
// travelled with its clips is the clips' move, already reported.
|
|
1084
|
+
// travelled with its clips is the clips' move, already reported. Two
|
|
1085
|
+
// labels for one effect family ("Cross Dissolve (Legacy)" in Premiere,
|
|
1086
|
+
// "Cross Dissolve" in Resolve — E142) are a relabel, not a change.
|
|
1087
|
+
const typeFamily = (t) => String(t ?? '').toLowerCase().replace(/\(legacy\)/g, '').replace(/^(video|audio)\s+/, '').replace(/\s+/g, ' ').trim();
|
|
1088
|
+
const relabels = [];
|
|
911
1089
|
const tKey = (t) => `${t.track}|${t.outgoing ?? ''}|${t.incoming}|${t.fade ?? 'x'}`;
|
|
912
1090
|
const tPool = P.old.transitions.map((t) => ({ t, used: false }));
|
|
913
1091
|
const tDesc = (t) => ({ track: t.track, outgoing: t.outgoing, incoming: t.incoming, fade: t.fade, type: t.type, duration: t.duration });
|
|
@@ -922,8 +1100,11 @@ export function diffChangelist(oldEvents, newEvents, opts = {}) {
|
|
|
922
1100
|
const ot = cands[0].t;
|
|
923
1101
|
const deltas = {};
|
|
924
1102
|
if (ot.duration !== nt.duration) deltas.duration = { old: ot.duration, new: nt.duration };
|
|
925
|
-
if (String(ot.type) !== String(nt.type))
|
|
926
|
-
|
|
1103
|
+
if (String(ot.type) !== String(nt.type)) {
|
|
1104
|
+
if (typeFamily(ot.type) === typeFamily(nt.type)) relabels.push({ track: nt.track, junction: nt.junction, old: ot.type, new: nt.type });
|
|
1105
|
+
else deltas.type = { old: ot.type, new: nt.type };
|
|
1106
|
+
}
|
|
1107
|
+
if (ot.pre !== nt.pre && !realigned.has(`${nt.track}|${nt.junction}`)) deltas.pre = { old: ot.pre, new: nt.pre };
|
|
927
1108
|
if (Object.keys(deltas).length) {
|
|
928
1109
|
changes.push({
|
|
929
1110
|
kind: 'transition_changed', ...tDesc(nt), oldRecIn: ot.junction, newRecIn: nt.junction,
|
|
@@ -949,16 +1130,19 @@ export function diffChangelist(oldEvents, newEvents, opts = {}) {
|
|
|
949
1130
|
// appeared with the cuts it joins) is a consequence, not an edit.
|
|
950
1131
|
const touches = (kind, junction, track) => changes.some((c) => c.kind === kind && c.track === track
|
|
951
1132
|
&& ((kind === 'gone' ? [c.oldRecIn, c.oldRecOut] : [c.newRecIn, c.newRecOut]).some((v) => Math.abs((v ?? -1e9) - junction) <= recTol)));
|
|
952
|
-
const consequential = (c) =>
|
|
1133
|
+
const consequential = (c) => c.kind === 'junction_realigned'
|
|
1134
|
+
|| (c.kind === 'transition_dropped' && touches('gone', c.oldRecIn, c.track))
|
|
953
1135
|
|| (c.kind === 'transition_added' && touches('new', c.newRecIn, c.track));
|
|
954
1136
|
const edits = changes.filter((c) => c.kind !== 'gone' && c.kind !== 'new' && !consequential(c)).length;
|
|
955
1137
|
const gone = counts.gone || 0, added = counts.new || 0;
|
|
956
1138
|
const oldCuts = P.old.cuts.length + skipOld.size, newCuts = P.new.cuts.length + skipNew.size;
|
|
957
1139
|
let shape = 'edit';
|
|
958
1140
|
if (!changes.length) shape = 'identical';
|
|
1141
|
+
else if (!edits && !gone && !added) shape = 'equivalent';
|
|
959
1142
|
else if (!edits && gone && !added && retained.length) shape = 'subset';
|
|
960
1143
|
else if (!edits && added && !gone && retained.length) shape = 'superset';
|
|
961
1144
|
const shapeInfo = { shape, retained: retained.length, oldCuts, newCuts };
|
|
1145
|
+
if (shape === 'equivalent') shapeInfo.note = `same picture: ${counts.junction_realigned || 0} junction(s) re-aligned inside unchanged dissolves${relabels.length ? `, ${relabels.length} transition label(s) differ` : ''} — nothing edited`;
|
|
962
1146
|
if (shape === 'subset' || shape === 'superset') {
|
|
963
1147
|
const of = shape === 'subset' ? oldCuts : newCuts;
|
|
964
1148
|
shapeInfo.sparse = retained.length / Math.max(1, of) < 0.5;
|
|
@@ -972,7 +1156,10 @@ export function diffChangelist(oldEvents, newEvents, opts = {}) {
|
|
|
972
1156
|
transitions: { old: P.old.transitions.length, new: P.new.transitions.length },
|
|
973
1157
|
carriersFolded: { old: P.old.carriers.length, new: P.new.carriers.length },
|
|
974
1158
|
...shapeInfo,
|
|
1159
|
+
sourceTcOffsets: [...tcOffsets.values()].map((t) => ({ source: t.source, offset: t.offset, cuts: t.cuts, rebased: t.rebased })),
|
|
1160
|
+
transitionRelabels: relabels.slice(0, 200),
|
|
975
1161
|
gate: 'review',
|
|
1162
|
+
__P: P,
|
|
976
1163
|
};
|
|
977
1164
|
}
|
|
978
1165
|
|
|
@@ -189,15 +189,24 @@ function realClipSource(clipNode, byId) {
|
|
|
189
189
|
}
|
|
190
190
|
const ms = srcEntry && asArray(srcEntry.node.MediaSource)[0];
|
|
191
191
|
const media = ms && byId.get(ref(ms, 'Media') || '');
|
|
192
|
+
let generator = false;
|
|
192
193
|
if (media) {
|
|
193
194
|
const path = findFirstText(media.node, ['ActualMediaFilePath', 'FilePath', 'RelativePath'], 6);
|
|
194
|
-
|
|
195
|
+
// A synthetic Premiere item (Universal Counting Leader, Black Video, colour
|
|
196
|
+
// matte…) has NO file: its Media writes a bare numeric id as the path and
|
|
197
|
+
// carries the human name in <Title> (E141, measured: FilePath 1279607108 /
|
|
198
|
+
// Title "Universal Counting Leader"). Name it by the title and tag it a
|
|
199
|
+
// generator so a changelist pairs it with the online cut's generator by
|
|
200
|
+
// NAME instead of reporting a numeric id replaced.
|
|
201
|
+
const title = findFirstText(media.node, ['Title'], 3);
|
|
202
|
+
if (path && /^\d+$/.test(String(path).trim()) && title) { name = String(title); generator = true; }
|
|
203
|
+
else if (path) name = String(path).split(/[\\/]/).pop();
|
|
195
204
|
}
|
|
196
205
|
if (!name) {
|
|
197
206
|
const master = byId.get(ref(sub.node, 'MasterClip') || '');
|
|
198
207
|
name = (master && nodeName(master.node)) || nodeName(sub.node) || null;
|
|
199
208
|
}
|
|
200
|
-
return { inPt, outPt, name };
|
|
209
|
+
return { inPt, outPt, name, generator };
|
|
201
210
|
}
|
|
202
211
|
|
|
203
212
|
function clipEvent(clipNode, byId, track, fps, index) {
|
|
@@ -225,6 +234,7 @@ function clipEvent(clipNode, byId, track, fps, index) {
|
|
|
225
234
|
track,
|
|
226
235
|
source: (real && real.name) || resolveSourceName(clipNode, byId),
|
|
227
236
|
...(real && real.nestedSequence ? { __nested: real.nestedSequence } : {}),
|
|
237
|
+
...(real && real.generator ? { generatorName: real.name } : {}),
|
|
228
238
|
srcIn: reverse ? srcOut : srcIn,
|
|
229
239
|
srcOut: reverse ? srcIn : srcOut,
|
|
230
240
|
recIn,
|
|
@@ -68,6 +68,9 @@ const changelistSchema = z.object({
|
|
|
68
68
|
new: eventArray.describe('New (turnover) normalized events'),
|
|
69
69
|
recTolerance: z.number().optional(),
|
|
70
70
|
timingGuards: z.boolean().optional().describe('Also run the timing silent-lie guards (default true)'),
|
|
71
|
+
sourceAliases: z.array(z.object({ from: z.string().optional(), to: z.string().optional(), pattern: z.string().optional(), replace: z.string().optional(), flags: z.string().optional() })).optional()
|
|
72
|
+
.describe('Rename OLD sources before pairing (E141): {from,to} exact or {pattern,replace} regex — e.g. the offline "4K-2K" proxies vs the online "4K" masters. A systematic rename is also inferred automatically (inferAliases) and reported in sourceAliases.'),
|
|
73
|
+
inferAliases: z.boolean().optional().describe('Infer a systematic source rename from unpaired cuts that share a record window (default true)'),
|
|
71
74
|
});
|
|
72
75
|
|
|
73
76
|
const conformManifestSchema = z.object({
|
|
@@ -87,7 +90,7 @@ const markerSchema = z.object({
|
|
|
87
90
|
export const editorialTool = {
|
|
88
91
|
name: 'editorial',
|
|
89
92
|
description:
|
|
90
|
-
'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; a NESTED SEQUENCE used as a clip — a SourceClip referencing a named CompositionMob — flattens through its reference window with fromCompound, like OTIO Stacks) + PRPROJ via gunzip+XML (real Premiere 2025 files — uuid ObjectUID/ObjectURef graph, TrackGroups, ClipTrackItem→SubClip→VideoClip→MediaSource→Media chain, zeros written as absence — and the legacy ObjectID/VideoTracks shape both walk; measured on a 739-sequence turnover that used to list ZERO; a NESTED SEQUENCE used as a clip — Source = Video/AudioSequenceSource → Sequence — flattens through its in-point window with fromCompound, like OTIO Stacks and AAF nested compositions; 13,711 such events on one real reels project; real transitions live in the track\'s TransitionItems list — read alongside ClipItems, attached with their DisplayName as type, HasOutgoingClip/HasIncomingClip false = fade from/to black or silence; tracks number as lanes V/V2…/A/A2… and a flattened nested sequence\'s inner lanes first-fit above what the parent already stacks — laneShift records the shift; markers are the sequence\'s OWN, read from Premiere\'s DVAMarker JSON) → 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/DRT/DRP pass the file PATH as content; DRT/DRP walk ONE timeline (`timeline` = pool name or index; default the first timeline-kind container) into events with sequence-relative record positions + the returned startFrame/startTimecode/fps read from the pool sequence — <In> is the source in-point (EMPTY on real audio clips → srcInAbsent), a keyed MediaTimemapBA Sm2TimeMap decodes to the speed (E140: the four retimed clips of a real reel read 80 — Premiere\'s 80 for the same cuts — with srcOut following the record window at that speed; XMax 60000 + zero slope = a freeze → the zero-speed in==out event; a negative slope = reverse; a map the decoder cannot read stays speed null + retimeUnknown, never faked to 100%), Sm2TiTransition alignment 2 centres on the cut and 3 ends at it — so two Resolve timeline VERSIONS diff through turnover_changelist (E139); 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 and nestedIn — an AAF composition another composition uses as a clip is NESTED in it; offer the parent, its cuts arrive flattened), 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 → a SHAPE verdict first — identical | subset (new keeps some of old\'s cuts unchanged in place and nothing else: a patch/selects reel of the same cut, NOT N deletions; a real Premiere auto-save kept 3 of 335) | superset (the reverse) | edit — with retained/oldCuts/newCuts, `sparse` and the retainedWindows for subset/superset, a transition that vanished or appeared with the cuts it joins counting as a consequence not an edit; then 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).',
|
|
93
|
+
'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; a NESTED SEQUENCE used as a clip — a SourceClip referencing a named CompositionMob — flattens through its reference window with fromCompound, like OTIO Stacks) + PRPROJ via gunzip+XML (real Premiere 2025 files — uuid ObjectUID/ObjectURef graph, TrackGroups, ClipTrackItem→SubClip→VideoClip→MediaSource→Media chain, zeros written as absence — and the legacy ObjectID/VideoTracks shape both walk; measured on a 739-sequence turnover that used to list ZERO; a NESTED SEQUENCE used as a clip — Source = Video/AudioSequenceSource → Sequence — flattens through its in-point window with fromCompound, like OTIO Stacks and AAF nested compositions; 13,711 such events on one real reels project; real transitions live in the track\'s TransitionItems list — read alongside ClipItems, attached with their DisplayName as type, HasOutgoingClip/HasIncomingClip false = fade from/to black or silence; tracks number as lanes V/V2…/A/A2… and a flattened nested sequence\'s inner lanes first-fit above what the parent already stacks — laneShift records the shift; markers are the sequence\'s OWN, read from Premiere\'s DVAMarker JSON) → 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/DRT/DRP pass the file PATH as content; DRT/DRP walk ONE timeline (`timeline` = pool name or index; default the first timeline-kind container) into events with sequence-relative record positions + the returned startFrame/startTimecode/fps read from the pool sequence — <In> is the source in-point (EMPTY on real audio clips → srcInAbsent), a keyed MediaTimemapBA Sm2TimeMap decodes to the speed (E140: the four retimed clips of a real reel read 80 — Premiere\'s 80 for the same cuts — with srcOut following the record window at that speed; XMax 60000 + zero slope = a freeze → the zero-speed in==out event; a negative slope = reverse; a map the decoder cannot read stays speed null + retimeUnknown, never faked to 100%), Sm2TiTransition alignment 2 centres on the cut and 3 ends at it — so two Resolve timeline VERSIONS diff through turnover_changelist (E139); 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 and nestedIn — an AAF composition another composition uses as a clip is NESTED in it; offer the parent, its cuts arrive flattened), 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 → a SHAPE verdict first — identical | subset (new keeps some of old\'s cuts unchanged in place and nothing else: a patch/selects reel of the same cut, NOT N deletions; a real Premiere auto-save kept 3 of 335) | superset (the reverse) | edit — with retained/oldCuts/newCuts, `sparse` and the retainedWindows for subset/superset, a transition that vanished or appeared with the cuts it joins counting as a consequence not an edit; RELINK-AWARE (E141): sourceAliases ({from,to} | {pattern,replace}) rename old sources before pairing, a systematic rename is INFERRED from unpaired cuts sharing a record window (one-to-one, recurring or clearly the same name) and reported in sourceAliases — a real offline→online turnover paired 15 of 228 cuts until the "4K-2K" proxies aliased to the "4K" masters, then 186 — and a constant per-source source-window shift witnessed on ≥2 cuts is a TC REBASE (sourceTcOffsets), not trims; a cut moved INSIDE an unchanged dissolve span with the incoming\'s source-in and the outgoing\'s source-out sliding by the same delta is ONE junction_realigned (E142: Premiere keeps a fractional alignment, Resolve\'s conform re-centres it — 9 of 10 residual moves on a real reel were this; same picture, a consequence not an edit) and two labels of one transition family ("Cross Dissolve (Legacy)" vs "Cross Dissolve") are a relabel in transitionRelabels, so a picture-identical conform reads shape `equivalent`; then 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).',
|
|
91
94
|
async handler({ action, args }) {
|
|
92
95
|
if (action === 'parse_interchange') {
|
|
93
96
|
const p = parseSchema.parse(args);
|
|
@@ -147,7 +150,7 @@ export const editorialTool = {
|
|
|
147
150
|
}
|
|
148
151
|
if (action === 'turnover_changelist') {
|
|
149
152
|
const p = changelistSchema.parse(args);
|
|
150
|
-
const result = diffChangelist(p.old, p.new, { recTolerance: p.recTolerance });
|
|
153
|
+
const result = diffChangelist(p.old, p.new, { recTolerance: p.recTolerance, sourceAliases: p.sourceAliases, inferAliases: p.inferAliases });
|
|
151
154
|
if (p.timingGuards !== false) result.timing = timingGuards(p.old, p.new);
|
|
152
155
|
return result;
|
|
153
156
|
}
|
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.194.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()}")
|