davinci-resolve-mcp 5.0.2 → 5.0.3
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 +11 -0
- package/README.md +1 -1
- package/README.zh-CN.md +2 -2
- package/install.py +1 -1
- package/package.json +1 -1
- package/src/analysis_dashboard.py +43 -20
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
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.0.3 — The control panel no longer builds AppleScript from a folder name
|
|
6
|
+
|
|
7
|
+
### Security
|
|
8
|
+
|
|
9
|
+
- **The panel's folder picker passed its start folder into AppleScript source.** On macOS, the picker put the request's `initial` folder inside a string literal in the script it ran with `osascript`, checked only for being an existing directory. A folder whose name contained `"` could close the literal and run AppleScript of its own, such as `do shell script`. The script is now fixed text that reads the folder as a run-handler argument, and the folder is made absolute first. The endpoint sits behind the panel's token and Host/Origin gate and answers loopback clients only, so a caller needed a valid panel session on the same machine and a folder with that name to exist.
|
|
10
|
+
- **The panel's Claude Code terminal launcher, same shape.** It put its `cd <repo> && <claude>` command inside an AppleScript string. The iTerm branch did no escaping, and the Terminal branch escaped by hand. Neither value comes from the request, but both branches now pass the command as an argument the same way.
|
|
11
|
+
|
|
12
|
+
### Not changed
|
|
13
|
+
|
|
14
|
+
- Covered by unit tests with a mutation check: restoring the old code fails all five new tests. One live measurement on macOS: `osascript -e 'on run argv' … -- <path>` delivers the path as the only argument, with quotes, backslashes and a leading `-` intact. The picker and the launcher themselves were not opened.
|
|
15
|
+
|
|
5
16
|
## What's New in v5.0.2 — A caller path that starts with "-" is no longer handed to a program as an option
|
|
6
17
|
|
|
7
18
|
Closes the gap the v5.0.0 notes left open under **Not changed**, reported with a reachability check in #350.
|
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
|
-
> 本翻译对应 v5.0.
|
|
15
|
+
> 本翻译对应 v5.0.3 版 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 = "5.0.
|
|
40
|
+
VERSION = "5.0.3"
|
|
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
|
@@ -14745,24 +14745,34 @@ def _launch_claude_code_terminal() -> Dict[str, Any]:
|
|
|
14745
14745
|
iterm_running = (check.stdout or "").strip().lower() == "true"
|
|
14746
14746
|
except Exception:
|
|
14747
14747
|
iterm_running = False
|
|
14748
|
+
# The command (repo path + claude binary) reaches the script as a run
|
|
14749
|
+
# handler argument, never as interpolated AppleScript source, so a `"` or
|
|
14750
|
+
# backslash in either path cannot break out of a string literal.
|
|
14748
14751
|
if iterm_running:
|
|
14749
|
-
|
|
14750
|
-
|
|
14751
|
-
'
|
|
14752
|
-
|
|
14753
|
-
|
|
14754
|
-
|
|
14752
|
+
script_lines = [
|
|
14753
|
+
"on run argv",
|
|
14754
|
+
'tell application "iTerm"',
|
|
14755
|
+
"activate",
|
|
14756
|
+
"create window with default profile command (item 1 of argv)",
|
|
14757
|
+
"end tell",
|
|
14758
|
+
"end run",
|
|
14759
|
+
]
|
|
14755
14760
|
else:
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
'tell application "Terminal"
|
|
14759
|
-
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
|
|
14761
|
+
script_lines = [
|
|
14762
|
+
"on run argv",
|
|
14763
|
+
'tell application "Terminal"',
|
|
14764
|
+
"activate",
|
|
14765
|
+
"do script (item 1 of argv)",
|
|
14766
|
+
"end tell",
|
|
14767
|
+
"end run",
|
|
14768
|
+
]
|
|
14769
|
+
argv = ["osascript"]
|
|
14770
|
+
for line in script_lines:
|
|
14771
|
+
argv += ["-e", line]
|
|
14772
|
+
argv += ["--", cmd]
|
|
14763
14773
|
try:
|
|
14764
14774
|
proc = subprocess.run(
|
|
14765
|
-
|
|
14775
|
+
argv,
|
|
14766
14776
|
stdin=subprocess.DEVNULL,
|
|
14767
14777
|
capture_output=True, text=True, encoding="utf-8", errors="replace",
|
|
14768
14778
|
timeout=15,
|
|
@@ -14785,17 +14795,30 @@ def _native_directory_picker(initial: Optional[str] = None) -> Dict[str, Any]:
|
|
|
14785
14795
|
to expose a filesystem path.
|
|
14786
14796
|
"""
|
|
14787
14797
|
initial_dir = initial if initial and os.path.isdir(initial) else os.path.expanduser("~")
|
|
14798
|
+
# Absolute so a caller-supplied relative name can never start with "-".
|
|
14799
|
+
initial_dir = os.path.abspath(initial_dir)
|
|
14788
14800
|
if sys.platform == "darwin":
|
|
14789
14801
|
# AppleScript picker — works without a Python Tk binding installed.
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
|
|
14794
|
-
|
|
14802
|
+
# The start directory comes from the HTTP request, so it is passed to
|
|
14803
|
+
# the script's run handler as argv and never spliced into the script
|
|
14804
|
+
# source: a directory name containing `"` would otherwise close the
|
|
14805
|
+
# string literal and inject AppleScript (e.g. `do shell script`).
|
|
14806
|
+
script_lines = [
|
|
14807
|
+
"on run argv",
|
|
14808
|
+
'tell application "System Events" to activate',
|
|
14809
|
+
'set chosenFolder to choose folder with prompt "Select a folder" '
|
|
14810
|
+
"default location (POSIX file (item 1 of argv))",
|
|
14811
|
+
"return POSIX path of chosenFolder",
|
|
14812
|
+
"end run",
|
|
14813
|
+
]
|
|
14814
|
+
argv = ["osascript"]
|
|
14815
|
+
for line in script_lines:
|
|
14816
|
+
argv += ["-e", line]
|
|
14817
|
+
argv += ["--", initial_dir]
|
|
14795
14818
|
try:
|
|
14796
14819
|
import subprocess
|
|
14797
14820
|
proc = subprocess.run(
|
|
14798
|
-
|
|
14821
|
+
argv,
|
|
14799
14822
|
stdin=subprocess.DEVNULL,
|
|
14800
14823
|
capture_output=True, text=True, encoding="utf-8", errors="replace",
|
|
14801
14824
|
timeout=120,
|
package/src/granular/common.py
CHANGED
|
@@ -93,7 +93,7 @@ if not logging.getLogger().handlers:
|
|
|
93
93
|
handlers=[logging.StreamHandler()],
|
|
94
94
|
)
|
|
95
95
|
|
|
96
|
-
VERSION = "5.0.
|
|
96
|
+
VERSION = "5.0.3"
|
|
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()}")
|