davinci-resolve-mcp 2.178.0 → 2.180.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,35 @@
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.180.0 — E126: the sequence picker knows a nested composition from a turnover
6
+
7
+ ### Added
8
+
9
+ - **`list_sequences` flags nested AAF compositions.** An Avid nested sequence
10
+ (a composition another composition uses as a clip) listed as a peer of the
11
+ timeline that uses it, so a "which sequence?" picker offered the inner
12
+ composition as a turnover of its own. Each AAF sequence now reports
13
+ `nests` (the compositions it flattens) and `nestedIn` (the sequences that
14
+ use it); nested compositions still list — their cuts also arrive flattened
15
+ inside the parent (E125) — but a picker can demote them.
16
+
17
+ ## What's New in v2.179.0 — E125: an Avid nested sequence used as a clip flattens into the parent
18
+
19
+ ### Fixed
20
+
21
+ - **A nested sequence in an AAF turnover was an unmapped reel.** A
22
+ SourceClip that references a NAMED CompositionMob is an Avid nested
23
+ timeline used as a clip; the walker's reference chase stopped at the first
24
+ named mob and emitted the composition's name as a source reel while its own
25
+ cuts sat in the same AAF. The walk now descends into the named
26
+ composition's editorial slot and translates its cuts through the
27
+ reference's window (source trimmed at each cut's play rate), tagging
28
+ `fromCompound` — the OTIO Stack flatten (E120) for AAF. Unnamed
29
+ intermediate compositions (subclips, group clips) keep the reference
30
+ chase. Render-verified on 19.1.3.7: the flattened turnover conforms and
31
+ plays the nested sequence's white insert exactly where the parent used it
32
+ (234 across its 24 frames, picture either side).
33
+
5
34
  ## What's New in v2.178.0 — E124: the manifest and the changelist know a compound when they see one
6
35
 
7
36
  ### Fixed
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [简体中文](README.zh-CN.md)
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.178.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.180.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-36%20(353%20full)-blue.svg)](#server-modes)
package/README.zh-CN.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md) | 简体中文
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.178.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.180.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-36%20(353%20full)-blue.svg)](#服务器模式)
@@ -12,7 +12,7 @@
12
12
  [![Python](https://img.shields.io/badge/python-3.10+-green.svg)](https://www.python.org/downloads/)
13
13
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
14
14
 
15
- > 本翻译对应 v2.178.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
15
+ > 本翻译对应 v2.180.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.178.0"
40
+ VERSION = "2.180.0"
41
41
  # Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
42
42
  # Resolve's scripting bridge loads into newer interpreters on recent builds
43
43
  # (Python 3.14 verified against Resolve Studio 20.3.2). Older Resolve builds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davinci-resolve-mcp",
3
- "version": "2.178.0",
3
+ "version": "2.180.0",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -103,6 +103,9 @@ function sequenceSummary(s) {
103
103
  startFrame: s.startFrame ?? null,
104
104
  startTimecodeFps: s.startTimecodeFps ?? null,
105
105
  startTimecodeDrop: s.startTimecodeDrop ?? null,
106
+ // E126: a composition another composition uses as a clip is NESTED — a
107
+ // picker should not offer it as a turnover of its own.
108
+ nestedIn: Array.isArray(s.nestedIn) ? s.nestedIn : [],
106
109
  };
107
110
  if (s.unhandled && Object.keys(s.unhandled).length) out.unhandled = s.unhandled;
108
111
  return out;
@@ -418,6 +418,35 @@ def _source_position_fields(clip):
418
418
  return fields
419
419
 
420
420
 
421
+ def _nested_named_composition(clip):
422
+ """(CompositionMob, inner segment) when `clip` references a NAMED CompositionMob
423
+ whose referenced slot holds editorial content — an Avid nested sequence used as a
424
+ clip (E125). None for MasterMobs and for the unnamed intermediate compositions
425
+ that subclips and group clips route through (those keep the reference chase)."""
426
+ try:
427
+ mob = getattr(clip, "mob", None)
428
+ except Exception:
429
+ return None
430
+ if mob is None or type(mob).__name__ != "CompositionMob" or not _usable_name(mob):
431
+ return None
432
+ try:
433
+ slot_id = getattr(clip, "slot_id", None)
434
+ slot = None
435
+ for candidate in getattr(mob, "slots", []) or []:
436
+ if slot_id is None or getattr(candidate, "slot_id", None) == slot_id:
437
+ if _is_editorial_slot(candidate):
438
+ slot = candidate
439
+ break
440
+ if slot is None:
441
+ return None
442
+ segment = getattr(slot, "segment", None)
443
+ except Exception:
444
+ return None
445
+ if segment is None:
446
+ return None
447
+ return mob, segment
448
+
449
+
421
450
  def _emit_source_clip(clip, *, index, track, rec, fps, transition=None):
422
451
  """Turn a SourceClip into a normalized event. Returns (event, length)."""
423
452
  try:
@@ -1050,6 +1079,47 @@ def _walk_segment(segment, *, track, fps, rec, state, depth=0, transition=None):
1050
1079
  return declared
1051
1080
 
1052
1081
  if cls == "SourceClip":
1082
+ # NESTED SEQUENCE (E125): a SourceClip that references a NAMED
1083
+ # CompositionMob is an Avid nested timeline used as a clip. Its inner
1084
+ # cuts are right here in the AAF, so flatten them into this record
1085
+ # position through the reference's window (start/length) — the way
1086
+ # OTIO Stacks flatten (E120) — instead of emitting the composition's
1087
+ # NAME as a source reel the bridge cannot map. Unnamed compositions
1088
+ # (subclips, group clips) keep the reference chase.
1089
+ nested = _nested_named_composition(segment)
1090
+ if nested is not None and depth < _MAX_DEPTH:
1091
+ comp_mob, inner_segment = nested
1092
+ state.setdefault("nestedRefs", set()).add(_usable_name(comp_mob))
1093
+ length = _length(segment)
1094
+ try:
1095
+ start = int(getattr(segment, "start", 0) or 0)
1096
+ except Exception:
1097
+ start = 0
1098
+ sub = {"idx": 1, "events": [], "unhandled": state.setdefault("unhandled", {}), "effectsWithoutEvents": state.setdefault("effectsWithoutEvents", {})}
1099
+ _walk_segment(inner_segment, track=track, fps=fps, rec=0, state=sub, depth=depth + 1)
1100
+ first = True
1101
+ for ev in sub["events"]:
1102
+ if ev.get("recIn") is None or ev.get("recOut") is None:
1103
+ continue
1104
+ a, b = ev["recIn"] - start, ev["recOut"] - start
1105
+ a2, b2 = max(0, a), min(length, b)
1106
+ if b2 <= a2:
1107
+ continue
1108
+ k = (float(ev.get("speed") or 100) / 100.0) * (-1 if ev.get("reverse") else 1)
1109
+ flat = dict(ev)
1110
+ flat["index"] = state["idx"]
1111
+ flat["recIn"], flat["recOut"] = rec + a2, rec + b2
1112
+ if flat.get("srcIn") is not None:
1113
+ flat["srcIn"] = int(round(flat["srcIn"] + (a2 - a) * k))
1114
+ if flat.get("srcOut") is not None:
1115
+ flat["srcOut"] = int(round(flat["srcOut"] - (b - b2) * k))
1116
+ flat["fromCompound"] = _usable_name(comp_mob)
1117
+ if first and transition is not None and not flat.get("transition"):
1118
+ flat["transition"] = transition
1119
+ first = False
1120
+ state["events"].append(flat)
1121
+ state["idx"] += 1
1122
+ return length
1053
1123
  ev, length = _emit_source_clip(
1054
1124
  segment, index=state["idx"], track=track, rec=rec, fps=fps, transition=transition
1055
1125
  )
@@ -1509,9 +1579,24 @@ def probe(path):
1509
1579
  # A conform that silently loses 29 titles looks exactly like a
1510
1580
  # conform that had none. Counted by operation name so it cannot.
1511
1581
  "effectsWithoutEvents": dict(sorted(state.get("effectsWithoutEvents", {}).items())),
1582
+ # Compositions this sequence uses as clips (E126): the picker
1583
+ # should not offer a NESTED sequence as a turnover of its own.
1584
+ "nests": sorted(state.get("nestedRefs", set())),
1585
+ "nestedIn": [],
1512
1586
  "events": events,
1513
1587
  }
1514
1588
  )
1589
+ # A composition used as a clip by another composition is NESTED in it — flag the
1590
+ # child so a "which sequence?" picker can demote it (it still lists; its cuts also
1591
+ # arrive flattened inside the parent, E125).
1592
+ by_name = {}
1593
+ for seq in sequences:
1594
+ by_name.setdefault(seq["name"], []).append(seq)
1595
+ for parent in sequences:
1596
+ for child_name in parent.get("nests", []):
1597
+ for child in by_name.get(child_name, []):
1598
+ if child is not parent and parent["name"] not in child["nestedIn"]:
1599
+ child["nestedIn"].append(parent["name"])
1515
1600
  return sequences
1516
1601
 
1517
1602
 
@@ -86,7 +86,7 @@ const markerSchema = z.object({
86
86
  export const editorialTool = {
87
87
  name: 'editorial',
88
88
  description:
89
- 'Editorial integrity (Cluster E) — turnover interchange → normalized events → changelist + conform manifest with TIMING silent-lie guards (flattened retime / dropped J/L-cut audio / framerate-pulldown slip / reverse dropped / transition-handle starvation → flag, skip-not-fake). Report-only (gate: review). Actions: parse_interchange (EDL/OTIO/XMEML natively — incl. Resolve-written OTIO generator clips (a Solid Color is a Clip with a NULL media_reference; it walks as a BL leg with generatorName, and an OTIO GeneratorReference carries its colour) and nested OTIO Stacks (compound clips — Resolve\'s writer nests them with a trim window) FLATTEN into record time with fromCompound on each cut, so Resolve\'s own OTIO exports re-conform (its FCP7 XML writer flattens a compound to ONE media-less clipitem instead — tagged `compound`, which the bridge drops with a reason in unresolvedCompounds unless the sourceMap maps the compound name to a flattened media file), Resolve-written FCP7 -1 junction edges (paired in record order) + Solid Color / Color Matte generators carrying their `fillcolor` (BL legs with `color` → fade-to-white and colour mattes author, E110), XMEML audio-track transitionitems as audio cross-fades on numbered lanes A/A2/…, and CMX FROM/TO CLIP NAME comments over the generic AX reel — + AAF via pyaaf2 (flat sound/picture slots number A/A2/… and V/V2/… in slot order so separate beds keep their lanes; NestedScope layers keep layer numbering) + PRPROJ via gunzip+XML → normalized events incl. span-explicit transitions, BL fade legs, and freezes as zero-speed events (OTIO FreezeFrame, XMEML timeremap 0, PrProj in==out, AAF 0% motion effects); for AAF/PRPROJ pass the file PATH as content; AAF also returns per-sequence startTimecode/startFrame — build the timeline at THAT start, not the Resolve 01:00:00:00 default — and per-clip `geometry` for Avid transform effects), list_sequences (ONE offline picker entry point across xml/edl/otio/drt/drp/aaf/prproj → [{id,name,eventCount}], plus startTimecode/startFrame for AAF), convert_to_interchange (author OTIO/EDL/DRT Resolve CAN import from events or a parsed source; the EDL target writes CMX transition pairs incl. BL fades — the .prproj→Resolve conform bridge, no Premiere needed; editorial timing/transitions survive and per-clip effects/color do not. SPEED/REVERSE survive on the otio (LinearTimeWarp) and edl (M2) targets ONLY — this FLAT drt target flattens every retime to 100% forward and returns `flattened`/`flattenedCount` naming each event that lost one (`flattened` is always present on `drt`, empty when there were none); for a .drt that AUTHORS retimes/dissolves/multi-track/audio, use drt.assemble_from_interchange), turnover_changelist (diff old vs new → moved/retimed/trimmed/replaced/new/gone PLUS the junction diff: transition_added/transition_dropped/transition_changed with fade in/out or dissolve, outgoing/incoming, span and duration/type/pre-roll deltas — zero-length CMX carrier lines and the BL legs that carry fades fold into the junction diff instead of reading as gone/new sources; events pair by closest record position, consumed once, so a source cut twice at two speeds compares instance to instance; + timing flags incl. transition_dropped and dropped_split_audio on any A-track; 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 → 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);
@@ -87,7 +87,7 @@ if not logging.getLogger().handlers:
87
87
  handlers=[logging.StreamHandler()],
88
88
  )
89
89
 
90
- VERSION = "2.178.0"
90
+ VERSION = "2.180.0"
91
91
  logger = logging.getLogger("davinci-resolve-mcp")
92
92
  logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
93
93
  logger.info(f"Detected platform: {get_platform()}")
package/src/server.py CHANGED
@@ -11,7 +11,7 @@ Usage:
11
11
  python src/server.py --full # Start the 353-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "2.178.0"
14
+ VERSION = "2.180.0"
15
15
 
16
16
  import base64
17
17
  import os