davinci-resolve-mcp 5.2.2 → 5.2.4

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,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 v5.2.4 — The round-trip probe leaves the current timeline alone
6
+
7
+ From #364 by @Wintch.
8
+
9
+ ### Fixed
10
+
11
+ - **`timeline` `probe_interchange_roundtrip` changed which timeline was current.** Resolve makes an imported timeline current, and deleting it leaves Resolve to pick another one, in practice the last in the list. The probe never switched back, so a later call on "the current timeline" could edit a different timeline. The bug was invisible whenever the starting timeline was already last. The probe now makes the starting timeline current again after cleanup, after a failed import, and with `cleanup_imported: false`, and confirms the switch by reading it back, as #344 did for other timeline switches. A new `current_timeline` field reports `restored`, with an error and the readback when the switch did not take.
12
+
13
+ ### Not verified here
14
+
15
+ - Unit-tested with a fake project that behaves as the report describes. Not run against Resolve on this machine.
16
+
17
+ ## What's New in v5.2.3 — SetPosition and MoveItems take a position dict
18
+
19
+ From the re-measurement in #336 by @CaptRauti. No server behaviour changes.
20
+
21
+ ### Changed
22
+
23
+ - **API truth ledger: `TimelineItem.SetPosition` / `Timeline.MoveItems`.** Both take a position dict, `{startFrame[, trackType, trackIndex]}`, not a bare frame number. On Studio 21.2.0.6 (Windows), `SetPosition({'startFrame': 86800})` returned True and moved the clip, while 100 and −50, below the timeline's `StartFrame`, returned False and left it in place. `trackType` and `trackIndex` are optional, and a float `startFrame` snapped to the whole frame. The bare-int form `SetPosition(86800)` returned False for every input, which reads exactly like a broken method; the entry now says so and recommends the dict.
24
+
25
+ ### Not verified here
26
+
27
+ - The readings are the reporter's. This server calls neither method, and nothing was re-measured on this machine. Whether 21.1.2.10 accepts a correct in-range call is still not known.
28
+
5
29
  ## What's New in v5.2.2 — Long words in captions are no longer cut off
6
30
 
7
31
  From #360 by @goranai.
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-5.2.2-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-5.2.4-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-37%20(390%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-5.2.2-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-5.2.4-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-37%20(390%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
- > 本翻译对应 v5.2.2 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
15
+ > 本翻译对应 v5.2.4 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
16
16
 
17
17
  一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
18
18
 
@@ -34,7 +34,7 @@ All actions are exposed through `timeline`.
34
34
  | `export_timeline_checked` | Resolve export aliases and guard timeline export paths to temp locations by default. |
35
35
  | `import_timeline_checked` | Guard timeline imports from temp locations and normalize import options. |
36
36
  | `compare_timelines` | Compare current timeline to another timeline or two supplied snapshots. |
37
- | `probe_interchange_roundtrip` | Export, import, compare, and optionally delete the imported timeline. |
37
+ | `probe_interchange_roundtrip` | Export, import, compare, and optionally delete the imported timeline, then make the starting timeline current again. |
38
38
  | `detect_missing_media` | Detect missing/offline media using Resolve status fields and file-path existence, with a sanitized diagnosis block for mounted-volume/folder/file failure modes. |
39
39
  | `build_relink_plan` | Read-only, bounded search-root scan for relink candidates by missing file basename. Skips broad scans by default when the source volume is not mounted. |
40
40
  | `conform_boundary_report` | Return capabilities, timeline structure, gaps/overlaps, source ranges, and missing-media summary. |
package/install.py CHANGED
@@ -37,7 +37,7 @@ from src.utils.update_check import (
37
37
 
38
38
  # ─── Version ──────────────────────────────────────────────────────────────────
39
39
 
40
- VERSION = "5.2.2"
40
+ VERSION = "5.2.4"
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": "5.2.2",
3
+ "version": "5.2.4",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -93,7 +93,7 @@ if not logging.getLogger().handlers:
93
93
  handlers=[logging.StreamHandler()],
94
94
  )
95
95
 
96
- VERSION = "5.2.2"
96
+ VERSION = "5.2.4"
97
97
  logger = logging.getLogger("davinci-resolve-mcp")
98
98
  logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
99
99
  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 377-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "5.2.2"
14
+ VERSION = "5.2.4"
15
15
 
16
16
  import base64
17
17
  import os
@@ -9609,6 +9609,29 @@ def _probe_interchange_roundtrip(proj, mp, tl, p: Dict[str, Any]):
9609
9609
  import_path = export_result.get("primary_file") or export_result.get("path") or path
9610
9610
  import_options = dict(p.get("import_options") or {})
9611
9611
  requested_key = str(spec["requested"]).lower()
9612
+ # Resolve makes an imported timeline current, and deleting it leaves Resolve
9613
+ # to pick another (in practice the last in the list). The probe only reads,
9614
+ # so it puts back whatever was current when it started, and proves it, before
9615
+ # every return from here on (#364).
9616
+ try:
9617
+ original_current = proj.GetCurrentTimeline()
9618
+ except Exception:
9619
+ original_current = None
9620
+
9621
+ def _restore_current():
9622
+ if original_current is None:
9623
+ return {"restored": None, "reason": "no current timeline when the probe started"}
9624
+ ok, detail = _resolve_writes.set_current_timeline(proj, original_current)
9625
+ if ok:
9626
+ return {"restored": True}
9627
+ logger.warning("probe_interchange_roundtrip could not restore the current timeline: %s", detail)
9628
+ return {"restored": False,
9629
+ "error": ("The round-trip probe could not make the timeline that was current "
9630
+ f"when it started ({detail.get('wanted_timeline_id')!r}) current again; "
9631
+ f"the current timeline is {detail.get('current_timeline_id')!r}. "
9632
+ "Set it before any call that works on the current timeline."),
9633
+ "state": detail}
9634
+
9612
9635
  if "drt" not in requested_key:
9613
9636
  import_options.setdefault("timelineName", p.get("imported_timeline_name", f"{tl.GetName()} {spec['requested']} Roundtrip"))
9614
9637
  import_options.setdefault("importSourceClips", _coerce_bool(p.get("import_source_clips"), False))
@@ -9622,7 +9645,8 @@ def _probe_interchange_roundtrip(proj, mp, tl, p: Dict[str, Any]):
9622
9645
  },
9623
9646
  )
9624
9647
  if import_result.get("error") or not import_result.get("success"):
9625
- return {"success": False, "stage": "import", "export": export_result, "import": import_result}
9648
+ return {"success": False, "stage": "import", "export": export_result, "import": import_result,
9649
+ "current_timeline": _restore_current()}
9626
9650
  imported_tl = None
9627
9651
  if import_result.get("id"):
9628
9652
  imported_tl, _ = _timeline_by_selector(proj, {"right_timeline_id": import_result["id"]}, prefix="right")
@@ -9640,6 +9664,7 @@ def _probe_interchange_roundtrip(proj, mp, tl, p: Dict[str, Any]):
9640
9664
  "import": import_result,
9641
9665
  "comparison": comparison,
9642
9666
  "cleanup": cleanup_result,
9667
+ "current_timeline": _restore_current(),
9643
9668
  }
9644
9669
 
9645
9670
 
@@ -27897,7 +27922,9 @@ def timeline(action: str, params: Optional[Dict[str, Any]] = None) -> Dict[str,
27897
27922
  first with the advanced MCP drt.list_sequences / editorial.list_sequences to get
27898
27923
  [{id, name, eventCount}] for a "which sequence?" picker. Requires Resolve open.
27899
27924
  compare_timelines(right_timeline_id?|right_timeline_index?|left_snapshot?, right_snapshot?) -> {match, differences}
27900
- probe_interchange_roundtrip(format?, output_dir?, cleanup_imported?) -> {success, export, import, comparison}
27925
+ probe_interchange_roundtrip(format?, output_dir?, cleanup_imported?) -> {success, export, import, comparison, cleanup, current_timeline}
27926
+ Puts back the timeline that was current when it started (the import makes
27927
+ its copy current); current_timeline.restored says whether that took.
27901
27928
  detect_missing_media(sanitized?|sanitize_paths?, omit_raw_paths?) -> {missing, missing_count, diagnosis}
27902
27929
  build_relink_plan(search_roots, max_depth?, max_seconds?, max_files_scanned?, skip_search_when_volume_missing?, sanitized?) -> {candidates, diagnosis}
27903
27930
  conform_boundary_report(...) -> {capabilities, timeline, gaps_overlaps, source_ranges, missing_media}
@@ -1870,29 +1870,39 @@ API_TRUTH: List[Dict[str, Any]] = [
1870
1870
  {
1871
1871
  "symbol": "TimelineItem.SetPosition / Timeline.MoveItems",
1872
1872
  "object": "TimelineItem / Timeline",
1873
- "signature": "SetPosition(...) -> bool; MoveItems(...) -> bool",
1873
+ "signature": "SetPosition({startFrame[, trackType, trackIndex]}) -> bool; "
1874
+ "MoveItems([items], {startFrame[, trackType, trackIndex]}) -> bool",
1874
1875
  "reality": "WITHDRAWN. Re-measured by the reporter on Studio 21.2.0.6 "
1875
- "(Windows) on a timeline at StartFrame 86400 and EndFrame "
1876
- "86640, with two clips read back at 86400 and 86600: "
1877
- "TimelineItem.SetPosition returned True and the clip moved "
1878
- "from 86400 to 86800, and Timeline.MoveItems returned True "
1879
- "and moved it to 87000. GetPosition() and GetStart() agreed "
1880
- "both times. The earlier reading was on Studio 21.1.2.10: "
1881
- "SetPosition returned False for 0, 100, and -50, and "
1882
- "MoveItems was not callable. The first report on that build "
1883
- "was measured on a timeline whose clips sat before "
1884
- "StartFrame 86400, so StartFrame and EndFrame were both "
1885
- "86400. No reported input on 21.1.2.10 was at or after "
1886
- "frame 86400, so that build's answer to one is not known. "
1887
- "This server does not call either method. Not re-measured "
1888
- "here.",
1889
- "recommended": "Pass a target at or after GetStartFrame() and read "
1890
- "GetStart() back. False for a frame below StartFrame is "
1891
- "not evidence the method is broken. See the recordFrame "
1892
- "entry for the placement that built the first timeline.",
1876
+ "(Windows) on timelines whose clips sat inside their own "
1877
+ "range (StartFrame 86400). Both methods take a position "
1878
+ "dict, not a bare frame number. With the dict, "
1879
+ "SetPosition({'startFrame': 86800}) returned True and moved "
1880
+ "the clip from 86400 to 86800, 86400 moved it back, and 100 "
1881
+ "and -50 (below StartFrame) returned False and left it in "
1882
+ "place. GetPosition() and GetStart() agreed each time. "
1883
+ "trackType and trackIndex are optional, and a float "
1884
+ "startFrame (86800.0, 86800.5) was accepted and snapped to "
1885
+ "the whole frame. MoveItems([clip], {'trackType': 'video', "
1886
+ "'trackIndex': 1, 'startFrame': 87000}) returned True and moved the clip to 87000. The bare-int "
1887
+ "form SetPosition(86800) returned False for every input, "
1888
+ "in range or not: a wrong argument shape, which reads "
1889
+ "exactly like a broken method. The earlier reading was on "
1890
+ "Studio 21.1.2.10: SetPosition returned False for 0, 100, "
1891
+ "and -50, and MoveItems was not callable. That run was on a "
1892
+ "timeline whose StartFrame and EndFrame were both 86400, no "
1893
+ "input was at or after 86400, and the reporter cannot say "
1894
+ "whether it passed a dict or a bare int, so that build's "
1895
+ "answer to a correct in-range call is not known. This "
1896
+ "server does not call either method. Not re-measured here.",
1897
+ "recommended": "Pass a dict, at least {'startFrame': frame}, with the "
1898
+ "frame at or after GetStartFrame(), and read GetStart() "
1899
+ "back. False from a bare int, or from a frame below "
1900
+ "StartFrame, is not evidence the method is broken. See "
1901
+ "the recordFrame entry for the placement that built the "
1902
+ "first timeline.",
1893
1903
  "tags": ["timeline", "edit"],
1894
1904
  "issue": 336,
1895
- "verified_on": "Withdrawn on the reporter's re-measurement, Studio 21.2.0.6 (Windows); the 21.1.2.10 result was not repeated on a consistent timeline, and nothing was re-measured here",
1905
+ "verified_on": "Withdrawn on the reporter's re-measurement, Studio 21.2.0.6 (Windows), dict and bare-int forms; the 21.1.2.10 result was not repeated on a consistent timeline, and nothing was re-measured here",
1896
1906
  },
1897
1907
  {
1898
1908
  "symbol": "TimelineItem.SetLeftOffset",