@synthetic-ai/premiere-mcp 2.0.0 → 2.2.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +135 -73
  2. package/LICENSE +21 -21
  3. package/README.md +242 -242
  4. package/cep-plugin/.debug +8 -8
  5. package/cep-plugin/CSInterface.js +92 -70
  6. package/cep-plugin/CSXS/manifest.xml +49 -49
  7. package/cep-plugin/host.jsx +7 -7
  8. package/cep-plugin/index.html +472 -419
  9. package/cep-plugin/main.js +683 -327
  10. package/cep-plugin/premiere.jsx +24947 -24947
  11. package/dist/bridge/script-builder.js +378 -378
  12. package/dist/index.js +117 -18
  13. package/dist/license.d.ts +22 -0
  14. package/dist/license.js +89 -0
  15. package/dist/server.js +67 -61
  16. package/dist/tools/advanced.js +357 -357
  17. package/dist/tools/audio-advanced.js +1049 -1049
  18. package/dist/tools/audio.js +42 -42
  19. package/dist/tools/captions.js +27 -27
  20. package/dist/tools/clipboard.js +214 -214
  21. package/dist/tools/color-advanced.js +253 -253
  22. package/dist/tools/discovery.js +291 -291
  23. package/dist/tools/effects.js +285 -285
  24. package/dist/tools/export-presets.js +206 -206
  25. package/dist/tools/export.js +255 -255
  26. package/dist/tools/health.js +10 -10
  27. package/dist/tools/inspection.js +885 -885
  28. package/dist/tools/keyframes.js +369 -369
  29. package/dist/tools/markers.js +89 -89
  30. package/dist/tools/media.js +178 -178
  31. package/dist/tools/metadata.js +94 -94
  32. package/dist/tools/multicam.js +50 -50
  33. package/dist/tools/playback.js +15 -15
  34. package/dist/tools/playhead.js +95 -95
  35. package/dist/tools/project-manager.js +21 -21
  36. package/dist/tools/project.js +149 -149
  37. package/dist/tools/scripting.js +319 -319
  38. package/dist/tools/selection.js +202 -202
  39. package/dist/tools/sequence-advanced.js +379 -374
  40. package/dist/tools/sequence-settings.js +564 -556
  41. package/dist/tools/sequence.js +169 -150
  42. package/dist/tools/source-monitor.js +68 -68
  43. package/dist/tools/text.js +58 -58
  44. package/dist/tools/timeline.js +312 -312
  45. package/dist/tools/track-management.js +446 -446
  46. package/dist/tools/track-targeting.js +635 -635
  47. package/dist/tools/tracks.js +87 -87
  48. package/dist/tools/transitions-motion.js +174 -174
  49. package/dist/tools/transitions.js +111 -111
  50. package/dist/tools/utility.js +606 -606
  51. package/dist/tools/workspace.js +29 -29
  52. package/package.json +1 -1
  53. package/scripts/build-chat-dmg.sh +210 -210
  54. package/scripts/build-chat-zip.sh +291 -291
  55. package/scripts/install-cep-windows.ps1 +99 -99
  56. package/scripts/install-cep.sh +66 -66
  57. package/scripts/install-chat-plugin.bat +67 -67
  58. package/scripts/install-chat-plugin.sh +85 -85
  59. package/scripts/install-windows.bat +95 -95
  60. package/scripts/package.mjs +254 -218
package/README.md CHANGED
@@ -1,242 +1,242 @@
1
- # Premiere Pro MCP
2
-
3
- **Control Adobe Premiere Pro with natural language through Claude (or any MCP-compatible LLM).**
4
-
5
- [![Premiere Pro 2026](https://img.shields.io/badge/Premiere%20Pro-2026-blueviolet)](https://www.adobe.com/products/premiere.html)
6
- [![MCP](https://img.shields.io/badge/MCP-compatible-green)](https://modelcontextprotocol.io)
7
- [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
8
-
9
- ---
10
-
11
- ## What it does
12
-
13
- ```
14
- You: "Apply a cinematic look to all clips on V1, ducking the music
15
- when there's voice, and export to YouTube 1080p."
16
-
17
- Claude: ✓ Applied Lumetri (-15K temperature, +10 contrast) to 4 clips
18
- ✓ Added voiceover ducking on A2 (-12dB during A1 voice)
19
- ✓ Queued H.264 1080p export to ~/Videos/final.mp4
20
- ```
21
-
22
- 437 tools exposed via MCP to drive Premiere Pro 2026 from any LLM agent.
23
- Tested in runtime against PP 2026.2.2 on Spanish-localized Windows install.
24
-
25
- ---
26
-
27
- ## Highlights
28
-
29
- - **Locale-resilient**: works on Premiere Pro in Spanish, German, French, etc.
30
- (most competitors hardcode English component names and silently fail)
31
- - **Honest errors**: when a Premiere host API genuinely doesn't expose
32
- something (PP 2026 has known limitations), you get a clear error with
33
- the recommended workaround — not a silent no-op
34
- - **Battle-tested**: 137 tools validated in live runtime against PP 2026 with
35
- detailed bug fixes (see [CHANGELOG.md](CHANGELOG.md))
36
- - **AI-first**: built for LLM-driven workflows. Pair it with Whisper for
37
- speech-to-text, ComfyUI for thumbnails, FFmpeg for analysis — chain MCPs
38
-
39
- ---
40
-
41
- ## Quick start
42
-
43
- ### 1. Install the CEP plugin
44
-
45
- Copy `cep-plugin/` to your Adobe CEP extensions folder:
46
-
47
- - **Windows**: `%APPDATA%\Adobe\CEP\extensions\MCPBridgeCEP\`
48
- - **macOS**: `~/Library/Application Support/Adobe/CEP/extensions/MCPBridgeCEP/`
49
-
50
- Enable CEP debugging:
51
- ```powershell
52
- # Windows
53
- reg add HKCU\Software\Adobe\CSXS.11 /v PlayerDebugMode /t REG_SZ /d 1 /f
54
- ```
55
-
56
- ### 2. Build the MCP server
57
-
58
- ```bash
59
- cd premiere-pro-mcp
60
- npm install
61
- npm run build
62
- ```
63
-
64
- ### 3. Register with Claude Desktop
65
-
66
- Add to `%APPDATA%\Claude\claude_desktop_config.json`:
67
-
68
- ```json
69
- {
70
- "mcpServers": {
71
- "premiere-pro": {
72
- "command": "node",
73
- "args": ["C:/path/to/premiere-pro-mcp/dist/index.js"]
74
- }
75
- }
76
- }
77
- ```
78
-
79
- ### 4. Open Premiere Pro
80
-
81
- - Launch Premiere Pro 2026
82
- - `Window > Extensions > MCPBridgeCEP` (the bridge panel)
83
- - Click "Start Bridge"
84
-
85
- ### 5. Talk to Claude
86
-
87
- ```
88
- "Show me the active sequence structure."
89
- "Add a 1-second fade-in to the audio clip on A2."
90
- "Apply Cross Dissolve at every cut on V1, 0.5 seconds each."
91
- ```
92
-
93
- ---
94
-
95
- ## What works (validated runtime, PP 2026 es-ES)
96
-
97
- ### Project & Inspection
98
- - Full project / sequence / clip overviews
99
- - Bins, markers, metadata (XMP), color labels
100
- - Effect properties with all values, keyframes, source media details
101
- - Find/search project items, list sequences
102
-
103
- ### Timeline editing
104
- - Add/remove/move/duplicate clips, split, trim
105
- - Set in/out points, playhead, work area
106
- - Selection by name/range/color, invert, deselect
107
- - Enable/disable clips, link/unlink
108
-
109
- ### Transform & Motion
110
- - Position, scale, rotation, opacity (locale-resilient)
111
- - Anchor point, blend mode
112
- - Position/scale keyframes via `add_keyframe`
113
-
114
- ### Color
115
- - Lumetri full parameter control: exposure, contrast, highlights/shadows,
116
- whites/blacks, temperature/tint, saturation, vibrance, sharpen, vignette,
117
- faded film
118
- - LUTs apply
119
- - Copy/paste color grade across clips
120
- - ⚠️ See limitations: applying Lumetri *for the first time* requires manual UI
121
-
122
- ### Audio
123
- - Per-clip volume, fade in/out (locale-resilient)
124
- - Volume/panning keyframes
125
- - Audio FX pipeline: Compressor, EQ, De-Esser, De-Hum, De-Reverb, Limiter,
126
- Noise Reduction
127
- - Voiceover ducking
128
- - Normalize, detect clipping
129
-
130
- ### Effects & Transitions
131
- - 60+ video effects (Gaussian/Directional Blur, Sharpen, Warp Stabilizer,
132
- Noise Reduction, Mirror, Spherize, Corner Pin, Lens Distortion, etc.)
133
- - Transitions with locale-aware name lookup (Cross Dissolve works on any
134
- language install)
135
- - Batch apply across cuts
136
-
137
- ### Captions
138
- - Import SRT files as caption tracks
139
- - Pipeline integration: Whisper-transcribe → SRT → MCP creates captions
140
-
141
- ### Export
142
- - Single sequence + batch export via Adobe Media Encoder
143
- - Match Source presets, YouTube/Vimeo/Twitter/Facebook presets
144
- - Encode arbitrary files via AME
145
- - AAF, OMF, FCPXML export
146
-
147
- ### Multicam
148
- - Create multicam sequences, switch angles, flatten
149
-
150
- ### Markers
151
- - Add/update/delete on sequence or clip
152
- - Color labels, comments, in/out range
153
- - Import/export CSV
154
-
155
- ---
156
-
157
- ## Known limitations (PP 2026 host)
158
-
159
- These are not bugs in this MCP — they're verified limitations of Premiere Pro
160
- 2026's ExtendScript/QE-DOM surface. Each tool returns a clear actionable error
161
- with the recommended workaround.
162
-
163
- | Feature | Status | Workaround |
164
- |---------|--------|------------|
165
- | `capture_frame` programmatic | ❌ `qeSeq.exportFramePNG` reports success but never writes file | UI: File > Export > Media > Single Frame |
166
- | `set_track_volume` | ❌ Audio track DOM no longer exposes `.components` or `.volume`; QE has no `setVolume` | Use `add_audio_keyframes` per-clip, or Audio Track Mixer |
167
- | `speed_change` programmatic | ❌ `qeClip.setSpeed` signature changed in PP 2026 (rejects all known forms) | UI: Clip > Speed/Duration, or change duration with `trim_clip` |
168
- | Apply Lumetri for the first time | ❌ `addVideoEffect` reports success but doesn't add component | Apply Lumetri manually once; afterwards all 28 setters work perfectly |
169
- | LUFS integrated measurement | ❌ Not scriptable | Export and measure with ffmpeg-loudnorm |
170
- | Native PP Speech-to-Text | ❌ Adobe AI STT not exposed | Use Whisper + `create_caption_track` (works great) |
171
- | Adobe Libraries MOGRT | ❌ Adobe Libraries not scriptable | Use local `.mogrt` files via `import_mogrt` |
172
- | Dynamic Link with AE | ❌ `import_ae_comps` not implemented | Render from AE and import as video |
173
- | Async export completion | ⚠️ AME runs async, no callback | Poll `get_render_queue_status` |
174
-
175
- ---
176
-
177
- ## Architecture
178
-
179
- ```
180
- ┌─────────────┐ ┌──────────────┐ ┌─────────────┐
181
- │ Claude │ │ Node.js │ │ Premiere │
182
- │ (or LLM) │◄───────►│ MCP server │◄───────►│ Pro CEP │
183
- └─────────────┘ stdio └──────────────┘ files │ plugin │
184
- │ (panel) │
185
- └─────────────┘
186
- │
187
- ▼
188
- ┌──────────────┐
189
- │ ExtendScript │
190
- │ DOM + QE │
191
- └──────────────┘
192
- ```
193
-
194
- The bridge automatically prepends locale-resilient helpers to every script:
195
-
196
- ```javascript
197
- __findIntrinsic(clip, "motion" | "opacity" | "volume" | "lumetri" | "timeRemap")
198
- // tries matchName ("AE.ADBE Motion") first — locale-INDEPENDENT —
199
- // then localized displayName ("Movimiento", "Bewegung", "Mouvement", etc.)
200
-
201
- __findProp(component, ["Position", "Posición", "Position", "Position"])
202
- // also descends one level into nested groups (needed for Lumetri's
203
- // grouped parameters like Exposure inside Basic Correction)
204
-
205
- __readMaybe(obj, "isMuted", false)
206
- // reads members that are property in some PP versions, method in others
207
-
208
- __findTransition(name, "video")
209
- // resolves transition names across locales:
210
- // "Cross Dissolve" matches "Disolvencia cruzada" / "Fondu enchaîné"
211
- ```
212
-
213
- ---
214
-
215
- ## Development
216
-
217
- ```bash
218
- npm run dev # Watch mode
219
- npm run build # Build dist/
220
- npx tsc --noEmit # Type-check only
221
- ```
222
-
223
- When adding a tool, prefer:
224
- - `__findIntrinsic` / `__findComponent` over hardcoded `displayName === "Motion"`
225
- - `__readMaybe` for any `isSomething()` / `isSomething` property
226
- - Pass `.ticks` strings (not Time objects) to `insertClip`/`setInPoint`/etc.
227
-
228
- ---
229
-
230
- ## Credits
231
-
232
- Built on top of work from
233
- [`AdobePremiereProMCP`](https://github.com/bdenney99/AdobePremiereProMCP)
234
- with extensive fixes for PP 2026 compatibility, locale resilience, and
235
- runtime-validated behavior. See [CHANGELOG.md](CHANGELOG.md) for the full
236
- fix log.
237
-
238
- ---
239
-
240
- ## License
241
-
242
- MIT
1
+ # Premiere Pro MCP
2
+
3
+ **Control Adobe Premiere Pro with natural language through Claude (or any MCP-compatible LLM).**
4
+
5
+ [![Premiere Pro 2026](https://img.shields.io/badge/Premiere%20Pro-2026-blueviolet)](https://www.adobe.com/products/premiere.html)
6
+ [![MCP](https://img.shields.io/badge/MCP-compatible-green)](https://modelcontextprotocol.io)
7
+ [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
8
+
9
+ ---
10
+
11
+ ## What it does
12
+
13
+ ```
14
+ You: "Apply a cinematic look to all clips on V1, ducking the music
15
+ when there's voice, and export to YouTube 1080p."
16
+
17
+ Claude: ✓ Applied Lumetri (-15K temperature, +10 contrast) to 4 clips
18
+ ✓ Added voiceover ducking on A2 (-12dB during A1 voice)
19
+ ✓ Queued H.264 1080p export to ~/Videos/final.mp4
20
+ ```
21
+
22
+ 437 tools exposed via MCP to drive Premiere Pro 2026 from any LLM agent.
23
+ Tested in runtime against PP 2026.2.2 on Spanish-localized Windows install.
24
+
25
+ ---
26
+
27
+ ## Highlights
28
+
29
+ - **Locale-resilient**: works on Premiere Pro in Spanish, German, French, etc.
30
+ (most competitors hardcode English component names and silently fail)
31
+ - **Honest errors**: when a Premiere host API genuinely doesn't expose
32
+ something (PP 2026 has known limitations), you get a clear error with
33
+ the recommended workaround — not a silent no-op
34
+ - **Battle-tested**: 137 tools validated in live runtime against PP 2026 with
35
+ detailed bug fixes (see [CHANGELOG.md](CHANGELOG.md))
36
+ - **AI-first**: built for LLM-driven workflows. Pair it with Whisper for
37
+ speech-to-text, ComfyUI for thumbnails, FFmpeg for analysis — chain MCPs
38
+
39
+ ---
40
+
41
+ ## Quick start
42
+
43
+ ### 1. Install the CEP plugin
44
+
45
+ Copy `cep-plugin/` to your Adobe CEP extensions folder:
46
+
47
+ - **Windows**: `%APPDATA%\Adobe\CEP\extensions\MCPBridgeCEP\`
48
+ - **macOS**: `~/Library/Application Support/Adobe/CEP/extensions/MCPBridgeCEP/`
49
+
50
+ Enable CEP debugging:
51
+ ```powershell
52
+ # Windows
53
+ reg add HKCU\Software\Adobe\CSXS.11 /v PlayerDebugMode /t REG_SZ /d 1 /f
54
+ ```
55
+
56
+ ### 2. Build the MCP server
57
+
58
+ ```bash
59
+ cd premiere-pro-mcp
60
+ npm install
61
+ npm run build
62
+ ```
63
+
64
+ ### 3. Register with Claude Desktop
65
+
66
+ Add to `%APPDATA%\Claude\claude_desktop_config.json`:
67
+
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "premiere-pro": {
72
+ "command": "node",
73
+ "args": ["C:/path/to/premiere-pro-mcp/dist/index.js"]
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ### 4. Open Premiere Pro
80
+
81
+ - Launch Premiere Pro 2026
82
+ - `Window > Extensions > MCPBridgeCEP` (the bridge panel)
83
+ - Click "Start Bridge"
84
+
85
+ ### 5. Talk to Claude
86
+
87
+ ```
88
+ "Show me the active sequence structure."
89
+ "Add a 1-second fade-in to the audio clip on A2."
90
+ "Apply Cross Dissolve at every cut on V1, 0.5 seconds each."
91
+ ```
92
+
93
+ ---
94
+
95
+ ## What works (validated runtime, PP 2026 es-ES)
96
+
97
+ ### Project & Inspection
98
+ - Full project / sequence / clip overviews
99
+ - Bins, markers, metadata (XMP), color labels
100
+ - Effect properties with all values, keyframes, source media details
101
+ - Find/search project items, list sequences
102
+
103
+ ### Timeline editing
104
+ - Add/remove/move/duplicate clips, split, trim
105
+ - Set in/out points, playhead, work area
106
+ - Selection by name/range/color, invert, deselect
107
+ - Enable/disable clips, link/unlink
108
+
109
+ ### Transform & Motion
110
+ - Position, scale, rotation, opacity (locale-resilient)
111
+ - Anchor point, blend mode
112
+ - Position/scale keyframes via `add_keyframe`
113
+
114
+ ### Color
115
+ - Lumetri full parameter control: exposure, contrast, highlights/shadows,
116
+ whites/blacks, temperature/tint, saturation, vibrance, sharpen, vignette,
117
+ faded film
118
+ - LUTs apply
119
+ - Copy/paste color grade across clips
120
+ - ⚠️ See limitations: applying Lumetri *for the first time* requires manual UI
121
+
122
+ ### Audio
123
+ - Per-clip volume, fade in/out (locale-resilient)
124
+ - Volume/panning keyframes
125
+ - Audio FX pipeline: Compressor, EQ, De-Esser, De-Hum, De-Reverb, Limiter,
126
+ Noise Reduction
127
+ - Voiceover ducking
128
+ - Normalize, detect clipping
129
+
130
+ ### Effects & Transitions
131
+ - 60+ video effects (Gaussian/Directional Blur, Sharpen, Warp Stabilizer,
132
+ Noise Reduction, Mirror, Spherize, Corner Pin, Lens Distortion, etc.)
133
+ - Transitions with locale-aware name lookup (Cross Dissolve works on any
134
+ language install)
135
+ - Batch apply across cuts
136
+
137
+ ### Captions
138
+ - Import SRT files as caption tracks
139
+ - Pipeline integration: Whisper-transcribe → SRT → MCP creates captions
140
+
141
+ ### Export
142
+ - Single sequence + batch export via Adobe Media Encoder
143
+ - Match Source presets, YouTube/Vimeo/Twitter/Facebook presets
144
+ - Encode arbitrary files via AME
145
+ - AAF, OMF, FCPXML export
146
+
147
+ ### Multicam
148
+ - Create multicam sequences, switch angles, flatten
149
+
150
+ ### Markers
151
+ - Add/update/delete on sequence or clip
152
+ - Color labels, comments, in/out range
153
+ - Import/export CSV
154
+
155
+ ---
156
+
157
+ ## Known limitations (PP 2026 host)
158
+
159
+ These are not bugs in this MCP — they're verified limitations of Premiere Pro
160
+ 2026's ExtendScript/QE-DOM surface. Each tool returns a clear actionable error
161
+ with the recommended workaround.
162
+
163
+ | Feature | Status | Workaround |
164
+ |---------|--------|------------|
165
+ | `capture_frame` programmatic | ❌ `qeSeq.exportFramePNG` reports success but never writes file | UI: File > Export > Media > Single Frame |
166
+ | `set_track_volume` | ❌ Audio track DOM no longer exposes `.components` or `.volume`; QE has no `setVolume` | Use `add_audio_keyframes` per-clip, or Audio Track Mixer |
167
+ | `speed_change` programmatic | ❌ `qeClip.setSpeed` signature changed in PP 2026 (rejects all known forms) | UI: Clip > Speed/Duration, or change duration with `trim_clip` |
168
+ | Apply Lumetri for the first time | ❌ `addVideoEffect` reports success but doesn't add component | Apply Lumetri manually once; afterwards all 28 setters work perfectly |
169
+ | LUFS integrated measurement | ❌ Not scriptable | Export and measure with ffmpeg-loudnorm |
170
+ | Native PP Speech-to-Text | ❌ Adobe AI STT not exposed | Use Whisper + `create_caption_track` (works great) |
171
+ | Adobe Libraries MOGRT | ❌ Adobe Libraries not scriptable | Use local `.mogrt` files via `import_mogrt` |
172
+ | Dynamic Link with AE | ❌ `import_ae_comps` not implemented | Render from AE and import as video |
173
+ | Async export completion | ⚠️ AME runs async, no callback | Poll `get_render_queue_status` |
174
+
175
+ ---
176
+
177
+ ## Architecture
178
+
179
+ ```
180
+ ┌─────────────┐ ┌──────────────┐ ┌─────────────┐
181
+ │ Claude │ │ Node.js │ │ Premiere │
182
+ │ (or LLM) │◄───────►│ MCP server │◄───────►│ Pro CEP │
183
+ └─────────────┘ stdio └──────────────┘ files │ plugin │
184
+ │ (panel) │
185
+ └─────────────┘
186
+ │
187
+ ▼
188
+ ┌──────────────┐
189
+ │ ExtendScript │
190
+ │ DOM + QE │
191
+ └──────────────┘
192
+ ```
193
+
194
+ The bridge automatically prepends locale-resilient helpers to every script:
195
+
196
+ ```javascript
197
+ __findIntrinsic(clip, "motion" | "opacity" | "volume" | "lumetri" | "timeRemap")
198
+ // tries matchName ("AE.ADBE Motion") first — locale-INDEPENDENT —
199
+ // then localized displayName ("Movimiento", "Bewegung", "Mouvement", etc.)
200
+
201
+ __findProp(component, ["Position", "Posición", "Position", "Position"])
202
+ // also descends one level into nested groups (needed for Lumetri's
203
+ // grouped parameters like Exposure inside Basic Correction)
204
+
205
+ __readMaybe(obj, "isMuted", false)
206
+ // reads members that are property in some PP versions, method in others
207
+
208
+ __findTransition(name, "video")
209
+ // resolves transition names across locales:
210
+ // "Cross Dissolve" matches "Disolvencia cruzada" / "Fondu enchaîné"
211
+ ```
212
+
213
+ ---
214
+
215
+ ## Development
216
+
217
+ ```bash
218
+ npm run dev # Watch mode
219
+ npm run build # Build dist/
220
+ npx tsc --noEmit # Type-check only
221
+ ```
222
+
223
+ When adding a tool, prefer:
224
+ - `__findIntrinsic` / `__findComponent` over hardcoded `displayName === "Motion"`
225
+ - `__readMaybe` for any `isSomething()` / `isSomething` property
226
+ - Pass `.ticks` strings (not Time objects) to `insertClip`/`setInPoint`/etc.
227
+
228
+ ---
229
+
230
+ ## Credits
231
+
232
+ Built on top of work from
233
+ [`AdobePremiereProMCP`](https://github.com/bdenney99/AdobePremiereProMCP)
234
+ with extensive fixes for PP 2026 compatibility, locale resilience, and
235
+ runtime-validated behavior. See [CHANGELOG.md](CHANGELOG.md) for the full
236
+ fix log.
237
+
238
+ ---
239
+
240
+ ## License
241
+
242
+ MIT
package/cep-plugin/.debug CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <ExtensionList>
3
- <Extension Id="com.mcp.premiere.bridge.panel">
4
- <HostList>
5
- <Host Name="PPRO" Port="8088"/>
6
- </HostList>
7
- </Extension>
8
- </ExtensionList>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ExtensionList>
3
+ <Extension Id="com.mcp.premiere.bridge.panel">
4
+ <HostList>
5
+ <Host Name="PPRO" Port="8088"/>
6
+ </HostList>
7
+ </Extension>
8
+ </ExtensionList>
@@ -1,70 +1,92 @@
1
- /**************************************************************************************************
2
- * ADOBE SYSTEMS INCORPORATED
3
- * Copyright 2013 Adobe Systems Incorporated
4
- * All Rights Reserved.
5
- *
6
- * NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
7
- * terms of the Adobe license agreement accompanying it. If you have received this file from a
8
- * source other than Adobe, then your use, modification, or distribution of it requires the prior
9
- * written permission of Adobe.
10
- *
11
- * CSInterface.js - v12.0.0 (minimal shim for MCP Bridge)
12
- * Download the full version from: https://github.com/nicscott9/CSInterface
13
- **************************************************************************************************/
14
-
15
- /**
16
- * CSInterface class for Adobe CEP extensions.
17
- * This is a minimal implementation. For production use, download the full
18
- * CSInterface.js from Adobe's GitHub repository.
19
- */
20
- function CSInterface() {}
21
-
22
- /**
23
- * Evaluates an ExtendScript in the host application.
24
- * @param {string} script - The ExtendScript to evaluate.
25
- * @param {function} callback - Callback with the result string.
26
- */
27
- CSInterface.prototype.evalScript = function (script, callback) {
28
- if (typeof __adobe_cep__ !== "undefined") {
29
- // CEP 9+ requires the callback to be passed directly to __adobe_cep__.evalScript.
30
- // Calling it without a callback causes the result to be silently discarded,
31
- // making every command return null/undefined.
32
- __adobe_cep__.evalScript(script, callback || function () {});
33
- } else {
34
- // Running outside CEP (for testing)
35
- console.warn("[CSInterface] Not running in CEP environment");
36
- if (callback) callback("EvalScript Error: Not in CEP environment");
37
- }
38
- };
39
-
40
- /**
41
- * Get the host environment.
42
- */
43
- CSInterface.prototype.getHostEnvironment = function () {
44
- if (typeof __adobe_cep__ !== "undefined") {
45
- try {
46
- return JSON.parse(__adobe_cep__.getHostEnvironment());
47
- } catch (e) {
48
- return null;
49
- }
50
- }
51
- return null;
52
- };
53
-
54
- /**
55
- * Get the system path.
56
- * @param {string} pathType - The path type constant.
57
- */
58
- CSInterface.prototype.getSystemPath = function (pathType) {
59
- if (typeof __adobe_cep__ !== "undefined") {
60
- return __adobe_cep__.getSystemPath(pathType);
61
- }
62
- return "";
63
- };
64
-
65
- // System path constants
66
- CSInterface.prototype.EXTENSION_ID = "extensionId";
67
-
68
- // Note: This is a minimal shim. For the full CSInterface.js, download from:
69
- // https://github.com/nicscott9/CSInterface
70
- // and replace this file with the appropriate version for your CEP target.
1
+ /**************************************************************************************************
2
+ * ADOBE SYSTEMS INCORPORATED
3
+ * Copyright 2013 Adobe Systems Incorporated
4
+ * All Rights Reserved.
5
+ *
6
+ * NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
7
+ * terms of the Adobe license agreement accompanying it. If you have received this file from a
8
+ * source other than Adobe, then your use, modification, or distribution of it requires the prior
9
+ * written permission of Adobe.
10
+ *
11
+ * CSInterface.js - v12.0.0 (minimal shim for MCP Bridge)
12
+ * Download the full version from: https://github.com/nicscott9/CSInterface
13
+ **************************************************************************************************/
14
+
15
+ /**
16
+ * CSInterface class for Adobe CEP extensions.
17
+ * This is a minimal implementation. For production use, download the full
18
+ * CSInterface.js from Adobe's GitHub repository.
19
+ */
20
+ function CSInterface() {}
21
+
22
+ /**
23
+ * Evaluates an ExtendScript in the host application.
24
+ * @param {string} script - The ExtendScript to evaluate.
25
+ * @param {function} callback - Callback with the result string.
26
+ */
27
+ CSInterface.prototype.evalScript = function (script, callback) {
28
+ if (typeof __adobe_cep__ !== "undefined") {
29
+ // CEP 9+ requires the callback to be passed directly to __adobe_cep__.evalScript.
30
+ // Calling it without a callback causes the result to be silently discarded,
31
+ // making every command return null/undefined.
32
+ __adobe_cep__.evalScript(script, callback || function () {});
33
+ } else {
34
+ // Running outside CEP (for testing)
35
+ console.warn("[CSInterface] Not running in CEP environment");
36
+ if (callback) callback("EvalScript Error: Not in CEP environment");
37
+ }
38
+ };
39
+
40
+ /**
41
+ * Get the host environment.
42
+ */
43
+ CSInterface.prototype.getHostEnvironment = function () {
44
+ if (typeof __adobe_cep__ !== "undefined") {
45
+ try {
46
+ return JSON.parse(__adobe_cep__.getHostEnvironment());
47
+ } catch (e) {
48
+ return null;
49
+ }
50
+ }
51
+ return null;
52
+ };
53
+
54
+ /**
55
+ * Get the system path.
56
+ * @param {string} pathType - The path type constant.
57
+ */
58
+ CSInterface.prototype.getSystemPath = function (pathType) {
59
+ if (typeof __adobe_cep__ !== "undefined") {
60
+ return __adobe_cep__.getSystemPath(pathType);
61
+ }
62
+ return "";
63
+ };
64
+
65
+ // System path constants
66
+ CSInterface.prototype.EXTENSION_ID = "extensionId";
67
+
68
+ /** SystemPath constants — main.js reads these as SystemPath.EXTENSION, but
69
+ * this shim never declared the global. Older CEP hosts happened to inject
70
+ * a SystemPath global on their own, so cs.getSystemPath(SystemPath.EXTENSION)
71
+ * worked by accident; hosts that stop doing that throw "SystemPath is not
72
+ * defined" and halt init() before premiere.jsx loads or license/update code
73
+ * runs. Same bug class already hit and fixed in the sibling AE MCP panel
74
+ * (cep-plugin/CSInterface.js, v2.4.2). Values match Adobe's canonical
75
+ * CSInterface.js — must be strings, not indexes: the native
76
+ * __adobe_cep__.getSystemPath() doesn't throw on an unrecognized pathType,
77
+ * it silently returns the literal string "invalidParam", which then fails
78
+ * downstream in a confusing way (e.g. fs.mkdirSync() trying to create a
79
+ * folder actually named "invalidParam"). */
80
+ var SystemPath = {
81
+ USER_DATA: "userData",
82
+ COMMON_FILES: "commonFiles",
83
+ MY_DOCUMENTS: "myDocuments",
84
+ APPLICATION: "application",
85
+ EXTENSION: "extension",
86
+ EXTENSION_DATA: "extensionData",
87
+ HOST_APPLICATION: "hostApplication"
88
+ };
89
+
90
+ // Note: This is a minimal shim. For the full CSInterface.js, download from:
91
+ // https://github.com/nicscott9/CSInterface
92
+ // and replace this file with the appropriate version for your CEP target.