davinci-resolve-mcp 4.9.2 → 4.10.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/src/server.py CHANGED
@@ -11,7 +11,7 @@ Usage:
11
11
  python src/server.py --full # Start the 377-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "4.9.2"
14
+ VERSION = "4.10.0"
15
15
 
16
16
  import base64
17
17
  import os
@@ -1666,18 +1666,30 @@ API_TRUTH: List[Dict[str, Any]] = [
1666
1666
  {
1667
1667
  "symbol": "Per-subtitle text content and timing editing",
1668
1668
  "object": "TimelineItem (subtitle track)",
1669
- "reality": "TimelineItem on a subtitle track exposes only 21 standard "
1670
- "transform/composite properties (Pan, Tilt, ZoomX, Opacity, "
1671
- "Crop, etc.). There are no methods to get or set subtitle "
1672
- "text (GetText/SetText), start time, end time, or duration "
1673
- "for individual subtitle items. Subtitles created via "
1674
- "CreateSubtitlesFromAudio or imported via the Resolve UI "
1675
- "cannot have their content or timing read or modified "
1676
- "programmatically. Verified via dir() and GetProperty() on "
1677
- "Resolve 21.0.0.48.",
1678
- "recommended": "No workaround exists — subtitle text and timing are "
1679
- "completely inaccessible from the scripting API. Must "
1680
- "be edited in the Resolve UI.",
1669
+ "reality": "GetName, GetStart and GetEnd read caption names and bounds, "
1670
+ "and Timeline.DeleteClips can delete captions. There are no "
1671
+ "public methods to set caption text or per-word timings. "
1672
+ "Read-only live probe on Studio 21.1.0.17 (Windows, 2026-10-02): "
1673
+ "GetType=generator, GetProperty returned an empty dict, "
1674
+ "GetFusionCompCount=0, and dir() exposed no caption/text "
1675
+ "methods; the supplied reproduction also reports false "
1676
+ "GetProperty/SetProperty results. A subtitle SetProperty "
1677
+ "request must be refused before timeline auto-archiving. "
1678
+ "In the supplied 21.1 reproduction, UI text edits leave Name "
1679
+ "stale and move original AI words/times to protobuf f18/19/20; "
1680
+ "current f14/15/16 may contain invalid intervals. Whether "
1681
+ "a later save re-times them is not established here.",
1682
+ "recommended": "Use advanced project_db list_captions / write_captions / "
1683
+ "check_captions on a local SQLite project with Resolve "
1684
+ "fully quit. Current text comes from f14, not stale Name. "
1685
+ "f15/16 and f19/20 use 60 ticks/sec; f21 is the original "
1686
+ "caption frame anchor. The tool returns timeline-frame "
1687
+ "times rebased to the item's current Start. Writes need "
1688
+ "explicit word times, preserve unknown fields, reject "
1689
+ "gaps/zero durations and re-index Items atomically, with "
1690
+ "backup and readback. This is an unsupported DB workaround; "
1691
+ "render/reopen validation of the implementation remains "
1692
+ "required before release.",
1681
1693
  "tags": ["missing-method", "subtitle", "text", "timing"],
1682
1694
  "submit": "missing",
1683
1695
  },
@@ -1687,8 +1699,8 @@ API_TRUTH: List[Dict[str, Any]] = [
1687
1699
  "reality": "There is no API method to set or query subtitle font "
1688
1700
  "family, font size, text color, background color, outline, "
1689
1701
  "shadow, position, alignment, or to apply/query subtitle "
1690
- "style presets. TimelineItem.GetProperty() on subtitle "
1691
- "items returns only transform/composite keys. "
1702
+ "style presets. Older probes returned only transform/composite "
1703
+ "keys; a read-only Studio 21.1.0.17 probe returned an empty dict. "
1692
1704
  "Timeline.GetSetting() and Project.GetSetting() return "
1693
1705
  "None for all probed subtitle-style keys (e.g. "
1694
1706
  "'subtitleFontName', 'subtitleFontSize', "
@@ -1713,7 +1725,19 @@ API_TRUTH: List[Dict[str, Any]] = [
1713
1725
  "blob (a freshly added subtitle track has none until it "
1714
1726
  "is styled once in the UI). Burn-in overlays via Fusion "
1715
1727
  "titles remain a visual alternative but do not produce "
1716
- "subtitle tracks.",
1728
+ "subtitle tracks. Animated Word Highlight is DIFFERENT: "
1729
+ "list_subtitle_styles may report styled:false while an "
1730
+ "animation is present. Sm2TiItem_Sm2TiTrack links a "
1731
+ "Sm2TiVideoClip holder via FusionCompHolderItems to a "
1732
+ "Sm2TiCompositionTable. The supplied Studio 21.1.0.17 "
1733
+ "reproduction verified cloning these three rows; local "
1734
+ "read-only inspection corroborated the format. Use "
1735
+ "list_subtitle_presets / copy_subtitle_preset, or "
1736
+ "set_subtitle_preset for named Word Highlight inputs "
1737
+ "inside the nested zlib tool section. These new actions "
1738
+ "check that Resolve is fully quit BEFORE writing. "
1739
+ "Holder Duration is preserved; its rendering semantics "
1740
+ "and per-caption preset layouts remain unverified.",
1717
1741
  "tags": ["missing-method", "subtitle", "style", "preset"],
1718
1742
  "submit": "missing",
1719
1743
  },
@@ -1726,12 +1750,16 @@ API_TRUTH: List[Dict[str, Any]] = [
1726
1750
  "provider (e.g. whisper-cli, Google Speech, AWS Transcribe). "
1727
1751
  "The language selection via resolve.AUTO_CAPTION_LANGUAGE_* "
1728
1752
  "is the only customization; the engine itself cannot be "
1729
- "changed. Furthermore, there is no API method to import an "
1730
- "SRT file into a subtitle track programmatically — "
1731
- "File -> Import -> Subtitle is UI-only.",
1732
- "recommended": "No workaround exists for provider selection or SRT "
1733
- "import. External transcripts must be converted to SRT "
1734
- "and imported through the Resolve UI.",
1753
+ "changed. There is no dedicated subtitle import method. "
1754
+ "However, MediaPool.ImportMedia(srt) + AppendToTimeline was "
1755
+ "reported working on Studio 21.0.4.5 (issue #169). Whether "
1756
+ "that route carries word timing for animated presets on "
1757
+ "21.1 has not been verified; SRT contains only cue timing.",
1758
+ "recommended": "Use Resolve's engine for CreateSubtitlesFromAudio. "
1759
+ "For external SRT, test ImportMedia + AppendToTimeline "
1760
+ "on the exact installed build or import through the UI. "
1761
+ "Use project_db write_captions for explicit word timings "
1762
+ "with Resolve fully quit; do not assume SRT supplies them.",
1735
1763
  "tags": ["missing-method", "subtitle", "transcription",
1736
1764
  "speech-recognition", "asr"],
1737
1765
  "submit": "missing",
@@ -1194,6 +1194,16 @@ def destructive_op(tool_name: str) -> Callable[[Callable[..., Any]], Callable[..
1194
1194
 
1195
1195
  def decorator(fn: Callable[..., Any]) -> Callable[..., Any]:
1196
1196
  def _inner(action: str, params: Optional[Dict[str, Any]] = None, *args, **kwargs) -> Any:
1197
+ if (tool_name == "timeline_item" and action == "set_property"
1198
+ and (params or {}).get("track_type") == "subtitle"):
1199
+ # This API rejects subtitle generators. Refuse before versioning
1200
+ # so an impossible write cannot create an archived timeline.
1201
+ return {
1202
+ "success": False,
1203
+ "error": "SetProperty is unsupported on subtitle items. Use advanced "
1204
+ "project_db write_captions / set_subtitle_preset with Resolve fully quit.",
1205
+ "_versioning": {"archived": False, "skipped_reason": "unsupported_subtitle_property"},
1206
+ }
1197
1207
  if lacks_native_dry_run(tool_name, action, params):
1198
1208
  # An explicit dry-run request this handler would silently
1199
1209
  # execute for real. Refuse before archive, state lookup, or the