davinci-resolve-mcp 4.8.25 → 4.8.27
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 +46 -0
- package/README.md +1 -1
- package/README.zh-CN.md +2 -2
- package/install.py +1 -1
- package/package.json +1 -1
- package/scripts/audit_api_parity.py +3 -4
- package/src/granular/common.py +5 -4
- package/src/server.py +8 -2
- package/src/utils/layout_presets.py +10 -69
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,52 @@
|
|
|
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.8.27 — Linux exports no longer redirected away from /tmp-named folders
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **On Linux, an output folder whose name merely began with `/tmp` or
|
|
10
|
+
`/var/tmp` was silently replaced.** `_resolve_safe_dir` tested
|
|
11
|
+
`path.startswith("/tmp")`, which is also true of `/tmpdata`, `/tmpfiles`,
|
|
12
|
+
`/tmp-scratch` and `/var/tmpdata`. Each was treated as a temp directory and
|
|
13
|
+
swapped for `~/Documents/resolve-stills`, and
|
|
14
|
+
`gallery_stills(grab_and_export)` then reported that folder as if it were the
|
|
15
|
+
one asked for. The same helper picks the output folder for `encrypt_dctl` and
|
|
16
|
+
the granular `save_project` export fallback. The Linux branch now compares by
|
|
17
|
+
path segment, as the macOS branch already did; `/tmp`, `/tmp/…`, `/var/tmp`
|
|
18
|
+
and `/var/tmp/…` still redirect. Both copies of the helper (`src/server.py`
|
|
19
|
+
and `src/granular/common.py`) are fixed. Thanks to @Dev-next-gen (#271).
|
|
20
|
+
|
|
21
|
+
### Tests
|
|
22
|
+
|
|
23
|
+
- `tests/test_granular_safe_dir.py` gains a Linux class covering both copies:
|
|
24
|
+
real temp paths still redirect, sibling names are left alone.
|
|
25
|
+
|
|
26
|
+
### Validation
|
|
27
|
+
|
|
28
|
+
- Path classification only, decided before any Resolve call; no Resolve
|
|
29
|
+
behavior changed. Live test not required.
|
|
30
|
+
|
|
31
|
+
## What's New in v4.8.26 — two dead layout-preset helpers removed
|
|
32
|
+
|
|
33
|
+
### Removed
|
|
34
|
+
|
|
35
|
+
- `src/utils/layout_presets.py` no longer carries `save_layout_preset` and
|
|
36
|
+
`load_layout_preset`. Both went through `Resolve.GetUIManager()` and then
|
|
37
|
+
`SaveUILayout` / `LoadUILayout`, none of which exist on any build measured
|
|
38
|
+
(Studio 19.1.3.7; see the `api_truth` entry added in v4.8.25). Nothing called
|
|
39
|
+
them: the granular `save_layout_preset_tool` and `load_layout_preset_tool`
|
|
40
|
+
use `Resolve.SaveLayoutPreset` / `LoadLayoutPreset` directly, and still do.
|
|
41
|
+
No tool, action or count changes. The module docstring now says what the
|
|
42
|
+
file actually does (preset files on disk) and where live save/load happens.
|
|
43
|
+
- `scripts/audit_api_parity.py` drops `LoadUILayout` and `SaveUILayout` from
|
|
44
|
+
its allowlist, since no source calls them any more.
|
|
45
|
+
|
|
46
|
+
### Validation
|
|
47
|
+
|
|
48
|
+
- No Resolve behavior changed; the removed functions had no callers. Live test
|
|
49
|
+
not required.
|
|
50
|
+
|
|
5
51
|
## What's New in v4.8.25 — open_settings and open_app_preferences say what Resolve cannot do
|
|
6
52
|
|
|
7
53
|
### Fixed
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
6
6
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
7
7
|
[](docs/reference/api-coverage.md)
|
|
8
8
|
[-blue.svg)](#server-modes)
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 简体中文
|
|
4
4
|
|
|
5
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
6
6
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
7
7
|
[](docs/reference/api-coverage.md)
|
|
8
8
|
[-blue.svg)](#服务器模式)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://www.python.org/downloads/)
|
|
13
13
|
[](https://opensource.org/licenses/MIT)
|
|
14
14
|
|
|
15
|
-
> 本翻译对应 v4.8.
|
|
15
|
+
> 本翻译对应 v4.8.27 版 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.8.
|
|
40
|
+
VERSION = "4.8.27"
|
|
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
|
@@ -148,10 +148,9 @@ ALLOWLIST_UNDOCUMENTED: Set[str] = {
|
|
|
148
148
|
# Resolve app-control method, not in the scripting README this audit parses
|
|
149
149
|
"SetHighPriority",
|
|
150
150
|
# NOT a documented API: Resolve has no GetUIManager on any build measured
|
|
151
|
-
# (Studio 19.1.3.7; api_truth 'Resolve.GetUIManager ...').
|
|
152
|
-
#
|
|
153
|
-
|
|
154
|
-
"GetUIManager", "LoadUILayout", "SaveUILayout",
|
|
151
|
+
# (Studio 19.1.3.7; api_truth 'Resolve.GetUIManager ...'). Called only
|
|
152
|
+
# behind has_method in src/utils/app_control.py.
|
|
153
|
+
"GetUIManager",
|
|
155
154
|
# Lua-table iteration helper used as a fallback in object_inspection.py
|
|
156
155
|
"GetKeyList",
|
|
157
156
|
# Project metadata accessor used defensively (hasattr-guarded)
|
package/src/granular/common.py
CHANGED
|
@@ -45,8 +45,6 @@ from src.utils.layout_presets import (
|
|
|
45
45
|
export_layout_preset,
|
|
46
46
|
import_layout_preset,
|
|
47
47
|
list_layout_presets,
|
|
48
|
-
load_layout_preset,
|
|
49
|
-
save_layout_preset,
|
|
50
48
|
)
|
|
51
49
|
from src.utils.object_inspection import inspect_object, print_object_help
|
|
52
50
|
from src.utils.platform import get_platform, get_resolve_paths
|
|
@@ -93,7 +91,7 @@ if not logging.getLogger().handlers:
|
|
|
93
91
|
handlers=[logging.StreamHandler()],
|
|
94
92
|
)
|
|
95
93
|
|
|
96
|
-
VERSION = "4.8.
|
|
94
|
+
VERSION = "4.8.27"
|
|
97
95
|
logger = logging.getLogger("davinci-resolve-mcp")
|
|
98
96
|
logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
|
|
99
97
|
logger.info(f"Detected platform: {get_platform()}")
|
|
@@ -379,7 +377,10 @@ def _resolve_safe_dir(path):
|
|
|
379
377
|
# silently into both, same as /var/folders (matches src/server.py).
|
|
380
378
|
_is_sandbox = path.startswith(("/var/", "/private/var/", "/tmp/", "/private/tmp/")) or path in ("/tmp", "/private/tmp")
|
|
381
379
|
elif platform.system() == "Linux":
|
|
382
|
-
|
|
380
|
+
# By segment, not by character prefix (matches src/server.py): a sibling
|
|
381
|
+
# of /tmp whose name merely begins with it — /tmpfiles, /tmp-scratch,
|
|
382
|
+
# /var/tmpdata — cleared `startswith("/tmp")` and was redirected.
|
|
383
|
+
_is_sandbox = path.startswith(("/tmp/", "/var/tmp/")) or path in ("/tmp", "/var/tmp")
|
|
383
384
|
elif platform.system() == "Windows":
|
|
384
385
|
try:
|
|
385
386
|
_is_sandbox = os.path.commonpath([os.path.abspath(path), os.path.abspath(system_temp)]) == os.path.abspath(system_temp)
|
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.8.
|
|
14
|
+
VERSION = "4.8.27"
|
|
15
15
|
|
|
16
16
|
import base64
|
|
17
17
|
import os
|
|
@@ -1421,7 +1421,13 @@ def _resolve_safe_dir(path):
|
|
|
1421
1421
|
# silently fails into both (live-verified 2026-07-03), same as /var/folders.
|
|
1422
1422
|
_is_sandbox = path.startswith(("/var/", "/private/var/", "/tmp/", "/private/tmp/")) or path in ("/tmp", "/private/tmp")
|
|
1423
1423
|
elif platform.system() == "Linux":
|
|
1424
|
-
|
|
1424
|
+
# By segment, not by character prefix: `startswith("/tmp")` also matched a
|
|
1425
|
+
# sibling of /tmp whose name merely begins with it — /tmpfiles,
|
|
1426
|
+
# /tmp-scratch, /var/tmpdata — so an export the caller aimed at one of
|
|
1427
|
+
# those was redirected away from it. The Darwin branch already compares
|
|
1428
|
+
# this way, and `/tmpfiles/out` is one of the paths
|
|
1429
|
+
# tests/test_granular_safe_dir.py asserts is left alone.
|
|
1430
|
+
_is_sandbox = path.startswith(("/tmp/", "/var/tmp/")) or path in ("/tmp", "/var/tmp")
|
|
1425
1431
|
elif platform.system() == "Windows":
|
|
1426
1432
|
# Check if path is under the system temp directory (e.g. AppData\Local\Temp)
|
|
1427
1433
|
try:
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
"""
|
|
3
3
|
DaVinci Resolve MCP Server - Layout Presets Utilities
|
|
4
4
|
|
|
5
|
-
This module
|
|
6
|
-
-
|
|
7
|
-
- Loading layout presets
|
|
5
|
+
This module works with DaVinci Resolve UI layout preset FILES on disk:
|
|
6
|
+
- Listing the presets in Resolve's preset folder
|
|
8
7
|
- Exporting/importing preset files
|
|
9
|
-
-
|
|
8
|
+
- Deleting a preset file
|
|
9
|
+
|
|
10
|
+
Saving and loading the live layout are not done here. They go through
|
|
11
|
+
Resolve.SaveLayoutPreset / LoadLayoutPreset, which the granular tools in
|
|
12
|
+
src/granular/resolve_control.py call directly. Two earlier helpers here tried
|
|
13
|
+
Resolve.GetUIManager().SaveUILayout / LoadUILayout instead; neither method
|
|
14
|
+
exists on any build measured (api_truth 'Resolve.GetUIManager ...'), nothing
|
|
15
|
+
called them, and they were removed in v4.8.26.
|
|
10
16
|
"""
|
|
11
17
|
|
|
12
18
|
import os
|
|
@@ -137,71 +143,6 @@ def list_layout_presets(layout_type: str = "ui") -> List[Dict[str, Any]]:
|
|
|
137
143
|
|
|
138
144
|
return presets
|
|
139
145
|
|
|
140
|
-
def save_layout_preset(resolve_obj, preset_name: str, layout_type: str = "ui") -> bool:
|
|
141
|
-
"""
|
|
142
|
-
Save the current layout as a preset.
|
|
143
|
-
|
|
144
|
-
Args:
|
|
145
|
-
resolve_obj: DaVinci Resolve API object
|
|
146
|
-
preset_name: Name for the saved preset
|
|
147
|
-
layout_type: Type of layout to save ('ui', 'window', 'workspace')
|
|
148
|
-
|
|
149
|
-
Returns:
|
|
150
|
-
True if successful, False otherwise
|
|
151
|
-
"""
|
|
152
|
-
try:
|
|
153
|
-
# Ensure preset name has no spaces or special characters
|
|
154
|
-
safe_name = preset_name.replace(" ", "_").replace("/", "_").replace("\\", "_")
|
|
155
|
-
|
|
156
|
-
# Different layout types have different save methods
|
|
157
|
-
if layout_type.lower() == "ui":
|
|
158
|
-
# For UI layouts, use the UI Manager
|
|
159
|
-
ui_manager = resolve_obj.GetUIManager()
|
|
160
|
-
if not ui_manager:
|
|
161
|
-
logger.error("Failed to get UI Manager")
|
|
162
|
-
return False
|
|
163
|
-
|
|
164
|
-
# Save the current UI layout
|
|
165
|
-
return ui_manager.SaveUILayout(safe_name)
|
|
166
|
-
else:
|
|
167
|
-
# Other layout types would be handled here
|
|
168
|
-
logger.error(f"Unsupported layout type: {layout_type}")
|
|
169
|
-
return False
|
|
170
|
-
except Exception as e:
|
|
171
|
-
logger.error(f"Error saving layout preset: {str(e)}")
|
|
172
|
-
return False
|
|
173
|
-
|
|
174
|
-
def load_layout_preset(resolve_obj, preset_name: str, layout_type: str = "ui") -> bool:
|
|
175
|
-
"""
|
|
176
|
-
Load a layout preset.
|
|
177
|
-
|
|
178
|
-
Args:
|
|
179
|
-
resolve_obj: DaVinci Resolve API object
|
|
180
|
-
preset_name: Name of the preset to load
|
|
181
|
-
layout_type: Type of layout to load ('ui', 'window', 'workspace')
|
|
182
|
-
|
|
183
|
-
Returns:
|
|
184
|
-
True if successful, False otherwise
|
|
185
|
-
"""
|
|
186
|
-
try:
|
|
187
|
-
# Different layout types have different load methods
|
|
188
|
-
if layout_type.lower() == "ui":
|
|
189
|
-
# For UI layouts, use the UI Manager
|
|
190
|
-
ui_manager = resolve_obj.GetUIManager()
|
|
191
|
-
if not ui_manager:
|
|
192
|
-
logger.error("Failed to get UI Manager")
|
|
193
|
-
return False
|
|
194
|
-
|
|
195
|
-
# Load the specified UI layout
|
|
196
|
-
return ui_manager.LoadUILayout(preset_name)
|
|
197
|
-
else:
|
|
198
|
-
# Other layout types would be handled here
|
|
199
|
-
logger.error(f"Unsupported layout type: {layout_type}")
|
|
200
|
-
return False
|
|
201
|
-
except Exception as e:
|
|
202
|
-
logger.error(f"Error loading layout preset: {str(e)}")
|
|
203
|
-
return False
|
|
204
|
-
|
|
205
146
|
def export_layout_preset(preset_name: str, export_path: str, layout_type: str = "ui") -> bool:
|
|
206
147
|
"""
|
|
207
148
|
Export a layout preset to a file.
|