davinci-resolve-mcp 2.209.0 → 2.210.0
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 +86 -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/granular/common.py +1 -1
- package/src/server.py +1 -1
- package/src/utils/execution_lifecycle.py +148 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,92 @@
|
|
|
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.210.0 — every destructive action now carries a real risk rating
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **All 108 registered destructive actions are classified; 80 of them were not.**
|
|
10
|
+
Safe mode blocks established HIGH and CRITICAL, and the classifier's `else`
|
|
11
|
+
branch returns MEDIUM with `risk_established: false` — an honest "no rule
|
|
12
|
+
matched", but not something a gate can act on. So `timeline.move_clips`,
|
|
13
|
+
`timeline.ripple_insert`, `timeline.create_compound_clip`,
|
|
14
|
+
`timeline.import_into_timeline`, `graph.apply_grade_from_drx`,
|
|
15
|
+
`timeline_item_color.copy_grades`, `timeline_item_takes.finalize` and the
|
|
16
|
+
three `edit_engine` plan executors all passed a gate that was meant to stop
|
|
17
|
+
them. Safe mode now gates 35 actions where it previously gated 20.
|
|
18
|
+
|
|
19
|
+
Every rating was taken from the action's handler rather than its name, since
|
|
20
|
+
the name heuristic is the thing being replaced. Two results worth calling out:
|
|
21
|
+
|
|
22
|
+
- `timeline.move_clips` passes `delete_sources=True` to the duplicate helper,
|
|
23
|
+
so it removes the originals — it is a deletion wearing a move's name.
|
|
24
|
+
- `timeline_item.update_sidecar` is the only registered action that writes
|
|
25
|
+
**outside the project**: it rewrites the `.braw` sidecar or R3D `.RMD` file
|
|
26
|
+
next to the camera original. No Resolve undo reaches it, and it changes how
|
|
27
|
+
that media reads in every other application. Rated HIGH.
|
|
28
|
+
|
|
29
|
+
New distribution across the 108: 2 critical, 33 high, 35 medium, 38 low.
|
|
30
|
+
|
|
31
|
+
- **`MEDIUM` now means something.** It was overwhelmingly the fallthrough, so an
|
|
32
|
+
assessed MEDIUM and an unrated action were indistinguishable by level alone. A
|
|
33
|
+
`_MEDIUM_RISK_ACTIONS` table makes it a finding, and `risk_established`
|
|
34
|
+
separates the two everywhere risk is reported.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- **The operator's saved `setup` defaults decided what the test suite did.**
|
|
39
|
+
`logs/media-analysis-preferences.json` holds real defaults including
|
|
40
|
+
`destructive.safe_mode`. Tests that call `setup` already overrode the path,
|
|
41
|
+
but the other three thousand read it — so with safe mode left enabled on a
|
|
42
|
+
machine, seventeen tests across `test_cut_executor`, `test_keyed_param_guards`,
|
|
43
|
+
`test_media_pool_changes`, `test_media_pool_delete_governance` and
|
|
44
|
+
`test_delete_clips_readback_retry` failed with "Safe mode blocked
|
|
45
|
+
critical-risk action". A red suite produced by a setting rather than by the
|
|
46
|
+
code, and it would have looked exactly like a regression in this release.
|
|
47
|
+
|
|
48
|
+
`tests/offline_guard` now redirects the preferences path for the whole run,
|
|
49
|
+
alongside the audit-log redirect added in v2.209.1. Pinned by a test asserting
|
|
50
|
+
the active path is never the operator's file, and by one asserting the guard
|
|
51
|
+
names the same environment variable the server reads — a mismatch there would
|
|
52
|
+
fail open and silently.
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- **A guard test asserting no registered destructive action is unrated**, so a
|
|
57
|
+
newly registered action cannot silently rejoin the ungated set — which is how
|
|
58
|
+
the 80 accumulated. Registering an action and rating it are now one commit.
|
|
59
|
+
- **A test pinning that `inspect_operation` and the safe-mode gate report the
|
|
60
|
+
same level** for all 108 actions. They read one classifier; the failure mode
|
|
61
|
+
if they ever diverge is silent.
|
|
62
|
+
|
|
63
|
+
Live-validated against DaVinci Resolve Studio 19.1.3.7: the four newly-HIGH
|
|
64
|
+
actions probed are refused with the timeline unchanged, the newly LOW/MEDIUM
|
|
65
|
+
ones still pass, and every audit row carries `risk_established: true`.
|
|
66
|
+
|
|
67
|
+
## What's New in v2.209.1 — the test suite no longer writes to the security audit log
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
|
|
71
|
+
- **Running the suite appended fabricated events to `logs/security-audit.jsonl`.**
|
|
72
|
+
The destructive-op audit log added in v2.209.0 defaults to that path, which is
|
|
73
|
+
correct for an install and wrong for a test run: any test exercising a
|
|
74
|
+
`@destructive_op`-wrapped handler wrote a genuine-looking record.
|
|
75
|
+
`tests/test_tool_argument_validation` walks every tool, so a single run added
|
|
76
|
+
24 synthetic `delete_timelines` / `reset_all_grades` / `apply_cuts` entries,
|
|
77
|
+
and repeated runs accumulated 216.
|
|
78
|
+
|
|
79
|
+
A security log is read to establish what actually happened, so synthetic rows
|
|
80
|
+
in it are worse than a missing feature — at the point someone needs to trust
|
|
81
|
+
the file they are indistinguishable from real events. `tests/offline_guard`
|
|
82
|
+
now redirects the audit path to a temp file for the whole run, covering both
|
|
83
|
+
the pytest and `python -m unittest` entry points, and only replaces the
|
|
84
|
+
*default*: a test that configures `destructive.audit_log_path` still gets its
|
|
85
|
+
own path. A regression test asserts the active path is never inside the repo.
|
|
86
|
+
|
|
87
|
+
No released behaviour changes — the default remains `logs/security-audit.jsonl`
|
|
88
|
+
for real installs. Anyone who ran the v2.209.0 suite should expect synthetic
|
|
89
|
+
rows in their local file; they carry temp-directory `project_root` values.
|
|
90
|
+
|
|
5
91
|
## What's New in v2.209.0 — safe operations policy
|
|
6
92
|
|
|
7
93
|
### Added
|
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.
|
|
15
|
+
> 本翻译对应 v2.210.0 版 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 = "2.
|
|
40
|
+
VERSION = "2.210.0"
|
|
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
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.
|
|
90
|
+
VERSION = "2.210.0"
|
|
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
|
@@ -145,12 +145,48 @@ class RiskClassificationHook(LifecycleHook):
|
|
|
145
145
|
("timeline", "overwrite_range"),
|
|
146
146
|
("timeline", "apply_cuts"),
|
|
147
147
|
("graph", "reset_all_grades"),
|
|
148
|
+
# Plan execution: each rebuilds the timeline from the plan's lifts and
|
|
149
|
+
# keep_ranges. Same shape as execute_selects and ripple_trim above.
|
|
150
|
+
("edit_engine", "execute_tighten"),
|
|
151
|
+
("edit_engine", "execute_swap"),
|
|
152
|
+
("edit_engine", "execute_silence_ripple"),
|
|
153
|
+
# Restructuring. move_clips passes delete_sources=True, so the originals
|
|
154
|
+
# are removed; ripple_insert shifts everything downstream of the insert;
|
|
155
|
+
# compound/fusion clips replace the selected items with a container and
|
|
156
|
+
# rewire what the timeline points at.
|
|
157
|
+
("timeline", "move_clips"),
|
|
158
|
+
("timeline", "ripple_insert"),
|
|
159
|
+
("timeline", "create_compound_clip"),
|
|
160
|
+
("timeline", "create_fusion_clip"),
|
|
161
|
+
# ImportIntoTimeline lays an external edit over the timeline;
|
|
162
|
+
# ConvertTimelineToStereo rewrites the audio track layout and has no
|
|
163
|
+
# inverse; DetectSceneCuts cuts every clip it decides to cut.
|
|
164
|
+
("timeline", "import_into_timeline"),
|
|
165
|
+
("timeline", "convert_to_stereo"),
|
|
166
|
+
("timeline_ai", "detect_scene_cuts"),
|
|
167
|
+
# Grades that are replaced wholesale. apply_grade_from_drx documents
|
|
168
|
+
# itself as replacing the entire node graph with no append mode;
|
|
169
|
+
# CopyGrades overwrites each target's grade.
|
|
170
|
+
("graph", "apply_grade_from_drx"),
|
|
171
|
+
("timeline_item_color", "copy_grades"),
|
|
172
|
+
# Takes. delete removes one; finalize collapses the item to the selected
|
|
173
|
+
# take and discards the rest.
|
|
174
|
+
("timeline_item_takes", "delete"),
|
|
175
|
+
("timeline_item_takes", "finalize"),
|
|
176
|
+
# The only action here that writes OUTSIDE the project: UpdateSidecar
|
|
177
|
+
# rewrites the .braw sidecar or R3D .RMD file next to the camera
|
|
178
|
+
# original. No Resolve undo reaches it, and it changes how that media
|
|
179
|
+
# is interpreted by every other application that reads it.
|
|
180
|
+
("timeline_item", "update_sidecar"),
|
|
148
181
|
}
|
|
149
182
|
|
|
150
|
-
#: Mutating, but bounded and trivially reversible — a marker
|
|
151
|
-
#:
|
|
152
|
-
#:
|
|
153
|
-
#:
|
|
183
|
+
#: Mutating, but bounded and trivially reversible — a marker, a clip colour,
|
|
184
|
+
#: a toggle, or a newly created empty container. Nothing that already exists
|
|
185
|
+
#: is altered or removed, and the inverse is a single action.
|
|
186
|
+
#:
|
|
187
|
+
#: Without this table the name heuristic files them under MEDIUM and flags
|
|
188
|
+
#: them unrecognised, i.e. it warns that the risk is unestablished for the
|
|
189
|
+
#: actions whose risk is the best established of any we dispatch.
|
|
154
190
|
_LOW_RISK_ACTIONS: Set[Tuple[str, str]] = {
|
|
155
191
|
("timeline_markers", "add"),
|
|
156
192
|
("timeline_markers", "update_custom_data"),
|
|
@@ -159,6 +195,103 @@ class RiskClassificationHook(LifecycleHook):
|
|
|
159
195
|
("timeline_item_markers", "clear_flags"),
|
|
160
196
|
("timeline_item_markers", "set_clip_color"),
|
|
161
197
|
("timeline_item_markers", "clear_clip_color"),
|
|
198
|
+
("timeline_item_markers", "update_custom_data"),
|
|
199
|
+
# Marks and flags: metadata on a clip, no frames touched.
|
|
200
|
+
("timeline", "set_mark_in_out"),
|
|
201
|
+
("timeline", "clear_mark_in_out"),
|
|
202
|
+
("media_pool", "set_clip_marks"),
|
|
203
|
+
("media_pool", "clear_clip_marks"),
|
|
204
|
+
# Track-level toggles and labels. SetTrackEnable/SetTrackLock/SetTrackName
|
|
205
|
+
# change no content; add_track creates an empty container.
|
|
206
|
+
("timeline", "add_track"),
|
|
207
|
+
("timeline", "set_track_enable"),
|
|
208
|
+
("timeline", "set_track_lock"),
|
|
209
|
+
("timeline", "set_track_name"),
|
|
210
|
+
("timeline", "set_clips_linked"),
|
|
211
|
+
("timeline", "set_title_text"),
|
|
212
|
+
# DuplicateTimeline writes a new timeline; the original is untouched.
|
|
213
|
+
("timeline", "duplicate"),
|
|
214
|
+
# CreateEmptyTimeline / CreateStereoClip only add. `create_timeline`'s
|
|
215
|
+
# if_exists policy is version/reuse/fail — it has no overwrite path, so
|
|
216
|
+
# it cannot replace an existing timeline.
|
|
217
|
+
("media_pool", "create_timeline"),
|
|
218
|
+
("media_pool", "create_timeline_from_clips"),
|
|
219
|
+
("media_pool", "create_stereo_clip"),
|
|
220
|
+
# Per-item display properties: set them back and the item is as it was.
|
|
221
|
+
("timeline_item", "set_clip_enabled"),
|
|
222
|
+
("timeline_item", "set_name"),
|
|
223
|
+
("timeline_item", "set_crop"),
|
|
224
|
+
("timeline_item", "set_transform"),
|
|
225
|
+
("timeline_item", "set_composite"),
|
|
226
|
+
("timeline_item", "set_audio"),
|
|
227
|
+
# Cache toggles and node *labels* — not grades.
|
|
228
|
+
("timeline_item_color", "set_color_cache"),
|
|
229
|
+
("timeline_item_color", "set_fusion_cache"),
|
|
230
|
+
("timeline_item_color", "reset_all_node_colors"),
|
|
231
|
+
("timeline_item_color", "rename_version"),
|
|
232
|
+
("timeline_item_fusion", "add_comp"),
|
|
233
|
+
("timeline_item_fusion", "rename_comp"),
|
|
234
|
+
("timeline_item_takes", "add"),
|
|
235
|
+
("timeline_item_takes", "select"),
|
|
236
|
+
("graph", "set_node_enabled"),
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
#: A real assessment landing between LOW and HIGH: existing content or
|
|
240
|
+
#: settings are altered, recovery is possible but is not one trivial
|
|
241
|
+
#: inverse. This table exists so that MEDIUM can mean something — before it,
|
|
242
|
+
#: MEDIUM was overwhelmingly the `else` fallthrough, which made an assessed
|
|
243
|
+
#: MEDIUM and an unrated action indistinguishable by level alone.
|
|
244
|
+
_MEDIUM_RISK_ACTIONS: Set[Tuple[str, str]] = {
|
|
245
|
+
# Additive edits that place content into an existing timeline. Nothing
|
|
246
|
+
# is deleted (`overwrite_range`, which does delete, is HIGH), but the
|
|
247
|
+
# timeline is no longer what it was.
|
|
248
|
+
("timeline", "copy_clips"),
|
|
249
|
+
("timeline", "duplicate_clips"),
|
|
250
|
+
("timeline", "copy_range"),
|
|
251
|
+
("timeline", "duplicate_range"),
|
|
252
|
+
("timeline", "insert_generator"),
|
|
253
|
+
("timeline", "insert_title"),
|
|
254
|
+
("timeline", "insert_fusion_generator"),
|
|
255
|
+
("timeline", "insert_fusion_title"),
|
|
256
|
+
("timeline", "insert_fusion_composition"),
|
|
257
|
+
("timeline", "insert_ofx_generator"),
|
|
258
|
+
("media_pool", "append_to_timeline"),
|
|
259
|
+
# Timeline-wide settings. No content lost, but a wrong start timecode
|
|
260
|
+
# silently invalidates every conform and reference built against it.
|
|
261
|
+
("timeline", "set_setting"),
|
|
262
|
+
("timeline", "set_start_timecode"),
|
|
263
|
+
("timeline", "set_voice_isolation_state"),
|
|
264
|
+
("timeline_item", "set_voice_isolation_state"),
|
|
265
|
+
# `set_property` takes an arbitrary key/value, so its blast radius is
|
|
266
|
+
# whatever the caller passed; `set_retime` changes duration and sync.
|
|
267
|
+
("timeline_item", "set_property"),
|
|
268
|
+
("timeline_item", "set_retime"),
|
|
269
|
+
# Pool reorganisation: clips and bins move, nothing is destroyed, but
|
|
270
|
+
# paths other work depends on change underneath it.
|
|
271
|
+
("media_pool", "move_clips"),
|
|
272
|
+
("media_pool", "move_folders"),
|
|
273
|
+
("media_pool", "auto_sync_audio"),
|
|
274
|
+
("media_pool", "setup_multicam_timeline"),
|
|
275
|
+
# Analysis passes that write their results back onto the timeline.
|
|
276
|
+
("timeline_ai", "create_subtitles"),
|
|
277
|
+
("timeline_ai", "analyze_dolby_vision"),
|
|
278
|
+
# Grade state that is replaced rather than removed. AddVersion also
|
|
279
|
+
# switches the active version, so a later graph write lands on the new
|
|
280
|
+
# one — the reason a "pre-change" backup version can end up holding the
|
|
281
|
+
# post-change grade.
|
|
282
|
+
("timeline_item_color", "add_version"),
|
|
283
|
+
("timeline_item_color", "load_version"),
|
|
284
|
+
("timeline_item_color", "set_cdl"),
|
|
285
|
+
("timeline_item_color", "assign_color_group"),
|
|
286
|
+
("timeline_item_color", "stabilize"),
|
|
287
|
+
("timeline_item_color", "smart_reframe"),
|
|
288
|
+
("timeline_item_color", "create_magic_mask"),
|
|
289
|
+
("timeline_item_color", "regenerate_magic_mask"),
|
|
290
|
+
("graph", "set_lut"),
|
|
291
|
+
("graph", "apply_arri_cdl_lut"),
|
|
292
|
+
# Importing or switching the active comp changes what renders.
|
|
293
|
+
("timeline_item_fusion", "import_comp"),
|
|
294
|
+
("timeline_item_fusion", "load_comp"),
|
|
162
295
|
}
|
|
163
296
|
|
|
164
297
|
_READ_ONLY_PREFIXES = ("get_", "list_", "query_", "probe_", "inspect_", "export_", "check_")
|
|
@@ -195,6 +328,17 @@ class RiskClassificationHook(LifecycleHook):
|
|
|
195
328
|
destructive = True
|
|
196
329
|
radius = BlastRadius.ITEM
|
|
197
330
|
reasons.append(f"Bounded reversible edit: {action}")
|
|
331
|
+
elif pair in cls._MEDIUM_RISK_ACTIONS:
|
|
332
|
+
level = RiskLevel.MEDIUM
|
|
333
|
+
destructive = True
|
|
334
|
+
# Scope follows the tool: the timeline and pool tools act on the
|
|
335
|
+
# timeline or the pool as a whole, the per-item tools on one item.
|
|
336
|
+
radius = (
|
|
337
|
+
BlastRadius.TIMELINE
|
|
338
|
+
if tool_name in {"timeline", "timeline_ai", "edit_engine", "media_pool"}
|
|
339
|
+
else BlastRadius.ITEM
|
|
340
|
+
)
|
|
341
|
+
reasons.append(f"Recoverable edit to existing state: {action}")
|
|
198
342
|
elif any(action.startswith(p) for p in cls._READ_ONLY_PREFIXES) or action in {"read", "status", "info"}:
|
|
199
343
|
level = RiskLevel.LOW
|
|
200
344
|
destructive = False
|