davinci-resolve-mcp 2.38.0 → 2.40.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 +50 -0
- package/README.md +1 -1
- package/docs/SKILL.md +7 -1
- package/docs/guides/control-panel.md +121 -52
- package/docs/process/release-process.md +11 -0
- package/install.py +1 -1
- package/package.json +1 -1
- package/scripts/regen_panel_screenshots.py +75 -0
- package/src/analysis_dashboard.py +197 -41
- package/src/batch_cli.py +2 -0
- package/src/granular/common.py +1 -1
- package/src/server.py +84 -10
- package/src/utils/actor_identity.py +46 -0
- package/src/utils/brain_edits.py +4 -3
- package/src/utils/resolve_ai_ledger.py +6 -4
- package/src/utils/timeline_brain_db.py +15 -1
- package/src/utils/timeline_versioning.py +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
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.40.0
|
|
6
|
+
|
|
7
|
+
Control panel UX overhaul + docs refresh, from a full live audit of every
|
|
8
|
+
panel view, with drift guards so neither can silently go stale again.
|
|
9
|
+
|
|
10
|
+
- **Added** a governance mode toggle (Advisory / Enforce) to the AI Console,
|
|
11
|
+
with corrected copy (the old text predated v2.39.0 enforce mode), and a
|
|
12
|
+
Recent-runs list on the AI-ops ledger showing each run's actor.
|
|
13
|
+
- **Added** chat-first onboarding: empty Overview, Review, and Inventory
|
|
14
|
+
states show plain-language guidance with a copyable suggested prompt
|
|
15
|
+
instead of zero-walls and MCP action names.
|
|
16
|
+
- **Added** History as a first-class Media menu item, deep-linkable at
|
|
17
|
+
`#analysis/review/history`; documented the full hash deep-link scheme.
|
|
18
|
+
- **Changed** the top-level "Analysis" menu to "Media" (it collided with the
|
|
19
|
+
Preferences page of the same name); "Analyze" is now "Inventory". Full
|
|
20
|
+
vocabulary pass: humanized readiness chips and frame-sampling labels, no
|
|
21
|
+
internal codenames, file names, or absolute paths in UI copy.
|
|
22
|
+
- **Fixed** the README's linked screenshot rendering broken in the Docs
|
|
23
|
+
reader: badge parsing no longer claims local linked images, and a new
|
|
24
|
+
`/api/doc_asset/` route serves repo doc images (path-constrained).
|
|
25
|
+
- **Fixed** poll hygiene: timers pause while the tab is hidden, panel-state
|
|
26
|
+
polling backs off when unfocused, and unchanged inventory polls return a
|
|
27
|
+
tiny 200 instead of a 304 that Chrome logged as an aborted request.
|
|
28
|
+
- **Docs**: `docs/guides/control-panel.md` fully rewritten for the current
|
|
29
|
+
IA with all screenshots regenerated from the live panel
|
|
30
|
+
(`scripts/regen_panel_screenshots.py`). A new drift-guard test fails the
|
|
31
|
+
suite — and the publish workflow, which now runs all three static guards
|
|
32
|
+
on every tag — when the guide drifts from the panel's navigation or
|
|
33
|
+
screenshots.
|
|
34
|
+
|
|
35
|
+
## What's New in v2.39.0
|
|
36
|
+
|
|
37
|
+
Governance enforce mode and actor identity — the staged Phase 3 of the
|
|
38
|
+
Resolve 21 AI-ops work.
|
|
39
|
+
|
|
40
|
+
- **Added** governance `mode` for the media-creating AI ops (motion deblur,
|
|
41
|
+
speech generation): `advisory` (default, unchanged — confirm-preview
|
|
42
|
+
warnings only) or `enforce`, where an over-tier run is blocked with
|
|
43
|
+
`GOVERNANCE_BLOCKED` before token issuance, naming the exceeded dimensions.
|
|
44
|
+
Escape hatches: raise the tier, relax the mode, or pass
|
|
45
|
+
`override_governance=true` to consciously exceed the tier once.
|
|
46
|
+
`set_ai_governance` accepts `mode` (preset now optional);
|
|
47
|
+
`get_ai_governance` reports it.
|
|
48
|
+
- **Added** instance-level actor identity (per the recorded concurrency
|
|
49
|
+
design): each entry point declares itself — `stdio`, `network-sse`,
|
|
50
|
+
`network-http`, `control-panel`, `batch-cli` — and AI-ops ledger rows,
|
|
51
|
+
brain edits, and timeline versions now carry `actor` (`<instance>:<pid>`)
|
|
52
|
+
alongside `initiator`. Schema v8 (additive columns); migration verified
|
|
53
|
+
against a copy of a real project DB with all rows preserved.
|
|
54
|
+
|
|
5
55
|
## What's New in v2.38.0
|
|
6
56
|
|
|
7
57
|
Busy gate for long DaVinci Resolve operations — the first piece of the
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DaVinci Resolve MCP Server
|
|
2
2
|
|
|
3
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
4
4
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
5
5
|
[](docs/reference/api-coverage.md)
|
|
6
6
|
[-blue.svg)](#server-modes)
|
package/docs/SKILL.md
CHANGED
|
@@ -694,7 +694,13 @@ The two media-creating ops also have **soft governance tiers**
|
|
|
694
694
|
deblur/speech runs, bytes, and render time. It is advisory — the confirm dialog
|
|
695
695
|
warns when near/over the tier but never blocks (the ops are confirm-gated).
|
|
696
696
|
Inspect/set with `media_analysis(action="get_ai_governance")` and
|
|
697
|
-
`media_analysis(action="set_ai_governance", preset=…, overrides={...})
|
|
697
|
+
`media_analysis(action="set_ai_governance", preset=…, mode=…, overrides={...})`.
|
|
698
|
+
Governance `mode` is `advisory` by default (preview warnings only); `enforce`
|
|
699
|
+
blocks an over-tier run with `GOVERNANCE_BLOCKED` until the tier is raised, the
|
|
700
|
+
mode is relaxed, or the op is re-called with `override_governance=true`. Ledger
|
|
701
|
+
rows, brain edits, and timeline versions record the acting instance
|
|
702
|
+
(`stdio` / `network-sse` / `network-http` / `control-panel` / `batch-cli` + pid)
|
|
703
|
+
in an `actor` field; the AI
|
|
698
704
|
Console's Governance section offers a tier picker + consumption gauges.
|
|
699
705
|
|
|
700
706
|
The caps layer:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Local Control Panel
|
|
2
2
|
|
|
3
|
-
The DaVinci Resolve MCP ships with a local, single-user browser control panel
|
|
4
|
-
inspecting Resolve state, running source-safe media analysis, drilling into
|
|
5
|
-
analyzed clips and shots, fixing analysis output inline,
|
|
6
|
-
preferences.
|
|
3
|
+
The DaVinci Resolve MCP ships with a local, single-user browser control panel
|
|
4
|
+
for inspecting Resolve state, running source-safe media analysis, drilling into
|
|
5
|
+
analyzed clips and shots, fixing analysis output inline, reviewing timeline
|
|
6
|
+
edit history, driving Resolve's local AI operations, and managing preferences.
|
|
7
7
|
|
|
8
8
|
The panel is a local HTTP server (default `http://127.0.0.1:8765`). It does not
|
|
9
9
|
expose a network listener beyond loopback and does not modify source media.
|
|
@@ -21,8 +21,29 @@ npx davinci-resolve-mcp control-panel
|
|
|
21
21
|
resolve_control(action="open_control_panel")
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Once running,
|
|
25
|
-
|
|
24
|
+
Once running, `resolve_control(action="control_panel_status")` checks the
|
|
25
|
+
pidfile and `resolve_control(action="close_control_panel")` stops it.
|
|
26
|
+
|
|
27
|
+
## Navigation and deep links
|
|
28
|
+
|
|
29
|
+
Top-level sections: **Overview**, **Media** (Inventory / Review / History),
|
|
30
|
+
**AI Console**, **Setup** (Resolve / MCP / Storage / Tools / Media Pool
|
|
31
|
+
History), **Docs**, and **Preferences** (Analysis / Caps + Safety / Metadata
|
|
32
|
+
and Markers / Paths and Workflow / MCP Updates). The project selector on the
|
|
33
|
+
right scopes the panel to an analysis context; **View All Projects** opens a
|
|
34
|
+
read-only browser over the Resolve project database with confirm-gated
|
|
35
|
+
loading.
|
|
36
|
+
|
|
37
|
+
Every view is addressable by URL hash, so links can be bookmarked or pasted
|
|
38
|
+
into chat:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
#overview #aiconsole
|
|
42
|
+
#analysis/media #analysis/review
|
|
43
|
+
#analysis/review/history #analysis/review/clip/<clip_id>
|
|
44
|
+
#analysis/review/clip/<clip_id>/shot/<n> #analysis/review/clip/<clip_id>/transcript
|
|
45
|
+
#diagnostics/mcp #preferences/caps
|
|
46
|
+
```
|
|
26
47
|
|
|
27
48
|
## Tour
|
|
28
49
|
|
|
@@ -30,78 +51,125 @@ the pidfile or `resolve_control(action="close_control_panel")` to stop it.
|
|
|
30
51
|
|
|
31
52
|

|
|
32
53
|
|
|
33
|
-
The
|
|
34
|
-
|
|
35
|
-
|
|
54
|
+
The at-a-glance summary for the active project: Resolve connection state,
|
|
55
|
+
source clip counts, analysis progress, search-index status, and the
|
|
56
|
+
source-media safety posture. When the project has no source clips yet, the
|
|
57
|
+
view shows a get-started card with a suggested chat prompt and a
|
|
58
|
+
**Copy prompt** button — the panel is summoned by conversation, and its empty
|
|
59
|
+
states point back into it.
|
|
36
60
|
|
|
37
|
-
###
|
|
61
|
+
### Media → Inventory
|
|
38
62
|
|
|
39
|
-

|
|
40
64
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
65
|
+
Inventory walks the Resolve Media Pool read-only and filters to source clips so
|
|
66
|
+
timelines, compounds, titles, and generated items stay out of analysis queues.
|
|
67
|
+
Filters cover bin, media type, clip status, and analysis status, with optional
|
|
68
|
+
auto-refresh polling. From here you can select analyzable clips, copy a
|
|
69
|
+
ready-made analysis prompt for your chat session, or launch a supported chat
|
|
70
|
+
client directly.
|
|
45
71
|
|
|
46
|
-
###
|
|
72
|
+
### Media → Review
|
|
47
73
|
|
|
48
74
|

|
|
49
75
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
76
|
+
Review is the browser for analyzed clips. The readiness strip summarizes the
|
|
77
|
+
evidence base (analyzed / superseded / vision-pending / warnings) with
|
|
78
|
+
humanized source-trust and analysis-layer chips. Cards show a representative
|
|
79
|
+
thumbnail, duration, shot count, status, and summary one-liner; grid and list
|
|
80
|
+
layouts are available, and full-text search covers clips, summaries, tags, and
|
|
81
|
+
transcripts once the search index is built.
|
|
53
82
|
|
|
54
83
|
### Clip detail
|
|
55
84
|
|
|
56
85
|

|
|
57
86
|
|
|
58
|
-
The clip view shows the full summary, tags, editorial notes, and
|
|
59
|
-
every detected shot
|
|
60
|
-
Resolve, jump to the transcript, or click into any shot
|
|
61
|
-
breakdown.
|
|
87
|
+
The clip view shows the full summary, tags, star rating, editorial notes, and
|
|
88
|
+
a contact sheet of every detected shot. From here you can open the clip in
|
|
89
|
+
Resolve, jump to the transcript, or click into any shot.
|
|
62
90
|
|
|
63
91
|
### Transcript
|
|
64
92
|
|
|
65
93
|

|
|
66
94
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
with words` re-runs the configured local transcription backend (Whisper by
|
|
72
|
-
default) without re-doing visual analysis, and `corrections.json` captures
|
|
73
|
-
inline edits so they survive future re-runs.
|
|
95
|
+
Each segment shows its start time, the cleaned sentence, and the original
|
|
96
|
+
machine transcription beneath. Inline edits are preserved across re-analysis,
|
|
97
|
+
and `Re-transcribe with words` re-runs the configured local transcription
|
|
98
|
+
backend (Whisper by default) without re-doing visual analysis.
|
|
74
99
|
|
|
75
100
|
### Shot detail with inline correction
|
|
76
101
|
|
|
77
|
-

|
|
78
103
|
|
|
79
|
-
The shot view shows
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
editable inline
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
104
|
+
The shot view shows the analysis fields for the shot alongside the frames the
|
|
105
|
+
vision pass actually sampled, each labeled with why it was chosen ("Shot
|
|
106
|
+
start", "After cut", "Flash frame", "Motion peak"). Subjective fields are
|
|
107
|
+
editable inline; edits are kept with the clip's analysis and merged on top of
|
|
108
|
+
future re-analysis so human notes survive fresh vision runs. `Open in Resolve`
|
|
109
|
+
jumps straight to the clip in the source viewer with the shot's mark in/out
|
|
110
|
+
set.
|
|
86
111
|
|
|
87
|
-
###
|
|
112
|
+
### Media → History
|
|
88
113
|
|
|
89
|
-

|
|
90
115
|
|
|
91
|
-
The
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
116
|
+
The timeline edit history: archived timeline versions and brain edits per
|
|
117
|
+
timeline. Begin/end labeled runs to group related edits, archive the current
|
|
118
|
+
timeline before risky work, and select any timeline to inspect its version
|
|
119
|
+
chain and the edits between versions. Every destructive timeline edit made
|
|
120
|
+
through the MCP archives a version here automatically.
|
|
121
|
+
|
|
122
|
+
### AI Console
|
|
123
|
+
|
|
124
|
+

|
|
125
|
+
|
|
126
|
+
Runs Resolve's local AI operations (audio classification, IntelliSearch, slate
|
|
127
|
+
analysis, transcription, motion deblur, speech generation) on the current
|
|
128
|
+
Media Pool folder or a specific clip. Capability dots show what this Resolve
|
|
129
|
+
build exposes and which AI Extras are required. The **Governance** card sets
|
|
130
|
+
the per-session tier (off / lenient / standard / strict) for the two
|
|
131
|
+
media-creating ops and the governance **mode**: *Advisory* warns in the
|
|
132
|
+
confirm dialog; *Enforce* refuses an over-tier run until you raise the tier,
|
|
133
|
+
relax the mode, or consciously override. Usage gauges track runs, media
|
|
134
|
+
created, and render time against the active tier, and the AI-ops ledger
|
|
135
|
+
(Preferences → Caps + Safety) records every run with the acting instance.
|
|
136
|
+
|
|
137
|
+
### Setup
|
|
138
|
+
|
|
139
|
+

|
|
95
140
|
|
|
96
|
-
|
|
141
|
+
- **Resolve** — live connection, product/version, active page, project
|
|
142
|
+
identity, and Media Pool inventory.
|
|
143
|
+
- **MCP** — server identity, detected Resolve scripting paths, transport
|
|
144
|
+
status (with a start button for the networked mode), and per-client install
|
|
145
|
+
status with one-click install/repair for every supported harness.
|
|
146
|
+
- **Storage** — the analysis root, search index, and jobs database paths and
|
|
147
|
+
sizes for the active project.
|
|
148
|
+
- **Tools** — runtime helpers (ffprobe, ffmpeg, Whisper backends, OpenCV)
|
|
149
|
+
with ready/missing status and copyable install commands.
|
|
150
|
+
- **Media Pool History** — the provenance log for destructive media-pool
|
|
151
|
+
operations (deletes, replaces, relinks), kept separate from timeline brain
|
|
152
|
+
edits.
|
|
153
|
+
|
|
154
|
+
### Preferences
|
|
97
155
|
|
|
98
156
|

|
|
99
157
|
|
|
100
|
-
Server-wide
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
158
|
+
Server-wide defaults for this MCP install (dashboard-only conveniences stay in
|
|
159
|
+
the browser):
|
|
160
|
+
|
|
161
|
+
- **Analysis** — vision/transcription defaults, slate detection, source-trust
|
|
162
|
+
grading, depth, frame-sampling mode, summary style, report format.
|
|
163
|
+
- **Caps + Safety** — token and frame budget presets (minimal / standard /
|
|
164
|
+
generous / unlimited) with live usage gauges, per-clip/job/day caps, the
|
|
165
|
+
Resolve AI-ops ledger, and destructive-edit safety rails.
|
|
166
|
+
- **Metadata and Markers** — Resolve metadata write-back fields, timed-marker
|
|
167
|
+
defaults, marker types and colors, overwrite policy.
|
|
168
|
+
- **Paths and Workflow** — preferred analysis root, generated-media folder,
|
|
169
|
+
post-operation page behavior, and a read-only map of where files live.
|
|
170
|
+
- **MCP Updates** — update policy (prompt / notify / auto / never), release
|
|
171
|
+
channel (stable / beta / dev), check cadence, apply/rollback with update
|
|
172
|
+
history.
|
|
105
173
|
|
|
106
174
|
## Chat ↔ panel state sharing
|
|
107
175
|
|
|
@@ -115,8 +183,9 @@ active project's analysis root). MCP actions:
|
|
|
115
183
|
- `media_analysis(action="session_start_context")` — bootstrap a chat session
|
|
116
184
|
with the panel's current focus
|
|
117
185
|
|
|
118
|
-
The dashboard polls `/api/panel_state` every 2 seconds
|
|
119
|
-
|
|
186
|
+
The dashboard polls `/api/panel_state` every 2 seconds while it has focus,
|
|
187
|
+
backs off to roughly every 10 seconds when the window is unfocused, and stops
|
|
188
|
+
polling entirely while the tab is hidden.
|
|
120
189
|
|
|
121
190
|
## Open in Resolve
|
|
122
191
|
|
|
@@ -30,6 +30,11 @@ Every release bump must update all version surfaces:
|
|
|
30
30
|
- README current stats or latest-release summary when they changed
|
|
31
31
|
- `CHANGELOG.md` latest release entry
|
|
32
32
|
- `docs/SKILL.md` when tool discovery, examples, or behavior changed
|
|
33
|
+
- `docs/guides/control-panel.md` when the control panel UI changed, plus
|
|
34
|
+
regenerated screenshots: start the panel against a project with analysis
|
|
35
|
+
data, then run `venv/bin/python scripts/regen_panel_screenshots.py`.
|
|
36
|
+
The `tests.test_panel_docs_drift` guard fails the suite (and the publish
|
|
37
|
+
workflow) when the guide drifts from the panel's navigation or screenshots.
|
|
33
38
|
- Git tag, e.g. `v2.4.1`
|
|
34
39
|
- GitHub Release notes
|
|
35
40
|
|
|
@@ -43,12 +48,18 @@ Always run static checks before release:
|
|
|
43
48
|
```bash
|
|
44
49
|
venv/bin/python tests/test_import.py
|
|
45
50
|
venv/bin/python scripts/audit_api_parity.py
|
|
51
|
+
venv/bin/python -m unittest tests.test_static_undefined_names tests.test_action_list_drift tests.test_panel_docs_drift
|
|
46
52
|
node bin/davinci-resolve-mcp.mjs --help
|
|
47
53
|
node bin/davinci-resolve-mcp.mjs --version
|
|
48
54
|
npm pack --dry-run
|
|
49
55
|
git diff --check
|
|
50
56
|
```
|
|
51
57
|
|
|
58
|
+
The three drift guards (undefined names in `src/`, tool action lists vs
|
|
59
|
+
dispatch, control-panel guide vs panel navigation/screenshots) also run in the
|
|
60
|
+
`Publish npm package` workflow on every `v*` tag, so a stale doc or drifted
|
|
61
|
+
action list fails the publish — fix the drift rather than bypassing the gate.
|
|
62
|
+
|
|
52
63
|
Run focused unit tests for the changed surface. For recent timeline/marker
|
|
53
64
|
helpers, this usually includes:
|
|
54
65
|
|
package/install.py
CHANGED
|
@@ -35,7 +35,7 @@ from src.utils.update_check import (
|
|
|
35
35
|
|
|
36
36
|
# ─── Version ──────────────────────────────────────────────────────────────────
|
|
37
37
|
|
|
38
|
-
VERSION = "2.
|
|
38
|
+
VERSION = "2.40.0"
|
|
39
39
|
# Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
|
|
40
40
|
# Resolve's scripting bridge loads into newer interpreters on recent builds
|
|
41
41
|
# (Python 3.14 verified against Resolve Studio 20.3.2). Older Resolve builds
|
package/package.json
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Regenerate the control-panel doc screenshots from a live panel.
|
|
3
|
+
|
|
4
|
+
Drives the panel's hash deep links headlessly and writes 1280x800 captures
|
|
5
|
+
into docs/images/control-panel/. Run whenever the panel UI changes visibly.
|
|
6
|
+
|
|
7
|
+
Setup:
|
|
8
|
+
1. venv/bin/pip install playwright (chromium is fetched on first run if absent)
|
|
9
|
+
2. Start the panel bound to a project that HAS an analyzed clip, e.g.:
|
|
10
|
+
venv/bin/python -m src.control_panel --no-open
|
|
11
|
+
(Bind to a rich analysis context if the live Resolve project is empty.)
|
|
12
|
+
3. venv/bin/python scripts/regen_panel_screenshots.py [--clip-id <id>] [--port 8765]
|
|
13
|
+
|
|
14
|
+
The clip id defaults to the first analyzed clip reported by /api/clips.
|
|
15
|
+
"""
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
import json
|
|
20
|
+
import pathlib
|
|
21
|
+
import sys
|
|
22
|
+
import urllib.request
|
|
23
|
+
|
|
24
|
+
OUT_DIR = pathlib.Path(__file__).resolve().parent.parent / "docs" / "images" / "control-panel"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def first_clip_id(base: str) -> str:
|
|
28
|
+
with urllib.request.urlopen(f"{base}/api/clips", timeout=10) as resp:
|
|
29
|
+
payload = json.load(resp)
|
|
30
|
+
clips = payload.get("clips") or []
|
|
31
|
+
if not clips:
|
|
32
|
+
sys.exit("No analyzed clips in the panel's project — bind the panel to a project with analysis data first.")
|
|
33
|
+
return clips[0]["clip_id"]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def main() -> int:
|
|
37
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
38
|
+
parser.add_argument("--port", type=int, default=8765)
|
|
39
|
+
parser.add_argument("--clip-id", default=None)
|
|
40
|
+
args = parser.parse_args()
|
|
41
|
+
base = f"http://127.0.0.1:{args.port}"
|
|
42
|
+
|
|
43
|
+
try:
|
|
44
|
+
from playwright.sync_api import sync_playwright
|
|
45
|
+
except ImportError:
|
|
46
|
+
sys.exit("playwright not installed: venv/bin/pip install playwright")
|
|
47
|
+
|
|
48
|
+
clip = args.clip_id or first_clip_id(base)
|
|
49
|
+
shots = [
|
|
50
|
+
("#overview", "01-overview.png", 3000),
|
|
51
|
+
("#analysis/review", "02-review-bin-grid.png", 3500),
|
|
52
|
+
(f"#analysis/review/clip/{clip}", "03-clip-detail.png", 4000),
|
|
53
|
+
(f"#analysis/review/clip/{clip}/transcript", "04-transcript.png", 4000),
|
|
54
|
+
(f"#analysis/review/clip/{clip}/shot/3", "05-shot-detail.png", 4500),
|
|
55
|
+
("#analysis/media", "06-inventory.png", 3500),
|
|
56
|
+
("#diagnostics/resolve", "07-diagnostics-resolve.png", 3000),
|
|
57
|
+
("#preferences/analysis", "08-preferences-analysis.png", 3000),
|
|
58
|
+
("#aiconsole", "09-ai-console.png", 3000),
|
|
59
|
+
("#analysis/review/history", "10-history.png", 3500),
|
|
60
|
+
]
|
|
61
|
+
with sync_playwright() as pw:
|
|
62
|
+
browser = pw.chromium.launch()
|
|
63
|
+
page = browser.new_page(viewport={"width": 1280, "height": 800})
|
|
64
|
+
for hash_, name, wait in shots:
|
|
65
|
+
page.goto(f"{base}/{hash_}")
|
|
66
|
+
page.wait_for_timeout(wait)
|
|
67
|
+
page.screenshot(path=str(OUT_DIR / name))
|
|
68
|
+
print("shot:", name)
|
|
69
|
+
browser.close()
|
|
70
|
+
print(f"done — {len(shots)} screenshots in {OUT_DIR}")
|
|
71
|
+
return 0
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
if __name__ == "__main__":
|
|
75
|
+
raise SystemExit(main())
|