@synthetic-ai/premiere-mcp 2.2.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.
- package/CHANGELOG.md +135 -135
- package/LICENSE +21 -21
- package/README.md +242 -242
- package/cep-plugin/.debug +8 -8
- package/cep-plugin/CSInterface.js +92 -92
- package/cep-plugin/host.jsx +7 -7
- package/cep-plugin/index.html +472 -472
- package/cep-plugin/main.js +6 -0
- package/cep-plugin/premiere.jsx +24947 -24947
- package/dist/bridge/script-builder.js +378 -378
- package/dist/license.js +38 -0
- package/dist/server.js +60 -60
- package/dist/tools/advanced.js +357 -357
- package/dist/tools/audio-advanced.js +1049 -1049
- package/dist/tools/audio.js +42 -42
- package/dist/tools/captions.js +27 -27
- package/dist/tools/clipboard.js +214 -214
- package/dist/tools/color-advanced.js +253 -253
- package/dist/tools/discovery.js +291 -291
- package/dist/tools/effects.js +285 -285
- package/dist/tools/export-presets.js +206 -206
- package/dist/tools/export.js +255 -255
- package/dist/tools/health.js +10 -10
- package/dist/tools/inspection.js +885 -885
- package/dist/tools/keyframes.js +369 -369
- package/dist/tools/markers.js +89 -89
- package/dist/tools/media.js +178 -178
- package/dist/tools/metadata.js +94 -94
- package/dist/tools/multicam.js +50 -50
- package/dist/tools/playback.js +15 -15
- package/dist/tools/playhead.js +95 -95
- package/dist/tools/project-manager.js +21 -21
- package/dist/tools/project.js +149 -149
- package/dist/tools/scripting.js +319 -319
- package/dist/tools/selection.js +202 -202
- package/dist/tools/sequence-advanced.js +379 -379
- package/dist/tools/sequence-settings.js +564 -564
- package/dist/tools/sequence.js +167 -167
- package/dist/tools/source-monitor.js +68 -68
- package/dist/tools/text.js +58 -58
- package/dist/tools/timeline.js +312 -312
- package/dist/tools/track-management.js +446 -446
- package/dist/tools/track-targeting.js +635 -635
- package/dist/tools/tracks.js +87 -87
- package/dist/tools/transitions-motion.js +174 -174
- package/dist/tools/transitions.js +111 -111
- package/dist/tools/utility.js +606 -606
- package/dist/tools/workspace.js +29 -29
- package/package.json +66 -66
- package/scripts/build-chat-dmg.sh +210 -210
- package/scripts/build-chat-zip.sh +291 -291
- package/scripts/install-cep-windows.ps1 +99 -99
- package/scripts/install-cep.sh +66 -66
- package/scripts/install-chat-plugin.bat +67 -67
- package/scripts/install-chat-plugin.sh +85 -85
- package/scripts/install-windows.bat +95 -95
- package/scripts/package.mjs +254 -254
|
@@ -28,48 +28,48 @@ export function getTransitionsTools(bridgeOptions) {
|
|
|
28
28
|
},
|
|
29
29
|
handler: async (args) => {
|
|
30
30
|
const duration = args.duration_seconds ?? 1.0;
|
|
31
|
-
const script = buildToolScript(`
|
|
32
|
-
app.enableQE();
|
|
33
|
-
var qeSeq = qe.project.getActiveSequence();
|
|
34
|
-
if (!qeSeq) return __error("No active sequence (QE)");
|
|
35
|
-
|
|
36
|
-
var qeTrack = qeSeq.getVideoTrackAt(${args.track_index});
|
|
37
|
-
if (!qeTrack) return __error("Track not found");
|
|
38
|
-
|
|
39
|
-
var transitionName = "${escapeForExtendScript(args.transition_name)}";
|
|
40
|
-
var transitionQE = __findTransition(transitionName, "video");
|
|
41
|
-
if (!transitionQE) return __error("Transition not found: " + transitionName + " (tried English name and localized aliases)");
|
|
42
|
-
|
|
43
|
-
// Resolve the cut point to a clip index on the DOM track. addTransition is a
|
|
44
|
-
// method of the QE CLIP (getItemAt), NOT the QE track. The clip determines the
|
|
45
|
-
// position, so there is no cut-position argument; duration is a SECONDS string.
|
|
46
|
-
var domSeq = app.project.activeSequence;
|
|
47
|
-
if (!domSeq) return __error("No active sequence");
|
|
48
|
-
var domTrack = domSeq.videoTracks[${args.track_index}];
|
|
49
|
-
if (!domTrack) return __error("DOM video track not found at index ${args.track_index}");
|
|
50
|
-
var cutSec = ${args.cut_point_seconds};
|
|
51
|
-
var clipIdx = -1;
|
|
52
|
-
var bestDiff = null;
|
|
53
|
-
for (var c = 0; c < domTrack.clips.numItems; c++) {
|
|
54
|
-
var endSec = __ticksToSeconds(domTrack.clips[c].end.ticks);
|
|
55
|
-
var startSec = __ticksToSeconds(domTrack.clips[c].start.ticks);
|
|
56
|
-
var d = Math.min(Math.abs(endSec - cutSec), Math.abs(startSec - cutSec));
|
|
57
|
-
if (bestDiff === null || d < bestDiff) { bestDiff = d; clipIdx = c; }
|
|
58
|
-
}
|
|
59
|
-
if (clipIdx < 0) return __error("No clip found near cut point " + cutSec + "s");
|
|
60
|
-
|
|
61
|
-
var qeClip = qeTrack.getItemAt(clipIdx);
|
|
62
|
-
if (!qeClip) return __error("QE clip not found at index " + clipIdx);
|
|
63
|
-
qeClip.addTransition(transitionQE, true, String(${duration}));
|
|
64
|
-
|
|
65
|
-
return __result({
|
|
66
|
-
added: true,
|
|
67
|
-
transition: transitionName,
|
|
68
|
-
trackIndex: ${args.track_index},
|
|
69
|
-
clipIndex: clipIdx,
|
|
70
|
-
atSeconds: ${args.cut_point_seconds},
|
|
71
|
-
durationSeconds: ${duration}
|
|
72
|
-
});
|
|
31
|
+
const script = buildToolScript(`
|
|
32
|
+
app.enableQE();
|
|
33
|
+
var qeSeq = qe.project.getActiveSequence();
|
|
34
|
+
if (!qeSeq) return __error("No active sequence (QE)");
|
|
35
|
+
|
|
36
|
+
var qeTrack = qeSeq.getVideoTrackAt(${args.track_index});
|
|
37
|
+
if (!qeTrack) return __error("Track not found");
|
|
38
|
+
|
|
39
|
+
var transitionName = "${escapeForExtendScript(args.transition_name)}";
|
|
40
|
+
var transitionQE = __findTransition(transitionName, "video");
|
|
41
|
+
if (!transitionQE) return __error("Transition not found: " + transitionName + " (tried English name and localized aliases)");
|
|
42
|
+
|
|
43
|
+
// Resolve the cut point to a clip index on the DOM track. addTransition is a
|
|
44
|
+
// method of the QE CLIP (getItemAt), NOT the QE track. The clip determines the
|
|
45
|
+
// position, so there is no cut-position argument; duration is a SECONDS string.
|
|
46
|
+
var domSeq = app.project.activeSequence;
|
|
47
|
+
if (!domSeq) return __error("No active sequence");
|
|
48
|
+
var domTrack = domSeq.videoTracks[${args.track_index}];
|
|
49
|
+
if (!domTrack) return __error("DOM video track not found at index ${args.track_index}");
|
|
50
|
+
var cutSec = ${args.cut_point_seconds};
|
|
51
|
+
var clipIdx = -1;
|
|
52
|
+
var bestDiff = null;
|
|
53
|
+
for (var c = 0; c < domTrack.clips.numItems; c++) {
|
|
54
|
+
var endSec = __ticksToSeconds(domTrack.clips[c].end.ticks);
|
|
55
|
+
var startSec = __ticksToSeconds(domTrack.clips[c].start.ticks);
|
|
56
|
+
var d = Math.min(Math.abs(endSec - cutSec), Math.abs(startSec - cutSec));
|
|
57
|
+
if (bestDiff === null || d < bestDiff) { bestDiff = d; clipIdx = c; }
|
|
58
|
+
}
|
|
59
|
+
if (clipIdx < 0) return __error("No clip found near cut point " + cutSec + "s");
|
|
60
|
+
|
|
61
|
+
var qeClip = qeTrack.getItemAt(clipIdx);
|
|
62
|
+
if (!qeClip) return __error("QE clip not found at index " + clipIdx);
|
|
63
|
+
qeClip.addTransition(transitionQE, true, String(${duration}));
|
|
64
|
+
|
|
65
|
+
return __result({
|
|
66
|
+
added: true,
|
|
67
|
+
transition: transitionName,
|
|
68
|
+
trackIndex: ${args.track_index},
|
|
69
|
+
clipIndex: clipIdx,
|
|
70
|
+
atSeconds: ${args.cut_point_seconds},
|
|
71
|
+
durationSeconds: ${duration}
|
|
72
|
+
});
|
|
73
73
|
`);
|
|
74
74
|
return sendCommand(script, bridgeOptions);
|
|
75
75
|
},
|
|
@@ -102,41 +102,41 @@ export function getTransitionsTools(bridgeOptions) {
|
|
|
102
102
|
handler: async (args) => {
|
|
103
103
|
const position = args.position || "end";
|
|
104
104
|
const duration = args.duration_seconds ?? 1.0;
|
|
105
|
-
const script = buildToolScript(`
|
|
106
|
-
app.enableQE();
|
|
107
|
-
var qeSeq = qe.project.getActiveSequence();
|
|
108
|
-
if (!qeSeq) return __error("No active sequence (QE)");
|
|
109
|
-
|
|
110
|
-
var result = __findClip("${escapeForExtendScript(args.node_id)}");
|
|
111
|
-
if (!result) return __error("Clip not found");
|
|
112
|
-
|
|
113
|
-
var transitionName = "${escapeForExtendScript(args.transition_name)}";
|
|
114
|
-
var transitionQE = __findTransition(transitionName, "video");
|
|
115
|
-
if (!transitionQE) return __error("Transition not found: " + transitionName + " (tried English name and localized aliases)");
|
|
116
|
-
|
|
117
|
-
var qeTrack = qeSeq.getVideoTrackAt(result.trackIndex);
|
|
118
|
-
var clip = result.clip;
|
|
119
|
-
var transitionPosition = "${position}";
|
|
120
|
-
|
|
121
|
-
// addTransition is a QE CLIP method. forceSingle/applyToEnd boolean selects
|
|
122
|
-
// head (false) vs tail (true); duration is a SECONDS string. No position arg.
|
|
123
|
-
var qeClip = qeTrack.getItemAt(result.clipIndex);
|
|
124
|
-
if (!qeClip) return __error("QE clip not found at index " + result.clipIndex);
|
|
125
|
-
|
|
126
|
-
if (transitionPosition === "start" || transitionPosition === "both") {
|
|
127
|
-
qeClip.addTransition(transitionQE, false, String(${duration}));
|
|
128
|
-
}
|
|
129
|
-
if (transitionPosition === "end" || transitionPosition === "both") {
|
|
130
|
-
qeClip.addTransition(transitionQE, true, String(${duration}));
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return __result({
|
|
134
|
-
added: true,
|
|
135
|
-
transition: transitionName,
|
|
136
|
-
clipName: clip.name,
|
|
137
|
-
position: transitionPosition,
|
|
138
|
-
durationSeconds: ${duration}
|
|
139
|
-
});
|
|
105
|
+
const script = buildToolScript(`
|
|
106
|
+
app.enableQE();
|
|
107
|
+
var qeSeq = qe.project.getActiveSequence();
|
|
108
|
+
if (!qeSeq) return __error("No active sequence (QE)");
|
|
109
|
+
|
|
110
|
+
var result = __findClip("${escapeForExtendScript(args.node_id)}");
|
|
111
|
+
if (!result) return __error("Clip not found");
|
|
112
|
+
|
|
113
|
+
var transitionName = "${escapeForExtendScript(args.transition_name)}";
|
|
114
|
+
var transitionQE = __findTransition(transitionName, "video");
|
|
115
|
+
if (!transitionQE) return __error("Transition not found: " + transitionName + " (tried English name and localized aliases)");
|
|
116
|
+
|
|
117
|
+
var qeTrack = qeSeq.getVideoTrackAt(result.trackIndex);
|
|
118
|
+
var clip = result.clip;
|
|
119
|
+
var transitionPosition = "${position}";
|
|
120
|
+
|
|
121
|
+
// addTransition is a QE CLIP method. forceSingle/applyToEnd boolean selects
|
|
122
|
+
// head (false) vs tail (true); duration is a SECONDS string. No position arg.
|
|
123
|
+
var qeClip = qeTrack.getItemAt(result.clipIndex);
|
|
124
|
+
if (!qeClip) return __error("QE clip not found at index " + result.clipIndex);
|
|
125
|
+
|
|
126
|
+
if (transitionPosition === "start" || transitionPosition === "both") {
|
|
127
|
+
qeClip.addTransition(transitionQE, false, String(${duration}));
|
|
128
|
+
}
|
|
129
|
+
if (transitionPosition === "end" || transitionPosition === "both") {
|
|
130
|
+
qeClip.addTransition(transitionQE, true, String(${duration}));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return __result({
|
|
134
|
+
added: true,
|
|
135
|
+
transition: transitionName,
|
|
136
|
+
clipName: clip.name,
|
|
137
|
+
position: transitionPosition,
|
|
138
|
+
durationSeconds: ${duration}
|
|
139
|
+
});
|
|
140
140
|
`);
|
|
141
141
|
return sendCommand(script, bridgeOptions);
|
|
142
142
|
},
|
|
@@ -164,40 +164,40 @@ export function getTransitionsTools(bridgeOptions) {
|
|
|
164
164
|
handler: async (args) => {
|
|
165
165
|
const trackIndex = args.track_index ?? 0;
|
|
166
166
|
const duration = args.duration_seconds ?? 1.0;
|
|
167
|
-
const script = buildToolScript(`
|
|
168
|
-
app.enableQE();
|
|
169
|
-
var qeSeq = qe.project.getActiveSequence();
|
|
170
|
-
if (!qeSeq) return __error("No active sequence (QE)");
|
|
171
|
-
|
|
172
|
-
var seq = app.project.activeSequence;
|
|
173
|
-
if (!seq) return __error("No active sequence");
|
|
174
|
-
|
|
175
|
-
var transitionName = "${escapeForExtendScript(args.transition_name)}";
|
|
176
|
-
var transitionQE = __findTransition(transitionName, "video");
|
|
177
|
-
if (!transitionQE) return __error("Transition not found: " + transitionName + " (tried English name and localized aliases)");
|
|
178
|
-
|
|
179
|
-
var track = seq.videoTracks[${trackIndex}];
|
|
180
|
-
var qeTrack = qeSeq.getVideoTrackAt(${trackIndex});
|
|
181
|
-
var count = 0;
|
|
182
|
-
|
|
183
|
-
// addTransition is a QE CLIP method (getItemAt), not a track method. Apply to
|
|
184
|
-
// the tail of each clip except the last; duration is a SECONDS string.
|
|
185
|
-
for (var c = 0; c < track.clips.numItems - 1; c++) {
|
|
186
|
-
try {
|
|
187
|
-
var qeClip = qeTrack.getItemAt(c);
|
|
188
|
-
if (qeClip) {
|
|
189
|
-
qeClip.addTransition(transitionQE, true, String(${duration}));
|
|
190
|
-
count++;
|
|
191
|
-
}
|
|
192
|
-
} catch(e) {}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return __result({
|
|
196
|
-
added: count,
|
|
197
|
-
transition: transitionName,
|
|
198
|
-
trackIndex: ${trackIndex},
|
|
199
|
-
durationSeconds: ${duration}
|
|
200
|
-
});
|
|
167
|
+
const script = buildToolScript(`
|
|
168
|
+
app.enableQE();
|
|
169
|
+
var qeSeq = qe.project.getActiveSequence();
|
|
170
|
+
if (!qeSeq) return __error("No active sequence (QE)");
|
|
171
|
+
|
|
172
|
+
var seq = app.project.activeSequence;
|
|
173
|
+
if (!seq) return __error("No active sequence");
|
|
174
|
+
|
|
175
|
+
var transitionName = "${escapeForExtendScript(args.transition_name)}";
|
|
176
|
+
var transitionQE = __findTransition(transitionName, "video");
|
|
177
|
+
if (!transitionQE) return __error("Transition not found: " + transitionName + " (tried English name and localized aliases)");
|
|
178
|
+
|
|
179
|
+
var track = seq.videoTracks[${trackIndex}];
|
|
180
|
+
var qeTrack = qeSeq.getVideoTrackAt(${trackIndex});
|
|
181
|
+
var count = 0;
|
|
182
|
+
|
|
183
|
+
// addTransition is a QE CLIP method (getItemAt), not a track method. Apply to
|
|
184
|
+
// the tail of each clip except the last; duration is a SECONDS string.
|
|
185
|
+
for (var c = 0; c < track.clips.numItems - 1; c++) {
|
|
186
|
+
try {
|
|
187
|
+
var qeClip = qeTrack.getItemAt(c);
|
|
188
|
+
if (qeClip) {
|
|
189
|
+
qeClip.addTransition(transitionQE, true, String(${duration}));
|
|
190
|
+
count++;
|
|
191
|
+
}
|
|
192
|
+
} catch(e) {}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return __result({
|
|
196
|
+
added: count,
|
|
197
|
+
transition: transitionName,
|
|
198
|
+
trackIndex: ${trackIndex},
|
|
199
|
+
durationSeconds: ${duration}
|
|
200
|
+
});
|
|
201
201
|
`);
|
|
202
202
|
return sendCommand(script, bridgeOptions);
|
|
203
203
|
},
|