davinci-resolve-mcp 2.97.4 → 2.97.6
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 +90 -0
- package/README.md +1 -1
- package/README.zh-CN.md +2 -2
- package/docs/process/release-process.md +16 -0
- package/install.py +37 -1
- package/package.json +1 -1
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
- package/src/utils/resolve_runtime.py +21 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,96 @@
|
|
|
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.97.6
|
|
6
|
+
|
|
7
|
+
**On Windows the server could not see the Resolve it was driving.** Reported in
|
|
8
|
+
[#150](https://github.com/samuelgursky/davinci-resolve-mcp/issues/150) with the
|
|
9
|
+
root cause traced, the fix proposed, and a case table — all of it correct.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **`runtime_mode` reported `running: false, instances: 0` on every stock
|
|
14
|
+
Windows install.** WMIC wraps a command line in double quotes when the
|
|
15
|
+
executable path contains spaces, which the default install path always does
|
|
16
|
+
(`"C:\Program Files\Blackmagic Design\DaVinci Resolve\Resolve.exe"`). The
|
|
17
|
+
line therefore *ends* with `"`, and `_is_resolve_command()` required it to end
|
|
18
|
+
with `Resolve.exe`. The trailing-flag stripper above the test did not help: it
|
|
19
|
+
removes ` -flag` tokens and leaves the closing quote as the final character.
|
|
20
|
+
A leading quote is now read for what it is — the executable is what sits
|
|
21
|
+
inside the first quoted span, and everything after the closing quote is
|
|
22
|
+
arguments. That also tightens rejection: `"…\cmd.exe" /c start … Resolve.exe`
|
|
23
|
+
is a launcher, not an instance.
|
|
24
|
+
|
|
25
|
+
The reading was the visible half. The consequential half is that
|
|
26
|
+
`get_resolve()` asks this same question before auto-launching, precisely so a
|
|
27
|
+
failed connect to a live Resolve does not open a second application — the
|
|
28
|
+
guard whose comment records being "reported three times before it was
|
|
29
|
+
traced". On Windows its input was a permanent `False`, so the path it exists
|
|
30
|
+
to block was open: connect fails (modal dialog, mid-launch, scripting toggled
|
|
31
|
+
off) → "nothing is running" → launch a second Resolve. `_not_connected_error()`
|
|
32
|
+
reads the same signal, so a Windows user whose Resolve *was* running got the
|
|
33
|
+
"not running, auto-launch failed, check your Studio install" text instead of
|
|
34
|
+
the preference or bridge fix that actually applied. `headless` was
|
|
35
|
+
unreachable too — it is only computed once something is found running, so
|
|
36
|
+
`-nogui` instances were indistinguishable on Windows.
|
|
37
|
+
|
|
38
|
+
- **A successful install ended in a traceback under a redirected stdout.** The
|
|
39
|
+
installer prints box-drawing and check-mark glyphs. A Windows console carries
|
|
40
|
+
them, but redirecting stdout falls back to the locale code page — cp1252 by
|
|
41
|
+
default — and `print(f" {'─' * 50}")` in the summary raised
|
|
42
|
+
`UnicodeEncodeError` after every client had already been configured, so a
|
|
43
|
+
working run looked like a failed one
|
|
44
|
+
(`npx davinci-resolve-mcp setup --clients manual 2>&1 | tail`). Streams that
|
|
45
|
+
cannot encode those glyphs are now reconfigured to UTF-8 with
|
|
46
|
+
`errors="replace"`; a console that can already carry them is left alone
|
|
47
|
+
rather than re-encoded underneath the user.
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- `tests.test_headless_runtime` covers the quoted Windows command line —
|
|
52
|
+
bare, trailing-whitespace (what WMIC actually prints), and `-nogui` — plus
|
|
53
|
+
the quoted-launcher line that must still be rejected, so the fix cannot
|
|
54
|
+
become a substring test by another route. `tests.test_cdl_and_install_config`
|
|
55
|
+
gains `ConsoleEncodingTests`, including a child interpreter run with
|
|
56
|
+
`PYTHONIOENCODING=cp1252` and a piped stdout: the exact shape of the reported
|
|
57
|
+
failure. Both suites fail on the pre-fix code.
|
|
58
|
+
|
|
59
|
+
## What's New in v2.97.5
|
|
60
|
+
|
|
61
|
+
**`npm ci` was failing outright, and nothing in the release path noticed.**
|
|
62
|
+
No server behavior changed; this is packaging and release-process hardening.
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- **`package-lock.json` was seven releases stale.** It still carried
|
|
67
|
+
`2.90.0`, and — the part that actually broke things — two
|
|
68
|
+
`optionalDependencies` added since then, `js-yaml` and `pg`, were never
|
|
69
|
+
locked. `npm ci` refuses to install at all when the lockfile and
|
|
70
|
+
`package.json` disagree, so every reproducible install path failed with
|
|
71
|
+
`EUSAGE — Missing: js-yaml@4.3.1 from lock file` (plus `pg` and its nine
|
|
72
|
+
transitive deps). CI, fresh contributor clones, and container builds all hit
|
|
73
|
+
it. `npm install` and `npm publish` resolve independently of the lockfile
|
|
74
|
+
and stayed green throughout, which is why it survived seven releases.
|
|
75
|
+
Regenerated with `npm install --package-lock-only`; `npm ci` now installs
|
|
76
|
+
175 packages clean.
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
- **`tests.test_import::test_package_lock_in_sync`** — asserts both version
|
|
81
|
+
fields in the lockfile match `package.json`, and that the root
|
|
82
|
+
`dependencies` / `devDependencies` / `optionalDependencies` blocks match
|
|
83
|
+
exactly. The second half is the one that matters: the version fields being
|
|
84
|
+
right is not evidence `npm ci` works, and dependency drift is what actually
|
|
85
|
+
breaks it. Verified to fail on each drift mode independently.
|
|
86
|
+
|
|
87
|
+
### Changed
|
|
88
|
+
|
|
89
|
+
- `docs/process/release-process.md` lists `package-lock.json` under "Files To
|
|
90
|
+
Update" with the regeneration command, and Required Validation now
|
|
91
|
+
regenerates the lockfile before `test_import` reads it. The lockfile was
|
|
92
|
+
never on the checklist, which is why the drift was never a step anyone
|
|
93
|
+
skipped — it was a step that did not exist.
|
|
94
|
+
|
|
5
95
|
## What's New in v2.97.4
|
|
6
96
|
|
|
7
97
|
**Drift is caught at the edit, not at publish time.** Tooling and docs only —
|
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
|
-
> 本翻译对应 v2.97.
|
|
15
|
+
> 本翻译对应 v2.97.6 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
|
|
16
16
|
|
|
17
17
|
一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
|
|
18
18
|
|
|
@@ -26,6 +26,14 @@ Every release bump must update all version surfaces:
|
|
|
26
26
|
- `src/granular/common.py`
|
|
27
27
|
- `install.py`
|
|
28
28
|
- `package.json`
|
|
29
|
+
- `package-lock.json` — regenerate with `npm install --package-lock-only`, do
|
|
30
|
+
not hand-edit the version. It carries the version in two places and, more
|
|
31
|
+
importantly, the resolved dependency tree. When it disagrees with
|
|
32
|
+
`package.json`, **`npm ci` refuses to install at all** (`EUSAGE — Missing: X
|
|
33
|
+
from lock file`), which breaks CI, fresh clones, and container builds while
|
|
34
|
+
`npm install` and `npm publish` stay green and hide it. The
|
|
35
|
+
`tests.test_import` guard `test_package_lock_in_sync` fails the suite on
|
|
36
|
+
either drift.
|
|
29
37
|
- README version badge
|
|
30
38
|
- README current stats or latest-release summary when they changed
|
|
31
39
|
- `README.zh-CN.md` — the Simplified Chinese translation. Update its version
|
|
@@ -62,6 +70,7 @@ Always run static checks before release:
|
|
|
62
70
|
|
|
63
71
|
```bash
|
|
64
72
|
venv/bin/python tests/test_import.py
|
|
73
|
+
npm install --package-lock-only --no-audit --no-fund # re-stage package-lock.json if it moved
|
|
65
74
|
venv/bin/python scripts/audit_api_parity.py
|
|
66
75
|
venv/bin/python scripts/gen_api_limitations.py --check
|
|
67
76
|
node scripts/agent-rules/generate.mjs --check
|
|
@@ -72,6 +81,13 @@ npm pack --dry-run
|
|
|
72
81
|
git diff --check
|
|
73
82
|
```
|
|
74
83
|
|
|
84
|
+
`test_import` carries `test_package_lock_in_sync`, which is the actual gate on the
|
|
85
|
+
lockfile: it asserts both version fields and the root dependency blocks match
|
|
86
|
+
`package.json`. Run the `npm install --package-lock-only` line above first so the
|
|
87
|
+
regeneration is in the working tree when the test reads it — that ordering is why
|
|
88
|
+
the check is a regeneration followed by a test, not a `git diff --exit-code`,
|
|
89
|
+
which would fire on the release bump's own legitimate change.
|
|
90
|
+
|
|
75
91
|
`test_duplicate_definitions` asserts no module-level name is defined twice under
|
|
76
92
|
`src/`. A second `def foo` silently replaces the first, and in a module the size
|
|
77
93
|
of `src/server.py` the two can be thousands of lines apart with different
|
package/install.py
CHANGED
|
@@ -37,7 +37,7 @@ from src.utils.update_check import (
|
|
|
37
37
|
|
|
38
38
|
# ─── Version ──────────────────────────────────────────────────────────────────
|
|
39
39
|
|
|
40
|
-
VERSION = "2.97.
|
|
40
|
+
VERSION = "2.97.6"
|
|
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
|
|
@@ -46,6 +46,42 @@ VERSION = "2.97.4"
|
|
|
46
46
|
SUPPORTED_PYTHON_MIN = (3, 10)
|
|
47
47
|
PYTHON_ABI_RISK_MIN = (3, 13)
|
|
48
48
|
|
|
49
|
+
# ─── Console encoding ─────────────────────────────────────────────────────────
|
|
50
|
+
# This installer prints box-drawing and check-mark glyphs. On Windows a console
|
|
51
|
+
# stdout carries them fine, but a *redirected* stdout falls back to the locale
|
|
52
|
+
# code page — cp1252 on a default Windows install — and the first '─' raises
|
|
53
|
+
# UnicodeEncodeError. It fires at the summary, after every client is already
|
|
54
|
+
# configured, so a successful install ends in a traceback and reads as a failed
|
|
55
|
+
# run. Reported in #150 against
|
|
56
|
+
# `npx davinci-resolve-mcp setup --clients manual 2>&1 | tail`.
|
|
57
|
+
#
|
|
58
|
+
# Only streams that cannot already carry the glyphs are touched, so a correctly
|
|
59
|
+
# configured console keeps its own encoding. 'replace' is belt-and-braces: no
|
|
60
|
+
# output path is worth a traceback.
|
|
61
|
+
|
|
62
|
+
_GLYPH_PROBE = "─→✓⊘•"
|
|
63
|
+
|
|
64
|
+
def _ensure_glyph_capable_stdio():
|
|
65
|
+
for stream in (sys.stdout, sys.stderr):
|
|
66
|
+
reconfigure = getattr(stream, "reconfigure", None)
|
|
67
|
+
encoding = getattr(stream, "encoding", None)
|
|
68
|
+
if reconfigure is None or not encoding:
|
|
69
|
+
continue
|
|
70
|
+
try:
|
|
71
|
+
_GLYPH_PROBE.encode(encoding)
|
|
72
|
+
continue
|
|
73
|
+
except (LookupError, UnicodeEncodeError):
|
|
74
|
+
pass
|
|
75
|
+
try:
|
|
76
|
+
reconfigure(encoding="utf-8", errors="replace")
|
|
77
|
+
except Exception:
|
|
78
|
+
try:
|
|
79
|
+
reconfigure(errors="replace")
|
|
80
|
+
except Exception:
|
|
81
|
+
pass
|
|
82
|
+
|
|
83
|
+
_ensure_glyph_capable_stdio()
|
|
84
|
+
|
|
49
85
|
# ─── Colors (disabled on Windows cmd without ANSI support) ────────────────────
|
|
50
86
|
|
|
51
87
|
def _supports_color():
|
package/package.json
CHANGED
package/src/granular/common.py
CHANGED
|
@@ -87,7 +87,7 @@ if not logging.getLogger().handlers:
|
|
|
87
87
|
handlers=[logging.StreamHandler()],
|
|
88
88
|
)
|
|
89
89
|
|
|
90
|
-
VERSION = "2.97.
|
|
90
|
+
VERSION = "2.97.6"
|
|
91
91
|
logger = logging.getLogger("davinci-resolve-mcp")
|
|
92
92
|
logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
|
|
93
93
|
logger.info(f"Detected platform: {get_platform()}")
|
package/src/server.py
CHANGED
|
@@ -83,8 +83,13 @@ def _process_lines() -> Optional[List[str]]:
|
|
|
83
83
|
return None
|
|
84
84
|
|
|
85
85
|
|
|
86
|
+
def _matches_pattern(executable: str) -> bool:
|
|
87
|
+
"""Does this bare executable path name a Resolve application?"""
|
|
88
|
+
return any(executable.endswith(pattern) for pattern in RESOLVE_PROCESS_PATTERNS)
|
|
89
|
+
|
|
90
|
+
|
|
86
91
|
def _is_resolve_command(line: str) -> bool:
|
|
87
|
-
"""Is this command line a Resolve *executable*, not merely a mention of one?
|
|
92
|
+
r"""Is this command line a Resolve *executable*, not merely a mention of one?
|
|
88
93
|
|
|
89
94
|
A plain substring test matches any process whose command line happens to
|
|
90
95
|
contain the path — including a shell running a script that references it.
|
|
@@ -96,8 +101,22 @@ def _is_resolve_command(line: str) -> bool:
|
|
|
96
101
|
flags. So strip trailing flag tokens and require what remains to *end* with
|
|
97
102
|
the pattern. That survives the spaces in "DaVinci Resolve.app" (no splitting
|
|
98
103
|
on whitespace) while rejecting a path buried mid-command.
|
|
104
|
+
|
|
105
|
+
Windows quotes that path. WMIC prints the executable wrapped in double
|
|
106
|
+
quotes whenever it contains spaces, which the default install path always
|
|
107
|
+
does (`"C:\Program Files\Blackmagic Design\DaVinci Resolve\Resolve.exe"`),
|
|
108
|
+
so the line ends in `"` and `endswith("Resolve.exe")` was false on every
|
|
109
|
+
stock Windows machine — `runtime_mode` reported nothing running while the
|
|
110
|
+
same server was driving that very instance, and the second-instance guard
|
|
111
|
+
in `get_resolve()` lost its input. Reported in #150. A leading quote means
|
|
112
|
+
the executable is exactly what sits inside the first quoted span; anything
|
|
113
|
+
after the closing quote is arguments, and the flag loop never sees it.
|
|
99
114
|
"""
|
|
100
115
|
text = line.strip()
|
|
116
|
+
if text.startswith('"'):
|
|
117
|
+
close = text.find('"', 1)
|
|
118
|
+
if close > 1:
|
|
119
|
+
return _matches_pattern(text[1:close])
|
|
101
120
|
while True:
|
|
102
121
|
stripped = text.rstrip()
|
|
103
122
|
cut = stripped.rfind(" -")
|
|
@@ -109,7 +128,7 @@ def _is_resolve_command(line: str) -> bool:
|
|
|
109
128
|
if not candidate:
|
|
110
129
|
break
|
|
111
130
|
text = candidate
|
|
112
|
-
return
|
|
131
|
+
return _matches_pattern(text)
|
|
113
132
|
|
|
114
133
|
|
|
115
134
|
def resolve_processes() -> Optional[List[str]]:
|