davinci-resolve-mcp 4.13.5 → 4.13.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 +27 -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 +76 -6
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
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.13.6 — `drt` downgrade stamps the real Resolve build
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **`drt(action='downgrade')` (`resolve-advanced/server/tools/drt.mjs`)**: the
|
|
10
|
+
`DbAppVer` stamp was built by padding `targetAppVersion` to four parts, so
|
|
11
|
+
`19.1.3` became `19.1.3.0`, a build no Resolve has ever written. The vendored
|
|
12
|
+
version registry already records the real stamps read from Resolve's own
|
|
13
|
+
exports (19 → `19.1.3.0007` / 14, 20 → `20.3.2.0009` / 15, 21 →
|
|
14
|
+
`21.0.0.0048` / 17), and the vendored retarget path used them, so the two
|
|
15
|
+
re-stamp paths disagreed in every XML member. `DbPrjVer` now comes from an
|
|
16
|
+
explicit `targetProjectVersion`, then the registry row for that major, then
|
|
17
|
+
the known gate map. Resolve 20, which the map never had, now resolves to
|
|
18
|
+
schema 15 instead of throwing. `DbAppVer` comes from an explicit
|
|
19
|
+
`appVersionString`, then the registry row (only when its schema matches the
|
|
20
|
+
one being written), then the old padded form, which is now labelled and
|
|
21
|
+
warned about.
|
|
22
|
+
- The result gains `projectVersionSource`, `appVersionSource`, `registryRow`
|
|
23
|
+
and, when a fallback was used, `warnings`.
|
|
24
|
+
|
|
25
|
+
### Validation
|
|
26
|
+
|
|
27
|
+
- 6 new cases in `resolve-advanced/test/drt-downgrade.test.mjs`. All 6 fail
|
|
28
|
+
against the previous `drt.mjs`. All `drt*.test.mjs` pass: 42/42.
|
|
29
|
+
- Offline Python suite and the release static checks pass. Offline file
|
|
30
|
+
authoring only; no live Resolve import was run for this change.
|
|
31
|
+
|
|
5
32
|
## What's New in v4.13.5 — Missing-media diagnosis finds Windows drive and UNC volumes
|
|
6
33
|
|
|
7
34
|
Lands #293 from @AllastorV, case 4 of the Windows failures tracked in #278.
|
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.13.
|
|
15
|
+
> 本翻译对应 v4.13.6 版 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.13.
|
|
40
|
+
VERSION = "4.13.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
|
package/package.json
CHANGED
|
@@ -128,12 +128,80 @@ function resolveTargetProjectVersion({ targetProjectVersion, targetAppVersion })
|
|
|
128
128
|
throw new Error('provide targetProjectVersion (int) or targetAppVersion (e.g. "19.1.3")');
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* The verified registry row (vendor/drt-format/resolve-versions.js) for a targetAppVersion, keyed
|
|
133
|
+
* by MAJOR version like the registry's own resolveVersion. null when the major has no row — the
|
|
134
|
+
* caller must then say it fell back, never borrow another version's stamp.
|
|
135
|
+
*/
|
|
136
|
+
function registryRowFor(targetAppVersion) {
|
|
137
|
+
if (targetAppVersion === undefined || targetAppVersion === null || targetAppVersion === '') return null;
|
|
138
|
+
const { VERSIONS } = drt().resolveVersions;
|
|
139
|
+
const row = VERSIONS[String(targetAppVersion).split('.')[0]];
|
|
140
|
+
return row || null;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The gate value and comment stamp a downgrade writes, and where each came from. Precedence:
|
|
145
|
+
* - <ProjectVersion>/DbPrjVer: explicit targetProjectVersion, else the registry row's dbPrjVer,
|
|
146
|
+
* else PROJECT_VERSION_BY_APP (confirmed gate points with no full stamp, e.g. 18 → 11).
|
|
147
|
+
* - DbAppVer: explicit appVersionString, else the registry row's dbAppVer — only when the row's
|
|
148
|
+
* dbPrjVer is the gate being written (a 19 build stamp beside DbPrjVer 11 would be a lie) —
|
|
149
|
+
* else a PADDED fallback ("18.0" → "18.0.0.0") that names no real build and is labelled so.
|
|
150
|
+
*/
|
|
151
|
+
function resolveDowngradeStamp(p) {
|
|
152
|
+
const row = registryRowFor(p.targetAppVersion);
|
|
153
|
+
let targetPV;
|
|
154
|
+
let projectVersionSource;
|
|
155
|
+
if (Number.isInteger(p.targetProjectVersion)) {
|
|
156
|
+
targetPV = p.targetProjectVersion;
|
|
157
|
+
projectVersionSource = 'targetProjectVersion';
|
|
158
|
+
} else if (row) {
|
|
159
|
+
targetPV = Number(row.dbPrjVer);
|
|
160
|
+
projectVersionSource = 'registry';
|
|
161
|
+
} else {
|
|
162
|
+
targetPV = resolveTargetProjectVersion(p);
|
|
163
|
+
projectVersionSource = 'version-map';
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const warnings = [];
|
|
167
|
+
let appVer;
|
|
168
|
+
let appVersionSource;
|
|
169
|
+
if (p.appVersionString) {
|
|
170
|
+
appVer = p.appVersionString;
|
|
171
|
+
appVersionSource = 'appVersionString';
|
|
172
|
+
} else if (row && Number(row.dbPrjVer) === targetPV) {
|
|
173
|
+
appVer = row.dbAppVer;
|
|
174
|
+
appVersionSource = 'registry';
|
|
175
|
+
} else if (p.targetAppVersion) {
|
|
176
|
+
const parts = String(p.targetAppVersion).split('.');
|
|
177
|
+
appVer = `${p.targetAppVersion}${'.0'.repeat(Math.max(0, 4 - parts.length))}`;
|
|
178
|
+
appVersionSource = 'padded-fallback';
|
|
179
|
+
warnings.push(
|
|
180
|
+
row
|
|
181
|
+
? `DbAppVer "${appVer}" is padded, not a verified build: the registry row for Resolve ${row.marketing} is schema ${row.dbPrjVer}, not the ${targetPV} being written. Pass appVersionString to stamp a real build.`
|
|
182
|
+
: `DbAppVer "${appVer}" is padded, not a verified build: the registry has no row for Resolve ${parts[0]} (known: ${Object.values(drt().resolveVersions.VERSIONS).map((v) => v.marketing).join(', ')}). The gate (<ProjectVersion> ${targetPV}) is unaffected; pass appVersionString to stamp a real build.`,
|
|
183
|
+
);
|
|
184
|
+
} else {
|
|
185
|
+
appVer = `${targetPV}.0.0.0000`;
|
|
186
|
+
appVersionSource = 'placeholder';
|
|
187
|
+
warnings.push(`DbAppVer "${appVer}" is a placeholder (only targetProjectVersion was given). Pass targetAppVersion or appVersionString to stamp a real build.`);
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
targetPV,
|
|
191
|
+
appVer,
|
|
192
|
+
projectVersionSource,
|
|
193
|
+
appVersionSource,
|
|
194
|
+
registryRow: row ? { marketing: row.marketing, dbAppVer: row.dbAppVer, dbPrjVer: row.dbPrjVer } : null,
|
|
195
|
+
warnings,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
|
131
199
|
const downgradeSchema = z.object({
|
|
132
200
|
drtPath: z.string().describe('Source .drt/.drp (e.g. exported from a newer Resolve)'),
|
|
133
201
|
outputPath: z.string().describe('Where to write the downgraded file'),
|
|
134
202
|
targetProjectVersion: z.number().int().optional().describe('On-disk <ProjectVersion> to stamp (overrides targetAppVersion)'),
|
|
135
|
-
targetAppVersion: z.string().optional().describe('Target Resolve app version, e.g. "19.1.3" —
|
|
136
|
-
appVersionString: z.string().optional().describe('DbAppVer comment to stamp (default
|
|
203
|
+
targetAppVersion: z.string().optional().describe('Target Resolve app version, e.g. "19.1.3" — a major with a verified registry row (19, 20, 21) takes its DbAppVer/DbPrjVer from it; other majors use the ProjectVersion map'),
|
|
204
|
+
appVersionString: z.string().optional().describe('DbAppVer comment to stamp (overrides the registry; default = the verified registry build for targetAppVersion, else a padded fallback, labelled in appVersionSource)'),
|
|
137
205
|
});
|
|
138
206
|
|
|
139
207
|
/**
|
|
@@ -718,10 +786,8 @@ export const drtTool = {
|
|
|
718
786
|
}
|
|
719
787
|
if (action === 'downgrade') {
|
|
720
788
|
const p = downgradeSchema.parse(args);
|
|
721
|
-
const
|
|
722
|
-
const appVer =
|
|
723
|
-
p.appVersionString ||
|
|
724
|
-
(p.targetAppVersion ? `${p.targetAppVersion}${'.0'.repeat(Math.max(0, 4 - String(p.targetAppVersion).split('.').length))}` : `${targetPV}.0.0.0000`);
|
|
789
|
+
const stamp = resolveDowngradeStamp(p);
|
|
790
|
+
const { targetPV, appVer } = stamp;
|
|
725
791
|
const zip = await JSZip.loadAsync(await fs.readFile(p.drtPath));
|
|
726
792
|
const out = new JSZip();
|
|
727
793
|
let elementPatches = 0;
|
|
@@ -758,6 +824,10 @@ export const drtTool = {
|
|
|
758
824
|
bytes: buf.length,
|
|
759
825
|
targetProjectVersion: targetPV,
|
|
760
826
|
appVersion: appVer,
|
|
827
|
+
projectVersionSource: stamp.projectVersionSource,
|
|
828
|
+
appVersionSource: stamp.appVersionSource,
|
|
829
|
+
registryRow: stamp.registryRow,
|
|
830
|
+
...(stamp.warnings.length ? { warnings: stamp.warnings } : {}),
|
|
761
831
|
projectVersionElementsPatched: elementPatches,
|
|
762
832
|
commentStampsPatched: stampPatches,
|
|
763
833
|
note: 'Stamp downgrade clears the import GATE only; verify content imports cleanly (fine clip corrections can drop across a multi-version gap).',
|
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.13.
|
|
94
|
+
VERSION = "4.13.6"
|
|
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()}")
|