davinci-resolve-mcp 5.2.3 → 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,18 @@
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
+
5
17
  ## What's New in v5.2.3 — SetPosition and MoveItems take a position dict
6
18
 
7
19
  From the re-measurement in #336 by @CaptRauti. No server behaviour changes.
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.3-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.3-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.3 版 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.3"
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.3",
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.3"
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.3"
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}