davinci-resolve-mcp 2.184.0 → 2.185.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 +24 -0
- package/README.md +1 -1
- package/README.zh-CN.md +2 -2
- package/docs/reference/api-limitations.md +9 -1
- package/install.py +1 -1
- package/package.json +1 -1
- package/resolve-advanced/server/prproj.mjs +104 -20
- package/resolve-advanced/server/tools/editorial.mjs +1 -1
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
- package/src/utils/api_truth.py +35 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
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.185.0 — E132: real Premiere projects parse — 739 sequences where there were zero
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **A real `.prproj` listed no sequences and walked no events.** Measured on
|
|
10
|
+
a real 130 MB Premiere 2025 colour turnover (project Version 45): objects
|
|
11
|
+
live in two id spaces — numeric `ObjectID`/`ObjectRef` and uuid
|
|
12
|
+
`ObjectUID`/`ObjectURef` — and every sequence, project item, master clip,
|
|
13
|
+
medium and clip track is uuid-defined; sequences list their tracks through
|
|
14
|
+
`TrackGroups` → track groups → `Tracks`; an item's record span sits under
|
|
15
|
+
`ClipTrackItem.TrackItem` and its source behind `SubClip` → `VideoClip`
|
|
16
|
+
(in/out points, source) → media source → `Media` (path); a zero is written
|
|
17
|
+
as absence; names are direct `<Name>` children. The parser keyed
|
|
18
|
+
`ObjectID` only, followed `ObjectRef` only, and knew only the synthetic
|
|
19
|
+
shape — 0 of 739 sequences listed. Both shapes now walk: the turnover
|
|
20
|
+
lists all 739 sequences by name and its reel walks 335 events with no
|
|
21
|
+
unknown source or position (the counting leader lands at frame 0). The
|
|
22
|
+
real shape is pinned as a synthetic fixture.
|
|
23
|
+
|
|
24
|
+
### Measured (filed in api-limitations)
|
|
25
|
+
|
|
26
|
+
- The Premiere 2025 `.prproj` object graph, both id spaces, the track-group
|
|
27
|
+
chain, the clip source chain, and the omitted-zero law.
|
|
28
|
+
|
|
5
29
|
## What's New in v2.184.0 — E131: a nested Stack's audio tracks flatten onto the parent audio lanes
|
|
6
30
|
|
|
7
31
|
### Verified
|
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.185.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
|
|
16
16
|
|
|
17
17
|
一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@ that none exists).
|
|
|
12
12
|
|
|
13
13
|
**Verified on:** DaVinci Resolve Studio 21.0.2
|
|
14
14
|
|
|
15
|
-
**Totals:**
|
|
15
|
+
**Totals:** 40 missing capabilities, 50 bugs / unreliable behaviors.
|
|
16
16
|
|
|
17
17
|
The authoritative source is the runtime-queryable `api_truth` ledger
|
|
18
18
|
(`resolve_control api_truth "<query>"`); this document is generated from
|
|
@@ -317,6 +317,14 @@ equivalent, blocking full automation.
|
|
|
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
|
|
|
320
|
+
### Premiere .prproj (2025, project Version 45) object graph — what a real file looks like
|
|
321
|
+
|
|
322
|
+
- **Object:** `editorial.parse_interchange / list_sequences (prproj)`
|
|
323
|
+
- **Signature:** `(path.prproj) -> sequences/events`
|
|
324
|
+
- **Behavior:** Measured on a real 130 MB colour turnover (E132): objects are defined in TWO id spaces — numeric ObjectID referenced by ObjectRef, and uuid ObjectUID referenced by ObjectURef — and Sequence, ClipProjectItem, MasterClip, Media, VideoClipTrack and AudioClipTrack are all UID-defined. A Sequence lists its tracks through <TrackGroups><TrackGroup><Second ObjectRef> → VideoTrackGroup / AudioTrackGroup (a third DataTrackGroup is empty) → <TrackGroup><Tracks><Track ObjectURef> → Video/AudioClipTrack → <ClipTrack><ClipItems><TrackItems><TrackItem ObjectRef>. An item's record span sits under <ClipTrackItem><TrackItem> (Start/End ticks) and its source under ClipTrackItem.SubClip → SubClip.Clip → VideoClip.Clip (InPoint/OutPoint, Source) → VideoMediaSource.MediaSource.Media (ObjectURef) → Media (FilePath / ActualMediaFilePath); SubClip.Name and MasterClip.Name are the fallbacks. A ZERO is written as ABSENCE (the counting leader at record 0 has End and no Start). Names are direct <Name> children. Legacy/synthetic files instead use ObjectID/ObjectRef throughout, <VideoTracks>/<AudioTracks> track lists, Start/End/InPoint/OutPoint on the item and Node/Properties names.
|
|
325
|
+
- **Workaround / current handling:** Index both id spaces and follow both reference attributes; walk TrackGroups when present; read timing through the *TrackItem child; treat a missing Start/InPoint beside a present End/OutPoint as 0. With that, the turnover lists all 739 sequences and its reel walks 335 events (it listed ZERO before).
|
|
326
|
+
- **Tags:** prproj, premiere, interchange, silent-failure
|
|
327
|
+
|
|
320
328
|
### ProjectManager.CreateProject (discards an unsaved current project)
|
|
321
329
|
|
|
322
330
|
- **Object:** `ProjectManager`
|
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.185.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
|
@@ -44,7 +44,13 @@ function childText(node, tag) {
|
|
|
44
44
|
return v;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
// A real Premiere 2025 object carries its name as a direct <Name> child
|
|
48
|
+
// (E132); the legacy/synthetic shape keeps it under Node/Properties.
|
|
49
|
+
const nodeName = (node) => {
|
|
50
|
+
const direct = childText(node, 'Name');
|
|
51
|
+
if (direct != null && String(direct).trim() !== '') return String(direct).trim();
|
|
52
|
+
return childText(node?.Node?.Properties, 'Name');
|
|
53
|
+
};
|
|
48
54
|
|
|
49
55
|
/** ticks → whole frames at fps. */
|
|
50
56
|
function ticksToFrames(ticks, fps) {
|
|
@@ -69,11 +75,19 @@ function indexObjects(xml) {
|
|
|
69
75
|
const doc = parser.parse(xml);
|
|
70
76
|
const pd = doc.PremiereData;
|
|
71
77
|
if (!pd) throw new Error('Not a .prproj: missing <PremiereData> root.');
|
|
78
|
+
// Two id spaces (E132, measured on a real Premiere 2025 turnover): objects
|
|
79
|
+
// are defined by numeric `ObjectID` (referenced by `ObjectRef`) OR by a
|
|
80
|
+
// uuid `ObjectUID` (referenced by `ObjectURef`) — sequences, project items,
|
|
81
|
+
// master clips, media and clip tracks are all UID-defined there, so a map
|
|
82
|
+
// keyed on ObjectID alone listed ZERO sequences. Key both; the spaces do
|
|
83
|
+
// not collide (integers vs uuids).
|
|
72
84
|
const byId = new Map();
|
|
73
85
|
for (const [tag, val] of Object.entries(pd)) {
|
|
74
86
|
if (tag.startsWith('@_')) continue;
|
|
75
87
|
for (const node of asArray(val)) {
|
|
76
|
-
if (node
|
|
88
|
+
if (!node || typeof node !== 'object') continue;
|
|
89
|
+
if (node['@_ObjectID'] != null) byId.set(String(node['@_ObjectID']), { tag, node });
|
|
90
|
+
if (node['@_ObjectUID'] != null) byId.set(String(node['@_ObjectUID']), { tag, node });
|
|
77
91
|
}
|
|
78
92
|
}
|
|
79
93
|
return { byId, projectVersion: firstProjectVersion(byId) };
|
|
@@ -86,9 +100,11 @@ function firstProjectVersion(byId) {
|
|
|
86
100
|
return null;
|
|
87
101
|
}
|
|
88
102
|
|
|
103
|
+
/** The id a reference element names: numeric ObjectRef or uuid ObjectURef (E132). */
|
|
104
|
+
const refId = (r) => (r ? String(r['@_ObjectRef'] ?? r['@_ObjectURef'] ?? '') : '');
|
|
89
105
|
const ref = (node, tag) => {
|
|
90
106
|
const r = asArray(node?.[tag])[0];
|
|
91
|
-
return r ?
|
|
107
|
+
return r ? refId(r) : null;
|
|
92
108
|
};
|
|
93
109
|
|
|
94
110
|
/** Best-effort source label for a clip item: media basename, else project-item name, else UNKNOWN. */
|
|
@@ -121,11 +137,65 @@ function findFirstText(node, tags, depth) {
|
|
|
121
137
|
return null;
|
|
122
138
|
}
|
|
123
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Record timing of a track item in either shape: Start/End directly on the
|
|
142
|
+
* item (synthetic/legacy) or under its <ClipTrackItem>/<TransitionTrackItem>
|
|
143
|
+
* <TrackItem> child (real Premiere 2025, E132).
|
|
144
|
+
*/
|
|
145
|
+
function itemTiming(node) {
|
|
146
|
+
// A ZERO is written as ABSENCE (measured E132: the counting leader at
|
|
147
|
+
// record 0 carries <End> and no <Start>), so a present End with no Start
|
|
148
|
+
// means Start 0 — never "unknown".
|
|
149
|
+
const norm = (t) => ({ start: t.start != null ? t.start : (t.end != null ? 0 : null), end: t.end });
|
|
150
|
+
const direct = { start: childText(node, 'Start'), end: childText(node, 'End') };
|
|
151
|
+
if (direct.end != null) return norm(direct);
|
|
152
|
+
for (const k of Object.keys(node || {})) {
|
|
153
|
+
if (!/TrackItem$/.test(k)) continue;
|
|
154
|
+
const inner = asArray(node[k])[0];
|
|
155
|
+
const ti = inner && asArray(inner.TrackItem)[0];
|
|
156
|
+
if (ti && childText(ti, 'End') != null) return norm({ start: childText(ti, 'Start'), end: childText(ti, 'End') });
|
|
157
|
+
}
|
|
158
|
+
return norm(direct);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Source timing + name of a real Premiere clip item: ClipTrackItem.SubClip →
|
|
163
|
+
* SubClip.Clip → VideoClip/AudioClip (InPoint/OutPoint, Source) →
|
|
164
|
+
* VideoMediaSource.MediaSource.Media → Media (file path). Null when the item
|
|
165
|
+
* is the synthetic shape (InPoint/OutPoint on the item itself).
|
|
166
|
+
*/
|
|
167
|
+
function realClipSource(clipNode, byId) {
|
|
168
|
+
const cti = asArray(clipNode.ClipTrackItem)[0];
|
|
169
|
+
if (!cti) return null;
|
|
170
|
+
const sub = byId.get(ref(cti, 'SubClip') || '');
|
|
171
|
+
if (!sub) return null;
|
|
172
|
+
const clip = byId.get(ref(sub.node, 'Clip') || '');
|
|
173
|
+
const inner = clip && (asArray(clip.node.Clip)[0] || clip.node);
|
|
174
|
+
const outPt = inner ? childText(inner, 'OutPoint') : null;
|
|
175
|
+
// Same omitted-zero law for the source in-point.
|
|
176
|
+
const inPt = inner ? (childText(inner, 'InPoint') != null ? childText(inner, 'InPoint') : (outPt != null ? 0 : null)) : null;
|
|
177
|
+
let name = null;
|
|
178
|
+
const srcEntry = inner && byId.get(ref(inner, 'Source') || '');
|
|
179
|
+
const ms = srcEntry && asArray(srcEntry.node.MediaSource)[0];
|
|
180
|
+
const media = ms && byId.get(ref(ms, 'Media') || '');
|
|
181
|
+
if (media) {
|
|
182
|
+
const path = findFirstText(media.node, ['ActualMediaFilePath', 'FilePath', 'RelativePath'], 6);
|
|
183
|
+
if (path) name = String(path).split(/[\\/]/).pop();
|
|
184
|
+
}
|
|
185
|
+
if (!name) {
|
|
186
|
+
const master = byId.get(ref(sub.node, 'MasterClip') || '');
|
|
187
|
+
name = (master && nodeName(master.node)) || nodeName(sub.node) || null;
|
|
188
|
+
}
|
|
189
|
+
return { inPt, outPt, name };
|
|
190
|
+
}
|
|
191
|
+
|
|
124
192
|
function clipEvent(clipNode, byId, track, fps, index) {
|
|
125
|
-
const
|
|
126
|
-
const
|
|
127
|
-
const
|
|
128
|
-
const
|
|
193
|
+
const timing = itemTiming(clipNode);
|
|
194
|
+
const real = realClipSource(clipNode, byId);
|
|
195
|
+
const start = timing.start;
|
|
196
|
+
const end = timing.end;
|
|
197
|
+
const inPt = real && real.inPt != null ? real.inPt : childText(clipNode, 'InPoint');
|
|
198
|
+
const outPt = real && real.outPt != null ? real.outPt : childText(clipNode, 'OutPoint');
|
|
129
199
|
const recIn = ticksToFrames(start, fps);
|
|
130
200
|
const recOut = ticksToFrames(end, fps);
|
|
131
201
|
const srcIn = ticksToFrames(inPt, fps);
|
|
@@ -142,7 +212,7 @@ function clipEvent(clipNode, byId, track, fps, index) {
|
|
|
142
212
|
return {
|
|
143
213
|
index,
|
|
144
214
|
track,
|
|
145
|
-
source: resolveSourceName(clipNode, byId),
|
|
215
|
+
source: (real && real.name) || resolveSourceName(clipNode, byId),
|
|
146
216
|
srcIn: reverse ? srcOut : srcIn,
|
|
147
217
|
srcOut: reverse ? srcIn : srcOut,
|
|
148
218
|
recIn,
|
|
@@ -158,25 +228,39 @@ function walkSequence(seqEntry, byId) {
|
|
|
158
228
|
const fps = deriveFps(seqEntry.node);
|
|
159
229
|
const events = [];
|
|
160
230
|
let idx = 1;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
231
|
+
// Two sequence shapes (E132): the synthetic/legacy one lists tracks under
|
|
232
|
+
// <VideoTracks>/<AudioTracks>; a real Premiere 2025 project lists
|
|
233
|
+
// <TrackGroups> whose <Second> references a VideoTrackGroup /
|
|
234
|
+
// AudioTrackGroup carrying <TrackGroup><Tracks><Track ObjectURef>.
|
|
235
|
+
const trackLists = [];
|
|
236
|
+
for (const [container, trackKind] of [['VideoTracks', 'V'], ['AudioTracks', 'A']]) {
|
|
237
|
+
const refs = asArray(seqEntry.node[container]?.Track);
|
|
238
|
+
if (refs.length) trackLists.push({ trackKind, refs });
|
|
239
|
+
}
|
|
240
|
+
for (const tg of asArray(seqEntry.node.TrackGroups?.TrackGroup)) {
|
|
241
|
+
const grp = byId.get(refId(asArray(tg.Second)[0]));
|
|
242
|
+
if (!grp) continue;
|
|
243
|
+
const trackKind = /^Audio/.test(grp.tag) ? 'A' : /^Video/.test(grp.tag) ? 'V' : null;
|
|
244
|
+
if (!trackKind) continue;
|
|
245
|
+
const refs = asArray(grp.node.TrackGroup?.Tracks?.Track);
|
|
246
|
+
if (refs.length) trackLists.push({ trackKind, refs });
|
|
247
|
+
}
|
|
248
|
+
for (const { trackKind, refs: trackRefs } of trackLists) {
|
|
166
249
|
for (const tref of trackRefs) {
|
|
167
|
-
const tEntry = byId.get(
|
|
250
|
+
const tEntry = byId.get(refId(tref));
|
|
168
251
|
if (!tEntry) continue;
|
|
169
|
-
const itemRefs = asArray(tEntry.node.TrackItems?.TrackItem);
|
|
252
|
+
const itemRefs = asArray(tEntry.node.TrackItems?.TrackItem).concat(asArray(tEntry.node.ClipTrack?.ClipItems?.TrackItems?.TrackItem), asArray(tEntry.node.ClipItems?.TrackItems?.TrackItem));
|
|
170
253
|
const transitions = [];
|
|
171
254
|
const clipEvents = [];
|
|
172
255
|
for (const iref of itemRefs) {
|
|
173
|
-
const cEntry = byId.get(
|
|
256
|
+
const cEntry = byId.get(refId(iref));
|
|
174
257
|
if (!cEntry) continue;
|
|
175
258
|
if (/ClipTrackItem$/.test(cEntry.tag)) {
|
|
176
259
|
clipEvents.push(clipEvent(cEntry.node, byId, trackKind, fps, idx++));
|
|
177
260
|
} else if (/Transition/.test(cEntry.tag)) {
|
|
178
|
-
const
|
|
179
|
-
|
|
261
|
+
const ti = itemTiming(cEntry.node);
|
|
262
|
+
const dur = ticksToFrames(Number(ti.end) - Number(ti.start), fps);
|
|
263
|
+
transitions.push({ recIn: ticksToFrames(ti.start, fps), duration: dur || 0 });
|
|
180
264
|
}
|
|
181
265
|
}
|
|
182
266
|
// Attach each transition to the INCOMING clip whose record-in falls
|
|
@@ -243,8 +327,8 @@ export function parsePrprojDoc(pathOrBuffer) {
|
|
|
243
327
|
const fps = deriveFps(entry.node);
|
|
244
328
|
const events = walkSequence(entry, byId);
|
|
245
329
|
return {
|
|
246
|
-
id: String(entry.node['@_ObjectID']),
|
|
247
|
-
name: nodeName(entry.node) || `Sequence ${entry.node['@_ObjectID']}`,
|
|
330
|
+
id: String(entry.node['@_ObjectID'] ?? entry.node['@_ObjectUID']),
|
|
331
|
+
name: nodeName(entry.node) || `Sequence ${entry.node['@_ObjectID'] ?? entry.node['@_ObjectUID']}`,
|
|
248
332
|
fps,
|
|
249
333
|
eventCount: events.length,
|
|
250
334
|
events,
|
|
@@ -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; 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 → 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 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 → 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).',
|
|
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; 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) → 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 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 → 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);
|
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.185.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
package/src/utils/api_truth.py
CHANGED
|
@@ -2877,6 +2877,41 @@ API_TRUTH: List[Dict[str, Any]] = [
|
|
|
2877
2877
|
"submit": "missing",
|
|
2878
2878
|
"mitigation": ["drp-format placeGenerator color", "editorial.parse_interchange fillcolor", "drt.assemble_from_interchange"],
|
|
2879
2879
|
},
|
|
2880
|
+
{
|
|
2881
|
+
"symbol": "Premiere .prproj (2025, project Version 45) object graph — what a real file looks like",
|
|
2882
|
+
"object": "editorial.parse_interchange / list_sequences (prproj)",
|
|
2883
|
+
"signature": "(path.prproj) -> sequences/events",
|
|
2884
|
+
"reality": "Measured on a real 130 MB colour turnover (E132): objects "
|
|
2885
|
+
"are defined in TWO id spaces — numeric ObjectID referenced "
|
|
2886
|
+
"by ObjectRef, and uuid ObjectUID referenced by ObjectURef — "
|
|
2887
|
+
"and Sequence, ClipProjectItem, MasterClip, Media, "
|
|
2888
|
+
"VideoClipTrack and AudioClipTrack are all UID-defined. A "
|
|
2889
|
+
"Sequence lists its tracks through <TrackGroups><TrackGroup>"
|
|
2890
|
+
"<Second ObjectRef> → VideoTrackGroup / AudioTrackGroup "
|
|
2891
|
+
"(a third DataTrackGroup is empty) → <TrackGroup><Tracks>"
|
|
2892
|
+
"<Track ObjectURef> → Video/AudioClipTrack → <ClipTrack>"
|
|
2893
|
+
"<ClipItems><TrackItems><TrackItem ObjectRef>. An item's "
|
|
2894
|
+
"record span sits under <ClipTrackItem><TrackItem> "
|
|
2895
|
+
"(Start/End ticks) and its source under ClipTrackItem.SubClip "
|
|
2896
|
+
"→ SubClip.Clip → VideoClip.Clip (InPoint/OutPoint, Source) → "
|
|
2897
|
+
"VideoMediaSource.MediaSource.Media (ObjectURef) → Media "
|
|
2898
|
+
"(FilePath / ActualMediaFilePath); SubClip.Name and "
|
|
2899
|
+
"MasterClip.Name are the fallbacks. A ZERO is written as "
|
|
2900
|
+
"ABSENCE (the counting leader at record 0 has End and no "
|
|
2901
|
+
"Start). Names are direct <Name> children. Legacy/synthetic "
|
|
2902
|
+
"files instead use ObjectID/ObjectRef throughout, "
|
|
2903
|
+
"<VideoTracks>/<AudioTracks> track lists, Start/End/InPoint/"
|
|
2904
|
+
"OutPoint on the item and Node/Properties names.",
|
|
2905
|
+
"recommended": "Index both id spaces and follow both reference "
|
|
2906
|
+
"attributes; walk TrackGroups when present; read timing "
|
|
2907
|
+
"through the *TrackItem child; treat a missing Start/"
|
|
2908
|
+
"InPoint beside a present End/OutPoint as 0. With that, "
|
|
2909
|
+
"the turnover lists all 739 sequences and its reel walks "
|
|
2910
|
+
"335 events (it listed ZERO before).",
|
|
2911
|
+
"tags": ["prproj", "premiere", "interchange", "silent-failure"],
|
|
2912
|
+
"submit": "missing",
|
|
2913
|
+
"mitigation": ["editorial.parse_interchange prproj", "editorial.list_sequences"],
|
|
2914
|
+
},
|
|
2880
2915
|
{
|
|
2881
2916
|
"symbol": "ProjectManager.CreateProject (discards an unsaved current project)",
|
|
2882
2917
|
"object": "ProjectManager",
|