davinci-resolve-mcp 2.97.3 → 2.97.5

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,89 @@
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.97.5
6
+
7
+ **`npm ci` was failing outright, and nothing in the release path noticed.**
8
+ No server behavior changed; this is packaging and release-process hardening.
9
+
10
+ ### Fixed
11
+
12
+ - **`package-lock.json` was seven releases stale.** It still carried
13
+ `2.90.0`, and — the part that actually broke things — two
14
+ `optionalDependencies` added since then, `js-yaml` and `pg`, were never
15
+ locked. `npm ci` refuses to install at all when the lockfile and
16
+ `package.json` disagree, so every reproducible install path failed with
17
+ `EUSAGE — Missing: js-yaml@4.3.1 from lock file` (plus `pg` and its nine
18
+ transitive deps). CI, fresh contributor clones, and container builds all hit
19
+ it. `npm install` and `npm publish` resolve independently of the lockfile
20
+ and stayed green throughout, which is why it survived seven releases.
21
+ Regenerated with `npm install --package-lock-only`; `npm ci` now installs
22
+ 175 packages clean.
23
+
24
+ ### Added
25
+
26
+ - **`tests.test_import::test_package_lock_in_sync`** — asserts both version
27
+ fields in the lockfile match `package.json`, and that the root
28
+ `dependencies` / `devDependencies` / `optionalDependencies` blocks match
29
+ exactly. The second half is the one that matters: the version fields being
30
+ right is not evidence `npm ci` works, and dependency drift is what actually
31
+ breaks it. Verified to fail on each drift mode independently.
32
+
33
+ ### Changed
34
+
35
+ - `docs/process/release-process.md` lists `package-lock.json` under "Files To
36
+ Update" with the regeneration command, and Required Validation now
37
+ regenerates the lockfile before `test_import` reads it. The lockfile was
38
+ never on the checklist, which is why the drift was never a step anyone
39
+ skipped — it was a step that did not exist.
40
+
41
+ ## What's New in v2.97.4
42
+
43
+ **Drift is caught at the edit, not at publish time.** Tooling and docs only —
44
+ no server behavior changed, and no Resolve live run was required or performed.
45
+
46
+ ### Added
47
+
48
+ - **Two opt-in `PostToolUse` hooks** in `.claude/hooks/`. Like the two existing
49
+ `PreToolUse` guards, they ship as scripts and are **not** wired up by default;
50
+ opt in via your own gitignored `.claude/settings.local.json` (the block is in
51
+ [docs/README.md](docs/README.md)).
52
+ - `agent_rules_drift_check.py` runs `node scripts/agent-rules/generate.mjs
53
+ --check` after an edit to anything the generator actually reads
54
+ (`docs/SKILL.md`, `docs/kernels/README.md`, `resolve-advanced/README.md`,
55
+ and `generate.mjs` itself, which carries the DOMAINS manifest inline) or to
56
+ `AGENTS.md`, which it writes. It separates the generator's two exit-1
57
+ paths: real staleness always prints `N agent-rule file(s) are stale`, a
58
+ throw never does — and telling a session to regenerate when the generator
59
+ is the thing that crashed sends it in a circle. Watching outputs but not
60
+ inputs was the original bug: bumping the compound tool count in
61
+ `docs/SKILL.md` left five generated files stale and the hook said nothing.
62
+ **A new generator input has to be added to `SOURCE_PATHS` or the hook goes
63
+ silent on exactly the edit it exists for.**
64
+ - `run_matching_test.py` runs the matching `tests/test_<module>.py` after an
65
+ edit under `src/`, resolving the project venv (`venv/bin/python`) before
66
+ `python3` so `pytest` is importable rather than reporting a false failure.
67
+ A fast partial net, not coverage: 72 of the 126 modules under `src/` follow
68
+ the convention, densely in `src/utils/` and not at all for `src/server.py`,
69
+ `src/granular/common.py`, or `src/control_panel.py`. Silence means "no
70
+ matching test file", not "this edit is fine".
71
+ - **`drift-guard-reviewer` subagent** (`.claude/agents/`) — runs the drift-guard
72
+ test family plus the adjacent checks `npm-publish.yml` runs before every
73
+ publish, on demand and in its own context. It reports what is stale and which
74
+ regeneration command fixes it; it does not fix anything.
75
+ - **`release-check` skill** (`/release-check`) — a thin wrapper that reads and
76
+ follows [docs/process/release-process.md](docs/process/release-process.md)
77
+ from disk. It deliberately does not restate the checklist: a second copy can
78
+ drift from the original, which `CLAUDE.md` prohibits.
79
+
80
+ ### Changed
81
+
82
+ - `docs/README.md` documents all four hooks, all three subagents, and the new
83
+ skill in place, including the opt-in JSON block.
84
+
85
+ Contributed by [@Grimthereapper](https://github.com/Grimthereapper) in
86
+ [#149](https://github.com/samuelgursky/davinci-resolve-mcp/pull/149).
87
+
5
88
  ## What's New in v2.97.3
6
89
 
7
90
  **`source_end` no longer has the start timecode baked into it.** Reported by
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [简体中文](README.zh-CN.md)
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.97.3-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.97.5-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-35%20(353%20full)-blue.svg)](#server-modes)
package/README.zh-CN.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md) | 简体中文
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.97.3-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-2.97.5-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-35%20(353%20full)-blue.svg)](#服务器模式)
@@ -12,7 +12,7 @@
12
12
  [![Python](https://img.shields.io/badge/python-3.10+-green.svg)](https://www.python.org/downloads/)
13
13
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
14
14
 
15
- > 本翻译对应 v2.97.3 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
15
+ > 本翻译对应 v2.97.5 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
16
16
 
17
17
  一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
18
18
 
package/docs/README.md CHANGED
@@ -69,23 +69,29 @@ skill routes, these two walk a whole job:
69
69
  - `resolve-tighten-recording` (`.claude/skills/resolve-tighten-recording/SKILL.md`)
70
70
  — **subtractive**: remove dead air from one long single-take recording.
71
71
 
72
- Two more sit outside the domain routing:
72
+ Three more sit outside the domain routing:
73
73
 
74
74
  - `house-style` (`.claude/skills/house-style/SKILL.md`) — accumulated editorial
75
75
  corrections, so the same note is not given twice. Claude-only; append to it
76
76
  when an editorial decision is corrected.
77
77
  - `resolve-session` (`.claude/skills/resolve-session/SKILL.md`) — `/resolve-session`
78
78
  connects, confirms edition and bridge, and reports project/timeline/pool state.
79
+ - `release-check` (`.claude/skills/release-check/SKILL.md`) — `/release-check`
80
+ walks a version bump using [docs/process/release-process.md](process/release-process.md)
81
+ as the sole source; the skill wraps that doc, it does not duplicate it.
79
82
 
80
83
  The offline half of every one is the advanced server; see
81
84
  [Advanced Server](../resolve-advanced/README.md).
82
85
 
83
86
  ## Claude Code Hooks and Subagents
84
87
 
85
- Two `PreToolUse` guards enforce rules `AGENTS.md` states in prose. They ship as
86
- scripts but are **not** wired up by default the repository does not enable
87
- hooks on your behalf. Opt in by adding the block below to your own
88
- `.claude/settings.local.json` (gitignored, so it stays yours):
88
+ Four hooks live in `.claude/hooks/` — two `PreToolUse` guards enforcing rules
89
+ `AGENTS.md` states in prose, and two `PostToolUse` checks that surface
90
+ engineering drift right after the edit that caused it instead of at the next
91
+ test run. All four ship as scripts but are **not** wired up by default — the
92
+ repository does not enable hooks on your behalf. Opt in by adding the block
93
+ below to your own `.claude/settings.local.json` (gitignored, so it stays
94
+ yours):
89
95
 
90
96
  ```json
91
97
  {
@@ -111,13 +117,30 @@ hooks on your behalf. Opt in by adding the block below to your own
111
117
  }
112
118
  ]
113
119
  }
120
+ ],
121
+ "PostToolUse": [
122
+ {
123
+ "matcher": "Write|Edit",
124
+ "hooks": [
125
+ {
126
+ "type": "command",
127
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/agent_rules_drift_check.py",
128
+ "timeout": 30
129
+ },
130
+ {
131
+ "type": "command",
132
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/run_matching_test.py",
133
+ "timeout": 90
134
+ }
135
+ ]
136
+ }
114
137
  ]
115
138
  }
116
139
  }
117
140
  ```
118
141
 
119
142
  Hooks are read at session start, so restart Claude Code after adding them. The
120
- two guards are:
143
+ four are:
121
144
 
122
145
  - `.claude/hooks/frame_verification_guard.py` — denies grade-applying actions on
123
146
  `timeline_item_color` until the session has actually looked at a
@@ -127,15 +150,36 @@ two guards are:
127
150
  - `.claude/hooks/source_media_guard.py` — denies shell commands that write,
128
151
  move, or delete source media outside a scratch root. Reads (`ffprobe`, and
129
152
  `ffmpeg` writing into scratch) pass.
130
-
131
- Two review subagents in `.claude/agents/` run in their own context so frame
132
- images stay out of the main session:
153
+ - `.claude/hooks/agent_rules_drift_check.py` — after an edit to anything
154
+ `generate.mjs` reads (`docs/SKILL.md`, `docs/kernels/README.md`,
155
+ `resolve-advanced/README.md`, and `generate.mjs` itself, which carries the
156
+ DOMAINS manifest inline) or to `AGENTS.md`, which it writes, runs
157
+ `node scripts/agent-rules/generate.mjs --check` and surfaces the result. It
158
+ distinguishes real drift from a generator that threw before it could look —
159
+ regenerating fixes the first and not the second. Informational only; never
160
+ blocks. Skips quietly if `node` isn't on `PATH`. **If `generate.mjs` grows a
161
+ new input, add it to `SOURCE_PATHS` in the hook** — an unwatched input is a
162
+ silent hook on exactly the edit it exists to catch.
163
+ - `.claude/hooks/run_matching_test.py` — after an edit to `src/<module>.py`,
164
+ runs the matching `tests/test_<module>.py` if one exists, using the project
165
+ venv (`venv/bin/python`) so `pytest` is actually importable. Informational
166
+ only; skips quietly if there's no matching test file or no working `pytest`.
167
+ A fast partial net, not coverage: 72 of the 126 modules under `src/` have a
168
+ matching test under this convention, densely in `src/utils/` and not at all
169
+ for `src/server.py` or `src/granular/common.py`. Silence means "no matching
170
+ test file", not "this edit is fine".
171
+
172
+ Three review subagents in `.claude/agents/` run in their own context so bulky
173
+ output (frame images, full test transcripts) stays out of the main session:
133
174
 
134
175
  - `cut-reviewer` — screens an assembled timeline from its frames and reports on
135
176
  pacing, shot order, continuity, and coverage gaps.
136
177
  - `grade-match-verifier` — measures shot match numerically from rendered frames
137
178
  against the project's R−B tolerance, and reports mask pixel counts so an empty
138
179
  skin mask cannot pass as a match.
180
+ - `drift-guard-reviewer` — runs the doc/generated-file drift-guard test family
181
+ (the same checks `npm-publish.yml` runs before every release) and reports
182
+ which files are stale relative to their source, without fixing them.
139
183
 
140
184
  ## Authoring References
141
185
 
@@ -26,6 +26,14 @@ Every release bump must update all version surfaces:
26
26
  - `src/granular/common.py`
27
27
  - `install.py`
28
28
  - `package.json`
29
+ - `package-lock.json` — regenerate with `npm install --package-lock-only`, do
30
+ not hand-edit the version. It carries the version in two places and, more
31
+ importantly, the resolved dependency tree. When it disagrees with
32
+ `package.json`, **`npm ci` refuses to install at all** (`EUSAGE — Missing: X
33
+ from lock file`), which breaks CI, fresh clones, and container builds while
34
+ `npm install` and `npm publish` stay green and hide it. The
35
+ `tests.test_import` guard `test_package_lock_in_sync` fails the suite on
36
+ either drift.
29
37
  - README version badge
30
38
  - README current stats or latest-release summary when they changed
31
39
  - `README.zh-CN.md` — the Simplified Chinese translation. Update its version
@@ -62,6 +70,7 @@ Always run static checks before release:
62
70
 
63
71
  ```bash
64
72
  venv/bin/python tests/test_import.py
73
+ npm install --package-lock-only --no-audit --no-fund # re-stage package-lock.json if it moved
65
74
  venv/bin/python scripts/audit_api_parity.py
66
75
  venv/bin/python scripts/gen_api_limitations.py --check
67
76
  node scripts/agent-rules/generate.mjs --check
@@ -72,6 +81,13 @@ npm pack --dry-run
72
81
  git diff --check
73
82
  ```
74
83
 
84
+ `test_import` carries `test_package_lock_in_sync`, which is the actual gate on the
85
+ lockfile: it asserts both version fields and the root dependency blocks match
86
+ `package.json`. Run the `npm install --package-lock-only` line above first so the
87
+ regeneration is in the working tree when the test reads it — that ordering is why
88
+ the check is a regeneration followed by a test, not a `git diff --exit-code`,
89
+ which would fire on the release bump's own legitimate change.
90
+
75
91
  `test_duplicate_definitions` asserts no module-level name is defined twice under
76
92
  `src/`. A second `def foo` silently replaces the first, and in a module the size
77
93
  of `src/server.py` the two can be thousands of lines apart with different
package/install.py CHANGED
@@ -37,7 +37,7 @@ from src.utils.update_check import (
37
37
 
38
38
  # ─── Version ──────────────────────────────────────────────────────────────────
39
39
 
40
- VERSION = "2.97.3"
40
+ VERSION = "2.97.5"
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davinci-resolve-mcp",
3
- "version": "2.97.3",
3
+ "version": "2.97.5",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -87,7 +87,7 @@ if not logging.getLogger().handlers:
87
87
  handlers=[logging.StreamHandler()],
88
88
  )
89
89
 
90
- VERSION = "2.97.3"
90
+ VERSION = "2.97.5"
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
@@ -11,7 +11,7 @@ Usage:
11
11
  python src/server.py --full # Start the 353-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "2.97.3"
14
+ VERSION = "2.97.5"
15
15
 
16
16
  import base64
17
17
  import os