@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
@@ -6,15 +6,15 @@ export function getPlayheadTools(bridgeOptions) {
6
6
  description: "Get the current playhead (CTI) position in the active sequence",
7
7
  parameters: {},
8
8
  handler: async () => {
9
- const script = buildToolScript(`
10
- var seq = app.project.activeSequence;
11
- if (!seq) return __error("No active sequence");
12
-
13
- var ticks = seq.getPlayerPosition().ticks;
14
- return __result({
15
- seconds: __ticksToSeconds(ticks),
16
- ticks: ticks
17
- });
9
+ const script = buildToolScript(`
10
+ var seq = app.project.activeSequence;
11
+ if (!seq) return __error("No active sequence");
12
+
13
+ var ticks = seq.getPlayerPosition().ticks;
14
+ return __result({
15
+ seconds: __ticksToSeconds(ticks),
16
+ ticks: ticks
17
+ });
18
18
  `);
19
19
  return sendCommand(script, bridgeOptions);
20
20
  },
@@ -32,14 +32,14 @@ export function getPlayheadTools(bridgeOptions) {
32
32
  required: ["time_seconds"],
33
33
  },
34
34
  handler: async (args) => {
35
- const script = buildToolScript(`
36
- var seq = app.project.activeSequence;
37
- if (!seq) return __error("No active sequence");
38
-
39
- var ticks = __secondsToTicks(${args.time_seconds}).toString();
40
- seq.setPlayerPosition(ticks);
41
-
42
- return __result({ positionSeconds: ${args.time_seconds} });
35
+ const script = buildToolScript(`
36
+ var seq = app.project.activeSequence;
37
+ if (!seq) return __error("No active sequence");
38
+
39
+ var ticks = __secondsToTicks(${args.time_seconds}).toString();
40
+ seq.setPlayerPosition(ticks);
41
+
42
+ return __result({ positionSeconds: ${args.time_seconds} });
43
43
  `);
44
44
  return sendCommand(script, bridgeOptions);
45
45
  },
@@ -61,45 +61,45 @@ export function getPlayheadTools(bridgeOptions) {
61
61
  required: ["in_seconds", "out_seconds"],
62
62
  },
63
63
  handler: async (args) => {
64
- const script = buildToolScript(`
65
- var seq = app.project.activeSequence;
66
- if (!seq) return __error("No active sequence");
67
-
68
- var inOk = false;
69
- var outOk = false;
70
- var errMsg = null;
71
-
72
- var inTicks = __secondsToTicks(${args.in_seconds}).toString();
73
- var outTicks = __secondsToTicks(${args.out_seconds}).toString();
74
-
75
- try {
76
- if (typeof seq.setWorkAreaInPoint === "function") {
77
- seq.setWorkAreaInPoint(inTicks);
78
- inOk = true;
79
- }
80
- } catch(e1) { errMsg = (errMsg ? errMsg + "; " : "") + "in: " + e1.toString(); }
81
-
82
- try {
83
- if (typeof seq.setWorkAreaOutPoint === "function") {
84
- seq.setWorkAreaOutPoint(outTicks);
85
- outOk = true;
86
- }
87
- } catch(e2) { errMsg = (errMsg ? errMsg + "; " : "") + "out: " + e2.toString(); }
88
-
89
- var enabled = false;
90
- try {
91
- if (typeof seq.isWorkAreaBarEnabled === "function") enabled = seq.isWorkAreaBarEnabled();
92
- } catch(e3) {}
93
-
94
- return __result({
95
- success: (inOk && outOk),
96
- workAreaIn: ${args.in_seconds},
97
- workAreaOut: ${args.out_seconds},
98
- inSet: inOk,
99
- outSet: outOk,
100
- workAreaEnabled: enabled,
101
- error: errMsg
102
- });
64
+ const script = buildToolScript(`
65
+ var seq = app.project.activeSequence;
66
+ if (!seq) return __error("No active sequence");
67
+
68
+ var inOk = false;
69
+ var outOk = false;
70
+ var errMsg = null;
71
+
72
+ var inTicks = __secondsToTicks(${args.in_seconds}).toString();
73
+ var outTicks = __secondsToTicks(${args.out_seconds}).toString();
74
+
75
+ try {
76
+ if (typeof seq.setWorkAreaInPoint === "function") {
77
+ seq.setWorkAreaInPoint(inTicks);
78
+ inOk = true;
79
+ }
80
+ } catch(e1) { errMsg = (errMsg ? errMsg + "; " : "") + "in: " + e1.toString(); }
81
+
82
+ try {
83
+ if (typeof seq.setWorkAreaOutPoint === "function") {
84
+ seq.setWorkAreaOutPoint(outTicks);
85
+ outOk = true;
86
+ }
87
+ } catch(e2) { errMsg = (errMsg ? errMsg + "; " : "") + "out: " + e2.toString(); }
88
+
89
+ var enabled = false;
90
+ try {
91
+ if (typeof seq.isWorkAreaBarEnabled === "function") enabled = seq.isWorkAreaBarEnabled();
92
+ } catch(e3) {}
93
+
94
+ return __result({
95
+ success: (inOk && outOk),
96
+ workAreaIn: ${args.in_seconds},
97
+ workAreaOut: ${args.out_seconds},
98
+ inSet: inOk,
99
+ outSet: outOk,
100
+ workAreaEnabled: enabled,
101
+ error: errMsg
102
+ });
103
103
  `);
104
104
  return sendCommand(script, bridgeOptions);
105
105
  },
@@ -108,29 +108,29 @@ export function getPlayheadTools(bridgeOptions) {
108
108
  description: "Get the current work area in and out points",
109
109
  parameters: {},
110
110
  handler: async () => {
111
- const script = buildToolScript(`
112
- var seq = app.project.activeSequence;
113
- if (!seq) return __error("No active sequence");
114
-
115
- var inSec = 0;
116
- var outSec = 0;
117
- // seq.end is already a ticks STRING, not a Time object
118
- try { if (seq.end != null) outSec = __ticksToSeconds(String(seq.end)); } catch(e) {}
119
- // workInPoint/workOutPoint may be Time objects or ticks strings — handle both
120
- try {
121
- if (seq.workInPoint != null) {
122
- inSec = (seq.workInPoint.ticks != null) ? __ticksToSeconds(seq.workInPoint.ticks) : __ticksToSeconds(String(seq.workInPoint));
123
- }
124
- if (seq.workOutPoint != null) {
125
- outSec = (seq.workOutPoint.ticks != null) ? __ticksToSeconds(seq.workOutPoint.ticks) : __ticksToSeconds(String(seq.workOutPoint));
126
- }
127
- } catch(e) {}
128
- return __result({
129
- sequenceName: seq.name,
130
- inSeconds: inSec,
131
- outSeconds: outSec,
132
- workAreaEnabled: seq.isWorkAreaBarEnabled ? seq.isWorkAreaBarEnabled() : false
133
- });
111
+ const script = buildToolScript(`
112
+ var seq = app.project.activeSequence;
113
+ if (!seq) return __error("No active sequence");
114
+
115
+ var inSec = 0;
116
+ var outSec = 0;
117
+ // seq.end is already a ticks STRING, not a Time object
118
+ try { if (seq.end != null) outSec = __ticksToSeconds(String(seq.end)); } catch(e) {}
119
+ // workInPoint/workOutPoint may be Time objects or ticks strings — handle both
120
+ try {
121
+ if (seq.workInPoint != null) {
122
+ inSec = (seq.workInPoint.ticks != null) ? __ticksToSeconds(seq.workInPoint.ticks) : __ticksToSeconds(String(seq.workInPoint));
123
+ }
124
+ if (seq.workOutPoint != null) {
125
+ outSec = (seq.workOutPoint.ticks != null) ? __ticksToSeconds(seq.workOutPoint.ticks) : __ticksToSeconds(String(seq.workOutPoint));
126
+ }
127
+ } catch(e) {}
128
+ return __result({
129
+ sequenceName: seq.name,
130
+ inSeconds: inSec,
131
+ outSeconds: outSec,
132
+ workAreaEnabled: seq.isWorkAreaBarEnabled ? seq.isWorkAreaBarEnabled() : false
133
+ });
134
134
  `);
135
135
  return sendCommand(script, bridgeOptions);
136
136
  },
@@ -152,14 +152,14 @@ export function getPlayheadTools(bridgeOptions) {
152
152
  required: ["in_seconds", "out_seconds"],
153
153
  },
154
154
  handler: async (args) => {
155
- const script = buildToolScript(`
156
- var seq = app.project.activeSequence;
157
- if (!seq) return __error("No active sequence");
158
-
159
- seq.setInPoint(__secondsToTicks(${args.in_seconds}).toString());
160
- seq.setOutPoint(__secondsToTicks(${args.out_seconds}).toString());
161
-
162
- return __result({ inSeconds: ${args.in_seconds}, outSeconds: ${args.out_seconds} });
155
+ const script = buildToolScript(`
156
+ var seq = app.project.activeSequence;
157
+ if (!seq) return __error("No active sequence");
158
+
159
+ seq.setInPoint(__secondsToTicks(${args.in_seconds}).toString());
160
+ seq.setOutPoint(__secondsToTicks(${args.out_seconds}).toString());
161
+
162
+ return __result({ inSeconds: ${args.in_seconds}, outSeconds: ${args.out_seconds} });
163
163
  `);
164
164
  return sendCommand(script, bridgeOptions);
165
165
  },
@@ -168,14 +168,14 @@ export function getPlayheadTools(bridgeOptions) {
168
168
  description: "Get the current sequence in and out points",
169
169
  parameters: {},
170
170
  handler: async () => {
171
- const script = buildToolScript(`
172
- var seq = app.project.activeSequence;
173
- if (!seq) return __error("No active sequence");
174
-
175
- return __result({
176
- inSeconds: __ticksToSeconds(seq.getInPoint()),
177
- outSeconds: __ticksToSeconds(seq.getOutPoint())
178
- });
171
+ const script = buildToolScript(`
172
+ var seq = app.project.activeSequence;
173
+ if (!seq) return __error("No active sequence");
174
+
175
+ return __result({
176
+ inSeconds: __ticksToSeconds(seq.getInPoint()),
177
+ outSeconds: __ticksToSeconds(seq.getOutPoint())
178
+ });
179
179
  `);
180
180
  return sendCommand(script, bridgeOptions);
181
181
  },
@@ -51,27 +51,27 @@ export function getProjectManagerTools(bridgeOptions) {
51
51
  required: ["destination_path"],
52
52
  },
53
53
  handler: async (args) => {
54
- const script = buildToolScript(`
55
- var pm = app.projectManager;
56
- if (!pm) return __error("Project Manager not available");
57
-
58
- pm.destinationPath = "${escapeForExtendScript(args.destination_path)}";
59
- pm.includeAllSequences = ${args.include_all_sequences !== false ? 1 : 0};
60
- pm.copyToNewLocation = ${args.copy_to_new_location !== false ? 1 : 0};
61
- pm.excludeUnused = ${args.exclude_unused !== false ? 1 : 0};
62
- pm.transcodeMedia = ${args.transcode ? 1 : 0};
63
- pm.includePreviewFiles = ${args.include_preview_files ? 1 : 0};
64
- pm.renameMedia = ${args.rename_media ? 1 : 0};
65
- pm.convertImageSequences = ${args.convert_image_sequences ? 1 : 0};
66
- pm.convertAEComps = ${args.convert_ae_comps ? 1 : 0};
67
- pm.convertSyntheticMedia = ${args.convert_synthetic ? 1 : 0};
68
-
69
- pm.process(app.project);
70
-
71
- return __result({
72
- started: true,
73
- destination: "${escapeForExtendScript(args.destination_path)}"
74
- });
54
+ const script = buildToolScript(`
55
+ var pm = app.projectManager;
56
+ if (!pm) return __error("Project Manager not available");
57
+
58
+ pm.destinationPath = "${escapeForExtendScript(args.destination_path)}";
59
+ pm.includeAllSequences = ${args.include_all_sequences !== false ? 1 : 0};
60
+ pm.copyToNewLocation = ${args.copy_to_new_location !== false ? 1 : 0};
61
+ pm.excludeUnused = ${args.exclude_unused !== false ? 1 : 0};
62
+ pm.transcodeMedia = ${args.transcode ? 1 : 0};
63
+ pm.includePreviewFiles = ${args.include_preview_files ? 1 : 0};
64
+ pm.renameMedia = ${args.rename_media ? 1 : 0};
65
+ pm.convertImageSequences = ${args.convert_image_sequences ? 1 : 0};
66
+ pm.convertAEComps = ${args.convert_ae_comps ? 1 : 0};
67
+ pm.convertSyntheticMedia = ${args.convert_synthetic ? 1 : 0};
68
+
69
+ pm.process(app.project);
70
+
71
+ return __result({
72
+ started: true,
73
+ destination: "${escapeForExtendScript(args.destination_path)}"
74
+ });
75
75
  `);
76
76
  return sendCommand(script, { ...bridgeOptions, timeoutMs: 300000 }); // 5 min timeout
77
77
  },