davinci-resolve-mcp 2.54.2 → 2.54.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 CHANGED
@@ -2,6 +2,20 @@
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.54.3
6
+
7
+ Follow-up to the v2.54.2 config-merge fix (#71): the JSONC sanitizer's
8
+ trailing-comma step was not string-aware.
9
+
10
+ - **Fixed** `_strip_jsonc` removed trailing commas with a regex applied to the
11
+ whole document, so a comma inside a string value followed by whitespace and a
12
+ closing brace/bracket — e.g. `"greeting": "hello, } world"` — had the comma
13
+ silently stripped *from inside the string* when merging a commented (JSONC)
14
+ client config. The trailing-comma pass is now string-aware (mirroring the
15
+ comment stripper), so string contents are never altered while real trailing
16
+ commas are still removed. Added regression tests covering string values that
17
+ contain `, }` / `, ]`. (Dropped the now-unused `re` import.)
18
+
5
19
  ## What's New in v2.54.2
6
20
 
7
21
  A destructive-overwrite bug in the installer (issue #71): the MCP client setup
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DaVinci Resolve MCP Server
2
2
 
3
- [![Version](https://img.shields.io/badge/version-2.54.2-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
3
+ [![Version](https://img.shields.io/badge/version-2.54.3-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
4
4
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
5
5
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
6
6
  [![Tools](https://img.shields.io/badge/MCP%20Tools-34%20(341%20full)-blue.svg)](#server-modes)
package/install.py CHANGED
@@ -17,7 +17,6 @@ import argparse
17
17
  import json
18
18
  import os
19
19
  import platform
20
- import re
21
20
  import shutil
22
21
  import subprocess
23
22
  import sys
@@ -36,7 +35,7 @@ from src.utils.update_check import (
36
35
 
37
36
  # ─── Version ──────────────────────────────────────────────────────────────────
38
37
 
39
- VERSION = "2.54.2"
38
+ VERSION = "2.54.3"
40
39
  # Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
41
40
  # Resolve's scripting bridge loads into newer interpreters on recent builds
42
41
  # (Python 3.14 verified against Resolve Studio 20.3.2). Older Resolve builds
@@ -511,9 +510,42 @@ def _strip_jsonc(text):
511
510
  out.append(ch)
512
511
  i += 1
513
512
  stripped = "".join(out)
514
- # Drop trailing commas before a closing brace/bracket.
515
- stripped = re.sub(r",(\s*[}\]])", r"\1", stripped)
516
- return stripped
513
+ # Drop trailing commas before a closing brace/bracket — string-aware, so a
514
+ # comma inside a string value (e.g. "a, }") is never touched. A prior regex
515
+ # pass here was NOT string-aware and silently corrupted such values during a
516
+ # JSONC merge (follow-up to the issue #71 fix).
517
+ result = []
518
+ i = 0
519
+ n = len(stripped)
520
+ in_string = False
521
+ escape = False
522
+ while i < n:
523
+ ch = stripped[i]
524
+ if in_string:
525
+ result.append(ch)
526
+ if escape:
527
+ escape = False
528
+ elif ch == "\\":
529
+ escape = True
530
+ elif ch == '"':
531
+ in_string = False
532
+ i += 1
533
+ continue
534
+ if ch == '"':
535
+ in_string = True
536
+ result.append(ch)
537
+ i += 1
538
+ continue
539
+ if ch == ",":
540
+ j = i + 1
541
+ while j < n and stripped[j] in " \t\r\n":
542
+ j += 1
543
+ if j < n and stripped[j] in "}]":
544
+ i += 1 # trailing comma: drop it
545
+ continue
546
+ result.append(ch)
547
+ i += 1
548
+ return "".join(result)
517
549
 
518
550
 
519
551
  def read_json(path):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davinci-resolve-mcp",
3
- "version": "2.54.2",
3
+ "version": "2.54.3",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -80,7 +80,7 @@ if not logging.getLogger().handlers:
80
80
  handlers=[logging.StreamHandler()],
81
81
  )
82
82
 
83
- VERSION = "2.54.2"
83
+ VERSION = "2.54.3"
84
84
  logger = logging.getLogger("davinci-resolve-mcp")
85
85
  logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
86
86
  logger.info(f"Detected platform: {get_platform()}")
package/src/server.py CHANGED
@@ -11,7 +11,7 @@ Usage:
11
11
  python src/server.py --full # Start the 341-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "2.54.2"
14
+ VERSION = "2.54.3"
15
15
 
16
16
  import base64
17
17
  import os