davinci-resolve-mcp 2.46.0 → 2.46.1

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,20 @@
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.46.1
6
+
7
+ Test and hygiene hardening; no public tool surface changes.
8
+
9
+ - **Fixed** the three `InventoryCacheReuseTests` failures that appeared
10
+ whenever a live Resolve instance was running: the reuse/build-path tests
11
+ now stub the read-only Resolve probe, so the suite is green with Resolve
12
+ open or closed.
13
+ - **Added** `src/utils/project_cleanup.delete_project_safely`: a retrying
14
+ delete helper for disposable Resolve projects (switch away from the target,
15
+ retry `DeleteProject` once after a pause, report the leftover by name on
16
+ persistent failure). The live edit-engine validation harness now uses it
17
+ during cleanup, so disposable pilot projects stop lingering in the library.
18
+
5
19
  ## What's New in v2.46.0
6
20
 
7
21
  Community PR bundle: five contributed fixes and features (#62–#66), live-validated
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DaVinci Resolve MCP Server
2
2
 
3
- [![Version](https://img.shields.io/badge/version-2.46.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
3
+ [![Version](https://img.shields.io/badge/version-2.46.1-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
4
4
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
5
5
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
6
6
  [![Tools](https://img.shields.io/badge/MCP%20Tools-34%20(341%20full)-blue.svg)](#server-modes)
package/install.py CHANGED
@@ -35,7 +35,7 @@ from src.utils.update_check import (
35
35
 
36
36
  # ─── Version ──────────────────────────────────────────────────────────────────
37
37
 
38
- VERSION = "2.46.0"
38
+ VERSION = "2.46.1"
39
39
  # Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
40
40
  # Resolve's scripting bridge loads into newer interpreters on recent builds
41
41
  # (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.46.0",
3
+ "version": "2.46.1",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -80,7 +80,7 @@ if not logging.getLogger().handlers:
80
80
  handlers=[logging.StreamHandler()],
81
81
  )
82
82
 
83
- VERSION = "2.46.0"
83
+ VERSION = "2.46.1"
84
84
  logger = logging.getLogger("davinci-resolve-mcp")
85
85
  logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
86
86
  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 341-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "2.46.0"
14
+ VERSION = "2.46.1"
15
15
 
16
16
  import base64
17
17
  import os
@@ -0,0 +1,73 @@
1
+ """Best-effort deletion of disposable Resolve projects.
2
+
3
+ DeleteProject is flaky on some Resolve builds: it silently returns False when
4
+ the target is (or was very recently) the current project, and occasionally on
5
+ the first attempt even when it isn't. Disposable test projects then linger in
6
+ the project library. This helper centralizes the mitigation so every
7
+ disposable-project flow gets it for free:
8
+
9
+ 1. make sure the target is not the current project (load a fallback project,
10
+ or close the target if no fallback is available),
11
+ 2. retry the delete once after a short pause,
12
+ 3. report the leftover by name when it still fails, so callers can surface it
13
+ instead of silently leaking.
14
+ """
15
+
16
+ import time
17
+ from typing import Any, Dict, Optional
18
+
19
+
20
+ def delete_project_safely(
21
+ pm: Any,
22
+ name: str,
23
+ *,
24
+ switch_to: Optional[str] = None,
25
+ retries: int = 1,
26
+ delay_seconds: float = 1.0,
27
+ ) -> Dict[str, Any]:
28
+ """Delete project `name` via project-manager handle `pm`, working around
29
+ DeleteProject flakiness. Returns {success, attempts, leftover, detail}.
30
+
31
+ `switch_to`: project to load first when `name` is current (e.g. the
32
+ project that was open before the disposable one was created). Without it,
33
+ the current project is closed instead.
34
+ """
35
+ attempts = 0
36
+ detail = ""
37
+ try:
38
+ current = None
39
+ try:
40
+ project = pm.GetCurrentProject()
41
+ current = project.GetName() if project else None
42
+ except Exception:
43
+ current = None
44
+ if current == name:
45
+ switched = False
46
+ if switch_to and switch_to != name:
47
+ try:
48
+ switched = bool(pm.LoadProject(switch_to))
49
+ except Exception:
50
+ switched = False
51
+ if not switched:
52
+ try:
53
+ project = pm.GetCurrentProject()
54
+ if project is not None:
55
+ pm.CloseProject(project)
56
+ except Exception:
57
+ pass
58
+
59
+ last_error = None
60
+ for attempt in range(1 + max(0, int(retries))):
61
+ attempts = attempt + 1
62
+ try:
63
+ if bool(pm.DeleteProject(name)):
64
+ return {"success": True, "attempts": attempts, "leftover": None, "detail": ""}
65
+ last_error = "DeleteProject returned False"
66
+ except Exception as exc:
67
+ last_error = str(exc)
68
+ if attempt < retries:
69
+ time.sleep(max(0.0, delay_seconds))
70
+ detail = last_error or "DeleteProject failed"
71
+ except Exception as exc:
72
+ detail = str(exc)
73
+ return {"success": False, "attempts": attempts, "leftover": name, "detail": detail}