@synthetic-ai/premiere-mcp 2.1.0 → 2.3.0-dev.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 (58) hide show
  1. package/CHANGELOG.md +135 -123
  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 -92
  6. package/cep-plugin/host.jsx +7 -7
  7. package/cep-plugin/index.html +472 -472
  8. package/cep-plugin/main.js +6 -0
  9. package/cep-plugin/premiere.jsx +24947 -24947
  10. package/dist/bridge/script-builder.js +378 -378
  11. package/dist/index.js +103 -4
  12. package/dist/license.js +38 -0
  13. package/dist/server.js +60 -60
  14. package/dist/tools/advanced.js +357 -357
  15. package/dist/tools/audio-advanced.js +1049 -1049
  16. package/dist/tools/audio.js +42 -42
  17. package/dist/tools/captions.js +27 -27
  18. package/dist/tools/clipboard.js +214 -214
  19. package/dist/tools/color-advanced.js +253 -253
  20. package/dist/tools/discovery.js +291 -291
  21. package/dist/tools/effects.js +285 -285
  22. package/dist/tools/export-presets.js +206 -206
  23. package/dist/tools/export.js +255 -255
  24. package/dist/tools/health.js +10 -10
  25. package/dist/tools/inspection.js +885 -885
  26. package/dist/tools/keyframes.js +369 -369
  27. package/dist/tools/markers.js +89 -89
  28. package/dist/tools/media.js +178 -178
  29. package/dist/tools/metadata.js +94 -94
  30. package/dist/tools/multicam.js +50 -50
  31. package/dist/tools/playback.js +15 -15
  32. package/dist/tools/playhead.js +95 -95
  33. package/dist/tools/project-manager.js +21 -21
  34. package/dist/tools/project.js +149 -149
  35. package/dist/tools/scripting.js +319 -319
  36. package/dist/tools/selection.js +202 -202
  37. package/dist/tools/sequence-advanced.js +379 -379
  38. package/dist/tools/sequence-settings.js +564 -564
  39. package/dist/tools/sequence.js +167 -167
  40. package/dist/tools/source-monitor.js +68 -68
  41. package/dist/tools/text.js +58 -58
  42. package/dist/tools/timeline.js +312 -312
  43. package/dist/tools/track-management.js +446 -446
  44. package/dist/tools/track-targeting.js +635 -635
  45. package/dist/tools/tracks.js +87 -87
  46. package/dist/tools/transitions-motion.js +174 -174
  47. package/dist/tools/transitions.js +111 -111
  48. package/dist/tools/utility.js +606 -606
  49. package/dist/tools/workspace.js +29 -29
  50. package/package.json +66 -66
  51. package/scripts/build-chat-dmg.sh +210 -210
  52. package/scripts/build-chat-zip.sh +291 -291
  53. package/scripts/install-cep-windows.ps1 +99 -99
  54. package/scripts/install-cep.sh +66 -66
  55. package/scripts/install-chat-plugin.bat +67 -67
  56. package/scripts/install-chat-plugin.sh +85 -85
  57. package/scripts/install-windows.bat +95 -95
  58. package/scripts/package.mjs +254 -254
@@ -22,41 +22,41 @@ export function getTrackTools(bridgeOptions) {
22
22
  handler: async (args) => {
23
23
  const count = args.count ?? 1;
24
24
  const isVideo = args.track_type === "video";
25
- const script = buildToolScript(`
26
- var seq = app.project.activeSequence;
27
- if (!seq) return __error("No active sequence");
28
-
29
- // PP 2026: neither seq.addTrack(), seq.insertVideoTrackAt(), nor
30
- // qe.getActiveSequence().addVideoTrack() are available via ExtendScript.
31
- // The only way to add tracks in PP 2026 is via the UI or by creating a
32
- // new sequence with the desired track count.
33
- // We attempt both known approaches and report the result.
34
- app.enableQE();
35
- var beforeCount = ${isVideo ? "seq.videoTracks.numTracks" : "seq.audioTracks.numTracks"};
36
- var added = false;
37
-
38
- // Attempt 1: seq.addTrack() (pre-PP2026 API)
39
- try { if (seq.addTrack) { for (var i = 0; i < ${count}; i++) seq.addTrack("${args.track_type}"${!isVideo ? ", 1" : ""}); added = true; } } catch(e) {}
40
-
41
- // Attempt 2: QE DOM addVideoTrack/addAudioTrack
42
- if (!added) {
43
- try {
44
- var qs = qe.project.getActiveSequence();
45
- if (qs) {
46
- for (var j = 0; j < ${count}; j++) {
47
- ${isVideo ? "qs.addVideoTrack();" : "qs.addAudioTrack(0);"}
48
- }
49
- added = true;
50
- }
51
- } catch(e2) {}
52
- }
53
-
54
- var afterCount = ${isVideo ? "seq.videoTracks.numTracks" : "seq.audioTracks.numTracks"};
55
- var actualAdded = afterCount - beforeCount;
56
- if (actualAdded === 0) {
57
- return __error("Adding ${args.track_type} tracks is not supported via ExtendScript in PP 2026. Use Sequence > Add Tracks in the UI, or create a new sequence with the needed track count.");
58
- }
59
- return __result({ added: actualAdded, trackType: "${args.track_type}", totalTracks: afterCount });
25
+ const script = buildToolScript(`
26
+ var seq = app.project.activeSequence;
27
+ if (!seq) return __error("No active sequence");
28
+
29
+ // PP 2026: neither seq.addTrack(), seq.insertVideoTrackAt(), nor
30
+ // qe.getActiveSequence().addVideoTrack() are available via ExtendScript.
31
+ // The only way to add tracks in PP 2026 is via the UI or by creating a
32
+ // new sequence with the desired track count.
33
+ // We attempt both known approaches and report the result.
34
+ app.enableQE();
35
+ var beforeCount = ${isVideo ? "seq.videoTracks.numTracks" : "seq.audioTracks.numTracks"};
36
+ var added = false;
37
+
38
+ // Attempt 1: seq.addTrack() (pre-PP2026 API)
39
+ try { if (seq.addTrack) { for (var i = 0; i < ${count}; i++) seq.addTrack("${args.track_type}"${!isVideo ? ", 1" : ""}); added = true; } } catch(e) {}
40
+
41
+ // Attempt 2: QE DOM addVideoTrack/addAudioTrack
42
+ if (!added) {
43
+ try {
44
+ var qs = qe.project.getActiveSequence();
45
+ if (qs) {
46
+ for (var j = 0; j < ${count}; j++) {
47
+ ${isVideo ? "qs.addVideoTrack();" : "qs.addAudioTrack(0);"}
48
+ }
49
+ added = true;
50
+ }
51
+ } catch(e2) {}
52
+ }
53
+
54
+ var afterCount = ${isVideo ? "seq.videoTracks.numTracks" : "seq.audioTracks.numTracks"};
55
+ var actualAdded = afterCount - beforeCount;
56
+ if (actualAdded === 0) {
57
+ return __error("Adding ${args.track_type} tracks is not supported via ExtendScript in PP 2026. Use Sequence > Add Tracks in the UI, or create a new sequence with the needed track count.");
58
+ }
59
+ return __result({ added: actualAdded, trackType: "${args.track_type}", totalTracks: afterCount });
60
60
  `);
61
61
  return sendCommand(script, bridgeOptions);
62
62
  },
@@ -80,38 +80,38 @@ export function getTrackTools(bridgeOptions) {
80
80
  },
81
81
  handler: async (args) => {
82
82
  const isVideo = args.track_type === "video";
83
- const script = buildToolScript(`
84
- var seq = app.project.activeSequence;
85
- if (!seq) return __error("No active sequence");
86
-
87
- var numTracks = ${isVideo ? "seq.videoTracks.numTracks" : "seq.audioTracks.numTracks"};
88
- if (${args.track_index} >= numTracks) return __error("Track index out of range: " + ${args.track_index} + " >= " + numTracks);
89
-
90
- // PP 2026: seq.deleteVideoTrackAt/deleteAudioTrackAt do NOT exist.
91
- // Use QE DOM: qe.project.getActiveSequence().removeVideoTrack() / removeAudioTrack()
92
- // QE DOM may be unavailable/unstable across PP versions, so guard everything.
93
- try {
94
- app.enableQE();
95
- } catch (eEnable) {
96
- return __error("Track deletion is not supported via ExtendScript in this Premiere Pro version (QE DOM unavailable: " + eEnable.toString() + "). Please delete the track manually in the Premiere Pro UI.");
97
- }
98
-
99
- var qs = null;
100
- try {
101
- qs = qe.project.getActiveSequence();
102
- } catch (eGet) {
103
- qs = null;
104
- }
105
- if (!qs) return __error("Track deletion is not supported via ExtendScript in this Premiere Pro version (QE sequence not found). Please delete the track manually in the Premiere Pro UI.");
106
-
107
- try {
108
- ${isVideo ? `qs.removeVideoTrack(${args.track_index});` : `qs.removeAudioTrack(${args.track_index});`}
109
- } catch (eRemove) {
110
- return __error("Track deletion failed via ExtendScript in this Premiere Pro version (QE remove" + ("${args.track_type}" === "video" ? "Video" : "Audio") + "Track threw: " + eRemove.toString() + "). Tracks cannot be reliably deleted via ExtendScript here — please delete the track manually in the Premiere Pro UI.");
111
- }
112
-
113
- var newCount = ${isVideo ? "seq.videoTracks.numTracks" : "seq.audioTracks.numTracks"};
114
- return __result({ deleted: true, trackType: "${args.track_type}", trackIndex: ${args.track_index}, trackCount: newCount });
83
+ const script = buildToolScript(`
84
+ var seq = app.project.activeSequence;
85
+ if (!seq) return __error("No active sequence");
86
+
87
+ var numTracks = ${isVideo ? "seq.videoTracks.numTracks" : "seq.audioTracks.numTracks"};
88
+ if (${args.track_index} >= numTracks) return __error("Track index out of range: " + ${args.track_index} + " >= " + numTracks);
89
+
90
+ // PP 2026: seq.deleteVideoTrackAt/deleteAudioTrackAt do NOT exist.
91
+ // Use QE DOM: qe.project.getActiveSequence().removeVideoTrack() / removeAudioTrack()
92
+ // QE DOM may be unavailable/unstable across PP versions, so guard everything.
93
+ try {
94
+ app.enableQE();
95
+ } catch (eEnable) {
96
+ return __error("Track deletion is not supported via ExtendScript in this Premiere Pro version (QE DOM unavailable: " + eEnable.toString() + "). Please delete the track manually in the Premiere Pro UI.");
97
+ }
98
+
99
+ var qs = null;
100
+ try {
101
+ qs = qe.project.getActiveSequence();
102
+ } catch (eGet) {
103
+ qs = null;
104
+ }
105
+ if (!qs) return __error("Track deletion is not supported via ExtendScript in this Premiere Pro version (QE sequence not found). Please delete the track manually in the Premiere Pro UI.");
106
+
107
+ try {
108
+ ${isVideo ? `qs.removeVideoTrack(${args.track_index});` : `qs.removeAudioTrack(${args.track_index});`}
109
+ } catch (eRemove) {
110
+ return __error("Track deletion failed via ExtendScript in this Premiere Pro version (QE remove" + ("${args.track_type}" === "video" ? "Video" : "Audio") + "Track threw: " + eRemove.toString() + "). Tracks cannot be reliably deleted via ExtendScript here — please delete the track manually in the Premiere Pro UI.");
111
+ }
112
+
113
+ var newCount = ${isVideo ? "seq.videoTracks.numTracks" : "seq.audioTracks.numTracks"};
114
+ return __result({ deleted: true, trackType: "${args.track_type}", trackIndex: ${args.track_index}, trackCount: newCount });
115
115
  `);
116
116
  return sendCommand(script, bridgeOptions);
117
117
  },
@@ -133,16 +133,16 @@ export function getTrackTools(bridgeOptions) {
133
133
  required: ["track_index", "locked"],
134
134
  },
135
135
  handler: async (args) => {
136
- const script = buildToolScript(`
137
- var seq = app.project.activeSequence;
138
- if (!seq) return __error("No active sequence");
139
-
140
- if (${args.track_index} >= seq.videoTracks.numTracks) return __error("Track index out of range");
141
-
142
- var track = seq.videoTracks[${args.track_index}];
143
- track.setLocked(${args.locked ? 1 : 0});
144
-
145
- return __result({ trackIndex: ${args.track_index}, locked: ${args.locked}, trackName: track.name });
136
+ const script = buildToolScript(`
137
+ var seq = app.project.activeSequence;
138
+ if (!seq) return __error("No active sequence");
139
+
140
+ if (${args.track_index} >= seq.videoTracks.numTracks) return __error("Track index out of range");
141
+
142
+ var track = seq.videoTracks[${args.track_index}];
143
+ track.setLocked(${args.locked ? 1 : 0});
144
+
145
+ return __result({ trackIndex: ${args.track_index}, locked: ${args.locked}, trackName: track.name });
146
146
  `);
147
147
  return sendCommand(script, bridgeOptions);
148
148
  },
@@ -164,16 +164,16 @@ export function getTrackTools(bridgeOptions) {
164
164
  required: ["track_index", "visible"],
165
165
  },
166
166
  handler: async (args) => {
167
- const script = buildToolScript(`
168
- var seq = app.project.activeSequence;
169
- if (!seq) return __error("No active sequence");
170
-
171
- if (${args.track_index} >= seq.videoTracks.numTracks) return __error("Track index out of range");
172
-
173
- var track = seq.videoTracks[${args.track_index}];
174
- track.setMute(${args.visible ? 0 : 1});
175
-
176
- return __result({ trackIndex: ${args.track_index}, visible: ${args.visible}, trackName: track.name });
167
+ const script = buildToolScript(`
168
+ var seq = app.project.activeSequence;
169
+ if (!seq) return __error("No active sequence");
170
+
171
+ if (${args.track_index} >= seq.videoTracks.numTracks) return __error("Track index out of range");
172
+
173
+ var track = seq.videoTracks[${args.track_index}];
174
+ track.setMute(${args.visible ? 0 : 1});
175
+
176
+ return __result({ trackIndex: ${args.track_index}, visible: ${args.visible}, trackName: track.name });
177
177
  `);
178
178
  return sendCommand(script, bridgeOptions);
179
179
  },