davinci-resolve-mcp 4.13.2 → 4.13.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,43 @@
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 v4.13.4 — Windows: the bridge claims its port exclusively
6
+
7
+ Lands #292 from @AllastorV, case 2 of the Windows failures tracked in #278.
8
+
9
+ ### Fixed
10
+
11
+ - **In-Resolve bridge (`src/utils/resolve_bridge.py`)**: on Windows
12
+ `SO_REUSEADDR` means "share a live port", not "rebind past `TIME_WAIT`", so a
13
+ new bridge bound on top of a stale one, the orphan check never raised
14
+ `BridgeConfigError`, and which bridge answered was undefined. On Windows the
15
+ listener now sets `SO_EXCLUSIVEADDRUSE` and leaves `allow_reuse_address` off,
16
+ so a second bind fails and the existing orphan message explains it. POSIX is
17
+ unchanged. Stopping and immediately restarting on the same port still works on
18
+ Windows (checked after 1 and 20 requests, with 20 `TIME_WAIT` rows).
19
+ - **Windows users of the free-edition bridge:** the installer copies
20
+ `resolve_bridge.py` into Resolve's scripts folder, so re-run
21
+ `python scripts/install_resolve_bridge.py` to pick up this fix.
22
+
23
+ ## What's New in v4.13.3 — No bridge running is reported as unavailable, not as a modal dialog
24
+
25
+ Lands #291 from @AllastorV, case 3 of the Windows failures tracked in #278.
26
+
27
+ ### Fixed
28
+
29
+ - **Bridge client (`src/utils/resolve_bridge_client.py`)**: a timeout while
30
+ connecting to the in-Resolve bridge now raises `BridgeUnavailable` ("Start it
31
+ from Workspace > Scripts > resolve_bridge") instead of `bridge_timeout`
32
+ ("check for an open modal dialog"). On Windows a refused loopback connect
33
+ retries the SYN for about 2 s (measured 2.04 s), so with the 1 s timeout a
34
+ user with no bridge running was sent looking for a dialog. The kernel
35
+ completes the TCP handshake even while a modal dialog blocks Resolve, so a
36
+ connect that times out never means a dialog. A timeout after the connection
37
+ is up is still `bridge_timeout`. One timeout value, no new setting.
38
+ - Two tests patch `socket.create_connection`, so Linux and macOS CI exercise the
39
+ Windows timing: a connect timeout is `BridgeUnavailable`, a read timeout is
40
+ still `bridge_timeout`.
41
+
5
42
  ## What's New in v4.13.2 — Three more Windows test failures fixed
6
43
 
7
44
  Lands #289 from @AllastorV, who re-ran the offline suite on v4.13.1 on Windows
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-4.13.2-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-4.13.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-4.13.2-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-4.13.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
- > 本翻译对应 v4.13.2 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
15
+ > 本翻译对应 v4.13.4 版 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 = "4.13.2"
40
+ VERSION = "4.13.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": "4.13.2",
3
+ "version": "4.13.4",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -91,7 +91,7 @@ if not logging.getLogger().handlers:
91
91
  handlers=[logging.StreamHandler()],
92
92
  )
93
93
 
94
- VERSION = "4.13.2"
94
+ VERSION = "4.13.4"
95
95
  logger = logging.getLogger("davinci-resolve-mcp")
96
96
  logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
97
97
  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 = "4.13.2"
14
+ VERSION = "4.13.4"
15
15
 
16
16
  import base64
17
17
  import os
@@ -540,7 +540,11 @@ class _Handler(socketserver.StreamRequestHandler):
540
540
 
541
541
 
542
542
  class _Server(socketserver.ThreadingTCPServer):
543
- allow_reuse_address = True
543
+ # On POSIX SO_REUSEADDR only lets a restart rebind past TIME_WAIT. On
544
+ # Windows it lets a second socket share a live port, so a stale bridge and a
545
+ # new one could both listen and the orphan check in `start` never fired
546
+ # (#278). There the port is claimed exclusively instead.
547
+ allow_reuse_address = os.name != "nt"
544
548
  daemon_threads = True
545
549
  address_family = socket.AF_INET
546
550
 
@@ -548,6 +552,11 @@ class _Server(socketserver.ThreadingTCPServer):
548
552
  self.bridge = bridge
549
553
  super().__init__(address, _Handler)
550
554
 
555
+ def server_bind(self) -> None:
556
+ if os.name == "nt": # pragma: no cover - exercised on Windows
557
+ self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_EXCLUSIVEADDRUSE, 1)
558
+ super().server_bind()
559
+
551
560
 
552
561
  class Bridge:
553
562
  """Owns the listener, the nonce cache, and the serialised operation lock."""
@@ -155,6 +155,13 @@ class BridgeTransport:
155
155
  truncated.get("limit"),
156
156
  )
157
157
 
158
+ def _unavailable(self, exc: OSError) -> BridgeUnavailable:
159
+ return BridgeUnavailable(
160
+ "Cannot reach the in-Resolve bridge on "
161
+ f"{self.host}:{self.port} ({exc}). Start it from "
162
+ "Workspace > Scripts > resolve_bridge."
163
+ )
164
+
158
165
  def request(self, operation: str, arguments: Dict[str, Any]) -> Any:
159
166
  payload = {
160
167
  "protocol": _bridge.PROTOCOL_VERSION,
@@ -171,7 +178,15 @@ class BridgeTransport:
171
178
 
172
179
  with self._lock:
173
180
  try:
174
- with socket.create_connection((self.host, self.port), timeout=self.timeout) as sock:
181
+ # A connect that times out means no bridge, never a dialog: the
182
+ # kernel completes the handshake even while a modal dialog blocks
183
+ # Resolve. Windows retries a refused loopback SYN for ~2 s, so a
184
+ # short timeout fires here before the refusal does (#278).
185
+ sock = socket.create_connection((self.host, self.port), timeout=self.timeout)
186
+ except OSError as exc:
187
+ raise self._unavailable(exc) from exc
188
+ try:
189
+ with sock:
175
190
  sock.settimeout(self.timeout)
176
191
  sock.sendall(line)
177
192
  raw = sock.makefile("rb").readline(_bridge.MAX_REQUEST_BYTES + 1)
@@ -182,11 +197,7 @@ class BridgeTransport:
182
197
  "which blocks its scripting API entirely",
183
198
  ) from exc
184
199
  except OSError as exc:
185
- raise BridgeUnavailable(
186
- "Cannot reach the in-Resolve bridge on "
187
- f"{self.host}:{self.port} ({exc}). Start it from "
188
- "Workspace > Scripts > resolve_bridge."
189
- ) from exc
200
+ raise self._unavailable(exc) from exc
190
201
 
191
202
  if not raw:
192
203
  raise BridgeCallError("bridge_protocol_error", "bridge closed without replying")