davinci-resolve-mcp 4.9.1 → 4.9.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 +85 -0
- package/README.md +1 -1
- package/README.zh-CN.md +2 -2
- package/install.py +1 -1
- package/package.json +1 -1
- package/resolve-advanced/server/tools/drt.mjs +8 -2
- package/resolve-advanced/vendor/drp-format/timeline-markers-blob.js +1 -1
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,91 @@
|
|
|
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.9.3 — .drp bin registry for two or more bins; broader temp-root guard tests
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **`drt(action="assemble_project")` registered no bins when timelines went
|
|
10
|
+
into two or more of them.** The Master folder's `FieldsBlob` is the
|
|
11
|
+
subfolder registry, `protobuf{field2: keyedDict{"<i>": binId}, field4:
|
|
12
|
+
time}`, and field 2's length was written as one raw byte. One bin's dict is
|
|
13
|
+
95 bytes and fits; two bins' is 182, emitted as `0xb6`, whose continuation
|
|
14
|
+
bit swallowed the dict's first byte and read back as length 54; three bins'
|
|
15
|
+
269 was truncated to 13. The archive carried every bin directory while its
|
|
16
|
+
registry decoded to zero entries. The length is now written with the
|
|
17
|
+
module's existing length-delimited field writer, which emits the same
|
|
18
|
+
single byte for one bin, so single-bin output is byte-for-byte unchanged.
|
|
19
|
+
Found and fixed by @Dev-next-gen (#280).
|
|
20
|
+
|
|
21
|
+
### Tests
|
|
22
|
+
|
|
23
|
+
- `resolve-advanced/test/drt-assemble-extract.test.mjs`: two timelines in two
|
|
24
|
+
bins; the registry's declared length covers exactly the keyed dict, both
|
|
25
|
+
bin ids are present, and field 4 follows. Fails on v4.9.2.
|
|
26
|
+
- `tests/test_source_media_guard.py` (@AllastorV, #277): broad temp roots
|
|
27
|
+
(the profile, every ancestor of it, `..` and case variants, the working
|
|
28
|
+
directory), chosen through `TEMP` / `TMPDIR` / `TMP` and through the real
|
|
29
|
+
environment, never license a media write or delete; a narrow Windows temp
|
|
30
|
+
dir is scratch while a `Temp-media` sibling is not; and an explicit
|
|
31
|
+
`RESOLVE_MCP_SCRATCH` opt-in still applies to a rejected temp root.
|
|
32
|
+
|
|
33
|
+
### Known gap
|
|
34
|
+
|
|
35
|
+
- On the 19.x template path (`targetAppVersion: "19.1.3"`) the registry is
|
|
36
|
+
not written at all: the template's Master `FieldsBlob` already registers its
|
|
37
|
+
own `000_Archive` bin, so the replacement that targets an empty blob finds
|
|
38
|
+
nothing. Bins assembled for 19.x stay unregistered whatever their count.
|
|
39
|
+
Reported in #280; not changed here.
|
|
40
|
+
|
|
41
|
+
### Validation
|
|
42
|
+
|
|
43
|
+
- Offline suites green. No live Resolve run: the changed bytes are written
|
|
44
|
+
only for 21.1-target archives, which this project's 19.1.3.7 host cannot
|
|
45
|
+
import, and the one-bin blob is unchanged. The guard change is tests only.
|
|
46
|
+
|
|
47
|
+
## What's New in v4.9.2 — the source-media guard recognises Windows temp space
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- **On Windows the source-media guard denied every write into temp space.**
|
|
52
|
+
`is_scratch()` compared the normalized path against `SCRATCH_ROOTS`
|
|
53
|
+
(`/tmp`, `/private/tmp`, `/var/folders`) without normalizing the roots, so
|
|
54
|
+
on Windows `/tmp/out.mp4` normalized to `c:\tmp\out.mp4` and never matched
|
|
55
|
+
`/tmp`; and Windows' real temp directory (`%TEMP%`) was not a root at all.
|
|
56
|
+
`ffmpeg … /tmp/out.mp4`, `rm /tmp/work/proxy.mp4` and writes under
|
|
57
|
+
`%TEMP%` were all refused. The roots are now normalized the same way as the
|
|
58
|
+
path, and on Windows `%TEMP%` is a scratch root. Found and fixed by
|
|
59
|
+
@AllastorV (#277).
|
|
60
|
+
|
|
61
|
+
### Changed on landing
|
|
62
|
+
|
|
63
|
+
- **The temp directory is trusted only on Windows, and only when narrow.**
|
|
64
|
+
`tempfile.gettempdir()` follows `TMPDIR` / `TEMP` / `TMP`, which are set
|
|
65
|
+
for reasons unrelated to this guard; in post they often point at the media
|
|
66
|
+
drive. Measured on macOS with the change as submitted: with `TMPDIR` set to
|
|
67
|
+
the home directory, `ffmpeg -y` overwrites and `rm` under `~/Movies` were
|
|
68
|
+
allowed, where v4.9.1 denied them. So the temp directory is added only on
|
|
69
|
+
Windows (on Linux and macOS the default temp dir is already under
|
|
70
|
+
`SCRATCH_ROOTS`), and it is refused when it is a drive or filesystem root,
|
|
71
|
+
the user profile or an ancestor of it, or the working directory, which
|
|
72
|
+
`gettempdir()` falls back to when nothing else is writable.
|
|
73
|
+
|
|
74
|
+
### Tests
|
|
75
|
+
|
|
76
|
+
- `tests/test_source_media_guard.py`: a write into the platform temp dir is
|
|
77
|
+
allowed; with `TMPDIR`/`TEMP`/`TMP` set to the home directory, an overwrite
|
|
78
|
+
and a delete there are still denied (both fail on the change as
|
|
79
|
+
submitted); and `platform_temp_root` refuses a filesystem root, the profile
|
|
80
|
+
and its ancestors, and the working directory, accepts a narrow temp folder
|
|
81
|
+
even on a media drive, and never trusts the variable off Windows.
|
|
82
|
+
|
|
83
|
+
### Validation
|
|
84
|
+
|
|
85
|
+
- Guard-only change; no Resolve scripting call changed. The Windows path
|
|
86
|
+
normalization was verified by the contributor on Windows 11; the
|
|
87
|
+
Windows-only branch is unit-tested here with injected values, since this
|
|
88
|
+
project has no Windows host.
|
|
89
|
+
|
|
5
90
|
## What's New in v4.9.1 — a rejected audio level write now says why, and what to do instead
|
|
6
91
|
|
|
7
92
|
### Changed
|
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.9.
|
|
15
|
+
> 本翻译对应 v4.9.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 = "4.9.
|
|
40
|
+
VERSION = "4.9.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
|
@@ -472,11 +472,17 @@ export const drtTool = {
|
|
|
472
472
|
// scan, subfolders are not). Inner format byte-verified against the
|
|
473
473
|
// template harvest: protobuf{field2: keyedDict{"0": binId, ...},
|
|
474
474
|
// field4: time-varint} in the [u32 2][u32 len][0x81][zstd] wrapper.
|
|
475
|
-
const { zstdRawFrame } = requireCjs('../../vendor/drp-format/timeline-markers-blob.js');
|
|
475
|
+
const { zstdRawFrame, lenDelim } = requireCjs('../../vendor/drp-format/timeline-markers-blob.js');
|
|
476
476
|
const binIds = [...bins.values()].map((b) => b.id);
|
|
477
477
|
const childDict = encodeKeyedDict({ hdr: 1, entries: binIds.map((id, i) => ({ key: String(i), type: 0x0a, subType: 0, value: id })) });
|
|
478
|
+
// field 2's length is a protobuf VARINT, not one raw byte: one bin's
|
|
479
|
+
// dict is 95 bytes and fits, two bins' is 182 and does not, so
|
|
480
|
+
// `[0x12, 182]` emitted a 0xb6 continuation byte that swallowed the
|
|
481
|
+
// dict's first byte and read as length 54 — the registry parsed back
|
|
482
|
+
// empty with neither bin in it. lenDelim() writes the same single byte
|
|
483
|
+
// for the one-bin case, so that blob is unchanged.
|
|
478
484
|
const inner = Buffer.concat([
|
|
479
|
-
|
|
485
|
+
lenDelim(2, childDict),
|
|
480
486
|
Buffer.from([0x20]), Buffer.from('b6cba6a90d', 'hex'),
|
|
481
487
|
]);
|
|
482
488
|
const frame = zstdRawFrame(inner);
|
|
@@ -156,4 +156,4 @@ function decodeTimelineMarkersBlob(buf) {
|
|
|
156
156
|
return markers;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
module.exports = { encodeTimelineMarkersBlob, decodeTimelineMarkersBlob, MARKER_COLOR_BITS, zstdRawFrame };
|
|
159
|
+
module.exports = { encodeTimelineMarkersBlob, decodeTimelineMarkersBlob, MARKER_COLOR_BITS, zstdRawFrame, lenDelim };
|
package/src/granular/common.py
CHANGED
|
@@ -91,7 +91,7 @@ if not logging.getLogger().handlers:
|
|
|
91
91
|
handlers=[logging.StreamHandler()],
|
|
92
92
|
)
|
|
93
93
|
|
|
94
|
-
VERSION = "4.9.
|
|
94
|
+
VERSION = "4.9.3"
|
|
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()}")
|